factoriomod-debug 2.0.1 → 2.0.2
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/CHANGELOG.md +4 -0
- package/dist/fmtk-cli.js +1 -1
- package/dist/fmtk-vscode.js +1 -1
- package/dist/fmtk.js +261 -88
- package/package.json +1 -1
package/dist/fmtk-cli.js
CHANGED
|
@@ -112,7 +112,7 @@ globstar while`,e,h,r,p,b),this.matchOne(e.slice(h),r.slice(p),n))return this.de
|
|
|
112
112
|
>>> no match, partial?`,e,h,r,p),h===u))}let x;if(typeof c=="string"?(x=d===c,this.debug("string match",c,d,x)):(x=c.test(d),this.debug("pattern match",c,d,x)),!x)return!1}if(s===u&&a===l)return!0;if(s===u)return n;if(a===l)return s===u-1&&e[s]==="";throw new Error("wtf?")}braceExpand(){return(0,ge.braceExpand)(this.pattern,this.options)}parse(e){(0,C1.assertValidPattern)(e);let r=this.options;if(e==="**")return ge.GLOBSTAR;if(e==="")return"";let n,i=null;(n=e.match(JIe))?i=r.dot?t7e:e7e:(n=e.match(UIe))?i=(r.nocase?r.dot?GIe:HIe:r.dot?VIe:zIe)(n[1]):(n=e.match(r7e))?i=(r.nocase?r.dot?i7e:n7e:r.dot?o7e:s7e)(n):(n=e.match(YIe))?i=r.dot?QIe:KIe:(n=e.match(ZIe))&&(i=XIe);let o=pZ.AST.fromGlob(e,this.options).toMMPattern();return i&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:i}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?u7e:r.dot?l7e:c7e,i=new Set(r.nocase?["i"]:[]),o=e.map(u=>{let l=u.map(c=>{if(c instanceof RegExp)for(let d of c.flags.split(""))i.add(d);return typeof c=="string"?g7e(c):c===ge.GLOBSTAR?ge.GLOBSTAR:c._src});return l.forEach((c,d)=>{let h=l[d+1],p=l[d-1];c!==ge.GLOBSTAR||p===ge.GLOBSTAR||(p===void 0?h!==void 0&&h!==ge.GLOBSTAR?l[d+1]="(?:\\/|"+n+"\\/)?"+h:l[d]=n:h===void 0?l[d-1]=p+"(?:\\/|"+n+")?":h!==ge.GLOBSTAR&&(l[d-1]=p+"(?:\\/|\\/"+n+"\\/)"+h,l[d+1]=ge.GLOBSTAR))}),l.filter(c=>c!==ge.GLOBSTAR).join("/")}).join("|"),[s,a]=e.length>1?["(?:",")"]:["",""];o="^"+s+o+a+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let o=this.set;this.debug(this.pattern,"set",o);let s=i[i.length-1];if(!s)for(let a=i.length-2;!s&&a>=0;a--)s=i[a];for(let a=0;a<o.length;a++){let u=o[a],l=i;if(n.matchBase&&u.length===1&&(l=[s]),this.matchOne(l,u,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return ge.minimatch.defaults(e).Minimatch}};ge.Minimatch=el;var b7e=dO();Object.defineProperty(ge,"AST",{enumerable:!0,get:function(){return b7e.AST}});var x7e=hO();Object.defineProperty(ge,"escape",{enumerable:!0,get:function(){return x7e.escape}});var y7e=_1();Object.defineProperty(ge,"unescape",{enumerable:!0,get:function(){return y7e.unescape}});ge.minimatch.AST=pZ.AST;ge.minimatch.Minimatch=el;ge.minimatch.escape=BIe.escape;ge.minimatch.unescape=$Ie.unescape});var wZ=g(T1=>{"use strict";Object.defineProperty(T1,"__esModule",{value:!0});T1.LRUCache=void 0;var Kf=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,yZ=new Set,pO=typeof process=="object"&&process?process:{},vZ=(t,e,r,n)=>{typeof pO.emitWarning=="function"?pO.emitWarning(t,e,r,n):console.error(`[${r}] ${e}: ${t}`)},k1=globalThis.AbortController,xZ=globalThis.AbortSignal;if(typeof k1>"u"){xZ=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(n,i){this._onabort.push(i)}},k1=class{constructor(){e()}signal=new xZ;abort(n){if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let i of this.signal._onabort)i(n);this.signal.onabort?.(n)}}};let t=pO.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,vZ("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var v7e=t=>!yZ.has(t),Aat=Symbol("type"),Fa=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),_Z=t=>Fa(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Qf:null:null,Qf=class extends Array{constructor(e){super(e),this.fill(0)}},mO=class t{heap;length;static#e=!1;static create(e){let r=_Z(e);if(!r)return[];t.#e=!0;let n=new t(e,r);return t.#e=!1,n}constructor(e,r){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},gO=class t{#e;#t;#r;#n;#i;#d;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#u;#c;#a;#l;#o;#g;#m;#h;#p;#E;#x;#S;#D;#v;#_;#w;#b;static unsafeExposeInternals(e){return{starts:e.#D,ttls:e.#v,sizes:e.#S,keyMap:e.#a,keyList:e.#l,valList:e.#o,next:e.#g,prev:e.#m,get head(){return e.#h},get tail(){return e.#p},free:e.#E,isBackgroundFetch:r=>e.#f(r),backgroundFetch:(r,n,i,o)=>e.#L(r,n,i,o),moveToTail:r=>e.#B(r),indexes:r=>e.#k(r),rindexes:r=>e.#T(r),isStale:r=>e.#y(r)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#c}get size(){return this.#u}get fetchMethod(){return this.#i}get memoMethod(){return this.#d}get dispose(){return this.#r}get disposeAfter(){return this.#n}constructor(e){let{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:s,updateAgeOnHas:a,allowStale:u,dispose:l,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:h,maxSize:p=0,maxEntrySize:b=0,sizeCalculation:x,fetchMethod:D,memoMethod:v,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:k,allowStaleOnFetchAbort:O,ignoreFetchAbort:A}=e;if(r!==0&&!Fa(r))throw new TypeError("max option must be a nonnegative integer");let R=r?_Z(r):Array;if(!R)throw new Error("invalid max value: "+r);if(this.#e=r,this.#t=p,this.maxEntrySize=b||this.#t,this.sizeCalculation=x,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(v!==void 0&&typeof v!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#d=v,D!==void 0&&typeof D!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#i=D,this.#w=!!D,this.#a=new Map,this.#l=new Array(r).fill(void 0),this.#o=new Array(r).fill(void 0),this.#g=new R(r),this.#m=new R(r),this.#h=0,this.#p=0,this.#E=mO.create(r),this.#u=0,this.#c=0,typeof l=="function"&&(this.#r=l),typeof c=="function"?(this.#n=c,this.#x=[]):(this.#n=void 0,this.#x=void 0),this.#_=!!this.#r,this.#b=!!this.#n,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!h,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!k,this.allowStaleOnFetchAbort=!!O,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#t!==0&&!Fa(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!Fa(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#O()}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!a,this.ttlResolution=Fa(i)||i===0?i:1,this.ttlAutopurge=!!o,this.ttl=n||0,this.ttl){if(!Fa(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#A()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let H="LRU_CACHE_UNBOUNDED";v7e(H)&&(yZ.add(H),vZ("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",H,t))}}getRemainingTTL(e){return this.#a.has(e)?1/0:0}#A(){let e=new Qf(this.#e),r=new Qf(this.#e);this.#v=e,this.#D=r,this.#F=(o,s,a=Kf.now())=>{if(r[o]=s!==0?a:0,e[o]=s,s!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.#y(o)&&this.#R(this.#l[o],"expire")},s+1);u.unref&&u.unref()}},this.#C=o=>{r[o]=e[o]!==0?Kf.now():0},this.#s=(o,s)=>{if(e[s]){let a=e[s],u=r[s];if(!a||!u)return;o.ttl=a,o.start=u,o.now=n||i();let l=o.now-u;o.remainingTTL=a-l}};let n=0,i=()=>{let o=Kf.now();if(this.ttlResolution>0){n=o;let s=setTimeout(()=>n=0,this.ttlResolution);s.unref&&s.unref()}return o};this.getRemainingTTL=o=>{let s=this.#a.get(o);if(s===void 0)return 0;let a=e[s],u=r[s];if(!a||!u)return 1/0;let l=(n||i())-u;return a-l},this.#y=o=>{let s=r[o],a=e[o];return!!a&&!!s&&(n||i())-s>a}}#C=()=>{};#s=()=>{};#F=()=>{};#y=()=>!1;#O(){let e=new Qf(this.#e);this.#c=0,this.#S=e,this.#P=r=>{this.#c-=e[r],e[r]=0},this.#I=(r,n,i,o)=>{if(this.#f(n))return 0;if(!Fa(i))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(i=o(n,r),!Fa(i))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 i},this.#q=(r,n,i)=>{if(e[r]=n,this.#t){let o=this.#t-e[r];for(;this.#c>o;)this.#M(!0)}this.#c+=e[r],i&&(i.entrySize=n,i.totalCalculatedSize=this.#c)}}#P=e=>{};#q=(e,r,n)=>{};#I=(e,r,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#k({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#p;!(!this.#j(r)||((e||!this.#y(r))&&(yield r),r===this.#h));)r=this.#m[r]}*#T({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#h;!(!this.#j(r)||((e||!this.#y(r))&&(yield r),r===this.#p));)r=this.#g[r]}#j(e){return e!==void 0&&this.#a.get(this.#l[e])===e}*entries(){for(let e of this.#k())this.#o[e]!==void 0&&this.#l[e]!==void 0&&!this.#f(this.#o[e])&&(yield[this.#l[e],this.#o[e]])}*rentries(){for(let e of this.#T())this.#o[e]!==void 0&&this.#l[e]!==void 0&&!this.#f(this.#o[e])&&(yield[this.#l[e],this.#o[e]])}*keys(){for(let e of this.#k()){let r=this.#l[e];r!==void 0&&!this.#f(this.#o[e])&&(yield r)}}*rkeys(){for(let e of this.#T()){let r=this.#l[e];r!==void 0&&!this.#f(this.#o[e])&&(yield r)}}*values(){for(let e of this.#k())this.#o[e]!==void 0&&!this.#f(this.#o[e])&&(yield this.#o[e])}*rvalues(){for(let e of this.#T())this.#o[e]!==void 0&&!this.#f(this.#o[e])&&(yield this.#o[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let n of this.#k()){let i=this.#o[n],o=this.#f(i)?i.__staleWhileFetching:i;if(o!==void 0&&e(o,this.#l[n],this))return this.get(this.#l[n],r)}}forEach(e,r=this){for(let n of this.#k()){let i=this.#o[n],o=this.#f(i)?i.__staleWhileFetching:i;o!==void 0&&e.call(r,o,this.#l[n],this)}}rforEach(e,r=this){for(let n of this.#T()){let i=this.#o[n],o=this.#f(i)?i.__staleWhileFetching:i;o!==void 0&&e.call(r,o,this.#l[n],this)}}purgeStale(){let e=!1;for(let r of this.#T({allowStale:!0}))this.#y(r)&&(this.#R(this.#l[r],"expire"),e=!0);return e}info(e){let r=this.#a.get(e);if(r===void 0)return;let n=this.#o[r],i=this.#f(n)?n.__staleWhileFetching:n;if(i===void 0)return;let o={value:i};if(this.#v&&this.#D){let s=this.#v[r],a=this.#D[r];if(s&&a){let u=s-(Kf.now()-a);o.ttl=u,o.start=Date.now()}}return this.#S&&(o.size=this.#S[r]),o}dump(){let e=[];for(let r of this.#k({allowStale:!0})){let n=this.#l[r],i=this.#o[r],o=this.#f(i)?i.__staleWhileFetching:i;if(o===void 0||n===void 0)continue;let s={value:o};if(this.#v&&this.#D){s.ttl=this.#v[r];let a=Kf.now()-this.#D[r];s.start=Math.floor(Date.now()-a)}this.#S&&(s.size=this.#S[r]),e.unshift([n,s])}return e}load(e){this.clear();for(let[r,n]of e){if(n.start){let i=Date.now()-n.start;n.start=Kf.now()-i}this.set(r,n.value,n)}}set(e,r,n={}){if(r===void 0)return this.delete(e),this;let{ttl:i=this.ttl,start:o,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:u}=n,{noUpdateTTL:l=this.noUpdateTTL}=n,c=this.#I(e,r,n.size||0,a);if(this.maxEntrySize&&c>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this.#R(e,"set"),this;let d=this.#u===0?void 0:this.#a.get(e);if(d===void 0)d=this.#u===0?this.#p:this.#E.length!==0?this.#E.pop():this.#u===this.#e?this.#M(!1):this.#u,this.#l[d]=e,this.#o[d]=r,this.#a.set(e,d),this.#g[this.#p]=d,this.#m[d]=this.#p,this.#p=d,this.#u++,this.#q(d,c,u),u&&(u.set="add"),l=!1;else{this.#B(d);let h=this.#o[d];if(r!==h){if(this.#w&&this.#f(h)){h.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:p}=h;p!==void 0&&!s&&(this.#_&&this.#r?.(p,e,"set"),this.#b&&this.#x?.push([p,e,"set"]))}else s||(this.#_&&this.#r?.(h,e,"set"),this.#b&&this.#x?.push([h,e,"set"]));if(this.#P(d),this.#q(d,c,u),this.#o[d]=r,u){u.set="replace";let p=h&&this.#f(h)?h.__staleWhileFetching:h;p!==void 0&&(u.oldValue=p)}}else u&&(u.set="update")}if(i!==0&&!this.#v&&this.#A(),this.#v&&(l||this.#F(d,i,o),u&&this.#s(u,d)),!s&&this.#b&&this.#x){let h=this.#x,p;for(;p=h?.shift();)this.#n?.(...p)}return this}pop(){try{for(;this.#u;){let e=this.#o[this.#h];if(this.#M(!0),this.#f(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#b&&this.#x){let e=this.#x,r;for(;r=e?.shift();)this.#n?.(...r)}}}#M(e){let r=this.#h,n=this.#l[r],i=this.#o[r];return this.#w&&this.#f(i)?i.__abortController.abort(new Error("evicted")):(this.#_||this.#b)&&(this.#_&&this.#r?.(i,n,"evict"),this.#b&&this.#x?.push([i,n,"evict"])),this.#P(r),e&&(this.#l[r]=void 0,this.#o[r]=void 0,this.#E.push(r)),this.#u===1?(this.#h=this.#p=0,this.#E.length=0):this.#h=this.#g[r],this.#a.delete(n),this.#u--,r}has(e,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=r,o=this.#a.get(e);if(o!==void 0){let s=this.#o[o];if(this.#f(s)&&s.__staleWhileFetching===void 0)return!1;if(this.#y(o))i&&(i.has="stale",this.#s(i,o));else return n&&this.#C(o),i&&(i.has="hit",this.#s(i,o)),!0}else i&&(i.has="miss");return!1}peek(e,r={}){let{allowStale:n=this.allowStale}=r,i=this.#a.get(e);if(i===void 0||!n&&this.#y(i))return;let o=this.#o[i];return this.#f(o)?o.__staleWhileFetching:o}#L(e,r,n,i){let o=r===void 0?void 0:this.#o[r];if(this.#f(o))return o;let s=new k1,{signal:a}=n;a?.addEventListener("abort",()=>s.abort(a.reason),{signal:s.signal});let u={signal:s.signal,options:n,context:i},l=(x,D=!1)=>{let{aborted:v}=s.signal,E=n.ignoreFetchAbort&&x!==void 0;if(n.status&&(v&&!D?(n.status.fetchAborted=!0,n.status.fetchError=s.signal.reason,E&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),v&&!E&&!D)return d(s.signal.reason);let y=p;return this.#o[r]===p&&(x===void 0?y.__staleWhileFetching?this.#o[r]=y.__staleWhileFetching:this.#R(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(e,x,u.options))),x},c=x=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=x),d(x)),d=x=>{let{aborted:D}=s.signal,v=D&&n.allowStaleOnFetchAbort,E=v||n.allowStaleOnFetchRejection,y=E||n.noDeleteOnFetchRejection,k=p;if(this.#o[r]===p&&(!y||k.__staleWhileFetching===void 0?this.#R(e,"fetch"):v||(this.#o[r]=k.__staleWhileFetching)),E)return n.status&&k.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),k.__staleWhileFetching;if(k.__returned===k)throw x},h=(x,D)=>{let v=this.#i?.(e,o,u);v&&v instanceof Promise&&v.then(E=>x(E===void 0?void 0:E),D),s.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(x(void 0),n.allowStaleOnFetchAbort&&(x=E=>l(E,!0)))})};n.status&&(n.status.fetchDispatched=!0);let p=new Promise(h).then(l,c),b=Object.assign(p,{__abortController:s,__staleWhileFetching:o,__returned:void 0});return r===void 0?(this.set(e,b,{...u.options,status:void 0}),r=this.#a.get(e)):this.#o[r]=b,b}#f(e){if(!this.#w)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof k1}async fetch(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:u=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:h=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:b=this.allowStaleOnFetchAbort,context:x,forceRefresh:D=!1,status:v,signal:E}=r;if(!this.#w)return v&&(v.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,status:v});let y={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,ttl:s,noDisposeOnSet:a,size:u,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:h,allowStaleOnFetchAbort:b,ignoreFetchAbort:p,status:v,signal:E},k=this.#a.get(e);if(k===void 0){v&&(v.fetch="miss");let O=this.#L(e,k,y,x);return O.__returned=O}else{let O=this.#o[k];if(this.#f(O)){let K=n&&O.__staleWhileFetching!==void 0;return v&&(v.fetch="inflight",K&&(v.returnedStale=!0)),K?O.__staleWhileFetching:O.__returned=O}let A=this.#y(k);if(!D&&!A)return v&&(v.fetch="hit"),this.#B(k),i&&this.#C(k),v&&this.#s(v,k),O;let R=this.#L(e,k,y,x),q=R.__staleWhileFetching!==void 0&&n;return v&&(v.fetch=A?"stale":"refresh",q&&A&&(v.returnedStale=!0)),q?R.__staleWhileFetching:R.__returned=R}}async forceFetch(e,r={}){let n=await this.fetch(e,r);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,r={}){let n=this.#d;if(!n)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:o,...s}=r,a=this.get(e,s);if(!o&&a!==void 0)return a;let u=n(e,a,{options:s,context:i});return this.set(e,u,s),u}get(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:s}=r,a=this.#a.get(e);if(a!==void 0){let u=this.#o[a],l=this.#f(u);return s&&this.#s(s,a),this.#y(a)?(s&&(s.get="stale"),l?(s&&n&&u.__staleWhileFetching!==void 0&&(s.returnedStale=!0),n?u.__staleWhileFetching:void 0):(o||this.#R(e,"expire"),s&&n&&(s.returnedStale=!0),n?u:void 0)):(s&&(s.get="hit"),l?u.__staleWhileFetching:(this.#B(a),i&&this.#C(a),u))}else s&&(s.get="miss")}#N(e,r){this.#m[r]=e,this.#g[e]=r}#B(e){e!==this.#p&&(e===this.#h?this.#h=this.#g[e]:this.#N(this.#m[e],this.#g[e]),this.#N(this.#p,e),this.#p=e)}delete(e){return this.#R(e,"delete")}#R(e,r){let n=!1;if(this.#u!==0){let i=this.#a.get(e);if(i!==void 0)if(n=!0,this.#u===1)this.#$(r);else{this.#P(i);let o=this.#o[i];if(this.#f(o)?o.__abortController.abort(new Error("deleted")):(this.#_||this.#b)&&(this.#_&&this.#r?.(o,e,r),this.#b&&this.#x?.push([o,e,r])),this.#a.delete(e),this.#l[i]=void 0,this.#o[i]=void 0,i===this.#p)this.#p=this.#m[i];else if(i===this.#h)this.#h=this.#g[i];else{let s=this.#m[i];this.#g[s]=this.#g[i];let a=this.#g[i];this.#m[a]=this.#m[i]}this.#u--,this.#E.push(i)}}if(this.#b&&this.#x?.length){let i=this.#x,o;for(;o=i?.shift();)this.#n?.(...o)}return n}clear(){return this.#$("delete")}#$(e){for(let r of this.#T({allowStale:!0})){let n=this.#o[r];if(this.#f(n))n.__abortController.abort(new Error("deleted"));else{let i=this.#l[r];this.#_&&this.#r?.(n,i,e),this.#b&&this.#x?.push([n,i,e])}}if(this.#a.clear(),this.#o.fill(void 0),this.#l.fill(void 0),this.#v&&this.#D&&(this.#v.fill(0),this.#D.fill(0)),this.#S&&this.#S.fill(0),this.#h=0,this.#p=0,this.#E.length=0,this.#c=0,this.#u=0,this.#b&&this.#x){let r=this.#x,n;for(;n=r?.shift();)this.#n?.(...n)}}};T1.LRUCache=gO});var SO=g(an=>{"use strict";var _7e=an&&an.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(an,"__esModule",{value:!0});an.Minipass=an.isWritable=an.isReadable=an.isStream=void 0;var EZ=typeof process=="object"&&process?process:{stdout:null,stderr:null},EO=require("node:events"),kZ=_7e(require("node:stream")),w7e=require("node:string_decoder"),E7e=t=>!!t&&typeof t=="object"&&(t instanceof I1||t instanceof kZ.default||(0,an.isReadable)(t)||(0,an.isWritable)(t));an.isStream=E7e;var S7e=t=>!!t&&typeof t=="object"&&t instanceof EO.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==kZ.default.Writable.prototype.pipe;an.isReadable=S7e;var D7e=t=>!!t&&typeof t=="object"&&t instanceof EO.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function";an.isWritable=D7e;var ls=Symbol("EOF"),cs=Symbol("maybeEmitEnd"),Pa=Symbol("emittedEnd"),A1=Symbol("emittingEnd"),Mp=Symbol("emittedError"),O1=Symbol("closed"),SZ=Symbol("read"),R1=Symbol("flush"),DZ=Symbol("flushChunk"),Hi=Symbol("encoding"),Zf=Symbol("decoder"),yr=Symbol("flowing"),Lp=Symbol("paused"),Xf=Symbol("resume"),vr=Symbol("buffer"),sn=Symbol("pipes"),_r=Symbol("bufferLength"),bO=Symbol("bufferPush"),F1=Symbol("bufferShift"),Hr=Symbol("objectMode"),nr=Symbol("destroyed"),xO=Symbol("error"),yO=Symbol("emitData"),CZ=Symbol("emitEnd"),vO=Symbol("emitEnd2"),To=Symbol("async"),_O=Symbol("abort"),P1=Symbol("aborted"),Np=Symbol("signal"),tl=Symbol("dataListeners"),Bn=Symbol("discarded"),Bp=t=>Promise.resolve().then(t),C7e=t=>t(),k7e=t=>t==="end"||t==="finish"||t==="prefinish",T7e=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,A7e=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),q1=class{src;dest;opts;ondrain;constructor(e,r,n){this.src=e,this.dest=r,this.opts=n,this.ondrain=()=>e[Xf](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},wO=class extends q1{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,n){super(e,r,n),this.proxyErrors=i=>r.emit("error",i),e.on("error",this.proxyErrors)}},O7e=t=>!!t.objectMode,R7e=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",I1=class extends EO.EventEmitter{[yr]=!1;[Lp]=!1;[sn]=[];[vr]=[];[Hr];[Hi];[To];[Zf];[ls]=!1;[Pa]=!1;[A1]=!1;[O1]=!1;[Mp]=null;[_r]=0;[nr]=!1;[Np];[P1]=!1;[tl]=0;[Bn]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");O7e(r)?(this[Hr]=!0,this[Hi]=null):R7e(r)?(this[Hi]=r.encoding,this[Hr]=!1):(this[Hr]=!1,this[Hi]=null),this[To]=!!r.async,this[Zf]=this[Hi]?new w7e.StringDecoder(this[Hi]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[vr]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[sn]});let{signal:n}=r;n&&(this[Np]=n,n.aborted?this[_O]():n.addEventListener("abort",()=>this[_O]()))}get bufferLength(){return this[_r]}get encoding(){return this[Hi]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Hr]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[To]}set async(e){this[To]=this[To]||!!e}[_O](){this[P1]=!0,this.emit("abort",this[Np]?.reason),this.destroy(this[Np]?.reason)}get aborted(){return this[P1]}set aborted(e){}write(e,r,n){if(this[P1])return!1;if(this[ls])throw new Error("write after end");if(this[nr])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(n=r,r="utf8"),r||(r="utf8");let i=this[To]?Bp:C7e;if(!this[Hr]&&!Buffer.isBuffer(e)){if(A7e(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(T7e(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[Hr]?(this[yr]&&this[_r]!==0&&this[R1](!0),this[yr]?this.emit("data",e):this[bO](e),this[_r]!==0&&this.emit("readable"),n&&i(n),this[yr]):e.length?(typeof e=="string"&&!(r===this[Hi]&&!this[Zf]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Hi]&&(e=this[Zf].write(e)),this[yr]&&this[_r]!==0&&this[R1](!0),this[yr]?this.emit("data",e):this[bO](e),this[_r]!==0&&this.emit("readable"),n&&i(n),this[yr]):(this[_r]!==0&&this.emit("readable"),n&&i(n),this[yr])}read(e){if(this[nr])return null;if(this[Bn]=!1,this[_r]===0||e===0||e&&e>this[_r])return this[cs](),null;this[Hr]&&(e=null),this[vr].length>1&&!this[Hr]&&(this[vr]=[this[Hi]?this[vr].join(""):Buffer.concat(this[vr],this[_r])]);let r=this[SZ](e||null,this[vr][0]);return this[cs](),r}[SZ](e,r){if(this[Hr])this[F1]();else{let n=r;e===n.length||e===null?this[F1]():typeof n=="string"?(this[vr][0]=n.slice(e),r=n.slice(0,e),this[_r]-=e):(this[vr][0]=n.subarray(e),r=n.subarray(0,e),this[_r]-=e)}return this.emit("data",r),!this[vr].length&&!this[ls]&&this.emit("drain"),r}end(e,r,n){return typeof e=="function"&&(n=e,e=void 0),typeof r=="function"&&(n=r,r="utf8"),e!==void 0&&this.write(e,r),n&&this.once("end",n),this[ls]=!0,this.writable=!1,(this[yr]||!this[Lp])&&this[cs](),this}[Xf](){this[nr]||(!this[tl]&&!this[sn].length&&(this[Bn]=!0),this[Lp]=!1,this[yr]=!0,this.emit("resume"),this[vr].length?this[R1]():this[ls]?this[cs]():this.emit("drain"))}resume(){return this[Xf]()}pause(){this[yr]=!1,this[Lp]=!0,this[Bn]=!1}get destroyed(){return this[nr]}get flowing(){return this[yr]}get paused(){return this[Lp]}[bO](e){this[Hr]?this[_r]+=1:this[_r]+=e.length,this[vr].push(e)}[F1](){return this[Hr]?this[_r]-=1:this[_r]-=this[vr][0].length,this[vr].shift()}[R1](e=!1){do;while(this[DZ](this[F1]())&&this[vr].length);!e&&!this[vr].length&&!this[ls]&&this.emit("drain")}[DZ](e){return this.emit("data",e),this[yr]}pipe(e,r){if(this[nr])return e;this[Bn]=!1;let n=this[Pa];return r=r||{},e===EZ.stdout||e===EZ.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,n?r.end&&e.end():(this[sn].push(r.proxyErrors?new wO(this,e,r):new q1(this,e,r)),this[To]?Bp(()=>this[Xf]()):this[Xf]()),e}unpipe(e){let r=this[sn].find(n=>n.dest===e);r&&(this[sn].length===1?(this[yr]&&this[tl]===0&&(this[yr]=!1),this[sn]=[]):this[sn].splice(this[sn].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let n=super.on(e,r);if(e==="data")this[Bn]=!1,this[tl]++,!this[sn].length&&!this[yr]&&this[Xf]();else if(e==="readable"&&this[_r]!==0)super.emit("readable");else if(k7e(e)&&this[Pa])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Mp]){let i=r;this[To]?Bp(()=>i.call(this,this[Mp])):i.call(this,this[Mp])}return n}removeListener(e,r){return this.off(e,r)}off(e,r){let n=super.off(e,r);return e==="data"&&(this[tl]=this.listeners("data").length,this[tl]===0&&!this[Bn]&&!this[sn].length&&(this[yr]=!1)),n}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[tl]=0,!this[Bn]&&!this[sn].length&&(this[yr]=!1)),r}get emittedEnd(){return this[Pa]}[cs](){!this[A1]&&!this[Pa]&&!this[nr]&&this[vr].length===0&&this[ls]&&(this[A1]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[O1]&&this.emit("close"),this[A1]=!1)}emit(e,...r){let n=r[0];if(e!=="error"&&e!=="close"&&e!==nr&&this[nr])return!1;if(e==="data")return!this[Hr]&&!n?!1:this[To]?(Bp(()=>this[yO](n)),!0):this[yO](n);if(e==="end")return this[CZ]();if(e==="close"){if(this[O1]=!0,!this[Pa]&&!this[nr])return!1;let o=super.emit("close");return this.removeAllListeners("close"),o}else if(e==="error"){this[Mp]=n,super.emit(xO,n);let o=!this[Np]||this.listeners("error").length?super.emit("error",n):!1;return this[cs](),o}else if(e==="resume"){let o=super.emit("resume");return this[cs](),o}else if(e==="finish"||e==="prefinish"){let o=super.emit(e);return this.removeAllListeners(e),o}let i=super.emit(e,...r);return this[cs](),i}[yO](e){for(let n of this[sn])n.dest.write(e)===!1&&this.pause();let r=this[Bn]?!1:super.emit("data",e);return this[cs](),r}[CZ](){return this[Pa]?!1:(this[Pa]=!0,this.readable=!1,this[To]?(Bp(()=>this[vO]()),!0):this[vO]())}[vO](){if(this[Zf]){let r=this[Zf].end();if(r){for(let n of this[sn])n.dest.write(r);this[Bn]||super.emit("data",r)}}for(let r of this[sn])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[Hr]||(e.dataLength=0);let r=this.promise();return this.on("data",n=>{e.push(n),this[Hr]||(e.dataLength+=n.length)}),await r,e}async concat(){if(this[Hr])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Hi]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(nr,()=>r(new Error("stream destroyed"))),this.on("error",n=>r(n)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Bn]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[ls])return r();let o,s,a=d=>{this.off("data",u),this.off("end",l),this.off(nr,c),r(),s(d)},u=d=>{this.off("error",a),this.off("end",l),this.off(nr,c),this.pause(),o({value:d,done:!!this[ls]})},l=()=>{this.off("error",a),this.off("data",u),this.off(nr,c),r(),o({done:!0,value:void 0})},c=()=>a(new Error("stream destroyed"));return new Promise((d,h)=>{s=h,o=d,this.once(nr,c),this.once("error",a),this.once("end",l),this.once("data",u)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Bn]=!1;let e=!1,r=()=>(this.pause(),this.off(xO,r),this.off(nr,r),this.off("end",r),e=!0,{done:!0,value:void 0}),n=()=>{if(e)return r();let i=this.read();return i===null?r():{done:!1,value:i}};return this.once("end",r),this.once(xO,r),this.once(nr,r),{next:n,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[nr])return e?this.emit("error",e):this.emit(nr),this;this[nr]=!0,this[Bn]=!0,this[vr].length=0,this[_r]=0;let r=this;return typeof r.close=="function"&&!this[O1]&&r.close(),e?this.emit("error",e):this.emit(nr),this}static get isStream(){return an.isStream}};an.Minipass=I1});var WZ=g(bt=>{"use strict";var F7e=bt&&bt.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),P7e=bt&&bt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),q7e=bt&&bt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&F7e(e,t,r);return P7e(e,t),e};Object.defineProperty(bt,"__esModule",{value:!0});bt.PathScurry=bt.Path=bt.PathScurryDarwin=bt.PathScurryPosix=bt.PathScurryWin32=bt.PathScurryBase=bt.PathPosix=bt.PathWin32=bt.PathBase=bt.ChildrenCache=bt.ResolveCache=void 0;var PZ=wZ(),B1=require("node:path"),I7e=require("node:url"),Wp=require("fs"),j7e=q7e(require("node:fs")),M7e=Wp.realpathSync.native,j1=require("node:fs/promises"),TZ=SO(),Up={lstatSync:Wp.lstatSync,readdir:Wp.readdir,readdirSync:Wp.readdirSync,readlinkSync:Wp.readlinkSync,realpathSync:M7e,promises:{lstat:j1.lstat,readdir:j1.readdir,readlink:j1.readlink,realpath:j1.realpath}},qZ=t=>!t||t===Up||t===j7e?Up:{...Up,...t,promises:{...Up.promises,...t.promises||{}}},IZ=/^\\\\\?\\([a-z]:)\\?$/i,L7e=t=>t.replace(/\//g,"\\").replace(IZ,"$1\\"),N7e=/[\\\/]/,wi=0,jZ=1,MZ=2,Ao=4,LZ=6,NZ=8,rl=10,BZ=12,_i=15,$p=~_i,DO=16,AZ=32,zp=64,Gi=128,M1=256,N1=512,OZ=zp|Gi|N1,B7e=1023,CO=t=>t.isFile()?NZ:t.isDirectory()?Ao:t.isSymbolicLink()?rl:t.isCharacterDevice()?MZ:t.isBlockDevice()?LZ:t.isSocket()?BZ:t.isFIFO()?jZ:wi,RZ=new Map,Vp=t=>{let e=RZ.get(t);if(e)return e;let r=t.normalize("NFKD");return RZ.set(t,r),r},FZ=new Map,L1=t=>{let e=FZ.get(t);if(e)return e;let r=Vp(t.toLowerCase());return FZ.set(t,r),r},Hp=class extends PZ.LRUCache{constructor(){super({max:256})}};bt.ResolveCache=Hp;var $1=class extends PZ.LRUCache{constructor(e=16*1024){super({maxSize:e,sizeCalculation:r=>r.length+1})}};bt.ChildrenCache=$1;var $Z=Symbol("PathScurry setAsCwd"),qr=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#r;get mode(){return this.#r}#n;get nlink(){return this.#n}#i;get uid(){return this.#i}#d;get gid(){return this.#d}#u;get rdev(){return this.#u}#c;get blksize(){return this.#c}#a;get ino(){return this.#a}#l;get size(){return this.#l}#o;get blocks(){return this.#o}#g;get atimeMs(){return this.#g}#m;get mtimeMs(){return this.#m}#h;get ctimeMs(){return this.#h}#p;get birthtimeMs(){return this.#p}#E;get atime(){return this.#E}#x;get mtime(){return this.#x}#S;get ctime(){return this.#S}#D;get birthtime(){return this.#D}#v;#_;#w;#b;#A;#C;#s;#F;#y;#O;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,r=wi,n,i,o,s,a){this.name=e,this.#v=o?L1(e):Vp(e),this.#s=r&B7e,this.nocase=o,this.roots=i,this.root=n||this,this.#F=s,this.#w=a.fullpath,this.#A=a.relative,this.#C=a.relativePosix,this.parent=a.parent,this.parent?this.#e=this.parent.#e:this.#e=qZ(a.fs)}depth(){return this.#_!==void 0?this.#_:this.parent?this.#_=this.parent.depth()+1:this.#_=0}childrenCache(){return this.#F}resolve(e){if(!e)return this;let r=this.getRootString(e),i=e.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#P(i):this.#P(i)}#P(e){let r=this;for(let n of e)r=r.child(n);return r}children(){let e=this.#F.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#F.set(this,r),this.#s&=~DO,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let n=this.children(),i=this.nocase?L1(e):Vp(e);for(let u of n)if(u.#v===i)return u;let o=this.parent?this.sep:"",s=this.#w?this.#w+o+e:void 0,a=this.newChild(e,wi,{...r,parent:this,fullpath:s});return this.canReaddir()||(a.#s|=Gi),n.push(a),a}relative(){if(this.isCWD)return"";if(this.#A!==void 0)return this.#A;let e=this.name,r=this.parent;if(!r)return this.#A=this.name;let n=r.relative();return n+(!n||!r.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#C!==void 0)return this.#C;let e=this.name,r=this.parent;if(!r)return this.#C=this.fullpathPosix();let n=r.relativePosix();return n+(!n||!r.parent?"":"/")+e}fullpath(){if(this.#w!==void 0)return this.#w;let e=this.name,r=this.parent;if(!r)return this.#w=this.name;let i=r.fullpath()+(r.parent?this.sep:"")+e;return this.#w=i}fullpathPosix(){if(this.#b!==void 0)return this.#b;if(this.sep==="/")return this.#b=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#b=`//?/${i}`:this.#b=i}let e=this.parent,r=e.fullpathPosix(),n=r+(!r||!e.parent?"":"/")+this.name;return this.#b=n}isUnknown(){return(this.#s&_i)===wi}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#s&_i)===NZ}isDirectory(){return(this.#s&_i)===Ao}isCharacterDevice(){return(this.#s&_i)===MZ}isBlockDevice(){return(this.#s&_i)===LZ}isFIFO(){return(this.#s&_i)===jZ}isSocket(){return(this.#s&_i)===BZ}isSymbolicLink(){return(this.#s&rl)===rl}lstatCached(){return this.#s&AZ?this:void 0}readlinkCached(){return this.#y}realpathCached(){return this.#O}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#y)return!0;if(!this.parent)return!1;let e=this.#s&_i;return!(e!==wi&&e!==rl||this.#s&M1||this.#s&Gi)}calledReaddir(){return!!(this.#s&DO)}isENOENT(){return!!(this.#s&Gi)}isNamed(e){return this.nocase?this.#v===L1(e):this.#v===Vp(e)}async readlink(){let e=this.#y;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=await this.#e.promises.readlink(this.fullpath()),n=(await this.parent.realpath())?.resolve(r);if(n)return this.#y=n}catch(r){this.#f(r.code);return}}readlinkSync(){let e=this.#y;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=this.#e.readlinkSync(this.fullpath()),n=this.parent.realpathSync()?.resolve(r);if(n)return this.#y=n}catch(r){this.#f(r.code);return}}#q(e){this.#s|=DO;for(let r=e.provisional;r<e.length;r++){let n=e[r];n&&n.#I()}}#I(){this.#s&Gi||(this.#s=(this.#s|Gi)&$p,this.#k())}#k(){let e=this.children();e.provisional=0;for(let r of e)r.#I()}#T(){this.#s|=N1,this.#j()}#j(){if(this.#s&zp)return;let e=this.#s;(e&_i)===Ao&&(e&=$p),this.#s=e|zp,this.#k()}#M(e=""){e==="ENOTDIR"||e==="EPERM"?this.#j():e==="ENOENT"?this.#I():this.children().provisional=0}#L(e=""){e==="ENOTDIR"?this.parent.#j():e==="ENOENT"&&this.#I()}#f(e=""){let r=this.#s;r|=M1,e==="ENOENT"&&(r|=Gi),(e==="EINVAL"||e==="UNKNOWN")&&(r&=$p),this.#s=r,e==="ENOTDIR"&&this.parent&&this.parent.#j()}#N(e,r){return this.#R(e,r)||this.#B(e,r)}#B(e,r){let n=CO(e),i=this.newChild(e.name,n,{parent:this}),o=i.#s&_i;return o!==Ao&&o!==rl&&o!==wi&&(i.#s|=zp),r.unshift(i),r.provisional++,i}#R(e,r){for(let n=r.provisional;n<r.length;n++){let i=r[n];if((this.nocase?L1(e.name):Vp(e.name))===i.#v)return this.#$(e,i,n,r)}}#$(e,r,n,i){let o=r.name;return r.#s=r.#s&$p|CO(e),o!==e.name&&(r.name=e.name),n!==i.provisional&&(n===i.length-1?i.pop():i.splice(n,1),i.unshift(r)),i.provisional++,r}async lstat(){if(!(this.#s&Gi))try{return this.#V(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#L(e.code)}}lstatSync(){if(!(this.#s&Gi))try{return this.#V(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#L(e.code)}}#V(e){let{atime:r,atimeMs:n,birthtime:i,birthtimeMs:o,blksize:s,blocks:a,ctime:u,ctimeMs:l,dev:c,gid:d,ino:h,mode:p,mtime:b,mtimeMs:x,nlink:D,rdev:v,size:E,uid:y}=e;this.#E=r,this.#g=n,this.#D=i,this.#p=o,this.#c=s,this.#o=a,this.#S=u,this.#h=l,this.#t=c,this.#d=d,this.#a=h,this.#r=p,this.#x=b,this.#m=x,this.#n=D,this.#u=v,this.#l=E,this.#i=y;let k=CO(e);this.#s=this.#s&$p|k|AZ,k!==wi&&k!==Ao&&k!==rl&&(this.#s|=zp)}#U=[];#z=!1;#H(e){this.#z=!1;let r=this.#U.slice();this.#U.length=0,r.forEach(n=>n(null,e))}readdirCB(e,r=!1){if(!this.canReaddir()){r?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let o=n.slice(0,n.provisional);r?e(null,o):queueMicrotask(()=>e(null,o));return}if(this.#U.push(e),this.#z)return;this.#z=!0;let i=this.fullpath();this.#e.readdir(i,{withFileTypes:!0},(o,s)=>{if(o)this.#M(o.code),n.provisional=0;else{for(let a of s)this.#N(a,n);this.#q(n)}this.#H(n.slice(0,n.provisional))})}#W;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();if(this.#W)await this.#W;else{let n=()=>{};this.#W=new Promise(i=>n=i);try{for(let i of await this.#e.promises.readdir(r,{withFileTypes:!0}))this.#N(i,e);this.#q(e)}catch(i){this.#M(i.code),e.provisional=0}this.#W=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();try{for(let n of this.#e.readdirSync(r,{withFileTypes:!0}))this.#N(n,e);this.#q(e)}catch(n){this.#M(n.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#s&OZ)return!1;let e=_i&this.#s;return e===wi||e===Ao||e===rl}shouldWalk(e,r){return(this.#s&Ao)===Ao&&!(this.#s&OZ)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#O)return this.#O;if(!((N1|M1|Gi)&this.#s))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#O=this.resolve(e)}catch{this.#T()}}realpathSync(){if(this.#O)return this.#O;if(!((N1|M1|Gi)&this.#s))try{let e=this.#e.realpathSync(this.fullpath());return this.#O=this.resolve(e)}catch{this.#T()}}[$Z](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let r=new Set([]),n=[],i=this;for(;i&&i.parent;)r.add(i),i.#A=n.join(this.sep),i.#C=n.join("/"),i=i.parent,n.push("..");for(i=e;i&&i.parent&&!r.has(i);)i.#A=void 0,i.#C=void 0,i=i.parent}};bt.PathBase=qr;var Gp=class t extends qr{sep="\\";splitSep=N7e;constructor(e,r=wi,n,i,o,s,a){super(e,r,n,i,o,s,a)}newChild(e,r=wi,n={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(e){return B1.win32.parse(e).root}getRoot(e){if(e=L7e(e.toUpperCase()),e===this.root.name)return this.root;for(let[r,n]of Object.entries(this.roots))if(this.sameRoot(e,r))return this.roots[e]=n;return this.roots[e]=new Qp(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(IZ,"$1\\"),e===r}};bt.PathWin32=Gp;var Yp=class t extends qr{splitSep="/";sep="/";constructor(e,r=wi,n,i,o,s,a){super(e,r,n,i,o,s,a)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,r=wi,n={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}};bt.PathPosix=Yp;var Kp=class{root;rootPath;roots;cwd;#e;#t;#r;nocase;#n;constructor(e=process.cwd(),r,n,{nocase:i,childrenCacheSize:o=16*1024,fs:s=Up}={}){this.#n=qZ(s),(e instanceof URL||e.startsWith("file://"))&&(e=(0,I7e.fileURLToPath)(e));let a=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(a),this.#e=new Hp,this.#t=new Hp,this.#r=new $1(o);let u=a.substring(this.rootPath.length).split(n);if(u.length===1&&!u[0]&&u.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#n),this.roots[this.rootPath]=this.root;let l=this.root,c=u.length-1,d=r.sep,h=this.rootPath,p=!1;for(let b of u){let x=c--;l=l.child(b,{relative:new Array(x).fill("..").join(d),relativePosix:new Array(x).fill("..").join("/"),fullpath:h+=(p?"":d)+b}),p=!0}this.cwd=l}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#r}resolve(...e){let r="";for(let o=e.length-1;o>=0;o--){let s=e[o];if(!(!s||s===".")&&(r=r?`${s}/${r}`:s,this.isAbsolute(s)))break}let n=this.#e.get(r);if(n!==void 0)return n;let i=this.cwd.resolve(r).fullpath();return this.#e.set(r,i),i}resolvePosix(...e){let r="";for(let o=e.length-1;o>=0;o--){let s=e[o];if(!(!s||s===".")&&(r=r?`${s}/${r}`:s,this.isAbsolute(s)))break}let n=this.#t.get(r);if(n!==void 0)return n;let i=this.cwd.resolve(r).fullpathPosix();return this.#t.set(r,i),i}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qr||(r=e,e=this.cwd);let{withFileTypes:n}=r;if(e.canReaddir()){let i=await e.readdir();return n?i:i.map(o=>o.name)}else return[]}readdirSync(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qr||(r=e,e=this.cwd);let{withFileTypes:n=!0}=r;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(i=>i.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qr||(r=e.withFileTypes,e=this.cwd);let n=await e.readlink();return r?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qr||(r=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return r?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qr||(r=e.withFileTypes,e=this.cwd);let n=await e.realpath();return r?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qr||(r=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return r?n:n?.fullpath()}async walk(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qr||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:s}=r,a=[];(!o||o(e))&&a.push(n?e:e.fullpath());let u=new Set,l=(d,h)=>{u.add(d),d.readdirCB((p,b)=>{if(p)return h(p);let x=b.length;if(!x)return h();let D=()=>{--x===0&&h()};for(let v of b)(!o||o(v))&&a.push(n?v:v.fullpath()),i&&v.isSymbolicLink()?v.realpath().then(E=>E?.isUnknown()?E.lstat():E).then(E=>E?.shouldWalk(u,s)?l(E,D):D()):v.shouldWalk(u,s)?l(v,D):D()},!0)},c=e;return new Promise((d,h)=>{l(c,p=>{if(p)return h(p);d(a)})})}walkSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qr||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:s}=r,a=[];(!o||o(e))&&a.push(n?e:e.fullpath());let u=new Set([e]);for(let l of u){let c=l.readdirSync();for(let d of c){(!o||o(d))&&a.push(n?d:d.fullpath());let h=d;if(d.isSymbolicLink()){if(!(i&&(h=d.realpathSync())))continue;h.isUnknown()&&h.lstatSync()}h.shouldWalk(u,s)&&u.add(h)}}return a}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,r={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof qr||(r=e,e=this.cwd),this.stream(e,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qr||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:s}=r;(!o||o(e))&&(yield n?e:e.fullpath());let a=new Set([e]);for(let u of a){let l=u.readdirSync();for(let c of l){(!o||o(c))&&(yield n?c:c.fullpath());let d=c;if(c.isSymbolicLink()){if(!(i&&(d=c.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(a,s)&&a.add(d)}}}stream(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qr||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:s}=r,a=new TZ.Minipass({objectMode:!0});(!o||o(e))&&a.write(n?e:e.fullpath());let u=new Set,l=[e],c=0,d=()=>{let h=!1;for(;!h;){let p=l.shift();if(!p){c===0&&a.end();return}c++,u.add(p);let b=(D,v,E=!1)=>{if(D)return a.emit("error",D);if(i&&!E){let y=[];for(let k of v)k.isSymbolicLink()&&y.push(k.realpath().then(O=>O?.isUnknown()?O.lstat():O));if(y.length){Promise.all(y).then(()=>b(null,v,!0));return}}for(let y of v)y&&(!o||o(y))&&(a.write(n?y:y.fullpath())||(h=!0));c--;for(let y of v){let k=y.realpathCached()||y;k.shouldWalk(u,s)&&l.push(k)}h&&!a.flowing?a.once("drain",d):x||d()},x=!0;p.readdirCB(b,!0),x=!1}};return d(),a}streamSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qr||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:s}=r,a=new TZ.Minipass({objectMode:!0}),u=new Set;(!o||o(e))&&a.write(n?e:e.fullpath());let l=[e],c=0,d=()=>{let h=!1;for(;!h;){let p=l.shift();if(!p){c===0&&a.end();return}c++,u.add(p);let b=p.readdirSync();for(let x of b)(!o||o(x))&&(a.write(n?x:x.fullpath())||(h=!0));c--;for(let x of b){let D=x;if(x.isSymbolicLink()){if(!(i&&(D=x.realpathSync())))continue;D.isUnknown()&&D.lstatSync()}D.shouldWalk(u,s)&&l.push(D)}}h&&!a.flowing&&a.once("drain",d)};return d(),a}chdir(e=this.cwd){let r=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[$Z](r)}};bt.PathScurryBase=Kp;var Qp=class extends Kp{sep="\\";constructor(e=process.cwd(),r={}){let{nocase:n=!0}=r;super(e,B1.win32,"\\",{...r,nocase:n}),this.nocase=n;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(e){return B1.win32.parse(e).root.toUpperCase()}newRoot(e){return new Gp(this.rootPath,Ao,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}};bt.PathScurryWin32=Qp;var Zp=class extends Kp{sep="/";constructor(e=process.cwd(),r={}){let{nocase:n=!1}=r;super(e,B1.posix,"/",{...r,nocase:n}),this.nocase=n}parseRootPath(e){return"/"}newRoot(e){return new Yp(this.rootPath,Ao,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}};bt.PathScurryPosix=Zp;var W1=class extends Zp{constructor(e=process.cwd(),r={}){let{nocase:n=!0}=r;super(e,{...r,nocase:n})}};bt.PathScurryDarwin=W1;bt.Path=process.platform==="win32"?Gp:Yp;bt.PathScurry=process.platform==="win32"?Qp:process.platform==="darwin"?W1:Zp});var TO=g(U1=>{"use strict";Object.defineProperty(U1,"__esModule",{value:!0});U1.Pattern=void 0;var $7e=Ra(),W7e=t=>t.length>=1,U7e=t=>t.length>=1,kO=class t{#e;#t;#r;length;#n;#i;#d;#u;#c;#a;#l=!0;constructor(e,r,n,i){if(!W7e(e))throw new TypeError("empty pattern list");if(!U7e(r))throw new TypeError("empty glob list");if(r.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,n<0||n>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#t=r,this.#r=n,this.#n=i,this.#r===0){if(this.isUNC()){let[o,s,a,u,...l]=this.#e,[c,d,h,p,...b]=this.#t;l[0]===""&&(l.shift(),b.shift());let x=[o,s,a,u,""].join("/"),D=[c,d,h,p,""].join("/");this.#e=[x,...l],this.#t=[D,...b],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[o,...s]=this.#e,[a,...u]=this.#t;s[0]===""&&(s.shift(),u.shift());let l=o+"/",c=a+"/";this.#e=[l,...s],this.#t=[c,...u],this.length=this.#e.length}}}pattern(){return this.#e[this.#r]}isString(){return typeof this.#e[this.#r]=="string"}isGlobstar(){return this.#e[this.#r]===$7e.GLOBSTAR}isRegExp(){return this.#e[this.#r]instanceof RegExp}globString(){return this.#d=this.#d||(this.#r===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#r).join("/"))}hasMore(){return this.length>this.#r+1}rest(){return this.#i!==void 0?this.#i:this.hasMore()?(this.#i=new t(this.#e,this.#t,this.#r+1,this.#n),this.#i.#a=this.#a,this.#i.#c=this.#c,this.#i.#u=this.#u,this.#i):this.#i=null}isUNC(){let e=this.#e;return this.#c!==void 0?this.#c:this.#c=this.#n==="win32"&&this.#r===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#u!==void 0?this.#u:this.#u=this.#n==="win32"&&this.#r===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#r===0?e:""}checkFollowGlobstar(){return!(this.#r===0||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return this.#r===0||!this.isGlobstar()||!this.#l?!1:(this.#l=!1,!0)}};U1.Pattern=kO});var OO=g(z1=>{"use strict";Object.defineProperty(z1,"__esModule",{value:!0});z1.Ignore=void 0;var UZ=Ra(),z7e=TO(),V7e=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",AO=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:r,nocase:n,noext:i,noglobstar:o,platform:s=V7e}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=s,this.mmopts={dot:!0,nobrace:r,nocase:n,noext:i,noglobstar:o,optimizationLevel:2,platform:s,nocomment:!0,nonegate:!0};for(let a of e)this.add(a)}add(e){let r=new UZ.Minimatch(e,this.mmopts);for(let n=0;n<r.set.length;n++){let i=r.set[n],o=r.globParts[n];if(!i||!o)throw new Error("invalid pattern object");for(;i[0]==="."&&o[0]===".";)i.shift(),o.shift();let s=new z7e.Pattern(i,o,0,this.platform),a=new UZ.Minimatch(s.globString(),this.mmopts),u=o[o.length-1]==="**",l=s.isAbsolute();l?this.absolute.push(a):this.relative.push(a),u&&(l?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}ignored(e){let r=e.fullpath(),n=`${r}/`,i=e.relative()||".",o=`${i}/`;for(let s of this.relative)if(s.match(i)||s.match(o))return!0;for(let s of this.absolute)if(s.match(r)||s.match(n))return!0;return!1}childrenIgnored(e){let r=e.fullpath()+"/",n=(e.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(n))return!0;for(let i of this.absoluteChildren)if(i.match(r))return!0;return!1}};z1.Ignore=AO});var VZ=g(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.Processor=Oo.SubWalks=Oo.MatchRecord=Oo.HasWalkedCache=void 0;var zZ=Ra(),V1=class t{store;constructor(e=new Map){this.store=e}copy(){return new t(new Map(this.store))}hasWalked(e,r){return this.store.get(e.fullpath())?.has(r.globString())}storeWalked(e,r){let n=e.fullpath(),i=this.store.get(n);i?i.add(r.globString()):this.store.set(n,new Set([r.globString()]))}};Oo.HasWalkedCache=V1;var H1=class{store=new Map;add(e,r,n){let i=(r?2:0)|(n?1:0),o=this.store.get(e);this.store.set(e,o===void 0?i:i&o)}entries(){return[...this.store.entries()].map(([e,r])=>[e,!!(r&2),!!(r&1)])}};Oo.MatchRecord=H1;var G1=class{store=new Map;add(e,r){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(i=>i.globString()===r.globString())||n.push(r):this.store.set(e,[r])}get(e){let r=this.store.get(e);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}};Oo.SubWalks=G1;var RO=class t{hasWalkedCache;matches=new H1;subwalks=new G1;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new V1}processPatterns(e,r){this.patterns=r;let n=r.map(i=>[e,i]);for(let[i,o]of n){this.hasWalkedCache.storeWalked(i,o);let s=o.root(),a=o.isAbsolute()&&this.opts.absolute!==!1;if(s){i=i.resolve(s==="/"&&this.opts.root!==void 0?this.opts.root:s);let d=o.rest();if(d)o=d;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let u,l,c=!1;for(;typeof(u=o.pattern())=="string"&&(l=o.rest());)i=i.resolve(u),o=l,c=!0;if(u=o.pattern(),l=o.rest(),c){if(this.hasWalkedCache.hasWalked(i,o))continue;this.hasWalkedCache.storeWalked(i,o)}if(typeof u=="string"){let d=u===".."||u===""||u===".";this.matches.add(i.resolve(u),a,d);continue}else if(u===zZ.GLOBSTAR){(!i.isSymbolicLink()||this.follow||o.checkFollowGlobstar())&&this.subwalks.add(i,o);let d=l?.pattern(),h=l?.rest();if(!l||(d===""||d===".")&&!h)this.matches.add(i,a,d===""||d===".");else if(d===".."){let p=i.parent||i;h?this.hasWalkedCache.hasWalked(p,h)||this.subwalks.add(p,h):this.matches.add(p,a,!0)}}else u instanceof RegExp&&this.subwalks.add(i,o)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new t(this.opts,this.hasWalkedCache)}filterEntries(e,r){let n=this.subwalks.get(e),i=this.child();for(let o of r)for(let s of n){let a=s.isAbsolute(),u=s.pattern(),l=s.rest();u===zZ.GLOBSTAR?i.testGlobstar(o,s,l,a):u instanceof RegExp?i.testRegExp(o,u,l,a):i.testString(o,u,l,a)}return i}testGlobstar(e,r,n,i){if((this.dot||!e.name.startsWith("."))&&(r.hasMore()||this.matches.add(e,i,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,r):e.isSymbolicLink()&&(n&&r.checkFollowGlobstar()?this.subwalks.add(e,n):r.markFollowGlobstar()&&this.subwalks.add(e,r)))),n){let o=n.pattern();if(typeof o=="string"&&o!==".."&&o!==""&&o!==".")this.testString(e,o,n.rest(),i);else if(o===".."){let s=e.parent||e;this.subwalks.add(s,n)}else o instanceof RegExp&&this.testRegExp(e,o,n.rest(),i)}}testRegExp(e,r,n,i){r.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,i,!1))}testString(e,r,n,i){e.isNamed(r)&&(n?this.subwalks.add(e,n):this.matches.add(e,i,!1))}};Oo.Processor=RO});var YZ=g(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.GlobStream=qa.GlobWalker=qa.GlobUtil=void 0;var H7e=SO(),HZ=OO(),GZ=VZ(),G7e=(t,e)=>typeof t=="string"?new HZ.Ignore([t],e):Array.isArray(t)?new HZ.Ignore(t,e):t,Xp=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#r;signal;maxDepth;includeChildMatches;constructor(e,r,n){if(this.patterns=e,this.path=r,this.opts=n,this.#r=!n.posix&&n.platform==="win32"?"\\":"/",this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#t=G7e(n.ignore??[],n),!this.includeChildMatches&&typeof this.#t.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#n(e){return this.seen.has(e)||!!this.#t?.ignored?.(e)}#i(e){return!!this.#t?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let o=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&o?.isSymbolicLink()){let s=await o.realpath();s&&(s.isUnknown()||this.opts.stat)&&await s.lstat()}return this.matchCheckTest(o,r)}matchCheckTest(e,r){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!r||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#n(e)?e:void 0}matchCheckSync(e,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let o=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&o?.isSymbolicLink()){let s=o.realpathSync();s&&(s?.isUnknown()||this.opts.stat)&&s.lstatSync()}return this.matchCheckTest(o,r)}matchFinish(e,r){if(this.#n(e))return;if(!this.includeChildMatches&&this.#t?.add){let o=`${e.relativePosix()}/**`;this.#t.add(o)}let n=this.opts.absolute===void 0?r:this.opts.absolute;this.seen.add(e);let i=this.opts.mark&&e.isDirectory()?this.#r:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let o=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(o+i)}else{let o=this.opts.posix?e.relativePosix():e.relative(),s=this.opts.dotRelative&&!o.startsWith(".."+this.#r)?"."+this.#r:"";this.matchEmit(o?s+o+i:"."+i)}}async match(e,r,n){let i=await this.matchCheck(e,n);i&&this.matchFinish(i,r)}matchSync(e,r,n){let i=this.matchCheckSync(e,n);i&&this.matchFinish(i,r)}walkCB(e,r,n){this.signal?.aborted&&n(),this.walkCB2(e,r,new GZ.Processor(this.opts),n)}walkCB2(e,r,n,i){if(this.#i(e))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(e,r,n,i));return}n.processPatterns(e,r);let o=1,s=()=>{--o===0&&i()};for(let[a,u,l]of n.matches.entries())this.#n(a)||(o++,this.match(a,u,l).then(()=>s()));for(let a of n.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;o++;let u=a.readdirCached();a.calledReaddir()?this.walkCB3(a,u,n,s):a.readdirCB((l,c)=>this.walkCB3(a,c,n,s),!0)}s()}walkCB3(e,r,n,i){n=n.filterEntries(e,r);let o=1,s=()=>{--o===0&&i()};for(let[a,u,l]of n.matches.entries())this.#n(a)||(o++,this.match(a,u,l).then(()=>s()));for(let[a,u]of n.subwalks.entries())o++,this.walkCB2(a,u,n.child(),s);s()}walkCBSync(e,r,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,r,new GZ.Processor(this.opts),n)}walkCB2Sync(e,r,n,i){if(this.#i(e))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(e,r,n,i));return}n.processPatterns(e,r);let o=1,s=()=>{--o===0&&i()};for(let[a,u,l]of n.matches.entries())this.#n(a)||this.matchSync(a,u,l);for(let a of n.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;o++;let u=a.readdirSync();this.walkCB3Sync(a,u,n,s)}s()}walkCB3Sync(e,r,n,i){n=n.filterEntries(e,r);let o=1,s=()=>{--o===0&&i()};for(let[a,u,l]of n.matches.entries())this.#n(a)||this.matchSync(a,u,l);for(let[a,u]of n.subwalks.entries())o++,this.walkCB2Sync(a,u,n.child(),s);s()}};qa.GlobUtil=Xp;var FO=class extends Xp{matches=new Set;constructor(e,r,n){super(e,r,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,r)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?r(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}};qa.GlobWalker=FO;var PO=class extends Xp{results;constructor(e,r,n){super(e,r,n),this.results=new H7e.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};qa.GlobStream=PO});var IO=g(Q1=>{"use strict";Object.defineProperty(Q1,"__esModule",{value:!0});Q1.Glob=void 0;var Y7e=Ra(),K7e=require("node:url"),Y1=WZ(),Q7e=TO(),K1=YZ(),Z7e=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",qO=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,r){if(!r)throw new TypeError("glob options required");if(this.withFileTypes=!!r.withFileTypes,this.signal=r.signal,this.follow=!!r.follow,this.dot=!!r.dot,this.dotRelative=!!r.dotRelative,this.nodir=!!r.nodir,this.mark=!!r.mark,r.cwd?(r.cwd instanceof URL||r.cwd.startsWith("file://"))&&(r.cwd=(0,K7e.fileURLToPath)(r.cwd)):this.cwd="",this.cwd=r.cwd||"",this.root=r.root,this.magicalBraces=!!r.magicalBraces,this.nobrace=!!r.nobrace,this.noext=!!r.noext,this.realpath=!!r.realpath,this.absolute=r.absolute,this.includeChildMatches=r.includeChildMatches!==!1,this.noglobstar=!!r.noglobstar,this.matchBase=!!r.matchBase,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:1/0,this.stat=!!r.stat,this.ignore=r.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(u=>u.replace(/\\/g,"/"))),this.matchBase){if(r.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(u=>u.includes("/")?u:`./**/${u}`)}if(this.pattern=e,this.platform=r.platform||Z7e,this.opts={...r,platform:this.platform},r.scurry){if(this.scurry=r.scurry,r.nocase!==void 0&&r.nocase!==r.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let u=r.platform==="win32"?Y1.PathScurryWin32:r.platform==="darwin"?Y1.PathScurryDarwin:r.platform?Y1.PathScurryPosix:Y1.PathScurry;this.scurry=new u(this.cwd,{nocase:r.nocase,fs:r.fs})}this.nocase=this.scurry.nocase;let n=this.platform==="darwin"||this.platform==="win32",i={...r,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},o=this.pattern.map(u=>new Y7e.Minimatch(u,i)),[s,a]=o.reduce((u,l)=>(u[0].push(...l.set),u[1].push(...l.globParts),u),[[],[]]);this.patterns=s.map((u,l)=>{let c=a[l];if(!c)throw new Error("invalid pattern object");return new Q7e.Pattern(u,c,0,this.platform)})}async walk(){return[...await new K1.GlobWalker(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 K1.GlobWalker(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 K1.GlobStream(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 K1.GlobStream(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()}};Q1.Glob=qO});var jO=g(Z1=>{"use strict";Object.defineProperty(Z1,"__esModule",{value:!0});Z1.hasMagic=void 0;var X7e=Ra(),J7e=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new X7e.Minimatch(r,e).hasMagic())return!0;return!1};Z1.hasMagic=J7e});var XZ=g(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.glob=tt.sync=tt.iterate=tt.iterateSync=tt.stream=tt.streamSync=tt.Ignore=tt.hasMagic=tt.Glob=tt.unescape=tt.escape=void 0;tt.globStreamSync=Jp;tt.globStream=MO;tt.globSync=LO;tt.globIterateSync=e0;tt.globIterate=NO;var KZ=Ra(),nl=IO(),eje=jO(),ZZ=Ra();Object.defineProperty(tt,"escape",{enumerable:!0,get:function(){return ZZ.escape}});Object.defineProperty(tt,"unescape",{enumerable:!0,get:function(){return ZZ.unescape}});var tje=IO();Object.defineProperty(tt,"Glob",{enumerable:!0,get:function(){return tje.Glob}});var rje=jO();Object.defineProperty(tt,"hasMagic",{enumerable:!0,get:function(){return rje.hasMagic}});var nje=OO();Object.defineProperty(tt,"Ignore",{enumerable:!0,get:function(){return nje.Ignore}});function Jp(t,e={}){return new nl.Glob(t,e).streamSync()}function MO(t,e={}){return new nl.Glob(t,e).stream()}function LO(t,e={}){return new nl.Glob(t,e).walkSync()}async function QZ(t,e={}){return new nl.Glob(t,e).walk()}function e0(t,e={}){return new nl.Glob(t,e).iterateSync()}function NO(t,e={}){return new nl.Glob(t,e).iterate()}tt.streamSync=Jp;tt.stream=Object.assign(MO,{sync:Jp});tt.iterateSync=e0;tt.iterate=Object.assign(NO,{sync:e0});tt.sync=Object.assign(LO,{stream:Jp,iterate:e0});tt.glob=Object.assign(QZ,{glob:QZ,globSync:LO,sync:tt.sync,globStream:MO,stream:tt.stream,globStreamSync:Jp,streamSync:tt.streamSync,globIterate:NO,iterate:tt.iterate,globIterateSync:e0,iterateSync:tt.iterateSync,Glob:nl.Glob,hasMagic:eje.hasMagic,escape:KZ.escape,unescape:KZ.unescape});tt.glob.glob=tt.glob});var rX=g((Bat,tX)=>{"use strict";var eX=lT(),Jf=require("path"),BO=xK(),ije=PQ(),oje=zQ(),sje=ZQ(),aje=XZ(),il=tX.exports={},JZ=/[\/\\]/g,uje=function(t,e){var r=[];return BO(t).forEach(function(n){var i=n.indexOf("!")===0;i&&(n=n.slice(1));var o=e(n);i?r=ije(r,o):r=oje(r,o)}),r};il.exists=function(){var t=Jf.join.apply(Jf,arguments);return eX.existsSync(t)};il.expand=function(...t){var e=sje(t[0])?t.shift():{},r=Array.isArray(t[0])?t[0]:t;if(r.length===0)return[];var n=uje(r,function(i){return aje.sync(i,e)});return e.filter&&(n=n.filter(function(i){i=Jf.join(e.cwd||"",i);try{return typeof e.filter=="function"?e.filter(i):eX.statSync(i)[e.filter]()}catch{return!1}})),n};il.expandMapping=function(t,e,r){r=Object.assign({rename:function(o,s){return Jf.join(o||"",s)}},r);var n=[],i={};return il.expand(r,t).forEach(function(o){var s=o;r.flatten&&(s=Jf.basename(s)),r.ext&&(s=s.replace(/(\.[^\/]*)?$/,r.ext));var a=r.rename(e,s,r);r.cwd&&(o=Jf.join(r.cwd,o)),a=a.replace(JZ,"/"),o=o.replace(JZ,"/"),i[a]?i[a].src.push(o):(n.push({src:[o],dest:a}),i[a]=n[n.length-1])}),n};il.normalizeFilesArray=function(t){var e=[];return t.forEach(function(r){var n;("src"in r||"dest"in r)&&e.push(r)}),e.length===0?[]:(e=_(e).chain().forEach(function(r){!("src"in r)||!r.src||(Array.isArray(r.src)?r.src=BO(r.src):r.src=[r.src])}).map(function(r){var n=Object.assign({},r);if(delete n.src,delete n.dest,r.expand)return il.expandMapping(r.src,r.dest,n).map(function(o){var s=Object.assign({},r);return s.orig=Object.assign({},r),s.src=o.src,s.dest=o.dest,["expand","cwd","flatten","rename","ext"].forEach(function(a){delete s[a]}),s});var i=Object.assign({},r);return i.orig=Object.assign({},r),"src"in i&&Object.defineProperty(i,"src",{enumerable:!0,get:function o(){var s;return"result"in o||(s=r.src,s=Array.isArray(s)?BO(s):[s],o.result=il.expand(n,s)),o.result}}),"dest"in i&&(i.dest=r.dest),i}).flatten().value(),e)}});var ed=g((Wat,oX)=>{"use strict";var $O=lT(),nX=require("path"),lje=y_(),cje=Tz(),iX=PT(),fje=uH(),$at=require("stream").Stream,dje=Ju().PassThrough,$n=oX.exports={};$n.file=rX();$n.collectStream=function(t,e){var r=[],n=0;t.on("error",e),t.on("data",function(i){r.push(i),n+=i.length}),t.on("end",function(){var i=Buffer.alloc(n),o=0;r.forEach(function(s){s.copy(i,o),o+=s.length}),e(null,i)})};$n.dateify=function(t){return t=t||new Date,t instanceof Date?t=t:typeof t=="string"?t=new Date(t):t=new Date,t};$n.defaults=function(t,e,r){var n=arguments;return n[0]=n[0]||{},fje(...n)};$n.isStream=function(t){return lje(t)};$n.lazyReadStream=function(t){return new cje.Readable(function(){return $O.createReadStream(t)})};$n.normalizeInputSource=function(t){return t===null?Buffer.alloc(0):typeof t=="string"?Buffer.from(t):$n.isStream(t)?t.pipe(new dje):t};$n.sanitizePath=function(t){return iX(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")};$n.trailingSlashIt=function(t){return t.slice(-1)!=="/"?t+"/":t};$n.unixifyPath=function(t){return iX(t,!1).replace(/^\w+:/,"")};$n.walkdir=function(t,e,r){var n=[];typeof e=="function"&&(r=e,e=t),$O.readdir(t,function(i,o){var s=0,a,u;if(i)return r(i);(function l(){if(a=o[s++],!a)return r(null,n);u=nX.join(t,a),$O.stat(u,function(c,d){n.push({path:u,relative:nX.relative(e,u).replace(/\\/g,"/"),stats:d}),d&&d.isDirectory()?$n.walkdir(u,e,function(h,p){if(h)return r(h);p.forEach(function(b){n.push(b)}),l()}):l()})})()})}});var lX=g((aX,uX)=>{"use strict";var hje=require("util"),pje={ABORTED:"archive was aborted",DIRECTORYDIRPATHREQUIRED:"diretory dirpath argument must be a non-empty string value",DIRECTORYFUNCTIONINVALIDDATA:"invalid data returned by directory custom data function",ENTRYNAMEREQUIRED:"entry name must be a non-empty string value",FILEFILEPATHREQUIRED:"file filepath argument must be a non-empty string value",FINALIZING:"archive already finalizing",QUEUECLOSED:"queue closed",NOENDMETHOD:"no suitable finalize/end method defined by module",DIRECTORYNOTSUPPORTED:"support for directory entries not defined by module",FORMATSET:"archive format already set",INPUTSTEAMBUFFERREQUIRED:"input source must be valid Stream or Buffer instance",MODULESET:"module already set",SYMLINKNOTSUPPORTED:"support for symlink entries not defined by module",SYMLINKFILEPATHREQUIRED:"symlink filepath argument must be a non-empty string value",SYMLINKTARGETREQUIRED:"symlink target argument must be a non-empty string value",ENTRYNOTSUPPORTED:"entry not supported"};function sX(t,e){Error.captureStackTrace(this,this.constructor),this.message=pje[t]||t,this.code=t,this.data=e}hje.inherits(sX,Error);aX=uX.exports=sX});var pX=g((Uat,hX)=>{"use strict";var zO=require("fs"),fX=_W(),cX=(vU(),aie(yU)),WO=require("path"),Ro=ed(),mje=require("util").inherits,Qt=lX(),dX=Ju().Transform,UO=process.platform==="win32",ft=function(t,e){if(!(this instanceof ft))return new ft(t,e);typeof t!="string"&&(e=t,t="zip"),e=this.options=Ro.defaults(e,{highWaterMark:1024*1024,statConcurrency:4}),dX.call(this,e),this._format=!1,this._module=!1,this._pending=0,this._pointer=0,this._entriesCount=0,this._entriesProcessedCount=0,this._fsEntriesTotalBytes=0,this._fsEntriesProcessedBytes=0,this._queue=cX.queue(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=cX.queue(this._onStatQueueTask.bind(this),e.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]};mje(ft,dX);ft.prototype._abort=function(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()};ft.prototype._append=function(t,e){e=e||{};var r={source:null,filepath:t};e.name||(e.name=t),e.sourcePath=t,r.data=e,this._entriesCount++,e.stats&&e.stats instanceof zO.Stats?(r=this._updateQueueTaskWithStats(r,e.stats),r&&(e.stats.size&&(this._fsEntriesTotalBytes+=e.stats.size),this._queue.push(r))):this._statQueue.push(r)};ft.prototype._finalize=function(){this._state.finalizing||this._state.finalized||this._state.aborted||(this._state.finalizing=!0,this._moduleFinalize(),this._state.finalizing=!1,this._state.finalized=!0)};ft.prototype._maybeFinalize=function(){return this._state.finalizing||this._state.finalized||this._state.aborted?!1:this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()?(this._finalize(),!0):!1};ft.prototype._moduleAppend=function(t,e,r){if(this._state.aborted){r();return}this._module.append(t,e,function(n){if(this._task=null,this._state.aborted){this._shutdown();return}if(n){this.emit("error",n),setImmediate(r);return}this.emit("entry",e),this._entriesProcessedCount++,e.stats&&e.stats.size&&(this._fsEntriesProcessedBytes+=e.stats.size),this.emit("progress",{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),setImmediate(r)}.bind(this))};ft.prototype._moduleFinalize=function(){typeof this._module.finalize=="function"?this._module.finalize():typeof this._module.end=="function"?this._module.end():this.emit("error",new Qt("NOENDMETHOD"))};ft.prototype._modulePipe=function(){this._module.on("error",this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0};ft.prototype._moduleSupports=function(t){return!this._module.supports||!this._module.supports[t]?!1:this._module.supports[t]};ft.prototype._moduleUnpipe=function(){this._module.unpipe(this),this._state.modulePiped=!1};ft.prototype._normalizeEntryData=function(t,e){t=Ro.defaults(t,{type:"file",name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1}),e&&t.stats===!1&&(t.stats=e);var r=t.type==="directory";return t.name&&(typeof t.prefix=="string"&&t.prefix!==""&&(t.name=t.prefix+"/"+t.name,t.prefix=null),t.name=Ro.sanitizePath(t.name),t.type!=="symlink"&&t.name.slice(-1)==="/"?(r=!0,t.type="directory"):r&&(t.name+="/")),typeof t.mode=="number"?UO?t.mode&=511:t.mode&=4095:t.stats&&t.mode===null?(UO?t.mode=t.stats.mode&511:t.mode=t.stats.mode&4095,UO&&r&&(t.mode=493)):t.mode===null&&(t.mode=r?493:420),t.stats&&t.date===null?t.date=t.stats.mtime:t.date=Ro.dateify(t.date),t};ft.prototype._onModuleError=function(t){this.emit("error",t)};ft.prototype._onQueueDrain=function(){this._state.finalizing||this._state.finalized||this._state.aborted||this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize()};ft.prototype._onQueueTask=function(t,e){var r=()=>{t.data.callback&&t.data.callback(),e()};if(this._state.finalizing||this._state.finalized||this._state.aborted){r();return}this._task=t,this._moduleAppend(t.source,t.data,r)};ft.prototype._onStatQueueTask=function(t,e){if(this._state.finalizing||this._state.finalized||this._state.aborted){e();return}zO.lstat(t.filepath,function(r,n){if(this._state.aborted){setImmediate(e);return}if(r){this._entriesCount--,this.emit("warning",r),setImmediate(e);return}t=this._updateQueueTaskWithStats(t,n),t&&(n.size&&(this._fsEntriesTotalBytes+=n.size),this._queue.push(t)),setImmediate(e)}.bind(this))};ft.prototype._shutdown=function(){this._moduleUnpipe(),this.end()};ft.prototype._transform=function(t,e,r){t&&(this._pointer+=t.length),r(null,t)};ft.prototype._updateQueueTaskWithStats=function(t,e){if(e.isFile())t.data.type="file",t.data.sourceType="stream",t.source=Ro.lazyReadStream(t.filepath);else if(e.isDirectory()&&this._moduleSupports("directory"))t.data.name=Ro.trailingSlashIt(t.data.name),t.data.type="directory",t.data.sourcePath=Ro.trailingSlashIt(t.filepath),t.data.sourceType="buffer",t.source=Buffer.concat([]);else if(e.isSymbolicLink()&&this._moduleSupports("symlink")){var r=zO.readlinkSync(t.filepath),n=WO.dirname(t.filepath);t.data.type="symlink",t.data.linkname=WO.relative(n,WO.resolve(n,r)),t.data.sourceType="buffer",t.source=Buffer.concat([])}else return e.isDirectory()?this.emit("warning",new Qt("DIRECTORYNOTSUPPORTED",t.data)):e.isSymbolicLink()?this.emit("warning",new Qt("SYMLINKNOTSUPPORTED",t.data)):this.emit("warning",new Qt("ENTRYNOTSUPPORTED",t.data)),null;return t.data=this._normalizeEntryData(t.data,e),t};ft.prototype.abort=function(){return this._state.aborted||this._state.finalized?this:(this._abort(),this)};ft.prototype.append=function(t,e){if(this._state.finalize||this._state.aborted)return this.emit("error",new Qt("QUEUECLOSED")),this;if(e=this._normalizeEntryData(e),typeof e.name!="string"||e.name.length===0)return this.emit("error",new Qt("ENTRYNAMEREQUIRED")),this;if(e.type==="directory"&&!this._moduleSupports("directory"))return this.emit("error",new Qt("DIRECTORYNOTSUPPORTED",{name:e.name})),this;if(t=Ro.normalizeInputSource(t),Buffer.isBuffer(t))e.sourceType="buffer";else if(Ro.isStream(t))e.sourceType="stream";else return this.emit("error",new Qt("INPUTSTEAMBUFFERREQUIRED",{name:e.name})),this;return this._entriesCount++,this._queue.push({data:e,source:t}),this};ft.prototype.directory=function(t,e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new Qt("QUEUECLOSED")),this;if(typeof t!="string"||t.length===0)return this.emit("error",new Qt("DIRECTORYDIRPATHREQUIRED")),this;this._pending++,e===!1?e="":typeof e!="string"&&(e=t);var n=!1;typeof r=="function"?(n=r,r={}):typeof r!="object"&&(r={});var i={stat:!0,dot:!0};function o(){this._pending--,this._maybeFinalize()}function s(l){this.emit("error",l)}function a(l){u.pause();var c=!1,d=Object.assign({},r);d.name=l.relative,d.prefix=e,d.stats=l.stat,d.callback=u.resume.bind(u);try{if(n){if(d=n(d),d===!1)c=!0;else if(typeof d!="object")throw new Qt("DIRECTORYFUNCTIONINVALIDDATA",{dirpath:t})}}catch(h){this.emit("error",h);return}if(c){u.resume();return}this._append(l.absolute,d)}var u=fX(t,i);return u.on("error",s.bind(this)),u.on("match",a.bind(this)),u.on("end",o.bind(this)),this};ft.prototype.file=function(t,e){return this._state.finalize||this._state.aborted?(this.emit("error",new Qt("QUEUECLOSED")),this):typeof t!="string"||t.length===0?(this.emit("error",new Qt("FILEFILEPATHREQUIRED")),this):(this._append(t,e),this)};ft.prototype.glob=function(t,e,r){this._pending++,e=Ro.defaults(e,{stat:!0,pattern:t});function n(){this._pending--,this._maybeFinalize()}function i(a){this.emit("error",a)}function o(a){s.pause();var u=Object.assign({},r);u.callback=s.resume.bind(s),u.stats=a.stat,u.name=a.relative,this._append(a.absolute,u)}var s=fX(e.cwd||".",e);return s.on("error",i.bind(this)),s.on("match",o.bind(this)),s.on("end",n.bind(this)),this};ft.prototype.finalize=function(){if(this._state.aborted){var t=new Qt("ABORTED");return this.emit("error",t),Promise.reject(t)}if(this._state.finalize){var e=new Qt("FINALIZING");return this.emit("error",e),Promise.reject(e)}this._state.finalize=!0,this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var r=this;return new Promise(function(n,i){var o;r._module.on("end",function(){o||n()}),r._module.on("error",function(s){o=!0,i(s)})})};ft.prototype.setFormat=function(t){return this._format?(this.emit("error",new Qt("FORMATSET")),this):(this._format=t,this)};ft.prototype.setModule=function(t){return this._state.aborted?(this.emit("error",new Qt("ABORTED")),this):this._state.module?(this.emit("error",new Qt("MODULESET")),this):(this._module=t,this._modulePipe(),this)};ft.prototype.symlink=function(t,e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new Qt("QUEUECLOSED")),this;if(typeof t!="string"||t.length===0)return this.emit("error",new Qt("SYMLINKFILEPATHREQUIRED")),this;if(typeof e!="string"||e.length===0)return this.emit("error",new Qt("SYMLINKTARGETREQUIRED",{filepath:t})),this;if(!this._moduleSupports("symlink"))return this.emit("error",new Qt("SYMLINKNOTSUPPORTED",{filepath:t})),this;var n={};return n.type="symlink",n.name=t.replace(/\\/g,"/"),n.linkname=e.replace(/\\/g,"/"),n.sourceType="buffer",typeof r=="number"&&(n.mode=r),this._entriesCount++,this._queue.push({data:n,source:Buffer.concat([])}),this};ft.prototype.pointer=function(){return this._pointer};ft.prototype.use=function(t){return this._streams.push(t),this};hX.exports=ft});var J1=g((zat,mX)=>{"use strict";var X1=mX.exports=function(){};X1.prototype.getName=function(){};X1.prototype.getSize=function(){};X1.prototype.getLastModifiedDate=function(){};X1.prototype.isDirectory=function(){}});var ew=g((Vat,gX)=>{"use strict";var Ei=gX.exports={};Ei.dateToDos=function(t,e){e=e||!1;var r=e?t.getFullYear():t.getUTCFullYear();if(r<1980)return 2162688;if(r>=2044)return 2141175677;var n={year:r,month:e?t.getMonth():t.getUTCMonth(),date:e?t.getDate():t.getUTCDate(),hours:e?t.getHours():t.getUTCHours(),minutes:e?t.getMinutes():t.getUTCMinutes(),seconds:e?t.getSeconds():t.getUTCSeconds()};return n.year-1980<<25|n.month+1<<21|n.date<<16|n.hours<<11|n.minutes<<5|n.seconds/2};Ei.dosToDate=function(t){return new Date((t>>25&127)+1980,(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(t&31)<<1)};Ei.fromDosTime=function(t){return Ei.dosToDate(t.readUInt32LE(0))};Ei.getEightBytes=function(t){var e=Buffer.alloc(8);return e.writeUInt32LE(t%4294967296,0),e.writeUInt32LE(t/4294967296|0,4),e};Ei.getShortBytes=function(t){var e=Buffer.alloc(2);return e.writeUInt16LE((t&65535)>>>0,0),e};Ei.getShortBytesValue=function(t,e){return t.readUInt16LE(e)};Ei.getLongBytes=function(t){var e=Buffer.alloc(4);return e.writeUInt32LE((t&4294967295)>>>0,0),e};Ei.getLongBytesValue=function(t,e){return t.readUInt32LE(e)};Ei.toDosTime=function(t){return Ei.getLongBytes(Ei.dateToDos(t))}});var VO=g((Hat,wX)=>{"use strict";var bX=ew(),xX=8,yX=1,gje=4,bje=2,vX=64,_X=2048,Ir=wX.exports=function(){return this instanceof Ir?(this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this):new Ir};Ir.prototype.encode=function(){return bX.getShortBytes((this.descriptor?xX:0)|(this.utf8?_X:0)|(this.encryption?yX:0)|(this.strongEncryption?vX:0))};Ir.prototype.parse=function(t,e){var r=bX.getShortBytesValue(t,e),n=new Ir;return n.useDataDescriptor((r&xX)!==0),n.useUTF8ForNames((r&_X)!==0),n.useStrongEncryption((r&vX)!==0),n.useEncryption((r&yX)!==0),n.setSlidingDictionarySize(r&bje?8192:4096),n.setNumberOfShannonFanoTrees(r&gje?3:2),n};Ir.prototype.setNumberOfShannonFanoTrees=function(t){this.numberOfShannonFanoTrees=t};Ir.prototype.getNumberOfShannonFanoTrees=function(){return this.numberOfShannonFanoTrees};Ir.prototype.setSlidingDictionarySize=function(t){this.slidingDictionarySize=t};Ir.prototype.getSlidingDictionarySize=function(){return this.slidingDictionarySize};Ir.prototype.useDataDescriptor=function(t){this.descriptor=t};Ir.prototype.usesDataDescriptor=function(){return this.descriptor};Ir.prototype.useEncryption=function(t){this.encryption=t};Ir.prototype.usesEncryption=function(){return this.encryption};Ir.prototype.useStrongEncryption=function(t){this.strongEncryption=t};Ir.prototype.usesStrongEncryption=function(){return this.strongEncryption};Ir.prototype.useUTF8ForNames=function(t){this.utf8=t};Ir.prototype.usesUTF8ForNames=function(){return this.utf8}});var SX=g((Gat,EX)=>{"use strict";EX.exports={PERM_MASK:4095,FILE_TYPE_FLAG:61440,LINK_FLAG:40960,FILE_FLAG:32768,DIR_FLAG:16384,DEFAULT_LINK_PERM:511,DEFAULT_DIR_PERM:493,DEFAULT_FILE_PERM:420}});var HO=g((Yat,DX)=>{"use strict";DX.exports={WORD:4,DWORD:8,EMPTY:Buffer.alloc(0),SHORT:2,SHORT_MASK:65535,SHORT_SHIFT:16,SHORT_ZERO:Buffer.from(Array(2)),LONG:4,LONG_ZERO:Buffer.from(Array(4)),MIN_VERSION_INITIAL:10,MIN_VERSION_DATA_DESCRIPTOR:20,MIN_VERSION_ZIP64:45,VERSION_MADEBY:45,METHOD_STORED:0,METHOD_DEFLATED:8,PLATFORM_UNIX:3,PLATFORM_FAT:0,SIG_LFH:67324752,SIG_DD:134695760,SIG_CFH:33639248,SIG_EOCD:101010256,SIG_ZIP64_EOCD:101075792,SIG_ZIP64_EOCD_LOC:117853008,ZIP64_MAGIC_SHORT:65535,ZIP64_MAGIC:4294967295,ZIP64_EXTRA_ID:1,ZLIB_NO_COMPRESSION:0,ZLIB_BEST_SPEED:1,ZLIB_BEST_COMPRESSION:9,ZLIB_DEFAULT_COMPRESSION:-1,MODE_MASK:4095,DEFAULT_FILE_MODE:33188,DEFAULT_DIR_MODE:16877,EXT_FILE_ATTR_DIR:1106051088,EXT_FILE_ATTR_FILE:2175008800,S_IFMT:61440,S_IFIFO:4096,S_IFCHR:8192,S_IFDIR:16384,S_IFBLK:24576,S_IFREG:32768,S_IFLNK:40960,S_IFSOCK:49152,S_DOS_A:32,S_DOS_D:16,S_DOS_V:8,S_DOS_S:4,S_DOS_H:2,S_DOS_R:1}});var GO=g((Kat,OX)=>{"use strict";var xje=require("util").inherits,yje=PT(),kX=J1(),TX=VO(),CX=SX(),un=HO(),AX=ew(),Ze=OX.exports=function(t){if(!(this instanceof Ze))return new Ze(t);kX.call(this),this.platform=un.PLATFORM_FAT,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new TX,this.crc=0,this.time=-1,this.minver=un.MIN_VERSION_INITIAL,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,t&&this.setName(t)};xje(Ze,kX);Ze.prototype.getCentralDirectoryExtra=function(){return this.getExtra()};Ze.prototype.getComment=function(){return this.comment!==null?this.comment:""};Ze.prototype.getCompressedSize=function(){return this.csize};Ze.prototype.getCrc=function(){return this.crc};Ze.prototype.getExternalAttributes=function(){return this.exattr};Ze.prototype.getExtra=function(){return this.extra!==null?this.extra:un.EMPTY};Ze.prototype.getGeneralPurposeBit=function(){return this.gpb};Ze.prototype.getInternalAttributes=function(){return this.inattr};Ze.prototype.getLastModifiedDate=function(){return this.getTime()};Ze.prototype.getLocalFileDataExtra=function(){return this.getExtra()};Ze.prototype.getMethod=function(){return this.method};Ze.prototype.getName=function(){return this.name};Ze.prototype.getPlatform=function(){return this.platform};Ze.prototype.getSize=function(){return this.size};Ze.prototype.getTime=function(){return this.time!==-1?AX.dosToDate(this.time):-1};Ze.prototype.getTimeDos=function(){return this.time!==-1?this.time:0};Ze.prototype.getUnixMode=function(){return this.platform!==un.PLATFORM_UNIX?0:this.getExternalAttributes()>>un.SHORT_SHIFT&un.SHORT_MASK};Ze.prototype.getVersionNeededToExtract=function(){return this.minver};Ze.prototype.setComment=function(t){Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.comment=t};Ze.prototype.setCompressedSize=function(t){if(t<0)throw new Error("invalid entry compressed size");this.csize=t};Ze.prototype.setCrc=function(t){if(t<0)throw new Error("invalid entry crc32");this.crc=t};Ze.prototype.setExternalAttributes=function(t){this.exattr=t>>>0};Ze.prototype.setExtra=function(t){this.extra=t};Ze.prototype.setGeneralPurposeBit=function(t){if(!(t instanceof TX))throw new Error("invalid entry GeneralPurposeBit");this.gpb=t};Ze.prototype.setInternalAttributes=function(t){this.inattr=t};Ze.prototype.setMethod=function(t){if(t<0)throw new Error("invalid entry compression method");this.method=t};Ze.prototype.setName=function(t,e=!1){t=yje(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,""),e&&(t=`/${t}`),Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.name=t};Ze.prototype.setPlatform=function(t){this.platform=t};Ze.prototype.setSize=function(t){if(t<0)throw new Error("invalid entry size");this.size=t};Ze.prototype.setTime=function(t,e){if(!(t instanceof Date))throw new Error("invalid entry time");this.time=AX.dateToDos(t,e)};Ze.prototype.setUnixMode=function(t){t|=this.isDirectory()?un.S_IFDIR:un.S_IFREG;var e=0;e|=t<<un.SHORT_SHIFT|(this.isDirectory()?un.S_DOS_D:un.S_DOS_A),this.setExternalAttributes(e),this.mode=t&un.MODE_MASK,this.platform=un.PLATFORM_UNIX};Ze.prototype.setVersionNeededToExtract=function(t){this.minver=t};Ze.prototype.isDirectory=function(){return this.getName().slice(-1)==="/"};Ze.prototype.isUnixSymlink=function(){return(this.getUnixMode()&CX.FILE_TYPE_FLAG)===CX.LINK_FLAG};Ze.prototype.isZip64=function(){return this.csize>un.ZIP64_MAGIC||this.size>un.ZIP64_MAGIC}});var YO=g((Zat,RX)=>{"use strict";var Qat=require("stream").Stream,vje=Ju().PassThrough,_je=y_(),wje=RX.exports={};wje.normalizeInputSource=function(t){if(t===null)return Buffer.alloc(0);if(typeof t=="string")return Buffer.from(t);if(_je(t)&&!t._readableState){var e=new vje;return t.pipe(e),e}return t}});var QO=g((Xat,FX)=>{"use strict";var Eje=require("util").inherits,Sje=y_(),KO=Ju().Transform,Dje=J1(),Cje=YO(),Wn=FX.exports=function(t){if(!(this instanceof Wn))return new Wn(t);KO.call(this,t),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}};Eje(Wn,KO);Wn.prototype._appendBuffer=function(t,e,r){};Wn.prototype._appendStream=function(t,e,r){};Wn.prototype._emitErrorCallback=function(t){t&&this.emit("error",t)};Wn.prototype._finish=function(t){};Wn.prototype._normalizeEntry=function(t){};Wn.prototype._transform=function(t,e,r){r(null,t)};Wn.prototype.entry=function(t,e,r){if(e=e||null,typeof r!="function"&&(r=this._emitErrorCallback.bind(this)),!(t instanceof Dje)){r(new Error("not a valid instance of ArchiveEntry"));return}if(this._archive.finish||this._archive.finished){r(new Error("unacceptable entry after finish"));return}if(this._archive.processing){r(new Error("already processing an entry"));return}if(this._archive.processing=!0,this._normalizeEntry(t),this._entry=t,e=Cje.normalizeInputSource(e),Buffer.isBuffer(e))this._appendBuffer(t,e,r);else if(Sje(e))this._appendStream(t,e,r);else{this._archive.processing=!1,r(new Error("input source must be valid Stream or Buffer instance"));return}return this};Wn.prototype.finish=function(){if(this._archive.processing){this._archive.finish=!0;return}this._finish()};Wn.prototype.getBytesWritten=function(){return this.offset};Wn.prototype.write=function(t,e){return t&&(this.offset+=t.length),KO.prototype.write.call(this,t,e)}});var tw=g(ZO=>{"use strict";var PX;(function(t){typeof DO_NOT_EXPORT_CRC>"u"?typeof ZO=="object"?t(ZO):typeof define=="function"&&define.amd?define(function(){var e={};return t(e),e}):t(PX={}):t(PX={})})(function(t){t.version="1.2.2";function e(){for(var R=0,H=new Array(256),q=0;q!=256;++q)R=q,R=R&1?-306674912^R>>>1:R>>>1,R=R&1?-306674912^R>>>1:R>>>1,R=R&1?-306674912^R>>>1:R>>>1,R=R&1?-306674912^R>>>1:R>>>1,R=R&1?-306674912^R>>>1:R>>>1,R=R&1?-306674912^R>>>1:R>>>1,R=R&1?-306674912^R>>>1:R>>>1,R=R&1?-306674912^R>>>1:R>>>1,H[q]=R;return typeof Int32Array<"u"?new Int32Array(H):H}var r=e();function n(R){var H=0,q=0,K=0,z=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(K=0;K!=256;++K)z[K]=R[K];for(K=0;K!=256;++K)for(q=R[K],H=256+K;H<4096;H+=256)q=z[H]=q>>>8^R[q&255];var L=[];for(K=1;K!=16;++K)L[K-1]=typeof Int32Array<"u"?z.subarray(K*256,K*256+256):z.slice(K*256,K*256+256);return L}var i=n(r),o=i[0],s=i[1],a=i[2],u=i[3],l=i[4],c=i[5],d=i[6],h=i[7],p=i[8],b=i[9],x=i[10],D=i[11],v=i[12],E=i[13],y=i[14];function k(R,H){for(var q=H^-1,K=0,z=R.length;K<z;)q=q>>>8^r[(q^R.charCodeAt(K++))&255];return~q}function O(R,H){for(var q=H^-1,K=R.length-15,z=0;z<K;)q=y[R[z++]^q&255]^E[R[z++]^q>>8&255]^v[R[z++]^q>>16&255]^D[R[z++]^q>>>24]^x[R[z++]]^b[R[z++]]^p[R[z++]]^h[R[z++]]^d[R[z++]]^c[R[z++]]^l[R[z++]]^u[R[z++]]^a[R[z++]]^s[R[z++]]^o[R[z++]]^r[R[z++]];for(K+=15;z<K;)q=q>>>8^r[(q^R[z++])&255];return~q}function A(R,H){for(var q=H^-1,K=0,z=R.length,L=0,U=0;K<z;)L=R.charCodeAt(K++),L<128?q=q>>>8^r[(q^L)&255]:L<2048?(q=q>>>8^r[(q^(192|L>>6&31))&255],q=q>>>8^r[(q^(128|L&63))&255]):L>=55296&&L<57344?(L=(L&1023)+64,U=R.charCodeAt(K++)&1023,q=q>>>8^r[(q^(240|L>>8&7))&255],q=q>>>8^r[(q^(128|L>>2&63))&255],q=q>>>8^r[(q^(128|U>>6&15|(L&3)<<4))&255],q=q>>>8^r[(q^(128|U&63))&255]):(q=q>>>8^r[(q^(224|L>>12&15))&255],q=q>>>8^r[(q^(128|L>>6&63))&255],q=q>>>8^r[(q^(128|L&63))&255]);return~q}t.table=r,t.bstr=k,t.buf=O,t.str=A})});var IX=g((eut,qX)=>{"use strict";var{Transform:kje}=Ju(),Tje=tw(),XO=class extends kje{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(e,r,n){e&&(this.checksum=Tje.buf(e,this.checksum)>>>0,this.rawSize+=e.length),n(null,e)}digest(e){let r=Buffer.allocUnsafe(4);return r.writeUInt32BE(this.checksum>>>0,0),e?r.toString(e):r}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}};qX.exports=XO});var MX=g((tut,jX)=>{"use strict";var{DeflateRaw:Aje}=require("zlib"),Oje=tw(),JO=class extends Aje{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(e,r){return e&&(this.compressedSize+=e.length),super.push(e,r)}_transform(e,r,n){e&&(this.checksum=Oje.buf(e,this.checksum)>>>0,this.rawSize+=e.length),super._transform(e,r,n)}digest(e){let r=Buffer.allocUnsafe(4);return r.writeUInt32BE(this.checksum>>>0,0),e?r.toString(e):r}hex(){return this.digest("hex").toUpperCase()}size(e=!1){return e?this.compressedSize:this.rawSize}};jX.exports=JO});var eR=g((rut,LX)=>{"use strict";LX.exports={CRC32Stream:IX(),DeflateCRC32Stream:MX()}});var $X=g((sut,BX)=>{"use strict";var Rje=require("util").inherits,Fje=tw(),{CRC32Stream:Pje}=eR(),{DeflateCRC32Stream:qje}=eR(),NX=QO(),nut=GO(),iut=VO(),ze=HO(),out=YO(),Ce=ew(),wr=BX.exports=function(t){if(!(this instanceof wr))return new wr(t);t=this.options=this._defaults(t),NX.call(this,t),this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:"",finish:!1,finished:!1,processing:!1,forceZip64:t.forceZip64,forceLocalTime:t.forceLocalTime}};Rje(wr,NX);wr.prototype._afterAppend=function(t){this._entries.push(t),t.getGeneralPurposeBit().usesDataDescriptor()&&this._writeDataDescriptor(t),this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished&&this._finish()};wr.prototype._appendBuffer=function(t,e,r){e.length===0&&t.setMethod(ze.METHOD_STORED);var n=t.getMethod();if(n===ze.METHOD_STORED&&(t.setSize(e.length),t.setCompressedSize(e.length),t.setCrc(Fje.buf(e)>>>0)),this._writeLocalFileHeader(t),n===ze.METHOD_STORED){this.write(e),this._afterAppend(t),r(null,t);return}else if(n===ze.METHOD_DEFLATED){this._smartStream(t,r).end(e);return}else{r(new Error("compression method "+n+" not implemented"));return}};wr.prototype._appendStream=function(t,e,r){t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(ze.MIN_VERSION_DATA_DESCRIPTOR),this._writeLocalFileHeader(t);var n=this._smartStream(t,r);e.once("error",function(i){n.emit("error",i),n.end()}),e.pipe(n)};wr.prototype._defaults=function(t){return typeof t!="object"&&(t={}),typeof t.zlib!="object"&&(t.zlib={}),typeof t.zlib.level!="number"&&(t.zlib.level=ze.ZLIB_BEST_SPEED),t.forceZip64=!!t.forceZip64,t.forceLocalTime=!!t.forceLocalTime,t};wr.prototype._finish=function(){this._archive.centralOffset=this.offset,this._entries.forEach(function(t){this._writeCentralFileHeader(t)}.bind(this)),this._archive.centralLength=this.offset-this._archive.centralOffset,this.isZip64()&&this._writeCentralDirectoryZip64(),this._writeCentralDirectoryEnd(),this._archive.processing=!1,this._archive.finish=!0,this._archive.finished=!0,this.end()};wr.prototype._normalizeEntry=function(t){t.getMethod()===-1&&t.setMethod(ze.METHOD_DEFLATED),t.getMethod()===ze.METHOD_DEFLATED&&(t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(ze.MIN_VERSION_DATA_DESCRIPTOR)),t.getTime()===-1&&t.setTime(new Date,this._archive.forceLocalTime),t._offsets={file:0,data:0,contents:0}};wr.prototype._smartStream=function(t,e){var r=t.getMethod()===ze.METHOD_DEFLATED,n=r?new qje(this.options.zlib):new Pje,i=null;function o(){var s=n.digest().readUInt32BE(0);t.setCrc(s),t.setSize(n.size()),t.setCompressedSize(n.size(!0)),this._afterAppend(t),e(i,t)}return n.once("end",o.bind(this)),n.once("error",function(s){i=s}),n.pipe(this,{end:!1}),n};wr.prototype._writeCentralDirectoryEnd=function(){var t=this._entries.length,e=this._archive.centralLength,r=this._archive.centralOffset;this.isZip64()&&(t=ze.ZIP64_MAGIC_SHORT,e=ze.ZIP64_MAGIC,r=ze.ZIP64_MAGIC),this.write(Ce.getLongBytes(ze.SIG_EOCD)),this.write(ze.SHORT_ZERO),this.write(ze.SHORT_ZERO),this.write(Ce.getShortBytes(t)),this.write(Ce.getShortBytes(t)),this.write(Ce.getLongBytes(e)),this.write(Ce.getLongBytes(r));var n=this.getComment(),i=Buffer.byteLength(n);this.write(Ce.getShortBytes(i)),this.write(n)};wr.prototype._writeCentralDirectoryZip64=function(){this.write(Ce.getLongBytes(ze.SIG_ZIP64_EOCD)),this.write(Ce.getEightBytes(44)),this.write(Ce.getShortBytes(ze.MIN_VERSION_ZIP64)),this.write(Ce.getShortBytes(ze.MIN_VERSION_ZIP64)),this.write(ze.LONG_ZERO),this.write(ze.LONG_ZERO),this.write(Ce.getEightBytes(this._entries.length)),this.write(Ce.getEightBytes(this._entries.length)),this.write(Ce.getEightBytes(this._archive.centralLength)),this.write(Ce.getEightBytes(this._archive.centralOffset)),this.write(Ce.getLongBytes(ze.SIG_ZIP64_EOCD_LOC)),this.write(ze.LONG_ZERO),this.write(Ce.getEightBytes(this._archive.centralOffset+this._archive.centralLength)),this.write(Ce.getLongBytes(1))};wr.prototype._writeCentralFileHeader=function(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),n=t._offsets.file,i=t.getSize(),o=t.getCompressedSize();if(t.isZip64()||n>ze.ZIP64_MAGIC){i=ze.ZIP64_MAGIC,o=ze.ZIP64_MAGIC,n=ze.ZIP64_MAGIC,t.setVersionNeededToExtract(ze.MIN_VERSION_ZIP64);var s=Buffer.concat([Ce.getShortBytes(ze.ZIP64_EXTRA_ID),Ce.getShortBytes(24),Ce.getEightBytes(t.getSize()),Ce.getEightBytes(t.getCompressedSize()),Ce.getEightBytes(t._offsets.file)],28);t.setExtra(s)}this.write(Ce.getLongBytes(ze.SIG_CFH)),this.write(Ce.getShortBytes(t.getPlatform()<<8|ze.VERSION_MADEBY)),this.write(Ce.getShortBytes(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(Ce.getShortBytes(r)),this.write(Ce.getLongBytes(t.getTimeDos())),this.write(Ce.getLongBytes(t.getCrc())),this.write(Ce.getLongBytes(o)),this.write(Ce.getLongBytes(i));var a=t.getName(),u=t.getComment(),l=t.getCentralDirectoryExtra();e.usesUTF8ForNames()&&(a=Buffer.from(a),u=Buffer.from(u)),this.write(Ce.getShortBytes(a.length)),this.write(Ce.getShortBytes(l.length)),this.write(Ce.getShortBytes(u.length)),this.write(ze.SHORT_ZERO),this.write(Ce.getShortBytes(t.getInternalAttributes())),this.write(Ce.getLongBytes(t.getExternalAttributes())),this.write(Ce.getLongBytes(n)),this.write(a),this.write(l),this.write(u)};wr.prototype._writeDataDescriptor=function(t){this.write(Ce.getLongBytes(ze.SIG_DD)),this.write(Ce.getLongBytes(t.getCrc())),t.isZip64()?(this.write(Ce.getEightBytes(t.getCompressedSize())),this.write(Ce.getEightBytes(t.getSize()))):(this.write(Ce.getLongBytes(t.getCompressedSize())),this.write(Ce.getLongBytes(t.getSize())))};wr.prototype._writeLocalFileHeader=function(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),n=t.getName(),i=t.getLocalFileDataExtra();t.isZip64()&&(e.useDataDescriptor(!0),t.setVersionNeededToExtract(ze.MIN_VERSION_ZIP64)),e.usesUTF8ForNames()&&(n=Buffer.from(n)),t._offsets.file=this.offset,this.write(Ce.getLongBytes(ze.SIG_LFH)),this.write(Ce.getShortBytes(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(Ce.getShortBytes(r)),this.write(Ce.getLongBytes(t.getTimeDos())),t._offsets.data=this.offset,e.usesDataDescriptor()?(this.write(ze.LONG_ZERO),this.write(ze.LONG_ZERO),this.write(ze.LONG_ZERO)):(this.write(Ce.getLongBytes(t.getCrc())),this.write(Ce.getLongBytes(t.getCompressedSize())),this.write(Ce.getLongBytes(t.getSize()))),this.write(Ce.getShortBytes(n.length)),this.write(Ce.getShortBytes(i.length)),this.write(n),this.write(i),t._offsets.contents=this.offset};wr.prototype.getComment=function(t){return this._archive.comment!==null?this._archive.comment:""};wr.prototype.isZip64=function(){return this._archive.forceZip64||this._entries.length>ze.ZIP64_MAGIC_SHORT||this._archive.centralLength>ze.ZIP64_MAGIC||this._archive.centralOffset>ze.ZIP64_MAGIC};wr.prototype.setComment=function(t){this._archive.comment=t}});var tR=g((aut,WX)=>{"use strict";WX.exports={ArchiveEntry:J1(),ZipArchiveEntry:GO(),ArchiveOutputStream:QO(),ZipArchiveOutputStream:$X()}});var zX=g((uut,UX)=>{"use strict";var Ije=require("util").inherits,nR=tR().ZipArchiveOutputStream,jje=tR().ZipArchiveEntry,rR=ed(),td=UX.exports=function(t){if(!(this instanceof td))return new td(t);t=this.options=t||{},t.zlib=t.zlib||{},nR.call(this,t),typeof t.level=="number"&&t.level>=0&&(t.zlib.level=t.level,delete t.level),!t.forceZip64&&typeof t.zlib.level=="number"&&t.zlib.level===0&&(t.store=!0),t.namePrependSlash=t.namePrependSlash||!1,t.comment&&t.comment.length>0&&this.setComment(t.comment)};Ije(td,nR);td.prototype._normalizeFileData=function(t){t=rR.defaults(t,{type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:""});var e=t.type==="directory",r=t.type==="symlink";return t.name&&(t.name=rR.sanitizePath(t.name),!r&&t.name.slice(-1)==="/"?(e=!0,t.type="directory"):e&&(t.name+="/")),(e||r)&&(t.store=!0),t.date=rR.dateify(t.date),t};td.prototype.entry=function(t,e,r){if(typeof r!="function"&&(r=this._emitErrorCallback.bind(this)),e=this._normalizeFileData(e),e.type!=="file"&&e.type!=="directory"&&e.type!=="symlink"){r(new Error(e.type+" entries not currently supported"));return}if(typeof e.name!="string"||e.name.length===0){r(new Error("entry name must be a non-empty string value"));return}if(e.type==="symlink"&&typeof e.linkname!="string"){r(new Error("entry linkname must be a non-empty string value when type equals symlink"));return}var n=new jje(e.name);return n.setTime(e.date,this.options.forceLocalTime),e.namePrependSlash&&n.setName(e.name,!0),e.store&&n.setMethod(0),e.comment.length>0&&n.setComment(e.comment),e.type==="symlink"&&typeof e.mode!="number"&&(e.mode=40960),typeof e.mode=="number"&&(e.type==="symlink"&&(e.mode|=40960),n.setUnixMode(e.mode)),e.type==="symlink"&&typeof e.linkname=="string"&&(t=Buffer.from(e.linkname)),nR.prototype.entry.call(this,n,t,r)};td.prototype.finalize=function(){this.finish()}});var HX=g((lut,VX)=>{"use strict";var Mje=zX(),Lje=ed(),Ia=function(t){if(!(this instanceof Ia))return new Ia(t);t=this.options=Lje.defaults(t,{comment:"",forceUTC:!1,namePrependSlash:!1,store:!1}),this.supports={directory:!0,symlink:!0},this.engine=new Mje(t)};Ia.prototype.append=function(t,e,r){this.engine.entry(t,e,r)};Ia.prototype.finalize=function(){this.engine.finalize()};Ia.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)};Ia.prototype.pipe=function(){return this.engine.pipe.apply(this.engine,arguments)};Ia.prototype.unpipe=function(){return this.engine.unpipe.apply(this.engine,arguments)};VX.exports=Ia});var YX=g((cut,GX)=>{"use strict";GX.exports=typeof queueMicrotask=="function"?queueMicrotask:t=>Promise.resolve().then(t)});var QX=g((fut,KX)=>{"use strict";KX.exports=typeof process<"u"&&typeof process.nextTick=="function"?process.nextTick.bind(process):YX()});var XX=g((hut,ZX)=>{"use strict";ZX.exports=class{constructor(e){if(!(e>0)||e-1&e)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(e),this.mask=e-1,this.top=0,this.btm=0,this.next=null}clear(){this.top=this.btm=0,this.next=null,this.buffer.fill(void 0)}push(e){return this.buffer[this.top]!==void 0?!1:(this.buffer[this.top]=e,this.top=this.top+1&this.mask,!0)}shift(){let e=this.buffer[this.btm];if(e!==void 0)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,e}peek(){return this.buffer[this.btm]}isEmpty(){return this.buffer[this.btm]===void 0}}});var iR=g((mut,eJ)=>{"use strict";var JX=XX();eJ.exports=class{constructor(e){this.hwm=e||16,this.head=new JX(this.hwm),this.tail=this.head,this.length=0}clear(){this.head=this.tail,this.head.clear(),this.length=0}push(e){if(this.length++,!this.head.push(e)){let r=this.head;this.head=r.next=new JX(2*this.head.buffer.length),this.head.push(e)}}shift(){this.length!==0&&this.length--;let e=this.tail.shift();if(e===void 0&&this.tail.next){let r=this.tail.next;return this.tail.next=null,this.tail=r,this.tail.shift()}return e}peek(){let e=this.tail.peek();return e===void 0&&this.tail.next?this.tail.next.peek():e}isEmpty(){return this.length===0}}});var rJ=g((but,tJ)=>{"use strict";tJ.exports=class{constructor(e){this.encoding=e}get remaining(){return 0}decode(e){return e.toString(this.encoding)}flush(){return""}}});var iJ=g((yut,nJ)=>{"use strict";nJ.exports=class{constructor(){this.codePoint=0,this.bytesSeen=0,this.bytesNeeded=0,this.lowerBoundary=128,this.upperBoundary=191}get remaining(){return this.bytesSeen}decode(e){if(this.bytesNeeded===0){let n=!0;for(let i=Math.max(0,e.byteLength-4),o=e.byteLength;i<o&&n;i++)n=e[i]<=127;if(n)return e.toString()}let r="";for(let n=0,i=e.byteLength;n<i;n++){let o=e[n];if(this.bytesNeeded===0){o<=127?r+=String.fromCharCode(o):(this.bytesSeen=1,o>=194&&o<=223?(this.bytesNeeded=2,this.codePoint=o&31):o>=224&&o<=239?(o===224?this.lowerBoundary=160:o===237&&(this.upperBoundary=159),this.bytesNeeded=3,this.codePoint=o&15):o>=240&&o<=244?(o===240&&(this.lowerBoundary=144),o===244&&(this.upperBoundary=143),this.bytesNeeded=4,this.codePoint=o&7):r+="\uFFFD");continue}if(o<this.lowerBoundary||o>this.upperBoundary){this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191,r+="\uFFFD";continue}this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|o&63,this.bytesSeen++,this.bytesSeen===this.bytesNeeded&&(r+=String.fromCodePoint(this.codePoint),this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0)}return r}flush(){let e=this.bytesNeeded>0?"\uFFFD":"";return this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191,e}}});var sJ=g((_ut,oJ)=>{"use strict";var Nje=rJ(),Bje=iJ();oJ.exports=class{constructor(e="utf8"){switch(this.encoding=$je(e),this.encoding){case"utf8":this.decoder=new Bje;break;case"utf16le":case"base64":throw new Error("Unsupported encoding: "+this.encoding);default:this.decoder=new Nje(this.encoding)}}get remaining(){return this.decoder.remaining}push(e){return typeof e=="string"?e:this.decoder.decode(e)}write(e){return this.push(e)}end(e){let r="";return e&&(r=this.push(e)),r+=this.decoder.flush(),r}};function $je(t){switch(t=t.toLowerCase(),t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:throw new Error("Unknown encoding: "+t)}}});var vR=g((wut,RJ)=>{"use strict";var{EventEmitter:Wje}=require("events"),aw=new Error("Stream was destroyed"),oR=new Error("Premature close"),dJ=QX(),hJ=iR(),Uje=sJ(),Ht=(1<<29)-1,ll=1,dR=2,ol=4,t0=8,pJ=Ht^ll,zje=Ht^dR,a0=16,r0=32,sd=64,ja=128,u0=256,hR=512,sl=1024,sR=2048,pR=4096,mR=8192,Yi=16384,rd=32768,uw=65536,al=131072,mJ=u0|hR,Vje=a0|uw,Hje=sd|a0,Gje=pR|ja,gR=u0|al,Yje=Ht^a0,Kje=Ht^sd,Qje=Ht^(sd|uw),aJ=Ht^uw,Zje=Ht^u0,Xje=Ht^(ja|mR),Jje=Ht^sl,uJ=Ht^mJ,gJ=Ht^rd,eMe=Ht^r0,bJ=Ht^al,tMe=Ht^gR,Ma=1<<18,id=2<<18,l0=4<<18,ul=8<<18,c0=16<<18,cl=32<<18,aR=64<<18,nd=128<<18,bR=256<<18,od=512<<18,lw=1024<<18,xJ=Ht^(Ma|bR),yJ=Ht^l0,rMe=Ht^od,nMe=Ht^c0,iMe=Ht^ul,vJ=Ht^nd,oMe=Ht^id,_J=Ht^lw,n0=a0|Ma,wJ=Ht^n0,xR=Yi|cl,fs=ol|t0|dR,Un=fs|ll,EJ=fs|xR,sMe=yJ&Kje,yR=nd|rd,aMe=yR&wJ,SJ=Un|aMe,uMe=Un|sl|Yi,lJ=Un|Yi|ja,lMe=Un|sl|ja,cMe=Un|pR|ja|mR,fMe=Un|a0|sl|Yi|uw|al,dMe=fs|sl|Yi,hMe=r0|Un|rd|sd,pMe=Un|od|cl,mMe=ul|c0,DJ=ul|Ma,gMe=ul|c0|Un|Ma,cJ=Un|Ma|ul|lw,bMe=l0|Ma,xMe=Ma|bR,yMe=Un|od|DJ|cl,vMe=c0|fs|od|cl,_Me=id|Un|nd|l0,rw=Symbol.asyncIterator||Symbol("asyncIterator"),nw=class{constructor(e,{highWaterMark:r=16384,map:n=null,mapWritable:i,byteLength:o,byteLengthWritable:s}={}){this.stream=e,this.queue=new hJ,this.highWaterMark=r,this.buffered=0,this.error=null,this.pipeline=null,this.drains=null,this.byteLength=s||o||OJ,this.map=i||n,this.afterWrite=SMe.bind(this),this.afterUpdateNextTick=kMe.bind(this)}get ended(){return(this.stream._duplexState&cl)!==0}push(e){return this.map!==null&&(e=this.map(e)),this.buffered+=this.byteLength(e),this.queue.push(e),this.buffered<this.highWaterMark?(this.stream._duplexState|=ul,!0):(this.stream._duplexState|=mMe,!1)}shift(){let e=this.queue.shift();return this.buffered-=this.byteLength(e),this.buffered===0&&(this.stream._duplexState&=iMe),e}end(e){typeof e=="function"?this.stream.once("finish",e):e!=null&&this.push(e),this.stream._duplexState=(this.stream._duplexState|od)&yJ}autoBatch(e,r){let n=[],i=this.stream;for(n.push(e);(i._duplexState&cJ)===DJ;)n.push(i._writableState.shift());if(i._duplexState&Un)return r(null);i._writev(n,r)}update(){let e=this.stream;e._duplexState|=id;do{for(;(e._duplexState&cJ)===ul;){let r=this.shift();e._duplexState|=xMe,e._write(r,this.afterWrite)}e._duplexState&bMe||this.updateNonPrimary()}while(this.continueUpdate()===!0);e._duplexState&=oMe}updateNonPrimary(){let e=this.stream;if((e._duplexState&yMe)===od){e._duplexState=(e._duplexState|Ma)&rMe,e._final(EMe.bind(this));return}if((e._duplexState&fs)===ol){e._duplexState&yR||(e._duplexState|=n0,e._destroy(CJ.bind(this)));return}(e._duplexState&SJ)===ll&&(e._duplexState=(e._duplexState|n0)&pJ,e._open(kJ.bind(this)))}continueUpdate(){return this.stream._duplexState&nd?(this.stream._duplexState&=vJ,!0):!1}updateCallback(){(this.stream._duplexState&_Me)===l0?this.update():this.updateNextTick()}updateNextTick(){this.stream._duplexState&nd||(this.stream._duplexState|=nd,this.stream._duplexState&id||dJ(this.afterUpdateNextTick))}},uR=class{constructor(e,{highWaterMark:r=16384,map:n=null,mapReadable:i,byteLength:o,byteLengthReadable:s}={}){this.stream=e,this.queue=new hJ,this.highWaterMark=r===0?1:r,this.buffered=0,this.readAhead=r>0,this.error=null,this.pipeline=null,this.byteLength=s||o||OJ,this.map=i||n,this.pipeTo=null,this.afterRead=DMe.bind(this),this.afterUpdateNextTick=CMe.bind(this)}get ended(){return(this.stream._duplexState&Yi)!==0}pipe(e,r){if(this.pipeTo!==null)throw new Error("Can only pipe to one destination");if(typeof r!="function"&&(r=null),this.stream._duplexState|=hR,this.pipeTo=e,this.pipeline=new cR(this.stream,e,r),r&&this.stream.on("error",fJ),s0(e))e._writableState.pipeline=this.pipeline,r&&e.on("error",fJ),e.on("finish",this.pipeline.finished.bind(this.pipeline));else{let n=this.pipeline.done.bind(this.pipeline,e),i=this.pipeline.done.bind(this.pipeline,e,null);e.on("error",n),e.on("close",i),e.on("finish",this.pipeline.finished.bind(this.pipeline))}e.on("drain",wMe.bind(this)),this.stream.emit("piping",e),e.emit("pipe",this.stream)}push(e){let r=this.stream;return e===null?(this.highWaterMark=0,r._duplexState=(r._duplexState|sl)&Qje,!1):this.map!==null&&(e=this.map(e),e===null)?(r._duplexState&=aJ,this.buffered<this.highWaterMark):(this.buffered+=this.byteLength(e),this.queue.push(e),r._duplexState=(r._duplexState|ja)&aJ,this.buffered<this.highWaterMark)}shift(){let e=this.queue.shift();return this.buffered-=this.byteLength(e),this.buffered===0&&(this.stream._duplexState&=Xje),e}unshift(e){let r=[this.map!==null?this.map(e):e];for(;this.buffered>0;)r.push(this.shift());for(let n=0;n<r.length-1;n++){let i=r[n];this.buffered+=this.byteLength(i),this.queue.push(i)}this.push(r[r.length-1])}read(){let e=this.stream;if((e._duplexState&lJ)===ja){let r=this.shift();return this.pipeTo!==null&&this.pipeTo.write(r)===!1&&(e._duplexState&=uJ),e._duplexState&sR&&e.emit("data",r),r}return this.readAhead===!1&&(e._duplexState|=al,this.updateNextTick()),null}drain(){let e=this.stream;for(;(e._duplexState&lJ)===ja&&e._duplexState&mJ;){let r=this.shift();this.pipeTo!==null&&this.pipeTo.write(r)===!1&&(e._duplexState&=uJ),e._duplexState&sR&&e.emit("data",r)}}update(){let e=this.stream;e._duplexState|=r0;do{for(this.drain();this.buffered<this.highWaterMark&&(e._duplexState&fMe)===al;)e._duplexState|=Vje,e._read(this.afterRead),this.drain();(e._duplexState&cMe)===Gje&&(e._duplexState|=mR,e.emit("readable")),e._duplexState&Hje||this.updateNonPrimary()}while(this.continueUpdate()===!0);e._duplexState&=eMe}updateNonPrimary(){let e=this.stream;if((e._duplexState&lMe)===sl&&(e._duplexState=(e._duplexState|Yi)&Jje,e.emit("end"),(e._duplexState&EJ)===xR&&(e._duplexState|=ol),this.pipeTo!==null&&this.pipeTo.end()),(e._duplexState&fs)===ol){e._duplexState&yR||(e._duplexState|=n0,e._destroy(CJ.bind(this)));return}(e._duplexState&SJ)===ll&&(e._duplexState=(e._duplexState|n0)&pJ,e._open(kJ.bind(this)))}continueUpdate(){return this.stream._duplexState&rd?(this.stream._duplexState&=gJ,!0):!1}updateCallback(){(this.stream._duplexState&hMe)===sd?this.update():this.updateNextTick()}updateNextTick(){this.stream._duplexState&rd||(this.stream._duplexState|=rd,this.stream._duplexState&r0||dJ(this.afterUpdateNextTick))}},lR=class{constructor(e){this.data=null,this.afterTransform=AMe.bind(e),this.afterFinal=null}},cR=class{constructor(e,r,n){this.from=e,this.to=r,this.afterPipe=n,this.error=null,this.pipeToFinished=!1}finished(){this.pipeToFinished=!0}done(e,r){if(r&&(this.error=r),e===this.to&&(this.to=null,this.from!==null)){(!(this.from._duplexState&Yi)||!this.pipeToFinished)&&this.from.destroy(this.error||new Error("Writable stream closed prematurely"));return}if(e===this.from&&(this.from=null,this.to!==null)){e._duplexState&Yi||this.to.destroy(this.error||new Error("Readable stream closed before ending"));return}this.afterPipe!==null&&this.afterPipe(this.error),this.to=this.from=this.afterPipe=null}};function wMe(){this.stream._duplexState|=hR,this.updateCallback()}function EMe(t){let e=this.stream;t&&e.destroy(t),e._duplexState&fs||(e._duplexState|=cl,e.emit("finish")),(e._duplexState&EJ)===xR&&(e._duplexState|=ol),e._duplexState&=xJ,e._duplexState&id?this.updateNextTick():this.update()}function CJ(t){let e=this.stream;!t&&this.error!==aw&&(t=this.error),t&&e.emit("error",t),e._duplexState|=t0,e.emit("close");let r=e._readableState,n=e._writableState;if(r!==null&&r.pipeline!==null&&r.pipeline.done(e,t),n!==null){for(;n.drains!==null&&n.drains.length>0;)n.drains.shift().resolve(!1);n.pipeline!==null&&n.pipeline.done(e,t)}}function SMe(t){let e=this.stream;t&&e.destroy(t),e._duplexState&=xJ,this.drains!==null&&TMe(this.drains),(e._duplexState&gMe)===c0&&(e._duplexState&=nMe,(e._duplexState&aR)===aR&&e.emit("drain")),this.updateCallback()}function DMe(t){t&&this.stream.destroy(t),this.stream._duplexState&=Yje,this.readAhead===!1&&!(this.stream._duplexState&u0)&&(this.stream._duplexState&=bJ),this.updateCallback()}function CMe(){this.stream._duplexState&r0||(this.stream._duplexState&=gJ,this.update())}function kMe(){this.stream._duplexState&id||(this.stream._duplexState&=vJ,this.update())}function TMe(t){for(let e=0;e<t.length;e++)--t[e].writes===0&&(t.shift().resolve(!0),e--)}function kJ(t){let e=this.stream;t&&e.destroy(t),e._duplexState&ol||(e._duplexState&uMe||(e._duplexState|=sd),e._duplexState&pMe||(e._duplexState|=l0),e.emit("open")),e._duplexState&=wJ,e._writableState!==null&&e._writableState.updateCallback(),e._readableState!==null&&e._readableState.updateCallback()}function AMe(t,e){e!=null&&this.push(e),this._writableState.afterWrite(t)}function OMe(t){this._readableState!==null&&(t==="data"&&(this._duplexState|=sR|gR,this._readableState.updateNextTick()),t==="readable"&&(this._duplexState|=pR,this._readableState.updateNextTick())),this._writableState!==null&&t==="drain"&&(this._duplexState|=aR,this._writableState.updateNextTick())}var i0=class extends Wje{constructor(e){super(),this._duplexState=0,this._readableState=null,this._writableState=null,e&&(e.open&&(this._open=e.open),e.destroy&&(this._destroy=e.destroy),e.predestroy&&(this._predestroy=e.predestroy),e.signal&&e.signal.addEventListener("abort",NMe.bind(this))),this.on("newListener",OMe)}_open(e){e(null)}_destroy(e){e(null)}_predestroy(){}get readable(){return this._readableState!==null?!0:void 0}get writable(){return this._writableState!==null?!0:void 0}get destroyed(){return(this._duplexState&t0)!==0}get destroying(){return(this._duplexState&fs)!==0}destroy(e){this._duplexState&fs||(e||(e=aw),this._duplexState=(this._duplexState|ol)&sMe,this._readableState!==null&&(this._readableState.highWaterMark=0,this._readableState.error=e),this._writableState!==null&&(this._writableState.highWaterMark=0,this._writableState.error=e),this._duplexState|=dR,this._predestroy(),this._duplexState&=zje,this._readableState!==null&&this._readableState.updateNextTick(),this._writableState!==null&&this._writableState.updateNextTick())}},iw=class t extends i0{constructor(e){super(e),this._duplexState|=ll|cl|al,this._readableState=new uR(this,e),e&&(this._readableState.readAhead===!1&&(this._duplexState&=bJ),e.read&&(this._read=e.read),e.eagerOpen&&this._readableState.updateNextTick(),e.encoding&&this.setEncoding(e.encoding))}setEncoding(e){let r=new Uje(e),n=this._readableState.map||PMe;return this._readableState.map=i,this;function i(o){let s=r.push(o);return s===""&&(o.byteLength!==0||r.remaining>0)?null:n(s)}}_read(e){e(null)}pipe(e,r){return this._readableState.updateNextTick(),this._readableState.pipe(e,r),e}read(){return this._readableState.updateNextTick(),this._readableState.read()}push(e){return this._readableState.updateNextTick(),this._readableState.push(e)}unshift(e){return this._readableState.updateNextTick(),this._readableState.unshift(e)}resume(){return this._duplexState|=gR,this._readableState.updateNextTick(),this}pause(){return this._duplexState&=this._readableState.readAhead===!1?tMe:Zje,this}static _fromAsyncIterator(e,r){let n,i=new t({...r,read(s){e.next().then(o).then(s.bind(null,null)).catch(s)},predestroy(){n=e.return()},destroy(s){if(!n)return s(null);n.then(s.bind(null,null)).catch(s)}});return i;function o(s){s.done?i.push(null):i.push(s.value)}}static from(e,r){if(MMe(e))return e;if(e[rw])return this._fromAsyncIterator(e[rw](),r);Array.isArray(e)||(e=e===void 0?[]:[e]);let n=0;return new t({...r,read(i){this.push(n===e.length?null:e[n++]),i(null)}})}static isBackpressured(e){return(e._duplexState&dMe)!==0||e._readableState.buffered>=e._readableState.highWaterMark}static isPaused(e){return(e._duplexState&u0)===0}[rw](){let e=this,r=null,n=null,i=null;return this.on("error",l=>{r=l}),this.on("readable",o),this.on("close",s),{[rw](){return this},next(){return new Promise(function(l,c){n=l,i=c;let d=e.read();d!==null?a(d):e._duplexState&t0&&a(null)})},return(){return u(null)},throw(l){return u(l)}};function o(){n!==null&&a(e.read())}function s(){n!==null&&a(null)}function a(l){i!==null&&(r?i(r):l===null&&!(e._duplexState&Yi)?i(aw):n({value:l,done:l===null}),i=n=null)}function u(l){return e.destroy(l),new Promise((c,d)=>{if(e._duplexState&t0)return c({value:void 0,done:!0});e.once("close",function(){l?d(l):c({value:void 0,done:!0})})})}}},ow=class extends i0{constructor(e){super(e),this._duplexState|=ll|Yi,this._writableState=new nw(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final),e.eagerOpen&&this._writableState.updateNextTick())}cork(){this._duplexState|=lw}uncork(){this._duplexState&=_J,this._writableState.updateNextTick()}_writev(e,r){r(null)}_write(e,r){this._writableState.autoBatch(e,r)}_final(e){e(null)}static isBackpressured(e){return(e._duplexState&vMe)!==0}static drained(e){if(e.destroyed)return Promise.resolve(!1);let r=e._writableState,i=(BMe(e)?Math.min(1,r.queue.length):r.queue.length)+(e._duplexState&bR?1:0);return i===0?Promise.resolve(!0):(r.drains===null&&(r.drains=[]),new Promise(o=>{r.drains.push({writes:i,resolve:o})}))}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},o0=class extends iw{constructor(e){super(e),this._duplexState=ll|this._duplexState&al,this._writableState=new nw(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final))}cork(){this._duplexState|=lw}uncork(){this._duplexState&=_J,this._writableState.updateNextTick()}_writev(e,r){r(null)}_write(e,r){this._writableState.autoBatch(e,r)}_final(e){e(null)}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},sw=class extends o0{constructor(e){super(e),this._transformState=new lR(this),e&&(e.transform&&(this._transform=e.transform),e.flush&&(this._flush=e.flush))}_write(e,r){this._readableState.buffered>=this._readableState.highWaterMark?this._transformState.data=e:this._transform(e,this._transformState.afterTransform)}_read(e){if(this._transformState.data!==null){let r=this._transformState.data;this._transformState.data=null,e(null),this._transform(r,this._transformState.afterTransform)}else e(null)}destroy(e){super.destroy(e),this._transformState.data!==null&&(this._transformState.data=null,this._transformState.afterTransform())}_transform(e,r){r(null,e)}_flush(e){e(null)}_final(e){this._transformState.afterFinal=e,this._flush(RMe.bind(this))}},fR=class extends sw{};function RMe(t,e){let r=this._transformState.afterFinal;if(t)return r(t);e!=null&&this.push(e),this.push(null),r(null)}function FMe(...t){return new Promise((e,r)=>TJ(...t,n=>{if(n)return r(n);e()}))}function TJ(t,...e){let r=Array.isArray(t)?[...t,...e]:[t,...e],n=r.length&&typeof r[r.length-1]=="function"?r.pop():null;if(r.length<2)throw new Error("Pipeline requires at least 2 streams");let i=r[0],o=null,s=null;for(let l=1;l<r.length;l++)o=r[l],s0(i)?i.pipe(o,u):(a(i,!0,l>1,u),i.pipe(o)),i=o;if(n){let l=!1,c=s0(o)||!!(o._writableState&&o._writableState.autoDestroy);o.on("error",d=>{s===null&&(s=d)}),o.on("finish",()=>{l=!0,c||n(s)}),c&&o.on("close",()=>n(s||(l?null:oR)))}return o;function a(l,c,d,h){l.on("error",h),l.on("close",p);function p(){if(c&&l._readableState&&!l._readableState.ended||d&&l._writableState&&!l._writableState.ended)return h(oR)}}function u(l){if(!(!l||s)){s=l;for(let c of r)c.destroy(l)}}}function PMe(t){return t}function AJ(t){return!!t._readableState||!!t._writableState}function s0(t){return typeof t._duplexState=="number"&&AJ(t)}function qMe(t){return!!t._readableState&&t._readableState.ended}function IMe(t){return!!t._writableState&&t._writableState.ended}function jMe(t,e={}){let r=t._readableState&&t._readableState.error||t._writableState&&t._writableState.error;return!e.all&&r===aw?null:r}function MMe(t){return s0(t)&&t.readable}function LMe(t){return typeof t=="object"&&t!==null&&typeof t.byteLength=="number"}function OJ(t){return LMe(t)?t.byteLength:1024}function fJ(){}function NMe(){this.destroy(new Error("Stream aborted."))}function BMe(t){return t._writev!==ow.prototype._writev&&t._writev!==o0.prototype._writev}RJ.exports={pipeline:TJ,pipelinePromise:FMe,isStream:AJ,isStreamx:s0,isEnded:qMe,isFinished:IMe,getStreamError:jMe,Stream:i0,Writable:ow,Readable:iw,Duplex:o0,Transform:sw,PassThrough:fR}});var cw=g((Eut,FJ)=>{"use strict";function $Me(t){return Buffer.isBuffer(t)||t instanceof Uint8Array}function WMe(t){return Buffer.isEncoding(t)}function UMe(t,e,r){return Buffer.alloc(t,e,r)}function zMe(t){return Buffer.allocUnsafe(t)}function VMe(t){return Buffer.allocUnsafeSlow(t)}function HMe(t,e){return Buffer.byteLength(t,e)}function GMe(t,e){return Buffer.compare(t,e)}function YMe(t,e){return Buffer.concat(t,e)}function KMe(t,e,r,n,i){return Et(t).copy(e,r,n,i)}function QMe(t,e){return Et(t).equals(e)}function ZMe(t,e,r,n,i){return Et(t).fill(e,r,n,i)}function XMe(t,e,r){return Buffer.from(t,e,r)}function JMe(t,e,r,n){return Et(t).includes(e,r,n)}function eLe(t,e,r,n){return Et(t).indexOf(e,r,n)}function tLe(t,e,r,n){return Et(t).lastIndexOf(e,r,n)}function rLe(t){return Et(t).swap16()}function nLe(t){return Et(t).swap32()}function iLe(t){return Et(t).swap64()}function Et(t){return Buffer.isBuffer(t)?t:Buffer.from(t.buffer,t.byteOffset,t.byteLength)}function oLe(t,e,r,n){return Et(t).toString(e,r,n)}function sLe(t,e,r,n,i){return Et(t).write(e,r,n,i)}function aLe(t,e,r){return Et(t).writeDoubleLE(e,r)}function uLe(t,e,r){return Et(t).writeFloatLE(e,r)}function lLe(t,e,r){return Et(t).writeUInt32LE(e,r)}function cLe(t,e,r){return Et(t).writeInt32LE(e,r)}function fLe(t,e){return Et(t).readDoubleLE(e)}function dLe(t,e){return Et(t).readFloatLE(e)}function hLe(t,e){return Et(t).readUInt32LE(e)}function pLe(t,e){return Et(t).readInt32LE(e)}function mLe(t,e,r){return Et(t).writeDoubleBE(e,r)}function gLe(t,e,r){return Et(t).writeFloatBE(e,r)}function bLe(t,e,r){return Et(t).writeUInt32BE(e,r)}function xLe(t,e,r){return Et(t).writeInt32BE(e,r)}function yLe(t,e){return Et(t).readDoubleBE(e)}function vLe(t,e){return Et(t).readFloatBE(e)}function _Le(t,e){return Et(t).readUInt32BE(e)}function wLe(t,e){return Et(t).readInt32BE(e)}FJ.exports={isBuffer:$Me,isEncoding:WMe,alloc:UMe,allocUnsafe:zMe,allocUnsafeSlow:VMe,byteLength:HMe,compare:GMe,concat:YMe,copy:KMe,equals:QMe,fill:ZMe,from:XMe,includes:JMe,indexOf:eLe,lastIndexOf:tLe,swap16:rLe,swap32:nLe,swap64:iLe,toBuffer:Et,toString:oLe,write:sLe,writeDoubleLE:aLe,writeFloatLE:uLe,writeUInt32LE:lLe,writeInt32LE:cLe,readDoubleLE:fLe,readFloatLE:dLe,readUInt32LE:hLe,readInt32LE:pLe,writeDoubleBE:mLe,writeFloatBE:gLe,writeUInt32BE:bLe,writeInt32BE:xLe,readDoubleBE:yLe,readFloatBE:vLe,readUInt32BE:_Le,readInt32BE:wLe}});var ER=g(ud=>{"use strict";var at=cw(),ELe="0000000000000000000",SLe="7777777777777777777",fw=48,PJ=at.from([117,115,116,97,114,0]),DLe=at.from([fw,fw]),CLe=at.from([117,115,116,97,114,32]),kLe=at.from([32,0]),TLe=4095,f0=257,wR=263;ud.decodeLongPath=function(e,r){return ad(e,0,e.length,r)};ud.encodePax=function(e){let r="";e.name&&(r+=_R(" path="+e.name+`
|
|
113
113
|
`)),e.linkname&&(r+=_R(" linkpath="+e.linkname+`
|
|
114
114
|
`));let n=e.pax;if(n)for(let i in n)r+=_R(" "+i+"="+n[i]+`
|
|
115
|
-
`);return at.from(r)};ud.decodePax=function(e){let r={};for(;e.length;){let n=0;for(;n<e.length&&e[n]!==32;)n++;let i=parseInt(at.toString(e.subarray(0,n)),10);if(!i)return r;let o=at.toString(e.subarray(n+1,i-1)),s=o.indexOf("=");if(s===-1)return r;r[o.slice(0,s)]=o.slice(s+1),e=e.subarray(i)}return r};ud.encode=function(e){let r=at.alloc(512),n=e.name,i="";if(e.typeflag===5&&n[n.length-1]!=="/"&&(n+="/"),at.byteLength(n)!==n.length)return null;for(;at.byteLength(n)>100;){let o=n.indexOf("/");if(o===-1)return null;i+=i?"/"+n.slice(0,o):n.slice(0,o),n=n.slice(o+1)}return at.byteLength(n)>100||at.byteLength(i)>155||e.linkname&&at.byteLength(e.linkname)>100?null:(at.write(r,n),at.write(r,Na(e.mode&TLe,6),100),at.write(r,Na(e.uid,6),108),at.write(r,Na(e.gid,6),116),ILe(e.size,r,124),at.write(r,Na(e.mtime.getTime()/1e3|0,11),136),r[156]=fw+PLe(e.type),e.linkname&&at.write(r,e.linkname,157),at.copy(PJ,r,f0),at.copy(DLe,r,wR),e.uname&&at.write(r,e.uname,265),e.gname&&at.write(r,e.gname,297),at.write(r,Na(e.devmajor||0,6),329),at.write(r,Na(e.devminor||0,6),337),i&&at.write(r,i,345),at.write(r,Na(IJ(r),6),148),r)};ud.decode=function(e,r,n){let i=e[156]===0?0:e[156]-fw,o=ad(e,0,100,r),s=La(e,100,8),a=La(e,108,8),u=La(e,116,8),l=La(e,124,12),c=La(e,136,12),d=FLe(i),h=e[157]===0?null:ad(e,157,100,r),p=ad(e,265,32),b=ad(e,297,32),x=La(e,329,8),D=La(e,337,8),v=IJ(e);if(v===8*32)return null;if(v!==La(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(ALe(e))e[345]&&(o=ad(e,345,155,r)+"/"+o);else if(!OLe(e)){if(!n)throw new Error("Invalid tar header: unknown format.")}return i===0&&o&&o[o.length-1]==="/"&&(i=5),{name:o,mode:s,uid:a,gid:u,size:l,mtime:new Date(1e3*c),type:d,linkname:h,uname:p,gname:b,devmajor:x,devminor:D,pax:null}};function ALe(t){return at.equals(PJ,t.subarray(f0,f0+6))}function OLe(t){return at.equals(CLe,t.subarray(f0,f0+6))&&at.equals(kLe,t.subarray(wR,wR+2))}function RLe(t,e,r){return typeof t!="number"?r:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)}function FLe(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}function PLe(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}function qJ(t,e,r,n){for(;r<n;r++)if(t[r]===e)return r;return n}function IJ(t){let e=256;for(let r=0;r<148;r++)e+=t[r];for(let r=156;r<512;r++)e+=t[r];return e}function Na(t,e){return t=t.toString(8),t.length>e?SLe.slice(0,e)+" ":ELe.slice(0,e-t.length)+t+" "}function qLe(t,e,r){e[r]=128;for(let n=11;n>0;n--)e[r+n]=t&255,t=Math.floor(t/256)}function ILe(t,e,r){t.toString(8).length>11?qLe(t,e,r):at.write(e,Na(t,11),r)}function jLe(t){let e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;let r=[],n;for(n=t.length-1;n>0;n--){let s=t[n];e?r.push(s):r.push(255-s)}let i=0,o=r.length;for(n=0;n<o;n++)i+=r[n]*Math.pow(256,n);return e?i:-1*i}function La(t,e,r){if(t=t.subarray(e,e+r),e=0,t[e]&128)return jLe(t);{for(;e<t.length&&t[e]===32;)e++;let n=RLe(qJ(t,32,e,t.length),t.length,t.length);for(;e<n&&t[e]===0;)e++;return n===e?0:parseInt(at.toString(t.subarray(e,n)),8)}}function ad(t,e,r,n){return at.toString(t.subarray(e,qJ(t,0,e,e+r)),n)}function _R(t){let e=at.byteLength(t),r=Math.floor(Math.log(e)/Math.log(10))+1;return e+r>=Math.pow(10,r)&&r++,e+r+t}});var BJ=g((Dut,NJ)=>{"use strict";var{Writable:MLe,Readable:LLe,getStreamError:jJ}=vR(),NLe=iR(),MJ=cw(),ld=ER(),BLe=MJ.alloc(0),DR=class{constructor(){this.buffered=0,this.shifted=0,this.queue=new NLe,this._offset=0}push(e){this.buffered+=e.byteLength,this.queue.push(e)}shiftFirst(e){return this._buffered===0?null:this._next(e)}shift(e){if(e>this.buffered)return null;if(e===0)return BLe;let r=this._next(e);if(e===r.byteLength)return r;let n=[r];for(;(e-=r.byteLength)>0;)r=this._next(e),n.push(r);return MJ.concat(n)}_next(e){let r=this.queue.peek(),n=r.byteLength-this._offset;if(e>=n){let i=this._offset?r.subarray(this._offset,r.byteLength):r;return this.queue.shift(),this._offset=0,this.buffered-=n,this.shifted+=n,i}return this.buffered-=e,this.shifted+=e,r.subarray(this._offset,this._offset+=e)}},CR=class extends LLe{constructor(e,r,n){super(),this.header=r,this.offset=n,this._parent=e}_read(e){this.header.size===0&&this.push(null),this._parent._stream===this&&this._parent._update(),e(null)}_predestroy(){this._parent.destroy(jJ(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=LJ(this.header.size),this._parent._update())}_destroy(e){this._detach(),e(null)}},kR=class extends MLe{constructor(e){super(e),e||(e={}),this._buffer=new DR,this._offset=0,this._header=null,this._stream=null,this._missing=0,this._longHeader=!1,this._callback=SR,this._locked=!1,this._finished=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null,this._filenameEncoding=e.filenameEncoding||"utf-8",this._allowUnknownFormat=!!e.allowUnknownFormat,this._unlockBound=this._unlock.bind(this)}_unlock(e){if(this._locked=!1,e){this.destroy(e),this._continueWrite(e);return}this._update()}_consumeHeader(){if(this._locked)return!1;this._offset=this._buffer.shifted;try{this._header=ld.decode(this._buffer.shift(512),this._filenameEncoding,this._allowUnknownFormat)}catch(e){return this._continueWrite(e),!1}if(!this._header)return!0;switch(this._header.type){case"gnu-long-path":case"gnu-long-link-path":case"pax-global-header":case"pax-header":return this._longHeader=!0,this._missing=this._header.size,!0}return this._locked=!0,this._applyLongHeaders(),this._header.size===0||this._header.type==="directory"?(this.emit("entry",this._header,this._createStream(),this._unlockBound),!0):(this._stream=this._createStream(),this._missing=this._header.size,this.emit("entry",this._header,this._stream,this._unlockBound),!0)}_applyLongHeaders(){this._gnuLongPath&&(this._header.name=this._gnuLongPath,this._gnuLongPath=null),this._gnuLongLinkPath&&(this._header.linkname=this._gnuLongLinkPath,this._gnuLongLinkPath=null),this._pax&&(this._pax.path&&(this._header.name=this._pax.path),this._pax.linkpath&&(this._header.linkname=this._pax.linkpath),this._pax.size&&(this._header.size=parseInt(this._pax.size,10)),this._header.pax=this._pax,this._pax=null)}_decodeLongHeader(e){switch(this._header.type){case"gnu-long-path":this._gnuLongPath=ld.decodeLongPath(e,this._filenameEncoding);break;case"gnu-long-link-path":this._gnuLongLinkPath=ld.decodeLongPath(e,this._filenameEncoding);break;case"pax-global-header":this._paxGlobal=ld.decodePax(e);break;case"pax-header":this._pax=this._paxGlobal===null?ld.decodePax(e):Object.assign({},this._paxGlobal,ld.decodePax(e));break}}_consumeLongHeader(){this._longHeader=!1,this._missing=LJ(this._header.size);let e=this._buffer.shift(this._header.size);try{this._decodeLongHeader(e)}catch(r){return this._continueWrite(r),!1}return!0}_consumeStream(){let e=this._buffer.shiftFirst(this._missing);if(e===null)return!1;this._missing-=e.byteLength;let r=this._stream.push(e);return this._missing===0?(this._stream.push(null),r&&this._stream._detach(),r&&this._locked===!1):r}_createStream(){return new CR(this,this._header,this._offset)}_update(){for(;this._buffer.buffered>0&&!this.destroying;){if(this._missing>0){if(this._stream!==null){if(this._consumeStream()===!1)return;continue}if(this._longHeader===!0){if(this._missing>this._buffer.buffered)break;if(this._consumeLongHeader()===!1)return!1;continue}let e=this._buffer.shiftFirst(this._missing);e!==null&&(this._missing-=e.byteLength);continue}if(this._buffer.buffered<512)break;if(this._stream!==null||this._consumeHeader()===!1)return}this._continueWrite(null)}_continueWrite(e){let r=this._callback;this._callback=SR,r(e)}_write(e,r){this._callback=r,this._buffer.push(e),this._update()}_final(e){this._finished=this._missing===0&&this._buffer.buffered===0,e(this._finished?null:new Error("Unexpected end of data"))}_predestroy(){this._continueWrite(null)}_destroy(e){this._stream&&this._stream.destroy(jJ(this)),e(null)}[Symbol.asyncIterator](){let e=null,r=null,n=null,i=null,o=null,s=this;return this.on("entry",l),this.on("error",h=>{e=h}),this.on("close",c),{[Symbol.asyncIterator](){return this},next(){return new Promise(u)},return(){return d(null)},throw(h){return d(h)}};function a(h){if(!o)return;let p=o;o=null,p(h)}function u(h,p){if(e)return p(e);if(i){h({value:i,done:!1}),i=null;return}r=h,n=p,a(null),s._finished&&r&&(r({value:void 0,done:!0}),r=n=null)}function l(h,p,b){o=b,p.on("error",SR),r?(r({value:p,done:!1}),r=n=null):i=p}function c(){a(e),r&&(e?n(e):r({value:void 0,done:!0}),r=n=null)}function d(h){return s.destroy(h),a(h),new Promise((p,b)=>{if(s.destroyed)return p({value:void 0,done:!0});s.once("close",function(){h?b(h):p({value:void 0,done:!0})})})}}};NJ.exports=function(e){return new kR(e)};function SR(){}function LJ(t){return t&=511,t&&512-t}});var WJ=g((Cut,TR)=>{"use strict";var $J={S_IFMT:61440,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960};try{TR.exports=require("fs").constants||$J}catch{TR.exports=$J}});var GJ=g((kut,HJ)=>{"use strict";var{Readable:$Le,Writable:WLe,getStreamError:UJ}=vR(),fl=cw(),cd=WJ(),dw=ER(),ULe=493,zLe=420,zJ=fl.alloc(1024),OR=class extends WLe{constructor(e,r,n){super({mapWritable:HLe,eagerOpen:!0}),this.written=0,this.header=r,this._callback=n,this._linkname=null,this._isLinkname=r.type==="symlink"&&!r.linkname,this._isVoid=r.type!=="file"&&r.type!=="contiguous-file",this._finished=!1,this._pack=e,this._openCallback=null,this._pack._stream===null?this._pack._stream=this:this._pack._pending.push(this)}_open(e){this._openCallback=e,this._pack._stream===this&&this._continueOpen()}_continuePack(e){if(this._callback===null)return;let r=this._callback;this._callback=null,r(e)}_continueOpen(){this._pack._stream===null&&(this._pack._stream=this);let e=this._openCallback;if(this._openCallback=null,e!==null){if(this._pack.destroying)return e(new Error("pack stream destroyed"));if(this._pack._finalized)return e(new Error("pack stream is already finalized"));this._pack._stream=this,this._isLinkname||this._pack._encode(this.header),this._isVoid&&(this._finish(),this._continuePack(null)),e(null)}}_write(e,r){if(this._isLinkname)return this._linkname=this._linkname?fl.concat([this._linkname,e]):e,r(null);if(this._isVoid)return e.byteLength>0?r(new Error("No body allowed for this entry")):r();if(this.written+=e.byteLength,this._pack.push(e))return r();this._pack._drain=r}_finish(){this._finished||(this._finished=!0,this._isLinkname&&(this.header.linkname=this._linkname?fl.toString(this._linkname,"utf-8"):"",this._pack._encode(this.header)),VJ(this._pack,this.header.size),this._pack._done(this))}_final(e){if(this.written!==this.header.size)return e(new Error("Size mismatch"));this._finish(),e(null)}_getError(){return UJ(this)||new Error("tar entry destroyed")}_predestroy(){this._pack.destroy(this._getError())}_destroy(e){this._pack._done(this),this._continuePack(this._finished?null:this._getError()),e()}},RR=class extends $Le{constructor(e){super(e),this._drain=AR,this._finalized=!1,this._finalizing=!1,this._pending=[],this._stream=null}entry(e,r,n){if(this._finalized||this.destroying)throw new Error("already finalized or destroyed");typeof r=="function"&&(n=r,r=null),n||(n=AR),(!e.size||e.type==="symlink")&&(e.size=0),e.type||(e.type=VLe(e.mode)),e.mode||(e.mode=e.type==="directory"?ULe:zLe),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),typeof r=="string"&&(r=fl.from(r));let i=new OR(this,e,n);return fl.isBuffer(r)?(e.size=r.byteLength,i.write(r),i.end(),i):(i._isVoid,i)}finalize(){if(this._stream||this._pending.length>0){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(zJ),this.push(null))}_done(e){e===this._stream&&(this._stream=null,this._finalizing&&this.finalize(),this._pending.length&&this._pending.shift()._continueOpen())}_encode(e){if(!e.pax){let r=dw.encode(e);if(r){this.push(r);return}}this._encodePax(e)}_encodePax(e){let r=dw.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),n={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:r.byteLength,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(dw.encode(n)),this.push(r),VJ(this,r.byteLength),n.size=e.size,n.type=e.type,this.push(dw.encode(n))}_doDrain(){let e=this._drain;this._drain=AR,e()}_predestroy(){let e=UJ(this);for(this._stream&&this._stream.destroy(e);this._pending.length;){let r=this._pending.shift();r.destroy(e),r._continueOpen()}this._doDrain()}_read(e){this._doDrain(),e()}};HJ.exports=function(e){return new RR(e)};function VLe(t){switch(t&cd.S_IFMT){case cd.S_IFBLK:return"block-device";case cd.S_IFCHR:return"character-device";case cd.S_IFDIR:return"directory";case cd.S_IFIFO:return"fifo";case cd.S_IFLNK:return"symlink"}return"file"}function AR(){}function VJ(t,e){e&=511,e&&t.push(zJ.subarray(0,512-e))}function HLe(t){return fl.isBuffer(t)?t:fl.from(t)}});var YJ=g(FR=>{"use strict";FR.extract=BJ();FR.pack=GJ()});var ZJ=g((Aut,QJ)=>{"use strict";var GLe=require("zlib"),YLe=YJ(),KJ=ed(),ds=function(t){if(!(this instanceof ds))return new ds(t);t=this.options=KJ.defaults(t,{gzip:!1}),typeof t.gzipOptions!="object"&&(t.gzipOptions={}),this.supports={directory:!0,symlink:!0},this.engine=YLe.pack(t),this.compressor=!1,t.gzip&&(this.compressor=GLe.createGzip(t.gzipOptions),this.compressor.on("error",this._onCompressorError.bind(this)))};ds.prototype._onCompressorError=function(t){this.engine.emit("error",t)};ds.prototype.append=function(t,e,r){var n=this;e.mtime=e.date;function i(s,a){if(s){r(s);return}n.engine.entry(e,a,function(u){r(u,e)})}if(e.sourceType==="buffer")i(null,t);else if(e.sourceType==="stream"&&e.stats){e.size=e.stats.size;var o=n.engine.entry(e,function(s){r(s,e)});t.pipe(o)}else e.sourceType==="stream"&&KJ.collectStream(t,i)};ds.prototype.finalize=function(){this.engine.finalize()};ds.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)};ds.prototype.pipe=function(t,e){return this.compressor?this.engine.pipe.apply(this.engine,[this.compressor]).pipe(t,e):this.engine.pipe.apply(this.engine,arguments)};ds.prototype.unpipe=function(){return this.compressor?this.compressor.unpipe.apply(this.compressor,arguments):this.engine.unpipe.apply(this.engine,arguments)};QJ.exports=ds});var eee=g((Out,JJ)=>{"use strict";function KLe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var QLe=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function XJ(t){if(Buffer.isBuffer(t))return t;if(typeof t=="number")return Buffer.alloc(t);if(typeof t=="string")return Buffer.from(t);throw new Error("input must be buffer, number, or string, received "+typeof t)}function ZLe(t){let e=XJ(4);return e.writeInt32BE(t,0),e}function PR(t,e){t=XJ(t),Buffer.isBuffer(e)&&(e=e.readUInt32BE(0));let r=~~e^-1;for(var n=0;n<t.length;n++)r=QLe[(r^t[n])&255]^r>>>8;return r^-1}function qR(){return ZLe(PR.apply(null,arguments))}qR.signed=function(){return PR.apply(null,arguments)};qR.unsigned=function(){return PR.apply(null,arguments)>>>0};var XLe=qR,JLe=KLe(XLe);JJ.exports=JLe});var iee=g((Rut,nee)=>{"use strict";var e9e=require("util").inherits,tee=Ju().Transform,t9e=eee(),ree=ed(),Ba=function(t){if(!(this instanceof Ba))return new Ba(t);t=this.options=ree.defaults(t,{}),tee.call(this,t),this.supports={directory:!0,symlink:!0},this.files=[]};e9e(Ba,tee);Ba.prototype._transform=function(t,e,r){r(null,t)};Ba.prototype._writeStringified=function(){var t=JSON.stringify(this.files);this.write(t)};Ba.prototype.append=function(t,e,r){var n=this;e.crc32=0;function i(o,s){if(o){r(o);return}e.size=s.length||0,e.crc32=t9e.unsigned(s),n.files.push(e),r(null,e)}e.sourceType==="buffer"?i(null,t):e.sourceType==="stream"&&ree.collectStream(t,i)};Ba.prototype.finalize=function(){this._writeStringified(),this.end()};nee.exports=Ba});var see=g((Fut,oee)=>{"use strict";var r9e=pX(),d0={},$a=function(t,e){return $a.create(t,e)};$a.create=function(t,e){if(d0[t]){var r=new r9e(t,e);return r.setFormat(t),r.setModule(new d0[t](e)),r}else throw new Error("create("+t+"): format not registered")};$a.registerFormat=function(t,e){if(d0[t])throw new Error("register("+t+"): format already registered");if(typeof e!="function")throw new Error("register("+t+"): format module invalid");if(typeof e.prototype.append!="function"||typeof e.prototype.finalize!="function")throw new Error("register("+t+"): format module missing methods");d0[t]=e};$a.isRegisteredFormat=function(t){return!!d0[t]};$a.registerFormat("zip",HX());$a.registerFormat("tar",ZJ());$a.registerFormat("json",iee());oee.exports=$a});var h0=g((Put,aee)=>{"use strict";var n9e="2.0.0",i9e=Number.MAX_SAFE_INTEGER||9007199254740991,o9e=16,s9e=250,a9e=["major","premajor","minor","preminor","patch","prepatch","prerelease"];aee.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:o9e,MAX_SAFE_BUILD_LENGTH:s9e,MAX_SAFE_INTEGER:i9e,RELEASE_TYPES:a9e,SEMVER_SPEC_VERSION:n9e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var p0=g((qut,uee)=>{"use strict";var u9e=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};uee.exports=u9e});var fd=g((hs,lee)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:IR,MAX_SAFE_BUILD_LENGTH:l9e,MAX_LENGTH:c9e}=h0(),f9e=p0();hs=lee.exports={};var d9e=hs.re=[],h9e=hs.safeRe=[],de=hs.src=[],he=hs.t={},p9e=0,jR="[a-zA-Z0-9-]",m9e=[["\\s",1],["\\d",c9e],[jR,l9e]],g9e=t=>{for(let[e,r]of m9e)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},Le=(t,e,r)=>{let n=g9e(e),i=p9e++;f9e(t,i,e),he[t]=i,de[i]=e,d9e[i]=new RegExp(e,r?"g":void 0),h9e[i]=new RegExp(n,r?"g":void 0)};Le("NUMERICIDENTIFIER","0|[1-9]\\d*");Le("NUMERICIDENTIFIERLOOSE","\\d+");Le("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${jR}*`);Le("MAINVERSION",`(${de[he.NUMERICIDENTIFIER]})\\.(${de[he.NUMERICIDENTIFIER]})\\.(${de[he.NUMERICIDENTIFIER]})`);Le("MAINVERSIONLOOSE",`(${de[he.NUMERICIDENTIFIERLOOSE]})\\.(${de[he.NUMERICIDENTIFIERLOOSE]})\\.(${de[he.NUMERICIDENTIFIERLOOSE]})`);Le("PRERELEASEIDENTIFIER",`(?:${de[he.NUMERICIDENTIFIER]}|${de[he.NONNUMERICIDENTIFIER]})`);Le("PRERELEASEIDENTIFIERLOOSE",`(?:${de[he.NUMERICIDENTIFIERLOOSE]}|${de[he.NONNUMERICIDENTIFIER]})`);Le("PRERELEASE",`(?:-(${de[he.PRERELEASEIDENTIFIER]}(?:\\.${de[he.PRERELEASEIDENTIFIER]})*))`);Le("PRERELEASELOOSE",`(?:-?(${de[he.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${de[he.PRERELEASEIDENTIFIERLOOSE]})*))`);Le("BUILDIDENTIFIER",`${jR}+`);Le("BUILD",`(?:\\+(${de[he.BUILDIDENTIFIER]}(?:\\.${de[he.BUILDIDENTIFIER]})*))`);Le("FULLPLAIN",`v?${de[he.MAINVERSION]}${de[he.PRERELEASE]}?${de[he.BUILD]}?`);Le("FULL",`^${de[he.FULLPLAIN]}$`);Le("LOOSEPLAIN",`[v=\\s]*${de[he.MAINVERSIONLOOSE]}${de[he.PRERELEASELOOSE]}?${de[he.BUILD]}?`);Le("LOOSE",`^${de[he.LOOSEPLAIN]}$`);Le("GTLT","((?:<|>)?=?)");Le("XRANGEIDENTIFIERLOOSE",`${de[he.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Le("XRANGEIDENTIFIER",`${de[he.NUMERICIDENTIFIER]}|x|X|\\*`);Le("XRANGEPLAIN",`[v=\\s]*(${de[he.XRANGEIDENTIFIER]})(?:\\.(${de[he.XRANGEIDENTIFIER]})(?:\\.(${de[he.XRANGEIDENTIFIER]})(?:${de[he.PRERELEASE]})?${de[he.BUILD]}?)?)?`);Le("XRANGEPLAINLOOSE",`[v=\\s]*(${de[he.XRANGEIDENTIFIERLOOSE]})(?:\\.(${de[he.XRANGEIDENTIFIERLOOSE]})(?:\\.(${de[he.XRANGEIDENTIFIERLOOSE]})(?:${de[he.PRERELEASELOOSE]})?${de[he.BUILD]}?)?)?`);Le("XRANGE",`^${de[he.GTLT]}\\s*${de[he.XRANGEPLAIN]}$`);Le("XRANGELOOSE",`^${de[he.GTLT]}\\s*${de[he.XRANGEPLAINLOOSE]}$`);Le("COERCEPLAIN",`(^|[^\\d])(\\d{1,${IR}})(?:\\.(\\d{1,${IR}}))?(?:\\.(\\d{1,${IR}}))?`);Le("COERCE",`${de[he.COERCEPLAIN]}(?:$|[^\\d])`);Le("COERCEFULL",de[he.COERCEPLAIN]+`(?:${de[he.PRERELEASE]})?(?:${de[he.BUILD]})?(?:$|[^\\d])`);Le("COERCERTL",de[he.COERCE],!0);Le("COERCERTLFULL",de[he.COERCEFULL],!0);Le("LONETILDE","(?:~>?)");Le("TILDETRIM",`(\\s*)${de[he.LONETILDE]}\\s+`,!0);hs.tildeTrimReplace="$1~";Le("TILDE",`^${de[he.LONETILDE]}${de[he.XRANGEPLAIN]}$`);Le("TILDELOOSE",`^${de[he.LONETILDE]}${de[he.XRANGEPLAINLOOSE]}$`);Le("LONECARET","(?:\\^)");Le("CARETTRIM",`(\\s*)${de[he.LONECARET]}\\s+`,!0);hs.caretTrimReplace="$1^";Le("CARET",`^${de[he.LONECARET]}${de[he.XRANGEPLAIN]}$`);Le("CARETLOOSE",`^${de[he.LONECARET]}${de[he.XRANGEPLAINLOOSE]}$`);Le("COMPARATORLOOSE",`^${de[he.GTLT]}\\s*(${de[he.LOOSEPLAIN]})$|^$`);Le("COMPARATOR",`^${de[he.GTLT]}\\s*(${de[he.FULLPLAIN]})$|^$`);Le("COMPARATORTRIM",`(\\s*)${de[he.GTLT]}\\s*(${de[he.LOOSEPLAIN]}|${de[he.XRANGEPLAIN]})`,!0);hs.comparatorTrimReplace="$1$2$3";Le("HYPHENRANGE",`^\\s*(${de[he.XRANGEPLAIN]})\\s+-\\s+(${de[he.XRANGEPLAIN]})\\s*$`);Le("HYPHENRANGELOOSE",`^\\s*(${de[he.XRANGEPLAINLOOSE]})\\s+-\\s+(${de[he.XRANGEPLAINLOOSE]})\\s*$`);Le("STAR","(<|>)?=?\\s*\\*");Le("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Le("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var hw=g((Iut,cee)=>{"use strict";var b9e=Object.freeze({loose:!0}),x9e=Object.freeze({}),y9e=t=>t?typeof t!="object"?b9e:t:x9e;cee.exports=y9e});var MR=g((jut,hee)=>{"use strict";var fee=/^[0-9]+$/,dee=(t,e)=>{let r=fee.test(t),n=fee.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},v9e=(t,e)=>dee(e,t);hee.exports={compareIdentifiers:dee,rcompareIdentifiers:v9e}});var Gr=g((Mut,bee)=>{"use strict";var pw=p0(),{MAX_LENGTH:pee,MAX_SAFE_INTEGER:mw}=h0(),{safeRe:mee,t:gee}=fd(),_9e=hw(),{compareIdentifiers:dd}=MR(),LR=class t{constructor(e,r){if(r=_9e(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>pee)throw new TypeError(`version is longer than ${pee} characters`);pw("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?mee[gee.LOOSE]:mee[gee.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>mw||this.major<0)throw new TypeError("Invalid major version");if(this.minor>mw||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>mw||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let o=+i;if(o>=0&&o<mw)return o}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(pw("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),dd(this.major,e.major)||dd(this.minor,e.minor)||dd(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],i=e.prerelease[r];if(pw("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return dd(n,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],i=e.build[r];if(pw("build compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return dd(n,i)}while(++r)}inc(e,r,n){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(n)?1:0;if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[i];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let o=[r,i];n===!1&&(o=[r]),dd(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};bee.exports=LR});var dl=g((Lut,yee)=>{"use strict";var xee=Gr(),w9e=(t,e,r=!1)=>{if(t instanceof xee)return t;try{return new xee(t,e)}catch(n){if(!r)return null;throw n}};yee.exports=w9e});var _ee=g((Nut,vee)=>{"use strict";var E9e=dl(),S9e=(t,e)=>{let r=E9e(t,e);return r?r.version:null};vee.exports=S9e});var Eee=g((But,wee)=>{"use strict";var D9e=dl(),C9e=(t,e)=>{let r=D9e(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};wee.exports=C9e});var Cee=g(($ut,Dee)=>{"use strict";var See=Gr(),k9e=(t,e,r,n,i)=>{typeof r=="string"&&(i=n,n=r,r=void 0);try{return new See(t instanceof See?t.version:t,r).inc(e,n,i).version}catch{return null}};Dee.exports=k9e});var Aee=g((Wut,Tee)=>{"use strict";var kee=dl(),T9e=(t,e)=>{let r=kee(t,null,!0),n=kee(e,null,!0),i=r.compare(n);if(i===0)return null;let o=i>0,s=o?r:n,a=o?n:r,u=!!s.prerelease.length;if(!!a.prerelease.length&&!u)return!a.patch&&!a.minor?"major":s.patch?"patch":s.minor?"minor":"major";let c=u?"pre":"";return r.major!==n.major?c+"major":r.minor!==n.minor?c+"minor":r.patch!==n.patch?c+"patch":"prerelease"};Tee.exports=T9e});var Ree=g((Uut,Oee)=>{"use strict";var A9e=Gr(),O9e=(t,e)=>new A9e(t,e).major;Oee.exports=O9e});var Pee=g((zut,Fee)=>{"use strict";var R9e=Gr(),F9e=(t,e)=>new R9e(t,e).minor;Fee.exports=F9e});var Iee=g((Vut,qee)=>{"use strict";var P9e=Gr(),q9e=(t,e)=>new P9e(t,e).patch;qee.exports=q9e});var Mee=g((Hut,jee)=>{"use strict";var I9e=dl(),j9e=(t,e)=>{let r=I9e(t,e);return r&&r.prerelease.length?r.prerelease:null};jee.exports=j9e});var Si=g((Gut,Nee)=>{"use strict";var Lee=Gr(),M9e=(t,e,r)=>new Lee(t,r).compare(new Lee(e,r));Nee.exports=M9e});var $ee=g((Yut,Bee)=>{"use strict";var L9e=Si(),N9e=(t,e,r)=>L9e(e,t,r);Bee.exports=N9e});var Uee=g((Kut,Wee)=>{"use strict";var B9e=Si(),$9e=(t,e)=>B9e(t,e,!0);Wee.exports=$9e});var gw=g((Qut,Vee)=>{"use strict";var zee=Gr(),W9e=(t,e,r)=>{let n=new zee(t,r),i=new zee(e,r);return n.compare(i)||n.compareBuild(i)};Vee.exports=W9e});var Gee=g((Zut,Hee)=>{"use strict";var U9e=gw(),z9e=(t,e)=>t.sort((r,n)=>U9e(r,n,e));Hee.exports=z9e});var Kee=g((Xut,Yee)=>{"use strict";var V9e=gw(),H9e=(t,e)=>t.sort((r,n)=>V9e(n,r,e));Yee.exports=H9e});var m0=g((Jut,Qee)=>{"use strict";var G9e=Si(),Y9e=(t,e,r)=>G9e(t,e,r)>0;Qee.exports=Y9e});var bw=g((elt,Zee)=>{"use strict";var K9e=Si(),Q9e=(t,e,r)=>K9e(t,e,r)<0;Zee.exports=Q9e});var NR=g((tlt,Xee)=>{"use strict";var Z9e=Si(),X9e=(t,e,r)=>Z9e(t,e,r)===0;Xee.exports=X9e});var BR=g((rlt,Jee)=>{"use strict";var J9e=Si(),eNe=(t,e,r)=>J9e(t,e,r)!==0;Jee.exports=eNe});var xw=g((nlt,ete)=>{"use strict";var tNe=Si(),rNe=(t,e,r)=>tNe(t,e,r)>=0;ete.exports=rNe});var yw=g((ilt,tte)=>{"use strict";var nNe=Si(),iNe=(t,e,r)=>nNe(t,e,r)<=0;tte.exports=iNe});var $R=g((olt,rte)=>{"use strict";var oNe=NR(),sNe=BR(),aNe=m0(),uNe=xw(),lNe=bw(),cNe=yw(),fNe=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return oNe(t,r,n);case"!=":return sNe(t,r,n);case">":return aNe(t,r,n);case">=":return uNe(t,r,n);case"<":return lNe(t,r,n);case"<=":return cNe(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};rte.exports=fNe});var ite=g((slt,nte)=>{"use strict";var dNe=Gr(),hNe=dl(),{safeRe:vw,t:_w}=fd(),pNe=(t,e)=>{if(t instanceof dNe)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?vw[_w.COERCEFULL]:vw[_w.COERCE]);else{let u=e.includePrerelease?vw[_w.COERCERTLFULL]:vw[_w.COERCERTL],l;for(;(l=u.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||l.index+l[0].length!==r.index+r[0].length)&&(r=l),u.lastIndex=l.index+l[1].length+l[2].length;u.lastIndex=-1}if(r===null)return null;let n=r[2],i=r[3]||"0",o=r[4]||"0",s=e.includePrerelease&&r[5]?`-${r[5]}`:"",a=e.includePrerelease&&r[6]?`+${r[6]}`:"";return hNe(`${n}.${i}.${o}${s}${a}`,e)};nte.exports=pNe});var ste=g((alt,ote)=>{"use strict";var WR=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,r)}return this}};ote.exports=WR});var Di=g((ult,cte)=>{"use strict";var mNe=/\s+/g,UR=class t{constructor(e,r){if(r=bNe(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof zR)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(mNe," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(i=>!ute(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&SNe(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let n=0;n<r.length;n++)n>0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&wNe)|(this.options.loose&&ENe))+":"+e,i=ate.get(n);if(i)return i;let o=this.options.loose,s=o?Cn[ln.HYPHENRANGELOOSE]:Cn[ln.HYPHENRANGE];e=e.replace(s,qNe(this.options.includePrerelease)),jt("hyphen replace",e),e=e.replace(Cn[ln.COMPARATORTRIM],yNe),jt("comparator trim",e),e=e.replace(Cn[ln.TILDETRIM],vNe),jt("tilde trim",e),e=e.replace(Cn[ln.CARETTRIM],_Ne),jt("caret trim",e);let a=e.split(" ").map(d=>DNe(d,this.options)).join(" ").split(/\s+/).map(d=>PNe(d,this.options));o&&(a=a.filter(d=>(jt("loose invalid filter",d,this.options),!!d.match(Cn[ln.COMPARATORLOOSE])))),jt("range list",a);let u=new Map,l=a.map(d=>new zR(d,this.options));for(let d of l){if(ute(d))return[d];u.set(d.value,d)}u.size>1&&u.has("")&&u.delete("");let c=[...u.values()];return ate.set(n,c),c}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>lte(n,r)&&e.set.some(i=>lte(i,r)&&n.every(o=>i.every(s=>o.intersects(s,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new xNe(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(INe(this.set[r],e,this.options))return!0;return!1}};cte.exports=UR;var gNe=ste(),ate=new gNe,bNe=hw(),zR=g0(),jt=p0(),xNe=Gr(),{safeRe:Cn,t:ln,comparatorTrimReplace:yNe,tildeTrimReplace:vNe,caretTrimReplace:_Ne}=fd(),{FLAG_INCLUDE_PRERELEASE:wNe,FLAG_LOOSE:ENe}=h0(),ute=t=>t.value==="<0.0.0-0",SNe=t=>t.value==="",lte=(t,e)=>{let r=!0,n=t.slice(),i=n.pop();for(;r&&n.length;)r=n.every(o=>i.intersects(o,e)),i=n.pop();return r},DNe=(t,e)=>(jt("comp",t,e),t=TNe(t,e),jt("caret",t),t=CNe(t,e),jt("tildes",t),t=ONe(t,e),jt("xrange",t),t=FNe(t,e),jt("stars",t),t),cn=t=>!t||t.toLowerCase()==="x"||t==="*",CNe=(t,e)=>t.trim().split(/\s+/).map(r=>kNe(r,e)).join(" "),kNe=(t,e)=>{let r=e.loose?Cn[ln.TILDELOOSE]:Cn[ln.TILDE];return t.replace(r,(n,i,o,s,a)=>{jt("tilde",t,n,i,o,s,a);let u;return cn(i)?u="":cn(o)?u=`>=${i}.0.0 <${+i+1}.0.0-0`:cn(s)?u=`>=${i}.${o}.0 <${i}.${+o+1}.0-0`:a?(jt("replaceTilde pr",a),u=`>=${i}.${o}.${s}-${a} <${i}.${+o+1}.0-0`):u=`>=${i}.${o}.${s} <${i}.${+o+1}.0-0`,jt("tilde return",u),u})},TNe=(t,e)=>t.trim().split(/\s+/).map(r=>ANe(r,e)).join(" "),ANe=(t,e)=>{jt("caret",t,e);let r=e.loose?Cn[ln.CARETLOOSE]:Cn[ln.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(i,o,s,a,u)=>{jt("caret",t,i,o,s,a,u);let l;return cn(o)?l="":cn(s)?l=`>=${o}.0.0${n} <${+o+1}.0.0-0`:cn(a)?o==="0"?l=`>=${o}.${s}.0${n} <${o}.${+s+1}.0-0`:l=`>=${o}.${s}.0${n} <${+o+1}.0.0-0`:u?(jt("replaceCaret pr",u),o==="0"?s==="0"?l=`>=${o}.${s}.${a}-${u} <${o}.${s}.${+a+1}-0`:l=`>=${o}.${s}.${a}-${u} <${o}.${+s+1}.0-0`:l=`>=${o}.${s}.${a}-${u} <${+o+1}.0.0-0`):(jt("no pr"),o==="0"?s==="0"?l=`>=${o}.${s}.${a}${n} <${o}.${s}.${+a+1}-0`:l=`>=${o}.${s}.${a}${n} <${o}.${+s+1}.0-0`:l=`>=${o}.${s}.${a} <${+o+1}.0.0-0`),jt("caret return",l),l})},ONe=(t,e)=>(jt("replaceXRanges",t,e),t.split(/\s+/).map(r=>RNe(r,e)).join(" ")),RNe=(t,e)=>{t=t.trim();let r=e.loose?Cn[ln.XRANGELOOSE]:Cn[ln.XRANGE];return t.replace(r,(n,i,o,s,a,u)=>{jt("xRange",t,n,i,o,s,a,u);let l=cn(o),c=l||cn(s),d=c||cn(a),h=d;return i==="="&&h&&(i=""),u=e.includePrerelease?"-0":"",l?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&h?(c&&(s=0),a=0,i===">"?(i=">=",c?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):i==="<="&&(i="<",c?o=+o+1:s=+s+1),i==="<"&&(u="-0"),n=`${i+o}.${s}.${a}${u}`):c?n=`>=${o}.0.0${u} <${+o+1}.0.0-0`:d&&(n=`>=${o}.${s}.0${u} <${o}.${+s+1}.0-0`),jt("xRange return",n),n})},FNe=(t,e)=>(jt("replaceStars",t,e),t.trim().replace(Cn[ln.STAR],"")),PNe=(t,e)=>(jt("replaceGTE0",t,e),t.trim().replace(Cn[e.includePrerelease?ln.GTE0PRE:ln.GTE0],"")),qNe=t=>(e,r,n,i,o,s,a,u,l,c,d,h)=>(cn(n)?r="":cn(i)?r=`>=${n}.0.0${t?"-0":""}`:cn(o)?r=`>=${n}.${i}.0${t?"-0":""}`:s?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,cn(l)?u="":cn(c)?u=`<${+l+1}.0.0-0`:cn(d)?u=`<${l}.${+c+1}.0-0`:h?u=`<=${l}.${c}.${d}-${h}`:t?u=`<${l}.${c}.${+d+1}-0`:u=`<=${u}`,`${r} ${u}`.trim()),INe=(t,e,r)=>{for(let n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let n=0;n<t.length;n++)if(jt(t[n].semver),t[n].semver!==zR.ANY&&t[n].semver.prerelease.length>0){let i=t[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var g0=g((llt,gte)=>{"use strict";var b0=Symbol("SemVer ANY"),GR=class t{static get ANY(){return b0}constructor(e,r){if(r=fte(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),HR("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===b0?this.value="":this.value=this.operator+this.semver.version,HR("comp",this)}parse(e){let r=this.options.loose?dte[hte.COMPARATORLOOSE]:dte[hte.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new pte(n[2],this.options.loose):this.semver=b0}toString(){return this.value}test(e){if(HR("Comparator.test",e,this.options.loose),this.semver===b0||e===b0)return!0;if(typeof e=="string")try{e=new pte(e,this.options)}catch{return!1}return VR(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new mte(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new mte(this.value,r).test(e.semver):(r=fte(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||VR(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||VR(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};gte.exports=GR;var fte=hw(),{safeRe:dte,t:hte}=fd(),VR=$R(),HR=p0(),pte=Gr(),mte=Di()});var x0=g((clt,bte)=>{"use strict";var jNe=Di(),MNe=(t,e,r)=>{try{e=new jNe(e,r)}catch{return!1}return e.test(t)};bte.exports=MNe});var yte=g((flt,xte)=>{"use strict";var LNe=Di(),NNe=(t,e)=>new LNe(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));xte.exports=NNe});var _te=g((dlt,vte)=>{"use strict";var BNe=Gr(),$Ne=Di(),WNe=(t,e,r)=>{let n=null,i=null,o=null;try{o=new $Ne(e,r)}catch{return null}return t.forEach(s=>{o.test(s)&&(!n||i.compare(s)===-1)&&(n=s,i=new BNe(n,r))}),n};vte.exports=WNe});var Ete=g((hlt,wte)=>{"use strict";var UNe=Gr(),zNe=Di(),VNe=(t,e,r)=>{let n=null,i=null,o=null;try{o=new zNe(e,r)}catch{return null}return t.forEach(s=>{o.test(s)&&(!n||i.compare(s)===1)&&(n=s,i=new UNe(n,r))}),n};wte.exports=VNe});var Cte=g((plt,Dte)=>{"use strict";var YR=Gr(),HNe=Di(),Ste=m0(),GNe=(t,e)=>{t=new HNe(t,e);let r=new YR("0.0.0");if(t.test(r)||(r=new YR("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n<t.set.length;++n){let i=t.set[n],o=null;i.forEach(s=>{let a=new YR(s.semver.version);switch(s.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||Ste(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),o&&(!r||Ste(r,o))&&(r=o)}return r&&t.test(r)?r:null};Dte.exports=GNe});var Tte=g((mlt,kte)=>{"use strict";var YNe=Di(),KNe=(t,e)=>{try{return new YNe(t,e).range||"*"}catch{return null}};kte.exports=KNe});var ww=g((glt,Fte)=>{"use strict";var QNe=Gr(),Rte=g0(),{ANY:ZNe}=Rte,XNe=Di(),JNe=x0(),Ate=m0(),Ote=bw(),eBe=yw(),tBe=xw(),rBe=(t,e,r,n)=>{t=new QNe(t,n),e=new XNe(e,n);let i,o,s,a,u;switch(r){case">":i=Ate,o=eBe,s=Ote,a=">",u=">=";break;case"<":i=Ote,o=tBe,s=Ate,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(JNe(t,e,n))return!1;for(let l=0;l<e.set.length;++l){let c=e.set[l],d=null,h=null;if(c.forEach(p=>{p.semver===ZNe&&(p=new Rte(">=0.0.0")),d=d||p,h=h||p,i(p.semver,d.semver,n)?d=p:s(p.semver,h.semver,n)&&(h=p)}),d.operator===a||d.operator===u||(!h.operator||h.operator===a)&&o(t,h.semver))return!1;if(h.operator===u&&s(t,h.semver))return!1}return!0};Fte.exports=rBe});var qte=g((blt,Pte)=>{"use strict";var nBe=ww(),iBe=(t,e,r)=>nBe(t,e,">",r);Pte.exports=iBe});var jte=g((xlt,Ite)=>{"use strict";var oBe=ww(),sBe=(t,e,r)=>oBe(t,e,"<",r);Ite.exports=sBe});var Nte=g((ylt,Lte)=>{"use strict";var Mte=Di(),aBe=(t,e,r)=>(t=new Mte(t,r),e=new Mte(e,r),t.intersects(e,r));Lte.exports=aBe});var $te=g((vlt,Bte)=>{"use strict";var uBe=x0(),lBe=Si();Bte.exports=(t,e,r)=>{let n=[],i=null,o=null,s=t.sort((c,d)=>lBe(c,d,r));for(let c of s)uBe(c,e,r)?(o=c,i||(i=c)):(o&&n.push([i,o]),o=null,i=null);i&&n.push([i,null]);let a=[];for(let[c,d]of n)c===d?a.push(c):!d&&c===s[0]?a.push("*"):d?c===s[0]?a.push(`<=${d}`):a.push(`${c} - ${d}`):a.push(`>=${c}`);let u=a.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return u.length<l.length?u:e}});var Gte=g((_lt,Hte)=>{"use strict";var Wte=Di(),QR=g0(),{ANY:KR}=QR,y0=x0(),ZR=Si(),cBe=(t,e,r={})=>{if(t===e)return!0;t=new Wte(t,r),e=new Wte(e,r);let n=!1;e:for(let i of t.set){for(let o of e.set){let s=dBe(i,o,r);if(n=n||s!==null,s)continue e}if(n)return!1}return!0},fBe=[new QR(">=0.0.0-0")],Ute=[new QR(">=0.0.0")],dBe=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===KR){if(e.length===1&&e[0].semver===KR)return!0;r.includePrerelease?t=fBe:t=Ute}if(e.length===1&&e[0].semver===KR){if(r.includePrerelease)return!0;e=Ute}let n=new Set,i,o;for(let p of t)p.operator===">"||p.operator===">="?i=zte(i,p,r):p.operator==="<"||p.operator==="<="?o=Vte(o,p,r):n.add(p.semver);if(n.size>1)return null;let s;if(i&&o){if(s=ZR(i.semver,o.semver,r),s>0)return null;if(s===0&&(i.operator!==">="||o.operator!=="<="))return null}for(let p of n){if(i&&!y0(p,String(i),r)||o&&!y0(p,String(o),r))return null;for(let b of e)if(!y0(p,String(b),r))return!1;return!0}let a,u,l,c,d=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,h=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;d&&d.prerelease.length===1&&o.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(let p of e){if(c=c||p.operator===">"||p.operator===">=",l=l||p.operator==="<"||p.operator==="<=",i){if(h&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===h.major&&p.semver.minor===h.minor&&p.semver.patch===h.patch&&(h=!1),p.operator===">"||p.operator===">="){if(a=zte(i,p,r),a===p&&a!==i)return!1}else if(i.operator===">="&&!y0(i.semver,String(p),r))return!1}if(o){if(d&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===d.major&&p.semver.minor===d.minor&&p.semver.patch===d.patch&&(d=!1),p.operator==="<"||p.operator==="<="){if(u=Vte(o,p,r),u===p&&u!==o)return!1}else if(o.operator==="<="&&!y0(o.semver,String(p),r))return!1}if(!p.operator&&(o||i)&&s!==0)return!1}return!(i&&l&&!o&&s!==0||o&&c&&!i&&s!==0||h||d)},zte=(t,e,r)=>{if(!t)return e;let n=ZR(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},Vte=(t,e,r)=>{if(!t)return e;let n=ZR(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};Hte.exports=cBe});var Zte=g((wlt,Qte)=>{"use strict";var XR=fd(),Yte=h0(),hBe=Gr(),Kte=MR(),pBe=dl(),mBe=_ee(),gBe=Eee(),bBe=Cee(),xBe=Aee(),yBe=Ree(),vBe=Pee(),_Be=Iee(),wBe=Mee(),EBe=Si(),SBe=$ee(),DBe=Uee(),CBe=gw(),kBe=Gee(),TBe=Kee(),ABe=m0(),OBe=bw(),RBe=NR(),FBe=BR(),PBe=xw(),qBe=yw(),IBe=$R(),jBe=ite(),MBe=g0(),LBe=Di(),NBe=x0(),BBe=yte(),$Be=_te(),WBe=Ete(),UBe=Cte(),zBe=Tte(),VBe=ww(),HBe=qte(),GBe=jte(),YBe=Nte(),KBe=$te(),QBe=Gte();Qte.exports={parse:pBe,valid:mBe,clean:gBe,inc:bBe,diff:xBe,major:yBe,minor:vBe,patch:_Be,prerelease:wBe,compare:EBe,rcompare:SBe,compareLoose:DBe,compareBuild:CBe,sort:kBe,rsort:TBe,gt:ABe,lt:OBe,eq:RBe,neq:FBe,gte:PBe,lte:qBe,cmp:IBe,coerce:jBe,Comparator:MBe,Range:LBe,satisfies:NBe,toComparators:BBe,maxSatisfying:$Be,minSatisfying:WBe,minVersion:UBe,validRange:zBe,outside:VBe,gtr:HBe,ltr:GBe,intersects:YBe,simplifyRange:KBe,subset:QBe,SemVer:hBe,re:XR.re,src:XR.src,tokens:XR.t,SEMVER_SPEC_VERSION:Yte.SEMVER_SPEC_VERSION,RELEASE_TYPES:Yte.RELEASE_TYPES,compareIdentifiers:Kte.compareIdentifiers,rcompareIdentifiers:Kte.rcompareIdentifiers}});function pr(t,e,r){return{start:{line:t,character:e},end:{line:t,character:e+r}}}function za(t,e,r,n,i){return{type:t,value:e,range:pr(r,n,e.length),selectionRange:pr(r,n,e.length),...i}}function gl(t,e,r){return za("text",t,e,r)}function r$e(t,e,r){return(0,mre.default)(e.sticky),e.lastIndex=r,e.exec(t)}function Tw(t,e,r){let n=t.value,i=t.range.start.line,o=t.range.start.character,s=[],a=0,u=-1;do u=n.indexOf(e,u+1),u>=0&&(r?r.find(l=>{let c=r$e(n,l.pattern,u);if(!c)return!1;let d=l.parse(c,i,o);return d?(a<u-1&&s.push(gl(n.substring(a,u),i,o+a)),s.push(d),a=c.indices[0][1],u=a,!0):!1}):(s.push(gl(n.substring(a,u),i,o+a)),u+=e.length,a=u));while(u>=0);return a<=n.length-1&&s.push(gl(n.substring(a),i,o+a)),s}function n$e(t){return Tw(t,"|").map(e=>{let r=e.value.indexOf("="),n=gl(e.value.substring(0,r),e.range.start.line,e.range.start.character),i=gl(e.value.substring(r+1),e.range.start.line,e.range.start.character+r+1);return{type:"plural_option",range:e.range,selectionRange:e.selectionRange,children:[...Tw(n,",").map(o=>{if(o.value==="rest")return{type:"plural_match",value:"rest",range:o.range,selectionRange:o.selectionRange};let s=o.value.match(/^(ends in )?(\d+)(?:-(\d+))?$/d);return s?{type:"plural_match",value:s[3]?[parseInt(s[2]),parseInt(s[3])]:parseInt(s[2]),ends_in:s[1]?!0:void 0,range:o.range,selectionRange:o.selectionRange}:{type:"error",value:o.value,range:o.range,selectionRange:o.selectionRange}}),...Tw(i,"__",gre)]}})}function tF(t){let e=t.open_comments;t.open_comments=[];let r=e[0],n=e[e.length-1];return{type:"comment_group",range:{start:r.range.start,end:n.range.end},selectionRange:r.selectionRange,children:e}}function bre(t){let e={root:{type:"root",children:[],range:{start:{line:0,character:0},end:{line:t.lineCount,character:0}},selectionRange:pr(0,0,0)},open_comments:[]};for(let r=0;r<t.lineCount;r++){let n={start:{line:r,character:0},end:{line:r,character:1/0}},i=t.getText(n).replace(/((\r\n)|\r|\n)$/,"");for(let o of i$e){let s=o.pattern.exec(i);if(s){o.parse(s,r,e);break}}}return e.root}var mre,gre,i$e,xre=dt(()=>{"use strict";mre=pe(require("assert"));gre=[{pattern:/__([0-9]+)__/dy,parse(t,e,r){return{type:"parameter",value:parseInt(t[1]),range:pr(e,r+t.index,t[0].length),selectionRange:pr(e,r+t.indices[1][0],t[1].length)}}},{pattern:/__plural_for_parameter__([0-9]+)__\{(.*?)\}__/dy,parse(t,e,r){return{type:"plural",value:parseInt(t[1]),children:n$e(gl(t[2],e,r+t.indices[2][0])),range:pr(e,r+t.index,t[0].length),selectionRange:pr(e,r+t.indices[1][0],t[1].length)}}},{pattern:/__(CONTROL_(?:MOVE|(?:LEFT|RIGHT)_CLICK|KEY_(?:SHIFT|CTRL)|STYLE_(?:BEGIN|END)))__/dy,parse(t,e,r){return{type:"macro",name:t[1],children:[],range:pr(e,r+t.index,t[0].length),selectionRange:pr(e,r+t.indices[1][0],t[1].length)}}},{pattern:/__(REMARK_COLOR_(?:BEGIN|END))__/dy,parse(t,e,r){return{type:"macro",name:t[1],children:[],range:pr(e,r+t.index,t[0].length),selectionRange:pr(e,r+t.indices[1][0],t[1].length)}}},{pattern:/__(CONTROL(?:_MODIFIER)?|ENTITY|ITEM|TILE|FLUID|PLANET)__(.+?)__/dy,parse(t,e,r){return{type:"macro",name:t[1],children:[za("macro_argument",t[2],e,r+t.indices[2][0])],range:pr(e,r+t.index,t[0].length),selectionRange:pr(e,r+t.indices[1][0],t[1].length)}}},{pattern:/__(ALT_CONTROL)__(.+?)__(.+?)__/dy,parse(t,e,r){return{type:"macro",name:t[1],children:[za("macro_argument",t[2],e,r+t.indices[2][0]),za("macro_argument",t[3],e,r+t.indices[3][0])],range:pr(e,r+t.index,t[0].length),selectionRange:pr(e,r+t.indices[1][0],t[1].length)}}},{pattern:/__(ALT_CONTROL_(?:LEFT|RIGHT)_CLICK)__(.+?)__/dy,parse(t,e,r){return{type:"macro",name:t[1],children:[za("macro_argument",t[2],e,r+t.indices[1][0])],range:pr(e,r+t.index,t[0].length),selectionRange:pr(e,r+t.indices[1][0],t[1].length)}}}];i$e=[{pattern:/^[\r\t ]*([#;].*)?$/d,parse(t,e,r){t[1]?r.open_comments.push(za("comment",t[1],e,t.indices[1][0])):r.open_comments.length>0&&(r.open_section??r.root).children.push(tF(r))}},{pattern:/^[\r\t ]*\[(.*?)\][\r\t ]*$/d,parse(t,e,r){r.open_section=za("section",t[1],e,t.indices[1][0],{children:[]}),r.open_comments.length>0&&r.open_section.children.push(tF(r)),r.open_section.range.start.character-=1,r.open_section.range.end.character+=1,r.root.children.push(r.open_section)}},{pattern:/^[\r\t ]*(.*?)=(.*)$/d,parse(t,e,r){let n=za("record",t[1],e,t.indices[1][0],{children:[...Tw(gl(t[2],e,t.indices[2][0]),"__",gre)]});r.open_comments.length>0&&n.children.unshift(tF(r)),n.range.end.character=t[0].length,(r.open_section??r.root).children.push(n)}},{pattern:/^.*$/d,parse(t,e,r){r.root.children.push({type:"error",value:t[0],range:pr(e,0,t[0].length),selectionRange:pr(e,0,0)})}}]});function o$e(t){if(rF.has(t))return rF.get(t);if(t.startsWith("#")){let r=t.match(/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/);if(r)return{red:parseInt(r[1],16)/255,green:parseInt(r[2],16)/255,blue:parseInt(r[3],16)/255,alpha:r[4]?parseInt(r[4],16)/255:1}}let e=t.match(/\s*(\d+(?:\.\d+)?)\s*,?\s*(\d+(?:\.\d+)?)\s*,?\s*(\d+(?:\.\d+)?)(?:\s*,?\s*(\d+(?:\.\d+)?))?\s*/);if(e){let r=parseFloat(e[1]),n=parseFloat(e[2]),i=parseFloat(e[3]),o=e[4]?parseFloat(e[4]):void 0;return(r>1||n>1||i>1||o&&o>1)&&(r=r/255,n=n/255,i=i/255,o&&(o=o/255)),o||(o=1),{red:r,green:n,blue:i,alpha:o}}}function bl(t){let e=Math.floor(t).toString(16);return e.length<2&&(e="0"+e),e}function xl(t,e){return Math.round(t*Math.pow(10,e))/Math.pow(10,e)}function s$e(t){let e=[];for(let[r,n]of rF)if(Math.abs(n.red-t.red)<.004&&Math.abs(n.green-t.green)<.004&&Math.abs(n.blue-t.blue)<.004&&Math.abs(n.alpha-t.alpha)<.004){e.push(r);break}return t.alpha>.996?(e.push(`#${bl(t.red*255)}${bl(t.green*255)}${bl(t.blue*255)}`),e.push(`${Math.floor(t.red*255)}, ${Math.floor(t.green*255)}, ${Math.floor(t.blue*255)}`),e.push(`${xl(t.red,3)}, ${xl(t.green,3)}, ${xl(t.blue,3)}`)):(e.push(`#${bl(t.red*255)}${bl(t.green*255)}${bl(t.blue*255)}${bl(t.alpha*255)}`),e.push(`${Math.floor(t.red*255)}, ${Math.floor(t.green*255)}, ${Math.floor(t.blue*255)}, ${Math.floor(t.alpha*255)}`),e.push(`${xl(t.red,3)}, ${xl(t.green,3)}, ${xl(t.blue,3)}, ${xl(t.alpha,3)}`)),e}function a$e(t,e){let r=[];return oh(t,"record",(n,i)=>{let o=i.length>0?i[i.length-1]:void 0,s=o?.type==="section"?o.value:void 0;r.push({name:s?`${s}.${n.value}`:n.value,link:{targetUri:e,targetRange:n.range,targetSelectionRange:n.selectionRange}})}),r}function yre(t){return t!==void 0}function vre(t){return{name:t.value?t.value:"<error>",detail:"",kind:kn.SymbolKind.String,range:t.range,selectionRange:t.selectionRange,children:[]}}function u$e(t){return{name:t.value?t.value:"<error>",detail:"",kind:kn.SymbolKind.Namespace,range:t.range,selectionRange:t.selectionRange,children:t.children.map(e=>{switch(e.type){case"record":return vre(e);default:return}}).filter(yre)}}function l$e(t){return t.children.map(e=>{switch(e.type){case"section":return u$e(e);case"record":return vre(e);default:return}}).filter(yre)}var kn,rF,Aw,_re=dt(()=>{"use strict";kn=pe(Vh());Hx();xre();rF=new Map([["default",{red:1,green:.63,blue:.259,alpha:1}],["red",{red:1,green:.166,blue:.141,alpha:1}],["green",{red:.173,green:.824,blue:.25,alpha:1}],["blue",{red:.343,green:.683,blue:1,alpha:1}],["orange",{red:1,green:.63,blue:.259,alpha:1}],["yellow",{red:1,green:.828,blue:.231,alpha:1}],["pink",{red:1,green:.52,blue:.633,alpha:1}],["purple",{red:.821,green:.44,blue:.998,alpha:1}],["white",{red:.9,green:.9,blue:.9,alpha:1}],["black",{red:.5,green:.5,blue:.5,alpha:1}],["gray",{red:.7,green:.7,blue:.7,alpha:1}],["brown",{red:.757,green:.522,blue:.371,alpha:1}],["cyan",{red:.335,green:.918,blue:.866,alpha:1}],["acid",{red:.708,green:.996,blue:.134,alpha:1}]]);Aw=class{hasDiagnosticRelatedInformationCapability=!1;async validateTextDocument(e){let r=e.getText().split(/\r?\n/),n=[],i=this.onDocumentSymbol(e),o,s=new Map;s.set(void 0,new Set);for(let a=0;a<r.length;a++){let u=r[a];if(!u.match(/^[ \r\t]*[#;]/)){if(u.match(/^[ \r\t]*\[/)){let l=u.match(/^[ \r\t]*\[([^\[]+)\][ \r\t]*$/d);if(l)if(o=l[1],s.has(o)){let c=i.filter(p=>p.name===o),d=c.reduce((p,b)=>p.range.start.line<b.range.start.line?p:b),h=c.find(p=>p.range.start.line===a);n.push({message:"Duplicate Section",source:"factorio-locale",severity:kn.DiagnosticSeverity.Error,range:{start:{line:a,character:l.indices[1][0]},end:{line:a,character:l.indices[1][1]}},relatedInformation:this.hasDiagnosticRelatedInformationCapability?[{location:{uri:e.uri,range:d.range},message:"First defined here"}]:void 0,code:"section.merge",data:{firstsym:d,newsym:h}})}else if(s.get(void 0).has(o)){let d=i.filter(h=>h.name===o).reduce((h,p)=>h.range.start.line<p.range.start.line?h:p);n.push({message:"Section Name conflicts with Key in Root",source:"factorio-locale",severity:kn.DiagnosticSeverity.Error,range:{start:{line:a,character:l.indices[1][0]},end:{line:a,character:l.indices[1][1]}},relatedInformation:this.hasDiagnosticRelatedInformationCapability?[{location:{uri:e.uri,range:d.range},message:"First defined here"}]:void 0,code:"section.rootconflict"}),s.set(o,new Set)}else s.set(o,new Set);else n.push({message:"Invalid Section Header",source:"factorio-locale",severity:kn.DiagnosticSeverity.Error,range:{start:{line:a,character:0},end:{line:a,character:u.length}},code:"section.invalid"})}else if(u.trim().length>0){let l=u.match(/^[ \r\t]*([^=]*)=(.*)$/d);if(l&&l[1]){let c=l[1];if(s.get(o).has(c)){let h=i.filter(p=>p.name===o&&p.kind===kn.SymbolKind.Namespace).flatMap(p=>p.children?.filter(b=>b.name===c)??[]).concat(i.filter(p=>p.name===c&&p.kind===kn.SymbolKind.String));if(h.length>0){let p=h.reduce((b,x)=>b.range.start.line<x.range.start.line?b:x);n.push({message:"Duplicate Key",source:"factorio-locale",severity:kn.DiagnosticSeverity.Error,code:"key.duplicate",range:{start:{line:a,character:l.indices[1][0]},end:{line:a,character:l.indices[1][1]}},relatedInformation:this.hasDiagnosticRelatedInformationCapability?[{location:{uri:e.uri,range:p.range},message:"First defined here"}]:void 0})}}else s.get(o).add(c);let d=c.match(/[\t ]+$/d);d&&n.push({message:"Key ends with whitespace",source:"factorio-locale",severity:kn.DiagnosticSeverity.Warning,code:"key.whitespace-end",range:{start:{line:a,character:l.indices[1][0]+d.index},end:{line:a,character:l.indices[1][1]}}})}else n.push({message:"Invalid Key",source:"factorio-locale",severity:kn.DiagnosticSeverity.Error,code:"key.invalid",range:{start:{line:a,character:0},end:{line:a,character:u.length}}})}}}return n}definitions=new Map;documentTrees=new Map;loadDocument(e){let r=bre(e);this.documentTrees.set(e.uri,r),this.definitions.set(e.uri,a$e(r,e.uri))}clearDocument(e){this.definitions.has(e)&&this.definitions.delete(e),this.documentTrees.has(e)&&this.documentTrees.delete(e)}clearFolder(e){for(let r of this.definitions.keys())r.startsWith(e)&&this.definitions.delete(r);for(let r of this.documentTrees.keys())r.startsWith(e)&&this.documentTrees.delete(r)}onDocumentSymbol(e){this.documentTrees.has(e.uri)||this.loadDocument(e);let r=this.documentTrees.get(e.uri);return r?l$e(r):[]}findDefinitions(e){let r=[];for(let n of this.definitions.values())r.push(...n.filter(i=>i.name===e).map(i=>i.link));return r}getCompletions(e){let r=[];for(let n of this.definitions.values())e?r.push(n.map(i=>i.name).filter(i=>i.startsWith(e))):r.push(n.map(i=>i.name).map(i=>{let o=i.indexOf(".");return o===-1?i:i.substring(0,o+1)}));return[...new Set(r.flat())]}onCodeAction(e,r,n){return e.languageId==="factorio-locale"?n.diagnostics.filter(i=>!!i.code).map(i=>{switch(i.code){case"section.merge":{let o=i,s=o.data.firstsym.range.end;return{title:"Merge Sections",kind:kn.CodeActionKind.QuickFix+".section.merge",diagnostics:[i],edit:{changes:{[e.uri]:[{range:o.data.newsym.range,newText:""},{range:{start:s,end:s},newText:e.getText({start:{line:o.data.newsym.selectionRange.end.line,character:o.data.newsym.selectionRange.end.character+1},end:o.data.newsym.range.end})}]}}}}default:return}}).filter(i=>!!i):[]}onDocumentColor(e){let r=[];for(let n=0;n<e.lineCount;n++){let i={start:{line:n,character:0},end:{line:n,character:1/0}},o=e.getText(i).replace(/(\r\n)|\r|\n$/,"");i.end.character=o.length;let s=/\[color=([^\]]+)\]/g,a=s.exec(o);for(;a;){{let u=o$e(a[1]);u&&r.push({color:u,range:{start:{line:n,character:a.index+7},end:{line:n,character:a.index+7+a[1].length}}})}a=s.exec(o)}}return r}onColorPresentation(e,r){return s$e(e).map(n=>({label:n,textEdit:{range:r,newText:n}}))}}});var nF,Ow,wre=dt(()=>{"use strict";nF=pe(Vh()),Ow=class{constructor(e){this.Locale=e}onDefinition(e,r){let n=r.getText({start:{line:e.position.line,character:0},end:{line:e.position.line,character:Number.MAX_VALUE}});for(let i of n.matchAll(/(['"])((?:[^\\](?<!\1)|\\['"0abfnrtv\\]|\\\d{1,3}|\\x[0-9a-fA-F]{2})*)\1/g))if(i.index&&i.index<=e.position.character&&i.index+i[0].length>=e.position.character){let o=i[2],s={start:{line:e.position.line,character:i.index},end:{line:e.position.line,character:i.index+i[0].length}};return this.Locale.findDefinitions(o).map(u=>Object.assign({originSelectionRange:s},u))}}onCompletion(e,r){let i=r.getText({start:{line:e.position.line,character:0},end:{line:e.position.line,character:e.position.character+1}}).match(/(['"])((?:[^\\](?<!\1)|\\['"0abfnrtv\\]|\\\d{1,3}|\\x[0-9a-fA-F]{2})*)\1$/);if(i){let o=i[2].lastIndexOf("."),s=o!==-1?i[2].substring(0,o+1):"";return this.Locale.getCompletions(s).map(a=>({label:a.endsWith(".")?a.substring(0,a.length-1):a,kind:a.endsWith(".")?nF.CompletionItemKind.Enum:nF.CompletionItemKind.EnumMember,commitCharacters:a.endsWith(".")?["."]:[],textEdit:{newText:a.endsWith(".")?a.substring(0,a.length-1):a,range:{start:{line:e.position.line,character:i.index+1},end:{line:e.position.line,character:e.position.character}}}}))}return[]}}});var Sre={};_s(Sre,{runLanguageServer:()=>c$e});async function c$e(){let t=new Hh,e=new Aw,r=new Ow(e),n=(0,Ci.createConnection)(Ci.ProposedFeatures.all),i=new Ci.TextDocuments(Gc);async function o(l){let c=i.get(l);if(c)return c;let d=Jr.parse(l);if(d.scheme==="file"&&d.path.endsWith(".cfg"))return c=Gc.create(l,"factorio-locale",1,await Ere.readFile(d.fsPath,"utf8")),c}async function s(l){let c=await o(l);c&&c.languageId==="factorio-locale"&&e.loadDocument(c)}async function a(l){let c=Jr.parse(l);if(c.scheme==="file"){let d=Au(c.fsPath,{pattern:"**/locale/*/*.cfg"});d.on("match",h=>{s(Jr.file(h.absolute).toString())}),d.on("error",h=>{throw h}),await new Promise(h=>{d.on("end",()=>{h()})})}}let u=!1;return n.onInitialize(async l=>{let c=l.capabilities;u=!!(c.workspace&&c.workspace.workspaceFolders),e.hasDiagnosticRelatedInformationCapability=!!(c.textDocument&&c.textDocument.publishDiagnostics&&c.textDocument.publishDiagnostics.relatedInformation);let d={capabilities:{textDocumentSync:Ci.TextDocumentSyncKind.Incremental,documentSymbolProvider:!0,codeActionProvider:!0,colorProvider:!0,definitionProvider:!0,completionProvider:{triggerCharacters:['"',"'","."],allCommitCharacters:["."]}}};return u&&(d.capabilities.workspace={workspaceFolders:{supported:!0,changeNotifications:!0}},l.workspaceFolders&&await Promise.all(l.workspaceFolders.map(h=>a(h.uri)))),d}),n.onInitialized(()=>{u&&n.workspace.onDidChangeWorkspaceFolders(async l=>{for(let c of l.removed)e.clearFolder(c.uri);for(let c of l.added)await a(c.uri)})}),i.onDidClose(l=>{switch(l.document.languageId){case"factorio-locale":n.sendDiagnostics({uri:l.document.uri,diagnostics:[]});break;case"factorio-changelog":n.sendDiagnostics({uri:l.document.uri,diagnostics:[]});break}}),i.onDidChangeContent(async l=>{switch(l.document.languageId){case"factorio-locale":e.loadDocument(l.document),n.sendDiagnostics({uri:l.document.uri,diagnostics:await e.validateTextDocument(l.document)});break;case"factorio-changelog":n.sendDiagnostics({uri:l.document.uri,diagnostics:await t.validateTextDocument(l.document)});break}}),n.onDefinition(async l=>{let c=await o(l.textDocument.uri);return c&&c.languageId==="lua"?r.onDefinition(l,c):null}),n.onCompletion(async l=>{let c=await o(l.textDocument.uri);if(c&&c.languageId==="lua")return{isIncomplete:!0,items:r.onCompletion(l,c)}}),n.onDidChangeWatchedFiles(async l=>{for(let c of l.changes)switch(c.type){case Ci.FileChangeType.Deleted:e.clearDocument(c.uri);break;case Ci.FileChangeType.Changed:case Ci.FileChangeType.Created:let d=await o(c.uri);d&&d.languageId==="factorio-locale"&&e.loadDocument(d);break;default:break}}),n.onDocumentSymbol(l=>{let c=i.get(l.textDocument.uri);if(c)switch(c.languageId){case"factorio-locale":return e.onDocumentSymbol(c);case"factorio-changelog":return t.onDocumentSymbol(c)}return null}),n.onCodeAction(l=>{let c=i.get(l.textDocument.uri);if(c)switch(c.languageId){case"factorio-locale":return e.onCodeAction(c,l.range,l.context);case"factorio-changelog":return t.onCodeAction(c,l.range,l.context)}return null}),n.onDocumentColor(l=>{let c=i.get(l.textDocument.uri);if(c)switch(c.languageId){case"factorio-locale":return e.onDocumentColor(c)}return null}),n.onColorPresentation(l=>{let c=i.get(l.textDocument.uri);if(c)switch(c.languageId){case"factorio-locale":return e.onColorPresentation(l.color,l.range)}return null}),i.listen(n),n.listen(),new Promise(l=>{n.onExit(l)})}var Ere,Ci,Dre=dt(()=>{"use strict";Ere=pe(require("fs/promises")),Ci=pe(Vh());_6();vk();_re();Fc();Ay();wre()});var f4=pe(c4(),1),{program:vt,createCommand:y$e,createArgument:v$e,createOption:_$e,CommanderError:w$e,InvalidArgumentError:E$e,InvalidOptionArgumentError:S$e,Command:D$e,Argument:C$e,Option:k$e,Help:T$e}=f4.default;var h4="Factorio Modding Tool Kit",p4="2.0.1";var ws=t=>t.name==="up"||t.name==="k"||t.ctrl&&t.name==="p",Ol=t=>t.name==="down"||t.name==="j"||t.ctrl&&t.name==="n",m4=t=>t.name==="space",Rl=t=>t.name==="backspace",J0=t=>"123456789".includes(t.name),sr=t=>t.name==="enter"||t.name==="return";var Qa=class extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(e){super(),this.cause=e?.cause}},em=class extends Error{name="CancelPromptError";message="Prompt was canceled"},tm=class extends Error{name="ExitPromptError"},rm=class extends Error{name="HookError"},Es=class extends Error{name="ValidationError"};var x2=require("node:async_hooks");var nm=require("node:async_hooks");var g4=new nm.AsyncLocalStorage;function Eie(t){return{rl:t,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function b4(t,e){let r=Eie(t);return g4.run(r,()=>{function n(i){r.handleChange=()=>{r.index=0,i()},r.handleChange()}return e(n)})}function Za(){let t=g4.getStore();if(!t)throw new rm("[Inquirer] Hook functions can only be called from within a prompt");return t}function g2(){return Za().rl}function b2(t){let e=(...r)=>{let n=Za(),i=!1,o=n.handleChange;n.handleChange=()=>{i=!0};let s=t(...r);return i&&o(),n.handleChange=o,s};return nm.AsyncResource.bind(e)}function Fl(t){let e=Za(),{index:r}=e,n={get(){return e.hooks[r]},set(o){e.hooks[r]=o},initialized:r in e.hooks},i=t(n);return e.index++,i}function x4(){Za().handleChange()}var Xa={queue(t){let e=Za(),{index:r}=e;e.hooksEffect.push(()=>{e.hooksCleanup[r]?.();let n=t(g2());if(n!=null&&typeof n!="function")throw new Es("useEffect return value must be a cleanup function or nothing.");e.hooksCleanup[r]=n})},run(){let t=Za();b2(()=>{t.hooksEffect.forEach(e=>{e()}),t.hooksEffect.length=0})()},clearAll(){let t=Za();t.hooksCleanup.forEach(e=>{e?.()}),t.hooksEffect.length=0,t.hooksCleanup.length=0}};function De(t){return Fl(e=>{let r=i=>{e.get()!==i&&(e.set(i),x4())};if(e.initialized)return[e.get(),r];let n=typeof t=="function"?t():t;return e.set(n),[n,r]})}function Ri(t,e){Fl(r=>{let n=r.get();(!Array.isArray(n)||e.some((o,s)=>!Object.is(o,n[s])))&&Xa.queue(t),r.set(e)})}var Jn=pe(Ss(),1);var Fi=pe(require("node:process"),1);function Cie(){return Fi.default.platform!=="win32"?Fi.default.env.TERM!=="linux":!!Fi.default.env.WT_SESSION||!!Fi.default.env.TERMINUS_SUBLIME||Fi.default.env.ConEmuTask==="{cmd::Cmder}"||Fi.default.env.TERM_PROGRAM==="Terminus-Sublime"||Fi.default.env.TERM_PROGRAM==="vscode"||Fi.default.env.TERM==="xterm-256color"||Fi.default.env.TERM==="alacritty"||Fi.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var v4={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},_4={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},kie={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},Tie={...v4,..._4},Aie={...v4,...kie},Oie=Cie(),Rie=Oie?Tie:Aie,Xn=Rie,B$e=Object.entries(_4);var w4={prefix:{idle:Jn.default.blue("?"),done:Jn.default.green(Xn.tick)},spinner:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"].map(t=>Jn.default.yellow(t))},style:{answer:Jn.default.cyan,message:Jn.default.bold,error:t=>Jn.default.red(`> ${t}`),defaultAnswer:t=>Jn.default.dim(`(${t})`),help:Jn.default.dim,highlight:Jn.default.cyan,key:t=>Jn.default.cyan(Jn.default.bold(`<${t}>`))}};function E4(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function S4(...t){let e={};for(let r of t)for(let[n,i]of Object.entries(r)){let o=e[n];e[n]=E4(o)&&E4(i)?S4(o,i):i}return e}function $t(...t){let e=[w4,...t.filter(r=>r!=null)];return S4(...e)}function Zt({status:t="idle",theme:e}){let[r,n]=De(!1),[i,o]=De(0),{prefix:s,spinner:a}=$t(e);return Ri(()=>{if(t==="loading"){let l,c=-1,d=setTimeout(x2.AsyncResource.bind(()=>{n(!0),l=setInterval(x2.AsyncResource.bind(()=>{c=c+1,o(c%a.frames.length)}),a.interval)}),300);return()=>{clearTimeout(d),clearInterval(l)}}else n(!1)},[t]),r?a.frames[i]:typeof s=="string"?s:s[t==="loading"?"idle":t]}function On(t,e){return Fl(r=>{let n=r.get();if(!n||n.dependencies.length!==e.length||n.dependencies.some((i,o)=>i!==e[o])){let i=t();return r.set({value:i,dependencies:e}),i}return n.value})}function ei(t){return De({current:t})[0]}function Xt(t){let e=ei(t);e.current=t,Ri(r=>{let n=!1,i=b2((o,s)=>{n||e.current(s,r)});return r.input.on("keypress",i),()=>{n=!0,r.input.removeListener("keypress",i)}},[])}var J4=pe(C4(),1),eP=pe(X4(),1);function Od(t,e){return t.split(`
|
|
115
|
+
`);return at.from(r)};ud.decodePax=function(e){let r={};for(;e.length;){let n=0;for(;n<e.length&&e[n]!==32;)n++;let i=parseInt(at.toString(e.subarray(0,n)),10);if(!i)return r;let o=at.toString(e.subarray(n+1,i-1)),s=o.indexOf("=");if(s===-1)return r;r[o.slice(0,s)]=o.slice(s+1),e=e.subarray(i)}return r};ud.encode=function(e){let r=at.alloc(512),n=e.name,i="";if(e.typeflag===5&&n[n.length-1]!=="/"&&(n+="/"),at.byteLength(n)!==n.length)return null;for(;at.byteLength(n)>100;){let o=n.indexOf("/");if(o===-1)return null;i+=i?"/"+n.slice(0,o):n.slice(0,o),n=n.slice(o+1)}return at.byteLength(n)>100||at.byteLength(i)>155||e.linkname&&at.byteLength(e.linkname)>100?null:(at.write(r,n),at.write(r,Na(e.mode&TLe,6),100),at.write(r,Na(e.uid,6),108),at.write(r,Na(e.gid,6),116),ILe(e.size,r,124),at.write(r,Na(e.mtime.getTime()/1e3|0,11),136),r[156]=fw+PLe(e.type),e.linkname&&at.write(r,e.linkname,157),at.copy(PJ,r,f0),at.copy(DLe,r,wR),e.uname&&at.write(r,e.uname,265),e.gname&&at.write(r,e.gname,297),at.write(r,Na(e.devmajor||0,6),329),at.write(r,Na(e.devminor||0,6),337),i&&at.write(r,i,345),at.write(r,Na(IJ(r),6),148),r)};ud.decode=function(e,r,n){let i=e[156]===0?0:e[156]-fw,o=ad(e,0,100,r),s=La(e,100,8),a=La(e,108,8),u=La(e,116,8),l=La(e,124,12),c=La(e,136,12),d=FLe(i),h=e[157]===0?null:ad(e,157,100,r),p=ad(e,265,32),b=ad(e,297,32),x=La(e,329,8),D=La(e,337,8),v=IJ(e);if(v===8*32)return null;if(v!==La(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(ALe(e))e[345]&&(o=ad(e,345,155,r)+"/"+o);else if(!OLe(e)){if(!n)throw new Error("Invalid tar header: unknown format.")}return i===0&&o&&o[o.length-1]==="/"&&(i=5),{name:o,mode:s,uid:a,gid:u,size:l,mtime:new Date(1e3*c),type:d,linkname:h,uname:p,gname:b,devmajor:x,devminor:D,pax:null}};function ALe(t){return at.equals(PJ,t.subarray(f0,f0+6))}function OLe(t){return at.equals(CLe,t.subarray(f0,f0+6))&&at.equals(kLe,t.subarray(wR,wR+2))}function RLe(t,e,r){return typeof t!="number"?r:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)}function FLe(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}function PLe(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}function qJ(t,e,r,n){for(;r<n;r++)if(t[r]===e)return r;return n}function IJ(t){let e=256;for(let r=0;r<148;r++)e+=t[r];for(let r=156;r<512;r++)e+=t[r];return e}function Na(t,e){return t=t.toString(8),t.length>e?SLe.slice(0,e)+" ":ELe.slice(0,e-t.length)+t+" "}function qLe(t,e,r){e[r]=128;for(let n=11;n>0;n--)e[r+n]=t&255,t=Math.floor(t/256)}function ILe(t,e,r){t.toString(8).length>11?qLe(t,e,r):at.write(e,Na(t,11),r)}function jLe(t){let e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;let r=[],n;for(n=t.length-1;n>0;n--){let s=t[n];e?r.push(s):r.push(255-s)}let i=0,o=r.length;for(n=0;n<o;n++)i+=r[n]*Math.pow(256,n);return e?i:-1*i}function La(t,e,r){if(t=t.subarray(e,e+r),e=0,t[e]&128)return jLe(t);{for(;e<t.length&&t[e]===32;)e++;let n=RLe(qJ(t,32,e,t.length),t.length,t.length);for(;e<n&&t[e]===0;)e++;return n===e?0:parseInt(at.toString(t.subarray(e,n)),8)}}function ad(t,e,r,n){return at.toString(t.subarray(e,qJ(t,0,e,e+r)),n)}function _R(t){let e=at.byteLength(t),r=Math.floor(Math.log(e)/Math.log(10))+1;return e+r>=Math.pow(10,r)&&r++,e+r+t}});var BJ=g((Dut,NJ)=>{"use strict";var{Writable:MLe,Readable:LLe,getStreamError:jJ}=vR(),NLe=iR(),MJ=cw(),ld=ER(),BLe=MJ.alloc(0),DR=class{constructor(){this.buffered=0,this.shifted=0,this.queue=new NLe,this._offset=0}push(e){this.buffered+=e.byteLength,this.queue.push(e)}shiftFirst(e){return this._buffered===0?null:this._next(e)}shift(e){if(e>this.buffered)return null;if(e===0)return BLe;let r=this._next(e);if(e===r.byteLength)return r;let n=[r];for(;(e-=r.byteLength)>0;)r=this._next(e),n.push(r);return MJ.concat(n)}_next(e){let r=this.queue.peek(),n=r.byteLength-this._offset;if(e>=n){let i=this._offset?r.subarray(this._offset,r.byteLength):r;return this.queue.shift(),this._offset=0,this.buffered-=n,this.shifted+=n,i}return this.buffered-=e,this.shifted+=e,r.subarray(this._offset,this._offset+=e)}},CR=class extends LLe{constructor(e,r,n){super(),this.header=r,this.offset=n,this._parent=e}_read(e){this.header.size===0&&this.push(null),this._parent._stream===this&&this._parent._update(),e(null)}_predestroy(){this._parent.destroy(jJ(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=LJ(this.header.size),this._parent._update())}_destroy(e){this._detach(),e(null)}},kR=class extends MLe{constructor(e){super(e),e||(e={}),this._buffer=new DR,this._offset=0,this._header=null,this._stream=null,this._missing=0,this._longHeader=!1,this._callback=SR,this._locked=!1,this._finished=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null,this._filenameEncoding=e.filenameEncoding||"utf-8",this._allowUnknownFormat=!!e.allowUnknownFormat,this._unlockBound=this._unlock.bind(this)}_unlock(e){if(this._locked=!1,e){this.destroy(e),this._continueWrite(e);return}this._update()}_consumeHeader(){if(this._locked)return!1;this._offset=this._buffer.shifted;try{this._header=ld.decode(this._buffer.shift(512),this._filenameEncoding,this._allowUnknownFormat)}catch(e){return this._continueWrite(e),!1}if(!this._header)return!0;switch(this._header.type){case"gnu-long-path":case"gnu-long-link-path":case"pax-global-header":case"pax-header":return this._longHeader=!0,this._missing=this._header.size,!0}return this._locked=!0,this._applyLongHeaders(),this._header.size===0||this._header.type==="directory"?(this.emit("entry",this._header,this._createStream(),this._unlockBound),!0):(this._stream=this._createStream(),this._missing=this._header.size,this.emit("entry",this._header,this._stream,this._unlockBound),!0)}_applyLongHeaders(){this._gnuLongPath&&(this._header.name=this._gnuLongPath,this._gnuLongPath=null),this._gnuLongLinkPath&&(this._header.linkname=this._gnuLongLinkPath,this._gnuLongLinkPath=null),this._pax&&(this._pax.path&&(this._header.name=this._pax.path),this._pax.linkpath&&(this._header.linkname=this._pax.linkpath),this._pax.size&&(this._header.size=parseInt(this._pax.size,10)),this._header.pax=this._pax,this._pax=null)}_decodeLongHeader(e){switch(this._header.type){case"gnu-long-path":this._gnuLongPath=ld.decodeLongPath(e,this._filenameEncoding);break;case"gnu-long-link-path":this._gnuLongLinkPath=ld.decodeLongPath(e,this._filenameEncoding);break;case"pax-global-header":this._paxGlobal=ld.decodePax(e);break;case"pax-header":this._pax=this._paxGlobal===null?ld.decodePax(e):Object.assign({},this._paxGlobal,ld.decodePax(e));break}}_consumeLongHeader(){this._longHeader=!1,this._missing=LJ(this._header.size);let e=this._buffer.shift(this._header.size);try{this._decodeLongHeader(e)}catch(r){return this._continueWrite(r),!1}return!0}_consumeStream(){let e=this._buffer.shiftFirst(this._missing);if(e===null)return!1;this._missing-=e.byteLength;let r=this._stream.push(e);return this._missing===0?(this._stream.push(null),r&&this._stream._detach(),r&&this._locked===!1):r}_createStream(){return new CR(this,this._header,this._offset)}_update(){for(;this._buffer.buffered>0&&!this.destroying;){if(this._missing>0){if(this._stream!==null){if(this._consumeStream()===!1)return;continue}if(this._longHeader===!0){if(this._missing>this._buffer.buffered)break;if(this._consumeLongHeader()===!1)return!1;continue}let e=this._buffer.shiftFirst(this._missing);e!==null&&(this._missing-=e.byteLength);continue}if(this._buffer.buffered<512)break;if(this._stream!==null||this._consumeHeader()===!1)return}this._continueWrite(null)}_continueWrite(e){let r=this._callback;this._callback=SR,r(e)}_write(e,r){this._callback=r,this._buffer.push(e),this._update()}_final(e){this._finished=this._missing===0&&this._buffer.buffered===0,e(this._finished?null:new Error("Unexpected end of data"))}_predestroy(){this._continueWrite(null)}_destroy(e){this._stream&&this._stream.destroy(jJ(this)),e(null)}[Symbol.asyncIterator](){let e=null,r=null,n=null,i=null,o=null,s=this;return this.on("entry",l),this.on("error",h=>{e=h}),this.on("close",c),{[Symbol.asyncIterator](){return this},next(){return new Promise(u)},return(){return d(null)},throw(h){return d(h)}};function a(h){if(!o)return;let p=o;o=null,p(h)}function u(h,p){if(e)return p(e);if(i){h({value:i,done:!1}),i=null;return}r=h,n=p,a(null),s._finished&&r&&(r({value:void 0,done:!0}),r=n=null)}function l(h,p,b){o=b,p.on("error",SR),r?(r({value:p,done:!1}),r=n=null):i=p}function c(){a(e),r&&(e?n(e):r({value:void 0,done:!0}),r=n=null)}function d(h){return s.destroy(h),a(h),new Promise((p,b)=>{if(s.destroyed)return p({value:void 0,done:!0});s.once("close",function(){h?b(h):p({value:void 0,done:!0})})})}}};NJ.exports=function(e){return new kR(e)};function SR(){}function LJ(t){return t&=511,t&&512-t}});var WJ=g((Cut,TR)=>{"use strict";var $J={S_IFMT:61440,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960};try{TR.exports=require("fs").constants||$J}catch{TR.exports=$J}});var GJ=g((kut,HJ)=>{"use strict";var{Readable:$Le,Writable:WLe,getStreamError:UJ}=vR(),fl=cw(),cd=WJ(),dw=ER(),ULe=493,zLe=420,zJ=fl.alloc(1024),OR=class extends WLe{constructor(e,r,n){super({mapWritable:HLe,eagerOpen:!0}),this.written=0,this.header=r,this._callback=n,this._linkname=null,this._isLinkname=r.type==="symlink"&&!r.linkname,this._isVoid=r.type!=="file"&&r.type!=="contiguous-file",this._finished=!1,this._pack=e,this._openCallback=null,this._pack._stream===null?this._pack._stream=this:this._pack._pending.push(this)}_open(e){this._openCallback=e,this._pack._stream===this&&this._continueOpen()}_continuePack(e){if(this._callback===null)return;let r=this._callback;this._callback=null,r(e)}_continueOpen(){this._pack._stream===null&&(this._pack._stream=this);let e=this._openCallback;if(this._openCallback=null,e!==null){if(this._pack.destroying)return e(new Error("pack stream destroyed"));if(this._pack._finalized)return e(new Error("pack stream is already finalized"));this._pack._stream=this,this._isLinkname||this._pack._encode(this.header),this._isVoid&&(this._finish(),this._continuePack(null)),e(null)}}_write(e,r){if(this._isLinkname)return this._linkname=this._linkname?fl.concat([this._linkname,e]):e,r(null);if(this._isVoid)return e.byteLength>0?r(new Error("No body allowed for this entry")):r();if(this.written+=e.byteLength,this._pack.push(e))return r();this._pack._drain=r}_finish(){this._finished||(this._finished=!0,this._isLinkname&&(this.header.linkname=this._linkname?fl.toString(this._linkname,"utf-8"):"",this._pack._encode(this.header)),VJ(this._pack,this.header.size),this._pack._done(this))}_final(e){if(this.written!==this.header.size)return e(new Error("Size mismatch"));this._finish(),e(null)}_getError(){return UJ(this)||new Error("tar entry destroyed")}_predestroy(){this._pack.destroy(this._getError())}_destroy(e){this._pack._done(this),this._continuePack(this._finished?null:this._getError()),e()}},RR=class extends $Le{constructor(e){super(e),this._drain=AR,this._finalized=!1,this._finalizing=!1,this._pending=[],this._stream=null}entry(e,r,n){if(this._finalized||this.destroying)throw new Error("already finalized or destroyed");typeof r=="function"&&(n=r,r=null),n||(n=AR),(!e.size||e.type==="symlink")&&(e.size=0),e.type||(e.type=VLe(e.mode)),e.mode||(e.mode=e.type==="directory"?ULe:zLe),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),typeof r=="string"&&(r=fl.from(r));let i=new OR(this,e,n);return fl.isBuffer(r)?(e.size=r.byteLength,i.write(r),i.end(),i):(i._isVoid,i)}finalize(){if(this._stream||this._pending.length>0){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(zJ),this.push(null))}_done(e){e===this._stream&&(this._stream=null,this._finalizing&&this.finalize(),this._pending.length&&this._pending.shift()._continueOpen())}_encode(e){if(!e.pax){let r=dw.encode(e);if(r){this.push(r);return}}this._encodePax(e)}_encodePax(e){let r=dw.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),n={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:r.byteLength,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(dw.encode(n)),this.push(r),VJ(this,r.byteLength),n.size=e.size,n.type=e.type,this.push(dw.encode(n))}_doDrain(){let e=this._drain;this._drain=AR,e()}_predestroy(){let e=UJ(this);for(this._stream&&this._stream.destroy(e);this._pending.length;){let r=this._pending.shift();r.destroy(e),r._continueOpen()}this._doDrain()}_read(e){this._doDrain(),e()}};HJ.exports=function(e){return new RR(e)};function VLe(t){switch(t&cd.S_IFMT){case cd.S_IFBLK:return"block-device";case cd.S_IFCHR:return"character-device";case cd.S_IFDIR:return"directory";case cd.S_IFIFO:return"fifo";case cd.S_IFLNK:return"symlink"}return"file"}function AR(){}function VJ(t,e){e&=511,e&&t.push(zJ.subarray(0,512-e))}function HLe(t){return fl.isBuffer(t)?t:fl.from(t)}});var YJ=g(FR=>{"use strict";FR.extract=BJ();FR.pack=GJ()});var ZJ=g((Aut,QJ)=>{"use strict";var GLe=require("zlib"),YLe=YJ(),KJ=ed(),ds=function(t){if(!(this instanceof ds))return new ds(t);t=this.options=KJ.defaults(t,{gzip:!1}),typeof t.gzipOptions!="object"&&(t.gzipOptions={}),this.supports={directory:!0,symlink:!0},this.engine=YLe.pack(t),this.compressor=!1,t.gzip&&(this.compressor=GLe.createGzip(t.gzipOptions),this.compressor.on("error",this._onCompressorError.bind(this)))};ds.prototype._onCompressorError=function(t){this.engine.emit("error",t)};ds.prototype.append=function(t,e,r){var n=this;e.mtime=e.date;function i(s,a){if(s){r(s);return}n.engine.entry(e,a,function(u){r(u,e)})}if(e.sourceType==="buffer")i(null,t);else if(e.sourceType==="stream"&&e.stats){e.size=e.stats.size;var o=n.engine.entry(e,function(s){r(s,e)});t.pipe(o)}else e.sourceType==="stream"&&KJ.collectStream(t,i)};ds.prototype.finalize=function(){this.engine.finalize()};ds.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)};ds.prototype.pipe=function(t,e){return this.compressor?this.engine.pipe.apply(this.engine,[this.compressor]).pipe(t,e):this.engine.pipe.apply(this.engine,arguments)};ds.prototype.unpipe=function(){return this.compressor?this.compressor.unpipe.apply(this.compressor,arguments):this.engine.unpipe.apply(this.engine,arguments)};QJ.exports=ds});var eee=g((Out,JJ)=>{"use strict";function KLe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var QLe=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function XJ(t){if(Buffer.isBuffer(t))return t;if(typeof t=="number")return Buffer.alloc(t);if(typeof t=="string")return Buffer.from(t);throw new Error("input must be buffer, number, or string, received "+typeof t)}function ZLe(t){let e=XJ(4);return e.writeInt32BE(t,0),e}function PR(t,e){t=XJ(t),Buffer.isBuffer(e)&&(e=e.readUInt32BE(0));let r=~~e^-1;for(var n=0;n<t.length;n++)r=QLe[(r^t[n])&255]^r>>>8;return r^-1}function qR(){return ZLe(PR.apply(null,arguments))}qR.signed=function(){return PR.apply(null,arguments)};qR.unsigned=function(){return PR.apply(null,arguments)>>>0};var XLe=qR,JLe=KLe(XLe);JJ.exports=JLe});var iee=g((Rut,nee)=>{"use strict";var e9e=require("util").inherits,tee=Ju().Transform,t9e=eee(),ree=ed(),Ba=function(t){if(!(this instanceof Ba))return new Ba(t);t=this.options=ree.defaults(t,{}),tee.call(this,t),this.supports={directory:!0,symlink:!0},this.files=[]};e9e(Ba,tee);Ba.prototype._transform=function(t,e,r){r(null,t)};Ba.prototype._writeStringified=function(){var t=JSON.stringify(this.files);this.write(t)};Ba.prototype.append=function(t,e,r){var n=this;e.crc32=0;function i(o,s){if(o){r(o);return}e.size=s.length||0,e.crc32=t9e.unsigned(s),n.files.push(e),r(null,e)}e.sourceType==="buffer"?i(null,t):e.sourceType==="stream"&&ree.collectStream(t,i)};Ba.prototype.finalize=function(){this._writeStringified(),this.end()};nee.exports=Ba});var see=g((Fut,oee)=>{"use strict";var r9e=pX(),d0={},$a=function(t,e){return $a.create(t,e)};$a.create=function(t,e){if(d0[t]){var r=new r9e(t,e);return r.setFormat(t),r.setModule(new d0[t](e)),r}else throw new Error("create("+t+"): format not registered")};$a.registerFormat=function(t,e){if(d0[t])throw new Error("register("+t+"): format already registered");if(typeof e!="function")throw new Error("register("+t+"): format module invalid");if(typeof e.prototype.append!="function"||typeof e.prototype.finalize!="function")throw new Error("register("+t+"): format module missing methods");d0[t]=e};$a.isRegisteredFormat=function(t){return!!d0[t]};$a.registerFormat("zip",HX());$a.registerFormat("tar",ZJ());$a.registerFormat("json",iee());oee.exports=$a});var h0=g((Put,aee)=>{"use strict";var n9e="2.0.0",i9e=Number.MAX_SAFE_INTEGER||9007199254740991,o9e=16,s9e=250,a9e=["major","premajor","minor","preminor","patch","prepatch","prerelease"];aee.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:o9e,MAX_SAFE_BUILD_LENGTH:s9e,MAX_SAFE_INTEGER:i9e,RELEASE_TYPES:a9e,SEMVER_SPEC_VERSION:n9e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var p0=g((qut,uee)=>{"use strict";var u9e=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};uee.exports=u9e});var fd=g((hs,lee)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:IR,MAX_SAFE_BUILD_LENGTH:l9e,MAX_LENGTH:c9e}=h0(),f9e=p0();hs=lee.exports={};var d9e=hs.re=[],h9e=hs.safeRe=[],de=hs.src=[],he=hs.t={},p9e=0,jR="[a-zA-Z0-9-]",m9e=[["\\s",1],["\\d",c9e],[jR,l9e]],g9e=t=>{for(let[e,r]of m9e)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},Le=(t,e,r)=>{let n=g9e(e),i=p9e++;f9e(t,i,e),he[t]=i,de[i]=e,d9e[i]=new RegExp(e,r?"g":void 0),h9e[i]=new RegExp(n,r?"g":void 0)};Le("NUMERICIDENTIFIER","0|[1-9]\\d*");Le("NUMERICIDENTIFIERLOOSE","\\d+");Le("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${jR}*`);Le("MAINVERSION",`(${de[he.NUMERICIDENTIFIER]})\\.(${de[he.NUMERICIDENTIFIER]})\\.(${de[he.NUMERICIDENTIFIER]})`);Le("MAINVERSIONLOOSE",`(${de[he.NUMERICIDENTIFIERLOOSE]})\\.(${de[he.NUMERICIDENTIFIERLOOSE]})\\.(${de[he.NUMERICIDENTIFIERLOOSE]})`);Le("PRERELEASEIDENTIFIER",`(?:${de[he.NUMERICIDENTIFIER]}|${de[he.NONNUMERICIDENTIFIER]})`);Le("PRERELEASEIDENTIFIERLOOSE",`(?:${de[he.NUMERICIDENTIFIERLOOSE]}|${de[he.NONNUMERICIDENTIFIER]})`);Le("PRERELEASE",`(?:-(${de[he.PRERELEASEIDENTIFIER]}(?:\\.${de[he.PRERELEASEIDENTIFIER]})*))`);Le("PRERELEASELOOSE",`(?:-?(${de[he.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${de[he.PRERELEASEIDENTIFIERLOOSE]})*))`);Le("BUILDIDENTIFIER",`${jR}+`);Le("BUILD",`(?:\\+(${de[he.BUILDIDENTIFIER]}(?:\\.${de[he.BUILDIDENTIFIER]})*))`);Le("FULLPLAIN",`v?${de[he.MAINVERSION]}${de[he.PRERELEASE]}?${de[he.BUILD]}?`);Le("FULL",`^${de[he.FULLPLAIN]}$`);Le("LOOSEPLAIN",`[v=\\s]*${de[he.MAINVERSIONLOOSE]}${de[he.PRERELEASELOOSE]}?${de[he.BUILD]}?`);Le("LOOSE",`^${de[he.LOOSEPLAIN]}$`);Le("GTLT","((?:<|>)?=?)");Le("XRANGEIDENTIFIERLOOSE",`${de[he.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Le("XRANGEIDENTIFIER",`${de[he.NUMERICIDENTIFIER]}|x|X|\\*`);Le("XRANGEPLAIN",`[v=\\s]*(${de[he.XRANGEIDENTIFIER]})(?:\\.(${de[he.XRANGEIDENTIFIER]})(?:\\.(${de[he.XRANGEIDENTIFIER]})(?:${de[he.PRERELEASE]})?${de[he.BUILD]}?)?)?`);Le("XRANGEPLAINLOOSE",`[v=\\s]*(${de[he.XRANGEIDENTIFIERLOOSE]})(?:\\.(${de[he.XRANGEIDENTIFIERLOOSE]})(?:\\.(${de[he.XRANGEIDENTIFIERLOOSE]})(?:${de[he.PRERELEASELOOSE]})?${de[he.BUILD]}?)?)?`);Le("XRANGE",`^${de[he.GTLT]}\\s*${de[he.XRANGEPLAIN]}$`);Le("XRANGELOOSE",`^${de[he.GTLT]}\\s*${de[he.XRANGEPLAINLOOSE]}$`);Le("COERCEPLAIN",`(^|[^\\d])(\\d{1,${IR}})(?:\\.(\\d{1,${IR}}))?(?:\\.(\\d{1,${IR}}))?`);Le("COERCE",`${de[he.COERCEPLAIN]}(?:$|[^\\d])`);Le("COERCEFULL",de[he.COERCEPLAIN]+`(?:${de[he.PRERELEASE]})?(?:${de[he.BUILD]})?(?:$|[^\\d])`);Le("COERCERTL",de[he.COERCE],!0);Le("COERCERTLFULL",de[he.COERCEFULL],!0);Le("LONETILDE","(?:~>?)");Le("TILDETRIM",`(\\s*)${de[he.LONETILDE]}\\s+`,!0);hs.tildeTrimReplace="$1~";Le("TILDE",`^${de[he.LONETILDE]}${de[he.XRANGEPLAIN]}$`);Le("TILDELOOSE",`^${de[he.LONETILDE]}${de[he.XRANGEPLAINLOOSE]}$`);Le("LONECARET","(?:\\^)");Le("CARETTRIM",`(\\s*)${de[he.LONECARET]}\\s+`,!0);hs.caretTrimReplace="$1^";Le("CARET",`^${de[he.LONECARET]}${de[he.XRANGEPLAIN]}$`);Le("CARETLOOSE",`^${de[he.LONECARET]}${de[he.XRANGEPLAINLOOSE]}$`);Le("COMPARATORLOOSE",`^${de[he.GTLT]}\\s*(${de[he.LOOSEPLAIN]})$|^$`);Le("COMPARATOR",`^${de[he.GTLT]}\\s*(${de[he.FULLPLAIN]})$|^$`);Le("COMPARATORTRIM",`(\\s*)${de[he.GTLT]}\\s*(${de[he.LOOSEPLAIN]}|${de[he.XRANGEPLAIN]})`,!0);hs.comparatorTrimReplace="$1$2$3";Le("HYPHENRANGE",`^\\s*(${de[he.XRANGEPLAIN]})\\s+-\\s+(${de[he.XRANGEPLAIN]})\\s*$`);Le("HYPHENRANGELOOSE",`^\\s*(${de[he.XRANGEPLAINLOOSE]})\\s+-\\s+(${de[he.XRANGEPLAINLOOSE]})\\s*$`);Le("STAR","(<|>)?=?\\s*\\*");Le("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Le("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var hw=g((Iut,cee)=>{"use strict";var b9e=Object.freeze({loose:!0}),x9e=Object.freeze({}),y9e=t=>t?typeof t!="object"?b9e:t:x9e;cee.exports=y9e});var MR=g((jut,hee)=>{"use strict";var fee=/^[0-9]+$/,dee=(t,e)=>{let r=fee.test(t),n=fee.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},v9e=(t,e)=>dee(e,t);hee.exports={compareIdentifiers:dee,rcompareIdentifiers:v9e}});var Gr=g((Mut,bee)=>{"use strict";var pw=p0(),{MAX_LENGTH:pee,MAX_SAFE_INTEGER:mw}=h0(),{safeRe:mee,t:gee}=fd(),_9e=hw(),{compareIdentifiers:dd}=MR(),LR=class t{constructor(e,r){if(r=_9e(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>pee)throw new TypeError(`version is longer than ${pee} characters`);pw("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?mee[gee.LOOSE]:mee[gee.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>mw||this.major<0)throw new TypeError("Invalid major version");if(this.minor>mw||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>mw||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let o=+i;if(o>=0&&o<mw)return o}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(pw("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),dd(this.major,e.major)||dd(this.minor,e.minor)||dd(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],i=e.prerelease[r];if(pw("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return dd(n,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],i=e.build[r];if(pw("build compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return dd(n,i)}while(++r)}inc(e,r,n){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(n)?1:0;if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[i];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let o=[r,i];n===!1&&(o=[r]),dd(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};bee.exports=LR});var dl=g((Lut,yee)=>{"use strict";var xee=Gr(),w9e=(t,e,r=!1)=>{if(t instanceof xee)return t;try{return new xee(t,e)}catch(n){if(!r)return null;throw n}};yee.exports=w9e});var _ee=g((Nut,vee)=>{"use strict";var E9e=dl(),S9e=(t,e)=>{let r=E9e(t,e);return r?r.version:null};vee.exports=S9e});var Eee=g((But,wee)=>{"use strict";var D9e=dl(),C9e=(t,e)=>{let r=D9e(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};wee.exports=C9e});var Cee=g(($ut,Dee)=>{"use strict";var See=Gr(),k9e=(t,e,r,n,i)=>{typeof r=="string"&&(i=n,n=r,r=void 0);try{return new See(t instanceof See?t.version:t,r).inc(e,n,i).version}catch{return null}};Dee.exports=k9e});var Aee=g((Wut,Tee)=>{"use strict";var kee=dl(),T9e=(t,e)=>{let r=kee(t,null,!0),n=kee(e,null,!0),i=r.compare(n);if(i===0)return null;let o=i>0,s=o?r:n,a=o?n:r,u=!!s.prerelease.length;if(!!a.prerelease.length&&!u)return!a.patch&&!a.minor?"major":s.patch?"patch":s.minor?"minor":"major";let c=u?"pre":"";return r.major!==n.major?c+"major":r.minor!==n.minor?c+"minor":r.patch!==n.patch?c+"patch":"prerelease"};Tee.exports=T9e});var Ree=g((Uut,Oee)=>{"use strict";var A9e=Gr(),O9e=(t,e)=>new A9e(t,e).major;Oee.exports=O9e});var Pee=g((zut,Fee)=>{"use strict";var R9e=Gr(),F9e=(t,e)=>new R9e(t,e).minor;Fee.exports=F9e});var Iee=g((Vut,qee)=>{"use strict";var P9e=Gr(),q9e=(t,e)=>new P9e(t,e).patch;qee.exports=q9e});var Mee=g((Hut,jee)=>{"use strict";var I9e=dl(),j9e=(t,e)=>{let r=I9e(t,e);return r&&r.prerelease.length?r.prerelease:null};jee.exports=j9e});var Si=g((Gut,Nee)=>{"use strict";var Lee=Gr(),M9e=(t,e,r)=>new Lee(t,r).compare(new Lee(e,r));Nee.exports=M9e});var $ee=g((Yut,Bee)=>{"use strict";var L9e=Si(),N9e=(t,e,r)=>L9e(e,t,r);Bee.exports=N9e});var Uee=g((Kut,Wee)=>{"use strict";var B9e=Si(),$9e=(t,e)=>B9e(t,e,!0);Wee.exports=$9e});var gw=g((Qut,Vee)=>{"use strict";var zee=Gr(),W9e=(t,e,r)=>{let n=new zee(t,r),i=new zee(e,r);return n.compare(i)||n.compareBuild(i)};Vee.exports=W9e});var Gee=g((Zut,Hee)=>{"use strict";var U9e=gw(),z9e=(t,e)=>t.sort((r,n)=>U9e(r,n,e));Hee.exports=z9e});var Kee=g((Xut,Yee)=>{"use strict";var V9e=gw(),H9e=(t,e)=>t.sort((r,n)=>V9e(n,r,e));Yee.exports=H9e});var m0=g((Jut,Qee)=>{"use strict";var G9e=Si(),Y9e=(t,e,r)=>G9e(t,e,r)>0;Qee.exports=Y9e});var bw=g((elt,Zee)=>{"use strict";var K9e=Si(),Q9e=(t,e,r)=>K9e(t,e,r)<0;Zee.exports=Q9e});var NR=g((tlt,Xee)=>{"use strict";var Z9e=Si(),X9e=(t,e,r)=>Z9e(t,e,r)===0;Xee.exports=X9e});var BR=g((rlt,Jee)=>{"use strict";var J9e=Si(),eNe=(t,e,r)=>J9e(t,e,r)!==0;Jee.exports=eNe});var xw=g((nlt,ete)=>{"use strict";var tNe=Si(),rNe=(t,e,r)=>tNe(t,e,r)>=0;ete.exports=rNe});var yw=g((ilt,tte)=>{"use strict";var nNe=Si(),iNe=(t,e,r)=>nNe(t,e,r)<=0;tte.exports=iNe});var $R=g((olt,rte)=>{"use strict";var oNe=NR(),sNe=BR(),aNe=m0(),uNe=xw(),lNe=bw(),cNe=yw(),fNe=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return oNe(t,r,n);case"!=":return sNe(t,r,n);case">":return aNe(t,r,n);case">=":return uNe(t,r,n);case"<":return lNe(t,r,n);case"<=":return cNe(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};rte.exports=fNe});var ite=g((slt,nte)=>{"use strict";var dNe=Gr(),hNe=dl(),{safeRe:vw,t:_w}=fd(),pNe=(t,e)=>{if(t instanceof dNe)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?vw[_w.COERCEFULL]:vw[_w.COERCE]);else{let u=e.includePrerelease?vw[_w.COERCERTLFULL]:vw[_w.COERCERTL],l;for(;(l=u.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||l.index+l[0].length!==r.index+r[0].length)&&(r=l),u.lastIndex=l.index+l[1].length+l[2].length;u.lastIndex=-1}if(r===null)return null;let n=r[2],i=r[3]||"0",o=r[4]||"0",s=e.includePrerelease&&r[5]?`-${r[5]}`:"",a=e.includePrerelease&&r[6]?`+${r[6]}`:"";return hNe(`${n}.${i}.${o}${s}${a}`,e)};nte.exports=pNe});var ste=g((alt,ote)=>{"use strict";var WR=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,r)}return this}};ote.exports=WR});var Di=g((ult,cte)=>{"use strict";var mNe=/\s+/g,UR=class t{constructor(e,r){if(r=bNe(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof zR)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(mNe," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(i=>!ute(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&SNe(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let n=0;n<r.length;n++)n>0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&wNe)|(this.options.loose&&ENe))+":"+e,i=ate.get(n);if(i)return i;let o=this.options.loose,s=o?Cn[ln.HYPHENRANGELOOSE]:Cn[ln.HYPHENRANGE];e=e.replace(s,qNe(this.options.includePrerelease)),jt("hyphen replace",e),e=e.replace(Cn[ln.COMPARATORTRIM],yNe),jt("comparator trim",e),e=e.replace(Cn[ln.TILDETRIM],vNe),jt("tilde trim",e),e=e.replace(Cn[ln.CARETTRIM],_Ne),jt("caret trim",e);let a=e.split(" ").map(d=>DNe(d,this.options)).join(" ").split(/\s+/).map(d=>PNe(d,this.options));o&&(a=a.filter(d=>(jt("loose invalid filter",d,this.options),!!d.match(Cn[ln.COMPARATORLOOSE])))),jt("range list",a);let u=new Map,l=a.map(d=>new zR(d,this.options));for(let d of l){if(ute(d))return[d];u.set(d.value,d)}u.size>1&&u.has("")&&u.delete("");let c=[...u.values()];return ate.set(n,c),c}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>lte(n,r)&&e.set.some(i=>lte(i,r)&&n.every(o=>i.every(s=>o.intersects(s,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new xNe(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(INe(this.set[r],e,this.options))return!0;return!1}};cte.exports=UR;var gNe=ste(),ate=new gNe,bNe=hw(),zR=g0(),jt=p0(),xNe=Gr(),{safeRe:Cn,t:ln,comparatorTrimReplace:yNe,tildeTrimReplace:vNe,caretTrimReplace:_Ne}=fd(),{FLAG_INCLUDE_PRERELEASE:wNe,FLAG_LOOSE:ENe}=h0(),ute=t=>t.value==="<0.0.0-0",SNe=t=>t.value==="",lte=(t,e)=>{let r=!0,n=t.slice(),i=n.pop();for(;r&&n.length;)r=n.every(o=>i.intersects(o,e)),i=n.pop();return r},DNe=(t,e)=>(jt("comp",t,e),t=TNe(t,e),jt("caret",t),t=CNe(t,e),jt("tildes",t),t=ONe(t,e),jt("xrange",t),t=FNe(t,e),jt("stars",t),t),cn=t=>!t||t.toLowerCase()==="x"||t==="*",CNe=(t,e)=>t.trim().split(/\s+/).map(r=>kNe(r,e)).join(" "),kNe=(t,e)=>{let r=e.loose?Cn[ln.TILDELOOSE]:Cn[ln.TILDE];return t.replace(r,(n,i,o,s,a)=>{jt("tilde",t,n,i,o,s,a);let u;return cn(i)?u="":cn(o)?u=`>=${i}.0.0 <${+i+1}.0.0-0`:cn(s)?u=`>=${i}.${o}.0 <${i}.${+o+1}.0-0`:a?(jt("replaceTilde pr",a),u=`>=${i}.${o}.${s}-${a} <${i}.${+o+1}.0-0`):u=`>=${i}.${o}.${s} <${i}.${+o+1}.0-0`,jt("tilde return",u),u})},TNe=(t,e)=>t.trim().split(/\s+/).map(r=>ANe(r,e)).join(" "),ANe=(t,e)=>{jt("caret",t,e);let r=e.loose?Cn[ln.CARETLOOSE]:Cn[ln.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(i,o,s,a,u)=>{jt("caret",t,i,o,s,a,u);let l;return cn(o)?l="":cn(s)?l=`>=${o}.0.0${n} <${+o+1}.0.0-0`:cn(a)?o==="0"?l=`>=${o}.${s}.0${n} <${o}.${+s+1}.0-0`:l=`>=${o}.${s}.0${n} <${+o+1}.0.0-0`:u?(jt("replaceCaret pr",u),o==="0"?s==="0"?l=`>=${o}.${s}.${a}-${u} <${o}.${s}.${+a+1}-0`:l=`>=${o}.${s}.${a}-${u} <${o}.${+s+1}.0-0`:l=`>=${o}.${s}.${a}-${u} <${+o+1}.0.0-0`):(jt("no pr"),o==="0"?s==="0"?l=`>=${o}.${s}.${a}${n} <${o}.${s}.${+a+1}-0`:l=`>=${o}.${s}.${a}${n} <${o}.${+s+1}.0-0`:l=`>=${o}.${s}.${a} <${+o+1}.0.0-0`),jt("caret return",l),l})},ONe=(t,e)=>(jt("replaceXRanges",t,e),t.split(/\s+/).map(r=>RNe(r,e)).join(" ")),RNe=(t,e)=>{t=t.trim();let r=e.loose?Cn[ln.XRANGELOOSE]:Cn[ln.XRANGE];return t.replace(r,(n,i,o,s,a,u)=>{jt("xRange",t,n,i,o,s,a,u);let l=cn(o),c=l||cn(s),d=c||cn(a),h=d;return i==="="&&h&&(i=""),u=e.includePrerelease?"-0":"",l?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&h?(c&&(s=0),a=0,i===">"?(i=">=",c?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):i==="<="&&(i="<",c?o=+o+1:s=+s+1),i==="<"&&(u="-0"),n=`${i+o}.${s}.${a}${u}`):c?n=`>=${o}.0.0${u} <${+o+1}.0.0-0`:d&&(n=`>=${o}.${s}.0${u} <${o}.${+s+1}.0-0`),jt("xRange return",n),n})},FNe=(t,e)=>(jt("replaceStars",t,e),t.trim().replace(Cn[ln.STAR],"")),PNe=(t,e)=>(jt("replaceGTE0",t,e),t.trim().replace(Cn[e.includePrerelease?ln.GTE0PRE:ln.GTE0],"")),qNe=t=>(e,r,n,i,o,s,a,u,l,c,d,h)=>(cn(n)?r="":cn(i)?r=`>=${n}.0.0${t?"-0":""}`:cn(o)?r=`>=${n}.${i}.0${t?"-0":""}`:s?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,cn(l)?u="":cn(c)?u=`<${+l+1}.0.0-0`:cn(d)?u=`<${l}.${+c+1}.0-0`:h?u=`<=${l}.${c}.${d}-${h}`:t?u=`<${l}.${c}.${+d+1}-0`:u=`<=${u}`,`${r} ${u}`.trim()),INe=(t,e,r)=>{for(let n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let n=0;n<t.length;n++)if(jt(t[n].semver),t[n].semver!==zR.ANY&&t[n].semver.prerelease.length>0){let i=t[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var g0=g((llt,gte)=>{"use strict";var b0=Symbol("SemVer ANY"),GR=class t{static get ANY(){return b0}constructor(e,r){if(r=fte(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),HR("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===b0?this.value="":this.value=this.operator+this.semver.version,HR("comp",this)}parse(e){let r=this.options.loose?dte[hte.COMPARATORLOOSE]:dte[hte.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new pte(n[2],this.options.loose):this.semver=b0}toString(){return this.value}test(e){if(HR("Comparator.test",e,this.options.loose),this.semver===b0||e===b0)return!0;if(typeof e=="string")try{e=new pte(e,this.options)}catch{return!1}return VR(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new mte(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new mte(this.value,r).test(e.semver):(r=fte(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||VR(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||VR(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};gte.exports=GR;var fte=hw(),{safeRe:dte,t:hte}=fd(),VR=$R(),HR=p0(),pte=Gr(),mte=Di()});var x0=g((clt,bte)=>{"use strict";var jNe=Di(),MNe=(t,e,r)=>{try{e=new jNe(e,r)}catch{return!1}return e.test(t)};bte.exports=MNe});var yte=g((flt,xte)=>{"use strict";var LNe=Di(),NNe=(t,e)=>new LNe(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));xte.exports=NNe});var _te=g((dlt,vte)=>{"use strict";var BNe=Gr(),$Ne=Di(),WNe=(t,e,r)=>{let n=null,i=null,o=null;try{o=new $Ne(e,r)}catch{return null}return t.forEach(s=>{o.test(s)&&(!n||i.compare(s)===-1)&&(n=s,i=new BNe(n,r))}),n};vte.exports=WNe});var Ete=g((hlt,wte)=>{"use strict";var UNe=Gr(),zNe=Di(),VNe=(t,e,r)=>{let n=null,i=null,o=null;try{o=new zNe(e,r)}catch{return null}return t.forEach(s=>{o.test(s)&&(!n||i.compare(s)===1)&&(n=s,i=new UNe(n,r))}),n};wte.exports=VNe});var Cte=g((plt,Dte)=>{"use strict";var YR=Gr(),HNe=Di(),Ste=m0(),GNe=(t,e)=>{t=new HNe(t,e);let r=new YR("0.0.0");if(t.test(r)||(r=new YR("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n<t.set.length;++n){let i=t.set[n],o=null;i.forEach(s=>{let a=new YR(s.semver.version);switch(s.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||Ste(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),o&&(!r||Ste(r,o))&&(r=o)}return r&&t.test(r)?r:null};Dte.exports=GNe});var Tte=g((mlt,kte)=>{"use strict";var YNe=Di(),KNe=(t,e)=>{try{return new YNe(t,e).range||"*"}catch{return null}};kte.exports=KNe});var ww=g((glt,Fte)=>{"use strict";var QNe=Gr(),Rte=g0(),{ANY:ZNe}=Rte,XNe=Di(),JNe=x0(),Ate=m0(),Ote=bw(),eBe=yw(),tBe=xw(),rBe=(t,e,r,n)=>{t=new QNe(t,n),e=new XNe(e,n);let i,o,s,a,u;switch(r){case">":i=Ate,o=eBe,s=Ote,a=">",u=">=";break;case"<":i=Ote,o=tBe,s=Ate,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(JNe(t,e,n))return!1;for(let l=0;l<e.set.length;++l){let c=e.set[l],d=null,h=null;if(c.forEach(p=>{p.semver===ZNe&&(p=new Rte(">=0.0.0")),d=d||p,h=h||p,i(p.semver,d.semver,n)?d=p:s(p.semver,h.semver,n)&&(h=p)}),d.operator===a||d.operator===u||(!h.operator||h.operator===a)&&o(t,h.semver))return!1;if(h.operator===u&&s(t,h.semver))return!1}return!0};Fte.exports=rBe});var qte=g((blt,Pte)=>{"use strict";var nBe=ww(),iBe=(t,e,r)=>nBe(t,e,">",r);Pte.exports=iBe});var jte=g((xlt,Ite)=>{"use strict";var oBe=ww(),sBe=(t,e,r)=>oBe(t,e,"<",r);Ite.exports=sBe});var Nte=g((ylt,Lte)=>{"use strict";var Mte=Di(),aBe=(t,e,r)=>(t=new Mte(t,r),e=new Mte(e,r),t.intersects(e,r));Lte.exports=aBe});var $te=g((vlt,Bte)=>{"use strict";var uBe=x0(),lBe=Si();Bte.exports=(t,e,r)=>{let n=[],i=null,o=null,s=t.sort((c,d)=>lBe(c,d,r));for(let c of s)uBe(c,e,r)?(o=c,i||(i=c)):(o&&n.push([i,o]),o=null,i=null);i&&n.push([i,null]);let a=[];for(let[c,d]of n)c===d?a.push(c):!d&&c===s[0]?a.push("*"):d?c===s[0]?a.push(`<=${d}`):a.push(`${c} - ${d}`):a.push(`>=${c}`);let u=a.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return u.length<l.length?u:e}});var Gte=g((_lt,Hte)=>{"use strict";var Wte=Di(),QR=g0(),{ANY:KR}=QR,y0=x0(),ZR=Si(),cBe=(t,e,r={})=>{if(t===e)return!0;t=new Wte(t,r),e=new Wte(e,r);let n=!1;e:for(let i of t.set){for(let o of e.set){let s=dBe(i,o,r);if(n=n||s!==null,s)continue e}if(n)return!1}return!0},fBe=[new QR(">=0.0.0-0")],Ute=[new QR(">=0.0.0")],dBe=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===KR){if(e.length===1&&e[0].semver===KR)return!0;r.includePrerelease?t=fBe:t=Ute}if(e.length===1&&e[0].semver===KR){if(r.includePrerelease)return!0;e=Ute}let n=new Set,i,o;for(let p of t)p.operator===">"||p.operator===">="?i=zte(i,p,r):p.operator==="<"||p.operator==="<="?o=Vte(o,p,r):n.add(p.semver);if(n.size>1)return null;let s;if(i&&o){if(s=ZR(i.semver,o.semver,r),s>0)return null;if(s===0&&(i.operator!==">="||o.operator!=="<="))return null}for(let p of n){if(i&&!y0(p,String(i),r)||o&&!y0(p,String(o),r))return null;for(let b of e)if(!y0(p,String(b),r))return!1;return!0}let a,u,l,c,d=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,h=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;d&&d.prerelease.length===1&&o.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(let p of e){if(c=c||p.operator===">"||p.operator===">=",l=l||p.operator==="<"||p.operator==="<=",i){if(h&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===h.major&&p.semver.minor===h.minor&&p.semver.patch===h.patch&&(h=!1),p.operator===">"||p.operator===">="){if(a=zte(i,p,r),a===p&&a!==i)return!1}else if(i.operator===">="&&!y0(i.semver,String(p),r))return!1}if(o){if(d&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===d.major&&p.semver.minor===d.minor&&p.semver.patch===d.patch&&(d=!1),p.operator==="<"||p.operator==="<="){if(u=Vte(o,p,r),u===p&&u!==o)return!1}else if(o.operator==="<="&&!y0(o.semver,String(p),r))return!1}if(!p.operator&&(o||i)&&s!==0)return!1}return!(i&&l&&!o&&s!==0||o&&c&&!i&&s!==0||h||d)},zte=(t,e,r)=>{if(!t)return e;let n=ZR(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},Vte=(t,e,r)=>{if(!t)return e;let n=ZR(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};Hte.exports=cBe});var Zte=g((wlt,Qte)=>{"use strict";var XR=fd(),Yte=h0(),hBe=Gr(),Kte=MR(),pBe=dl(),mBe=_ee(),gBe=Eee(),bBe=Cee(),xBe=Aee(),yBe=Ree(),vBe=Pee(),_Be=Iee(),wBe=Mee(),EBe=Si(),SBe=$ee(),DBe=Uee(),CBe=gw(),kBe=Gee(),TBe=Kee(),ABe=m0(),OBe=bw(),RBe=NR(),FBe=BR(),PBe=xw(),qBe=yw(),IBe=$R(),jBe=ite(),MBe=g0(),LBe=Di(),NBe=x0(),BBe=yte(),$Be=_te(),WBe=Ete(),UBe=Cte(),zBe=Tte(),VBe=ww(),HBe=qte(),GBe=jte(),YBe=Nte(),KBe=$te(),QBe=Gte();Qte.exports={parse:pBe,valid:mBe,clean:gBe,inc:bBe,diff:xBe,major:yBe,minor:vBe,patch:_Be,prerelease:wBe,compare:EBe,rcompare:SBe,compareLoose:DBe,compareBuild:CBe,sort:kBe,rsort:TBe,gt:ABe,lt:OBe,eq:RBe,neq:FBe,gte:PBe,lte:qBe,cmp:IBe,coerce:jBe,Comparator:MBe,Range:LBe,satisfies:NBe,toComparators:BBe,maxSatisfying:$Be,minSatisfying:WBe,minVersion:UBe,validRange:zBe,outside:VBe,gtr:HBe,ltr:GBe,intersects:YBe,simplifyRange:KBe,subset:QBe,SemVer:hBe,re:XR.re,src:XR.src,tokens:XR.t,SEMVER_SPEC_VERSION:Yte.SEMVER_SPEC_VERSION,RELEASE_TYPES:Yte.RELEASE_TYPES,compareIdentifiers:Kte.compareIdentifiers,rcompareIdentifiers:Kte.rcompareIdentifiers}});function pr(t,e,r){return{start:{line:t,character:e},end:{line:t,character:e+r}}}function za(t,e,r,n,i){return{type:t,value:e,range:pr(r,n,e.length),selectionRange:pr(r,n,e.length),...i}}function gl(t,e,r){return za("text",t,e,r)}function r$e(t,e,r){return(0,mre.default)(e.sticky),e.lastIndex=r,e.exec(t)}function Tw(t,e,r){let n=t.value,i=t.range.start.line,o=t.range.start.character,s=[],a=0,u=-1;do u=n.indexOf(e,u+1),u>=0&&(r?r.find(l=>{let c=r$e(n,l.pattern,u);if(!c)return!1;let d=l.parse(c,i,o);return d?(a<u-1&&s.push(gl(n.substring(a,u),i,o+a)),s.push(d),a=c.indices[0][1],u=a,!0):!1}):(s.push(gl(n.substring(a,u),i,o+a)),u+=e.length,a=u));while(u>=0);return a<=n.length-1&&s.push(gl(n.substring(a),i,o+a)),s}function n$e(t){return Tw(t,"|").map(e=>{let r=e.value.indexOf("="),n=gl(e.value.substring(0,r),e.range.start.line,e.range.start.character),i=gl(e.value.substring(r+1),e.range.start.line,e.range.start.character+r+1);return{type:"plural_option",range:e.range,selectionRange:e.selectionRange,children:[...Tw(n,",").map(o=>{if(o.value==="rest")return{type:"plural_match",value:"rest",range:o.range,selectionRange:o.selectionRange};let s=o.value.match(/^(ends in )?(\d+)(?:-(\d+))?$/d);return s?{type:"plural_match",value:s[3]?[parseInt(s[2]),parseInt(s[3])]:parseInt(s[2]),ends_in:s[1]?!0:void 0,range:o.range,selectionRange:o.selectionRange}:{type:"error",value:o.value,range:o.range,selectionRange:o.selectionRange}}),...Tw(i,"__",gre)]}})}function tF(t){let e=t.open_comments;t.open_comments=[];let r=e[0],n=e[e.length-1];return{type:"comment_group",range:{start:r.range.start,end:n.range.end},selectionRange:r.selectionRange,children:e}}function bre(t){let e={root:{type:"root",children:[],range:{start:{line:0,character:0},end:{line:t.lineCount,character:0}},selectionRange:pr(0,0,0)},open_comments:[]};for(let r=0;r<t.lineCount;r++){let n={start:{line:r,character:0},end:{line:r,character:1/0}},i=t.getText(n).replace(/((\r\n)|\r|\n)$/,"");for(let o of i$e){let s=o.pattern.exec(i);if(s){o.parse(s,r,e);break}}}return e.root}var mre,gre,i$e,xre=dt(()=>{"use strict";mre=pe(require("assert"));gre=[{pattern:/__([0-9]+)__/dy,parse(t,e,r){return{type:"parameter",value:parseInt(t[1]),range:pr(e,r+t.index,t[0].length),selectionRange:pr(e,r+t.indices[1][0],t[1].length)}}},{pattern:/__plural_for_parameter__([0-9]+)__\{(.*?)\}__/dy,parse(t,e,r){return{type:"plural",value:parseInt(t[1]),children:n$e(gl(t[2],e,r+t.indices[2][0])),range:pr(e,r+t.index,t[0].length),selectionRange:pr(e,r+t.indices[1][0],t[1].length)}}},{pattern:/__(CONTROL_(?:MOVE|(?:LEFT|RIGHT)_CLICK|KEY_(?:SHIFT|CTRL)|STYLE_(?:BEGIN|END)))__/dy,parse(t,e,r){return{type:"macro",name:t[1],children:[],range:pr(e,r+t.index,t[0].length),selectionRange:pr(e,r+t.indices[1][0],t[1].length)}}},{pattern:/__(REMARK_COLOR_(?:BEGIN|END))__/dy,parse(t,e,r){return{type:"macro",name:t[1],children:[],range:pr(e,r+t.index,t[0].length),selectionRange:pr(e,r+t.indices[1][0],t[1].length)}}},{pattern:/__(CONTROL(?:_MODIFIER)?|ENTITY|ITEM|TILE|FLUID|PLANET)__(.+?)__/dy,parse(t,e,r){return{type:"macro",name:t[1],children:[za("macro_argument",t[2],e,r+t.indices[2][0])],range:pr(e,r+t.index,t[0].length),selectionRange:pr(e,r+t.indices[1][0],t[1].length)}}},{pattern:/__(ALT_CONTROL)__(.+?)__(.+?)__/dy,parse(t,e,r){return{type:"macro",name:t[1],children:[za("macro_argument",t[2],e,r+t.indices[2][0]),za("macro_argument",t[3],e,r+t.indices[3][0])],range:pr(e,r+t.index,t[0].length),selectionRange:pr(e,r+t.indices[1][0],t[1].length)}}},{pattern:/__(ALT_CONTROL_(?:LEFT|RIGHT)_CLICK)__(.+?)__/dy,parse(t,e,r){return{type:"macro",name:t[1],children:[za("macro_argument",t[2],e,r+t.indices[1][0])],range:pr(e,r+t.index,t[0].length),selectionRange:pr(e,r+t.indices[1][0],t[1].length)}}}];i$e=[{pattern:/^[\r\t ]*([#;].*)?$/d,parse(t,e,r){t[1]?r.open_comments.push(za("comment",t[1],e,t.indices[1][0])):r.open_comments.length>0&&(r.open_section??r.root).children.push(tF(r))}},{pattern:/^[\r\t ]*\[(.*?)\][\r\t ]*$/d,parse(t,e,r){r.open_section=za("section",t[1],e,t.indices[1][0],{children:[]}),r.open_comments.length>0&&r.open_section.children.push(tF(r)),r.open_section.range.start.character-=1,r.open_section.range.end.character+=1,r.root.children.push(r.open_section)}},{pattern:/^[\r\t ]*(.*?)=(.*)$/d,parse(t,e,r){let n=za("record",t[1],e,t.indices[1][0],{children:[...Tw(gl(t[2],e,t.indices[2][0]),"__",gre)]});r.open_comments.length>0&&n.children.unshift(tF(r)),n.range.end.character=t[0].length,(r.open_section??r.root).children.push(n)}},{pattern:/^.*$/d,parse(t,e,r){r.root.children.push({type:"error",value:t[0],range:pr(e,0,t[0].length),selectionRange:pr(e,0,0)})}}]});function o$e(t){if(rF.has(t))return rF.get(t);if(t.startsWith("#")){let r=t.match(/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/);if(r)return{red:parseInt(r[1],16)/255,green:parseInt(r[2],16)/255,blue:parseInt(r[3],16)/255,alpha:r[4]?parseInt(r[4],16)/255:1}}let e=t.match(/\s*(\d+(?:\.\d+)?)\s*,?\s*(\d+(?:\.\d+)?)\s*,?\s*(\d+(?:\.\d+)?)(?:\s*,?\s*(\d+(?:\.\d+)?))?\s*/);if(e){let r=parseFloat(e[1]),n=parseFloat(e[2]),i=parseFloat(e[3]),o=e[4]?parseFloat(e[4]):void 0;return(r>1||n>1||i>1||o&&o>1)&&(r=r/255,n=n/255,i=i/255,o&&(o=o/255)),o||(o=1),{red:r,green:n,blue:i,alpha:o}}}function bl(t){let e=Math.floor(t).toString(16);return e.length<2&&(e="0"+e),e}function xl(t,e){return Math.round(t*Math.pow(10,e))/Math.pow(10,e)}function s$e(t){let e=[];for(let[r,n]of rF)if(Math.abs(n.red-t.red)<.004&&Math.abs(n.green-t.green)<.004&&Math.abs(n.blue-t.blue)<.004&&Math.abs(n.alpha-t.alpha)<.004){e.push(r);break}return t.alpha>.996?(e.push(`#${bl(t.red*255)}${bl(t.green*255)}${bl(t.blue*255)}`),e.push(`${Math.floor(t.red*255)}, ${Math.floor(t.green*255)}, ${Math.floor(t.blue*255)}`),e.push(`${xl(t.red,3)}, ${xl(t.green,3)}, ${xl(t.blue,3)}`)):(e.push(`#${bl(t.red*255)}${bl(t.green*255)}${bl(t.blue*255)}${bl(t.alpha*255)}`),e.push(`${Math.floor(t.red*255)}, ${Math.floor(t.green*255)}, ${Math.floor(t.blue*255)}, ${Math.floor(t.alpha*255)}`),e.push(`${xl(t.red,3)}, ${xl(t.green,3)}, ${xl(t.blue,3)}, ${xl(t.alpha,3)}`)),e}function a$e(t,e){let r=[];return oh(t,"record",(n,i)=>{let o=i.length>0?i[i.length-1]:void 0,s=o?.type==="section"?o.value:void 0;r.push({name:s?`${s}.${n.value}`:n.value,link:{targetUri:e,targetRange:n.range,targetSelectionRange:n.selectionRange}})}),r}function yre(t){return t!==void 0}function vre(t){return{name:t.value?t.value:"<error>",detail:"",kind:kn.SymbolKind.String,range:t.range,selectionRange:t.selectionRange,children:[]}}function u$e(t){return{name:t.value?t.value:"<error>",detail:"",kind:kn.SymbolKind.Namespace,range:t.range,selectionRange:t.selectionRange,children:t.children.map(e=>{switch(e.type){case"record":return vre(e);default:return}}).filter(yre)}}function l$e(t){return t.children.map(e=>{switch(e.type){case"section":return u$e(e);case"record":return vre(e);default:return}}).filter(yre)}var kn,rF,Aw,_re=dt(()=>{"use strict";kn=pe(Vh());Hx();xre();rF=new Map([["default",{red:1,green:.63,blue:.259,alpha:1}],["red",{red:1,green:.166,blue:.141,alpha:1}],["green",{red:.173,green:.824,blue:.25,alpha:1}],["blue",{red:.343,green:.683,blue:1,alpha:1}],["orange",{red:1,green:.63,blue:.259,alpha:1}],["yellow",{red:1,green:.828,blue:.231,alpha:1}],["pink",{red:1,green:.52,blue:.633,alpha:1}],["purple",{red:.821,green:.44,blue:.998,alpha:1}],["white",{red:.9,green:.9,blue:.9,alpha:1}],["black",{red:.5,green:.5,blue:.5,alpha:1}],["gray",{red:.7,green:.7,blue:.7,alpha:1}],["brown",{red:.757,green:.522,blue:.371,alpha:1}],["cyan",{red:.335,green:.918,blue:.866,alpha:1}],["acid",{red:.708,green:.996,blue:.134,alpha:1}]]);Aw=class{hasDiagnosticRelatedInformationCapability=!1;async validateTextDocument(e){let r=e.getText().split(/\r?\n/),n=[],i=this.onDocumentSymbol(e),o,s=new Map;s.set(void 0,new Set);for(let a=0;a<r.length;a++){let u=r[a];if(!u.match(/^[ \r\t]*[#;]/)){if(u.match(/^[ \r\t]*\[/)){let l=u.match(/^[ \r\t]*\[([^\[]+)\][ \r\t]*$/d);if(l)if(o=l[1],s.has(o)){let c=i.filter(p=>p.name===o),d=c.reduce((p,b)=>p.range.start.line<b.range.start.line?p:b),h=c.find(p=>p.range.start.line===a);n.push({message:"Duplicate Section",source:"factorio-locale",severity:kn.DiagnosticSeverity.Error,range:{start:{line:a,character:l.indices[1][0]},end:{line:a,character:l.indices[1][1]}},relatedInformation:this.hasDiagnosticRelatedInformationCapability?[{location:{uri:e.uri,range:d.range},message:"First defined here"}]:void 0,code:"section.merge",data:{firstsym:d,newsym:h}})}else if(s.get(void 0).has(o)){let d=i.filter(h=>h.name===o).reduce((h,p)=>h.range.start.line<p.range.start.line?h:p);n.push({message:"Section Name conflicts with Key in Root",source:"factorio-locale",severity:kn.DiagnosticSeverity.Error,range:{start:{line:a,character:l.indices[1][0]},end:{line:a,character:l.indices[1][1]}},relatedInformation:this.hasDiagnosticRelatedInformationCapability?[{location:{uri:e.uri,range:d.range},message:"First defined here"}]:void 0,code:"section.rootconflict"}),s.set(o,new Set)}else s.set(o,new Set);else n.push({message:"Invalid Section Header",source:"factorio-locale",severity:kn.DiagnosticSeverity.Error,range:{start:{line:a,character:0},end:{line:a,character:u.length}},code:"section.invalid"})}else if(u.trim().length>0){let l=u.match(/^[ \r\t]*([^=]*)=(.*)$/d);if(l&&l[1]){let c=l[1];if(s.get(o).has(c)){let h=i.filter(p=>p.name===o&&p.kind===kn.SymbolKind.Namespace).flatMap(p=>p.children?.filter(b=>b.name===c)??[]).concat(i.filter(p=>p.name===c&&p.kind===kn.SymbolKind.String));if(h.length>0){let p=h.reduce((b,x)=>b.range.start.line<x.range.start.line?b:x);n.push({message:"Duplicate Key",source:"factorio-locale",severity:kn.DiagnosticSeverity.Error,code:"key.duplicate",range:{start:{line:a,character:l.indices[1][0]},end:{line:a,character:l.indices[1][1]}},relatedInformation:this.hasDiagnosticRelatedInformationCapability?[{location:{uri:e.uri,range:p.range},message:"First defined here"}]:void 0})}}else s.get(o).add(c);let d=c.match(/[\t ]+$/d);d&&n.push({message:"Key ends with whitespace",source:"factorio-locale",severity:kn.DiagnosticSeverity.Warning,code:"key.whitespace-end",range:{start:{line:a,character:l.indices[1][0]+d.index},end:{line:a,character:l.indices[1][1]}}})}else n.push({message:"Invalid Key",source:"factorio-locale",severity:kn.DiagnosticSeverity.Error,code:"key.invalid",range:{start:{line:a,character:0},end:{line:a,character:u.length}}})}}}return n}definitions=new Map;documentTrees=new Map;loadDocument(e){let r=bre(e);this.documentTrees.set(e.uri,r),this.definitions.set(e.uri,a$e(r,e.uri))}clearDocument(e){this.definitions.has(e)&&this.definitions.delete(e),this.documentTrees.has(e)&&this.documentTrees.delete(e)}clearFolder(e){for(let r of this.definitions.keys())r.startsWith(e)&&this.definitions.delete(r);for(let r of this.documentTrees.keys())r.startsWith(e)&&this.documentTrees.delete(r)}onDocumentSymbol(e){this.documentTrees.has(e.uri)||this.loadDocument(e);let r=this.documentTrees.get(e.uri);return r?l$e(r):[]}findDefinitions(e){let r=[];for(let n of this.definitions.values())r.push(...n.filter(i=>i.name===e).map(i=>i.link));return r}getCompletions(e){let r=[];for(let n of this.definitions.values())e?r.push(n.map(i=>i.name).filter(i=>i.startsWith(e))):r.push(n.map(i=>i.name).map(i=>{let o=i.indexOf(".");return o===-1?i:i.substring(0,o+1)}));return[...new Set(r.flat())]}onCodeAction(e,r,n){return e.languageId==="factorio-locale"?n.diagnostics.filter(i=>!!i.code).map(i=>{switch(i.code){case"section.merge":{let o=i,s=o.data.firstsym.range.end;return{title:"Merge Sections",kind:kn.CodeActionKind.QuickFix+".section.merge",diagnostics:[i],edit:{changes:{[e.uri]:[{range:o.data.newsym.range,newText:""},{range:{start:s,end:s},newText:e.getText({start:{line:o.data.newsym.selectionRange.end.line,character:o.data.newsym.selectionRange.end.character+1},end:o.data.newsym.range.end})}]}}}}default:return}}).filter(i=>!!i):[]}onDocumentColor(e){let r=[];for(let n=0;n<e.lineCount;n++){let i={start:{line:n,character:0},end:{line:n,character:1/0}},o=e.getText(i).replace(/(\r\n)|\r|\n$/,"");i.end.character=o.length;let s=/\[color=([^\]]+)\]/g,a=s.exec(o);for(;a;){{let u=o$e(a[1]);u&&r.push({color:u,range:{start:{line:n,character:a.index+7},end:{line:n,character:a.index+7+a[1].length}}})}a=s.exec(o)}}return r}onColorPresentation(e,r){return s$e(e).map(n=>({label:n,textEdit:{range:r,newText:n}}))}}});var nF,Ow,wre=dt(()=>{"use strict";nF=pe(Vh()),Ow=class{constructor(e){this.Locale=e}onDefinition(e,r){let n=r.getText({start:{line:e.position.line,character:0},end:{line:e.position.line,character:Number.MAX_VALUE}});for(let i of n.matchAll(/(['"])((?:[^\\](?<!\1)|\\['"0abfnrtv\\]|\\\d{1,3}|\\x[0-9a-fA-F]{2})*)\1/g))if(i.index&&i.index<=e.position.character&&i.index+i[0].length>=e.position.character){let o=i[2],s={start:{line:e.position.line,character:i.index},end:{line:e.position.line,character:i.index+i[0].length}};return this.Locale.findDefinitions(o).map(u=>Object.assign({originSelectionRange:s},u))}}onCompletion(e,r){let i=r.getText({start:{line:e.position.line,character:0},end:{line:e.position.line,character:e.position.character+1}}).match(/(['"])((?:[^\\](?<!\1)|\\['"0abfnrtv\\]|\\\d{1,3}|\\x[0-9a-fA-F]{2})*)\1$/);if(i){let o=i[2].lastIndexOf("."),s=o!==-1?i[2].substring(0,o+1):"";return this.Locale.getCompletions(s).map(a=>({label:a.endsWith(".")?a.substring(0,a.length-1):a,kind:a.endsWith(".")?nF.CompletionItemKind.Enum:nF.CompletionItemKind.EnumMember,commitCharacters:a.endsWith(".")?["."]:[],textEdit:{newText:a.endsWith(".")?a.substring(0,a.length-1):a,range:{start:{line:e.position.line,character:i.index+1},end:{line:e.position.line,character:e.position.character}}}}))}return[]}}});var Sre={};_s(Sre,{runLanguageServer:()=>c$e});async function c$e(){let t=new Hh,e=new Aw,r=new Ow(e),n=(0,Ci.createConnection)(Ci.ProposedFeatures.all),i=new Ci.TextDocuments(Gc);async function o(l){let c=i.get(l);if(c)return c;let d=Jr.parse(l);if(d.scheme==="file"&&d.path.endsWith(".cfg"))return c=Gc.create(l,"factorio-locale",1,await Ere.readFile(d.fsPath,"utf8")),c}async function s(l){let c=await o(l);c&&c.languageId==="factorio-locale"&&e.loadDocument(c)}async function a(l){let c=Jr.parse(l);if(c.scheme==="file"){let d=Au(c.fsPath,{pattern:"**/locale/*/*.cfg"});d.on("match",h=>{s(Jr.file(h.absolute).toString())}),d.on("error",h=>{throw h}),await new Promise(h=>{d.on("end",()=>{h()})})}}let u=!1;return n.onInitialize(async l=>{let c=l.capabilities;u=!!(c.workspace&&c.workspace.workspaceFolders),e.hasDiagnosticRelatedInformationCapability=!!(c.textDocument&&c.textDocument.publishDiagnostics&&c.textDocument.publishDiagnostics.relatedInformation);let d={capabilities:{textDocumentSync:Ci.TextDocumentSyncKind.Incremental,documentSymbolProvider:!0,codeActionProvider:!0,colorProvider:!0,definitionProvider:!0,completionProvider:{triggerCharacters:['"',"'","."],allCommitCharacters:["."]}}};return u&&(d.capabilities.workspace={workspaceFolders:{supported:!0,changeNotifications:!0}},l.workspaceFolders&&await Promise.all(l.workspaceFolders.map(h=>a(h.uri)))),d}),n.onInitialized(()=>{u&&n.workspace.onDidChangeWorkspaceFolders(async l=>{for(let c of l.removed)e.clearFolder(c.uri);for(let c of l.added)await a(c.uri)})}),i.onDidClose(l=>{switch(l.document.languageId){case"factorio-locale":n.sendDiagnostics({uri:l.document.uri,diagnostics:[]});break;case"factorio-changelog":n.sendDiagnostics({uri:l.document.uri,diagnostics:[]});break}}),i.onDidChangeContent(async l=>{switch(l.document.languageId){case"factorio-locale":e.loadDocument(l.document),n.sendDiagnostics({uri:l.document.uri,diagnostics:await e.validateTextDocument(l.document)});break;case"factorio-changelog":n.sendDiagnostics({uri:l.document.uri,diagnostics:await t.validateTextDocument(l.document)});break}}),n.onDefinition(async l=>{let c=await o(l.textDocument.uri);return c&&c.languageId==="lua"?r.onDefinition(l,c):null}),n.onCompletion(async l=>{let c=await o(l.textDocument.uri);if(c&&c.languageId==="lua")return{isIncomplete:!0,items:r.onCompletion(l,c)}}),n.onDidChangeWatchedFiles(async l=>{for(let c of l.changes)switch(c.type){case Ci.FileChangeType.Deleted:e.clearDocument(c.uri);break;case Ci.FileChangeType.Changed:case Ci.FileChangeType.Created:let d=await o(c.uri);d&&d.languageId==="factorio-locale"&&e.loadDocument(d);break;default:break}}),n.onDocumentSymbol(l=>{let c=i.get(l.textDocument.uri);if(c)switch(c.languageId){case"factorio-locale":return e.onDocumentSymbol(c);case"factorio-changelog":return t.onDocumentSymbol(c)}return null}),n.onCodeAction(l=>{let c=i.get(l.textDocument.uri);if(c)switch(c.languageId){case"factorio-locale":return e.onCodeAction(c,l.range,l.context);case"factorio-changelog":return t.onCodeAction(c,l.range,l.context)}return null}),n.onDocumentColor(l=>{let c=i.get(l.textDocument.uri);if(c)switch(c.languageId){case"factorio-locale":return e.onDocumentColor(c)}return null}),n.onColorPresentation(l=>{let c=i.get(l.textDocument.uri);if(c)switch(c.languageId){case"factorio-locale":return e.onColorPresentation(l.color,l.range)}return null}),i.listen(n),n.listen(),new Promise(l=>{n.onExit(l)})}var Ere,Ci,Dre=dt(()=>{"use strict";Ere=pe(require("fs/promises")),Ci=pe(Vh());_6();vk();_re();Fc();Ay();wre()});var f4=pe(c4(),1),{program:vt,createCommand:y$e,createArgument:v$e,createOption:_$e,CommanderError:w$e,InvalidArgumentError:E$e,InvalidOptionArgumentError:S$e,Command:D$e,Argument:C$e,Option:k$e,Help:T$e}=f4.default;var h4="Factorio Modding Tool Kit",p4="2.0.2";var ws=t=>t.name==="up"||t.name==="k"||t.ctrl&&t.name==="p",Ol=t=>t.name==="down"||t.name==="j"||t.ctrl&&t.name==="n",m4=t=>t.name==="space",Rl=t=>t.name==="backspace",J0=t=>"123456789".includes(t.name),sr=t=>t.name==="enter"||t.name==="return";var Qa=class extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(e){super(),this.cause=e?.cause}},em=class extends Error{name="CancelPromptError";message="Prompt was canceled"},tm=class extends Error{name="ExitPromptError"},rm=class extends Error{name="HookError"},Es=class extends Error{name="ValidationError"};var x2=require("node:async_hooks");var nm=require("node:async_hooks");var g4=new nm.AsyncLocalStorage;function Eie(t){return{rl:t,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function b4(t,e){let r=Eie(t);return g4.run(r,()=>{function n(i){r.handleChange=()=>{r.index=0,i()},r.handleChange()}return e(n)})}function Za(){let t=g4.getStore();if(!t)throw new rm("[Inquirer] Hook functions can only be called from within a prompt");return t}function g2(){return Za().rl}function b2(t){let e=(...r)=>{let n=Za(),i=!1,o=n.handleChange;n.handleChange=()=>{i=!0};let s=t(...r);return i&&o(),n.handleChange=o,s};return nm.AsyncResource.bind(e)}function Fl(t){let e=Za(),{index:r}=e,n={get(){return e.hooks[r]},set(o){e.hooks[r]=o},initialized:r in e.hooks},i=t(n);return e.index++,i}function x4(){Za().handleChange()}var Xa={queue(t){let e=Za(),{index:r}=e;e.hooksEffect.push(()=>{e.hooksCleanup[r]?.();let n=t(g2());if(n!=null&&typeof n!="function")throw new Es("useEffect return value must be a cleanup function or nothing.");e.hooksCleanup[r]=n})},run(){let t=Za();b2(()=>{t.hooksEffect.forEach(e=>{e()}),t.hooksEffect.length=0})()},clearAll(){let t=Za();t.hooksCleanup.forEach(e=>{e?.()}),t.hooksEffect.length=0,t.hooksCleanup.length=0}};function De(t){return Fl(e=>{let r=i=>{e.get()!==i&&(e.set(i),x4())};if(e.initialized)return[e.get(),r];let n=typeof t=="function"?t():t;return e.set(n),[n,r]})}function Ri(t,e){Fl(r=>{let n=r.get();(!Array.isArray(n)||e.some((o,s)=>!Object.is(o,n[s])))&&Xa.queue(t),r.set(e)})}var Jn=pe(Ss(),1);var Fi=pe(require("node:process"),1);function Cie(){return Fi.default.platform!=="win32"?Fi.default.env.TERM!=="linux":!!Fi.default.env.WT_SESSION||!!Fi.default.env.TERMINUS_SUBLIME||Fi.default.env.ConEmuTask==="{cmd::Cmder}"||Fi.default.env.TERM_PROGRAM==="Terminus-Sublime"||Fi.default.env.TERM_PROGRAM==="vscode"||Fi.default.env.TERM==="xterm-256color"||Fi.default.env.TERM==="alacritty"||Fi.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var v4={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},_4={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},kie={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},Tie={...v4,..._4},Aie={...v4,...kie},Oie=Cie(),Rie=Oie?Tie:Aie,Xn=Rie,B$e=Object.entries(_4);var w4={prefix:{idle:Jn.default.blue("?"),done:Jn.default.green(Xn.tick)},spinner:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"].map(t=>Jn.default.yellow(t))},style:{answer:Jn.default.cyan,message:Jn.default.bold,error:t=>Jn.default.red(`> ${t}`),defaultAnswer:t=>Jn.default.dim(`(${t})`),help:Jn.default.dim,highlight:Jn.default.cyan,key:t=>Jn.default.cyan(Jn.default.bold(`<${t}>`))}};function E4(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function S4(...t){let e={};for(let r of t)for(let[n,i]of Object.entries(r)){let o=e[n];e[n]=E4(o)&&E4(i)?S4(o,i):i}return e}function $t(...t){let e=[w4,...t.filter(r=>r!=null)];return S4(...e)}function Zt({status:t="idle",theme:e}){let[r,n]=De(!1),[i,o]=De(0),{prefix:s,spinner:a}=$t(e);return Ri(()=>{if(t==="loading"){let l,c=-1,d=setTimeout(x2.AsyncResource.bind(()=>{n(!0),l=setInterval(x2.AsyncResource.bind(()=>{c=c+1,o(c%a.frames.length)}),a.interval)}),300);return()=>{clearTimeout(d),clearInterval(l)}}else n(!1)},[t]),r?a.frames[i]:typeof s=="string"?s:s[t==="loading"?"idle":t]}function On(t,e){return Fl(r=>{let n=r.get();if(!n||n.dependencies.length!==e.length||n.dependencies.some((i,o)=>i!==e[o])){let i=t();return r.set({value:i,dependencies:e}),i}return n.value})}function ei(t){return De({current:t})[0]}function Xt(t){let e=ei(t);e.current=t,Ri(r=>{let n=!1,i=b2((o,s)=>{n||e.current(s,r)});return r.input.on("keypress",i),()=>{n=!0,r.input.removeListener("keypress",i)}},[])}var J4=pe(C4(),1),eP=pe(X4(),1);function Od(t,e){return t.split(`
|
|
116
116
|
`).flatMap(r=>(0,eP.default)(r,e,{trim:!1,hard:!0}).split(`
|
|
117
117
|
`).map(n=>n.trimEnd())).join(`
|
|
118
118
|
`)}function am(){return(0,J4.default)({defaultWidth:80,output:g2().output})}function eoe(t,e){return Od(t,e).split(`
|