@holistics/cli-core 0.6.4 → 0.6.5
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.
- package/dist/commands.js +5 -7
- package/package.json +1 -1
package/dist/commands.js
CHANGED
|
@@ -83,7 +83,7 @@ __p += '`;if(_1)G0+=`' +
|
|
|
83
83
|
function print() { __p += __j.call(arguments, '') }
|
|
84
84
|
`:`;
|
|
85
85
|
`)+G0+`return __p
|
|
86
|
-
}`;var V1=pD(function(){return A1(O,f0+"return "+G0).apply(x,T)});if(V1.source=G0,xz(V1))throw V1;return V1}function Ao(K){return u1(K).toLowerCase()}function Eo(K){return u1(K).toUpperCase()}function fo(K,V,B){if(K=u1(K),K&&(B||V===x))return sM(K);if(!K||!(V=N4(V)))return K;var D=G8(K),P=G8(V),O=nM(D,P),T=aM(D,P)+1;return z5(D,O,T).join("")}function ko(K,V,B){if(K=u1(K),K&&(B||V===x))return K.slice(0,tM(K)+1);if(!K||!(V=N4(V)))return K;var D=G8(K),P=aM(D,G8(V))+1;return z5(D,0,P).join("")}function co(K,V,B){if(K=u1(K),K&&(B||V===x))return K.replace(H9,"");if(!K||!(V=N4(V)))return K;var D=G8(K),P=nM(D,G8(V));return z5(D,P).join("")}function bo(K,V){var B=j,D=I;if(H2(V)){var P="separator"in V?V.separator:P;B="length"in V?K1(V.length):B,D="omission"in V?N4(V.omission):D}K=u1(K);var O=K.length;if(M9(K)){var T=G8(K);O=T.length}if(B>=O)return K;var c=B-N9(D);if(c<1)return D;var s=T?z5(T,0,c).join(""):K.slice(0,c);if(P===x)return s+D;if(T)c+=s.length-c;if(Jz(P)){if(K.slice(c).search(P)){var $0,K0=s;if(!P.global)P=NK(P.source,u1(MM.exec(P))+"g");P.lastIndex=0;while($0=P.exec(K0))var G0=$0.index;s=s.slice(0,G0===x?c:G0)}}else if(K.indexOf(N4(P),c)!=c){var R0=s.lastIndexOf(P);if(R0>-1)s=s.slice(0,R0)}return s+D}function po(K){return K=u1(K),K&&J7.test(K)?K.replace(vZ,Uh):K}var yo=_9(function(K,V,B){return K+(B?" ":"")+V.toUpperCase()}),Xz=yN("toUpperCase");function bD(K,V,B){if(K=u1(K),V=B?x:V,V===x)return zh(K)?Nh(K):xh(K);return K.match(V)||[]}var pD=H1(function(K,V){try{return B4(K,x,V)}catch(B){return xz(B)?B:new Z1(B)}}),uo=C6(function(K,V){return k4(V,function(B){B=u8(B),w6(K,B,tK(K[B],K))}),K});function ho(K){var V=K==null?0:K.length,B=d0();return K=!V?[]:W2(K,function(D){if(typeof D[1]!="function")throw new c4(X);return[B(D[0]),D[1]]}),H1(function(D){var P=-1;while(++P<V){var O=K[P];if(B4(O[0],this,D))return B4(O[1],this,D)}})}function go(K){return Ug(p4(K,W))}function qz(K){return function(){return K}}function io(K,V){return K==null||K!==K?V:K}var lo=hN(),oo=hN(!0);function a3(K){return K}function Yz(K){return DN(typeof K=="function"?K:p4(K,W))}function so(K){return wN(p4(K,W))}function no(K,V){return PN(K,p4(V,W))}var ao=H1(function(K,V){return function(B){return KJ(B,K,V)}}),ro=H1(function(K,V){return function(B){return KJ(K,B,V)}});function $z(K,V,B){var D=n2(V),P=WX(V,D);if(B==null&&!(H2(V)&&(P.length||!D.length)))B=V,V=K,K=this,P=WX(V,n2(V));var O=!(H2(B)&&("chain"in B))||!!B.chain,T=L6(K);return k4(P,function(c){var s=V[c];if(K[c]=s,T)K.prototype[c]=function(){var $0=this.__chain__;if(O||$0){var K0=K(this.__wrapped__),G0=K0.__actions__=o3(this.__actions__);return G0.push({func:s,args:arguments,thisArg:K}),K0.__chain__=$0,K0}return s.apply(K,Q5([this.value()],arguments))}}),K}function to(){if(s2._===this)s2._=_h;return this}function Kz(){}function eo(K){return K=K1(K),H1(function(V){return CN(V,K)})}var xs=pK(W2),Js=pK(gM),Qs=pK(WK);function yD(K){return lK(K)?VK(u8(K)):Tg(K)}function Zs(K){return function(V){return K==null?x:$7(K,V)}}var Xs=iN(),qs=iN(!0);function zz(){return[]}function Wz(){return!1}function Ys(){return{}}function $s(){return""}function Ks(){return!0}function zs(K,V){if(K=K1(K),K<1||K>l)return[];var B=i0,D=P3(K,i0);V=d0(V),K-=i0;var P=UK(D,V);while(++B<K)V(B);return P}function Ws(K){if(X1(K))return W2(K,u8);return D4(K)?[K]:o3(YD(u1(K)))}function Vs(K){var V=++Ph;return u1(K)+V}var Gs=MX(function(K,V){return K+V},0),Hs=yK("ceil"),Us=MX(function(K,V){return K/V},1),Bs=yK("floor");function Ms(K){return K&&K.length?zX(K,a3,jK):x}function Ns(K,V){return K&&K.length?zX(K,d0(V,2),jK):x}function Ds(K){return lM(K,a3)}function Fs(K,V){return lM(K,d0(V,2))}function ws(K){return K&&K.length?zX(K,a3,RK):x}function Ps(K,V){return K&&K.length?zX(K,d0(V,2),RK):x}var Cs=MX(function(K,V){return K*V},1),_s=yK("round"),Ls=MX(function(K,V){return K-V},0);function js(K){return K&&K.length?HK(K,a3):0}function Os(K,V){return K&&K.length?HK(K,d0(V,2)):0}if(L.after=od,L.ary=ND,L.assign=El,L.assignIn=TD,L.assignInWith=RX,L.assignWith=fl,L.at=kl,L.before=DD,L.bind=tK,L.bindAll=uo,L.bindKey=FD,L.castArray=ql,L.chain=UD,L.chunk=Ui,L.compact=Bi,L.concat=Mi,L.cond=ho,L.conforms=go,L.constant=qz,L.countBy=Ld,L.create=cl,L.curry=wD,L.curryRight=PD,L.debounce=CD,L.defaults=bl,L.defaultsDeep=pl,L.defer=sd,L.delay=nd,L.difference=Ni,L.differenceBy=Di,L.differenceWith=Fi,L.drop=wi,L.dropRight=Pi,L.dropRightWhile=Ci,L.dropWhile=_i,L.fill=Li,L.filter=Od,L.flatMap=Rd,L.flatMapDeep=Id,L.flatMapDepth=Td,L.flatten=WD,L.flattenDeep=ji,L.flattenDepth=Oi,L.flip=ad,L.flow=lo,L.flowRight=oo,L.fromPairs=mi,L.functions=ll,L.functionsIn=ol,L.groupBy=vd,L.initial=Ri,L.intersection=Ii,L.intersectionBy=Ti,L.intersectionWith=vi,L.invert=nl,L.invertBy=al,L.invokeMap=Ed,L.iteratee=Yz,L.keyBy=fd,L.keys=n2,L.keysIn=n3,L.map=_X,L.mapKeys=tl,L.mapValues=el,L.matches=so,L.matchesProperty=no,L.memoize=jX,L.merge=xo,L.mergeWith=vD,L.method=ao,L.methodOf=ro,L.mixin=$z,L.negate=OX,L.nthArg=eo,L.omit=Jo,L.omitBy=Qo,L.once=rd,L.orderBy=kd,L.over=xs,L.overArgs=td,L.overEvery=Js,L.overSome=Qs,L.partial=eK,L.partialRight=_D,L.partition=cd,L.pick=Zo,L.pickBy=AD,L.property=yD,L.propertyOf=Zs,L.pull=ki,L.pullAll=GD,L.pullAllBy=ci,L.pullAllWith=bi,L.pullAt=pi,L.range=Xs,L.rangeRight=qs,L.rearg=ed,L.reject=yd,L.remove=yi,L.rest=xl,L.reverse=aK,L.sampleSize=hd,L.set=qo,L.setWith=Yo,L.shuffle=gd,L.slice=ui,L.sortBy=ld,L.sortedUniq=si,L.sortedUniqBy=ni,L.split=Ro,L.spread=Jl,L.tail=ai,L.take=ri,L.takeRight=ti,L.takeRightWhile=ei,L.takeWhile=xd,L.tap=Bd,L.throttle=Ql,L.thru=CX,L.toArray=SD,L.toPairs=ED,L.toPairsIn=fD,L.toPath=Ws,L.toPlainObject=ID,L.transform=$o,L.unary=Zl,L.union=Jd,L.unionBy=Qd,L.unionWith=Zd,L.uniq=Xd,L.uniqBy=qd,L.uniqWith=Yd,L.unset=Ko,L.unzip=rK,L.unzipWith=HD,L.update=zo,L.updateWith=Wo,L.values=O9,L.valuesIn=Vo,L.without=$d,L.words=bD,L.wrap=Xl,L.xor=Kd,L.xorBy=zd,L.xorWith=Wd,L.zip=Vd,L.zipObject=Gd,L.zipObjectDeep=Hd,L.zipWith=Ud,L.entries=ED,L.entriesIn=fD,L.extend=TD,L.extendWith=RX,$z(L,L),L.add=Gs,L.attempt=pD,L.camelCase=Bo,L.capitalize=kD,L.ceil=Hs,L.clamp=Go,L.clone=Yl,L.cloneDeep=Kl,L.cloneDeepWith=zl,L.cloneWith=$l,L.conformsTo=Wl,L.deburr=cD,L.defaultTo=io,L.divide=Us,L.endsWith=Mo,L.eq=U8,L.escape=No,L.escapeRegExp=Do,L.every=jd,L.find=md,L.findIndex=KD,L.findKey=yl,L.findLast=Sd,L.findLastIndex=zD,L.findLastKey=ul,L.floor=Bs,L.forEach=BD,L.forEachRight=MD,L.forIn=hl,L.forInRight=gl,L.forOwn=il,L.forOwnRight=dl,L.get=Qz,L.gt=Vl,L.gte=Gl,L.has=sl,L.hasIn=Zz,L.head=VD,L.identity=a3,L.includes=Ad,L.indexOf=Si,L.inRange=Ho,L.invoke=rl,L.isArguments=W7,L.isArray=X1,L.isArrayBuffer=Hl,L.isArrayLike=s3,L.isArrayLikeObject=L2,L.isBoolean=Ul,L.isBuffer=W5,L.isDate=Bl,L.isElement=Ml,L.isEmpty=Nl,L.isEqual=Dl,L.isEqualWith=Fl,L.isError=xz,L.isFinite=wl,L.isFunction=L6,L.isInteger=LD,L.isLength=mX,L.isMap=jD,L.isMatch=Pl,L.isMatchWith=Cl,L.isNaN=_l,L.isNative=Ll,L.isNil=Ol,L.isNull=jl,L.isNumber=OD,L.isObject=H2,L.isObjectLike=F2,L.isPlainObject=UJ,L.isRegExp=Jz,L.isSafeInteger=ml,L.isSet=mD,L.isString=SX,L.isSymbol=D4,L.isTypedArray=j9,L.isUndefined=Sl,L.isWeakMap=Rl,L.isWeakSet=Il,L.join=Ai,L.kebabCase=Fo,L.last=u4,L.lastIndexOf=Ei,L.lowerCase=wo,L.lowerFirst=Po,L.lt=Tl,L.lte=vl,L.max=Ms,L.maxBy=Ns,L.mean=Ds,L.meanBy=Fs,L.min=ws,L.minBy=Ps,L.stubArray=zz,L.stubFalse=Wz,L.stubObject=Ys,L.stubString=$s,L.stubTrue=Ks,L.multiply=Cs,L.nth=fi,L.noConflict=to,L.noop=Kz,L.now=LX,L.pad=Co,L.padEnd=_o,L.padStart=Lo,L.parseInt=jo,L.random=Uo,L.reduce=bd,L.reduceRight=pd,L.repeat=Oo,L.replace=mo,L.result=Xo,L.round=_s,L.runInContext=g,L.sample=ud,L.size=id,L.snakeCase=So,L.some=dd,L.sortedIndex=hi,L.sortedIndexBy=gi,L.sortedIndexOf=ii,L.sortedLastIndex=di,L.sortedLastIndexBy=li,L.sortedLastIndexOf=oi,L.startCase=Io,L.startsWith=To,L.subtract=Ls,L.sum=js,L.sumBy=Os,L.template=vo,L.times=zs,L.toFinite=j6,L.toInteger=K1,L.toLength=RD,L.toLower=Ao,L.toNumber=h4,L.toSafeInteger=Al,L.toString=u1,L.toUpper=Eo,L.trim=fo,L.trimEnd=ko,L.trimStart=co,L.truncate=bo,L.unescape=po,L.uniqueId=Vs,L.upperCase=yo,L.upperFirst=Xz,L.each=BD,L.eachRight=MD,L.first=VD,$z(L,function(){var K={};return p8(L,function(V,B){if(!y1.call(L.prototype,B))K[B]=V}),K}(),{chain:!1}),L.VERSION=J,k4(["bind","bindKey","curry","curryRight","partial","partialRight"],function(K){L[K].placeholder=L}),k4(["drop","take"],function(K,V){F1.prototype[K]=function(B){B=B===x?1:g2(K1(B),0);var D=this.__filtered__&&!V?new F1(this):this.clone();if(D.__filtered__)D.__takeCount__=P3(B,D.__takeCount__);else D.__views__.push({size:P3(B,i0),type:K+(D.__dir__<0?"Right":"")});return D},F1.prototype[K+"Right"]=function(B){return this.reverse()[K](B).reverse()}}),k4(["filter","map","takeWhile"],function(K,V){var B=V+1,D=B==V0||B==o;F1.prototype[K]=function(P){var O=this.clone();return O.__iteratees__.push({iteratee:d0(P,3),type:B}),O.__filtered__=O.__filtered__||D,O}}),k4(["head","last"],function(K,V){var B="take"+(V?"Right":"");F1.prototype[K]=function(){return this[B](1).value()[0]}}),k4(["initial","tail"],function(K,V){var B="drop"+(V?"":"Right");F1.prototype[K]=function(){return this.__filtered__?new F1(this):this[B](1)}}),F1.prototype.compact=function(){return this.filter(a3)},F1.prototype.find=function(K){return this.filter(K).head()},F1.prototype.findLast=function(K){return this.reverse().find(K)},F1.prototype.invokeMap=H1(function(K,V){if(typeof K=="function")return new F1(this);return this.map(function(B){return KJ(B,K,V)})}),F1.prototype.reject=function(K){return this.filter(OX(d0(K)))},F1.prototype.slice=function(K,V){K=K1(K);var B=this;if(B.__filtered__&&(K>0||V<0))return new F1(B);if(K<0)B=B.takeRight(-K);else if(K)B=B.drop(K);if(V!==x)V=K1(V),B=V<0?B.dropRight(-V):B.take(V-K);return B},F1.prototype.takeRightWhile=function(K){return this.reverse().takeWhile(K).reverse()},F1.prototype.toArray=function(){return this.take(i0)},p8(F1.prototype,function(K,V){var B=/^(?:filter|find|map|reject)|While$/.test(V),D=/^(?:head|last)$/.test(V),P=L[D?"take"+(V=="last"?"Right":""):V],O=D||/^find/.test(V);if(!P)return;L.prototype[V]=function(){var T=this.__wrapped__,c=D?[1]:arguments,s=T instanceof F1,$0=c[0],K0=s||X1(T),G0=function(N1){var _1=P.apply(L,Q5([N1],c));return D&&R0?_1[0]:_1};if(K0&&B&&typeof $0=="function"&&$0.length!=1)s=K0=!1;var R0=this.__chain__,f0=!!this.__actions__.length,l0=O&&!R0,V1=s&&!f0;if(!O&&K0){T=V1?T:new F1(this);var o0=K.apply(T,c);return o0.__actions__.push({func:CX,args:[G0],thisArg:x}),new b4(o0,R0)}if(l0&&V1)return K.apply(this,c);return o0=this.thru(G0),l0?D?o0.value()[0]:o0.value():o0}}),k4(["pop","push","shift","sort","splice","unshift"],function(K){var V=sZ[K],B=/^(?:push|sort|unshift)$/.test(K)?"tap":"thru",D=/^(?:pop|shift)$/.test(K);L.prototype[K]=function(){var P=arguments;if(D&&!this.__chain__){var O=this.value();return V.apply(X1(O)?O:[],P)}return this[B](function(T){return V.apply(X1(T)?T:[],P)})}}),p8(F1.prototype,function(K,V){var B=L[V];if(B){var D=B.name+"";if(!y1.call(w9,D))w9[D]=[];w9[D].push({name:V,func:B})}}),w9[BX(x,F).name]=[{name:"wrapper",func:x}],F1.prototype.clone=ph,F1.prototype.reverse=yh,F1.prototype.value=uh,L.prototype.at=Md,L.prototype.chain=Nd,L.prototype.commit=Dd,L.prototype.next=Fd,L.prototype.plant=Pd,L.prototype.reverse=Cd,L.prototype.toJSON=L.prototype.valueOf=L.prototype.value=_d,L.prototype.first=L.prototype.head,JJ)L.prototype[JJ]=wd;return L},X5=Dh();if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)s2._=X5,define(function(){return X5});else if(Q7)(Q7.exports=X5)._=X5,YK._=X5;else s2._=X5}).call(QZ)});var gD="0.6.4";var KF=V7($F(),1),{program:qT0,createCommand:YT0,createArgument:$T0,createOption:KT0,CommanderError:zT0,InvalidArgumentError:WT0,InvalidOptionArgumentError:VT0,Command:g4,Argument:GT0,Option:HT0,Help:UT0}=KF.default;import V40 from"fs";var wz=(x,J,Q)=>{let Z=x instanceof RegExp?zF(x,Q):x,X=J instanceof RegExp?zF(J,Q):J,q=Z!==null&&X!=null&&_n(Z,X,Q);return q&&{start:q[0],end:q[1],pre:Q.slice(0,q[0]),body:Q.slice(q[0]+Z.length,q[1]),post:Q.slice(q[1]+X.length)}},zF=(x,J)=>{let Q=J.match(x);return Q?Q[0]:null},_n=(x,J,Q)=>{let Z,X,q,Y=void 0,$,z=Q.indexOf(x),W=Q.indexOf(J,z+1),G=z;if(z>=0&&W>0){if(x===J)return[z,W];Z=[],q=Q.length;while(G>=0&&!$){if(G===z)Z.push(G),z=Q.indexOf(x,G+1);else if(Z.length===1){let H=Z.pop();if(H!==void 0)$=[H,W]}else{if(X=Z.pop(),X!==void 0&&X<q)q=X,Y=W;W=Q.indexOf(J,G+1)}G=z<W&&z>=0?z:W}if(Z.length&&Y!==void 0)$=[q,Y]}return $};var WF="\x00SLASH"+Math.random()+"\x00",VF="\x00OPEN"+Math.random()+"\x00",Cz="\x00CLOSE"+Math.random()+"\x00",GF="\x00COMMA"+Math.random()+"\x00",HF="\x00PERIOD"+Math.random()+"\x00",Ln=new RegExp(WF,"g"),jn=new RegExp(VF,"g"),On=new RegExp(Cz,"g"),mn=new RegExp(GF,"g"),Sn=new RegExp(HF,"g"),Rn=/\\\\/g,In=/\\{/g,Tn=/\\}/g,vn=/\\,/g,An=/\\./g;function Pz(x){return!isNaN(x)?parseInt(x,10):x.charCodeAt(0)}function En(x){return x.replace(Rn,WF).replace(In,VF).replace(Tn,Cz).replace(vn,GF).replace(An,HF)}function fn(x){return x.replace(Ln,"\\").replace(jn,"{").replace(On,"}").replace(mn,",").replace(Sn,".")}function UF(x){if(!x)return[""];let J=[],Q=wz("{","}",x);if(!Q)return x.split(",");let{pre:Z,body:X,post:q}=Q,Y=Z.split(",");Y[Y.length-1]+="{"+X+"}";let $=UF(q);if(q.length)Y[Y.length-1]+=$.shift(),Y.push.apply(Y,$);return J.push.apply(J,Y),J}function BF(x){if(!x)return[];if(x.slice(0,2)==="{}")x="\\{\\}"+x.slice(2);return MJ(En(x),!0).map(fn)}function kn(x){return"{"+x+"}"}function cn(x){return/^-?0\d/.test(x)}function bn(x,J){return x<=J}function pn(x,J){return x>=J}function MJ(x,J){let Q=[],Z=wz("{","}",x);if(!Z)return[x];let X=Z.pre,q=Z.post.length?MJ(Z.post,!1):[""];if(/\$$/.test(Z.pre))for(let Y=0;Y<q.length;Y++){let $=X+"{"+Z.body+"}"+q[Y];Q.push($)}else{let Y=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(Z.body),$=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(Z.body),z=Y||$,W=Z.body.indexOf(",")>=0;if(!z&&!W){if(Z.post.match(/,(?!,).*\}/))return x=Z.pre+"{"+Z.body+Cz+Z.post,MJ(x);return[x]}let G;if(z)G=Z.body.split(/\.\./);else if(G=UF(Z.body),G.length===1&&G[0]!==void 0){if(G=MJ(G[0],!1).map(kn),G.length===1)return q.map((U)=>Z.pre+G[0]+U)}let H;if(z&&G[0]!==void 0&&G[1]!==void 0){let U=Pz(G[0]),M=Pz(G[1]),N=Math.max(G[0].length,G[1].length),F=G.length===3&&G[2]!==void 0?Math.abs(Pz(G[2])):1,C=bn;if(M<U)F*=-1,C=pn;let m=G.some(cn);H=[];for(let A=U;C(A,M);A+=F){let u;if($){if(u=String.fromCharCode(A),u==="\\")u=""}else if(u=String(A),m){let r=N-u.length;if(r>0){let n=new Array(r+1).join("0");if(A<0)u="-"+n+u.slice(1);else u=n+u}}H.push(u)}}else{H=[];for(let U=0;U<G.length;U++)H.push.apply(H,MJ(G[U],!1))}for(let U=0;U<H.length;U++)for(let M=0;M<q.length;M++){let N=X+H[U]+q[M];if(!J||z||N)Q.push(N)}}return Q}var NJ=(x)=>{if(typeof x!=="string")throw new TypeError("invalid pattern");if(x.length>65536)throw new TypeError("pattern is too long")};var yn={"[: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]},DJ=(x)=>x.replace(/[[\]\\-]/g,"\\$&"),un=(x)=>x.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),MF=(x)=>x.join(""),NF=(x,J)=>{let Q=J;if(x.charAt(Q)!=="[")throw new Error("not in a brace expression");let Z=[],X=[],q=Q+1,Y=!1,$=!1,z=!1,W=!1,G=Q,H="";x:while(q<x.length){let F=x.charAt(q);if((F==="!"||F==="^")&&q===Q+1){W=!0,q++;continue}if(F==="]"&&Y&&!z){G=q+1;break}if(Y=!0,F==="\\"){if(!z){z=!0,q++;continue}}if(F==="["&&!z){for(let[C,[_,m,A]]of Object.entries(yn))if(x.startsWith(C,q)){if(H)return["$.",!1,x.length-Q,!0];if(q+=C.length,A)X.push(_);else Z.push(_);$=$||m;continue x}}if(z=!1,H){if(F>H)Z.push(DJ(H)+"-"+DJ(F));else if(F===H)Z.push(DJ(F));H="",q++;continue}if(x.startsWith("-]",q+1)){Z.push(DJ(F+"-")),q+=2;continue}if(x.startsWith("-",q+1)){H=F,q+=2;continue}Z.push(DJ(F)),q++}if(G<q)return["",!1,0,!1];if(!Z.length&&!X.length)return["$.",!1,x.length-Q,!0];if(X.length===0&&Z.length===1&&/^\\?.$/.test(Z[0])&&!W){let F=Z[0].length===2?Z[0].slice(-1):Z[0];return[un(F),!1,G-Q,!1]}let U="["+(W?"^":"")+MF(Z)+"]",M="["+(W?"":"^")+MF(X)+"]";return[Z.length&&X.length?"("+U+"|"+M+")":Z.length?U:M,$,G-Q,!0]};var N8=(x,{windowsPathsNoEscape:J=!1,magicalBraces:Q=!0}={})=>{if(Q)return J?x.replace(/\[([^\/\\])\]/g,"$1"):x.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");return J?x.replace(/\[([^\/\\{}])\]/g,"$1"):x.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1")};var hn=new Set(["!","?","+","*","@"]),DF=(x)=>hn.has(x),gn="(?!(?:^|/)\\.\\.?(?:$|/))",vX="(?!\\.)",dn=new Set(["[","."]),ln=new Set(["..","."]),on=new Set("().*{}+?[]^$\\!"),sn=(x)=>x.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),_z="[^/]",FF=_z+"*?",wF=_z+"+?";class z3{type;#x;#Q;#q=!1;#X=[];#Y;#w;#N;#W=!1;#$;#G;#V=!1;constructor(x,J,Q={}){if(this.type=x,x)this.#Q=!0;if(this.#Y=J,this.#x=this.#Y?this.#Y.#x:this,this.#$=this.#x===this?Q:this.#x.#$,this.#N=this.#x===this?[]:this.#x.#N,x==="!"&&!this.#x.#W)this.#N.push(this);this.#w=this.#Y?this.#Y.#X.length:0}get hasMagic(){if(this.#Q!==void 0)return this.#Q;for(let x of this.#X){if(typeof x==="string")continue;if(x.type||x.hasMagic)return this.#Q=!0}return this.#Q}toString(){if(this.#G!==void 0)return this.#G;if(!this.type)return this.#G=this.#X.map((x)=>String(x)).join("");else return this.#G=this.type+"("+this.#X.map((x)=>String(x)).join("|")+")"}#K(){if(this!==this.#x)throw new Error("should only call on root");if(this.#W)return this;this.toString(),this.#W=!0;let x;while(x=this.#N.pop()){if(x.type!=="!")continue;let J=x,Q=J.#Y;while(Q){for(let Z=J.#w+1;!Q.type&&Z<Q.#X.length;Z++)for(let X of x.#X){if(typeof X==="string")throw new Error("string part in extglob AST??");X.copyIn(Q.#X[Z])}J=Q,Q=J.#Y}}return this}push(...x){for(let J of x){if(J==="")continue;if(typeof J!=="string"&&!(J instanceof z3&&J.#Y===this))throw new Error("invalid part: "+J);this.#X.push(J)}}toJSON(){let x=this.type===null?this.#X.slice().map((J)=>typeof J==="string"?J:J.toJSON()):[this.type,...this.#X.map((J)=>J.toJSON())];if(this.isStart()&&!this.type)x.unshift([]);if(this.isEnd()&&(this===this.#x||this.#x.#W&&this.#Y?.type==="!"))x.push({});return x}isStart(){if(this.#x===this)return!0;if(!this.#Y?.isStart())return!1;if(this.#w===0)return!0;let x=this.#Y;for(let J=0;J<this.#w;J++){let Q=x.#X[J];if(!(Q instanceof z3&&Q.type==="!"))return!1}return!0}isEnd(){if(this.#x===this)return!0;if(this.#Y?.type==="!")return!0;if(!this.#Y?.isEnd())return!1;if(!this.type)return this.#Y?.isEnd();let x=this.#Y?this.#Y.#X.length:0;return this.#w===x-1}copyIn(x){if(typeof x==="string")this.push(x);else this.push(x.clone(this))}clone(x){let J=new z3(this.type,x);for(let Q of this.#X)J.copyIn(Q);return J}static#Z(x,J,Q,Z){let X=!1,q=!1,Y=-1,$=!1;if(J.type===null){let U=Q,M="";while(U<x.length){let N=x.charAt(U++);if(X||N==="\\"){X=!X,M+=N;continue}if(q){if(U===Y+1){if(N==="^"||N==="!")$=!0}else if(N==="]"&&!(U===Y+2&&$))q=!1;M+=N;continue}else if(N==="["){q=!0,Y=U,$=!1,M+=N;continue}if(!Z.noext&&DF(N)&&x.charAt(U)==="("){J.push(M),M="";let F=new z3(N,J);U=z3.#Z(x,F,U,Z),J.push(F);continue}M+=N}return J.push(M),U}let z=Q+1,W=new z3(null,J),G=[],H="";while(z<x.length){let U=x.charAt(z++);if(X||U==="\\"){X=!X,H+=U;continue}if(q){if(z===Y+1){if(U==="^"||U==="!")$=!0}else if(U==="]"&&!(z===Y+2&&$))q=!1;H+=U;continue}else if(U==="["){q=!0,Y=z,$=!1,H+=U;continue}if(DF(U)&&x.charAt(z)==="("){W.push(H),H="";let M=new z3(U,W);W.push(M),z=z3.#Z(x,M,z,Z);continue}if(U==="|"){W.push(H),H="",G.push(W),W=new z3(null,J);continue}if(U===")"){if(H===""&&J.#X.length===0)J.#V=!0;return W.push(H),H="",J.push(...G,W),z}H+=U}return J.type=null,J.#Q=void 0,J.#X=[x.substring(Q-1)],z}static fromGlob(x,J={}){let Q=new z3(null,void 0,J);return z3.#Z(x,Q,0,J),Q}toMMPattern(){if(this!==this.#x)return this.#x.toMMPattern();let x=this.toString(),[J,Q,Z,X]=this.toRegExpSource();if(!(Z||this.#Q||this.#$.nocase&&!this.#$.nocaseMagicOnly&&x.toUpperCase()!==x.toLowerCase()))return Q;let Y=(this.#$.nocase?"i":"")+(X?"u":"");return Object.assign(new RegExp(`^${J}$`,Y),{_src:J,_glob:x})}get options(){return this.#$}toRegExpSource(x){let J=x??!!this.#$.dot;if(this.#x===this)this.#K();if(!this.type){let $=this.isStart()&&this.isEnd()&&!this.#X.some((U)=>typeof U!=="string"),z=this.#X.map((U)=>{let[M,N,F,C]=typeof U==="string"?z3.#P(U,this.#Q,$):U.toRegExpSource(x);return this.#Q=this.#Q||F,this.#q=this.#q||C,M}).join(""),W="";if(this.isStart()){if(typeof this.#X[0]==="string"){if(!(this.#X.length===1&&ln.has(this.#X[0]))){let M=dn,N=J&&M.has(z.charAt(0))||z.startsWith("\\.")&&M.has(z.charAt(2))||z.startsWith("\\.\\.")&&M.has(z.charAt(4)),F=!J&&!x&&M.has(z.charAt(0));W=N?gn:F?vX:""}}}let G="";if(this.isEnd()&&this.#x.#W&&this.#Y?.type==="!")G="(?:$|\\/)";return[W+z+G,N8(z),this.#Q=!!this.#Q,this.#q]}let Q=this.type==="*"||this.type==="+",Z=this.type==="!"?"(?:(?!(?:":"(?:",X=this.#H(J);if(this.isStart()&&this.isEnd()&&!X&&this.type!=="!"){let $=this.toString();return this.#X=[$],this.type=null,this.#Q=void 0,[$,N8(this.toString()),!1,!1]}let q=!Q||x||J||!vX?"":this.#H(!0);if(q===X)q="";if(q)X=`(?:${X})(?:${q})*?`;let Y="";if(this.type==="!"&&this.#V)Y=(this.isStart()&&!J?vX:"")+wF;else{let $=this.type==="!"?"))"+(this.isStart()&&!J&&!x?vX:"")+FF+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&q?")":this.type==="*"&&q?")?":`)${this.type}`;Y=Z+X+$}return[Y,N8(X),this.#Q=!!this.#Q,this.#q]}#H(x){return this.#X.map((J)=>{if(typeof J==="string")throw new Error("string type in extglob ast??");let[Q,Z,X,q]=J.toRegExpSource(x);return this.#q=this.#q||q,Q}).filter((J)=>!(this.isStart()&&this.isEnd())||!!J).join("|")}static#P(x,J,Q=!1){let Z=!1,X="",q=!1;for(let Y=0;Y<x.length;Y++){let $=x.charAt(Y);if(Z){Z=!1,X+=(on.has($)?"\\":"")+$;continue}if($==="\\"){if(Y===x.length-1)X+="\\\\";else Z=!0;continue}if($==="["){let[z,W,G,H]=NF(x,Y);if(G){X+=z,q=q||W,Y+=G-1,J=J||H;continue}}if($==="*"){X+=Q&&x==="*"?wF:FF,J=!0;continue}if($==="?"){X+=_z,J=!0;continue}X+=sn($)}return[X,N8(x),!!J,q]}}var m9=(x,{windowsPathsNoEscape:J=!1,magicalBraces:Q=!1}={})=>{if(Q)return J?x.replace(/[?*()[\]{}]/g,"[$&]"):x.replace(/[?*()[\]\\{}]/g,"\\$&");return J?x.replace(/[?*()[\]]/g,"[$&]"):x.replace(/[?*()[\]\\]/g,"\\$&")};var c3=(x,J,Q={})=>{if(NJ(J),!Q.nocomment&&J.charAt(0)==="#")return!1;return new d4(J,Q).match(x)},nn=/^\*+([^+@!?\*\[\(]*)$/,an=(x)=>(J)=>!J.startsWith(".")&&J.endsWith(x),rn=(x)=>(J)=>J.endsWith(x),tn=(x)=>{return x=x.toLowerCase(),(J)=>!J.startsWith(".")&&J.toLowerCase().endsWith(x)},en=(x)=>{return x=x.toLowerCase(),(J)=>J.toLowerCase().endsWith(x)},xa=/^\*+\.\*+$/,Ja=(x)=>!x.startsWith(".")&&x.includes("."),Qa=(x)=>x!=="."&&x!==".."&&x.includes("."),Za=/^\.\*+$/,Xa=(x)=>x!=="."&&x!==".."&&x.startsWith("."),qa=/^\*+$/,Ya=(x)=>x.length!==0&&!x.startsWith("."),$a=(x)=>x.length!==0&&x!=="."&&x!=="..",Ka=/^\?+([^+@!?\*\[\(]*)?$/,za=([x,J=""])=>{let Q=_F([x]);if(!J)return Q;return J=J.toLowerCase(),(Z)=>Q(Z)&&Z.toLowerCase().endsWith(J)},Wa=([x,J=""])=>{let Q=LF([x]);if(!J)return Q;return J=J.toLowerCase(),(Z)=>Q(Z)&&Z.toLowerCase().endsWith(J)},Va=([x,J=""])=>{let Q=LF([x]);return!J?Q:(Z)=>Q(Z)&&Z.endsWith(J)},Ga=([x,J=""])=>{let Q=_F([x]);return!J?Q:(Z)=>Q(Z)&&Z.endsWith(J)},_F=([x])=>{let J=x.length;return(Q)=>Q.length===J&&!Q.startsWith(".")},LF=([x])=>{let J=x.length;return(Q)=>Q.length===J&&Q!=="."&&Q!==".."},jF=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",PF={win32:{sep:"\\"},posix:{sep:"/"}},Ha=jF==="win32"?PF.win32.sep:PF.posix.sep;c3.sep=Ha;var W3=Symbol("globstar **");c3.GLOBSTAR=W3;var Ua="[^/]",Ba=Ua+"*?",Ma="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Na="(?:(?!(?:\\/|^)\\.).)*?",Da=(x,J={})=>(Q)=>c3(Q,x,J);c3.filter=Da;var i4=(x,J={})=>Object.assign({},x,J),Fa=(x)=>{if(!x||typeof x!=="object"||!Object.keys(x).length)return c3;let J=c3;return Object.assign((Z,X,q={})=>J(Z,X,i4(x,q)),{Minimatch:class Z extends J.Minimatch{constructor(X,q={}){super(X,i4(x,q))}static defaults(X){return J.defaults(i4(x,X)).Minimatch}},AST:class Z extends J.AST{constructor(X,q,Y={}){super(X,q,i4(x,Y))}static fromGlob(X,q={}){return J.AST.fromGlob(X,i4(x,q))}},unescape:(Z,X={})=>J.unescape(Z,i4(x,X)),escape:(Z,X={})=>J.escape(Z,i4(x,X)),filter:(Z,X={})=>J.filter(Z,i4(x,X)),defaults:(Z)=>J.defaults(i4(x,Z)),makeRe:(Z,X={})=>J.makeRe(Z,i4(x,X)),braceExpand:(Z,X={})=>J.braceExpand(Z,i4(x,X)),match:(Z,X,q={})=>J.match(Z,X,i4(x,q)),sep:J.sep,GLOBSTAR:W3})};c3.defaults=Fa;var OF=(x,J={})=>{if(NJ(x),J.nobrace||!/\{(?:(?!\{).)*\}/.test(x))return[x];return BF(x)};c3.braceExpand=OF;var wa=(x,J={})=>new d4(x,J).makeRe();c3.makeRe=wa;var Pa=(x,J,Q={})=>{let Z=new d4(J,Q);if(x=x.filter((X)=>Z.match(X)),Z.options.nonull&&!x.length)x.push(J);return x};c3.match=Pa;var CF=/[?*]|[+@!]\(.*?\)|\[|\]/,Ca=(x)=>x.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class d4{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(x,J={}){if(NJ(x),J=J||{},this.options=J,this.pattern=x,this.platform=J.platform||jF,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!J.windowsPathsNoEscape||J.allowWindowsEscape===!1,this.windowsPathsNoEscape)this.pattern=this.pattern.replace(/\\/g,"/");this.preserveMultipleSlashes=!!J.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!J.nonegate,this.comment=!1,this.empty=!1,this.partial=!!J.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=J.windowsNoMagicRoot!==void 0?J.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 x of this.set)for(let J of x)if(typeof J!=="string")return!0;return!1}debug(...x){}make(){let x=this.pattern,J=this.options;if(!J.nocomment&&x.charAt(0)==="#"){this.comment=!0;return}if(!x){this.empty=!0;return}if(this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],J.debug)this.debug=(...X)=>console.error(...X);this.debug(this.pattern,this.globSet);let Q=this.globSet.map((X)=>this.slashSplit(X));this.globParts=this.preprocess(Q),this.debug(this.pattern,this.globParts);let Z=this.globParts.map((X,q,Y)=>{if(this.isWindows&&this.windowsNoMagicRoot){let $=X[0]===""&&X[1]===""&&(X[2]==="?"||!CF.test(X[2]))&&!CF.test(X[3]),z=/^[a-z]:/i.test(X[0]);if($)return[...X.slice(0,4),...X.slice(4).map((W)=>this.parse(W))];else if(z)return[X[0],...X.slice(1).map((W)=>this.parse(W))]}return X.map(($)=>this.parse($))});if(this.debug(this.pattern,Z),this.set=Z.filter((X)=>X.indexOf(!1)===-1),this.isWindows)for(let X=0;X<this.set.length;X++){let q=this.set[X];if(q[0]===""&&q[1]===""&&this.globParts[X][2]==="?"&&typeof q[3]==="string"&&/^[a-z]:$/i.test(q[3]))q[2]="?"}this.debug(this.pattern,this.set)}preprocess(x){if(this.options.noglobstar){for(let Q=0;Q<x.length;Q++)for(let Z=0;Z<x[Q].length;Z++)if(x[Q][Z]==="**")x[Q][Z]="*"}let{optimizationLevel:J=1}=this.options;if(J>=2)x=this.firstPhasePreProcess(x),x=this.secondPhasePreProcess(x);else if(J>=1)x=this.levelOneOptimize(x);else x=this.adjascentGlobstarOptimize(x);return x}adjascentGlobstarOptimize(x){return x.map((J)=>{let Q=-1;while((Q=J.indexOf("**",Q+1))!==-1){let Z=Q;while(J[Z+1]==="**")Z++;if(Z!==Q)J.splice(Q,Z-Q)}return J})}levelOneOptimize(x){return x.map((J)=>{return J=J.reduce((Q,Z)=>{let X=Q[Q.length-1];if(Z==="**"&&X==="**")return Q;if(Z===".."){if(X&&X!==".."&&X!=="."&&X!=="**")return Q.pop(),Q}return Q.push(Z),Q},[]),J.length===0?[""]:J})}levelTwoFileOptimize(x){if(!Array.isArray(x))x=this.slashSplit(x);let J=!1;do{if(J=!1,!this.preserveMultipleSlashes){for(let Z=1;Z<x.length-1;Z++){let X=x[Z];if(Z===1&&X===""&&x[0]==="")continue;if(X==="."||X==="")J=!0,x.splice(Z,1),Z--}if(x[0]==="."&&x.length===2&&(x[1]==="."||x[1]===""))J=!0,x.pop()}let Q=0;while((Q=x.indexOf("..",Q+1))!==-1){let Z=x[Q-1];if(Z&&Z!=="."&&Z!==".."&&Z!=="**")J=!0,x.splice(Q-1,2),Q-=2}}while(J);return x.length===0?[""]:x}firstPhasePreProcess(x){let J=!1;do{J=!1;for(let Q of x){let Z=-1;while((Z=Q.indexOf("**",Z+1))!==-1){let q=Z;while(Q[q+1]==="**")q++;if(q>Z)Q.splice(Z+1,q-Z);let Y=Q[Z+1],$=Q[Z+2],z=Q[Z+3];if(Y!=="..")continue;if(!$||$==="."||$===".."||!z||z==="."||z==="..")continue;J=!0,Q.splice(Z,1);let W=Q.slice(0);W[Z]="**",x.push(W),Z--}if(!this.preserveMultipleSlashes){for(let q=1;q<Q.length-1;q++){let Y=Q[q];if(q===1&&Y===""&&Q[0]==="")continue;if(Y==="."||Y==="")J=!0,Q.splice(q,1),q--}if(Q[0]==="."&&Q.length===2&&(Q[1]==="."||Q[1]===""))J=!0,Q.pop()}let X=0;while((X=Q.indexOf("..",X+1))!==-1){let q=Q[X-1];if(q&&q!=="."&&q!==".."&&q!=="**"){J=!0;let $=X===1&&Q[X+1]==="**"?["."]:[];if(Q.splice(X-1,2,...$),Q.length===0)Q.push("");X-=2}}}}while(J);return x}secondPhasePreProcess(x){for(let J=0;J<x.length-1;J++)for(let Q=J+1;Q<x.length;Q++){let Z=this.partsMatch(x[J],x[Q],!this.preserveMultipleSlashes);if(Z){x[J]=[],x[Q]=Z;break}}return x.filter((J)=>J.length)}partsMatch(x,J,Q=!1){let Z=0,X=0,q=[],Y="";while(Z<x.length&&X<J.length)if(x[Z]===J[X])q.push(Y==="b"?J[X]:x[Z]),Z++,X++;else if(Q&&x[Z]==="**"&&J[X]===x[Z+1])q.push(x[Z]),Z++;else if(Q&&J[X]==="**"&&x[Z]===J[X+1])q.push(J[X]),X++;else if(x[Z]==="*"&&J[X]&&(this.options.dot||!J[X].startsWith("."))&&J[X]!=="**"){if(Y==="b")return!1;Y="a",q.push(x[Z]),Z++,X++}else if(J[X]==="*"&&x[Z]&&(this.options.dot||!x[Z].startsWith("."))&&x[Z]!=="**"){if(Y==="a")return!1;Y="b",q.push(J[X]),Z++,X++}else return!1;return x.length===J.length&&q}parseNegate(){if(this.nonegate)return;let x=this.pattern,J=!1,Q=0;for(let Z=0;Z<x.length&&x.charAt(Z)==="!";Z++)J=!J,Q++;if(Q)this.pattern=x.slice(Q);this.negate=J}matchOne(x,J,Q=!1){let Z=this.options;if(this.isWindows){let N=typeof x[0]==="string"&&/^[a-z]:$/i.test(x[0]),F=!N&&x[0]===""&&x[1]===""&&x[2]==="?"&&/^[a-z]:$/i.test(x[3]),C=typeof J[0]==="string"&&/^[a-z]:$/i.test(J[0]),_=!C&&J[0]===""&&J[1]===""&&J[2]==="?"&&typeof J[3]==="string"&&/^[a-z]:$/i.test(J[3]),m=F?3:N?0:void 0,A=_?3:C?0:void 0;if(typeof m==="number"&&typeof A==="number"){let[u,r]=[x[m],J[A]];if(u.toLowerCase()===r.toLowerCase()){if(J[A]=u,A>m)J=J.slice(A);else if(m>A)x=x.slice(m)}}}let{optimizationLevel:X=1}=this.options;if(X>=2)x=this.levelTwoFileOptimize(x);this.debug("matchOne",this,{file:x,pattern:J}),this.debug("matchOne",x.length,J.length);for(var q=0,Y=0,$=x.length,z=J.length;q<$&&Y<z;q++,Y++){this.debug("matchOne loop");var W=J[Y],G=x[q];if(this.debug(J,W,G),W===!1)return!1;if(W===W3){this.debug("GLOBSTAR",[J,W,G]);var H=q,U=Y+1;if(U===z){this.debug("** at the end");for(;q<$;q++)if(x[q]==="."||x[q]===".."||!Z.dot&&x[q].charAt(0)===".")return!1;return!0}while(H<$){var M=x[H];if(this.debug(`
|
|
86
|
+
}`;var V1=pD(function(){return A1(O,f0+"return "+G0).apply(x,T)});if(V1.source=G0,xz(V1))throw V1;return V1}function Ao(K){return u1(K).toLowerCase()}function Eo(K){return u1(K).toUpperCase()}function fo(K,V,B){if(K=u1(K),K&&(B||V===x))return sM(K);if(!K||!(V=N4(V)))return K;var D=G8(K),P=G8(V),O=nM(D,P),T=aM(D,P)+1;return z5(D,O,T).join("")}function ko(K,V,B){if(K=u1(K),K&&(B||V===x))return K.slice(0,tM(K)+1);if(!K||!(V=N4(V)))return K;var D=G8(K),P=aM(D,G8(V))+1;return z5(D,0,P).join("")}function co(K,V,B){if(K=u1(K),K&&(B||V===x))return K.replace(H9,"");if(!K||!(V=N4(V)))return K;var D=G8(K),P=nM(D,G8(V));return z5(D,P).join("")}function bo(K,V){var B=j,D=I;if(H2(V)){var P="separator"in V?V.separator:P;B="length"in V?K1(V.length):B,D="omission"in V?N4(V.omission):D}K=u1(K);var O=K.length;if(M9(K)){var T=G8(K);O=T.length}if(B>=O)return K;var c=B-N9(D);if(c<1)return D;var s=T?z5(T,0,c).join(""):K.slice(0,c);if(P===x)return s+D;if(T)c+=s.length-c;if(Jz(P)){if(K.slice(c).search(P)){var $0,K0=s;if(!P.global)P=NK(P.source,u1(MM.exec(P))+"g");P.lastIndex=0;while($0=P.exec(K0))var G0=$0.index;s=s.slice(0,G0===x?c:G0)}}else if(K.indexOf(N4(P),c)!=c){var R0=s.lastIndexOf(P);if(R0>-1)s=s.slice(0,R0)}return s+D}function po(K){return K=u1(K),K&&J7.test(K)?K.replace(vZ,Uh):K}var yo=_9(function(K,V,B){return K+(B?" ":"")+V.toUpperCase()}),Xz=yN("toUpperCase");function bD(K,V,B){if(K=u1(K),V=B?x:V,V===x)return zh(K)?Nh(K):xh(K);return K.match(V)||[]}var pD=H1(function(K,V){try{return B4(K,x,V)}catch(B){return xz(B)?B:new Z1(B)}}),uo=C6(function(K,V){return k4(V,function(B){B=u8(B),w6(K,B,tK(K[B],K))}),K});function ho(K){var V=K==null?0:K.length,B=d0();return K=!V?[]:W2(K,function(D){if(typeof D[1]!="function")throw new c4(X);return[B(D[0]),D[1]]}),H1(function(D){var P=-1;while(++P<V){var O=K[P];if(B4(O[0],this,D))return B4(O[1],this,D)}})}function go(K){return Ug(p4(K,W))}function qz(K){return function(){return K}}function io(K,V){return K==null||K!==K?V:K}var lo=hN(),oo=hN(!0);function a3(K){return K}function Yz(K){return DN(typeof K=="function"?K:p4(K,W))}function so(K){return wN(p4(K,W))}function no(K,V){return PN(K,p4(V,W))}var ao=H1(function(K,V){return function(B){return KJ(B,K,V)}}),ro=H1(function(K,V){return function(B){return KJ(K,B,V)}});function $z(K,V,B){var D=n2(V),P=WX(V,D);if(B==null&&!(H2(V)&&(P.length||!D.length)))B=V,V=K,K=this,P=WX(V,n2(V));var O=!(H2(B)&&("chain"in B))||!!B.chain,T=L6(K);return k4(P,function(c){var s=V[c];if(K[c]=s,T)K.prototype[c]=function(){var $0=this.__chain__;if(O||$0){var K0=K(this.__wrapped__),G0=K0.__actions__=o3(this.__actions__);return G0.push({func:s,args:arguments,thisArg:K}),K0.__chain__=$0,K0}return s.apply(K,Q5([this.value()],arguments))}}),K}function to(){if(s2._===this)s2._=_h;return this}function Kz(){}function eo(K){return K=K1(K),H1(function(V){return CN(V,K)})}var xs=pK(W2),Js=pK(gM),Qs=pK(WK);function yD(K){return lK(K)?VK(u8(K)):Tg(K)}function Zs(K){return function(V){return K==null?x:$7(K,V)}}var Xs=iN(),qs=iN(!0);function zz(){return[]}function Wz(){return!1}function Ys(){return{}}function $s(){return""}function Ks(){return!0}function zs(K,V){if(K=K1(K),K<1||K>l)return[];var B=i0,D=P3(K,i0);V=d0(V),K-=i0;var P=UK(D,V);while(++B<K)V(B);return P}function Ws(K){if(X1(K))return W2(K,u8);return D4(K)?[K]:o3(YD(u1(K)))}function Vs(K){var V=++Ph;return u1(K)+V}var Gs=MX(function(K,V){return K+V},0),Hs=yK("ceil"),Us=MX(function(K,V){return K/V},1),Bs=yK("floor");function Ms(K){return K&&K.length?zX(K,a3,jK):x}function Ns(K,V){return K&&K.length?zX(K,d0(V,2),jK):x}function Ds(K){return lM(K,a3)}function Fs(K,V){return lM(K,d0(V,2))}function ws(K){return K&&K.length?zX(K,a3,RK):x}function Ps(K,V){return K&&K.length?zX(K,d0(V,2),RK):x}var Cs=MX(function(K,V){return K*V},1),_s=yK("round"),Ls=MX(function(K,V){return K-V},0);function js(K){return K&&K.length?HK(K,a3):0}function Os(K,V){return K&&K.length?HK(K,d0(V,2)):0}if(L.after=od,L.ary=ND,L.assign=El,L.assignIn=TD,L.assignInWith=RX,L.assignWith=fl,L.at=kl,L.before=DD,L.bind=tK,L.bindAll=uo,L.bindKey=FD,L.castArray=ql,L.chain=UD,L.chunk=Ui,L.compact=Bi,L.concat=Mi,L.cond=ho,L.conforms=go,L.constant=qz,L.countBy=Ld,L.create=cl,L.curry=wD,L.curryRight=PD,L.debounce=CD,L.defaults=bl,L.defaultsDeep=pl,L.defer=sd,L.delay=nd,L.difference=Ni,L.differenceBy=Di,L.differenceWith=Fi,L.drop=wi,L.dropRight=Pi,L.dropRightWhile=Ci,L.dropWhile=_i,L.fill=Li,L.filter=Od,L.flatMap=Rd,L.flatMapDeep=Id,L.flatMapDepth=Td,L.flatten=WD,L.flattenDeep=ji,L.flattenDepth=Oi,L.flip=ad,L.flow=lo,L.flowRight=oo,L.fromPairs=mi,L.functions=ll,L.functionsIn=ol,L.groupBy=vd,L.initial=Ri,L.intersection=Ii,L.intersectionBy=Ti,L.intersectionWith=vi,L.invert=nl,L.invertBy=al,L.invokeMap=Ed,L.iteratee=Yz,L.keyBy=fd,L.keys=n2,L.keysIn=n3,L.map=_X,L.mapKeys=tl,L.mapValues=el,L.matches=so,L.matchesProperty=no,L.memoize=jX,L.merge=xo,L.mergeWith=vD,L.method=ao,L.methodOf=ro,L.mixin=$z,L.negate=OX,L.nthArg=eo,L.omit=Jo,L.omitBy=Qo,L.once=rd,L.orderBy=kd,L.over=xs,L.overArgs=td,L.overEvery=Js,L.overSome=Qs,L.partial=eK,L.partialRight=_D,L.partition=cd,L.pick=Zo,L.pickBy=AD,L.property=yD,L.propertyOf=Zs,L.pull=ki,L.pullAll=GD,L.pullAllBy=ci,L.pullAllWith=bi,L.pullAt=pi,L.range=Xs,L.rangeRight=qs,L.rearg=ed,L.reject=yd,L.remove=yi,L.rest=xl,L.reverse=aK,L.sampleSize=hd,L.set=qo,L.setWith=Yo,L.shuffle=gd,L.slice=ui,L.sortBy=ld,L.sortedUniq=si,L.sortedUniqBy=ni,L.split=Ro,L.spread=Jl,L.tail=ai,L.take=ri,L.takeRight=ti,L.takeRightWhile=ei,L.takeWhile=xd,L.tap=Bd,L.throttle=Ql,L.thru=CX,L.toArray=SD,L.toPairs=ED,L.toPairsIn=fD,L.toPath=Ws,L.toPlainObject=ID,L.transform=$o,L.unary=Zl,L.union=Jd,L.unionBy=Qd,L.unionWith=Zd,L.uniq=Xd,L.uniqBy=qd,L.uniqWith=Yd,L.unset=Ko,L.unzip=rK,L.unzipWith=HD,L.update=zo,L.updateWith=Wo,L.values=O9,L.valuesIn=Vo,L.without=$d,L.words=bD,L.wrap=Xl,L.xor=Kd,L.xorBy=zd,L.xorWith=Wd,L.zip=Vd,L.zipObject=Gd,L.zipObjectDeep=Hd,L.zipWith=Ud,L.entries=ED,L.entriesIn=fD,L.extend=TD,L.extendWith=RX,$z(L,L),L.add=Gs,L.attempt=pD,L.camelCase=Bo,L.capitalize=kD,L.ceil=Hs,L.clamp=Go,L.clone=Yl,L.cloneDeep=Kl,L.cloneDeepWith=zl,L.cloneWith=$l,L.conformsTo=Wl,L.deburr=cD,L.defaultTo=io,L.divide=Us,L.endsWith=Mo,L.eq=U8,L.escape=No,L.escapeRegExp=Do,L.every=jd,L.find=md,L.findIndex=KD,L.findKey=yl,L.findLast=Sd,L.findLastIndex=zD,L.findLastKey=ul,L.floor=Bs,L.forEach=BD,L.forEachRight=MD,L.forIn=hl,L.forInRight=gl,L.forOwn=il,L.forOwnRight=dl,L.get=Qz,L.gt=Vl,L.gte=Gl,L.has=sl,L.hasIn=Zz,L.head=VD,L.identity=a3,L.includes=Ad,L.indexOf=Si,L.inRange=Ho,L.invoke=rl,L.isArguments=W7,L.isArray=X1,L.isArrayBuffer=Hl,L.isArrayLike=s3,L.isArrayLikeObject=L2,L.isBoolean=Ul,L.isBuffer=W5,L.isDate=Bl,L.isElement=Ml,L.isEmpty=Nl,L.isEqual=Dl,L.isEqualWith=Fl,L.isError=xz,L.isFinite=wl,L.isFunction=L6,L.isInteger=LD,L.isLength=mX,L.isMap=jD,L.isMatch=Pl,L.isMatchWith=Cl,L.isNaN=_l,L.isNative=Ll,L.isNil=Ol,L.isNull=jl,L.isNumber=OD,L.isObject=H2,L.isObjectLike=F2,L.isPlainObject=UJ,L.isRegExp=Jz,L.isSafeInteger=ml,L.isSet=mD,L.isString=SX,L.isSymbol=D4,L.isTypedArray=j9,L.isUndefined=Sl,L.isWeakMap=Rl,L.isWeakSet=Il,L.join=Ai,L.kebabCase=Fo,L.last=u4,L.lastIndexOf=Ei,L.lowerCase=wo,L.lowerFirst=Po,L.lt=Tl,L.lte=vl,L.max=Ms,L.maxBy=Ns,L.mean=Ds,L.meanBy=Fs,L.min=ws,L.minBy=Ps,L.stubArray=zz,L.stubFalse=Wz,L.stubObject=Ys,L.stubString=$s,L.stubTrue=Ks,L.multiply=Cs,L.nth=fi,L.noConflict=to,L.noop=Kz,L.now=LX,L.pad=Co,L.padEnd=_o,L.padStart=Lo,L.parseInt=jo,L.random=Uo,L.reduce=bd,L.reduceRight=pd,L.repeat=Oo,L.replace=mo,L.result=Xo,L.round=_s,L.runInContext=g,L.sample=ud,L.size=id,L.snakeCase=So,L.some=dd,L.sortedIndex=hi,L.sortedIndexBy=gi,L.sortedIndexOf=ii,L.sortedLastIndex=di,L.sortedLastIndexBy=li,L.sortedLastIndexOf=oi,L.startCase=Io,L.startsWith=To,L.subtract=Ls,L.sum=js,L.sumBy=Os,L.template=vo,L.times=zs,L.toFinite=j6,L.toInteger=K1,L.toLength=RD,L.toLower=Ao,L.toNumber=h4,L.toSafeInteger=Al,L.toString=u1,L.toUpper=Eo,L.trim=fo,L.trimEnd=ko,L.trimStart=co,L.truncate=bo,L.unescape=po,L.uniqueId=Vs,L.upperCase=yo,L.upperFirst=Xz,L.each=BD,L.eachRight=MD,L.first=VD,$z(L,function(){var K={};return p8(L,function(V,B){if(!y1.call(L.prototype,B))K[B]=V}),K}(),{chain:!1}),L.VERSION=J,k4(["bind","bindKey","curry","curryRight","partial","partialRight"],function(K){L[K].placeholder=L}),k4(["drop","take"],function(K,V){F1.prototype[K]=function(B){B=B===x?1:g2(K1(B),0);var D=this.__filtered__&&!V?new F1(this):this.clone();if(D.__filtered__)D.__takeCount__=P3(B,D.__takeCount__);else D.__views__.push({size:P3(B,i0),type:K+(D.__dir__<0?"Right":"")});return D},F1.prototype[K+"Right"]=function(B){return this.reverse()[K](B).reverse()}}),k4(["filter","map","takeWhile"],function(K,V){var B=V+1,D=B==V0||B==o;F1.prototype[K]=function(P){var O=this.clone();return O.__iteratees__.push({iteratee:d0(P,3),type:B}),O.__filtered__=O.__filtered__||D,O}}),k4(["head","last"],function(K,V){var B="take"+(V?"Right":"");F1.prototype[K]=function(){return this[B](1).value()[0]}}),k4(["initial","tail"],function(K,V){var B="drop"+(V?"":"Right");F1.prototype[K]=function(){return this.__filtered__?new F1(this):this[B](1)}}),F1.prototype.compact=function(){return this.filter(a3)},F1.prototype.find=function(K){return this.filter(K).head()},F1.prototype.findLast=function(K){return this.reverse().find(K)},F1.prototype.invokeMap=H1(function(K,V){if(typeof K=="function")return new F1(this);return this.map(function(B){return KJ(B,K,V)})}),F1.prototype.reject=function(K){return this.filter(OX(d0(K)))},F1.prototype.slice=function(K,V){K=K1(K);var B=this;if(B.__filtered__&&(K>0||V<0))return new F1(B);if(K<0)B=B.takeRight(-K);else if(K)B=B.drop(K);if(V!==x)V=K1(V),B=V<0?B.dropRight(-V):B.take(V-K);return B},F1.prototype.takeRightWhile=function(K){return this.reverse().takeWhile(K).reverse()},F1.prototype.toArray=function(){return this.take(i0)},p8(F1.prototype,function(K,V){var B=/^(?:filter|find|map|reject)|While$/.test(V),D=/^(?:head|last)$/.test(V),P=L[D?"take"+(V=="last"?"Right":""):V],O=D||/^find/.test(V);if(!P)return;L.prototype[V]=function(){var T=this.__wrapped__,c=D?[1]:arguments,s=T instanceof F1,$0=c[0],K0=s||X1(T),G0=function(N1){var _1=P.apply(L,Q5([N1],c));return D&&R0?_1[0]:_1};if(K0&&B&&typeof $0=="function"&&$0.length!=1)s=K0=!1;var R0=this.__chain__,f0=!!this.__actions__.length,l0=O&&!R0,V1=s&&!f0;if(!O&&K0){T=V1?T:new F1(this);var o0=K.apply(T,c);return o0.__actions__.push({func:CX,args:[G0],thisArg:x}),new b4(o0,R0)}if(l0&&V1)return K.apply(this,c);return o0=this.thru(G0),l0?D?o0.value()[0]:o0.value():o0}}),k4(["pop","push","shift","sort","splice","unshift"],function(K){var V=sZ[K],B=/^(?:push|sort|unshift)$/.test(K)?"tap":"thru",D=/^(?:pop|shift)$/.test(K);L.prototype[K]=function(){var P=arguments;if(D&&!this.__chain__){var O=this.value();return V.apply(X1(O)?O:[],P)}return this[B](function(T){return V.apply(X1(T)?T:[],P)})}}),p8(F1.prototype,function(K,V){var B=L[V];if(B){var D=B.name+"";if(!y1.call(w9,D))w9[D]=[];w9[D].push({name:V,func:B})}}),w9[BX(x,F).name]=[{name:"wrapper",func:x}],F1.prototype.clone=ph,F1.prototype.reverse=yh,F1.prototype.value=uh,L.prototype.at=Md,L.prototype.chain=Nd,L.prototype.commit=Dd,L.prototype.next=Fd,L.prototype.plant=Pd,L.prototype.reverse=Cd,L.prototype.toJSON=L.prototype.valueOf=L.prototype.value=_d,L.prototype.first=L.prototype.head,JJ)L.prototype[JJ]=wd;return L},X5=Dh();if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)s2._=X5,define(function(){return X5});else if(Q7)(Q7.exports=X5)._=X5,YK._=X5;else s2._=X5}).call(QZ)});var gD="0.6.5";var KF=V7($F(),1),{program:qT0,createCommand:YT0,createArgument:$T0,createOption:KT0,CommanderError:zT0,InvalidArgumentError:WT0,InvalidOptionArgumentError:VT0,Command:g4,Argument:GT0,Option:HT0,Help:UT0}=KF.default;import V40 from"fs";var wz=(x,J,Q)=>{let Z=x instanceof RegExp?zF(x,Q):x,X=J instanceof RegExp?zF(J,Q):J,q=Z!==null&&X!=null&&_n(Z,X,Q);return q&&{start:q[0],end:q[1],pre:Q.slice(0,q[0]),body:Q.slice(q[0]+Z.length,q[1]),post:Q.slice(q[1]+X.length)}},zF=(x,J)=>{let Q=J.match(x);return Q?Q[0]:null},_n=(x,J,Q)=>{let Z,X,q,Y=void 0,$,z=Q.indexOf(x),W=Q.indexOf(J,z+1),G=z;if(z>=0&&W>0){if(x===J)return[z,W];Z=[],q=Q.length;while(G>=0&&!$){if(G===z)Z.push(G),z=Q.indexOf(x,G+1);else if(Z.length===1){let H=Z.pop();if(H!==void 0)$=[H,W]}else{if(X=Z.pop(),X!==void 0&&X<q)q=X,Y=W;W=Q.indexOf(J,G+1)}G=z<W&&z>=0?z:W}if(Z.length&&Y!==void 0)$=[q,Y]}return $};var WF="\x00SLASH"+Math.random()+"\x00",VF="\x00OPEN"+Math.random()+"\x00",Cz="\x00CLOSE"+Math.random()+"\x00",GF="\x00COMMA"+Math.random()+"\x00",HF="\x00PERIOD"+Math.random()+"\x00",Ln=new RegExp(WF,"g"),jn=new RegExp(VF,"g"),On=new RegExp(Cz,"g"),mn=new RegExp(GF,"g"),Sn=new RegExp(HF,"g"),Rn=/\\\\/g,In=/\\{/g,Tn=/\\}/g,vn=/\\,/g,An=/\\./g;function Pz(x){return!isNaN(x)?parseInt(x,10):x.charCodeAt(0)}function En(x){return x.replace(Rn,WF).replace(In,VF).replace(Tn,Cz).replace(vn,GF).replace(An,HF)}function fn(x){return x.replace(Ln,"\\").replace(jn,"{").replace(On,"}").replace(mn,",").replace(Sn,".")}function UF(x){if(!x)return[""];let J=[],Q=wz("{","}",x);if(!Q)return x.split(",");let{pre:Z,body:X,post:q}=Q,Y=Z.split(",");Y[Y.length-1]+="{"+X+"}";let $=UF(q);if(q.length)Y[Y.length-1]+=$.shift(),Y.push.apply(Y,$);return J.push.apply(J,Y),J}function BF(x){if(!x)return[];if(x.slice(0,2)==="{}")x="\\{\\}"+x.slice(2);return MJ(En(x),!0).map(fn)}function kn(x){return"{"+x+"}"}function cn(x){return/^-?0\d/.test(x)}function bn(x,J){return x<=J}function pn(x,J){return x>=J}function MJ(x,J){let Q=[],Z=wz("{","}",x);if(!Z)return[x];let X=Z.pre,q=Z.post.length?MJ(Z.post,!1):[""];if(/\$$/.test(Z.pre))for(let Y=0;Y<q.length;Y++){let $=X+"{"+Z.body+"}"+q[Y];Q.push($)}else{let Y=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(Z.body),$=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(Z.body),z=Y||$,W=Z.body.indexOf(",")>=0;if(!z&&!W){if(Z.post.match(/,(?!,).*\}/))return x=Z.pre+"{"+Z.body+Cz+Z.post,MJ(x);return[x]}let G;if(z)G=Z.body.split(/\.\./);else if(G=UF(Z.body),G.length===1&&G[0]!==void 0){if(G=MJ(G[0],!1).map(kn),G.length===1)return q.map((U)=>Z.pre+G[0]+U)}let H;if(z&&G[0]!==void 0&&G[1]!==void 0){let U=Pz(G[0]),M=Pz(G[1]),N=Math.max(G[0].length,G[1].length),F=G.length===3&&G[2]!==void 0?Math.abs(Pz(G[2])):1,C=bn;if(M<U)F*=-1,C=pn;let m=G.some(cn);H=[];for(let A=U;C(A,M);A+=F){let u;if($){if(u=String.fromCharCode(A),u==="\\")u=""}else if(u=String(A),m){let r=N-u.length;if(r>0){let n=new Array(r+1).join("0");if(A<0)u="-"+n+u.slice(1);else u=n+u}}H.push(u)}}else{H=[];for(let U=0;U<G.length;U++)H.push.apply(H,MJ(G[U],!1))}for(let U=0;U<H.length;U++)for(let M=0;M<q.length;M++){let N=X+H[U]+q[M];if(!J||z||N)Q.push(N)}}return Q}var NJ=(x)=>{if(typeof x!=="string")throw new TypeError("invalid pattern");if(x.length>65536)throw new TypeError("pattern is too long")};var yn={"[: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]},DJ=(x)=>x.replace(/[[\]\\-]/g,"\\$&"),un=(x)=>x.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),MF=(x)=>x.join(""),NF=(x,J)=>{let Q=J;if(x.charAt(Q)!=="[")throw new Error("not in a brace expression");let Z=[],X=[],q=Q+1,Y=!1,$=!1,z=!1,W=!1,G=Q,H="";x:while(q<x.length){let F=x.charAt(q);if((F==="!"||F==="^")&&q===Q+1){W=!0,q++;continue}if(F==="]"&&Y&&!z){G=q+1;break}if(Y=!0,F==="\\"){if(!z){z=!0,q++;continue}}if(F==="["&&!z){for(let[C,[_,m,A]]of Object.entries(yn))if(x.startsWith(C,q)){if(H)return["$.",!1,x.length-Q,!0];if(q+=C.length,A)X.push(_);else Z.push(_);$=$||m;continue x}}if(z=!1,H){if(F>H)Z.push(DJ(H)+"-"+DJ(F));else if(F===H)Z.push(DJ(F));H="",q++;continue}if(x.startsWith("-]",q+1)){Z.push(DJ(F+"-")),q+=2;continue}if(x.startsWith("-",q+1)){H=F,q+=2;continue}Z.push(DJ(F)),q++}if(G<q)return["",!1,0,!1];if(!Z.length&&!X.length)return["$.",!1,x.length-Q,!0];if(X.length===0&&Z.length===1&&/^\\?.$/.test(Z[0])&&!W){let F=Z[0].length===2?Z[0].slice(-1):Z[0];return[un(F),!1,G-Q,!1]}let U="["+(W?"^":"")+MF(Z)+"]",M="["+(W?"":"^")+MF(X)+"]";return[Z.length&&X.length?"("+U+"|"+M+")":Z.length?U:M,$,G-Q,!0]};var N8=(x,{windowsPathsNoEscape:J=!1,magicalBraces:Q=!0}={})=>{if(Q)return J?x.replace(/\[([^\/\\])\]/g,"$1"):x.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");return J?x.replace(/\[([^\/\\{}])\]/g,"$1"):x.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1")};var hn=new Set(["!","?","+","*","@"]),DF=(x)=>hn.has(x),gn="(?!(?:^|/)\\.\\.?(?:$|/))",vX="(?!\\.)",dn=new Set(["[","."]),ln=new Set(["..","."]),on=new Set("().*{}+?[]^$\\!"),sn=(x)=>x.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),_z="[^/]",FF=_z+"*?",wF=_z+"+?";class z3{type;#x;#Q;#q=!1;#X=[];#Y;#w;#N;#W=!1;#$;#G;#V=!1;constructor(x,J,Q={}){if(this.type=x,x)this.#Q=!0;if(this.#Y=J,this.#x=this.#Y?this.#Y.#x:this,this.#$=this.#x===this?Q:this.#x.#$,this.#N=this.#x===this?[]:this.#x.#N,x==="!"&&!this.#x.#W)this.#N.push(this);this.#w=this.#Y?this.#Y.#X.length:0}get hasMagic(){if(this.#Q!==void 0)return this.#Q;for(let x of this.#X){if(typeof x==="string")continue;if(x.type||x.hasMagic)return this.#Q=!0}return this.#Q}toString(){if(this.#G!==void 0)return this.#G;if(!this.type)return this.#G=this.#X.map((x)=>String(x)).join("");else return this.#G=this.type+"("+this.#X.map((x)=>String(x)).join("|")+")"}#K(){if(this!==this.#x)throw new Error("should only call on root");if(this.#W)return this;this.toString(),this.#W=!0;let x;while(x=this.#N.pop()){if(x.type!=="!")continue;let J=x,Q=J.#Y;while(Q){for(let Z=J.#w+1;!Q.type&&Z<Q.#X.length;Z++)for(let X of x.#X){if(typeof X==="string")throw new Error("string part in extglob AST??");X.copyIn(Q.#X[Z])}J=Q,Q=J.#Y}}return this}push(...x){for(let J of x){if(J==="")continue;if(typeof J!=="string"&&!(J instanceof z3&&J.#Y===this))throw new Error("invalid part: "+J);this.#X.push(J)}}toJSON(){let x=this.type===null?this.#X.slice().map((J)=>typeof J==="string"?J:J.toJSON()):[this.type,...this.#X.map((J)=>J.toJSON())];if(this.isStart()&&!this.type)x.unshift([]);if(this.isEnd()&&(this===this.#x||this.#x.#W&&this.#Y?.type==="!"))x.push({});return x}isStart(){if(this.#x===this)return!0;if(!this.#Y?.isStart())return!1;if(this.#w===0)return!0;let x=this.#Y;for(let J=0;J<this.#w;J++){let Q=x.#X[J];if(!(Q instanceof z3&&Q.type==="!"))return!1}return!0}isEnd(){if(this.#x===this)return!0;if(this.#Y?.type==="!")return!0;if(!this.#Y?.isEnd())return!1;if(!this.type)return this.#Y?.isEnd();let x=this.#Y?this.#Y.#X.length:0;return this.#w===x-1}copyIn(x){if(typeof x==="string")this.push(x);else this.push(x.clone(this))}clone(x){let J=new z3(this.type,x);for(let Q of this.#X)J.copyIn(Q);return J}static#Z(x,J,Q,Z){let X=!1,q=!1,Y=-1,$=!1;if(J.type===null){let U=Q,M="";while(U<x.length){let N=x.charAt(U++);if(X||N==="\\"){X=!X,M+=N;continue}if(q){if(U===Y+1){if(N==="^"||N==="!")$=!0}else if(N==="]"&&!(U===Y+2&&$))q=!1;M+=N;continue}else if(N==="["){q=!0,Y=U,$=!1,M+=N;continue}if(!Z.noext&&DF(N)&&x.charAt(U)==="("){J.push(M),M="";let F=new z3(N,J);U=z3.#Z(x,F,U,Z),J.push(F);continue}M+=N}return J.push(M),U}let z=Q+1,W=new z3(null,J),G=[],H="";while(z<x.length){let U=x.charAt(z++);if(X||U==="\\"){X=!X,H+=U;continue}if(q){if(z===Y+1){if(U==="^"||U==="!")$=!0}else if(U==="]"&&!(z===Y+2&&$))q=!1;H+=U;continue}else if(U==="["){q=!0,Y=z,$=!1,H+=U;continue}if(DF(U)&&x.charAt(z)==="("){W.push(H),H="";let M=new z3(U,W);W.push(M),z=z3.#Z(x,M,z,Z);continue}if(U==="|"){W.push(H),H="",G.push(W),W=new z3(null,J);continue}if(U===")"){if(H===""&&J.#X.length===0)J.#V=!0;return W.push(H),H="",J.push(...G,W),z}H+=U}return J.type=null,J.#Q=void 0,J.#X=[x.substring(Q-1)],z}static fromGlob(x,J={}){let Q=new z3(null,void 0,J);return z3.#Z(x,Q,0,J),Q}toMMPattern(){if(this!==this.#x)return this.#x.toMMPattern();let x=this.toString(),[J,Q,Z,X]=this.toRegExpSource();if(!(Z||this.#Q||this.#$.nocase&&!this.#$.nocaseMagicOnly&&x.toUpperCase()!==x.toLowerCase()))return Q;let Y=(this.#$.nocase?"i":"")+(X?"u":"");return Object.assign(new RegExp(`^${J}$`,Y),{_src:J,_glob:x})}get options(){return this.#$}toRegExpSource(x){let J=x??!!this.#$.dot;if(this.#x===this)this.#K();if(!this.type){let $=this.isStart()&&this.isEnd()&&!this.#X.some((U)=>typeof U!=="string"),z=this.#X.map((U)=>{let[M,N,F,C]=typeof U==="string"?z3.#P(U,this.#Q,$):U.toRegExpSource(x);return this.#Q=this.#Q||F,this.#q=this.#q||C,M}).join(""),W="";if(this.isStart()){if(typeof this.#X[0]==="string"){if(!(this.#X.length===1&&ln.has(this.#X[0]))){let M=dn,N=J&&M.has(z.charAt(0))||z.startsWith("\\.")&&M.has(z.charAt(2))||z.startsWith("\\.\\.")&&M.has(z.charAt(4)),F=!J&&!x&&M.has(z.charAt(0));W=N?gn:F?vX:""}}}let G="";if(this.isEnd()&&this.#x.#W&&this.#Y?.type==="!")G="(?:$|\\/)";return[W+z+G,N8(z),this.#Q=!!this.#Q,this.#q]}let Q=this.type==="*"||this.type==="+",Z=this.type==="!"?"(?:(?!(?:":"(?:",X=this.#H(J);if(this.isStart()&&this.isEnd()&&!X&&this.type!=="!"){let $=this.toString();return this.#X=[$],this.type=null,this.#Q=void 0,[$,N8(this.toString()),!1,!1]}let q=!Q||x||J||!vX?"":this.#H(!0);if(q===X)q="";if(q)X=`(?:${X})(?:${q})*?`;let Y="";if(this.type==="!"&&this.#V)Y=(this.isStart()&&!J?vX:"")+wF;else{let $=this.type==="!"?"))"+(this.isStart()&&!J&&!x?vX:"")+FF+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&q?")":this.type==="*"&&q?")?":`)${this.type}`;Y=Z+X+$}return[Y,N8(X),this.#Q=!!this.#Q,this.#q]}#H(x){return this.#X.map((J)=>{if(typeof J==="string")throw new Error("string type in extglob ast??");let[Q,Z,X,q]=J.toRegExpSource(x);return this.#q=this.#q||q,Q}).filter((J)=>!(this.isStart()&&this.isEnd())||!!J).join("|")}static#P(x,J,Q=!1){let Z=!1,X="",q=!1;for(let Y=0;Y<x.length;Y++){let $=x.charAt(Y);if(Z){Z=!1,X+=(on.has($)?"\\":"")+$;continue}if($==="\\"){if(Y===x.length-1)X+="\\\\";else Z=!0;continue}if($==="["){let[z,W,G,H]=NF(x,Y);if(G){X+=z,q=q||W,Y+=G-1,J=J||H;continue}}if($==="*"){X+=Q&&x==="*"?wF:FF,J=!0;continue}if($==="?"){X+=_z,J=!0;continue}X+=sn($)}return[X,N8(x),!!J,q]}}var m9=(x,{windowsPathsNoEscape:J=!1,magicalBraces:Q=!1}={})=>{if(Q)return J?x.replace(/[?*()[\]{}]/g,"[$&]"):x.replace(/[?*()[\]\\{}]/g,"\\$&");return J?x.replace(/[?*()[\]]/g,"[$&]"):x.replace(/[?*()[\]\\]/g,"\\$&")};var c3=(x,J,Q={})=>{if(NJ(J),!Q.nocomment&&J.charAt(0)==="#")return!1;return new d4(J,Q).match(x)},nn=/^\*+([^+@!?\*\[\(]*)$/,an=(x)=>(J)=>!J.startsWith(".")&&J.endsWith(x),rn=(x)=>(J)=>J.endsWith(x),tn=(x)=>{return x=x.toLowerCase(),(J)=>!J.startsWith(".")&&J.toLowerCase().endsWith(x)},en=(x)=>{return x=x.toLowerCase(),(J)=>J.toLowerCase().endsWith(x)},xa=/^\*+\.\*+$/,Ja=(x)=>!x.startsWith(".")&&x.includes("."),Qa=(x)=>x!=="."&&x!==".."&&x.includes("."),Za=/^\.\*+$/,Xa=(x)=>x!=="."&&x!==".."&&x.startsWith("."),qa=/^\*+$/,Ya=(x)=>x.length!==0&&!x.startsWith("."),$a=(x)=>x.length!==0&&x!=="."&&x!=="..",Ka=/^\?+([^+@!?\*\[\(]*)?$/,za=([x,J=""])=>{let Q=_F([x]);if(!J)return Q;return J=J.toLowerCase(),(Z)=>Q(Z)&&Z.toLowerCase().endsWith(J)},Wa=([x,J=""])=>{let Q=LF([x]);if(!J)return Q;return J=J.toLowerCase(),(Z)=>Q(Z)&&Z.toLowerCase().endsWith(J)},Va=([x,J=""])=>{let Q=LF([x]);return!J?Q:(Z)=>Q(Z)&&Z.endsWith(J)},Ga=([x,J=""])=>{let Q=_F([x]);return!J?Q:(Z)=>Q(Z)&&Z.endsWith(J)},_F=([x])=>{let J=x.length;return(Q)=>Q.length===J&&!Q.startsWith(".")},LF=([x])=>{let J=x.length;return(Q)=>Q.length===J&&Q!=="."&&Q!==".."},jF=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",PF={win32:{sep:"\\"},posix:{sep:"/"}},Ha=jF==="win32"?PF.win32.sep:PF.posix.sep;c3.sep=Ha;var W3=Symbol("globstar **");c3.GLOBSTAR=W3;var Ua="[^/]",Ba=Ua+"*?",Ma="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Na="(?:(?!(?:\\/|^)\\.).)*?",Da=(x,J={})=>(Q)=>c3(Q,x,J);c3.filter=Da;var i4=(x,J={})=>Object.assign({},x,J),Fa=(x)=>{if(!x||typeof x!=="object"||!Object.keys(x).length)return c3;let J=c3;return Object.assign((Z,X,q={})=>J(Z,X,i4(x,q)),{Minimatch:class Z extends J.Minimatch{constructor(X,q={}){super(X,i4(x,q))}static defaults(X){return J.defaults(i4(x,X)).Minimatch}},AST:class Z extends J.AST{constructor(X,q,Y={}){super(X,q,i4(x,Y))}static fromGlob(X,q={}){return J.AST.fromGlob(X,i4(x,q))}},unescape:(Z,X={})=>J.unescape(Z,i4(x,X)),escape:(Z,X={})=>J.escape(Z,i4(x,X)),filter:(Z,X={})=>J.filter(Z,i4(x,X)),defaults:(Z)=>J.defaults(i4(x,Z)),makeRe:(Z,X={})=>J.makeRe(Z,i4(x,X)),braceExpand:(Z,X={})=>J.braceExpand(Z,i4(x,X)),match:(Z,X,q={})=>J.match(Z,X,i4(x,q)),sep:J.sep,GLOBSTAR:W3})};c3.defaults=Fa;var OF=(x,J={})=>{if(NJ(x),J.nobrace||!/\{(?:(?!\{).)*\}/.test(x))return[x];return BF(x)};c3.braceExpand=OF;var wa=(x,J={})=>new d4(x,J).makeRe();c3.makeRe=wa;var Pa=(x,J,Q={})=>{let Z=new d4(J,Q);if(x=x.filter((X)=>Z.match(X)),Z.options.nonull&&!x.length)x.push(J);return x};c3.match=Pa;var CF=/[?*]|[+@!]\(.*?\)|\[|\]/,Ca=(x)=>x.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class d4{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(x,J={}){if(NJ(x),J=J||{},this.options=J,this.pattern=x,this.platform=J.platform||jF,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!J.windowsPathsNoEscape||J.allowWindowsEscape===!1,this.windowsPathsNoEscape)this.pattern=this.pattern.replace(/\\/g,"/");this.preserveMultipleSlashes=!!J.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!J.nonegate,this.comment=!1,this.empty=!1,this.partial=!!J.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=J.windowsNoMagicRoot!==void 0?J.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 x of this.set)for(let J of x)if(typeof J!=="string")return!0;return!1}debug(...x){}make(){let x=this.pattern,J=this.options;if(!J.nocomment&&x.charAt(0)==="#"){this.comment=!0;return}if(!x){this.empty=!0;return}if(this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],J.debug)this.debug=(...X)=>console.error(...X);this.debug(this.pattern,this.globSet);let Q=this.globSet.map((X)=>this.slashSplit(X));this.globParts=this.preprocess(Q),this.debug(this.pattern,this.globParts);let Z=this.globParts.map((X,q,Y)=>{if(this.isWindows&&this.windowsNoMagicRoot){let $=X[0]===""&&X[1]===""&&(X[2]==="?"||!CF.test(X[2]))&&!CF.test(X[3]),z=/^[a-z]:/i.test(X[0]);if($)return[...X.slice(0,4),...X.slice(4).map((W)=>this.parse(W))];else if(z)return[X[0],...X.slice(1).map((W)=>this.parse(W))]}return X.map(($)=>this.parse($))});if(this.debug(this.pattern,Z),this.set=Z.filter((X)=>X.indexOf(!1)===-1),this.isWindows)for(let X=0;X<this.set.length;X++){let q=this.set[X];if(q[0]===""&&q[1]===""&&this.globParts[X][2]==="?"&&typeof q[3]==="string"&&/^[a-z]:$/i.test(q[3]))q[2]="?"}this.debug(this.pattern,this.set)}preprocess(x){if(this.options.noglobstar){for(let Q=0;Q<x.length;Q++)for(let Z=0;Z<x[Q].length;Z++)if(x[Q][Z]==="**")x[Q][Z]="*"}let{optimizationLevel:J=1}=this.options;if(J>=2)x=this.firstPhasePreProcess(x),x=this.secondPhasePreProcess(x);else if(J>=1)x=this.levelOneOptimize(x);else x=this.adjascentGlobstarOptimize(x);return x}adjascentGlobstarOptimize(x){return x.map((J)=>{let Q=-1;while((Q=J.indexOf("**",Q+1))!==-1){let Z=Q;while(J[Z+1]==="**")Z++;if(Z!==Q)J.splice(Q,Z-Q)}return J})}levelOneOptimize(x){return x.map((J)=>{return J=J.reduce((Q,Z)=>{let X=Q[Q.length-1];if(Z==="**"&&X==="**")return Q;if(Z===".."){if(X&&X!==".."&&X!=="."&&X!=="**")return Q.pop(),Q}return Q.push(Z),Q},[]),J.length===0?[""]:J})}levelTwoFileOptimize(x){if(!Array.isArray(x))x=this.slashSplit(x);let J=!1;do{if(J=!1,!this.preserveMultipleSlashes){for(let Z=1;Z<x.length-1;Z++){let X=x[Z];if(Z===1&&X===""&&x[0]==="")continue;if(X==="."||X==="")J=!0,x.splice(Z,1),Z--}if(x[0]==="."&&x.length===2&&(x[1]==="."||x[1]===""))J=!0,x.pop()}let Q=0;while((Q=x.indexOf("..",Q+1))!==-1){let Z=x[Q-1];if(Z&&Z!=="."&&Z!==".."&&Z!=="**")J=!0,x.splice(Q-1,2),Q-=2}}while(J);return x.length===0?[""]:x}firstPhasePreProcess(x){let J=!1;do{J=!1;for(let Q of x){let Z=-1;while((Z=Q.indexOf("**",Z+1))!==-1){let q=Z;while(Q[q+1]==="**")q++;if(q>Z)Q.splice(Z+1,q-Z);let Y=Q[Z+1],$=Q[Z+2],z=Q[Z+3];if(Y!=="..")continue;if(!$||$==="."||$===".."||!z||z==="."||z==="..")continue;J=!0,Q.splice(Z,1);let W=Q.slice(0);W[Z]="**",x.push(W),Z--}if(!this.preserveMultipleSlashes){for(let q=1;q<Q.length-1;q++){let Y=Q[q];if(q===1&&Y===""&&Q[0]==="")continue;if(Y==="."||Y==="")J=!0,Q.splice(q,1),q--}if(Q[0]==="."&&Q.length===2&&(Q[1]==="."||Q[1]===""))J=!0,Q.pop()}let X=0;while((X=Q.indexOf("..",X+1))!==-1){let q=Q[X-1];if(q&&q!=="."&&q!==".."&&q!=="**"){J=!0;let $=X===1&&Q[X+1]==="**"?["."]:[];if(Q.splice(X-1,2,...$),Q.length===0)Q.push("");X-=2}}}}while(J);return x}secondPhasePreProcess(x){for(let J=0;J<x.length-1;J++)for(let Q=J+1;Q<x.length;Q++){let Z=this.partsMatch(x[J],x[Q],!this.preserveMultipleSlashes);if(Z){x[J]=[],x[Q]=Z;break}}return x.filter((J)=>J.length)}partsMatch(x,J,Q=!1){let Z=0,X=0,q=[],Y="";while(Z<x.length&&X<J.length)if(x[Z]===J[X])q.push(Y==="b"?J[X]:x[Z]),Z++,X++;else if(Q&&x[Z]==="**"&&J[X]===x[Z+1])q.push(x[Z]),Z++;else if(Q&&J[X]==="**"&&x[Z]===J[X+1])q.push(J[X]),X++;else if(x[Z]==="*"&&J[X]&&(this.options.dot||!J[X].startsWith("."))&&J[X]!=="**"){if(Y==="b")return!1;Y="a",q.push(x[Z]),Z++,X++}else if(J[X]==="*"&&x[Z]&&(this.options.dot||!x[Z].startsWith("."))&&x[Z]!=="**"){if(Y==="a")return!1;Y="b",q.push(J[X]),Z++,X++}else return!1;return x.length===J.length&&q}parseNegate(){if(this.nonegate)return;let x=this.pattern,J=!1,Q=0;for(let Z=0;Z<x.length&&x.charAt(Z)==="!";Z++)J=!J,Q++;if(Q)this.pattern=x.slice(Q);this.negate=J}matchOne(x,J,Q=!1){let Z=this.options;if(this.isWindows){let N=typeof x[0]==="string"&&/^[a-z]:$/i.test(x[0]),F=!N&&x[0]===""&&x[1]===""&&x[2]==="?"&&/^[a-z]:$/i.test(x[3]),C=typeof J[0]==="string"&&/^[a-z]:$/i.test(J[0]),_=!C&&J[0]===""&&J[1]===""&&J[2]==="?"&&typeof J[3]==="string"&&/^[a-z]:$/i.test(J[3]),m=F?3:N?0:void 0,A=_?3:C?0:void 0;if(typeof m==="number"&&typeof A==="number"){let[u,r]=[x[m],J[A]];if(u.toLowerCase()===r.toLowerCase()){if(J[A]=u,A>m)J=J.slice(A);else if(m>A)x=x.slice(m)}}}let{optimizationLevel:X=1}=this.options;if(X>=2)x=this.levelTwoFileOptimize(x);this.debug("matchOne",this,{file:x,pattern:J}),this.debug("matchOne",x.length,J.length);for(var q=0,Y=0,$=x.length,z=J.length;q<$&&Y<z;q++,Y++){this.debug("matchOne loop");var W=J[Y],G=x[q];if(this.debug(J,W,G),W===!1)return!1;if(W===W3){this.debug("GLOBSTAR",[J,W,G]);var H=q,U=Y+1;if(U===z){this.debug("** at the end");for(;q<$;q++)if(x[q]==="."||x[q]===".."||!Z.dot&&x[q].charAt(0)===".")return!1;return!0}while(H<$){var M=x[H];if(this.debug(`
|
|
87
87
|
globstar while`,x,H,J,U,M),this.matchOne(x.slice(H),J.slice(U),Q))return this.debug("globstar found match!",H,$,M),!0;else{if(M==="."||M===".."||!Z.dot&&M.charAt(0)==="."){this.debug("dot detected!",x,H,J,U);break}this.debug("globstar swallow a segment, and continue"),H++}}if(Q){if(this.debug(`
|
|
88
88
|
>>> no match, partial?`,x,H,J,U),H===$)return!0}return!1}let N;if(typeof W==="string")N=G===W,this.debug("string match",W,G,N);else N=W.test(G),this.debug("pattern match",W,G,N);if(!N)return!1}if(q===$&&Y===z)return!0;else if(q===$)return Q;else if(Y===z)return q===$-1&&x[q]==="";else throw new Error("wtf?")}braceExpand(){return OF(this.pattern,this.options)}parse(x){NJ(x);let J=this.options;if(x==="**")return W3;if(x==="")return"";let Q,Z=null;if(Q=x.match(qa))Z=J.dot?$a:Ya;else if(Q=x.match(nn))Z=(J.nocase?J.dot?en:tn:J.dot?rn:an)(Q[1]);else if(Q=x.match(Ka))Z=(J.nocase?J.dot?Wa:za:J.dot?Va:Ga)(Q);else if(Q=x.match(xa))Z=J.dot?Qa:Ja;else if(Q=x.match(Za))Z=Xa;let X=z3.fromGlob(x,this.options).toMMPattern();if(Z&&typeof X==="object")Reflect.defineProperty(X,"test",{value:Z});return X}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let x=this.set;if(!x.length)return this.regexp=!1,this.regexp;let J=this.options,Q=J.noglobstar?Ba:J.dot?Ma:Na,Z=new Set(J.nocase?["i"]:[]),X=x.map(($)=>{let z=$.map((G)=>{if(G instanceof RegExp)for(let H of G.flags.split(""))Z.add(H);return typeof G==="string"?Ca(G):G===W3?W3:G._src});z.forEach((G,H)=>{let U=z[H+1],M=z[H-1];if(G!==W3||M===W3)return;if(M===void 0)if(U!==void 0&&U!==W3)z[H+1]="(?:\\/|"+Q+"\\/)?"+U;else z[H]=Q;else if(U===void 0)z[H-1]=M+"(?:\\/|\\/"+Q+")?";else if(U!==W3)z[H-1]=M+"(?:\\/|\\/"+Q+"\\/)"+U,z[H+1]=W3});let W=z.filter((G)=>G!==W3);if(this.partial&&W.length>=1){let G=[];for(let H=1;H<=W.length;H++)G.push(W.slice(0,H).join("/"));return"(?:"+G.join("|")+")"}return W.join("/")}).join("|"),[q,Y]=x.length>1?["(?:",")"]:["",""];if(X="^"+q+X+Y+"$",this.partial)X="^(?:\\/|"+q+X.slice(1,-1)+Y+")$";if(this.negate)X="^(?!"+X+").+$";try{this.regexp=new RegExp(X,[...Z].join(""))}catch($){this.regexp=!1}return this.regexp}slashSplit(x){if(this.preserveMultipleSlashes)return x.split("/");else if(this.isWindows&&/^\/\/[^\/]+/.test(x))return["",...x.split(/\/+/)];else return x.split(/\/+/)}match(x,J=this.partial){if(this.debug("match",x,this.pattern),this.comment)return!1;if(this.empty)return x==="";if(x==="/"&&J)return!0;let Q=this.options;if(this.isWindows)x=x.split("\\").join("/");let Z=this.slashSplit(x);this.debug(this.pattern,"split",Z);let X=this.set;this.debug(this.pattern,"set",X);let q=Z[Z.length-1];if(!q)for(let Y=Z.length-2;!q&&Y>=0;Y--)q=Z[Y];for(let Y=0;Y<X.length;Y++){let $=X[Y],z=Z;if(Q.matchBase&&$.length===1)z=[q];if(this.matchOne(z,$,J)){if(Q.flipNegate)return!0;return!this.negate}}if(Q.flipNegate)return!1;return this.negate}static defaults(x){return c3.defaults(x).Minimatch}}c3.AST=z3;c3.Minimatch=d4;c3.escape=m9;c3.unescape=N8;import{fileURLToPath as Jr}from"node:url";var _a=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date,SF=new Set,Lz=typeof process==="object"&&!!process?process:{},RF=(x,J,Q,Z)=>{typeof Lz.emitWarning==="function"?Lz.emitWarning(x,J,Q,Z):console.error(`[${Q}] ${J}: ${x}`)},AX=globalThis.AbortController,mF=globalThis.AbortSignal;if(typeof AX==="undefined"){mF=class Q{onabort;_onabort=[];reason;aborted=!1;addEventListener(Z,X){this._onabort.push(X)}},AX=class Q{constructor(){J()}signal=new mF;abort(Z){if(this.signal.aborted)return;this.signal.reason=Z,this.signal.aborted=!0;for(let X of this.signal._onabort)X(Z);this.signal.onabort?.(Z)}};let x=Lz.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",J=()=>{if(!x)return;x=!1,RF("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",J)}}var La=(x)=>!SF.has(x),fT0=Symbol("type"),V5=(x)=>x&&x===Math.floor(x)&&x>0&&isFinite(x),IF=(x)=>!V5(x)?null:x<=Math.pow(2,8)?Uint8Array:x<=Math.pow(2,16)?Uint16Array:x<=Math.pow(2,32)?Uint32Array:x<=Number.MAX_SAFE_INTEGER?FJ:null;class FJ extends Array{constructor(x){super(x);this.fill(0)}}class S9{heap;length;static#x=!1;static create(x){let J=IF(x);if(!J)return[];S9.#x=!0;let Q=new S9(x,J);return S9.#x=!1,Q}constructor(x,J){if(!S9.#x)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new J(x),this.length=0}push(x){this.heap[this.length++]=x}pop(){return this.heap[--this.length]}}class G7{#x;#Q;#q;#X;#Y;#w;#N;#W;get perf(){return this.#W}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#$;#G;#V;#K;#Z;#H;#P;#F;#U;#S;#B;#L;#j;#M;#D;#C;#O;#J;#E;static unsafeExposeInternals(x){return{starts:x.#j,ttls:x.#M,autopurgeTimers:x.#D,sizes:x.#L,keyMap:x.#V,keyList:x.#K,valList:x.#Z,next:x.#H,prev:x.#P,get head(){return x.#F},get tail(){return x.#U},free:x.#S,isBackgroundFetch:(J)=>x.#z(J),backgroundFetch:(J,Q,Z,X)=>x.#h(J,Q,Z,X),moveToTail:(J)=>x.#k(J),indexes:(J)=>x.#I(J),rindexes:(J)=>x.#T(J),isStale:(J)=>x.#_(J)}}get max(){return this.#x}get maxSize(){return this.#Q}get calculatedSize(){return this.#G}get size(){return this.#$}get fetchMethod(){return this.#w}get memoMethod(){return this.#N}get dispose(){return this.#q}get onInsert(){return this.#X}get disposeAfter(){return this.#Y}constructor(x){let{max:J=0,ttl:Q,ttlResolution:Z=1,ttlAutopurge:X,updateAgeOnGet:q,updateAgeOnHas:Y,allowStale:$,dispose:z,onInsert:W,disposeAfter:G,noDisposeOnSet:H,noUpdateTTL:U,maxSize:M=0,maxEntrySize:N=0,sizeCalculation:F,fetchMethod:C,memoMethod:_,noDeleteOnFetchRejection:m,noDeleteOnStaleGet:A,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:r,ignoreFetchAbort:n,perf:e}=x;if(e!==void 0){if(typeof e?.now!=="function")throw new TypeError("perf option must have a now() method if specified")}if(this.#W=e??_a,J!==0&&!V5(J))throw new TypeError("max option must be a nonnegative integer");let j=J?IF(J):Array;if(!j)throw new Error("invalid max value: "+J);if(this.#x=J,this.#Q=M,this.maxEntrySize=N||this.#Q,this.sizeCalculation=F,this.sizeCalculation){if(!this.#Q&&!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(_!==void 0&&typeof _!=="function")throw new TypeError("memoMethod must be a function if defined");if(this.#N=_,C!==void 0&&typeof C!=="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#w=C,this.#O=!!C,this.#V=new Map,this.#K=new Array(J).fill(void 0),this.#Z=new Array(J).fill(void 0),this.#H=new j(J),this.#P=new j(J),this.#F=0,this.#U=0,this.#S=S9.create(J),this.#$=0,this.#G=0,typeof z==="function")this.#q=z;if(typeof W==="function")this.#X=W;if(typeof G==="function")this.#Y=G,this.#B=[];else this.#Y=void 0,this.#B=void 0;if(this.#C=!!this.#q,this.#E=!!this.#X,this.#J=!!this.#Y,this.noDisposeOnSet=!!H,this.noUpdateTTL=!!U,this.noDeleteOnFetchRejection=!!m,this.allowStaleOnFetchRejection=!!u,this.allowStaleOnFetchAbort=!!r,this.ignoreFetchAbort=!!n,this.maxEntrySize!==0){if(this.#Q!==0){if(!V5(this.#Q))throw new TypeError("maxSize must be a positive integer if specified")}if(!V5(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#i()}if(this.allowStale=!!$,this.noDeleteOnStaleGet=!!A,this.updateAgeOnGet=!!q,this.updateAgeOnHas=!!Y,this.ttlResolution=V5(Z)||Z===0?Z:1,this.ttlAutopurge=!!X,this.ttl=Q||0,this.ttl){if(!V5(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#v()}if(this.#x===0&&this.ttl===0&&this.#Q===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#x&&!this.#Q){if(La("LRU_CACHE_UNBOUNDED"))SF.add("LRU_CACHE_UNBOUNDED"),RF("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning","LRU_CACHE_UNBOUNDED",G7)}}getRemainingTTL(x){return this.#V.has(x)?1/0:0}#v(){let x=new FJ(this.#x),J=new FJ(this.#x);this.#M=x,this.#j=J;let Q=this.ttlAutopurge?new Array(this.#x):void 0;this.#D=Q,this.#b=(q,Y,$=this.#W.now())=>{if(J[q]=Y!==0?$:0,x[q]=Y,Q?.[q])clearTimeout(Q[q]),Q[q]=void 0;if(Y!==0&&Q){let z=setTimeout(()=>{if(this.#_(q))this.#R(this.#K[q],"expire")},Y+1);if(z.unref)z.unref();Q[q]=z}},this.#m=(q)=>{J[q]=x[q]!==0?this.#W.now():0},this.#A=(q,Y)=>{if(x[Y]){let $=x[Y],z=J[Y];if(!$||!z)return;q.ttl=$,q.start=z,q.now=Z||X();let W=q.now-z;q.remainingTTL=$-W}};let Z=0,X=()=>{let q=this.#W.now();if(this.ttlResolution>0){Z=q;let Y=setTimeout(()=>Z=0,this.ttlResolution);if(Y.unref)Y.unref()}return q};this.getRemainingTTL=(q)=>{let Y=this.#V.get(q);if(Y===void 0)return 0;let $=x[Y],z=J[Y];if(!$||!z)return 1/0;let W=(Z||X())-z;return $-W},this.#_=(q)=>{let Y=J[q],$=x[q];return!!$&&!!Y&&(Z||X())-Y>$}}#m=()=>{};#A=()=>{};#b=()=>{};#_=()=>!1;#i(){let x=new FJ(this.#x);this.#G=0,this.#L=x,this.#c=(J)=>{this.#G-=x[J],x[J]=0},this.#p=(J,Q,Z,X)=>{if(this.#z(Q))return 0;if(!V5(Z))if(X){if(typeof X!=="function")throw new TypeError("sizeCalculation must be a function");if(Z=X(Q,J),!V5(Z))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 Z},this.#f=(J,Q,Z)=>{if(x[J]=Q,this.#Q){let X=this.#Q-x[J];while(this.#G>X)this.#u(!0)}if(this.#G+=x[J],Z)Z.entrySize=Q,Z.totalCalculatedSize=this.#G}}#c=(x)=>{};#f=(x,J,Q)=>{};#p=(x,J,Q,Z)=>{if(Q||Z)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#I({allowStale:x=this.allowStale}={}){if(this.#$)for(let J=this.#U;;){if(!this.#y(J))break;if(x||!this.#_(J))yield J;if(J===this.#F)break;else J=this.#P[J]}}*#T({allowStale:x=this.allowStale}={}){if(this.#$)for(let J=this.#F;;){if(!this.#y(J))break;if(x||!this.#_(J))yield J;if(J===this.#U)break;else J=this.#H[J]}}#y(x){return x!==void 0&&this.#V.get(this.#K[x])===x}*entries(){for(let x of this.#I())if(this.#Z[x]!==void 0&&this.#K[x]!==void 0&&!this.#z(this.#Z[x]))yield[this.#K[x],this.#Z[x]]}*rentries(){for(let x of this.#T())if(this.#Z[x]!==void 0&&this.#K[x]!==void 0&&!this.#z(this.#Z[x]))yield[this.#K[x],this.#Z[x]]}*keys(){for(let x of this.#I()){let J=this.#K[x];if(J!==void 0&&!this.#z(this.#Z[x]))yield J}}*rkeys(){for(let x of this.#T()){let J=this.#K[x];if(J!==void 0&&!this.#z(this.#Z[x]))yield J}}*values(){for(let x of this.#I())if(this.#Z[x]!==void 0&&!this.#z(this.#Z[x]))yield this.#Z[x]}*rvalues(){for(let x of this.#T())if(this.#Z[x]!==void 0&&!this.#z(this.#Z[x]))yield this.#Z[x]}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(x,J={}){for(let Q of this.#I()){let Z=this.#Z[Q],X=this.#z(Z)?Z.__staleWhileFetching:Z;if(X===void 0)continue;if(x(X,this.#K[Q],this))return this.get(this.#K[Q],J)}}forEach(x,J=this){for(let Q of this.#I()){let Z=this.#Z[Q],X=this.#z(Z)?Z.__staleWhileFetching:Z;if(X===void 0)continue;x.call(J,X,this.#K[Q],this)}}rforEach(x,J=this){for(let Q of this.#T()){let Z=this.#Z[Q],X=this.#z(Z)?Z.__staleWhileFetching:Z;if(X===void 0)continue;x.call(J,X,this.#K[Q],this)}}purgeStale(){let x=!1;for(let J of this.#T({allowStale:!0}))if(this.#_(J))this.#R(this.#K[J],"expire"),x=!0;return x}info(x){let J=this.#V.get(x);if(J===void 0)return;let Q=this.#Z[J],Z=this.#z(Q)?Q.__staleWhileFetching:Q;if(Z===void 0)return;let X={value:Z};if(this.#M&&this.#j){let q=this.#M[J],Y=this.#j[J];if(q&&Y){let $=q-(this.#W.now()-Y);X.ttl=$,X.start=Date.now()}}if(this.#L)X.size=this.#L[J];return X}dump(){let x=[];for(let J of this.#I({allowStale:!0})){let Q=this.#K[J],Z=this.#Z[J],X=this.#z(Z)?Z.__staleWhileFetching:Z;if(X===void 0||Q===void 0)continue;let q={value:X};if(this.#M&&this.#j){q.ttl=this.#M[J];let Y=this.#W.now()-this.#j[J];q.start=Math.floor(Date.now()-Y)}if(this.#L)q.size=this.#L[J];x.unshift([Q,q])}return x}load(x){this.clear();for(let[J,Q]of x){if(Q.start){let Z=Date.now()-Q.start;Q.start=this.#W.now()-Z}this.set(J,Q.value,Q)}}set(x,J,Q={}){if(J===void 0)return this.delete(x),this;let{ttl:Z=this.ttl,start:X,noDisposeOnSet:q=this.noDisposeOnSet,sizeCalculation:Y=this.sizeCalculation,status:$}=Q,{noUpdateTTL:z=this.noUpdateTTL}=Q,W=this.#p(x,J,Q.size||0,Y);if(this.maxEntrySize&&W>this.maxEntrySize){if($)$.set="miss",$.maxEntrySizeExceeded=!0;return this.#R(x,"set"),this}let G=this.#$===0?void 0:this.#V.get(x);if(G===void 0){if(G=this.#$===0?this.#U:this.#S.length!==0?this.#S.pop():this.#$===this.#x?this.#u(!1):this.#$,this.#K[G]=x,this.#Z[G]=J,this.#V.set(x,G),this.#H[this.#U]=G,this.#P[G]=this.#U,this.#U=G,this.#$++,this.#f(G,W,$),$)$.set="add";if(z=!1,this.#E)this.#X?.(J,x,"add")}else{this.#k(G);let H=this.#Z[G];if(J!==H){if(this.#O&&this.#z(H)){H.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:U}=H;if(U!==void 0&&!q){if(this.#C)this.#q?.(U,x,"set");if(this.#J)this.#B?.push([U,x,"set"])}}else if(!q){if(this.#C)this.#q?.(H,x,"set");if(this.#J)this.#B?.push([H,x,"set"])}if(this.#c(G),this.#f(G,W,$),this.#Z[G]=J,$){$.set="replace";let U=H&&this.#z(H)?H.__staleWhileFetching:H;if(U!==void 0)$.oldValue=U}}else if($)$.set="update";if(this.#E)this.onInsert?.(J,x,J===H?"update":"replace")}if(Z!==0&&!this.#M)this.#v();if(this.#M){if(!z)this.#b(G,Z,X);if($)this.#A($,G)}if(!q&&this.#J&&this.#B){let H=this.#B,U;while(U=H?.shift())this.#Y?.(...U)}return this}pop(){try{while(this.#$){let x=this.#Z[this.#F];if(this.#u(!0),this.#z(x)){if(x.__staleWhileFetching)return x.__staleWhileFetching}else if(x!==void 0)return x}}finally{if(this.#J&&this.#B){let x=this.#B,J;while(J=x?.shift())this.#Y?.(...J)}}}#u(x){let J=this.#F,Q=this.#K[J],Z=this.#Z[J];if(this.#O&&this.#z(Z))Z.__abortController.abort(new Error("evicted"));else if(this.#C||this.#J){if(this.#C)this.#q?.(Z,Q,"evict");if(this.#J)this.#B?.push([Z,Q,"evict"])}if(this.#c(J),this.#D?.[J])clearTimeout(this.#D[J]),this.#D[J]=void 0;if(x)this.#K[J]=void 0,this.#Z[J]=void 0,this.#S.push(J);if(this.#$===1)this.#F=this.#U=0,this.#S.length=0;else this.#F=this.#H[J];return this.#V.delete(Q),this.#$--,J}has(x,J={}){let{updateAgeOnHas:Q=this.updateAgeOnHas,status:Z}=J,X=this.#V.get(x);if(X!==void 0){let q=this.#Z[X];if(this.#z(q)&&q.__staleWhileFetching===void 0)return!1;if(!this.#_(X)){if(Q)this.#m(X);if(Z)Z.has="hit",this.#A(Z,X);return!0}else if(Z)Z.has="stale",this.#A(Z,X)}else if(Z)Z.has="miss";return!1}peek(x,J={}){let{allowStale:Q=this.allowStale}=J,Z=this.#V.get(x);if(Z===void 0||!Q&&this.#_(Z))return;let X=this.#Z[Z];return this.#z(X)?X.__staleWhileFetching:X}#h(x,J,Q,Z){let X=J===void 0?void 0:this.#Z[J];if(this.#z(X))return X;let q=new AX,{signal:Y}=Q;Y?.addEventListener("abort",()=>q.abort(Y.reason),{signal:q.signal});let $={signal:q.signal,options:Q,context:Z},z=(N,F=!1)=>{let{aborted:C}=q.signal,_=Q.ignoreFetchAbort&&N!==void 0;if(Q.status)if(C&&!F){if(Q.status.fetchAborted=!0,Q.status.fetchError=q.signal.reason,_)Q.status.fetchAbortIgnored=!0}else Q.status.fetchResolved=!0;if(C&&!_&&!F)return G(q.signal.reason);let m=U,A=this.#Z[J];if(A===U||_&&F&&A===void 0)if(N===void 0)if(m.__staleWhileFetching!==void 0)this.#Z[J]=m.__staleWhileFetching;else this.#R(x,"fetch");else{if(Q.status)Q.status.fetchUpdated=!0;this.set(x,N,$.options)}return N},W=(N)=>{if(Q.status)Q.status.fetchRejected=!0,Q.status.fetchError=N;return G(N)},G=(N)=>{let{aborted:F}=q.signal,C=F&&Q.allowStaleOnFetchAbort,_=C||Q.allowStaleOnFetchRejection,m=_||Q.noDeleteOnFetchRejection,A=U;if(this.#Z[J]===U){if(!m||A.__staleWhileFetching===void 0)this.#R(x,"fetch");else if(!C)this.#Z[J]=A.__staleWhileFetching}if(_){if(Q.status&&A.__staleWhileFetching!==void 0)Q.status.returnedStale=!0;return A.__staleWhileFetching}else if(A.__returned===A)throw N},H=(N,F)=>{let C=this.#w?.(x,X,$);if(C&&C instanceof Promise)C.then((_)=>N(_===void 0?void 0:_),F);q.signal.addEventListener("abort",()=>{if(!Q.ignoreFetchAbort||Q.allowStaleOnFetchAbort){if(N(void 0),Q.allowStaleOnFetchAbort)N=(_)=>z(_,!0)}})};if(Q.status)Q.status.fetchDispatched=!0;let U=new Promise(H).then(z,W),M=Object.assign(U,{__abortController:q,__staleWhileFetching:X,__returned:void 0});if(J===void 0)this.set(x,M,{...$.options,status:void 0}),J=this.#V.get(x);else this.#Z[J]=M;return M}#z(x){if(!this.#O)return!1;let J=x;return!!J&&J instanceof Promise&&J.hasOwnProperty("__staleWhileFetching")&&J.__abortController instanceof AX}async fetch(x,J={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:Z=this.updateAgeOnGet,noDeleteOnStaleGet:X=this.noDeleteOnStaleGet,ttl:q=this.ttl,noDisposeOnSet:Y=this.noDisposeOnSet,size:$=0,sizeCalculation:z=this.sizeCalculation,noUpdateTTL:W=this.noUpdateTTL,noDeleteOnFetchRejection:G=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:H=this.allowStaleOnFetchRejection,ignoreFetchAbort:U=this.ignoreFetchAbort,allowStaleOnFetchAbort:M=this.allowStaleOnFetchAbort,context:N,forceRefresh:F=!1,status:C,signal:_}=J;if(!this.#O){if(C)C.fetch="get";return this.get(x,{allowStale:Q,updateAgeOnGet:Z,noDeleteOnStaleGet:X,status:C})}let m={allowStale:Q,updateAgeOnGet:Z,noDeleteOnStaleGet:X,ttl:q,noDisposeOnSet:Y,size:$,sizeCalculation:z,noUpdateTTL:W,noDeleteOnFetchRejection:G,allowStaleOnFetchRejection:H,allowStaleOnFetchAbort:M,ignoreFetchAbort:U,status:C,signal:_},A=this.#V.get(x);if(A===void 0){if(C)C.fetch="miss";let u=this.#h(x,A,m,N);return u.__returned=u}else{let u=this.#Z[A];if(this.#z(u)){let I=Q&&u.__staleWhileFetching!==void 0;if(C){if(C.fetch="inflight",I)C.returnedStale=!0}return I?u.__staleWhileFetching:u.__returned=u}let r=this.#_(A);if(!F&&!r){if(C)C.fetch="hit";if(this.#k(A),Z)this.#m(A);if(C)this.#A(C,A);return u}let n=this.#h(x,A,m,N),j=n.__staleWhileFetching!==void 0&&Q;if(C){if(C.fetch=r?"stale":"refresh",j&&r)C.returnedStale=!0}return j?n.__staleWhileFetching:n.__returned=n}}async forceFetch(x,J={}){let Q=await this.fetch(x,J);if(Q===void 0)throw new Error("fetch() returned undefined");return Q}memo(x,J={}){let Q=this.#N;if(!Q)throw new Error("no memoMethod provided to constructor");let{context:Z,forceRefresh:X,...q}=J,Y=this.get(x,q);if(!X&&Y!==void 0)return Y;let $=Q(x,Y,{options:q,context:Z});return this.set(x,$,q),$}get(x,J={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:Z=this.updateAgeOnGet,noDeleteOnStaleGet:X=this.noDeleteOnStaleGet,status:q}=J,Y=this.#V.get(x);if(Y!==void 0){let $=this.#Z[Y],z=this.#z($);if(q)this.#A(q,Y);if(this.#_(Y)){if(q)q.get="stale";if(!z){if(!X)this.#R(x,"expire");if(q&&Q)q.returnedStale=!0;return Q?$:void 0}else{if(q&&Q&&$.__staleWhileFetching!==void 0)q.returnedStale=!0;return Q?$.__staleWhileFetching:void 0}}else{if(q)q.get="hit";if(z)return $.__staleWhileFetching;if(this.#k(Y),Z)this.#m(Y);return $}}else if(q)q.get="miss"}#g(x,J){this.#P[J]=x,this.#H[x]=J}#k(x){if(x!==this.#U){if(x===this.#F)this.#F=this.#H[x];else this.#g(this.#P[x],this.#H[x]);this.#g(this.#U,x),this.#U=x}}delete(x){return this.#R(x,"delete")}#R(x,J){let Q=!1;if(this.#$!==0){let Z=this.#V.get(x);if(Z!==void 0){if(this.#D?.[Z])clearTimeout(this.#D?.[Z]),this.#D[Z]=void 0;if(Q=!0,this.#$===1)this.#d(J);else{this.#c(Z);let X=this.#Z[Z];if(this.#z(X))X.__abortController.abort(new Error("deleted"));else if(this.#C||this.#J){if(this.#C)this.#q?.(X,x,J);if(this.#J)this.#B?.push([X,x,J])}if(this.#V.delete(x),this.#K[Z]=void 0,this.#Z[Z]=void 0,Z===this.#U)this.#U=this.#P[Z];else if(Z===this.#F)this.#F=this.#H[Z];else{let q=this.#P[Z];this.#H[q]=this.#H[Z];let Y=this.#H[Z];this.#P[Y]=this.#P[Z]}this.#$--,this.#S.push(Z)}}}if(this.#J&&this.#B?.length){let Z=this.#B,X;while(X=Z?.shift())this.#Y?.(...X)}return Q}clear(){return this.#d("delete")}#d(x){for(let J of this.#T({allowStale:!0})){let Q=this.#Z[J];if(this.#z(Q))Q.__abortController.abort(new Error("deleted"));else{let Z=this.#K[J];if(this.#C)this.#q?.(Q,Z,x);if(this.#J)this.#B?.push([Q,Z,x])}}if(this.#V.clear(),this.#Z.fill(void 0),this.#K.fill(void 0),this.#M&&this.#j){this.#M.fill(0),this.#j.fill(0);for(let J of this.#D??[])if(J!==void 0)clearTimeout(J);this.#D?.fill(void 0)}if(this.#L)this.#L.fill(0);if(this.#F=0,this.#U=0,this.#S.length=0,this.#G=0,this.#$=0,this.#J&&this.#B){let J=this.#B,Q;while(Q=J?.shift())this.#Y?.(...Q)}}}import{posix as fa,win32 as Ez}from"node:path";import{fileURLToPath as ka}from"node:url";import{lstatSync as ca,readdir as ba,readdirSync as pa,readlinkSync as ya,realpathSync as ua}from"fs";import*as ha from"node:fs";import{lstat as ia,readdir as da,readlink as la,realpath as oa}from"node:fs/promises";import{EventEmitter as Iz}from"node:events";import fF from"node:stream";import{StringDecoder as ja}from"node:string_decoder";var TF=typeof process==="object"&&process?process:{stdout:null,stderr:null},Oa=(x)=>!!x&&typeof x==="object"&&(x instanceof U7||x instanceof fF||ma(x)||Sa(x)),ma=(x)=>!!x&&typeof x==="object"&&x instanceof Iz&&typeof x.pipe==="function"&&x.pipe!==fF.Writable.prototype.pipe,Sa=(x)=>!!x&&typeof x==="object"&&x instanceof Iz&&typeof x.write==="function"&&typeof x.end==="function",S6=Symbol("EOF"),R6=Symbol("maybeEmitEnd"),G5=Symbol("emittedEnd"),EX=Symbol("emittingEnd"),wJ=Symbol("emittedError"),fX=Symbol("closed"),vF=Symbol("read"),kX=Symbol("flush"),AF=Symbol("flushChunk"),D8=Symbol("encoding"),R9=Symbol("decoder"),a2=Symbol("flowing"),PJ=Symbol("paused"),I9=Symbol("resume"),r2=Symbol("buffer"),b3=Symbol("pipes"),t2=Symbol("bufferLength"),jz=Symbol("bufferPush"),cX=Symbol("bufferShift"),_3=Symbol("objectMode"),O2=Symbol("destroyed"),Oz=Symbol("error"),mz=Symbol("emitData"),EF=Symbol("emitEnd"),Sz=Symbol("emitEnd2"),h8=Symbol("async"),Rz=Symbol("abort"),bX=Symbol("aborted"),CJ=Symbol("signal"),H7=Symbol("dataListeners"),C4=Symbol("discarded"),_J=(x)=>Promise.resolve().then(x),Ra=(x)=>x(),Ia=(x)=>x==="end"||x==="finish"||x==="prefinish",Ta=(x)=>x instanceof ArrayBuffer||!!x&&typeof x==="object"&&x.constructor&&x.constructor.name==="ArrayBuffer"&&x.byteLength>=0,va=(x)=>!Buffer.isBuffer(x)&&ArrayBuffer.isView(x);class Tz{src;dest;opts;ondrain;constructor(x,J,Q){this.src=x,this.dest=J,this.opts=Q,this.ondrain=()=>x[I9](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(x){}end(){if(this.unpipe(),this.opts.end)this.dest.end()}}class kF extends Tz{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(x,J,Q){super(x,J,Q);this.proxyErrors=(Z)=>J.emit("error",Z),x.on("error",this.proxyErrors)}}var Aa=(x)=>!!x.objectMode,Ea=(x)=>!x.objectMode&&!!x.encoding&&x.encoding!=="buffer";class U7 extends Iz{[a2]=!1;[PJ]=!1;[b3]=[];[r2]=[];[_3];[D8];[h8];[R9];[S6]=!1;[G5]=!1;[EX]=!1;[fX]=!1;[wJ]=null;[t2]=0;[O2]=!1;[CJ];[bX]=!1;[H7]=0;[C4]=!1;writable=!0;readable=!0;constructor(...x){let J=x[0]||{};super();if(J.objectMode&&typeof J.encoding==="string")throw new TypeError("Encoding and objectMode may not be used together");if(Aa(J))this[_3]=!0,this[D8]=null;else if(Ea(J))this[D8]=J.encoding,this[_3]=!1;else this[_3]=!1,this[D8]=null;if(this[h8]=!!J.async,this[R9]=this[D8]?new ja(this[D8]):null,J&&J.debugExposeBuffer===!0)Object.defineProperty(this,"buffer",{get:()=>this[r2]});if(J&&J.debugExposePipes===!0)Object.defineProperty(this,"pipes",{get:()=>this[b3]});let{signal:Q}=J;if(Q)if(this[CJ]=Q,Q.aborted)this[Rz]();else Q.addEventListener("abort",()=>this[Rz]())}get bufferLength(){return this[t2]}get encoding(){return this[D8]}set encoding(x){throw new Error("Encoding must be set at instantiation time")}setEncoding(x){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[_3]}set objectMode(x){throw new Error("objectMode must be set at instantiation time")}get["async"](){return this[h8]}set["async"](x){this[h8]=this[h8]||!!x}[Rz](){this[bX]=!0,this.emit("abort",this[CJ]?.reason),this.destroy(this[CJ]?.reason)}get aborted(){return this[bX]}set aborted(x){}write(x,J,Q){if(this[bX])return!1;if(this[S6])throw new Error("write after end");if(this[O2])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;if(typeof J==="function")Q=J,J="utf8";if(!J)J="utf8";let Z=this[h8]?_J:Ra;if(!this[_3]&&!Buffer.isBuffer(x)){if(va(x))x=Buffer.from(x.buffer,x.byteOffset,x.byteLength);else if(Ta(x))x=Buffer.from(x);else if(typeof x!=="string")throw new Error("Non-contiguous data written to non-objectMode stream")}if(this[_3]){if(this[a2]&&this[t2]!==0)this[kX](!0);if(this[a2])this.emit("data",x);else this[jz](x);if(this[t2]!==0)this.emit("readable");if(Q)Z(Q);return this[a2]}if(!x.length){if(this[t2]!==0)this.emit("readable");if(Q)Z(Q);return this[a2]}if(typeof x==="string"&&!(J===this[D8]&&!this[R9]?.lastNeed))x=Buffer.from(x,J);if(Buffer.isBuffer(x)&&this[D8])x=this[R9].write(x);if(this[a2]&&this[t2]!==0)this[kX](!0);if(this[a2])this.emit("data",x);else this[jz](x);if(this[t2]!==0)this.emit("readable");if(Q)Z(Q);return this[a2]}read(x){if(this[O2])return null;if(this[C4]=!1,this[t2]===0||x===0||x&&x>this[t2])return this[R6](),null;if(this[_3])x=null;if(this[r2].length>1&&!this[_3])this[r2]=[this[D8]?this[r2].join(""):Buffer.concat(this[r2],this[t2])];let J=this[vF](x||null,this[r2][0]);return this[R6](),J}[vF](x,J){if(this[_3])this[cX]();else{let Q=J;if(x===Q.length||x===null)this[cX]();else if(typeof Q==="string")this[r2][0]=Q.slice(x),J=Q.slice(0,x),this[t2]-=x;else this[r2][0]=Q.subarray(x),J=Q.subarray(0,x),this[t2]-=x}if(this.emit("data",J),!this[r2].length&&!this[S6])this.emit("drain");return J}end(x,J,Q){if(typeof x==="function")Q=x,x=void 0;if(typeof J==="function")Q=J,J="utf8";if(x!==void 0)this.write(x,J);if(Q)this.once("end",Q);if(this[S6]=!0,this.writable=!1,this[a2]||!this[PJ])this[R6]();return this}[I9](){if(this[O2])return;if(!this[H7]&&!this[b3].length)this[C4]=!0;if(this[PJ]=!1,this[a2]=!0,this.emit("resume"),this[r2].length)this[kX]();else if(this[S6])this[R6]();else this.emit("drain")}resume(){return this[I9]()}pause(){this[a2]=!1,this[PJ]=!0,this[C4]=!1}get destroyed(){return this[O2]}get flowing(){return this[a2]}get paused(){return this[PJ]}[jz](x){if(this[_3])this[t2]+=1;else this[t2]+=x.length;this[r2].push(x)}[cX](){if(this[_3])this[t2]-=1;else this[t2]-=this[r2][0].length;return this[r2].shift()}[kX](x=!1){do;while(this[AF](this[cX]())&&this[r2].length);if(!x&&!this[r2].length&&!this[S6])this.emit("drain")}[AF](x){return this.emit("data",x),this[a2]}pipe(x,J){if(this[O2])return x;this[C4]=!1;let Q=this[G5];if(J=J||{},x===TF.stdout||x===TF.stderr)J.end=!1;else J.end=J.end!==!1;if(J.proxyErrors=!!J.proxyErrors,Q){if(J.end)x.end()}else if(this[b3].push(!J.proxyErrors?new Tz(this,x,J):new kF(this,x,J)),this[h8])_J(()=>this[I9]());else this[I9]();return x}unpipe(x){let J=this[b3].find((Q)=>Q.dest===x);if(J){if(this[b3].length===1){if(this[a2]&&this[H7]===0)this[a2]=!1;this[b3]=[]}else this[b3].splice(this[b3].indexOf(J),1);J.unpipe()}}addListener(x,J){return this.on(x,J)}on(x,J){let Q=super.on(x,J);if(x==="data"){if(this[C4]=!1,this[H7]++,!this[b3].length&&!this[a2])this[I9]()}else if(x==="readable"&&this[t2]!==0)super.emit("readable");else if(Ia(x)&&this[G5])super.emit(x),this.removeAllListeners(x);else if(x==="error"&&this[wJ]){let Z=J;if(this[h8])_J(()=>Z.call(this,this[wJ]));else Z.call(this,this[wJ])}return Q}removeListener(x,J){return this.off(x,J)}off(x,J){let Q=super.off(x,J);if(x==="data"){if(this[H7]=this.listeners("data").length,this[H7]===0&&!this[C4]&&!this[b3].length)this[a2]=!1}return Q}removeAllListeners(x){let J=super.removeAllListeners(x);if(x==="data"||x===void 0){if(this[H7]=0,!this[C4]&&!this[b3].length)this[a2]=!1}return J}get emittedEnd(){return this[G5]}[R6](){if(!this[EX]&&!this[G5]&&!this[O2]&&this[r2].length===0&&this[S6]){if(this[EX]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[fX])this.emit("close");this[EX]=!1}}emit(x,...J){let Q=J[0];if(x!=="error"&&x!=="close"&&x!==O2&&this[O2])return!1;else if(x==="data")return!this[_3]&&!Q?!1:this[h8]?(_J(()=>this[mz](Q)),!0):this[mz](Q);else if(x==="end")return this[EF]();else if(x==="close"){if(this[fX]=!0,!this[G5]&&!this[O2])return!1;let X=super.emit("close");return this.removeAllListeners("close"),X}else if(x==="error"){this[wJ]=Q,super.emit(Oz,Q);let X=!this[CJ]||this.listeners("error").length?super.emit("error",Q):!1;return this[R6](),X}else if(x==="resume"){let X=super.emit("resume");return this[R6](),X}else if(x==="finish"||x==="prefinish"){let X=super.emit(x);return this.removeAllListeners(x),X}let Z=super.emit(x,...J);return this[R6](),Z}[mz](x){for(let Q of this[b3])if(Q.dest.write(x)===!1)this.pause();let J=this[C4]?!1:super.emit("data",x);return this[R6](),J}[EF](){if(this[G5])return!1;return this[G5]=!0,this.readable=!1,this[h8]?(_J(()=>this[Sz]()),!0):this[Sz]()}[Sz](){if(this[R9]){let J=this[R9].end();if(J){for(let Q of this[b3])Q.dest.write(J);if(!this[C4])super.emit("data",J)}}for(let J of this[b3])J.end();let x=super.emit("end");return this.removeAllListeners("end"),x}async collect(){let x=Object.assign([],{dataLength:0});if(!this[_3])x.dataLength=0;let J=this.promise();return this.on("data",(Q)=>{if(x.push(Q),!this[_3])x.dataLength+=Q.length}),await J,x}async concat(){if(this[_3])throw new Error("cannot concat in objectMode");let x=await this.collect();return this[D8]?x.join(""):Buffer.concat(x,x.dataLength)}async promise(){return new Promise((x,J)=>{this.on(O2,()=>J(new Error("stream destroyed"))),this.on("error",(Q)=>J(Q)),this.on("end",()=>x())})}[Symbol.asyncIterator](){this[C4]=!1;let x=!1,J=async()=>{return this.pause(),x=!0,{value:void 0,done:!0}};return{next:()=>{if(x)return J();let Z=this.read();if(Z!==null)return Promise.resolve({done:!1,value:Z});if(this[S6])return J();let X,q,Y=(G)=>{this.off("data",$),this.off("end",z),this.off(O2,W),J(),q(G)},$=(G)=>{this.off("error",Y),this.off("end",z),this.off(O2,W),this.pause(),X({value:G,done:!!this[S6]})},z=()=>{this.off("error",Y),this.off("data",$),this.off(O2,W),J(),X({done:!0,value:void 0})},W=()=>Y(new Error("stream destroyed"));return new Promise((G,H)=>{q=H,X=G,this.once(O2,W),this.once("error",Y),this.once("end",z),this.once("data",$)})},throw:J,return:J,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[C4]=!1;let x=!1,J=()=>{return this.pause(),this.off(Oz,J),this.off(O2,J),this.off("end",J),x=!0,{done:!0,value:void 0}},Q=()=>{if(x)return J();let Z=this.read();return Z===null?J():{done:!1,value:Z}};return this.once("end",J),this.once(Oz,J),this.once(O2,J),{next:Q,throw:J,return:J,[Symbol.iterator](){return this}}}destroy(x){if(this[O2]){if(x)this.emit("error",x);else this.emit(O2);return this}this[O2]=!0,this[C4]=!0,this[r2].length=0,this[t2]=0;let J=this;if(typeof J.close==="function"&&!this[fX])J.close();if(x)this.emit("error",x);else this.emit(O2);return this}static get isStream(){return Oa}}var ga=ua.native,jJ={lstatSync:ca,readdir:ba,readdirSync:pa,readlinkSync:ya,realpathSync:ga,promises:{lstat:ia,readdir:da,readlink:la,realpath:oa}},uF=(x)=>!x||x===jJ||x===ha?jJ:{...jJ,...x,promises:{...jJ.promises,...x.promises||{}}},hF=/^\\\\\?\\([a-z]:)\\?$/i,sa=(x)=>x.replace(/\//g,"\\").replace(hF,"$1\\"),na=/[\\\/]/,o4=0,gF=1,iF=2,g8=4,dF=6,lF=8,B7=10,oF=12,l4=15,LJ=~l4,vz=16,cF=32,OJ=64,F8=128,pX=256,uX=512,bF=OJ|F8|uX,aa=1023,Az=(x)=>x.isFile()?lF:x.isDirectory()?g8:x.isSymbolicLink()?B7:x.isCharacterDevice()?iF:x.isBlockDevice()?dF:x.isSocket()?oF:x.isFIFO()?gF:o4,pF=new G7({max:4096}),mJ=(x)=>{let J=pF.get(x);if(J)return J;let Q=x.normalize("NFKD");return pF.set(x,Q),Q},yF=new G7({max:4096}),yX=(x)=>{let J=yF.get(x);if(J)return J;let Q=mJ(x.toLowerCase());return yF.set(x,Q),Q};class fz extends G7{constructor(){super({max:256})}}class sF extends G7{constructor(x=16384){super({maxSize:x,sizeCalculation:(J)=>J.length+1})}}var nF=Symbol("PathScurry setAsCwd");class p3{name;root;roots;parent;nocase;isCWD=!1;#x;#Q;get dev(){return this.#Q}#q;get mode(){return this.#q}#X;get nlink(){return this.#X}#Y;get uid(){return this.#Y}#w;get gid(){return this.#w}#N;get rdev(){return this.#N}#W;get blksize(){return this.#W}#$;get ino(){return this.#$}#G;get size(){return this.#G}#V;get blocks(){return this.#V}#K;get atimeMs(){return this.#K}#Z;get mtimeMs(){return this.#Z}#H;get ctimeMs(){return this.#H}#P;get birthtimeMs(){return this.#P}#F;get atime(){return this.#F}#U;get mtime(){return this.#U}#S;get ctime(){return this.#S}#B;get birthtime(){return this.#B}#L;#j;#M;#D;#C;#O;#J;#E;#v;#m;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(x,J=o4,Q,Z,X,q,Y){if(this.name=x,this.#L=X?yX(x):mJ(x),this.#J=J&aa,this.nocase=X,this.roots=Z,this.root=Q||this,this.#E=q,this.#M=Y.fullpath,this.#C=Y.relative,this.#O=Y.relativePosix,this.parent=Y.parent,this.parent)this.#x=this.parent.#x;else this.#x=uF(Y.fs)}depth(){if(this.#j!==void 0)return this.#j;if(!this.parent)return this.#j=0;return this.#j=this.parent.depth()+1}childrenCache(){return this.#E}resolve(x){if(!x)return this;let J=this.getRootString(x),Z=x.substring(J.length).split(this.splitSep);return J?this.getRoot(J).#A(Z):this.#A(Z)}#A(x){let J=this;for(let Q of x)J=J.child(Q);return J}children(){let x=this.#E.get(this);if(x)return x;let J=Object.assign([],{provisional:0});return this.#E.set(this,J),this.#J&=~vz,J}child(x,J){if(x===""||x===".")return this;if(x==="..")return this.parent||this;let Q=this.children(),Z=this.nocase?yX(x):mJ(x);for(let $ of Q)if($.#L===Z)return $;let X=this.parent?this.sep:"",q=this.#M?this.#M+X+x:void 0,Y=this.newChild(x,o4,{...J,parent:this,fullpath:q});if(!this.canReaddir())Y.#J|=F8;return Q.push(Y),Y}relative(){if(this.isCWD)return"";if(this.#C!==void 0)return this.#C;let x=this.name,J=this.parent;if(!J)return this.#C=this.name;let Q=J.relative();return Q+(!Q||!J.parent?"":this.sep)+x}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#O!==void 0)return this.#O;let x=this.name,J=this.parent;if(!J)return this.#O=this.fullpathPosix();let Q=J.relativePosix();return Q+(!Q||!J.parent?"":"/")+x}fullpath(){if(this.#M!==void 0)return this.#M;let x=this.name,J=this.parent;if(!J)return this.#M=this.name;let Z=J.fullpath()+(!J.parent?"":this.sep)+x;return this.#M=Z}fullpathPosix(){if(this.#D!==void 0)return this.#D;if(this.sep==="/")return this.#D=this.fullpath();if(!this.parent){let Z=this.fullpath().replace(/\\/g,"/");if(/^[a-z]:\//i.test(Z))return this.#D=`//?/${Z}`;else return this.#D=Z}let x=this.parent,J=x.fullpathPosix(),Q=J+(!J||!x.parent?"":"/")+this.name;return this.#D=Q}isUnknown(){return(this.#J&l4)===o4}isType(x){return this[`is${x}`]()}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.#J&l4)===lF}isDirectory(){return(this.#J&l4)===g8}isCharacterDevice(){return(this.#J&l4)===iF}isBlockDevice(){return(this.#J&l4)===dF}isFIFO(){return(this.#J&l4)===gF}isSocket(){return(this.#J&l4)===oF}isSymbolicLink(){return(this.#J&B7)===B7}lstatCached(){return this.#J&cF?this:void 0}readlinkCached(){return this.#v}realpathCached(){return this.#m}readdirCached(){let x=this.children();return x.slice(0,x.provisional)}canReadlink(){if(this.#v)return!0;if(!this.parent)return!1;let x=this.#J&l4;return!(x!==o4&&x!==B7||this.#J&pX||this.#J&F8)}calledReaddir(){return!!(this.#J&vz)}isENOENT(){return!!(this.#J&F8)}isNamed(x){return!this.nocase?this.#L===mJ(x):this.#L===yX(x)}async readlink(){let x=this.#v;if(x)return x;if(!this.canReadlink())return;if(!this.parent)return;try{let J=await this.#x.promises.readlink(this.fullpath()),Q=(await this.parent.realpath())?.resolve(J);if(Q)return this.#v=Q}catch(J){this.#T(J.code);return}}readlinkSync(){let x=this.#v;if(x)return x;if(!this.canReadlink())return;if(!this.parent)return;try{let J=this.#x.readlinkSync(this.fullpath()),Q=this.parent.realpathSync()?.resolve(J);if(Q)return this.#v=Q}catch(J){this.#T(J.code);return}}#b(x){this.#J|=vz;for(let J=x.provisional;J<x.length;J++){let Q=x[J];if(Q)Q.#_()}}#_(){if(this.#J&F8)return;this.#J=(this.#J|F8)&LJ,this.#i()}#i(){let x=this.children();x.provisional=0;for(let J of x)J.#_()}#c(){this.#J|=uX,this.#f()}#f(){if(this.#J&OJ)return;let x=this.#J;if((x&l4)===g8)x&=LJ;this.#J=x|OJ,this.#i()}#p(x=""){if(x==="ENOTDIR"||x==="EPERM")this.#f();else if(x==="ENOENT")this.#_();else this.children().provisional=0}#I(x=""){if(x==="ENOTDIR")this.parent.#f();else if(x==="ENOENT")this.#_()}#T(x=""){let J=this.#J;if(J|=pX,x==="ENOENT")J|=F8;if(x==="EINVAL"||x==="UNKNOWN")J&=LJ;if(this.#J=J,x==="ENOTDIR"&&this.parent)this.parent.#f()}#y(x,J){return this.#h(x,J)||this.#u(x,J)}#u(x,J){let Q=Az(x),Z=this.newChild(x.name,Q,{parent:this}),X=Z.#J&l4;if(X!==g8&&X!==B7&&X!==o4)Z.#J|=OJ;return J.unshift(Z),J.provisional++,Z}#h(x,J){for(let Q=J.provisional;Q<J.length;Q++){let Z=J[Q];if((this.nocase?yX(x.name):mJ(x.name))!==Z.#L)continue;return this.#z(x,Z,Q,J)}}#z(x,J,Q,Z){let X=J.name;if(J.#J=J.#J&LJ|Az(x),X!==x.name)J.name=x.name;if(Q!==Z.provisional){if(Q===Z.length-1)Z.pop();else Z.splice(Q,1);Z.unshift(J)}return Z.provisional++,J}async lstat(){if((this.#J&F8)===0)try{return this.#g(await this.#x.promises.lstat(this.fullpath())),this}catch(x){this.#I(x.code)}}lstatSync(){if((this.#J&F8)===0)try{return this.#g(this.#x.lstatSync(this.fullpath())),this}catch(x){this.#I(x.code)}}#g(x){let{atime:J,atimeMs:Q,birthtime:Z,birthtimeMs:X,blksize:q,blocks:Y,ctime:$,ctimeMs:z,dev:W,gid:G,ino:H,mode:U,mtime:M,mtimeMs:N,nlink:F,rdev:C,size:_,uid:m}=x;this.#F=J,this.#K=Q,this.#B=Z,this.#P=X,this.#W=q,this.#V=Y,this.#S=$,this.#H=z,this.#Q=W,this.#w=G,this.#$=H,this.#q=U,this.#U=M,this.#Z=N,this.#X=F,this.#N=C,this.#G=_,this.#Y=m;let A=Az(x);if(this.#J=this.#J&LJ|A|cF,A!==o4&&A!==g8&&A!==B7)this.#J|=OJ}#k=[];#R=!1;#d(x){this.#R=!1;let J=this.#k.slice();this.#k.length=0,J.forEach((Q)=>Q(null,x))}readdirCB(x,J=!1){if(!this.canReaddir()){if(J)x(null,[]);else queueMicrotask(()=>x(null,[]));return}let Q=this.children();if(this.calledReaddir()){let X=Q.slice(0,Q.provisional);if(J)x(null,X);else queueMicrotask(()=>x(null,X));return}if(this.#k.push(x),this.#R)return;this.#R=!0;let Z=this.fullpath();this.#x.readdir(Z,{withFileTypes:!0},(X,q)=>{if(X)this.#p(X.code),Q.provisional=0;else{for(let Y of q)this.#y(Y,Q);this.#b(Q)}this.#d(Q.slice(0,Q.provisional));return})}#l;async readdir(){if(!this.canReaddir())return[];let x=this.children();if(this.calledReaddir())return x.slice(0,x.provisional);let J=this.fullpath();if(this.#l)await this.#l;else{let Q=()=>{};this.#l=new Promise((Z)=>Q=Z);try{for(let Z of await this.#x.promises.readdir(J,{withFileTypes:!0}))this.#y(Z,x);this.#b(x)}catch(Z){this.#p(Z.code),x.provisional=0}this.#l=void 0,Q()}return x.slice(0,x.provisional)}readdirSync(){if(!this.canReaddir())return[];let x=this.children();if(this.calledReaddir())return x.slice(0,x.provisional);let J=this.fullpath();try{for(let Q of this.#x.readdirSync(J,{withFileTypes:!0}))this.#y(Q,x);this.#b(x)}catch(Q){this.#p(Q.code),x.provisional=0}return x.slice(0,x.provisional)}canReaddir(){if(this.#J&bF)return!1;let x=l4&this.#J;if(!(x===o4||x===g8||x===B7))return!1;return!0}shouldWalk(x,J){return(this.#J&g8)===g8&&!(this.#J&bF)&&!x.has(this)&&(!J||J(this))}async realpath(){if(this.#m)return this.#m;if((uX|pX|F8)&this.#J)return;try{let x=await this.#x.promises.realpath(this.fullpath());return this.#m=this.resolve(x)}catch(x){this.#c()}}realpathSync(){if(this.#m)return this.#m;if((uX|pX|F8)&this.#J)return;try{let x=this.#x.realpathSync(this.fullpath());return this.#m=this.resolve(x)}catch(x){this.#c()}}[nF](x){if(x===this)return;x.isCWD=!1,this.isCWD=!0;let J=new Set([]),Q=[],Z=this;while(Z&&Z.parent)J.add(Z),Z.#C=Q.join(this.sep),Z.#O=Q.join("/"),Z=Z.parent,Q.push("..");Z=x;while(Z&&Z.parent&&!J.has(Z))Z.#C=void 0,Z.#O=void 0,Z=Z.parent}}class hX extends p3{sep="\\";splitSep=na;constructor(x,J=o4,Q,Z,X,q,Y){super(x,J,Q,Z,X,q,Y)}newChild(x,J=o4,Q={}){return new hX(x,J,this.root,this.roots,this.nocase,this.childrenCache(),Q)}getRootString(x){return Ez.parse(x).root}getRoot(x){if(x=sa(x.toUpperCase()),x===this.root.name)return this.root;for(let[J,Q]of Object.entries(this.roots))if(this.sameRoot(x,J))return this.roots[x]=Q;return this.roots[x]=new SJ(x,this).root}sameRoot(x,J=this.root.name){return x=x.toUpperCase().replace(/\//g,"\\").replace(hF,"$1\\"),x===J}}class gX extends p3{splitSep="/";sep="/";constructor(x,J=o4,Q,Z,X,q,Y){super(x,J,Q,Z,X,q,Y)}getRootString(x){return x.startsWith("/")?"/":""}getRoot(x){return this.root}newChild(x,J=o4,Q={}){return new gX(x,J,this.root,this.roots,this.nocase,this.childrenCache(),Q)}}class kz{root;rootPath;roots;cwd;#x;#Q;#q;nocase;#X;constructor(x=process.cwd(),J,Q,{nocase:Z,childrenCacheSize:X=16384,fs:q=jJ}={}){if(this.#X=uF(q),x instanceof URL||x.startsWith("file://"))x=ka(x);let Y=J.resolve(x);this.roots=Object.create(null),this.rootPath=this.parseRootPath(Y),this.#x=new fz,this.#Q=new fz,this.#q=new sF(X);let $=Y.substring(this.rootPath.length).split(Q);if($.length===1&&!$[0])$.pop();if(Z===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=Z,this.root=this.newRoot(this.#X),this.roots[this.rootPath]=this.root;let z=this.root,W=$.length-1,G=J.sep,H=this.rootPath,U=!1;for(let M of $){let N=W--;z=z.child(M,{relative:new Array(N).fill("..").join(G),relativePosix:new Array(N).fill("..").join("/"),fullpath:H+=(U?"":G)+M}),U=!0}this.cwd=z}depth(x=this.cwd){if(typeof x==="string")x=this.cwd.resolve(x);return x.depth()}childrenCache(){return this.#q}resolve(...x){let J="";for(let X=x.length-1;X>=0;X--){let q=x[X];if(!q||q===".")continue;if(J=J?`${q}/${J}`:q,this.isAbsolute(q))break}let Q=this.#x.get(J);if(Q!==void 0)return Q;let Z=this.cwd.resolve(J).fullpath();return this.#x.set(J,Z),Z}resolvePosix(...x){let J="";for(let X=x.length-1;X>=0;X--){let q=x[X];if(!q||q===".")continue;if(J=J?`${q}/${J}`:q,this.isAbsolute(q))break}let Q=this.#Q.get(J);if(Q!==void 0)return Q;let Z=this.cwd.resolve(J).fullpathPosix();return this.#Q.set(J,Z),Z}relative(x=this.cwd){if(typeof x==="string")x=this.cwd.resolve(x);return x.relative()}relativePosix(x=this.cwd){if(typeof x==="string")x=this.cwd.resolve(x);return x.relativePosix()}basename(x=this.cwd){if(typeof x==="string")x=this.cwd.resolve(x);return x.name}dirname(x=this.cwd){if(typeof x==="string")x=this.cwd.resolve(x);return(x.parent||x).fullpath()}async readdir(x=this.cwd,J={withFileTypes:!0}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))J=x,x=this.cwd;let{withFileTypes:Q}=J;if(!x.canReaddir())return[];else{let Z=await x.readdir();return Q?Z:Z.map((X)=>X.name)}}readdirSync(x=this.cwd,J={withFileTypes:!0}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))J=x,x=this.cwd;let{withFileTypes:Q=!0}=J;if(!x.canReaddir())return[];else if(Q)return x.readdirSync();else return x.readdirSync().map((Z)=>Z.name)}async lstat(x=this.cwd){if(typeof x==="string")x=this.cwd.resolve(x);return x.lstat()}lstatSync(x=this.cwd){if(typeof x==="string")x=this.cwd.resolve(x);return x.lstatSync()}async readlink(x=this.cwd,{withFileTypes:J}={withFileTypes:!1}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))J=x.withFileTypes,x=this.cwd;let Q=await x.readlink();return J?Q:Q?.fullpath()}readlinkSync(x=this.cwd,{withFileTypes:J}={withFileTypes:!1}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))J=x.withFileTypes,x=this.cwd;let Q=x.readlinkSync();return J?Q:Q?.fullpath()}async realpath(x=this.cwd,{withFileTypes:J}={withFileTypes:!1}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))J=x.withFileTypes,x=this.cwd;let Q=await x.realpath();return J?Q:Q?.fullpath()}realpathSync(x=this.cwd,{withFileTypes:J}={withFileTypes:!1}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))J=x.withFileTypes,x=this.cwd;let Q=x.realpathSync();return J?Q:Q?.fullpath()}async walk(x=this.cwd,J={}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))J=x,x=this.cwd;let{withFileTypes:Q=!0,follow:Z=!1,filter:X,walkFilter:q}=J,Y=[];if(!X||X(x))Y.push(Q?x:x.fullpath());let $=new Set,z=(G,H)=>{$.add(G),G.readdirCB((U,M)=>{if(U)return H(U);let N=M.length;if(!N)return H();let F=()=>{if(--N===0)H()};for(let C of M){if(!X||X(C))Y.push(Q?C:C.fullpath());if(Z&&C.isSymbolicLink())C.realpath().then((_)=>_?.isUnknown()?_.lstat():_).then((_)=>_?.shouldWalk($,q)?z(_,F):F());else if(C.shouldWalk($,q))z(C,F);else F()}},!0)},W=x;return new Promise((G,H)=>{z(W,(U)=>{if(U)return H(U);G(Y)})})}walkSync(x=this.cwd,J={}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))J=x,x=this.cwd;let{withFileTypes:Q=!0,follow:Z=!1,filter:X,walkFilter:q}=J,Y=[];if(!X||X(x))Y.push(Q?x:x.fullpath());let $=new Set([x]);for(let z of $){let W=z.readdirSync();for(let G of W){if(!X||X(G))Y.push(Q?G:G.fullpath());let H=G;if(G.isSymbolicLink()){if(!(Z&&(H=G.realpathSync())))continue;if(H.isUnknown())H.lstatSync()}if(H.shouldWalk($,q))$.add(H)}}return Y}[Symbol.asyncIterator](){return this.iterate()}iterate(x=this.cwd,J={}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))J=x,x=this.cwd;return this.stream(x,J)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(x=this.cwd,J={}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))J=x,x=this.cwd;let{withFileTypes:Q=!0,follow:Z=!1,filter:X,walkFilter:q}=J;if(!X||X(x))yield Q?x:x.fullpath();let Y=new Set([x]);for(let $ of Y){let z=$.readdirSync();for(let W of z){if(!X||X(W))yield Q?W:W.fullpath();let G=W;if(W.isSymbolicLink()){if(!(Z&&(G=W.realpathSync())))continue;if(G.isUnknown())G.lstatSync()}if(G.shouldWalk(Y,q))Y.add(G)}}}stream(x=this.cwd,J={}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))J=x,x=this.cwd;let{withFileTypes:Q=!0,follow:Z=!1,filter:X,walkFilter:q}=J,Y=new U7({objectMode:!0});if(!X||X(x))Y.write(Q?x:x.fullpath());let $=new Set,z=[x],W=0,G=()=>{let H=!1;while(!H){let U=z.shift();if(!U){if(W===0)Y.end();return}W++,$.add(U);let M=(F,C,_=!1)=>{if(F)return Y.emit("error",F);if(Z&&!_){let m=[];for(let A of C)if(A.isSymbolicLink())m.push(A.realpath().then((u)=>u?.isUnknown()?u.lstat():u));if(m.length){Promise.all(m).then(()=>M(null,C,!0));return}}for(let m of C)if(m&&(!X||X(m))){if(!Y.write(Q?m:m.fullpath()))H=!0}W--;for(let m of C){let A=m.realpathCached()||m;if(A.shouldWalk($,q))z.push(A)}if(H&&!Y.flowing)Y.once("drain",G);else if(!N)G()},N=!0;U.readdirCB(M,!0),N=!1}};return G(),Y}streamSync(x=this.cwd,J={}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))J=x,x=this.cwd;let{withFileTypes:Q=!0,follow:Z=!1,filter:X,walkFilter:q}=J,Y=new U7({objectMode:!0}),$=new Set;if(!X||X(x))Y.write(Q?x:x.fullpath());let z=[x],W=0,G=()=>{let H=!1;while(!H){let U=z.shift();if(!U){if(W===0)Y.end();return}W++,$.add(U);let M=U.readdirSync();for(let N of M)if(!X||X(N)){if(!Y.write(Q?N:N.fullpath()))H=!0}W--;for(let N of M){let F=N;if(N.isSymbolicLink()){if(!(Z&&(F=N.realpathSync())))continue;if(F.isUnknown())F.lstatSync()}if(F.shouldWalk($,q))z.push(F)}}if(H&&!Y.flowing)Y.once("drain",G)};return G(),Y}chdir(x=this.cwd){let J=this.cwd;this.cwd=typeof x==="string"?this.cwd.resolve(x):x,this.cwd[nF](J)}}class SJ extends kz{sep="\\";constructor(x=process.cwd(),J={}){let{nocase:Q=!0}=J;super(x,Ez,"\\",{...J,nocase:Q});this.nocase=Q;for(let Z=this.cwd;Z;Z=Z.parent)Z.nocase=this.nocase}parseRootPath(x){return Ez.parse(x).root.toUpperCase()}newRoot(x){return new hX(this.rootPath,g8,void 0,this.roots,this.nocase,this.childrenCache(),{fs:x})}isAbsolute(x){return x.startsWith("/")||x.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(x)}}class RJ extends kz{sep="/";constructor(x=process.cwd(),J={}){let{nocase:Q=!1}=J;super(x,fa,"/",{...J,nocase:Q});this.nocase=Q}parseRootPath(x){return"/"}newRoot(x){return new gX(this.rootPath,g8,void 0,this.roots,this.nocase,this.childrenCache(),{fs:x})}isAbsolute(x){return x.startsWith("/")}}class iX extends RJ{constructor(x=process.cwd(),J={}){let{nocase:Q=!0}=J;super(x,{...J,nocase:Q})}}var oT0=process.platform==="win32"?hX:gX,aF=process.platform==="win32"?SJ:process.platform==="darwin"?iX:RJ;var ra=(x)=>x.length>=1,ta=(x)=>x.length>=1;class T9{#x;#Q;#q;length;#X;#Y;#w;#N;#W;#$;#G=!0;constructor(x,J,Q,Z){if(!ra(x))throw new TypeError("empty pattern list");if(!ta(J))throw new TypeError("empty glob list");if(J.length!==x.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=x.length,Q<0||Q>=this.length)throw new TypeError("index out of range");if(this.#x=x,this.#Q=J,this.#q=Q,this.#X=Z,this.#q===0){if(this.isUNC()){let[X,q,Y,$,...z]=this.#x,[W,G,H,U,...M]=this.#Q;if(z[0]==="")z.shift(),M.shift();let N=[X,q,Y,$,""].join("/"),F=[W,G,H,U,""].join("/");this.#x=[N,...z],this.#Q=[F,...M],this.length=this.#x.length}else if(this.isDrive()||this.isAbsolute()){let[X,...q]=this.#x,[Y,...$]=this.#Q;if(q[0]==="")q.shift(),$.shift();let z=X+"/",W=Y+"/";this.#x=[z,...q],this.#Q=[W,...$],this.length=this.#x.length}}}pattern(){return this.#x[this.#q]}isString(){return typeof this.#x[this.#q]==="string"}isGlobstar(){return this.#x[this.#q]===W3}isRegExp(){return this.#x[this.#q]instanceof RegExp}globString(){return this.#w=this.#w||(this.#q===0?this.isAbsolute()?this.#Q[0]+this.#Q.slice(1).join("/"):this.#Q.join("/"):this.#Q.slice(this.#q).join("/"))}hasMore(){return this.length>this.#q+1}rest(){if(this.#Y!==void 0)return this.#Y;if(!this.hasMore())return this.#Y=null;return this.#Y=new T9(this.#x,this.#Q,this.#q+1,this.#X),this.#Y.#$=this.#$,this.#Y.#W=this.#W,this.#Y.#N=this.#N,this.#Y}isUNC(){let x=this.#x;return this.#W!==void 0?this.#W:this.#W=this.#X==="win32"&&this.#q===0&&x[0]===""&&x[1]===""&&typeof x[2]==="string"&&!!x[2]&&typeof x[3]==="string"&&!!x[3]}isDrive(){let x=this.#x;return this.#N!==void 0?this.#N:this.#N=this.#X==="win32"&&this.#q===0&&this.length>1&&typeof x[0]==="string"&&/^[a-z]:$/i.test(x[0])}isAbsolute(){let x=this.#x;return this.#$!==void 0?this.#$:this.#$=x[0]===""&&x.length>1||this.isDrive()||this.isUNC()}root(){let x=this.#x[0];return typeof x==="string"&&this.isAbsolute()&&this.#q===0?x:""}checkFollowGlobstar(){return!(this.#q===0||!this.isGlobstar()||!this.#G)}markFollowGlobstar(){if(this.#q===0||!this.isGlobstar()||!this.#G)return!1;return this.#G=!1,!0}}var ea=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class IJ{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(x,{nobrace:J,nocase:Q,noext:Z,noglobstar:X,platform:q=ea}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=q,this.mmopts={dot:!0,nobrace:J,nocase:Q,noext:Z,noglobstar:X,optimizationLevel:2,platform:q,nocomment:!0,nonegate:!0};for(let Y of x)this.add(Y)}add(x){let J=new d4(x,this.mmopts);for(let Q=0;Q<J.set.length;Q++){let Z=J.set[Q],X=J.globParts[Q];if(!Z||!X)throw new Error("invalid pattern object");while(Z[0]==="."&&X[0]===".")Z.shift(),X.shift();let q=new T9(Z,X,0,this.platform),Y=new d4(q.globString(),this.mmopts),$=X[X.length-1]==="**",z=q.isAbsolute();if(z)this.absolute.push(Y);else this.relative.push(Y);if($)if(z)this.absoluteChildren.push(Y);else this.relativeChildren.push(Y)}}ignored(x){let J=x.fullpath(),Q=`${J}/`,Z=x.relative()||".",X=`${Z}/`;for(let q of this.relative)if(q.match(Z)||q.match(X))return!0;for(let q of this.absolute)if(q.match(J)||q.match(Q))return!0;return!1}childrenIgnored(x){let J=x.fullpath()+"/",Q=(x.relative()||".")+"/";for(let Z of this.relativeChildren)if(Z.match(Q))return!0;for(let Z of this.absoluteChildren)if(Z.match(J))return!0;return!1}}class cz{store;constructor(x=new Map){this.store=x}copy(){return new cz(new Map(this.store))}hasWalked(x,J){return this.store.get(x.fullpath())?.has(J.globString())}storeWalked(x,J){let Q=x.fullpath(),Z=this.store.get(Q);if(Z)Z.add(J.globString());else this.store.set(Q,new Set([J.globString()]))}}class rF{store=new Map;add(x,J,Q){let Z=(J?2:0)|(Q?1:0),X=this.store.get(x);this.store.set(x,X===void 0?Z:Z&X)}entries(){return[...this.store.entries()].map(([x,J])=>[x,!!(J&2),!!(J&1)])}}class tF{store=new Map;add(x,J){if(!x.canReaddir())return;let Q=this.store.get(x);if(Q){if(!Q.find((Z)=>Z.globString()===J.globString()))Q.push(J)}else this.store.set(x,[J])}get(x){let J=this.store.get(x);if(!J)throw new Error("attempting to walk unknown path");return J}entries(){return this.keys().map((x)=>[x,this.store.get(x)])}keys(){return[...this.store.keys()].filter((x)=>x.canReaddir())}}class TJ{hasWalkedCache;matches=new rF;subwalks=new tF;patterns;follow;dot;opts;constructor(x,J){this.opts=x,this.follow=!!x.follow,this.dot=!!x.dot,this.hasWalkedCache=J?J.copy():new cz}processPatterns(x,J){this.patterns=J;let Q=J.map((Z)=>[x,Z]);for(let[Z,X]of Q){this.hasWalkedCache.storeWalked(Z,X);let q=X.root(),Y=X.isAbsolute()&&this.opts.absolute!==!1;if(q){Z=Z.resolve(q==="/"&&this.opts.root!==void 0?this.opts.root:q);let G=X.rest();if(!G){this.matches.add(Z,!0,!1);continue}else X=G}if(Z.isENOENT())continue;let $,z,W=!1;while(typeof($=X.pattern())==="string"&&(z=X.rest()))Z=Z.resolve($),X=z,W=!0;if($=X.pattern(),z=X.rest(),W){if(this.hasWalkedCache.hasWalked(Z,X))continue;this.hasWalkedCache.storeWalked(Z,X)}if(typeof $==="string"){let G=$===".."||$===""||$===".";this.matches.add(Z.resolve($),Y,G);continue}else if($===W3){if(!Z.isSymbolicLink()||this.follow||X.checkFollowGlobstar())this.subwalks.add(Z,X);let G=z?.pattern(),H=z?.rest();if(!z||(G===""||G===".")&&!H)this.matches.add(Z,Y,G===""||G===".");else if(G===".."){let U=Z.parent||Z;if(!H)this.matches.add(U,Y,!0);else if(!this.hasWalkedCache.hasWalked(U,H))this.subwalks.add(U,H)}}else if($ instanceof RegExp)this.subwalks.add(Z,X)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new TJ(this.opts,this.hasWalkedCache)}filterEntries(x,J){let Q=this.subwalks.get(x),Z=this.child();for(let X of J)for(let q of Q){let Y=q.isAbsolute(),$=q.pattern(),z=q.rest();if($===W3)Z.testGlobstar(X,q,z,Y);else if($ instanceof RegExp)Z.testRegExp(X,$,z,Y);else Z.testString(X,$,z,Y)}return Z}testGlobstar(x,J,Q,Z){if(this.dot||!x.name.startsWith(".")){if(!J.hasMore())this.matches.add(x,Z,!1);if(x.canReaddir()){if(this.follow||!x.isSymbolicLink())this.subwalks.add(x,J);else if(x.isSymbolicLink()){if(Q&&J.checkFollowGlobstar())this.subwalks.add(x,Q);else if(J.markFollowGlobstar())this.subwalks.add(x,J)}}}if(Q){let X=Q.pattern();if(typeof X==="string"&&X!==".."&&X!==""&&X!==".")this.testString(x,X,Q.rest(),Z);else if(X===".."){let q=x.parent||x;this.subwalks.add(q,Q)}else if(X instanceof RegExp)this.testRegExp(x,X,Q.rest(),Z)}}testRegExp(x,J,Q,Z){if(!J.test(x.name))return;if(!Q)this.matches.add(x,Z,!1);else this.subwalks.add(x,Q)}testString(x,J,Q,Z){if(!x.isNamed(J))return;if(!Q)this.matches.add(x,Z,!1);else this.subwalks.add(x,Q)}}var xr=(x,J)=>typeof x==="string"?new IJ([x],J):Array.isArray(x)?new IJ(x,J):x;class bz{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#x=[];#Q;#q;signal;maxDepth;includeChildMatches;constructor(x,J,Q){if(this.patterns=x,this.path=J,this.opts=Q,this.#q=!Q.posix&&Q.platform==="win32"?"\\":"/",this.includeChildMatches=Q.includeChildMatches!==!1,Q.ignore||!this.includeChildMatches){if(this.#Q=xr(Q.ignore??[],Q),!this.includeChildMatches&&typeof this.#Q.add!=="function")throw new Error("cannot ignore child matches, ignore lacks add() method.")}if(this.maxDepth=Q.maxDepth||1/0,Q.signal)this.signal=Q.signal,this.signal.addEventListener("abort",()=>{this.#x.length=0})}#X(x){return this.seen.has(x)||!!this.#Q?.ignored?.(x)}#Y(x){return!!this.#Q?.childrenIgnored?.(x)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let x=void 0;while(!this.paused&&(x=this.#x.shift()))x()}onResume(x){if(this.signal?.aborted)return;if(!this.paused)x();else this.#x.push(x)}async matchCheck(x,J){if(J&&this.opts.nodir)return;let Q;if(this.opts.realpath){if(Q=x.realpathCached()||await x.realpath(),!Q)return;x=Q}let X=x.isUnknown()||this.opts.stat?await x.lstat():x;if(this.opts.follow&&this.opts.nodir&&X?.isSymbolicLink()){let q=await X.realpath();if(q&&(q.isUnknown()||this.opts.stat))await q.lstat()}return this.matchCheckTest(X,J)}matchCheckTest(x,J){return x&&(this.maxDepth===1/0||x.depth()<=this.maxDepth)&&(!J||x.canReaddir())&&(!this.opts.nodir||!x.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!x.isSymbolicLink()||!x.realpathCached()?.isDirectory())&&!this.#X(x)?x:void 0}matchCheckSync(x,J){if(J&&this.opts.nodir)return;let Q;if(this.opts.realpath){if(Q=x.realpathCached()||x.realpathSync(),!Q)return;x=Q}let X=x.isUnknown()||this.opts.stat?x.lstatSync():x;if(this.opts.follow&&this.opts.nodir&&X?.isSymbolicLink()){let q=X.realpathSync();if(q&&(q?.isUnknown()||this.opts.stat))q.lstatSync()}return this.matchCheckTest(X,J)}matchFinish(x,J){if(this.#X(x))return;if(!this.includeChildMatches&&this.#Q?.add){let X=`${x.relativePosix()}/**`;this.#Q.add(X)}let Q=this.opts.absolute===void 0?J:this.opts.absolute;this.seen.add(x);let Z=this.opts.mark&&x.isDirectory()?this.#q:"";if(this.opts.withFileTypes)this.matchEmit(x);else if(Q){let X=this.opts.posix?x.fullpathPosix():x.fullpath();this.matchEmit(X+Z)}else{let X=this.opts.posix?x.relativePosix():x.relative(),q=this.opts.dotRelative&&!X.startsWith(".."+this.#q)?"."+this.#q:"";this.matchEmit(!X?"."+Z:q+X+Z)}}async match(x,J,Q){let Z=await this.matchCheck(x,Q);if(Z)this.matchFinish(Z,J)}matchSync(x,J,Q){let Z=this.matchCheckSync(x,Q);if(Z)this.matchFinish(Z,J)}walkCB(x,J,Q){if(this.signal?.aborted)Q();this.walkCB2(x,J,new TJ(this.opts),Q)}walkCB2(x,J,Q,Z){if(this.#Y(x))return Z();if(this.signal?.aborted)Z();if(this.paused){this.onResume(()=>this.walkCB2(x,J,Q,Z));return}Q.processPatterns(x,J);let X=1,q=()=>{if(--X===0)Z()};for(let[Y,$,z]of Q.matches.entries()){if(this.#X(Y))continue;X++,this.match(Y,$,z).then(()=>q())}for(let Y of Q.subwalkTargets()){if(this.maxDepth!==1/0&&Y.depth()>=this.maxDepth)continue;X++;let $=Y.readdirCached();if(Y.calledReaddir())this.walkCB3(Y,$,Q,q);else Y.readdirCB((z,W)=>this.walkCB3(Y,W,Q,q),!0)}q()}walkCB3(x,J,Q,Z){Q=Q.filterEntries(x,J);let X=1,q=()=>{if(--X===0)Z()};for(let[Y,$,z]of Q.matches.entries()){if(this.#X(Y))continue;X++,this.match(Y,$,z).then(()=>q())}for(let[Y,$]of Q.subwalks.entries())X++,this.walkCB2(Y,$,Q.child(),q);q()}walkCBSync(x,J,Q){if(this.signal?.aborted)Q();this.walkCB2Sync(x,J,new TJ(this.opts),Q)}walkCB2Sync(x,J,Q,Z){if(this.#Y(x))return Z();if(this.signal?.aborted)Z();if(this.paused){this.onResume(()=>this.walkCB2Sync(x,J,Q,Z));return}Q.processPatterns(x,J);let X=1,q=()=>{if(--X===0)Z()};for(let[Y,$,z]of Q.matches.entries()){if(this.#X(Y))continue;this.matchSync(Y,$,z)}for(let Y of Q.subwalkTargets()){if(this.maxDepth!==1/0&&Y.depth()>=this.maxDepth)continue;X++;let $=Y.readdirSync();this.walkCB3Sync(Y,$,Q,q)}q()}walkCB3Sync(x,J,Q,Z){Q=Q.filterEntries(x,J);let X=1,q=()=>{if(--X===0)Z()};for(let[Y,$,z]of Q.matches.entries()){if(this.#X(Y))continue;this.matchSync(Y,$,z)}for(let[Y,$]of Q.subwalks.entries())X++,this.walkCB2Sync(Y,$,Q.child(),q);q()}}class dX extends bz{matches=new Set;constructor(x,J,Q){super(x,J,Q)}matchEmit(x){this.matches.add(x)}async walk(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown())await this.path.lstat();return await new Promise((x,J)=>{this.walkCB(this.path,this.patterns,()=>{if(this.signal?.aborted)J(this.signal.reason);else x(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown())this.path.lstatSync();return this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}}class lX extends bz{results;constructor(x,J,Q){super(x,J,Q);this.results=new U7({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(x){if(this.results.write(x),!this.results.flowing)this.pause()}stream(){let x=this.path;if(x.isUnknown())x.lstat().then(()=>{this.walkCB(x,this.patterns,()=>this.results.end())});else this.walkCB(x,this.patterns,()=>this.results.end());return this.results}streamSync(){if(this.path.isUnknown())this.path.lstatSync();return this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}var Qr=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class i8{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(x,J){if(!J)throw new TypeError("glob options required");if(this.withFileTypes=!!J.withFileTypes,this.signal=J.signal,this.follow=!!J.follow,this.dot=!!J.dot,this.dotRelative=!!J.dotRelative,this.nodir=!!J.nodir,this.mark=!!J.mark,!J.cwd)this.cwd="";else if(J.cwd instanceof URL||J.cwd.startsWith("file://"))J.cwd=Jr(J.cwd);if(this.cwd=J.cwd||"",this.root=J.root,this.magicalBraces=!!J.magicalBraces,this.nobrace=!!J.nobrace,this.noext=!!J.noext,this.realpath=!!J.realpath,this.absolute=J.absolute,this.includeChildMatches=J.includeChildMatches!==!1,this.noglobstar=!!J.noglobstar,this.matchBase=!!J.matchBase,this.maxDepth=typeof J.maxDepth==="number"?J.maxDepth:1/0,this.stat=!!J.stat,this.ignore=J.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof x==="string")x=[x];if(this.windowsPathsNoEscape=!!J.windowsPathsNoEscape||J.allowWindowsEscape===!1,this.windowsPathsNoEscape)x=x.map(($)=>$.replace(/\\/g,"/"));if(this.matchBase){if(J.noglobstar)throw new TypeError("base matching requires globstar");x=x.map(($)=>$.includes("/")?$:`./**/${$}`)}if(this.pattern=x,this.platform=J.platform||Qr,this.opts={...J,platform:this.platform},J.scurry){if(this.scurry=J.scurry,J.nocase!==void 0&&J.nocase!==J.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let $=J.platform==="win32"?SJ:J.platform==="darwin"?iX:J.platform?RJ:aF;this.scurry=new $(this.cwd,{nocase:J.nocase,fs:J.fs})}this.nocase=this.scurry.nocase;let Q=this.platform==="darwin"||this.platform==="win32",Z={...J,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:Q,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},X=this.pattern.map(($)=>new d4($,Z)),[q,Y]=X.reduce(($,z)=>{return $[0].push(...z.set),$[1].push(...z.globParts),$},[[],[]]);this.patterns=q.map(($,z)=>{let W=Y[z];if(!W)throw new Error("invalid pattern object");return new T9($,W,0,this.platform)})}async walk(){return[...await new dX(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 dX(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 lX(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 lX(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 pz=(x,J={})=>{if(!Array.isArray(x))x=[x];for(let Q of x)if(new d4(Q,J).hasMagic())return!0;return!1};function sX(x,J={}){return new i8(x,J).streamSync()}function xw(x,J={}){return new i8(x,J).stream()}function Jw(x,J={}){return new i8(x,J).walkSync()}async function eF(x,J={}){return new i8(x,J).walk()}function nX(x,J={}){return new i8(x,J).iterateSync()}function Qw(x,J={}){return new i8(x,J).iterate()}var Zr=sX,Xr=Object.assign(xw,{sync:sX}),qr=nX,Yr=Object.assign(Qw,{sync:nX}),$r=Object.assign(Jw,{stream:sX,iterate:nX}),oX=Object.assign(eF,{glob:eF,globSync:Jw,sync:$r,globStream:xw,stream:Xr,globStreamSync:sX,streamSync:Zr,globIterate:Qw,iterate:Yr,globIterateSync:nX,iterateSync:qr,Glob:i8,hasMagic:pz,escape:m9,unescape:N8});oX.glob=oX;var bL=V7(KW(),1);import $40 from"fs";import K40 from"path";function kJ(x,J){return function Q(){return x.apply(J,arguments)}}var{toString:at}=Object.prototype,{getPrototypeOf:WW}=Object,{iterator:$q,toStringTag:$C}=Symbol,Kq=((x)=>(J)=>{let Q=at.call(J);return x[Q]||(x[Q]=Q.slice(8,-1).toLowerCase())})(Object.create(null)),P8=(x)=>{return x=x.toLowerCase(),(J)=>Kq(J)===x},zq=(x)=>(J)=>typeof J===x,{isArray:c9}=Array,k9=zq("undefined");function cJ(x){return x!==null&&!k9(x)&&x.constructor!==null&&!k9(x.constructor)&&r3(x.constructor.isBuffer)&&x.constructor.isBuffer(x)}var KC=P8("ArrayBuffer");function rt(x){let J;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView)J=ArrayBuffer.isView(x);else J=x&&x.buffer&&KC(x.buffer);return J}var tt=zq("string"),r3=zq("function"),zC=zq("number"),bJ=(x)=>x!==null&&typeof x==="object",et=(x)=>x===!0||x===!1,Yq=(x)=>{if(Kq(x)!=="object")return!1;let J=WW(x);return(J===null||J===Object.prototype||Object.getPrototypeOf(J)===null)&&!($C in x)&&!($q in x)},xe=(x)=>{if(!bJ(x)||cJ(x))return!1;try{return Object.keys(x).length===0&&Object.getPrototypeOf(x)===Object.prototype}catch(J){return!1}},Je=P8("Date"),Qe=P8("File"),Ze=P8("Blob"),Xe=P8("FileList"),qe=(x)=>bJ(x)&&r3(x.pipe),Ye=(x)=>{let J;return x&&(typeof FormData==="function"&&x instanceof FormData||r3(x.append)&&((J=Kq(x))==="formdata"||J==="object"&&r3(x.toString)&&x.toString()==="[object FormData]"))},$e=P8("URLSearchParams"),[Ke,ze,We,Ve]=["ReadableStream","Request","Response","Headers"].map(P8),Ge=(x)=>x.trim?x.trim():x.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function pJ(x,J,{allOwnKeys:Q=!1}={}){if(x===null||typeof x==="undefined")return;let Z,X;if(typeof x!=="object")x=[x];if(c9(x))for(Z=0,X=x.length;Z<X;Z++)J.call(null,x[Z],Z,x);else{if(cJ(x))return;let q=Q?Object.getOwnPropertyNames(x):Object.keys(x),Y=q.length,$;for(Z=0;Z<Y;Z++)$=q[Z],J.call(null,x[$],$,x)}}function WC(x,J){if(cJ(x))return null;J=J.toLowerCase();let Q=Object.keys(x),Z=Q.length,X;while(Z-- >0)if(X=Q[Z],J===X.toLowerCase())return X;return null}var N7=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})(),VC=(x)=>!k9(x)&&x!==N7;function zW(){let{caseless:x,skipUndefined:J}=VC(this)&&this||{},Q={},Z=(X,q)=>{if(q==="__proto__"||q==="constructor"||q==="prototype")return;let Y=x&&WC(Q,q)||q;if(Yq(Q[Y])&&Yq(X))Q[Y]=zW(Q[Y],X);else if(Yq(X))Q[Y]=zW({},X);else if(c9(X))Q[Y]=X.slice();else if(!J||!k9(X))Q[Y]=X};for(let X=0,q=arguments.length;X<q;X++)arguments[X]&&pJ(arguments[X],Z);return Q}var He=(x,J,Q,{allOwnKeys:Z}={})=>{return pJ(J,(X,q)=>{if(Q&&r3(X))Object.defineProperty(x,q,{value:kJ(X,Q),writable:!0,enumerable:!0,configurable:!0});else Object.defineProperty(x,q,{value:X,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:Z}),x},Ue=(x)=>{if(x.charCodeAt(0)===65279)x=x.slice(1);return x},Be=(x,J,Q,Z)=>{x.prototype=Object.create(J.prototype,Z),Object.defineProperty(x.prototype,"constructor",{value:x,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(x,"super",{value:J.prototype}),Q&&Object.assign(x.prototype,Q)},Me=(x,J,Q,Z)=>{let X,q,Y,$={};if(J=J||{},x==null)return J;do{X=Object.getOwnPropertyNames(x),q=X.length;while(q-- >0)if(Y=X[q],(!Z||Z(Y,x,J))&&!$[Y])J[Y]=x[Y],$[Y]=!0;x=Q!==!1&&WW(x)}while(x&&(!Q||Q(x,J))&&x!==Object.prototype);return J},Ne=(x,J,Q)=>{if(x=String(x),Q===void 0||Q>x.length)Q=x.length;Q-=J.length;let Z=x.indexOf(J,Q);return Z!==-1&&Z===Q},De=(x)=>{if(!x)return null;if(c9(x))return x;let J=x.length;if(!zC(J))return null;let Q=new Array(J);while(J-- >0)Q[J]=x[J];return Q},Fe=((x)=>{return(J)=>{return x&&J instanceof x}})(typeof Uint8Array!=="undefined"&&WW(Uint8Array)),we=(x,J)=>{let Z=(x&&x[$q]).call(x),X;while((X=Z.next())&&!X.done){let q=X.value;J.call(x,q[0],q[1])}},Pe=(x,J)=>{let Q,Z=[];while((Q=x.exec(J))!==null)Z.push(Q);return Z},Ce=P8("HTMLFormElement"),_e=(x)=>{return x.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function J(Q,Z,X){return Z.toUpperCase()+X})},YC=(({hasOwnProperty:x})=>(J,Q)=>x.call(J,Q))(Object.prototype),Le=P8("RegExp"),GC=(x,J)=>{let Q=Object.getOwnPropertyDescriptors(x),Z={};pJ(Q,(X,q)=>{let Y;if((Y=J(X,q,x))!==!1)Z[q]=Y||X}),Object.defineProperties(x,Z)},je=(x)=>{GC(x,(J,Q)=>{if(r3(x)&&["arguments","caller","callee"].indexOf(Q)!==-1)return!1;let Z=x[Q];if(!r3(Z))return;if(J.enumerable=!1,"writable"in J){J.writable=!1;return}if(!J.set)J.set=()=>{throw Error("Can not rewrite read-only method '"+Q+"'")}})},Oe=(x,J)=>{let Q={},Z=(X)=>{X.forEach((q)=>{Q[q]=!0})};return c9(x)?Z(x):Z(String(x).split(J)),Q},me=()=>{},Se=(x,J)=>{return x!=null&&Number.isFinite(x=+x)?x:J};function Re(x){return!!(x&&r3(x.append)&&x[$C]==="FormData"&&x[$q])}var Ie=(x)=>{let J=new Array(10),Q=(Z,X)=>{if(bJ(Z)){if(J.indexOf(Z)>=0)return;if(cJ(Z))return Z;if(!("toJSON"in Z)){J[X]=Z;let q=c9(Z)?[]:{};return pJ(Z,(Y,$)=>{let z=Q(Y,X+1);!k9(z)&&(q[$]=z)}),J[X]=void 0,q}}return Z};return Q(x,0)},Te=P8("AsyncFunction"),ve=(x)=>x&&(bJ(x)||r3(x))&&r3(x.then)&&r3(x.catch),HC=((x,J)=>{if(x)return setImmediate;return J?((Q,Z)=>{return N7.addEventListener("message",({source:X,data:q})=>{if(X===N7&&q===Q)Z.length&&Z.shift()()},!1),(X)=>{Z.push(X),N7.postMessage(Q,"*")}})(`axios@${Math.random()}`,[]):(Q)=>setTimeout(Q)})(typeof setImmediate==="function",r3(N7.postMessage)),Ae=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(N7):typeof process!=="undefined"&&process.nextTick||HC,Ee=(x)=>x!=null&&r3(x[$q]),p={isArray:c9,isArrayBuffer:KC,isBuffer:cJ,isFormData:Ye,isArrayBufferView:rt,isString:tt,isNumber:zC,isBoolean:et,isObject:bJ,isPlainObject:Yq,isEmptyObject:xe,isReadableStream:Ke,isRequest:ze,isResponse:We,isHeaders:Ve,isUndefined:k9,isDate:Je,isFile:Qe,isBlob:Ze,isRegExp:Le,isFunction:r3,isStream:qe,isURLSearchParams:$e,isTypedArray:Fe,isFileList:Xe,forEach:pJ,merge:zW,extend:He,trim:Ge,stripBOM:Ue,inherits:Be,toFlatObject:Me,kindOf:Kq,kindOfTest:P8,endsWith:Ne,toArray:De,forEachEntry:we,matchAll:Pe,isHTMLForm:Ce,hasOwnProperty:YC,hasOwnProp:YC,reduceDescriptors:GC,freezeMethods:je,toObjectSet:Oe,toCamelCase:_e,noop:me,toFiniteNumber:Se,findKey:WC,global:N7,isContextDefined:VC,isSpecCompliantForm:Re,toJSONObject:Ie,isAsyncFn:Te,isThenable:ve,setImmediate:HC,asap:Ae,isIterable:Ee};class y3 extends Error{static from(x,J,Q,Z,X,q){let Y=new y3(x.message,J||x.code,Q,Z,X);return Y.cause=x,Y.name=x.name,q&&Object.assign(Y,q),Y}constructor(x,J,Q,Z,X){super(x);if(this.name="AxiosError",this.isAxiosError=!0,J&&(this.code=J),Q&&(this.config=Q),Z&&(this.request=Z),X)this.response=X,this.status=X.status}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:p.toJSONObject(this.config),code:this.code,status:this.status}}}y3.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";y3.ERR_BAD_OPTION="ERR_BAD_OPTION";y3.ECONNABORTED="ECONNABORTED";y3.ETIMEDOUT="ETIMEDOUT";y3.ERR_NETWORK="ERR_NETWORK";y3.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";y3.ERR_DEPRECATED="ERR_DEPRECATED";y3.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";y3.ERR_BAD_REQUEST="ERR_BAD_REQUEST";y3.ERR_CANCELED="ERR_CANCELED";y3.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";y3.ERR_INVALID_URL="ERR_INVALID_URL";var m0=y3;var UC=V7(KW(),1),Wq=UC.default;function VW(x){return p.isPlainObject(x)||p.isArray(x)}function MC(x){return p.endsWith(x,"[]")?x.slice(0,-2):x}function BC(x,J,Q){if(!x)return J;return x.concat(J).map(function Z(X,q){return X=MC(X),!Q&&q?"["+X+"]":X}).join(Q?".":"")}function fe(x){return p.isArray(x)&&!x.some(VW)}var ke=p.toFlatObject(p,{},null,function x(J){return/^is[A-Z]/.test(J)});function ce(x,J,Q){if(!p.isObject(x))throw new TypeError("target must be an object");J=J||new(Wq||FormData),Q=p.toFlatObject(Q,{metaTokens:!0,dots:!1,indexes:!1},!1,function N(F,C){return!p.isUndefined(C[F])});let Z=Q.metaTokens,X=Q.visitor||G,q=Q.dots,Y=Q.indexes,z=(Q.Blob||typeof Blob!=="undefined"&&Blob)&&p.isSpecCompliantForm(J);if(!p.isFunction(X))throw new TypeError("visitor must be a function");function W(N){if(N===null)return"";if(p.isDate(N))return N.toISOString();if(p.isBoolean(N))return N.toString();if(!z&&p.isBlob(N))throw new m0("Blob is not supported. Use a Buffer instead.");if(p.isArrayBuffer(N)||p.isTypedArray(N))return z&&typeof Blob==="function"?new Blob([N]):Buffer.from(N);return N}function G(N,F,C){let _=N;if(N&&!C&&typeof N==="object"){if(p.endsWith(F,"{}"))F=Z?F:F.slice(0,-2),N=JSON.stringify(N);else if(p.isArray(N)&&fe(N)||(p.isFileList(N)||p.endsWith(F,"[]"))&&(_=p.toArray(N)))return F=MC(F),_.forEach(function m(A,u){!(p.isUndefined(A)||A===null)&&J.append(Y===!0?BC([F],u,q):Y===null?F:F+"[]",W(A))}),!1}if(VW(N))return!0;return J.append(BC(C,F,q),W(N)),!1}let H=[],U=Object.assign(ke,{defaultVisitor:G,convertValue:W,isVisitable:VW});function M(N,F){if(p.isUndefined(N))return;if(H.indexOf(N)!==-1)throw Error("Circular reference detected in "+F.join("."));H.push(N),p.forEach(N,function C(_,m){if((!(p.isUndefined(_)||_===null)&&X.call(J,_,p.isString(m)?m.trim():m,F,U))===!0)M(_,F?F.concat(m):[m])}),H.pop()}if(!p.isObject(x))throw new TypeError("data must be an object");return M(x),J}var U5=ce;function NC(x){let J={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\x00"};return encodeURIComponent(x).replace(/[!'()~]|%20|%00/g,function Q(Z){return J[Z]})}function DC(x,J){this._pairs=[],x&&U5(x,this,J)}var FC=DC.prototype;FC.append=function x(J,Q){this._pairs.push([J,Q])};FC.toString=function x(J){let Q=J?function(Z){return J.call(this,Z,NC)}:NC;return this._pairs.map(function Z(X){return Q(X[0])+"="+Q(X[1])},"").join("&")};var wC=DC;function be(x){return encodeURIComponent(x).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function D7(x,J,Q){if(!J)return x;let Z=Q&&Q.encode||be,X=p.isFunction(Q)?{serialize:Q}:Q,q=X&&X.serialize,Y;if(q)Y=q(J,X);else Y=p.isURLSearchParams(J)?J.toString():new wC(J,X).toString(Z);if(Y){let $=x.indexOf("#");if($!==-1)x=x.slice(0,$);x+=(x.indexOf("?")===-1?"?":"&")+Y}return x}class PC{constructor(){this.handlers=[]}use(x,J,Q){return this.handlers.push({fulfilled:x,rejected:J,synchronous:Q?Q.synchronous:!1,runWhen:Q?Q.runWhen:null}),this.handlers.length-1}eject(x){if(this.handlers[x])this.handlers[x]=null}clear(){if(this.handlers)this.handlers=[]}forEach(x){p.forEach(this.handlers,function J(Q){if(Q!==null)x(Q)})}}var GW=PC;var B5={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0};import ye from"crypto";import pe from"url";var CC=pe.URLSearchParams;var HW="abcdefghijklmnopqrstuvwxyz",_C="0123456789",LC={DIGIT:_C,ALPHA:HW,ALPHA_DIGIT:HW+HW.toUpperCase()+_C},ue=(x=16,J=LC.ALPHA_DIGIT)=>{let Q="",{length:Z}=J,X=new Uint32Array(x);ye.randomFillSync(X);for(let q=0;q<x;q++)Q+=J[X[q]%Z];return Q},jC={isNode:!0,classes:{URLSearchParams:CC,FormData:Wq,Blob:typeof Blob!=="undefined"&&Blob||null},ALPHABET:LC,generateString:ue,protocols:["http","https","file","data"]};var MW={};hD(MW,{origin:()=>ie,navigator:()=>UW,hasStandardBrowserWebWorkerEnv:()=>ge,hasStandardBrowserEnv:()=>he,hasBrowserEnv:()=>BW});var BW=typeof window!=="undefined"&&typeof document!=="undefined",UW=typeof navigator==="object"&&navigator||void 0,he=BW&&(!UW||["ReactNative","NativeScript","NS"].indexOf(UW.product)<0),ge=(()=>{return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})(),ie=BW&&window.location.href||"http://localhost";var T1={...MW,...jC};function NW(x,J){return U5(x,new T1.classes.URLSearchParams,{visitor:function(Q,Z,X,q){if(T1.isNode&&p.isBuffer(Q))return this.append(Z,Q.toString("base64")),!1;return q.defaultVisitor.apply(this,arguments)},...J})}function de(x){return p.matchAll(/\w+|\[(\w*)]/g,x).map((J)=>{return J[0]==="[]"?"":J[1]||J[0]})}function le(x){let J={},Q=Object.keys(x),Z,X=Q.length,q;for(Z=0;Z<X;Z++)q=Q[Z],J[q]=x[q];return J}function oe(x){function J(Q,Z,X,q){let Y=Q[q++];if(Y==="__proto__")return!0;let $=Number.isFinite(+Y),z=q>=Q.length;if(Y=!Y&&p.isArray(X)?X.length:Y,z){if(p.hasOwnProp(X,Y))X[Y]=[X[Y],Z];else X[Y]=Z;return!$}if(!X[Y]||!p.isObject(X[Y]))X[Y]=[];if(J(Q,Z,X[Y],q)&&p.isArray(X[Y]))X[Y]=le(X[Y]);return!$}if(p.isFormData(x)&&p.isFunction(x.entries)){let Q={};return p.forEachEntry(x,(Z,X)=>{J(de(Z),X,Q,0)}),Q}return null}var Vq=oe;function se(x,J,Q){if(p.isString(x))try{return(J||JSON.parse)(x),p.trim(x)}catch(Z){if(Z.name!=="SyntaxError")throw Z}return(Q||JSON.stringify)(x)}var DW={transitional:B5,adapter:["xhr","http","fetch"],transformRequest:[function x(J,Q){let Z=Q.getContentType()||"",X=Z.indexOf("application/json")>-1,q=p.isObject(J);if(q&&p.isHTMLForm(J))J=new FormData(J);if(p.isFormData(J))return X?JSON.stringify(Vq(J)):J;if(p.isArrayBuffer(J)||p.isBuffer(J)||p.isStream(J)||p.isFile(J)||p.isBlob(J)||p.isReadableStream(J))return J;if(p.isArrayBufferView(J))return J.buffer;if(p.isURLSearchParams(J))return Q.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),J.toString();let $;if(q){if(Z.indexOf("application/x-www-form-urlencoded")>-1)return NW(J,this.formSerializer).toString();if(($=p.isFileList(J))||Z.indexOf("multipart/form-data")>-1){let z=this.env&&this.env.FormData;return U5($?{"files[]":J}:J,z&&new z,this.formSerializer)}}if(q||X)return Q.setContentType("application/json",!1),se(J);return J}],transformResponse:[function x(J){let Q=this.transitional||DW.transitional,Z=Q&&Q.forcedJSONParsing,X=this.responseType==="json";if(p.isResponse(J)||p.isReadableStream(J))return J;if(J&&p.isString(J)&&(Z&&!this.responseType||X)){let Y=!(Q&&Q.silentJSONParsing)&&X;try{return JSON.parse(J,this.parseReviver)}catch($){if(Y){if($.name==="SyntaxError")throw m0.from($,m0.ERR_BAD_RESPONSE,this,null,this.response);throw $}}}return J}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:T1.classes.FormData,Blob:T1.classes.Blob},validateStatus:function x(J){return J>=200&&J<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};p.forEach(["delete","get","head","post","put","patch"],(x)=>{DW.headers[x]={}});var b9=DW;var ne=p.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),OC=(x)=>{let J={},Q,Z,X;return x&&x.split(`
|
|
89
89
|
`).forEach(function q(Y){if(X=Y.indexOf(":"),Q=Y.substring(0,X).trim().toLowerCase(),Z=Y.substring(X+1).trim(),!Q||J[Q]&&ne[Q])return;if(Q==="set-cookie")if(J[Q])J[Q].push(Z);else J[Q]=[Z];else J[Q]=J[Q]?J[Q]+", "+Z:Z}),J};var mC=Symbol("internals");function yJ(x){return x&&String(x).trim().toLowerCase()}function Gq(x){if(x===!1||x==null)return x;return p.isArray(x)?x.map(Gq):String(x)}function ae(x){let J=Object.create(null),Q=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,Z;while(Z=Q.exec(x))J[Z[1]]=Z[2];return J}var re=(x)=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(x.trim());function FW(x,J,Q,Z,X){if(p.isFunction(Z))return Z.call(this,J,Q);if(X)J=Q;if(!p.isString(J))return;if(p.isString(Z))return J.indexOf(Z)!==-1;if(p.isRegExp(Z))return Z.test(J)}function te(x){return x.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(J,Q,Z)=>{return Q.toUpperCase()+Z})}function ee(x,J){let Q=p.toCamelCase(" "+J);["get","set","has"].forEach((Z)=>{Object.defineProperty(x,Z+Q,{value:function(X,q,Y){return this[Z].call(this,J,X,q,Y)},configurable:!0})})}class uJ{constructor(x){x&&this.set(x)}set(x,J,Q){let Z=this;function X(Y,$,z){let W=yJ($);if(!W)throw new Error("header name must be a non-empty string");let G=p.findKey(Z,W);if(!G||Z[G]===void 0||z===!0||z===void 0&&Z[G]!==!1)Z[G||$]=Gq(Y)}let q=(Y,$)=>p.forEach(Y,(z,W)=>X(z,W,$));if(p.isPlainObject(x)||x instanceof this.constructor)q(x,J);else if(p.isString(x)&&(x=x.trim())&&!re(x))q(OC(x),J);else if(p.isObject(x)&&p.isIterable(x)){let Y={},$,z;for(let W of x){if(!p.isArray(W))throw TypeError("Object iterator must return a key-value pair");Y[z=W[0]]=($=Y[z])?p.isArray($)?[...$,W[1]]:[$,W[1]]:W[1]}q(Y,J)}else x!=null&&X(J,x,Q);return this}get(x,J){if(x=yJ(x),x){let Q=p.findKey(this,x);if(Q){let Z=this[Q];if(!J)return Z;if(J===!0)return ae(Z);if(p.isFunction(J))return J.call(this,Z,Q);if(p.isRegExp(J))return J.exec(Z);throw new TypeError("parser must be boolean|regexp|function")}}}has(x,J){if(x=yJ(x),x){let Q=p.findKey(this,x);return!!(Q&&this[Q]!==void 0&&(!J||FW(this,this[Q],Q,J)))}return!1}delete(x,J){let Q=this,Z=!1;function X(q){if(q=yJ(q),q){let Y=p.findKey(Q,q);if(Y&&(!J||FW(Q,Q[Y],Y,J)))delete Q[Y],Z=!0}}if(p.isArray(x))x.forEach(X);else X(x);return Z}clear(x){let J=Object.keys(this),Q=J.length,Z=!1;while(Q--){let X=J[Q];if(!x||FW(this,this[X],X,x,!0))delete this[X],Z=!0}return Z}normalize(x){let J=this,Q={};return p.forEach(this,(Z,X)=>{let q=p.findKey(Q,X);if(q){J[q]=Gq(Z),delete J[X];return}let Y=x?te(X):String(X).trim();if(Y!==X)delete J[X];J[Y]=Gq(Z),Q[Y]=!0}),this}concat(...x){return this.constructor.concat(this,...x)}toJSON(x){let J=Object.create(null);return p.forEach(this,(Q,Z)=>{Q!=null&&Q!==!1&&(J[Z]=x&&p.isArray(Q)?Q.join(", "):Q)}),J}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([x,J])=>x+": "+J).join(`
|
|
@@ -3486,7 +3486,7 @@ PageTheme metropolitan {
|
|
|
3486
3486
|
})`,"modules/current_user/h_name.aml":`const h_name = create_slot[String]({
|
|
3487
3487
|
fqn: 'H::current_user::h_name'
|
|
3488
3488
|
})`,"modules/current_user/h_email.aml":`const h_email = create_slot[String]({
|
|
3489
|
-
|
|
3489
|
+
fqn: 'H::current_user::h_email'
|
|
3490
3490
|
})`,"modules/current_user/data_source.aml":`const data_source = create_slot[String]({
|
|
3491
3491
|
fqn: 'H::current_user::data_source'
|
|
3492
3492
|
})`,"modules/blocks/index.aml":`// NOTE: keep the markdown \${content} as-is (1 empty line before) to ensure its content is render correctly
|
|
@@ -3935,10 +3935,8 @@ Func question() {
|
|
|
3935
3935
|
Func light_bulb() {
|
|
3936
3936
|
image('https://media.holistics.io/f2b35e8c-bulb.svg', 'contain')
|
|
3937
3937
|
}
|
|
3938
|
-
`};var Ju={text:"String",number:"Number",truefalse:"Boolean"},bI0=(x)=>(x.type in Ju),pI0=(x,J=[])=>(J.filter(bI0).forEach((Q)=>{let Z=w0.create(`/modules/${Hy}/modules/current_user/${Q.name}.aml`),X=Ju[Q.type],q
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
})
|
|
3942
|
-
`;x.setDefinitionAtPath(Z,q)}),x),yI0=(x,J={})=>(J.userAttributes&&pI0(x,J.userAttributes),x),Qu=(x,J={})=>(x.options.childIdxForDynamicProp=!0,x.registerCustomModule(qI0),x.registerCustomModule(UI0),x.registerCustomModule(LI0),x.registerCustomModule(TI0),x.registerCustomModule(AI0),x.registerCustomModule(JZ.RefFunction),x.registerCustomModule(JZ.RefCallExpression),x.registerCustomModule(JZ.RefPropertyAccessExpression),Object.entries(ZM0).forEach(([Q,Z])=>{let X=w0.create(`__H_definition__/${Q}`);x.setDefinitionAtPath(X,Z)}),x.addJsFunc("r",sH(x)),x.setMacro("rel",fI0),x.setMacro("relationship",kI0),x.addDecorator(jU.templateDecorator.default),Object.entries(cI0).forEach(([Q,Z])=>{x.setDefinitionAtPath(w0.create(`/modules/${Hy}/${Q}`),Z)}),yI0(x,J),x);async function s$(x){let J=x.map(async(Z)=>{try{if(uI0.statSync(Z).isFile())return[Z];return await Zu.glob(`${Z}/**/*`,{onlyFiles:!0,dot:!0})}catch{return[]}}),Q=(await Promise.all(J)).flat();return[...new Set(Q)]}function hI0(x,J){let Q=Math.max(0,Math.min(J,x.length)),X=x.slice(0,Q).split(`
|
|
3938
|
+
`};var Ju={text:"String",number:"Number",truefalse:"Boolean"},bI0=(x)=>(x.type in Ju),pI0=(x,J=[])=>(J.filter(bI0).forEach((Q)=>{let Z=w0.create(`/modules/${Hy}/modules/current_user/${Q.name}.aml`),X=Ju[Q.type],q="";q+=`const ${Q.name} = create_slot[${X}]({
|
|
3939
|
+
`,q+=` fqn: 'H::current_user::${Q.name}'
|
|
3940
|
+
`,q+="})",x.setDefinitionAtPath(Z,q)}),x),yI0=(x,J={})=>(J.userAttributes&&pI0(x,J.userAttributes),x),Qu=(x,J={})=>(x.options.childIdxForDynamicProp=!0,x.registerCustomModule(qI0),x.registerCustomModule(UI0),x.registerCustomModule(LI0),x.registerCustomModule(TI0),x.registerCustomModule(AI0),x.registerCustomModule(JZ.RefFunction),x.registerCustomModule(JZ.RefCallExpression),x.registerCustomModule(JZ.RefPropertyAccessExpression),Object.entries(ZM0).forEach(([Q,Z])=>{let X=w0.create(`__H_definition__/${Q}`);x.setDefinitionAtPath(X,Z)}),x.addJsFunc("r",sH(x)),x.setMacro("rel",fI0),x.setMacro("relationship",kI0),x.addDecorator(jU.templateDecorator.default),Object.entries(cI0).forEach(([Q,Z])=>{x.setDefinitionAtPath(w0.create(`/modules/${Hy}/${Q}`),Z)}),yI0(x,J),x);async function s$(x){let J=x.map(async(Z)=>{try{if(uI0.statSync(Z).isFile())return[Z];return await Zu.glob(`${Z}/**/*`,{onlyFiles:!0,dot:!0})}catch{return[]}}),Q=(await Promise.all(J)).flat();return[...new Set(Q)]}function hI0(x,J){let Q=Math.max(0,Math.min(J,x.length)),X=x.slice(0,Q).split(`
|
|
3943
3941
|
`),q=X.length,Y=X[X.length-1].length+1;return{row:q,col:Y}}function gI0(x){let J=new xZ;Qu(J);let Q=process.cwd(),Z=new IU;try{if(x)B1.log(`AML repo path: ${Q}`);Z.load(Q,J)}catch{B1.error(`Cannot load AML repo at: ${Q}`),B1.error("Perhaps check if your directory is an AML repo."),process.exit(1)}return J}function n$(x,J=!1){let Q=gI0(J),Z=x.filter((q)=>q.endsWith(".aml")).map((q)=>Q.interpretFile(w0.create(q))),X=Z.filter((q)=>!q.isOk()).flatMap((q)=>q.resolvedDiagnostics(Q.db));if(X.length>0)B1.error("Compilation error:"),X.forEach((q)=>{let Y=q;if(!Y.file){B1.error(Y.message);return}let $=Y.file.toString(),z=Q.vfs.fileContentMap.get(Y.file.key),{row:W,col:G}=hI0(z??"",Y.start);B1.error(`${$} (${W}, ${G}): ${Y.message}`)}),process.exit(1);return Z.reduce((q,Y,$)=>{let z=x[$],W=Y.returnVal()?.toJsStructure();if(W!==void 0)q[z]=W;return q},{})}async function iI0(x,J){let Q=await s$(x),Z=n$(Q,J!==void 0);if(J){let X=process.cwd(),q=n5.resolve(J);if(!z9.existsSync(q))z9.mkdirSync(q,{recursive:!0});Object.entries(Z).forEach(([Y,$])=>{let z=n5.relative(X,`${Y}.json`),W=n5.join(J,z);B1.log(`Writing to ${z}`),z9.mkdirSync(n5.dirname(W),{recursive:!0}),z9.writeFileSync(W,JSON.stringify($,null,2))})}else B1.log(JSON.stringify(Z,null,2))}var dI0=new g4("compile").description("Compile AML files.").argument("<files...>","source files or globs to compile").option("-o, --out-dir <out-dir>","output directory of the compilation").action(async(x,{outDir:J})=>iI0(x,J)),Xu=dI0;async function lI0(x){n$(await s$(x),!0),B1.log("No compilation errors found.")}var oI0=new g4("validate").description("Validate AML files for compilation errors without generating output.").argument("<files...>","source files or globs to validate").action(async(x)=>lI0(x)),qu=oI0;var sI0=new g4("aml").description("AML-related commands").addCommand(Xu).addCommand(qu),Yu=sI0;function $u(x){x.addHelpText("after",`
|
|
3944
3942
|
See documentation at: https://docs.holistics.io/docs/cli`),x.commands.forEach((J)=>$u(J))}function Ky0(x){x.version(gD),x.addCommand(oL).addCommand(iL).addCommand(Yu),$u(x)}export{Ky0 as registerCommands};
|