#!/usr/bin/env node import e from"postcss-value-parser";import t from"tty";import r from"path";import n from"url";import s,{promises as i}from"fs";var o={preserve:!0};const a=/^place-(content|items|self)/,l=t=>("preserve"in Object(t)&&(o.preserve=Boolean(t.preserve)),{postcssPlugin:"postcss-place",Declaration:(t,{result:r})=>{a.test(t)&&((t,{result:r})=>{const n=t.prop.match(a)[1];let s;try{s=e(t.value)}catch(e){t.warn(r,`Failed to parse value '${t.value}'. Leaving the original value intact.`)}if(void 0===s)return;let i=[];i=s.nodes.length?s.nodes.filter((e=>"word"===e.type||"function"===e.type)).map((t=>e.stringify(t))):[e.stringify(s)],t.cloneBefore({prop:`align-${n}`,value:i[0]}),t.cloneBefore({prop:`justify-${n}`,value:i[1]||i[0]}),o.preserve||t.remove()})(t,{result:r})}});var u;l.postcss=!0,function(e){e.InvalidArguments="INVALID_ARGUMENTS"}(u||(u={}));var c={exports:{}};let h=t,p=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||"win32"===process.platform||h.isatty(1)&&"dumb"!==process.env.TERM||"CI"in process.env),f=(e,t,r=e)=>n=>{let s=""+n,i=s.indexOf(t,e.length);return~i?e+d(s,t,r,i)+t:e+s+t},d=(e,t,r,n)=>{let s=e.substring(0,n)+r,i=e.substring(n+t.length),o=i.indexOf(t);return~o?s+d(i,t,r,o):s+i},g=(e=p)=>({isColorSupported:e,reset:e?e=>`${e}`:String,bold:e?f("","",""):String,dim:e?f("","",""):String,italic:e?f("",""):String,underline:e?f("",""):String,inverse:e?f("",""):String,hidden:e?f("",""):String,strikethrough:e?f("",""):String,black:e?f("",""):String,red:e?f("",""):String,green:e?f("",""):String,yellow:e?f("",""):String,blue:e?f("",""):String,magenta:e?f("",""):String,cyan:e?f("",""):String,white:e?f("",""):String,gray:e?f("",""):String,bgBlack:e?f("",""):String,bgRed:e?f("",""):String,bgGreen:e?f("",""):String,bgYellow:e?f("",""):String,bgBlue:e?f("",""):String,bgMagenta:e?f("",""):String,bgCyan:e?f("",""):String,bgWhite:e?f("",""):String});c.exports=g(),c.exports.createColors=g;const m="'".charCodeAt(0),w='"'.charCodeAt(0),y="\\".charCodeAt(0),v="/".charCodeAt(0),C="\n".charCodeAt(0),S=" ".charCodeAt(0),b="\f".charCodeAt(0),_="\t".charCodeAt(0),x="\r".charCodeAt(0),O="[".charCodeAt(0),A="]".charCodeAt(0),M="(".charCodeAt(0),k=")".charCodeAt(0),E="{".charCodeAt(0),L="}".charCodeAt(0),R=";".charCodeAt(0),P="*".charCodeAt(0),I=":".charCodeAt(0),j="@".charCodeAt(0),N=/[\t\n\f\r "#'()/;[\\\]{}]/g,B=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,U=/.[\n"'(/\\]/,D=/[\da-f]/i;var F=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,F=[],T=[];function $(t){throw e.error("Unclosed "+t,g)}return{back:function(e){T.push(e)},nextToken:function(e){if(T.length)return T.pop();if(g>=d)return;let t=!!e&&e.ignoreUnclosed;switch(r=p.charCodeAt(g),r){case C:case S:case _:case x:case b:n=g;do{n+=1,r=p.charCodeAt(n)}while(r===S||r===C||r===_||r===x||r===b);h=["space",p.slice(g,n)],g=n-1;break;case O:case A:case E:case L:case I:case R:case k:{let e=String.fromCharCode(r);h=[e,e,g];break}case M:if(u=F.length?F.pop()[1]:"",c=p.charCodeAt(g+1),"url"===u&&c!==m&&c!==w&&c!==S&&c!==C&&c!==_&&c!==b&&c!==x){n=g;do{if(a=!1,n=p.indexOf(")",n+1),-1===n){if(f||t){n=g;break}$("bracket")}for(l=n;p.charCodeAt(l-1)===y;)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||U.test(i)?h=["(","(",g]:(h=["brackets",i,g,n],g=n);break;case m:case w:s=r===m?"'":'"',n=g;do{if(a=!1,n=p.indexOf(s,n+1),-1===n){if(f||t){n=g+1;break}$("string")}for(l=n;p.charCodeAt(l-1)===y;)l-=1,a=!a}while(a);h=["string",p.slice(g,n+1),g,n],g=n;break;case j:N.lastIndex=g+1,N.test(p),n=0===N.lastIndex?p.length-1:N.lastIndex-2,h=["at-word",p.slice(g,n+1),g,n],g=n;break;case y:for(n=g,o=!0;p.charCodeAt(n+1)===y;)n+=1,o=!o;if(r=p.charCodeAt(n+1),o&&r!==v&&r!==S&&r!==C&&r!==_&&r!==x&&r!==b&&(n+=1,D.test(p.charAt(n)))){for(;D.test(p.charAt(n+1));)n+=1;p.charCodeAt(n+1)===S&&(n+=1)}h=["word",p.slice(g,n+1),g,n],g=n;break;default:r===v&&p.charCodeAt(g+1)===P?(n=p.indexOf("*/",g+2)+1,0===n&&(f||t?n=p.length:$("comment")),h=["comment",p.slice(g,n+1),g,n],g=n):(B.lastIndex=g+1,B.test(p),n=0===B.lastIndex?p.length-1:B.lastIndex-2,h=["word",p.slice(g,n+1),g,n],F.push(h),g=n)}return g++,h},endOfFile:function(){return 0===T.length&&g>=d},position:function(){return g}}};let T,$=c.exports,G=F;const z={brackets:$.cyan,"at-word":$.cyan,comment:$.gray,string:$.green,class:$.yellow,hash:$.magenta,call:$.cyan,"(":$.cyan,")":$.cyan,"{":$.yellow,"}":$.yellow,"[":$.yellow,"]":$.yellow,":":$.yellow,";":$.yellow};function W([e,t],r){if("word"===e){if("."===t[0])return"class";if("#"===t[0])return"hash"}if(!r.endOfFile()){let e=r.nextToken();if(r.back(e),"brackets"===e[0]||"("===e[0])return"call"}return e}function V(e){let t=G(new T(e),{ignoreErrors:!0}),r="";for(;!t.endOfFile();){let e=t.nextToken(),n=z[W(e,t)];r+=n?e[1].split(/\r?\n/).map((e=>n(e))).join("\n"):e[1]}return r}V.registerInput=function(e){T=e};var J=V;let q=c.exports,Y=J;class Q extends Error{constructor(e,t,r,n,s,i){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),i&&(this.plugin=i),void 0!==t&&void 0!==r&&("number"==typeof t?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Q)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=q.isColorSupported),Y&&e&&(t=Y(t));let r,n,s=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,s.length),a=String(o).length;if(e){let{bold:e,red:t,gray:s}=q.createColors(!0);r=r=>e(t(r)),n=e=>s(e)}else r=n=e=>e;return s.slice(i,o).map(((e,t)=>{let s=i+1+t,o=" "+(" "+s).slice(-a)+" | ";if(s===this.line){let t=n(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(o)+e+"\n "+t+r("^")}return" "+n(o)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}var Z=Q;Q.default=Q;var H={};H.isClean=Symbol("isClean"),H.my=Symbol("my");const K={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:!1};class X{constructor(e){this.builder=e}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}document(e){this.body(e)}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let s=(e.raws.between||"")+(t?";":"");this.builder(r+n+s,e)}}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n{if(n=e.raws[t],void 0!==n)return!1}))}var o;return void 0===n&&(n=K[r]),i.rawCache[r]=n,n}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,s=0;for(;n&&"root"!==n.type;)s+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;eue(e,r))):("object"===i&&null!==s&&(s=ue(s)),r[n]=s)}return r}class ce{constructor(e={}){this.raws={},this[se]=!1,this[ie]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}error(e,t={}){if(this.source){let{start:r,end:n}=this.rangeBy(t);return this.source.input.error(e,{line:r.line,column:r.column},{line:n.line,column:n.column},t)}return new oe(e)}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}toString(e=le){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}assign(e={}){for(let t in e)this[t]=e[t];return this}clone(e={}){let t=ue(this);for(let r in e)t[r]=e[r];return t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}before(e){return this.parent.insertBefore(this,e),this}after(e){return this.parent.insertAfter(this,e),this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}raw(e,t){return(new ae).raw(this,e,t)}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}toJSON(e,t){let r={},n=null==t;t=t||new Map;let s=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let n=this[e];if(Array.isArray(n))r[e]=n.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){let i=t.get(n.input);null==i&&(i=s,t.set(n.input,s),s++),r[e]={inputId:i,start:n.start,end:n.end}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}positionInside(e){let t=this.toString(),r=this.source.start.column,n=this.source.start.line;for(let s=0;s(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0),get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t]}}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}markDirty(){if(this[se]){this[se]=!1;let e=this;for(;e=e.parent;)e[se]=!1}}get proxyOf(){return this}}var he=ce;ce.default=ce;let pe=he;class fe extends pe{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}var de=fe;fe.default=fe;var ge={},me={},we={},ye={},ve="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");ye.encode=function(e){if(0<=e&&e>>=5)>0&&(t|=32),r+=Ce.encode(t)}while(n>0);return r},we.decode=function(e,t,r){var n,s,i,o,a=e.length,l=0,u=0;do{if(t>=a)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(s=Ce.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));n=!!(32&s),l+=(s&=31)<>1,1==(1&i)?-o:o),r.rest=t};var Se={};!function(e){e.getArg=function(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')};var t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function n(e){var r=e.match(t);return r?{scheme:r[1],auth:r[2],host:r[3],port:r[4],path:r[5]}:null}function s(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}e.urlParse=n,e.urlGenerate=s;var i,o,a=(i=function(t){var r=t,i=n(t);if(i){if(!i.path)return t;r=i.path}for(var o=e.isAbsolute(r),a=[],l=0,u=0;;){if(l=u,-1===(u=r.indexOf("/",l))){a.push(r.slice(l));break}for(a.push(r.slice(l,u));u=0;u--)"."===(c=a[u])?a.splice(u,1):".."===c?h++:h>0&&(""===c?(a.splice(u+1,h),h=0):(a.splice(u,2),h--));return""===(r=a.join("/"))&&(r=o?"/":"."),i?(i.path=r,s(i)):r},o=[],function(e){for(var t=0;t32&&o.pop(),n});function l(e,t){""===e&&(e="."),""===t&&(t=".");var i=n(t),o=n(e);if(o&&(e=o.path||"/"),i&&!i.scheme)return o&&(i.scheme=o.scheme),s(i);if(i||t.match(r))return t;if(o&&!o.host&&!o.path)return o.host=t,s(o);var l="/"===t.charAt(0)?t:a(e.replace(/\/+$/,"")+"/"+t);return o?(o.path=l,s(o)):l}e.normalize=a,e.join=l,e.isAbsolute=function(e){return"/"===e.charAt(0)||t.test(e)},e.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if((e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)};var u=!("__proto__"in Object.create(null));function c(e){return e}function h(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}e.toSetString=u?c:function(e){return h(e)?"$"+e:e},e.fromSetString=u?c:function(e){return h(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,t,r){var n=p(e.source,t.source);return 0!==n||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)||r||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=e.generatedLine-t.generatedLine)?n:p(e.name,t.name)},e.compareByOriginalPositionsNoSource=function(e,t,r){var n;return 0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)||r||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=e.generatedLine-t.generatedLine)?n:p(e.name,t.name)},e.compareByGeneratedPositionsDeflated=function(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||r||0!==(n=p(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:p(e.name,t.name)},e.compareByGeneratedPositionsDeflatedNoLine=function(e,t,r){var n=e.generatedColumn-t.generatedColumn;return 0!==n||r||0!==(n=p(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:p(e.name,t.name)},e.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=p(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:p(e.name,t.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(e,t,r){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),r){var i=n(r);if(!i)throw new Error("sourceMapURL could not be parsed");if(i.path){var o=i.path.lastIndexOf("/");o>=0&&(i.path=i.path.substring(0,o+1))}t=l(s(i),t)}return a(t)}}(Se);var be={},_e=Se,xe=Object.prototype.hasOwnProperty,Oe="undefined"!=typeof Map;function Ae(){this._array=[],this._set=Oe?new Map:Object.create(null)}Ae.fromArray=function(e,t){for(var r=new Ae,n=0,s=e.length;n=0)return t}else{var r=_e.toSetString(e);if(xe.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},Ae.prototype.at=function(e){if(e>=0&&en||s==n&&o>=i||ke.compareByGeneratedPositionsInflated(t,r)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},Ee.prototype.toArray=function(){return this._sorted||(this._array.sort(ke.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},Me.MappingList=Ee;var Le=we,Re=Se,Pe=be.ArraySet,Ie=Me.MappingList;function je(e){e||(e={}),this._file=Re.getArg(e,"file",null),this._sourceRoot=Re.getArg(e,"sourceRoot",null),this._skipValidation=Re.getArg(e,"skipValidation",!1),this._sources=new Pe,this._names=new Pe,this._mappings=new Ie,this._sourcesContents=null}je.prototype._version=3,je.fromSourceMap=function(e){var t=e.sourceRoot,r=new je({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(n.source=e.source,null!=t&&(n.source=Re.relative(t,n.source)),n.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(n.name=e.name)),r.addMapping(n)})),e.sources.forEach((function(n){var s=n;null!==t&&(s=Re.relative(t,n)),r._sources.has(s)||r._sources.add(s);var i=e.sourceContentFor(n);null!=i&&r.setSourceContent(n,i)})),r},je.prototype.addMapping=function(e){var t=Re.getArg(e,"generated"),r=Re.getArg(e,"original",null),n=Re.getArg(e,"source",null),s=Re.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,n,s),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=s&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:s})},je.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=Re.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Re.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[Re.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},je.prototype.applySourceMap=function(e,t,r){var n=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=e.file}var s=this._sourceRoot;null!=s&&(n=Re.relative(s,n));var i=new Pe,o=new Pe;this._mappings.unsortedForEach((function(t){if(t.source===n&&null!=t.originalLine){var a=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=a.source&&(t.source=a.source,null!=r&&(t.source=Re.join(r,t.source)),null!=s&&(t.source=Re.relative(s,t.source)),t.originalLine=a.line,t.originalColumn=a.column,null!=a.name&&(t.name=a.name))}var l=t.source;null==l||i.has(l)||i.add(l);var u=t.name;null==u||o.has(u)||o.add(u)}),this),this._sources=i,this._names=o,e.sources.forEach((function(t){var n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=Re.join(r,t)),null!=s&&(t=Re.relative(s,t)),this.setSourceContent(t,n))}),this)},je.prototype._validateMapping=function(e,t,r,n){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},je.prototype._serializeMappings=function(){for(var e,t,r,n,s=0,i=1,o=0,a=0,l=0,u=0,c="",h=this._mappings.toArray(),p=0,f=h.length;p0){if(!Re.compareByGeneratedPositionsInflated(t,h[p-1]))continue;e+=","}e+=Le.encode(t.generatedColumn-s),s=t.generatedColumn,null!=t.source&&(n=this._sources.indexOf(t.source),e+=Le.encode(n-u),u=n,e+=Le.encode(t.originalLine-1-a),a=t.originalLine-1,e+=Le.encode(t.originalColumn-o),o=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=Le.encode(r-l),l=r)),c+=e}return c},je.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=Re.relative(t,e));var r=Re.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null}),this)},je.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},je.prototype.toString=function(){return JSON.stringify(this.toJSON())},me.SourceMapGenerator=je;var Ne={},Be={};!function(e){function t(r,n,s,i,o,a){var l=Math.floor((n-r)/2)+r,u=o(s,i[l],!0);return 0===u?l:u>0?n-l>1?t(l,n,s,i,o,a):a==e.LEAST_UPPER_BOUND?n1?t(r,l,s,i,o,a):a==e.LEAST_UPPER_BOUND?l:r<0?-1:r}e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2,e.search=function(r,n,s,i){if(0===n.length)return-1;var o=t(-1,n.length,r,n,s,i||e.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&0===s(n[o],n[o-1],!0);)--o;return o}}(Be);var Ue={};function De(e){function t(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}return function e(r,n,s,i){if(s=0){var i=this._originalMappings[s];if(void 0===e.column)for(var o=i.originalLine;i&&i.originalLine===o;)n.push({line:Te.getArg(i,"generatedLine",null),column:Te.getArg(i,"generatedColumn",null),lastColumn:Te.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++s];else for(var a=i.originalColumn;i&&i.originalLine===t&&i.originalColumn==a;)n.push({line:Te.getArg(i,"generatedLine",null),column:Te.getArg(i,"generatedColumn",null),lastColumn:Te.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++s]}return n},Ne.SourceMapConsumer=Ve,Je.prototype=Object.create(Ve.prototype),Je.prototype.consumer=Ve,Je.prototype._findSourceIndex=function(e){var t,r=e;if(null!=this.sourceRoot&&(r=Te.relative(this.sourceRoot,r)),this._sources.has(r))return this._sources.indexOf(r);for(t=0;t0&&(e[t]=n,e[t+1]=r)}else if(n<20)for(let n=t;nt;r--){let t=e[r-1],n=e[r];if(Ye(t,n)<=0)break;e[r-1]=n,e[r]=t}else We(e,Ye,t)}function Ze(e,t){var r=e;"string"==typeof e&&(r=Te.parseSourceMapInput(e));var n=Te.getArg(r,"version"),s=Te.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new Ge,this._names=new Ge;var i={line:-1,column:0};this._sections=s.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var r=Te.getArg(e,"offset"),n=Te.getArg(r,"line"),s=Te.getArg(r,"column");if(n1&&(r.source=c+n[1],c+=n[1],r.originalLine=l+n[2],l=r.originalLine,r.originalLine+=1,r.originalColumn=u+n[3],u=r.originalColumn,n.length>4&&(r.name=h+n[4],h+=n[4])),m.push(r),"number"==typeof r.originalLine){let e=r.source;for(;g.length<=e;)g.push(null);null===g[e]&&(g[e]=[]),g[e].push(r)}}Qe(m,w),this.__generatedMappings=m;for(var y=0;y=0){var n=this._generatedMappings[r];if(n.generatedLine===t.generatedLine){var s=Te.getArg(n,"source",null);null!==s&&(s=this._sources.at(s),s=Te.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var i=Te.getArg(n,"name",null);return null!==i&&(i=this._names.at(i)),{source:s,line:Te.getArg(n,"originalLine",null),column:Te.getArg(n,"originalColumn",null),name:i}}}return{source:null,line:null,column:null,name:null}},Je.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e})))},Je.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var n,s=e;if(null!=this.sourceRoot&&(s=Te.relative(this.sourceRoot,s)),null!=this.sourceRoot&&(n=Te.urlParse(this.sourceRoot))){var i=s.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(i))return this.sourcesContent[this._sources.indexOf(i)];if((!n.path||"/"==n.path)&&this._sources.has("/"+s))return this.sourcesContent[this._sources.indexOf("/"+s)]}if(t)return null;throw new Error('"'+s+'" is not in the SourceMap.')},Je.prototype.generatedPositionFor=function(e){var t=Te.getArg(e,"source");if((t=this._findSourceIndex(t))<0)return{line:null,column:null,lastColumn:null};var r={source:t,originalLine:Te.getArg(e,"line"),originalColumn:Te.getArg(e,"column")},n=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",Te.compareByOriginalPositions,Te.getArg(e,"bias",Ve.GREATEST_LOWER_BOUND));if(n>=0){var s=this._originalMappings[n];if(s.source===r.source)return{line:Te.getArg(s,"generatedLine",null),column:Te.getArg(s,"generatedColumn",null),lastColumn:Te.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},Ne.BasicSourceMapConsumer=Je,Ze.prototype=Object.create(Ve.prototype),Ze.prototype.constructor=Ve,Ze.prototype._version=3,Object.defineProperty(Ze.prototype,"sources",{get:function(){for(var e=[],t=0;t=0;t--)this.prepend(e[t]);else{if(!e[tt]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},rt.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r0){for(t=[],r=0;r{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t)=>()=>{let r="",n=t;for(;n--;)r+=e[Math.random()*e.length|0];return r}};let{SourceMapConsumer:st,SourceMapGenerator:it}=ge,{existsSync:ot,readFileSync:at}=s,{dirname:lt,join:ut}=r;class ct{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=lt(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new st(this.text)),this.consumerCache}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}startWith(e,t){return!!e&&e.substr(0,t.length)===t}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}loadFile(e){if(this.root=lt(e),ot(e))return this.mapFile=e,at(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof st)return it.fromSourceMap(t).toString();if(t instanceof it)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=ut(lt(e),t)),this.loadFile(t)}}}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}}var ht=ct;ct.default=ct;let{SourceMapConsumer:pt,SourceMapGenerator:ft}=ge,{fileURLToPath:dt,pathToFileURL:gt}=n,{resolve:mt,isAbsolute:wt}=r,{nanoid:yt}=nt,vt=J,Ct=Z,St=ht,bt=Symbol("fromOffsetCache"),_t=Boolean(pt&&ft),xt=Boolean(mt&&wt);class Ot{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!xt||/^\w+:\/\//.test(t.from)||wt(t.from)?this.file=t.from:this.file=mt(t.from)),xt&&_t){let e=new St(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}fromOffset(e){let t,r;if(this[bt])r=this[bt];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let n=0,s=e.length;n=t)n=r.length-1;else{let t,s=r.length-2;for(;n>1),e=r[t+1])){n=t;break}n=t+1}}return{line:n+1,col:e-r[n]+1}}error(e,t,r,n={}){let s,i,o;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof t.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);i=e.line,o=e.col}else i=n.line,o=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,i,o);return s=a?new Ct(e,void 0===a.endLine?a.line:{line:a.line,column:a.column},void 0===a.endLine?a.column:{line:a.endLine,column:a.endColumn},a.source,a.file,n.plugin):new Ct(e,void 0===i?t:{line:t,column:r},void 0===i?r:{line:i,column:o},this.css,this.file,n.plugin),s.input={line:t,column:r,endLine:i,endColumn:o,source:this.css},this.file&&(gt&&(s.input.url=gt(this.file).toString()),s.input.file=this.file),s}origin(e,t,r,n){if(!this.map)return!1;let s,i,o=this.map.consumer(),a=o.originalPositionFor({line:e,column:t});if(!a.source)return!1;"number"==typeof r&&(s=o.originalPositionFor({line:r,column:n})),i=wt(a.source)?gt(a.source):new URL(a.source,this.map.consumer().sourceRoot||gt(this.map.mapFile));let l={url:i.toString(),line:a.line,column:a.column,endLine:s&&s.line,endColumn:s&&s.column};if("file:"===i.protocol){if(!dt)throw new Error("file: protocol is not available in this PostCSS build");l.file=dt(i)}let u=o.sourceContentFor(a.source);return u&&(l.source=u),l}mapResolve(e){return/^\w+:\/\//.test(e)?e:mt(this.map.consumer().sourceRoot||this.map.root||".",e)}get from(){return this.file||this.id}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}}var At=Ot;Ot.default=Ot,vt&&vt.registerInput&&vt.registerInput(Ot);let{SourceMapConsumer:Mt,SourceMapGenerator:kt}=ge,{dirname:Et,resolve:Lt,relative:Rt,sep:Pt}=r,{pathToFileURL:It}=n,jt=At,Nt=Boolean(Mt&&kt),Bt=Boolean(Et&&Lt&&Rt&&Pt);var Ut=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new jt(this.css,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm,""))}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let r=t.source.input.from;r&&!e[r]&&(e[r]=!0,this.map.setSourceContent(this.toUrl(this.path(r)),t.source.input.css))}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(e,this.css)}}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),n=e.root||Et(e.file);!1===this.mapOpts.sourcesContent?(t=new Mt(e.text),t.sourcesContent&&(t.sourcesContent=t.sourcesContent.map((()=>null)))):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(n)))}}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=kt.fromSourceMap(e)}else this.map=new kt({file:this.outputFile()}),this.map.addMapping({source:this.opts.from?this.toUrl(this.path(this.opts.from)):"",generated:{line:1,column:0},original:{line:1,column:0}});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}path(e){if(0===e.indexOf("<"))return e;if(/^\w+:\/\//.test(e))return e;if(this.mapOpts.absolute)return e;let t=this.opts.to?Et(this.opts.to):".";return"string"==typeof this.mapOpts.annotation&&(t=Et(Lt(t,this.mapOpts.annotation))),e=Rt(t,e)}toUrl(e){return"\\"===Pt&&(e=e.replace(/\\/g,"/")),encodeURI(e).replace(/[#?]/g,encodeURIComponent)}sourcePath(e){if(this.mapOpts.from)return this.toUrl(this.mapOpts.from);if(this.mapOpts.absolute){if(It)return It(e.source.input.from).toString();throw new Error("`map.absolute` option is not available in this PostCSS build")}return this.toUrl(this.path(e.source.input.from))}generateString(){this.css="",this.map=new kt({file:this.outputFile()});let e,t,r=1,n=1,s="",i={source:"",generated:{line:0,column:0},original:{line:0,column:0}};this.stringify(this.root,((o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(i.generated.line=r,i.generated.column=n-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(r+=e.length,t=o.lastIndexOf("\n"),n=o.length-t):n+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"!==a.type||a!==e.last||e.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=r,i.generated.column=n-2,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,i.generated.line=r,i.generated.column=n-1,this.map.addMapping(i)))}}))}generate(){if(this.clearAnnotation(),Bt&&Nt&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}};let Dt=he;class Ft extends Dt{constructor(e){super(e),this.type="comment"}}var Tt=Ft;Ft.default=Ft;let $t,Gt,zt,{isClean:Wt,my:Vt}=H,Jt=de,qt=Tt,Yt=he;function Qt(e){return e.map((e=>(e.nodes&&(e.nodes=Qt(e.nodes)),delete e.source,e)))}function Zt(e){if(e[Wt]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Zt(t)}class Ht extends Yt{push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}each(e){if(!this.proxyOf.nodes)return;let t,r,n=this.getIterator();for(;this.indexes[n]{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)})):this.walk(((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)})):this.walk(((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)})):this.walk(((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}insertBefore(e,t){let r,n=0===(e=this.index(e))&&"prepend",s=this.normalize(t,this.proxyOf.nodes[e],n).reverse();for(let t of s)this.proxyOf.nodes.splice(e,0,t);for(let t in this.indexes)r=this.indexes[t],e<=r&&(this.indexes[t]=r+s.length);return this.markDirty(),this}insertAfter(e,t){e=this.index(e);let r,n=this.normalize(t,this.proxyOf.nodes[e]).reverse();for(let t of n)this.proxyOf.nodes.splice(e+1,0,t);for(let t in this.indexes)r=this.indexes[t],e=e&&(this.indexes[r]=t-1);return this.markDirty(),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))})),this.markDirty(),this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}normalize(e,t){if("string"==typeof e)e=Qt($t(e).nodes);else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new Jt(e)]}else if(e.selector)e=[new Gt(e)];else if(e.name)e=[new zt(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new qt(e)]}return e.map((e=>(e[Vt]||Ht.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[Wt]&&Zt(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this,e)))}getProxyProcessor(){return{set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0),get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]}}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}}Ht.registerParse=e=>{$t=e},Ht.registerRule=e=>{Gt=e},Ht.registerAtRule=e=>{zt=e};var Kt=Ht;Ht.default=Ht,Ht.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,zt.prototype):"rule"===e.type?Object.setPrototypeOf(e,Gt.prototype):"decl"===e.type?Object.setPrototypeOf(e,Jt.prototype):"comment"===e.type&&Object.setPrototypeOf(e,qt.prototype),e[Vt]=!0,e.nodes&&e.nodes.forEach((e=>{Ht.rebuild(e)}))};let Xt,er,tr=Kt;class rr extends tr{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Xt(new er,this,e).stringify()}}rr.registerLazyResult=e=>{Xt=e},rr.registerProcessor=e=>{er=e};var nr=rr;rr.default=rr;let sr={};var ir=function(e){sr[e]||(sr[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};class or{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}var ar=or;or.default=or;let lr=ar;class ur{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new lr(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}}var cr=ur;ur.default=ur;let hr=Kt;class pr extends hr{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}var fr=pr;pr.default=pr,hr.registerAtRule(pr);let dr,gr,mr=Kt;class wr extends mr{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}normalize(e,t,r){let n=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before;return n}toResult(e={}){return new dr(new gr,this,e).stringify()}}wr.registerLazyResult=e=>{dr=e},wr.registerProcessor=e=>{gr=e};var yr=wr;wr.default=wr;let vr={split(e,t,r){let n=[],s="",i=!1,o=0,a=!1,l=!1;for(let r of e)l?l=!1:"\\"===r?l=!0:a?r===a&&(a=!1):'"'===r||"'"===r?a=r:"("===r?o+=1:")"===r?o>0&&(o-=1):0===o&&t.includes(r)&&(i=!0),i?(""!==s&&n.push(s.trim()),s="",i=!1):s+=r;return(r||""!==s)&&n.push(s.trim()),n},space:e=>vr.split(e,[" ","\n","\t"]),comma:e=>vr.split(e,[","],!0)};var Cr=vr;vr.default=vr;let Sr=Kt,br=Cr;class _r extends Sr{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return br.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}var xr=_r;_r.default=_r,Sr.registerRule(_r);let Or=de,Ar=F,Mr=Tt,kr=fr,Er=yr,Lr=xr;var Rr=class{constructor(e){this.input=e,this.root=new Er,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{offset:0,line:1,column:1}}}createTokenizer(){this.tokenizer=Ar(this.input)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}comment(e){let t=new Mr;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]);let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}emptyRule(e){let t=new Lr;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}other(e){let t=!1,r=null,n=!1,s=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)s||(s=l),i.push("("===r?")":"]");else if(o&&n&&"{"===r)s||(s=l),i.push("}");else if(0===i.length){if(";"===r){if(n)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(s),t&&n){for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}rule(e){e.pop();let t=new Lr;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}decl(e,t){let r=new Or;this.init(r,e[0][2]);let n,s=e[e.length-1];for(";"===s[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]);"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(n=e.shift(),":"===n[0]){r.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let i=this.spacesAndCommentsFromStart(e);this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(n=e[t],"!important"===n[1].toLowerCase()){r.important=!0;let n=this.stringFrom(e,t);n=this.spacesFromEnd(e)+n," !important"!==n&&(r.raws.important=n);break}if("important"===n[1].toLowerCase()){let n=e.slice(0),s="";for(let e=t;e>0;e--){let t=n[e][0];if(0===s.trim().indexOf("!")&&"space"!==t)break;s=n.pop()[1]+s}0===s.trim().indexOf("!")&&(r.important=!0,r.raws.important=s,e=n)}if("space"!==n[0]&&"comment"!==n[0])break}let o=e.some((e=>"space"!==e[0]&&"comment"!==e[0]));this.raw(r,"value",e),o?r.raws.between+=i:r.value=i+r.value,r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}atrule(e){let t,r,n,s=new kr;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){s.source.end=this.getPosition(e[2]),this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(n=a.length-1,r=a[n];r&&"space"===r[0];)r=a[--n];r&&(s.source.end=this.getPosition(r[3]||r[2]))}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(s.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(s,"params",a),i&&(e=a[a.length-1],s.source.end=this.getPosition(e[3]||e[2]),this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),o&&(s.nodes=[],this.current=s)}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{offset:e,line:t.line,column:t.col}}init(e,t){this.current.push(e),e.source={start:this.getPosition(t),input:this.input},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}raw(e,t,r){let n,s,i,o,a=r.length,l="",u=!0,c=/^([#.|])?(\w)+/i;for(let t=0;te+t[1]),"");e.raws[t]={value:l,raw:n}}e[t]=l}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let n=t;n=0&&(r=e[s],"space"===r[0]||(n+=1,2!==n));s--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}};let Pr=Kt,Ir=Rr,jr=At;function Nr(e,t){let r=new jr(e,t),n=new Ir(r);try{n.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return n.root}var Br=Nr;Nr.default=Nr,Pr.registerParse(Nr);let{isClean:Ur,my:Dr}=H,Fr=Ut,Tr=ne,$r=Kt,Gr=nr,zr=ir,Wr=cr,Vr=Br,Jr=yr;const qr={document:"Document",root:"Root",atrule:"AtRule",rule:"Rule",decl:"Declaration",comment:"Comment"},Yr={postcssPlugin:!0,prepare:!0,Once:!0,Document:!0,Root:!0,Declaration:!0,Rule:!0,AtRule:!0,Comment:!0,DeclarationExit:!0,RuleExit:!0,AtRuleExit:!0,CommentExit:!0,RootExit:!0,DocumentExit:!0,OnceExit:!0},Qr={postcssPlugin:!0,prepare:!0,Once:!0};function Zr(e){return"object"==typeof e&&"function"==typeof e.then}function Hr(e){let t=!1,r=qr[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function Kr(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Hr(e),{node:e,events:t,eventIndex:0,visitors:[],visitorIndex:0,iterator:0}}function Xr(e){return e[Ur]=!1,e.nodes&&e.nodes.forEach((e=>Xr(e))),e}let en={};class tn{constructor(e,t,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof tn||t instanceof Wr)n=Xr(t.root),t.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let e=Vr;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(t,r)}catch(e){this.processed=!0,this.error=e}n&&!n[Dr]&&$r.rebuild(n)}else n=Xr(t);this.result=new Wr(e,n,r),this.helpers={...en,result:this.result,postcss:en},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}get[Symbol.toStringTag](){return"LazyResult"}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.stringify().css}get content(){return this.stringify().content}get map(){return this.stringify().map}get root(){return this.sync().root}get messages(){return this.sync().messages}warnings(){return this.sync().warnings()}toString(){return this.css}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||zr("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(Zr(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ur];)e[Ur]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Tr;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Fr(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}walkSync(e){e[Ur]=!0;let t=Hr(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[Ur]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.toProxy()))return}}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(Zr(e))throw this.getAsyncError()}}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return Zr(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,n=this.result.processor.version,s=t.split("."),i=n.split(".");(s[0]!==i[0]||parseInt(s[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+n+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}async runAsync(){this.plugin=0;for(let e=0;e0;){let e=this.visitTick(t);if(Zr(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!Yr[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Qr[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}visitTick(e){let t=e[e.length-1],{node:r,visitors:n}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(n.length>0&&t.visitorIndex{en=e};var rn=tn;tn.default=tn,Jr.registerLazyResult(tn),Gr.registerLazyResult(tn);let nn=Ut,sn=ne,on=ir,an=Br;const ln=cr;class un{constructor(e,t,r){let n;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s=sn;this.result=new ln(this._processor,n,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new nn(s,n,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}}get[Symbol.toStringTag](){return"NoWorkResult"}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.result.css}get content(){return this.result.css}get map(){return this.result.map}get root(){if(this._root)return this._root;let e,t=an;try{e=t(this._css,this._opts)}catch(e){this.error=e}return this._root=e,e}get messages(){return[]}warnings(){return[]}toString(){return this._css}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||on("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}sync(){if(this.error)throw this.error;return this.result}}var cn=un;un.default=un;let hn=cn,pn=rn,fn=nr,dn=yr;class gn{constructor(e=[]){this.version="8.4.5",this.plugins=this.normalize(e)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}process(e,t={}){return 0===this.plugins.length&&void 0===t.parser&&void 0===t.stringifier&&void 0===t.syntax?new hn(this,e,t):new pn(this,e,t)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}}var mn=gn;gn.default=gn,dn.registerProcessor(gn),fn.registerProcessor(gn);let wn=de,yn=ht,vn=Tt,Cn=fr,Sn=At,bn=yr,_n=xr;function xn(e,t){if(Array.isArray(e))return e.map((e=>xn(e)));let{inputs:r,...n}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Sn.prototype};r.map&&(r.map={...r.map,__proto__:yn.prototype}),t.push(r)}}if(n.nodes&&(n.nodes=e.nodes.map((e=>xn(e,t)))),n.source){let{inputId:e,...r}=n.source;n.source=r,null!=e&&(n.source.input=t[e])}if("root"===n.type)return new bn(n);if("decl"===n.type)return new wn(n);if("rule"===n.type)return new _n(n);if("comment"===n.type)return new vn(n);if("atrule"===n.type)return new Cn(n);throw new Error("Unknown node type: "+e.type)}var On=xn;xn.default=xn;let An=Z,Mn=de,kn=rn,En=Kt,Ln=mn,Rn=ne,Pn=On,In=nr,jn=ar,Nn=Tt,Bn=fr,Un=cr,Dn=At,Fn=Br,Tn=Cr,$n=xr,Gn=yr,zn=he;function Wn(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Ln(e)}Wn.plugin=function(e,t){function r(...r){let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new Ln).version,n}let n;return console&&console.warn&&(console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226")),Object.defineProperty(r,"postcss",{get:()=>(n||(n=r()),n)}),r.process=function(e,t,n){return Wn([r(n)]).process(e,t)},r},Wn.stringify=Rn,Wn.parse=Fn,Wn.fromJSON=Pn,Wn.list=Tn,Wn.comment=e=>new Nn(e),Wn.atRule=e=>new Bn(e),Wn.decl=e=>new Mn(e),Wn.rule=e=>new $n(e),Wn.root=e=>new Gn(e),Wn.document=e=>new In(e),Wn.CssSyntaxError=An,Wn.Declaration=Mn,Wn.Container=En,Wn.Processor=Ln,Wn.Document=In,Wn.Comment=Nn,Wn.Warning=jn,Wn.AtRule=Bn,Wn.Result=Un,Wn.Input=Dn,Wn.Rule=$n,Wn.Root=Gn,Wn.Node=zn,kn.registerPostcss(Wn);var Vn=Wn;async function Jn(){return new Promise((e=>{let t="",r=!1;if(setTimeout((()=>{r=!0,e("")}),1e4),process.stdin.isTTY){if(r)return;e(t)}else process.stdin.setEncoding("utf8"),process.stdin.on("readable",(()=>{let e;for(;e=process.stdin.read();)t+=e})),process.stdin.on("end",(()=>{r||e(t)}))}))}Wn.default=Wn,async function(e,t,n){const s=function(e,t,r){const n=e.map((e=>e.trim())).filter((e=>!!e)),s={stdin:!1,stdout:!1,output:null,outputDir:null,inputs:[],inlineMap:!0,externalMap:!1,replace:!1,pluginOptions:{},debug:!1};let i=null,o=!1;for(let e=0;e1&&s.output)return console.warn('[error] omit "--output" when processing multiple inputs\n'),r(),u.InvalidArguments;0===s.inputs.length&&(s.stdin=!0),s.output||s.outputDir||s.replace||(s.stdout=!0),s.stdout&&(s.externalMap=!1);let a={};if(i)try{a=JSON.parse(i)}catch(e){return console.warn("[error] plugin options must be valid JSON\n"),r(),u.InvalidArguments}for(const e in a){const n=a[e];if(!t.includes(e))return console.warn(`[error] unknown plugin option: ${e}\n`),r(),u.InvalidArguments;s.pluginOptions[e]=n}return s}(process.argv.slice(2),t,n);s===u.InvalidArguments&&process.exit(1);const o=e(s.pluginOptions);s.stdin&&s.stdout?await async function(e,t,r){let n="";try{const s=await Jn();s||(r(),process.exit(1)),n=(await Vn([e]).process(s,{from:"stdin",to:"stdout",map:!!t.inlineMap&&{inline:!0}})).css}catch(e){console.error(t.debug?e:e.message),process.exit(1)}process.stdout.write(n+(t.inlineMap?"\n":"")),process.exit(0)}(o,s,n):s.stdin?await async function(e,t,n){let s=t.output;!s&&t.outputDir&&(s=r.join(t.outputDir,"output.css"));try{const r=await Jn();r||(n(),process.exit(1));const o=await Vn([e]).process(r,{from:"stdin",to:s,map:!(!t.inlineMap&&!t.externalMap)&&{inline:t.inlineMap}});t.externalMap&&o.map?await Promise.all([await i.writeFile(s,o.css+(t.inlineMap?"\n":"")),await i.writeFile(`${s}.map`,o.map.toString())]):await i.writeFile(s,o.css+(t.inlineMap?"\n":""))}catch(e){console.error(t.debug?e:e.message),process.exit(1)}console.log(`CSS was written to "${r.normalize(s)}"`),process.exit(0)}(o,s,n):s.stdout?await async function(e,t){let r=[];try{r=await Promise.all(t.inputs.map((async t=>{const r=await i.readFile(t);return(await Vn([e]).process(r,{from:t,to:"stdout",map:!1})).css})))}catch(e){console.error(t.debug?e:e.message),process.exit(1)}for(const e of r)process.stdout.write(e);process.exit(0)}(o,s):await async function(e,t){try{await Promise.all(t.inputs.map((async n=>{let s=t.output;t.outputDir&&(s=r.join(t.outputDir,r.basename(n))),t.replace&&(s=n);const o=await i.readFile(n),a=await Vn([e]).process(o,{from:n,to:s,map:!(!t.inlineMap&&!t.externalMap)&&{inline:t.inlineMap}});t.externalMap&&a.map?await Promise.all([await i.writeFile(s,a.css+(t.inlineMap?"\n":"")),await i.writeFile(`${s}.map`,a.map.toString())]):await i.writeFile(s,a.css+(t.inlineMap?"\n":"")),console.log(`CSS was written to "${r.normalize(s)}"`)})))}catch(e){console.error(t.debug?e:e.message),process.exit(1)}process.exit(0)}(o,s)}(l,["preserve"],function(e,t,r,n=null){let s=[];if(n){const e=Math.max(...Object.keys(n).map((e=>e.length))),t=new Array(e).fill(" ").join("");t.length&&(s=["\nPlugin Options:",...Object.keys(n).map((e=>` ${(e+t).slice(0,t.length)} ${typeof n[e]}`))],s.push(`\n ${JSON.stringify(n,null,2).split("\n").join("\n ")}`))}const i=[`${t}\n`,` ${r}\n`,"Usage:",` ${e} [input.css] [OPTIONS] [-o|--output output.css]`,` ${e} ... [OPTIONS] --dir `,` ${e} ... [OPTIONS] --replace`,"\nOptions:"," -o, --output Output file"," -d, --dir Output directory"," -r, --replace Replace (overwrite) the input file"," -m, --map Create an external sourcemap"," --no-map Disable the default inline sourcemaps"," -p, --plugin-options Stringified JSON object with plugin options"];return s.length>0&&i.push(...s),()=>{console.warn(i.join("\n"))}}("postcss-place","PostCSS Place","Lets you use place-* properties as shorthands for align-* and justify-*, following the CSS Box Alignment specification.",{preserve:!0}));