|
|
|
|
"use strict";var e=require("postcss-selector-parser"),t=require("tty"),r=require("path"),n=require("url"),s=require("fs");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(e),a=i(t),l=i(r),u=i(n),c=i(s);const h=e=>{const t=String(Object(e).replaceWith||"[blank]"),r=o.default().astSync(t),n=Boolean(!("preserve"in Object(e))||e.preserve);return{postcssPlugin:"css-blank-pseudo",Rule:(e,{result:t})=>{if(-1===e.selector.indexOf(":blank"))return;let s;try{const t=o.default((e=>{e.walkPseudos((e=>{":blank"===e.value&&(e.nodes&&e.nodes.length||e.replaceWith(r.clone()))}))})).processSync(e.selector);s=String(t)}catch(r){return void e.warn(t,`Failed to parse selector : ${e.selector}`)}if(void 0===s)return;if(s===e.selector)return;const i=e.clone({selector:s});n?e.before(i):e.replaceWith(i)}}};var p;h.postcss=!0,function(e){e.InvalidArguments="INVALID_ARGUMENTS"}(p||(p={}));var f={exports:{}};let d=a.default,g=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||"win32"===process.platform||d.isatty(1)&&"dumb"!==process.env.TERM||"CI"in process.env),m=(e,t,r=e)=>n=>{let s=""+n,i=s.indexOf(t,e.length);return~i?e+w(s,t,r,i)+t:e+s+t},w=(e,t,r,n)=>{let s=e.substring(0,n)+r,i=e.substring(n+t.length),o=i.indexOf(t);return~o?s+w(i,t,r,o):s+i},y=(e=g)=>({isColorSupported:e,reset:e?e=>`[0m${e}[0m`:String,bold:e?m("[1m","[22m","[22m[1m"):String,dim:e?m("[2m","[22m","[22m[2m"):String,italic:e?m("[3m","[23m"):String,underline:e?m("[4m","[24m"):String,inverse:e?m("[7m","[27m"):String,hidden:e?m("[8m","[28m"):String,strikethrough:e?m("[9m","[29m"):String,black:e?m("[30m","[39m"):String,red:e?m("[31m","[39m"):String,green:e?m("[32m","[39m"):String,yellow:e?m("[33m","[39m"):String,blue:e?m("[34m","[39m"):String,magenta:e?m("[35m","[39m"):String,cyan:e?m("[36m","[39m"):String,white:e?m("[37m","[39m"):String,gray:e?m("[90m","[39m"):String,bgBlack:e?m("[40m","[49m"):String,bgRed:e?m("[41m","[49m"):String,bgGreen:e?m("[42m","[49m"):String,bgYellow:e?m("[43m","[49m"):String,bgBlue:e?m("[44m","[49m"):String,bgMagenta:e?m("[45m","[49m"):String,bgCyan:e?m("[46m","[49m"):String,bgWhite:e?m("[47m","[49m"):String});f.exports=y(),f.exports.createColors=y;const v="'".charCodeAt(0),S='"'.charCodeAt(0),C="\\".charCodeAt(0),b="/".charCodeAt(0),_="\n".charCodeAt(0),x=" ".charCodeAt(0),O="\f".charCodeAt(0),A="\t".charCodeAt(0),M="\r".charCodeAt(0),k="[".charCodeAt(0),E="]".charCodeAt(0),L="(".charCodeAt(0),R=")".charCodeAt(0),P="{".charCodeAt(0),I="}".charCodeAt(0),j=";".charCodeAt(0),N="*".charCodeAt(0),U=":".charCodeAt(0),B="@".charCodeAt(0),D=/[\t\n\f\r "#'()/;[\\\]{}]/g,F=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,T=/.[\n"'(/\\]/,$=/[\da-f]/i;var G=function(e,t={}){let r,n,s,i,o,a,l,u,c,h,p=e.css.valueOf(),f=t.ignoreErrors,d=p.length,g=0,m=[],w=[];function y(t){throw e.error("Unclosed "+t,g)}return{back:function(e){w.push(e)},nextToken:function(e){if(w.length)return w.pop();if(g>=d)return;let t=!!e&&e.ignoreUnclosed;switch(r=p.charCodeAt(g),r){case _:case x:case A:case M:case O:n=g;do{n+=1,r=p.charCodeAt(n)}while(r===x||r===_||r===A||r===M||r===O);h=["space",p.slice(g,n)],g=n-1;break;case k:case E:case P:case I:case U:case j:case R:{let e=String.fromCharCode(r);h=[e,e,g];break}case L:if(u=m.length?m.pop()[1]:"",c=p.charCodeAt(g+1),"url"===u&&c!==v&&c!==S&&c!==x&&c!==_&&c!==A&&c!==O&&c!==M){n=g;do{if(a=!1,n=p.indexOf(")",n+1),-1===n){if(f||t){n=g;break}y("bracket")}for(l=n;p.charCodeAt(l-1)===C;)l-=1,a=!a}while(a);h=["brackets",p.slice(g,n+1),g,n],g=n}else n=p.indexOf(")",g+1),i=p.slice(g,n+1),-1===n||T.test(i)?h=["(","(",g]:(h=["brackets",i,g,n],g=n);break;case v:case S:s=r===v?"'":'"',n=g;do{if(a=!1,n=p.indexOf(s,n+1),-1===n){if(f||t){n=g+1;break}y("string")}for(l=n;p.charCodeAt(l-1)===C;)l-=1,a=!a}while(a);h=["string",p.slice(g,n+1),g,n],g=n;break;case B:D.lastIndex=g+1,D.test(p),n=0===D.lastIndex?p.length-1:D.lastIndex-2,h=["at-word",p.slice(g,n+1),g,n],g=n;break;case C:for(n=g,o=!0;p.charCodeAt(n+1)===
|