@seed-design/codemod 0.0.15 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,50 +0,0 @@
1
- var So=Object.create;var vs=Object.defineProperty;var vo=Object.getOwnPropertyDescriptor;var xo=Object.getOwnPropertyNames;var Co=Object.getPrototypeOf,Eo=Object.prototype.hasOwnProperty;var _e=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var v=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports);var _o=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of xo(e))!Eo.call(n,s)&&s!==t&&vs(n,s,{get:()=>e[s],enumerable:!(i=vo(e,s))||i.enumerable});return n};var xs=(n,e,t)=>(t=n!=null?So(Co(n)):{},_o(e||!n||!n.__esModule?vs(t,"default",{value:n,enumerable:!0}):t,n));var wi=v((ru,gi)=>{var Lt=process||{},Cs=Lt.argv||[],Mt=Lt.env||{},Oo=!(Mt.NO_COLOR||Cs.includes("--no-color"))&&(!!Mt.FORCE_COLOR||Cs.includes("--color")||Lt.platform==="win32"||(Lt.stdout||{}).isTTY&&Mt.TERM!=="dumb"||!!Mt.CI),Ao=(n,e,t=n)=>i=>{let s=""+i,r=s.indexOf(e,n.length);return~r?n+Ro(s,e,t,r)+e:n+s+e},Ro=(n,e,t,i)=>{let s="",r=0;do s+=n.substring(r,i)+t,r=i+e.length,i=n.indexOf(e,r);while(~i);return s+n.substring(r)},Es=(n=Oo)=>{let e=n?Ao:()=>String;return{isColorSupported:n,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};gi.exports=Es();gi.exports.createColors=Es});var yi=v((nu,Os)=>{"use strict";var Tt=/[\t\n\f\r "#'()/;[\\\]{}]/g,kt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Mo=/.[\r\n"'(/\\]/,_s=/[\da-f]/i;Os.exports=function(e,t={}){let i=e.css.valueOf(),s=t.ignoreErrors,r,o,a,l,h,u,f,c,p,g,d=i.length,m=0,w=[],b=[];function x(){return m}function S(z){throw e.error("Unclosed "+z,m)}function C(){return b.length===0&&m>=d}function O(z){if(b.length)return b.pop();if(m>=d)return;let B=z?z.ignoreUnclosed:!1;switch(r=i.charCodeAt(m),r){case 10:case 32:case 9:case 13:case 12:{l=m;do l+=1,r=i.charCodeAt(l);while(r===32||r===10||r===9||r===13||r===12);u=["space",i.slice(m,l)],m=l-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let ye=String.fromCharCode(r);u=[ye,ye,m];break}case 40:{if(g=w.length?w.pop()[1]:"",p=i.charCodeAt(m+1),g==="url"&&p!==39&&p!==34&&p!==32&&p!==10&&p!==9&&p!==12&&p!==13){l=m;do{if(f=!1,l=i.indexOf(")",l+1),l===-1)if(s||B){l=m;break}else S("bracket");for(c=l;i.charCodeAt(c-1)===92;)c-=1,f=!f}while(f);u=["brackets",i.slice(m,l+1),m,l],m=l}else l=i.indexOf(")",m+1),o=i.slice(m,l+1),l===-1||Mo.test(o)?u=["(","(",m]:(u=["brackets",o,m,l],m=l);break}case 39:case 34:{h=r===39?"'":'"',l=m;do{if(f=!1,l=i.indexOf(h,l+1),l===-1)if(s||B){l=m+1;break}else S("string");for(c=l;i.charCodeAt(c-1)===92;)c-=1,f=!f}while(f);u=["string",i.slice(m,l+1),m,l],m=l;break}case 64:{Tt.lastIndex=m+1,Tt.test(i),Tt.lastIndex===0?l=i.length-1:l=Tt.lastIndex-2,u=["at-word",i.slice(m,l+1),m,l],m=l;break}case 92:{for(l=m,a=!0;i.charCodeAt(l+1)===92;)l+=1,a=!a;if(r=i.charCodeAt(l+1),a&&r!==47&&r!==32&&r!==10&&r!==9&&r!==13&&r!==12&&(l+=1,_s.test(i.charAt(l)))){for(;_s.test(i.charAt(l+1));)l+=1;i.charCodeAt(l+1)===32&&(l+=1)}u=["word",i.slice(m,l+1),m,l],m=l;break}default:{r===47&&i.charCodeAt(m+1)===42?(l=i.indexOf("*/",m+2)+1,l===0&&(s||B?l=i.length:S("comment")),u=["comment",i.slice(m,l+1),m,l],m=l):(kt.lastIndex=m+1,kt.test(i),kt.lastIndex===0?l=i.length-1:l=kt.lastIndex-2,u=["word",i.slice(m,l+1),m,l],w.push(u),m=l);break}}return m++,u}function W(z){b.push(z)}return{back:W,endOfFile:C,nextToken:O,position:x}}});var bi=v((ou,Ms)=>{"use strict";var U=wi(),Lo=yi(),As;function To(n){As=n}var ko={";":U.yellow,":":U.yellow,"(":U.cyan,")":U.cyan,"[":U.yellow,"]":U.yellow,"{":U.yellow,"}":U.yellow,"at-word":U.cyan,brackets:U.cyan,call:U.cyan,class:U.yellow,comment:U.gray,hash:U.magenta,string:U.green};function No([n,e],t){if(n==="word"){if(e[0]===".")return"class";if(e[0]==="#")return"hash"}if(!t.endOfFile()){let i=t.nextToken();if(t.back(i),i[0]==="brackets"||i[0]==="(")return"call"}return n}function Rs(n){let e=Lo(new As(n),{ignoreErrors:!0}),t="";for(;!e.endOfFile();){let i=e.nextToken(),s=ko[No(i,e)];s?t+=i[1].split(/\r?\n/).map(r=>s(r)).join(`
2
- `):t+=i[1]}return t}Rs.registerInput=To;Ms.exports=Rs});var Nt=v((lu,ks)=>{"use strict";var Ls=wi(),Ts=bi(),Ge=class n extends Error{constructor(e,t,i,s,r,o){super(e),this.name="CssSyntaxError",this.reason=e,r&&(this.file=r),s&&(this.source=s),o&&(this.plugin=o),typeof t<"u"&&typeof i<"u"&&(typeof t=="number"?(this.line=t,this.column=i):(this.line=t.line,this.column=t.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,n)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Ls.isColorSupported);let i=u=>u,s=u=>u,r=u=>u;if(e){let{bold:u,gray:f,red:c}=Ls.createColors(!0);s=p=>u(c(p)),i=p=>f(p),Ts&&(r=p=>Ts(p))}let o=t.split(/\r?\n/),a=Math.max(this.line-3,0),l=Math.min(this.line+2,o.length),h=String(l).length;return o.slice(a,l).map((u,f)=>{let c=a+1+f,p=" "+(" "+c).slice(-h)+" | ";if(c===this.line){if(u.length>160){let d=20,m=Math.max(0,this.column-d),w=Math.max(this.column+d,this.endColumn+d),b=u.slice(m,w),x=i(p.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return s(">")+i(p)+r(b)+`
3
- `+x+s("^")}let g=i(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+i(p)+r(u)+`
4
- `+g+s("^")}return" "+i(p)+r(u)}).join(`
5
- `)}toString(){let e=this.showSourceCode();return e&&(e=`
6
-
7
- `+e+`
8
- `),this.name+": "+this.message+e}};ks.exports=Ge;Ge.default=Ge});var Si=v((au,Ps)=>{"use strict";var Ns={after:`
9
- `,beforeClose:`
10
- `,beforeComment:`
11
- `,beforeDecl:`
12
- `,beforeOpen:" ",beforeRule:`
13
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Po(n){return n[0].toUpperCase()+n.slice(1)}var Ve=class{constructor(e){this.builder=e}atrule(e,t){let i="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?i+=e.raws.afterName:s&&(i+=" "),e.nodes)this.block(e,i+s);else{let r=(e.raws.between||"")+(t?";":"");this.builder(i+s+r,e)}}beforeAfter(e,t){let i;e.type==="decl"?i=this.raw(e,null,"beforeDecl"):e.type==="comment"?i=this.raw(e,null,"beforeComment"):t==="before"?i=this.raw(e,null,"beforeRule"):i=this.raw(e,null,"beforeClose");let s=e.parent,r=0;for(;s&&s.type!=="root";)r+=1,s=s.parent;if(i.includes(`
14
- `)){let o=this.raw(e,null,"indent");if(o.length)for(let a=0;a<r;a++)i+=o}return i}block(e,t){let i=this.raw(e,"between","beforeOpen");this.builder(t+i+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let i=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let r=e.nodes[s],o=this.raw(r,"before");o&&this.builder(o),this.stringify(r,t!==s||i)}}comment(e){let t=this.raw(e,"left","commentLeft"),i=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+i+"*/",e)}decl(e,t){let i=this.raw(e,"between","colon"),s=e.prop+i+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,i){let s;if(i||(i=t),t&&(s=e.raws[t],typeof s<"u"))return s;let r=e.parent;if(i==="before"&&(!r||r.type==="root"&&r.first===e||r&&r.type==="document"))return"";if(!r)return Ns[i];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[i]<"u")return o.rawCache[i];if(i==="before"||i==="after")return this.beforeAfter(e,i);{let a="raw"+Po(i);this[a]?s=this[a](o,e):o.walk(l=>{if(s=l.raws[t],typeof s<"u")return!1})}return typeof s>"u"&&(s=Ns[i]),o.rawCache[i]=s,s}rawBeforeClose(e){let t;return e.walk(i=>{if(i.nodes&&i.nodes.length>0&&typeof i.raws.after<"u")return t=i.raws.after,t.includes(`
15
- `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let i;return e.walkComments(s=>{if(typeof s.raws.before<"u")return i=s.raws.before,i.includes(`
16
- `)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(t,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(e,t){let i;return e.walkDecls(s=>{if(typeof s.raws.before<"u")return i=s.raws.before,i.includes(`
17
- `)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(t,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(e){let t;return e.walk(i=>{if(i.type!=="decl"&&(t=i.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(i=>{if(i.nodes&&(i.parent!==e||e.first!==i)&&typeof i.raws.before<"u")return t=i.raws.before,t.includes(`
18
- `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(i=>{if(typeof i.raws.between<"u")return t=i.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(i=>{if(i.nodes&&i.nodes.length===0&&(t=i.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(i=>{let s=i.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof i.raws.before<"u"){let r=i.raws.before.split(`
19
- `);return t=r[r.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(t=i.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let i=e[t],s=e.raws[t];return s&&s.value===i?s.raw:i}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}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)}};Ps.exports=Ve;Ve.default=Ve});var He=v((hu,Ds)=>{"use strict";var Do=Si();function vi(n,e){new Do(e).stringify(n)}Ds.exports=vi;vi.default=vi});var Pt=v((uu,xi)=>{"use strict";xi.exports.isClean=Symbol("isClean");xi.exports.my=Symbol("my")});var Ye=v((cu,Fs)=>{"use strict";var Fo=Nt(),Io=Si(),Bo=He(),{isClean:Qe,my:Uo}=Pt();function Ci(n,e){let t=new n.constructor;for(let i in n){if(!Object.prototype.hasOwnProperty.call(n,i)||i==="proxyCache")continue;let s=n[i],r=typeof s;i==="parent"&&r==="object"?e&&(t[i]=e):i==="source"?t[i]=s:Array.isArray(s)?t[i]=s.map(o=>Ci(o,t)):(r==="object"&&s!==null&&(s=Ci(s)),t[i]=s)}return t}function Je(n,e){if(e&&typeof e.offset<"u")return e.offset;let t=1,i=1,s=0;for(let r=0;r<n.length;r++){if(i===e.line&&t===e.column){s=r;break}n[r]===`
20
- `?(t=1,i+=1):t+=1}return s}var Ke=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[Qe]=!1,this[Uo]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let i of e[t])typeof i.clone=="function"?this.append(i.clone()):this.append(i)}else this[t]=e[t]}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}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Ci(this);for(let i in e)t[i]=e[i];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:i,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:i.column,line:i.line},t)}return new Fo(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,i){return e[t]===i||(e[t]=i,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[Qe]=!0}markDirty(){if(this[Qe]){this[Qe]=!1;let e=this;for(;e=e.parent;)e[Qe]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let i="document"in this.source.input?this.source.input.document:this.source.input.css,r=i.slice(Je(i,this.source.start),Je(i,this.source.end)).indexOf(e.word);r!==-1&&(t=this.positionInside(r))}return t}positionInside(e){let t=this.source.start.column,i=this.source.start.line,s="document"in this.source.input?this.source.input.document:this.source.input.css,r=Je(s,this.source.start),o=r+e;for(let a=r;a<o;a++)s[a]===`
21
- `?(t=1,i+=1):t+=1;return{column:t,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s="document"in this.source.input?this.source.input.document:this.source.input.css,o=s.slice(Je(s,this.source.start),Je(s,this.source.end)).indexOf(e.word);o!==-1&&(t=this.positionInside(o),i=this.positionInside(o+e.word.length))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<t.line||i.line===t.line&&i.column<=t.column)&&(i={column:t.column+1,line:t.line}),{end:i,start:t}}raw(e,t){return new Io().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,i=!1;for(let s of e)s===this?i=!0:i?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);i||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let i={},s=t==null;t=t||new Map;let r=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let a=this[o];if(Array.isArray(a))i[o]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)i[o]=a.toJSON(null,t);else if(o==="source"){let l=t.get(a.input);l==null&&(l=r,t.set(a.input,r),r++),i[o]={end:a.end,inputId:l,start:a.start}}else i[o]=a}return s&&(i.inputs=[...t.keys()].map(o=>o.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Bo){e.stringify&&(e=e.stringify);let t="";return e(this,i=>{t+=i}),t}warn(e,t,i){let s={node:this};for(let r in i)s[r]=i[r];return e.warn(t,s)}};Fs.exports=Ke;Ke.default=Ke});var Ze=v((fu,Is)=>{"use strict";var $o=Ye(),Xe=class extends $o{constructor(e){super(e),this.type="comment"}};Is.exports=Xe;Xe.default=Xe});var tt=v((pu,Bs)=>{"use strict";var jo=Ye(),et=class extends jo{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};Bs.exports=et;et.default=et});var fe=v((du,Hs)=>{"use strict";var Us=Ze(),$s=tt(),zo=Ye(),{isClean:js,my:zs}=Pt(),Ei,Ws,qs,_i;function Gs(n){return n.map(e=>(e.nodes&&(e.nodes=Gs(e.nodes)),delete e.source,e))}function Vs(n){if(n[js]=!1,n.proxyOf.nodes)for(let e of n.proxyOf.nodes)Vs(e)}var Y=class n extends zo{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]}append(...e){for(let t of e){let i=this.normalize(t,this.last);for(let s of i)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),i,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(i=this.indexes[t],s=e(this.proxyOf.nodes[i],i),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...i)=>e[t](...i.map(s=>typeof s=="function"?(r,o)=>s(r.toProxy(),o):s)):t==="every"||t==="some"?i=>e[t]((s,...r)=>i(s.toProxy(),...r)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(i=>i.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,i){return e[t]===i||(e[t]=i,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let i=this.index(e),s=this.normalize(t,this.proxyOf.nodes[i]).reverse();i=this.index(e);for(let o of s)this.proxyOf.nodes.splice(i+1,0,o);let r;for(let o in this.indexes)r=this.indexes[o],i<r&&(this.indexes[o]=r+s.length);return this.markDirty(),this}insertBefore(e,t){let i=this.index(e),s=i===0?"prepend":!1,r=this.normalize(t,this.proxyOf.nodes[i],s).reverse();i=this.index(e);for(let a of r)this.proxyOf.nodes.splice(i,0,a);let o;for(let a in this.indexes)o=this.indexes[a],i<=o&&(this.indexes[a]=o+r.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Gs(Ws(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new $s(e)]}else if(e.selector||e.selectors)e=[new _i(e)];else if(e.name)e=[new Ei(e)];else if(e.text)e=[new Us(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[zs]||n.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[js]&&Vs(s),s.raws||(s.raws={}),typeof s.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let i=this.normalize(t,this.first,"prepend").reverse();for(let s of i)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+i.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let i in this.indexes)t=this.indexes[i],t>=e&&(this.indexes[i]=t-1);return this.markDirty(),this}replaceValues(e,t,i){return i||(i=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,i))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,i)=>{let s;try{s=e(t,i)}catch(r){throw t.addToError(r)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((i,s)=>{if(i.type==="atrule"&&e.test(i.name))return t(i,s)}):this.walk((i,s)=>{if(i.type==="atrule"&&i.name===e)return t(i,s)}):(t=e,this.walk((i,s)=>{if(i.type==="atrule")return t(i,s)}))}walkComments(e){return this.walk((t,i)=>{if(t.type==="comment")return e(t,i)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((i,s)=>{if(i.type==="decl"&&e.test(i.prop))return t(i,s)}):this.walk((i,s)=>{if(i.type==="decl"&&i.prop===e)return t(i,s)}):(t=e,this.walk((i,s)=>{if(i.type==="decl")return t(i,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((i,s)=>{if(i.type==="rule"&&e.test(i.selector))return t(i,s)}):this.walk((i,s)=>{if(i.type==="rule"&&i.selector===e)return t(i,s)}):(t=e,this.walk((i,s)=>{if(i.type==="rule")return t(i,s)}))}};Y.registerParse=n=>{Ws=n};Y.registerRule=n=>{_i=n};Y.registerAtRule=n=>{Ei=n};Y.registerRoot=n=>{qs=n};Hs.exports=Y;Y.default=Y;Y.rebuild=n=>{n.type==="atrule"?Object.setPrototypeOf(n,Ei.prototype):n.type==="rule"?Object.setPrototypeOf(n,_i.prototype):n.type==="decl"?Object.setPrototypeOf(n,$s.prototype):n.type==="comment"?Object.setPrototypeOf(n,Us.prototype):n.type==="root"&&Object.setPrototypeOf(n,qs.prototype),n[zs]=!0,n.nodes&&n.nodes.forEach(e=>{Y.rebuild(e)})}});var Dt=v((mu,Js)=>{"use strict";var Qs=fe(),Oe=class extends Qs{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)}};Js.exports=Oe;Oe.default=Oe;Qs.registerAtRule(Oe)});var Ft=v((gu,Xs)=>{"use strict";var Wo=fe(),Ks,Ys,be=class extends Wo{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Ks(new Ys,this,e).stringify()}};be.registerLazyResult=n=>{Ks=n};be.registerProcessor=n=>{Ys=n};Xs.exports=be;be.default=be});var er=v((wu,Zs)=>{var qo="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Go=(n,e=21)=>(t=e)=>{let i="",s=t|0;for(;s--;)i+=n[Math.random()*n.length|0];return i},Vo=(n=21)=>{let e="",t=n|0;for(;t--;)e+=qo[Math.random()*64|0];return e};Zs.exports={nanoid:Vo,customAlphabet:Go}});var ir=v(Oi=>{var tr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Oi.encode=function(n){if(0<=n&&n<tr.length)return tr[n];throw new TypeError("Must be between 0 and 63: "+n)};Oi.decode=function(n){var e=65,t=90,i=97,s=122,r=48,o=57,a=43,l=47,h=26,u=52;return e<=n&&n<=t?n-e:i<=n&&n<=s?n-i+h:r<=n&&n<=o?n-r+u:n==a?62:n==l?63:-1}});var Mi=v(Ri=>{var sr=ir(),Ai=5,rr=1<<Ai,nr=rr-1,or=rr;function Ho(n){return n<0?(-n<<1)+1:(n<<1)+0}function Qo(n){var e=(n&1)===1,t=n>>1;return e?-t:t}Ri.encode=function(e){var t="",i,s=Ho(e);do i=s&nr,s>>>=Ai,s>0&&(i|=or),t+=sr.encode(i);while(s>0);return t};Ri.decode=function(e,t,i){var s=e.length,r=0,o=0,a,l;do{if(t>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(l=sr.decode(e.charCodeAt(t++)),l===-1)throw new Error("Invalid base64 digit: "+e.charAt(t-1));a=!!(l&or),l&=nr,r=r+(l<<o),o+=Ai}while(a);i.value=Qo(r),i.rest=t}});var Re=v(L=>{function Jo(n,e,t){if(e in n)return n[e];if(arguments.length===3)return t;throw new Error('"'+e+'" is a required argument.')}L.getArg=Jo;var lr=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Ko=/^data:.+\,.+$/;function it(n){var e=n.match(lr);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}L.urlParse=it;function Ae(n){var e="";return n.scheme&&(e+=n.scheme+":"),e+="//",n.auth&&(e+=n.auth+"@"),n.host&&(e+=n.host),n.port&&(e+=":"+n.port),n.path&&(e+=n.path),e}L.urlGenerate=Ae;var Yo=32;function Xo(n){var e=[];return function(t){for(var i=0;i<e.length;i++)if(e[i].input===t){var s=e[0];return e[0]=e[i],e[i]=s,e[0].result}var r=n(t);return e.unshift({input:t,result:r}),e.length>Yo&&e.pop(),r}}var Li=Xo(function(e){var t=e,i=it(e);if(i){if(!i.path)return e;t=i.path}for(var s=L.isAbsolute(t),r=[],o=0,a=0;;)if(o=a,a=t.indexOf("/",o),a===-1){r.push(t.slice(o));break}else for(r.push(t.slice(o,a));a<t.length&&t[a]==="/";)a++;for(var l,h=0,a=r.length-1;a>=0;a--)l=r[a],l==="."?r.splice(a,1):l===".."?h++:h>0&&(l===""?(r.splice(a+1,h),h=0):(r.splice(a,2),h--));return t=r.join("/"),t===""&&(t=s?"/":"."),i?(i.path=t,Ae(i)):t});L.normalize=Li;function ar(n,e){n===""&&(n="."),e===""&&(e=".");var t=it(e),i=it(n);if(i&&(n=i.path||"/"),t&&!t.scheme)return i&&(t.scheme=i.scheme),Ae(t);if(t||e.match(Ko))return e;if(i&&!i.host&&!i.path)return i.host=e,Ae(i);var s=e.charAt(0)==="/"?e:Li(n.replace(/\/+$/,"")+"/"+e);return i?(i.path=s,Ae(i)):s}L.join=ar;L.isAbsolute=function(n){return n.charAt(0)==="/"||lr.test(n)};function Zo(n,e){n===""&&(n="."),n=n.replace(/\/$/,"");for(var t=0;e.indexOf(n+"/")!==0;){var i=n.lastIndexOf("/");if(i<0||(n=n.slice(0,i),n.match(/^([^\/]+:\/)?\/*$/)))return e;++t}return Array(t+1).join("../")+e.substr(n.length+1)}L.relative=Zo;var hr=function(){var n=Object.create(null);return!("__proto__"in n)}();function ur(n){return n}function el(n){return cr(n)?"$"+n:n}L.toSetString=hr?ur:el;function tl(n){return cr(n)?n.slice(1):n}L.fromSetString=hr?ur:tl;function cr(n){if(!n)return!1;var e=n.length;if(e<9||n.charCodeAt(e-1)!==95||n.charCodeAt(e-2)!==95||n.charCodeAt(e-3)!==111||n.charCodeAt(e-4)!==116||n.charCodeAt(e-5)!==111||n.charCodeAt(e-6)!==114||n.charCodeAt(e-7)!==112||n.charCodeAt(e-8)!==95||n.charCodeAt(e-9)!==95)return!1;for(var t=e-10;t>=0;t--)if(n.charCodeAt(t)!==36)return!1;return!0}function il(n,e,t){var i=oe(n.source,e.source);return i!==0||(i=n.originalLine-e.originalLine,i!==0)||(i=n.originalColumn-e.originalColumn,i!==0||t)||(i=n.generatedColumn-e.generatedColumn,i!==0)||(i=n.generatedLine-e.generatedLine,i!==0)?i:oe(n.name,e.name)}L.compareByOriginalPositions=il;function sl(n,e,t){var i;return i=n.originalLine-e.originalLine,i!==0||(i=n.originalColumn-e.originalColumn,i!==0||t)||(i=n.generatedColumn-e.generatedColumn,i!==0)||(i=n.generatedLine-e.generatedLine,i!==0)?i:oe(n.name,e.name)}L.compareByOriginalPositionsNoSource=sl;function rl(n,e,t){var i=n.generatedLine-e.generatedLine;return i!==0||(i=n.generatedColumn-e.generatedColumn,i!==0||t)||(i=oe(n.source,e.source),i!==0)||(i=n.originalLine-e.originalLine,i!==0)||(i=n.originalColumn-e.originalColumn,i!==0)?i:oe(n.name,e.name)}L.compareByGeneratedPositionsDeflated=rl;function nl(n,e,t){var i=n.generatedColumn-e.generatedColumn;return i!==0||t||(i=oe(n.source,e.source),i!==0)||(i=n.originalLine-e.originalLine,i!==0)||(i=n.originalColumn-e.originalColumn,i!==0)?i:oe(n.name,e.name)}L.compareByGeneratedPositionsDeflatedNoLine=nl;function oe(n,e){return n===e?0:n===null?1:e===null?-1:n>e?1:-1}function ol(n,e){var t=n.generatedLine-e.generatedLine;return t!==0||(t=n.generatedColumn-e.generatedColumn,t!==0)||(t=oe(n.source,e.source),t!==0)||(t=n.originalLine-e.originalLine,t!==0)||(t=n.originalColumn-e.originalColumn,t!==0)?t:oe(n.name,e.name)}L.compareByGeneratedPositionsInflated=ol;function ll(n){return JSON.parse(n.replace(/^\)]}'[^\n]*\n/,""))}L.parseSourceMapInput=ll;function al(n,e,t){if(e=e||"",n&&(n[n.length-1]!=="/"&&e[0]!=="/"&&(n+="/"),e=n+e),t){var i=it(t);if(!i)throw new Error("sourceMapURL could not be parsed");if(i.path){var s=i.path.lastIndexOf("/");s>=0&&(i.path=i.path.substring(0,s+1))}e=ar(Ae(i),e)}return Li(e)}L.computeSourceURL=al});var Ni=v(fr=>{var Ti=Re(),ki=Object.prototype.hasOwnProperty,Se=typeof Map<"u";function le(){this._array=[],this._set=Se?new Map:Object.create(null)}le.fromArray=function(e,t){for(var i=new le,s=0,r=e.length;s<r;s++)i.add(e[s],t);return i};le.prototype.size=function(){return Se?this._set.size:Object.getOwnPropertyNames(this._set).length};le.prototype.add=function(e,t){var i=Se?e:Ti.toSetString(e),s=Se?this.has(e):ki.call(this._set,i),r=this._array.length;(!s||t)&&this._array.push(e),s||(Se?this._set.set(e,r):this._set[i]=r)};le.prototype.has=function(e){if(Se)return this._set.has(e);var t=Ti.toSetString(e);return ki.call(this._set,t)};le.prototype.indexOf=function(e){if(Se){var t=this._set.get(e);if(t>=0)return t}else{var i=Ti.toSetString(e);if(ki.call(this._set,i))return this._set[i]}throw new Error('"'+e+'" is not in the set.')};le.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};le.prototype.toArray=function(){return this._array.slice()};fr.ArraySet=le});var mr=v(dr=>{var pr=Re();function hl(n,e){var t=n.generatedLine,i=e.generatedLine,s=n.generatedColumn,r=e.generatedColumn;return i>t||i==t&&r>=s||pr.compareByGeneratedPositionsInflated(n,e)<=0}function It(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}It.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)};It.prototype.add=function(e){hl(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};It.prototype.toArray=function(){return this._sorted||(this._array.sort(pr.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};dr.MappingList=It});var Pi=v(gr=>{var st=Mi(),R=Re(),Bt=Ni().ArraySet,ul=mr().MappingList;function H(n){n||(n={}),this._file=R.getArg(n,"file",null),this._sourceRoot=R.getArg(n,"sourceRoot",null),this._skipValidation=R.getArg(n,"skipValidation",!1),this._ignoreInvalidMapping=R.getArg(n,"ignoreInvalidMapping",!1),this._sources=new Bt,this._names=new Bt,this._mappings=new ul,this._sourcesContents=null}H.prototype._version=3;H.fromSourceMap=function(e,t){var i=e.sourceRoot,s=new H(Object.assign(t||{},{file:e.file,sourceRoot:i}));return e.eachMapping(function(r){var o={generated:{line:r.generatedLine,column:r.generatedColumn}};r.source!=null&&(o.source=r.source,i!=null&&(o.source=R.relative(i,o.source)),o.original={line:r.originalLine,column:r.originalColumn},r.name!=null&&(o.name=r.name)),s.addMapping(o)}),e.sources.forEach(function(r){var o=r;i!==null&&(o=R.relative(i,r)),s._sources.has(o)||s._sources.add(o);var a=e.sourceContentFor(r);a!=null&&s.setSourceContent(r,a)}),s};H.prototype.addMapping=function(e){var t=R.getArg(e,"generated"),i=R.getArg(e,"original",null),s=R.getArg(e,"source",null),r=R.getArg(e,"name",null);!this._skipValidation&&this._validateMapping(t,i,s,r)===!1||(s!=null&&(s=String(s),this._sources.has(s)||this._sources.add(s)),r!=null&&(r=String(r),this._names.has(r)||this._names.add(r)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:i!=null&&i.line,originalColumn:i!=null&&i.column,source:s,name:r}))};H.prototype.setSourceContent=function(e,t){var i=e;this._sourceRoot!=null&&(i=R.relative(this._sourceRoot,i)),t!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[R.toSetString(i)]=t):this._sourcesContents&&(delete this._sourcesContents[R.toSetString(i)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};H.prototype.applySourceMap=function(e,t,i){var s=t;if(t==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);s=e.file}var r=this._sourceRoot;r!=null&&(s=R.relative(r,s));var o=new Bt,a=new Bt;this._mappings.unsortedForEach(function(l){if(l.source===s&&l.originalLine!=null){var h=e.originalPositionFor({line:l.originalLine,column:l.originalColumn});h.source!=null&&(l.source=h.source,i!=null&&(l.source=R.join(i,l.source)),r!=null&&(l.source=R.relative(r,l.source)),l.originalLine=h.line,l.originalColumn=h.column,h.name!=null&&(l.name=h.name))}var u=l.source;u!=null&&!o.has(u)&&o.add(u);var f=l.name;f!=null&&!a.has(f)&&a.add(f)},this),this._sources=o,this._names=a,e.sources.forEach(function(l){var h=e.sourceContentFor(l);h!=null&&(i!=null&&(l=R.join(i,l)),r!=null&&(l=R.relative(r,l)),this.setSourceContent(l,h))},this)};H.prototype._validateMapping=function(e,t,i,s){if(t&&typeof t.line!="number"&&typeof t.column!="number"){var r="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(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(r),!1;throw new Error(r)}if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!t&&!i&&!s)){if(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&&i)return;var r="Invalid mapping: "+JSON.stringify({generated:e,source:i,original:t,name:s});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(r),!1;throw new Error(r)}};H.prototype._serializeMappings=function(){for(var e=0,t=1,i=0,s=0,r=0,o=0,a="",l,h,u,f,c=this._mappings.toArray(),p=0,g=c.length;p<g;p++){if(h=c[p],l="",h.generatedLine!==t)for(e=0;h.generatedLine!==t;)l+=";",t++;else if(p>0){if(!R.compareByGeneratedPositionsInflated(h,c[p-1]))continue;l+=","}l+=st.encode(h.generatedColumn-e),e=h.generatedColumn,h.source!=null&&(f=this._sources.indexOf(h.source),l+=st.encode(f-o),o=f,l+=st.encode(h.originalLine-1-s),s=h.originalLine-1,l+=st.encode(h.originalColumn-i),i=h.originalColumn,h.name!=null&&(u=this._names.indexOf(h.name),l+=st.encode(u-r),r=u)),a+=l}return a};H.prototype._generateSourcesContent=function(e,t){return e.map(function(i){if(!this._sourcesContents)return null;t!=null&&(i=R.relative(t,i));var s=R.toSetString(i);return Object.prototype.hasOwnProperty.call(this._sourcesContents,s)?this._sourcesContents[s]:null},this)};H.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};H.prototype.toString=function(){return JSON.stringify(this.toJSON())};gr.SourceMapGenerator=H});var wr=v(ve=>{ve.GREATEST_LOWER_BOUND=1;ve.LEAST_UPPER_BOUND=2;function Di(n,e,t,i,s,r){var o=Math.floor((e-n)/2)+n,a=s(t,i[o],!0);return a===0?o:a>0?e-o>1?Di(o,e,t,i,s,r):r==ve.LEAST_UPPER_BOUND?e<i.length?e:-1:o:o-n>1?Di(n,o,t,i,s,r):r==ve.LEAST_UPPER_BOUND?o:n<0?-1:n}ve.search=function(e,t,i,s){if(t.length===0)return-1;var r=Di(-1,t.length,e,t,i,s||ve.GREATEST_LOWER_BOUND);if(r<0)return-1;for(;r-1>=0&&i(t[r],t[r-1],!0)===0;)--r;return r}});var Sr=v(br=>{function cl(n){function e(s,r,o){var a=s[r];s[r]=s[o],s[o]=a}function t(s,r){return Math.round(s+Math.random()*(r-s))}function i(s,r,o,a){if(o<a){var l=t(o,a),h=o-1;e(s,l,a);for(var u=s[a],f=o;f<a;f++)r(s[f],u,!1)<=0&&(h+=1,e(s,h,f));e(s,h+1,f);var c=h+1;i(s,r,o,c-1),i(s,r,c+1,a)}}return i}function fl(n){let e=cl.toString();return new Function(`return ${e}`)()(n)}var yr=new WeakMap;br.quickSort=function(n,e,t=0){let i=yr.get(e);i===void 0&&(i=fl(e),yr.set(e,i)),i(n,e,t,n.length-1)}});var Cr=v(Ut=>{var y=Re(),Ii=wr(),Me=Ni().ArraySet,pl=Mi(),rt=Sr().quickSort;function A(n,e){var t=n;return typeof n=="string"&&(t=y.parseSourceMapInput(n)),t.sections!=null?new X(t,e):new P(t,e)}A.fromSourceMap=function(n,e){return P.fromSourceMap(n,e)};A.prototype._version=3;A.prototype.__generatedMappings=null;Object.defineProperty(A.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});A.prototype.__originalMappings=null;Object.defineProperty(A.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});A.prototype._charIsMappingSeparator=function(e,t){var i=e.charAt(t);return i===";"||i===","};A.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")};A.GENERATED_ORDER=1;A.ORIGINAL_ORDER=2;A.GREATEST_LOWER_BOUND=1;A.LEAST_UPPER_BOUND=2;A.prototype.eachMapping=function(e,t,i){var s=t||null,r=i||A.GENERATED_ORDER,o;switch(r){case A.GENERATED_ORDER:o=this._generatedMappings;break;case A.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var a=this.sourceRoot,l=e.bind(s),h=this._names,u=this._sources,f=this._sourceMapURL,c=0,p=o.length;c<p;c++){var g=o[c],d=g.source===null?null:u.at(g.source);d!==null&&(d=y.computeSourceURL(a,d,f)),l({source:d,generatedLine:g.generatedLine,generatedColumn:g.generatedColumn,originalLine:g.originalLine,originalColumn:g.originalColumn,name:g.name===null?null:h.at(g.name)})}};A.prototype.allGeneratedPositionsFor=function(e){var t=y.getArg(e,"line"),i={source:y.getArg(e,"source"),originalLine:t,originalColumn:y.getArg(e,"column",0)};if(i.source=this._findSourceIndex(i.source),i.source<0)return[];var s=[],r=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",y.compareByOriginalPositions,Ii.LEAST_UPPER_BOUND);if(r>=0){var o=this._originalMappings[r];if(e.column===void 0)for(var a=o.originalLine;o&&o.originalLine===a;)s.push({line:y.getArg(o,"generatedLine",null),column:y.getArg(o,"generatedColumn",null),lastColumn:y.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++r];else for(var l=o.originalColumn;o&&o.originalLine===t&&o.originalColumn==l;)s.push({line:y.getArg(o,"generatedLine",null),column:y.getArg(o,"generatedColumn",null),lastColumn:y.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++r]}return s};Ut.SourceMapConsumer=A;function P(n,e){var t=n;typeof n=="string"&&(t=y.parseSourceMapInput(n));var i=y.getArg(t,"version"),s=y.getArg(t,"sources"),r=y.getArg(t,"names",[]),o=y.getArg(t,"sourceRoot",null),a=y.getArg(t,"sourcesContent",null),l=y.getArg(t,"mappings"),h=y.getArg(t,"file",null);if(i!=this._version)throw new Error("Unsupported version: "+i);o&&(o=y.normalize(o)),s=s.map(String).map(y.normalize).map(function(u){return o&&y.isAbsolute(o)&&y.isAbsolute(u)?y.relative(o,u):u}),this._names=Me.fromArray(r.map(String),!0),this._sources=Me.fromArray(s,!0),this._absoluteSources=this._sources.toArray().map(function(u){return y.computeSourceURL(o,u,e)}),this.sourceRoot=o,this.sourcesContent=a,this._mappings=l,this._sourceMapURL=e,this.file=h}P.prototype=Object.create(A.prototype);P.prototype.consumer=A;P.prototype._findSourceIndex=function(n){var e=n;if(this.sourceRoot!=null&&(e=y.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var t;for(t=0;t<this._absoluteSources.length;++t)if(this._absoluteSources[t]==n)return t;return-1};P.fromSourceMap=function(e,t){var i=Object.create(P.prototype),s=i._names=Me.fromArray(e._names.toArray(),!0),r=i._sources=Me.fromArray(e._sources.toArray(),!0);i.sourceRoot=e._sourceRoot,i.sourcesContent=e._generateSourcesContent(i._sources.toArray(),i.sourceRoot),i.file=e._file,i._sourceMapURL=t,i._absoluteSources=i._sources.toArray().map(function(p){return y.computeSourceURL(i.sourceRoot,p,t)});for(var o=e._mappings.toArray().slice(),a=i.__generatedMappings=[],l=i.__originalMappings=[],h=0,u=o.length;h<u;h++){var f=o[h],c=new xr;c.generatedLine=f.generatedLine,c.generatedColumn=f.generatedColumn,f.source&&(c.source=r.indexOf(f.source),c.originalLine=f.originalLine,c.originalColumn=f.originalColumn,f.name&&(c.name=s.indexOf(f.name)),l.push(c)),a.push(c)}return rt(i.__originalMappings,y.compareByOriginalPositions),i};P.prototype._version=3;Object.defineProperty(P.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function xr(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var Fi=y.compareByGeneratedPositionsDeflatedNoLine;function vr(n,e){let t=n.length,i=n.length-e;if(!(i<=1))if(i==2){let s=n[e],r=n[e+1];Fi(s,r)>0&&(n[e]=r,n[e+1]=s)}else if(i<20)for(let s=e;s<t;s++)for(let r=s;r>e;r--){let o=n[r-1],a=n[r];if(Fi(o,a)<=0)break;n[r-1]=a,n[r]=o}else rt(n,Fi,e)}P.prototype._parseMappings=function(e,t){var i=1,s=0,r=0,o=0,a=0,l=0,h=e.length,u=0,f={},c={},p=[],g=[],d,m,w,b,x;let S=0;for(;u<h;)if(e.charAt(u)===";")i++,u++,s=0,vr(g,S),S=g.length;else if(e.charAt(u)===",")u++;else{for(d=new xr,d.generatedLine=i,b=u;b<h&&!this._charIsMappingSeparator(e,b);b++);for(m=e.slice(u,b),w=[];u<b;)pl.decode(e,u,c),x=c.value,u=c.rest,w.push(x);if(w.length===2)throw new Error("Found a source, but no line and column");if(w.length===3)throw new Error("Found a source and line, but no column");if(d.generatedColumn=s+w[0],s=d.generatedColumn,w.length>1&&(d.source=a+w[1],a+=w[1],d.originalLine=r+w[2],r=d.originalLine,d.originalLine+=1,d.originalColumn=o+w[3],o=d.originalColumn,w.length>4&&(d.name=l+w[4],l+=w[4])),g.push(d),typeof d.originalLine=="number"){let O=d.source;for(;p.length<=O;)p.push(null);p[O]===null&&(p[O]=[]),p[O].push(d)}}vr(g,S),this.__generatedMappings=g;for(var C=0;C<p.length;C++)p[C]!=null&&rt(p[C],y.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...p)};P.prototype._findMapping=function(e,t,i,s,r,o){if(e[i]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[i]);if(e[s]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[s]);return Ii.search(e,t,r,o)};P.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var i=this._generatedMappings[e+1];if(t.generatedLine===i.generatedLine){t.lastGeneratedColumn=i.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}};P.prototype.originalPositionFor=function(e){var t={generatedLine:y.getArg(e,"line"),generatedColumn:y.getArg(e,"column")},i=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",y.compareByGeneratedPositionsDeflated,y.getArg(e,"bias",A.GREATEST_LOWER_BOUND));if(i>=0){var s=this._generatedMappings[i];if(s.generatedLine===t.generatedLine){var r=y.getArg(s,"source",null);r!==null&&(r=this._sources.at(r),r=y.computeSourceURL(this.sourceRoot,r,this._sourceMapURL));var o=y.getArg(s,"name",null);return o!==null&&(o=this._names.at(o)),{source:r,line:y.getArg(s,"originalLine",null),column:y.getArg(s,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};P.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};P.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var i=this._findSourceIndex(e);if(i>=0)return this.sourcesContent[i];var s=e;this.sourceRoot!=null&&(s=y.relative(this.sourceRoot,s));var r;if(this.sourceRoot!=null&&(r=y.urlParse(this.sourceRoot))){var o=s.replace(/^file:\/\//,"");if(r.scheme=="file"&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!r.path||r.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.')};P.prototype.generatedPositionFor=function(e){var t=y.getArg(e,"source");if(t=this._findSourceIndex(t),t<0)return{line:null,column:null,lastColumn:null};var i={source:t,originalLine:y.getArg(e,"line"),originalColumn:y.getArg(e,"column")},s=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",y.compareByOriginalPositions,y.getArg(e,"bias",A.GREATEST_LOWER_BOUND));if(s>=0){var r=this._originalMappings[s];if(r.source===i.source)return{line:y.getArg(r,"generatedLine",null),column:y.getArg(r,"generatedColumn",null),lastColumn:y.getArg(r,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Ut.BasicSourceMapConsumer=P;function X(n,e){var t=n;typeof n=="string"&&(t=y.parseSourceMapInput(n));var i=y.getArg(t,"version"),s=y.getArg(t,"sections");if(i!=this._version)throw new Error("Unsupported version: "+i);this._sources=new Me,this._names=new Me;var r={line:-1,column:0};this._sections=s.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var a=y.getArg(o,"offset"),l=y.getArg(a,"line"),h=y.getArg(a,"column");if(l<r.line||l===r.line&&h<r.column)throw new Error("Section offsets must be ordered and non-overlapping.");return r=a,{generatedOffset:{generatedLine:l+1,generatedColumn:h+1},consumer:new A(y.getArg(o,"map"),e)}})}X.prototype=Object.create(A.prototype);X.prototype.constructor=A;X.prototype._version=3;Object.defineProperty(X.prototype,"sources",{get:function(){for(var n=[],e=0;e<this._sections.length;e++)for(var t=0;t<this._sections[e].consumer.sources.length;t++)n.push(this._sections[e].consumer.sources[t]);return n}});X.prototype.originalPositionFor=function(e){var t={generatedLine:y.getArg(e,"line"),generatedColumn:y.getArg(e,"column")},i=Ii.search(t,this._sections,function(r,o){var a=r.generatedLine-o.generatedOffset.generatedLine;return a||r.generatedColumn-o.generatedOffset.generatedColumn}),s=this._sections[i];return s?s.consumer.originalPositionFor({line:t.generatedLine-(s.generatedOffset.generatedLine-1),column:t.generatedColumn-(s.generatedOffset.generatedLine===t.generatedLine?s.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};X.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};X.prototype.sourceContentFor=function(e,t){for(var i=0;i<this._sections.length;i++){var s=this._sections[i],r=s.consumer.sourceContentFor(e,!0);if(r||r==="")return r}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')};X.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var i=this._sections[t];if(i.consumer._findSourceIndex(y.getArg(e,"source"))!==-1){var s=i.consumer.generatedPositionFor(e);if(s){var r={line:s.line+(i.generatedOffset.generatedLine-1),column:s.column+(i.generatedOffset.generatedLine===s.line?i.generatedOffset.generatedColumn-1:0)};return r}}}return{line:null,column:null}};X.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var i=0;i<this._sections.length;i++)for(var s=this._sections[i],r=s.consumer._generatedMappings,o=0;o<r.length;o++){var a=r[o],l=s.consumer._sources.at(a.source);l!==null&&(l=y.computeSourceURL(s.consumer.sourceRoot,l,this._sourceMapURL)),this._sources.add(l),l=this._sources.indexOf(l);var h=null;a.name&&(h=s.consumer._names.at(a.name),this._names.add(h),h=this._names.indexOf(h));var u={source:l,generatedLine:a.generatedLine+(s.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(s.generatedOffset.generatedLine===a.generatedLine?s.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:h};this.__generatedMappings.push(u),typeof u.originalLine=="number"&&this.__originalMappings.push(u)}rt(this.__generatedMappings,y.compareByGeneratedPositionsDeflated),rt(this.__originalMappings,y.compareByOriginalPositions)};Ut.IndexedSourceMapConsumer=X});var _r=v(Er=>{var dl=Pi().SourceMapGenerator,$t=Re(),ml=/(\r?\n)/,gl=10,Le="$$$isSourceNode$$$";function q(n,e,t,i,s){this.children=[],this.sourceContents={},this.line=n??null,this.column=e??null,this.source=t??null,this.name=s??null,this[Le]=!0,i!=null&&this.add(i)}q.fromStringWithSourceMap=function(e,t,i){var s=new q,r=e.split(ml),o=0,a=function(){var c=g(),p=g()||"";return c+p;function g(){return o<r.length?r[o++]:void 0}},l=1,h=0,u=null;return t.eachMapping(function(c){if(u!==null)if(l<c.generatedLine)f(u,a()),l++,h=0;else{var p=r[o]||"",g=p.substr(0,c.generatedColumn-h);r[o]=p.substr(c.generatedColumn-h),h=c.generatedColumn,f(u,g),u=c;return}for(;l<c.generatedLine;)s.add(a()),l++;if(h<c.generatedColumn){var p=r[o]||"";s.add(p.substr(0,c.generatedColumn)),r[o]=p.substr(c.generatedColumn),h=c.generatedColumn}u=c},this),o<r.length&&(u&&f(u,a()),s.add(r.splice(o).join(""))),t.sources.forEach(function(c){var p=t.sourceContentFor(c);p!=null&&(i!=null&&(c=$t.join(i,c)),s.setSourceContent(c,p))}),s;function f(c,p){if(c===null||c.source===void 0)s.add(p);else{var g=i?$t.join(i,c.source):c.source;s.add(new q(c.originalLine,c.originalColumn,g,p,c.name))}}};q.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(t){this.add(t)},this);else if(e[Le]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};q.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else if(e[Le]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};q.prototype.walk=function(e){for(var t,i=0,s=this.children.length;i<s;i++)t=this.children[i],t[Le]?t.walk(e):t!==""&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})};q.prototype.join=function(e){var t,i,s=this.children.length;if(s>0){for(t=[],i=0;i<s-1;i++)t.push(this.children[i]),t.push(e);t.push(this.children[i]),this.children=t}return this};q.prototype.replaceRight=function(e,t){var i=this.children[this.children.length-1];return i[Le]?i.replaceRight(e,t):typeof i=="string"?this.children[this.children.length-1]=i.replace(e,t):this.children.push("".replace(e,t)),this};q.prototype.setSourceContent=function(e,t){this.sourceContents[$t.toSetString(e)]=t};q.prototype.walkSourceContents=function(e){for(var t=0,i=this.children.length;t<i;t++)this.children[t][Le]&&this.children[t].walkSourceContents(e);for(var s=Object.keys(this.sourceContents),t=0,i=s.length;t<i;t++)e($t.fromSetString(s[t]),this.sourceContents[s[t]])};q.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e};q.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},i=new dl(e),s=!1,r=null,o=null,a=null,l=null;return this.walk(function(h,u){t.code+=h,u.source!==null&&u.line!==null&&u.column!==null?((r!==u.source||o!==u.line||a!==u.column||l!==u.name)&&i.addMapping({source:u.source,original:{line:u.line,column:u.column},generated:{line:t.line,column:t.column},name:u.name}),r=u.source,o=u.line,a=u.column,l=u.name,s=!0):s&&(i.addMapping({generated:{line:t.line,column:t.column}}),r=null,s=!1);for(var f=0,c=h.length;f<c;f++)h.charCodeAt(f)===gl?(t.line++,t.column=0,f+1===c?(r=null,s=!1):s&&i.addMapping({source:u.source,original:{line:u.line,column:u.column},generated:{line:t.line,column:t.column},name:u.name})):t.column++}),this.walkSourceContents(function(h,u){i.setSourceContent(h,u)}),{code:t.code,map:i}};Er.SourceNode=q});var zt=v(jt=>{jt.SourceMapGenerator=Pi().SourceMapGenerator;jt.SourceMapConsumer=Cr().SourceMapConsumer;jt.SourceNode=_r().SourceNode});var Ui=v((Mu,Rr)=>{"use strict";var{existsSync:wl,readFileSync:yl}=_e("fs"),{dirname:Bi,join:bl}=_e("path"),{SourceMapConsumer:Or,SourceMapGenerator:Ar}=zt();function Sl(n){return Buffer?Buffer.from(n,"base64").toString():window.atob(n)}var nt=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let i=t.map?t.map.prev:void 0,s=this.loadMap(t.from,i);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Bi(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Or(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,i=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,r=/^data:application\/json,/,o=e.match(s)||e.match(r);if(o)return decodeURIComponent(e.substr(o[0].length));let a=e.match(t)||e.match(i);if(a)return Sl(e.substr(a[0].length));let l=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+l)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let i=e.lastIndexOf(t.pop()),s=e.indexOf("*/",i);i>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(i,s)))}loadFile(e){if(this.root=Bi(e),wl(e))return this.mapFile=e,yl(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let i=t(e);if(i){let s=this.loadFile(i);if(!s)throw new Error("Unable to load previous source map: "+i.toString());return s}}else{if(t instanceof Or)return Ar.fromSourceMap(t).toString();if(t instanceof Ar)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let i=this.annotation;return e&&(i=bl(Bi(e),i)),this.loadFile(i)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};Rr.exports=nt;nt.default=nt});var ot=v((Lu,kr)=>{"use strict";var{nanoid:vl}=er(),{isAbsolute:zi,resolve:Wi}=_e("path"),{SourceMapConsumer:xl,SourceMapGenerator:Cl}=zt(),{fileURLToPath:Mr,pathToFileURL:Wt}=_e("url"),Lr=Nt(),El=Ui(),$i=bi(),ji=Symbol("fromOffsetCache"),_l=!!(xl&&Cl),Tr=!!(Wi&&zi),Te=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!Tr||/^\w+:\/\//.test(t.from)||zi(t.from)?this.file=t.from:this.file=Wi(t.from)),Tr&&_l){let i=new El(this.css,t);if(i.text){this.map=i;let s=i.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+vl(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,i,s={}){let r,o,a;if(t&&typeof t=="object"){let h=t,u=i;if(typeof h.offset=="number"){let f=this.fromOffset(h.offset);t=f.line,i=f.col}else t=h.line,i=h.column;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);o=f.line,r=f.col}else o=u.line,r=u.column}else if(!i){let h=this.fromOffset(t);t=h.line,i=h.col}let l=this.origin(t,i,o,r);return l?a=new Lr(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,s.plugin):a=new Lr(e,o===void 0?t:{column:i,line:t},o===void 0?i:{column:r,line:o},this.css,this.file,s.plugin),a.input={column:i,endColumn:r,endLine:o,line:t,source:this.css},this.file&&(Wt&&(a.input.url=Wt(this.file).toString()),a.input.file=this.file),a}fromOffset(e){let t,i;if(this[ji])i=this[ji];else{let r=this.css.split(`
22
- `);i=new Array(r.length);let o=0;for(let a=0,l=r.length;a<l;a++)i[a]=o,o+=r[a].length+1;this[ji]=i}t=i[i.length-1];let s=0;if(e>=t)s=i.length-1;else{let r=i.length-2,o;for(;s<r;)if(o=s+(r-s>>1),e<i[o])r=o-1;else if(e>=i[o+1])s=o+1;else{s=o;break}}return{col:e-i[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Wi(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,i,s){if(!this.map)return!1;let r=this.map.consumer(),o=r.originalPositionFor({column:t,line:e});if(!o.source)return!1;let a;typeof i=="number"&&(a=r.originalPositionFor({column:s,line:i}));let l;zi(o.source)?l=Wt(o.source):l=new URL(o.source,this.map.consumer().sourceRoot||Wt(this.map.mapFile));let h={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:l.toString()};if(l.protocol==="file:")if(Mr)h.file=Mr(l);else throw new Error("file: protocol is not available in this PostCSS build");let u=r.sourceContentFor(o.source);return u&&(h.source=u),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};kr.exports=Te;Te.default=Te;$i&&$i.registerInput&&$i.registerInput(Te)});var ke=v((Tu,Fr)=>{"use strict";var Nr=fe(),Pr,Dr,pe=class extends Nr{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,i){let s=super.normalize(e);if(t){if(i==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let r of s)r.raws.before=t.raws.before}return s}removeChild(e,t){let i=this.index(e);return!t&&i===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(e)}toResult(e={}){return new Pr(new Dr,this,e).stringify()}};pe.registerLazyResult=n=>{Pr=n};pe.registerProcessor=n=>{Dr=n};Fr.exports=pe;pe.default=pe;Nr.registerRoot(pe)});var qi=v((ku,Ir)=>{"use strict";var lt={comma(n){return lt.split(n,[","],!0)},space(n){let e=[" ",`
23
- `," "];return lt.split(n,e)},split(n,e,t){let i=[],s="",r=!1,o=0,a=!1,l="",h=!1;for(let u of n)h?h=!1:u==="\\"?h=!0:a?u===l&&(a=!1):u==='"'||u==="'"?(a=!0,l=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(r=!0),r?(s!==""&&i.push(s.trim()),s="",r=!1):s+=u;return(t||s!=="")&&i.push(s.trim()),i}};Ir.exports=lt;lt.default=lt});var qt=v((Nu,Ur)=>{"use strict";var Br=fe(),Ol=qi(),Ne=class extends Br{get selectors(){return Ol.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,i=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};Ur.exports=Ne;Ne.default=Ne;Br.registerRule(Ne)});var jr=v((Pu,$r)=>{"use strict";var Al=Dt(),Rl=Ze(),Ml=tt(),Ll=ot(),Tl=Ui(),kl=ke(),Nl=qt();function at(n,e){if(Array.isArray(n))return n.map(s=>at(s));let{inputs:t,...i}=n;if(t){e=[];for(let s of t){let r={...s,__proto__:Ll.prototype};r.map&&(r.map={...r.map,__proto__:Tl.prototype}),e.push(r)}}if(i.nodes&&(i.nodes=n.nodes.map(s=>at(s,e))),i.source){let{inputId:s,...r}=i.source;i.source=r,s!=null&&(i.source.input=e[s])}if(i.type==="root")return new kl(i);if(i.type==="decl")return new Ml(i);if(i.type==="rule")return new Nl(i);if(i.type==="comment")return new Rl(i);if(i.type==="atrule")return new Al(i);throw new Error("Unknown node type: "+n.type)}$r.exports=at;at.default=at});var Vi=v((Du,Hr)=>{"use strict";var{dirname:Gt,relative:Wr,resolve:qr,sep:Gr}=_e("path"),{SourceMapConsumer:Vr,SourceMapGenerator:Vt}=zt(),{pathToFileURL:zr}=_e("url"),Pl=ot(),Dl=!!(Vr&&Vt),Fl=!!(Gt&&qr&&Wr&&Gr),Gi=class{constructor(e,t,i,s){this.stringify=e,this.mapOpts=i.map||{},this.root=t,this.opts=i,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
24
- `;this.css.includes(`\r
25
- `)&&(t=`\r
26
- `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),i=e.root||Gt(e.file),s;this.mapOpts.sourcesContent===!1?(s=new Vr(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,t,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Fl&&Dl&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Vt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Vt({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});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]}generateString(){this.css="",this.map=new Vt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,i="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},r,o;this.stringify(this.root,(a,l,h)=>{if(this.css+=a,l&&h!=="end"&&(s.generated.line=e,s.generated.column=t-1,l.source&&l.source.start?(s.source=this.sourcePath(l),s.original.line=l.source.start.line,s.original.column=l.source.start.column-1,this.map.addMapping(s)):(s.source=i,s.original.line=1,s.original.column=0,this.map.addMapping(s))),o=a.match(/\n/g),o?(e+=o.length,r=a.lastIndexOf(`
27
- `),t=a.length-r):t+=a.length,l&&h!=="start"){let u=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==u.last||u.raws.semicolon)&&(l.source&&l.source.end?(s.source=this.sourcePath(l),s.original.line=l.source.end.line,s.original.column=l.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=i,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let i=this.opts.to?Gt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(i=Gt(qr(i,this.mapOpts.annotation)));let s=Wr(i,e);return this.memoizedPaths.set(e,s),s}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 Pl(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let i=t.source.input.from;if(i&&!e[i]){e[i]=!0;let s=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(zr){let i=zr(e).toString();return this.memoizedFileURLs.set(e,i),i}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Gr==="\\"&&(e=e.replace(/\\/g,"/"));let i=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,i),i}};Hr.exports=Gi});var Yr=v((Fu,Kr)=>{"use strict";var Il=Dt(),Bl=Ze(),Ul=tt(),$l=ke(),Qr=qt(),jl=yi(),Jr={empty:!0,space:!0};function zl(n){for(let e=n.length-1;e>=0;e--){let t=n[e],i=t[3]||t[2];if(i)return i}}var Hi=class{constructor(e){this.input=e,this.root=new $l,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Il;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let i,s,r,o=!1,a=!1,l=[],h=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),i=e[0],i==="("||i==="["?h.push(i==="("?")":"]"):i==="{"&&h.length>0?h.push("}"):i===h[h.length-1]&&h.pop(),h.length===0)if(i===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){a=!0;break}else if(i==="}"){if(l.length>0){for(r=l.length-1,s=l[r];s&&s[0]==="space";)s=l[--r];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let i=0,s;for(let r=t-1;r>=0&&(s=e[r],!(s[0]!=="space"&&(i+=1,i===2)));r--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,i,s,r;for(let[o,a]of e.entries()){if(s=a,r=s[0],r==="("&&(t+=1),r===")"&&(t-=1),t===0&&r===":")if(!i)this.doubleColon(s);else{if(i[0]==="word"&&i[1]==="progid")continue;return o}i=s}return!1}comment(e){let t=new Bl;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let i=e[1].slice(2,-2);if(/^\s*$/.test(i))t.text="",t.raws.left=i,t.raws.right="";else{let s=i.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=jl(this.input)}decl(e,t){let i=new Ul;this.init(i,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(s[3]||s[2]||zl(e)),i.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){let h=e[0][0];if(h===":"||h==="space"||h==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let r;for(;e.length;)if(r=e.shift(),r[0]===":"){i.raws.between+=r[1];break}else r[0]==="word"&&/\w/.test(r[1])&&this.unknownWord([r]),i.raws.between+=r[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let h=e.length-1;h>=0;h--){if(r=e[h],r[1].toLowerCase()==="!important"){i.important=!0;let u=this.stringFrom(e,h);u=this.spacesFromEnd(e)+u,u!==" !important"&&(i.raws.important=u);break}else if(r[1].toLowerCase()==="important"){let u=e.slice(0),f="";for(let c=h;c>0;c--){let p=u[c][0];if(f.trim().startsWith("!")&&p!=="space")break;f=u.pop()[1]+f}f.trim().startsWith("!")&&(i.important=!0,i.raws.important=f,e=u)}if(r[0]!=="space"&&r[0]!=="comment")break}e.some(h=>h[0]!=="space"&&h[0]!=="comment")&&(i.raws.between+=o.map(h=>h[1]).join(""),o=[]),this.raw(i,"value",o.concat(e),t),i.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Qr;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}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.source.end.offset++,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,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,i=null,s=!1,r=null,o=[],a=e[1].startsWith("--"),l=[],h=e;for(;h;){if(i=h[0],l.push(h),i==="("||i==="[")r||(r=h),o.push(i==="("?")":"]");else if(a&&s&&i==="{")r||(r=h),o.push("}");else if(o.length===0)if(i===";")if(s){this.decl(l,a);return}else break;else if(i==="{"){this.rule(l);return}else if(i==="}"){this.tokenizer.back(l.pop()),t=!0;break}else i===":"&&(s=!0);else i===o[o.length-1]&&(o.pop(),o.length===0&&(r=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(r),t&&s){if(!a)for(;l.length&&(h=l[l.length-1][0],!(h!=="space"&&h!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}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);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,i,s){let r,o,a=i.length,l="",h=!0,u,f;for(let c=0;c<a;c+=1)r=i[c],o=r[0],o==="space"&&c===a-1&&!s?h=!1:o==="comment"?(f=i[c-1]?i[c-1][0]:"empty",u=i[c+1]?i[c+1][0]:"empty",!Jr[f]&&!Jr[u]?l.slice(-1)===","?h=!1:l+=r[1]:h=!1):l+=r[1];if(!h){let c=i.reduce((p,g)=>p+g[1],"");e.raws[t]={raw:c,value:l}}e[t]=l}rule(e){e.pop();let t=new Qr;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,i="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)i=e.pop()[1]+i;return i}spacesAndCommentsFromStart(e){let t,i="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)i+=e.shift()[1];return i}spacesFromEnd(e){let t,i="";for(;e.length&&(t=e[e.length-1][0],t==="space");)i=e.pop()[1]+i;return i}stringFrom(e,t){let i="";for(let s=t;s<e.length;s++)i+=e[s][1];return e.splice(t,e.length-t),i}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};Kr.exports=Hi});var Qt=v((Iu,Xr)=>{"use strict";var Wl=fe(),ql=ot(),Gl=Yr();function Ht(n,e){let t=new ql(n,e),i=new Gl(t);try{i.parse()}catch(s){throw process.env.NODE_ENV!=="production"&&s.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?s.message+=`
28
- You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?s.message+=`
29
- You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(s.message+=`
30
- You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),s}return i.root}Xr.exports=Ht;Ht.default=Ht;Wl.registerParse(Ht)});var Qi=v((Bu,Zr)=>{"use strict";var ht=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let i=t.node.rangeBy(t);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in t)this[i]=t[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};Zr.exports=ht;ht.default=ht});var Jt=v((Uu,en)=>{"use strict";var Vl=Qi(),ut=class{get content(){return this.css}constructor(e,t,i){this.processor=e,this.messages=[],this.root=t,this.opts=i,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 i=new Vl(e,t);return this.messages.push(i),i}warnings(){return this.messages.filter(e=>e.type==="warning")}};en.exports=ut;ut.default=ut});var Ji=v(($u,sn)=>{"use strict";var tn={};sn.exports=function(e){tn[e]||(tn[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))}});var Xi=v((ju,ln)=>{"use strict";var Hl=fe(),Ql=Ft(),Jl=Vi(),Kl=Qt(),rn=Jt(),Yl=ke(),Xl=He(),{isClean:se,my:Zl}=Pt(),ea=Ji(),ta={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ia={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},sa={Once:!0,postcssPlugin:!0,prepare:!0},Pe=0;function ct(n){return typeof n=="object"&&typeof n.then=="function"}function on(n){let e=!1,t=ta[n.type];return n.type==="decl"?e=n.prop.toLowerCase():n.type==="atrule"&&(e=n.name.toLowerCase()),e&&n.append?[t,t+"-"+e,Pe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:n.append?[t,Pe,t+"Exit"]:[t,t+"Exit"]}function nn(n){let e;return n.type==="document"?e=["Document",Pe,"DocumentExit"]:n.type==="root"?e=["Root",Pe,"RootExit"]:e=on(n),{eventIndex:0,events:e,iterator:0,node:n,visitorIndex:0,visitors:[]}}function Ki(n){return n[se]=!1,n.nodes&&n.nodes.forEach(e=>Ki(e)),n}var Yi={},de=class n{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,i){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=Ki(t);else if(t instanceof n||t instanceof rn)s=Ki(t.root),t.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=t.map);else{let r=Kl;i.syntax&&(r=i.syntax.parse),i.parser&&(r=i.parser),r.parse&&(r=r.parse);try{s=r(t,i)}catch(o){this.processed=!0,this.error=o}s&&!s[Zl]&&Hl.rebuild(s)}this.result=new rn(e,s,i),this.helpers={...Yi,postcss:Yi,result:this.result},this.plugins=this.processor.plugins.map(r=>typeof r=="object"&&r.prepare?{...r,...r.prepare(this.result)}:r)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let i=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=i.postcssPlugin,e.setMessage();else if(i.postcssVersion&&process.env.NODE_ENV!=="production"){let s=i.postcssPlugin,r=i.postcssVersion,o=this.result.processor.version,a=r.split("."),l=o.split(".");(a[0]!==l[0]||parseInt(a[1])>parseInt(l[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+s+" uses "+r+". Perhaps this is the source of the error below.")}}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,i,s)=>{this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let i in t){if(!ia[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!sa[i])if(typeof t[i]=="object")for(let s in t[i])s==="*"?e(t,i,t[i][s]):e(t,i+"-"+s.toLowerCase(),t[i][s]);else typeof t[i]=="function"&&e(t,i,t[i])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],i=this.runOnRoot(t);if(ct(i))try{await i}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[se];){e[se]=!0;let t=[nn(e)];for(;t.length>0;){let i=this.visitTick(t);if(ct(i))try{await i}catch(s){let r=t[t.length-1].node;throw this.handleError(s,r)}}}if(this.listeners.OnceExit)for(let[t,i]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(r=>i(r,this.helpers));await Promise.all(s)}else await i(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(i=>e.Once(i,this.helpers));return ct(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Xl;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new Jl(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}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){let t=this.runOnRoot(e);if(ct(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[se];)e[se]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this.opts||ea("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)}toString(){return this.css}visitSync(e,t){for(let[i,s]of e){this.result.lastPlugin=i;let r;try{r=s(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(ct(r))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:i,visitors:s}=t;if(i.type!=="root"&&i.type!=="document"&&!i.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[o,a]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(i.toProxy(),this.helpers)}catch(l){throw this.handleError(l,i)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=i.nodes[i.indexes[o]];)if(i.indexes[o]+=1,!a[se]){a[se]=!0,e.push(nn(a));return}t.iterator=0,delete i.indexes[o]}let r=t.events;for(;t.eventIndex<r.length;){let o=r[t.eventIndex];if(t.eventIndex+=1,o===Pe){i.nodes&&i.nodes.length&&(i[se]=!0,t.iterator=i.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[se]=!0;let t=on(e);for(let i of t)if(i===Pe)e.nodes&&e.each(s=>{s[se]||this.walkSync(s)});else{let s=this.listeners[i];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}};de.registerPostcss=n=>{Yi=n};ln.exports=de;de.default=de;Yl.registerLazyResult(de);Ql.registerLazyResult(de)});var hn=v((zu,an)=>{"use strict";var ra=Vi(),na=Qt(),oa=Jt(),la=He(),aa=Ji(),ft=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=na;try{e=t(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,i){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=i,this._map=void 0;let s,r=la;this.result=new oa(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new ra(r,s,this._opts,t);if(a.isMap()){let[l,h]=a.generate();l&&(this.result.css=l),h&&(this.result.map=h)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this._opts||aa("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)}toString(){return this._css}warnings(){return[]}};an.exports=ft;ft.default=ft});var cn=v((Wu,un)=>{"use strict";var ha=Ft(),ua=Xi(),ca=hn(),fa=ke(),xe=class{constructor(e=[]){this.version="8.5.3",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let i of e)if(i.postcss===!0?i=i():i.postcss&&(i=i.postcss),typeof i=="object"&&Array.isArray(i.plugins))t=t.concat(i.plugins);else if(typeof i=="object"&&i.postcssPlugin)t.push(i);else if(typeof i=="function")t.push(i);else if(typeof i=="object"&&(i.parse||i.stringify)){if(process.env.NODE_ENV!=="production")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.")}else throw new Error(i+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new ca(this,e,t):new ua(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};un.exports=xe;xe.default=xe;fa.registerProcessor(xe);ha.registerProcessor(xe)});var bn=v((qu,yn)=>{"use strict";var fn=Dt(),pn=Ze(),pa=fe(),da=Nt(),dn=tt(),mn=Ft(),ma=jr(),ga=ot(),wa=Xi(),ya=qi(),ba=Ye(),Sa=Qt(),Zi=cn(),va=Jt(),gn=ke(),wn=qt(),xa=He(),Ca=Qi();function E(...n){return n.length===1&&Array.isArray(n[0])&&(n=n[0]),new Zi(n)}E.plugin=function(e,t){let i=!1;function s(...o){console&&console.warn&&!i&&(i=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
31
- https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
32
- https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new Zi().version,a}let r;return Object.defineProperty(s,"postcss",{get(){return r||(r=s()),r}}),s.process=function(o,a,l){return E([s(l)]).process(o,a)},s};E.stringify=xa;E.parse=Sa;E.fromJSON=ma;E.list=ya;E.comment=n=>new pn(n);E.atRule=n=>new fn(n);E.decl=n=>new dn(n);E.rule=n=>new wn(n);E.root=n=>new gn(n);E.document=n=>new mn(n);E.CssSyntaxError=da;E.Declaration=dn;E.Container=pa;E.Processor=Zi;E.Document=mn;E.Comment=pn;E.Warning=Ca;E.AtRule=fn;E.Result=va;E.Input=ga;E.Rule=wn;E.Root=gn;E.Node=ba;wa.registerPostcss(E);yn.exports=E;E.default=E});var _n=v((yc,En)=>{"use strict";En.exports=xn;function xn(n,e,t){n instanceof RegExp&&(n=vn(n,t)),e instanceof RegExp&&(e=vn(e,t));var i=Cn(n,e,t);return i&&{start:i[0],end:i[1],pre:t.slice(0,i[0]),body:t.slice(i[0]+n.length,i[1]),post:t.slice(i[1]+e.length)}}function vn(n,e){var t=e.match(n);return t?t[0]:null}xn.range=Cn;function Cn(n,e,t){var i,s,r,o,a,l=t.indexOf(n),h=t.indexOf(e,l+1),u=l;if(l>=0&&h>0){if(n===e)return[l,h];for(i=[],r=t.length;u>=0&&!a;)u==l?(i.push(u),l=t.indexOf(n,u+1)):i.length==1?a=[i.pop(),h]:(s=i.pop(),s<r&&(r=s,o=h),h=t.indexOf(e,u+1)),u=l<h&&l>=0?l:h;i.length&&(a=[r,o])}return a}});var Nn=v((bc,kn)=>{var On=_n();kn.exports=Oa;var An="\0SLASH"+Math.random()+"\0",Rn="\0OPEN"+Math.random()+"\0",is="\0CLOSE"+Math.random()+"\0",Mn="\0COMMA"+Math.random()+"\0",Ln="\0PERIOD"+Math.random()+"\0";function ts(n){return parseInt(n,10)==n?parseInt(n,10):n.charCodeAt(0)}function Ea(n){return n.split("\\\\").join(An).split("\\{").join(Rn).split("\\}").join(is).split("\\,").join(Mn).split("\\.").join(Ln)}function _a(n){return n.split(An).join("\\").split(Rn).join("{").split(is).join("}").split(Mn).join(",").split(Ln).join(".")}function Tn(n){if(!n)return[""];var e=[],t=On("{","}",n);if(!t)return n.split(",");var i=t.pre,s=t.body,r=t.post,o=i.split(",");o[o.length-1]+="{"+s+"}";var a=Tn(r);return r.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function Oa(n){return n?(n.substr(0,2)==="{}"&&(n="\\{\\}"+n.substr(2)),pt(Ea(n),!0).map(_a)):[]}function Aa(n){return"{"+n+"}"}function Ra(n){return/^-?0\d/.test(n)}function Ma(n,e){return n<=e}function La(n,e){return n>=e}function pt(n,e){var t=[],i=On("{","}",n);if(!i)return[n];var s=i.pre,r=i.post.length?pt(i.post,!1):[""];if(/\$$/.test(i.pre))for(var o=0;o<r.length;o++){var a=s+"{"+i.body+"}"+r[o];t.push(a)}else{var l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),h=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),u=l||h,f=i.body.indexOf(",")>=0;if(!u&&!f)return i.post.match(/,.*\}/)?(n=i.pre+"{"+i.body+is+i.post,pt(n)):[n];var c;if(u)c=i.body.split(/\.\./);else if(c=Tn(i.body),c.length===1&&(c=pt(c[0],!1).map(Aa),c.length===1))return r.map(function(ye){return i.pre+c[0]+ye});var p;if(u){var g=ts(c[0]),d=ts(c[1]),m=Math.max(c[0].length,c[1].length),w=c.length==3?Math.abs(ts(c[2])):1,b=Ma,x=d<g;x&&(w*=-1,b=La);var S=c.some(Ra);p=[];for(var C=g;b(C,d);C+=w){var O;if(h)O=String.fromCharCode(C),O==="\\"&&(O="");else if(O=String(C),S){var W=m-O.length;if(W>0){var z=new Array(W+1).join("0");C<0?O="-"+z+O.slice(1):O=z+O}}p.push(O)}}else{p=[];for(var B=0;B<c.length;B++)p.push.apply(p,pt(c[B],!1))}for(var B=0;B<p.length;B++)for(var o=0;o<r.length;o++){var a=s+p[B]+r[o];(!e||u||a)&&t.push(a)}}return t}});var _=xs(bn(),1),es=_.default,Gu=_.default.stringify,Vu=_.default.fromJSON,Hu=_.default.plugin,Qu=_.default.parse,Ju=_.default.list,Ku=_.default.document,Yu=_.default.comment,Xu=_.default.atRule,Zu=_.default.rule,ec=_.default.decl,tc=_.default.root,ic=_.default.CssSyntaxError,sc=_.default.Declaration,rc=_.default.Container,nc=_.default.Processor,oc=_.default.Document,lc=_.default.Comment,ac=_.default.Warning,hc=_.default.AtRule,uc=_.default.Result,cc=_.default.Input,fc=_.default.Rule,pc=_.default.Root,dc=_.default.Node;import*as ae from"fs";import*as he from"path";var Kt=class{timestamp;fileMigrations=[];currentFile=null;reportDir=he.join(process.cwd(),".report");transformName;constructor(e){this.transformName=e,this.timestamp=this.generateTimestamp()}generateTimestamp(){return new Date(new Date().getTime()+324e5).toISOString()}getReportPath(){return he.join(this.reportDir,`${this.transformName}.md`)}getRelativePath(e){if(!e)return"unknown";try{let t=he.resolve(e);return he.relative(this.reportDir,t)}catch{return"unknown"}}startNewFile(e){this.currentFile={filePath:this.getRelativePath(e),results:[]}}addResult(e){this.currentFile&&this.currentFile.results.push(e)}finishFile(){this.currentFile&&this.currentFile.results.length>0&&this.fileMigrations.push(this.currentFile),this.currentFile=null}hasResults(){return this.fileMigrations.length>0}writeReport(){if(!this.hasResults())return;ae.existsSync(this.reportDir)||ae.mkdirSync(this.reportDir,{recursive:!0});let e=this.getReportPath(),t=ae.existsSync(e)?ae.readFileSync(e,"utf8"):"",i=this.fileMigrations.map(r=>{let o=he.basename(r.filePath),a=r.results.map(l=>{let h=l.line?` (line: ${l.line})`:"",u=l.status==="success"?"\u2705 success":l.status==="warning"?"\u26A0\uFE0F warning":"\u274C failure",f=l.failureReason?`
33
- - reason: ${l.failureReason}`:"";return` - ${u} ${h}
34
- - as-is: \`${l.previousToken}\`
35
- - to-be: ${l.nextToken?`\`${l.nextToken}\``:"undefined"}${f}`}).join(`
36
- `);return`### [${o}](${r.filePath})
37
- - timestamp: ${this.timestamp}
38
- - summary:
39
- - total: ${r.results.length}
40
- - success: ${r.results.filter(l=>l.status==="success").length}
41
- - warning: ${r.results.filter(l=>l.status==="warning").length}
42
- - failure: ${r.results.filter(l=>l.status==="failure").length}
43
- - lines
44
- ${a}`}).join(`
45
-
46
- `);ae.writeFileSync(e,t+(t?`
47
-
48
- `:"")+i)}};var Sn=[{previous:"$semantic.typography.h1",next:[],description:"Deprecated"},{previous:"$semantic.typography.h2",next:[],description:"Deprecated"},{previous:"$semantic.typography.h3",next:[],description:"Deprecated"},{previous:"$semantic.typography.h4",next:["t10Bold","screenTitle"],description:"\uC904\uAC04\uACA9 -0.1px"},{previous:"$semantic.typography.title1Bold",next:["t9Bold"],description:"\uC904\uAC04\uACA9 -0.4px"},{previous:"$semantic.typography.title1Regular",next:[],description:"Deprecated"},{previous:"$semantic.typography.title2Bold",next:["t7Bold"]},{previous:"$semantic.typography.title2Regular",next:["t7Regular"]},{previous:"$semantic.typography.title3Bold",next:["t6Bold"],description:"\uC904\uAC04\uACA9 -0.3px"},{previous:"$semantic.typography.title3Regular",next:["t6Regular"]},{previous:"$semantic.typography.subtitle1Bold",next:["t5Bold"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.subtitle1Regular",next:["t5Regular"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.subtitle2Bold",next:["t4Bold"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.subtitle2Regular",next:["t4Regular"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.bodyL1Bold",next:["t5Bold"],description:"\uC904\uAC04\uACA9 -2px"},{previous:"$semantic.typography.bodyL1Regular",next:["articleBody"]},{previous:"$semantic.typography.bodyL2Bold",next:["t4Bold"],description:"\uC904\uAC04\uACA9 -2px"},{previous:"$semantic.typography.bodyL2Regular",next:[],alternative:["t4Regular"],description:"Deprecated"},{previous:"$semantic.typography.bodyM1Bold",next:["t5Bold"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.bodyM1Regular",next:["t5Regular"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.bodyM2Bold",next:["t4Bold"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.bodyM2Regular",next:["t4Regular"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.caption1Bold",next:["t3Bold"],description:"\uC904\uAC04\uACA9 -1.5px"},{previous:"$semantic.typography.caption1Regular",next:[],alternative:["t3Regular"],description:"Deprecated"},{previous:"$semantic.typography.caption2Bold",next:["t2Bold"],description:"\uC904\uAC04\uACA9 -0.2px"},{previous:"$semantic.typography.caption2Regular",next:["t2Regular"],description:"\uC904\uAC04\uACA9 -0.2px"},{previous:"$semantic.typography.label1Bold",next:["t6Bold"],description:"\uC904\uAC04\uACA9 -0.3px"},{previous:"$semantic.typography.label1Regular",next:["t6Regular"]},{previous:"$semantic.typography.label2Bold",next:["t5Bold"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.label2Regular",next:["t5Regular"],description:"\uC904\uAC04\uACA9 +0.4px"},{previous:"$semantic.typography.label3Bold",next:["t4Bold"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.label3Regular",next:["t4Regular"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.label4Bold",next:["t2Bold"],description:"\uC904\uAC04\uACA9 -0.2px"},{previous:"$semantic.typography.label4Regular",next:["t2Regular"],description:"\uC904\uAC04\uACA9 -0.2px"},{previous:"$semantic.typography.label5Bold",next:["t1Bold"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.label5Regular",next:["t1Regular"],description:"\uC904\uAC04\uACA9 +0.1px"},{previous:"$semantic.typography.label6Bold",next:[],alternative:["t1Bold"],description:"Deprecated"},{previous:"$semantic.typography.label6Regular",next:[],alternative:["t1Regular"],description:"Deprecated"}];import{writeFileSync as Yh,readFileSync as Xh}from"node:fs";import{resolve as Zh}from"node:path";var jn=xs(Nn(),1);var dt=n=>{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>65536)throw new TypeError("pattern is too long")};var Ta={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},mt=n=>n.replace(/[[\]\\-]/g,"\\$&"),ka=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Pn=n=>n.join(""),Dn=(n,e)=>{let t=e;if(n.charAt(t)!=="[")throw new Error("not in a brace expression");let i=[],s=[],r=t+1,o=!1,a=!1,l=!1,h=!1,u=t,f="";e:for(;r<n.length;){let d=n.charAt(r);if((d==="!"||d==="^")&&r===t+1){h=!0,r++;continue}if(d==="]"&&o&&!l){u=r+1;break}if(o=!0,d==="\\"&&!l){l=!0,r++;continue}if(d==="["&&!l){for(let[m,[w,b,x]]of Object.entries(Ta))if(n.startsWith(m,r)){if(f)return["$.",!1,n.length-t,!0];r+=m.length,x?s.push(w):i.push(w),a=a||b;continue e}}if(l=!1,f){d>f?i.push(mt(f)+"-"+mt(d)):d===f&&i.push(mt(d)),f="",r++;continue}if(n.startsWith("-]",r+1)){i.push(mt(d+"-")),r+=2;continue}if(n.startsWith("-",r+1)){f=d,r+=2;continue}i.push(mt(d)),r++}if(u<r)return["",!1,0,!1];if(!i.length&&!s.length)return["$.",!1,n.length-t,!0];if(s.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!h){let d=i[0].length===2?i[0].slice(-1):i[0];return[ka(d),!1,u-t,!1]}let c="["+(h?"^":"")+Pn(i)+"]",p="["+(h?"":"^")+Pn(s)+"]";return[i.length&&s.length?"("+c+"|"+p+")":i.length?c:p,a,u-t,!0]};var Z=(n,{windowsPathsNoEscape:e=!1}={})=>e?n.replace(/\[([^\/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var Na=new Set(["!","?","+","*","@"]),Fn=n=>Na.has(n),Pa="(?!(?:^|/)\\.\\.?(?:$|/))",Yt="(?!\\.)",Da=new Set(["[","."]),Fa=new Set(["..","."]),Ia=new Set("().*{}+?[]^$\\!"),Ba=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ss="[^/]",In=ss+"*?",Bn=ss+"+?",De=class n{type;#e;#t;#n=!1;#s=[];#o;#S;#h;#c=!1;#l;#a;#r=!1;constructor(e,t,i={}){this.type=e,e&&(this.#t=!0),this.#o=t,this.#e=this.#o?this.#o.#e:this,this.#l=this.#e===this?i:this.#e.#l,this.#h=this.#e===this?[]:this.#e.#h,e==="!"&&!this.#e.#c&&this.#h.push(this),this.#S=this.#o?this.#o.#s.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#s)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#a!==void 0?this.#a:this.type?this.#a=this.type+"("+this.#s.map(e=>String(e)).join("|")+")":this.#a=this.#s.map(e=>String(e)).join("")}#g(){if(this!==this.#e)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let e;for(;e=this.#h.pop();){if(e.type!=="!")continue;let t=e,i=t.#o;for(;i;){for(let s=t.#S+1;!i.type&&s<i.#s.length;s++)for(let r of e.#s){if(typeof r=="string")throw new Error("string part in extglob AST??");r.copyIn(i.#s[s])}t=i,i=t.#o}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof n&&t.#o===this))throw new Error("invalid part: "+t);this.#s.push(t)}}toJSON(){let e=this.type===null?this.#s.slice().map(t=>typeof t=="string"?t:t.toJSON()):[this.type,...this.#s.map(t=>t.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#c&&this.#o?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#o?.isStart())return!1;if(this.#S===0)return!0;let e=this.#o;for(let t=0;t<this.#S;t++){let i=e.#s[t];if(!(i instanceof n&&i.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#o?.type==="!")return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();let e=this.#o?this.#o.#s.length:0;return this.#S===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new n(this.type,e);for(let i of this.#s)t.copyIn(i);return t}static#w(e,t,i,s){let r=!1,o=!1,a=-1,l=!1;if(t.type===null){let p=i,g="";for(;p<e.length;){let d=e.charAt(p++);if(r||d==="\\"){r=!r,g+=d;continue}if(o){p===a+1?(d==="^"||d==="!")&&(l=!0):d==="]"&&!(p===a+2&&l)&&(o=!1),g+=d;continue}else if(d==="["){o=!0,a=p,l=!1,g+=d;continue}if(!s.noext&&Fn(d)&&e.charAt(p)==="("){t.push(g),g="";let m=new n(d,t);p=n.#w(e,m,p,s),t.push(m);continue}g+=d}return t.push(g),p}let h=i+1,u=new n(null,t),f=[],c="";for(;h<e.length;){let p=e.charAt(h++);if(r||p==="\\"){r=!r,c+=p;continue}if(o){h===a+1?(p==="^"||p==="!")&&(l=!0):p==="]"&&!(h===a+2&&l)&&(o=!1),c+=p;continue}else if(p==="["){o=!0,a=h,l=!1,c+=p;continue}if(Fn(p)&&e.charAt(h)==="("){u.push(c),c="";let g=new n(p,u);u.push(g),h=n.#w(e,g,h,s);continue}if(p==="|"){u.push(c),c="",f.push(u),u=new n(null,t);continue}if(p===")")return c===""&&t.#s.length===0&&(t.#r=!0),u.push(c),c="",t.push(...f,u),h;c+=p}return t.type=null,t.#t=void 0,t.#s=[e.substring(i-1)],h}static fromGlob(e,t={}){let i=new n(null,void 0,t);return n.#w(e,i,0,t),i}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,i,s,r]=this.toRegExpSource();if(!(s||this.#t||this.#l.nocase&&!this.#l.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let a=(this.#l.nocase?"i":"")+(r?"u":"");return Object.assign(new RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#l}toRegExpSource(e){let t=e??!!this.#l.dot;if(this.#e===this&&this.#g(),!this.type){let l=this.isStart()&&this.isEnd(),h=this.#s.map(p=>{let[g,d,m,w]=typeof p=="string"?n.#f(p,this.#t,l):p.toRegExpSource(e);return this.#t=this.#t||m,this.#n=this.#n||w,g}).join(""),u="";if(this.isStart()&&typeof this.#s[0]=="string"&&!(this.#s.length===1&&Fa.has(this.#s[0]))){let g=Da,d=t&&g.has(h.charAt(0))||h.startsWith("\\.")&&g.has(h.charAt(2))||h.startsWith("\\.\\.")&&g.has(h.charAt(4)),m=!t&&!e&&g.has(h.charAt(0));u=d?Pa:m?Yt:""}let f="";return this.isEnd()&&this.#e.#c&&this.#o?.type==="!"&&(f="(?:$|\\/)"),[u+h+f,Z(h),this.#t=!!this.#t,this.#n]}let i=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:",r=this.#p(t);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){let l=this.toString();return this.#s=[l],this.type=null,this.#t=void 0,[l,Z(this.toString()),!1,!1]}let o=!i||e||t||!Yt?"":this.#p(!0);o===r&&(o=""),o&&(r=`(?:${r})(?:${o})*?`);let a="";if(this.type==="!"&&this.#r)a=(this.isStart()&&!t?Yt:"")+Bn;else{let l=this.type==="!"?"))"+(this.isStart()&&!t&&!e?Yt:"")+In+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=s+r+l}return[a,Z(r),this.#t=!!this.#t,this.#n]}#p(e){return this.#s.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[i,s,r,o]=t.toRegExpSource(e);return this.#n=this.#n||o,i}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#f(e,t,i=!1){let s=!1,r="",o=!1;for(let a=0;a<e.length;a++){let l=e.charAt(a);if(s){s=!1,r+=(Ia.has(l)?"\\":"")+l;continue}if(l==="\\"){a===e.length-1?r+="\\\\":s=!0;continue}if(l==="["){let[h,u,f,c]=Dn(e,a);if(f){r+=h,o=o||u,a+=f-1,t=t||c;continue}}if(l==="*"){i&&e==="*"?r+=Bn:r+=In,t=!0;continue}if(l==="?"){r+=ss,t=!0;continue}r+=Ba(l)}return[r,Z(e),!!t,o]}};var Fe=(n,{windowsPathsNoEscape:e=!1}={})=>e?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&");var $=(n,e,t={})=>(dt(e),!t.nocomment&&e.charAt(0)==="#"?!1:new G(e,t).match(n)),Ua=/^\*+([^+@!?\*\[\(]*)$/,$a=n=>e=>!e.startsWith(".")&&e.endsWith(n),ja=n=>e=>e.endsWith(n),za=n=>(n=n.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(n)),Wa=n=>(n=n.toLowerCase(),e=>e.toLowerCase().endsWith(n)),qa=/^\*+\.\*+$/,Ga=n=>!n.startsWith(".")&&n.includes("."),Va=n=>n!=="."&&n!==".."&&n.includes("."),Ha=/^\.\*+$/,Qa=n=>n!=="."&&n!==".."&&n.startsWith("."),Ja=/^\*+$/,Ka=n=>n.length!==0&&!n.startsWith("."),Ya=n=>n.length!==0&&n!=="."&&n!=="..",Xa=/^\?+([^+@!?\*\[\(]*)?$/,Za=([n,e=""])=>{let t=zn([n]);return e?(e=e.toLowerCase(),i=>t(i)&&i.toLowerCase().endsWith(e)):t},eh=([n,e=""])=>{let t=Wn([n]);return e?(e=e.toLowerCase(),i=>t(i)&&i.toLowerCase().endsWith(e)):t},th=([n,e=""])=>{let t=Wn([n]);return e?i=>t(i)&&i.endsWith(e):t},ih=([n,e=""])=>{let t=zn([n]);return e?i=>t(i)&&i.endsWith(e):t},zn=([n])=>{let e=n.length;return t=>t.length===e&&!t.startsWith(".")},Wn=([n])=>{let e=n.length;return t=>t.length===e&&t!=="."&&t!==".."},qn=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Un={win32:{sep:"\\"},posix:{sep:"/"}},sh=qn==="win32"?Un.win32.sep:Un.posix.sep;$.sep=sh;var D=Symbol("globstar **");$.GLOBSTAR=D;var rh="[^/]",nh=rh+"*?",oh="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",lh="(?:(?!(?:\\/|^)\\.).)*?",ah=(n,e={})=>t=>$(t,n,e);$.filter=ah;var Q=(n,e={})=>Object.assign({},n,e),hh=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return $;let e=$;return Object.assign((i,s,r={})=>e(i,s,Q(n,r)),{Minimatch:class extends e.Minimatch{constructor(s,r={}){super(s,Q(n,r))}static defaults(s){return e.defaults(Q(n,s)).Minimatch}},AST:class extends e.AST{constructor(s,r,o={}){super(s,r,Q(n,o))}static fromGlob(s,r={}){return e.AST.fromGlob(s,Q(n,r))}},unescape:(i,s={})=>e.unescape(i,Q(n,s)),escape:(i,s={})=>e.escape(i,Q(n,s)),filter:(i,s={})=>e.filter(i,Q(n,s)),defaults:i=>e.defaults(Q(n,i)),makeRe:(i,s={})=>e.makeRe(i,Q(n,s)),braceExpand:(i,s={})=>e.braceExpand(i,Q(n,s)),match:(i,s,r={})=>e.match(i,s,Q(n,r)),sep:e.sep,GLOBSTAR:D})};$.defaults=hh;var Gn=(n,e={})=>(dt(n),e.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:(0,jn.default)(n));$.braceExpand=Gn;var uh=(n,e={})=>new G(n,e).makeRe();$.makeRe=uh;var ch=(n,e,t={})=>{let i=new G(e,t);return n=n.filter(s=>i.match(s)),i.options.nonull&&!n.length&&n.push(e),n};$.match=ch;var $n=/[?*]|[+@!]\(.*?\)|\[|\]/,fh=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),G=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){dt(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||qn,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let s=this.globParts.map((r,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=r[0]===""&&r[1]===""&&(r[2]==="?"||!$n.test(r[2]))&&!$n.test(r[3]),h=/^[a-z]:/i.test(r[0]);if(l)return[...r.slice(0,4),...r.slice(4).map(u=>this.parse(u))];if(h)return[r[0],...r.slice(1).map(u=>this.parse(u))]}return r.map(l=>this.parse(l))});if(this.debug(this.pattern,s),this.set=s.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r<this.set.length;r++){let o=this.set[r];o[0]===""&&o[1]===""&&this.globParts[r][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let i=0;i<e.length;i++)for(let s=0;s<e[i].length;s++)e[i][s]==="**"&&(e[i][s]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let i=-1;for(;(i=t.indexOf("**",i+1))!==-1;){let s=i;for(;t[s+1]==="**";)s++;s!==i&&t.splice(i,s-i)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((i,s)=>{let r=i[i.length-1];return s==="**"&&r==="**"?i:s===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(i.pop(),i):(i.push(s),i)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let s=1;s<e.length-1;s++){let r=e[s];s===1&&r===""&&e[0]===""||(r==="."||r==="")&&(t=!0,e.splice(s,1),s--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let i=0;for(;(i=e.indexOf("..",i+1))!==-1;){let s=e[i-1];s&&s!=="."&&s!==".."&&s!=="**"&&(t=!0,e.splice(i-1,2),i-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let i of e){let s=-1;for(;(s=i.indexOf("**",s+1))!==-1;){let o=s;for(;i[o+1]==="**";)o++;o>s&&i.splice(s+1,o-s);let a=i[s+1],l=i[s+2],h=i[s+3];if(a!==".."||!l||l==="."||l===".."||!h||h==="."||h==="..")continue;t=!0,i.splice(s,1);let u=i.slice(0);u[s]="**",e.push(u),s--}if(!this.preserveMultipleSlashes){for(let o=1;o<i.length-1;o++){let a=i[o];o===1&&a===""&&i[0]===""||(a==="."||a==="")&&(t=!0,i.splice(o,1),o--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(t=!0,i.pop())}let r=0;for(;(r=i.indexOf("..",r+1))!==-1;){let o=i[r-1];if(o&&o!=="."&&o!==".."&&o!=="**"){t=!0;let l=r===1&&i[r+1]==="**"?["."]:[];i.splice(r-1,2,...l),i.length===0&&i.push(""),r-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let i=t+1;i<e.length;i++){let s=this.partsMatch(e[t],e[i],!this.preserveMultipleSlashes);if(s){e[t]=[],e[i]=s;break}}return e.filter(t=>t.length)}partsMatch(e,t,i=!1){let s=0,r=0,o=[],a="";for(;s<e.length&&r<t.length;)if(e[s]===t[r])o.push(a==="b"?t[r]:e[s]),s++,r++;else if(i&&e[s]==="**"&&t[r]===e[s+1])o.push(e[s]),s++;else if(i&&t[r]==="**"&&e[s]===t[r+1])o.push(t[r]),r++;else if(e[s]==="*"&&t[r]&&(this.options.dot||!t[r].startsWith("."))&&t[r]!=="**"){if(a==="b")return!1;a="a",o.push(e[s]),s++,r++}else if(t[r]==="*"&&e[s]&&(this.options.dot||!e[s].startsWith("."))&&e[s]!=="**"){if(a==="a")return!1;a="b",o.push(t[r]),s++,r++}else return!1;return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,i=0;for(let s=0;s<e.length&&e.charAt(s)==="!";s++)t=!t,i++;i&&(this.pattern=e.slice(i)),this.negate=t}matchOne(e,t,i=!1){let s=this.options;if(this.isWindows){let d=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),m=!d&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),w=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),b=!w&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),x=m?3:d?0:void 0,S=b?3:w?0:void 0;if(typeof x=="number"&&typeof S=="number"){let[C,O]=[e[x],t[S]];C.toLowerCase()===O.toLowerCase()&&(t[S]=C,S>x?t=t.slice(S):x>S&&(e=e.slice(x)))}}let{optimizationLevel:r=1}=this.options;r>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var o=0,a=0,l=e.length,h=t.length;o<l&&a<h;o++,a++){this.debug("matchOne loop");var u=t[a],f=e[o];if(this.debug(t,u,f),u===!1)return!1;if(u===D){this.debug("GLOBSTAR",[t,u,f]);var c=o,p=a+1;if(p===h){for(this.debug("** at the end");o<l;o++)if(e[o]==="."||e[o]===".."||!s.dot&&e[o].charAt(0)===".")return!1;return!0}for(;c<l;){var g=e[c];if(this.debug(`
49
- globstar while`,e,c,t,p,g),this.matchOne(e.slice(c),t.slice(p),i))return this.debug("globstar found match!",c,l,g),!0;if(g==="."||g===".."||!s.dot&&g.charAt(0)==="."){this.debug("dot detected!",e,c,t,p);break}this.debug("globstar swallow a segment, and continue"),c++}return!!(i&&(this.debug(`
50
- >>> no match, partial?`,e,c,t,p),c===l))}let d;if(typeof u=="string"?(d=f===u,this.debug("string match",u,f,d)):(d=u.test(f),this.debug("pattern match",u,f,d)),!d)return!1}if(o===l&&a===h)return!0;if(o===l)return i;if(a===h)return o===l-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return Gn(this.pattern,this.options)}parse(e){dt(e);let t=this.options;if(e==="**")return D;if(e==="")return"";let i,s=null;(i=e.match(Ja))?s=t.dot?Ya:Ka:(i=e.match(Ua))?s=(t.nocase?t.dot?Wa:za:t.dot?ja:$a)(i[1]):(i=e.match(Xa))?s=(t.nocase?t.dot?eh:Za:t.dot?th:ih)(i):(i=e.match(qa))?s=t.dot?Va:Ga:(i=e.match(Ha))&&(s=Qa);let r=De.fromGlob(e,this.options).toMMPattern();return s&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:s}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,i=t.noglobstar?nh:t.dot?oh:lh,s=new Set(t.nocase?["i"]:[]),r=e.map(l=>{let h=l.map(u=>{if(u instanceof RegExp)for(let f of u.flags.split(""))s.add(f);return typeof u=="string"?fh(u):u===D?D:u._src});return h.forEach((u,f)=>{let c=h[f+1],p=h[f-1];u!==D||p===D||(p===void 0?c!==void 0&&c!==D?h[f+1]="(?:\\/|"+i+"\\/)?"+c:h[f]=i:c===void 0?h[f-1]=p+"(?:\\/|"+i+")?":c!==D&&(h[f-1]=p+"(?:\\/|\\/"+i+"\\/)"+c,h[f+1]=D))}),h.filter(u=>u!==D).join("/")}).join("|"),[o,a]=e.length>1?["(?:",")"]:["",""];r="^"+o+r+a+"$",this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...s].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let i=this.options;this.isWindows&&(e=e.split("\\").join("/"));let s=this.slashSplit(e);this.debug(this.pattern,"split",s);let r=this.set;this.debug(this.pattern,"set",r);let o=s[s.length-1];if(!o)for(let a=s.length-2;!o&&a>=0;a--)o=s[a];for(let a=0;a<r.length;a++){let l=r[a],h=s;if(i.matchBase&&l.length===1&&(h=[o]),this.matchOne(h,l,t))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return $.defaults(e).Minimatch}};$.AST=De;$.Minimatch=G;$.escape=Fe;$.unescape=Z;import{fileURLToPath as qh}from"node:url";var Ie=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Hn=new Set,rs=typeof process=="object"&&process?process:{},Qn=(n,e,t,i)=>{typeof rs.emitWarning=="function"?rs.emitWarning(n,e,t,i):console.error(`[${t}] ${e}: ${n}`)},Xt=globalThis.AbortController,Vn=globalThis.AbortSignal;if(typeof Xt>"u"){Vn=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,s){this._onabort.push(s)}},Xt=class{constructor(){e()}signal=new Vn;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i)}}};let n=rs.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{n&&(n=!1,Qn("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var ph=n=>!Hn.has(n),Uc=Symbol("type"),me=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),Jn=n=>me(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Be:null:null,Be=class extends Array{constructor(e){super(e),this.fill(0)}},ns=class n{heap;length;static#e=!1;static create(e){let t=Jn(e);if(!t)return[];n.#e=!0;let i=new n(e,t);return n.#e=!1,i}constructor(e,t){if(!n.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},gt=class n{#e;#t;#n;#s;#o;#S;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#h;#c;#l;#a;#r;#g;#w;#p;#f;#C;#m;#E;#_;#b;#v;#x;#d;static unsafeExposeInternals(e){return{starts:e.#_,ttls:e.#b,sizes:e.#E,keyMap:e.#l,keyList:e.#a,valList:e.#r,next:e.#g,prev:e.#w,get head(){return e.#p},get tail(){return e.#f},free:e.#C,isBackgroundFetch:t=>e.#u(t),backgroundFetch:(t,i,s,r)=>e.#B(t,i,s,r),moveToTail:t=>e.#$(t),indexes:t=>e.#A(t),rindexes:t=>e.#R(t),isStale:t=>e.#y(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#c}get size(){return this.#h}get fetchMethod(){return this.#o}get memoMethod(){return this.#S}get dispose(){return this.#n}get disposeAfter(){return this.#s}constructor(e){let{max:t=0,ttl:i,ttlResolution:s=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:h,disposeAfter:u,noDisposeOnSet:f,noUpdateTTL:c,maxSize:p=0,maxEntrySize:g=0,sizeCalculation:d,fetchMethod:m,memoMethod:w,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:C,ignoreFetchAbort:O}=e;if(t!==0&&!me(t))throw new TypeError("max option must be a nonnegative integer");let W=t?Jn(t):Array;if(!W)throw new Error("invalid max value: "+t);if(this.#e=t,this.#t=p,this.maxEntrySize=g||this.#t,this.sizeCalculation=d,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(w!==void 0&&typeof w!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#S=w,m!==void 0&&typeof m!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#o=m,this.#x=!!m,this.#l=new Map,this.#a=new Array(t).fill(void 0),this.#r=new Array(t).fill(void 0),this.#g=new W(t),this.#w=new W(t),this.#p=0,this.#f=0,this.#C=ns.create(t),this.#h=0,this.#c=0,typeof h=="function"&&(this.#n=h),typeof u=="function"?(this.#s=u,this.#m=[]):(this.#s=void 0,this.#m=void 0),this.#v=!!this.#n,this.#d=!!this.#s,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!c,this.noDeleteOnFetchRejection=!!b,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!C,this.ignoreFetchAbort=!!O,this.maxEntrySize!==0){if(this.#t!==0&&!me(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!me(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#L()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=me(s)||s===0?s:1,this.ttlAutopurge=!!r,this.ttl=i||0,this.ttl){if(!me(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#M()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let z="LRU_CACHE_UNBOUNDED";ph(z)&&(Hn.add(z),Qn("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",z,n))}}getRemainingTTL(e){return this.#l.has(e)?1/0:0}#M(){let e=new Be(this.#e),t=new Be(this.#e);this.#b=e,this.#_=t,this.#k=(r,o,a=Ie.now())=>{if(t[r]=o!==0?a:0,e[r]=o,o!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#y(r)&&this.#T(this.#a[r],"expire")},o+1);l.unref&&l.unref()}},this.#O=r=>{t[r]=e[r]!==0?Ie.now():0},this.#i=(r,o)=>{if(e[o]){let a=e[o],l=t[o];if(!a||!l)return;r.ttl=a,r.start=l,r.now=i||s();let h=r.now-l;r.remainingTTL=a-h}};let i=0,s=()=>{let r=Ie.now();if(this.ttlResolution>0){i=r;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref()}return r};this.getRemainingTTL=r=>{let o=this.#l.get(r);if(o===void 0)return 0;let a=e[o],l=t[o];if(!a||!l)return 1/0;let h=(i||s())-l;return a-h},this.#y=r=>{let o=t[r],a=e[r];return!!a&&!!o&&(i||s())-o>a}}#O=()=>{};#i=()=>{};#k=()=>{};#y=()=>!1;#L(){let e=new Be(this.#e);this.#c=0,this.#E=e,this.#N=t=>{this.#c-=e[t],e[t]=0},this.#D=(t,i,s,r)=>{if(this.#u(i))return 0;if(!me(s))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(s=r(i,t),!me(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#P=(t,i,s)=>{if(e[t]=i,this.#t){let r=this.#t-e[t];for(;this.#c>r;)this.#I(!0)}this.#c+=e[t],s&&(s.entrySize=i,s.totalCalculatedSize=this.#c)}}#N=e=>{};#P=(e,t,i)=>{};#D=(e,t,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:e=this.allowStale}={}){if(this.#h)for(let t=this.#f;!(!this.#F(t)||((e||!this.#y(t))&&(yield t),t===this.#p));)t=this.#w[t]}*#R({allowStale:e=this.allowStale}={}){if(this.#h)for(let t=this.#p;!(!this.#F(t)||((e||!this.#y(t))&&(yield t),t===this.#f));)t=this.#g[t]}#F(e){return e!==void 0&&this.#l.get(this.#a[e])===e}*entries(){for(let e of this.#A())this.#r[e]!==void 0&&this.#a[e]!==void 0&&!this.#u(this.#r[e])&&(yield[this.#a[e],this.#r[e]])}*rentries(){for(let e of this.#R())this.#r[e]!==void 0&&this.#a[e]!==void 0&&!this.#u(this.#r[e])&&(yield[this.#a[e],this.#r[e]])}*keys(){for(let e of this.#A()){let t=this.#a[e];t!==void 0&&!this.#u(this.#r[e])&&(yield t)}}*rkeys(){for(let e of this.#R()){let t=this.#a[e];t!==void 0&&!this.#u(this.#r[e])&&(yield t)}}*values(){for(let e of this.#A())this.#r[e]!==void 0&&!this.#u(this.#r[e])&&(yield this.#r[e])}*rvalues(){for(let e of this.#R())this.#r[e]!==void 0&&!this.#u(this.#r[e])&&(yield this.#r[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#A()){let s=this.#r[i],r=this.#u(s)?s.__staleWhileFetching:s;if(r!==void 0&&e(r,this.#a[i],this))return this.get(this.#a[i],t)}}forEach(e,t=this){for(let i of this.#A()){let s=this.#r[i],r=this.#u(s)?s.__staleWhileFetching:s;r!==void 0&&e.call(t,r,this.#a[i],this)}}rforEach(e,t=this){for(let i of this.#R()){let s=this.#r[i],r=this.#u(s)?s.__staleWhileFetching:s;r!==void 0&&e.call(t,r,this.#a[i],this)}}purgeStale(){let e=!1;for(let t of this.#R({allowStale:!0}))this.#y(t)&&(this.#T(this.#a[t],"expire"),e=!0);return e}info(e){let t=this.#l.get(e);if(t===void 0)return;let i=this.#r[t],s=this.#u(i)?i.__staleWhileFetching:i;if(s===void 0)return;let r={value:s};if(this.#b&&this.#_){let o=this.#b[t],a=this.#_[t];if(o&&a){let l=o-(Ie.now()-a);r.ttl=l,r.start=Date.now()}}return this.#E&&(r.size=this.#E[t]),r}dump(){let e=[];for(let t of this.#A({allowStale:!0})){let i=this.#a[t],s=this.#r[t],r=this.#u(s)?s.__staleWhileFetching:s;if(r===void 0||i===void 0)continue;let o={value:r};if(this.#b&&this.#_){o.ttl=this.#b[t];let a=Ie.now()-this.#_[t];o.start=Math.floor(Date.now()-a)}this.#E&&(o.size=this.#E[t]),e.unshift([i,o])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let s=Date.now()-i.start;i.start=Ie.now()-s}this.set(t,i.value,i)}}set(e,t,i={}){if(t===void 0)return this.delete(e),this;let{ttl:s=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:l}=i,{noUpdateTTL:h=this.noUpdateTTL}=i,u=this.#D(e,t,i.size||0,a);if(this.maxEntrySize&&u>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.#T(e,"set"),this;let f=this.#h===0?void 0:this.#l.get(e);if(f===void 0)f=this.#h===0?this.#f:this.#C.length!==0?this.#C.pop():this.#h===this.#e?this.#I(!1):this.#h,this.#a[f]=e,this.#r[f]=t,this.#l.set(e,f),this.#g[this.#f]=f,this.#w[f]=this.#f,this.#f=f,this.#h++,this.#P(f,u,l),l&&(l.set="add"),h=!1;else{this.#$(f);let c=this.#r[f];if(t!==c){if(this.#x&&this.#u(c)){c.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:p}=c;p!==void 0&&!o&&(this.#v&&this.#n?.(p,e,"set"),this.#d&&this.#m?.push([p,e,"set"]))}else o||(this.#v&&this.#n?.(c,e,"set"),this.#d&&this.#m?.push([c,e,"set"]));if(this.#N(f),this.#P(f,u,l),this.#r[f]=t,l){l.set="replace";let p=c&&this.#u(c)?c.__staleWhileFetching:c;p!==void 0&&(l.oldValue=p)}}else l&&(l.set="update")}if(s!==0&&!this.#b&&this.#M(),this.#b&&(h||this.#k(f,s,r),l&&this.#i(l,f)),!o&&this.#d&&this.#m){let c=this.#m,p;for(;p=c?.shift();)this.#s?.(...p)}return this}pop(){try{for(;this.#h;){let e=this.#r[this.#p];if(this.#I(!0),this.#u(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#d&&this.#m){let e=this.#m,t;for(;t=e?.shift();)this.#s?.(...t)}}}#I(e){let t=this.#p,i=this.#a[t],s=this.#r[t];return this.#x&&this.#u(s)?s.__abortController.abort(new Error("evicted")):(this.#v||this.#d)&&(this.#v&&this.#n?.(s,i,"evict"),this.#d&&this.#m?.push([s,i,"evict"])),this.#N(t),e&&(this.#a[t]=void 0,this.#r[t]=void 0,this.#C.push(t)),this.#h===1?(this.#p=this.#f=0,this.#C.length=0):this.#p=this.#g[t],this.#l.delete(i),this.#h--,t}has(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=t,r=this.#l.get(e);if(r!==void 0){let o=this.#r[r];if(this.#u(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#y(r))s&&(s.has="stale",this.#i(s,r));else return i&&this.#O(r),s&&(s.has="hit",this.#i(s,r)),!0}else s&&(s.has="miss");return!1}peek(e,t={}){let{allowStale:i=this.allowStale}=t,s=this.#l.get(e);if(s===void 0||!i&&this.#y(s))return;let r=this.#r[s];return this.#u(r)?r.__staleWhileFetching:r}#B(e,t,i,s){let r=t===void 0?void 0:this.#r[t];if(this.#u(r))return r;let o=new Xt,{signal:a}=i;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let l={signal:o.signal,options:i,context:s},h=(d,m=!1)=>{let{aborted:w}=o.signal,b=i.ignoreFetchAbort&&d!==void 0;if(i.status&&(w&&!m?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,b&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),w&&!b&&!m)return f(o.signal.reason);let x=p;return this.#r[t]===p&&(d===void 0?x.__staleWhileFetching?this.#r[t]=x.__staleWhileFetching:this.#T(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(e,d,l.options))),d},u=d=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=d),f(d)),f=d=>{let{aborted:m}=o.signal,w=m&&i.allowStaleOnFetchAbort,b=w||i.allowStaleOnFetchRejection,x=b||i.noDeleteOnFetchRejection,S=p;if(this.#r[t]===p&&(!x||S.__staleWhileFetching===void 0?this.#T(e,"fetch"):w||(this.#r[t]=S.__staleWhileFetching)),b)return i.status&&S.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),S.__staleWhileFetching;if(S.__returned===S)throw d},c=(d,m)=>{let w=this.#o?.(e,r,l);w&&w instanceof Promise&&w.then(b=>d(b===void 0?void 0:b),m),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(d(void 0),i.allowStaleOnFetchAbort&&(d=b=>h(b,!0)))})};i.status&&(i.status.fetchDispatched=!0);let p=new Promise(c).then(h,u),g=Object.assign(p,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return t===void 0?(this.set(e,g,{...l.options,status:void 0}),t=this.#l.get(e)):this.#r[t]=g,g}#u(e){if(!this.#x)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof Xt}async fetch(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:c=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:d,forceRefresh:m=!1,status:w,signal:b}=t;if(!this.#x)return w&&(w.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,status:w});let x={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:h,noUpdateTTL:u,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:c,allowStaleOnFetchAbort:g,ignoreFetchAbort:p,status:w,signal:b},S=this.#l.get(e);if(S===void 0){w&&(w.fetch="miss");let C=this.#B(e,S,x,d);return C.__returned=C}else{let C=this.#r[S];if(this.#u(C)){let ye=i&&C.__staleWhileFetching!==void 0;return w&&(w.fetch="inflight",ye&&(w.returnedStale=!0)),ye?C.__staleWhileFetching:C.__returned=C}let O=this.#y(S);if(!m&&!O)return w&&(w.fetch="hit"),this.#$(S),s&&this.#O(S),w&&this.#i(w,S),C;let W=this.#B(e,S,x,d),B=W.__staleWhileFetching!==void 0&&i;return w&&(w.fetch=O?"stale":"refresh",B&&O&&(w.returnedStale=!0)),B?W.__staleWhileFetching:W.__returned=W}}async forceFetch(e,t={}){let i=await this.fetch(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let i=this.#S;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:r,...o}=t,a=this.get(e,o);if(!r&&a!==void 0)return a;let l=i(e,a,{options:o,context:s});return this.set(e,l,o),l}get(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=t,a=this.#l.get(e);if(a!==void 0){let l=this.#r[a],h=this.#u(l);return o&&this.#i(o,a),this.#y(a)?(o&&(o.get="stale"),h?(o&&i&&l.__staleWhileFetching!==void 0&&(o.returnedStale=!0),i?l.__staleWhileFetching:void 0):(r||this.#T(e,"expire"),o&&i&&(o.returnedStale=!0),i?l:void 0)):(o&&(o.get="hit"),h?l.__staleWhileFetching:(this.#$(a),s&&this.#O(a),l))}else o&&(o.get="miss")}#U(e,t){this.#w[t]=e,this.#g[e]=t}#$(e){e!==this.#f&&(e===this.#p?this.#p=this.#g[e]:this.#U(this.#w[e],this.#g[e]),this.#U(this.#f,e),this.#f=e)}delete(e){return this.#T(e,"delete")}#T(e,t){let i=!1;if(this.#h!==0){let s=this.#l.get(e);if(s!==void 0)if(i=!0,this.#h===1)this.#j(t);else{this.#N(s);let r=this.#r[s];if(this.#u(r)?r.__abortController.abort(new Error("deleted")):(this.#v||this.#d)&&(this.#v&&this.#n?.(r,e,t),this.#d&&this.#m?.push([r,e,t])),this.#l.delete(e),this.#a[s]=void 0,this.#r[s]=void 0,s===this.#f)this.#f=this.#w[s];else if(s===this.#p)this.#p=this.#g[s];else{let o=this.#w[s];this.#g[o]=this.#g[s];let a=this.#g[s];this.#w[a]=this.#w[s]}this.#h--,this.#C.push(s)}}if(this.#d&&this.#m?.length){let s=this.#m,r;for(;r=s?.shift();)this.#s?.(...r)}return i}clear(){return this.#j("delete")}#j(e){for(let t of this.#R({allowStale:!0})){let i=this.#r[t];if(this.#u(i))i.__abortController.abort(new Error("deleted"));else{let s=this.#a[t];this.#v&&this.#n?.(i,s,e),this.#d&&this.#m?.push([i,s,e])}}if(this.#l.clear(),this.#r.fill(void 0),this.#a.fill(void 0),this.#b&&this.#_&&(this.#b.fill(0),this.#_.fill(0)),this.#E&&this.#E.fill(0),this.#p=0,this.#f=0,this.#C.length=0,this.#c=0,this.#h=0,this.#d&&this.#m){let t=this.#m,i;for(;i=t?.shift();)this.#s?.(...i)}}};import{posix as Eh,win32 as ms}from"node:path";import{fileURLToPath as _h}from"node:url";import{lstatSync as Oh,readdir as Ah,readdirSync as Rh,readlinkSync as Mh,realpathSync as Lh}from"fs";import*as Th from"node:fs";import{lstat as Nh,readdir as Ph,readlink as Dh,realpath as Fh}from"node:fs/promises";import{EventEmitter as fs}from"node:events";import eo from"node:stream";import{StringDecoder as dh}from"node:string_decoder";var Kn=typeof process=="object"&&process?process:{stdout:null,stderr:null},mh=n=>!!n&&typeof n=="object"&&(n instanceof we||n instanceof eo||gh(n)||wh(n)),gh=n=>!!n&&typeof n=="object"&&n instanceof fs&&typeof n.pipe=="function"&&n.pipe!==eo.Writable.prototype.pipe,wh=n=>!!n&&typeof n=="object"&&n instanceof fs&&typeof n.write=="function"&&typeof n.end=="function",ue=Symbol("EOF"),ce=Symbol("maybeEmitEnd"),ge=Symbol("emittedEnd"),Zt=Symbol("emittingEnd"),wt=Symbol("emittedError"),ei=Symbol("closed"),Yn=Symbol("read"),ti=Symbol("flush"),Xn=Symbol("flushChunk"),ee=Symbol("encoding"),Ue=Symbol("decoder"),T=Symbol("flowing"),yt=Symbol("paused"),$e=Symbol("resume"),k=Symbol("buffer"),j=Symbol("pipes"),N=Symbol("bufferLength"),os=Symbol("bufferPush"),ii=Symbol("bufferShift"),F=Symbol("objectMode"),M=Symbol("destroyed"),ls=Symbol("error"),as=Symbol("emitData"),Zn=Symbol("emitEnd"),hs=Symbol("emitEnd2"),re=Symbol("async"),us=Symbol("abort"),si=Symbol("aborted"),bt=Symbol("signal"),Ce=Symbol("dataListeners"),V=Symbol("discarded"),St=n=>Promise.resolve().then(n),yh=n=>n(),bh=n=>n==="end"||n==="finish"||n==="prefinish",Sh=n=>n instanceof ArrayBuffer||!!n&&typeof n=="object"&&n.constructor&&n.constructor.name==="ArrayBuffer"&&n.byteLength>=0,vh=n=>!Buffer.isBuffer(n)&&ArrayBuffer.isView(n),ri=class{src;dest;opts;ondrain;constructor(e,t,i){this.src=e,this.dest=t,this.opts=i,this.ondrain=()=>e[$e](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},cs=class extends ri{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,i){super(e,t,i),this.proxyErrors=s=>t.emit("error",s),e.on("error",this.proxyErrors)}},xh=n=>!!n.objectMode,Ch=n=>!n.objectMode&&!!n.encoding&&n.encoding!=="buffer",we=class extends fs{[T]=!1;[yt]=!1;[j]=[];[k]=[];[F];[ee];[re];[Ue];[ue]=!1;[ge]=!1;[Zt]=!1;[ei]=!1;[wt]=null;[N]=0;[M]=!1;[bt];[si]=!1;[Ce]=0;[V]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");xh(t)?(this[F]=!0,this[ee]=null):Ch(t)?(this[ee]=t.encoding,this[F]=!1):(this[F]=!1,this[ee]=null),this[re]=!!t.async,this[Ue]=this[ee]?new dh(this[ee]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[k]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[j]});let{signal:i}=t;i&&(this[bt]=i,i.aborted?this[us]():i.addEventListener("abort",()=>this[us]()))}get bufferLength(){return this[N]}get encoding(){return this[ee]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[F]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[re]}set async(e){this[re]=this[re]||!!e}[us](){this[si]=!0,this.emit("abort",this[bt]?.reason),this.destroy(this[bt]?.reason)}get aborted(){return this[si]}set aborted(e){}write(e,t,i){if(this[si])return!1;if(this[ue])throw new Error("write after end");if(this[M])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(i=t,t="utf8"),t||(t="utf8");let s=this[re]?St:yh;if(!this[F]&&!Buffer.isBuffer(e)){if(vh(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(Sh(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[F]?(this[T]&&this[N]!==0&&this[ti](!0),this[T]?this.emit("data",e):this[os](e),this[N]!==0&&this.emit("readable"),i&&s(i),this[T]):e.length?(typeof e=="string"&&!(t===this[ee]&&!this[Ue]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[ee]&&(e=this[Ue].write(e)),this[T]&&this[N]!==0&&this[ti](!0),this[T]?this.emit("data",e):this[os](e),this[N]!==0&&this.emit("readable"),i&&s(i),this[T]):(this[N]!==0&&this.emit("readable"),i&&s(i),this[T])}read(e){if(this[M])return null;if(this[V]=!1,this[N]===0||e===0||e&&e>this[N])return this[ce](),null;this[F]&&(e=null),this[k].length>1&&!this[F]&&(this[k]=[this[ee]?this[k].join(""):Buffer.concat(this[k],this[N])]);let t=this[Yn](e||null,this[k][0]);return this[ce](),t}[Yn](e,t){if(this[F])this[ii]();else{let i=t;e===i.length||e===null?this[ii]():typeof i=="string"?(this[k][0]=i.slice(e),t=i.slice(0,e),this[N]-=e):(this[k][0]=i.subarray(e),t=i.subarray(0,e),this[N]-=e)}return this.emit("data",t),!this[k].length&&!this[ue]&&this.emit("drain"),t}end(e,t,i){return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t="utf8"),e!==void 0&&this.write(e,t),i&&this.once("end",i),this[ue]=!0,this.writable=!1,(this[T]||!this[yt])&&this[ce](),this}[$e](){this[M]||(!this[Ce]&&!this[j].length&&(this[V]=!0),this[yt]=!1,this[T]=!0,this.emit("resume"),this[k].length?this[ti]():this[ue]?this[ce]():this.emit("drain"))}resume(){return this[$e]()}pause(){this[T]=!1,this[yt]=!0,this[V]=!1}get destroyed(){return this[M]}get flowing(){return this[T]}get paused(){return this[yt]}[os](e){this[F]?this[N]+=1:this[N]+=e.length,this[k].push(e)}[ii](){return this[F]?this[N]-=1:this[N]-=this[k][0].length,this[k].shift()}[ti](e=!1){do;while(this[Xn](this[ii]())&&this[k].length);!e&&!this[k].length&&!this[ue]&&this.emit("drain")}[Xn](e){return this.emit("data",e),this[T]}pipe(e,t){if(this[M])return e;this[V]=!1;let i=this[ge];return t=t||{},e===Kn.stdout||e===Kn.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,i?t.end&&e.end():(this[j].push(t.proxyErrors?new cs(this,e,t):new ri(this,e,t)),this[re]?St(()=>this[$e]()):this[$e]()),e}unpipe(e){let t=this[j].find(i=>i.dest===e);t&&(this[j].length===1?(this[T]&&this[Ce]===0&&(this[T]=!1),this[j]=[]):this[j].splice(this[j].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let i=super.on(e,t);if(e==="data")this[V]=!1,this[Ce]++,!this[j].length&&!this[T]&&this[$e]();else if(e==="readable"&&this[N]!==0)super.emit("readable");else if(bh(e)&&this[ge])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[wt]){let s=t;this[re]?St(()=>s.call(this,this[wt])):s.call(this,this[wt])}return i}removeListener(e,t){return this.off(e,t)}off(e,t){let i=super.off(e,t);return e==="data"&&(this[Ce]=this.listeners("data").length,this[Ce]===0&&!this[V]&&!this[j].length&&(this[T]=!1)),i}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Ce]=0,!this[V]&&!this[j].length&&(this[T]=!1)),t}get emittedEnd(){return this[ge]}[ce](){!this[Zt]&&!this[ge]&&!this[M]&&this[k].length===0&&this[ue]&&(this[Zt]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[ei]&&this.emit("close"),this[Zt]=!1)}emit(e,...t){let i=t[0];if(e!=="error"&&e!=="close"&&e!==M&&this[M])return!1;if(e==="data")return!this[F]&&!i?!1:this[re]?(St(()=>this[as](i)),!0):this[as](i);if(e==="end")return this[Zn]();if(e==="close"){if(this[ei]=!0,!this[ge]&&!this[M])return!1;let r=super.emit("close");return this.removeAllListeners("close"),r}else if(e==="error"){this[wt]=i,super.emit(ls,i);let r=!this[bt]||this.listeners("error").length?super.emit("error",i):!1;return this[ce](),r}else if(e==="resume"){let r=super.emit("resume");return this[ce](),r}else if(e==="finish"||e==="prefinish"){let r=super.emit(e);return this.removeAllListeners(e),r}let s=super.emit(e,...t);return this[ce](),s}[as](e){for(let i of this[j])i.dest.write(e)===!1&&this.pause();let t=this[V]?!1:super.emit("data",e);return this[ce](),t}[Zn](){return this[ge]?!1:(this[ge]=!0,this.readable=!1,this[re]?(St(()=>this[hs]()),!0):this[hs]())}[hs](){if(this[Ue]){let t=this[Ue].end();if(t){for(let i of this[j])i.dest.write(t);this[V]||super.emit("data",t)}}for(let t of this[j])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[F]||(e.dataLength=0);let t=this.promise();return this.on("data",i=>{e.push(i),this[F]||(e.dataLength+=i.length)}),await t,e}async concat(){if(this[F])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[ee]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(M,()=>t(new Error("stream destroyed"))),this.on("error",i=>t(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[V]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let s=this.read();if(s!==null)return Promise.resolve({done:!1,value:s});if(this[ue])return t();let r,o,a=f=>{this.off("data",l),this.off("end",h),this.off(M,u),t(),o(f)},l=f=>{this.off("error",a),this.off("end",h),this.off(M,u),this.pause(),r({value:f,done:!!this[ue]})},h=()=>{this.off("error",a),this.off("data",l),this.off(M,u),t(),r({done:!0,value:void 0})},u=()=>a(new Error("stream destroyed"));return new Promise((f,c)=>{o=c,r=f,this.once(M,u),this.once("error",a),this.once("end",h),this.once("data",l)})},throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[V]=!1;let e=!1,t=()=>(this.pause(),this.off(ls,t),this.off(M,t),this.off("end",t),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return t();let s=this.read();return s===null?t():{done:!1,value:s}};return this.once("end",t),this.once(ls,t),this.once(M,t),{next:i,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[M])return e?this.emit("error",e):this.emit(M),this;this[M]=!0,this[V]=!0,this[k].length=0,this[N]=0;let t=this;return typeof t.close=="function"&&!this[ei]&&t.close(),e?this.emit("error",e):this.emit(M),this}static get isStream(){return mh}};var kh=Lh.native,xt={lstatSync:Oh,readdir:Ah,readdirSync:Rh,readlinkSync:Mh,realpathSync:kh,promises:{lstat:Nh,readdir:Ph,readlink:Dh,realpath:Fh}},no=n=>!n||n===xt||n===Th?xt:{...xt,...n,promises:{...xt.promises,...n.promises||{}}},oo=/^\\\\\?\\([a-z]:)\\?$/i,Ih=n=>n.replace(/\//g,"\\").replace(oo,"$1\\"),Bh=/[\\\/]/,K=0,lo=1,ao=2,ne=4,ho=6,uo=8,Ee=10,co=12,J=15,vt=~J,ps=16,to=32,Ct=64,te=128,ni=256,li=512,io=Ct|te|li,Uh=1023,ds=n=>n.isFile()?uo:n.isDirectory()?ne:n.isSymbolicLink()?Ee:n.isCharacterDevice()?ao:n.isBlockDevice()?ho:n.isSocket()?co:n.isFIFO()?lo:K,so=new Map,Et=n=>{let e=so.get(n);if(e)return e;let t=n.normalize("NFKD");return so.set(n,t),t},ro=new Map,oi=n=>{let e=ro.get(n);if(e)return e;let t=Et(n.toLowerCase());return ro.set(n,t),t},ai=class extends gt{constructor(){super({max:256})}},gs=class extends gt{constructor(e=16*1024){super({maxSize:e,sizeCalculation:t=>t.length+1})}},fo=Symbol("PathScurry setAsCwd"),I=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#n;get mode(){return this.#n}#s;get nlink(){return this.#s}#o;get uid(){return this.#o}#S;get gid(){return this.#S}#h;get rdev(){return this.#h}#c;get blksize(){return this.#c}#l;get ino(){return this.#l}#a;get size(){return this.#a}#r;get blocks(){return this.#r}#g;get atimeMs(){return this.#g}#w;get mtimeMs(){return this.#w}#p;get ctimeMs(){return this.#p}#f;get birthtimeMs(){return this.#f}#C;get atime(){return this.#C}#m;get mtime(){return this.#m}#E;get ctime(){return this.#E}#_;get birthtime(){return this.#_}#b;#v;#x;#d;#M;#O;#i;#k;#y;#L;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=K,i,s,r,o,a){this.name=e,this.#b=r?oi(e):Et(e),this.#i=t&Uh,this.nocase=r,this.roots=s,this.root=i||this,this.#k=o,this.#x=a.fullpath,this.#M=a.relative,this.#O=a.relativePosix,this.parent=a.parent,this.parent?this.#e=this.parent.#e:this.#e=no(a.fs)}depth(){return this.#v!==void 0?this.#v:this.parent?this.#v=this.parent.depth()+1:this.#v=0}childrenCache(){return this.#k}resolve(e){if(!e)return this;let t=this.getRootString(e),s=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#N(s):this.#N(s)}#N(e){let t=this;for(let i of e)t=t.child(i);return t}children(){let e=this.#k.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#k.set(this,t),this.#i&=~ps,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),s=this.nocase?oi(e):Et(e);for(let l of i)if(l.#b===s)return l;let r=this.parent?this.sep:"",o=this.#x?this.#x+r+e:void 0,a=this.newChild(e,K,{...t,parent:this,fullpath:o});return this.canReaddir()||(a.#i|=te),i.push(a),a}relative(){if(this.isCWD)return"";if(this.#M!==void 0)return this.#M;let e=this.name,t=this.parent;if(!t)return this.#M=this.name;let i=t.relative();return i+(!i||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#O!==void 0)return this.#O;let e=this.name,t=this.parent;if(!t)return this.#O=this.fullpathPosix();let i=t.relativePosix();return i+(!i||!t.parent?"":"/")+e}fullpath(){if(this.#x!==void 0)return this.#x;let e=this.name,t=this.parent;if(!t)return this.#x=this.name;let s=t.fullpath()+(t.parent?this.sep:"")+e;return this.#x=s}fullpathPosix(){if(this.#d!==void 0)return this.#d;if(this.sep==="/")return this.#d=this.fullpath();if(!this.parent){let s=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(s)?this.#d=`//?/${s}`:this.#d=s}let e=this.parent,t=e.fullpathPosix(),i=t+(!t||!e.parent?"":"/")+this.name;return this.#d=i}isUnknown(){return(this.#i&J)===K}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#i&J)===uo}isDirectory(){return(this.#i&J)===ne}isCharacterDevice(){return(this.#i&J)===ao}isBlockDevice(){return(this.#i&J)===ho}isFIFO(){return(this.#i&J)===lo}isSocket(){return(this.#i&J)===co}isSymbolicLink(){return(this.#i&Ee)===Ee}lstatCached(){return this.#i&to?this:void 0}readlinkCached(){return this.#y}realpathCached(){return this.#L}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#y)return!0;if(!this.parent)return!1;let e=this.#i&J;return!(e!==K&&e!==Ee||this.#i&ni||this.#i&te)}calledReaddir(){return!!(this.#i&ps)}isENOENT(){return!!(this.#i&te)}isNamed(e){return this.nocase?this.#b===oi(e):this.#b===Et(e)}async readlink(){let e=this.#y;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=await this.#e.promises.readlink(this.fullpath()),i=(await this.parent.realpath())?.resolve(t);if(i)return this.#y=i}catch(t){this.#u(t.code);return}}readlinkSync(){let e=this.#y;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=this.#e.readlinkSync(this.fullpath()),i=this.parent.realpathSync()?.resolve(t);if(i)return this.#y=i}catch(t){this.#u(t.code);return}}#P(e){this.#i|=ps;for(let t=e.provisional;t<e.length;t++){let i=e[t];i&&i.#D()}}#D(){this.#i&te||(this.#i=(this.#i|te)&vt,this.#A())}#A(){let e=this.children();e.provisional=0;for(let t of e)t.#D()}#R(){this.#i|=li,this.#F()}#F(){if(this.#i&Ct)return;let e=this.#i;(e&J)===ne&&(e&=vt),this.#i=e|Ct,this.#A()}#I(e=""){e==="ENOTDIR"||e==="EPERM"?this.#F():e==="ENOENT"?this.#D():this.children().provisional=0}#B(e=""){e==="ENOTDIR"?this.parent.#F():e==="ENOENT"&&this.#D()}#u(e=""){let t=this.#i;t|=ni,e==="ENOENT"&&(t|=te),(e==="EINVAL"||e==="UNKNOWN")&&(t&=vt),this.#i=t,e==="ENOTDIR"&&this.parent&&this.parent.#F()}#U(e,t){return this.#T(e,t)||this.#$(e,t)}#$(e,t){let i=ds(e),s=this.newChild(e.name,i,{parent:this}),r=s.#i&J;return r!==ne&&r!==Ee&&r!==K&&(s.#i|=Ct),t.unshift(s),t.provisional++,s}#T(e,t){for(let i=t.provisional;i<t.length;i++){let s=t[i];if((this.nocase?oi(e.name):Et(e.name))===s.#b)return this.#j(e,s,i,t)}}#j(e,t,i,s){let r=t.name;return t.#i=t.#i&vt|ds(e),r!==e.name&&(t.name=e.name),i!==s.provisional&&(i===s.length-1?s.pop():s.splice(i,1),s.unshift(t)),s.provisional++,t}async lstat(){if((this.#i&te)===0)try{return this.#G(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#B(e.code)}}lstatSync(){if((this.#i&te)===0)try{return this.#G(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#B(e.code)}}#G(e){let{atime:t,atimeMs:i,birthtime:s,birthtimeMs:r,blksize:o,blocks:a,ctime:l,ctimeMs:h,dev:u,gid:f,ino:c,mode:p,mtime:g,mtimeMs:d,nlink:m,rdev:w,size:b,uid:x}=e;this.#C=t,this.#g=i,this.#_=s,this.#f=r,this.#c=o,this.#r=a,this.#E=l,this.#p=h,this.#t=u,this.#S=f,this.#l=c,this.#n=p,this.#m=g,this.#w=d,this.#s=m,this.#h=w,this.#a=b,this.#o=x;let S=ds(e);this.#i=this.#i&vt|S|to,S!==K&&S!==ne&&S!==Ee&&(this.#i|=Ct)}#W=[];#q=!1;#V(e){this.#q=!1;let t=this.#W.slice();this.#W.length=0,t.forEach(i=>i(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let i=this.children();if(this.calledReaddir()){let r=i.slice(0,i.provisional);t?e(null,r):queueMicrotask(()=>e(null,r));return}if(this.#W.push(e),this.#q)return;this.#q=!0;let s=this.fullpath();this.#e.readdir(s,{withFileTypes:!0},(r,o)=>{if(r)this.#I(r.code),i.provisional=0;else{for(let a of o)this.#U(a,i);this.#P(i)}this.#V(i.slice(0,i.provisional))})}#z;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#z)await this.#z;else{let i=()=>{};this.#z=new Promise(s=>i=s);try{for(let s of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#U(s,e);this.#P(e)}catch(s){this.#I(s.code),e.provisional=0}this.#z=void 0,i()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let i of this.#e.readdirSync(t,{withFileTypes:!0}))this.#U(i,e);this.#P(e)}catch(i){this.#I(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#i&io)return!1;let e=J&this.#i;return e===K||e===ne||e===Ee}shouldWalk(e,t){return(this.#i&ne)===ne&&!(this.#i&io)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#L)return this.#L;if(!((li|ni|te)&this.#i))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#L=this.resolve(e)}catch{this.#R()}}realpathSync(){if(this.#L)return this.#L;if(!((li|ni|te)&this.#i))try{let e=this.#e.realpathSync(this.fullpath());return this.#L=this.resolve(e)}catch{this.#R()}}[fo](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),i=[],s=this;for(;s&&s.parent;)t.add(s),s.#M=i.join(this.sep),s.#O=i.join("/"),s=s.parent,i.push("..");for(s=e;s&&s.parent&&!t.has(s);)s.#M=void 0,s.#O=void 0,s=s.parent}},hi=class n extends I{sep="\\";splitSep=Bh;constructor(e,t=K,i,s,r,o,a){super(e,t,i,s,r,o,a)}newChild(e,t=K,i={}){return new n(e,t,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return ms.parse(e).root}getRoot(e){if(e=Ih(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,i]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=i;return this.roots[e]=new je(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(oo,"$1\\"),e===t}},ui=class n extends I{splitSep="/";sep="/";constructor(e,t=K,i,s,r,o,a){super(e,t,i,s,r,o,a)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=K,i={}){return new n(e,t,this.root,this.roots,this.nocase,this.childrenCache(),i)}},ci=class{root;rootPath;roots;cwd;#e;#t;#n;nocase;#s;constructor(e=process.cwd(),t,i,{nocase:s,childrenCacheSize:r=16*1024,fs:o=xt}={}){this.#s=no(o),(e instanceof URL||e.startsWith("file://"))&&(e=_h(e));let a=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(a),this.#e=new ai,this.#t=new ai,this.#n=new gs(r);let l=a.substring(this.rootPath.length).split(i);if(l.length===1&&!l[0]&&l.pop(),s===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=s,this.root=this.newRoot(this.#s),this.roots[this.rootPath]=this.root;let h=this.root,u=l.length-1,f=t.sep,c=this.rootPath,p=!1;for(let g of l){let d=u--;h=h.child(g,{relative:new Array(d).fill("..").join(f),relativePosix:new Array(d).fill("..").join("/"),fullpath:c+=(p?"":f)+g}),p=!0}this.cwd=h}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#n}resolve(...e){let t="";for(let r=e.length-1;r>=0;r--){let o=e[r];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let i=this.#e.get(t);if(i!==void 0)return i;let s=this.cwd.resolve(t).fullpath();return this.#e.set(t,s),s}resolvePosix(...e){let t="";for(let r=e.length-1;r>=0;r--){let o=e[r];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let i=this.#t.get(t);if(i!==void 0)return i;let s=this.cwd.resolve(t).fullpathPosix();return this.#t.set(t,s),s}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof I||(t=e,e=this.cwd);let{withFileTypes:i}=t;if(e.canReaddir()){let s=await e.readdir();return i?s:s.map(r=>r.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof I||(t=e,e=this.cwd);let{withFileTypes:i=!0}=t;return e.canReaddir()?i?e.readdirSync():e.readdirSync().map(s=>s.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof I||(t=e.withFileTypes,e=this.cwd);let i=await e.readlink();return t?i:i?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof I||(t=e.withFileTypes,e=this.cwd);let i=e.readlinkSync();return t?i:i?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof I||(t=e.withFileTypes,e=this.cwd);let i=await e.realpath();return t?i:i?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof I||(t=e.withFileTypes,e=this.cwd);let i=e.realpathSync();return t?i:i?.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof I||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:r,walkFilter:o}=t,a=[];(!r||r(e))&&a.push(i?e:e.fullpath());let l=new Set,h=(f,c)=>{l.add(f),f.readdirCB((p,g)=>{if(p)return c(p);let d=g.length;if(!d)return c();let m=()=>{--d===0&&c()};for(let w of g)(!r||r(w))&&a.push(i?w:w.fullpath()),s&&w.isSymbolicLink()?w.realpath().then(b=>b?.isUnknown()?b.lstat():b).then(b=>b?.shouldWalk(l,o)?h(b,m):m()):w.shouldWalk(l,o)?h(w,m):m()},!0)},u=e;return new Promise((f,c)=>{h(u,p=>{if(p)return c(p);f(a)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof I||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:r,walkFilter:o}=t,a=[];(!r||r(e))&&a.push(i?e:e.fullpath());let l=new Set([e]);for(let h of l){let u=h.readdirSync();for(let f of u){(!r||r(f))&&a.push(i?f:f.fullpath());let c=f;if(f.isSymbolicLink()){if(!(s&&(c=f.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(l,o)&&l.add(c)}}return a}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof I||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof I||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:r,walkFilter:o}=t;(!r||r(e))&&(yield i?e:e.fullpath());let a=new Set([e]);for(let l of a){let h=l.readdirSync();for(let u of h){(!r||r(u))&&(yield i?u:u.fullpath());let f=u;if(u.isSymbolicLink()){if(!(s&&(f=u.realpathSync())))continue;f.isUnknown()&&f.lstatSync()}f.shouldWalk(a,o)&&a.add(f)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof I||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:r,walkFilter:o}=t,a=new we({objectMode:!0});(!r||r(e))&&a.write(i?e:e.fullpath());let l=new Set,h=[e],u=0,f=()=>{let c=!1;for(;!c;){let p=h.shift();if(!p){u===0&&a.end();return}u++,l.add(p);let g=(m,w,b=!1)=>{if(m)return a.emit("error",m);if(s&&!b){let x=[];for(let S of w)S.isSymbolicLink()&&x.push(S.realpath().then(C=>C?.isUnknown()?C.lstat():C));if(x.length){Promise.all(x).then(()=>g(null,w,!0));return}}for(let x of w)x&&(!r||r(x))&&(a.write(i?x:x.fullpath())||(c=!0));u--;for(let x of w){let S=x.realpathCached()||x;S.shouldWalk(l,o)&&h.push(S)}c&&!a.flowing?a.once("drain",f):d||f()},d=!0;p.readdirCB(g,!0),d=!1}};return f(),a}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof I||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:r,walkFilter:o}=t,a=new we({objectMode:!0}),l=new Set;(!r||r(e))&&a.write(i?e:e.fullpath());let h=[e],u=0,f=()=>{let c=!1;for(;!c;){let p=h.shift();if(!p){u===0&&a.end();return}u++,l.add(p);let g=p.readdirSync();for(let d of g)(!r||r(d))&&(a.write(i?d:d.fullpath())||(c=!0));u--;for(let d of g){let m=d;if(d.isSymbolicLink()){if(!(s&&(m=d.realpathSync())))continue;m.isUnknown()&&m.lstatSync()}m.shouldWalk(l,o)&&h.push(m)}}c&&!a.flowing&&a.once("drain",f)};return f(),a}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[fo](t)}},je=class extends ci{sep="\\";constructor(e=process.cwd(),t={}){let{nocase:i=!0}=t;super(e,ms,"\\",{...t,nocase:i}),this.nocase=i;for(let s=this.cwd;s;s=s.parent)s.nocase=this.nocase}parseRootPath(e){return ms.parse(e).root.toUpperCase()}newRoot(e){return new hi(this.rootPath,ne,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},ze=class extends ci{sep="/";constructor(e=process.cwd(),t={}){let{nocase:i=!1}=t;super(e,Eh,"/",{...t,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new ui(this.rootPath,ne,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},_t=class extends ze{constructor(e=process.cwd(),t={}){let{nocase:i=!0}=t;super(e,{...t,nocase:i})}},Yc=process.platform==="win32"?hi:ui,po=process.platform==="win32"?je:process.platform==="darwin"?_t:ze;var $h=n=>n.length>=1,jh=n=>n.length>=1,We=class n{#e;#t;#n;length;#s;#o;#S;#h;#c;#l;#a=!0;constructor(e,t,i,s){if(!$h(e))throw new TypeError("empty pattern list");if(!jh(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,i<0||i>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#t=t,this.#n=i,this.#s=s,this.#n===0){if(this.isUNC()){let[r,o,a,l,...h]=this.#e,[u,f,c,p,...g]=this.#t;h[0]===""&&(h.shift(),g.shift());let d=[r,o,a,l,""].join("/"),m=[u,f,c,p,""].join("/");this.#e=[d,...h],this.#t=[m,...g],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[r,...o]=this.#e,[a,...l]=this.#t;o[0]===""&&(o.shift(),l.shift());let h=r+"/",u=a+"/";this.#e=[h,...o],this.#t=[u,...l],this.length=this.#e.length}}}pattern(){return this.#e[this.#n]}isString(){return typeof this.#e[this.#n]=="string"}isGlobstar(){return this.#e[this.#n]===D}isRegExp(){return this.#e[this.#n]instanceof RegExp}globString(){return this.#S=this.#S||(this.#n===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new n(this.#e,this.#t,this.#n+1,this.#s),this.#o.#l=this.#l,this.#o.#c=this.#c,this.#o.#h=this.#h,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#c!==void 0?this.#c:this.#c=this.#s==="win32"&&this.#n===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#h!==void 0?this.#h:this.#h=this.#s==="win32"&&this.#n===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#l!==void 0?this.#l:this.#l=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#n===0?e:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#a)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#a?!1:(this.#a=!1,!0)}};var zh=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",qe=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:i,noext:s,noglobstar:r,platform:o=zh}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:i,noext:s,noglobstar:r,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let a of e)this.add(a)}add(e){let t=new G(e,this.mmopts);for(let i=0;i<t.set.length;i++){let s=t.set[i],r=t.globParts[i];if(!s||!r)throw new Error("invalid pattern object");for(;s[0]==="."&&r[0]===".";)s.shift(),r.shift();let o=new We(s,r,0,this.platform),a=new G(o.globString(),this.mmopts),l=r[r.length-1]==="**",h=o.isAbsolute();h?this.absolute.push(a):this.relative.push(a),l&&(h?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}ignored(e){let t=e.fullpath(),i=`${t}/`,s=e.relative()||".",r=`${s}/`;for(let o of this.relative)if(o.match(s)||o.match(r))return!0;for(let o of this.absolute)if(o.match(t)||o.match(i))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",i=(e.relative()||".")+"/";for(let s of this.relativeChildren)if(s.match(i))return!0;for(let s of this.absoluteChildren)if(s.match(t))return!0;return!1}};var ws=class n{store;constructor(e=new Map){this.store=e}copy(){return new n(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let i=e.fullpath(),s=this.store.get(i);s?s.add(t.globString()):this.store.set(i,new Set([t.globString()]))}},ys=class{store=new Map;add(e,t,i){let s=(t?2:0)|(i?1:0),r=this.store.get(e);this.store.set(e,r===void 0?s:s&r)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}},bs=class{store=new Map;add(e,t){if(!e.canReaddir())return;let i=this.store.get(e);i?i.find(s=>s.globString()===t.globString())||i.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},Ot=class n{hasWalkedCache;matches=new ys;subwalks=new bs;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new ws}processPatterns(e,t){this.patterns=t;let i=t.map(s=>[e,s]);for(let[s,r]of i){this.hasWalkedCache.storeWalked(s,r);let o=r.root(),a=r.isAbsolute()&&this.opts.absolute!==!1;if(o){s=s.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let f=r.rest();if(f)r=f;else{this.matches.add(s,!0,!1);continue}}if(s.isENOENT())continue;let l,h,u=!1;for(;typeof(l=r.pattern())=="string"&&(h=r.rest());)s=s.resolve(l),r=h,u=!0;if(l=r.pattern(),h=r.rest(),u){if(this.hasWalkedCache.hasWalked(s,r))continue;this.hasWalkedCache.storeWalked(s,r)}if(typeof l=="string"){let f=l===".."||l===""||l===".";this.matches.add(s.resolve(l),a,f);continue}else if(l===D){(!s.isSymbolicLink()||this.follow||r.checkFollowGlobstar())&&this.subwalks.add(s,r);let f=h?.pattern(),c=h?.rest();if(!h||(f===""||f===".")&&!c)this.matches.add(s,a,f===""||f===".");else if(f===".."){let p=s.parent||s;c?this.hasWalkedCache.hasWalked(p,c)||this.subwalks.add(p,c):this.matches.add(p,a,!0)}}else l instanceof RegExp&&this.subwalks.add(s,r)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new n(this.opts,this.hasWalkedCache)}filterEntries(e,t){let i=this.subwalks.get(e),s=this.child();for(let r of t)for(let o of i){let a=o.isAbsolute(),l=o.pattern(),h=o.rest();l===D?s.testGlobstar(r,o,h,a):l instanceof RegExp?s.testRegExp(r,l,h,a):s.testString(r,l,h,a)}return s}testGlobstar(e,t,i,s){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,s,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(i&&t.checkFollowGlobstar()?this.subwalks.add(e,i):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),i){let r=i.pattern();if(typeof r=="string"&&r!==".."&&r!==""&&r!==".")this.testString(e,r,i.rest(),s);else if(r===".."){let o=e.parent||e;this.subwalks.add(o,i)}else r instanceof RegExp&&this.testRegExp(e,r,i.rest(),s)}}testRegExp(e,t,i,s){t.test(e.name)&&(i?this.subwalks.add(e,i):this.matches.add(e,s,!1))}testString(e,t,i,s){e.isNamed(t)&&(i?this.subwalks.add(e,i):this.matches.add(e,s,!1))}};var Wh=(n,e)=>typeof n=="string"?new qe([n],e):Array.isArray(n)?new qe(n,e):n,fi=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#n;signal;maxDepth;includeChildMatches;constructor(e,t,i){if(this.patterns=e,this.path=t,this.opts=i,this.#n=!i.posix&&i.platform==="win32"?"\\":"/",this.includeChildMatches=i.includeChildMatches!==!1,(i.ignore||!this.includeChildMatches)&&(this.#t=Wh(i.ignore??[],i),!this.includeChildMatches&&typeof this.#t.add!="function")){let s="cannot ignore child matches, ignore lacks add() method.";throw new Error(s)}this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#s(e){return this.seen.has(e)||!!this.#t?.ignored?.(e)}#o(e){return!!this.#t?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||await e.realpath(),!i)return;e=i}let r=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let o=await r.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(r,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#s(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||e.realpathSync(),!i)return;e=i}let r=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let o=r.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(r,t)}matchFinish(e,t){if(this.#s(e))return;if(!this.includeChildMatches&&this.#t?.add){let r=`${e.relativePosix()}/**`;this.#t.add(r)}let i=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let s=this.opts.mark&&e.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(i){let r=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(r+s)}else{let r=this.opts.posix?e.relativePosix():e.relative(),o=this.opts.dotRelative&&!r.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(r?o+r+s:"."+s)}}async match(e,t,i){let s=await this.matchCheck(e,i);s&&this.matchFinish(s,t)}matchSync(e,t,i){let s=this.matchCheckSync(e,i);s&&this.matchFinish(s,t)}walkCB(e,t,i){this.signal?.aborted&&i(),this.walkCB2(e,t,new Ot(this.opts),i)}walkCB2(e,t,i,s){if(this.#o(e))return s();if(this.signal?.aborted&&s(),this.paused){this.onResume(()=>this.walkCB2(e,t,i,s));return}i.processPatterns(e,t);let r=1,o=()=>{--r===0&&s()};for(let[a,l,h]of i.matches.entries())this.#s(a)||(r++,this.match(a,l,h).then(()=>o()));for(let a of i.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;r++;let l=a.readdirCached();a.calledReaddir()?this.walkCB3(a,l,i,o):a.readdirCB((h,u)=>this.walkCB3(a,u,i,o),!0)}o()}walkCB3(e,t,i,s){i=i.filterEntries(e,t);let r=1,o=()=>{--r===0&&s()};for(let[a,l,h]of i.matches.entries())this.#s(a)||(r++,this.match(a,l,h).then(()=>o()));for(let[a,l]of i.subwalks.entries())r++,this.walkCB2(a,l,i.child(),o);o()}walkCBSync(e,t,i){this.signal?.aborted&&i(),this.walkCB2Sync(e,t,new Ot(this.opts),i)}walkCB2Sync(e,t,i,s){if(this.#o(e))return s();if(this.signal?.aborted&&s(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,i,s));return}i.processPatterns(e,t);let r=1,o=()=>{--r===0&&s()};for(let[a,l,h]of i.matches.entries())this.#s(a)||this.matchSync(a,l,h);for(let a of i.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;r++;let l=a.readdirSync();this.walkCB3Sync(a,l,i,o)}o()}walkCB3Sync(e,t,i,s){i=i.filterEntries(e,t);let r=1,o=()=>{--r===0&&s()};for(let[a,l,h]of i.matches.entries())this.#s(a)||this.matchSync(a,l,h);for(let[a,l]of i.subwalks.entries())r++,this.walkCB2Sync(a,l,i.child(),o);o()}},At=class extends fi{matches=new Set;constructor(e,t,i){super(e,t,i)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},Rt=class extends fi{results;constructor(e,t,i){super(e,t,i),this.results=new we({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var Gh=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",ie=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=qh(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=t.platform||Gh,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=t.platform==="win32"?je:t.platform==="darwin"?_t:t.platform?ze:po;this.scurry=new l(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let i=this.platform==="darwin"||this.platform==="win32",s={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:i,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},r=this.pattern.map(l=>new G(l,s)),[o,a]=r.reduce((l,h)=>(l[0].push(...h.set),l[1].push(...h.globParts),l),[[],[]]);this.patterns=o.map((l,h)=>{let u=a[h];if(!u)throw new Error("invalid pattern object");return new We(l,u,0,this.platform)})}async walk(){return[...await new At(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new At(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Rt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Rt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var Ss=(n,e={})=>{Array.isArray(n)||(n=[n]);for(let t of n)if(new G(t,e).hasMagic())return!0;return!1};function di(n,e={}){return new ie(n,e).streamSync()}function go(n,e={}){return new ie(n,e).stream()}function wo(n,e={}){return new ie(n,e).walkSync()}async function mo(n,e={}){return new ie(n,e).walk()}function mi(n,e={}){return new ie(n,e).iterateSync()}function yo(n,e={}){return new ie(n,e).iterate()}var Vh=di,Hh=Object.assign(go,{sync:di}),Qh=mi,Jh=Object.assign(yo,{sync:mi}),Kh=Object.assign(wo,{stream:di,iterate:mi}),pi=Object.assign(mo,{glob:mo,globSync:wo,sync:Kh,globStream:go,stream:Hh,globStreamSync:di,streamSync:Vh,globIterate:yo,iterate:Jh,globIterateSync:mi,iterateSync:Qh,Glob:ie,hasMagic:Ss,escape:Fe,unescape:Z});pi.glob=pi;function eu(n){let e=Sn.find(t=>t.previous===n);return e?e.next&&e.next.length>0?e.next[0]:(!e.next||e.next.length===0)&&e.alternative&&e.alternative.length>0?e.alternative[0]:null:null}function tu(n){return n.replace(/var\(--seed-semantic-typography-([^-]+)-([^-]+)-([^)]+)\)/g,(e,t,i,s)=>{try{let r=`$semantic.typography.${t}${i.charAt(0).toUpperCase()+i.slice(1)}`,o=eu(r);if(!o)return e;let a="";switch(s){case"font-size":a=`--seed-font-size-${o.replace(/Regular|Medium|Bold/,"")}`;break;case"line-height":a=`--seed-line-height-${o.replace(/Regular|Medium|Bold/,"")}`;break;case"font-weight":o.includes("Regular")?a="--seed-font-weight-regular":o.includes("Medium")?a="--seed-font-weight-medium":o.includes("Bold")&&(a="--seed-font-weight-bold");break;case"letter-spacing":return"normal";default:return e}return`var(${a})`}catch(r){return console.error(`Error transforming token: ${e}`,r),e}})}var iu={postcssPlugin:"replace-css-typography-variable",Declaration(n){if(n.value.includes("var(--seed-semantic-typography")){let e=n.value,t=tu(e);e!==t&&(n.value=t)}}},bo=(n,e,t)=>{let{reporter:i}=t,s=null;if(i&&(s=new Kt("replace-css-typography-variable"),s.startNewFile(n.path)),!n.path.endsWith(".css"))return n.source;try{let r=es([iu]),o=n.source,l=r.process(o,{from:n.path,parser:es.parse}).sync().root.toString();return s&&(s.finishFile(),s.writeReport()),l}catch(r){return console.error("Error processing CSS:",r),n.source}};function Nf(n,e){let t=[];for(let r of n)try{if(r.endsWith(".css")){t.push(Zh(r));continue}let o=pi.sync(`${r}/**/*.css`,{ignore:["**/node_modules/**","**/dist/**","**/build/**"]});t=[...t,...o]}catch(o){console.error(`\uACBD\uB85C \uCC98\uB9AC \uC911 \uC624\uB958 \uBC1C\uC0DD: ${r}`,o)}let i=[...new Set(t)];if(i.length===0){console.log("\uBCC0\uD658\uD560 CSS \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");return}console.log(`\uCD1D ${i.length}\uAC1C\uC758 CSS \uD30C\uC77C\uC744 \uCC3E\uC558\uC2B5\uB2C8\uB2E4.`);let s=0;for(let r of i)try{let o=Xh(r,"utf8"),a=bo({path:r,source:o},null,e);o!==a&&(Yh(r,a,"utf8"),console.log(`\uBCC0\uD658 \uC644\uB8CC: ${r}`),s++)}catch(o){console.error(`\uD30C\uC77C \uBCC0\uD658 \uC911 \uC624\uB958 \uBC1C\uC0DD: ${r}`,o)}console.log(`CSS \uBCC0\uD658 \uC644\uB8CC: \uCD1D ${s}\uAC1C \uD30C\uC77C \uBCC0\uACBD\uB428`)}var Pf=bo;export{Pf as default,Nf as processCssFiles};
@@ -1,17 +0,0 @@
1
- var P=[{previous:"$semantic.color.on-primary",next:["$color.palette.static-white"]},{previous:"$semantic.color.primary",next:["$color.bg.brand-solid","$color.fg.brand"],alternative:["$color.palette.carrot-600"]},{previous:"$semantic.color.primary-low",next:["$color.palette.carrot-100"]},{previous:"$semantic.color.secondary",next:["$color.palette.gray-900"]},{previous:"$semantic.color.secondary-low",next:["$color.bg.neutral-weak"],alternative:["$color.palette.gray-200"]},{previous:"$semantic.color.success",next:["$color.bg.positive-solid","$color.fg.positive"],alternative:["$color.fg.positive-contrast","$color.palette.green-700"]},{previous:"$semantic.color.success-low",next:["$color.bg.positive-weak"],alternative:["$color.palette.green-100"]},{previous:"$semantic.color.warning",next:["$color.bg.warning-solid"],alternative:["$color.fg.warning-contrast","$color.palette.yellow-500"]},{previous:"$semantic.color.warning-low",next:["$color.bg.warning-weak"],alternative:["$color.palette.yellow-100"]},{previous:"$semantic.color.danger",next:["$color.bg.critical-solid","$color.fg.critical"],alternative:["$color.fg.critical-contrast","$color.palette.red-700"]},{previous:"$semantic.color.danger-low",next:["$color.bg.critical-weak"],alternative:["$color.palette.red-100"]},{previous:"$semantic.color.overlay-dim",next:["$color.bg.overlay"],alternative:["$color.palette.static-black-alpha-500"]},{previous:"$semantic.color.overlay-low",next:["$color.bg.overlay-muted"],alternative:["$color.palette.static-black-alpha-200"]},{previous:"$semantic.color.paper-sheet",next:["$color.bg.layer-floating"],alternative:["$color.palette.gray-00"]},{previous:"$semantic.color.paper-dialog",next:["$color.bg.layer-floating"],alternative:["$color.palette.gray-00"]},{previous:"$semantic.color.paper-floating",next:["$color.bg.layer-floating"],alternative:["$color.palette.gray-00"]},{previous:"$semantic.color.paper-contents",next:["$color.bg.layer-fill"],alternative:["$color.palette.gray-100"]},{previous:"$semantic.color.paper-default",next:["$color.bg.layer-default"],alternative:["$color.palette.gray-00"]},{previous:"$semantic.color.paper-background",next:["$color.bg.layer-basement"],alternative:["$color.palette.gray-200"]},{previous:"$semantic.color.paper-accent",next:["$color.palette.carrot-100"]},{previous:"$semantic.color.primary-hover",next:["$color.bg.brand-solid-pressed"],alternative:["$color.palette.carrot-700"]},{previous:"$semantic.color.primary-pressed",next:["$color.bg.brand-solid-pressed"],alternative:["$color.palette.carrot-700"]},{previous:"$semantic.color.primary-low-hover",next:["$color.palette.carrot-200"]},{previous:"$semantic.color.primary-low-active",next:["$color.palette.carrot-100"]},{previous:"$semantic.color.primary-low-pressed",next:["$color.palette.carrot-200"]},{previous:"$semantic.color.gray-hover",next:["$color.bg.neutral-weak-pressed"],alternative:["$color.palette.gray-300"]},{previous:"$semantic.color.gray-pressed",next:["$color.bg.neutral-weak-pressed"],alternative:["$color.palette.gray-300"]},{previous:"$semantic.color.on-primary-overlay-50",next:[],description:"TBD"},{previous:"$semantic.color.on-primary-overlay-200",next:[],description:"TBD"},{previous:"$semantic.color.on-primary-low-overlay-50",next:[],description:"TBD"},{previous:"$semantic.color.on-primary-low-overlay-100",next:[],description:"TBD"},{previous:"$semantic.color.on-primary-low-overlay-200",next:[],description:"TBD"},{previous:"$semantic.color.on-gray-overlay-50",next:[],description:"TBD"},{previous:"$semantic.color.on-gray-overlay-100",next:[],description:"TBD"},{previous:"$semantic.color.divider-1",next:["$color.stroke.on-image"],alternative:["$color.palette.static-black-alpha-50"]},{previous:"$semantic.color.divider-2",next:["$color.stroke.neutral"],alternative:["$color.palette.gray-300"]},{previous:"$semantic.color.divider-3",next:["$color.palette.gray-400"]},{previous:"$semantic.color.accent",next:["$color.bg.informative-solid","$color.fg.informative"],alternative:["$color.fg.informative-contrast","$color.palette.blue-700"]},{previous:"$semantic.color.ink-text",next:["$color.fg.neutral"],alternative:["$color.palette.gray-1000"]},{previous:"$semantic.color.ink-text-low",next:["$color.fg.neutral-subtle"],alternative:["$color.palette.gray-700"]},{previous:"$semantic.color.gray-active",next:["$color.fg.neutral-muted"],alternative:["$color.palette.gray-800"]}],L=[{previous:"$scale.color.gray-00",next:["$color.palette.gray-00"]},{previous:"$scale.color.gray-50",next:["$color.palette.gray-100"]},{previous:"$scale.color.gray-100",next:["$color.palette.gray-200"]},{previous:"$scale.color.gray-200",next:["$color.palette.gray-300"]},{previous:"$scale.color.gray-300",next:["$color.palette.gray-400"]},{previous:"$scale.color.gray-400",next:["$color.palette.gray-500"]},{previous:"$scale.color.gray-500",next:["$color.palette.gray-600"]},{previous:"$scale.color.gray-600",next:["$color.palette.gray-700"]},{previous:"$scale.color.gray-700",next:["$color.palette.gray-800"]},{previous:"$scale.color.gray-800",next:["$color.palette.gray-900"]},{previous:"$scale.color.gray-900",next:["$color.palette.gray-1000"]},{previous:"$scale.color.gray-alpha-50",next:["$color.palette.gray-200","$color.stroke.on-image"]},{previous:"$scale.color.gray-alpha-100",next:["$color.palette.gray-300"]},{previous:"$scale.color.gray-alpha-200",next:["$color.palette.gray-500"]},{previous:"$scale.color.gray-alpha-500",next:["$color.palette.gray-700"]},{previous:"$scale.color.carrot-50",next:["$color.palette.carrot-100"]},{previous:"$scale.color.carrot-100",next:["$color.palette.carrot-200"]},{previous:"$scale.color.carrot-200",next:["$color.palette.carrot-300"]},{previous:"$scale.color.carrot-300",next:["$color.palette.carrot-400"]},{previous:"$scale.color.carrot-400",next:["$color.palette.carrot-500"]},{previous:"$scale.color.carrot-500",next:["$color.palette.carrot-600"]},{previous:"$scale.color.carrot-600",next:["$color.palette.carrot-600"]},{previous:"$scale.color.carrot-700",next:["$color.palette.carrot-700"]},{previous:"$scale.color.carrot-800",next:["$color.palette.carrot-700"]},{previous:"$scale.color.carrot-900",next:["$color.palette.carrot-800"]},{previous:"$scale.color.carrot-950",next:["$color.palette.carrot-800"]},{previous:"$scale.color.carrot-alpha-50",next:["$color.palette.carrot-100"]},{previous:"$scale.color.carrot-alpha-100",next:["$color.palette.carrot-200"]},{previous:"$scale.color.carrot-alpha-200",next:["$color.palette.carrot-200"]},{previous:"$scale.color.blue-50",next:["$color.palette.blue-100"]},{previous:"$scale.color.blue-100",next:["$color.palette.blue-200"]},{previous:"$scale.color.blue-200",next:["$color.palette.blue-300"]},{previous:"$scale.color.blue-300",next:["$color.palette.blue-400"]},{previous:"$scale.color.blue-400",next:["$color.palette.blue-400"]},{previous:"$scale.color.blue-500",next:["$color.palette.blue-600"]},{previous:"$scale.color.blue-600",next:["$color.palette.blue-600"]},{previous:"$scale.color.blue-700",next:["$color.palette.blue-800"]},{previous:"$scale.color.blue-800",next:["$color.palette.blue-900"]},{previous:"$scale.color.blue-900",next:["$color.palette.blue-900"]},{previous:"$scale.color.blue-950",next:["$color.palette.blue-1000"]},{previous:"$scale.color.blue-alpha-50",next:["$color.palette.blue-100"]},{previous:"$scale.color.blue-alpha-100",next:["$color.palette.blue-100"]},{previous:"$scale.color.blue-alpha-200",next:["$color.palette.blue-200"]},{previous:"$scale.color.red-50",next:["$color.palette.red-100"]},{previous:"$scale.color.red-100",next:["$color.palette.red-200"]},{previous:"$scale.color.red-200",next:["$color.palette.red-300"]},{previous:"$scale.color.red-300",next:["$color.palette.red-400"]},{previous:"$scale.color.red-400",next:["$color.palette.red-600"]},{previous:"$scale.color.red-500",next:["$color.palette.red-700"]},{previous:"$scale.color.red-600",next:["$color.palette.red-700"]},{previous:"$scale.color.red-700",next:["$color.palette.red-800"]},{previous:"$scale.color.red-800",next:["$color.palette.red-900"]},{previous:"$scale.color.red-900",next:["$color.palette.red-900"]},{previous:"$scale.color.red-950",next:["$color.palette.red-900"]},{previous:"$scale.color.red-alpha-50",next:["$color.palette.red-100"]},{previous:"$scale.color.red-alpha-100",next:["$color.palette.red-200"]},{previous:"$scale.color.red-alpha-200",next:["$color.palette.red-300"]},{previous:"$scale.color.green-50",next:["$color.palette.green-100"]},{previous:"$scale.color.green-100",next:["$color.palette.green-200"]},{previous:"$scale.color.green-200",next:["$color.palette.green-300"]},{previous:"$scale.color.green-300",next:["$color.palette.green-400"]},{previous:"$scale.color.green-400",next:["$color.palette.green-500"]},{previous:"$scale.color.green-500",next:["$color.palette.green-600"]},{previous:"$scale.color.green-600",next:["$color.palette.green-700"]},{previous:"$scale.color.green-700",next:["$color.palette.green-800"]},{previous:"$scale.color.green-800",next:["$color.palette.green-900"]},{previous:"$scale.color.green-900",next:["$color.palette.green-900"]},{previous:"$scale.color.green-950",next:["$color.palette.green-900"]},{previous:"$scale.color.green-alpha-50",next:["$color.palette.green-100"]},{previous:"$scale.color.green-alpha-100",next:["$color.palette.green-200"]},{previous:"$scale.color.green-alpha-200",next:["$color.palette.green-200"]},{previous:"$scale.color.yellow-50",next:["$color.palette.yellow-100"]},{previous:"$scale.color.yellow-100",next:["$color.palette.yellow-200"]},{previous:"$scale.color.yellow-200",next:["$color.palette.yellow-300"]},{previous:"$scale.color.yellow-300",next:["$color.palette.yellow-400"]},{previous:"$scale.color.yellow-400",next:["$color.palette.yellow-500"]},{previous:"$scale.color.yellow-500",next:["$color.palette.yellow-700"]},{previous:"$scale.color.yellow-600",next:["$color.palette.yellow-700"]},{previous:"$scale.color.yellow-700",next:["$color.palette.yellow-800"]},{previous:"$scale.color.yellow-800",next:["$color.palette.yellow-800"]},{previous:"$scale.color.yellow-900",next:["$color.palette.yellow-900"]},{previous:"$scale.color.yellow-950",next:["$color.palette.yellow-900"]},{previous:"$scale.color.yellow-alpha-50",next:["$color.palette.yellow-100"]},{previous:"$scale.color.yellow-alpha-100",next:["$color.palette.yellow-100"]},{previous:"$scale.color.yellow-alpha-200",next:["$color.palette.yellow-100"]},{previous:"$scale.color.purple-50",next:["$color.palette.purple-100"]},{previous:"$scale.color.purple-100",next:["$color.palette.purple-300"]},{previous:"$scale.color.purple-200",next:["$color.palette.purple-400"]},{previous:"$scale.color.purple-300",next:["$color.palette.purple-400"]},{previous:"$scale.color.purple-400",next:["$color.palette.purple-500"]},{previous:"$scale.color.purple-500",next:["$color.palette.purple-600"]},{previous:"$scale.color.purple-600",next:["$color.palette.purple-700"]},{previous:"$scale.color.purple-700",next:["$color.palette.purple-800"]},{previous:"$scale.color.purple-800",next:["$color.palette.purple-900"]},{previous:"$scale.color.purple-900",next:["$color.palette.purple-900"]},{previous:"$scale.color.purple-950",next:["$color.palette.purple-1000"]}],E=[{previous:"$static.color.static-black",next:["$color.palette.static-black"]},{previous:"$static.color.static-white",next:["$color.palette.static-white"]},{previous:"$static.color.static-gray-900",next:[],description:"static \uC0C9\uC0C1 \uC0AC\uC6A9 \uD655\uC778\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},{previous:"$static.color.static-carrot-50",next:[],description:"static \uC0C9\uC0C1 \uC0AC\uC6A9 \uD655\uC778\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},{previous:"$static.color.static-carrot-800",next:[],description:"static \uC0C9\uC0C1 \uC0AC\uC6A9 \uD655\uC778\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},{previous:"$static.color.static-green-50",next:[],description:"static \uC0C9\uC0C1 \uC0AC\uC6A9 \uD655\uC778\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},{previous:"$static.color.static-green-800",next:[],description:"static \uC0C9\uC0C1 \uC0AC\uC6A9 \uD655\uC778\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},{previous:"$static.color.static-yellow-50",next:[],description:"static \uC0C9\uC0C1 \uC0AC\uC6A9 \uD655\uC778\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},{previous:"$static.color.static-yellow-800",next:[],description:"static \uC0C9\uC0C1 \uC0AC\uC6A9 \uD655\uC778\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},{previous:"$static.color.static-red-50",next:[],description:"static \uC0C9\uC0C1 \uC0AC\uC6A9 \uD655\uC778\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},{previous:"$static.color.static-red-800",next:[],description:"static \uC0C9\uC0C1 \uC0AC\uC6A9 \uD655\uC778\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},{previous:"$static.color.static-blue-50",next:[],description:"static \uC0C9\uC0C1 \uC0AC\uC6A9 \uD655\uC778\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},{previous:"$static.color.static-blue-800",next:[],description:"static \uC0C9\uC0C1 \uC0AC\uC6A9 \uD655\uC778\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},{previous:"$static.color.static-black-alpha-200",next:["$color.palette.static-black-alpha-200"]},{previous:"$static.color.static-black-alpha-500",next:["$color.palette.static-black-alpha-500"]},{previous:"$static.color.static-white-alpha-50",next:[],description:"static \uC0C9\uC0C1 \uC0AC\uC6A9 \uD655\uC778\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},{previous:"$static.color.static-white-alpha-200",next:["$color.palette.static-white-alpha-200"]}],y=[...P,...L,...E];import*as v from"fs";import*as g from"path";var d=class{timestamp;fileMigrations=[];currentFile=null;reportDir=g.join(process.cwd(),".report");transformName;constructor(e){this.transformName=e,this.timestamp=this.generateTimestamp()}generateTimestamp(){return new Date(new Date().getTime()+324e5).toISOString()}getReportPath(){return g.join(this.reportDir,`${this.transformName}.md`)}getRelativePath(e){if(!e)return"unknown";try{let l=g.resolve(e);return g.relative(this.reportDir,l)}catch{return"unknown"}}startNewFile(e){this.currentFile={filePath:this.getRelativePath(e),results:[]}}addResult(e){this.currentFile&&this.currentFile.results.push(e)}finishFile(){this.currentFile&&this.currentFile.results.length>0&&this.fileMigrations.push(this.currentFile),this.currentFile=null}hasResults(){return this.fileMigrations.length>0}writeReport(){if(!this.hasResults())return;v.existsSync(this.reportDir)||v.mkdirSync(this.reportDir,{recursive:!0});let e=this.getReportPath(),l=v.existsSync(e)?v.readFileSync(e,"utf8"):"",a=this.fileMigrations.map(t=>{let n=g.basename(t.filePath),c=t.results.map(r=>{let i=r.line?` (line: ${r.line})`:"",$=r.status==="success"?"\u2705 success":r.status==="warning"?"\u26A0\uFE0F warning":"\u274C failure",p=r.failureReason?`
2
- - reason: ${r.failureReason}`:"";return` - ${$} ${i}
3
- - as-is: \`${r.previousToken}\`
4
- - to-be: ${r.nextToken?`\`${r.nextToken}\``:"undefined"}${p}`}).join(`
5
- `);return`### [${n}](${t.filePath})
6
- - timestamp: ${this.timestamp}
7
- - summary:
8
- - total: ${t.results.length}
9
- - success: ${t.results.filter(r=>r.status==="success").length}
10
- - warning: ${t.results.filter(r=>r.status==="warning").length}
11
- - failure: ${t.results.filter(r=>r.status==="failure").length}
12
- - lines
13
- ${c}`}).join(`
14
-
15
- `);v.writeFileSync(e,l+(l?`
16
-
17
- `:"")+a)}};var F=/([\p{Ll}\d])(\p{Lu})/gu,I=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,A=/(\d)\p{Ll}|(\p{L})\d/u,_=/[^\p{L}\d]+/giu,h="$1\0$2",w="";function b(o){let e=o.trim();e=e.replace(F,h).replace(I,h),e=e.replace(_,"\0");let l=0,a=e.length;for(;e.charAt(l)==="\0";)l++;if(l===a)return[];for(;e.charAt(a-1)==="\0";)a--;return e.slice(l,a).split(/\0/g)}function j(o){let e=b(o);for(let l=0;l<e.length;l++){let a=e[l],s=A.exec(a);if(s){let t=s.index+(s[1]??s[2]).length;e.splice(l,1,a.slice(0,t),a.slice(t))}}return e}function k(o,e){let[l,a,s]=U(o,e),t=M(e?.locale),n=D(e?.locale),c=e?.mergeAmbiguousCharacters?N(t,n):X(t,n);return l+a.map((r,i)=>i===0?t(r):c(r,i)).join(e?.delimiter??"")+s}function M(o){return o===!1?e=>e.toLowerCase():e=>e.toLocaleLowerCase(o)}function D(o){return o===!1?e=>e.toUpperCase():e=>e.toLocaleUpperCase(o)}function N(o,e){return l=>`${e(l[0])}${o(l.slice(1))}`}function X(o,e){return(l,a)=>{let s=l[0];return(a>0&&s>="0"&&s<="9"?"_"+s:e(s))+o(l.slice(1))}}function U(o,e={}){let l=e.split??(e.separateNumbers?j:b),a=e.prefixCharacters??w,s=e.suffixCharacters??w,t=0,n=o.length;for(;t<o.length;){let c=o.charAt(t);if(!a.includes(c))break;t++}for(;n>t;){let c=n-1,r=o.charAt(c);if(!s.includes(r))break;n=c}return[o.slice(0,t),l(o.slice(t,n)),o.slice(n)]}function T(o){let e=o.replace(/^\$(semantic|static|scale)\.color\./,"").split(".").join("-");return k(e,{mergeAmbiguousCharacters:!0})}function C(o,e){let l=[["$color.palette.",`${o}-palette-`],["$color.stroke.",`${o}-stroke-`],["$color.bg.",`${o}-bg-`],["$color.fg.",`${o}-fg-`]];for(let[a,s]of l)if(e.startsWith(a))return e.replace(a,s);return e}var B={bg:"$color.bg",text:"$color.fg",stroke:"$color.stroke",fill:"$color.bg",accent:"$color.palette",caret:"$color.palette",decoration:"$color.palette",border:"$color.stroke",shadow:"$color.palette","inset-shadow":"$color.palette",ring:"$color.stroke","inset-ring":"$color.stroke"};function R(o,e){let l=e.next.find(s=>s.startsWith(B[o]));if(l)return l;let a=e.next.find(s=>s.startsWith("$color.palette"));if(a)return a;if(e.alternative&&e.alternative.length>0){let s=e.alternative.find(t=>t.startsWith("$color.palette"));if(s)return s}return null}function S(o,e){let l=/^(border(?:-[trblxys]+)?)-(.+)$/,a=o.match(l);if(a){let t=a[1],c=`border-${a[2]}`;for(let r of y)if(`border-${T(r.previous)}`===c){let $=R("border",r);if($){let p=C("border",$);return`${t}-${p.replace(/^border-/,"")}`}(!r.next||r.next.length===0)&&(!r.alternative||r.alternative.length===0)&&r.description&&e.add({description:r.description,token:c})}return o}let s=/^([a-z]+)-(.+)$/;if(a=o.match(s),a){let t=a[1];for(let n of y)if(`${t}-${T(n.previous)}`===o){let r=R(t,n);if(r)return C(t,r);(!n.next||n.next.length===0)&&(!n.alternative||n.alternative.length===0)&&n.description&&e.add({description:n.description,token:o})}}return o}function J(o,e){let l=o,a=!1;l.startsWith("!")&&(a=!0,l=l.slice(1));let s=[];for(;l.includes(":");){let[c,...r]=l.split(":");if(c.includes("!")){let i=c.split("!");i[0]&&s.push(i[0]),l=`!${r.join(":")}`}else s.push(c),l=r.join(":")}let t=l;t.startsWith("!")?(t=S(t.slice(1),e),t=`!${t}`):t=S(t,e);let n=t;return s.length>0&&(n=`${s.join(":")}:${n}`),a&&(n=`!${n}`),n}function x(o,e){return o.split(" ").map(s=>J(s,e)).join(" ")}var W=(o,e,l)=>{let a=l,{reporter:s}=a,t=e.jscodeshift,n=t(o.source),c=null;return s&&(c=new d("replace-tailwind-color"),c.startNewFile(o.path)),n.find(t.JSXAttribute,{name:{name:"className"}}).forEach(r=>{let i=r.node.value;if(!i)return;let $=new Set;if(i.type==="StringLiteral"){let p=i.value,u=x(p,$);p!==u&&c&&c.addResult({previousToken:p,nextToken:u,status:"success",line:i.loc?.start.line}),i.value=u}else if(i.type==="JSXExpressionContainer"&&i.expression.type==="StringLiteral"){let p=i.expression.value,u=x(p,$);p!==u&&c&&c.addResult({previousToken:p,nextToken:u,status:"success",line:i.expression.loc?.start.line}),i.expression.value=u}else i.type==="JSXExpressionContainer"&&i.expression.type==="TemplateLiteral"&&i.expression.quasis.forEach(u=>{let m=u.value.raw,f=x(m,$);m!==f&&c&&c.addResult({previousToken:m,nextToken:f,status:"success",line:u.loc?.start.line}),u.value.raw=f,u.value.cooked=f});if($.size>0&&c)for(let p of $)c.addResult({previousToken:p.token,nextToken:p.token,status:"warning",failureReason:p.description,line:r.node.loc?.start.line})}),n.find(t.StringLiteral).forEach(r=>{if(r.parent.node.type==="JSXAttribute"||r.parent.node.type==="JSXExpressionContainer"&&r.parent.parent.node.type==="JSXAttribute")return;let i=new Set,$=r.node.value,p=x($,i);$!==p&&c&&c.addResult({previousToken:$,nextToken:p,status:"success",line:r.node.loc?.start.line}),r.node.value=p}),n.find(t.TemplateLiteral).forEach(r=>{r.parent.node.type==="JSXExpressionContainer"&&r.parent.parent.node.type==="JSXAttribute"||r.node.quasis.forEach(i=>{let $=new Set,p=i.value.raw,u=x(p,$);p!==u&&c&&c.addResult({previousToken:p,nextToken:u,status:"success",line:i.loc?.start.line}),i.value.raw=u,i.value.cooked=u})}),c&&(c.finishFile(),c.writeReport()),n.toSource()},K=W;export{K as default};