@holistics/cli-core 2.1.10 → 2.1.11

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.
Files changed (2) hide show
  1. package/dist/commands.js +2 -2
  2. package/package.json +1 -1
package/dist/commands.js CHANGED
@@ -89,7 +89,7 @@ function print() { __p += __j.call(arguments, '') }
89
89
  *
90
90
  * Copyright (c) 2014-2018, Jon Schlinkert.
91
91
  * Released under the MIT License.
92
- */Kv0.exports=function(Z,X){if(typeof Z!=="string")throw new TypeError("expected path to be a string");if(Z==="\\"||Z==="/")return"/";var J=Z.length;if(J<=1)return Z;var Y="";if(J>4&&Z[3]==="\\"){var $=Z[2];if(($==="?"||$===".")&&Z.slice(0,2)==="\\\\")Z=Z.slice(2),Y="//"}var q=Z.split(/[/\\]+/);if(X!==!1&&q[q.length-1]==="")q.pop();return Y+q.join("/")}});var xv0=Z1((Vv0,Wv0)=>{Object.defineProperty(Vv0,"__esModule",{value:!0});var Gv0=Rv(),$m1=jr(),Qv0="!",qm1={returnIndex:!1},Km1=(Z)=>Array.isArray(Z)?Z:[Z],Qm1=(Z,X)=>{if(typeof Z==="function")return Z;if(typeof Z==="string"){let J=Gv0(Z,X);return(Y)=>Z===Y||J(Y)}if(Z instanceof RegExp)return(J)=>Z.test(J);return(J)=>!1},zv0=(Z,X,J,Y)=>{let $=Array.isArray(J),q=$?J[0]:J;if(!$&&typeof q!=="string")throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(q));let Q=$m1(q,!1);for(let G=0;G<X.length;G++){let V=X[G];if(V(Q))return Y?-1:!1}let z=$&&[Q].concat(J.slice(1));for(let G=0;G<Z.length;G++){let V=Z[G];if($?V(...z):V(Q))return Y?G:!0}return Y?-1:!1},Nr=(Z,X,J=qm1)=>{if(Z==null)throw new TypeError("anymatch: specify first argument");let Y=typeof J==="boolean"?{returnIndex:J}:J,$=Y.returnIndex||!1,q=Km1(Z),Q=q.filter((G)=>typeof G==="string"&&G.charAt(0)===Qv0).map((G)=>G.slice(1)).map((G)=>Gv0(G,Y)),z=q.filter((G)=>typeof G!=="string"||typeof G==="string"&&G.charAt(0)!==Qv0).map((G)=>Qm1(G,Y));if(X==null)return(G,V=!1)=>{return zv0(z,Q,G,typeof V==="boolean"?V:!1)};return zv0(z,Q,X,$)};Nr.default=Nr;Wv0.exports=Nr});var Bv0=Z1((h62,zm1)=>{zm1.exports=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]});var Mv0=Z1((u62,Hv0)=>{var Gm1=s1("path"),Vm1=Bv0(),Wm1=new Set(Vm1);Hv0.exports=(Z)=>Wm1.has(Gm1.extname(Z).slice(1).toLowerCase())});var FS=Z1((Hm1)=>{var{sep:xm1}=s1("path"),{platform:Lr}=process,Bm1=s1("os");Hm1.EV_ALL="all";Hm1.EV_READY="ready";Hm1.EV_ADD="add";Hm1.EV_CHANGE="change";Hm1.EV_ADD_DIR="addDir";Hm1.EV_UNLINK="unlink";Hm1.EV_UNLINK_DIR="unlinkDir";Hm1.EV_RAW="raw";Hm1.EV_ERROR="error";Hm1.STR_DATA="data";Hm1.STR_END="end";Hm1.STR_CLOSE="close";Hm1.FSEVENT_CREATED="created";Hm1.FSEVENT_MODIFIED="modified";Hm1.FSEVENT_DELETED="deleted";Hm1.FSEVENT_MOVED="moved";Hm1.FSEVENT_CLONED="cloned";Hm1.FSEVENT_UNKNOWN="unknown";Hm1.FSEVENT_FLAG_MUST_SCAN_SUBDIRS=1;Hm1.FSEVENT_TYPE_FILE="file";Hm1.FSEVENT_TYPE_DIRECTORY="directory";Hm1.FSEVENT_TYPE_SYMLINK="symlink";Hm1.KEY_LISTENERS="listeners";Hm1.KEY_ERR="errHandlers";Hm1.KEY_RAW="rawEmitters";Hm1.HANDLER_KEYS=[Hm1.KEY_LISTENERS,Hm1.KEY_ERR,Hm1.KEY_RAW];Hm1.DOT_SLASH=`.${xm1}`;Hm1.BACK_SLASH_RE=/\\/g;Hm1.DOUBLE_SLASH_RE=/\/\//;Hm1.SLASH_OR_BACK_SLASH_RE=/[/\\]/;Hm1.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/;Hm1.REPLACER_RE=/^\.[/\\]/;Hm1.SLASH="/";Hm1.SLASH_SLASH="//";Hm1.BRACE_START="{";Hm1.BANG="!";Hm1.ONE_DOT=".";Hm1.TWO_DOTS="..";Hm1.STAR="*";Hm1.GLOBSTAR="**";Hm1.ROOT_GLOBSTAR="/**/*";Hm1.SLASH_GLOBSTAR="/**";Hm1.DIR_SUFFIX="Dir";Hm1.ANYMATCH_OPTS={dot:!0};Hm1.STRING_TYPE="string";Hm1.FUNCTION_TYPE="function";Hm1.EMPTY_STR="";Hm1.EMPTY_FN=()=>{};Hm1.IDENTITY_FN=(Z)=>Z;Hm1.isWindows=Lr==="win32";Hm1.isMacos=Lr==="darwin";Hm1.isLinux=Lr==="linux";Hm1.isIBMi=Bm1.type()==="OS400"});var _v0=Z1((p62,Ov0)=>{var Oz=s1("fs"),L9=s1("path"),{promisify:y_}=s1("util"),Wg1=Mv0(),{isWindows:xg1,isLinux:Bg1,EMPTY_FN:Hg1,EMPTY_STR:Mg1,KEY_LISTENERS:jD,KEY_ERR:Cr,KEY_RAW:E_,HANDLER_KEYS:Ug1,EV_CHANGE:jS,EV_ADD:DS,EV_ADD_DIR:Fg1,EV_ERROR:Nv0,STR_DATA:Dg1,STR_END:jg1,BRACE_START:Ng1,STAR:Lg1}=FS(),Cg1=y_(Oz.open),Lv0=y_(Oz.stat),Rg1=y_(Oz.lstat),Og1=y_(Oz.close),Rr=y_(Oz.realpath),_g1={lstat:Rg1,stat:Lv0},_r=(Z,X)=>{if(Z instanceof Set)Z.forEach(X);else X(Z)},k_=(Z,X,J)=>{let Y=Z[X];if(!(Y instanceof Set))Z[X]=Y=new Set([Y]);Y.add(J)},Pg1=(Z)=>(X)=>{let J=Z[X];if(J instanceof Set)J.clear();else delete Z[X]},b_=(Z,X,J)=>{let Y=Z[X];if(Y instanceof Set)Y.delete(J);else if(Y===J)delete Z[X]},Cv0=(Z)=>Z instanceof Set?Z.size===0:!Z,NS=new Map;function jv0(Z,X,J,Y,$){let q=(Q,z)=>{if(J(Z),$(Q,z,{watchedPath:Z}),z&&Z!==z)LS(L9.resolve(Z,z),jD,L9.join(Z,z))};try{return Oz.watch(Z,X,q)}catch(Q){Y(Q)}}var LS=(Z,X,J,Y,$)=>{let q=NS.get(Z);if(!q)return;_r(q[X],(Q)=>{Q(J,Y,$)})},vg1=(Z,X,J,Y)=>{let{listener:$,errHandler:q,rawEmitter:Q}=Y,z=NS.get(X),G;if(!J.persistent)return G=jv0(Z,J,$,q,Q),G.close.bind(G);if(z)k_(z,jD,$),k_(z,Cr,q),k_(z,E_,Q);else{if(G=jv0(Z,J,LS.bind(null,X,jD),q,LS.bind(null,X,E_)),!G)return;G.on(Nv0,async(V)=>{let x=LS.bind(null,X,Cr);if(z.watcherUnusable=!0,xg1&&V.code==="EPERM")try{let H=await Cg1(Z,"r");await Og1(H),x(V)}catch(H){}else x(V)}),z={listeners:$,errHandlers:q,rawEmitters:Q,watcher:G},NS.set(X,z)}return()=>{if(b_(z,jD,$),b_(z,Cr,q),b_(z,E_,Q),Cv0(z.listeners))z.watcher.close(),NS.delete(X),Ug1.forEach(Pg1(z)),z.watcher=void 0,Object.freeze(z)}},Or=new Map,Tg1=(Z,X,J,Y)=>{let{listener:$,rawEmitter:q}=Y,Q=Or.get(X),z=new Set,G=new Set,V=Q&&Q.options;if(V&&(V.persistent<J.persistent||V.interval>J.interval))z=Q.listeners,G=Q.rawEmitters,Oz.unwatchFile(X),Q=void 0;if(Q)k_(Q,jD,$),k_(Q,E_,q);else Q={listeners:$,rawEmitters:q,options:J,watcher:Oz.watchFile(X,J,(x,H)=>{_r(Q.rawEmitters,(F)=>{F(jS,X,{curr:x,prev:H})});let U=x.mtimeMs;if(x.size!==H.size||U>H.mtimeMs||U===0)_r(Q.listeners,(F)=>F(Z,x))})},Or.set(X,Q);return()=>{if(b_(Q,jD,$),b_(Q,E_,q),Cv0(Q.listeners))Or.delete(X),Oz.unwatchFile(X),Q.options=Q.watcher=void 0,Object.freeze(Q)}};class Rv0{constructor(Z){this.fsw=Z,this._boundHandleError=(X)=>Z._handleError(X)}_watchWithNodeFs(Z,X){let J=this.fsw.options,Y=L9.dirname(Z),$=L9.basename(Z);this.fsw._getWatchedDir(Y).add($);let Q=L9.resolve(Z),z={persistent:J.persistent};if(!X)X=Hg1;let G;if(J.usePolling)z.interval=J.enableBinaryInterval&&Wg1($)?J.binaryInterval:J.interval,G=Tg1(Z,Q,z,{listener:X,rawEmitter:this.fsw._emitRaw});else G=vg1(Z,Q,z,{listener:X,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return G}_handleFile(Z,X,J){if(this.fsw.closed)return;let Y=L9.dirname(Z),$=L9.basename(Z),q=this.fsw._getWatchedDir(Y),Q=X;if(q.has($))return;let z=async(V,x)=>{if(!this.fsw._throttle("watch",Z,5))return;if(!x||x.mtimeMs===0)try{let H=await Lv0(Z);if(this.fsw.closed)return;let{atimeMs:U,mtimeMs:F}=H;if(!U||U<=F||F!==Q.mtimeMs)this.fsw._emit(jS,Z,H);if(Bg1&&Q.ino!==H.ino)this.fsw._closeFile(V),Q=H,this.fsw._addPathCloser(V,this._watchWithNodeFs(Z,z));else Q=H}catch(H){this.fsw._remove(Y,$)}else if(q.has($)){let{atimeMs:H,mtimeMs:U}=x;if(!H||H<=U||U!==Q.mtimeMs)this.fsw._emit(jS,Z,x);Q=x}},G=this._watchWithNodeFs(Z,z);if(!(J&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(Z)){if(!this.fsw._throttle(DS,Z,0))return;this.fsw._emit(DS,Z,X)}return G}async _handleSymlink(Z,X,J,Y){if(this.fsw.closed)return;let $=Z.fullPath,q=this.fsw._getWatchedDir(X);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let Q;try{Q=await Rr(J)}catch(z){return this.fsw._emitReady(),!0}if(this.fsw.closed)return;if(q.has(Y)){if(this.fsw._symlinkPaths.get($)!==Q)this.fsw._symlinkPaths.set($,Q),this.fsw._emit(jS,J,Z.stats)}else q.add(Y),this.fsw._symlinkPaths.set($,Q),this.fsw._emit(DS,J,Z.stats);return this.fsw._emitReady(),!0}if(this.fsw._symlinkPaths.has($))return!0;this.fsw._symlinkPaths.set($,!0)}_handleRead(Z,X,J,Y,$,q,Q){if(Z=L9.join(Z,Mg1),!J.hasGlob){if(Q=this.fsw._throttle("readdir",Z,1000),!Q)return}let z=this.fsw._getWatchedDir(J.path),G=new Set,V=this.fsw._readdirp(Z,{fileFilter:(x)=>J.filterPath(x),directoryFilter:(x)=>J.filterDir(x),depth:0}).on(Dg1,async(x)=>{if(this.fsw.closed){V=void 0;return}let H=x.path,U=L9.join(Z,H);if(G.add(H),x.stats.isSymbolicLink()&&await this._handleSymlink(x,Z,U,H))return;if(this.fsw.closed){V=void 0;return}if(H===Y||!Y&&!z.has(H))this.fsw._incrReadyCount(),U=L9.join($,L9.relative($,U)),this._addToNodeFs(U,X,J,q+1)}).on(Nv0,this._boundHandleError);return new Promise((x)=>V.once(jg1,()=>{if(this.fsw.closed){V=void 0;return}let H=Q?Q.clear():!1;if(x(),z.getChildren().filter((U)=>{return U!==Z&&!G.has(U)&&(!J.hasGlob||J.filterPath({fullPath:L9.resolve(Z,U)}))}).forEach((U)=>{this.fsw._remove(Z,U)}),V=void 0,H)this._handleRead(Z,!1,J,Y,$,q,Q)}))}async _handleDir(Z,X,J,Y,$,q,Q){let z=this.fsw._getWatchedDir(L9.dirname(Z)),G=z.has(L9.basename(Z));if(!(J&&this.fsw.options.ignoreInitial)&&!$&&!G){if(!q.hasGlob||q.globFilter(Z))this.fsw._emit(Fg1,Z,X)}z.add(L9.basename(Z)),this.fsw._getWatchedDir(Z);let V,x,H=this.fsw.options.depth;if((H==null||Y<=H)&&!this.fsw._symlinkPaths.has(Q)){if(!$){if(await this._handleRead(Z,J,q,$,Z,Y,V),this.fsw.closed)return}x=this._watchWithNodeFs(Z,(U,F)=>{if(F&&F.mtimeMs===0)return;this._handleRead(U,!1,q,$,Z,Y,V)})}return x}async _addToNodeFs(Z,X,J,Y,$){let q=this.fsw._emitReady;if(this.fsw._isIgnored(Z)||this.fsw.closed)return q(),!1;let Q=this.fsw._getWatchHelpers(Z,Y);if(!Q.hasGlob&&J)Q.hasGlob=J.hasGlob,Q.globFilter=J.globFilter,Q.filterPath=(z)=>J.filterPath(z),Q.filterDir=(z)=>J.filterDir(z);try{let z=await _g1[Q.statMethod](Q.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(Q.watchPath,z))return q(),!1;let G=this.fsw.options.followSymlinks&&!Z.includes(Lg1)&&!Z.includes(Ng1),V;if(z.isDirectory()){let x=L9.resolve(Z),H=G?await Rr(Z):Z;if(this.fsw.closed)return;if(V=await this._handleDir(Q.watchPath,z,X,Y,$,Q,H),this.fsw.closed)return;if(x!==H&&H!==void 0)this.fsw._symlinkPaths.set(x,H)}else if(z.isSymbolicLink()){let x=G?await Rr(Z):Z;if(this.fsw.closed)return;let H=L9.dirname(Q.watchPath);if(this.fsw._getWatchedDir(H).add(Q.watchPath),this.fsw._emit(DS,Q.watchPath,z),V=await this._handleDir(H,z,X,Y,Z,Q,x),this.fsw.closed)return;if(x!==void 0)this.fsw._symlinkPaths.set(L9.resolve(Z),x)}else V=this._handleFile(Q.watchPath,z,X);return q(),this.fsw._addPathCloser(Z,V),!1}catch(z){if(this.fsw._handleError(z))return q(),Z}}}Ov0.exports=Rv0});var Ev0=Z1((c62,Sr)=>{var wr=s1("fs"),C9=s1("path"),{promisify:Ir}=s1("util"),ND;try{ND=(()=>{throw new Error("Cannot require module "+"fsevents");})()}catch(Z){if(process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR)console.error(Z)}if(ND){let Z=process.version.match(/v(\d+)\.(\d+)/);if(Z&&Z[1]&&Z[2]){let X=Number.parseInt(Z[1],10),J=Number.parseInt(Z[2],10);if(X===8&&J<16)ND=void 0}}var{EV_ADD:Pr,EV_CHANGE:Ag1,EV_ADD_DIR:Pv0,EV_UNLINK:CS,EV_ERROR:wg1,STR_DATA:Ig1,STR_END:Sg1,FSEVENT_CREATED:Eg1,FSEVENT_MODIFIED:kg1,FSEVENT_DELETED:bg1,FSEVENT_MOVED:yg1,FSEVENT_UNKNOWN:fg1,FSEVENT_FLAG_MUST_SCAN_SUBDIRS:mg1,FSEVENT_TYPE_FILE:gg1,FSEVENT_TYPE_DIRECTORY:f_,FSEVENT_TYPE_SYMLINK:Iv0,ROOT_GLOBSTAR:vv0,DIR_SUFFIX:hg1,DOT_SLASH:Tv0,FUNCTION_TYPE:vr,EMPTY_FN:ug1,IDENTITY_FN:dg1}=FS(),pg1=(Z)=>isNaN(Z)?{}:{depth:Z},Ar=Ir(wr.stat),cg1=Ir(wr.lstat),Av0=Ir(wr.realpath),lg1={stat:Ar,lstat:cg1},tB=new Map,og1=10,ig1=new Set([69888,70400,71424,72704,73472,131328,131840,262912]),sg1=(Z,X)=>{return{stop:ND.watch(Z,X)}};function ag1(Z,X,J,Y){let $=C9.extname(X)?C9.dirname(X):X,q=C9.dirname($),Q=tB.get($);if(rg1(q))$=q;let z=C9.resolve(Z),G=z!==X,V=(H,U,F)=>{if(G)H=H.replace(X,z);if(H===z||!H.indexOf(z+C9.sep))J(H,U,F)},x=!1;for(let H of tB.keys())if(X.indexOf(C9.resolve(H)+C9.sep)===0){$=H,Q=tB.get($),x=!0;break}if(Q||x)Q.listeners.add(V);else Q={listeners:new Set([V]),rawEmitter:Y,watcher:sg1($,(H,U)=>{if(!Q.listeners.size)return;if(U&mg1)return;let F=ND.getInfo(H,U);Q.listeners.forEach((N)=>{N(H,U,F)}),Q.rawEmitter(F.event,H,F)})},tB.set($,Q);return()=>{let H=Q.listeners;if(H.delete(V),!H.size){if(tB.delete($),Q.watcher)return Q.watcher.stop().then(()=>{Q.rawEmitter=Q.watcher=void 0,Object.freeze(Q)})}}}var rg1=(Z)=>{let X=0;for(let J of tB.keys())if(J.indexOf(Z)===0){if(X++,X>=og1)return!0}return!1},ng1=()=>ND&&tB.size<128,Tr=(Z,X)=>{let J=0;while(!Z.indexOf(X)&&(Z=C9.dirname(Z))!==X)J++;return J},wv0=(Z,X)=>Z.type===f_&&X.isDirectory()||Z.type===Iv0&&X.isSymbolicLink()||Z.type===gg1&&X.isFile();class Sv0{constructor(Z){this.fsw=Z}checkIgnored(Z,X){let J=this.fsw._ignoredPaths;if(this.fsw._isIgnored(Z,X)){if(J.add(Z),X&&X.isDirectory())J.add(Z+vv0);return!0}J.delete(Z),J.delete(Z+vv0)}addOrChange(Z,X,J,Y,$,q,Q,z){let G=$.has(q)?Ag1:Pr;this.handleEvent(G,Z,X,J,Y,$,q,Q,z)}async checkExists(Z,X,J,Y,$,q,Q,z){try{let G=await Ar(Z);if(this.fsw.closed)return;if(wv0(Q,G))this.addOrChange(Z,X,J,Y,$,q,Q,z);else this.handleEvent(CS,Z,X,J,Y,$,q,Q,z)}catch(G){if(G.code==="EACCES")this.addOrChange(Z,X,J,Y,$,q,Q,z);else this.handleEvent(CS,Z,X,J,Y,$,q,Q,z)}}handleEvent(Z,X,J,Y,$,q,Q,z,G){if(this.fsw.closed||this.checkIgnored(X))return;if(Z===CS){let V=z.type===f_;if(V||q.has(Q))this.fsw._remove($,Q,V)}else{if(Z===Pr){if(z.type===f_)this.fsw._getWatchedDir(X);if(z.type===Iv0&&G.followSymlinks){let x=G.depth===void 0?void 0:Tr(J,Y)+1;return this._addToFsEvents(X,!1,!0,x)}this.fsw._getWatchedDir($).add(Q)}let V=z.type===f_?Z+hg1:Z;if(this.fsw._emit(V,X),V===Pv0)this._addToFsEvents(X,!1,!0)}}_watchWithFsEvents(Z,X,J,Y){if(this.fsw.closed||this.fsw._isIgnored(Z))return;let $=this.fsw.options,Q=ag1(Z,X,async(z,G,V)=>{if(this.fsw.closed)return;if($.depth!==void 0&&Tr(z,X)>$.depth)return;let x=J(C9.join(Z,C9.relative(Z,z)));if(Y&&!Y(x))return;let H=C9.dirname(x),U=C9.basename(x),F=this.fsw._getWatchedDir(V.type===f_?x:H);if(ig1.has(G)||V.event===fg1)if(typeof $.ignored===vr){let N;try{N=await Ar(x)}catch(C){}if(this.fsw.closed)return;if(this.checkIgnored(x,N))return;if(wv0(V,N))this.addOrChange(x,z,X,H,F,U,V,$);else this.handleEvent(CS,x,z,X,H,F,U,V,$)}else this.checkExists(x,z,X,H,F,U,V,$);else switch(V.event){case Eg1:case kg1:return this.addOrChange(x,z,X,H,F,U,V,$);case bg1:case yg1:return this.checkExists(x,z,X,H,F,U,V,$)}},this.fsw._emitRaw);return this.fsw._emitReady(),Q}async _handleFsEventsSymlink(Z,X,J,Y){if(this.fsw.closed||this.fsw._symlinkPaths.has(X))return;this.fsw._symlinkPaths.set(X,!0),this.fsw._incrReadyCount();try{let $=await Av0(Z);if(this.fsw.closed)return;if(this.fsw._isIgnored($))return this.fsw._emitReady();this.fsw._incrReadyCount(),this._addToFsEvents($||Z,(q)=>{let Q=Z;if($&&$!==Tv0)Q=q.replace($,Z);else if(q!==Tv0)Q=C9.join(Z,q);return J(Q)},!1,Y)}catch($){if(this.fsw._handleError($))return this.fsw._emitReady()}}emitAdd(Z,X,J,Y,$){let q=J(Z),Q=X.isDirectory(),z=this.fsw._getWatchedDir(C9.dirname(q)),G=C9.basename(q);if(Q)this.fsw._getWatchedDir(q);if(z.has(G))return;if(z.add(G),!Y.ignoreInitial||$===!0)this.fsw._emit(Q?Pv0:Pr,q,X)}initWatch(Z,X,J,Y){if(this.fsw.closed)return;let $=this._watchWithFsEvents(J.watchPath,C9.resolve(Z||J.watchPath),Y,J.globFilter);this.fsw._addPathCloser(X,$)}async _addToFsEvents(Z,X,J,Y){if(this.fsw.closed)return;let $=this.fsw.options,q=typeof X===vr?X:dg1,Q=this.fsw._getWatchHelpers(Z);try{let z=await lg1[Q.statMethod](Q.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(Q.watchPath,z))throw null;if(z.isDirectory()){if(!Q.globFilter)this.emitAdd(q(Z),z,q,$,J);if(Y&&Y>$.depth)return;this.fsw._readdirp(Q.watchPath,{fileFilter:(G)=>Q.filterPath(G),directoryFilter:(G)=>Q.filterDir(G),...pg1($.depth-(Y||0))}).on(Ig1,(G)=>{if(this.fsw.closed)return;if(G.stats.isDirectory()&&!Q.filterPath(G))return;let V=C9.join(Q.watchPath,G.path),{fullPath:x}=G;if(Q.followSymlinks&&G.stats.isSymbolicLink()){let H=$.depth===void 0?void 0:Tr(V,C9.resolve(Q.watchPath))+1;this._handleFsEventsSymlink(V,x,q,H)}else this.emitAdd(V,G.stats,q,$,J)}).on(wg1,ug1).on(Sg1,()=>{this.fsw._emitReady()})}else this.emitAdd(Q.watchPath,z,q,$,J),this.fsw._emitReady()}catch(z){if(!z||this.fsw._handleError(z))this.fsw._emitReady(),this.fsw._emitReady()}if($.persistent&&J!==!0)if(typeof X===vr)this.initWatch(void 0,Z,Q,q);else{let z;try{z=await Av0(Q.watchPath)}catch(G){}this.initWatch(z,Z,Q,q)}}}Sr.exports=Sv0;Sr.exports.canUse=ng1});var ov0=Z1((Ah1)=>{var{EventEmitter:tg1}=s1("events"),pr=s1("fs"),i4=s1("path"),{promisify:hv0}=s1("util"),eg1=qv0(),mr=xv0().default,Zh1=pb(),Er=ub(),Xh1=rb(),Jh1=jr(),Yh1=_v0(),kv0=Ev0(),{EV_ALL:kr,EV_READY:$h1,EV_ADD:RS,EV_CHANGE:m_,EV_UNLINK:bv0,EV_ADD_DIR:qh1,EV_UNLINK_DIR:Kh1,EV_RAW:Qh1,EV_ERROR:br,STR_CLOSE:zh1,STR_END:Gh1,BACK_SLASH_RE:Vh1,DOUBLE_SLASH_RE:yv0,SLASH_OR_BACK_SLASH_RE:Wh1,DOT_RE:xh1,REPLACER_RE:Bh1,SLASH:yr,SLASH_SLASH:Hh1,BRACE_START:Mh1,BANG:gr,ONE_DOT:uv0,TWO_DOTS:Uh1,GLOBSTAR:Fh1,SLASH_GLOBSTAR:fr,ANYMATCH_OPTS:hr,STRING_TYPE:cr,FUNCTION_TYPE:Dh1,EMPTY_STR:ur,EMPTY_FN:jh1,isWindows:Nh1,isMacos:Lh1,isIBMi:Ch1}=FS(),Rh1=hv0(pr.stat),Oh1=hv0(pr.readdir),dr=(Z=[])=>Array.isArray(Z)?Z:[Z],dv0=(Z,X=[])=>{return Z.forEach((J)=>{if(Array.isArray(J))dv0(J,X);else X.push(J)}),X},fv0=(Z)=>{let X=dv0(dr(Z));if(!X.every((J)=>typeof J===cr))throw new TypeError(`Non-string provided as watch path: ${X}`);return X.map(pv0)},mv0=(Z)=>{let X=Z.replace(Vh1,yr),J=!1;if(X.startsWith(Hh1))J=!0;while(X.match(yv0))X=X.replace(yv0,yr);if(J)X=yr+X;return X},pv0=(Z)=>mv0(i4.normalize(mv0(Z))),gv0=(Z=ur)=>(X)=>{if(typeof X!==cr)return X;return pv0(i4.isAbsolute(X)?X:i4.join(Z,X))},_h1=(Z,X)=>{if(i4.isAbsolute(Z))return Z;if(Z.startsWith(gr))return gr+i4.join(X,Z.slice(1));return i4.join(X,Z)},c$=(Z,X)=>Z[X]===void 0;class cv0{constructor(Z,X){this.path=Z,this._removeWatcher=X,this.items=new Set}add(Z){let{items:X}=this;if(!X)return;if(Z!==uv0&&Z!==Uh1)X.add(Z)}async remove(Z){let{items:X}=this;if(!X)return;if(X.delete(Z),X.size>0)return;let J=this.path;try{await Oh1(J)}catch(Y){if(this._removeWatcher)this._removeWatcher(i4.dirname(J),i4.basename(J))}}has(Z){let{items:X}=this;if(!X)return;return X.has(Z)}getChildren(){let{items:Z}=this;if(!Z)return;return[...Z.values()]}dispose(){this.items.clear(),delete this.path,delete this._removeWatcher,delete this.items,Object.freeze(this)}}var Ph1="stat",vh1="lstat";class lv0{constructor(Z,X,J,Y){if(this.fsw=Y,this.path=Z=Z.replace(Bh1,ur),this.watchPath=X,this.fullWatchPath=i4.resolve(X),this.hasGlob=X!==Z,Z===ur)this.hasGlob=!1;this.globSymlink=this.hasGlob&&J?void 0:!1,this.globFilter=this.hasGlob?mr(Z,void 0,hr):!1,this.dirParts=this.getDirParts(Z),this.dirParts.forEach(($)=>{if($.length>1)$.pop()}),this.followSymlinks=J,this.statMethod=J?Ph1:vh1}checkGlobSymlink(Z){if(this.globSymlink===void 0)this.globSymlink=Z.fullParentDir===this.fullWatchPath?!1:{realPath:Z.fullParentDir,linkPath:this.fullWatchPath};if(this.globSymlink)return Z.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath);return Z.fullPath}entryPath(Z){return i4.join(this.watchPath,i4.relative(this.watchPath,this.checkGlobSymlink(Z)))}filterPath(Z){let{stats:X}=Z;if(X&&X.isSymbolicLink())return this.filterDir(Z);let J=this.entryPath(Z);return(this.hasGlob&&typeof this.globFilter===Dh1?this.globFilter(J):!0)&&this.fsw._isntIgnored(J,X)&&this.fsw._hasReadPermissions(X)}getDirParts(Z){if(!this.hasGlob)return[];let X=[];return(Z.includes(Mh1)?Xh1.expand(Z):[Z]).forEach((Y)=>{X.push(i4.relative(this.watchPath,Y).split(Wh1))}),X}filterDir(Z){if(this.hasGlob){let X=this.getDirParts(this.checkGlobSymlink(Z)),J=!1;this.unmatchedGlob=!this.dirParts.some((Y)=>{return Y.every(($,q)=>{if($===Fh1)J=!0;return J||!X[0][q]||mr($,X[0][q],hr)})})}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(Z),Z.stats)}}class lr extends tg1{constructor(Z){super();let X={};if(Z)Object.assign(X,Z);if(this._watched=new Map,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._symlinkPaths=new Map,this._streams=new Set,this.closed=!1,c$(X,"persistent"))X.persistent=!0;if(c$(X,"ignoreInitial"))X.ignoreInitial=!1;if(c$(X,"ignorePermissionErrors"))X.ignorePermissionErrors=!1;if(c$(X,"interval"))X.interval=100;if(c$(X,"binaryInterval"))X.binaryInterval=300;if(c$(X,"disableGlobbing"))X.disableGlobbing=!1;if(X.enableBinaryInterval=X.binaryInterval!==X.interval,c$(X,"useFsEvents"))X.useFsEvents=!X.usePolling;if(!kv0.canUse())X.useFsEvents=!1;if(c$(X,"usePolling")&&!X.useFsEvents)X.usePolling=Lh1;if(Ch1)X.usePolling=!0;let Y=process.env.CHOKIDAR_USEPOLLING;if(Y!==void 0){let z=Y.toLowerCase();if(z==="false"||z==="0")X.usePolling=!1;else if(z==="true"||z==="1")X.usePolling=!0;else X.usePolling=!!z}let $=process.env.CHOKIDAR_INTERVAL;if($)X.interval=Number.parseInt($,10);if(c$(X,"atomic"))X.atomic=!X.usePolling&&!X.useFsEvents;if(X.atomic)this._pendingUnlinks=new Map;if(c$(X,"followSymlinks"))X.followSymlinks=!0;if(c$(X,"awaitWriteFinish"))X.awaitWriteFinish=!1;if(X.awaitWriteFinish===!0)X.awaitWriteFinish={};let q=X.awaitWriteFinish;if(q){if(!q.stabilityThreshold)q.stabilityThreshold=2000;if(!q.pollInterval)q.pollInterval=100;this._pendingWrites=new Map}if(X.ignored)X.ignored=dr(X.ignored);let Q=0;if(this._emitReady=()=>{if(Q++,Q>=this._readyCount)this._emitReady=jh1,this._readyEmitted=!0,process.nextTick(()=>this.emit($h1))},this._emitRaw=(...z)=>this.emit(Qh1,...z),this._readyEmitted=!1,this.options=X,X.useFsEvents)this._fsEventsHandler=new kv0(this);else this._nodeFsHandler=new Yh1(this);Object.freeze(X)}add(Z,X,J){let{cwd:Y,disableGlobbing:$}=this.options;this.closed=!1;let q=fv0(Z);if(Y)q=q.map((Q)=>{let z=_h1(Q,Y);if($||!Er(Q))return z;return Jh1(z)});if(q=q.filter((Q)=>{if(Q.startsWith(gr))return this._ignoredPaths.add(Q.slice(1)),!1;return this._ignoredPaths.delete(Q),this._ignoredPaths.delete(Q+fr),this._userIgnored=void 0,!0}),this.options.useFsEvents&&this._fsEventsHandler){if(!this._readyCount)this._readyCount=q.length;if(this.options.persistent)this._readyCount+=q.length;q.forEach((Q)=>this._fsEventsHandler._addToFsEvents(Q))}else{if(!this._readyCount)this._readyCount=0;this._readyCount+=q.length,Promise.all(q.map(async(Q)=>{let z=await this._nodeFsHandler._addToNodeFs(Q,!J,0,0,X);if(z)this._emitReady();return z})).then((Q)=>{if(this.closed)return;Q.filter((z)=>z).forEach((z)=>{this.add(i4.dirname(z),i4.basename(X||z))})})}return this}unwatch(Z){if(this.closed)return this;let X=fv0(Z),{cwd:J}=this.options;return X.forEach((Y)=>{if(!i4.isAbsolute(Y)&&!this._closers.has(Y)){if(J)Y=i4.join(J,Y);Y=i4.resolve(Y)}if(this._closePath(Y),this._ignoredPaths.add(Y),this._watched.has(Y))this._ignoredPaths.add(Y+fr);this._userIgnored=void 0}),this}close(){if(this.closed)return this._closePromise;this.closed=!0,this.removeAllListeners();let Z=[];return this._closers.forEach((X)=>X.forEach((J)=>{let Y=J();if(Y instanceof Promise)Z.push(Y)})),this._streams.forEach((X)=>X.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach((X)=>X.dispose()),["closers","watched","streams","symlinkPaths","throttled"].forEach((X)=>{this[`_${X}`].clear()}),this._closePromise=Z.length?Promise.all(Z).then(()=>{return}):Promise.resolve(),this._closePromise}getWatched(){let Z={};return this._watched.forEach((X,J)=>{let Y=this.options.cwd?i4.relative(this.options.cwd,J):J;Z[Y||uv0]=X.getChildren().sort()}),Z}emitWithAll(Z,X){if(this.emit(...X),Z!==br)this.emit(kr,...X)}async _emit(Z,X,J,Y,$){if(this.closed)return;let q=this.options;if(Nh1)X=i4.normalize(X);if(q.cwd)X=i4.relative(q.cwd,X);let Q=[Z,X];if($!==void 0)Q.push(J,Y,$);else if(Y!==void 0)Q.push(J,Y);else if(J!==void 0)Q.push(J);let z=q.awaitWriteFinish,G;if(z&&(G=this._pendingWrites.get(X)))return G.lastChange=new Date,this;if(q.atomic){if(Z===bv0)return this._pendingUnlinks.set(X,Q),setTimeout(()=>{this._pendingUnlinks.forEach((V,x)=>{this.emit(...V),this.emit(kr,...V),this._pendingUnlinks.delete(x)})},typeof q.atomic==="number"?q.atomic:100),this;if(Z===RS&&this._pendingUnlinks.has(X))Z=Q[0]=m_,this._pendingUnlinks.delete(X)}if(z&&(Z===RS||Z===m_)&&this._readyEmitted){let V=(x,H)=>{if(x)Z=Q[0]=br,Q[1]=x,this.emitWithAll(Z,Q);else if(H){if(Q.length>2)Q[2]=H;else Q.push(H);this.emitWithAll(Z,Q)}};return this._awaitWriteFinish(X,z.stabilityThreshold,Z,V),this}if(Z===m_){if(!this._throttle(m_,X,50))return this}if(q.alwaysStat&&J===void 0&&(Z===RS||Z===qh1||Z===m_)){let V=q.cwd?i4.join(q.cwd,X):X,x;try{x=await Rh1(V)}catch(H){}if(!x||this.closed)return;Q.push(x)}return this.emitWithAll(Z,Q),this}_handleError(Z){let X=Z&&Z.code;if(Z&&X!=="ENOENT"&&X!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||X!=="EPERM"&&X!=="EACCES"))this.emit(br,Z);return Z||this.closed}_throttle(Z,X,J){if(!this._throttled.has(Z))this._throttled.set(Z,new Map);let Y=this._throttled.get(Z),$=Y.get(X);if($)return $.count++,!1;let q,Q=()=>{let G=Y.get(X),V=G?G.count:0;if(Y.delete(X),clearTimeout(q),G)clearTimeout(G.timeoutObject);return V};q=setTimeout(Q,J);let z={timeoutObject:q,clear:Q,count:0};return Y.set(X,z),z}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(Z,X,J,Y){let $,q=Z;if(this.options.cwd&&!i4.isAbsolute(Z))q=i4.join(this.options.cwd,Z);let Q=new Date,z=(G)=>{pr.stat(q,(V,x)=>{if(V||!this._pendingWrites.has(Z)){if(V&&V.code!=="ENOENT")Y(V);return}let H=Number(new Date);if(G&&x.size!==G.size)this._pendingWrites.get(Z).lastChange=H;let U=this._pendingWrites.get(Z);if(H-U.lastChange>=X)this._pendingWrites.delete(Z),Y(void 0,x);else $=setTimeout(z,this.options.awaitWriteFinish.pollInterval,x)})};if(!this._pendingWrites.has(Z))this._pendingWrites.set(Z,{lastChange:Q,cancelWait:()=>{return this._pendingWrites.delete(Z),clearTimeout($),J}}),$=setTimeout(z,this.options.awaitWriteFinish.pollInterval)}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(Z,X){if(this.options.atomic&&xh1.test(Z))return!0;if(!this._userIgnored){let{cwd:J}=this.options,Y=this.options.ignored,$=Y&&Y.map(gv0(J)),q=dr($).filter((z)=>typeof z===cr&&!Er(z)).map((z)=>z+fr),Q=this._getGlobIgnored().map(gv0(J)).concat($,q);this._userIgnored=mr(Q,void 0,hr)}return this._userIgnored([Z,X])}_isntIgnored(Z,X){return!this._isIgnored(Z,X)}_getWatchHelpers(Z,X){let J=X||this.options.disableGlobbing||!Er(Z)?Z:Zh1(Z),Y=this.options.followSymlinks;return new lv0(Z,J,Y,this)}_getWatchedDir(Z){if(!this._boundRemove)this._boundRemove=this._remove.bind(this);let X=i4.resolve(Z);if(!this._watched.has(X))this._watched.set(X,new cv0(X,this._boundRemove));return this._watched.get(X)}_hasReadPermissions(Z){if(this.options.ignorePermissionErrors)return!0;let J=(Z&&Number.parseInt(Z.mode,10))&511,Y=Number.parseInt(J.toString(8)[0],10);return Boolean(4&Y)}_remove(Z,X,J){let Y=i4.join(Z,X),$=i4.resolve(Y);if(J=J!=null?J:this._watched.has(Y)||this._watched.has($),!this._throttle("remove",Y,100))return;if(!J&&!this.options.useFsEvents&&this._watched.size===1)this.add(Z,X,!0);this._getWatchedDir(Y).getChildren().forEach((H)=>this._remove(Y,H));let z=this._getWatchedDir(Z),G=z.has(X);if(z.remove(X),this._symlinkPaths.has($))this._symlinkPaths.delete($);let V=Y;if(this.options.cwd)V=i4.relative(this.options.cwd,Y);if(this.options.awaitWriteFinish&&this._pendingWrites.has(V)){if(this._pendingWrites.get(V).cancelWait()===RS)return}this._watched.delete(Y),this._watched.delete($);let x=J?Kh1:bv0;if(G&&!this._isIgnored(Y))this._emit(x,Y);if(!this.options.useFsEvents)this._closePath(Y)}_closePath(Z){this._closeFile(Z);let X=i4.dirname(Z);this._getWatchedDir(X).remove(i4.basename(Z))}_closeFile(Z){let X=this._closers.get(Z);if(!X)return;X.forEach((J)=>J()),this._closers.delete(Z)}_addPathCloser(Z,X){if(!X)return;let J=this._closers.get(Z);if(!J)J=[],this._closers.set(Z,J);J.push(X)}_readdirp(Z,X){if(this.closed)return;let J={type:kr,alwaysStat:!0,lstat:!0,...X},Y=eg1(Z,J);return this._streams.add(Y),Y.once(zh1,()=>{Y=void 0}),Y.once(Gh1,()=>{if(Y)this._streams.delete(Y),Y=void 0}),Y}}Ah1.FSWatcher=lr;var Th1=(Z,X)=>{let J=new lr(X);return J.add(Z),J};Ah1.watch=Th1});var $T0=Z1((o62,PS)=>{function av0(Z){return Array.isArray(Z)?Z:[Z]}var Sh1=void 0,ir="",iv0=" ",or="\\",Eh1=/^\s+$/,kh1=/(?:[^\\]|^)\\$/,bh1=/^\\!/,yh1=/^\\#/,fh1=/\r?\n/g,mh1=/^\.{0,2}\/|^\.{1,2}$/,gh1=/\/$/,LD="/",rv0="node-ignore";if(typeof Symbol!=="undefined")rv0=Symbol.for("node-ignore");var nv0=rv0,CD=(Z,X,J)=>{return Object.defineProperty(Z,X,{value:J}),J},hh1=/([0-z])-([0-z])/g,tv0=()=>!1,uh1=(Z)=>Z.replace(hh1,(X,J,Y)=>J.charCodeAt(0)<=Y.charCodeAt(0)?X:ir),dh1=(Z)=>{let{length:X}=Z;return Z.slice(0,X-X%2)},ph1=[[/^\uFEFF/,()=>ir],[/((?:\\\\)*?)(\\?\s+)$/,(Z,X,J)=>X+(J.indexOf("\\")===0?iv0:ir)],[/(\\+?)\s/g,(Z,X)=>{let{length:J}=X;return X.slice(0,J-J%2)+iv0}],[/[\\$.|*+(){^]/g,(Z)=>`\\${Z}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function Z(){return!/\/(?!$)/.test(this)?"(?:^|\\/)":"^"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(Z,X,J)=>X+6<J.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(Z,X,J)=>{let Y=J.replace(/\\\*/g,"[^\\/]*");return X+Y}],[/\\\\\\(?=[$.|*+(){^])/g,()=>or],[/\\\\/g,()=>or],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(Z,X,J,Y,$)=>X===or?`\\[${J}${dh1(Y)}${$}`:$==="]"?Y.length%2===0?`[${uh1(J)}${Y}]`:"[]":"[]"],[/(?:[^*])$/,(Z)=>/\/$/.test(Z)?`${Z}$`:`${Z}(?=$|\\/$)`]],ch1=/(^|\\\/)?\\\*$/,g_="regex",OS="checkRegex",sv0="_",lh1={[g_](Z,X){return`${X?`${X}[^/]+`:"[^/]*"}(?=$|\\/$)`},[OS](Z,X){return`${X?`${X}[^/]*`:"[^/]*"}(?=$|\\/$)`}},oh1=(Z)=>ph1.reduce((X,[J,Y])=>X.replace(J,Y.bind(Z)),Z),_S=(Z)=>typeof Z==="string",ih1=(Z)=>Z&&_S(Z)&&!Eh1.test(Z)&&!kh1.test(Z)&&Z.indexOf("#")!==0,sh1=(Z)=>Z.split(fh1).filter(Boolean);class ev0{constructor(Z,X,J,Y,$,q){this.pattern=Z,this.mark=X,this.negative=$,CD(this,"body",J),CD(this,"ignoreCase",Y),CD(this,"regexPrefix",q)}get regex(){let Z=sv0+g_;if(this[Z])return this[Z];return this._make(g_,Z)}get checkRegex(){let Z=sv0+OS;if(this[Z])return this[Z];return this._make(OS,Z)}_make(Z,X){let J=this.regexPrefix.replace(ch1,lh1[Z]),Y=this.ignoreCase?new RegExp(J,"i"):new RegExp(J);return CD(this,X,Y)}}var ah1=({pattern:Z,mark:X},J)=>{let Y=!1,$=Z;if($.indexOf("!")===0)Y=!0,$=$.substr(1);$=$.replace(bh1,"!").replace(yh1,"#");let q=oh1($);return new ev0(Z,X,$,J,Y,q)};class ZT0{constructor(Z){this._ignoreCase=Z,this._rules=[]}_add(Z){if(Z&&Z[nv0]){this._rules=this._rules.concat(Z._rules._rules),this._added=!0;return}if(_S(Z))Z={pattern:Z};if(ih1(Z.pattern)){let X=ah1(Z,this._ignoreCase);this._added=!0,this._rules.push(X)}}add(Z){return this._added=!1,av0(_S(Z)?sh1(Z):Z).forEach(this._add,this),this._added}test(Z,X,J){let Y=!1,$=!1,q;this._rules.forEach((z)=>{let{negative:G}=z;if($===G&&Y!==$||G&&!Y&&!$&&!X)return;if(!z[J].test(Z))return;Y=!G,$=G,q=G?Sh1:z});let Q={ignored:Y,unignored:$};if(q)Q.rule=q;return Q}}var rh1=(Z,X)=>{throw new X(Z)},_z=(Z,X,J)=>{if(!_S(Z))return J(`path must be a string, but got \`${X}\``,TypeError);if(!Z)return J("path must not be empty",TypeError);if(_z.isNotRelative(Z))return J(`path should be a \`path.relative()\`d string, but got "${X}"`,RangeError);return!0},XT0=(Z)=>mh1.test(Z);_z.isNotRelative=XT0;_z.convert=(Z)=>Z;class JT0{constructor({ignorecase:Z=!0,ignoreCase:X=Z,allowRelativePaths:J=!1}={}){CD(this,nv0,!0),this._rules=new ZT0(X),this._strictPathCheck=!J,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(Z){if(this._rules.add(Z))this._initCache();return this}addPattern(Z){return this.add(Z)}_test(Z,X,J,Y){let $=Z&&_z.convert(Z);return _z($,Z,this._strictPathCheck?rh1:tv0),this._t($,X,J,Y)}checkIgnore(Z){if(!gh1.test(Z))return this.test(Z);let X=Z.split(LD).filter(Boolean);if(X.pop(),X.length){let J=this._t(X.join(LD)+LD,this._testCache,!0,X);if(J.ignored)return J}return this._rules.test(Z,!1,OS)}_t(Z,X,J,Y){if(Z in X)return X[Z];if(!Y)Y=Z.split(LD).filter(Boolean);if(Y.pop(),!Y.length)return X[Z]=this._rules.test(Z,J,g_);let $=this._t(Y.join(LD)+LD,X,J,Y);return X[Z]=$.ignored?$:this._rules.test(Z,J,g_)}ignores(Z){return this._test(Z,this._ignoreCache,!1).ignored}createFilter(){return(Z)=>!this.ignores(Z)}filter(Z){return av0(Z).filter(this.createFilter())}test(Z){return this._test(Z,this._testCache,!0)}}var sr=(Z)=>new JT0(Z),nh1=(Z)=>_z(Z&&_z.convert(Z),Z,tv0),YT0=()=>{let Z=(J)=>/^\\\\\?\\/.test(J)||/["<>|\u0000-\u001F]+/u.test(J)?J:J.replace(/\\/g,"/");_z.convert=Z;let X=/^[a-z]:\//i;_z.isNotRelative=(J)=>X.test(J)||XT0(J)};if(typeof process!=="undefined"&&process.platform==="win32")YT0();PS.exports=sr;sr.default=sr;PS.exports.isPathValid=nh1;CD(PS.exports,Symbol.for("setupWindows"),YT0)});var GT0=Z1(($J)=>{var Xu1=$J&&$J.__importDefault||function(Z){return Z&&Z.__esModule?Z:{default:Z}};Object.defineProperty($J,"__esModule",{value:!0});var Ju1=s1("fs"),Yu1=Xu1(mP()),RD=Yu1.default("@kwsites/file-exists");function $u1(Z,X,J){RD("checking %s",Z);try{let Y=Ju1.statSync(Z);if(Y.isFile()&&X)return RD("[OK] path represents a file"),!0;if(Y.isDirectory()&&J)return RD("[OK] path represents a directory"),!0;return RD("[FAIL] path represents something other than a file or directory"),!1}catch(Y){if(Y.code==="ENOENT")return RD("[FAIL] path is not accessible: %o",Y),!1;throw RD("[FATAL] %o",Y),Y}}function qu1(Z,X=$J.READABLE){return $u1(Z,(X&$J.FILE)>0,(X&$J.FOLDER)>0)}$J.exists=qu1;$J.FILE=1;$J.FOLDER=2;$J.READABLE=$J.FILE+$J.FOLDER});var VT0=Z1((nr)=>{function Ku1(Z){for(var X in Z)if(!nr.hasOwnProperty(X))nr[X]=Z[X]}Object.defineProperty(nr,"__esModule",{value:!0});Ku1(GT0())});var Zn=Z1((WT0)=>{Object.defineProperty(WT0,"__esModule",{value:!0});WT0.createDeferred=WT0.deferred=void 0;function er(){let Z,X,J="pending";return{promise:new Promise(($,q)=>{Z=$,X=q}),done($){if(J==="pending")J="resolved",Z($)},fail($){if(J==="pending")J="rejected",X($)},get fulfilled(){return J!=="pending"},get status(){return J}}}WT0.deferred=er;WT0.createDeferred=er;WT0.default=er});var rn="2.1.10";var Mt=S3(Ht(),1),{program:Rl1,createCommand:Ol1,createArgument:_l1,createOption:Pl1,CommanderError:vl1,InvalidArgumentError:DQ,InvalidOptionArgumentError:Tl1,Command:r9,Argument:Al1,Option:Ut,Help:wl1}=Mt.default;import X60 from"fs";var $E=(Z,X,J)=>{let Y=Z instanceof RegExp?Ft(Z,J):Z,$=X instanceof RegExp?Ft(X,J):X,q=Y!==null&&$!=null&&JS0(Y,$,J);return q&&{start:q[0],end:q[1],pre:J.slice(0,q[0]),body:J.slice(q[0]+Y.length,q[1]),post:J.slice(q[1]+$.length)}},Ft=(Z,X)=>{let J=X.match(Z);return J?J[0]:null},JS0=(Z,X,J)=>{let Y,$,q,Q=void 0,z,G=J.indexOf(Z),V=J.indexOf(X,G+1),x=G;if(G>=0&&V>0){if(Z===X)return[G,V];Y=[],q=J.length;while(x>=0&&!z){if(x===G)Y.push(x),G=J.indexOf(Z,x+1);else if(Y.length===1){let H=Y.pop();if(H!==void 0)z=[H,V]}else{if($=Y.pop(),$!==void 0&&$<q)q=$,Q=V;V=J.indexOf(X,x+1)}x=G<V&&G>=0?G:V}if(Y.length&&Q!==void 0)z=[q,Q]}return z};var Dt="\x00SLASH"+Math.random()+"\x00",jt="\x00OPEN"+Math.random()+"\x00",KE="\x00CLOSE"+Math.random()+"\x00",Nt="\x00COMMA"+Math.random()+"\x00",Lt="\x00PERIOD"+Math.random()+"\x00",YS0=new RegExp(Dt,"g"),$S0=new RegExp(jt,"g"),qS0=new RegExp(KE,"g"),KS0=new RegExp(Nt,"g"),QS0=new RegExp(Lt,"g"),zS0=/\\\\/g,GS0=/\\{/g,VS0=/\\}/g,WS0=/\\,/g,xS0=/\\\./g,BS0=1e5;function qE(Z){return!isNaN(Z)?parseInt(Z,10):Z.charCodeAt(0)}function HS0(Z){return Z.replace(zS0,Dt).replace(GS0,jt).replace(VS0,KE).replace(WS0,Nt).replace(xS0,Lt)}function MS0(Z){return Z.replace(YS0,"\\").replace($S0,"{").replace(qS0,"}").replace(KS0,",").replace(QS0,".")}function Ct(Z){if(!Z)return[""];let X=[],J=$E("{","}",Z);if(!J)return Z.split(",");let{pre:Y,body:$,post:q}=J,Q=Y.split(",");Q[Q.length-1]+="{"+$+"}";let z=Ct(q);if(q.length)Q[Q.length-1]+=z.shift(),Q.push.apply(Q,z);return X.push.apply(X,Q),X}function Rt(Z,X={}){if(!Z)return[];let{max:J=BS0}=X;if(Z.slice(0,2)==="{}")Z="\\{\\}"+Z.slice(2);return aL(HS0(Z),J,!0).map(MS0)}function US0(Z){return"{"+Z+"}"}function FS0(Z){return/^-?0\d/.test(Z)}function DS0(Z,X){return Z<=X}function jS0(Z,X){return Z>=X}function aL(Z,X,J){let Y=[],$=$E("{","}",Z);if(!$)return[Z];let q=$.pre,Q=$.post.length?aL($.post,X,!1):[""];if(/\$$/.test($.pre))for(let z=0;z<Q.length&&z<X;z++){let G=q+"{"+$.body+"}"+Q[z];Y.push(G)}else{let z=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test($.body),G=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test($.body),V=z||G,x=$.body.indexOf(",")>=0;if(!V&&!x){if($.post.match(/,(?!,).*\}/))return Z=$.pre+"{"+$.body+KE+$.post,aL(Z,X,!0);return[Z]}let H;if(V)H=$.body.split(/\.\./);else if(H=Ct($.body),H.length===1&&H[0]!==void 0){if(H=aL(H[0],X,!1).map(US0),H.length===1)return Q.map((F)=>$.pre+H[0]+F)}let U;if(V&&H[0]!==void 0&&H[1]!==void 0){let F=qE(H[0]),N=qE(H[1]),C=Math.max(H[0].length,H[1].length),_=H.length===3&&H[2]!==void 0?Math.max(Math.abs(qE(H[2])),1):1,R=DS0;if(N<F)_*=-1,R=jS0;let A=H.some(FS0);U=[];for(let v=F;R(v,N);v+=_){let E;if(G){if(E=String.fromCharCode(v),E==="\\")E=""}else if(E=String(v),A){let k=C-E.length;if(k>0){let y=new Array(k+1).join("0");if(v<0)E="-"+y+E.slice(1);else E=y+E}}U.push(E)}}else{U=[];for(let F=0;F<H.length;F++)U.push.apply(U,aL(H[F],X,!1))}for(let F=0;F<U.length;F++)for(let N=0;N<Q.length&&Y.length<X;N++){let C=q+U[F]+Q[N];if(!J||V||C)Y.push(C)}}return Y}var rL=(Z)=>{if(typeof Z!=="string")throw new TypeError("invalid pattern");if(Z.length>65536)throw new TypeError("pattern is too long")};var NS0={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},nL=(Z)=>Z.replace(/[[\]\\-]/g,"\\$&"),LS0=(Z)=>Z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ot=(Z)=>Z.join(""),_t=(Z,X)=>{let J=X;if(Z.charAt(J)!=="[")throw new Error("not in a brace expression");let Y=[],$=[],q=J+1,Q=!1,z=!1,G=!1,V=!1,x=J,H="";Z:while(q<Z.length){let C=Z.charAt(q);if((C==="!"||C==="^")&&q===J+1){V=!0,q++;continue}if(C==="]"&&Q&&!G){x=q+1;break}if(Q=!0,C==="\\"){if(!G){G=!0,q++;continue}}if(C==="["&&!G){for(let[_,[R,P,A]]of Object.entries(NS0))if(Z.startsWith(_,q)){if(H)return["$.",!1,Z.length-J,!0];if(q+=_.length,A)$.push(R);else Y.push(R);z=z||P;continue Z}}if(G=!1,H){if(C>H)Y.push(nL(H)+"-"+nL(C));else if(C===H)Y.push(nL(C));H="",q++;continue}if(Z.startsWith("-]",q+1)){Y.push(nL(C+"-")),q+=2;continue}if(Z.startsWith("-",q+1)){H=C,q+=2;continue}Y.push(nL(C)),q++}if(x<q)return["",!1,0,!1];if(!Y.length&&!$.length)return["$.",!1,Z.length-J,!0];if($.length===0&&Y.length===1&&/^\\?.$/.test(Y[0])&&!V){let C=Y[0].length===2?Y[0].slice(-1):Y[0];return[LS0(C),!1,x-J,!1]}let U="["+(V?"^":"")+Ot(Y)+"]",F="["+(V?"":"^")+Ot($)+"]";return[Y.length&&$.length?"("+U+"|"+F+")":Y.length?U:F,z,x-J,!0]};var J$=(Z,{windowsPathsNoEscape:X=!1,magicalBraces:J=!0}={})=>{if(J)return X?Z.replace(/\[([^/\\])\]/g,"$1"):Z.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1");return X?Z.replace(/\[([^/\\{}])\]/g,"$1"):Z.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1")};var FZ,CS0=new Set(["!","?","+","*","@"]),QE=(Z)=>CS0.has(Z),Pt=(Z)=>QE(Z.type),RS0=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),OS0=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),_S0=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),vt=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),PS0="(?!(?:^|/)\\.\\.?(?:$|/))",n_="(?!\\.)",vS0=new Set(["[","."]),TS0=new Set(["..","."]),AS0=new Set("().*{}+?[]^$\\!"),wS0=(Z)=>Z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),zE="[^/]",Tt=zE+"*?",At=zE+"+?",IS0=0;class gM{type;#Z;#J;#$=!1;#X=[];#q;#G;#M;#W=!1;#Q;#B;#x=!1;id=++IS0;get depth(){return(this.#q?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#Z.id,parent:this.#q?.id,depth:this.depth,partsLength:this.#X.length,parts:this.#X}}constructor(Z,X,J={}){if(this.type=Z,Z)this.#J=!0;if(this.#q=X,this.#Z=this.#q?this.#q.#Z:this,this.#Q=this.#Z===this?J:this.#Z.#Q,this.#M=this.#Z===this?[]:this.#Z.#M,Z==="!"&&!this.#Z.#W)this.#M.push(this);this.#G=this.#q?this.#q.#X.length:0}get hasMagic(){if(this.#J!==void 0)return this.#J;for(let Z of this.#X){if(typeof Z==="string")continue;if(Z.type||Z.hasMagic)return this.#J=!0}return this.#J}toString(){return this.#B!==void 0?this.#B:!this.type?this.#B=this.#X.map((Z)=>String(Z)).join(""):this.#B=this.type+"("+this.#X.map((Z)=>String(Z)).join("|")+")"}#z(){if(this!==this.#Z)throw new Error("should only call on root");if(this.#W)return this;this.toString(),this.#W=!0;let Z;while(Z=this.#M.pop()){if(Z.type!=="!")continue;let X=Z,J=X.#q;while(J){for(let Y=X.#G+1;!J.type&&Y<J.#X.length;Y++)for(let $ of Z.#X){if(typeof $==="string")throw new Error("string part in extglob AST??");$.copyIn(J.#X[Y])}X=J,J=X.#q}}return this}push(...Z){for(let X of Z){if(X==="")continue;if(typeof X!=="string"&&!(X instanceof FZ&&X.#q===this))throw new Error("invalid part: "+X);this.#X.push(X)}}toJSON(){let Z=this.type===null?this.#X.slice().map((X)=>typeof X==="string"?X:X.toJSON()):[this.type,...this.#X.map((X)=>X.toJSON())];if(this.isStart()&&!this.type)Z.unshift([]);if(this.isEnd()&&(this===this.#Z||this.#Z.#W&&this.#q?.type==="!"))Z.push({});return Z}isStart(){if(this.#Z===this)return!0;if(!this.#q?.isStart())return!1;if(this.#G===0)return!0;let Z=this.#q;for(let X=0;X<this.#G;X++){let J=Z.#X[X];if(!(J instanceof FZ&&J.type==="!"))return!1}return!0}isEnd(){if(this.#Z===this)return!0;if(this.#q?.type==="!")return!0;if(!this.#q?.isEnd())return!1;if(!this.type)return this.#q?.isEnd();let Z=this.#q?this.#q.#X.length:0;return this.#G===Z-1}copyIn(Z){if(typeof Z==="string")this.push(Z);else this.push(Z.clone(this))}clone(Z){let X=new FZ(this.type,Z);for(let J of this.#X)X.copyIn(J);return X}static#K(Z,X,J,Y,$){let q=Y.maxExtglobRecursion??2,Q=!1,z=!1,G=-1,V=!1;if(X.type===null){let N=J,C="";while(N<Z.length){let _=Z.charAt(N++);if(Q||_==="\\"){Q=!Q,C+=_;continue}if(z){if(N===G+1){if(_==="^"||_==="!")V=!0}else if(_==="]"&&!(N===G+2&&V))z=!1;C+=_;continue}else if(_==="["){z=!0,G=N,V=!1,C+=_;continue}if(!Y.noext&&QE(_)&&Z.charAt(N)==="("&&$<=q){X.push(C),C="";let P=new FZ(_,X);N=FZ.#K(Z,P,N,Y,$+1),X.push(P);continue}C+=_}return X.push(C),N}let x=J+1,H=new FZ(null,X),U=[],F="";while(x<Z.length){let N=Z.charAt(x++);if(Q||N==="\\"){Q=!Q,F+=N;continue}if(z){if(x===G+1){if(N==="^"||N==="!")V=!0}else if(N==="]"&&!(x===G+2&&V))z=!1;F+=N;continue}else if(N==="["){z=!0,G=x,V=!1,F+=N;continue}if(!Y.noext&&QE(N)&&Z.charAt(x)==="("&&($<=q||X&&X.#U(N))){let _=X&&X.#U(N)?0:1;H.push(F),F="";let R=new FZ(N,H);H.push(R),x=FZ.#K(Z,R,x,Y,$+_);continue}if(N==="|"){H.push(F),F="",U.push(H),H=new FZ(null,X);continue}if(N===")"){if(F===""&&X.#X.length===0)X.#x=!0;return H.push(F),F="",X.push(...U,H),x}F+=N}return X.type=null,X.#J=void 0,X.#X=[Z.substring(J-1)],x}#N(Z){return this.#C(Z,OS0)}#C(Z,X=RS0){if(!Z||typeof Z!=="object"||Z.type!==null||Z.#X.length!==1||this.type===null)return!1;let J=Z.#X[0];if(!J||typeof J!=="object"||J.type===null)return!1;return this.#U(J.type,X)}#U(Z,X=_S0){return!!X.get(this.type)?.includes(Z)}#F(Z,X){let J=Z.#X[0],Y=new FZ(null,J,this.options);Y.#X.push(""),J.push(Y),this.#P(Z,X)}#P(Z,X){let J=Z.#X[0];this.#X.splice(X,1,...J.#X);for(let Y of J.#X)if(typeof Y==="object")Y.#q=this;this.#B=void 0}#D(Z){return!!vt.get(this.type)?.has(Z)}#R(Z){if(!Z||typeof Z!=="object"||Z.type!==null||Z.#X.length!==1||this.type===null||this.#X.length!==1)return!1;let X=Z.#X[0];if(!X||typeof X!=="object"||X.type===null)return!1;return this.#D(X.type)}#O(Z){let X=vt.get(this.type),J=Z.#X[0],Y=X?.get(J.type);if(!Y)return!1;this.#X=J.#X;for(let $ of this.#X)if(typeof $==="object")$.#q=this;this.type=Y,this.#B=void 0,this.#x=!1}static fromGlob(Z,X={}){let J=new FZ(null,void 0,X);return FZ.#K(Z,J,0,X,0),J}toMMPattern(){if(this!==this.#Z)return this.#Z.toMMPattern();let Z=this.toString(),[X,J,Y,$]=this.toRegExpSource();if(!(Y||this.#J||this.#Q.nocase&&!this.#Q.nocaseMagicOnly&&Z.toUpperCase()!==Z.toLowerCase()))return J;let Q=(this.#Q.nocase?"i":"")+($?"u":"");return Object.assign(new RegExp(`^${X}$`,Q),{_src:X,_glob:Z})}get options(){return this.#Q}toRegExpSource(Z){let X=Z??!!this.#Q.dot;if(this.#Z===this)this.#H(),this.#z();if(!Pt(this)){let z=this.isStart()&&this.isEnd()&&!this.#X.some((U)=>typeof U!=="string"),G=this.#X.map((U)=>{let[F,N,C,_]=typeof U==="string"?FZ.#L(U,this.#J,z):U.toRegExpSource(Z);return this.#J=this.#J||C,this.#$=this.#$||_,F}).join(""),V="";if(this.isStart()){if(typeof this.#X[0]==="string"){if(!(this.#X.length===1&&TS0.has(this.#X[0]))){let F=vS0,N=X&&F.has(G.charAt(0))||G.startsWith("\\.")&&F.has(G.charAt(2))||G.startsWith("\\.\\.")&&F.has(G.charAt(4)),C=!X&&!Z&&F.has(G.charAt(0));V=N?PS0:C?n_:""}}}let x="";if(this.isEnd()&&this.#Z.#W&&this.#q?.type==="!")x="(?:$|\\/)";return[V+G+x,J$(G),this.#J=!!this.#J,this.#$]}let J=this.type==="*"||this.type==="+",Y=this.type==="!"?"(?:(?!(?:":"(?:",$=this.#j(X);if(this.isStart()&&this.isEnd()&&!$&&this.type!=="!"){let z=this.toString(),G=this;return G.#X=[z],G.type=null,G.#J=void 0,[z,J$(this.toString()),!1,!1]}let q=!J||Z||X||!n_?"":this.#j(!0);if(q===$)q="";if(q)$=`(?:${$})(?:${q})*?`;let Q="";if(this.type==="!"&&this.#x)Q=(this.isStart()&&!X?n_:"")+At;else{let z=this.type==="!"?"))"+(this.isStart()&&!X&&!Z?n_:"")+Tt+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&q?")":this.type==="*"&&q?")?":`)${this.type}`;Q=Y+$+z}return[Q,J$($),this.#J=!!this.#J,this.#$]}#H(){if(!Pt(this)){for(let Z of this.#X)if(typeof Z==="object")Z.#H()}else{let Z=0,X=!1;do{X=!0;for(let J=0;J<this.#X.length;J++){let Y=this.#X[J];if(typeof Y==="object"){if(Y.#H(),this.#C(Y))X=!1,this.#P(Y,J);else if(this.#N(Y))X=!1,this.#F(Y,J);else if(this.#R(Y))X=!1,this.#O(Y)}}}while(!X&&++Z<10)}this.#B=void 0}#j(Z){return this.#X.map((X)=>{if(typeof X==="string")throw new Error("string type in extglob ast??");let[J,Y,$,q]=X.toRegExpSource(Z);return this.#$=this.#$||q,J}).filter((X)=>!(this.isStart()&&this.isEnd())||!!X).join("|")}static#L(Z,X,J=!1){let Y=!1,$="",q=!1,Q=!1;for(let z=0;z<Z.length;z++){let G=Z.charAt(z);if(Y){Y=!1,$+=(AS0.has(G)?"\\":"")+G;continue}if(G==="*"){if(Q)continue;Q=!0,$+=J&&/^[*]+$/.test(Z)?At:Tt,X=!0;continue}else Q=!1;if(G==="\\"){if(z===Z.length-1)$+="\\\\";else Y=!0;continue}if(G==="["){let[V,x,H,U]=_t(Z,z);if(H){$+=V,q=q||x,z+=H-1,X=X||U;continue}}if(G==="?"){$+=zE,X=!0;continue}$+=wS0(G)}return[$,J$(Z),!!X,q]}}FZ=gM;var hM=(Z,{windowsPathsNoEscape:X=!1,magicalBraces:J=!1}={})=>{if(J)return X?Z.replace(/[?*()[\]{}]/g,"[$&]"):Z.replace(/[?*()[\]\\{}]/g,"\\$&");return X?Z.replace(/[?*()[\]]/g,"[$&]"):Z.replace(/[?*()[\]\\]/g,"\\$&")};var E3=(Z,X,J={})=>{if(rL(X),!J.nocomment&&X.charAt(0)==="#")return!1;return new AJ(X,J).match(Z)},SS0=/^\*+([^+@!?*[(]*)$/,ES0=(Z)=>(X)=>!X.startsWith(".")&&X.endsWith(Z),kS0=(Z)=>(X)=>X.endsWith(Z),bS0=(Z)=>{return Z=Z.toLowerCase(),(X)=>!X.startsWith(".")&&X.toLowerCase().endsWith(Z)},yS0=(Z)=>{return Z=Z.toLowerCase(),(X)=>X.toLowerCase().endsWith(Z)},fS0=/^\*+\.\*+$/,mS0=(Z)=>!Z.startsWith(".")&&Z.includes("."),gS0=(Z)=>Z!=="."&&Z!==".."&&Z.includes("."),hS0=/^\.\*+$/,uS0=(Z)=>Z!=="."&&Z!==".."&&Z.startsWith("."),dS0=/^\*+$/,pS0=(Z)=>Z.length!==0&&!Z.startsWith("."),cS0=(Z)=>Z.length!==0&&Z!=="."&&Z!=="..",lS0=/^\?+([^+@!?*[(]*)?$/,oS0=([Z,X=""])=>{let J=St([Z]);if(!X)return J;return X=X.toLowerCase(),(Y)=>J(Y)&&Y.toLowerCase().endsWith(X)},iS0=([Z,X=""])=>{let J=Et([Z]);if(!X)return J;return X=X.toLowerCase(),(Y)=>J(Y)&&Y.toLowerCase().endsWith(X)},sS0=([Z,X=""])=>{let J=Et([Z]);return!X?J:(Y)=>J(Y)&&Y.endsWith(X)},aS0=([Z,X=""])=>{let J=St([Z]);return!X?J:(Y)=>J(Y)&&Y.endsWith(X)},St=([Z])=>{let X=Z.length;return(J)=>J.length===X&&!J.startsWith(".")},Et=([Z])=>{let X=Z.length;return(J)=>J.length===X&&J!=="."&&J!==".."},kt=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",wt={win32:{sep:"\\"},posix:{sep:"/"}},rS0=kt==="win32"?wt.win32.sep:wt.posix.sep;E3.sep=rS0;var S5=Symbol("globstar **");E3.GLOBSTAR=S5;var nS0="[^/]",tS0=nS0+"*?",eS0="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",ZE0="(?:(?!(?:\\/|^)\\.).)*?",XE0=(Z,X={})=>(J)=>E3(J,Z,X);E3.filter=XE0;var TJ=(Z,X={})=>Object.assign({},Z,X),JE0=(Z)=>{if(!Z||typeof Z!=="object"||!Object.keys(Z).length)return E3;let X=E3;return Object.assign((Y,$,q={})=>X(Y,$,TJ(Z,q)),{Minimatch:class Y extends X.Minimatch{constructor($,q={}){super($,TJ(Z,q))}static defaults($){return X.defaults(TJ(Z,$)).Minimatch}},AST:class Y extends X.AST{constructor($,q,Q={}){super($,q,TJ(Z,Q))}static fromGlob($,q={}){return X.AST.fromGlob($,TJ(Z,q))}},unescape:(Y,$={})=>X.unescape(Y,TJ(Z,$)),escape:(Y,$={})=>X.escape(Y,TJ(Z,$)),filter:(Y,$={})=>X.filter(Y,TJ(Z,$)),defaults:(Y)=>X.defaults(TJ(Z,Y)),makeRe:(Y,$={})=>X.makeRe(Y,TJ(Z,$)),braceExpand:(Y,$={})=>X.braceExpand(Y,TJ(Z,$)),match:(Y,$,q={})=>X.match(Y,$,TJ(Z,q)),sep:X.sep,GLOBSTAR:S5})};E3.defaults=JE0;var bt=(Z,X={})=>{if(rL(Z),X.nobrace||!/\{(?:(?!\{).)*\}/.test(Z))return[Z];return Rt(Z,{max:X.braceExpandMax})};E3.braceExpand=bt;var YE0=(Z,X={})=>new AJ(Z,X).makeRe();E3.makeRe=YE0;var $E0=(Z,X,J={})=>{let Y=new AJ(X,J);if(Z=Z.filter(($)=>Y.match($)),Y.options.nonull&&!Z.length)Z.push(X);return Z};E3.match=$E0;var It=/[?*]|[+@!]\(.*?\)|\[|\]/,qE0=(Z)=>Z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class AJ{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(Z,X={}){rL(Z),X=X||{},this.options=X,this.maxGlobstarRecursion=X.maxGlobstarRecursion??200,this.pattern=Z,this.platform=X.platform||kt,this.isWindows=this.platform==="win32";let J="allowWindowsEscape";if(this.windowsPathsNoEscape=!!X.windowsPathsNoEscape||X[J]===!1,this.windowsPathsNoEscape)this.pattern=this.pattern.replace(/\\/g,"/");this.preserveMultipleSlashes=!!X.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!X.nonegate,this.comment=!1,this.empty=!1,this.partial=!!X.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=X.windowsNoMagicRoot!==void 0?X.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let Z of this.set)for(let X of Z)if(typeof X!=="string")return!0;return!1}debug(...Z){}make(){let Z=this.pattern,X=this.options;if(!X.nocomment&&Z.charAt(0)==="#"){this.comment=!0;return}if(!Z){this.empty=!0;return}if(this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],X.debug)this.debug=(...$)=>console.error(...$);this.debug(this.pattern,this.globSet);let J=this.globSet.map(($)=>this.slashSplit($));this.globParts=this.preprocess(J),this.debug(this.pattern,this.globParts);let Y=this.globParts.map(($,q,Q)=>{if(this.isWindows&&this.windowsNoMagicRoot){let z=$[0]===""&&$[1]===""&&($[2]==="?"||!It.test($[2]))&&!It.test($[3]),G=/^[a-z]:/i.test($[0]);if(z)return[...$.slice(0,4),...$.slice(4).map((V)=>this.parse(V))];else if(G)return[$[0],...$.slice(1).map((V)=>this.parse(V))]}return $.map((z)=>this.parse(z))});if(this.debug(this.pattern,Y),this.set=Y.filter(($)=>$.indexOf(!1)===-1),this.isWindows)for(let $=0;$<this.set.length;$++){let q=this.set[$];if(q[0]===""&&q[1]===""&&this.globParts[$][2]==="?"&&typeof q[3]==="string"&&/^[a-z]:$/i.test(q[3]))q[2]="?"}this.debug(this.pattern,this.set)}preprocess(Z){if(this.options.noglobstar){for(let J of Z)for(let Y=0;Y<J.length;Y++)if(J[Y]==="**")J[Y]="*"}let{optimizationLevel:X=1}=this.options;if(X>=2)Z=this.firstPhasePreProcess(Z),Z=this.secondPhasePreProcess(Z);else if(X>=1)Z=this.levelOneOptimize(Z);else Z=this.adjascentGlobstarOptimize(Z);return Z}adjascentGlobstarOptimize(Z){return Z.map((X)=>{let J=-1;while((J=X.indexOf("**",J+1))!==-1){let Y=J;while(X[Y+1]==="**")Y++;if(Y!==J)X.splice(J,Y-J)}return X})}levelOneOptimize(Z){return Z.map((X)=>{return X=X.reduce((J,Y)=>{let $=J[J.length-1];if(Y==="**"&&$==="**")return J;if(Y===".."){if($&&$!==".."&&$!=="."&&$!=="**")return J.pop(),J}return J.push(Y),J},[]),X.length===0?[""]:X})}levelTwoFileOptimize(Z){if(!Array.isArray(Z))Z=this.slashSplit(Z);let X=!1;do{if(X=!1,!this.preserveMultipleSlashes){for(let Y=1;Y<Z.length-1;Y++){let $=Z[Y];if(Y===1&&$===""&&Z[0]==="")continue;if($==="."||$==="")X=!0,Z.splice(Y,1),Y--}if(Z[0]==="."&&Z.length===2&&(Z[1]==="."||Z[1]===""))X=!0,Z.pop()}let J=0;while((J=Z.indexOf("..",J+1))!==-1){let Y=Z[J-1];if(Y&&Y!=="."&&Y!==".."&&Y!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(Y)))X=!0,Z.splice(J-1,2),J-=2}}while(X);return Z.length===0?[""]:Z}firstPhasePreProcess(Z){let X=!1;do{X=!1;for(let J of Z){let Y=-1;while((Y=J.indexOf("**",Y+1))!==-1){let q=Y;while(J[q+1]==="**")q++;if(q>Y)J.splice(Y+1,q-Y);let Q=J[Y+1],z=J[Y+2],G=J[Y+3];if(Q!=="..")continue;if(!z||z==="."||z===".."||!G||G==="."||G==="..")continue;X=!0,J.splice(Y,1);let V=J.slice(0);V[Y]="**",Z.push(V),Y--}if(!this.preserveMultipleSlashes){for(let q=1;q<J.length-1;q++){let Q=J[q];if(q===1&&Q===""&&J[0]==="")continue;if(Q==="."||Q==="")X=!0,J.splice(q,1),q--}if(J[0]==="."&&J.length===2&&(J[1]==="."||J[1]===""))X=!0,J.pop()}let $=0;while(($=J.indexOf("..",$+1))!==-1){let q=J[$-1];if(q&&q!=="."&&q!==".."&&q!=="**"){X=!0;let z=$===1&&J[$+1]==="**"?["."]:[];if(J.splice($-1,2,...z),J.length===0)J.push("");$-=2}}}}while(X);return Z}secondPhasePreProcess(Z){for(let X=0;X<Z.length-1;X++)for(let J=X+1;J<Z.length;J++){let Y=this.partsMatch(Z[X],Z[J],!this.preserveMultipleSlashes);if(Y){Z[X]=[],Z[J]=Y;break}}return Z.filter((X)=>X.length)}partsMatch(Z,X,J=!1){let Y=0,$=0,q=[],Q="";while(Y<Z.length&&$<X.length)if(Z[Y]===X[$])q.push(Q==="b"?X[$]:Z[Y]),Y++,$++;else if(J&&Z[Y]==="**"&&X[$]===Z[Y+1])q.push(Z[Y]),Y++;else if(J&&X[$]==="**"&&Z[Y]===X[$+1])q.push(X[$]),$++;else if(Z[Y]==="*"&&X[$]&&(this.options.dot||!X[$].startsWith("."))&&X[$]!=="**"){if(Q==="b")return!1;Q="a",q.push(Z[Y]),Y++,$++}else if(X[$]==="*"&&Z[Y]&&(this.options.dot||!Z[Y].startsWith("."))&&Z[Y]!=="**"){if(Q==="a")return!1;Q="b",q.push(X[$]),Y++,$++}else return!1;return Z.length===X.length&&q}parseNegate(){if(this.nonegate)return;let Z=this.pattern,X=!1,J=0;for(let Y=0;Y<Z.length&&Z.charAt(Y)==="!";Y++)X=!X,J++;if(J)this.pattern=Z.slice(J);this.negate=X}matchOne(Z,X,J=!1){let Y=0,$=0;if(this.isWindows){let Q=typeof Z[0]==="string"&&/^[a-z]:$/i.test(Z[0]),z=!Q&&Z[0]===""&&Z[1]===""&&Z[2]==="?"&&/^[a-z]:$/i.test(Z[3]),G=typeof X[0]==="string"&&/^[a-z]:$/i.test(X[0]),V=!G&&X[0]===""&&X[1]===""&&X[2]==="?"&&typeof X[3]==="string"&&/^[a-z]:$/i.test(X[3]),x=z?3:Q?0:void 0,H=V?3:G?0:void 0;if(typeof x==="number"&&typeof H==="number"){let[U,F]=[Z[x],X[H]];if(U.toLowerCase()===F.toLowerCase())X[H]=U,$=H,Y=x}}let{optimizationLevel:q=1}=this.options;if(q>=2)Z=this.levelTwoFileOptimize(Z);if(X.includes(S5))return this.#Z(Z,X,J,Y,$);return this.#$(Z,X,J,Y,$)}#Z(Z,X,J,Y,$){let q=X.indexOf(S5,$),Q=X.lastIndexOf(S5),[z,G,V]=J?[X.slice($,q),X.slice(q+1),[]]:[X.slice($,q),X.slice(q+1,Q),X.slice(Q+1)];if(z.length){let R=Z.slice(Y,Y+z.length);if(!this.#$(R,z,J,0,0))return!1;Y+=z.length,$+=z.length}let x=0;if(V.length){if(V.length+Y>Z.length)return!1;let R=Z.length-V.length;if(this.#$(Z,V,J,R,0))x=V.length;else{if(Z[Z.length-1]!==""||Y+V.length===Z.length)return!1;if(R--,!this.#$(Z,V,J,R,0))return!1;x=V.length+1}}if(!G.length){let R=!!x;for(let P=Y;P<Z.length-x;P++){let A=String(Z[P]);if(R=!0,A==="."||A===".."||!this.options.dot&&A.startsWith("."))return!1}return J||R}let H=[[[],0]],U=H[0],F=0,N=[0];for(let R of G)if(R===S5)N.push(F),U=[[],0],H.push(U);else U[0].push(R),F++;let C=H.length-1,_=Z.length-x;for(let R of H)R[1]=_-(N[C--]+R[0].length);return!!this.#J(Z,H,Y,0,J,0,!!x)}#J(Z,X,J,Y,$,q,Q){let z=X[Y];if(!z){for(let x=J;x<Z.length;x++){Q=!0;let H=Z[x];if(H==="."||H===".."||!this.options.dot&&H.startsWith("."))return!1}return Q}let[G,V]=z;while(J<=V){if(this.#$(Z.slice(0,J+G.length),G,$,J,0)&&q<this.maxGlobstarRecursion){let U=this.#J(Z,X,J+G.length,Y+1,$,q+1,Q);if(U!==!1)return U}let H=Z[J];if(H==="."||H===".."||!this.options.dot&&H.startsWith("."))return!1;J++}return $||null}#$(Z,X,J,Y,$){let q,Q,z,G;for(q=Y,Q=$,G=Z.length,z=X.length;q<G&&Q<z;q++,Q++){this.debug("matchOne loop");let V=X[Q],x=Z[q];if(this.debug(X,V,x),V===!1||V===S5)return!1;let H;if(typeof V==="string")H=x===V,this.debug("string match",V,x,H);else H=V.test(x),this.debug("pattern match",V,x,H);if(!H)return!1}if(q===G&&Q===z)return!0;else if(q===G)return J;else if(Q===z)return q===G-1&&Z[q]==="";else throw new Error("wtf?")}braceExpand(){return bt(this.pattern,this.options)}parse(Z){rL(Z);let X=this.options;if(Z==="**")return S5;if(Z==="")return"";let J,Y=null;if(J=Z.match(dS0))Y=X.dot?cS0:pS0;else if(J=Z.match(SS0))Y=(X.nocase?X.dot?yS0:bS0:X.dot?kS0:ES0)(J[1]);else if(J=Z.match(lS0))Y=(X.nocase?X.dot?iS0:oS0:X.dot?sS0:aS0)(J);else if(J=Z.match(fS0))Y=X.dot?gS0:mS0;else if(J=Z.match(hS0))Y=uS0;let $=gM.fromGlob(Z,this.options).toMMPattern();if(Y&&typeof $==="object")Reflect.defineProperty($,"test",{value:Y});return $}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let Z=this.set;if(!Z.length)return this.regexp=!1,this.regexp;let X=this.options,J=X.noglobstar?tS0:X.dot?eS0:ZE0,Y=new Set(X.nocase?["i"]:[]),$=Z.map((z)=>{let G=z.map((x)=>{if(x instanceof RegExp)for(let H of x.flags.split(""))Y.add(H);return typeof x==="string"?qE0(x):x===S5?S5:x._src});G.forEach((x,H)=>{let U=G[H+1],F=G[H-1];if(x!==S5||F===S5)return;if(F===void 0)if(U!==void 0&&U!==S5)G[H+1]="(?:\\/|"+J+"\\/)?"+U;else G[H]=J;else if(U===void 0)G[H-1]=F+"(?:\\/|\\/"+J+")?";else if(U!==S5)G[H-1]=F+"(?:\\/|\\/"+J+"\\/)"+U,G[H+1]=S5});let V=G.filter((x)=>x!==S5);if(this.partial&&V.length>=1){let x=[];for(let H=1;H<=V.length;H++)x.push(V.slice(0,H).join("/"));return"(?:"+x.join("|")+")"}return V.join("/")}).join("|"),[q,Q]=Z.length>1?["(?:",")"]:["",""];if($="^"+q+$+Q+"$",this.partial)$="^(?:\\/|"+q+$.slice(1,-1)+Q+")$";if(this.negate)$="^(?!"+$+").+$";try{this.regexp=new RegExp($,[...Y].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(Z){if(this.preserveMultipleSlashes)return Z.split("/");else if(this.isWindows&&/^\/\/[^/]+/.test(Z))return["",...Z.split(/\/+/)];else return Z.split(/\/+/)}match(Z,X=this.partial){if(this.debug("match",Z,this.pattern),this.comment)return!1;if(this.empty)return Z==="";if(Z==="/"&&X)return!0;let J=this.options;if(this.isWindows)Z=Z.split("\\").join("/");let Y=this.slashSplit(Z);this.debug(this.pattern,"split",Y);let $=this.set;this.debug(this.pattern,"set",$);let q=Y[Y.length-1];if(!q)for(let Q=Y.length-2;!q&&Q>=0;Q--)q=Y[Q];for(let Q of $){let z=Y;if(J.matchBase&&Q.length===1)z=[q];if(this.matchOne(z,Q,X)){if(J.flipNegate)return!0;return!this.negate}}if(J.flipNegate)return!1;return this.negate}static defaults(Z){return E3.defaults(Z).Minimatch}}E3.AST=gM;E3.Minimatch=AJ;E3.escape=hM;E3.unescape=J$;import{fileURLToPath as mE0}from"node:url";var KE0=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date,ft=new Set,GE=typeof process==="object"&&!!process?process:{},mt=(Z,X,J,Y)=>{typeof GE.emitWarning==="function"?GE.emitWarning(Z,X,J,Y):console.error(`[${J}] ${X}: ${Z}`)},t_=globalThis.AbortController,yt=globalThis.AbortSignal;if(typeof t_==="undefined"){yt=class J{onabort;_onabort=[];reason;aborted=!1;addEventListener(Y,$){this._onabort.push($)}},t_=class J{constructor(){X()}signal=new yt;abort(Y){if(this.signal.aborted)return;this.signal.reason=Y,this.signal.aborted=!0;for(let $ of this.signal._onabort)$(Y);this.signal.onabort?.(Y)}};let Z=GE.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",X=()=>{if(!Z)return;Z=!1,mt("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",X)}}var QE0=(Z)=>!ft.has(Z),nl1=Symbol("type"),PG=(Z)=>Z&&Z===Math.floor(Z)&&Z>0&&isFinite(Z),gt=(Z)=>!PG(Z)?null:Z<=Math.pow(2,8)?Uint8Array:Z<=Math.pow(2,16)?Uint16Array:Z<=Math.pow(2,32)?Uint32Array:Z<=Number.MAX_SAFE_INTEGER?tL:null;class tL extends Array{constructor(Z){super(Z);this.fill(0)}}class uM{heap;length;static#Z=!1;static create(Z){let X=gt(Z);if(!X)return[];uM.#Z=!0;let J=new uM(Z,X);return uM.#Z=!1,J}constructor(Z,X){if(!uM.#Z)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new X(Z),this.length=0}push(Z){this.heap[this.length++]=Z}pop(){return this.heap[--this.length]}}class Bx{#Z;#J;#$;#X;#q;#G;#M;#W;get perf(){return this.#W}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#Q;#B;#x;#z;#K;#N;#C;#U;#F;#P;#D;#R;#O;#H;#j;#L;#v;#Y;#k;static unsafeExposeInternals(Z){return{starts:Z.#O,ttls:Z.#H,autopurgeTimers:Z.#j,sizes:Z.#R,keyMap:Z.#x,keyList:Z.#z,valList:Z.#K,next:Z.#N,prev:Z.#C,get head(){return Z.#U},get tail(){return Z.#F},free:Z.#P,isBackgroundFetch:(X)=>Z.#V(X),backgroundFetch:(X,J,Y,$)=>Z.#d(X,J,Y,$),moveToTail:(X)=>Z.#y(X),indexes:(X)=>Z.#w(X),rindexes:(X)=>Z.#I(X),isStale:(X)=>Z.#_(X)}}get max(){return this.#Z}get maxSize(){return this.#J}get calculatedSize(){return this.#B}get size(){return this.#Q}get fetchMethod(){return this.#G}get memoMethod(){return this.#M}get dispose(){return this.#$}get onInsert(){return this.#X}get disposeAfter(){return this.#q}constructor(Z){let{max:X=0,ttl:J,ttlResolution:Y=1,ttlAutopurge:$,updateAgeOnGet:q,updateAgeOnHas:Q,allowStale:z,dispose:G,onInsert:V,disposeAfter:x,noDisposeOnSet:H,noUpdateTTL:U,maxSize:F=0,maxEntrySize:N=0,sizeCalculation:C,fetchMethod:_,memoMethod:R,noDeleteOnFetchRejection:P,noDeleteOnStaleGet:A,allowStaleOnFetchRejection:v,allowStaleOnFetchAbort:E,ignoreFetchAbort:k,perf:y}=Z;if(y!==void 0){if(typeof y?.now!=="function")throw new TypeError("perf option must have a now() method if specified")}if(this.#W=y??KE0,X!==0&&!PG(X))throw new TypeError("max option must be a nonnegative integer");let I=X?gt(X):Array;if(!I)throw new Error("invalid max value: "+X);if(this.#Z=X,this.#J=F,this.maxEntrySize=N||this.#J,this.sizeCalculation=C,this.sizeCalculation){if(!this.#J&&!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(R!==void 0&&typeof R!=="function")throw new TypeError("memoMethod must be a function if defined");if(this.#M=R,_!==void 0&&typeof _!=="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#G=_,this.#v=!!_,this.#x=new Map,this.#z=new Array(X).fill(void 0),this.#K=new Array(X).fill(void 0),this.#N=new I(X),this.#C=new I(X),this.#U=0,this.#F=0,this.#P=uM.create(X),this.#Q=0,this.#B=0,typeof G==="function")this.#$=G;if(typeof V==="function")this.#X=V;if(typeof x==="function")this.#q=x,this.#D=[];else this.#q=void 0,this.#D=void 0;if(this.#L=!!this.#$,this.#k=!!this.#X,this.#Y=!!this.#q,this.noDisposeOnSet=!!H,this.noUpdateTTL=!!U,this.noDeleteOnFetchRejection=!!P,this.allowStaleOnFetchRejection=!!v,this.allowStaleOnFetchAbort=!!E,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(this.#J!==0){if(!PG(this.#J))throw new TypeError("maxSize must be a positive integer if specified")}if(!PG(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#c()}if(this.allowStale=!!z,this.noDeleteOnStaleGet=!!A,this.updateAgeOnGet=!!q,this.updateAgeOnHas=!!Q,this.ttlResolution=PG(Y)||Y===0?Y:1,this.ttlAutopurge=!!$,this.ttl=J||0,this.ttl){if(!PG(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#S()}if(this.#Z===0&&this.ttl===0&&this.#J===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#Z&&!this.#J){if(QE0("LRU_CACHE_UNBOUNDED"))ft.add("LRU_CACHE_UNBOUNDED"),mt("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning","LRU_CACHE_UNBOUNDED",Bx)}}getRemainingTTL(Z){return this.#x.has(Z)?1/0:0}#S(){let Z=new tL(this.#Z),X=new tL(this.#Z);this.#H=Z,this.#O=X;let J=this.ttlAutopurge?new Array(this.#Z):void 0;this.#j=J,this.#m=(q,Q,z=this.#W.now())=>{if(X[q]=Q!==0?z:0,Z[q]=Q,J?.[q])clearTimeout(J[q]),J[q]=void 0;if(Q!==0&&J){let G=setTimeout(()=>{if(this.#_(q))this.#A(this.#z[q],"expire")},Q+1);if(G.unref)G.unref();J[q]=G}},this.#T=(q)=>{X[q]=Z[q]!==0?this.#W.now():0},this.#E=(q,Q)=>{if(Z[Q]){let z=Z[Q],G=X[Q];if(!z||!G)return;q.ttl=z,q.start=G,q.now=Y||$();let V=q.now-G;q.remainingTTL=z-V}};let Y=0,$=()=>{let q=this.#W.now();if(this.ttlResolution>0){Y=q;let Q=setTimeout(()=>Y=0,this.ttlResolution);if(Q.unref)Q.unref()}return q};this.getRemainingTTL=(q)=>{let Q=this.#x.get(q);if(Q===void 0)return 0;let z=Z[Q],G=X[Q];if(!z||!G)return 1/0;let V=(Y||$())-G;return z-V},this.#_=(q)=>{let Q=X[q],z=Z[q];return!!z&&!!Q&&(Y||$())-Q>z}}#T=()=>{};#E=()=>{};#m=()=>{};#_=()=>!1;#c(){let Z=new tL(this.#Z);this.#B=0,this.#R=Z,this.#f=(X)=>{this.#B-=Z[X],Z[X]=0},this.#g=(X,J,Y,$)=>{if(this.#V(J))return 0;if(!PG(Y))if($){if(typeof $!=="function")throw new TypeError("sizeCalculation must be a function");if(Y=$(J,X),!PG(Y))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 Y},this.#b=(X,J,Y)=>{if(Z[X]=J,this.#J){let $=this.#J-Z[X];while(this.#B>$)this.#u(!0)}if(this.#B+=Z[X],Y)Y.entrySize=J,Y.totalCalculatedSize=this.#B}}#f=(Z)=>{};#b=(Z,X,J)=>{};#g=(Z,X,J,Y)=>{if(J||Y)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#w({allowStale:Z=this.allowStale}={}){if(this.#Q)for(let X=this.#F;;){if(!this.#h(X))break;if(Z||!this.#_(X))yield X;if(X===this.#U)break;else X=this.#C[X]}}*#I({allowStale:Z=this.allowStale}={}){if(this.#Q)for(let X=this.#U;;){if(!this.#h(X))break;if(Z||!this.#_(X))yield X;if(X===this.#F)break;else X=this.#N[X]}}#h(Z){return Z!==void 0&&this.#x.get(this.#z[Z])===Z}*entries(){for(let Z of this.#w())if(this.#K[Z]!==void 0&&this.#z[Z]!==void 0&&!this.#V(this.#K[Z]))yield[this.#z[Z],this.#K[Z]]}*rentries(){for(let Z of this.#I())if(this.#K[Z]!==void 0&&this.#z[Z]!==void 0&&!this.#V(this.#K[Z]))yield[this.#z[Z],this.#K[Z]]}*keys(){for(let Z of this.#w()){let X=this.#z[Z];if(X!==void 0&&!this.#V(this.#K[Z]))yield X}}*rkeys(){for(let Z of this.#I()){let X=this.#z[Z];if(X!==void 0&&!this.#V(this.#K[Z]))yield X}}*values(){for(let Z of this.#w())if(this.#K[Z]!==void 0&&!this.#V(this.#K[Z]))yield this.#K[Z]}*rvalues(){for(let Z of this.#I())if(this.#K[Z]!==void 0&&!this.#V(this.#K[Z]))yield this.#K[Z]}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(Z,X={}){for(let J of this.#w()){let Y=this.#K[J],$=this.#V(Y)?Y.__staleWhileFetching:Y;if($===void 0)continue;if(Z($,this.#z[J],this))return this.get(this.#z[J],X)}}forEach(Z,X=this){for(let J of this.#w()){let Y=this.#K[J],$=this.#V(Y)?Y.__staleWhileFetching:Y;if($===void 0)continue;Z.call(X,$,this.#z[J],this)}}rforEach(Z,X=this){for(let J of this.#I()){let Y=this.#K[J],$=this.#V(Y)?Y.__staleWhileFetching:Y;if($===void 0)continue;Z.call(X,$,this.#z[J],this)}}purgeStale(){let Z=!1;for(let X of this.#I({allowStale:!0}))if(this.#_(X))this.#A(this.#z[X],"expire"),Z=!0;return Z}info(Z){let X=this.#x.get(Z);if(X===void 0)return;let J=this.#K[X],Y=this.#V(J)?J.__staleWhileFetching:J;if(Y===void 0)return;let $={value:Y};if(this.#H&&this.#O){let q=this.#H[X],Q=this.#O[X];if(q&&Q){let z=q-(this.#W.now()-Q);$.ttl=z,$.start=Date.now()}}if(this.#R)$.size=this.#R[X];return $}dump(){let Z=[];for(let X of this.#w({allowStale:!0})){let J=this.#z[X],Y=this.#K[X],$=this.#V(Y)?Y.__staleWhileFetching:Y;if($===void 0||J===void 0)continue;let q={value:$};if(this.#H&&this.#O){q.ttl=this.#H[X];let Q=this.#W.now()-this.#O[X];q.start=Math.floor(Date.now()-Q)}if(this.#R)q.size=this.#R[X];Z.unshift([J,q])}return Z}load(Z){this.clear();for(let[X,J]of Z){if(J.start){let Y=Date.now()-J.start;J.start=this.#W.now()-Y}this.set(X,J.value,J)}}set(Z,X,J={}){if(X===void 0)return this.delete(Z),this;let{ttl:Y=this.ttl,start:$,noDisposeOnSet:q=this.noDisposeOnSet,sizeCalculation:Q=this.sizeCalculation,status:z}=J,{noUpdateTTL:G=this.noUpdateTTL}=J,V=this.#g(Z,X,J.size||0,Q);if(this.maxEntrySize&&V>this.maxEntrySize){if(z)z.set="miss",z.maxEntrySizeExceeded=!0;return this.#A(Z,"set"),this}let x=this.#Q===0?void 0:this.#x.get(Z);if(x===void 0){if(x=this.#Q===0?this.#F:this.#P.length!==0?this.#P.pop():this.#Q===this.#Z?this.#u(!1):this.#Q,this.#z[x]=Z,this.#K[x]=X,this.#x.set(Z,x),this.#N[this.#F]=x,this.#C[x]=this.#F,this.#F=x,this.#Q++,this.#b(x,V,z),z)z.set="add";if(G=!1,this.#k)this.#X?.(X,Z,"add")}else{this.#y(x);let H=this.#K[x];if(X!==H){if(this.#v&&this.#V(H)){H.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:U}=H;if(U!==void 0&&!q){if(this.#L)this.#$?.(U,Z,"set");if(this.#Y)this.#D?.push([U,Z,"set"])}}else if(!q){if(this.#L)this.#$?.(H,Z,"set");if(this.#Y)this.#D?.push([H,Z,"set"])}if(this.#f(x),this.#b(x,V,z),this.#K[x]=X,z){z.set="replace";let U=H&&this.#V(H)?H.__staleWhileFetching:H;if(U!==void 0)z.oldValue=U}}else if(z)z.set="update";if(this.#k)this.onInsert?.(X,Z,X===H?"update":"replace")}if(Y!==0&&!this.#H)this.#S();if(this.#H){if(!G)this.#m(x,Y,$);if(z)this.#E(z,x)}if(!q&&this.#Y&&this.#D){let H=this.#D,U;while(U=H?.shift())this.#q?.(...U)}return this}pop(){try{while(this.#Q){let Z=this.#K[this.#U];if(this.#u(!0),this.#V(Z)){if(Z.__staleWhileFetching)return Z.__staleWhileFetching}else if(Z!==void 0)return Z}}finally{if(this.#Y&&this.#D){let Z=this.#D,X;while(X=Z?.shift())this.#q?.(...X)}}}#u(Z){let X=this.#U,J=this.#z[X],Y=this.#K[X];if(this.#v&&this.#V(Y))Y.__abortController.abort(new Error("evicted"));else if(this.#L||this.#Y){if(this.#L)this.#$?.(Y,J,"evict");if(this.#Y)this.#D?.push([Y,J,"evict"])}if(this.#f(X),this.#j?.[X])clearTimeout(this.#j[X]),this.#j[X]=void 0;if(Z)this.#z[X]=void 0,this.#K[X]=void 0,this.#P.push(X);if(this.#Q===1)this.#U=this.#F=0,this.#P.length=0;else this.#U=this.#N[X];return this.#x.delete(J),this.#Q--,X}has(Z,X={}){let{updateAgeOnHas:J=this.updateAgeOnHas,status:Y}=X,$=this.#x.get(Z);if($!==void 0){let q=this.#K[$];if(this.#V(q)&&q.__staleWhileFetching===void 0)return!1;if(!this.#_($)){if(J)this.#T($);if(Y)Y.has="hit",this.#E(Y,$);return!0}else if(Y)Y.has="stale",this.#E(Y,$)}else if(Y)Y.has="miss";return!1}peek(Z,X={}){let{allowStale:J=this.allowStale}=X,Y=this.#x.get(Z);if(Y===void 0||!J&&this.#_(Y))return;let $=this.#K[Y];return this.#V($)?$.__staleWhileFetching:$}#d(Z,X,J,Y){let $=X===void 0?void 0:this.#K[X];if(this.#V($))return $;let q=new t_,{signal:Q}=J;Q?.addEventListener("abort",()=>q.abort(Q.reason),{signal:q.signal});let z={signal:q.signal,options:J,context:Y},G=(N,C=!1)=>{let{aborted:_}=q.signal,R=J.ignoreFetchAbort&&N!==void 0;if(J.status)if(_&&!C){if(J.status.fetchAborted=!0,J.status.fetchError=q.signal.reason,R)J.status.fetchAbortIgnored=!0}else J.status.fetchResolved=!0;if(_&&!R&&!C)return x(q.signal.reason);let P=U,A=this.#K[X];if(A===U||R&&C&&A===void 0)if(N===void 0)if(P.__staleWhileFetching!==void 0)this.#K[X]=P.__staleWhileFetching;else this.#A(Z,"fetch");else{if(J.status)J.status.fetchUpdated=!0;this.set(Z,N,z.options)}return N},V=(N)=>{if(J.status)J.status.fetchRejected=!0,J.status.fetchError=N;return x(N)},x=(N)=>{let{aborted:C}=q.signal,_=C&&J.allowStaleOnFetchAbort,R=_||J.allowStaleOnFetchRejection,P=R||J.noDeleteOnFetchRejection,A=U;if(this.#K[X]===U){if(!P||A.__staleWhileFetching===void 0)this.#A(Z,"fetch");else if(!_)this.#K[X]=A.__staleWhileFetching}if(R){if(J.status&&A.__staleWhileFetching!==void 0)J.status.returnedStale=!0;return A.__staleWhileFetching}else if(A.__returned===A)throw N},H=(N,C)=>{let _=this.#G?.(Z,$,z);if(_&&_ instanceof Promise)_.then((R)=>N(R===void 0?void 0:R),C);q.signal.addEventListener("abort",()=>{if(!J.ignoreFetchAbort||J.allowStaleOnFetchAbort){if(N(void 0),J.allowStaleOnFetchAbort)N=(R)=>G(R,!0)}})};if(J.status)J.status.fetchDispatched=!0;let U=new Promise(H).then(G,V),F=Object.assign(U,{__abortController:q,__staleWhileFetching:$,__returned:void 0});if(X===void 0)this.set(Z,F,{...z.options,status:void 0}),X=this.#x.get(Z);else this.#K[X]=F;return F}#V(Z){if(!this.#v)return!1;let X=Z;return!!X&&X instanceof Promise&&X.hasOwnProperty("__staleWhileFetching")&&X.__abortController instanceof t_}async fetch(Z,X={}){let{allowStale:J=this.allowStale,updateAgeOnGet:Y=this.updateAgeOnGet,noDeleteOnStaleGet:$=this.noDeleteOnStaleGet,ttl:q=this.ttl,noDisposeOnSet:Q=this.noDisposeOnSet,size:z=0,sizeCalculation:G=this.sizeCalculation,noUpdateTTL:V=this.noUpdateTTL,noDeleteOnFetchRejection:x=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:H=this.allowStaleOnFetchRejection,ignoreFetchAbort:U=this.ignoreFetchAbort,allowStaleOnFetchAbort:F=this.allowStaleOnFetchAbort,context:N,forceRefresh:C=!1,status:_,signal:R}=X;if(!this.#v){if(_)_.fetch="get";return this.get(Z,{allowStale:J,updateAgeOnGet:Y,noDeleteOnStaleGet:$,status:_})}let P={allowStale:J,updateAgeOnGet:Y,noDeleteOnStaleGet:$,ttl:q,noDisposeOnSet:Q,size:z,sizeCalculation:G,noUpdateTTL:V,noDeleteOnFetchRejection:x,allowStaleOnFetchRejection:H,allowStaleOnFetchAbort:F,ignoreFetchAbort:U,status:_,signal:R},A=this.#x.get(Z);if(A===void 0){if(_)_.fetch="miss";let v=this.#d(Z,A,P,N);return v.__returned=v}else{let v=this.#K[A];if(this.#V(v)){let S=J&&v.__staleWhileFetching!==void 0;if(_){if(_.fetch="inflight",S)_.returnedStale=!0}return S?v.__staleWhileFetching:v.__returned=v}let E=this.#_(A);if(!C&&!E){if(_)_.fetch="hit";if(this.#y(A),Y)this.#T(A);if(_)this.#E(_,A);return v}let k=this.#d(Z,A,P,N),I=k.__staleWhileFetching!==void 0&&J;if(_){if(_.fetch=E?"stale":"refresh",I&&E)_.returnedStale=!0}return I?k.__staleWhileFetching:k.__returned=k}}async forceFetch(Z,X={}){let J=await this.fetch(Z,X);if(J===void 0)throw new Error("fetch() returned undefined");return J}memo(Z,X={}){let J=this.#M;if(!J)throw new Error("no memoMethod provided to constructor");let{context:Y,forceRefresh:$,...q}=X,Q=this.get(Z,q);if(!$&&Q!==void 0)return Q;let z=J(Z,Q,{options:q,context:Y});return this.set(Z,z,q),z}get(Z,X={}){let{allowStale:J=this.allowStale,updateAgeOnGet:Y=this.updateAgeOnGet,noDeleteOnStaleGet:$=this.noDeleteOnStaleGet,status:q}=X,Q=this.#x.get(Z);if(Q!==void 0){let z=this.#K[Q],G=this.#V(z);if(q)this.#E(q,Q);if(this.#_(Q)){if(q)q.get="stale";if(!G){if(!$)this.#A(Z,"expire");if(q&&J)q.returnedStale=!0;return J?z:void 0}else{if(q&&J&&z.__staleWhileFetching!==void 0)q.returnedStale=!0;return J?z.__staleWhileFetching:void 0}}else{if(q)q.get="hit";if(G)return z.__staleWhileFetching;if(this.#y(Q),Y)this.#T(Q);return z}}else if(q)q.get="miss"}#p(Z,X){this.#C[X]=Z,this.#N[Z]=X}#y(Z){if(Z!==this.#F){if(Z===this.#U)this.#U=this.#N[Z];else this.#p(this.#C[Z],this.#N[Z]);this.#p(this.#F,Z),this.#F=Z}}delete(Z){return this.#A(Z,"delete")}#A(Z,X){let J=!1;if(this.#Q!==0){let Y=this.#x.get(Z);if(Y!==void 0){if(this.#j?.[Y])clearTimeout(this.#j?.[Y]),this.#j[Y]=void 0;if(J=!0,this.#Q===1)this.#l(X);else{this.#f(Y);let $=this.#K[Y];if(this.#V($))$.__abortController.abort(new Error("deleted"));else if(this.#L||this.#Y){if(this.#L)this.#$?.($,Z,X);if(this.#Y)this.#D?.push([$,Z,X])}if(this.#x.delete(Z),this.#z[Y]=void 0,this.#K[Y]=void 0,Y===this.#F)this.#F=this.#C[Y];else if(Y===this.#U)this.#U=this.#N[Y];else{let q=this.#C[Y];this.#N[q]=this.#N[Y];let Q=this.#N[Y];this.#C[Q]=this.#C[Y]}this.#Q--,this.#P.push(Y)}}}if(this.#Y&&this.#D?.length){let Y=this.#D,$;while($=Y?.shift())this.#q?.(...$)}return J}clear(){return this.#l("delete")}#l(Z){for(let X of this.#I({allowStale:!0})){let J=this.#K[X];if(this.#V(J))J.__abortController.abort(new Error("deleted"));else{let Y=this.#z[X];if(this.#L)this.#$?.(J,Y,Z);if(this.#Y)this.#D?.push([J,Y,Z])}}if(this.#x.clear(),this.#K.fill(void 0),this.#z.fill(void 0),this.#H&&this.#O){this.#H.fill(0),this.#O.fill(0);for(let X of this.#j??[])if(X!==void 0)clearTimeout(X);this.#j?.fill(void 0)}if(this.#R)this.#R.fill(0);if(this.#U=0,this.#F=0,this.#P.length=0,this.#B=0,this.#Q=0,this.#Y&&this.#D){let X=this.#D,J;while(J=X?.shift())this.#q?.(...J)}}}import{posix as DE0,win32 as jE}from"node:path";import{fileURLToPath as jE0}from"node:url";import{lstatSync as NE0,readdir as LE0,readdirSync as CE0,readlinkSync as RE0,realpathSync as OE0}from"fs";import*as _E0 from"node:fs";import{lstat as vE0,readdir as TE0,readlink as AE0,realpath as wE0}from"node:fs/promises";import{EventEmitter as ME}from"node:events";import ct from"node:stream";import{StringDecoder as zE0}from"node:string_decoder";var ht=typeof process==="object"&&process?process:{stdout:null,stderr:null},GE0=(Z)=>!!Z&&typeof Z==="object"&&(Z instanceof Mx||Z instanceof ct||VE0(Z)||WE0(Z)),VE0=(Z)=>!!Z&&typeof Z==="object"&&Z instanceof ME&&typeof Z.pipe==="function"&&Z.pipe!==ct.Writable.prototype.pipe,WE0=(Z)=>!!Z&&typeof Z==="object"&&Z instanceof ME&&typeof Z.write==="function"&&typeof Z.end==="function",jQ=Symbol("EOF"),NQ=Symbol("maybeEmitEnd"),vG=Symbol("emittedEnd"),e_=Symbol("emittingEnd"),eL=Symbol("emittedError"),ZP=Symbol("closed"),ut=Symbol("read"),XP=Symbol("flush"),dt=Symbol("flushChunk"),Y$=Symbol("encoding"),dM=Symbol("decoder"),K9=Symbol("flowing"),ZC=Symbol("paused"),pM=Symbol("resume"),Q9=Symbol("buffer"),k3=Symbol("pipes"),z9=Symbol("bufferLength"),VE=Symbol("bufferPush"),JP=Symbol("bufferShift"),n9=Symbol("objectMode"),E5=Symbol("destroyed"),WE=Symbol("error"),xE=Symbol("emitData"),pt=Symbol("emitEnd"),BE=Symbol("emitEnd2"),Rq=Symbol("async"),HE=Symbol("abort"),YP=Symbol("aborted"),XC=Symbol("signal"),Hx=Symbol("dataListeners"),NX=Symbol("discarded"),JC=(Z)=>Promise.resolve().then(Z),xE0=(Z)=>Z(),BE0=(Z)=>Z==="end"||Z==="finish"||Z==="prefinish",HE0=(Z)=>Z instanceof ArrayBuffer||!!Z&&typeof Z==="object"&&Z.constructor&&Z.constructor.name==="ArrayBuffer"&&Z.byteLength>=0,ME0=(Z)=>!Buffer.isBuffer(Z)&&ArrayBuffer.isView(Z);class UE{src;dest;opts;ondrain;constructor(Z,X,J){this.src=Z,this.dest=X,this.opts=J,this.ondrain=()=>Z[pM](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(Z){}end(){if(this.unpipe(),this.opts.end)this.dest.end()}}class lt extends UE{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(Z,X,J){super(Z,X,J);this.proxyErrors=(Y)=>X.emit("error",Y),Z.on("error",this.proxyErrors)}}var UE0=(Z)=>!!Z.objectMode,FE0=(Z)=>!Z.objectMode&&!!Z.encoding&&Z.encoding!=="buffer";class Mx extends ME{[K9]=!1;[ZC]=!1;[k3]=[];[Q9]=[];[n9];[Y$];[Rq];[dM];[jQ]=!1;[vG]=!1;[e_]=!1;[ZP]=!1;[eL]=null;[z9]=0;[E5]=!1;[XC];[YP]=!1;[Hx]=0;[NX]=!1;writable=!0;readable=!0;constructor(...Z){let X=Z[0]||{};super();if(X.objectMode&&typeof X.encoding==="string")throw new TypeError("Encoding and objectMode may not be used together");if(UE0(X))this[n9]=!0,this[Y$]=null;else if(FE0(X))this[Y$]=X.encoding,this[n9]=!1;else this[n9]=!1,this[Y$]=null;if(this[Rq]=!!X.async,this[dM]=this[Y$]?new zE0(this[Y$]):null,X&&X.debugExposeBuffer===!0)Object.defineProperty(this,"buffer",{get:()=>this[Q9]});if(X&&X.debugExposePipes===!0)Object.defineProperty(this,"pipes",{get:()=>this[k3]});let{signal:J}=X;if(J)if(this[XC]=J,J.aborted)this[HE]();else J.addEventListener("abort",()=>this[HE]())}get bufferLength(){return this[z9]}get encoding(){return this[Y$]}set encoding(Z){throw new Error("Encoding must be set at instantiation time")}setEncoding(Z){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[n9]}set objectMode(Z){throw new Error("objectMode must be set at instantiation time")}get["async"](){return this[Rq]}set["async"](Z){this[Rq]=this[Rq]||!!Z}[HE](){this[YP]=!0,this.emit("abort",this[XC]?.reason),this.destroy(this[XC]?.reason)}get aborted(){return this[YP]}set aborted(Z){}write(Z,X,J){if(this[YP])return!1;if(this[jQ])throw new Error("write after end");if(this[E5])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;if(typeof X==="function")J=X,X="utf8";if(!X)X="utf8";let Y=this[Rq]?JC:xE0;if(!this[n9]&&!Buffer.isBuffer(Z)){if(ME0(Z))Z=Buffer.from(Z.buffer,Z.byteOffset,Z.byteLength);else if(HE0(Z))Z=Buffer.from(Z);else if(typeof Z!=="string")throw new Error("Non-contiguous data written to non-objectMode stream")}if(this[n9]){if(this[K9]&&this[z9]!==0)this[XP](!0);if(this[K9])this.emit("data",Z);else this[VE](Z);if(this[z9]!==0)this.emit("readable");if(J)Y(J);return this[K9]}if(!Z.length){if(this[z9]!==0)this.emit("readable");if(J)Y(J);return this[K9]}if(typeof Z==="string"&&!(X===this[Y$]&&!this[dM]?.lastNeed))Z=Buffer.from(Z,X);if(Buffer.isBuffer(Z)&&this[Y$])Z=this[dM].write(Z);if(this[K9]&&this[z9]!==0)this[XP](!0);if(this[K9])this.emit("data",Z);else this[VE](Z);if(this[z9]!==0)this.emit("readable");if(J)Y(J);return this[K9]}read(Z){if(this[E5])return null;if(this[NX]=!1,this[z9]===0||Z===0||Z&&Z>this[z9])return this[NQ](),null;if(this[n9])Z=null;if(this[Q9].length>1&&!this[n9])this[Q9]=[this[Y$]?this[Q9].join(""):Buffer.concat(this[Q9],this[z9])];let X=this[ut](Z||null,this[Q9][0]);return this[NQ](),X}[ut](Z,X){if(this[n9])this[JP]();else{let J=X;if(Z===J.length||Z===null)this[JP]();else if(typeof J==="string")this[Q9][0]=J.slice(Z),X=J.slice(0,Z),this[z9]-=Z;else this[Q9][0]=J.subarray(Z),X=J.subarray(0,Z),this[z9]-=Z}if(this.emit("data",X),!this[Q9].length&&!this[jQ])this.emit("drain");return X}end(Z,X,J){if(typeof Z==="function")J=Z,Z=void 0;if(typeof X==="function")J=X,X="utf8";if(Z!==void 0)this.write(Z,X);if(J)this.once("end",J);if(this[jQ]=!0,this.writable=!1,this[K9]||!this[ZC])this[NQ]();return this}[pM](){if(this[E5])return;if(!this[Hx]&&!this[k3].length)this[NX]=!0;if(this[ZC]=!1,this[K9]=!0,this.emit("resume"),this[Q9].length)this[XP]();else if(this[jQ])this[NQ]();else this.emit("drain")}resume(){return this[pM]()}pause(){this[K9]=!1,this[ZC]=!0,this[NX]=!1}get destroyed(){return this[E5]}get flowing(){return this[K9]}get paused(){return this[ZC]}[VE](Z){if(this[n9])this[z9]+=1;else this[z9]+=Z.length;this[Q9].push(Z)}[JP](){if(this[n9])this[z9]-=1;else this[z9]-=this[Q9][0].length;return this[Q9].shift()}[XP](Z=!1){do;while(this[dt](this[JP]())&&this[Q9].length);if(!Z&&!this[Q9].length&&!this[jQ])this.emit("drain")}[dt](Z){return this.emit("data",Z),this[K9]}pipe(Z,X){if(this[E5])return Z;this[NX]=!1;let J=this[vG];if(X=X||{},Z===ht.stdout||Z===ht.stderr)X.end=!1;else X.end=X.end!==!1;if(X.proxyErrors=!!X.proxyErrors,J){if(X.end)Z.end()}else if(this[k3].push(!X.proxyErrors?new UE(this,Z,X):new lt(this,Z,X)),this[Rq])JC(()=>this[pM]());else this[pM]();return Z}unpipe(Z){let X=this[k3].find((J)=>J.dest===Z);if(X){if(this[k3].length===1){if(this[K9]&&this[Hx]===0)this[K9]=!1;this[k3]=[]}else this[k3].splice(this[k3].indexOf(X),1);X.unpipe()}}addListener(Z,X){return this.on(Z,X)}on(Z,X){let J=super.on(Z,X);if(Z==="data"){if(this[NX]=!1,this[Hx]++,!this[k3].length&&!this[K9])this[pM]()}else if(Z==="readable"&&this[z9]!==0)super.emit("readable");else if(BE0(Z)&&this[vG])super.emit(Z),this.removeAllListeners(Z);else if(Z==="error"&&this[eL]){let Y=X;if(this[Rq])JC(()=>Y.call(this,this[eL]));else Y.call(this,this[eL])}return J}removeListener(Z,X){return this.off(Z,X)}off(Z,X){let J=super.off(Z,X);if(Z==="data"){if(this[Hx]=this.listeners("data").length,this[Hx]===0&&!this[NX]&&!this[k3].length)this[K9]=!1}return J}removeAllListeners(Z){let X=super.removeAllListeners(Z);if(Z==="data"||Z===void 0){if(this[Hx]=0,!this[NX]&&!this[k3].length)this[K9]=!1}return X}get emittedEnd(){return this[vG]}[NQ](){if(!this[e_]&&!this[vG]&&!this[E5]&&this[Q9].length===0&&this[jQ]){if(this[e_]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[ZP])this.emit("close");this[e_]=!1}}emit(Z,...X){let J=X[0];if(Z!=="error"&&Z!=="close"&&Z!==E5&&this[E5])return!1;else if(Z==="data")return!this[n9]&&!J?!1:this[Rq]?(JC(()=>this[xE](J)),!0):this[xE](J);else if(Z==="end")return this[pt]();else if(Z==="close"){if(this[ZP]=!0,!this[vG]&&!this[E5])return!1;let $=super.emit("close");return this.removeAllListeners("close"),$}else if(Z==="error"){this[eL]=J,super.emit(WE,J);let $=!this[XC]||this.listeners("error").length?super.emit("error",J):!1;return this[NQ](),$}else if(Z==="resume"){let $=super.emit("resume");return this[NQ](),$}else if(Z==="finish"||Z==="prefinish"){let $=super.emit(Z);return this.removeAllListeners(Z),$}let Y=super.emit(Z,...X);return this[NQ](),Y}[xE](Z){for(let J of this[k3])if(J.dest.write(Z)===!1)this.pause();let X=this[NX]?!1:super.emit("data",Z);return this[NQ](),X}[pt](){if(this[vG])return!1;return this[vG]=!0,this.readable=!1,this[Rq]?(JC(()=>this[BE]()),!0):this[BE]()}[BE](){if(this[dM]){let X=this[dM].end();if(X){for(let J of this[k3])J.dest.write(X);if(!this[NX])super.emit("data",X)}}for(let X of this[k3])X.end();let Z=super.emit("end");return this.removeAllListeners("end"),Z}async collect(){let Z=Object.assign([],{dataLength:0});if(!this[n9])Z.dataLength=0;let X=this.promise();return this.on("data",(J)=>{if(Z.push(J),!this[n9])Z.dataLength+=J.length}),await X,Z}async concat(){if(this[n9])throw new Error("cannot concat in objectMode");let Z=await this.collect();return this[Y$]?Z.join(""):Buffer.concat(Z,Z.dataLength)}async promise(){return new Promise((Z,X)=>{this.on(E5,()=>X(new Error("stream destroyed"))),this.on("error",(J)=>X(J)),this.on("end",()=>Z())})}[Symbol.asyncIterator](){this[NX]=!1;let Z=!1,X=async()=>{return this.pause(),Z=!0,{value:void 0,done:!0}};return{next:()=>{if(Z)return X();let Y=this.read();if(Y!==null)return Promise.resolve({done:!1,value:Y});if(this[jQ])return X();let $,q,Q=(x)=>{this.off("data",z),this.off("end",G),this.off(E5,V),X(),q(x)},z=(x)=>{this.off("error",Q),this.off("end",G),this.off(E5,V),this.pause(),$({value:x,done:!!this[jQ]})},G=()=>{this.off("error",Q),this.off("data",z),this.off(E5,V),X(),$({done:!0,value:void 0})},V=()=>Q(new Error("stream destroyed"));return new Promise((x,H)=>{q=H,$=x,this.once(E5,V),this.once("error",Q),this.once("end",G),this.once("data",z)})},throw:X,return:X,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[NX]=!1;let Z=!1,X=()=>{return this.pause(),this.off(WE,X),this.off(E5,X),this.off("end",X),Z=!0,{done:!0,value:void 0}},J=()=>{if(Z)return X();let Y=this.read();return Y===null?X():{done:!1,value:Y}};return this.once("end",X),this.once(WE,X),this.once(E5,X),{next:J,throw:X,return:X,[Symbol.iterator](){return this}}}destroy(Z){if(this[E5]){if(Z)this.emit("error",Z);else this.emit(E5);return this}this[E5]=!0,this[NX]=!0,this[Q9].length=0,this[z9]=0;let X=this;if(typeof X.close==="function"&&!this[ZP])X.close();if(Z)this.emit("error",Z);else this.emit(E5);return this}static get isStream(){return GE0}}var PE0=OE0.native,$C={lstatSync:NE0,readdir:LE0,readdirSync:CE0,readlinkSync:RE0,realpathSync:PE0,promises:{lstat:vE0,readdir:TE0,readlink:AE0,realpath:wE0}},rt=(Z)=>!Z||Z===$C||Z===_E0?$C:{...$C,...Z,promises:{...$C.promises,...Z.promises||{}}},nt=/^\\\\\?\\([a-z]:)\\?$/i,IE0=(Z)=>Z.replace(/\//g,"\\").replace(nt,"$1\\"),SE0=/[\\\/]/,IJ=0,tt=1,et=2,Oq=4,Ze=6,Xe=8,Ux=10,Je=12,wJ=15,YC=~wJ,FE=16,ot=32,qC=64,$$=128,$P=256,KP=512,it=qC|$$|KP,EE0=1023,DE=(Z)=>Z.isFile()?Xe:Z.isDirectory()?Oq:Z.isSymbolicLink()?Ux:Z.isCharacterDevice()?et:Z.isBlockDevice()?Ze:Z.isSocket()?Je:Z.isFIFO()?tt:IJ,st=new Bx({max:4096}),KC=(Z)=>{let X=st.get(Z);if(X)return X;let J=Z.normalize("NFKD");return st.set(Z,J),J},at=new Bx({max:4096}),qP=(Z)=>{let X=at.get(Z);if(X)return X;let J=KC(Z.toLowerCase());return at.set(Z,J),J};class NE extends Bx{constructor(){super({max:256})}}class Ye extends Bx{constructor(Z=16384){super({maxSize:Z,sizeCalculation:(X)=>X.length+1})}}var $e=Symbol("PathScurry setAsCwd");class b3{name;root;roots;parent;nocase;isCWD=!1;#Z;#J;get dev(){return this.#J}#$;get mode(){return this.#$}#X;get nlink(){return this.#X}#q;get uid(){return this.#q}#G;get gid(){return this.#G}#M;get rdev(){return this.#M}#W;get blksize(){return this.#W}#Q;get ino(){return this.#Q}#B;get size(){return this.#B}#x;get blocks(){return this.#x}#z;get atimeMs(){return this.#z}#K;get mtimeMs(){return this.#K}#N;get ctimeMs(){return this.#N}#C;get birthtimeMs(){return this.#C}#U;get atime(){return this.#U}#F;get mtime(){return this.#F}#P;get ctime(){return this.#P}#D;get birthtime(){return this.#D}#R;#O;#H;#j;#L;#v;#Y;#k;#S;#T;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(Z,X=IJ,J,Y,$,q,Q){if(this.name=Z,this.#R=$?qP(Z):KC(Z),this.#Y=X&EE0,this.nocase=$,this.roots=Y,this.root=J||this,this.#k=q,this.#H=Q.fullpath,this.#L=Q.relative,this.#v=Q.relativePosix,this.parent=Q.parent,this.parent)this.#Z=this.parent.#Z;else this.#Z=rt(Q.fs)}depth(){if(this.#O!==void 0)return this.#O;if(!this.parent)return this.#O=0;return this.#O=this.parent.depth()+1}childrenCache(){return this.#k}resolve(Z){if(!Z)return this;let X=this.getRootString(Z),Y=Z.substring(X.length).split(this.splitSep);return X?this.getRoot(X).#E(Y):this.#E(Y)}#E(Z){let X=this;for(let J of Z)X=X.child(J);return X}children(){let Z=this.#k.get(this);if(Z)return Z;let X=Object.assign([],{provisional:0});return this.#k.set(this,X),this.#Y&=~FE,X}child(Z,X){if(Z===""||Z===".")return this;if(Z==="..")return this.parent||this;let J=this.children(),Y=this.nocase?qP(Z):KC(Z);for(let z of J)if(z.#R===Y)return z;let $=this.parent?this.sep:"",q=this.#H?this.#H+$+Z:void 0,Q=this.newChild(Z,IJ,{...X,parent:this,fullpath:q});if(!this.canReaddir())Q.#Y|=$$;return J.push(Q),Q}relative(){if(this.isCWD)return"";if(this.#L!==void 0)return this.#L;let Z=this.name,X=this.parent;if(!X)return this.#L=this.name;let J=X.relative();return J+(!J||!X.parent?"":this.sep)+Z}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#v!==void 0)return this.#v;let Z=this.name,X=this.parent;if(!X)return this.#v=this.fullpathPosix();let J=X.relativePosix();return J+(!J||!X.parent?"":"/")+Z}fullpath(){if(this.#H!==void 0)return this.#H;let Z=this.name,X=this.parent;if(!X)return this.#H=this.name;let Y=X.fullpath()+(!X.parent?"":this.sep)+Z;return this.#H=Y}fullpathPosix(){if(this.#j!==void 0)return this.#j;if(this.sep==="/")return this.#j=this.fullpath();if(!this.parent){let Y=this.fullpath().replace(/\\/g,"/");if(/^[a-z]:\//i.test(Y))return this.#j=`//?/${Y}`;else return this.#j=Y}let Z=this.parent,X=Z.fullpathPosix(),J=X+(!X||!Z.parent?"":"/")+this.name;return this.#j=J}isUnknown(){return(this.#Y&wJ)===IJ}isType(Z){return this[`is${Z}`]()}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.#Y&wJ)===Xe}isDirectory(){return(this.#Y&wJ)===Oq}isCharacterDevice(){return(this.#Y&wJ)===et}isBlockDevice(){return(this.#Y&wJ)===Ze}isFIFO(){return(this.#Y&wJ)===tt}isSocket(){return(this.#Y&wJ)===Je}isSymbolicLink(){return(this.#Y&Ux)===Ux}lstatCached(){return this.#Y&ot?this:void 0}readlinkCached(){return this.#S}realpathCached(){return this.#T}readdirCached(){let Z=this.children();return Z.slice(0,Z.provisional)}canReadlink(){if(this.#S)return!0;if(!this.parent)return!1;let Z=this.#Y&wJ;return!(Z!==IJ&&Z!==Ux||this.#Y&$P||this.#Y&$$)}calledReaddir(){return!!(this.#Y&FE)}isENOENT(){return!!(this.#Y&$$)}isNamed(Z){return!this.nocase?this.#R===KC(Z):this.#R===qP(Z)}async readlink(){let Z=this.#S;if(Z)return Z;if(!this.canReadlink())return;if(!this.parent)return;try{let X=await this.#Z.promises.readlink(this.fullpath()),J=(await this.parent.realpath())?.resolve(X);if(J)return this.#S=J}catch(X){this.#I(X.code);return}}readlinkSync(){let Z=this.#S;if(Z)return Z;if(!this.canReadlink())return;if(!this.parent)return;try{let X=this.#Z.readlinkSync(this.fullpath()),J=this.parent.realpathSync()?.resolve(X);if(J)return this.#S=J}catch(X){this.#I(X.code);return}}#m(Z){this.#Y|=FE;for(let X=Z.provisional;X<Z.length;X++){let J=Z[X];if(J)J.#_()}}#_(){if(this.#Y&$$)return;this.#Y=(this.#Y|$$)&YC,this.#c()}#c(){let Z=this.children();Z.provisional=0;for(let X of Z)X.#_()}#f(){this.#Y|=KP,this.#b()}#b(){if(this.#Y&qC)return;let Z=this.#Y;if((Z&wJ)===Oq)Z&=YC;this.#Y=Z|qC,this.#c()}#g(Z=""){if(Z==="ENOTDIR"||Z==="EPERM")this.#b();else if(Z==="ENOENT")this.#_();else this.children().provisional=0}#w(Z=""){if(Z==="ENOTDIR")this.parent.#b();else if(Z==="ENOENT")this.#_()}#I(Z=""){let X=this.#Y;if(X|=$P,Z==="ENOENT")X|=$$;if(Z==="EINVAL"||Z==="UNKNOWN")X&=YC;if(this.#Y=X,Z==="ENOTDIR"&&this.parent)this.parent.#b()}#h(Z,X){return this.#d(Z,X)||this.#u(Z,X)}#u(Z,X){let J=DE(Z),Y=this.newChild(Z.name,J,{parent:this}),$=Y.#Y&wJ;if($!==Oq&&$!==Ux&&$!==IJ)Y.#Y|=qC;return X.unshift(Y),X.provisional++,Y}#d(Z,X){for(let J=X.provisional;J<X.length;J++){let Y=X[J];if((this.nocase?qP(Z.name):KC(Z.name))!==Y.#R)continue;return this.#V(Z,Y,J,X)}}#V(Z,X,J,Y){let $=X.name;if(X.#Y=X.#Y&YC|DE(Z),$!==Z.name)X.name=Z.name;if(J!==Y.provisional){if(J===Y.length-1)Y.pop();else Y.splice(J,1);Y.unshift(X)}return Y.provisional++,X}async lstat(){if((this.#Y&$$)===0)try{return this.#p(await this.#Z.promises.lstat(this.fullpath())),this}catch(Z){this.#w(Z.code)}}lstatSync(){if((this.#Y&$$)===0)try{return this.#p(this.#Z.lstatSync(this.fullpath())),this}catch(Z){this.#w(Z.code)}}#p(Z){let{atime:X,atimeMs:J,birthtime:Y,birthtimeMs:$,blksize:q,blocks:Q,ctime:z,ctimeMs:G,dev:V,gid:x,ino:H,mode:U,mtime:F,mtimeMs:N,nlink:C,rdev:_,size:R,uid:P}=Z;this.#U=X,this.#z=J,this.#D=Y,this.#C=$,this.#W=q,this.#x=Q,this.#P=z,this.#N=G,this.#J=V,this.#G=x,this.#Q=H,this.#$=U,this.#F=F,this.#K=N,this.#X=C,this.#M=_,this.#B=R,this.#q=P;let A=DE(Z);if(this.#Y=this.#Y&YC|A|ot,A!==IJ&&A!==Oq&&A!==Ux)this.#Y|=qC}#y=[];#A=!1;#l(Z){this.#A=!1;let X=this.#y.slice();this.#y.length=0,X.forEach((J)=>J(null,Z))}readdirCB(Z,X=!1){if(!this.canReaddir()){if(X)Z(null,[]);else queueMicrotask(()=>Z(null,[]));return}let J=this.children();if(this.calledReaddir()){let $=J.slice(0,J.provisional);if(X)Z(null,$);else queueMicrotask(()=>Z(null,$));return}if(this.#y.push(Z),this.#A)return;this.#A=!0;let Y=this.fullpath();this.#Z.readdir(Y,{withFileTypes:!0},($,q)=>{if($)this.#g($.code),J.provisional=0;else{for(let Q of q)this.#h(Q,J);this.#m(J)}this.#l(J.slice(0,J.provisional));return})}#o;async readdir(){if(!this.canReaddir())return[];let Z=this.children();if(this.calledReaddir())return Z.slice(0,Z.provisional);let X=this.fullpath();if(this.#o)await this.#o;else{let J=()=>{};this.#o=new Promise((Y)=>J=Y);try{for(let Y of await this.#Z.promises.readdir(X,{withFileTypes:!0}))this.#h(Y,Z);this.#m(Z)}catch(Y){this.#g(Y.code),Z.provisional=0}this.#o=void 0,J()}return Z.slice(0,Z.provisional)}readdirSync(){if(!this.canReaddir())return[];let Z=this.children();if(this.calledReaddir())return Z.slice(0,Z.provisional);let X=this.fullpath();try{for(let J of this.#Z.readdirSync(X,{withFileTypes:!0}))this.#h(J,Z);this.#m(Z)}catch(J){this.#g(J.code),Z.provisional=0}return Z.slice(0,Z.provisional)}canReaddir(){if(this.#Y&it)return!1;let Z=wJ&this.#Y;if(!(Z===IJ||Z===Oq||Z===Ux))return!1;return!0}shouldWalk(Z,X){return(this.#Y&Oq)===Oq&&!(this.#Y&it)&&!Z.has(this)&&(!X||X(this))}async realpath(){if(this.#T)return this.#T;if((KP|$P|$$)&this.#Y)return;try{let Z=await this.#Z.promises.realpath(this.fullpath());return this.#T=this.resolve(Z)}catch(Z){this.#f()}}realpathSync(){if(this.#T)return this.#T;if((KP|$P|$$)&this.#Y)return;try{let Z=this.#Z.realpathSync(this.fullpath());return this.#T=this.resolve(Z)}catch(Z){this.#f()}}[$e](Z){if(Z===this)return;Z.isCWD=!1,this.isCWD=!0;let X=new Set([]),J=[],Y=this;while(Y&&Y.parent)X.add(Y),Y.#L=J.join(this.sep),Y.#v=J.join("/"),Y=Y.parent,J.push("..");Y=Z;while(Y&&Y.parent&&!X.has(Y))Y.#L=void 0,Y.#v=void 0,Y=Y.parent}}class QP extends b3{sep="\\";splitSep=SE0;constructor(Z,X=IJ,J,Y,$,q,Q){super(Z,X,J,Y,$,q,Q)}newChild(Z,X=IJ,J={}){return new QP(Z,X,this.root,this.roots,this.nocase,this.childrenCache(),J)}getRootString(Z){return jE.parse(Z).root}getRoot(Z){if(Z=IE0(Z.toUpperCase()),Z===this.root.name)return this.root;for(let[X,J]of Object.entries(this.roots))if(this.sameRoot(Z,X))return this.roots[Z]=J;return this.roots[Z]=new QC(Z,this).root}sameRoot(Z,X=this.root.name){return Z=Z.toUpperCase().replace(/\//g,"\\").replace(nt,"$1\\"),Z===X}}class zP extends b3{splitSep="/";sep="/";constructor(Z,X=IJ,J,Y,$,q,Q){super(Z,X,J,Y,$,q,Q)}getRootString(Z){return Z.startsWith("/")?"/":""}getRoot(Z){return this.root}newChild(Z,X=IJ,J={}){return new zP(Z,X,this.root,this.roots,this.nocase,this.childrenCache(),J)}}class LE{root;rootPath;roots;cwd;#Z;#J;#$;nocase;#X;constructor(Z=process.cwd(),X,J,{nocase:Y,childrenCacheSize:$=16384,fs:q=$C}={}){if(this.#X=rt(q),Z instanceof URL||Z.startsWith("file://"))Z=jE0(Z);let Q=X.resolve(Z);this.roots=Object.create(null),this.rootPath=this.parseRootPath(Q),this.#Z=new NE,this.#J=new NE,this.#$=new Ye($);let z=Q.substring(this.rootPath.length).split(J);if(z.length===1&&!z[0])z.pop();if(Y===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=Y,this.root=this.newRoot(this.#X),this.roots[this.rootPath]=this.root;let G=this.root,V=z.length-1,x=X.sep,H=this.rootPath,U=!1;for(let F of z){let N=V--;G=G.child(F,{relative:new Array(N).fill("..").join(x),relativePosix:new Array(N).fill("..").join("/"),fullpath:H+=(U?"":x)+F}),U=!0}this.cwd=G}depth(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.depth()}childrenCache(){return this.#$}resolve(...Z){let X="";for(let $=Z.length-1;$>=0;$--){let q=Z[$];if(!q||q===".")continue;if(X=X?`${q}/${X}`:q,this.isAbsolute(q))break}let J=this.#Z.get(X);if(J!==void 0)return J;let Y=this.cwd.resolve(X).fullpath();return this.#Z.set(X,Y),Y}resolvePosix(...Z){let X="";for(let $=Z.length-1;$>=0;$--){let q=Z[$];if(!q||q===".")continue;if(X=X?`${q}/${X}`:q,this.isAbsolute(q))break}let J=this.#J.get(X);if(J!==void 0)return J;let Y=this.cwd.resolve(X).fullpathPosix();return this.#J.set(X,Y),Y}relative(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.relative()}relativePosix(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.relativePosix()}basename(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.name}dirname(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return(Z.parent||Z).fullpath()}async readdir(Z=this.cwd,X={withFileTypes:!0}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z,Z=this.cwd;let{withFileTypes:J}=X;if(!Z.canReaddir())return[];else{let Y=await Z.readdir();return J?Y:Y.map(($)=>$.name)}}readdirSync(Z=this.cwd,X={withFileTypes:!0}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z,Z=this.cwd;let{withFileTypes:J=!0}=X;if(!Z.canReaddir())return[];else if(J)return Z.readdirSync();else return Z.readdirSync().map((Y)=>Y.name)}async lstat(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.lstat()}lstatSync(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.lstatSync()}async readlink(Z=this.cwd,{withFileTypes:X}={withFileTypes:!1}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z.withFileTypes,Z=this.cwd;let J=await Z.readlink();return X?J:J?.fullpath()}readlinkSync(Z=this.cwd,{withFileTypes:X}={withFileTypes:!1}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z.withFileTypes,Z=this.cwd;let J=Z.readlinkSync();return X?J:J?.fullpath()}async realpath(Z=this.cwd,{withFileTypes:X}={withFileTypes:!1}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z.withFileTypes,Z=this.cwd;let J=await Z.realpath();return X?J:J?.fullpath()}realpathSync(Z=this.cwd,{withFileTypes:X}={withFileTypes:!1}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z.withFileTypes,Z=this.cwd;let J=Z.realpathSync();return X?J:J?.fullpath()}async walk(Z=this.cwd,X={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z,Z=this.cwd;let{withFileTypes:J=!0,follow:Y=!1,filter:$,walkFilter:q}=X,Q=[];if(!$||$(Z))Q.push(J?Z:Z.fullpath());let z=new Set,G=(x,H)=>{z.add(x),x.readdirCB((U,F)=>{if(U)return H(U);let N=F.length;if(!N)return H();let C=()=>{if(--N===0)H()};for(let _ of F){if(!$||$(_))Q.push(J?_:_.fullpath());if(Y&&_.isSymbolicLink())_.realpath().then((R)=>R?.isUnknown()?R.lstat():R).then((R)=>R?.shouldWalk(z,q)?G(R,C):C());else if(_.shouldWalk(z,q))G(_,C);else C()}},!0)},V=Z;return new Promise((x,H)=>{G(V,(U)=>{if(U)return H(U);x(Q)})})}walkSync(Z=this.cwd,X={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z,Z=this.cwd;let{withFileTypes:J=!0,follow:Y=!1,filter:$,walkFilter:q}=X,Q=[];if(!$||$(Z))Q.push(J?Z:Z.fullpath());let z=new Set([Z]);for(let G of z){let V=G.readdirSync();for(let x of V){if(!$||$(x))Q.push(J?x:x.fullpath());let H=x;if(x.isSymbolicLink()){if(!(Y&&(H=x.realpathSync())))continue;if(H.isUnknown())H.lstatSync()}if(H.shouldWalk(z,q))z.add(H)}}return Q}[Symbol.asyncIterator](){return this.iterate()}iterate(Z=this.cwd,X={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z,Z=this.cwd;return this.stream(Z,X)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(Z=this.cwd,X={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z,Z=this.cwd;let{withFileTypes:J=!0,follow:Y=!1,filter:$,walkFilter:q}=X;if(!$||$(Z))yield J?Z:Z.fullpath();let Q=new Set([Z]);for(let z of Q){let G=z.readdirSync();for(let V of G){if(!$||$(V))yield J?V:V.fullpath();let x=V;if(V.isSymbolicLink()){if(!(Y&&(x=V.realpathSync())))continue;if(x.isUnknown())x.lstatSync()}if(x.shouldWalk(Q,q))Q.add(x)}}}stream(Z=this.cwd,X={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z,Z=this.cwd;let{withFileTypes:J=!0,follow:Y=!1,filter:$,walkFilter:q}=X,Q=new Mx({objectMode:!0});if(!$||$(Z))Q.write(J?Z:Z.fullpath());let z=new Set,G=[Z],V=0,x=()=>{let H=!1;while(!H){let U=G.shift();if(!U){if(V===0)Q.end();return}V++,z.add(U);let F=(C,_,R=!1)=>{if(C)return Q.emit("error",C);if(Y&&!R){let P=[];for(let A of _)if(A.isSymbolicLink())P.push(A.realpath().then((v)=>v?.isUnknown()?v.lstat():v));if(P.length){Promise.all(P).then(()=>F(null,_,!0));return}}for(let P of _)if(P&&(!$||$(P))){if(!Q.write(J?P:P.fullpath()))H=!0}V--;for(let P of _){let A=P.realpathCached()||P;if(A.shouldWalk(z,q))G.push(A)}if(H&&!Q.flowing)Q.once("drain",x);else if(!N)x()},N=!0;U.readdirCB(F,!0),N=!1}};return x(),Q}streamSync(Z=this.cwd,X={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z,Z=this.cwd;let{withFileTypes:J=!0,follow:Y=!1,filter:$,walkFilter:q}=X,Q=new Mx({objectMode:!0}),z=new Set;if(!$||$(Z))Q.write(J?Z:Z.fullpath());let G=[Z],V=0,x=()=>{let H=!1;while(!H){let U=G.shift();if(!U){if(V===0)Q.end();return}V++,z.add(U);let F=U.readdirSync();for(let N of F)if(!$||$(N)){if(!Q.write(J?N:N.fullpath()))H=!0}V--;for(let N of F){let C=N;if(N.isSymbolicLink()){if(!(Y&&(C=N.realpathSync())))continue;if(C.isUnknown())C.lstatSync()}if(C.shouldWalk(z,q))G.push(C)}}if(H&&!Q.flowing)Q.once("drain",x)};return x(),Q}chdir(Z=this.cwd){let X=this.cwd;this.cwd=typeof Z==="string"?this.cwd.resolve(Z):Z,this.cwd[$e](X)}}class QC extends LE{sep="\\";constructor(Z=process.cwd(),X={}){let{nocase:J=!0}=X;super(Z,jE,"\\",{...X,nocase:J});this.nocase=J;for(let Y=this.cwd;Y;Y=Y.parent)Y.nocase=this.nocase}parseRootPath(Z){return jE.parse(Z).root.toUpperCase()}newRoot(Z){return new QP(this.rootPath,Oq,void 0,this.roots,this.nocase,this.childrenCache(),{fs:Z})}isAbsolute(Z){return Z.startsWith("/")||Z.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(Z)}}class zC extends LE{sep="/";constructor(Z=process.cwd(),X={}){let{nocase:J=!1}=X;super(Z,DE0,"/",{...X,nocase:J});this.nocase=J}parseRootPath(Z){return"/"}newRoot(Z){return new zP(this.rootPath,Oq,void 0,this.roots,this.nocase,this.childrenCache(),{fs:Z})}isAbsolute(Z){return Z.startsWith("/")}}class GP extends zC{constructor(Z=process.cwd(),X={}){let{nocase:J=!0}=X;super(Z,{...X,nocase:J})}}var Go1=process.platform==="win32"?QP:zP,qe=process.platform==="win32"?QC:process.platform==="darwin"?GP:zC;var kE0=(Z)=>Z.length>=1,bE0=(Z)=>Z.length>=1;class cM{#Z;#J;#$;length;#X;#q;#G;#M;#W;#Q;#B=!0;constructor(Z,X,J,Y){if(!kE0(Z))throw new TypeError("empty pattern list");if(!bE0(X))throw new TypeError("empty glob list");if(X.length!==Z.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=Z.length,J<0||J>=this.length)throw new TypeError("index out of range");if(this.#Z=Z,this.#J=X,this.#$=J,this.#X=Y,this.#$===0){if(this.isUNC()){let[$,q,Q,z,...G]=this.#Z,[V,x,H,U,...F]=this.#J;if(G[0]==="")G.shift(),F.shift();let N=[$,q,Q,z,""].join("/"),C=[V,x,H,U,""].join("/");this.#Z=[N,...G],this.#J=[C,...F],this.length=this.#Z.length}else if(this.isDrive()||this.isAbsolute()){let[$,...q]=this.#Z,[Q,...z]=this.#J;if(q[0]==="")q.shift(),z.shift();let G=$+"/",V=Q+"/";this.#Z=[G,...q],this.#J=[V,...z],this.length=this.#Z.length}}}pattern(){return this.#Z[this.#$]}isString(){return typeof this.#Z[this.#$]==="string"}isGlobstar(){return this.#Z[this.#$]===S5}isRegExp(){return this.#Z[this.#$]instanceof RegExp}globString(){return this.#G=this.#G||(this.#$===0?this.isAbsolute()?this.#J[0]+this.#J.slice(1).join("/"):this.#J.join("/"):this.#J.slice(this.#$).join("/"))}hasMore(){return this.length>this.#$+1}rest(){if(this.#q!==void 0)return this.#q;if(!this.hasMore())return this.#q=null;return this.#q=new cM(this.#Z,this.#J,this.#$+1,this.#X),this.#q.#Q=this.#Q,this.#q.#W=this.#W,this.#q.#M=this.#M,this.#q}isUNC(){let Z=this.#Z;return this.#W!==void 0?this.#W:this.#W=this.#X==="win32"&&this.#$===0&&Z[0]===""&&Z[1]===""&&typeof Z[2]==="string"&&!!Z[2]&&typeof Z[3]==="string"&&!!Z[3]}isDrive(){let Z=this.#Z;return this.#M!==void 0?this.#M:this.#M=this.#X==="win32"&&this.#$===0&&this.length>1&&typeof Z[0]==="string"&&/^[a-z]:$/i.test(Z[0])}isAbsolute(){let Z=this.#Z;return this.#Q!==void 0?this.#Q:this.#Q=Z[0]===""&&Z.length>1||this.isDrive()||this.isUNC()}root(){let Z=this.#Z[0];return typeof Z==="string"&&this.isAbsolute()&&this.#$===0?Z:""}checkFollowGlobstar(){return!(this.#$===0||!this.isGlobstar()||!this.#B)}markFollowGlobstar(){if(this.#$===0||!this.isGlobstar()||!this.#B)return!1;return this.#B=!1,!0}}var yE0=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class GC{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(Z,{nobrace:X,nocase:J,noext:Y,noglobstar:$,platform:q=yE0}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=q,this.mmopts={dot:!0,nobrace:X,nocase:J,noext:Y,noglobstar:$,optimizationLevel:2,platform:q,nocomment:!0,nonegate:!0};for(let Q of Z)this.add(Q)}add(Z){let X=new AJ(Z,this.mmopts);for(let J=0;J<X.set.length;J++){let Y=X.set[J],$=X.globParts[J];if(!Y||!$)throw new Error("invalid pattern object");while(Y[0]==="."&&$[0]===".")Y.shift(),$.shift();let q=new cM(Y,$,0,this.platform),Q=new AJ(q.globString(),this.mmopts),z=$[$.length-1]==="**",G=q.isAbsolute();if(G)this.absolute.push(Q);else this.relative.push(Q);if(z)if(G)this.absoluteChildren.push(Q);else this.relativeChildren.push(Q)}}ignored(Z){let X=Z.fullpath(),J=`${X}/`,Y=Z.relative()||".",$=`${Y}/`;for(let q of this.relative)if(q.match(Y)||q.match($))return!0;for(let q of this.absolute)if(q.match(X)||q.match(J))return!0;return!1}childrenIgnored(Z){let X=Z.fullpath()+"/",J=(Z.relative()||".")+"/";for(let Y of this.relativeChildren)if(Y.match(J))return!0;for(let Y of this.absoluteChildren)if(Y.match(X))return!0;return!1}}class CE{store;constructor(Z=new Map){this.store=Z}copy(){return new CE(new Map(this.store))}hasWalked(Z,X){return this.store.get(Z.fullpath())?.has(X.globString())}storeWalked(Z,X){let J=Z.fullpath(),Y=this.store.get(J);if(Y)Y.add(X.globString());else this.store.set(J,new Set([X.globString()]))}}class Ke{store=new Map;add(Z,X,J){let Y=(X?2:0)|(J?1:0),$=this.store.get(Z);this.store.set(Z,$===void 0?Y:Y&$)}entries(){return[...this.store.entries()].map(([Z,X])=>[Z,!!(X&2),!!(X&1)])}}class Qe{store=new Map;add(Z,X){if(!Z.canReaddir())return;let J=this.store.get(Z);if(J){if(!J.find((Y)=>Y.globString()===X.globString()))J.push(X)}else this.store.set(Z,[X])}get(Z){let X=this.store.get(Z);if(!X)throw new Error("attempting to walk unknown path");return X}entries(){return this.keys().map((Z)=>[Z,this.store.get(Z)])}keys(){return[...this.store.keys()].filter((Z)=>Z.canReaddir())}}class VC{hasWalkedCache;matches=new Ke;subwalks=new Qe;patterns;follow;dot;opts;constructor(Z,X){this.opts=Z,this.follow=!!Z.follow,this.dot=!!Z.dot,this.hasWalkedCache=X?X.copy():new CE}processPatterns(Z,X){this.patterns=X;let J=X.map((Y)=>[Z,Y]);for(let[Y,$]of J){this.hasWalkedCache.storeWalked(Y,$);let q=$.root(),Q=$.isAbsolute()&&this.opts.absolute!==!1;if(q){Y=Y.resolve(q==="/"&&this.opts.root!==void 0?this.opts.root:q);let x=$.rest();if(!x){this.matches.add(Y,!0,!1);continue}else $=x}if(Y.isENOENT())continue;let z,G,V=!1;while(typeof(z=$.pattern())==="string"&&(G=$.rest()))Y=Y.resolve(z),$=G,V=!0;if(z=$.pattern(),G=$.rest(),V){if(this.hasWalkedCache.hasWalked(Y,$))continue;this.hasWalkedCache.storeWalked(Y,$)}if(typeof z==="string"){let x=z===".."||z===""||z===".";this.matches.add(Y.resolve(z),Q,x);continue}else if(z===S5){if(!Y.isSymbolicLink()||this.follow||$.checkFollowGlobstar())this.subwalks.add(Y,$);let x=G?.pattern(),H=G?.rest();if(!G||(x===""||x===".")&&!H)this.matches.add(Y,Q,x===""||x===".");else if(x===".."){let U=Y.parent||Y;if(!H)this.matches.add(U,Q,!0);else if(!this.hasWalkedCache.hasWalked(U,H))this.subwalks.add(U,H)}}else if(z instanceof RegExp)this.subwalks.add(Y,$)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new VC(this.opts,this.hasWalkedCache)}filterEntries(Z,X){let J=this.subwalks.get(Z),Y=this.child();for(let $ of X)for(let q of J){let Q=q.isAbsolute(),z=q.pattern(),G=q.rest();if(z===S5)Y.testGlobstar($,q,G,Q);else if(z instanceof RegExp)Y.testRegExp($,z,G,Q);else Y.testString($,z,G,Q)}return Y}testGlobstar(Z,X,J,Y){if(this.dot||!Z.name.startsWith(".")){if(!X.hasMore())this.matches.add(Z,Y,!1);if(Z.canReaddir()){if(this.follow||!Z.isSymbolicLink())this.subwalks.add(Z,X);else if(Z.isSymbolicLink()){if(J&&X.checkFollowGlobstar())this.subwalks.add(Z,J);else if(X.markFollowGlobstar())this.subwalks.add(Z,X)}}}if(J){let $=J.pattern();if(typeof $==="string"&&$!==".."&&$!==""&&$!==".")this.testString(Z,$,J.rest(),Y);else if($===".."){let q=Z.parent||Z;this.subwalks.add(q,J)}else if($ instanceof RegExp)this.testRegExp(Z,$,J.rest(),Y)}}testRegExp(Z,X,J,Y){if(!X.test(Z.name))return;if(!J)this.matches.add(Z,Y,!1);else this.subwalks.add(Z,J)}testString(Z,X,J,Y){if(!Z.isNamed(X))return;if(!J)this.matches.add(Z,Y,!1);else this.subwalks.add(Z,J)}}var fE0=(Z,X)=>typeof Z==="string"?new GC([Z],X):Array.isArray(Z)?new GC(Z,X):Z;class RE{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#Z=[];#J;#$;signal;maxDepth;includeChildMatches;constructor(Z,X,J){if(this.patterns=Z,this.path=X,this.opts=J,this.#$=!J.posix&&J.platform==="win32"?"\\":"/",this.includeChildMatches=J.includeChildMatches!==!1,J.ignore||!this.includeChildMatches){if(this.#J=fE0(J.ignore??[],J),!this.includeChildMatches&&typeof this.#J.add!=="function")throw new Error("cannot ignore child matches, ignore lacks add() method.")}if(this.maxDepth=J.maxDepth||1/0,J.signal)this.signal=J.signal,this.signal.addEventListener("abort",()=>{this.#Z.length=0})}#X(Z){return this.seen.has(Z)||!!this.#J?.ignored?.(Z)}#q(Z){return!!this.#J?.childrenIgnored?.(Z)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let Z=void 0;while(!this.paused&&(Z=this.#Z.shift()))Z()}onResume(Z){if(this.signal?.aborted)return;if(!this.paused)Z();else this.#Z.push(Z)}async matchCheck(Z,X){if(X&&this.opts.nodir)return;let J;if(this.opts.realpath){if(J=Z.realpathCached()||await Z.realpath(),!J)return;Z=J}let $=Z.isUnknown()||this.opts.stat?await Z.lstat():Z;if(this.opts.follow&&this.opts.nodir&&$?.isSymbolicLink()){let q=await $.realpath();if(q&&(q.isUnknown()||this.opts.stat))await q.lstat()}return this.matchCheckTest($,X)}matchCheckTest(Z,X){return Z&&(this.maxDepth===1/0||Z.depth()<=this.maxDepth)&&(!X||Z.canReaddir())&&(!this.opts.nodir||!Z.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!Z.isSymbolicLink()||!Z.realpathCached()?.isDirectory())&&!this.#X(Z)?Z:void 0}matchCheckSync(Z,X){if(X&&this.opts.nodir)return;let J;if(this.opts.realpath){if(J=Z.realpathCached()||Z.realpathSync(),!J)return;Z=J}let $=Z.isUnknown()||this.opts.stat?Z.lstatSync():Z;if(this.opts.follow&&this.opts.nodir&&$?.isSymbolicLink()){let q=$.realpathSync();if(q&&(q?.isUnknown()||this.opts.stat))q.lstatSync()}return this.matchCheckTest($,X)}matchFinish(Z,X){if(this.#X(Z))return;if(!this.includeChildMatches&&this.#J?.add){let $=`${Z.relativePosix()}/**`;this.#J.add($)}let J=this.opts.absolute===void 0?X:this.opts.absolute;this.seen.add(Z);let Y=this.opts.mark&&Z.isDirectory()?this.#$:"";if(this.opts.withFileTypes)this.matchEmit(Z);else if(J){let $=this.opts.posix?Z.fullpathPosix():Z.fullpath();this.matchEmit($+Y)}else{let $=this.opts.posix?Z.relativePosix():Z.relative(),q=this.opts.dotRelative&&!$.startsWith(".."+this.#$)?"."+this.#$:"";this.matchEmit(!$?"."+Y:q+$+Y)}}async match(Z,X,J){let Y=await this.matchCheck(Z,J);if(Y)this.matchFinish(Y,X)}matchSync(Z,X,J){let Y=this.matchCheckSync(Z,J);if(Y)this.matchFinish(Y,X)}walkCB(Z,X,J){if(this.signal?.aborted)J();this.walkCB2(Z,X,new VC(this.opts),J)}walkCB2(Z,X,J,Y){if(this.#q(Z))return Y();if(this.signal?.aborted)Y();if(this.paused){this.onResume(()=>this.walkCB2(Z,X,J,Y));return}J.processPatterns(Z,X);let $=1,q=()=>{if(--$===0)Y()};for(let[Q,z,G]of J.matches.entries()){if(this.#X(Q))continue;$++,this.match(Q,z,G).then(()=>q())}for(let Q of J.subwalkTargets()){if(this.maxDepth!==1/0&&Q.depth()>=this.maxDepth)continue;$++;let z=Q.readdirCached();if(Q.calledReaddir())this.walkCB3(Q,z,J,q);else Q.readdirCB((G,V)=>this.walkCB3(Q,V,J,q),!0)}q()}walkCB3(Z,X,J,Y){J=J.filterEntries(Z,X);let $=1,q=()=>{if(--$===0)Y()};for(let[Q,z,G]of J.matches.entries()){if(this.#X(Q))continue;$++,this.match(Q,z,G).then(()=>q())}for(let[Q,z]of J.subwalks.entries())$++,this.walkCB2(Q,z,J.child(),q);q()}walkCBSync(Z,X,J){if(this.signal?.aborted)J();this.walkCB2Sync(Z,X,new VC(this.opts),J)}walkCB2Sync(Z,X,J,Y){if(this.#q(Z))return Y();if(this.signal?.aborted)Y();if(this.paused){this.onResume(()=>this.walkCB2Sync(Z,X,J,Y));return}J.processPatterns(Z,X);let $=1,q=()=>{if(--$===0)Y()};for(let[Q,z,G]of J.matches.entries()){if(this.#X(Q))continue;this.matchSync(Q,z,G)}for(let Q of J.subwalkTargets()){if(this.maxDepth!==1/0&&Q.depth()>=this.maxDepth)continue;$++;let z=Q.readdirSync();this.walkCB3Sync(Q,z,J,q)}q()}walkCB3Sync(Z,X,J,Y){J=J.filterEntries(Z,X);let $=1,q=()=>{if(--$===0)Y()};for(let[Q,z,G]of J.matches.entries()){if(this.#X(Q))continue;this.matchSync(Q,z,G)}for(let[Q,z]of J.subwalks.entries())$++,this.walkCB2Sync(Q,z,J.child(),q);q()}}class VP extends RE{matches=new Set;constructor(Z,X,J){super(Z,X,J)}matchEmit(Z){this.matches.add(Z)}async walk(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown())await this.path.lstat();return await new Promise((Z,X)=>{this.walkCB(this.path,this.patterns,()=>{if(this.signal?.aborted)X(this.signal.reason);else Z(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown())this.path.lstatSync();return this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}}class WP extends RE{results;constructor(Z,X,J){super(Z,X,J);this.results=new Mx({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(Z){if(this.results.write(Z),!this.results.flowing)this.pause()}stream(){let Z=this.path;if(Z.isUnknown())Z.lstat().then(()=>{this.walkCB(Z,this.patterns,()=>this.results.end())});else this.walkCB(Z,this.patterns,()=>this.results.end());return this.results}streamSync(){if(this.path.isUnknown())this.path.lstatSync();return this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}var gE0=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class _q{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(Z,X){if(!X)throw new TypeError("glob options required");if(this.withFileTypes=!!X.withFileTypes,this.signal=X.signal,this.follow=!!X.follow,this.dot=!!X.dot,this.dotRelative=!!X.dotRelative,this.nodir=!!X.nodir,this.mark=!!X.mark,!X.cwd)this.cwd="";else if(X.cwd instanceof URL||X.cwd.startsWith("file://"))X.cwd=mE0(X.cwd);if(this.cwd=X.cwd||"",this.root=X.root,this.magicalBraces=!!X.magicalBraces,this.nobrace=!!X.nobrace,this.noext=!!X.noext,this.realpath=!!X.realpath,this.absolute=X.absolute,this.includeChildMatches=X.includeChildMatches!==!1,this.noglobstar=!!X.noglobstar,this.matchBase=!!X.matchBase,this.maxDepth=typeof X.maxDepth==="number"?X.maxDepth:1/0,this.stat=!!X.stat,this.ignore=X.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof Z==="string")Z=[Z];if(this.windowsPathsNoEscape=!!X.windowsPathsNoEscape||X.allowWindowsEscape===!1,this.windowsPathsNoEscape)Z=Z.map((z)=>z.replace(/\\/g,"/"));if(this.matchBase){if(X.noglobstar)throw new TypeError("base matching requires globstar");Z=Z.map((z)=>z.includes("/")?z:`./**/${z}`)}if(this.pattern=Z,this.platform=X.platform||gE0,this.opts={...X,platform:this.platform},X.scurry){if(this.scurry=X.scurry,X.nocase!==void 0&&X.nocase!==X.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let z=X.platform==="win32"?QC:X.platform==="darwin"?GP:X.platform?zC:qe;this.scurry=new z(this.cwd,{nocase:X.nocase,fs:X.fs})}this.nocase=this.scurry.nocase;let J=this.platform==="darwin"||this.platform==="win32",Y={...X,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:J,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},$=this.pattern.map((z)=>new AJ(z,Y)),[q,Q]=$.reduce((z,G)=>{return z[0].push(...G.set),z[1].push(...G.globParts),z},[[],[]]);this.patterns=q.map((z,G)=>{let V=Q[G];if(!V)throw new Error("invalid pattern object");return new cM(z,V,0,this.platform)})}async walk(){return[...await new VP(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 VP(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 WP(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 WP(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}var OE=(Z,X={})=>{if(!Array.isArray(Z))Z=[Z];for(let J of Z)if(new AJ(J,X).hasMagic())return!0;return!1};function BP(Z,X={}){return new _q(Z,X).streamSync()}function Ge(Z,X={}){return new _q(Z,X).stream()}function Ve(Z,X={}){return new _q(Z,X).walkSync()}async function ze(Z,X={}){return new _q(Z,X).walk()}function HP(Z,X={}){return new _q(Z,X).iterateSync()}function We(Z,X={}){return new _q(Z,X).iterate()}var hE0=BP,uE0=Object.assign(Ge,{sync:BP}),dE0=HP,pE0=Object.assign(We,{sync:HP}),cE0=Object.assign(Ve,{stream:BP,iterate:HP}),xP=Object.assign(ze,{glob:ze,globSync:Ve,sync:cE0,globStream:Ge,stream:uE0,globStreamSync:BP,streamSync:hE0,globIterate:We,iterate:pE0,globIterateSync:HP,iterateSync:dE0,Glob:_q,hasMagic:OE,escape:hM,unescape:J$});xP.glob=xP;var n40=S3(iE(),1);import xp0 from"fs";import Bp0 from"path";function MC(Z,X){return function J(){return Z.apply(X,arguments)}}var{toString:Eb0}=Object.prototype,{getPrototypeOf:PP}=Object,{iterator:vP,toStringTag:F10}=Symbol,TP=((Z)=>(X)=>{let J=Eb0.call(X);return Z[J]||(Z[J]=J.slice(8,-1).toLowerCase())})(Object.create(null)),K$=(Z)=>{return Z=Z.toLowerCase(),(X)=>TP(X)===Z},AP=(Z)=>(X)=>typeof X===Z,{isArray:rM}=Array,aM=AP("undefined");function UC(Z){return Z!==null&&!aM(Z)&&Z.constructor!==null&&!aM(Z.constructor)&&DZ(Z.constructor.isBuffer)&&Z.constructor.isBuffer(Z)}var D10=K$("ArrayBuffer");function kb0(Z){let X;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView)X=ArrayBuffer.isView(Z);else X=Z&&Z.buffer&&D10(Z.buffer);return X}var bb0=AP("string"),DZ=AP("function"),j10=AP("number"),FC=(Z)=>Z!==null&&typeof Z==="object",yb0=(Z)=>Z===!0||Z===!1,_P=(Z)=>{if(TP(Z)!=="object")return!1;let X=PP(Z);return(X===null||X===Object.prototype||Object.getPrototypeOf(X)===null)&&!(F10 in Z)&&!(vP in Z)},fb0=(Z)=>{if(!FC(Z)||UC(Z))return!1;try{return Object.keys(Z).length===0&&Object.getPrototypeOf(Z)===Object.prototype}catch(X){return!1}},mb0=K$("Date"),gb0=K$("File"),hb0=(Z)=>{return!!(Z&&typeof Z.uri!=="undefined")},ub0=(Z)=>Z&&typeof Z.getParts!=="undefined",db0=K$("Blob"),pb0=K$("FileList"),cb0=(Z)=>FC(Z)&&DZ(Z.pipe);function lb0(){if(typeof globalThis!=="undefined")return globalThis;if(typeof self!=="undefined")return self;if(typeof window!=="undefined")return window;if(typeof global!=="undefined")return global;return{}}var M10=lb0(),U10=typeof M10.FormData!=="undefined"?M10.FormData:void 0,ob0=(Z)=>{if(!Z)return!1;if(U10&&Z instanceof U10)return!0;let X=PP(Z);if(!X||X===Object.prototype)return!1;if(!DZ(Z.append))return!1;let J=TP(Z);return J==="formdata"||J==="object"&&DZ(Z.toString)&&Z.toString()==="[object FormData]"},ib0=K$("URLSearchParams"),[sb0,ab0,rb0,nb0]=["ReadableStream","Request","Response","Headers"].map(K$),tb0=(Z)=>{return Z.trim?Z.trim():Z.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function DC(Z,X,{allOwnKeys:J=!1}={}){if(Z===null||typeof Z==="undefined")return;let Y,$;if(typeof Z!=="object")Z=[Z];if(rM(Z))for(Y=0,$=Z.length;Y<$;Y++)X.call(null,Z[Y],Y,Z);else{if(UC(Z))return;let q=J?Object.getOwnPropertyNames(Z):Object.keys(Z),Q=q.length,z;for(Y=0;Y<Q;Y++)z=q[Y],X.call(null,Z[z],z,Z)}}function N10(Z,X){if(UC(Z))return null;X=X.toLowerCase();let J=Object.keys(Z),Y=J.length,$;while(Y-- >0)if($=J[Y],X===$.toLowerCase())return $;return null}var Dx=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})(),L10=(Z)=>!aM(Z)&&Z!==Dx;function sE(...Z){let{caseless:X,skipUndefined:J}=L10(this)&&this||{},Y={},$=(q,Q)=>{if(Q==="__proto__"||Q==="constructor"||Q==="prototype")return;let z=X&&N10(Y,Q)||Q,G=aE(Y,z)?Y[z]:void 0;if(_P(G)&&_P(q))Y[z]=sE(G,q);else if(_P(q))Y[z]=sE({},q);else if(rM(q))Y[z]=q.slice();else if(!J||!aM(q))Y[z]=q};for(let q=0,Q=Z.length;q<Q;q++)Z[q]&&DC(Z[q],$);return Y}var eb0=(Z,X,J,{allOwnKeys:Y}={})=>{return DC(X,($,q)=>{if(J&&DZ($))Object.defineProperty(Z,q,{__proto__:null,value:MC($,J),writable:!0,enumerable:!0,configurable:!0});else Object.defineProperty(Z,q,{__proto__:null,value:$,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:Y}),Z},Zy0=(Z)=>{if(Z.charCodeAt(0)===65279)Z=Z.slice(1);return Z},Xy0=(Z,X,J,Y)=>{Z.prototype=Object.create(X.prototype,Y),Object.defineProperty(Z.prototype,"constructor",{__proto__:null,value:Z,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(Z,"super",{__proto__:null,value:X.prototype}),J&&Object.assign(Z.prototype,J)},Jy0=(Z,X,J,Y)=>{let $,q,Q,z={};if(X=X||{},Z==null)return X;do{$=Object.getOwnPropertyNames(Z),q=$.length;while(q-- >0)if(Q=$[q],(!Y||Y(Q,Z,X))&&!z[Q])X[Q]=Z[Q],z[Q]=!0;Z=J!==!1&&PP(Z)}while(Z&&(!J||J(Z,X))&&Z!==Object.prototype);return X},Yy0=(Z,X,J)=>{if(Z=String(Z),J===void 0||J>Z.length)J=Z.length;J-=X.length;let Y=Z.indexOf(X,J);return Y!==-1&&Y===J},$y0=(Z)=>{if(!Z)return null;if(rM(Z))return Z;let X=Z.length;if(!j10(X))return null;let J=new Array(X);while(X-- >0)J[X]=Z[X];return J},qy0=((Z)=>{return(X)=>{return Z&&X instanceof Z}})(typeof Uint8Array!=="undefined"&&PP(Uint8Array)),Ky0=(Z,X)=>{let Y=(Z&&Z[vP]).call(Z),$;while(($=Y.next())&&!$.done){let q=$.value;X.call(Z,q[0],q[1])}},Qy0=(Z,X)=>{let J,Y=[];while((J=Z.exec(X))!==null)Y.push(J);return Y},zy0=K$("HTMLFormElement"),Gy0=(Z)=>{return Z.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function X(J,Y,$){return Y.toUpperCase()+$})},aE=(({hasOwnProperty:Z})=>(X,J)=>Z.call(X,J))(Object.prototype),Vy0=K$("RegExp"),C10=(Z,X)=>{let J=Object.getOwnPropertyDescriptors(Z),Y={};DC(J,($,q)=>{let Q;if((Q=X($,q,Z))!==!1)Y[q]=Q||$}),Object.defineProperties(Z,Y)},Wy0=(Z)=>{C10(Z,(X,J)=>{if(DZ(Z)&&["arguments","caller","callee"].includes(J))return!1;let Y=Z[J];if(!DZ(Y))return;if(X.enumerable=!1,"writable"in X){X.writable=!1;return}if(!X.set)X.set=()=>{throw Error("Can not rewrite read-only method '"+J+"'")}})},xy0=(Z,X)=>{let J={},Y=($)=>{$.forEach((q)=>{J[q]=!0})};return rM(Z)?Y(Z):Y(String(Z).split(X)),J},By0=()=>{},Hy0=(Z,X)=>{return Z!=null&&Number.isFinite(Z=+Z)?Z:X};function My0(Z){return!!(Z&&DZ(Z.append)&&Z[F10]==="FormData"&&Z[vP])}var Uy0=(Z)=>{let X=new Array(10),J=(Y,$)=>{if(FC(Y)){if(X.indexOf(Y)>=0)return;if(UC(Y))return Y;if(!("toJSON"in Y)){X[$]=Y;let q=rM(Y)?[]:{};return DC(Y,(Q,z)=>{let G=J(Q,$+1);!aM(G)&&(q[z]=G)}),X[$]=void 0,q}}return Y};return J(Z,0)},Fy0=K$("AsyncFunction"),Dy0=(Z)=>Z&&(FC(Z)||DZ(Z))&&DZ(Z.then)&&DZ(Z.catch),R10=((Z,X)=>{if(Z)return setImmediate;return X?((J,Y)=>{return Dx.addEventListener("message",({source:$,data:q})=>{if($===Dx&&q===J)Y.length&&Y.shift()()},!1),($)=>{Y.push($),Dx.postMessage(J,"*")}})(`axios@${Math.random()}`,[]):(J)=>setTimeout(J)})(typeof setImmediate==="function",DZ(Dx.postMessage)),jy0=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(Dx):typeof process!=="undefined"&&process.nextTick||R10,Ny0=(Z)=>Z!=null&&DZ(Z[vP]),E0={isArray:rM,isArrayBuffer:D10,isBuffer:UC,isFormData:ob0,isArrayBufferView:kb0,isString:bb0,isNumber:j10,isBoolean:yb0,isObject:FC,isPlainObject:_P,isEmptyObject:fb0,isReadableStream:sb0,isRequest:ab0,isResponse:rb0,isHeaders:nb0,isUndefined:aM,isDate:mb0,isFile:gb0,isReactNativeBlob:hb0,isReactNative:ub0,isBlob:db0,isRegExp:Vy0,isFunction:DZ,isStream:cb0,isURLSearchParams:ib0,isTypedArray:qy0,isFileList:pb0,forEach:DC,merge:sE,extend:eb0,trim:tb0,stripBOM:Zy0,inherits:Xy0,toFlatObject:Jy0,kindOf:TP,kindOfTest:K$,endsWith:Yy0,toArray:$y0,forEachEntry:Ky0,matchAll:Qy0,isHTMLForm:zy0,hasOwnProperty:aE,hasOwnProp:aE,reduceDescriptors:C10,freezeMethods:Wy0,toObjectSet:xy0,toCamelCase:Gy0,noop:By0,toFiniteNumber:Hy0,findKey:N10,global:Dx,isContextDefined:L10,isSpecCompliantForm:My0,toJSONObject:Uy0,isAsyncFn:Fy0,isThenable:Dy0,setImmediate:R10,asap:jy0,isIterable:Ny0};var Ly0=E0.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),O10=(Z)=>{let X={},J,Y,$;return Z&&Z.split(`
92
+ */Kv0.exports=function(Z,X){if(typeof Z!=="string")throw new TypeError("expected path to be a string");if(Z==="\\"||Z==="/")return"/";var J=Z.length;if(J<=1)return Z;var Y="";if(J>4&&Z[3]==="\\"){var $=Z[2];if(($==="?"||$===".")&&Z.slice(0,2)==="\\\\")Z=Z.slice(2),Y="//"}var q=Z.split(/[/\\]+/);if(X!==!1&&q[q.length-1]==="")q.pop();return Y+q.join("/")}});var xv0=Z1((Vv0,Wv0)=>{Object.defineProperty(Vv0,"__esModule",{value:!0});var Gv0=Rv(),$m1=jr(),Qv0="!",qm1={returnIndex:!1},Km1=(Z)=>Array.isArray(Z)?Z:[Z],Qm1=(Z,X)=>{if(typeof Z==="function")return Z;if(typeof Z==="string"){let J=Gv0(Z,X);return(Y)=>Z===Y||J(Y)}if(Z instanceof RegExp)return(J)=>Z.test(J);return(J)=>!1},zv0=(Z,X,J,Y)=>{let $=Array.isArray(J),q=$?J[0]:J;if(!$&&typeof q!=="string")throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(q));let Q=$m1(q,!1);for(let G=0;G<X.length;G++){let V=X[G];if(V(Q))return Y?-1:!1}let z=$&&[Q].concat(J.slice(1));for(let G=0;G<Z.length;G++){let V=Z[G];if($?V(...z):V(Q))return Y?G:!0}return Y?-1:!1},Nr=(Z,X,J=qm1)=>{if(Z==null)throw new TypeError("anymatch: specify first argument");let Y=typeof J==="boolean"?{returnIndex:J}:J,$=Y.returnIndex||!1,q=Km1(Z),Q=q.filter((G)=>typeof G==="string"&&G.charAt(0)===Qv0).map((G)=>G.slice(1)).map((G)=>Gv0(G,Y)),z=q.filter((G)=>typeof G!=="string"||typeof G==="string"&&G.charAt(0)!==Qv0).map((G)=>Qm1(G,Y));if(X==null)return(G,V=!1)=>{return zv0(z,Q,G,typeof V==="boolean"?V:!1)};return zv0(z,Q,X,$)};Nr.default=Nr;Wv0.exports=Nr});var Bv0=Z1((h62,zm1)=>{zm1.exports=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]});var Mv0=Z1((u62,Hv0)=>{var Gm1=s1("path"),Vm1=Bv0(),Wm1=new Set(Vm1);Hv0.exports=(Z)=>Wm1.has(Gm1.extname(Z).slice(1).toLowerCase())});var FS=Z1((Hm1)=>{var{sep:xm1}=s1("path"),{platform:Lr}=process,Bm1=s1("os");Hm1.EV_ALL="all";Hm1.EV_READY="ready";Hm1.EV_ADD="add";Hm1.EV_CHANGE="change";Hm1.EV_ADD_DIR="addDir";Hm1.EV_UNLINK="unlink";Hm1.EV_UNLINK_DIR="unlinkDir";Hm1.EV_RAW="raw";Hm1.EV_ERROR="error";Hm1.STR_DATA="data";Hm1.STR_END="end";Hm1.STR_CLOSE="close";Hm1.FSEVENT_CREATED="created";Hm1.FSEVENT_MODIFIED="modified";Hm1.FSEVENT_DELETED="deleted";Hm1.FSEVENT_MOVED="moved";Hm1.FSEVENT_CLONED="cloned";Hm1.FSEVENT_UNKNOWN="unknown";Hm1.FSEVENT_FLAG_MUST_SCAN_SUBDIRS=1;Hm1.FSEVENT_TYPE_FILE="file";Hm1.FSEVENT_TYPE_DIRECTORY="directory";Hm1.FSEVENT_TYPE_SYMLINK="symlink";Hm1.KEY_LISTENERS="listeners";Hm1.KEY_ERR="errHandlers";Hm1.KEY_RAW="rawEmitters";Hm1.HANDLER_KEYS=[Hm1.KEY_LISTENERS,Hm1.KEY_ERR,Hm1.KEY_RAW];Hm1.DOT_SLASH=`.${xm1}`;Hm1.BACK_SLASH_RE=/\\/g;Hm1.DOUBLE_SLASH_RE=/\/\//;Hm1.SLASH_OR_BACK_SLASH_RE=/[/\\]/;Hm1.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/;Hm1.REPLACER_RE=/^\.[/\\]/;Hm1.SLASH="/";Hm1.SLASH_SLASH="//";Hm1.BRACE_START="{";Hm1.BANG="!";Hm1.ONE_DOT=".";Hm1.TWO_DOTS="..";Hm1.STAR="*";Hm1.GLOBSTAR="**";Hm1.ROOT_GLOBSTAR="/**/*";Hm1.SLASH_GLOBSTAR="/**";Hm1.DIR_SUFFIX="Dir";Hm1.ANYMATCH_OPTS={dot:!0};Hm1.STRING_TYPE="string";Hm1.FUNCTION_TYPE="function";Hm1.EMPTY_STR="";Hm1.EMPTY_FN=()=>{};Hm1.IDENTITY_FN=(Z)=>Z;Hm1.isWindows=Lr==="win32";Hm1.isMacos=Lr==="darwin";Hm1.isLinux=Lr==="linux";Hm1.isIBMi=Bm1.type()==="OS400"});var _v0=Z1((p62,Ov0)=>{var Oz=s1("fs"),L9=s1("path"),{promisify:y_}=s1("util"),Wg1=Mv0(),{isWindows:xg1,isLinux:Bg1,EMPTY_FN:Hg1,EMPTY_STR:Mg1,KEY_LISTENERS:jD,KEY_ERR:Cr,KEY_RAW:E_,HANDLER_KEYS:Ug1,EV_CHANGE:jS,EV_ADD:DS,EV_ADD_DIR:Fg1,EV_ERROR:Nv0,STR_DATA:Dg1,STR_END:jg1,BRACE_START:Ng1,STAR:Lg1}=FS(),Cg1=y_(Oz.open),Lv0=y_(Oz.stat),Rg1=y_(Oz.lstat),Og1=y_(Oz.close),Rr=y_(Oz.realpath),_g1={lstat:Rg1,stat:Lv0},_r=(Z,X)=>{if(Z instanceof Set)Z.forEach(X);else X(Z)},k_=(Z,X,J)=>{let Y=Z[X];if(!(Y instanceof Set))Z[X]=Y=new Set([Y]);Y.add(J)},Pg1=(Z)=>(X)=>{let J=Z[X];if(J instanceof Set)J.clear();else delete Z[X]},b_=(Z,X,J)=>{let Y=Z[X];if(Y instanceof Set)Y.delete(J);else if(Y===J)delete Z[X]},Cv0=(Z)=>Z instanceof Set?Z.size===0:!Z,NS=new Map;function jv0(Z,X,J,Y,$){let q=(Q,z)=>{if(J(Z),$(Q,z,{watchedPath:Z}),z&&Z!==z)LS(L9.resolve(Z,z),jD,L9.join(Z,z))};try{return Oz.watch(Z,X,q)}catch(Q){Y(Q)}}var LS=(Z,X,J,Y,$)=>{let q=NS.get(Z);if(!q)return;_r(q[X],(Q)=>{Q(J,Y,$)})},vg1=(Z,X,J,Y)=>{let{listener:$,errHandler:q,rawEmitter:Q}=Y,z=NS.get(X),G;if(!J.persistent)return G=jv0(Z,J,$,q,Q),G.close.bind(G);if(z)k_(z,jD,$),k_(z,Cr,q),k_(z,E_,Q);else{if(G=jv0(Z,J,LS.bind(null,X,jD),q,LS.bind(null,X,E_)),!G)return;G.on(Nv0,async(V)=>{let x=LS.bind(null,X,Cr);if(z.watcherUnusable=!0,xg1&&V.code==="EPERM")try{let H=await Cg1(Z,"r");await Og1(H),x(V)}catch(H){}else x(V)}),z={listeners:$,errHandlers:q,rawEmitters:Q,watcher:G},NS.set(X,z)}return()=>{if(b_(z,jD,$),b_(z,Cr,q),b_(z,E_,Q),Cv0(z.listeners))z.watcher.close(),NS.delete(X),Ug1.forEach(Pg1(z)),z.watcher=void 0,Object.freeze(z)}},Or=new Map,Tg1=(Z,X,J,Y)=>{let{listener:$,rawEmitter:q}=Y,Q=Or.get(X),z=new Set,G=new Set,V=Q&&Q.options;if(V&&(V.persistent<J.persistent||V.interval>J.interval))z=Q.listeners,G=Q.rawEmitters,Oz.unwatchFile(X),Q=void 0;if(Q)k_(Q,jD,$),k_(Q,E_,q);else Q={listeners:$,rawEmitters:q,options:J,watcher:Oz.watchFile(X,J,(x,H)=>{_r(Q.rawEmitters,(F)=>{F(jS,X,{curr:x,prev:H})});let U=x.mtimeMs;if(x.size!==H.size||U>H.mtimeMs||U===0)_r(Q.listeners,(F)=>F(Z,x))})},Or.set(X,Q);return()=>{if(b_(Q,jD,$),b_(Q,E_,q),Cv0(Q.listeners))Or.delete(X),Oz.unwatchFile(X),Q.options=Q.watcher=void 0,Object.freeze(Q)}};class Rv0{constructor(Z){this.fsw=Z,this._boundHandleError=(X)=>Z._handleError(X)}_watchWithNodeFs(Z,X){let J=this.fsw.options,Y=L9.dirname(Z),$=L9.basename(Z);this.fsw._getWatchedDir(Y).add($);let Q=L9.resolve(Z),z={persistent:J.persistent};if(!X)X=Hg1;let G;if(J.usePolling)z.interval=J.enableBinaryInterval&&Wg1($)?J.binaryInterval:J.interval,G=Tg1(Z,Q,z,{listener:X,rawEmitter:this.fsw._emitRaw});else G=vg1(Z,Q,z,{listener:X,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return G}_handleFile(Z,X,J){if(this.fsw.closed)return;let Y=L9.dirname(Z),$=L9.basename(Z),q=this.fsw._getWatchedDir(Y),Q=X;if(q.has($))return;let z=async(V,x)=>{if(!this.fsw._throttle("watch",Z,5))return;if(!x||x.mtimeMs===0)try{let H=await Lv0(Z);if(this.fsw.closed)return;let{atimeMs:U,mtimeMs:F}=H;if(!U||U<=F||F!==Q.mtimeMs)this.fsw._emit(jS,Z,H);if(Bg1&&Q.ino!==H.ino)this.fsw._closeFile(V),Q=H,this.fsw._addPathCloser(V,this._watchWithNodeFs(Z,z));else Q=H}catch(H){this.fsw._remove(Y,$)}else if(q.has($)){let{atimeMs:H,mtimeMs:U}=x;if(!H||H<=U||U!==Q.mtimeMs)this.fsw._emit(jS,Z,x);Q=x}},G=this._watchWithNodeFs(Z,z);if(!(J&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(Z)){if(!this.fsw._throttle(DS,Z,0))return;this.fsw._emit(DS,Z,X)}return G}async _handleSymlink(Z,X,J,Y){if(this.fsw.closed)return;let $=Z.fullPath,q=this.fsw._getWatchedDir(X);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let Q;try{Q=await Rr(J)}catch(z){return this.fsw._emitReady(),!0}if(this.fsw.closed)return;if(q.has(Y)){if(this.fsw._symlinkPaths.get($)!==Q)this.fsw._symlinkPaths.set($,Q),this.fsw._emit(jS,J,Z.stats)}else q.add(Y),this.fsw._symlinkPaths.set($,Q),this.fsw._emit(DS,J,Z.stats);return this.fsw._emitReady(),!0}if(this.fsw._symlinkPaths.has($))return!0;this.fsw._symlinkPaths.set($,!0)}_handleRead(Z,X,J,Y,$,q,Q){if(Z=L9.join(Z,Mg1),!J.hasGlob){if(Q=this.fsw._throttle("readdir",Z,1000),!Q)return}let z=this.fsw._getWatchedDir(J.path),G=new Set,V=this.fsw._readdirp(Z,{fileFilter:(x)=>J.filterPath(x),directoryFilter:(x)=>J.filterDir(x),depth:0}).on(Dg1,async(x)=>{if(this.fsw.closed){V=void 0;return}let H=x.path,U=L9.join(Z,H);if(G.add(H),x.stats.isSymbolicLink()&&await this._handleSymlink(x,Z,U,H))return;if(this.fsw.closed){V=void 0;return}if(H===Y||!Y&&!z.has(H))this.fsw._incrReadyCount(),U=L9.join($,L9.relative($,U)),this._addToNodeFs(U,X,J,q+1)}).on(Nv0,this._boundHandleError);return new Promise((x)=>V.once(jg1,()=>{if(this.fsw.closed){V=void 0;return}let H=Q?Q.clear():!1;if(x(),z.getChildren().filter((U)=>{return U!==Z&&!G.has(U)&&(!J.hasGlob||J.filterPath({fullPath:L9.resolve(Z,U)}))}).forEach((U)=>{this.fsw._remove(Z,U)}),V=void 0,H)this._handleRead(Z,!1,J,Y,$,q,Q)}))}async _handleDir(Z,X,J,Y,$,q,Q){let z=this.fsw._getWatchedDir(L9.dirname(Z)),G=z.has(L9.basename(Z));if(!(J&&this.fsw.options.ignoreInitial)&&!$&&!G){if(!q.hasGlob||q.globFilter(Z))this.fsw._emit(Fg1,Z,X)}z.add(L9.basename(Z)),this.fsw._getWatchedDir(Z);let V,x,H=this.fsw.options.depth;if((H==null||Y<=H)&&!this.fsw._symlinkPaths.has(Q)){if(!$){if(await this._handleRead(Z,J,q,$,Z,Y,V),this.fsw.closed)return}x=this._watchWithNodeFs(Z,(U,F)=>{if(F&&F.mtimeMs===0)return;this._handleRead(U,!1,q,$,Z,Y,V)})}return x}async _addToNodeFs(Z,X,J,Y,$){let q=this.fsw._emitReady;if(this.fsw._isIgnored(Z)||this.fsw.closed)return q(),!1;let Q=this.fsw._getWatchHelpers(Z,Y);if(!Q.hasGlob&&J)Q.hasGlob=J.hasGlob,Q.globFilter=J.globFilter,Q.filterPath=(z)=>J.filterPath(z),Q.filterDir=(z)=>J.filterDir(z);try{let z=await _g1[Q.statMethod](Q.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(Q.watchPath,z))return q(),!1;let G=this.fsw.options.followSymlinks&&!Z.includes(Lg1)&&!Z.includes(Ng1),V;if(z.isDirectory()){let x=L9.resolve(Z),H=G?await Rr(Z):Z;if(this.fsw.closed)return;if(V=await this._handleDir(Q.watchPath,z,X,Y,$,Q,H),this.fsw.closed)return;if(x!==H&&H!==void 0)this.fsw._symlinkPaths.set(x,H)}else if(z.isSymbolicLink()){let x=G?await Rr(Z):Z;if(this.fsw.closed)return;let H=L9.dirname(Q.watchPath);if(this.fsw._getWatchedDir(H).add(Q.watchPath),this.fsw._emit(DS,Q.watchPath,z),V=await this._handleDir(H,z,X,Y,Z,Q,x),this.fsw.closed)return;if(x!==void 0)this.fsw._symlinkPaths.set(L9.resolve(Z),x)}else V=this._handleFile(Q.watchPath,z,X);return q(),this.fsw._addPathCloser(Z,V),!1}catch(z){if(this.fsw._handleError(z))return q(),Z}}}Ov0.exports=Rv0});var Ev0=Z1((c62,Sr)=>{var wr=s1("fs"),C9=s1("path"),{promisify:Ir}=s1("util"),ND;try{ND=(()=>{throw new Error("Cannot require module "+"fsevents");})()}catch(Z){if(process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR)console.error(Z)}if(ND){let Z=process.version.match(/v(\d+)\.(\d+)/);if(Z&&Z[1]&&Z[2]){let X=Number.parseInt(Z[1],10),J=Number.parseInt(Z[2],10);if(X===8&&J<16)ND=void 0}}var{EV_ADD:Pr,EV_CHANGE:Ag1,EV_ADD_DIR:Pv0,EV_UNLINK:CS,EV_ERROR:wg1,STR_DATA:Ig1,STR_END:Sg1,FSEVENT_CREATED:Eg1,FSEVENT_MODIFIED:kg1,FSEVENT_DELETED:bg1,FSEVENT_MOVED:yg1,FSEVENT_UNKNOWN:fg1,FSEVENT_FLAG_MUST_SCAN_SUBDIRS:mg1,FSEVENT_TYPE_FILE:gg1,FSEVENT_TYPE_DIRECTORY:f_,FSEVENT_TYPE_SYMLINK:Iv0,ROOT_GLOBSTAR:vv0,DIR_SUFFIX:hg1,DOT_SLASH:Tv0,FUNCTION_TYPE:vr,EMPTY_FN:ug1,IDENTITY_FN:dg1}=FS(),pg1=(Z)=>isNaN(Z)?{}:{depth:Z},Ar=Ir(wr.stat),cg1=Ir(wr.lstat),Av0=Ir(wr.realpath),lg1={stat:Ar,lstat:cg1},tB=new Map,og1=10,ig1=new Set([69888,70400,71424,72704,73472,131328,131840,262912]),sg1=(Z,X)=>{return{stop:ND.watch(Z,X)}};function ag1(Z,X,J,Y){let $=C9.extname(X)?C9.dirname(X):X,q=C9.dirname($),Q=tB.get($);if(rg1(q))$=q;let z=C9.resolve(Z),G=z!==X,V=(H,U,F)=>{if(G)H=H.replace(X,z);if(H===z||!H.indexOf(z+C9.sep))J(H,U,F)},x=!1;for(let H of tB.keys())if(X.indexOf(C9.resolve(H)+C9.sep)===0){$=H,Q=tB.get($),x=!0;break}if(Q||x)Q.listeners.add(V);else Q={listeners:new Set([V]),rawEmitter:Y,watcher:sg1($,(H,U)=>{if(!Q.listeners.size)return;if(U&mg1)return;let F=ND.getInfo(H,U);Q.listeners.forEach((N)=>{N(H,U,F)}),Q.rawEmitter(F.event,H,F)})},tB.set($,Q);return()=>{let H=Q.listeners;if(H.delete(V),!H.size){if(tB.delete($),Q.watcher)return Q.watcher.stop().then(()=>{Q.rawEmitter=Q.watcher=void 0,Object.freeze(Q)})}}}var rg1=(Z)=>{let X=0;for(let J of tB.keys())if(J.indexOf(Z)===0){if(X++,X>=og1)return!0}return!1},ng1=()=>ND&&tB.size<128,Tr=(Z,X)=>{let J=0;while(!Z.indexOf(X)&&(Z=C9.dirname(Z))!==X)J++;return J},wv0=(Z,X)=>Z.type===f_&&X.isDirectory()||Z.type===Iv0&&X.isSymbolicLink()||Z.type===gg1&&X.isFile();class Sv0{constructor(Z){this.fsw=Z}checkIgnored(Z,X){let J=this.fsw._ignoredPaths;if(this.fsw._isIgnored(Z,X)){if(J.add(Z),X&&X.isDirectory())J.add(Z+vv0);return!0}J.delete(Z),J.delete(Z+vv0)}addOrChange(Z,X,J,Y,$,q,Q,z){let G=$.has(q)?Ag1:Pr;this.handleEvent(G,Z,X,J,Y,$,q,Q,z)}async checkExists(Z,X,J,Y,$,q,Q,z){try{let G=await Ar(Z);if(this.fsw.closed)return;if(wv0(Q,G))this.addOrChange(Z,X,J,Y,$,q,Q,z);else this.handleEvent(CS,Z,X,J,Y,$,q,Q,z)}catch(G){if(G.code==="EACCES")this.addOrChange(Z,X,J,Y,$,q,Q,z);else this.handleEvent(CS,Z,X,J,Y,$,q,Q,z)}}handleEvent(Z,X,J,Y,$,q,Q,z,G){if(this.fsw.closed||this.checkIgnored(X))return;if(Z===CS){let V=z.type===f_;if(V||q.has(Q))this.fsw._remove($,Q,V)}else{if(Z===Pr){if(z.type===f_)this.fsw._getWatchedDir(X);if(z.type===Iv0&&G.followSymlinks){let x=G.depth===void 0?void 0:Tr(J,Y)+1;return this._addToFsEvents(X,!1,!0,x)}this.fsw._getWatchedDir($).add(Q)}let V=z.type===f_?Z+hg1:Z;if(this.fsw._emit(V,X),V===Pv0)this._addToFsEvents(X,!1,!0)}}_watchWithFsEvents(Z,X,J,Y){if(this.fsw.closed||this.fsw._isIgnored(Z))return;let $=this.fsw.options,Q=ag1(Z,X,async(z,G,V)=>{if(this.fsw.closed)return;if($.depth!==void 0&&Tr(z,X)>$.depth)return;let x=J(C9.join(Z,C9.relative(Z,z)));if(Y&&!Y(x))return;let H=C9.dirname(x),U=C9.basename(x),F=this.fsw._getWatchedDir(V.type===f_?x:H);if(ig1.has(G)||V.event===fg1)if(typeof $.ignored===vr){let N;try{N=await Ar(x)}catch(C){}if(this.fsw.closed)return;if(this.checkIgnored(x,N))return;if(wv0(V,N))this.addOrChange(x,z,X,H,F,U,V,$);else this.handleEvent(CS,x,z,X,H,F,U,V,$)}else this.checkExists(x,z,X,H,F,U,V,$);else switch(V.event){case Eg1:case kg1:return this.addOrChange(x,z,X,H,F,U,V,$);case bg1:case yg1:return this.checkExists(x,z,X,H,F,U,V,$)}},this.fsw._emitRaw);return this.fsw._emitReady(),Q}async _handleFsEventsSymlink(Z,X,J,Y){if(this.fsw.closed||this.fsw._symlinkPaths.has(X))return;this.fsw._symlinkPaths.set(X,!0),this.fsw._incrReadyCount();try{let $=await Av0(Z);if(this.fsw.closed)return;if(this.fsw._isIgnored($))return this.fsw._emitReady();this.fsw._incrReadyCount(),this._addToFsEvents($||Z,(q)=>{let Q=Z;if($&&$!==Tv0)Q=q.replace($,Z);else if(q!==Tv0)Q=C9.join(Z,q);return J(Q)},!1,Y)}catch($){if(this.fsw._handleError($))return this.fsw._emitReady()}}emitAdd(Z,X,J,Y,$){let q=J(Z),Q=X.isDirectory(),z=this.fsw._getWatchedDir(C9.dirname(q)),G=C9.basename(q);if(Q)this.fsw._getWatchedDir(q);if(z.has(G))return;if(z.add(G),!Y.ignoreInitial||$===!0)this.fsw._emit(Q?Pv0:Pr,q,X)}initWatch(Z,X,J,Y){if(this.fsw.closed)return;let $=this._watchWithFsEvents(J.watchPath,C9.resolve(Z||J.watchPath),Y,J.globFilter);this.fsw._addPathCloser(X,$)}async _addToFsEvents(Z,X,J,Y){if(this.fsw.closed)return;let $=this.fsw.options,q=typeof X===vr?X:dg1,Q=this.fsw._getWatchHelpers(Z);try{let z=await lg1[Q.statMethod](Q.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(Q.watchPath,z))throw null;if(z.isDirectory()){if(!Q.globFilter)this.emitAdd(q(Z),z,q,$,J);if(Y&&Y>$.depth)return;this.fsw._readdirp(Q.watchPath,{fileFilter:(G)=>Q.filterPath(G),directoryFilter:(G)=>Q.filterDir(G),...pg1($.depth-(Y||0))}).on(Ig1,(G)=>{if(this.fsw.closed)return;if(G.stats.isDirectory()&&!Q.filterPath(G))return;let V=C9.join(Q.watchPath,G.path),{fullPath:x}=G;if(Q.followSymlinks&&G.stats.isSymbolicLink()){let H=$.depth===void 0?void 0:Tr(V,C9.resolve(Q.watchPath))+1;this._handleFsEventsSymlink(V,x,q,H)}else this.emitAdd(V,G.stats,q,$,J)}).on(wg1,ug1).on(Sg1,()=>{this.fsw._emitReady()})}else this.emitAdd(Q.watchPath,z,q,$,J),this.fsw._emitReady()}catch(z){if(!z||this.fsw._handleError(z))this.fsw._emitReady(),this.fsw._emitReady()}if($.persistent&&J!==!0)if(typeof X===vr)this.initWatch(void 0,Z,Q,q);else{let z;try{z=await Av0(Q.watchPath)}catch(G){}this.initWatch(z,Z,Q,q)}}}Sr.exports=Sv0;Sr.exports.canUse=ng1});var ov0=Z1((Ah1)=>{var{EventEmitter:tg1}=s1("events"),pr=s1("fs"),i4=s1("path"),{promisify:hv0}=s1("util"),eg1=qv0(),mr=xv0().default,Zh1=pb(),Er=ub(),Xh1=rb(),Jh1=jr(),Yh1=_v0(),kv0=Ev0(),{EV_ALL:kr,EV_READY:$h1,EV_ADD:RS,EV_CHANGE:m_,EV_UNLINK:bv0,EV_ADD_DIR:qh1,EV_UNLINK_DIR:Kh1,EV_RAW:Qh1,EV_ERROR:br,STR_CLOSE:zh1,STR_END:Gh1,BACK_SLASH_RE:Vh1,DOUBLE_SLASH_RE:yv0,SLASH_OR_BACK_SLASH_RE:Wh1,DOT_RE:xh1,REPLACER_RE:Bh1,SLASH:yr,SLASH_SLASH:Hh1,BRACE_START:Mh1,BANG:gr,ONE_DOT:uv0,TWO_DOTS:Uh1,GLOBSTAR:Fh1,SLASH_GLOBSTAR:fr,ANYMATCH_OPTS:hr,STRING_TYPE:cr,FUNCTION_TYPE:Dh1,EMPTY_STR:ur,EMPTY_FN:jh1,isWindows:Nh1,isMacos:Lh1,isIBMi:Ch1}=FS(),Rh1=hv0(pr.stat),Oh1=hv0(pr.readdir),dr=(Z=[])=>Array.isArray(Z)?Z:[Z],dv0=(Z,X=[])=>{return Z.forEach((J)=>{if(Array.isArray(J))dv0(J,X);else X.push(J)}),X},fv0=(Z)=>{let X=dv0(dr(Z));if(!X.every((J)=>typeof J===cr))throw new TypeError(`Non-string provided as watch path: ${X}`);return X.map(pv0)},mv0=(Z)=>{let X=Z.replace(Vh1,yr),J=!1;if(X.startsWith(Hh1))J=!0;while(X.match(yv0))X=X.replace(yv0,yr);if(J)X=yr+X;return X},pv0=(Z)=>mv0(i4.normalize(mv0(Z))),gv0=(Z=ur)=>(X)=>{if(typeof X!==cr)return X;return pv0(i4.isAbsolute(X)?X:i4.join(Z,X))},_h1=(Z,X)=>{if(i4.isAbsolute(Z))return Z;if(Z.startsWith(gr))return gr+i4.join(X,Z.slice(1));return i4.join(X,Z)},c$=(Z,X)=>Z[X]===void 0;class cv0{constructor(Z,X){this.path=Z,this._removeWatcher=X,this.items=new Set}add(Z){let{items:X}=this;if(!X)return;if(Z!==uv0&&Z!==Uh1)X.add(Z)}async remove(Z){let{items:X}=this;if(!X)return;if(X.delete(Z),X.size>0)return;let J=this.path;try{await Oh1(J)}catch(Y){if(this._removeWatcher)this._removeWatcher(i4.dirname(J),i4.basename(J))}}has(Z){let{items:X}=this;if(!X)return;return X.has(Z)}getChildren(){let{items:Z}=this;if(!Z)return;return[...Z.values()]}dispose(){this.items.clear(),delete this.path,delete this._removeWatcher,delete this.items,Object.freeze(this)}}var Ph1="stat",vh1="lstat";class lv0{constructor(Z,X,J,Y){if(this.fsw=Y,this.path=Z=Z.replace(Bh1,ur),this.watchPath=X,this.fullWatchPath=i4.resolve(X),this.hasGlob=X!==Z,Z===ur)this.hasGlob=!1;this.globSymlink=this.hasGlob&&J?void 0:!1,this.globFilter=this.hasGlob?mr(Z,void 0,hr):!1,this.dirParts=this.getDirParts(Z),this.dirParts.forEach(($)=>{if($.length>1)$.pop()}),this.followSymlinks=J,this.statMethod=J?Ph1:vh1}checkGlobSymlink(Z){if(this.globSymlink===void 0)this.globSymlink=Z.fullParentDir===this.fullWatchPath?!1:{realPath:Z.fullParentDir,linkPath:this.fullWatchPath};if(this.globSymlink)return Z.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath);return Z.fullPath}entryPath(Z){return i4.join(this.watchPath,i4.relative(this.watchPath,this.checkGlobSymlink(Z)))}filterPath(Z){let{stats:X}=Z;if(X&&X.isSymbolicLink())return this.filterDir(Z);let J=this.entryPath(Z);return(this.hasGlob&&typeof this.globFilter===Dh1?this.globFilter(J):!0)&&this.fsw._isntIgnored(J,X)&&this.fsw._hasReadPermissions(X)}getDirParts(Z){if(!this.hasGlob)return[];let X=[];return(Z.includes(Mh1)?Xh1.expand(Z):[Z]).forEach((Y)=>{X.push(i4.relative(this.watchPath,Y).split(Wh1))}),X}filterDir(Z){if(this.hasGlob){let X=this.getDirParts(this.checkGlobSymlink(Z)),J=!1;this.unmatchedGlob=!this.dirParts.some((Y)=>{return Y.every(($,q)=>{if($===Fh1)J=!0;return J||!X[0][q]||mr($,X[0][q],hr)})})}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(Z),Z.stats)}}class lr extends tg1{constructor(Z){super();let X={};if(Z)Object.assign(X,Z);if(this._watched=new Map,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._symlinkPaths=new Map,this._streams=new Set,this.closed=!1,c$(X,"persistent"))X.persistent=!0;if(c$(X,"ignoreInitial"))X.ignoreInitial=!1;if(c$(X,"ignorePermissionErrors"))X.ignorePermissionErrors=!1;if(c$(X,"interval"))X.interval=100;if(c$(X,"binaryInterval"))X.binaryInterval=300;if(c$(X,"disableGlobbing"))X.disableGlobbing=!1;if(X.enableBinaryInterval=X.binaryInterval!==X.interval,c$(X,"useFsEvents"))X.useFsEvents=!X.usePolling;if(!kv0.canUse())X.useFsEvents=!1;if(c$(X,"usePolling")&&!X.useFsEvents)X.usePolling=Lh1;if(Ch1)X.usePolling=!0;let Y=process.env.CHOKIDAR_USEPOLLING;if(Y!==void 0){let z=Y.toLowerCase();if(z==="false"||z==="0")X.usePolling=!1;else if(z==="true"||z==="1")X.usePolling=!0;else X.usePolling=!!z}let $=process.env.CHOKIDAR_INTERVAL;if($)X.interval=Number.parseInt($,10);if(c$(X,"atomic"))X.atomic=!X.usePolling&&!X.useFsEvents;if(X.atomic)this._pendingUnlinks=new Map;if(c$(X,"followSymlinks"))X.followSymlinks=!0;if(c$(X,"awaitWriteFinish"))X.awaitWriteFinish=!1;if(X.awaitWriteFinish===!0)X.awaitWriteFinish={};let q=X.awaitWriteFinish;if(q){if(!q.stabilityThreshold)q.stabilityThreshold=2000;if(!q.pollInterval)q.pollInterval=100;this._pendingWrites=new Map}if(X.ignored)X.ignored=dr(X.ignored);let Q=0;if(this._emitReady=()=>{if(Q++,Q>=this._readyCount)this._emitReady=jh1,this._readyEmitted=!0,process.nextTick(()=>this.emit($h1))},this._emitRaw=(...z)=>this.emit(Qh1,...z),this._readyEmitted=!1,this.options=X,X.useFsEvents)this._fsEventsHandler=new kv0(this);else this._nodeFsHandler=new Yh1(this);Object.freeze(X)}add(Z,X,J){let{cwd:Y,disableGlobbing:$}=this.options;this.closed=!1;let q=fv0(Z);if(Y)q=q.map((Q)=>{let z=_h1(Q,Y);if($||!Er(Q))return z;return Jh1(z)});if(q=q.filter((Q)=>{if(Q.startsWith(gr))return this._ignoredPaths.add(Q.slice(1)),!1;return this._ignoredPaths.delete(Q),this._ignoredPaths.delete(Q+fr),this._userIgnored=void 0,!0}),this.options.useFsEvents&&this._fsEventsHandler){if(!this._readyCount)this._readyCount=q.length;if(this.options.persistent)this._readyCount+=q.length;q.forEach((Q)=>this._fsEventsHandler._addToFsEvents(Q))}else{if(!this._readyCount)this._readyCount=0;this._readyCount+=q.length,Promise.all(q.map(async(Q)=>{let z=await this._nodeFsHandler._addToNodeFs(Q,!J,0,0,X);if(z)this._emitReady();return z})).then((Q)=>{if(this.closed)return;Q.filter((z)=>z).forEach((z)=>{this.add(i4.dirname(z),i4.basename(X||z))})})}return this}unwatch(Z){if(this.closed)return this;let X=fv0(Z),{cwd:J}=this.options;return X.forEach((Y)=>{if(!i4.isAbsolute(Y)&&!this._closers.has(Y)){if(J)Y=i4.join(J,Y);Y=i4.resolve(Y)}if(this._closePath(Y),this._ignoredPaths.add(Y),this._watched.has(Y))this._ignoredPaths.add(Y+fr);this._userIgnored=void 0}),this}close(){if(this.closed)return this._closePromise;this.closed=!0,this.removeAllListeners();let Z=[];return this._closers.forEach((X)=>X.forEach((J)=>{let Y=J();if(Y instanceof Promise)Z.push(Y)})),this._streams.forEach((X)=>X.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach((X)=>X.dispose()),["closers","watched","streams","symlinkPaths","throttled"].forEach((X)=>{this[`_${X}`].clear()}),this._closePromise=Z.length?Promise.all(Z).then(()=>{return}):Promise.resolve(),this._closePromise}getWatched(){let Z={};return this._watched.forEach((X,J)=>{let Y=this.options.cwd?i4.relative(this.options.cwd,J):J;Z[Y||uv0]=X.getChildren().sort()}),Z}emitWithAll(Z,X){if(this.emit(...X),Z!==br)this.emit(kr,...X)}async _emit(Z,X,J,Y,$){if(this.closed)return;let q=this.options;if(Nh1)X=i4.normalize(X);if(q.cwd)X=i4.relative(q.cwd,X);let Q=[Z,X];if($!==void 0)Q.push(J,Y,$);else if(Y!==void 0)Q.push(J,Y);else if(J!==void 0)Q.push(J);let z=q.awaitWriteFinish,G;if(z&&(G=this._pendingWrites.get(X)))return G.lastChange=new Date,this;if(q.atomic){if(Z===bv0)return this._pendingUnlinks.set(X,Q),setTimeout(()=>{this._pendingUnlinks.forEach((V,x)=>{this.emit(...V),this.emit(kr,...V),this._pendingUnlinks.delete(x)})},typeof q.atomic==="number"?q.atomic:100),this;if(Z===RS&&this._pendingUnlinks.has(X))Z=Q[0]=m_,this._pendingUnlinks.delete(X)}if(z&&(Z===RS||Z===m_)&&this._readyEmitted){let V=(x,H)=>{if(x)Z=Q[0]=br,Q[1]=x,this.emitWithAll(Z,Q);else if(H){if(Q.length>2)Q[2]=H;else Q.push(H);this.emitWithAll(Z,Q)}};return this._awaitWriteFinish(X,z.stabilityThreshold,Z,V),this}if(Z===m_){if(!this._throttle(m_,X,50))return this}if(q.alwaysStat&&J===void 0&&(Z===RS||Z===qh1||Z===m_)){let V=q.cwd?i4.join(q.cwd,X):X,x;try{x=await Rh1(V)}catch(H){}if(!x||this.closed)return;Q.push(x)}return this.emitWithAll(Z,Q),this}_handleError(Z){let X=Z&&Z.code;if(Z&&X!=="ENOENT"&&X!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||X!=="EPERM"&&X!=="EACCES"))this.emit(br,Z);return Z||this.closed}_throttle(Z,X,J){if(!this._throttled.has(Z))this._throttled.set(Z,new Map);let Y=this._throttled.get(Z),$=Y.get(X);if($)return $.count++,!1;let q,Q=()=>{let G=Y.get(X),V=G?G.count:0;if(Y.delete(X),clearTimeout(q),G)clearTimeout(G.timeoutObject);return V};q=setTimeout(Q,J);let z={timeoutObject:q,clear:Q,count:0};return Y.set(X,z),z}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(Z,X,J,Y){let $,q=Z;if(this.options.cwd&&!i4.isAbsolute(Z))q=i4.join(this.options.cwd,Z);let Q=new Date,z=(G)=>{pr.stat(q,(V,x)=>{if(V||!this._pendingWrites.has(Z)){if(V&&V.code!=="ENOENT")Y(V);return}let H=Number(new Date);if(G&&x.size!==G.size)this._pendingWrites.get(Z).lastChange=H;let U=this._pendingWrites.get(Z);if(H-U.lastChange>=X)this._pendingWrites.delete(Z),Y(void 0,x);else $=setTimeout(z,this.options.awaitWriteFinish.pollInterval,x)})};if(!this._pendingWrites.has(Z))this._pendingWrites.set(Z,{lastChange:Q,cancelWait:()=>{return this._pendingWrites.delete(Z),clearTimeout($),J}}),$=setTimeout(z,this.options.awaitWriteFinish.pollInterval)}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(Z,X){if(this.options.atomic&&xh1.test(Z))return!0;if(!this._userIgnored){let{cwd:J}=this.options,Y=this.options.ignored,$=Y&&Y.map(gv0(J)),q=dr($).filter((z)=>typeof z===cr&&!Er(z)).map((z)=>z+fr),Q=this._getGlobIgnored().map(gv0(J)).concat($,q);this._userIgnored=mr(Q,void 0,hr)}return this._userIgnored([Z,X])}_isntIgnored(Z,X){return!this._isIgnored(Z,X)}_getWatchHelpers(Z,X){let J=X||this.options.disableGlobbing||!Er(Z)?Z:Zh1(Z),Y=this.options.followSymlinks;return new lv0(Z,J,Y,this)}_getWatchedDir(Z){if(!this._boundRemove)this._boundRemove=this._remove.bind(this);let X=i4.resolve(Z);if(!this._watched.has(X))this._watched.set(X,new cv0(X,this._boundRemove));return this._watched.get(X)}_hasReadPermissions(Z){if(this.options.ignorePermissionErrors)return!0;let J=(Z&&Number.parseInt(Z.mode,10))&511,Y=Number.parseInt(J.toString(8)[0],10);return Boolean(4&Y)}_remove(Z,X,J){let Y=i4.join(Z,X),$=i4.resolve(Y);if(J=J!=null?J:this._watched.has(Y)||this._watched.has($),!this._throttle("remove",Y,100))return;if(!J&&!this.options.useFsEvents&&this._watched.size===1)this.add(Z,X,!0);this._getWatchedDir(Y).getChildren().forEach((H)=>this._remove(Y,H));let z=this._getWatchedDir(Z),G=z.has(X);if(z.remove(X),this._symlinkPaths.has($))this._symlinkPaths.delete($);let V=Y;if(this.options.cwd)V=i4.relative(this.options.cwd,Y);if(this.options.awaitWriteFinish&&this._pendingWrites.has(V)){if(this._pendingWrites.get(V).cancelWait()===RS)return}this._watched.delete(Y),this._watched.delete($);let x=J?Kh1:bv0;if(G&&!this._isIgnored(Y))this._emit(x,Y);if(!this.options.useFsEvents)this._closePath(Y)}_closePath(Z){this._closeFile(Z);let X=i4.dirname(Z);this._getWatchedDir(X).remove(i4.basename(Z))}_closeFile(Z){let X=this._closers.get(Z);if(!X)return;X.forEach((J)=>J()),this._closers.delete(Z)}_addPathCloser(Z,X){if(!X)return;let J=this._closers.get(Z);if(!J)J=[],this._closers.set(Z,J);J.push(X)}_readdirp(Z,X){if(this.closed)return;let J={type:kr,alwaysStat:!0,lstat:!0,...X},Y=eg1(Z,J);return this._streams.add(Y),Y.once(zh1,()=>{Y=void 0}),Y.once(Gh1,()=>{if(Y)this._streams.delete(Y),Y=void 0}),Y}}Ah1.FSWatcher=lr;var Th1=(Z,X)=>{let J=new lr(X);return J.add(Z),J};Ah1.watch=Th1});var $T0=Z1((o62,PS)=>{function av0(Z){return Array.isArray(Z)?Z:[Z]}var Sh1=void 0,ir="",iv0=" ",or="\\",Eh1=/^\s+$/,kh1=/(?:[^\\]|^)\\$/,bh1=/^\\!/,yh1=/^\\#/,fh1=/\r?\n/g,mh1=/^\.{0,2}\/|^\.{1,2}$/,gh1=/\/$/,LD="/",rv0="node-ignore";if(typeof Symbol!=="undefined")rv0=Symbol.for("node-ignore");var nv0=rv0,CD=(Z,X,J)=>{return Object.defineProperty(Z,X,{value:J}),J},hh1=/([0-z])-([0-z])/g,tv0=()=>!1,uh1=(Z)=>Z.replace(hh1,(X,J,Y)=>J.charCodeAt(0)<=Y.charCodeAt(0)?X:ir),dh1=(Z)=>{let{length:X}=Z;return Z.slice(0,X-X%2)},ph1=[[/^\uFEFF/,()=>ir],[/((?:\\\\)*?)(\\?\s+)$/,(Z,X,J)=>X+(J.indexOf("\\")===0?iv0:ir)],[/(\\+?)\s/g,(Z,X)=>{let{length:J}=X;return X.slice(0,J-J%2)+iv0}],[/[\\$.|*+(){^]/g,(Z)=>`\\${Z}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function Z(){return!/\/(?!$)/.test(this)?"(?:^|\\/)":"^"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(Z,X,J)=>X+6<J.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(Z,X,J)=>{let Y=J.replace(/\\\*/g,"[^\\/]*");return X+Y}],[/\\\\\\(?=[$.|*+(){^])/g,()=>or],[/\\\\/g,()=>or],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(Z,X,J,Y,$)=>X===or?`\\[${J}${dh1(Y)}${$}`:$==="]"?Y.length%2===0?`[${uh1(J)}${Y}]`:"[]":"[]"],[/(?:[^*])$/,(Z)=>/\/$/.test(Z)?`${Z}$`:`${Z}(?=$|\\/$)`]],ch1=/(^|\\\/)?\\\*$/,g_="regex",OS="checkRegex",sv0="_",lh1={[g_](Z,X){return`${X?`${X}[^/]+`:"[^/]*"}(?=$|\\/$)`},[OS](Z,X){return`${X?`${X}[^/]*`:"[^/]*"}(?=$|\\/$)`}},oh1=(Z)=>ph1.reduce((X,[J,Y])=>X.replace(J,Y.bind(Z)),Z),_S=(Z)=>typeof Z==="string",ih1=(Z)=>Z&&_S(Z)&&!Eh1.test(Z)&&!kh1.test(Z)&&Z.indexOf("#")!==0,sh1=(Z)=>Z.split(fh1).filter(Boolean);class ev0{constructor(Z,X,J,Y,$,q){this.pattern=Z,this.mark=X,this.negative=$,CD(this,"body",J),CD(this,"ignoreCase",Y),CD(this,"regexPrefix",q)}get regex(){let Z=sv0+g_;if(this[Z])return this[Z];return this._make(g_,Z)}get checkRegex(){let Z=sv0+OS;if(this[Z])return this[Z];return this._make(OS,Z)}_make(Z,X){let J=this.regexPrefix.replace(ch1,lh1[Z]),Y=this.ignoreCase?new RegExp(J,"i"):new RegExp(J);return CD(this,X,Y)}}var ah1=({pattern:Z,mark:X},J)=>{let Y=!1,$=Z;if($.indexOf("!")===0)Y=!0,$=$.substr(1);$=$.replace(bh1,"!").replace(yh1,"#");let q=oh1($);return new ev0(Z,X,$,J,Y,q)};class ZT0{constructor(Z){this._ignoreCase=Z,this._rules=[]}_add(Z){if(Z&&Z[nv0]){this._rules=this._rules.concat(Z._rules._rules),this._added=!0;return}if(_S(Z))Z={pattern:Z};if(ih1(Z.pattern)){let X=ah1(Z,this._ignoreCase);this._added=!0,this._rules.push(X)}}add(Z){return this._added=!1,av0(_S(Z)?sh1(Z):Z).forEach(this._add,this),this._added}test(Z,X,J){let Y=!1,$=!1,q;this._rules.forEach((z)=>{let{negative:G}=z;if($===G&&Y!==$||G&&!Y&&!$&&!X)return;if(!z[J].test(Z))return;Y=!G,$=G,q=G?Sh1:z});let Q={ignored:Y,unignored:$};if(q)Q.rule=q;return Q}}var rh1=(Z,X)=>{throw new X(Z)},_z=(Z,X,J)=>{if(!_S(Z))return J(`path must be a string, but got \`${X}\``,TypeError);if(!Z)return J("path must not be empty",TypeError);if(_z.isNotRelative(Z))return J(`path should be a \`path.relative()\`d string, but got "${X}"`,RangeError);return!0},XT0=(Z)=>mh1.test(Z);_z.isNotRelative=XT0;_z.convert=(Z)=>Z;class JT0{constructor({ignorecase:Z=!0,ignoreCase:X=Z,allowRelativePaths:J=!1}={}){CD(this,nv0,!0),this._rules=new ZT0(X),this._strictPathCheck=!J,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(Z){if(this._rules.add(Z))this._initCache();return this}addPattern(Z){return this.add(Z)}_test(Z,X,J,Y){let $=Z&&_z.convert(Z);return _z($,Z,this._strictPathCheck?rh1:tv0),this._t($,X,J,Y)}checkIgnore(Z){if(!gh1.test(Z))return this.test(Z);let X=Z.split(LD).filter(Boolean);if(X.pop(),X.length){let J=this._t(X.join(LD)+LD,this._testCache,!0,X);if(J.ignored)return J}return this._rules.test(Z,!1,OS)}_t(Z,X,J,Y){if(Z in X)return X[Z];if(!Y)Y=Z.split(LD).filter(Boolean);if(Y.pop(),!Y.length)return X[Z]=this._rules.test(Z,J,g_);let $=this._t(Y.join(LD)+LD,X,J,Y);return X[Z]=$.ignored?$:this._rules.test(Z,J,g_)}ignores(Z){return this._test(Z,this._ignoreCache,!1).ignored}createFilter(){return(Z)=>!this.ignores(Z)}filter(Z){return av0(Z).filter(this.createFilter())}test(Z){return this._test(Z,this._testCache,!0)}}var sr=(Z)=>new JT0(Z),nh1=(Z)=>_z(Z&&_z.convert(Z),Z,tv0),YT0=()=>{let Z=(J)=>/^\\\\\?\\/.test(J)||/["<>|\u0000-\u001F]+/u.test(J)?J:J.replace(/\\/g,"/");_z.convert=Z;let X=/^[a-z]:\//i;_z.isNotRelative=(J)=>X.test(J)||XT0(J)};if(typeof process!=="undefined"&&process.platform==="win32")YT0();PS.exports=sr;sr.default=sr;PS.exports.isPathValid=nh1;CD(PS.exports,Symbol.for("setupWindows"),YT0)});var GT0=Z1(($J)=>{var Xu1=$J&&$J.__importDefault||function(Z){return Z&&Z.__esModule?Z:{default:Z}};Object.defineProperty($J,"__esModule",{value:!0});var Ju1=s1("fs"),Yu1=Xu1(mP()),RD=Yu1.default("@kwsites/file-exists");function $u1(Z,X,J){RD("checking %s",Z);try{let Y=Ju1.statSync(Z);if(Y.isFile()&&X)return RD("[OK] path represents a file"),!0;if(Y.isDirectory()&&J)return RD("[OK] path represents a directory"),!0;return RD("[FAIL] path represents something other than a file or directory"),!1}catch(Y){if(Y.code==="ENOENT")return RD("[FAIL] path is not accessible: %o",Y),!1;throw RD("[FATAL] %o",Y),Y}}function qu1(Z,X=$J.READABLE){return $u1(Z,(X&$J.FILE)>0,(X&$J.FOLDER)>0)}$J.exists=qu1;$J.FILE=1;$J.FOLDER=2;$J.READABLE=$J.FILE+$J.FOLDER});var VT0=Z1((nr)=>{function Ku1(Z){for(var X in Z)if(!nr.hasOwnProperty(X))nr[X]=Z[X]}Object.defineProperty(nr,"__esModule",{value:!0});Ku1(GT0())});var Zn=Z1((WT0)=>{Object.defineProperty(WT0,"__esModule",{value:!0});WT0.createDeferred=WT0.deferred=void 0;function er(){let Z,X,J="pending";return{promise:new Promise(($,q)=>{Z=$,X=q}),done($){if(J==="pending")J="resolved",Z($)},fail($){if(J==="pending")J="rejected",X($)},get fulfilled(){return J!=="pending"},get status(){return J}}}WT0.deferred=er;WT0.createDeferred=er;WT0.default=er});var rn="2.1.11";var Mt=S3(Ht(),1),{program:Rl1,createCommand:Ol1,createArgument:_l1,createOption:Pl1,CommanderError:vl1,InvalidArgumentError:DQ,InvalidOptionArgumentError:Tl1,Command:r9,Argument:Al1,Option:Ut,Help:wl1}=Mt.default;import X60 from"fs";var $E=(Z,X,J)=>{let Y=Z instanceof RegExp?Ft(Z,J):Z,$=X instanceof RegExp?Ft(X,J):X,q=Y!==null&&$!=null&&JS0(Y,$,J);return q&&{start:q[0],end:q[1],pre:J.slice(0,q[0]),body:J.slice(q[0]+Y.length,q[1]),post:J.slice(q[1]+$.length)}},Ft=(Z,X)=>{let J=X.match(Z);return J?J[0]:null},JS0=(Z,X,J)=>{let Y,$,q,Q=void 0,z,G=J.indexOf(Z),V=J.indexOf(X,G+1),x=G;if(G>=0&&V>0){if(Z===X)return[G,V];Y=[],q=J.length;while(x>=0&&!z){if(x===G)Y.push(x),G=J.indexOf(Z,x+1);else if(Y.length===1){let H=Y.pop();if(H!==void 0)z=[H,V]}else{if($=Y.pop(),$!==void 0&&$<q)q=$,Q=V;V=J.indexOf(X,x+1)}x=G<V&&G>=0?G:V}if(Y.length&&Q!==void 0)z=[q,Q]}return z};var Dt="\x00SLASH"+Math.random()+"\x00",jt="\x00OPEN"+Math.random()+"\x00",KE="\x00CLOSE"+Math.random()+"\x00",Nt="\x00COMMA"+Math.random()+"\x00",Lt="\x00PERIOD"+Math.random()+"\x00",YS0=new RegExp(Dt,"g"),$S0=new RegExp(jt,"g"),qS0=new RegExp(KE,"g"),KS0=new RegExp(Nt,"g"),QS0=new RegExp(Lt,"g"),zS0=/\\\\/g,GS0=/\\{/g,VS0=/\\}/g,WS0=/\\,/g,xS0=/\\\./g,BS0=1e5;function qE(Z){return!isNaN(Z)?parseInt(Z,10):Z.charCodeAt(0)}function HS0(Z){return Z.replace(zS0,Dt).replace(GS0,jt).replace(VS0,KE).replace(WS0,Nt).replace(xS0,Lt)}function MS0(Z){return Z.replace(YS0,"\\").replace($S0,"{").replace(qS0,"}").replace(KS0,",").replace(QS0,".")}function Ct(Z){if(!Z)return[""];let X=[],J=$E("{","}",Z);if(!J)return Z.split(",");let{pre:Y,body:$,post:q}=J,Q=Y.split(",");Q[Q.length-1]+="{"+$+"}";let z=Ct(q);if(q.length)Q[Q.length-1]+=z.shift(),Q.push.apply(Q,z);return X.push.apply(X,Q),X}function Rt(Z,X={}){if(!Z)return[];let{max:J=BS0}=X;if(Z.slice(0,2)==="{}")Z="\\{\\}"+Z.slice(2);return aL(HS0(Z),J,!0).map(MS0)}function US0(Z){return"{"+Z+"}"}function FS0(Z){return/^-?0\d/.test(Z)}function DS0(Z,X){return Z<=X}function jS0(Z,X){return Z>=X}function aL(Z,X,J){let Y=[],$=$E("{","}",Z);if(!$)return[Z];let q=$.pre,Q=$.post.length?aL($.post,X,!1):[""];if(/\$$/.test($.pre))for(let z=0;z<Q.length&&z<X;z++){let G=q+"{"+$.body+"}"+Q[z];Y.push(G)}else{let z=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test($.body),G=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test($.body),V=z||G,x=$.body.indexOf(",")>=0;if(!V&&!x){if($.post.match(/,(?!,).*\}/))return Z=$.pre+"{"+$.body+KE+$.post,aL(Z,X,!0);return[Z]}let H;if(V)H=$.body.split(/\.\./);else if(H=Ct($.body),H.length===1&&H[0]!==void 0){if(H=aL(H[0],X,!1).map(US0),H.length===1)return Q.map((F)=>$.pre+H[0]+F)}let U;if(V&&H[0]!==void 0&&H[1]!==void 0){let F=qE(H[0]),N=qE(H[1]),C=Math.max(H[0].length,H[1].length),_=H.length===3&&H[2]!==void 0?Math.max(Math.abs(qE(H[2])),1):1,R=DS0;if(N<F)_*=-1,R=jS0;let A=H.some(FS0);U=[];for(let v=F;R(v,N);v+=_){let E;if(G){if(E=String.fromCharCode(v),E==="\\")E=""}else if(E=String(v),A){let k=C-E.length;if(k>0){let y=new Array(k+1).join("0");if(v<0)E="-"+y+E.slice(1);else E=y+E}}U.push(E)}}else{U=[];for(let F=0;F<H.length;F++)U.push.apply(U,aL(H[F],X,!1))}for(let F=0;F<U.length;F++)for(let N=0;N<Q.length&&Y.length<X;N++){let C=q+U[F]+Q[N];if(!J||V||C)Y.push(C)}}return Y}var rL=(Z)=>{if(typeof Z!=="string")throw new TypeError("invalid pattern");if(Z.length>65536)throw new TypeError("pattern is too long")};var NS0={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},nL=(Z)=>Z.replace(/[[\]\\-]/g,"\\$&"),LS0=(Z)=>Z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ot=(Z)=>Z.join(""),_t=(Z,X)=>{let J=X;if(Z.charAt(J)!=="[")throw new Error("not in a brace expression");let Y=[],$=[],q=J+1,Q=!1,z=!1,G=!1,V=!1,x=J,H="";Z:while(q<Z.length){let C=Z.charAt(q);if((C==="!"||C==="^")&&q===J+1){V=!0,q++;continue}if(C==="]"&&Q&&!G){x=q+1;break}if(Q=!0,C==="\\"){if(!G){G=!0,q++;continue}}if(C==="["&&!G){for(let[_,[R,P,A]]of Object.entries(NS0))if(Z.startsWith(_,q)){if(H)return["$.",!1,Z.length-J,!0];if(q+=_.length,A)$.push(R);else Y.push(R);z=z||P;continue Z}}if(G=!1,H){if(C>H)Y.push(nL(H)+"-"+nL(C));else if(C===H)Y.push(nL(C));H="",q++;continue}if(Z.startsWith("-]",q+1)){Y.push(nL(C+"-")),q+=2;continue}if(Z.startsWith("-",q+1)){H=C,q+=2;continue}Y.push(nL(C)),q++}if(x<q)return["",!1,0,!1];if(!Y.length&&!$.length)return["$.",!1,Z.length-J,!0];if($.length===0&&Y.length===1&&/^\\?.$/.test(Y[0])&&!V){let C=Y[0].length===2?Y[0].slice(-1):Y[0];return[LS0(C),!1,x-J,!1]}let U="["+(V?"^":"")+Ot(Y)+"]",F="["+(V?"":"^")+Ot($)+"]";return[Y.length&&$.length?"("+U+"|"+F+")":Y.length?U:F,z,x-J,!0]};var J$=(Z,{windowsPathsNoEscape:X=!1,magicalBraces:J=!0}={})=>{if(J)return X?Z.replace(/\[([^/\\])\]/g,"$1"):Z.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1");return X?Z.replace(/\[([^/\\{}])\]/g,"$1"):Z.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1")};var FZ,CS0=new Set(["!","?","+","*","@"]),QE=(Z)=>CS0.has(Z),Pt=(Z)=>QE(Z.type),RS0=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),OS0=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),_S0=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),vt=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),PS0="(?!(?:^|/)\\.\\.?(?:$|/))",n_="(?!\\.)",vS0=new Set(["[","."]),TS0=new Set(["..","."]),AS0=new Set("().*{}+?[]^$\\!"),wS0=(Z)=>Z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),zE="[^/]",Tt=zE+"*?",At=zE+"+?",IS0=0;class gM{type;#Z;#J;#$=!1;#X=[];#q;#G;#M;#W=!1;#Q;#B;#x=!1;id=++IS0;get depth(){return(this.#q?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#Z.id,parent:this.#q?.id,depth:this.depth,partsLength:this.#X.length,parts:this.#X}}constructor(Z,X,J={}){if(this.type=Z,Z)this.#J=!0;if(this.#q=X,this.#Z=this.#q?this.#q.#Z:this,this.#Q=this.#Z===this?J:this.#Z.#Q,this.#M=this.#Z===this?[]:this.#Z.#M,Z==="!"&&!this.#Z.#W)this.#M.push(this);this.#G=this.#q?this.#q.#X.length:0}get hasMagic(){if(this.#J!==void 0)return this.#J;for(let Z of this.#X){if(typeof Z==="string")continue;if(Z.type||Z.hasMagic)return this.#J=!0}return this.#J}toString(){return this.#B!==void 0?this.#B:!this.type?this.#B=this.#X.map((Z)=>String(Z)).join(""):this.#B=this.type+"("+this.#X.map((Z)=>String(Z)).join("|")+")"}#z(){if(this!==this.#Z)throw new Error("should only call on root");if(this.#W)return this;this.toString(),this.#W=!0;let Z;while(Z=this.#M.pop()){if(Z.type!=="!")continue;let X=Z,J=X.#q;while(J){for(let Y=X.#G+1;!J.type&&Y<J.#X.length;Y++)for(let $ of Z.#X){if(typeof $==="string")throw new Error("string part in extglob AST??");$.copyIn(J.#X[Y])}X=J,J=X.#q}}return this}push(...Z){for(let X of Z){if(X==="")continue;if(typeof X!=="string"&&!(X instanceof FZ&&X.#q===this))throw new Error("invalid part: "+X);this.#X.push(X)}}toJSON(){let Z=this.type===null?this.#X.slice().map((X)=>typeof X==="string"?X:X.toJSON()):[this.type,...this.#X.map((X)=>X.toJSON())];if(this.isStart()&&!this.type)Z.unshift([]);if(this.isEnd()&&(this===this.#Z||this.#Z.#W&&this.#q?.type==="!"))Z.push({});return Z}isStart(){if(this.#Z===this)return!0;if(!this.#q?.isStart())return!1;if(this.#G===0)return!0;let Z=this.#q;for(let X=0;X<this.#G;X++){let J=Z.#X[X];if(!(J instanceof FZ&&J.type==="!"))return!1}return!0}isEnd(){if(this.#Z===this)return!0;if(this.#q?.type==="!")return!0;if(!this.#q?.isEnd())return!1;if(!this.type)return this.#q?.isEnd();let Z=this.#q?this.#q.#X.length:0;return this.#G===Z-1}copyIn(Z){if(typeof Z==="string")this.push(Z);else this.push(Z.clone(this))}clone(Z){let X=new FZ(this.type,Z);for(let J of this.#X)X.copyIn(J);return X}static#K(Z,X,J,Y,$){let q=Y.maxExtglobRecursion??2,Q=!1,z=!1,G=-1,V=!1;if(X.type===null){let N=J,C="";while(N<Z.length){let _=Z.charAt(N++);if(Q||_==="\\"){Q=!Q,C+=_;continue}if(z){if(N===G+1){if(_==="^"||_==="!")V=!0}else if(_==="]"&&!(N===G+2&&V))z=!1;C+=_;continue}else if(_==="["){z=!0,G=N,V=!1,C+=_;continue}if(!Y.noext&&QE(_)&&Z.charAt(N)==="("&&$<=q){X.push(C),C="";let P=new FZ(_,X);N=FZ.#K(Z,P,N,Y,$+1),X.push(P);continue}C+=_}return X.push(C),N}let x=J+1,H=new FZ(null,X),U=[],F="";while(x<Z.length){let N=Z.charAt(x++);if(Q||N==="\\"){Q=!Q,F+=N;continue}if(z){if(x===G+1){if(N==="^"||N==="!")V=!0}else if(N==="]"&&!(x===G+2&&V))z=!1;F+=N;continue}else if(N==="["){z=!0,G=x,V=!1,F+=N;continue}if(!Y.noext&&QE(N)&&Z.charAt(x)==="("&&($<=q||X&&X.#U(N))){let _=X&&X.#U(N)?0:1;H.push(F),F="";let R=new FZ(N,H);H.push(R),x=FZ.#K(Z,R,x,Y,$+_);continue}if(N==="|"){H.push(F),F="",U.push(H),H=new FZ(null,X);continue}if(N===")"){if(F===""&&X.#X.length===0)X.#x=!0;return H.push(F),F="",X.push(...U,H),x}F+=N}return X.type=null,X.#J=void 0,X.#X=[Z.substring(J-1)],x}#N(Z){return this.#C(Z,OS0)}#C(Z,X=RS0){if(!Z||typeof Z!=="object"||Z.type!==null||Z.#X.length!==1||this.type===null)return!1;let J=Z.#X[0];if(!J||typeof J!=="object"||J.type===null)return!1;return this.#U(J.type,X)}#U(Z,X=_S0){return!!X.get(this.type)?.includes(Z)}#F(Z,X){let J=Z.#X[0],Y=new FZ(null,J,this.options);Y.#X.push(""),J.push(Y),this.#P(Z,X)}#P(Z,X){let J=Z.#X[0];this.#X.splice(X,1,...J.#X);for(let Y of J.#X)if(typeof Y==="object")Y.#q=this;this.#B=void 0}#D(Z){return!!vt.get(this.type)?.has(Z)}#R(Z){if(!Z||typeof Z!=="object"||Z.type!==null||Z.#X.length!==1||this.type===null||this.#X.length!==1)return!1;let X=Z.#X[0];if(!X||typeof X!=="object"||X.type===null)return!1;return this.#D(X.type)}#O(Z){let X=vt.get(this.type),J=Z.#X[0],Y=X?.get(J.type);if(!Y)return!1;this.#X=J.#X;for(let $ of this.#X)if(typeof $==="object")$.#q=this;this.type=Y,this.#B=void 0,this.#x=!1}static fromGlob(Z,X={}){let J=new FZ(null,void 0,X);return FZ.#K(Z,J,0,X,0),J}toMMPattern(){if(this!==this.#Z)return this.#Z.toMMPattern();let Z=this.toString(),[X,J,Y,$]=this.toRegExpSource();if(!(Y||this.#J||this.#Q.nocase&&!this.#Q.nocaseMagicOnly&&Z.toUpperCase()!==Z.toLowerCase()))return J;let Q=(this.#Q.nocase?"i":"")+($?"u":"");return Object.assign(new RegExp(`^${X}$`,Q),{_src:X,_glob:Z})}get options(){return this.#Q}toRegExpSource(Z){let X=Z??!!this.#Q.dot;if(this.#Z===this)this.#H(),this.#z();if(!Pt(this)){let z=this.isStart()&&this.isEnd()&&!this.#X.some((U)=>typeof U!=="string"),G=this.#X.map((U)=>{let[F,N,C,_]=typeof U==="string"?FZ.#L(U,this.#J,z):U.toRegExpSource(Z);return this.#J=this.#J||C,this.#$=this.#$||_,F}).join(""),V="";if(this.isStart()){if(typeof this.#X[0]==="string"){if(!(this.#X.length===1&&TS0.has(this.#X[0]))){let F=vS0,N=X&&F.has(G.charAt(0))||G.startsWith("\\.")&&F.has(G.charAt(2))||G.startsWith("\\.\\.")&&F.has(G.charAt(4)),C=!X&&!Z&&F.has(G.charAt(0));V=N?PS0:C?n_:""}}}let x="";if(this.isEnd()&&this.#Z.#W&&this.#q?.type==="!")x="(?:$|\\/)";return[V+G+x,J$(G),this.#J=!!this.#J,this.#$]}let J=this.type==="*"||this.type==="+",Y=this.type==="!"?"(?:(?!(?:":"(?:",$=this.#j(X);if(this.isStart()&&this.isEnd()&&!$&&this.type!=="!"){let z=this.toString(),G=this;return G.#X=[z],G.type=null,G.#J=void 0,[z,J$(this.toString()),!1,!1]}let q=!J||Z||X||!n_?"":this.#j(!0);if(q===$)q="";if(q)$=`(?:${$})(?:${q})*?`;let Q="";if(this.type==="!"&&this.#x)Q=(this.isStart()&&!X?n_:"")+At;else{let z=this.type==="!"?"))"+(this.isStart()&&!X&&!Z?n_:"")+Tt+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&q?")":this.type==="*"&&q?")?":`)${this.type}`;Q=Y+$+z}return[Q,J$($),this.#J=!!this.#J,this.#$]}#H(){if(!Pt(this)){for(let Z of this.#X)if(typeof Z==="object")Z.#H()}else{let Z=0,X=!1;do{X=!0;for(let J=0;J<this.#X.length;J++){let Y=this.#X[J];if(typeof Y==="object"){if(Y.#H(),this.#C(Y))X=!1,this.#P(Y,J);else if(this.#N(Y))X=!1,this.#F(Y,J);else if(this.#R(Y))X=!1,this.#O(Y)}}}while(!X&&++Z<10)}this.#B=void 0}#j(Z){return this.#X.map((X)=>{if(typeof X==="string")throw new Error("string type in extglob ast??");let[J,Y,$,q]=X.toRegExpSource(Z);return this.#$=this.#$||q,J}).filter((X)=>!(this.isStart()&&this.isEnd())||!!X).join("|")}static#L(Z,X,J=!1){let Y=!1,$="",q=!1,Q=!1;for(let z=0;z<Z.length;z++){let G=Z.charAt(z);if(Y){Y=!1,$+=(AS0.has(G)?"\\":"")+G;continue}if(G==="*"){if(Q)continue;Q=!0,$+=J&&/^[*]+$/.test(Z)?At:Tt,X=!0;continue}else Q=!1;if(G==="\\"){if(z===Z.length-1)$+="\\\\";else Y=!0;continue}if(G==="["){let[V,x,H,U]=_t(Z,z);if(H){$+=V,q=q||x,z+=H-1,X=X||U;continue}}if(G==="?"){$+=zE,X=!0;continue}$+=wS0(G)}return[$,J$(Z),!!X,q]}}FZ=gM;var hM=(Z,{windowsPathsNoEscape:X=!1,magicalBraces:J=!1}={})=>{if(J)return X?Z.replace(/[?*()[\]{}]/g,"[$&]"):Z.replace(/[?*()[\]\\{}]/g,"\\$&");return X?Z.replace(/[?*()[\]]/g,"[$&]"):Z.replace(/[?*()[\]\\]/g,"\\$&")};var E3=(Z,X,J={})=>{if(rL(X),!J.nocomment&&X.charAt(0)==="#")return!1;return new AJ(X,J).match(Z)},SS0=/^\*+([^+@!?*[(]*)$/,ES0=(Z)=>(X)=>!X.startsWith(".")&&X.endsWith(Z),kS0=(Z)=>(X)=>X.endsWith(Z),bS0=(Z)=>{return Z=Z.toLowerCase(),(X)=>!X.startsWith(".")&&X.toLowerCase().endsWith(Z)},yS0=(Z)=>{return Z=Z.toLowerCase(),(X)=>X.toLowerCase().endsWith(Z)},fS0=/^\*+\.\*+$/,mS0=(Z)=>!Z.startsWith(".")&&Z.includes("."),gS0=(Z)=>Z!=="."&&Z!==".."&&Z.includes("."),hS0=/^\.\*+$/,uS0=(Z)=>Z!=="."&&Z!==".."&&Z.startsWith("."),dS0=/^\*+$/,pS0=(Z)=>Z.length!==0&&!Z.startsWith("."),cS0=(Z)=>Z.length!==0&&Z!=="."&&Z!=="..",lS0=/^\?+([^+@!?*[(]*)?$/,oS0=([Z,X=""])=>{let J=St([Z]);if(!X)return J;return X=X.toLowerCase(),(Y)=>J(Y)&&Y.toLowerCase().endsWith(X)},iS0=([Z,X=""])=>{let J=Et([Z]);if(!X)return J;return X=X.toLowerCase(),(Y)=>J(Y)&&Y.toLowerCase().endsWith(X)},sS0=([Z,X=""])=>{let J=Et([Z]);return!X?J:(Y)=>J(Y)&&Y.endsWith(X)},aS0=([Z,X=""])=>{let J=St([Z]);return!X?J:(Y)=>J(Y)&&Y.endsWith(X)},St=([Z])=>{let X=Z.length;return(J)=>J.length===X&&!J.startsWith(".")},Et=([Z])=>{let X=Z.length;return(J)=>J.length===X&&J!=="."&&J!==".."},kt=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",wt={win32:{sep:"\\"},posix:{sep:"/"}},rS0=kt==="win32"?wt.win32.sep:wt.posix.sep;E3.sep=rS0;var S5=Symbol("globstar **");E3.GLOBSTAR=S5;var nS0="[^/]",tS0=nS0+"*?",eS0="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",ZE0="(?:(?!(?:\\/|^)\\.).)*?",XE0=(Z,X={})=>(J)=>E3(J,Z,X);E3.filter=XE0;var TJ=(Z,X={})=>Object.assign({},Z,X),JE0=(Z)=>{if(!Z||typeof Z!=="object"||!Object.keys(Z).length)return E3;let X=E3;return Object.assign((Y,$,q={})=>X(Y,$,TJ(Z,q)),{Minimatch:class Y extends X.Minimatch{constructor($,q={}){super($,TJ(Z,q))}static defaults($){return X.defaults(TJ(Z,$)).Minimatch}},AST:class Y extends X.AST{constructor($,q,Q={}){super($,q,TJ(Z,Q))}static fromGlob($,q={}){return X.AST.fromGlob($,TJ(Z,q))}},unescape:(Y,$={})=>X.unescape(Y,TJ(Z,$)),escape:(Y,$={})=>X.escape(Y,TJ(Z,$)),filter:(Y,$={})=>X.filter(Y,TJ(Z,$)),defaults:(Y)=>X.defaults(TJ(Z,Y)),makeRe:(Y,$={})=>X.makeRe(Y,TJ(Z,$)),braceExpand:(Y,$={})=>X.braceExpand(Y,TJ(Z,$)),match:(Y,$,q={})=>X.match(Y,$,TJ(Z,q)),sep:X.sep,GLOBSTAR:S5})};E3.defaults=JE0;var bt=(Z,X={})=>{if(rL(Z),X.nobrace||!/\{(?:(?!\{).)*\}/.test(Z))return[Z];return Rt(Z,{max:X.braceExpandMax})};E3.braceExpand=bt;var YE0=(Z,X={})=>new AJ(Z,X).makeRe();E3.makeRe=YE0;var $E0=(Z,X,J={})=>{let Y=new AJ(X,J);if(Z=Z.filter(($)=>Y.match($)),Y.options.nonull&&!Z.length)Z.push(X);return Z};E3.match=$E0;var It=/[?*]|[+@!]\(.*?\)|\[|\]/,qE0=(Z)=>Z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class AJ{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(Z,X={}){rL(Z),X=X||{},this.options=X,this.maxGlobstarRecursion=X.maxGlobstarRecursion??200,this.pattern=Z,this.platform=X.platform||kt,this.isWindows=this.platform==="win32";let J="allowWindowsEscape";if(this.windowsPathsNoEscape=!!X.windowsPathsNoEscape||X[J]===!1,this.windowsPathsNoEscape)this.pattern=this.pattern.replace(/\\/g,"/");this.preserveMultipleSlashes=!!X.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!X.nonegate,this.comment=!1,this.empty=!1,this.partial=!!X.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=X.windowsNoMagicRoot!==void 0?X.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let Z of this.set)for(let X of Z)if(typeof X!=="string")return!0;return!1}debug(...Z){}make(){let Z=this.pattern,X=this.options;if(!X.nocomment&&Z.charAt(0)==="#"){this.comment=!0;return}if(!Z){this.empty=!0;return}if(this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],X.debug)this.debug=(...$)=>console.error(...$);this.debug(this.pattern,this.globSet);let J=this.globSet.map(($)=>this.slashSplit($));this.globParts=this.preprocess(J),this.debug(this.pattern,this.globParts);let Y=this.globParts.map(($,q,Q)=>{if(this.isWindows&&this.windowsNoMagicRoot){let z=$[0]===""&&$[1]===""&&($[2]==="?"||!It.test($[2]))&&!It.test($[3]),G=/^[a-z]:/i.test($[0]);if(z)return[...$.slice(0,4),...$.slice(4).map((V)=>this.parse(V))];else if(G)return[$[0],...$.slice(1).map((V)=>this.parse(V))]}return $.map((z)=>this.parse(z))});if(this.debug(this.pattern,Y),this.set=Y.filter(($)=>$.indexOf(!1)===-1),this.isWindows)for(let $=0;$<this.set.length;$++){let q=this.set[$];if(q[0]===""&&q[1]===""&&this.globParts[$][2]==="?"&&typeof q[3]==="string"&&/^[a-z]:$/i.test(q[3]))q[2]="?"}this.debug(this.pattern,this.set)}preprocess(Z){if(this.options.noglobstar){for(let J of Z)for(let Y=0;Y<J.length;Y++)if(J[Y]==="**")J[Y]="*"}let{optimizationLevel:X=1}=this.options;if(X>=2)Z=this.firstPhasePreProcess(Z),Z=this.secondPhasePreProcess(Z);else if(X>=1)Z=this.levelOneOptimize(Z);else Z=this.adjascentGlobstarOptimize(Z);return Z}adjascentGlobstarOptimize(Z){return Z.map((X)=>{let J=-1;while((J=X.indexOf("**",J+1))!==-1){let Y=J;while(X[Y+1]==="**")Y++;if(Y!==J)X.splice(J,Y-J)}return X})}levelOneOptimize(Z){return Z.map((X)=>{return X=X.reduce((J,Y)=>{let $=J[J.length-1];if(Y==="**"&&$==="**")return J;if(Y===".."){if($&&$!==".."&&$!=="."&&$!=="**")return J.pop(),J}return J.push(Y),J},[]),X.length===0?[""]:X})}levelTwoFileOptimize(Z){if(!Array.isArray(Z))Z=this.slashSplit(Z);let X=!1;do{if(X=!1,!this.preserveMultipleSlashes){for(let Y=1;Y<Z.length-1;Y++){let $=Z[Y];if(Y===1&&$===""&&Z[0]==="")continue;if($==="."||$==="")X=!0,Z.splice(Y,1),Y--}if(Z[0]==="."&&Z.length===2&&(Z[1]==="."||Z[1]===""))X=!0,Z.pop()}let J=0;while((J=Z.indexOf("..",J+1))!==-1){let Y=Z[J-1];if(Y&&Y!=="."&&Y!==".."&&Y!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(Y)))X=!0,Z.splice(J-1,2),J-=2}}while(X);return Z.length===0?[""]:Z}firstPhasePreProcess(Z){let X=!1;do{X=!1;for(let J of Z){let Y=-1;while((Y=J.indexOf("**",Y+1))!==-1){let q=Y;while(J[q+1]==="**")q++;if(q>Y)J.splice(Y+1,q-Y);let Q=J[Y+1],z=J[Y+2],G=J[Y+3];if(Q!=="..")continue;if(!z||z==="."||z===".."||!G||G==="."||G==="..")continue;X=!0,J.splice(Y,1);let V=J.slice(0);V[Y]="**",Z.push(V),Y--}if(!this.preserveMultipleSlashes){for(let q=1;q<J.length-1;q++){let Q=J[q];if(q===1&&Q===""&&J[0]==="")continue;if(Q==="."||Q==="")X=!0,J.splice(q,1),q--}if(J[0]==="."&&J.length===2&&(J[1]==="."||J[1]===""))X=!0,J.pop()}let $=0;while(($=J.indexOf("..",$+1))!==-1){let q=J[$-1];if(q&&q!=="."&&q!==".."&&q!=="**"){X=!0;let z=$===1&&J[$+1]==="**"?["."]:[];if(J.splice($-1,2,...z),J.length===0)J.push("");$-=2}}}}while(X);return Z}secondPhasePreProcess(Z){for(let X=0;X<Z.length-1;X++)for(let J=X+1;J<Z.length;J++){let Y=this.partsMatch(Z[X],Z[J],!this.preserveMultipleSlashes);if(Y){Z[X]=[],Z[J]=Y;break}}return Z.filter((X)=>X.length)}partsMatch(Z,X,J=!1){let Y=0,$=0,q=[],Q="";while(Y<Z.length&&$<X.length)if(Z[Y]===X[$])q.push(Q==="b"?X[$]:Z[Y]),Y++,$++;else if(J&&Z[Y]==="**"&&X[$]===Z[Y+1])q.push(Z[Y]),Y++;else if(J&&X[$]==="**"&&Z[Y]===X[$+1])q.push(X[$]),$++;else if(Z[Y]==="*"&&X[$]&&(this.options.dot||!X[$].startsWith("."))&&X[$]!=="**"){if(Q==="b")return!1;Q="a",q.push(Z[Y]),Y++,$++}else if(X[$]==="*"&&Z[Y]&&(this.options.dot||!Z[Y].startsWith("."))&&Z[Y]!=="**"){if(Q==="a")return!1;Q="b",q.push(X[$]),Y++,$++}else return!1;return Z.length===X.length&&q}parseNegate(){if(this.nonegate)return;let Z=this.pattern,X=!1,J=0;for(let Y=0;Y<Z.length&&Z.charAt(Y)==="!";Y++)X=!X,J++;if(J)this.pattern=Z.slice(J);this.negate=X}matchOne(Z,X,J=!1){let Y=0,$=0;if(this.isWindows){let Q=typeof Z[0]==="string"&&/^[a-z]:$/i.test(Z[0]),z=!Q&&Z[0]===""&&Z[1]===""&&Z[2]==="?"&&/^[a-z]:$/i.test(Z[3]),G=typeof X[0]==="string"&&/^[a-z]:$/i.test(X[0]),V=!G&&X[0]===""&&X[1]===""&&X[2]==="?"&&typeof X[3]==="string"&&/^[a-z]:$/i.test(X[3]),x=z?3:Q?0:void 0,H=V?3:G?0:void 0;if(typeof x==="number"&&typeof H==="number"){let[U,F]=[Z[x],X[H]];if(U.toLowerCase()===F.toLowerCase())X[H]=U,$=H,Y=x}}let{optimizationLevel:q=1}=this.options;if(q>=2)Z=this.levelTwoFileOptimize(Z);if(X.includes(S5))return this.#Z(Z,X,J,Y,$);return this.#$(Z,X,J,Y,$)}#Z(Z,X,J,Y,$){let q=X.indexOf(S5,$),Q=X.lastIndexOf(S5),[z,G,V]=J?[X.slice($,q),X.slice(q+1),[]]:[X.slice($,q),X.slice(q+1,Q),X.slice(Q+1)];if(z.length){let R=Z.slice(Y,Y+z.length);if(!this.#$(R,z,J,0,0))return!1;Y+=z.length,$+=z.length}let x=0;if(V.length){if(V.length+Y>Z.length)return!1;let R=Z.length-V.length;if(this.#$(Z,V,J,R,0))x=V.length;else{if(Z[Z.length-1]!==""||Y+V.length===Z.length)return!1;if(R--,!this.#$(Z,V,J,R,0))return!1;x=V.length+1}}if(!G.length){let R=!!x;for(let P=Y;P<Z.length-x;P++){let A=String(Z[P]);if(R=!0,A==="."||A===".."||!this.options.dot&&A.startsWith("."))return!1}return J||R}let H=[[[],0]],U=H[0],F=0,N=[0];for(let R of G)if(R===S5)N.push(F),U=[[],0],H.push(U);else U[0].push(R),F++;let C=H.length-1,_=Z.length-x;for(let R of H)R[1]=_-(N[C--]+R[0].length);return!!this.#J(Z,H,Y,0,J,0,!!x)}#J(Z,X,J,Y,$,q,Q){let z=X[Y];if(!z){for(let x=J;x<Z.length;x++){Q=!0;let H=Z[x];if(H==="."||H===".."||!this.options.dot&&H.startsWith("."))return!1}return Q}let[G,V]=z;while(J<=V){if(this.#$(Z.slice(0,J+G.length),G,$,J,0)&&q<this.maxGlobstarRecursion){let U=this.#J(Z,X,J+G.length,Y+1,$,q+1,Q);if(U!==!1)return U}let H=Z[J];if(H==="."||H===".."||!this.options.dot&&H.startsWith("."))return!1;J++}return $||null}#$(Z,X,J,Y,$){let q,Q,z,G;for(q=Y,Q=$,G=Z.length,z=X.length;q<G&&Q<z;q++,Q++){this.debug("matchOne loop");let V=X[Q],x=Z[q];if(this.debug(X,V,x),V===!1||V===S5)return!1;let H;if(typeof V==="string")H=x===V,this.debug("string match",V,x,H);else H=V.test(x),this.debug("pattern match",V,x,H);if(!H)return!1}if(q===G&&Q===z)return!0;else if(q===G)return J;else if(Q===z)return q===G-1&&Z[q]==="";else throw new Error("wtf?")}braceExpand(){return bt(this.pattern,this.options)}parse(Z){rL(Z);let X=this.options;if(Z==="**")return S5;if(Z==="")return"";let J,Y=null;if(J=Z.match(dS0))Y=X.dot?cS0:pS0;else if(J=Z.match(SS0))Y=(X.nocase?X.dot?yS0:bS0:X.dot?kS0:ES0)(J[1]);else if(J=Z.match(lS0))Y=(X.nocase?X.dot?iS0:oS0:X.dot?sS0:aS0)(J);else if(J=Z.match(fS0))Y=X.dot?gS0:mS0;else if(J=Z.match(hS0))Y=uS0;let $=gM.fromGlob(Z,this.options).toMMPattern();if(Y&&typeof $==="object")Reflect.defineProperty($,"test",{value:Y});return $}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let Z=this.set;if(!Z.length)return this.regexp=!1,this.regexp;let X=this.options,J=X.noglobstar?tS0:X.dot?eS0:ZE0,Y=new Set(X.nocase?["i"]:[]),$=Z.map((z)=>{let G=z.map((x)=>{if(x instanceof RegExp)for(let H of x.flags.split(""))Y.add(H);return typeof x==="string"?qE0(x):x===S5?S5:x._src});G.forEach((x,H)=>{let U=G[H+1],F=G[H-1];if(x!==S5||F===S5)return;if(F===void 0)if(U!==void 0&&U!==S5)G[H+1]="(?:\\/|"+J+"\\/)?"+U;else G[H]=J;else if(U===void 0)G[H-1]=F+"(?:\\/|\\/"+J+")?";else if(U!==S5)G[H-1]=F+"(?:\\/|\\/"+J+"\\/)"+U,G[H+1]=S5});let V=G.filter((x)=>x!==S5);if(this.partial&&V.length>=1){let x=[];for(let H=1;H<=V.length;H++)x.push(V.slice(0,H).join("/"));return"(?:"+x.join("|")+")"}return V.join("/")}).join("|"),[q,Q]=Z.length>1?["(?:",")"]:["",""];if($="^"+q+$+Q+"$",this.partial)$="^(?:\\/|"+q+$.slice(1,-1)+Q+")$";if(this.negate)$="^(?!"+$+").+$";try{this.regexp=new RegExp($,[...Y].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(Z){if(this.preserveMultipleSlashes)return Z.split("/");else if(this.isWindows&&/^\/\/[^/]+/.test(Z))return["",...Z.split(/\/+/)];else return Z.split(/\/+/)}match(Z,X=this.partial){if(this.debug("match",Z,this.pattern),this.comment)return!1;if(this.empty)return Z==="";if(Z==="/"&&X)return!0;let J=this.options;if(this.isWindows)Z=Z.split("\\").join("/");let Y=this.slashSplit(Z);this.debug(this.pattern,"split",Y);let $=this.set;this.debug(this.pattern,"set",$);let q=Y[Y.length-1];if(!q)for(let Q=Y.length-2;!q&&Q>=0;Q--)q=Y[Q];for(let Q of $){let z=Y;if(J.matchBase&&Q.length===1)z=[q];if(this.matchOne(z,Q,X)){if(J.flipNegate)return!0;return!this.negate}}if(J.flipNegate)return!1;return this.negate}static defaults(Z){return E3.defaults(Z).Minimatch}}E3.AST=gM;E3.Minimatch=AJ;E3.escape=hM;E3.unescape=J$;import{fileURLToPath as mE0}from"node:url";var KE0=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date,ft=new Set,GE=typeof process==="object"&&!!process?process:{},mt=(Z,X,J,Y)=>{typeof GE.emitWarning==="function"?GE.emitWarning(Z,X,J,Y):console.error(`[${J}] ${X}: ${Z}`)},t_=globalThis.AbortController,yt=globalThis.AbortSignal;if(typeof t_==="undefined"){yt=class J{onabort;_onabort=[];reason;aborted=!1;addEventListener(Y,$){this._onabort.push($)}},t_=class J{constructor(){X()}signal=new yt;abort(Y){if(this.signal.aborted)return;this.signal.reason=Y,this.signal.aborted=!0;for(let $ of this.signal._onabort)$(Y);this.signal.onabort?.(Y)}};let Z=GE.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",X=()=>{if(!Z)return;Z=!1,mt("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",X)}}var QE0=(Z)=>!ft.has(Z),nl1=Symbol("type"),PG=(Z)=>Z&&Z===Math.floor(Z)&&Z>0&&isFinite(Z),gt=(Z)=>!PG(Z)?null:Z<=Math.pow(2,8)?Uint8Array:Z<=Math.pow(2,16)?Uint16Array:Z<=Math.pow(2,32)?Uint32Array:Z<=Number.MAX_SAFE_INTEGER?tL:null;class tL extends Array{constructor(Z){super(Z);this.fill(0)}}class uM{heap;length;static#Z=!1;static create(Z){let X=gt(Z);if(!X)return[];uM.#Z=!0;let J=new uM(Z,X);return uM.#Z=!1,J}constructor(Z,X){if(!uM.#Z)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new X(Z),this.length=0}push(Z){this.heap[this.length++]=Z}pop(){return this.heap[--this.length]}}class Bx{#Z;#J;#$;#X;#q;#G;#M;#W;get perf(){return this.#W}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#Q;#B;#x;#z;#K;#N;#C;#U;#F;#P;#D;#R;#O;#H;#j;#L;#v;#Y;#k;static unsafeExposeInternals(Z){return{starts:Z.#O,ttls:Z.#H,autopurgeTimers:Z.#j,sizes:Z.#R,keyMap:Z.#x,keyList:Z.#z,valList:Z.#K,next:Z.#N,prev:Z.#C,get head(){return Z.#U},get tail(){return Z.#F},free:Z.#P,isBackgroundFetch:(X)=>Z.#V(X),backgroundFetch:(X,J,Y,$)=>Z.#d(X,J,Y,$),moveToTail:(X)=>Z.#y(X),indexes:(X)=>Z.#w(X),rindexes:(X)=>Z.#I(X),isStale:(X)=>Z.#_(X)}}get max(){return this.#Z}get maxSize(){return this.#J}get calculatedSize(){return this.#B}get size(){return this.#Q}get fetchMethod(){return this.#G}get memoMethod(){return this.#M}get dispose(){return this.#$}get onInsert(){return this.#X}get disposeAfter(){return this.#q}constructor(Z){let{max:X=0,ttl:J,ttlResolution:Y=1,ttlAutopurge:$,updateAgeOnGet:q,updateAgeOnHas:Q,allowStale:z,dispose:G,onInsert:V,disposeAfter:x,noDisposeOnSet:H,noUpdateTTL:U,maxSize:F=0,maxEntrySize:N=0,sizeCalculation:C,fetchMethod:_,memoMethod:R,noDeleteOnFetchRejection:P,noDeleteOnStaleGet:A,allowStaleOnFetchRejection:v,allowStaleOnFetchAbort:E,ignoreFetchAbort:k,perf:y}=Z;if(y!==void 0){if(typeof y?.now!=="function")throw new TypeError("perf option must have a now() method if specified")}if(this.#W=y??KE0,X!==0&&!PG(X))throw new TypeError("max option must be a nonnegative integer");let I=X?gt(X):Array;if(!I)throw new Error("invalid max value: "+X);if(this.#Z=X,this.#J=F,this.maxEntrySize=N||this.#J,this.sizeCalculation=C,this.sizeCalculation){if(!this.#J&&!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(R!==void 0&&typeof R!=="function")throw new TypeError("memoMethod must be a function if defined");if(this.#M=R,_!==void 0&&typeof _!=="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#G=_,this.#v=!!_,this.#x=new Map,this.#z=new Array(X).fill(void 0),this.#K=new Array(X).fill(void 0),this.#N=new I(X),this.#C=new I(X),this.#U=0,this.#F=0,this.#P=uM.create(X),this.#Q=0,this.#B=0,typeof G==="function")this.#$=G;if(typeof V==="function")this.#X=V;if(typeof x==="function")this.#q=x,this.#D=[];else this.#q=void 0,this.#D=void 0;if(this.#L=!!this.#$,this.#k=!!this.#X,this.#Y=!!this.#q,this.noDisposeOnSet=!!H,this.noUpdateTTL=!!U,this.noDeleteOnFetchRejection=!!P,this.allowStaleOnFetchRejection=!!v,this.allowStaleOnFetchAbort=!!E,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(this.#J!==0){if(!PG(this.#J))throw new TypeError("maxSize must be a positive integer if specified")}if(!PG(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#c()}if(this.allowStale=!!z,this.noDeleteOnStaleGet=!!A,this.updateAgeOnGet=!!q,this.updateAgeOnHas=!!Q,this.ttlResolution=PG(Y)||Y===0?Y:1,this.ttlAutopurge=!!$,this.ttl=J||0,this.ttl){if(!PG(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#S()}if(this.#Z===0&&this.ttl===0&&this.#J===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#Z&&!this.#J){if(QE0("LRU_CACHE_UNBOUNDED"))ft.add("LRU_CACHE_UNBOUNDED"),mt("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning","LRU_CACHE_UNBOUNDED",Bx)}}getRemainingTTL(Z){return this.#x.has(Z)?1/0:0}#S(){let Z=new tL(this.#Z),X=new tL(this.#Z);this.#H=Z,this.#O=X;let J=this.ttlAutopurge?new Array(this.#Z):void 0;this.#j=J,this.#m=(q,Q,z=this.#W.now())=>{if(X[q]=Q!==0?z:0,Z[q]=Q,J?.[q])clearTimeout(J[q]),J[q]=void 0;if(Q!==0&&J){let G=setTimeout(()=>{if(this.#_(q))this.#A(this.#z[q],"expire")},Q+1);if(G.unref)G.unref();J[q]=G}},this.#T=(q)=>{X[q]=Z[q]!==0?this.#W.now():0},this.#E=(q,Q)=>{if(Z[Q]){let z=Z[Q],G=X[Q];if(!z||!G)return;q.ttl=z,q.start=G,q.now=Y||$();let V=q.now-G;q.remainingTTL=z-V}};let Y=0,$=()=>{let q=this.#W.now();if(this.ttlResolution>0){Y=q;let Q=setTimeout(()=>Y=0,this.ttlResolution);if(Q.unref)Q.unref()}return q};this.getRemainingTTL=(q)=>{let Q=this.#x.get(q);if(Q===void 0)return 0;let z=Z[Q],G=X[Q];if(!z||!G)return 1/0;let V=(Y||$())-G;return z-V},this.#_=(q)=>{let Q=X[q],z=Z[q];return!!z&&!!Q&&(Y||$())-Q>z}}#T=()=>{};#E=()=>{};#m=()=>{};#_=()=>!1;#c(){let Z=new tL(this.#Z);this.#B=0,this.#R=Z,this.#f=(X)=>{this.#B-=Z[X],Z[X]=0},this.#g=(X,J,Y,$)=>{if(this.#V(J))return 0;if(!PG(Y))if($){if(typeof $!=="function")throw new TypeError("sizeCalculation must be a function");if(Y=$(J,X),!PG(Y))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 Y},this.#b=(X,J,Y)=>{if(Z[X]=J,this.#J){let $=this.#J-Z[X];while(this.#B>$)this.#u(!0)}if(this.#B+=Z[X],Y)Y.entrySize=J,Y.totalCalculatedSize=this.#B}}#f=(Z)=>{};#b=(Z,X,J)=>{};#g=(Z,X,J,Y)=>{if(J||Y)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#w({allowStale:Z=this.allowStale}={}){if(this.#Q)for(let X=this.#F;;){if(!this.#h(X))break;if(Z||!this.#_(X))yield X;if(X===this.#U)break;else X=this.#C[X]}}*#I({allowStale:Z=this.allowStale}={}){if(this.#Q)for(let X=this.#U;;){if(!this.#h(X))break;if(Z||!this.#_(X))yield X;if(X===this.#F)break;else X=this.#N[X]}}#h(Z){return Z!==void 0&&this.#x.get(this.#z[Z])===Z}*entries(){for(let Z of this.#w())if(this.#K[Z]!==void 0&&this.#z[Z]!==void 0&&!this.#V(this.#K[Z]))yield[this.#z[Z],this.#K[Z]]}*rentries(){for(let Z of this.#I())if(this.#K[Z]!==void 0&&this.#z[Z]!==void 0&&!this.#V(this.#K[Z]))yield[this.#z[Z],this.#K[Z]]}*keys(){for(let Z of this.#w()){let X=this.#z[Z];if(X!==void 0&&!this.#V(this.#K[Z]))yield X}}*rkeys(){for(let Z of this.#I()){let X=this.#z[Z];if(X!==void 0&&!this.#V(this.#K[Z]))yield X}}*values(){for(let Z of this.#w())if(this.#K[Z]!==void 0&&!this.#V(this.#K[Z]))yield this.#K[Z]}*rvalues(){for(let Z of this.#I())if(this.#K[Z]!==void 0&&!this.#V(this.#K[Z]))yield this.#K[Z]}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(Z,X={}){for(let J of this.#w()){let Y=this.#K[J],$=this.#V(Y)?Y.__staleWhileFetching:Y;if($===void 0)continue;if(Z($,this.#z[J],this))return this.get(this.#z[J],X)}}forEach(Z,X=this){for(let J of this.#w()){let Y=this.#K[J],$=this.#V(Y)?Y.__staleWhileFetching:Y;if($===void 0)continue;Z.call(X,$,this.#z[J],this)}}rforEach(Z,X=this){for(let J of this.#I()){let Y=this.#K[J],$=this.#V(Y)?Y.__staleWhileFetching:Y;if($===void 0)continue;Z.call(X,$,this.#z[J],this)}}purgeStale(){let Z=!1;for(let X of this.#I({allowStale:!0}))if(this.#_(X))this.#A(this.#z[X],"expire"),Z=!0;return Z}info(Z){let X=this.#x.get(Z);if(X===void 0)return;let J=this.#K[X],Y=this.#V(J)?J.__staleWhileFetching:J;if(Y===void 0)return;let $={value:Y};if(this.#H&&this.#O){let q=this.#H[X],Q=this.#O[X];if(q&&Q){let z=q-(this.#W.now()-Q);$.ttl=z,$.start=Date.now()}}if(this.#R)$.size=this.#R[X];return $}dump(){let Z=[];for(let X of this.#w({allowStale:!0})){let J=this.#z[X],Y=this.#K[X],$=this.#V(Y)?Y.__staleWhileFetching:Y;if($===void 0||J===void 0)continue;let q={value:$};if(this.#H&&this.#O){q.ttl=this.#H[X];let Q=this.#W.now()-this.#O[X];q.start=Math.floor(Date.now()-Q)}if(this.#R)q.size=this.#R[X];Z.unshift([J,q])}return Z}load(Z){this.clear();for(let[X,J]of Z){if(J.start){let Y=Date.now()-J.start;J.start=this.#W.now()-Y}this.set(X,J.value,J)}}set(Z,X,J={}){if(X===void 0)return this.delete(Z),this;let{ttl:Y=this.ttl,start:$,noDisposeOnSet:q=this.noDisposeOnSet,sizeCalculation:Q=this.sizeCalculation,status:z}=J,{noUpdateTTL:G=this.noUpdateTTL}=J,V=this.#g(Z,X,J.size||0,Q);if(this.maxEntrySize&&V>this.maxEntrySize){if(z)z.set="miss",z.maxEntrySizeExceeded=!0;return this.#A(Z,"set"),this}let x=this.#Q===0?void 0:this.#x.get(Z);if(x===void 0){if(x=this.#Q===0?this.#F:this.#P.length!==0?this.#P.pop():this.#Q===this.#Z?this.#u(!1):this.#Q,this.#z[x]=Z,this.#K[x]=X,this.#x.set(Z,x),this.#N[this.#F]=x,this.#C[x]=this.#F,this.#F=x,this.#Q++,this.#b(x,V,z),z)z.set="add";if(G=!1,this.#k)this.#X?.(X,Z,"add")}else{this.#y(x);let H=this.#K[x];if(X!==H){if(this.#v&&this.#V(H)){H.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:U}=H;if(U!==void 0&&!q){if(this.#L)this.#$?.(U,Z,"set");if(this.#Y)this.#D?.push([U,Z,"set"])}}else if(!q){if(this.#L)this.#$?.(H,Z,"set");if(this.#Y)this.#D?.push([H,Z,"set"])}if(this.#f(x),this.#b(x,V,z),this.#K[x]=X,z){z.set="replace";let U=H&&this.#V(H)?H.__staleWhileFetching:H;if(U!==void 0)z.oldValue=U}}else if(z)z.set="update";if(this.#k)this.onInsert?.(X,Z,X===H?"update":"replace")}if(Y!==0&&!this.#H)this.#S();if(this.#H){if(!G)this.#m(x,Y,$);if(z)this.#E(z,x)}if(!q&&this.#Y&&this.#D){let H=this.#D,U;while(U=H?.shift())this.#q?.(...U)}return this}pop(){try{while(this.#Q){let Z=this.#K[this.#U];if(this.#u(!0),this.#V(Z)){if(Z.__staleWhileFetching)return Z.__staleWhileFetching}else if(Z!==void 0)return Z}}finally{if(this.#Y&&this.#D){let Z=this.#D,X;while(X=Z?.shift())this.#q?.(...X)}}}#u(Z){let X=this.#U,J=this.#z[X],Y=this.#K[X];if(this.#v&&this.#V(Y))Y.__abortController.abort(new Error("evicted"));else if(this.#L||this.#Y){if(this.#L)this.#$?.(Y,J,"evict");if(this.#Y)this.#D?.push([Y,J,"evict"])}if(this.#f(X),this.#j?.[X])clearTimeout(this.#j[X]),this.#j[X]=void 0;if(Z)this.#z[X]=void 0,this.#K[X]=void 0,this.#P.push(X);if(this.#Q===1)this.#U=this.#F=0,this.#P.length=0;else this.#U=this.#N[X];return this.#x.delete(J),this.#Q--,X}has(Z,X={}){let{updateAgeOnHas:J=this.updateAgeOnHas,status:Y}=X,$=this.#x.get(Z);if($!==void 0){let q=this.#K[$];if(this.#V(q)&&q.__staleWhileFetching===void 0)return!1;if(!this.#_($)){if(J)this.#T($);if(Y)Y.has="hit",this.#E(Y,$);return!0}else if(Y)Y.has="stale",this.#E(Y,$)}else if(Y)Y.has="miss";return!1}peek(Z,X={}){let{allowStale:J=this.allowStale}=X,Y=this.#x.get(Z);if(Y===void 0||!J&&this.#_(Y))return;let $=this.#K[Y];return this.#V($)?$.__staleWhileFetching:$}#d(Z,X,J,Y){let $=X===void 0?void 0:this.#K[X];if(this.#V($))return $;let q=new t_,{signal:Q}=J;Q?.addEventListener("abort",()=>q.abort(Q.reason),{signal:q.signal});let z={signal:q.signal,options:J,context:Y},G=(N,C=!1)=>{let{aborted:_}=q.signal,R=J.ignoreFetchAbort&&N!==void 0;if(J.status)if(_&&!C){if(J.status.fetchAborted=!0,J.status.fetchError=q.signal.reason,R)J.status.fetchAbortIgnored=!0}else J.status.fetchResolved=!0;if(_&&!R&&!C)return x(q.signal.reason);let P=U,A=this.#K[X];if(A===U||R&&C&&A===void 0)if(N===void 0)if(P.__staleWhileFetching!==void 0)this.#K[X]=P.__staleWhileFetching;else this.#A(Z,"fetch");else{if(J.status)J.status.fetchUpdated=!0;this.set(Z,N,z.options)}return N},V=(N)=>{if(J.status)J.status.fetchRejected=!0,J.status.fetchError=N;return x(N)},x=(N)=>{let{aborted:C}=q.signal,_=C&&J.allowStaleOnFetchAbort,R=_||J.allowStaleOnFetchRejection,P=R||J.noDeleteOnFetchRejection,A=U;if(this.#K[X]===U){if(!P||A.__staleWhileFetching===void 0)this.#A(Z,"fetch");else if(!_)this.#K[X]=A.__staleWhileFetching}if(R){if(J.status&&A.__staleWhileFetching!==void 0)J.status.returnedStale=!0;return A.__staleWhileFetching}else if(A.__returned===A)throw N},H=(N,C)=>{let _=this.#G?.(Z,$,z);if(_&&_ instanceof Promise)_.then((R)=>N(R===void 0?void 0:R),C);q.signal.addEventListener("abort",()=>{if(!J.ignoreFetchAbort||J.allowStaleOnFetchAbort){if(N(void 0),J.allowStaleOnFetchAbort)N=(R)=>G(R,!0)}})};if(J.status)J.status.fetchDispatched=!0;let U=new Promise(H).then(G,V),F=Object.assign(U,{__abortController:q,__staleWhileFetching:$,__returned:void 0});if(X===void 0)this.set(Z,F,{...z.options,status:void 0}),X=this.#x.get(Z);else this.#K[X]=F;return F}#V(Z){if(!this.#v)return!1;let X=Z;return!!X&&X instanceof Promise&&X.hasOwnProperty("__staleWhileFetching")&&X.__abortController instanceof t_}async fetch(Z,X={}){let{allowStale:J=this.allowStale,updateAgeOnGet:Y=this.updateAgeOnGet,noDeleteOnStaleGet:$=this.noDeleteOnStaleGet,ttl:q=this.ttl,noDisposeOnSet:Q=this.noDisposeOnSet,size:z=0,sizeCalculation:G=this.sizeCalculation,noUpdateTTL:V=this.noUpdateTTL,noDeleteOnFetchRejection:x=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:H=this.allowStaleOnFetchRejection,ignoreFetchAbort:U=this.ignoreFetchAbort,allowStaleOnFetchAbort:F=this.allowStaleOnFetchAbort,context:N,forceRefresh:C=!1,status:_,signal:R}=X;if(!this.#v){if(_)_.fetch="get";return this.get(Z,{allowStale:J,updateAgeOnGet:Y,noDeleteOnStaleGet:$,status:_})}let P={allowStale:J,updateAgeOnGet:Y,noDeleteOnStaleGet:$,ttl:q,noDisposeOnSet:Q,size:z,sizeCalculation:G,noUpdateTTL:V,noDeleteOnFetchRejection:x,allowStaleOnFetchRejection:H,allowStaleOnFetchAbort:F,ignoreFetchAbort:U,status:_,signal:R},A=this.#x.get(Z);if(A===void 0){if(_)_.fetch="miss";let v=this.#d(Z,A,P,N);return v.__returned=v}else{let v=this.#K[A];if(this.#V(v)){let S=J&&v.__staleWhileFetching!==void 0;if(_){if(_.fetch="inflight",S)_.returnedStale=!0}return S?v.__staleWhileFetching:v.__returned=v}let E=this.#_(A);if(!C&&!E){if(_)_.fetch="hit";if(this.#y(A),Y)this.#T(A);if(_)this.#E(_,A);return v}let k=this.#d(Z,A,P,N),I=k.__staleWhileFetching!==void 0&&J;if(_){if(_.fetch=E?"stale":"refresh",I&&E)_.returnedStale=!0}return I?k.__staleWhileFetching:k.__returned=k}}async forceFetch(Z,X={}){let J=await this.fetch(Z,X);if(J===void 0)throw new Error("fetch() returned undefined");return J}memo(Z,X={}){let J=this.#M;if(!J)throw new Error("no memoMethod provided to constructor");let{context:Y,forceRefresh:$,...q}=X,Q=this.get(Z,q);if(!$&&Q!==void 0)return Q;let z=J(Z,Q,{options:q,context:Y});return this.set(Z,z,q),z}get(Z,X={}){let{allowStale:J=this.allowStale,updateAgeOnGet:Y=this.updateAgeOnGet,noDeleteOnStaleGet:$=this.noDeleteOnStaleGet,status:q}=X,Q=this.#x.get(Z);if(Q!==void 0){let z=this.#K[Q],G=this.#V(z);if(q)this.#E(q,Q);if(this.#_(Q)){if(q)q.get="stale";if(!G){if(!$)this.#A(Z,"expire");if(q&&J)q.returnedStale=!0;return J?z:void 0}else{if(q&&J&&z.__staleWhileFetching!==void 0)q.returnedStale=!0;return J?z.__staleWhileFetching:void 0}}else{if(q)q.get="hit";if(G)return z.__staleWhileFetching;if(this.#y(Q),Y)this.#T(Q);return z}}else if(q)q.get="miss"}#p(Z,X){this.#C[X]=Z,this.#N[Z]=X}#y(Z){if(Z!==this.#F){if(Z===this.#U)this.#U=this.#N[Z];else this.#p(this.#C[Z],this.#N[Z]);this.#p(this.#F,Z),this.#F=Z}}delete(Z){return this.#A(Z,"delete")}#A(Z,X){let J=!1;if(this.#Q!==0){let Y=this.#x.get(Z);if(Y!==void 0){if(this.#j?.[Y])clearTimeout(this.#j?.[Y]),this.#j[Y]=void 0;if(J=!0,this.#Q===1)this.#l(X);else{this.#f(Y);let $=this.#K[Y];if(this.#V($))$.__abortController.abort(new Error("deleted"));else if(this.#L||this.#Y){if(this.#L)this.#$?.($,Z,X);if(this.#Y)this.#D?.push([$,Z,X])}if(this.#x.delete(Z),this.#z[Y]=void 0,this.#K[Y]=void 0,Y===this.#F)this.#F=this.#C[Y];else if(Y===this.#U)this.#U=this.#N[Y];else{let q=this.#C[Y];this.#N[q]=this.#N[Y];let Q=this.#N[Y];this.#C[Q]=this.#C[Y]}this.#Q--,this.#P.push(Y)}}}if(this.#Y&&this.#D?.length){let Y=this.#D,$;while($=Y?.shift())this.#q?.(...$)}return J}clear(){return this.#l("delete")}#l(Z){for(let X of this.#I({allowStale:!0})){let J=this.#K[X];if(this.#V(J))J.__abortController.abort(new Error("deleted"));else{let Y=this.#z[X];if(this.#L)this.#$?.(J,Y,Z);if(this.#Y)this.#D?.push([J,Y,Z])}}if(this.#x.clear(),this.#K.fill(void 0),this.#z.fill(void 0),this.#H&&this.#O){this.#H.fill(0),this.#O.fill(0);for(let X of this.#j??[])if(X!==void 0)clearTimeout(X);this.#j?.fill(void 0)}if(this.#R)this.#R.fill(0);if(this.#U=0,this.#F=0,this.#P.length=0,this.#B=0,this.#Q=0,this.#Y&&this.#D){let X=this.#D,J;while(J=X?.shift())this.#q?.(...J)}}}import{posix as DE0,win32 as jE}from"node:path";import{fileURLToPath as jE0}from"node:url";import{lstatSync as NE0,readdir as LE0,readdirSync as CE0,readlinkSync as RE0,realpathSync as OE0}from"fs";import*as _E0 from"node:fs";import{lstat as vE0,readdir as TE0,readlink as AE0,realpath as wE0}from"node:fs/promises";import{EventEmitter as ME}from"node:events";import ct from"node:stream";import{StringDecoder as zE0}from"node:string_decoder";var ht=typeof process==="object"&&process?process:{stdout:null,stderr:null},GE0=(Z)=>!!Z&&typeof Z==="object"&&(Z instanceof Mx||Z instanceof ct||VE0(Z)||WE0(Z)),VE0=(Z)=>!!Z&&typeof Z==="object"&&Z instanceof ME&&typeof Z.pipe==="function"&&Z.pipe!==ct.Writable.prototype.pipe,WE0=(Z)=>!!Z&&typeof Z==="object"&&Z instanceof ME&&typeof Z.write==="function"&&typeof Z.end==="function",jQ=Symbol("EOF"),NQ=Symbol("maybeEmitEnd"),vG=Symbol("emittedEnd"),e_=Symbol("emittingEnd"),eL=Symbol("emittedError"),ZP=Symbol("closed"),ut=Symbol("read"),XP=Symbol("flush"),dt=Symbol("flushChunk"),Y$=Symbol("encoding"),dM=Symbol("decoder"),K9=Symbol("flowing"),ZC=Symbol("paused"),pM=Symbol("resume"),Q9=Symbol("buffer"),k3=Symbol("pipes"),z9=Symbol("bufferLength"),VE=Symbol("bufferPush"),JP=Symbol("bufferShift"),n9=Symbol("objectMode"),E5=Symbol("destroyed"),WE=Symbol("error"),xE=Symbol("emitData"),pt=Symbol("emitEnd"),BE=Symbol("emitEnd2"),Rq=Symbol("async"),HE=Symbol("abort"),YP=Symbol("aborted"),XC=Symbol("signal"),Hx=Symbol("dataListeners"),NX=Symbol("discarded"),JC=(Z)=>Promise.resolve().then(Z),xE0=(Z)=>Z(),BE0=(Z)=>Z==="end"||Z==="finish"||Z==="prefinish",HE0=(Z)=>Z instanceof ArrayBuffer||!!Z&&typeof Z==="object"&&Z.constructor&&Z.constructor.name==="ArrayBuffer"&&Z.byteLength>=0,ME0=(Z)=>!Buffer.isBuffer(Z)&&ArrayBuffer.isView(Z);class UE{src;dest;opts;ondrain;constructor(Z,X,J){this.src=Z,this.dest=X,this.opts=J,this.ondrain=()=>Z[pM](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(Z){}end(){if(this.unpipe(),this.opts.end)this.dest.end()}}class lt extends UE{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(Z,X,J){super(Z,X,J);this.proxyErrors=(Y)=>X.emit("error",Y),Z.on("error",this.proxyErrors)}}var UE0=(Z)=>!!Z.objectMode,FE0=(Z)=>!Z.objectMode&&!!Z.encoding&&Z.encoding!=="buffer";class Mx extends ME{[K9]=!1;[ZC]=!1;[k3]=[];[Q9]=[];[n9];[Y$];[Rq];[dM];[jQ]=!1;[vG]=!1;[e_]=!1;[ZP]=!1;[eL]=null;[z9]=0;[E5]=!1;[XC];[YP]=!1;[Hx]=0;[NX]=!1;writable=!0;readable=!0;constructor(...Z){let X=Z[0]||{};super();if(X.objectMode&&typeof X.encoding==="string")throw new TypeError("Encoding and objectMode may not be used together");if(UE0(X))this[n9]=!0,this[Y$]=null;else if(FE0(X))this[Y$]=X.encoding,this[n9]=!1;else this[n9]=!1,this[Y$]=null;if(this[Rq]=!!X.async,this[dM]=this[Y$]?new zE0(this[Y$]):null,X&&X.debugExposeBuffer===!0)Object.defineProperty(this,"buffer",{get:()=>this[Q9]});if(X&&X.debugExposePipes===!0)Object.defineProperty(this,"pipes",{get:()=>this[k3]});let{signal:J}=X;if(J)if(this[XC]=J,J.aborted)this[HE]();else J.addEventListener("abort",()=>this[HE]())}get bufferLength(){return this[z9]}get encoding(){return this[Y$]}set encoding(Z){throw new Error("Encoding must be set at instantiation time")}setEncoding(Z){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[n9]}set objectMode(Z){throw new Error("objectMode must be set at instantiation time")}get["async"](){return this[Rq]}set["async"](Z){this[Rq]=this[Rq]||!!Z}[HE](){this[YP]=!0,this.emit("abort",this[XC]?.reason),this.destroy(this[XC]?.reason)}get aborted(){return this[YP]}set aborted(Z){}write(Z,X,J){if(this[YP])return!1;if(this[jQ])throw new Error("write after end");if(this[E5])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;if(typeof X==="function")J=X,X="utf8";if(!X)X="utf8";let Y=this[Rq]?JC:xE0;if(!this[n9]&&!Buffer.isBuffer(Z)){if(ME0(Z))Z=Buffer.from(Z.buffer,Z.byteOffset,Z.byteLength);else if(HE0(Z))Z=Buffer.from(Z);else if(typeof Z!=="string")throw new Error("Non-contiguous data written to non-objectMode stream")}if(this[n9]){if(this[K9]&&this[z9]!==0)this[XP](!0);if(this[K9])this.emit("data",Z);else this[VE](Z);if(this[z9]!==0)this.emit("readable");if(J)Y(J);return this[K9]}if(!Z.length){if(this[z9]!==0)this.emit("readable");if(J)Y(J);return this[K9]}if(typeof Z==="string"&&!(X===this[Y$]&&!this[dM]?.lastNeed))Z=Buffer.from(Z,X);if(Buffer.isBuffer(Z)&&this[Y$])Z=this[dM].write(Z);if(this[K9]&&this[z9]!==0)this[XP](!0);if(this[K9])this.emit("data",Z);else this[VE](Z);if(this[z9]!==0)this.emit("readable");if(J)Y(J);return this[K9]}read(Z){if(this[E5])return null;if(this[NX]=!1,this[z9]===0||Z===0||Z&&Z>this[z9])return this[NQ](),null;if(this[n9])Z=null;if(this[Q9].length>1&&!this[n9])this[Q9]=[this[Y$]?this[Q9].join(""):Buffer.concat(this[Q9],this[z9])];let X=this[ut](Z||null,this[Q9][0]);return this[NQ](),X}[ut](Z,X){if(this[n9])this[JP]();else{let J=X;if(Z===J.length||Z===null)this[JP]();else if(typeof J==="string")this[Q9][0]=J.slice(Z),X=J.slice(0,Z),this[z9]-=Z;else this[Q9][0]=J.subarray(Z),X=J.subarray(0,Z),this[z9]-=Z}if(this.emit("data",X),!this[Q9].length&&!this[jQ])this.emit("drain");return X}end(Z,X,J){if(typeof Z==="function")J=Z,Z=void 0;if(typeof X==="function")J=X,X="utf8";if(Z!==void 0)this.write(Z,X);if(J)this.once("end",J);if(this[jQ]=!0,this.writable=!1,this[K9]||!this[ZC])this[NQ]();return this}[pM](){if(this[E5])return;if(!this[Hx]&&!this[k3].length)this[NX]=!0;if(this[ZC]=!1,this[K9]=!0,this.emit("resume"),this[Q9].length)this[XP]();else if(this[jQ])this[NQ]();else this.emit("drain")}resume(){return this[pM]()}pause(){this[K9]=!1,this[ZC]=!0,this[NX]=!1}get destroyed(){return this[E5]}get flowing(){return this[K9]}get paused(){return this[ZC]}[VE](Z){if(this[n9])this[z9]+=1;else this[z9]+=Z.length;this[Q9].push(Z)}[JP](){if(this[n9])this[z9]-=1;else this[z9]-=this[Q9][0].length;return this[Q9].shift()}[XP](Z=!1){do;while(this[dt](this[JP]())&&this[Q9].length);if(!Z&&!this[Q9].length&&!this[jQ])this.emit("drain")}[dt](Z){return this.emit("data",Z),this[K9]}pipe(Z,X){if(this[E5])return Z;this[NX]=!1;let J=this[vG];if(X=X||{},Z===ht.stdout||Z===ht.stderr)X.end=!1;else X.end=X.end!==!1;if(X.proxyErrors=!!X.proxyErrors,J){if(X.end)Z.end()}else if(this[k3].push(!X.proxyErrors?new UE(this,Z,X):new lt(this,Z,X)),this[Rq])JC(()=>this[pM]());else this[pM]();return Z}unpipe(Z){let X=this[k3].find((J)=>J.dest===Z);if(X){if(this[k3].length===1){if(this[K9]&&this[Hx]===0)this[K9]=!1;this[k3]=[]}else this[k3].splice(this[k3].indexOf(X),1);X.unpipe()}}addListener(Z,X){return this.on(Z,X)}on(Z,X){let J=super.on(Z,X);if(Z==="data"){if(this[NX]=!1,this[Hx]++,!this[k3].length&&!this[K9])this[pM]()}else if(Z==="readable"&&this[z9]!==0)super.emit("readable");else if(BE0(Z)&&this[vG])super.emit(Z),this.removeAllListeners(Z);else if(Z==="error"&&this[eL]){let Y=X;if(this[Rq])JC(()=>Y.call(this,this[eL]));else Y.call(this,this[eL])}return J}removeListener(Z,X){return this.off(Z,X)}off(Z,X){let J=super.off(Z,X);if(Z==="data"){if(this[Hx]=this.listeners("data").length,this[Hx]===0&&!this[NX]&&!this[k3].length)this[K9]=!1}return J}removeAllListeners(Z){let X=super.removeAllListeners(Z);if(Z==="data"||Z===void 0){if(this[Hx]=0,!this[NX]&&!this[k3].length)this[K9]=!1}return X}get emittedEnd(){return this[vG]}[NQ](){if(!this[e_]&&!this[vG]&&!this[E5]&&this[Q9].length===0&&this[jQ]){if(this[e_]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[ZP])this.emit("close");this[e_]=!1}}emit(Z,...X){let J=X[0];if(Z!=="error"&&Z!=="close"&&Z!==E5&&this[E5])return!1;else if(Z==="data")return!this[n9]&&!J?!1:this[Rq]?(JC(()=>this[xE](J)),!0):this[xE](J);else if(Z==="end")return this[pt]();else if(Z==="close"){if(this[ZP]=!0,!this[vG]&&!this[E5])return!1;let $=super.emit("close");return this.removeAllListeners("close"),$}else if(Z==="error"){this[eL]=J,super.emit(WE,J);let $=!this[XC]||this.listeners("error").length?super.emit("error",J):!1;return this[NQ](),$}else if(Z==="resume"){let $=super.emit("resume");return this[NQ](),$}else if(Z==="finish"||Z==="prefinish"){let $=super.emit(Z);return this.removeAllListeners(Z),$}let Y=super.emit(Z,...X);return this[NQ](),Y}[xE](Z){for(let J of this[k3])if(J.dest.write(Z)===!1)this.pause();let X=this[NX]?!1:super.emit("data",Z);return this[NQ](),X}[pt](){if(this[vG])return!1;return this[vG]=!0,this.readable=!1,this[Rq]?(JC(()=>this[BE]()),!0):this[BE]()}[BE](){if(this[dM]){let X=this[dM].end();if(X){for(let J of this[k3])J.dest.write(X);if(!this[NX])super.emit("data",X)}}for(let X of this[k3])X.end();let Z=super.emit("end");return this.removeAllListeners("end"),Z}async collect(){let Z=Object.assign([],{dataLength:0});if(!this[n9])Z.dataLength=0;let X=this.promise();return this.on("data",(J)=>{if(Z.push(J),!this[n9])Z.dataLength+=J.length}),await X,Z}async concat(){if(this[n9])throw new Error("cannot concat in objectMode");let Z=await this.collect();return this[Y$]?Z.join(""):Buffer.concat(Z,Z.dataLength)}async promise(){return new Promise((Z,X)=>{this.on(E5,()=>X(new Error("stream destroyed"))),this.on("error",(J)=>X(J)),this.on("end",()=>Z())})}[Symbol.asyncIterator](){this[NX]=!1;let Z=!1,X=async()=>{return this.pause(),Z=!0,{value:void 0,done:!0}};return{next:()=>{if(Z)return X();let Y=this.read();if(Y!==null)return Promise.resolve({done:!1,value:Y});if(this[jQ])return X();let $,q,Q=(x)=>{this.off("data",z),this.off("end",G),this.off(E5,V),X(),q(x)},z=(x)=>{this.off("error",Q),this.off("end",G),this.off(E5,V),this.pause(),$({value:x,done:!!this[jQ]})},G=()=>{this.off("error",Q),this.off("data",z),this.off(E5,V),X(),$({done:!0,value:void 0})},V=()=>Q(new Error("stream destroyed"));return new Promise((x,H)=>{q=H,$=x,this.once(E5,V),this.once("error",Q),this.once("end",G),this.once("data",z)})},throw:X,return:X,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[NX]=!1;let Z=!1,X=()=>{return this.pause(),this.off(WE,X),this.off(E5,X),this.off("end",X),Z=!0,{done:!0,value:void 0}},J=()=>{if(Z)return X();let Y=this.read();return Y===null?X():{done:!1,value:Y}};return this.once("end",X),this.once(WE,X),this.once(E5,X),{next:J,throw:X,return:X,[Symbol.iterator](){return this}}}destroy(Z){if(this[E5]){if(Z)this.emit("error",Z);else this.emit(E5);return this}this[E5]=!0,this[NX]=!0,this[Q9].length=0,this[z9]=0;let X=this;if(typeof X.close==="function"&&!this[ZP])X.close();if(Z)this.emit("error",Z);else this.emit(E5);return this}static get isStream(){return GE0}}var PE0=OE0.native,$C={lstatSync:NE0,readdir:LE0,readdirSync:CE0,readlinkSync:RE0,realpathSync:PE0,promises:{lstat:vE0,readdir:TE0,readlink:AE0,realpath:wE0}},rt=(Z)=>!Z||Z===$C||Z===_E0?$C:{...$C,...Z,promises:{...$C.promises,...Z.promises||{}}},nt=/^\\\\\?\\([a-z]:)\\?$/i,IE0=(Z)=>Z.replace(/\//g,"\\").replace(nt,"$1\\"),SE0=/[\\\/]/,IJ=0,tt=1,et=2,Oq=4,Ze=6,Xe=8,Ux=10,Je=12,wJ=15,YC=~wJ,FE=16,ot=32,qC=64,$$=128,$P=256,KP=512,it=qC|$$|KP,EE0=1023,DE=(Z)=>Z.isFile()?Xe:Z.isDirectory()?Oq:Z.isSymbolicLink()?Ux:Z.isCharacterDevice()?et:Z.isBlockDevice()?Ze:Z.isSocket()?Je:Z.isFIFO()?tt:IJ,st=new Bx({max:4096}),KC=(Z)=>{let X=st.get(Z);if(X)return X;let J=Z.normalize("NFKD");return st.set(Z,J),J},at=new Bx({max:4096}),qP=(Z)=>{let X=at.get(Z);if(X)return X;let J=KC(Z.toLowerCase());return at.set(Z,J),J};class NE extends Bx{constructor(){super({max:256})}}class Ye extends Bx{constructor(Z=16384){super({maxSize:Z,sizeCalculation:(X)=>X.length+1})}}var $e=Symbol("PathScurry setAsCwd");class b3{name;root;roots;parent;nocase;isCWD=!1;#Z;#J;get dev(){return this.#J}#$;get mode(){return this.#$}#X;get nlink(){return this.#X}#q;get uid(){return this.#q}#G;get gid(){return this.#G}#M;get rdev(){return this.#M}#W;get blksize(){return this.#W}#Q;get ino(){return this.#Q}#B;get size(){return this.#B}#x;get blocks(){return this.#x}#z;get atimeMs(){return this.#z}#K;get mtimeMs(){return this.#K}#N;get ctimeMs(){return this.#N}#C;get birthtimeMs(){return this.#C}#U;get atime(){return this.#U}#F;get mtime(){return this.#F}#P;get ctime(){return this.#P}#D;get birthtime(){return this.#D}#R;#O;#H;#j;#L;#v;#Y;#k;#S;#T;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(Z,X=IJ,J,Y,$,q,Q){if(this.name=Z,this.#R=$?qP(Z):KC(Z),this.#Y=X&EE0,this.nocase=$,this.roots=Y,this.root=J||this,this.#k=q,this.#H=Q.fullpath,this.#L=Q.relative,this.#v=Q.relativePosix,this.parent=Q.parent,this.parent)this.#Z=this.parent.#Z;else this.#Z=rt(Q.fs)}depth(){if(this.#O!==void 0)return this.#O;if(!this.parent)return this.#O=0;return this.#O=this.parent.depth()+1}childrenCache(){return this.#k}resolve(Z){if(!Z)return this;let X=this.getRootString(Z),Y=Z.substring(X.length).split(this.splitSep);return X?this.getRoot(X).#E(Y):this.#E(Y)}#E(Z){let X=this;for(let J of Z)X=X.child(J);return X}children(){let Z=this.#k.get(this);if(Z)return Z;let X=Object.assign([],{provisional:0});return this.#k.set(this,X),this.#Y&=~FE,X}child(Z,X){if(Z===""||Z===".")return this;if(Z==="..")return this.parent||this;let J=this.children(),Y=this.nocase?qP(Z):KC(Z);for(let z of J)if(z.#R===Y)return z;let $=this.parent?this.sep:"",q=this.#H?this.#H+$+Z:void 0,Q=this.newChild(Z,IJ,{...X,parent:this,fullpath:q});if(!this.canReaddir())Q.#Y|=$$;return J.push(Q),Q}relative(){if(this.isCWD)return"";if(this.#L!==void 0)return this.#L;let Z=this.name,X=this.parent;if(!X)return this.#L=this.name;let J=X.relative();return J+(!J||!X.parent?"":this.sep)+Z}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#v!==void 0)return this.#v;let Z=this.name,X=this.parent;if(!X)return this.#v=this.fullpathPosix();let J=X.relativePosix();return J+(!J||!X.parent?"":"/")+Z}fullpath(){if(this.#H!==void 0)return this.#H;let Z=this.name,X=this.parent;if(!X)return this.#H=this.name;let Y=X.fullpath()+(!X.parent?"":this.sep)+Z;return this.#H=Y}fullpathPosix(){if(this.#j!==void 0)return this.#j;if(this.sep==="/")return this.#j=this.fullpath();if(!this.parent){let Y=this.fullpath().replace(/\\/g,"/");if(/^[a-z]:\//i.test(Y))return this.#j=`//?/${Y}`;else return this.#j=Y}let Z=this.parent,X=Z.fullpathPosix(),J=X+(!X||!Z.parent?"":"/")+this.name;return this.#j=J}isUnknown(){return(this.#Y&wJ)===IJ}isType(Z){return this[`is${Z}`]()}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.#Y&wJ)===Xe}isDirectory(){return(this.#Y&wJ)===Oq}isCharacterDevice(){return(this.#Y&wJ)===et}isBlockDevice(){return(this.#Y&wJ)===Ze}isFIFO(){return(this.#Y&wJ)===tt}isSocket(){return(this.#Y&wJ)===Je}isSymbolicLink(){return(this.#Y&Ux)===Ux}lstatCached(){return this.#Y&ot?this:void 0}readlinkCached(){return this.#S}realpathCached(){return this.#T}readdirCached(){let Z=this.children();return Z.slice(0,Z.provisional)}canReadlink(){if(this.#S)return!0;if(!this.parent)return!1;let Z=this.#Y&wJ;return!(Z!==IJ&&Z!==Ux||this.#Y&$P||this.#Y&$$)}calledReaddir(){return!!(this.#Y&FE)}isENOENT(){return!!(this.#Y&$$)}isNamed(Z){return!this.nocase?this.#R===KC(Z):this.#R===qP(Z)}async readlink(){let Z=this.#S;if(Z)return Z;if(!this.canReadlink())return;if(!this.parent)return;try{let X=await this.#Z.promises.readlink(this.fullpath()),J=(await this.parent.realpath())?.resolve(X);if(J)return this.#S=J}catch(X){this.#I(X.code);return}}readlinkSync(){let Z=this.#S;if(Z)return Z;if(!this.canReadlink())return;if(!this.parent)return;try{let X=this.#Z.readlinkSync(this.fullpath()),J=this.parent.realpathSync()?.resolve(X);if(J)return this.#S=J}catch(X){this.#I(X.code);return}}#m(Z){this.#Y|=FE;for(let X=Z.provisional;X<Z.length;X++){let J=Z[X];if(J)J.#_()}}#_(){if(this.#Y&$$)return;this.#Y=(this.#Y|$$)&YC,this.#c()}#c(){let Z=this.children();Z.provisional=0;for(let X of Z)X.#_()}#f(){this.#Y|=KP,this.#b()}#b(){if(this.#Y&qC)return;let Z=this.#Y;if((Z&wJ)===Oq)Z&=YC;this.#Y=Z|qC,this.#c()}#g(Z=""){if(Z==="ENOTDIR"||Z==="EPERM")this.#b();else if(Z==="ENOENT")this.#_();else this.children().provisional=0}#w(Z=""){if(Z==="ENOTDIR")this.parent.#b();else if(Z==="ENOENT")this.#_()}#I(Z=""){let X=this.#Y;if(X|=$P,Z==="ENOENT")X|=$$;if(Z==="EINVAL"||Z==="UNKNOWN")X&=YC;if(this.#Y=X,Z==="ENOTDIR"&&this.parent)this.parent.#b()}#h(Z,X){return this.#d(Z,X)||this.#u(Z,X)}#u(Z,X){let J=DE(Z),Y=this.newChild(Z.name,J,{parent:this}),$=Y.#Y&wJ;if($!==Oq&&$!==Ux&&$!==IJ)Y.#Y|=qC;return X.unshift(Y),X.provisional++,Y}#d(Z,X){for(let J=X.provisional;J<X.length;J++){let Y=X[J];if((this.nocase?qP(Z.name):KC(Z.name))!==Y.#R)continue;return this.#V(Z,Y,J,X)}}#V(Z,X,J,Y){let $=X.name;if(X.#Y=X.#Y&YC|DE(Z),$!==Z.name)X.name=Z.name;if(J!==Y.provisional){if(J===Y.length-1)Y.pop();else Y.splice(J,1);Y.unshift(X)}return Y.provisional++,X}async lstat(){if((this.#Y&$$)===0)try{return this.#p(await this.#Z.promises.lstat(this.fullpath())),this}catch(Z){this.#w(Z.code)}}lstatSync(){if((this.#Y&$$)===0)try{return this.#p(this.#Z.lstatSync(this.fullpath())),this}catch(Z){this.#w(Z.code)}}#p(Z){let{atime:X,atimeMs:J,birthtime:Y,birthtimeMs:$,blksize:q,blocks:Q,ctime:z,ctimeMs:G,dev:V,gid:x,ino:H,mode:U,mtime:F,mtimeMs:N,nlink:C,rdev:_,size:R,uid:P}=Z;this.#U=X,this.#z=J,this.#D=Y,this.#C=$,this.#W=q,this.#x=Q,this.#P=z,this.#N=G,this.#J=V,this.#G=x,this.#Q=H,this.#$=U,this.#F=F,this.#K=N,this.#X=C,this.#M=_,this.#B=R,this.#q=P;let A=DE(Z);if(this.#Y=this.#Y&YC|A|ot,A!==IJ&&A!==Oq&&A!==Ux)this.#Y|=qC}#y=[];#A=!1;#l(Z){this.#A=!1;let X=this.#y.slice();this.#y.length=0,X.forEach((J)=>J(null,Z))}readdirCB(Z,X=!1){if(!this.canReaddir()){if(X)Z(null,[]);else queueMicrotask(()=>Z(null,[]));return}let J=this.children();if(this.calledReaddir()){let $=J.slice(0,J.provisional);if(X)Z(null,$);else queueMicrotask(()=>Z(null,$));return}if(this.#y.push(Z),this.#A)return;this.#A=!0;let Y=this.fullpath();this.#Z.readdir(Y,{withFileTypes:!0},($,q)=>{if($)this.#g($.code),J.provisional=0;else{for(let Q of q)this.#h(Q,J);this.#m(J)}this.#l(J.slice(0,J.provisional));return})}#o;async readdir(){if(!this.canReaddir())return[];let Z=this.children();if(this.calledReaddir())return Z.slice(0,Z.provisional);let X=this.fullpath();if(this.#o)await this.#o;else{let J=()=>{};this.#o=new Promise((Y)=>J=Y);try{for(let Y of await this.#Z.promises.readdir(X,{withFileTypes:!0}))this.#h(Y,Z);this.#m(Z)}catch(Y){this.#g(Y.code),Z.provisional=0}this.#o=void 0,J()}return Z.slice(0,Z.provisional)}readdirSync(){if(!this.canReaddir())return[];let Z=this.children();if(this.calledReaddir())return Z.slice(0,Z.provisional);let X=this.fullpath();try{for(let J of this.#Z.readdirSync(X,{withFileTypes:!0}))this.#h(J,Z);this.#m(Z)}catch(J){this.#g(J.code),Z.provisional=0}return Z.slice(0,Z.provisional)}canReaddir(){if(this.#Y&it)return!1;let Z=wJ&this.#Y;if(!(Z===IJ||Z===Oq||Z===Ux))return!1;return!0}shouldWalk(Z,X){return(this.#Y&Oq)===Oq&&!(this.#Y&it)&&!Z.has(this)&&(!X||X(this))}async realpath(){if(this.#T)return this.#T;if((KP|$P|$$)&this.#Y)return;try{let Z=await this.#Z.promises.realpath(this.fullpath());return this.#T=this.resolve(Z)}catch(Z){this.#f()}}realpathSync(){if(this.#T)return this.#T;if((KP|$P|$$)&this.#Y)return;try{let Z=this.#Z.realpathSync(this.fullpath());return this.#T=this.resolve(Z)}catch(Z){this.#f()}}[$e](Z){if(Z===this)return;Z.isCWD=!1,this.isCWD=!0;let X=new Set([]),J=[],Y=this;while(Y&&Y.parent)X.add(Y),Y.#L=J.join(this.sep),Y.#v=J.join("/"),Y=Y.parent,J.push("..");Y=Z;while(Y&&Y.parent&&!X.has(Y))Y.#L=void 0,Y.#v=void 0,Y=Y.parent}}class QP extends b3{sep="\\";splitSep=SE0;constructor(Z,X=IJ,J,Y,$,q,Q){super(Z,X,J,Y,$,q,Q)}newChild(Z,X=IJ,J={}){return new QP(Z,X,this.root,this.roots,this.nocase,this.childrenCache(),J)}getRootString(Z){return jE.parse(Z).root}getRoot(Z){if(Z=IE0(Z.toUpperCase()),Z===this.root.name)return this.root;for(let[X,J]of Object.entries(this.roots))if(this.sameRoot(Z,X))return this.roots[Z]=J;return this.roots[Z]=new QC(Z,this).root}sameRoot(Z,X=this.root.name){return Z=Z.toUpperCase().replace(/\//g,"\\").replace(nt,"$1\\"),Z===X}}class zP extends b3{splitSep="/";sep="/";constructor(Z,X=IJ,J,Y,$,q,Q){super(Z,X,J,Y,$,q,Q)}getRootString(Z){return Z.startsWith("/")?"/":""}getRoot(Z){return this.root}newChild(Z,X=IJ,J={}){return new zP(Z,X,this.root,this.roots,this.nocase,this.childrenCache(),J)}}class LE{root;rootPath;roots;cwd;#Z;#J;#$;nocase;#X;constructor(Z=process.cwd(),X,J,{nocase:Y,childrenCacheSize:$=16384,fs:q=$C}={}){if(this.#X=rt(q),Z instanceof URL||Z.startsWith("file://"))Z=jE0(Z);let Q=X.resolve(Z);this.roots=Object.create(null),this.rootPath=this.parseRootPath(Q),this.#Z=new NE,this.#J=new NE,this.#$=new Ye($);let z=Q.substring(this.rootPath.length).split(J);if(z.length===1&&!z[0])z.pop();if(Y===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=Y,this.root=this.newRoot(this.#X),this.roots[this.rootPath]=this.root;let G=this.root,V=z.length-1,x=X.sep,H=this.rootPath,U=!1;for(let F of z){let N=V--;G=G.child(F,{relative:new Array(N).fill("..").join(x),relativePosix:new Array(N).fill("..").join("/"),fullpath:H+=(U?"":x)+F}),U=!0}this.cwd=G}depth(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.depth()}childrenCache(){return this.#$}resolve(...Z){let X="";for(let $=Z.length-1;$>=0;$--){let q=Z[$];if(!q||q===".")continue;if(X=X?`${q}/${X}`:q,this.isAbsolute(q))break}let J=this.#Z.get(X);if(J!==void 0)return J;let Y=this.cwd.resolve(X).fullpath();return this.#Z.set(X,Y),Y}resolvePosix(...Z){let X="";for(let $=Z.length-1;$>=0;$--){let q=Z[$];if(!q||q===".")continue;if(X=X?`${q}/${X}`:q,this.isAbsolute(q))break}let J=this.#J.get(X);if(J!==void 0)return J;let Y=this.cwd.resolve(X).fullpathPosix();return this.#J.set(X,Y),Y}relative(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.relative()}relativePosix(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.relativePosix()}basename(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.name}dirname(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return(Z.parent||Z).fullpath()}async readdir(Z=this.cwd,X={withFileTypes:!0}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z,Z=this.cwd;let{withFileTypes:J}=X;if(!Z.canReaddir())return[];else{let Y=await Z.readdir();return J?Y:Y.map(($)=>$.name)}}readdirSync(Z=this.cwd,X={withFileTypes:!0}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z,Z=this.cwd;let{withFileTypes:J=!0}=X;if(!Z.canReaddir())return[];else if(J)return Z.readdirSync();else return Z.readdirSync().map((Y)=>Y.name)}async lstat(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.lstat()}lstatSync(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.lstatSync()}async readlink(Z=this.cwd,{withFileTypes:X}={withFileTypes:!1}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z.withFileTypes,Z=this.cwd;let J=await Z.readlink();return X?J:J?.fullpath()}readlinkSync(Z=this.cwd,{withFileTypes:X}={withFileTypes:!1}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z.withFileTypes,Z=this.cwd;let J=Z.readlinkSync();return X?J:J?.fullpath()}async realpath(Z=this.cwd,{withFileTypes:X}={withFileTypes:!1}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z.withFileTypes,Z=this.cwd;let J=await Z.realpath();return X?J:J?.fullpath()}realpathSync(Z=this.cwd,{withFileTypes:X}={withFileTypes:!1}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z.withFileTypes,Z=this.cwd;let J=Z.realpathSync();return X?J:J?.fullpath()}async walk(Z=this.cwd,X={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z,Z=this.cwd;let{withFileTypes:J=!0,follow:Y=!1,filter:$,walkFilter:q}=X,Q=[];if(!$||$(Z))Q.push(J?Z:Z.fullpath());let z=new Set,G=(x,H)=>{z.add(x),x.readdirCB((U,F)=>{if(U)return H(U);let N=F.length;if(!N)return H();let C=()=>{if(--N===0)H()};for(let _ of F){if(!$||$(_))Q.push(J?_:_.fullpath());if(Y&&_.isSymbolicLink())_.realpath().then((R)=>R?.isUnknown()?R.lstat():R).then((R)=>R?.shouldWalk(z,q)?G(R,C):C());else if(_.shouldWalk(z,q))G(_,C);else C()}},!0)},V=Z;return new Promise((x,H)=>{G(V,(U)=>{if(U)return H(U);x(Q)})})}walkSync(Z=this.cwd,X={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z,Z=this.cwd;let{withFileTypes:J=!0,follow:Y=!1,filter:$,walkFilter:q}=X,Q=[];if(!$||$(Z))Q.push(J?Z:Z.fullpath());let z=new Set([Z]);for(let G of z){let V=G.readdirSync();for(let x of V){if(!$||$(x))Q.push(J?x:x.fullpath());let H=x;if(x.isSymbolicLink()){if(!(Y&&(H=x.realpathSync())))continue;if(H.isUnknown())H.lstatSync()}if(H.shouldWalk(z,q))z.add(H)}}return Q}[Symbol.asyncIterator](){return this.iterate()}iterate(Z=this.cwd,X={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z,Z=this.cwd;return this.stream(Z,X)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(Z=this.cwd,X={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z,Z=this.cwd;let{withFileTypes:J=!0,follow:Y=!1,filter:$,walkFilter:q}=X;if(!$||$(Z))yield J?Z:Z.fullpath();let Q=new Set([Z]);for(let z of Q){let G=z.readdirSync();for(let V of G){if(!$||$(V))yield J?V:V.fullpath();let x=V;if(V.isSymbolicLink()){if(!(Y&&(x=V.realpathSync())))continue;if(x.isUnknown())x.lstatSync()}if(x.shouldWalk(Q,q))Q.add(x)}}}stream(Z=this.cwd,X={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z,Z=this.cwd;let{withFileTypes:J=!0,follow:Y=!1,filter:$,walkFilter:q}=X,Q=new Mx({objectMode:!0});if(!$||$(Z))Q.write(J?Z:Z.fullpath());let z=new Set,G=[Z],V=0,x=()=>{let H=!1;while(!H){let U=G.shift();if(!U){if(V===0)Q.end();return}V++,z.add(U);let F=(C,_,R=!1)=>{if(C)return Q.emit("error",C);if(Y&&!R){let P=[];for(let A of _)if(A.isSymbolicLink())P.push(A.realpath().then((v)=>v?.isUnknown()?v.lstat():v));if(P.length){Promise.all(P).then(()=>F(null,_,!0));return}}for(let P of _)if(P&&(!$||$(P))){if(!Q.write(J?P:P.fullpath()))H=!0}V--;for(let P of _){let A=P.realpathCached()||P;if(A.shouldWalk(z,q))G.push(A)}if(H&&!Q.flowing)Q.once("drain",x);else if(!N)x()},N=!0;U.readdirCB(F,!0),N=!1}};return x(),Q}streamSync(Z=this.cwd,X={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof b3))X=Z,Z=this.cwd;let{withFileTypes:J=!0,follow:Y=!1,filter:$,walkFilter:q}=X,Q=new Mx({objectMode:!0}),z=new Set;if(!$||$(Z))Q.write(J?Z:Z.fullpath());let G=[Z],V=0,x=()=>{let H=!1;while(!H){let U=G.shift();if(!U){if(V===0)Q.end();return}V++,z.add(U);let F=U.readdirSync();for(let N of F)if(!$||$(N)){if(!Q.write(J?N:N.fullpath()))H=!0}V--;for(let N of F){let C=N;if(N.isSymbolicLink()){if(!(Y&&(C=N.realpathSync())))continue;if(C.isUnknown())C.lstatSync()}if(C.shouldWalk(z,q))G.push(C)}}if(H&&!Q.flowing)Q.once("drain",x)};return x(),Q}chdir(Z=this.cwd){let X=this.cwd;this.cwd=typeof Z==="string"?this.cwd.resolve(Z):Z,this.cwd[$e](X)}}class QC extends LE{sep="\\";constructor(Z=process.cwd(),X={}){let{nocase:J=!0}=X;super(Z,jE,"\\",{...X,nocase:J});this.nocase=J;for(let Y=this.cwd;Y;Y=Y.parent)Y.nocase=this.nocase}parseRootPath(Z){return jE.parse(Z).root.toUpperCase()}newRoot(Z){return new QP(this.rootPath,Oq,void 0,this.roots,this.nocase,this.childrenCache(),{fs:Z})}isAbsolute(Z){return Z.startsWith("/")||Z.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(Z)}}class zC extends LE{sep="/";constructor(Z=process.cwd(),X={}){let{nocase:J=!1}=X;super(Z,DE0,"/",{...X,nocase:J});this.nocase=J}parseRootPath(Z){return"/"}newRoot(Z){return new zP(this.rootPath,Oq,void 0,this.roots,this.nocase,this.childrenCache(),{fs:Z})}isAbsolute(Z){return Z.startsWith("/")}}class GP extends zC{constructor(Z=process.cwd(),X={}){let{nocase:J=!0}=X;super(Z,{...X,nocase:J})}}var Go1=process.platform==="win32"?QP:zP,qe=process.platform==="win32"?QC:process.platform==="darwin"?GP:zC;var kE0=(Z)=>Z.length>=1,bE0=(Z)=>Z.length>=1;class cM{#Z;#J;#$;length;#X;#q;#G;#M;#W;#Q;#B=!0;constructor(Z,X,J,Y){if(!kE0(Z))throw new TypeError("empty pattern list");if(!bE0(X))throw new TypeError("empty glob list");if(X.length!==Z.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=Z.length,J<0||J>=this.length)throw new TypeError("index out of range");if(this.#Z=Z,this.#J=X,this.#$=J,this.#X=Y,this.#$===0){if(this.isUNC()){let[$,q,Q,z,...G]=this.#Z,[V,x,H,U,...F]=this.#J;if(G[0]==="")G.shift(),F.shift();let N=[$,q,Q,z,""].join("/"),C=[V,x,H,U,""].join("/");this.#Z=[N,...G],this.#J=[C,...F],this.length=this.#Z.length}else if(this.isDrive()||this.isAbsolute()){let[$,...q]=this.#Z,[Q,...z]=this.#J;if(q[0]==="")q.shift(),z.shift();let G=$+"/",V=Q+"/";this.#Z=[G,...q],this.#J=[V,...z],this.length=this.#Z.length}}}pattern(){return this.#Z[this.#$]}isString(){return typeof this.#Z[this.#$]==="string"}isGlobstar(){return this.#Z[this.#$]===S5}isRegExp(){return this.#Z[this.#$]instanceof RegExp}globString(){return this.#G=this.#G||(this.#$===0?this.isAbsolute()?this.#J[0]+this.#J.slice(1).join("/"):this.#J.join("/"):this.#J.slice(this.#$).join("/"))}hasMore(){return this.length>this.#$+1}rest(){if(this.#q!==void 0)return this.#q;if(!this.hasMore())return this.#q=null;return this.#q=new cM(this.#Z,this.#J,this.#$+1,this.#X),this.#q.#Q=this.#Q,this.#q.#W=this.#W,this.#q.#M=this.#M,this.#q}isUNC(){let Z=this.#Z;return this.#W!==void 0?this.#W:this.#W=this.#X==="win32"&&this.#$===0&&Z[0]===""&&Z[1]===""&&typeof Z[2]==="string"&&!!Z[2]&&typeof Z[3]==="string"&&!!Z[3]}isDrive(){let Z=this.#Z;return this.#M!==void 0?this.#M:this.#M=this.#X==="win32"&&this.#$===0&&this.length>1&&typeof Z[0]==="string"&&/^[a-z]:$/i.test(Z[0])}isAbsolute(){let Z=this.#Z;return this.#Q!==void 0?this.#Q:this.#Q=Z[0]===""&&Z.length>1||this.isDrive()||this.isUNC()}root(){let Z=this.#Z[0];return typeof Z==="string"&&this.isAbsolute()&&this.#$===0?Z:""}checkFollowGlobstar(){return!(this.#$===0||!this.isGlobstar()||!this.#B)}markFollowGlobstar(){if(this.#$===0||!this.isGlobstar()||!this.#B)return!1;return this.#B=!1,!0}}var yE0=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class GC{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(Z,{nobrace:X,nocase:J,noext:Y,noglobstar:$,platform:q=yE0}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=q,this.mmopts={dot:!0,nobrace:X,nocase:J,noext:Y,noglobstar:$,optimizationLevel:2,platform:q,nocomment:!0,nonegate:!0};for(let Q of Z)this.add(Q)}add(Z){let X=new AJ(Z,this.mmopts);for(let J=0;J<X.set.length;J++){let Y=X.set[J],$=X.globParts[J];if(!Y||!$)throw new Error("invalid pattern object");while(Y[0]==="."&&$[0]===".")Y.shift(),$.shift();let q=new cM(Y,$,0,this.platform),Q=new AJ(q.globString(),this.mmopts),z=$[$.length-1]==="**",G=q.isAbsolute();if(G)this.absolute.push(Q);else this.relative.push(Q);if(z)if(G)this.absoluteChildren.push(Q);else this.relativeChildren.push(Q)}}ignored(Z){let X=Z.fullpath(),J=`${X}/`,Y=Z.relative()||".",$=`${Y}/`;for(let q of this.relative)if(q.match(Y)||q.match($))return!0;for(let q of this.absolute)if(q.match(X)||q.match(J))return!0;return!1}childrenIgnored(Z){let X=Z.fullpath()+"/",J=(Z.relative()||".")+"/";for(let Y of this.relativeChildren)if(Y.match(J))return!0;for(let Y of this.absoluteChildren)if(Y.match(X))return!0;return!1}}class CE{store;constructor(Z=new Map){this.store=Z}copy(){return new CE(new Map(this.store))}hasWalked(Z,X){return this.store.get(Z.fullpath())?.has(X.globString())}storeWalked(Z,X){let J=Z.fullpath(),Y=this.store.get(J);if(Y)Y.add(X.globString());else this.store.set(J,new Set([X.globString()]))}}class Ke{store=new Map;add(Z,X,J){let Y=(X?2:0)|(J?1:0),$=this.store.get(Z);this.store.set(Z,$===void 0?Y:Y&$)}entries(){return[...this.store.entries()].map(([Z,X])=>[Z,!!(X&2),!!(X&1)])}}class Qe{store=new Map;add(Z,X){if(!Z.canReaddir())return;let J=this.store.get(Z);if(J){if(!J.find((Y)=>Y.globString()===X.globString()))J.push(X)}else this.store.set(Z,[X])}get(Z){let X=this.store.get(Z);if(!X)throw new Error("attempting to walk unknown path");return X}entries(){return this.keys().map((Z)=>[Z,this.store.get(Z)])}keys(){return[...this.store.keys()].filter((Z)=>Z.canReaddir())}}class VC{hasWalkedCache;matches=new Ke;subwalks=new Qe;patterns;follow;dot;opts;constructor(Z,X){this.opts=Z,this.follow=!!Z.follow,this.dot=!!Z.dot,this.hasWalkedCache=X?X.copy():new CE}processPatterns(Z,X){this.patterns=X;let J=X.map((Y)=>[Z,Y]);for(let[Y,$]of J){this.hasWalkedCache.storeWalked(Y,$);let q=$.root(),Q=$.isAbsolute()&&this.opts.absolute!==!1;if(q){Y=Y.resolve(q==="/"&&this.opts.root!==void 0?this.opts.root:q);let x=$.rest();if(!x){this.matches.add(Y,!0,!1);continue}else $=x}if(Y.isENOENT())continue;let z,G,V=!1;while(typeof(z=$.pattern())==="string"&&(G=$.rest()))Y=Y.resolve(z),$=G,V=!0;if(z=$.pattern(),G=$.rest(),V){if(this.hasWalkedCache.hasWalked(Y,$))continue;this.hasWalkedCache.storeWalked(Y,$)}if(typeof z==="string"){let x=z===".."||z===""||z===".";this.matches.add(Y.resolve(z),Q,x);continue}else if(z===S5){if(!Y.isSymbolicLink()||this.follow||$.checkFollowGlobstar())this.subwalks.add(Y,$);let x=G?.pattern(),H=G?.rest();if(!G||(x===""||x===".")&&!H)this.matches.add(Y,Q,x===""||x===".");else if(x===".."){let U=Y.parent||Y;if(!H)this.matches.add(U,Q,!0);else if(!this.hasWalkedCache.hasWalked(U,H))this.subwalks.add(U,H)}}else if(z instanceof RegExp)this.subwalks.add(Y,$)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new VC(this.opts,this.hasWalkedCache)}filterEntries(Z,X){let J=this.subwalks.get(Z),Y=this.child();for(let $ of X)for(let q of J){let Q=q.isAbsolute(),z=q.pattern(),G=q.rest();if(z===S5)Y.testGlobstar($,q,G,Q);else if(z instanceof RegExp)Y.testRegExp($,z,G,Q);else Y.testString($,z,G,Q)}return Y}testGlobstar(Z,X,J,Y){if(this.dot||!Z.name.startsWith(".")){if(!X.hasMore())this.matches.add(Z,Y,!1);if(Z.canReaddir()){if(this.follow||!Z.isSymbolicLink())this.subwalks.add(Z,X);else if(Z.isSymbolicLink()){if(J&&X.checkFollowGlobstar())this.subwalks.add(Z,J);else if(X.markFollowGlobstar())this.subwalks.add(Z,X)}}}if(J){let $=J.pattern();if(typeof $==="string"&&$!==".."&&$!==""&&$!==".")this.testString(Z,$,J.rest(),Y);else if($===".."){let q=Z.parent||Z;this.subwalks.add(q,J)}else if($ instanceof RegExp)this.testRegExp(Z,$,J.rest(),Y)}}testRegExp(Z,X,J,Y){if(!X.test(Z.name))return;if(!J)this.matches.add(Z,Y,!1);else this.subwalks.add(Z,J)}testString(Z,X,J,Y){if(!Z.isNamed(X))return;if(!J)this.matches.add(Z,Y,!1);else this.subwalks.add(Z,J)}}var fE0=(Z,X)=>typeof Z==="string"?new GC([Z],X):Array.isArray(Z)?new GC(Z,X):Z;class RE{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#Z=[];#J;#$;signal;maxDepth;includeChildMatches;constructor(Z,X,J){if(this.patterns=Z,this.path=X,this.opts=J,this.#$=!J.posix&&J.platform==="win32"?"\\":"/",this.includeChildMatches=J.includeChildMatches!==!1,J.ignore||!this.includeChildMatches){if(this.#J=fE0(J.ignore??[],J),!this.includeChildMatches&&typeof this.#J.add!=="function")throw new Error("cannot ignore child matches, ignore lacks add() method.")}if(this.maxDepth=J.maxDepth||1/0,J.signal)this.signal=J.signal,this.signal.addEventListener("abort",()=>{this.#Z.length=0})}#X(Z){return this.seen.has(Z)||!!this.#J?.ignored?.(Z)}#q(Z){return!!this.#J?.childrenIgnored?.(Z)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let Z=void 0;while(!this.paused&&(Z=this.#Z.shift()))Z()}onResume(Z){if(this.signal?.aborted)return;if(!this.paused)Z();else this.#Z.push(Z)}async matchCheck(Z,X){if(X&&this.opts.nodir)return;let J;if(this.opts.realpath){if(J=Z.realpathCached()||await Z.realpath(),!J)return;Z=J}let $=Z.isUnknown()||this.opts.stat?await Z.lstat():Z;if(this.opts.follow&&this.opts.nodir&&$?.isSymbolicLink()){let q=await $.realpath();if(q&&(q.isUnknown()||this.opts.stat))await q.lstat()}return this.matchCheckTest($,X)}matchCheckTest(Z,X){return Z&&(this.maxDepth===1/0||Z.depth()<=this.maxDepth)&&(!X||Z.canReaddir())&&(!this.opts.nodir||!Z.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!Z.isSymbolicLink()||!Z.realpathCached()?.isDirectory())&&!this.#X(Z)?Z:void 0}matchCheckSync(Z,X){if(X&&this.opts.nodir)return;let J;if(this.opts.realpath){if(J=Z.realpathCached()||Z.realpathSync(),!J)return;Z=J}let $=Z.isUnknown()||this.opts.stat?Z.lstatSync():Z;if(this.opts.follow&&this.opts.nodir&&$?.isSymbolicLink()){let q=$.realpathSync();if(q&&(q?.isUnknown()||this.opts.stat))q.lstatSync()}return this.matchCheckTest($,X)}matchFinish(Z,X){if(this.#X(Z))return;if(!this.includeChildMatches&&this.#J?.add){let $=`${Z.relativePosix()}/**`;this.#J.add($)}let J=this.opts.absolute===void 0?X:this.opts.absolute;this.seen.add(Z);let Y=this.opts.mark&&Z.isDirectory()?this.#$:"";if(this.opts.withFileTypes)this.matchEmit(Z);else if(J){let $=this.opts.posix?Z.fullpathPosix():Z.fullpath();this.matchEmit($+Y)}else{let $=this.opts.posix?Z.relativePosix():Z.relative(),q=this.opts.dotRelative&&!$.startsWith(".."+this.#$)?"."+this.#$:"";this.matchEmit(!$?"."+Y:q+$+Y)}}async match(Z,X,J){let Y=await this.matchCheck(Z,J);if(Y)this.matchFinish(Y,X)}matchSync(Z,X,J){let Y=this.matchCheckSync(Z,J);if(Y)this.matchFinish(Y,X)}walkCB(Z,X,J){if(this.signal?.aborted)J();this.walkCB2(Z,X,new VC(this.opts),J)}walkCB2(Z,X,J,Y){if(this.#q(Z))return Y();if(this.signal?.aborted)Y();if(this.paused){this.onResume(()=>this.walkCB2(Z,X,J,Y));return}J.processPatterns(Z,X);let $=1,q=()=>{if(--$===0)Y()};for(let[Q,z,G]of J.matches.entries()){if(this.#X(Q))continue;$++,this.match(Q,z,G).then(()=>q())}for(let Q of J.subwalkTargets()){if(this.maxDepth!==1/0&&Q.depth()>=this.maxDepth)continue;$++;let z=Q.readdirCached();if(Q.calledReaddir())this.walkCB3(Q,z,J,q);else Q.readdirCB((G,V)=>this.walkCB3(Q,V,J,q),!0)}q()}walkCB3(Z,X,J,Y){J=J.filterEntries(Z,X);let $=1,q=()=>{if(--$===0)Y()};for(let[Q,z,G]of J.matches.entries()){if(this.#X(Q))continue;$++,this.match(Q,z,G).then(()=>q())}for(let[Q,z]of J.subwalks.entries())$++,this.walkCB2(Q,z,J.child(),q);q()}walkCBSync(Z,X,J){if(this.signal?.aborted)J();this.walkCB2Sync(Z,X,new VC(this.opts),J)}walkCB2Sync(Z,X,J,Y){if(this.#q(Z))return Y();if(this.signal?.aborted)Y();if(this.paused){this.onResume(()=>this.walkCB2Sync(Z,X,J,Y));return}J.processPatterns(Z,X);let $=1,q=()=>{if(--$===0)Y()};for(let[Q,z,G]of J.matches.entries()){if(this.#X(Q))continue;this.matchSync(Q,z,G)}for(let Q of J.subwalkTargets()){if(this.maxDepth!==1/0&&Q.depth()>=this.maxDepth)continue;$++;let z=Q.readdirSync();this.walkCB3Sync(Q,z,J,q)}q()}walkCB3Sync(Z,X,J,Y){J=J.filterEntries(Z,X);let $=1,q=()=>{if(--$===0)Y()};for(let[Q,z,G]of J.matches.entries()){if(this.#X(Q))continue;this.matchSync(Q,z,G)}for(let[Q,z]of J.subwalks.entries())$++,this.walkCB2Sync(Q,z,J.child(),q);q()}}class VP extends RE{matches=new Set;constructor(Z,X,J){super(Z,X,J)}matchEmit(Z){this.matches.add(Z)}async walk(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown())await this.path.lstat();return await new Promise((Z,X)=>{this.walkCB(this.path,this.patterns,()=>{if(this.signal?.aborted)X(this.signal.reason);else Z(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown())this.path.lstatSync();return this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}}class WP extends RE{results;constructor(Z,X,J){super(Z,X,J);this.results=new Mx({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(Z){if(this.results.write(Z),!this.results.flowing)this.pause()}stream(){let Z=this.path;if(Z.isUnknown())Z.lstat().then(()=>{this.walkCB(Z,this.patterns,()=>this.results.end())});else this.walkCB(Z,this.patterns,()=>this.results.end());return this.results}streamSync(){if(this.path.isUnknown())this.path.lstatSync();return this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}var gE0=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class _q{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(Z,X){if(!X)throw new TypeError("glob options required");if(this.withFileTypes=!!X.withFileTypes,this.signal=X.signal,this.follow=!!X.follow,this.dot=!!X.dot,this.dotRelative=!!X.dotRelative,this.nodir=!!X.nodir,this.mark=!!X.mark,!X.cwd)this.cwd="";else if(X.cwd instanceof URL||X.cwd.startsWith("file://"))X.cwd=mE0(X.cwd);if(this.cwd=X.cwd||"",this.root=X.root,this.magicalBraces=!!X.magicalBraces,this.nobrace=!!X.nobrace,this.noext=!!X.noext,this.realpath=!!X.realpath,this.absolute=X.absolute,this.includeChildMatches=X.includeChildMatches!==!1,this.noglobstar=!!X.noglobstar,this.matchBase=!!X.matchBase,this.maxDepth=typeof X.maxDepth==="number"?X.maxDepth:1/0,this.stat=!!X.stat,this.ignore=X.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof Z==="string")Z=[Z];if(this.windowsPathsNoEscape=!!X.windowsPathsNoEscape||X.allowWindowsEscape===!1,this.windowsPathsNoEscape)Z=Z.map((z)=>z.replace(/\\/g,"/"));if(this.matchBase){if(X.noglobstar)throw new TypeError("base matching requires globstar");Z=Z.map((z)=>z.includes("/")?z:`./**/${z}`)}if(this.pattern=Z,this.platform=X.platform||gE0,this.opts={...X,platform:this.platform},X.scurry){if(this.scurry=X.scurry,X.nocase!==void 0&&X.nocase!==X.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let z=X.platform==="win32"?QC:X.platform==="darwin"?GP:X.platform?zC:qe;this.scurry=new z(this.cwd,{nocase:X.nocase,fs:X.fs})}this.nocase=this.scurry.nocase;let J=this.platform==="darwin"||this.platform==="win32",Y={...X,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:J,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},$=this.pattern.map((z)=>new AJ(z,Y)),[q,Q]=$.reduce((z,G)=>{return z[0].push(...G.set),z[1].push(...G.globParts),z},[[],[]]);this.patterns=q.map((z,G)=>{let V=Q[G];if(!V)throw new Error("invalid pattern object");return new cM(z,V,0,this.platform)})}async walk(){return[...await new VP(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 VP(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 WP(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 WP(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}var OE=(Z,X={})=>{if(!Array.isArray(Z))Z=[Z];for(let J of Z)if(new AJ(J,X).hasMagic())return!0;return!1};function BP(Z,X={}){return new _q(Z,X).streamSync()}function Ge(Z,X={}){return new _q(Z,X).stream()}function Ve(Z,X={}){return new _q(Z,X).walkSync()}async function ze(Z,X={}){return new _q(Z,X).walk()}function HP(Z,X={}){return new _q(Z,X).iterateSync()}function We(Z,X={}){return new _q(Z,X).iterate()}var hE0=BP,uE0=Object.assign(Ge,{sync:BP}),dE0=HP,pE0=Object.assign(We,{sync:HP}),cE0=Object.assign(Ve,{stream:BP,iterate:HP}),xP=Object.assign(ze,{glob:ze,globSync:Ve,sync:cE0,globStream:Ge,stream:uE0,globStreamSync:BP,streamSync:hE0,globIterate:We,iterate:pE0,globIterateSync:HP,iterateSync:dE0,Glob:_q,hasMagic:OE,escape:hM,unescape:J$});xP.glob=xP;var n40=S3(iE(),1);import xp0 from"fs";import Bp0 from"path";function MC(Z,X){return function J(){return Z.apply(X,arguments)}}var{toString:Eb0}=Object.prototype,{getPrototypeOf:PP}=Object,{iterator:vP,toStringTag:F10}=Symbol,TP=((Z)=>(X)=>{let J=Eb0.call(X);return Z[J]||(Z[J]=J.slice(8,-1).toLowerCase())})(Object.create(null)),K$=(Z)=>{return Z=Z.toLowerCase(),(X)=>TP(X)===Z},AP=(Z)=>(X)=>typeof X===Z,{isArray:rM}=Array,aM=AP("undefined");function UC(Z){return Z!==null&&!aM(Z)&&Z.constructor!==null&&!aM(Z.constructor)&&DZ(Z.constructor.isBuffer)&&Z.constructor.isBuffer(Z)}var D10=K$("ArrayBuffer");function kb0(Z){let X;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView)X=ArrayBuffer.isView(Z);else X=Z&&Z.buffer&&D10(Z.buffer);return X}var bb0=AP("string"),DZ=AP("function"),j10=AP("number"),FC=(Z)=>Z!==null&&typeof Z==="object",yb0=(Z)=>Z===!0||Z===!1,_P=(Z)=>{if(TP(Z)!=="object")return!1;let X=PP(Z);return(X===null||X===Object.prototype||Object.getPrototypeOf(X)===null)&&!(F10 in Z)&&!(vP in Z)},fb0=(Z)=>{if(!FC(Z)||UC(Z))return!1;try{return Object.keys(Z).length===0&&Object.getPrototypeOf(Z)===Object.prototype}catch(X){return!1}},mb0=K$("Date"),gb0=K$("File"),hb0=(Z)=>{return!!(Z&&typeof Z.uri!=="undefined")},ub0=(Z)=>Z&&typeof Z.getParts!=="undefined",db0=K$("Blob"),pb0=K$("FileList"),cb0=(Z)=>FC(Z)&&DZ(Z.pipe);function lb0(){if(typeof globalThis!=="undefined")return globalThis;if(typeof self!=="undefined")return self;if(typeof window!=="undefined")return window;if(typeof global!=="undefined")return global;return{}}var M10=lb0(),U10=typeof M10.FormData!=="undefined"?M10.FormData:void 0,ob0=(Z)=>{if(!Z)return!1;if(U10&&Z instanceof U10)return!0;let X=PP(Z);if(!X||X===Object.prototype)return!1;if(!DZ(Z.append))return!1;let J=TP(Z);return J==="formdata"||J==="object"&&DZ(Z.toString)&&Z.toString()==="[object FormData]"},ib0=K$("URLSearchParams"),[sb0,ab0,rb0,nb0]=["ReadableStream","Request","Response","Headers"].map(K$),tb0=(Z)=>{return Z.trim?Z.trim():Z.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function DC(Z,X,{allOwnKeys:J=!1}={}){if(Z===null||typeof Z==="undefined")return;let Y,$;if(typeof Z!=="object")Z=[Z];if(rM(Z))for(Y=0,$=Z.length;Y<$;Y++)X.call(null,Z[Y],Y,Z);else{if(UC(Z))return;let q=J?Object.getOwnPropertyNames(Z):Object.keys(Z),Q=q.length,z;for(Y=0;Y<Q;Y++)z=q[Y],X.call(null,Z[z],z,Z)}}function N10(Z,X){if(UC(Z))return null;X=X.toLowerCase();let J=Object.keys(Z),Y=J.length,$;while(Y-- >0)if($=J[Y],X===$.toLowerCase())return $;return null}var Dx=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})(),L10=(Z)=>!aM(Z)&&Z!==Dx;function sE(...Z){let{caseless:X,skipUndefined:J}=L10(this)&&this||{},Y={},$=(q,Q)=>{if(Q==="__proto__"||Q==="constructor"||Q==="prototype")return;let z=X&&N10(Y,Q)||Q,G=aE(Y,z)?Y[z]:void 0;if(_P(G)&&_P(q))Y[z]=sE(G,q);else if(_P(q))Y[z]=sE({},q);else if(rM(q))Y[z]=q.slice();else if(!J||!aM(q))Y[z]=q};for(let q=0,Q=Z.length;q<Q;q++)Z[q]&&DC(Z[q],$);return Y}var eb0=(Z,X,J,{allOwnKeys:Y}={})=>{return DC(X,($,q)=>{if(J&&DZ($))Object.defineProperty(Z,q,{__proto__:null,value:MC($,J),writable:!0,enumerable:!0,configurable:!0});else Object.defineProperty(Z,q,{__proto__:null,value:$,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:Y}),Z},Zy0=(Z)=>{if(Z.charCodeAt(0)===65279)Z=Z.slice(1);return Z},Xy0=(Z,X,J,Y)=>{Z.prototype=Object.create(X.prototype,Y),Object.defineProperty(Z.prototype,"constructor",{__proto__:null,value:Z,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(Z,"super",{__proto__:null,value:X.prototype}),J&&Object.assign(Z.prototype,J)},Jy0=(Z,X,J,Y)=>{let $,q,Q,z={};if(X=X||{},Z==null)return X;do{$=Object.getOwnPropertyNames(Z),q=$.length;while(q-- >0)if(Q=$[q],(!Y||Y(Q,Z,X))&&!z[Q])X[Q]=Z[Q],z[Q]=!0;Z=J!==!1&&PP(Z)}while(Z&&(!J||J(Z,X))&&Z!==Object.prototype);return X},Yy0=(Z,X,J)=>{if(Z=String(Z),J===void 0||J>Z.length)J=Z.length;J-=X.length;let Y=Z.indexOf(X,J);return Y!==-1&&Y===J},$y0=(Z)=>{if(!Z)return null;if(rM(Z))return Z;let X=Z.length;if(!j10(X))return null;let J=new Array(X);while(X-- >0)J[X]=Z[X];return J},qy0=((Z)=>{return(X)=>{return Z&&X instanceof Z}})(typeof Uint8Array!=="undefined"&&PP(Uint8Array)),Ky0=(Z,X)=>{let Y=(Z&&Z[vP]).call(Z),$;while(($=Y.next())&&!$.done){let q=$.value;X.call(Z,q[0],q[1])}},Qy0=(Z,X)=>{let J,Y=[];while((J=Z.exec(X))!==null)Y.push(J);return Y},zy0=K$("HTMLFormElement"),Gy0=(Z)=>{return Z.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function X(J,Y,$){return Y.toUpperCase()+$})},aE=(({hasOwnProperty:Z})=>(X,J)=>Z.call(X,J))(Object.prototype),Vy0=K$("RegExp"),C10=(Z,X)=>{let J=Object.getOwnPropertyDescriptors(Z),Y={};DC(J,($,q)=>{let Q;if((Q=X($,q,Z))!==!1)Y[q]=Q||$}),Object.defineProperties(Z,Y)},Wy0=(Z)=>{C10(Z,(X,J)=>{if(DZ(Z)&&["arguments","caller","callee"].includes(J))return!1;let Y=Z[J];if(!DZ(Y))return;if(X.enumerable=!1,"writable"in X){X.writable=!1;return}if(!X.set)X.set=()=>{throw Error("Can not rewrite read-only method '"+J+"'")}})},xy0=(Z,X)=>{let J={},Y=($)=>{$.forEach((q)=>{J[q]=!0})};return rM(Z)?Y(Z):Y(String(Z).split(X)),J},By0=()=>{},Hy0=(Z,X)=>{return Z!=null&&Number.isFinite(Z=+Z)?Z:X};function My0(Z){return!!(Z&&DZ(Z.append)&&Z[F10]==="FormData"&&Z[vP])}var Uy0=(Z)=>{let X=new Array(10),J=(Y,$)=>{if(FC(Y)){if(X.indexOf(Y)>=0)return;if(UC(Y))return Y;if(!("toJSON"in Y)){X[$]=Y;let q=rM(Y)?[]:{};return DC(Y,(Q,z)=>{let G=J(Q,$+1);!aM(G)&&(q[z]=G)}),X[$]=void 0,q}}return Y};return J(Z,0)},Fy0=K$("AsyncFunction"),Dy0=(Z)=>Z&&(FC(Z)||DZ(Z))&&DZ(Z.then)&&DZ(Z.catch),R10=((Z,X)=>{if(Z)return setImmediate;return X?((J,Y)=>{return Dx.addEventListener("message",({source:$,data:q})=>{if($===Dx&&q===J)Y.length&&Y.shift()()},!1),($)=>{Y.push($),Dx.postMessage(J,"*")}})(`axios@${Math.random()}`,[]):(J)=>setTimeout(J)})(typeof setImmediate==="function",DZ(Dx.postMessage)),jy0=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(Dx):typeof process!=="undefined"&&process.nextTick||R10,Ny0=(Z)=>Z!=null&&DZ(Z[vP]),E0={isArray:rM,isArrayBuffer:D10,isBuffer:UC,isFormData:ob0,isArrayBufferView:kb0,isString:bb0,isNumber:j10,isBoolean:yb0,isObject:FC,isPlainObject:_P,isEmptyObject:fb0,isReadableStream:sb0,isRequest:ab0,isResponse:rb0,isHeaders:nb0,isUndefined:aM,isDate:mb0,isFile:gb0,isReactNativeBlob:hb0,isReactNative:ub0,isBlob:db0,isRegExp:Vy0,isFunction:DZ,isStream:cb0,isURLSearchParams:ib0,isTypedArray:qy0,isFileList:pb0,forEach:DC,merge:sE,extend:eb0,trim:tb0,stripBOM:Zy0,inherits:Xy0,toFlatObject:Jy0,kindOf:TP,kindOfTest:K$,endsWith:Yy0,toArray:$y0,forEachEntry:Ky0,matchAll:Qy0,isHTMLForm:zy0,hasOwnProperty:aE,hasOwnProp:aE,reduceDescriptors:C10,freezeMethods:Wy0,toObjectSet:xy0,toCamelCase:Gy0,noop:By0,toFiniteNumber:Hy0,findKey:N10,global:Dx,isContextDefined:L10,isSpecCompliantForm:My0,toJSONObject:Uy0,isAsyncFn:Fy0,isThenable:Dy0,setImmediate:R10,asap:jy0,isIterable:Ny0};var Ly0=E0.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),O10=(Z)=>{let X={},J,Y,$;return Z&&Z.split(`
93
93
  `).forEach(function q(Q){if($=Q.indexOf(":"),J=Q.substring(0,$).trim().toLowerCase(),Y=Q.substring($+1).trim(),!J||X[J]&&Ly0[J])return;if(J==="set-cookie")if(X[J])X[J].push(Y);else X[J]=[Y];else X[J]=X[J]?X[J]+", "+Y:Y}),X};var _10=Symbol("internals"),Cy0=/[^\x09\x20-\x7E\x80-\xFF]/g;function Ry0(Z){let X=0,J=Z.length;while(X<J){let Y=Z.charCodeAt(X);if(Y!==9&&Y!==32)break;X+=1}while(J>X){let Y=Z.charCodeAt(J-1);if(Y!==9&&Y!==32)break;J-=1}return X===0&&J===Z.length?Z:Z.slice(X,J)}function jC(Z){return Z&&String(Z).trim().toLowerCase()}function Oy0(Z){return Ry0(Z.replace(Cy0,""))}function wP(Z){if(Z===!1||Z==null)return Z;return E0.isArray(Z)?Z.map(wP):Oy0(String(Z))}function _y0(Z){let X=Object.create(null),J=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,Y;while(Y=J.exec(Z))X[Y[1]]=Y[2];return X}var Py0=(Z)=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(Z.trim());function rE(Z,X,J,Y,$){if(E0.isFunction(Y))return Y.call(this,X,J);if($)X=J;if(!E0.isString(X))return;if(E0.isString(Y))return X.indexOf(Y)!==-1;if(E0.isRegExp(Y))return Y.test(X)}function vy0(Z){return Z.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(X,J,Y)=>{return J.toUpperCase()+Y})}function Ty0(Z,X){let J=E0.toCamelCase(" "+X);["get","set","has"].forEach((Y)=>{Object.defineProperty(Z,Y+J,{__proto__:null,value:function($,q,Q){return this[Y].call(this,X,$,q,Q)},configurable:!0})})}class NC{constructor(Z){Z&&this.set(Z)}set(Z,X,J){let Y=this;function $(Q,z,G){let V=jC(z);if(!V)throw new Error("header name must be a non-empty string");let x=E0.findKey(Y,V);if(!x||Y[x]===void 0||G===!0||G===void 0&&Y[x]!==!1)Y[x||z]=wP(Q)}let q=(Q,z)=>E0.forEach(Q,(G,V)=>$(G,V,z));if(E0.isPlainObject(Z)||Z instanceof this.constructor)q(Z,X);else if(E0.isString(Z)&&(Z=Z.trim())&&!Py0(Z))q(O10(Z),X);else if(E0.isObject(Z)&&E0.isIterable(Z)){let Q={},z,G;for(let V of Z){if(!E0.isArray(V))throw TypeError("Object iterator must return a key-value pair");Q[G=V[0]]=(z=Q[G])?E0.isArray(z)?[...z,V[1]]:[z,V[1]]:V[1]}q(Q,X)}else Z!=null&&$(X,Z,J);return this}get(Z,X){if(Z=jC(Z),Z){let J=E0.findKey(this,Z);if(J){let Y=this[J];if(!X)return Y;if(X===!0)return _y0(Y);if(E0.isFunction(X))return X.call(this,Y,J);if(E0.isRegExp(X))return X.exec(Y);throw new TypeError("parser must be boolean|regexp|function")}}}has(Z,X){if(Z=jC(Z),Z){let J=E0.findKey(this,Z);return!!(J&&this[J]!==void 0&&(!X||rE(this,this[J],J,X)))}return!1}delete(Z,X){let J=this,Y=!1;function $(q){if(q=jC(q),q){let Q=E0.findKey(J,q);if(Q&&(!X||rE(J,J[Q],Q,X)))delete J[Q],Y=!0}}if(E0.isArray(Z))Z.forEach($);else $(Z);return Y}clear(Z){let X=Object.keys(this),J=X.length,Y=!1;while(J--){let $=X[J];if(!Z||rE(this,this[$],$,Z,!0))delete this[$],Y=!0}return Y}normalize(Z){let X=this,J={};return E0.forEach(this,(Y,$)=>{let q=E0.findKey(J,$);if(q){X[q]=wP(Y),delete X[$];return}let Q=Z?vy0($):String($).trim();if(Q!==$)delete X[$];X[Q]=wP(Y),J[Q]=!0}),this}concat(...Z){return this.constructor.concat(this,...Z)}toJSON(Z){let X=Object.create(null);return E0.forEach(this,(J,Y)=>{J!=null&&J!==!1&&(X[Y]=Z&&E0.isArray(J)?J.join(", "):J)}),X}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([Z,X])=>Z+": "+X).join(`
94
94
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(Z){return Z instanceof this?Z:new this(Z)}static concat(Z,...X){let J=new this(Z);return X.forEach((Y)=>J.set(Y)),J}static accessor(Z){let J=(this[_10]=this[_10]={accessors:{}}).accessors,Y=this.prototype;function $(q){let Q=jC(q);if(!J[Q])Ty0(Y,q),J[Q]=!0}return E0.isArray(Z)?Z.forEach($):$(Z),this}}NC.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);E0.reduceDescriptors(NC.prototype,({value:Z},X)=>{let J=X[0].toUpperCase()+X.slice(1);return{get:()=>Z,set(Y){this[J]=Y}}});E0.freezeMethods(NC);var v6=NC;var Ay0="[REDACTED ****]";function wy0(Z){if(E0.hasOwnProp(Z,"toJSON"))return!0;let X=Object.getPrototypeOf(Z);while(X&&X!==Object.prototype){if(E0.hasOwnProp(X,"toJSON"))return!0;X=Object.getPrototypeOf(X)}return!1}function Iy0(Z,X){let J=new Set(X.map((q)=>String(q).toLowerCase())),Y=[],$=(q)=>{if(q===null||typeof q!=="object")return q;if(E0.isBuffer(q))return q;if(Y.indexOf(q)!==-1)return;if(q instanceof v6)q=q.toJSON();Y.push(q);let Q;if(E0.isArray(q))Q=[],q.forEach((z,G)=>{let V=$(z);if(!E0.isUndefined(V))Q[G]=V});else{if(!E0.isPlainObject(q)&&wy0(q))return Y.pop(),q;Q=Object.create(null);for(let[z,G]of Object.entries(q)){let V=J.has(z.toLowerCase())?Ay0:$(G);if(!E0.isUndefined(V))Q[z]=V}}return Y.pop(),Q};return $(Z)}class T9 extends Error{static from(Z,X,J,Y,$,q){let Q=new T9(Z.message,X||Z.code,J,Y,$);if(Q.cause=Z,Q.name=Z.name,Z.status!=null&&Q.status==null)Q.status=Z.status;return q&&Object.assign(Q,q),Q}constructor(Z,X,J,Y,$){super(Z);if(Object.defineProperty(this,"message",{__proto__:null,value:Z,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,X&&(this.code=X),J&&(this.config=J),Y&&(this.request=Y),$)this.response=$,this.status=$.status}toJSON(){let Z=this.config,X=Z&&E0.hasOwnProp(Z,"redact")?Z.redact:void 0,J=E0.isArray(X)&&X.length>0?Iy0(Z,X):E0.toJSONObject(Z);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:J,code:this.code,status:this.status}}}T9.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";T9.ERR_BAD_OPTION="ERR_BAD_OPTION";T9.ECONNABORTED="ECONNABORTED";T9.ETIMEDOUT="ETIMEDOUT";T9.ECONNREFUSED="ECONNREFUSED";T9.ERR_NETWORK="ERR_NETWORK";T9.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";T9.ERR_DEPRECATED="ERR_DEPRECATED";T9.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";T9.ERR_BAD_REQUEST="ERR_BAD_REQUEST";T9.ERR_CANCELED="ERR_CANCELED";T9.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";T9.ERR_INVALID_URL="ERR_INVALID_URL";T9.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var T1=T9;var P10=S3(iE(),1),IP=P10.default;function tE(Z){return E0.isPlainObject(Z)||E0.isArray(Z)}function v10(Z){return E0.endsWith(Z,"[]")?Z.slice(0,-2):Z}function nE(Z,X,J){if(!Z)return X;return Z.concat(X).map(function Y($,q){return $=v10($),!J&&q?"["+$+"]":$}).join(J?".":"")}function Sy0(Z){return E0.isArray(Z)&&!Z.some(tE)}var Ey0=E0.toFlatObject(E0,{},null,function Z(X){return/^is[A-Z]/.test(X)});function ky0(Z,X,J){if(!E0.isObject(Z))throw new TypeError("target must be an object");X=X||new(IP||FormData),J=E0.toFlatObject(J,{metaTokens:!0,dots:!1,indexes:!1},!1,function C(_,R){return!E0.isUndefined(R[_])});let Y=J.metaTokens,$=J.visitor||H,q=J.dots,Q=J.indexes,z=J.Blob||typeof Blob!=="undefined"&&Blob,G=J.maxDepth===void 0?100:J.maxDepth,V=z&&E0.isSpecCompliantForm(X);if(!E0.isFunction($))throw new TypeError("visitor must be a function");function x(C){if(C===null)return"";if(E0.isDate(C))return C.toISOString();if(E0.isBoolean(C))return C.toString();if(!V&&E0.isBlob(C))throw new T1("Blob is not supported. Use a Buffer instead.");if(E0.isArrayBuffer(C)||E0.isTypedArray(C))return V&&typeof Blob==="function"?new Blob([C]):Buffer.from(C);return C}function H(C,_,R){let P=C;if(E0.isReactNative(X)&&E0.isReactNativeBlob(C))return X.append(nE(R,_,q),x(C)),!1;if(C&&!R&&typeof C==="object"){if(E0.endsWith(_,"{}"))_=Y?_:_.slice(0,-2),C=JSON.stringify(C);else if(E0.isArray(C)&&Sy0(C)||(E0.isFileList(C)||E0.endsWith(_,"[]"))&&(P=E0.toArray(C)))return _=v10(_),P.forEach(function A(v,E){!(E0.isUndefined(v)||v===null)&&X.append(Q===!0?nE([_],E,q):Q===null?_:_+"[]",x(v))}),!1}if(tE(C))return!0;return X.append(nE(R,_,q),x(C)),!1}let U=[],F=Object.assign(Ey0,{defaultVisitor:H,convertValue:x,isVisitable:tE});function N(C,_,R=0){if(E0.isUndefined(C))return;if(R>G)throw new T1("Object is too deeply nested ("+R+" levels). Max depth: "+G,T1.ERR_FORM_DATA_DEPTH_EXCEEDED);if(U.indexOf(C)!==-1)throw Error("Circular reference detected in "+_.join("."));U.push(C),E0.forEach(C,function P(A,v){if((!(E0.isUndefined(A)||A===null)&&$.call(X,A,E0.isString(v)?v.trim():v,_,F))===!0)N(A,_?_.concat(v):[v],R+1)}),U.pop()}if(!E0.isObject(Z))throw new TypeError("data must be an object");return N(Z),X}var AG=ky0;function T10(Z){let X={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(Z).replace(/[!'()~]|%20/g,function J(Y){return X[Y]})}function A10(Z,X){this._pairs=[],Z&&AG(Z,this,X)}var w10=A10.prototype;w10.append=function Z(X,J){this._pairs.push([X,J])};w10.toString=function Z(X){let J=X?function(Y){return X.call(this,Y,T10)}:T10;return this._pairs.map(function Y($){return J($[0])+"="+J($[1])},"").join("&")};var I10=A10;function by0(Z){return encodeURIComponent(Z).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function jx(Z,X,J){if(!X)return Z;let Y=J&&J.encode||by0,$=E0.isFunction(J)?{serialize:J}:J,q=$&&$.serialize,Q;if(q)Q=q(X,$);else Q=E0.isURLSearchParams(X)?X.toString():new I10(X,$).toString(Y);if(Q){let z=Z.indexOf("#");if(z!==-1)Z=Z.slice(0,z);Z+=(Z.indexOf("?")===-1?"?":"&")+Q}return Z}class S10{constructor(){this.handlers=[]}use(Z,X,J){return this.handlers.push({fulfilled:Z,rejected:X,synchronous:J?J.synchronous:!1,runWhen:J?J.runWhen:null}),this.handlers.length-1}eject(Z){if(this.handlers[Z])this.handlers[Z]=null}clear(){if(this.handlers)this.handlers=[]}forEach(Z){E0.forEach(this.handlers,function X(J){if(J!==null)Z(J)})}}var eE=S10;var wG={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0};import fy0 from"crypto";import yy0 from"url";var E10=yy0.URLSearchParams;var Zk="abcdefghijklmnopqrstuvwxyz",k10="0123456789",b10={DIGIT:k10,ALPHA:Zk,ALPHA_DIGIT:Zk+Zk.toUpperCase()+k10},my0=(Z=16,X=b10.ALPHA_DIGIT)=>{let J="",{length:Y}=X,$=new Uint32Array(Z);fy0.randomFillSync($);for(let q=0;q<Z;q++)J+=X[$[q]%Y];return J},y10={isNode:!0,classes:{URLSearchParams:E10,FormData:IP,Blob:typeof Blob!=="undefined"&&Blob||null},ALPHABET:b10,generateString:my0,protocols:["http","https","file","data"]};var Yk={};an(Yk,{origin:()=>uy0,navigator:()=>Xk,hasStandardBrowserWebWorkerEnv:()=>hy0,hasStandardBrowserEnv:()=>gy0,hasBrowserEnv:()=>Jk});var Jk=typeof window!=="undefined"&&typeof document!=="undefined",Xk=typeof navigator==="object"&&navigator||void 0,gy0=Jk&&(!Xk||["ReactNative","NativeScript","NS"].indexOf(Xk.product)<0),hy0=(()=>{return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})(),uy0=Jk&&window.location.href||"http://localhost";var D4={...Yk,...y10};function $k(Z,X){return AG(Z,new D4.classes.URLSearchParams,{visitor:function(J,Y,$,q){if(D4.isNode&&E0.isBuffer(J))return this.append(Y,J.toString("base64")),!1;return q.defaultVisitor.apply(this,arguments)},...X})}function dy0(Z){return E0.matchAll(/\w+|\[(\w*)]/g,Z).map((X)=>{return X[0]==="[]"?"":X[1]||X[0]})}function py0(Z){let X={},J=Object.keys(Z),Y,$=J.length,q;for(Y=0;Y<$;Y++)q=J[Y],X[q]=Z[q];return X}function cy0(Z){function X(J,Y,$,q){let Q=J[q++];if(Q==="__proto__")return!0;let z=Number.isFinite(+Q),G=q>=J.length;if(Q=!Q&&E0.isArray($)?$.length:Q,G){if(E0.hasOwnProp($,Q))$[Q]=E0.isArray($[Q])?$[Q].concat(Y):[$[Q],Y];else $[Q]=Y;return!z}if(!$[Q]||!E0.isObject($[Q]))$[Q]=[];if(X(J,Y,$[Q],q)&&E0.isArray($[Q]))$[Q]=py0($[Q]);return!z}if(E0.isFormData(Z)&&E0.isFunction(Z.entries)){let J={};return E0.forEachEntry(Z,(Y,$)=>{X(dy0(Y),$,J,0)}),J}return null}var SP=cy0;var nM=(Z,X)=>Z!=null&&E0.hasOwnProp(Z,X)?Z[X]:void 0;function ly0(Z,X,J){if(E0.isString(Z))try{return(X||JSON.parse)(Z),E0.trim(Z)}catch(Y){if(Y.name!=="SyntaxError")throw Y}return(J||JSON.stringify)(Z)}var qk={transitional:wG,adapter:["xhr","http","fetch"],transformRequest:[function Z(X,J){let Y=J.getContentType()||"",$=Y.indexOf("application/json")>-1,q=E0.isObject(X);if(q&&E0.isHTMLForm(X))X=new FormData(X);if(E0.isFormData(X))return $?JSON.stringify(SP(X)):X;if(E0.isArrayBuffer(X)||E0.isBuffer(X)||E0.isStream(X)||E0.isFile(X)||E0.isBlob(X)||E0.isReadableStream(X))return X;if(E0.isArrayBufferView(X))return X.buffer;if(E0.isURLSearchParams(X))return J.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),X.toString();let z;if(q){let G=nM(this,"formSerializer");if(Y.indexOf("application/x-www-form-urlencoded")>-1)return $k(X,G).toString();if((z=E0.isFileList(X))||Y.indexOf("multipart/form-data")>-1){let V=nM(this,"env"),x=V&&V.FormData;return AG(z?{"files[]":X}:X,x&&new x,G)}}if(q||$)return J.setContentType("application/json",!1),ly0(X);return X}],transformResponse:[function Z(X){let J=nM(this,"transitional")||qk.transitional,Y=J&&J.forcedJSONParsing,$=nM(this,"responseType"),q=$==="json";if(E0.isResponse(X)||E0.isReadableStream(X))return X;if(X&&E0.isString(X)&&(Y&&!$||q)){let z=!(J&&J.silentJSONParsing)&&q;try{return JSON.parse(X,nM(this,"parseReviver"))}catch(G){if(z){if(G.name==="SyntaxError")throw T1.from(G,T1.ERR_BAD_RESPONSE,this,null,nM(this,"response"));throw G}}}return X}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:D4.classes.FormData,Blob:D4.classes.Blob},validateStatus:function Z(X){return X>=200&&X<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};E0.forEach(["delete","get","head","post","put","patch","query"],(Z)=>{qk.headers[Z]={}});var tM=qk;function LC(Z,X){let J=this||tM,Y=X||J,$=v6.from(Y.headers),q=Y.data;return E0.forEach(Z,function Q(z){q=z.call(J,q,$.normalize(),X?X.status:void 0)}),$.normalize(),q}function CC(Z){return!!(Z&&Z.__CANCEL__)}class f10 extends T1{constructor(Z,X,J){super(Z==null?"canceled":Z,T1.ERR_CANCELED,X,J);this.name="CanceledError",this.__CANCEL__=!0}}var LX=f10;function Pq(Z,X,J){let Y=J.config.validateStatus;if(!J.status||!Y||Y(J.status))Z(J);else X(new T1("Request failed with status code "+J.status,J.status>=400&&J.status<500?T1.ERR_BAD_REQUEST:T1.ERR_BAD_RESPONSE,J.config,J.request,J))}function Kk(Z){if(typeof Z!=="string")return!1;return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(Z)}function Qk(Z,X){return X?Z.replace(/\/?\/$/,"")+"/"+X.replace(/^\/+/,""):Z}function Nx(Z,X,J){let Y=!Kk(X);if(Z&&(Y||J===!1))return Qk(Z,X);return X}var oy0={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function iy0(Z){try{return new URL(Z)}catch{return null}}function m10(Z){var X=(typeof Z==="string"?iy0(Z):Z)||{},J=X.protocol,Y=X.host,$=X.port;if(typeof Y!=="string"||!Y||typeof J!=="string")return"";if(J=J.split(":",1)[0],Y=Y.replace(/:\d*$/,""),$=parseInt($)||oy0[J]||0,!sy0(Y,$))return"";var q=zk(J+"_proxy")||zk("all_proxy");if(q&&q.indexOf("://")===-1)q=J+"://"+q;return q}function sy0(Z,X){var J=zk("no_proxy").toLowerCase();if(!J)return!0;if(J==="*")return!1;return J.split(/[,\s]/).every(function(Y){if(!Y)return!0;var $=Y.match(/^(.+):(\d+)$/),q=$?$[1]:Y,Q=$?parseInt($[2]):0;if(Q&&Q!==X)return!0;if(!/^[.*]/.test(q))return Z!==q;if(q.charAt(0)==="*")q=q.slice(1);return!Z.endsWith(q)})}function zk(Z){return process.env[Z.toLowerCase()]||process.env[Z.toUpperCase()]||""}var T20=S3(q20(),1);import Bm0 from"http";import Hm0 from"https";import P20 from"http2";import v20 from"util";import{resolve as D20}from"path";import IG from"zlib";var LQ="1.16.0";function TC(Z){let X=/^([-+\w]{1,25}):(?:\/\/)?/.exec(Z);return X&&X[1]||""}var if0=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Ok(Z,X,J){let Y=J&&J.Blob||D4.classes.Blob,$=TC(Z);if(X===void 0&&Y)X=!0;if($==="data"){Z=$.length?Z.slice($.length+1):Z;let q=if0.exec(Z);if(!q)throw new T1("Invalid URL",T1.ERR_INVALID_URL);let Q=q[1],z=q[2],G=q[3],V=Buffer.from(decodeURIComponent(G),z?"base64":"utf8");if(X){if(!Y)throw new T1("Blob is not supported",T1.ERR_NOT_SUPPORT);return new Y([V],{type:Q})}return V}throw new T1("Unsupported protocol "+$,T1.ERR_NOT_SUPPORT)}import Q$ from"stream";import sf0 from"stream";var _k=Symbol("internals");class K20 extends sf0.Transform{constructor(Z){Z=E0.toFlatObject(Z,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(J,Y)=>{return!E0.isUndefined(Y[J])});super({readableHighWaterMark:Z.chunkSize});let X=this[_k]={timeWindow:Z.timeWindow,chunkSize:Z.chunkSize,maxRate:Z.maxRate,minChunkSize:Z.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",(J)=>{if(J==="progress"){if(!X.isCaptured)X.isCaptured=!0}})}_read(Z){let X=this[_k];if(X.onReadCallback)X.onReadCallback();return super._read(Z)}_transform(Z,X,J){let Y=this[_k],$=Y.maxRate,q=this.readableHighWaterMark,Q=Y.timeWindow,z=1000/Q,G=$/z,V=Y.minChunkSize!==!1?Math.max(Y.minChunkSize,G*0.01):0,x=(U,F)=>{let N=Buffer.byteLength(U);if(Y.bytesSeen+=N,Y.bytes+=N,Y.isCaptured&&this.emit("progress",Y.bytesSeen),this.push(U))process.nextTick(F);else Y.onReadCallback=()=>{Y.onReadCallback=null,process.nextTick(F)}},H=(U,F)=>{let N=Buffer.byteLength(U),C=null,_=q,R,P=0;if($){let A=Date.now();if(!Y.ts||(P=A-Y.ts)>=Q)Y.ts=A,R=G-Y.bytes,Y.bytes=R<0?-R:0,P=0;R=G-Y.bytes}if($){if(R<=0)return setTimeout(()=>{F(null,U)},Q-P);if(R<_)_=R}if(_&&N>_&&N-_>V)C=U.subarray(_),U=U.subarray(0,_);x(U,C?()=>{process.nextTick(F,null,C)}:F)};H(Z,function U(F,N){if(F)return J(F);if(N)H(N,U);else J(null)})}}var Pk=K20;import{EventEmitter as Mm0}from"events";import rf0 from"util";import{Readable as nf0}from"stream";var{asyncIterator:Q20}=Symbol,af0=async function*(Z){if(Z.stream)yield*Z.stream();else if(Z.arrayBuffer)yield await Z.arrayBuffer();else if(Z[Q20])yield*Z[Q20]();else yield Z},gP=af0;var tf0=D4.ALPHABET.ALPHA_DIGIT+"-_",AC=typeof TextEncoder==="function"?new TextEncoder:new rf0.TextEncoder,_x=`\r
95
95
  `,ef0=AC.encode(_x),Zm0=2;class z20{constructor(Z,X){let{escapeName:J}=this.constructor,Y=E0.isString(X),$=`Content-Disposition: form-data; name="${J(Z)}"${!Y&&X.name?`; filename="${J(X.name)}"`:""}${_x}`;if(Y)X=AC.encode(String(X).replace(/\r?\n|\r\n?/g,_x));else{let q=String(X.type||"application/octet-stream").replace(/[\r\n]/g,"");$+=`Content-Type: ${q}${_x}`}this.headers=AC.encode($+_x),this.contentLength=Y?X.byteLength:X.size,this.size=this.headers.byteLength+this.contentLength+Zm0,this.name=Z,this.value=X}async*encode(){yield this.headers;let{value:Z}=this;if(E0.isTypedArray(Z))yield Z;else yield*gP(Z);yield ef0}static escapeName(Z){return String(Z).replace(/[\r\n"]/g,(X)=>({"\r":"%0D","\n":"%0A",'"':"%22"})[X])}}var Xm0=(Z,X,J)=>{let{tag:Y="form-data-boundary",size:$=25,boundary:q=Y+"-"+D4.generateString($,tf0)}=J||{};if(!E0.isFormData(Z))throw TypeError("FormData instance required");if(q.length<1||q.length>70)throw Error("boundary must be 1-70 characters long");let Q=AC.encode("--"+q+_x),z=AC.encode("--"+q+"--"+_x),G=z.byteLength,V=Array.from(Z.entries()).map(([H,U])=>{let F=new z20(H,U);return G+=F.size,F});G+=Q.byteLength*V.length,G=E0.toFiniteNumber(G);let x={"Content-Type":`multipart/form-data; boundary=${q}`};if(Number.isFinite(G))x["Content-Length"]=G;return X&&X(x),nf0.from(async function*(){for(let H of V)yield Q,yield*H.encode();yield z}())},G20=Xm0;import Jm0 from"stream";class V20 extends Jm0.Transform{__transform(Z,X,J){this.push(Z),J()}_transform(Z,X,J){if(Z.length!==0){if(this._transform=this.__transform,Z[0]!==120){let Y=Buffer.alloc(2);Y[0]=120,Y[1]=156,this.push(Y,X)}}this.__transform(Z,X,J)}}var W20=V20;var Ym0=(Z,X)=>{return E0.isAsyncFn(Z)?function(...J){let Y=J.pop();Z.apply(this,J).then(($)=>{try{X?Y(null,...X($)):Y(null,$)}catch(q){Y(q)}},Y)}:Z},x20=Ym0;var $m0=new Set(["localhost"]),M20=(Z)=>{let X=Z.split(".");if(X.length!==4)return!1;if(X[0]!=="127")return!1;return X.every((J)=>/^\d+$/.test(J)&&Number(J)>=0&&Number(J)<=255)},qm0=(Z)=>{if(Z==="::1")return!0;let X=Z.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(X)return M20(X[1]);let J=Z.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(J){let $=parseInt(J[1],16);return $>=32512&&$<=32767}let Y=Z.split(":");if(Y.length===8){for(let $=0;$<7;$++)if(!/^0+$/.test(Y[$]))return!1;return/^0*1$/.test(Y[7])}return!1},B20=(Z)=>{if(!Z)return!1;if($m0.has(Z))return!0;if(M20(Z))return!0;return qm0(Z)},Km0={http:80,https:443,ws:80,wss:443,ftp:21},Qm0=(Z)=>{let X=Z,J=0;if(X.charAt(0)==="["){let q=X.indexOf("]");if(q!==-1){let Q=X.slice(1,q),z=X.slice(q+1);if(z.charAt(0)===":"&&/^\d+$/.test(z.slice(1)))J=Number.parseInt(z.slice(1),10);return[Q,J]}}let Y=X.indexOf(":"),$=X.lastIndexOf(":");if(Y!==-1&&Y===$&&/^\d+$/.test(X.slice($+1)))J=Number.parseInt(X.slice($+1),10),X=X.slice(0,$);return[X,J]},zm0=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,Gm0=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,Vm0=(Z)=>{if(typeof Z!=="string"||Z.indexOf(":")===-1)return Z;let X=Z.match(zm0);if(X)return X[1];let J=Z.match(Gm0);if(J){let Y=parseInt(J[1],16),$=parseInt(J[2],16);return`${Y>>8}.${Y&255}.${$>>8}.${$&255}`}return Z},H20=(Z)=>{if(!Z)return Z;if(Z.charAt(0)==="["&&Z.charAt(Z.length-1)==="]")Z=Z.slice(1,-1);return Vm0(Z.replace(/\.+$/,""))};function vk(Z){let X;try{X=new URL(Z)}catch(q){return!1}let J=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!J)return!1;if(J==="*")return!0;let Y=Number.parseInt(X.port,10)||Km0[X.protocol.split(":",1)[0]]||0,$=H20(X.hostname.toLowerCase());return J.split(/[\s,]+/).some((q)=>{if(!q)return!1;let[Q,z]=Qm0(q);if(Q=H20(Q),!Q)return!1;if(z&&z!==Y)return!1;if(Q.charAt(0)==="*")Q=Q.slice(1);if(Q.charAt(0)===".")return $.endsWith(Q);return $===Q||B20($)&&B20(Q)})}function Wm0(Z,X){Z=Z||10;let J=new Array(Z),Y=new Array(Z),$=0,q=0,Q;return X=X!==void 0?X:1000,function z(G){let V=Date.now(),x=Y[q];if(!Q)Q=V;J[$]=G,Y[$]=V;let H=q,U=0;while(H!==$)U+=J[H++],H=H%Z;if($=($+1)%Z,$===q)q=(q+1)%Z;if(V-Q<X)return;let F=x&&V-x;return F?Math.round(U*1000/F):void 0}}var U20=Wm0;function xm0(Z,X){let J=0,Y=1000/X,$,q,Q=(V,x=Date.now())=>{if(J=x,$=null,q)clearTimeout(q),q=null;Z(...V)};return[(...V)=>{let x=Date.now(),H=x-J;if(H>=Y)Q(V,x);else if($=V,!q)q=setTimeout(()=>{q=null,Q($)},Y-H)},()=>$&&Q($)]}var F20=xm0;var CQ=(Z,X,J=3)=>{let Y=0,$=U20(50,250);return F20((q)=>{let Q=q.loaded,z=q.lengthComputable?q.total:void 0,G=z!=null?Math.min(Q,z):Q,V=Math.max(0,G-Y),x=$(V);Y=Math.max(Y,G);let H={loaded:G,total:z,progress:z?G/z:void 0,bytes:V,rate:x?x:void 0,estimated:x&&z?(z-G)/x:void 0,event:q,lengthComputable:z!=null,[X?"download":"upload"]:!0};Z(H)},J)},JU=(Z,X)=>{let J=Z!=null;return[(Y)=>X[0]({lengthComputable:J,total:Z,loaded:Y}),X[1]]},YU=(Z)=>(...X)=>E0.asap(()=>Z(...X));function wC(Z){if(!Z||typeof Z!=="string")return 0;if(!Z.startsWith("data:"))return 0;let X=Z.indexOf(",");if(X<0)return 0;let J=Z.slice(5,X),Y=Z.slice(X+1);if(/;base64/i.test(J)){let{length:Q,length:z}=Y;for(let F=0;F<z;F++)if(Y.charCodeAt(F)===37&&F+2<z){let N=Y.charCodeAt(F+1),C=Y.charCodeAt(F+2);if((N>=48&&N<=57||N>=65&&N<=70||N>=97&&N<=102)&&(C>=48&&C<=57||C>=65&&C<=70||C>=97&&C<=102))Q-=2,F+=2}let G=0,V=z-1,x=(F)=>F>=2&&Y.charCodeAt(F-2)===37&&Y.charCodeAt(F-1)===51&&(Y.charCodeAt(F)===68||Y.charCodeAt(F)===100);if(V>=0){if(Y.charCodeAt(V)===61)G++,V--;else if(x(V))G++,V-=3}if(G===1&&V>=0){if(Y.charCodeAt(V)===61)G++;else if(x(V))G++}let U=Math.floor(Q/4)*3-(G||0);return U>0?U:0}if(typeof Buffer!=="undefined"&&typeof Buffer.byteLength==="function")return Buffer.byteLength(Y,"utf8");let q=0;for(let Q=0,z=Y.length;Q<z;Q++){let G=Y.charCodeAt(Q);if(G<128)q+=1;else if(G<2048)q+=2;else if(G>=55296&&G<=56319&&Q+1<z){let V=Y.charCodeAt(Q+1);if(V>=56320&&V<=57343)q+=4,Q++;else q+=3}else q+=3}return q}var j20={flush:IG.constants.Z_SYNC_FLUSH,finishFlush:IG.constants.Z_SYNC_FLUSH},Um0={flush:IG.constants.BROTLI_OPERATION_FLUSH,finishFlush:IG.constants.BROTLI_OPERATION_FLUSH},N20=E0.isFunction(IG.createBrotliDecompress),{http:Fm0,https:Dm0}=T20.default,jm0=/https:?/,Nm0=["content-type","content-length"];function Lm0(Z,X,J){if(J!=="content-only"){Z.set(X);return}Object.entries(X).forEach(([Y,$])=>{if(Nm0.includes(Y.toLowerCase()))Z.set(Y,$)})}var L20=Symbol("axios.http.socketListener"),hP=Symbol("axios.http.currentReq"),C20=D4.protocols.map((Z)=>{return Z+":"}),R20=(Z)=>{if(!E0.isString(Z))return Z;try{return decodeURIComponent(Z)}catch(X){return Z}},O20=(Z,[X,J])=>{return Z.on("end",J).on("error",J),X};class A20{constructor(){this.sessions=Object.create(null)}getSession(Z,X){X=Object.assign({sessionTimeout:1000},X);let J=this.sessions[Z];if(J){let V=J.length;for(let x=0;x<V;x++){let[H,U]=J[x];if(!H.destroyed&&!H.closed&&v20.isDeepStrictEqual(U,X))return H}}let Y=P20.connect(Z,X),$,q=()=>{if($)return;$=!0;let V=J,x=V.length,H=x;while(H--)if(V[H][0]===Y){if(x===1)delete this.sessions[Z];else V.splice(H,1);if(!Y.closed)Y.close();return}},Q=Y.request,{sessionTimeout:z}=X;if(z!=null){let V,x=0;Y.request=function(){let H=Q.apply(this,arguments);if(x++,V)clearTimeout(V),V=null;return H.once("close",()=>{if(!--x)V=setTimeout(()=>{V=null,q()},z)}),H}}Y.once("close",q);let G=[Y,X];return J?J.push(G):J=this.sessions[Z]=[G],Y}}var Cm0=new A20;function Rm0(Z,X,J){if(Z.beforeRedirects.proxy)Z.beforeRedirects.proxy(Z);if(Z.beforeRedirects.config)Z.beforeRedirects.config(Z,X,J)}function w20(Z,X,J,Y){let $=X;if(!$&&$!==!1){let q=m10(J);if(q){if(!vk(J))$=new URL(q)}}if(Y&&Z.headers){for(let q of Object.keys(Z.headers))if(q.toLowerCase()==="proxy-authorization")delete Z.headers[q]}if($){let q=$ instanceof URL,Q=(F)=>q||E0.hasOwnProp($,F)?$[F]:void 0,z=Q("username"),G=Q("password"),V=E0.hasOwnProp($,"auth")?$.auth:void 0;if(z)V=(z||"")+":"+(G||"");if(V){let F=typeof V==="object",N=F&&E0.hasOwnProp(V,"username")?V.username:void 0,C=F&&E0.hasOwnProp(V,"password")?V.password:void 0;if(Boolean(N||C))V=(N||"")+":"+(C||"");else if(F)throw new T1("Invalid proxy authorization",T1.ERR_BAD_OPTION,{proxy:$});let R=Buffer.from(V,"utf8").toString("base64");Z.headers["Proxy-Authorization"]="Basic "+R}let x=!1;for(let F of Object.keys(Z.headers))if(F.toLowerCase()==="host"){x=!0;break}if(!x)Z.headers.host=Z.hostname+(Z.port?":"+Z.port:"");let H=Q("hostname")||Q("host");Z.hostname=H,Z.host=H,Z.port=Q("port"),Z.path=J;let U=Q("protocol");if(U)Z.protocol=U.includes(":")?U:`${U}:`}Z.beforeRedirects.proxy=function q(Q){w20(Q,X,Q.href,!0)}}var Om0=typeof process!=="undefined"&&E0.kindOf(process)==="process",_m0=(Z)=>{return new Promise((X,J)=>{let Y,$,q=(G,V)=>{if($)return;$=!0,Y&&Y(G,V)},Q=(G)=>{q(G),X(G)},z=(G)=>{q(G,!0),J(G)};Z(Q,z,(G)=>Y=G).catch(z)})},Pm0=({address:Z,family:X})=>{if(!E0.isString(Z))throw TypeError("address must be a string");return{address:Z,family:X||(Z.indexOf(".")<0?6:4)}},_20=(Z,X)=>Pm0(E0.isObject(Z)?Z:{address:Z,family:X}),vm0={request(Z,X){let J=Z.protocol+"//"+Z.hostname+":"+(Z.port||(Z.protocol==="https:"?443:80)),{http2Options:Y,headers:$}=Z,q=Cm0.getSession(J,Y),{HTTP2_HEADER_SCHEME:Q,HTTP2_HEADER_METHOD:z,HTTP2_HEADER_PATH:G,HTTP2_HEADER_STATUS:V}=P20.constants,x={[Q]:Z.protocol.replace(":",""),[z]:Z.method,[G]:Z.path};E0.forEach($,(U,F)=>{F.charAt(0)!==":"&&(x[F]=U)});let H=q.request(x);return H.once("response",(U)=>{let F=H;U=Object.assign({},U);let N=U[V];delete U[V],F.headers=U,F.statusCode=+N,X(F)}),H}},I20=Om0&&function Z(X){return _m0(async function J(Y,$,q){let Q=(H0)=>E0.hasOwnProp(X,H0)?X[H0]:void 0,z=Q("data"),G=Q("lookup"),V=Q("family"),x=Q("httpVersion");if(x===void 0)x=1;let H=Q("http2Options"),U=Q("responseType"),F=Q("responseEncoding"),N=X.method.toUpperCase(),C,_=!1,R,P;if(x=+x,Number.isNaN(x))throw TypeError(`Invalid protocol version: '${X.httpVersion}' is not a number`);if(x!==1&&x!==2)throw TypeError(`Unsupported protocol version '${x}'`);let A=x===2;if(G){let H0=x20(G,(T0)=>E0.isArray(T0)?T0:[T0]);G=(T0,v0,c)=>{H0(T0,v0,(Y0,o,$0)=>{if(Y0)return c(Y0);let N0=E0.isArray(o)?o.map((j0)=>_20(j0)):[_20(o,$0)];v0.all?c(Y0,N0):c(Y0,N0[0].address,N0[0].family)})}}let v=new Mm0;function E(H0){try{v.emit("abort",!H0||H0.type?new LX(null,X,R):H0)}catch(T0){console.warn("emit error",T0)}}function k(){if(P)clearTimeout(P),P=null}function y(){let H0=X.timeout?"timeout of "+X.timeout+"ms exceeded":"timeout exceeded",T0=X.transitional||wG;if(X.timeoutErrorMessage)H0=X.timeoutErrorMessage;return new T1(H0,T0.clarifyTimeoutError?T1.ETIMEDOUT:T1.ECONNABORTED,X,R)}v.once("abort",$);let I=()=>{if(k(),X.cancelToken)X.cancelToken.unsubscribe(E);if(X.signal)X.signal.removeEventListener("abort",E);v.removeAllListeners()};if(X.cancelToken||X.signal){if(X.cancelToken&&X.cancelToken.subscribe(E),X.signal)X.signal.aborted?E():X.signal.addEventListener("abort",E)}q((H0,T0)=>{if(C=!0,k(),T0){_=!0,I();return}let{data:v0}=H0;if(v0 instanceof Q$.Readable||v0 instanceof Q$.Duplex){let c=Q$.finished(v0,()=>{c(),I()})}else I()});let S=Nx(X.baseURL,X.url,X.allowAbsoluteUrls),u=new URL(S,D4.hasBrowserEnv?D4.origin:void 0),f=u.protocol||C20[0];if(f==="data:"){if(X.maxContentLength>-1){let T0=String(X.url||S||"");if(wC(T0)>X.maxContentLength)return $(new T1("maxContentLength size of "+X.maxContentLength+" exceeded",T1.ERR_BAD_RESPONSE,X))}let H0;if(N!=="GET")return Pq(Y,$,{status:405,statusText:"method not allowed",headers:{},config:X});try{H0=Ok(X.url,U==="blob",{Blob:X.env&&X.env.Blob})}catch(T0){throw T1.from(T0,T1.ERR_BAD_REQUEST,X)}if(U==="text"){if(H0=H0.toString(F),!F||F==="utf8")H0=E0.stripBOM(H0)}else if(U==="stream")H0=Q$.Readable.from(H0);return Pq(Y,$,{data:H0,status:200,statusText:"OK",headers:new v6,config:X})}if(C20.indexOf(f)===-1)return $(new T1("Unsupported protocol "+f,T1.ERR_BAD_REQUEST,X));let i=v6.from(X.headers).normalize();i.set("User-Agent","axios/"+LQ,!1);let{onUploadProgress:Z0,onDownloadProgress:r}=X,d=X.maxRate,h=void 0,e=void 0;if(E0.isSpecCompliantForm(z)){let H0=i.getContentType(/boundary=([-_\w\d]{10,70})/i);z=G20(z,(T0)=>{i.set(T0)},{tag:`axios-${LQ}-boundary`,boundary:H0&&H0[1]||void 0})}else if(E0.isFormData(z)&&E0.isFunction(z.getHeaders)&&z.getHeaders!==Object.prototype.getHeaders){if(Lm0(i,z.getHeaders(),Q("formDataHeaderPolicy")),!i.hasContentLength())try{let H0=await v20.promisify(z.getLength).call(z);Number.isFinite(H0)&&H0>=0&&i.setContentLength(H0)}catch(H0){}}else if(E0.isBlob(z)||E0.isFile(z))z.size&&i.setContentType(z.type||"application/octet-stream"),i.setContentLength(z.size||0),z=Q$.Readable.from(gP(z));else if(z&&!E0.isStream(z)){if(Buffer.isBuffer(z));else if(E0.isArrayBuffer(z))z=Buffer.from(new Uint8Array(z));else if(E0.isString(z))z=Buffer.from(z,"utf-8");else return $(new T1("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",T1.ERR_BAD_REQUEST,X));if(i.setContentLength(z.length,!1),X.maxBodyLength>-1&&z.length>X.maxBodyLength)return $(new T1("Request body larger than maxBodyLength limit",T1.ERR_BAD_REQUEST,X))}let n=E0.toFiniteNumber(i.getContentLength());if(E0.isArray(d))h=d[0],e=d[1];else h=e=d;if(z&&(Z0||h)){if(!E0.isStream(z))z=Q$.Readable.from(z,{objectMode:!1});z=Q$.pipeline([z,new Pk({maxRate:E0.toFiniteNumber(h)})],E0.noop),Z0&&z.on("progress",O20(z,JU(n,CQ(YU(Z0),!1,3))))}let V0=void 0,F0=Q("auth");if(F0){let H0=F0.username||"",T0=F0.password||"";V0=H0+":"+T0}if(!V0&&u.username){let H0=R20(u.username),T0=R20(u.password);V0=H0+":"+T0}V0&&i.delete("authorization");let L0;try{L0=jx(u.pathname+u.search,X.params,X.paramsSerializer).replace(/^\?/,"")}catch(H0){let T0=new Error(H0.message);return T0.config=X,T0.url=X.url,T0.exists=!0,$(T0)}i.set("Accept-Encoding","gzip, compress, deflate"+(N20?", br":""),!1);let O0=Object.assign(Object.create(null),{path:L0,method:N,headers:i.toJSON(),agents:{http:X.httpAgent,https:X.httpsAgent},auth:V0,protocol:f,family:V,beforeRedirect:Rm0,beforeRedirects:Object.create(null),http2Options:H});if(!E0.isUndefined(G)&&(O0.lookup=G),X.socketPath){if(typeof X.socketPath!=="string")return $(new T1("socketPath must be a string",T1.ERR_BAD_OPTION_VALUE,X));if(X.allowedSocketPaths!=null){let H0=Array.isArray(X.allowedSocketPaths)?X.allowedSocketPaths:[X.allowedSocketPaths],T0=D20(X.socketPath);if(!H0.some((c)=>typeof c==="string"&&D20(c)===T0))return $(new T1(`socketPath "${X.socketPath}" is not permitted by allowedSocketPaths`,T1.ERR_BAD_OPTION_VALUE,X))}O0.socketPath=X.socketPath}else O0.hostname=u.hostname.startsWith("[")?u.hostname.slice(1,-1):u.hostname,O0.port=u.port,w20(O0,X.proxy,f+"//"+u.hostname+(u.port?":"+u.port:"")+O0.path);let m0,t0=!1,C0=jm0.test(O0.protocol);if(O0.agent=C0?X.httpsAgent:X.httpAgent,A)m0=vm0;else{let H0=Q("transport");if(H0)m0=H0;else if(X.maxRedirects===0)m0=C0?Hm0:Bm0,t0=!0;else{if(X.maxRedirects)O0.maxRedirects=X.maxRedirects;let T0=Q("beforeRedirect");if(T0)O0.beforeRedirects.config=T0;m0=C0?Dm0:Fm0}}if(X.maxBodyLength>-1)O0.maxBodyLength=X.maxBodyLength;else O0.maxBodyLength=1/0;O0.insecureHTTPParser=Boolean(Q("insecureHTTPParser")),R=m0.request(O0,function H0(T0){if(k(),R.destroyed)return;let v0=[T0],c=E0.toFiniteNumber(T0.headers["content-length"]);if(r||e){let N0=new Pk({maxRate:E0.toFiniteNumber(e)});r&&N0.on("progress",O20(N0,JU(c,CQ(YU(r),!0,3)))),v0.push(N0)}let Y0=T0,o=T0.req||R;if(X.decompress!==!1&&T0.headers["content-encoding"]){if(N==="HEAD"||T0.statusCode===204)delete T0.headers["content-encoding"];switch((T0.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":v0.push(IG.createUnzip(j20)),delete T0.headers["content-encoding"];break;case"deflate":v0.push(new W20),v0.push(IG.createUnzip(j20)),delete T0.headers["content-encoding"];break;case"br":if(N20)v0.push(IG.createBrotliDecompress(Um0)),delete T0.headers["content-encoding"]}}Y0=v0.length>1?Q$.pipeline(v0,E0.noop):v0[0];let $0={status:T0.statusCode,statusText:T0.statusMessage,headers:new v6(T0.headers),config:X,request:o};if(U==="stream"){if(X.maxContentLength>-1){let N0=X.maxContentLength,j0=Y0;async function*_0(){let p0=0;for await(let o0 of j0){if(p0+=o0.length,p0>N0)throw new T1("maxContentLength size of "+N0+" exceeded",T1.ERR_BAD_RESPONSE,X,o);yield o0}}Y0=Q$.Readable.from(_0(),{objectMode:!1})}$0.data=Y0,Pq(Y,$,$0)}else{let N0=[],j0=0;Y0.on("data",function _0(p0){if(N0.push(p0),j0+=p0.length,X.maxContentLength>-1&&j0>X.maxContentLength)_=!0,Y0.destroy(),E(new T1("maxContentLength size of "+X.maxContentLength+" exceeded",T1.ERR_BAD_RESPONSE,X,o))}),Y0.on("aborted",function _0(){if(_)return;let p0=new T1("stream has been aborted",T1.ERR_BAD_RESPONSE,X,o,$0);Y0.destroy(p0),$(p0)}),Y0.on("error",function _0(p0){if(_)return;$(T1.from(p0,null,X,o,$0))}),Y0.on("end",function _0(){try{let p0=N0.length===1?N0[0]:Buffer.concat(N0);if(U!=="arraybuffer"){if(p0=p0.toString(F),!F||F==="utf8")p0=E0.stripBOM(p0)}$0.data=p0}catch(p0){return $(T1.from(p0,null,X,$0.request,$0))}Pq(Y,$,$0)})}v.once("abort",(N0)=>{if(!Y0.destroyed)Y0.emit("error",N0),Y0.destroy()})}),v.once("abort",(H0)=>{if(R.close)R.close();else R.destroy(H0)}),R.on("error",function H0(T0){$(T1.from(T0,null,X,R))});let P0=new Set;if(R.on("socket",function H0(T0){if(T0.setKeepAlive(!0,60000),!T0[L20])T0.on("error",function v0(c){let Y0=T0[hP];if(Y0&&!Y0.destroyed)Y0.destroy(c)}),T0[L20]=!0;T0[hP]=R,P0.add(T0)}),R.once("close",function H0(){k();for(let T0 of P0)if(T0[hP]===R)T0[hP]=null;P0.clear()}),X.timeout){let H0=parseInt(X.timeout,10);if(Number.isNaN(H0)){E(new T1("error trying to parse `config.timeout` to int",T1.ERR_BAD_OPTION_VALUE,X,R));return}let T0=function v0(){if(C)return;E(y())};if(t0&&H0>0)P=setTimeout(T0,H0);R.setTimeout(H0,T0)}else R.setTimeout(0);if(E0.isStream(z)){let H0=!1,T0=!1;z.on("end",()=>{H0=!0}),z.once("error",(c)=>{T0=!0,R.destroy(c)}),z.on("close",()=>{if(!H0&&!T0)E(new LX("Request stream has been aborted",X,R))});let v0=z;if(X.maxBodyLength>-1&&X.maxRedirects===0){let c=X.maxBodyLength,Y0=0;v0=Q$.pipeline([z,new Q$.Transform({transform(o,$0,N0){if(Y0+=o.length,Y0>c)return N0(new T1("Request body larger than maxBodyLength limit",T1.ERR_BAD_REQUEST,X,R));N0(null,o)}})],E0.noop),v0.on("error",(o)=>{if(!R.destroyed)R.destroy(o)})}v0.pipe(R)}else z&&R.write(z),R.end()})};var S20=D4.hasStandardBrowserEnv?((Z,X)=>(J)=>{return J=new URL(J,D4.origin),Z.protocol===J.protocol&&Z.host===J.host&&(X||Z.port===J.port)})(new URL(D4.origin),D4.navigator&&/(msie|trident)/i.test(D4.navigator.userAgent)):()=>!0;var E20=D4.hasStandardBrowserEnv?{write(Z,X,J,Y,$,q,Q){if(typeof document==="undefined")return;let z=[`${Z}=${encodeURIComponent(X)}`];if(E0.isNumber(J))z.push(`expires=${new Date(J).toUTCString()}`);if(E0.isString(Y))z.push(`path=${Y}`);if(E0.isString($))z.push(`domain=${$}`);if(q===!0)z.push("secure");if(E0.isString(Q))z.push(`SameSite=${Q}`);document.cookie=z.join("; ")},read(Z){if(typeof document==="undefined")return null;let X=document.cookie.split(";");for(let J=0;J<X.length;J++){let Y=X[J].replace(/^\s+/,""),$=Y.indexOf("=");if($!==-1&&Y.slice(0,$)===Z)return decodeURIComponent(Y.slice($+1))}return null},remove(Z){this.write(Z,"",Date.now()-86400000,"/")}}:{write(){},read(){return null},remove(){}};var k20=(Z)=>Z instanceof v6?{...Z}:Z;function z$(Z,X){X=X||{};let J=Object.create(null);Object.defineProperty(J,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function Y(V,x,H,U){if(E0.isPlainObject(V)&&E0.isPlainObject(x))return E0.merge.call({caseless:U},V,x);else if(E0.isPlainObject(x))return E0.merge({},x);else if(E0.isArray(x))return x.slice();return x}function $(V,x,H,U){if(!E0.isUndefined(x))return Y(V,x,H,U);else if(!E0.isUndefined(V))return Y(void 0,V,H,U)}function q(V,x){if(!E0.isUndefined(x))return Y(void 0,x)}function Q(V,x){if(!E0.isUndefined(x))return Y(void 0,x);else if(!E0.isUndefined(V))return Y(void 0,V)}function z(V,x,H){if(E0.hasOwnProp(X,H))return Y(V,x);else if(E0.hasOwnProp(Z,H))return Y(void 0,V)}let G={url:q,method:q,data:q,baseURL:Q,transformRequest:Q,transformResponse:Q,paramsSerializer:Q,timeout:Q,timeoutMessage:Q,withCredentials:Q,withXSRFToken:Q,adapter:Q,responseType:Q,xsrfCookieName:Q,xsrfHeaderName:Q,onUploadProgress:Q,onDownloadProgress:Q,decompress:Q,maxContentLength:Q,maxBodyLength:Q,beforeRedirect:Q,transport:Q,httpAgent:Q,httpsAgent:Q,cancelToken:Q,socketPath:Q,allowedSocketPaths:Q,responseEncoding:Q,validateStatus:z,headers:(V,x,H)=>$(k20(V),k20(x),H,!0)};return E0.forEach(Object.keys({...Z,...X}),function V(x){if(x==="__proto__"||x==="constructor"||x==="prototype")return;let H=E0.hasOwnProp(G,x)?G[x]:$,U=E0.hasOwnProp(Z,x)?Z[x]:void 0,F=E0.hasOwnProp(X,x)?X[x]:void 0,N=H(U,F,x);E0.isUndefined(N)&&H!==z||(J[x]=N)}),J}var Tm0=["content-type","content-length"];function Am0(Z,X,J){if(J!=="content-only"){Z.set(X);return}Object.entries(X).forEach(([Y,$])=>{if(Tm0.includes(Y.toLowerCase()))Z.set(Y,$)})}var wm0=(Z)=>encodeURIComponent(Z).replace(/%([0-9A-F]{2})/gi,(X,J)=>String.fromCharCode(parseInt(J,16))),uP=(Z)=>{let X=z$({},Z),J=(U)=>E0.hasOwnProp(X,U)?X[U]:void 0,Y=J("data"),$=J("withXSRFToken"),q=J("xsrfHeaderName"),Q=J("xsrfCookieName"),z=J("headers"),G=J("auth"),V=J("baseURL"),x=J("allowAbsoluteUrls"),H=J("url");if(X.headers=z=v6.from(z),X.url=jx(Nx(V,H,x),Z.params,Z.paramsSerializer),G)z.set("Authorization","Basic "+btoa((G.username||"")+":"+(G.password?wm0(G.password):"")));if(E0.isFormData(Y)){if(D4.hasStandardBrowserEnv||D4.hasStandardBrowserWebWorkerEnv)z.setContentType(void 0);else if(E0.isFunction(Y.getHeaders))Am0(z,Y.getHeaders(),J("formDataHeaderPolicy"))}if(D4.hasStandardBrowserEnv){if(E0.isFunction($))$=$(X);if($===!0||$==null&&S20(X.url)){let F=q&&Q&&E20.read(Q);if(F)z.set(q,F)}}return X};var Im0=typeof XMLHttpRequest!=="undefined",b20=Im0&&function(Z){return new Promise(function X(J,Y){let $=uP(Z),q=$.data,Q=v6.from($.headers).normalize(),{responseType:z,onUploadProgress:G,onDownloadProgress:V}=$,x,H,U,F,N;function C(){F&&F(),N&&N(),$.cancelToken&&$.cancelToken.unsubscribe(x),$.signal&&$.signal.removeEventListener("abort",x)}let _=new XMLHttpRequest;_.open($.method.toUpperCase(),$.url,!0),_.timeout=$.timeout;function R(){if(!_)return;let A=v6.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),E={data:!z||z==="text"||z==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:A,config:Z,request:_};Pq(function k(y){J(y),C()},function k(y){Y(y),C()},E),_=null}if("onloadend"in _)_.onloadend=R;else _.onreadystatechange=function A(){if(!_||_.readyState!==4)return;if(_.status===0&&!(_.responseURL&&_.responseURL.startsWith("file:")))return;setTimeout(R)};if(_.onabort=function A(){if(!_)return;Y(new T1("Request aborted",T1.ECONNABORTED,Z,_)),C(),_=null},_.onerror=function A(v){let E=v&&v.message?v.message:"Network Error",k=new T1(E,T1.ERR_NETWORK,Z,_);k.event=v||null,Y(k),C(),_=null},_.ontimeout=function A(){let v=$.timeout?"timeout of "+$.timeout+"ms exceeded":"timeout exceeded",E=$.transitional||wG;if($.timeoutErrorMessage)v=$.timeoutErrorMessage;Y(new T1(v,E.clarifyTimeoutError?T1.ETIMEDOUT:T1.ECONNABORTED,Z,_)),C(),_=null},q===void 0&&Q.setContentType(null),"setRequestHeader"in _)E0.forEach(Q.toJSON(),function A(v,E){_.setRequestHeader(E,v)});if(!E0.isUndefined($.withCredentials))_.withCredentials=!!$.withCredentials;if(z&&z!=="json")_.responseType=$.responseType;if(V)[U,N]=CQ(V,!0),_.addEventListener("progress",U);if(G&&_.upload)[H,F]=CQ(G),_.upload.addEventListener("progress",H),_.upload.addEventListener("loadend",F);if($.cancelToken||$.signal){if(x=(A)=>{if(!_)return;Y(!A||A.type?new LX(null,Z,_):A),_.abort(),C(),_=null},$.cancelToken&&$.cancelToken.subscribe(x),$.signal)$.signal.aborted?x():$.signal.addEventListener("abort",x)}let P=TC($.url);if(P&&!D4.protocols.includes(P)){Y(new T1("Unsupported protocol "+P+":",T1.ERR_BAD_REQUEST,Z));return}_.send(q||null)})};var Sm0=(Z,X)=>{let{length:J}=Z=Z?Z.filter(Boolean):[];if(X||J){let Y=new AbortController,$,q=function(V){if(!$){$=!0,z();let x=V instanceof Error?V:this.reason;Y.abort(x instanceof T1?x:new LX(x instanceof Error?x.message:x))}},Q=X&&setTimeout(()=>{Q=null,q(new T1(`timeout of ${X}ms exceeded`,T1.ETIMEDOUT))},X),z=()=>{if(Z)Q&&clearTimeout(Q),Q=null,Z.forEach((V)=>{V.unsubscribe?V.unsubscribe(q):V.removeEventListener("abort",q)}),Z=null};Z.forEach((V)=>V.addEventListener("abort",q));let{signal:G}=Y;return G.unsubscribe=()=>E0.asap(z),G}},y20=Sm0;var Em0=function*(Z,X){let J=Z.byteLength;if(!X||J<X){yield Z;return}let Y=0,$;while(Y<J)$=Y+X,yield Z.slice(Y,$),Y=$},km0=async function*(Z,X){for await(let J of bm0(Z))yield*Em0(J,X)},bm0=async function*(Z){if(Z[Symbol.asyncIterator]){yield*Z;return}let X=Z.getReader();try{for(;;){let{done:J,value:Y}=await X.read();if(J)break;yield Y}}finally{await X.cancel()}},Tk=(Z,X,J,Y)=>{let $=km0(Z,X),q=0,Q,z=(G)=>{if(!Q)Q=!0,Y&&Y(G)};return new ReadableStream({async pull(G){try{let{done:V,value:x}=await $.next();if(V){z(),G.close();return}let H=x.byteLength;if(J){let U=q+=H;J(U)}G.enqueue(new Uint8Array(x))}catch(V){throw z(V),V}},cancel(G){return z(G),$.return()}},{highWaterMark:2})};var f20=65536,{isFunction:dP}=E0,m20=(Z,...X)=>{try{return!!Z(...X)}catch(J){return!1}},ym0=(Z)=>{let X=E0.global??globalThis,{ReadableStream:J,TextEncoder:Y}=X;Z=E0.merge.call({skipUndefined:!0},{Request:X.Request,Response:X.Response},Z);let{fetch:$,Request:q,Response:Q}=Z,z=$?dP($):typeof fetch==="function",G=dP(q),V=dP(Q);if(!z)return!1;let x=z&&dP(J),H=z&&(typeof Y==="function"?((R)=>(P)=>R.encode(P))(new Y):async(R)=>new Uint8Array(await new q(R).arrayBuffer())),U=G&&x&&m20(()=>{let R=!1,P=new q(D4.origin,{body:new J,method:"POST",get duplex(){return R=!0,"half"}}),A=P.headers.has("Content-Type");if(P.body!=null)P.body.cancel();return R&&!A}),F=V&&x&&m20(()=>E0.isReadableStream(new Q("").body)),N={stream:F&&((R)=>R.body)};z&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach((R)=>{!N[R]&&(N[R]=(P,A)=>{let v=P&&P[R];if(v)return v.call(P);throw new T1(`Response type '${R}' is not supported`,T1.ERR_NOT_SUPPORT,A)})})})();let C=async(R)=>{if(R==null)return 0;if(E0.isBlob(R))return R.size;if(E0.isSpecCompliantForm(R))return(await new q(D4.origin,{method:"POST",body:R}).arrayBuffer()).byteLength;if(E0.isArrayBufferView(R)||E0.isArrayBuffer(R))return R.byteLength;if(E0.isURLSearchParams(R))R=R+"";if(E0.isString(R))return(await H(R)).byteLength},_=async(R,P)=>{let A=E0.toFiniteNumber(R.getContentLength());return A==null?C(P):A};return async(R)=>{let{url:P,method:A,data:v,signal:E,cancelToken:k,timeout:y,onDownloadProgress:I,onUploadProgress:S,responseType:u,headers:f,withCredentials:i="same-origin",fetchOptions:Z0,maxContentLength:r,maxBodyLength:d}=uP(R),h=E0.isNumber(r)&&r>-1,e=E0.isNumber(d)&&d>-1,n=$||fetch;u=u?(u+"").toLowerCase():"text";let V0=y20([E,k&&k.toAbortSignal()],y),F0=null,L0=V0&&V0.unsubscribe&&(()=>{V0.unsubscribe()}),O0;try{if(h&&typeof P==="string"&&P.startsWith("data:")){if(wC(P)>r)throw new T1("maxContentLength size of "+r+" exceeded",T1.ERR_BAD_RESPONSE,R,F0)}if(e&&A!=="get"&&A!=="head"){let T0=await _(f,v);if(typeof T0==="number"&&isFinite(T0)&&T0>d)throw new T1("Request body larger than maxBodyLength limit",T1.ERR_BAD_REQUEST,R,F0)}if(S&&U&&A!=="get"&&A!=="head"&&(O0=await _(f,v))!==0){let T0=new q(P,{method:"POST",body:v,duplex:"half"}),v0;if(E0.isFormData(v)&&(v0=T0.headers.get("content-type")))f.setContentType(v0);if(T0.body){let[c,Y0]=JU(O0,CQ(YU(S)));v=Tk(T0.body,f20,c,Y0)}}if(!E0.isString(i))i=i?"include":"omit";let m0=G&&"credentials"in q.prototype;if(E0.isFormData(v)){let T0=f.getContentType();if(T0&&/^multipart\/form-data/i.test(T0)&&!/boundary=/i.test(T0))f.delete("content-type")}f.set("User-Agent","axios/"+LQ,!1);let t0={...Z0,signal:V0,method:A.toUpperCase(),headers:f.normalize().toJSON(),body:v,duplex:"half",credentials:m0?i:void 0};F0=G&&new q(P,t0);let C0=await(G?n(F0,Z0):n(P,t0));if(h){let T0=E0.toFiniteNumber(C0.headers.get("content-length"));if(T0!=null&&T0>r)throw new T1("maxContentLength size of "+r+" exceeded",T1.ERR_BAD_RESPONSE,R,F0)}let P0=F&&(u==="stream"||u==="response");if(F&&C0.body&&(I||h||P0&&L0)){let T0={};["status","statusText","headers"].forEach((N0)=>{T0[N0]=C0[N0]});let v0=E0.toFiniteNumber(C0.headers.get("content-length")),[c,Y0]=I&&JU(v0,CQ(YU(I),!0))||[],o=0,$0=(N0)=>{if(h){if(o=N0,o>r)throw new T1("maxContentLength size of "+r+" exceeded",T1.ERR_BAD_RESPONSE,R,F0)}c&&c(N0)};C0=new Q(Tk(C0.body,f20,$0,()=>{Y0&&Y0(),L0&&L0()}),T0)}u=u||"text";let H0=await N[E0.findKey(N,u)||"text"](C0,R);if(h&&!F&&!P0){let T0;if(H0!=null){if(typeof H0.byteLength==="number")T0=H0.byteLength;else if(typeof H0.size==="number")T0=H0.size;else if(typeof H0==="string")T0=typeof Y==="function"?new Y().encode(H0).byteLength:H0.length}if(typeof T0==="number"&&T0>r)throw new T1("maxContentLength size of "+r+" exceeded",T1.ERR_BAD_RESPONSE,R,F0)}return!P0&&L0&&L0(),await new Promise((T0,v0)=>{Pq(T0,v0,{data:H0,headers:v6.from(C0.headers),status:C0.status,statusText:C0.statusText,config:R,request:F0})})}catch(m0){if(L0&&L0(),V0&&V0.aborted&&V0.reason instanceof T1){let t0=V0.reason;throw t0.config=R,F0&&(t0.request=F0),m0!==t0&&(t0.cause=m0),t0}if(m0&&m0.name==="TypeError"&&/Load failed|fetch/i.test(m0.message))throw Object.assign(new T1("Network Error",T1.ERR_NETWORK,R,F0,m0&&m0.response),{cause:m0.cause||m0});throw T1.from(m0,m0&&m0.code,R,F0,m0&&m0.response)}}},fm0=new Map,Ak=(Z)=>{let X=Z&&Z.env||{},{fetch:J,Request:Y,Response:$}=X,q=[Y,$,J],Q=q.length,z=Q,G,V,x=fm0;while(z--)G=q[z],V=x.get(G),V===void 0&&x.set(G,V=z?new Map:ym0(X)),x=V;return V},or1=Ak();var wk={http:I20,xhr:b20,fetch:{get:Ak}};E0.forEach(wk,(Z,X)=>{if(Z){try{Object.defineProperty(Z,"name",{__proto__:null,value:X})}catch(J){}Object.defineProperty(Z,"adapterName",{__proto__:null,value:X})}});var g20=(Z)=>`- ${Z}`,gm0=(Z)=>E0.isFunction(Z)||Z===null||Z===!1;function hm0(Z,X){Z=E0.isArray(Z)?Z:[Z];let{length:J}=Z,Y,$,q={};for(let Q=0;Q<J;Q++){Y=Z[Q];let z;if($=Y,!gm0(Y)){if($=wk[(z=String(Y)).toLowerCase()],$===void 0)throw new T1(`Unknown adapter '${z}'`)}if($&&(E0.isFunction($)||($=$.get(X))))break;q[z||"#"+Q]=$}if(!$){let Q=Object.entries(q).map(([G,V])=>`adapter ${G} `+(V===!1?"is not supported by the environment":"is not available in the build")),z=J?Q.length>1?`since :
@@ -4259,7 +4259,7 @@ ${Fy1(Uy1(Y,$,J),X+" ")}
4259
4259
  ${X}) AS ${js($,J.scope.dataSource.dbtype)}`}function Uy1(Z,X,J){let Y=Z.dimensions.filter((G)=>!G.externalField).map((G)=>{if(G.syntax==="aml")throw new Z4("Cannot use aml field in SQL");return{...G,sql:`{{ #${Z.name}.${G.name} }}`,syntax:"sql",aggregationType:void 0,transformType:void 0,typeCast:void 0}}),$=Y.map((G)=>({modelName:"THIS",fieldName:G.name})),q=J.scope.dataSource,Q={...Z,dataSource:q},z={name:Z.name,rootModel:{name:Z.name},dataSource:q,fields:$,filters:[],conditions:[],havingConditions:[],dimensions:Y,measures:[],params:Z.params,groupBy:[],groupByMode:"auto",models:{[Z.name]:Q},joins:[],queryProcessingTimezone:J.options.queryProcessingTimezone,useAsSubquery:!1,coalesceFullJoinKeys:[],comments:[],tags:[]};return n_0(J.sqlStructureGen(z,J.options),q.dbtype,J.options).trimEnd()}function YP0(Z,X,J){let Y=X.models?.[J];if(Y&&(("tableName"in Y)||("query"in Y)))return Y;let $=Z.models[J];if($&&(("tableName"in $)||("query"in $)))return $;let q=aI(Z,{name:J});if(q)return q;throw new Z4(`Model '${J}' not found in '${Z.name}'`)}function Fy1(Z,X){return Z.split(`
4260
4260
  `).map((J)=>J.length===0?J:X+J).join(`
4261
4261
  `)}function js(Z,X){switch(X){case"bigquery":case"mysql":case"databricks":return`\`${Z}\``;case"sqlserver":return`[${Z}]`;default:return`"${Z}"`}}function Dy1(Z,X,J){let Y=[],$=Z.models[Z.rootModel.name];if($!==void 0){let q=yN0($,Z,X,J);q&&Y.push(q)}for(let q of Z.joins){let Q=Z.models[q.destModel.name];if(Q===void 0)throw new Z4(`Could not find model '${q.destModel.name}' in scopes`);let z=yN0(Q,Z,X,J);z&&Y.push(z)}return Y}function yN0(Z,X,J,Y){if("tableName"in Z)return null;if("rootModel"in Z){let G=Z;return G.useAsSubquery?null:{name:G.name,subquery:Y(G,J)}}let $=J;J.persistenceIncrementPassDownToCte||($={...$,persistenceIncrementColumn:null}),$={...$,queryProcessingTimezone:""};let q=Z,{paramDefMap:Q,paramInputMap:z}=jy1(q,X);return{name:q.name,subquery:Qy1(q.query,{scope:X,queryModel:q,options:$,paramDefMap:Q,paramInputMap:z,sqlStructureGen:Y})}}function jy1(Z,X){let J=new Map(Z.params.map(($)=>[$.name,$])),Y=new Map;for(let $ of X.filters??[]){if(Ny1($)!==Z.name)continue;let q=Ly1($);if(!q||!J.has(q))continue;if(Y.has(q))throw new Z4(`Multiple filters are used for this param \`${q}\``);let Q=J.get(q).allowedValues;if(Q&&Q.length>0){let z=$.values.map((G)=>String(G)).filter((G)=>!Q.includes(G));if(z.length>0)throw new Z4(`Filter values are not allowed: ${z.join(", ")}`)}Y.set(q,$)}return{paramDefMap:J,paramInputMap:Y}}function Ny1(Z){let X=Z.field.sql;if(typeof X=="object"&&X&&"operator"in X&&X.operator===w.FIELD&&typeof X.operands[0]=="string")return X.operands[0]}function Ly1(Z){let X=Z.field;if(X.origin?.fieldName)return X.origin.fieldName;let J=Z.field.sql;return typeof J=="object"&&J&&"operator"in J&&J.operator===w.FIELD&&typeof J.operands[1]=="string"?J.operands[1]:Z.field.name}function Cy1(Z,X,J){return Z.union?{distinct:Z.union.distinct??!1,sqlStructures:Z.union.explores.map((Y)=>J(Y,X))}:null}function Aw(Z,X=GI){let J=new cV(Z);return{type:"query",meta:Eb1(Z,X),cte:Dy1(Z,X,Aw),select:J.execute(X),distinct:Sb1(Z,X)??null,from:vb1(Z,X,Aw),joins:lb1(Z,X),where:mb1(Z,X),having:cb1(Z,X),groupBy:Tb1(Z,X),orderBy:wb1(Z,X)??void 0,limit:Ib1(Z),union:Cy1(Z,X,Aw)}}function rI(Z){return typeof Z=="object"&&!!Z}function oO(Z){return{name:Z.name}}function YY(Z){return{name:Z.name,label:Z.label,format:Z.format,description:Z.description,type:Z.type,syntax:Z.syntax,sql:Z.sql,transformType:Z.transform_type,aggregationType:Z.aggregation_type,isLiteral:Z.is_literal,typeCast:Z.type_cast,metadata:Z.metadata,allowedValues:Z.allowed_values,primaryKey:Z.primary_key,isHidden:Z.is_hidden,definedInDataset:Z.defined_in_dataset}}function Ry1(Z){return{field:YY(Z.field),type:Z.type,operator:Z.operator,values:Z.values,modifier:Z.modifier}}function Oy1(Z){let X=Z.direction.toLowerCase();return{field:YY(Z.field),direction:X}}function _y1(Z){return{mode:Z.mode,schema:Z.schema,viewName:Z.view_name,onCascade:Z.on_cascade,incrementalColumn:Z.incremental_column,primaryKey:Z.primary_key,customDdl:Z.custom_ddl}}function Py1(Z){return{name:Z.name,sourceModel:Array.isArray(Z.source_model)?Z.source_model.map(oO):oO(Z.source_model),destModel:oO(Z.dest_model),alias:Z.alias,linkType:Z.link_type,joinType:Z.join_type,joinOn:Z.join_on,skipJoinRefResolution:Z.skip_join_ref_resolution}}function vy1(Z){return rI(Z)&&"root_model"in Z&&"data_source"in Z}function $P0(Z){return rI(Z)&&"table_name"in Z}function Ty1(Z){return rI(Z)&&"query"in Z}function Ay1(Z){let X={},J=Array.isArray(Z)?Z.map((Y)=>[Y.name,Y]):Object.entries(Z);for(let[Y,$]of J)X[Y]=qP0($);return X}function qP0(Z){return $P0(Z)?{name:Z.name,tableName:Z.table_name,dataSource:Z.data_source,dimensions:Z.dimensions.map(YY),measures:Z.measures.map(YY),params:Z.params.map(YY),label:Z.label,description:Z.description}:{name:Z.name,query:Z.query,dataSource:Z.data_source,dimensions:Z.dimensions.map(YY),measures:Z.measures.map(YY),params:Z.params.map(YY),models:Z.models?Ay1(Z.models):void 0,label:Z.label,description:Z.description,persistence:Z.persistence?_y1(Z.persistence):void 0}}function wy1(Z){let X={};for(let[J,Y]of Object.entries(Z)){if(vy1(Y)){X[J]=Yr(Y);continue}if($P0(Y)||Ty1(Y)){X[J]=qP0(Y);continue}X[J]=oO(Y)}return X}function Iy1(Z){if(!Z)return;if(Z===!0)return{on:"all"};let{on:X}=Z;return X==="all"?{on:"all"}:Array.isArray(X)?{on:X.map((J)=>J.name)}:{on:[]}}function Sy1(Z){return Z.group_by_mode?Z.group_by_mode:Object.prototype.hasOwnProperty.call(Z,"group_by")?Z.group_by.length>0?"explicit":"none":"auto"}function Yr(Z){let X=wy1(Z.models);return{name:Z.name,rootModel:oO(Z.root_model),dataSource:Z.data_source,fields:Z.fields.map((J)=>({modelName:J.model_name,fieldName:J.field_name})),filters:Z.filters?.map(Ry1),conditions:Z.conditions,havingConditions:Z.having_conditions,dimensions:Z.dimensions.map(YY),measures:Z.measures.map(YY),params:Z.params?.map(YY),label:Z.label,description:Z.description,distinct:Iy1(Z.distinct),groupBy:(Z.group_by??[]).map(YY),groupByMode:Sy1(Z),orderBy:Z.order_by?.map(Oy1),limit:Z.limit,offset:Z.offset,models:X,joins:Z.joins.map(Py1),union:Z.union?{distinct:Z.union.distinct,explores:Z.union.explores.map(Yr)}:void 0,queryProcessingTimezone:Z.query_processing_timezone,useAsSubquery:Z.use_as_subquery,coalesceFullJoinKeys:Z.coalesce_full_join_keys,comments:Z.comments,tags:Z.tags}}function Ey1(Z,X={}){if(!rI(Z))throw Error("Invalid DataModel JSON: expected an object payload");let J=Yr(Z),Y={...GI,queryProcessingTimezone:J.queryProcessingTimezone??GI.queryProcessingTimezone,...X};return n_0(Aw(J,Y),J.dataSource.dbtype,Y)}var KP0={name:"ts",async generateFromJSON(Z){try{return Ey1(Z)}catch(X){throw Error(X?.message??String(X))}}};function ky1(Z={}){return Z.backend?Z.backend:process.env.AMQL_SQL_BACKEND==="ts"?"ts":"ruby"}function by1(Z={}){return ky1(Z)==="ts"?KP0:M_0}async function q82(Z,X={}){return by1(X).generateFromJSON(Z)}async function K82(Z){return M_0.generateFromJSON(Z)}async function Q82(Z){return KP0.generateFromJSON(Z)}function z82(Z){if(!(Z instanceof Error))return!1;if(Z.message.includes("Could not connect to the SQL Gen service."))return!0;let X=[Z];for(;X.length>0;){let J=X.shift();if(!(!J||typeof J!="object")){if(J.code==="ECONNREFUSED"||J.code==="EPERM")return!0;Array.isArray(J.errors)&&X.push(...J.errors),"cause"in J&&X.push(J.cause)}}return Z.message.includes("request to http://localhost:6341/")&&(Z.message.includes("failed")||Z.message.includes("fetch failed"))}var $r=S3(ET(),1);function yy1(Z,X){let J=1,Y=0,$=Math.min(X,Z.length);for(let q=0;q<$;q+=1)if(Z[q]===`
4262
- `)J+=1,Y=q+1;return{line:J,column:X-Y+1}}function aB(Z){return{message:Z.message,code:Z.code,severity:"error"}}function Lz(Z,X,J){let{type:Y,filePath:$,fqn:q}=X;return{type:Y,filePath:$,fqn:q,validator:J,...Z}}function QP0(Z,X,J,Y){let $=(H)=>{if(H===void 0)return;let U=X.db.filepathFromSymbol(H.id);if(U===void 0)return;if(!(H instanceof R1)||!H.declarationId)return;let F=X.db.nodeById(H.declarationId)?.span(),N=X.fileContent(U);if(!F||N===void 0)return;let C=yy1(N,F.start);return{filePath:t80(Y,U.toString()),line:C.line,column:C.column}},q=(H)=>{let U=J.find((F)=>F.fqn===H);if(U===void 0)return;try{return X.scopeOfFile(b1.create(U.filePath)).unwrap().get(X.db,U.name)?.symbol}catch(F){return}},z=[q(Z.fqn)],G=(H)=>{return z.reduceRight((U,F)=>{if(U||F===void 0)return U;return F?.members(X.db)?.get(X.db,H)?.symbol},void 0)},V=(H)=>{return z.reduceRight((U,F)=>{if(U||F===void 0)return U;let N=(_)=>{let R=[_];while(R.length>0){let P=R.shift(),A=P.children()??[];if((P instanceof m1||P instanceof d1)&&P.body instanceof d1)A.push(P.body);let v=A.find((E)=>E instanceof m1&&E.elementName instanceof K1&&E.elementName.value.data.value===H);if(v)return v;A.forEach((E)=>R.push(E))}return},C=F?.id instanceof vX?X.db.nodeById(F.id.nodeId):void 0;if(C===void 0)return U;return N(C)?.symbol(X.db)},void 0)},x=(H)=>{let{name:U,kind:F}=H;switch(F){case"Model":return q(U);default:return G(U)??V(U)}};(Z.trace??[]).forEach((H)=>{try{let U=x(H);H.loc=$(U),z.push(U)}catch(U){z.push(void 0)}})}var zP0={name:"postgres",dbtype:s0.POSTGRESQL};class GP0 extends Map{get(Z){return zP0}}var VP0=new GP0,DK="aql-typecheck";function fy1(Z){return Z.map(({name:X,type:J,value:Y})=>{let $;if(Y===void 0)$=f$.ALL;else if(Array.isArray(Y))$=Y;else $=[Y];return vC0.createUserAttribute(X,J,$)})}function WP0(Z,X,J,Y=[],$=[]){try{let q=W3(Z);return zD(X,Y,$,[],W8.SkipCheckingRelationshipKey).getDiagnostics(q,J).map(({code:G,message:V,severity:x})=>({code:G,message:V,severity:x}))}catch(q){return[aB(q)]}}function xP0(Z,X){let J=new QD(Z,Z.dataSource,{allowAmbiguousPaths:!0}),Y=[],$=[],q=(Q,z)=>{if(Q.syntax!=="aql"||typeof Q.sql!=="string")return;let G=WP0(Q.sql,J,z,X);Y.push(...G.map((V)=>({...V,trace:$})))};return Z.metrics.forEach((Q)=>{$=[{kind:"Metric",name:Q.name}],q(Q)}),Z.models.forEach((Q)=>{let z={kind:"Model",name:Q.name};Q.dimensions.forEach((G)=>{$=[z,{kind:"Dimension",name:G.name}],q(G,Q.name)}),Q.measures.forEach((G)=>{$=[z,{kind:"Measure",name:G.name}],q(G)})}),Y}function my1(Z,X){let J=new Set;try{let Y=mI(Z.rawValue,VP0),q=xP0(Y,X).map((Q)=>Lz(Q,Z,DK));return Y.models.forEach((Q)=>{J.add(Q.name)}),{result:q,visitedModel:J}}catch(Y){let $=aB(Y);return{result:[Lz($,Z,DK)],visitedModel:J}}}function gy1(Z,X){try{let J=YR0(Z.rawValue,zP0);return xP0(J,X).map((q)=>Lz({...q,trace:q.trace?.slice(1)},Z,DK))}catch(J){let Y=aB(J);return[Lz(Y,Z,DK)]}}function hy1(Z,X){return[...Z.map((J)=>({name:J.field.name,sql:J.field.sql,modelId:typeof J.model_id==="string"?J.model_id:void 0})),...X.map((J)=>({name:J.name,sql:J.sql,modelId:void 0}))].filter((J)=>typeof J.sql==="string")}function uy1(Z){return Z.modelId?`dimension ${uC(Z.modelId)}.${Z.name} = ${Z.sql}`:`metric ${Z.name} = ${Z.sql}`}function dy1(Z,X,J,Y=[]){let $=[],q=hy1(X,Z),Q=new Map;return q.forEach((z,G)=>{let V;try{V=W3(uy1(z)).exprs[0]}catch{V=void 0}Q.set(G,V)}),q.forEach((z,G)=>{let V=[];Q.forEach((N,C)=>{if(C!==G&&N!==void 0)V.push($r.cloneDeep(N))});let x=z.modelId?uC(z.modelId):void 0,H=new QD($r.cloneDeep(J),J.dataSource,{allowAmbiguousPaths:!0}),U=WP0(z.sql,H,x,Y,V),F={kind:"Calculation",name:z.name};$.push(...U.map((N)=>({...N,trace:[F]})))}),$}function py1(Z,X,J){let Y=Z.blocks.filter((q)=>q.type==="VizBlock"),$=[];return Y.forEach((q)=>{let Q=[{kind:"VizBlock",name:q.uname}];try{let z=(q.viz.viz_setting.adhoc_fields??[]).filter((F)=>F.syntax==="aql"),G=(q.viz.viz_setting.amql?.adhoc_fields??[]).filter((F)=>F.field.syntax==="aql");if(G.length===0&&z.length===0)return;let V=q.viz.dataset_id;if(typeof V==="number")throw Error("Invalid dataset id type, expected string, got number");let x=J.get(V);if(!x)throw Error(`Dataset ${V} not found`);let H=mI(x,VP0),U=dy1(z,G,H,X);$.push(...U.map((F)=>({...F,trace:[...Q,...F.trace??[]]})))}catch(z){let G=aB(z);G.trace=Q,$.push(G)}}),$}var BP0={name:DK,description:`Type-check AQL expressions in Datasets and standalone Models.
4262
+ `)J+=1,Y=q+1;return{line:J,column:X-Y+1}}function aB(Z){return{message:Z.message,code:Z.code,severity:"error"}}function Lz(Z,X,J){let{type:Y,filePath:$,fqn:q}=X;return{type:Y,filePath:$,fqn:q,validator:J,...Z}}function QP0(Z,X,J,Y){let $=(H)=>{if(H===void 0)return;let U=X.db.filepathFromSymbol(H.id);if(U===void 0)return;if(!(H instanceof R1)||!H.declarationId)return;let F=X.db.nodeById(H.declarationId)?.span(),N=X.fileContent(U);if(!F||N===void 0)return;let C=yy1(N,F.start);return{filePath:t80(Y,U.toString()),line:C.line,column:C.column}},q=(H)=>{let U=J.find((F)=>F.fqn===H);if(U===void 0)return;try{return X.scopeOfFile(b1.create(U.filePath)).unwrap().get(X.db,U.name)?.symbol}catch(F){return}},z=[q(Z.fqn)],G=(H)=>{return z.reduceRight((U,F)=>{if(U||F===void 0)return U;return F?.members(X.db)?.get(X.db,H)?.symbol},void 0)},V=(H)=>{return z.reduceRight((U,F)=>{if(U||F===void 0)return U;let N=(_)=>{let R=[_];while(R.length>0){let P=R.shift(),A=P.children()??[];if((P instanceof m1||P instanceof d1)&&P.body instanceof d1)A.push(P.body);let v=A.find((E)=>E instanceof m1&&E.elementName instanceof K1&&E.elementName.value.data.value===H);if(v)return v;A.forEach((E)=>R.push(E))}return},C=F?.id instanceof vX?X.db.nodeById(F.id.nodeId):void 0;if(C===void 0)return U;return N(C)?.symbol(X.db)},void 0)},x=(H)=>{let{name:U,kind:F}=H;switch(F){case"Model":return q(U);default:return G(U)??V(U)}};(Z.trace??[]).forEach((H)=>{try{let U=x(H);H.loc=$(U),z.push(U)}catch(U){z.push(void 0)}})}var zP0={name:"postgres",dbtype:s0.POSTGRESQL};class GP0 extends Map{get(Z){return zP0}}var VP0=new GP0,DK="aql-typecheck";function fy1(Z){return Z.map(({name:X,type:J,value:Y})=>{let $;if(Y===void 0)$=f$.ALL;else if(Array.isArray(Y))$=Y;else $=[Y];return vC0.createUserAttribute(X,J,$)})}function WP0(Z,X,J,Y=[],$=[]){try{let q=W3(Z);return zD(X,Y,$,[],W8.SkipCheckingRelationshipKey).getDiagnostics(q,J).map(({code:G,message:V,severity:x})=>({code:G,message:V,severity:x}))}catch(q){return[aB(q)]}}function xP0(Z,X){let J=new QD(Z,Z.dataSource,{allowAmbiguousPaths:!0}),Y=[],$=[],q=(Q,z)=>{if(Q.syntax!=="aql"||typeof Q.sql!=="string")return;let G=WP0(Q.sql,J,z,X);Y.push(...G.map((V)=>({...V,trace:$})))};return Z.metrics.forEach((Q)=>{$=[{kind:"Metric",name:Q.name}],q(Q)}),Z.models.forEach((Q)=>{let z={kind:"Model",name:Q.name};Q.dimensions.forEach((G)=>{$=[z,{kind:"Dimension",name:G.name}],q(G,Q.name)}),Q.measures.forEach((G)=>{$=[z,{kind:"Measure",name:G.name}],q(G)})}),Y}function my1(Z,X){let J=new Set;try{let Y=mI(Z.rawValue,VP0),q=xP0(Y,X).map((Q)=>Lz(Q,Z,DK));return Y.models.forEach((Q)=>{J.add(Q.name)}),{result:q,visitedModel:J}}catch(Y){let $=aB(Y);return{result:[Lz($,Z,DK)],visitedModel:J}}}function gy1(Z,X){try{let J=YR0(Z.rawValue,zP0);return xP0(J,X).map((q)=>Lz({...q,trace:q.trace?.slice(1)},Z,DK))}catch(J){let Y=aB(J);return[Lz(Y,Z,DK)]}}function hy1(Z,X){return[...Z.map((J)=>({name:J.field.name,sql:J.field.sql,modelId:typeof J.model_id==="string"?J.model_id:void 0})),...X.map((J)=>({name:J.name,sql:J.sql,modelId:void 0}))].filter((J)=>typeof J.sql==="string")}function uy1(Z){return Z.modelId?`dimension ${uC(Z.modelId)}.${Z.name} = ${Z.sql}`:`metric ${Z.name} = ${Z.sql}`}function dy1(Z,X,J,Y=[]){let $=[],q=hy1(X,Z),Q=new Map;return q.forEach((z,G)=>{let V;try{V=W3(uy1(z)).exprs[0]}catch{V=void 0}Q.set(G,V)}),q.forEach((z,G)=>{let V=[];Q.forEach((N,C)=>{if(C!==G&&N!==void 0)V.push($r.cloneDeep(N))});let x=z.modelId?uC(z.modelId):void 0,H=new QD($r.cloneDeep(J),J.dataSource,{allowAmbiguousPaths:!0}),U=WP0(z.sql,H,x,Y,V),F={kind:"Calculation",name:z.name};$.push(...U.map((N)=>({...N,trace:[F]})))}),$}function py1(Z,X,J){let Y=Z.blocks.filter((q)=>q.type==="VizBlock"),$=[];return Y.forEach((q)=>{let Q=[{kind:"VizBlock",name:q.uname}];try{let z=(q.viz.viz_setting.adhoc_fields??[]).filter((F)=>F.syntax==="aql"),G=(q.viz.viz_setting.amql?.adhoc_fields??[]).filter((F)=>F.field.syntax==="aql");if(G.length===0&&z.length===0)return;let V=q.viz.dataset_id;if(typeof V==="number")throw Error("Invalid dataset id type, expected string, got number");let x=J.get(V);if(!x)throw Error(`Dataset ${V} not found`);Q.push({kind:"Dataset",name:V});let H=mI(x,VP0);Q.pop();let U=dy1(z,G,H,X);$.push(...U.map((F)=>({...F,trace:[...Q,...F.trace??[]]})))}catch(z){let G=aB(z);G.trace=Q,$.push(G)}}),$}var BP0={name:DK,description:`Type-check AQL expressions in Datasets and standalone Models.
4263
4263
  Note: standalone Models lack the relationship context a Dataset provides, so cross-model AQL references refs may report false errors.`,run(Z){let{bindings:X,reports:J,option:Y}=Z,$=[];_1.log("Validating AQL");let q=fy1(Y.userAttributes),Q=new Set;X.filter((G)=>G.type==="Dataset").forEach((G)=>{let{result:V,visitedModel:x}=my1(G,q);Q=Q.union(x),$.push(...V)}),X.filter((G)=>G.type==="Model").filter((G)=>!Q.has(G.fqn)).forEach((G)=>{$.push(...gy1(G,q))});let z=new Map(X.filter((G)=>G.type==="Dataset").map((G)=>[G.fqn,G.rawValue]));return X.filter((G)=>G.type==="Dashboard").forEach((G)=>{if(G.mapped===void 0)return;let V=py1(G.mapped,q,z);$.push(...V.map((x)=>Lz(x,G,DK)))}),{bindings:X,reports:[...J,...$],option:Y}}};var qr="dashboard-check",HP0={name:qr,description:"Check for dashboard errors",run(Z){let{bindings:X,reports:J,option:Y}=Z,$=[];return{bindings:X.map((Q)=>{if(Q.type!=="Dashboard")return Q;try{let z=PH0(Q.rawValue.toJsStructure(),[]),G={...Q,mapped:z};return z.blocks.filter((V)=>V.type==="ErrorBlock").forEach((V)=>{let x=[{kind:V.type,name:V.uname}],H={severity:"error",message:V.message,trace:x};$.push(Lz(H,G,qr))}),G}catch(z){return $.push(Lz(aB(z),Q,qr)),Q}}),reports:[...J,...$],option:Y}}};var WD=[HP0,BP0];function MP0(Z={}){let{validators:X,skippedValidators:J}=Z;return WD.filter((Y)=>{if(J?.includes(Y.name))return!1;if(X===void 0)return!0;return X.includes(Y.name)})}var Kr=WD.map((Z)=>Z.name);function nI(Z){if(Z==="all")return[...Kr];let X=Z.split(",").map((J)=>J.trim());return X.forEach((J)=>{if(!Kr.includes(J))throw new DQ(`Unknown validator '${J}'. Available: ${Kr.join(", ")}`)}),X}function ly1(Z,X,J){let Y=new dU;return Y.program=Z,X.filter(($)=>$.endsWith(".aml")).map(($)=>cy1.relative(J,$)).flatMap(($)=>{let q=Z.interpretFileJson(b1.create($));if(!q.isOk())return[];return q.unwrap().bindings.flatMap((z)=>{if(!z.fqn)return[];let G=Y.findObject(z.fqn).value?.rawValue;if(!G)return[];return[{filePath:$,fqn:uC(z.fqn),name:z.name,type:z._type,rawValue:G}]})})}function tI(Z,X,J,Y,$){let q=MP0($);if(q.length===0)return[];let Q=ly1(Z,X,J),z={bindings:Q,option:Y,reports:[]};return q.forEach((G)=>{z=G.run(z)}),z.reports.forEach((G)=>QP0(G,Z,Q,J)),z.reports}import*as Wr from"node:path";import{pathToFileURL as NP0}from"node:url";var Qr="https://docs.holistics.io/reference/aql/error-reference",oy1=12,zr=A8.bold+A8.yellow,LP0=yG?"├─ ":" ",CP0=yG?"└─ ":" ",ZS=yG?"│ ":" ",iy1=" ",sy1=7,eI=2+sy1+1,UP0=100,ay1=4,ry1=60;function RP0(Z,X){let J=X!==void 0?`-${X}`:"";return`${Z.toUpperCase()}${J}`}function ny1(Z,X){return O4(A8.bold+r80[Z],RP0(Z,X))}function ty1(Z,X){return" ".repeat(Math.max(0,oy1-RP0(Z,X).length))}function OP0(Z,X){if(Z===DK)return X!==void 0?`${Qr}#ERR-${X}`:Qr;return}function ey1(Z){if((Z.code===z0.MODEL_0_NOT_FOUND||Z.code===z0.MODEL_IN_AQL_FIELD_NOT_FOUND)&&Z.validator===DK&&Z.type==="Model")return"This Model is being validated as a standalone, so references to other models won't resolve. If a Dataset includes this Model, try validating that Dataset instead.";return}function xD(Z,X){return Z===1?`${Z} ${X}`:`${Z} ${X}s`}function Zf1(Z,X){let J=new Map;return Z.forEach((Y)=>{let $=X(Y),q=J.get($);if(q)q.push(Y);else J.set($,[Y])}),J}var Xf1={error:"\x1B[48;2;229;72;77m",warning:"\x1B[48;2;200;126;30m",info:"\x1B[48;2;90;90;90m"},Jf1="\x1B[1m\x1B[38;2;255;255;255m",Yf1={error:"E",warning:"W",info:"I"};function _P0(Z,X){return X!==void 0?`${Yf1[Z]}${X}`:Z.toUpperCase()}function $f1(Z,X){return _P0(Z,X).length+2}function qf1(Z,X,J){let Y=O4(Xf1[Z]+Jf1,` ${_P0(Z,X)} `),$=OP0(J,X);return $?hC($,Y):Y}function Gr(Z){return O4(A8.identifier,Z??"")}function Kf1(Z){if(!Z)return"";let X=Z.line!==void 0?`:${Z.line}${Z.column!==void 0?`:${Z.column}`:""}`:"";return` ${O4(A8.dim,`${Z.filePath}${X}`)}`}function FP0(Z){return{kind:Z?.kind,name:Z?.name,loc:Z?.loc,children:new Map,errors:new Map}}function Qf1(Z){let X=FP0();return Z.forEach((J)=>{let Y=X;(J.trace??[]).forEach((Q)=>{let z=`${Q.kind}:${Q.name}`,G=Y.children.get(z);if(!G)G=FP0(Q),Y.children.set(z,G);Y=G});let $=`${J.severity}|${J.validator}|${J.code??""}|${J.message}`,q=Y.errors.get($);if(q)q.count+=1;else Y.errors.set($,{report:J,count:1})}),X}function xr(Z){if(Z._subtreeErrorCount!==void 0)return Z._subtreeErrorCount;let X=Z.errors.size;return Z.children.forEach((J)=>{X+=xr(J)}),Z._subtreeErrorCount=X,X}function PP0(Z){if(Z._subtreeFieldCount!==void 0)return Z._subtreeFieldCount;let X=0;return Z.children.forEach((J)=>{if(J.errors.size>0)X+=1;X+=PP0(J)}),Z._subtreeFieldCount=X,X}function Vr(Z,X,J=" "){let{report:Y,count:$}=Z,q=qf1(Y.severity,Y.code,Y.validator),Q=" ".repeat(Math.max(1,eI-J.length-$f1(Y.severity,Y.code))),z=$>1?O4(A8.dim,` ×${$}`):"",G=X+" ".repeat(eI),V=Y.message.replace(/\n+$/,"").replace(/\n/g,`
4264
4264
  ${G}`),x=[`${X}${J}${q}${Q}${tk(V)}${z}`],H=ey1(Y);if(H){let U=X+" ".repeat(eI-2),F=H.replace(/\n+$/,"").replace(/\n/g,`
4265
4265
  ${X}${" ".repeat(eI)}`);x.push(`${U}${O4(A8.dim+A8.filepath,`↳ ${F}`)}`)}return x}function zf1(Z,X,J){let Y=J?CP0:LP0,$=X+(J?iy1:ZS),q=[...Z.errors.values()];if(Z.children.size>0){let z=O4(A8.dim,`${xD(PP0(Z),"field")} · ${xD(xr(Z),"error")}`),G=`${X}${Y}${Gr(Z.kind)} ${O4(zr,Z.name??"")} ${z}`,V=`${$}${ZS.trimEnd()}`;return[G,V,...vP0(Z,$,q.length>0),...q.flatMap((x)=>Vr(x,$))]}return[`${X}${Y}${Gr(Z.kind)} ${O4(zr,Z.name??"")}${Kf1(Z.loc)}`,...q.flatMap((z)=>Vr(z,$))]}function vP0(Z,X,J=!1){let Y=[...Z.children.values()],$=Y.map((Q,z)=>{let G=!J&&z===Y.length-1;return zf1(Q,X,G)}),q=`${X}${ZS.trimEnd()}`;return $.flatMap((Q,z)=>z===0?Q:[q,...Q])}function Gf1(Z){let X=Wr.resolve(Z);return hC(NP0(X).href,O4(A8.filepath,Z))}function Vf1(Z){let X=Wr.resolve(Z);return hC(NP0(X).href,Z)}function Wf1(Z,X){let J=Z.replace(/\s+/g," ").trim();if(J.length<=X)return J;return`${J.slice(0,X-3)}...`}function DP0(Z,X,J){if(X.length===0)return[];let Y=[O4(A8.dim,Z),O4(A8.dim,"─".repeat(UP0)),...X.map(J)];return Y.push(O4(A8.dim,"─".repeat(UP0))),Y.push(""),Y}function jP0(Z){return O4(A8.bold,Z.toLocaleString().padStart(ay1))}function XS(Z){return Z.some((X)=>X.severity==="error")}function JS(Z){let X=" ".repeat(29);return Z.map((J)=>{let Y=J.description.replace(/\n\s*/g," ");return`${X}${J.name}: ${Y}`}).join(`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@holistics/cli-core",
3
3
  "type": "module",
4
- "version": "2.1.10",
4
+ "version": "2.1.11",
5
5
  "bin": {
6
6
  "holistics": "./bin/holistics.js"
7
7
  },