create-expo-nightly 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +1 -1
- package/package.json +4 -4
package/build/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{createRequire as t}from"module";var e={224:t=>{t.exports=balanced;function balanced(t,e,s){if(t instanceof RegExp)t=maybeMatch(t,s);if(e instanceof RegExp)e=maybeMatch(e,s);var i=range(t,e,s);return i&&{start:i[0],end:i[1],pre:s.slice(0,i[0]),body:s.slice(i[0]+t.length,i[1]),post:s.slice(i[1]+e.length)}}function maybeMatch(t,e){var s=e.match(t);return s?s[0]:null}balanced.range=range;function range(t,e,s){var i,n,r,o,a;var h=s.indexOf(t);var l=s.indexOf(e,h+1);var c=h;if(h>=0&&l>0){if(t===e){return[h,l]}i=[];r=s.length;while(c>=0&&!a){if(c==h){i.push(c);h=s.indexOf(t,c+1)}else if(i.length==1){a=[i.pop(),l]}else{n=i.pop();if(n<r){r=n;o=l}l=s.indexOf(e,c+1)}c=h<l&&h>=0?h:l}if(i.length){a=[r,o]}}return a}},365:(t,e,s)=>{var i=s(224);t.exports=expandTop;var n="\0SLASH"+Math.random()+"\0";var r="\0OPEN"+Math.random()+"\0";var o="\0CLOSE"+Math.random()+"\0";var a="\0COMMA"+Math.random()+"\0";var h="\0PERIOD"+Math.random()+"\0";function numeric(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function escapeBraces(t){return t.split("\\\\").join(n).split("\\{").join(r).split("\\}").join(o).split("\\,").join(a).split("\\.").join(h)}function unescapeBraces(t){return t.split(n).join("\\").split(r).join("{").split(o).join("}").split(a).join(",").split(h).join(".")}function parseCommaParts(t){if(!t)return[""];var e=[];var s=i("{","}",t);if(!s)return t.split(",");var n=s.pre;var r=s.body;var o=s.post;var a=n.split(",");a[a.length-1]+="{"+r+"}";var h=parseCommaParts(o);if(o.length){a[a.length-1]+=h.shift();a.push.apply(a,h)}e.push.apply(e,a);return e}function expandTop(t){if(!t)return[];if(t.substr(0,2)==="{}"){t="\\{\\}"+t.substr(2)}return expand(escapeBraces(t),true).map(unescapeBraces)}function embrace(t){return"{"+t+"}"}function isPadded(t){return/^-?0\d/.test(t)}function lte(t,e){return t<=e}function gte(t,e){return t>=e}function expand(t,e){var s=[];var n=i("{","}",t);if(!n)return[t];var r=n.pre;var a=n.post.length?expand(n.post,false):[""];if(/\$$/.test(n.pre)){for(var h=0;h<a.length;h++){var l=r+"{"+n.body+"}"+a[h];s.push(l)}}else{var c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body);var u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body);var f=c||u;var p=n.body.indexOf(",")>=0;if(!f&&!p){if(n.post.match(/,.*\}/)){t=n.pre+"{"+n.body+o+n.post;return expand(t)}return[t]}var d;if(f){d=n.body.split(/\.\./)}else{d=parseCommaParts(n.body);if(d.length===1){d=expand(d[0],false).map(embrace);if(d.length===1){return a.map((function(t){return n.pre+d[0]+t}))}}}var g;if(f){var y=numeric(d[0]);var w=numeric(d[1]);var b=Math.max(d[0].length,d[1].length);var _=d.length==3?Math.abs(numeric(d[2])):1;var S=lte;var v=w<y;if(v){_*=-1;S=gte}var A=d.some(isPadded);g=[];for(var x=y;S(x,w);x+=_){var k;if(u){k=String.fromCharCode(x);if(k==="\\")k=""}else{k=String(x);if(A){var C=b-k.length;if(C>0){var O=new Array(C+1).join("0");if(x<0)k="-"+O+k.slice(1);else k=O+k}}}g.push(k)}}else{g=[];for(var E=0;E<d.length;E++){g.push.apply(g,expand(d[E],false))}}for(var E=0;E<g.length;E++){for(var h=0;h<a.length;h++){var l=r+g[E]+a[h];if(!e||f||l)s.push(l)}}}return s}},421:e=>{e.exports=t(import.meta.url)("node:child_process")},474:e=>{e.exports=t(import.meta.url)("node:events")},24:e=>{e.exports=t(import.meta.url)("node:fs")},760:e=>{e.exports=t(import.meta.url)("node:path")},708:e=>{e.exports=t(import.meta.url)("node:process")},313:(t,e,s)=>{const{Argument:i}=s(854);const{Command:n}=s(600);const{CommanderError:r,InvalidArgumentError:o}=s(851);const{Help:a}=s(518);const{Option:h}=s(596);e.DM=new n;e.gu=t=>new n(t);e.Ww=(t,e)=>new h(t,e);e.er=(t,e)=>new i(t,e);e.uB=n;e.c$=h;e.ef=i;e._V=a;e.b7=r;e.Di=o;e.a2=o},854:(t,e,s)=>{const{InvalidArgumentError:i}=s(851);class Argument{constructor(t,e){this.description=e||"";this.variadic=false;this.parseArg=undefined;this.defaultValue=undefined;this.defaultValueDescription=undefined;this.argChoices=undefined;switch(t[0]){case"<":this.required=true;this._name=t.slice(1,-1);break;case"[":this.required=false;this._name=t.slice(1,-1);break;default:this.required=true;this._name=t;break}if(this._name.length>3&&this._name.slice(-3)==="..."){this.variadic=true;this._name=this._name.slice(0,-3)}}name(){return this._name}_concatValue(t,e){if(e===this.defaultValue||!Array.isArray(e)){return[t]}return e.concat(t)}default(t,e){this.defaultValue=t;this.defaultValueDescription=e;return this}argParser(t){this.parseArg=t;return this}choices(t){this.argChoices=t.slice();this.parseArg=(t,e)=>{if(!this.argChoices.includes(t)){throw new i(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._concatValue(t,e)}return t};return this}argRequired(){this.required=true;return this}argOptional(){this.required=false;return this}}function humanReadableArgName(t){const e=t.name()+(t.variadic===true?"...":"");return t.required?"<"+e+">":"["+e+"]"}e.Argument=Argument;e.humanReadableArgName=humanReadableArgName},600:(t,e,s)=>{const i=s(474).EventEmitter;const n=s(421);const r=s(760);const o=s(24);const a=s(708);const{Argument:h,humanReadableArgName:l}=s(854);const{CommanderError:c}=s(851);const{Help:u}=s(518);const{Option:f,DualOptions:p}=s(596);const{suggestSimilar:d}=s(266);class Command extends i{constructor(t){super();this.commands=[];this.options=[];this.parent=null;this._allowUnknownOption=false;this._allowExcessArguments=true;this.registeredArguments=[];this._args=this.registeredArguments;this.args=[];this.rawArgs=[];this.processedArgs=[];this._scriptPath=null;this._name=t||"";this._optionValues={};this._optionValueSources={};this._storeOptionsAsProperties=false;this._actionHandler=null;this._executableHandler=false;this._executableFile=null;this._executableDir=null;this._defaultCommandName=null;this._exitCallback=null;this._aliases=[];this._combineFlagAndOptionalValue=true;this._description="";this._summary="";this._argsDescription=undefined;this._enablePositionalOptions=false;this._passThroughOptions=false;this._lifeCycleHooks={};this._showHelpAfterError=false;this._showSuggestionAfterError=true;this._outputConfiguration={writeOut:t=>a.stdout.write(t),writeErr:t=>a.stderr.write(t),getOutHelpWidth:()=>a.stdout.isTTY?a.stdout.columns:undefined,getErrHelpWidth:()=>a.stderr.isTTY?a.stderr.columns:undefined,outputError:(t,e)=>e(t)};this._hidden=false;this._helpOption=undefined;this._addImplicitHelpCommand=undefined;this._helpCommand=undefined;this._helpConfiguration={}}copyInheritedSettings(t){this._outputConfiguration=t._outputConfiguration;this._helpOption=t._helpOption;this._helpCommand=t._helpCommand;this._helpConfiguration=t._helpConfiguration;this._exitCallback=t._exitCallback;this._storeOptionsAsProperties=t._storeOptionsAsProperties;this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue;this._allowExcessArguments=t._allowExcessArguments;this._enablePositionalOptions=t._enablePositionalOptions;this._showHelpAfterError=t._showHelpAfterError;this._showSuggestionAfterError=t._showSuggestionAfterError;return this}_getCommandAndAncestors(){const t=[];for(let e=this;e;e=e.parent){t.push(e)}return t}command(t,e,s){let i=e;let n=s;if(typeof i==="object"&&i!==null){n=i;i=null}n=n||{};const[,r,o]=t.match(/([^ ]+) *(.*)/);const a=this.createCommand(r);if(i){a.description(i);a._executableHandler=true}if(n.isDefault)this._defaultCommandName=a._name;a._hidden=!!(n.noHelp||n.hidden);a._executableFile=n.executableFile||null;if(o)a.arguments(o);this._registerCommand(a);a.parent=this;a.copyInheritedSettings(this);if(i)return this;return a}createCommand(t){return new Command(t)}createHelp(){return Object.assign(new u,this.configureHelp())}configureHelp(t){if(t===undefined)return this._helpConfiguration;this._helpConfiguration=t;return this}configureOutput(t){if(t===undefined)return this._outputConfiguration;Object.assign(this._outputConfiguration,t);return this}showHelpAfterError(t=true){if(typeof t!=="string")t=!!t;this._showHelpAfterError=t;return this}showSuggestionAfterError(t=true){this._showSuggestionAfterError=!!t;return this}addCommand(t,e){if(!t._name){throw new Error(`Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()`)}e=e||{};if(e.isDefault)this._defaultCommandName=t._name;if(e.noHelp||e.hidden)t._hidden=true;this._registerCommand(t);t.parent=this;t._checkForBrokenPassThrough();return this}createArgument(t,e){return new h(t,e)}argument(t,e,s,i){const n=this.createArgument(t,e);if(typeof s==="function"){n.default(i).argParser(s)}else{n.default(s)}this.addArgument(n);return this}arguments(t){t.trim().split(/ +/).forEach((t=>{this.argument(t)}));return this}addArgument(t){const e=this.registeredArguments.slice(-1)[0];if(e&&e.variadic){throw new Error(`only the last argument can be variadic '${e.name()}'`)}if(t.required&&t.defaultValue!==undefined&&t.parseArg===undefined){throw new Error(`a default value for a required argument is never used: '${t.name()}'`)}this.registeredArguments.push(t);return this}helpCommand(t,e){if(typeof t==="boolean"){this._addImplicitHelpCommand=t;return this}t=t??"help [command]";const[,s,i]=t.match(/([^ ]+) *(.*)/);const n=e??"display help for command";const r=this.createCommand(s);r.helpOption(false);if(i)r.arguments(i);if(n)r.description(n);this._addImplicitHelpCommand=true;this._helpCommand=r;return this}addHelpCommand(t,e){if(typeof t!=="object"){this.helpCommand(t,e);return this}this._addImplicitHelpCommand=true;this._helpCommand=t;return this}_getHelpCommand(){const t=this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"));if(t){if(this._helpCommand===undefined){this.helpCommand(undefined,undefined)}return this._helpCommand}return null}hook(t,e){const s=["preSubcommand","preAction","postAction"];if(!s.includes(t)){throw new Error(`Unexpected value for event passed to hook : '${t}'.\nExpecting one of '${s.join("', '")}'`)}if(this._lifeCycleHooks[t]){this._lifeCycleHooks[t].push(e)}else{this._lifeCycleHooks[t]=[e]}return this}exitOverride(t){if(t){this._exitCallback=t}else{this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync"){throw t}else{}}}return this}_exit(t,e,s){if(this._exitCallback){this._exitCallback(new c(t,e,s))}a.exit(t)}action(t){const listener=e=>{const s=this.registeredArguments.length;const i=e.slice(0,s);if(this._storeOptionsAsProperties){i[s]=this}else{i[s]=this.opts()}i.push(this);return t.apply(this,i)};this._actionHandler=listener;return this}createOption(t,e){return new f(t,e)}_callParseArg(t,e,s,i){try{return t.parseArg(e,s)}catch(t){if(t.code==="commander.invalidArgument"){const e=`${i} ${t.message}`;this.error(e,{exitCode:t.exitCode,code:t.code})}throw t}}_registerOption(t){const e=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(e){const s=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${s}'\n- already used by option '${e.flags}'`)}this.options.push(t)}_registerCommand(t){const knownBy=t=>[t.name()].concat(t.aliases());const e=knownBy(t).find((t=>this._findCommand(t)));if(e){const s=knownBy(this._findCommand(e)).join("|");const i=knownBy(t).join("|");throw new Error(`cannot add command '${i}' as already have command '${s}'`)}this.commands.push(t)}addOption(t){this._registerOption(t);const e=t.name();const s=t.attributeName();if(t.negate){const e=t.long.replace(/^--no-/,"--");if(!this._findOption(e)){this.setOptionValueWithSource(s,t.defaultValue===undefined?true:t.defaultValue,"default")}}else if(t.defaultValue!==undefined){this.setOptionValueWithSource(s,t.defaultValue,"default")}const handleOptionValue=(e,i,n)=>{if(e==null&&t.presetArg!==undefined){e=t.presetArg}const r=this.getOptionValue(s);if(e!==null&&t.parseArg){e=this._callParseArg(t,e,r,i)}else if(e!==null&&t.variadic){e=t._concatValue(e,r)}if(e==null){if(t.negate){e=false}else if(t.isBoolean()||t.optional){e=true}else{e=""}}this.setOptionValueWithSource(s,e,n)};this.on("option:"+e,(e=>{const s=`error: option '${t.flags}' argument '${e}' is invalid.`;handleOptionValue(e,s,"cli")}));if(t.envVar){this.on("optionEnv:"+e,(e=>{const s=`error: option '${t.flags}' value '${e}' from env '${t.envVar}' is invalid.`;handleOptionValue(e,s,"env")}))}return this}_optionEx(t,e,s,i,n){if(typeof e==="object"&&e instanceof f){throw new Error("To add an Option object use addOption() instead of option() or requiredOption()")}const r=this.createOption(e,s);r.makeOptionMandatory(!!t.mandatory);if(typeof i==="function"){r.default(n).argParser(i)}else if(i instanceof RegExp){const t=i;i=(e,s)=>{const i=t.exec(e);return i?i[0]:s};r.default(n).argParser(i)}else{r.default(i)}return this.addOption(r)}option(t,e,s,i){return this._optionEx({},t,e,s,i)}requiredOption(t,e,s,i){return this._optionEx({mandatory:true},t,e,s,i)}combineFlagAndOptionalValue(t=true){this._combineFlagAndOptionalValue=!!t;return this}allowUnknownOption(t=true){this._allowUnknownOption=!!t;return this}allowExcessArguments(t=true){this._allowExcessArguments=!!t;return this}enablePositionalOptions(t=true){this._enablePositionalOptions=!!t;return this}passThroughOptions(t=true){this._passThroughOptions=!!t;this._checkForBrokenPassThrough();return this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions){throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}}storeOptionsAsProperties(t=true){if(this.options.length){throw new Error("call .storeOptionsAsProperties() before adding options")}if(Object.keys(this._optionValues).length){throw new Error("call .storeOptionsAsProperties() before setting option values")}this._storeOptionsAsProperties=!!t;return this}getOptionValue(t){if(this._storeOptionsAsProperties){return this[t]}return this._optionValues[t]}setOptionValue(t,e){return this.setOptionValueWithSource(t,e,undefined)}setOptionValueWithSource(t,e,s){if(this._storeOptionsAsProperties){this[t]=e}else{this._optionValues[t]=e}this._optionValueSources[t]=s;return this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let e;this._getCommandAndAncestors().forEach((s=>{if(s.getOptionValueSource(t)!==undefined){e=s.getOptionValueSource(t)}}));return e}_prepareUserArgs(t,e){if(t!==undefined&&!Array.isArray(t)){throw new Error("first parameter to parse must be array or undefined")}e=e||{};if(t===undefined&&e.from===undefined){if(a.versions?.electron){e.from="electron"}const t=a.execArgv??[];if(t.includes("-e")||t.includes("--eval")||t.includes("-p")||t.includes("--print")){e.from="eval"}}if(t===undefined){t=a.argv}this.rawArgs=t.slice();let s;switch(e.from){case undefined:case"node":this._scriptPath=t[1];s=t.slice(2);break;case"electron":if(a.defaultApp){this._scriptPath=t[1];s=t.slice(2)}else{s=t.slice(1)}break;case"user":s=t.slice(0);break;case"eval":s=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${e.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);this._name=this._name||"program";return s}parse(t,e){const s=this._prepareUserArgs(t,e);this._parseCommand([],s);return this}async parseAsync(t,e){const s=this._prepareUserArgs(t,e);await this._parseCommand([],s);return this}_executeSubCommand(t,e){e=e.slice();let s=false;const i=[".js",".ts",".tsx",".mjs",".cjs"];function findFile(t,e){const s=r.resolve(t,e);if(o.existsSync(s))return s;if(i.includes(r.extname(e)))return undefined;const n=i.find((t=>o.existsSync(`${s}${t}`)));if(n)return`${s}${n}`;return undefined}this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();let h=t._executableFile||`${this._name}-${t._name}`;let l=this._executableDir||"";if(this._scriptPath){let t;try{t=o.realpathSync(this._scriptPath)}catch(e){t=this._scriptPath}l=r.resolve(r.dirname(t),l)}if(l){let e=findFile(l,h);if(!e&&!t._executableFile&&this._scriptPath){const s=r.basename(this._scriptPath,r.extname(this._scriptPath));if(s!==this._name){e=findFile(l,`${s}-${t._name}`)}}h=e||h}s=i.includes(r.extname(h));let u;if(a.platform!=="win32"){if(s){e.unshift(h);e=incrementNodeInspectorPort(a.execArgv).concat(e);u=n.spawn(a.argv[0],e,{stdio:"inherit"})}else{u=n.spawn(h,e,{stdio:"inherit"})}}else{e.unshift(h);e=incrementNodeInspectorPort(a.execArgv).concat(e);u=n.spawn(a.execPath,e,{stdio:"inherit"})}if(!u.killed){const t=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];t.forEach((t=>{a.on(t,(()=>{if(u.killed===false&&u.exitCode===null){u.kill(t)}}))}))}const f=this._exitCallback;u.on("close",(t=>{t=t??1;if(!f){a.exit(t)}else{f(new c(t,"commander.executeSubCommandAsync","(close)"))}}));u.on("error",(e=>{if(e.code==="ENOENT"){const e=l?`searched for local subcommand relative to directory '${l}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory";const s=`'${h}' does not exist\n - if '${t._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${e}`;throw new Error(s)}else if(e.code==="EACCES"){throw new Error(`'${h}' not executable`)}if(!f){a.exit(1)}else{const t=new c(1,"commander.executeSubCommandAsync","(error)");t.nestedError=e;f(t)}}));this.runningCommand=u}_dispatchSubcommand(t,e,s){const i=this._findCommand(t);if(!i)this.help({error:true});let n;n=this._chainOrCallSubCommandHook(n,i,"preSubcommand");n=this._chainOrCall(n,(()=>{if(i._executableHandler){this._executeSubCommand(i,e.concat(s))}else{return i._parseCommand(e,s)}}));return n}_dispatchHelpCommand(t){if(!t){this.help()}const e=this._findCommand(t);if(e&&!e._executableHandler){e.help()}return this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach(((t,e)=>{if(t.required&&this.args[e]==null){this.missingArgument(t.name())}}));if(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic){return}if(this.args.length>this.registeredArguments.length){this._excessArguments(this.args)}}_processArguments(){const myParseArg=(t,e,s)=>{let i=e;if(e!==null&&t.parseArg){const n=`error: command-argument value '${e}' is invalid for argument '${t.name()}'.`;i=this._callParseArg(t,e,s,n)}return i};this._checkNumberOfArguments();const t=[];this.registeredArguments.forEach(((e,s)=>{let i=e.defaultValue;if(e.variadic){if(s<this.args.length){i=this.args.slice(s);if(e.parseArg){i=i.reduce(((t,s)=>myParseArg(e,s,t)),e.defaultValue)}}else if(i===undefined){i=[]}}else if(s<this.args.length){i=this.args[s];if(e.parseArg){i=myParseArg(e,i,e.defaultValue)}}t[s]=i}));this.processedArgs=t}_chainOrCall(t,e){if(t&&t.then&&typeof t.then==="function"){return t.then((()=>e()))}return e()}_chainOrCallHooks(t,e){let s=t;const i=[];this._getCommandAndAncestors().reverse().filter((t=>t._lifeCycleHooks[e]!==undefined)).forEach((t=>{t._lifeCycleHooks[e].forEach((e=>{i.push({hookedCommand:t,callback:e})}))}));if(e==="postAction"){i.reverse()}i.forEach((t=>{s=this._chainOrCall(s,(()=>t.callback(t.hookedCommand,this)))}));return s}_chainOrCallSubCommandHook(t,e,s){let i=t;if(this._lifeCycleHooks[s]!==undefined){this._lifeCycleHooks[s].forEach((t=>{i=this._chainOrCall(i,(()=>t(this,e)))}))}return i}_parseCommand(t,e){const s=this.parseOptions(e);this._parseOptionsEnv();this._parseOptionsImplied();t=t.concat(s.operands);e=s.unknown;this.args=t.concat(e);if(t&&this._findCommand(t[0])){return this._dispatchSubcommand(t[0],t.slice(1),e)}if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name()){return this._dispatchHelpCommand(t[1])}if(this._defaultCommandName){this._outputHelpIfRequested(e);return this._dispatchSubcommand(this._defaultCommandName,t,e)}if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName){this.help({error:true})}this._outputHelpIfRequested(s.unknown);this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();const checkForUnknownOptions=()=>{if(s.unknown.length>0){this.unknownOption(s.unknown[0])}};const i=`command:${this.name()}`;if(this._actionHandler){checkForUnknownOptions();this._processArguments();let s;s=this._chainOrCallHooks(s,"preAction");s=this._chainOrCall(s,(()=>this._actionHandler(this.processedArgs)));if(this.parent){s=this._chainOrCall(s,(()=>{this.parent.emit(i,t,e)}))}s=this._chainOrCallHooks(s,"postAction");return s}if(this.parent&&this.parent.listenerCount(i)){checkForUnknownOptions();this._processArguments();this.parent.emit(i,t,e)}else if(t.length){if(this._findCommand("*")){return this._dispatchSubcommand("*",t,e)}if(this.listenerCount("command:*")){this.emit("command:*",t,e)}else if(this.commands.length){this.unknownCommand()}else{checkForUnknownOptions();this._processArguments()}}else if(this.commands.length){checkForUnknownOptions();this.help({error:true})}else{checkForUnknownOptions();this._processArguments()}}_findCommand(t){if(!t)return undefined;return this.commands.find((e=>e._name===t||e._aliases.includes(t)))}_findOption(t){return this.options.find((e=>e.is(t)))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((t=>{t.options.forEach((e=>{if(e.mandatory&&t.getOptionValue(e.attributeName())===undefined){t.missingMandatoryOptionValue(e)}}))}))}_checkForConflictingLocalOptions(){const t=this.options.filter((t=>{const e=t.attributeName();if(this.getOptionValue(e)===undefined){return false}return this.getOptionValueSource(e)!=="default"}));const e=t.filter((t=>t.conflictsWith.length>0));e.forEach((e=>{const s=t.find((t=>e.conflictsWith.includes(t.attributeName())));if(s){this._conflictingOption(e,s)}}))}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((t=>{t._checkForConflictingLocalOptions()}))}parseOptions(t){const e=[];const s=[];let i=e;const n=t.slice();function maybeOption(t){return t.length>1&&t[0]==="-"}let r=null;while(n.length){const t=n.shift();if(t==="--"){if(i===s)i.push(t);i.push(...n);break}if(r&&!maybeOption(t)){this.emit(`option:${r.name()}`,t);continue}r=null;if(maybeOption(t)){const e=this._findOption(t);if(e){if(e.required){const t=n.shift();if(t===undefined)this.optionMissingArgument(e);this.emit(`option:${e.name()}`,t)}else if(e.optional){let t=null;if(n.length>0&&!maybeOption(n[0])){t=n.shift()}this.emit(`option:${e.name()}`,t)}else{this.emit(`option:${e.name()}`)}r=e.variadic?e:null;continue}}if(t.length>2&&t[0]==="-"&&t[1]!=="-"){const e=this._findOption(`-${t[1]}`);if(e){if(e.required||e.optional&&this._combineFlagAndOptionalValue){this.emit(`option:${e.name()}`,t.slice(2))}else{this.emit(`option:${e.name()}`);n.unshift(`-${t.slice(2)}`)}continue}}if(/^--[^=]+=/.test(t)){const e=t.indexOf("=");const s=this._findOption(t.slice(0,e));if(s&&(s.required||s.optional)){this.emit(`option:${s.name()}`,t.slice(e+1));continue}}if(maybeOption(t)){i=s}if((this._enablePositionalOptions||this._passThroughOptions)&&e.length===0&&s.length===0){if(this._findCommand(t)){e.push(t);if(n.length>0)s.push(...n);break}else if(this._getHelpCommand()&&t===this._getHelpCommand().name()){e.push(t);if(n.length>0)e.push(...n);break}else if(this._defaultCommandName){s.push(t);if(n.length>0)s.push(...n);break}}if(this._passThroughOptions){i.push(t);if(n.length>0)i.push(...n);break}i.push(t)}return{operands:e,unknown:s}}opts(){if(this._storeOptionsAsProperties){const t={};const e=this.options.length;for(let s=0;s<e;s++){const e=this.options[s].attributeName();t[e]=e===this._versionOptionName?this._version:this[e]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce(((t,e)=>Object.assign(t,e.opts())),{})}error(t,e){this._outputConfiguration.outputError(`${t}\n`,this._outputConfiguration.writeErr);if(typeof this._showHelpAfterError==="string"){this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`)}else if(this._showHelpAfterError){this._outputConfiguration.writeErr("\n");this.outputHelp({error:true})}const s=e||{};const i=s.exitCode||1;const n=s.code||"commander.error";this._exit(i,n,t)}_parseOptionsEnv(){this.options.forEach((t=>{if(t.envVar&&t.envVar in a.env){const e=t.attributeName();if(this.getOptionValue(e)===undefined||["default","config","env"].includes(this.getOptionValueSource(e))){if(t.required||t.optional){this.emit(`optionEnv:${t.name()}`,a.env[t.envVar])}else{this.emit(`optionEnv:${t.name()}`)}}}}))}_parseOptionsImplied(){const t=new p(this.options);const hasCustomOptionValue=t=>this.getOptionValue(t)!==undefined&&!["default","implied"].includes(this.getOptionValueSource(t));this.options.filter((e=>e.implied!==undefined&&hasCustomOptionValue(e.attributeName())&&t.valueFromOption(this.getOptionValue(e.attributeName()),e))).forEach((t=>{Object.keys(t.implied).filter((t=>!hasCustomOptionValue(t))).forEach((e=>{this.setOptionValueWithSource(e,t.implied[e],"implied")}))}))}missingArgument(t){const e=`error: missing required argument '${t}'`;this.error(e,{code:"commander.missingArgument"})}optionMissingArgument(t){const e=`error: option '${t.flags}' argument missing`;this.error(e,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){const e=`error: required option '${t.flags}' not specified`;this.error(e,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,e){const findBestOptionFromValue=t=>{const e=t.attributeName();const s=this.getOptionValue(e);const i=this.options.find((t=>t.negate&&e===t.attributeName()));const n=this.options.find((t=>!t.negate&&e===t.attributeName()));if(i&&(i.presetArg===undefined&&s===false||i.presetArg!==undefined&&s===i.presetArg)){return i}return n||t};const getErrorMessage=t=>{const e=findBestOptionFromValue(t);const s=e.attributeName();const i=this.getOptionValueSource(s);if(i==="env"){return`environment variable '${e.envVar}'`}return`option '${e.flags}'`};const s=`error: ${getErrorMessage(t)} cannot be used with ${getErrorMessage(e)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let e="";if(t.startsWith("--")&&this._showSuggestionAfterError){let s=[];let i=this;do{const t=i.createHelp().visibleOptions(i).filter((t=>t.long)).map((t=>t.long));s=s.concat(t);i=i.parent}while(i&&!i._enablePositionalOptions);e=d(t,s)}const s=`error: unknown option '${t}'${e}`;this.error(s,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;const e=this.registeredArguments.length;const s=e===1?"":"s";const i=this.parent?` for '${this.name()}'`:"";const n=`error: too many arguments${i}. Expected ${e} argument${s} but got ${t.length}.`;this.error(n,{code:"commander.excessArguments"})}unknownCommand(){const t=this.args[0];let e="";if(this._showSuggestionAfterError){const s=[];this.createHelp().visibleCommands(this).forEach((t=>{s.push(t.name());if(t.alias())s.push(t.alias())}));e=d(t,s)}const s=`error: unknown command '${t}'${e}`;this.error(s,{code:"commander.unknownCommand"})}version(t,e,s){if(t===undefined)return this._version;this._version=t;e=e||"-V, --version";s=s||"output the version number";const i=this.createOption(e,s);this._versionOptionName=i.attributeName();this._registerOption(i);this.on("option:"+i.name(),(()=>{this._outputConfiguration.writeOut(`${t}\n`);this._exit(0,"commander.version",t)}));return this}description(t,e){if(t===undefined&&e===undefined)return this._description;this._description=t;if(e){this._argsDescription=e}return this}summary(t){if(t===undefined)return this._summary;this._summary=t;return this}alias(t){if(t===undefined)return this._aliases[0];let e=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler){e=this.commands[this.commands.length-1]}if(t===e._name)throw new Error("Command alias can't be the same as its name");const s=this.parent?._findCommand(t);if(s){const e=[s.name()].concat(s.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${e}'`)}e._aliases.push(t);return this}aliases(t){if(t===undefined)return this._aliases;t.forEach((t=>this.alias(t)));return this}usage(t){if(t===undefined){if(this._usage)return this._usage;const t=this.registeredArguments.map((t=>l(t)));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}this._usage=t;return this}name(t){if(t===undefined)return this._name;this._name=t;return this}nameFromFilename(t){this._name=r.basename(t,r.extname(t));return this}executableDir(t){if(t===undefined)return this._executableDir;this._executableDir=t;return this}helpInformation(t){const e=this.createHelp();if(e.helpWidth===undefined){e.helpWidth=t&&t.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()}return e.formatHelp(this,e)}_getHelpContext(t){t=t||{};const e={error:!!t.error};let s;if(e.error){s=t=>this._outputConfiguration.writeErr(t)}else{s=t=>this._outputConfiguration.writeOut(t)}e.write=t.write||s;e.command=this;return e}outputHelp(t){let e;if(typeof t==="function"){e=t;t=undefined}const s=this._getHelpContext(t);this._getCommandAndAncestors().reverse().forEach((t=>t.emit("beforeAllHelp",s)));this.emit("beforeHelp",s);let i=this.helpInformation(s);if(e){i=e(i);if(typeof i!=="string"&&!Buffer.isBuffer(i)){throw new Error("outputHelp callback must return a string or a Buffer")}}s.write(i);if(this._getHelpOption()?.long){this.emit(this._getHelpOption().long)}this.emit("afterHelp",s);this._getCommandAndAncestors().forEach((t=>t.emit("afterAllHelp",s)))}helpOption(t,e){if(typeof t==="boolean"){if(t){this._helpOption=this._helpOption??undefined}else{this._helpOption=null}return this}t=t??"-h, --help";e=e??"display help for command";this._helpOption=this.createOption(t,e);return this}_getHelpOption(){if(this._helpOption===undefined){this.helpOption(undefined,undefined)}return this._helpOption}addHelpOption(t){this._helpOption=t;return this}help(t){this.outputHelp(t);let e=a.exitCode||0;if(e===0&&t&&typeof t!=="function"&&t.error){e=1}this._exit(e,"commander.help","(outputHelp)")}addHelpText(t,e){const s=["beforeAll","before","after","afterAll"];if(!s.includes(t)){throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${s.join("', '")}'`)}const i=`${t}Help`;this.on(i,(t=>{let s;if(typeof e==="function"){s=e({error:t.error,command:t.command})}else{s=e}if(s){t.write(`${s}\n`)}}));return this}_outputHelpIfRequested(t){const e=this._getHelpOption();const s=e&&t.find((t=>e.is(t)));if(s){this.outputHelp();this._exit(0,"commander.helpDisplayed","(outputHelp)")}}}function incrementNodeInspectorPort(t){return t.map((t=>{if(!t.startsWith("--inspect")){return t}let e;let s="127.0.0.1";let i="9229";let n;if((n=t.match(/^(--inspect(-brk)?)$/))!==null){e=n[1]}else if((n=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null){e=n[1];if(/^\d+$/.test(n[3])){i=n[3]}else{s=n[3]}}else if((n=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null){e=n[1];s=n[3];i=n[4]}if(e&&i!=="0"){return`${e}=${s}:${parseInt(i)+1}`}return t}))}e.Command=Command},851:(t,e)=>{class CommanderError extends Error{constructor(t,e,s){super(s);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name;this.code=e;this.exitCode=t;this.nestedError=undefined}}class InvalidArgumentError extends CommanderError{constructor(t){super(1,"commander.invalidArgument",t);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name}}e.CommanderError=CommanderError;e.InvalidArgumentError=InvalidArgumentError},518:(t,e,s)=>{const{humanReadableArgName:i}=s(854);class Help{constructor(){this.helpWidth=undefined;this.sortSubcommands=false;this.sortOptions=false;this.showGlobalOptions=false}visibleCommands(t){const e=t.commands.filter((t=>!t._hidden));const s=t._getHelpCommand();if(s&&!s._hidden){e.push(s)}if(this.sortSubcommands){e.sort(((t,e)=>t.name().localeCompare(e.name())))}return e}compareOptions(t,e){const getSortKey=t=>t.short?t.short.replace(/^-/,""):t.long.replace(/^--/,"");return getSortKey(t).localeCompare(getSortKey(e))}visibleOptions(t){const e=t.options.filter((t=>!t.hidden));const s=t._getHelpOption();if(s&&!s.hidden){const i=s.short&&t._findOption(s.short);const n=s.long&&t._findOption(s.long);if(!i&&!n){e.push(s)}else if(s.long&&!n){e.push(t.createOption(s.long,s.description))}else if(s.short&&!i){e.push(t.createOption(s.short,s.description))}}if(this.sortOptions){e.sort(this.compareOptions)}return e}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];const e=[];for(let s=t.parent;s;s=s.parent){const t=s.options.filter((t=>!t.hidden));e.push(...t)}if(this.sortOptions){e.sort(this.compareOptions)}return e}visibleArguments(t){if(t._argsDescription){t.registeredArguments.forEach((e=>{e.description=e.description||t._argsDescription[e.name()]||""}))}if(t.registeredArguments.find((t=>t.description))){return t.registeredArguments}return[]}subcommandTerm(t){const e=t.registeredArguments.map((t=>i(t))).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(e?" "+e:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,e){return e.visibleCommands(t).reduce(((t,s)=>Math.max(t,e.subcommandTerm(s).length)),0)}longestOptionTermLength(t,e){return e.visibleOptions(t).reduce(((t,s)=>Math.max(t,e.optionTerm(s).length)),0)}longestGlobalOptionTermLength(t,e){return e.visibleGlobalOptions(t).reduce(((t,s)=>Math.max(t,e.optionTerm(s).length)),0)}longestArgumentTermLength(t,e){return e.visibleArguments(t).reduce(((t,s)=>Math.max(t,e.argumentTerm(s).length)),0)}commandUsage(t){let e=t._name;if(t._aliases[0]){e=e+"|"+t._aliases[0]}let s="";for(let e=t.parent;e;e=e.parent){s=e.name()+" "+s}return s+e+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){const e=[];if(t.argChoices){e.push(`choices: ${t.argChoices.map((t=>JSON.stringify(t))).join(", ")}`)}if(t.defaultValue!==undefined){const s=t.required||t.optional||t.isBoolean()&&typeof t.defaultValue==="boolean";if(s){e.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`)}}if(t.presetArg!==undefined&&t.optional){e.push(`preset: ${JSON.stringify(t.presetArg)}`)}if(t.envVar!==undefined){e.push(`env: ${t.envVar}`)}if(e.length>0){return`${t.description} (${e.join(", ")})`}return t.description}argumentDescription(t){const e=[];if(t.argChoices){e.push(`choices: ${t.argChoices.map((t=>JSON.stringify(t))).join(", ")}`)}if(t.defaultValue!==undefined){e.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`)}if(e.length>0){const s=`(${e.join(", ")})`;if(t.description){return`${t.description} ${s}`}return s}return t.description}formatHelp(t,e){const s=e.padWidth(t,e);const i=e.helpWidth||80;const n=2;const r=2;function formatItem(t,o){if(o){const a=`${t.padEnd(s+r)}${o}`;return e.wrap(a,i-n,s+r)}return t}function formatList(t){return t.join("\n").replace(/^/gm," ".repeat(n))}let o=[`Usage: ${e.commandUsage(t)}`,""];const a=e.commandDescription(t);if(a.length>0){o=o.concat([e.wrap(a,i,0),""])}const h=e.visibleArguments(t).map((t=>formatItem(e.argumentTerm(t),e.argumentDescription(t))));if(h.length>0){o=o.concat(["Arguments:",formatList(h),""])}const l=e.visibleOptions(t).map((t=>formatItem(e.optionTerm(t),e.optionDescription(t))));if(l.length>0){o=o.concat(["Options:",formatList(l),""])}if(this.showGlobalOptions){const s=e.visibleGlobalOptions(t).map((t=>formatItem(e.optionTerm(t),e.optionDescription(t))));if(s.length>0){o=o.concat(["Global Options:",formatList(s),""])}}const c=e.visibleCommands(t).map((t=>formatItem(e.subcommandTerm(t),e.subcommandDescription(t))));if(c.length>0){o=o.concat(["Commands:",formatList(c),""])}return o.join("\n")}padWidth(t,e){return Math.max(e.longestOptionTermLength(t,e),e.longestGlobalOptionTermLength(t,e),e.longestSubcommandTermLength(t,e),e.longestArgumentTermLength(t,e))}wrap(t,e,s,i=40){const n=" \\f\\t\\v - \ufeff";const r=new RegExp(`[\\n][${n}]+`);if(t.match(r))return t;const o=e-s;if(o<i)return t;const a=t.slice(0,s);const h=t.slice(s).replace("\r\n","\n");const l=" ".repeat(s);const c="";const u=`\\s${c}`;const f=new RegExp(`\n|.{1,${o-1}}([${u}]|$)|[^${u}]+?([${u}]|$)`,"g");const p=h.match(f)||[];return a+p.map(((t,e)=>{if(t==="\n")return"";return(e>0?l:"")+t.trimEnd()})).join("\n")}}e.Help=Help},596:(t,e,s)=>{const{InvalidArgumentError:i}=s(851);class Option{constructor(t,e){this.flags=t;this.description=e||"";this.required=t.includes("<");this.optional=t.includes("[");this.variadic=/\w\.\.\.[>\]]$/.test(t);this.mandatory=false;const s=splitOptionFlags(t);this.short=s.shortFlag;this.long=s.longFlag;this.negate=false;if(this.long){this.negate=this.long.startsWith("--no-")}this.defaultValue=undefined;this.defaultValueDescription=undefined;this.presetArg=undefined;this.envVar=undefined;this.parseArg=undefined;this.hidden=false;this.argChoices=undefined;this.conflictsWith=[];this.implied=undefined}default(t,e){this.defaultValue=t;this.defaultValueDescription=e;return this}preset(t){this.presetArg=t;return this}conflicts(t){this.conflictsWith=this.conflictsWith.concat(t);return this}implies(t){let e=t;if(typeof t==="string"){e={[t]:true}}this.implied=Object.assign(this.implied||{},e);return this}env(t){this.envVar=t;return this}argParser(t){this.parseArg=t;return this}makeOptionMandatory(t=true){this.mandatory=!!t;return this}hideHelp(t=true){this.hidden=!!t;return this}_concatValue(t,e){if(e===this.defaultValue||!Array.isArray(e)){return[t]}return e.concat(t)}choices(t){this.argChoices=t.slice();this.parseArg=(t,e)=>{if(!this.argChoices.includes(t)){throw new i(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._concatValue(t,e)}return t};return this}name(){if(this.long){return this.long.replace(/^--/,"")}return this.short.replace(/^-/,"")}attributeName(){return camelcase(this.name().replace(/^no-/,""))}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class DualOptions{constructor(t){this.positiveOptions=new Map;this.negativeOptions=new Map;this.dualOptions=new Set;t.forEach((t=>{if(t.negate){this.negativeOptions.set(t.attributeName(),t)}else{this.positiveOptions.set(t.attributeName(),t)}}));this.negativeOptions.forEach(((t,e)=>{if(this.positiveOptions.has(e)){this.dualOptions.add(e)}}))}valueFromOption(t,e){const s=e.attributeName();if(!this.dualOptions.has(s))return true;const i=this.negativeOptions.get(s).presetArg;const n=i!==undefined?i:false;return e.negate===(n===t)}}function camelcase(t){return t.split("-").reduce(((t,e)=>t+e[0].toUpperCase()+e.slice(1)))}function splitOptionFlags(t){let e;let s;const i=t.split(/[ |,]+/);if(i.length>1&&!/^[[<]/.test(i[1]))e=i.shift();s=i.shift();if(!e&&/^-[^-]$/.test(s)){e=s;s=undefined}return{shortFlag:e,longFlag:s}}e.Option=Option;e.DualOptions=DualOptions},266:(t,e)=>{const s=3;function editDistance(t,e){if(Math.abs(t.length-e.length)>s)return Math.max(t.length,e.length);const i=[];for(let e=0;e<=t.length;e++){i[e]=[e]}for(let t=0;t<=e.length;t++){i[0][t]=t}for(let s=1;s<=e.length;s++){for(let n=1;n<=t.length;n++){let r=1;if(t[n-1]===e[s-1]){r=0}else{r=1}i[n][s]=Math.min(i[n-1][s]+1,i[n][s-1]+1,i[n-1][s-1]+r);if(n>1&&s>1&&t[n-1]===e[s-2]&&t[n-2]===e[s-1]){i[n][s]=Math.min(i[n][s],i[n-2][s-2]+1)}}}return i[t.length][e.length]}function suggestSimilar(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));const i=t.startsWith("--");if(i){t=t.slice(2);e=e.map((t=>t.slice(2)))}let n=[];let r=s;const o=.4;e.forEach((e=>{if(e.length<=1)return;const s=editDistance(t,e);const i=Math.max(t.length,e.length);const a=(i-s)/i;if(a>o){if(s<r){r=s;n=[e]}else if(s===r){n.push(e)}}}));n.sort(((t,e)=>t.localeCompare(e)));if(i){n=n.map((t=>`--${t}`))}if(n.length>1){return`\n(Did you mean one of ${n.join(", ")}?)`}if(n.length===1){return`\n(Did you mean ${n[0]}?)`}return""}e.suggestSimilar=suggestSimilar}};var s={};function __nccwpck_require__(t){var i=s[t];if(i!==undefined){return i.exports}var n=s[t]={exports:{}};var r=true;try{e[t](n,n.exports,__nccwpck_require__);r=false}finally{if(r)delete s[t]}return n.exports}(()=>{__nccwpck_require__.n=t=>{var e=t&&t.__esModule?()=>t["default"]:()=>t;__nccwpck_require__.d(e,{a:e});return e}})();(()=>{var t=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__;var e;__nccwpck_require__.t=function(s,i){if(i&1)s=this(s);if(i&8)return s;if(typeof s==="object"&&s){if(i&4&&s.__esModule)return s;if(i&16&&typeof s.then==="function")return s}var n=Object.create(null);__nccwpck_require__.r(n);var r={};e=e||[null,t({}),t([]),t(t)];for(var o=i&2&&s;typeof o=="object"&&!~e.indexOf(o);o=t(o)){Object.getOwnPropertyNames(o).forEach((t=>r[t]=()=>s[t]))}r["default"]=()=>s;__nccwpck_require__.d(n,r);return n}})();(()=>{__nccwpck_require__.d=(t,e)=>{for(var s in e){if(__nccwpck_require__.o(e,s)&&!__nccwpck_require__.o(t,s)){Object.defineProperty(t,s,{enumerable:true,get:e[s]})}}}})();(()=>{__nccwpck_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e)})();(()=>{__nccwpck_require__.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=new URL(".",import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/)?1:0,-1)+"/";var i={};const n=t(import.meta.url)("node:url");globalThis.__filename=(0,n.fileURLToPath)(import.meta.url);const r=10;const wrapAnsi16=(t=0)=>e=>`[${e+t}m`;const wrapAnsi256=(t=0)=>e=>`[${38+t};5;${e}m`;const wrapAnsi16m=(t=0)=>(e,s,i)=>`[${38+t};2;${e};${s};${i}m`;const o={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};const a=Object.keys(o.modifier);const h=Object.keys(o.color);const l=Object.keys(o.bgColor);const c=[...h,...l];function assembleStyles(){const t=new Map;for(const[e,s]of Object.entries(o)){for(const[e,i]of Object.entries(s)){o[e]={open:`[${i[0]}m`,close:`[${i[1]}m`};s[e]=o[e];t.set(i[0],i[1])}Object.defineProperty(o,e,{value:s,enumerable:false})}Object.defineProperty(o,"codes",{value:t,enumerable:false});o.color.close="[39m";o.bgColor.close="[49m";o.color.ansi=wrapAnsi16();o.color.ansi256=wrapAnsi256();o.color.ansi16m=wrapAnsi16m();o.bgColor.ansi=wrapAnsi16(r);o.bgColor.ansi256=wrapAnsi256(r);o.bgColor.ansi16m=wrapAnsi16m(r);Object.defineProperties(o,{rgbToAnsi256:{value(t,e,s){if(t===e&&e===s){if(t<8){return 16}if(t>248){return 231}return Math.round((t-8)/247*24)+232}return 16+36*Math.round(t/255*5)+6*Math.round(e/255*5)+Math.round(s/255*5)},enumerable:false},hexToRgb:{value(t){const e=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!e){return[0,0,0]}let[s]=e;if(s.length===3){s=[...s].map((t=>t+t)).join("")}const i=Number.parseInt(s,16);return[i>>16&255,i>>8&255,i&255]},enumerable:false},hexToAnsi256:{value:t=>o.rgbToAnsi256(...o.hexToRgb(t)),enumerable:false},ansi256ToAnsi:{value(t){if(t<8){return 30+t}if(t<16){return 90+(t-8)}let e;let s;let i;if(t>=232){e=((t-232)*10+8)/255;s=e;i=e}else{t-=16;const n=t%36;e=Math.floor(t/36)/5;s=Math.floor(n/6)/5;i=n%6/5}const n=Math.max(e,s,i)*2;if(n===0){return 30}let r=30+(Math.round(i)<<2|Math.round(s)<<1|Math.round(e));if(n===2){r+=60}return r},enumerable:false},rgbToAnsi:{value:(t,e,s)=>o.ansi256ToAnsi(o.rgbToAnsi256(t,e,s)),enumerable:false},hexToAnsi:{value:t=>o.ansi256ToAnsi(o.hexToAnsi256(t)),enumerable:false}});return o}const u=assembleStyles();const f=u;var p=__nccwpck_require__(708);const d=t(import.meta.url)("node:os");const g=t(import.meta.url)("node:tty");function hasFlag(t,e=(globalThis.Deno?globalThis.Deno.args:p.argv)){const s=t.startsWith("-")?"":t.length===1?"-":"--";const i=e.indexOf(s+t);const n=e.indexOf("--");return i!==-1&&(n===-1||i<n)}const{env:y}=p;let w;if(hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")||hasFlag("color=never")){w=0}else if(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always")){w=1}function envForceColor(){if("FORCE_COLOR"in y){if(y.FORCE_COLOR==="true"){return 1}if(y.FORCE_COLOR==="false"){return 0}return y.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(y.FORCE_COLOR,10),3)}}function translateLevel(t){if(t===0){return false}return{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function _supportsColor(t,{streamIsTTY:e,sniffFlags:s=true}={}){const i=envForceColor();if(i!==undefined){w=i}const n=s?w:i;if(n===0){return 0}if(s){if(hasFlag("color=16m")||hasFlag("color=full")||hasFlag("color=truecolor")){return 3}if(hasFlag("color=256")){return 2}}if("TF_BUILD"in y&&"AGENT_NAME"in y){return 1}if(t&&!e&&n===undefined){return 0}const r=n||0;if(y.TERM==="dumb"){return r}if(p.platform==="win32"){const t=d.release().split(".");if(Number(t[0])>=10&&Number(t[2])>=10586){return Number(t[2])>=14931?3:2}return 1}if("CI"in y){if("GITHUB_ACTIONS"in y||"GITEA_ACTIONS"in y){return 3}if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((t=>t in y))||y.CI_NAME==="codeship"){return 1}return r}if("TEAMCITY_VERSION"in y){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(y.TEAMCITY_VERSION)?1:0}if(y.COLORTERM==="truecolor"){return 3}if(y.TERM==="xterm-kitty"){return 3}if("TERM_PROGRAM"in y){const t=Number.parseInt((y.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(y.TERM_PROGRAM){case"iTerm.app":{return t>=3?3:2}case"Apple_Terminal":{return 2}}}if(/-256(color)?$/i.test(y.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(y.TERM)){return 1}if("COLORTERM"in y){return 1}return r}function createSupportsColor(t,e={}){const s=_supportsColor(t,{streamIsTTY:t&&t.isTTY,...e});return translateLevel(s)}const b={stdout:createSupportsColor({isTTY:g.isatty(1)}),stderr:createSupportsColor({isTTY:g.isatty(2)})};const _=b;function stringReplaceAll(t,e,s){let i=t.indexOf(e);if(i===-1){return t}const n=e.length;let r=0;let o="";do{o+=t.slice(r,i)+e+s;r=i+n;i=t.indexOf(e,r)}while(i!==-1);o+=t.slice(r);return o}function stringEncaseCRLFWithFirstIndex(t,e,s,i){let n=0;let r="";do{const o=t[i-1]==="\r";r+=t.slice(n,o?i-1:i)+e+(o?"\r\n":"\n")+s;n=i+1;i=t.indexOf("\n",n)}while(i!==-1);r+=t.slice(n);return r}const{stdout:S,stderr:v}=_;const A=Symbol("GENERATOR");const x=Symbol("STYLER");const k=Symbol("IS_EMPTY");const C=["ansi","ansi","ansi256","ansi16m"];const O=Object.create(null);const applyOptions=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3)){throw new Error("The `level` option should be an integer from 0 to 3")}const s=S?S.level:0;t.level=e.level===undefined?s:e.level};class Chalk{constructor(t){return chalkFactory(t)}}const chalkFactory=t=>{const chalk=(...t)=>t.join(" ");applyOptions(chalk,t);Object.setPrototypeOf(chalk,createChalk.prototype);return chalk};function createChalk(t){return chalkFactory(t)}Object.setPrototypeOf(createChalk.prototype,Function.prototype);for(const[t,e]of Object.entries(f)){O[t]={get(){const s=createBuilder(this,createStyler(e.open,e.close,this[x]),this[k]);Object.defineProperty(this,t,{value:s});return s}}}O.visible={get(){const t=createBuilder(this,this[x],true);Object.defineProperty(this,"visible",{value:t});return t}};const getModelAnsi=(t,e,s,...i)=>{if(t==="rgb"){if(e==="ansi16m"){return f[s].ansi16m(...i)}if(e==="ansi256"){return f[s].ansi256(f.rgbToAnsi256(...i))}return f[s].ansi(f.rgbToAnsi(...i))}if(t==="hex"){return getModelAnsi("rgb",e,s,...f.hexToRgb(...i))}return f[s][t](...i)};const E=["rgb","hex","ansi256"];for(const t of E){O[t]={get(){const{level:e}=this;return function(...s){const i=createStyler(getModelAnsi(t,C[e],"color",...s),f.color.close,this[x]);return createBuilder(this,i,this[k])}}};const e="bg"+t[0].toUpperCase()+t.slice(1);O[e]={get(){const{level:e}=this;return function(...s){const i=createStyler(getModelAnsi(t,C[e],"bgColor",...s),f.bgColor.close,this[x]);return createBuilder(this,i,this[k])}}}}const T=Object.defineProperties((()=>{}),{...O,level:{enumerable:true,get(){return this[A].level},set(t){this[A].level=t}}});const createStyler=(t,e,s)=>{let i;let n;if(s===undefined){i=t;n=e}else{i=s.openAll+t;n=e+s.closeAll}return{open:t,close:e,openAll:i,closeAll:n,parent:s}};const createBuilder=(t,e,s)=>{const builder=(...t)=>applyStyle(builder,t.length===1?""+t[0]:t.join(" "));Object.setPrototypeOf(builder,T);builder[A]=t;builder[x]=e;builder[k]=s;return builder};const applyStyle=(t,e)=>{if(t.level<=0||!e){return t[k]?"":e}let s=t[x];if(s===undefined){return e}const{openAll:i,closeAll:n}=s;if(e.includes("")){while(s!==undefined){e=stringReplaceAll(e,s.close,s.open);s=s.parent}}const r=e.indexOf("\n");if(r!==-1){e=stringEncaseCRLFWithFirstIndex(e,n,i,r)}return i+e+n};Object.defineProperties(createChalk.prototype,O);const P=createChalk();const M=createChalk({level:v?v.level:0});const F=P;var L=__nccwpck_require__(313);const{DM:R,gu:$,er:j,Ww:N,b7:I,Di:D,a2:B,uB:z,ef:W,c$:H,_V:V}=L;var G=__nccwpck_require__(760);var U=__nccwpck_require__.n(G);const q=t(import.meta.url)("fs");var J=__nccwpck_require__.n(q);var Y=__nccwpck_require__(365);const Z=1024*64;const assertValidPattern=t=>{if(typeof t!=="string"){throw new TypeError("invalid pattern")}if(t.length>Z){throw new TypeError("pattern is too long")}};const K={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",true],"[:alpha:]":["\\p{L}\\p{Nl}",true],"[:ascii:]":["\\x"+"00-\\x"+"7f",false],"[:blank:]":["\\p{Zs}\\t",true],"[:cntrl:]":["\\p{Cc}",true],"[:digit:]":["\\p{Nd}",true],"[:graph:]":["\\p{Z}\\p{C}",true,true],"[:lower:]":["\\p{Ll}",true],"[:print:]":["\\p{C}",true],"[:punct:]":["\\p{P}",true],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",true],"[:upper:]":["\\p{Lu}",true],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",true],"[:xdigit:]":["A-Fa-f0-9",false]};const braceEscape=t=>t.replace(/[[\]\\-]/g,"\\$&");const regexpEscape=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const rangesToString=t=>t.join("");const parseClass=(t,e)=>{const s=e;if(t.charAt(s)!=="["){throw new Error("not in a brace expression")}const i=[];const n=[];let r=s+1;let o=false;let a=false;let h=false;let l=false;let c=s;let u="";t:while(r<t.length){const e=t.charAt(r);if((e==="!"||e==="^")&&r===s+1){l=true;r++;continue}if(e==="]"&&o&&!h){c=r+1;break}o=true;if(e==="\\"){if(!h){h=true;r++;continue}}if(e==="["&&!h){for(const[e,[o,h,l]]of Object.entries(K)){if(t.startsWith(e,r)){if(u){return["$.",false,t.length-s,true]}r+=e.length;if(l)n.push(o);else i.push(o);a=a||h;continue t}}}h=false;if(u){if(e>u){i.push(braceEscape(u)+"-"+braceEscape(e))}else if(e===u){i.push(braceEscape(e))}u="";r++;continue}if(t.startsWith("-]",r+1)){i.push(braceEscape(e+"-"));r+=2;continue}if(t.startsWith("-",r+1)){u=e;r+=2;continue}i.push(braceEscape(e));r++}if(c<r){return["",false,0,false]}if(!i.length&&!n.length){return["$.",false,t.length-s,true]}if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!l){const t=i[0].length===2?i[0].slice(-1):i[0];return[regexpEscape(t),false,c-s,false]}const f="["+(l?"^":"")+rangesToString(i)+"]";const p="["+(l?"":"^")+rangesToString(n)+"]";const d=i.length&&n.length?"("+f+"|"+p+")":i.length?f:p;return[d,a,c-s,true]};const unescape_unescape=(t,{windowsPathsNoEscape:e=false}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");const X=new Set(["!","?","+","*","@"]);const isExtglobType=t=>X.has(t);const Q="(?!(?:^|/)\\.\\.?(?:$|/))";const tt="(?!\\.)";const et=new Set(["[","."]);const st=new Set(["..","."]);const it=new Set("().*{}+?[]^$\\!");const regExpEscape=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const nt="[^/]";const rt=nt+"*?";const ot=nt+"+?";class AST{type;#t;#e;#s=false;#i=[];#n;#r;#o;#a=false;#h;#l;#c=false;constructor(t,e,s={}){this.type=t;if(t)this.#e=true;this.#n=e;this.#t=this.#n?this.#n.#t:this;this.#h=this.#t===this?s:this.#t.#h;this.#o=this.#t===this?[]:this.#t.#o;if(t==="!"&&!this.#t.#a)this.#o.push(this);this.#r=this.#n?this.#n.#i.length:0}get hasMagic(){if(this.#e!==undefined)return this.#e;for(const t of this.#i){if(typeof t==="string")continue;if(t.type||t.hasMagic)return this.#e=true}return this.#e}toString(){if(this.#l!==undefined)return this.#l;if(!this.type){return this.#l=this.#i.map((t=>String(t))).join("")}else{return this.#l=this.type+"("+this.#i.map((t=>String(t))).join("|")+")"}}#u(){if(this!==this.#t)throw new Error("should only call on root");if(this.#a)return this;this.toString();this.#a=true;let t;while(t=this.#o.pop()){if(t.type!=="!")continue;let e=t;let s=e.#n;while(s){for(let i=e.#r+1;!s.type&&i<s.#i.length;i++){for(const e of t.#i){if(typeof e==="string"){throw new Error("string part in extglob AST??")}e.copyIn(s.#i[i])}}e=s;s=e.#n}}return this}push(...t){for(const e of t){if(e==="")continue;if(typeof e!=="string"&&!(e instanceof AST&&e.#n===this)){throw new Error("invalid part: "+e)}this.#i.push(e)}}toJSON(){const t=this.type===null?this.#i.slice().map((t=>typeof t==="string"?t:t.toJSON())):[this.type,...this.#i.map((t=>t.toJSON()))];if(this.isStart()&&!this.type)t.unshift([]);if(this.isEnd()&&(this===this.#t||this.#t.#a&&this.#n?.type==="!")){t.push({})}return t}isStart(){if(this.#t===this)return true;if(!this.#n?.isStart())return false;if(this.#r===0)return true;const t=this.#n;for(let e=0;e<this.#r;e++){const s=t.#i[e];if(!(s instanceof AST&&s.type==="!")){return false}}return true}isEnd(){if(this.#t===this)return true;if(this.#n?.type==="!")return true;if(!this.#n?.isEnd())return false;if(!this.type)return this.#n?.isEnd();const t=this.#n?this.#n.#i.length:0;return this.#r===t-1}copyIn(t){if(typeof t==="string")this.push(t);else this.push(t.clone(this))}clone(t){const e=new AST(this.type,t);for(const t of this.#i){e.copyIn(t)}return e}static#f(t,e,s,i){let n=false;let r=false;let o=-1;let a=false;if(e.type===null){let h=s;let l="";while(h<t.length){const s=t.charAt(h++);if(n||s==="\\"){n=!n;l+=s;continue}if(r){if(h===o+1){if(s==="^"||s==="!"){a=true}}else if(s==="]"&&!(h===o+2&&a)){r=false}l+=s;continue}else if(s==="["){r=true;o=h;a=false;l+=s;continue}if(!i.noext&&isExtglobType(s)&&t.charAt(h)==="("){e.push(l);l="";const n=new AST(s,e);h=AST.#f(t,n,h,i);e.push(n);continue}l+=s}e.push(l);return h}let h=s+1;let l=new AST(null,e);const c=[];let u="";while(h<t.length){const s=t.charAt(h++);if(n||s==="\\"){n=!n;u+=s;continue}if(r){if(h===o+1){if(s==="^"||s==="!"){a=true}}else if(s==="]"&&!(h===o+2&&a)){r=false}u+=s;continue}else if(s==="["){r=true;o=h;a=false;u+=s;continue}if(isExtglobType(s)&&t.charAt(h)==="("){l.push(u);u="";const e=new AST(s,l);l.push(e);h=AST.#f(t,e,h,i);continue}if(s==="|"){l.push(u);u="";c.push(l);l=new AST(null,e);continue}if(s===")"){if(u===""&&e.#i.length===0){e.#c=true}l.push(u);u="";e.push(...c,l);return h}u+=s}e.type=null;e.#e=undefined;e.#i=[t.substring(s-1)];return h}static fromGlob(t,e={}){const s=new AST(null,undefined,e);AST.#f(t,s,0,e);return s}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();const t=this.toString();const[e,s,i,n]=this.toRegExpSource();const r=i||this.#e||this.#h.nocase&&!this.#h.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase();if(!r){return s}const o=(this.#h.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${e}$`,o),{_src:e,_glob:t})}get options(){return this.#h}toRegExpSource(t){const e=t??!!this.#h.dot;if(this.#t===this)this.#u();if(!this.type){const s=this.isStart()&&this.isEnd();const i=this.#i.map((e=>{const[i,n,r,o]=typeof e==="string"?AST.#p(e,this.#e,s):e.toRegExpSource(t);this.#e=this.#e||r;this.#s=this.#s||o;return i})).join("");let n="";if(this.isStart()){if(typeof this.#i[0]==="string"){const s=this.#i.length===1&&st.has(this.#i[0]);if(!s){const s=et;const r=e&&s.has(i.charAt(0))||i.startsWith("\\.")&&s.has(i.charAt(2))||i.startsWith("\\.\\.")&&s.has(i.charAt(4));const o=!e&&!t&&s.has(i.charAt(0));n=r?Q:o?tt:""}}}let r="";if(this.isEnd()&&this.#t.#a&&this.#n?.type==="!"){r="(?:$|\\/)"}const o=n+i+r;return[o,unescape_unescape(i),this.#e=!!this.#e,this.#s]}const s=this.type==="*"||this.type==="+";const i=this.type==="!"?"(?:(?!(?:":"(?:";let n=this.#d(e);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){const t=this.toString();this.#i=[t];this.type=null;this.#e=undefined;return[t,unescape_unescape(this.toString()),false,false]}let r=!s||t||e||!tt?"":this.#d(true);if(r===n){r=""}if(r){n=`(?:${n})(?:${r})*?`}let o="";if(this.type==="!"&&this.#c){o=(this.isStart()&&!e?tt:"")+ot}else{const s=this.type==="!"?"))"+(this.isStart()&&!e&&!t?tt:"")+rt+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&r?")":this.type==="*"&&r?`)?`:`)${this.type}`;o=i+n+s}return[o,unescape_unescape(n),this.#e=!!this.#e,this.#s]}#d(t){return this.#i.map((e=>{if(typeof e==="string"){throw new Error("string type in extglob ast??")}const[s,i,n,r]=e.toRegExpSource(t);this.#s=this.#s||r;return s})).filter((t=>!(this.isStart()&&this.isEnd())||!!t)).join("|")}static#p(t,e,s=false){let i=false;let n="";let r=false;for(let o=0;o<t.length;o++){const a=t.charAt(o);if(i){i=false;n+=(it.has(a)?"\\":"")+a;continue}if(a==="\\"){if(o===t.length-1){n+="\\\\"}else{i=true}continue}if(a==="["){const[s,i,a,h]=parseClass(t,o);if(a){n+=s;r=r||i;o+=a-1;e=e||h;continue}}if(a==="*"){if(s&&t==="*")n+=ot;else n+=rt;e=true;continue}if(a==="?"){n+=nt;e=true;continue}n+=regExpEscape(a)}return[n,unescape_unescape(t),!!e,r]}}const escape_escape=(t,{windowsPathsNoEscape:e=false}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");const minimatch=(t,e,s={})=>{assertValidPattern(e);if(!s.nocomment&&e.charAt(0)==="#"){return false}return new Minimatch(e,s).match(t)};const at=/^\*+([^+@!?\*\[\(]*)$/;const starDotExtTest=t=>e=>!e.startsWith(".")&&e.endsWith(t);const starDotExtTestDot=t=>e=>e.endsWith(t);const starDotExtTestNocase=t=>{t=t.toLowerCase();return e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)};const starDotExtTestNocaseDot=t=>{t=t.toLowerCase();return e=>e.toLowerCase().endsWith(t)};const ht=/^\*+\.\*+$/;const starDotStarTest=t=>!t.startsWith(".")&&t.includes(".");const starDotStarTestDot=t=>t!=="."&&t!==".."&&t.includes(".");const lt=/^\.\*+$/;const dotStarTest=t=>t!=="."&&t!==".."&&t.startsWith(".");const ct=/^\*+$/;const starTest=t=>t.length!==0&&!t.startsWith(".");const starTestDot=t=>t.length!==0&&t!=="."&&t!=="..";const ut=/^\?+([^+@!?\*\[\(]*)?$/;const qmarksTestNocase=([t,e=""])=>{const s=qmarksTestNoExt([t]);if(!e)return s;e=e.toLowerCase();return t=>s(t)&&t.toLowerCase().endsWith(e)};const qmarksTestNocaseDot=([t,e=""])=>{const s=qmarksTestNoExtDot([t]);if(!e)return s;e=e.toLowerCase();return t=>s(t)&&t.toLowerCase().endsWith(e)};const qmarksTestDot=([t,e=""])=>{const s=qmarksTestNoExtDot([t]);return!e?s:t=>s(t)&&t.endsWith(e)};const qmarksTest=([t,e=""])=>{const s=qmarksTestNoExt([t]);return!e?s:t=>s(t)&&t.endsWith(e)};const qmarksTestNoExt=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")};const qmarksTestNoExtDot=([t])=>{const e=t.length;return t=>t.length===e&&t!=="."&&t!==".."};const ft=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";const pt={win32:{sep:"\\"},posix:{sep:"/"}};const dt=ft==="win32"?pt.win32.sep:pt.posix.sep;minimatch.sep=dt;const mt=Symbol("globstar **");minimatch.GLOBSTAR=mt;const gt="[^/]";const yt=gt+"*?";const wt="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";const bt="(?:(?!(?:\\/|^)\\.).)*?";const filter=(t,e={})=>s=>minimatch(s,t,e);minimatch.filter=filter;const ext=(t,e={})=>Object.assign({},t,e);const defaults=t=>{if(!t||typeof t!=="object"||!Object.keys(t).length){return minimatch}const e=minimatch;const m=(s,i,n={})=>e(s,i,ext(t,n));return Object.assign(m,{Minimatch:class Minimatch extends e.Minimatch{constructor(e,s={}){super(e,ext(t,s))}static defaults(s){return e.defaults(ext(t,s)).Minimatch}},AST:class AST extends e.AST{constructor(e,s,i={}){super(e,s,ext(t,i))}static fromGlob(s,i={}){return e.AST.fromGlob(s,ext(t,i))}},unescape:(s,i={})=>e.unescape(s,ext(t,i)),escape:(s,i={})=>e.escape(s,ext(t,i)),filter:(s,i={})=>e.filter(s,ext(t,i)),defaults:s=>e.defaults(ext(t,s)),makeRe:(s,i={})=>e.makeRe(s,ext(t,i)),braceExpand:(s,i={})=>e.braceExpand(s,ext(t,i)),match:(s,i,n={})=>e.match(s,i,ext(t,n)),sep:e.sep,GLOBSTAR:mt})};minimatch.defaults=defaults;const braceExpand=(t,e={})=>{assertValidPattern(t);if(e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)){return[t]}return Y(t)};minimatch.braceExpand=braceExpand;const makeRe=(t,e={})=>new Minimatch(t,e).makeRe();minimatch.makeRe=makeRe;const match=(t,e,s={})=>{const i=new Minimatch(e,s);t=t.filter((t=>i.match(t)));if(i.options.nonull&&!t.length){t.push(e)}return t};minimatch.match=match;const _t=/[?*]|[+@!]\(.*?\)|\[|\]/;const esm_regExpEscape=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Minimatch{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){assertValidPattern(t);e=e||{};this.options=e;this.pattern=t;this.platform=e.platform||ft;this.isWindows=this.platform==="win32";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===false;if(this.windowsPathsNoEscape){this.pattern=this.pattern.replace(/\\/g,"/")}this.preserveMultipleSlashes=!!e.preserveMultipleSlashes;this.regexp=null;this.negate=false;this.nonegate=!!e.nonegate;this.comment=false;this.empty=false;this.partial=!!e.partial;this.nocase=!!this.options.nocase;this.windowsNoMagicRoot=e.windowsNoMagicRoot!==undefined?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase);this.globSet=[];this.globParts=[];this.set=[];this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1){return true}for(const t of this.set){for(const e of t){if(typeof e!=="string")return true}}return false}debug(...t){}make(){const t=this.pattern;const e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=true;return}if(!t){this.empty=true;return}this.parseNegate();this.globSet=[...new Set(this.braceExpand())];if(e.debug){this.debug=(...t)=>console.error(...t)}this.debug(this.pattern,this.globSet);const s=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(s);this.debug(this.pattern,this.globParts);let i=this.globParts.map(((t,e,s)=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=t[0]===""&&t[1]===""&&(t[2]==="?"||!_t.test(t[2]))&&!_t.test(t[3]);const s=/^[a-z]:/i.test(t[0]);if(e){return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))]}else if(s){return[t[0],...t.slice(1).map((t=>this.parse(t)))]}}return t.map((t=>this.parse(t)))}));this.debug(this.pattern,i);this.set=i.filter((t=>t.indexOf(false)===-1));if(this.isWindows){for(let t=0;t<this.set.length;t++){const e=this.set[t];if(e[0]===""&&e[1]===""&&this.globParts[t][2]==="?"&&typeof e[3]==="string"&&/^[a-z]:$/i.test(e[3])){e[2]="?"}}}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar){for(let e=0;e<t.length;e++){for(let s=0;s<t[e].length;s++){if(t[e][s]==="**"){t[e][s]="*"}}}}const{optimizationLevel:e=1}=this.options;if(e>=2){t=this.firstPhasePreProcess(t);t=this.secondPhasePreProcess(t)}else if(e>=1){t=this.levelOneOptimize(t)}else{t=this.adjascentGlobstarOptimize(t)}return t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;while(-1!==(e=t.indexOf("**",e+1))){let s=e;while(t[s+1]==="**"){s++}if(s!==e){t.splice(e,s-e)}}return t}))}levelOneOptimize(t){return t.map((t=>{t=t.reduce(((t,e)=>{const s=t[t.length-1];if(e==="**"&&s==="**"){return t}if(e===".."){if(s&&s!==".."&&s!=="."&&s!=="**"){t.pop();return t}}t.push(e);return t}),[]);return t.length===0?[""]:t}))}levelTwoFileOptimize(t){if(!Array.isArray(t)){t=this.slashSplit(t)}let e=false;do{e=false;if(!this.preserveMultipleSlashes){for(let s=1;s<t.length-1;s++){const i=t[s];if(s===1&&i===""&&t[0]==="")continue;if(i==="."||i===""){e=true;t.splice(s,1);s--}}if(t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")){e=true;t.pop()}}let s=0;while(-1!==(s=t.indexOf("..",s+1))){const i=t[s-1];if(i&&i!=="."&&i!==".."&&i!=="**"){e=true;t.splice(s-1,2);s-=2}}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=false;do{e=false;for(let s of t){let i=-1;while(-1!==(i=s.indexOf("**",i+1))){let n=i;while(s[n+1]==="**"){n++}if(n>i){s.splice(i+1,n-i)}let r=s[i+1];const o=s[i+2];const a=s[i+3];if(r!=="..")continue;if(!o||o==="."||o===".."||!a||a==="."||a===".."){continue}e=true;s.splice(i,1);const h=s.slice(0);h[i]="**";t.push(h);i--}if(!this.preserveMultipleSlashes){for(let t=1;t<s.length-1;t++){const i=s[t];if(t===1&&i===""&&s[0]==="")continue;if(i==="."||i===""){e=true;s.splice(t,1);t--}}if(s[0]==="."&&s.length===2&&(s[1]==="."||s[1]==="")){e=true;s.pop()}}let n=0;while(-1!==(n=s.indexOf("..",n+1))){const t=s[n-1];if(t&&t!=="."&&t!==".."&&t!=="**"){e=true;const t=n===1&&s[n+1]==="**";const i=t?["."]:[];s.splice(n-1,2,...i);if(s.length===0)s.push("");n-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++){for(let s=e+1;s<t.length;s++){const i=this.partsMatch(t[e],t[s],!this.preserveMultipleSlashes);if(i){t[e]=[];t[s]=i;break}}}return t.filter((t=>t.length))}partsMatch(t,e,s=false){let i=0;let n=0;let r=[];let o="";while(i<t.length&&n<e.length){if(t[i]===e[n]){r.push(o==="b"?e[n]:t[i]);i++;n++}else if(s&&t[i]==="**"&&e[n]===t[i+1]){r.push(t[i]);i++}else if(s&&e[n]==="**"&&t[i]===e[n+1]){r.push(e[n]);n++}else if(t[i]==="*"&&e[n]&&(this.options.dot||!e[n].startsWith("."))&&e[n]!=="**"){if(o==="b")return false;o="a";r.push(t[i]);i++;n++}else if(e[n]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(o==="a")return false;o="b";r.push(e[n]);i++;n++}else{return false}}return t.length===e.length&&r}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=false;let s=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++){e=!e;s++}if(s)this.pattern=t.slice(s);this.negate=e}matchOne(t,e,s=false){const i=this.options;if(this.isWindows){const s=typeof t[0]==="string"&&/^[a-z]:$/i.test(t[0]);const i=!s&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]);const n=typeof e[0]==="string"&&/^[a-z]:$/i.test(e[0]);const r=!n&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]==="string"&&/^[a-z]:$/i.test(e[3]);const o=i?3:s?0:undefined;const a=r?3:n?0:undefined;if(typeof o==="number"&&typeof a==="number"){const[s,i]=[t[o],e[a]];if(s.toLowerCase()===i.toLowerCase()){e[a]=s;if(a>o){e=e.slice(a)}else if(o>a){t=t.slice(o)}}}}const{optimizationLevel:n=1}=this.options;if(n>=2){t=this.levelTwoFileOptimize(t)}this.debug("matchOne",this,{file:t,pattern:e});this.debug("matchOne",t.length,e.length);for(var r=0,o=0,a=t.length,h=e.length;r<a&&o<h;r++,o++){this.debug("matchOne loop");var l=e[o];var c=t[r];this.debug(e,l,c);if(l===false){return false}if(l===mt){this.debug("GLOBSTAR",[e,l,c]);var u=r;var f=o+1;if(f===h){this.debug("** at the end");for(;r<a;r++){if(t[r]==="."||t[r]===".."||!i.dot&&t[r].charAt(0)===".")return false}return true}while(u<a){var p=t[u];this.debug("\nglobstar while",t,u,e,f,p);if(this.matchOne(t.slice(u),e.slice(f),s)){this.debug("globstar found match!",u,a,p);return true}else{if(p==="."||p===".."||!i.dot&&p.charAt(0)==="."){this.debug("dot detected!",t,u,e,f);break}this.debug("globstar swallow a segment, and continue");u++}}if(s){this.debug("\n>>> no match, partial?",t,u,e,f);if(u===a){return true}}return false}let n;if(typeof l==="string"){n=c===l;this.debug("string match",l,c,n)}else{n=l.test(c);this.debug("pattern match",l,c,n)}if(!n)return false}if(r===a&&o===h){return true}else if(r===a){return s}else if(o===h){return r===a-1&&t[r]===""}else{throw new Error("wtf?")}}braceExpand(){return braceExpand(this.pattern,this.options)}parse(t){assertValidPattern(t);const e=this.options;if(t==="**")return mt;if(t==="")return"";let s;let i=null;if(s=t.match(ct)){i=e.dot?starTestDot:starTest}else if(s=t.match(at)){i=(e.nocase?e.dot?starDotExtTestNocaseDot:starDotExtTestNocase:e.dot?starDotExtTestDot:starDotExtTest)(s[1])}else if(s=t.match(ut)){i=(e.nocase?e.dot?qmarksTestNocaseDot:qmarksTestNocase:e.dot?qmarksTestDot:qmarksTest)(s)}else if(s=t.match(ht)){i=e.dot?starDotStarTestDot:starDotStarTest}else if(s=t.match(lt)){i=dotStarTest}const n=AST.fromGlob(t,this.options).toMMPattern();if(i&&typeof n==="object"){Reflect.defineProperty(n,"test",{value:i})}return n}makeRe(){if(this.regexp||this.regexp===false)return this.regexp;const t=this.set;if(!t.length){this.regexp=false;return this.regexp}const e=this.options;const s=e.noglobstar?yt:e.dot?wt:bt;const i=new Set(e.nocase?["i"]:[]);let n=t.map((t=>{const e=t.map((t=>{if(t instanceof RegExp){for(const e of t.flags.split(""))i.add(e)}return typeof t==="string"?esm_regExpEscape(t):t===mt?mt:t._src}));e.forEach(((t,i)=>{const n=e[i+1];const r=e[i-1];if(t!==mt||r===mt){return}if(r===undefined){if(n!==undefined&&n!==mt){e[i+1]="(?:\\/|"+s+"\\/)?"+n}else{e[i]=s}}else if(n===undefined){e[i-1]=r+"(?:\\/|"+s+")?"}else if(n!==mt){e[i-1]=r+"(?:\\/|\\/"+s+"\\/)"+n;e[i+1]=mt}}));return e.filter((t=>t!==mt)).join("/")})).join("|");const[r,o]=t.length>1?["(?:",")"]:["",""];n="^"+r+n+o+"$";if(this.negate)n="^(?!"+n+").+$";try{this.regexp=new RegExp(n,[...i].join(""))}catch(t){this.regexp=false}return this.regexp}slashSplit(t){if(this.preserveMultipleSlashes){return t.split("/")}else if(this.isWindows&&/^\/\/[^\/]+/.test(t)){return["",...t.split(/\/+/)]}else{return t.split(/\/+/)}}match(t,e=this.partial){this.debug("match",t,this.pattern);if(this.comment){return false}if(this.empty){return t===""}if(t==="/"&&e){return true}const s=this.options;if(this.isWindows){t=t.split("\\").join("/")}const i=this.slashSplit(t);this.debug(this.pattern,"split",i);const n=this.set;this.debug(this.pattern,"set",n);let r=i[i.length-1];if(!r){for(let t=i.length-2;!r&&t>=0;t--){r=i[t]}}for(let t=0;t<n.length;t++){const o=n[t];let a=i;if(s.matchBase&&o.length===1){a=[r]}const h=this.matchOne(a,o,e);if(h){if(s.flipNegate){return true}return!this.negate}}if(s.flipNegate){return false}return this.negate}static defaults(t){return minimatch.defaults(t).Minimatch}}minimatch.AST=AST;minimatch.Minimatch=Minimatch;minimatch.escape=escape_escape;minimatch.unescape=unescape_unescape;const St=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date;const vt=new Set;const At=typeof process==="object"&&!!process?process:{};const emitWarning=(t,e,s,i)=>{typeof At.emitWarning==="function"?At.emitWarning(t,e,s,i):console.error(`[${s}] ${e}: ${t}`)};let xt=globalThis.AbortController;let kt=globalThis.AbortSignal;if(typeof xt==="undefined"){kt=class AbortSignal{onabort;_onabort=[];reason;aborted=false;addEventListener(t,e){this._onabort.push(e)}};xt=class AbortController{constructor(){warnACPolyfill()}signal=new kt;abort(t){if(this.signal.aborted)return;this.signal.reason=t;this.signal.aborted=true;for(const e of this.signal._onabort){e(t)}this.signal.onabort?.(t)}};let t=At.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1";const warnACPolyfill=()=>{if(!t)return;t=false;emitWarning("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",warnACPolyfill)}}const shouldWarn=t=>!vt.has(t);const Ct=Symbol("type");const isPosInt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t);const getUintArray=t=>!isPosInt(t)?null:t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?ZeroArray:null;class ZeroArray extends Array{constructor(t){super(t);this.fill(0)}}class Stack{heap;length;static#m=false;static create(t){const e=getUintArray(t);if(!e)return[];Stack.#m=true;const s=new Stack(t,e);Stack.#m=false;return s}constructor(t,e){if(!Stack.#m){throw new TypeError("instantiate Stack using Stack.create(n)")}this.heap=new e(t);this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class LRUCache{#g;#y;#w;#b;#_;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#S;#v;#A;#x;#k;#C;#O;#E;#T;#P;#M;#F;#L;#R;#$;#j;#N;static unsafeExposeInternals(t){return{starts:t.#L,ttls:t.#R,sizes:t.#F,keyMap:t.#A,keyList:t.#x,valList:t.#k,next:t.#C,prev:t.#O,get head(){return t.#E},get tail(){return t.#T},free:t.#P,isBackgroundFetch:e=>t.#I(e),backgroundFetch:(e,s,i,n)=>t.#D(e,s,i,n),moveToTail:e=>t.#B(e),indexes:e=>t.#z(e),rindexes:e=>t.#W(e),isStale:e=>t.#H(e)}}get max(){return this.#g}get maxSize(){return this.#y}get calculatedSize(){return this.#v}get size(){return this.#S}get fetchMethod(){return this.#_}get dispose(){return this.#w}get disposeAfter(){return this.#b}constructor(t){const{max:e=0,ttl:s,ttlResolution:i=1,ttlAutopurge:n,updateAgeOnGet:r,updateAgeOnHas:o,allowStale:a,dispose:h,disposeAfter:l,noDisposeOnSet:c,noUpdateTTL:u,maxSize:f=0,maxEntrySize:p=0,sizeCalculation:d,fetchMethod:g,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:_,ignoreFetchAbort:S}=t;if(e!==0&&!isPosInt(e)){throw new TypeError("max option must be a nonnegative integer")}const v=e?getUintArray(e):Array;if(!v){throw new Error("invalid max value: "+e)}this.#g=e;this.#y=f;this.maxEntrySize=p||this.#y;this.sizeCalculation=d;if(this.sizeCalculation){if(!this.#y&&!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(g!==undefined&&typeof g!=="function"){throw new TypeError("fetchMethod must be a function if specified")}this.#_=g;this.#j=!!g;this.#A=new Map;this.#x=new Array(e).fill(undefined);this.#k=new Array(e).fill(undefined);this.#C=new v(e);this.#O=new v(e);this.#E=0;this.#T=0;this.#P=Stack.create(e);this.#S=0;this.#v=0;if(typeof h==="function"){this.#w=h}if(typeof l==="function"){this.#b=l;this.#M=[]}else{this.#b=undefined;this.#M=undefined}this.#$=!!this.#w;this.#N=!!this.#b;this.noDisposeOnSet=!!c;this.noUpdateTTL=!!u;this.noDeleteOnFetchRejection=!!y;this.allowStaleOnFetchRejection=!!b;this.allowStaleOnFetchAbort=!!_;this.ignoreFetchAbort=!!S;if(this.maxEntrySize!==0){if(this.#y!==0){if(!isPosInt(this.#y)){throw new TypeError("maxSize must be a positive integer if specified")}}if(!isPosInt(this.maxEntrySize)){throw new TypeError("maxEntrySize must be a positive integer if specified")}this.#V()}this.allowStale=!!a;this.noDeleteOnStaleGet=!!w;this.updateAgeOnGet=!!r;this.updateAgeOnHas=!!o;this.ttlResolution=isPosInt(i)||i===0?i:1;this.ttlAutopurge=!!n;this.ttl=s||0;if(this.ttl){if(!isPosInt(this.ttl)){throw new TypeError("ttl must be a positive integer if specified")}this.#G()}if(this.#g===0&&this.ttl===0&&this.#y===0){throw new TypeError("At least one of max, maxSize, or ttl is required")}if(!this.ttlAutopurge&&!this.#g&&!this.#y){const t="LRU_CACHE_UNBOUNDED";if(shouldWarn(t)){vt.add(t);const e="TTL caching without ttlAutopurge, max, or maxSize can "+"result in unbounded memory consumption.";emitWarning(e,"UnboundedCacheWarning",t,LRUCache)}}}getRemainingTTL(t){return this.#A.has(t)?Infinity:0}#G(){const t=new ZeroArray(this.#g);const e=new ZeroArray(this.#g);this.#R=t;this.#L=e;this.#U=(s,i,n=St.now())=>{e[s]=i!==0?n:0;t[s]=i;if(i!==0&&this.ttlAutopurge){const t=setTimeout((()=>{if(this.#H(s)){this.delete(this.#x[s])}}),i+1);if(t.unref){t.unref()}}};this.#q=s=>{e[s]=t[s]!==0?St.now():0};this.#J=(i,n)=>{if(t[n]){const r=t[n];const o=e[n];if(!r||!o)return;i.ttl=r;i.start=o;i.now=s||getNow();const a=i.now-o;i.remainingTTL=r-a}};let s=0;const getNow=()=>{const t=St.now();if(this.ttlResolution>0){s=t;const e=setTimeout((()=>s=0),this.ttlResolution);if(e.unref){e.unref()}}return t};this.getRemainingTTL=i=>{const n=this.#A.get(i);if(n===undefined){return 0}const r=t[n];const o=e[n];if(!r||!o){return Infinity}const a=(s||getNow())-o;return r-a};this.#H=i=>{const n=e[i];const r=t[i];return!!r&&!!n&&(s||getNow())-n>r}}#q=()=>{};#J=()=>{};#U=()=>{};#H=()=>false;#V(){const t=new ZeroArray(this.#g);this.#v=0;this.#F=t;this.#Y=e=>{this.#v-=t[e];t[e]=0};this.#Z=(t,e,s,i)=>{if(this.#I(e)){return 0}if(!isPosInt(s)){if(i){if(typeof i!=="function"){throw new TypeError("sizeCalculation must be a function")}s=i(e,t);if(!isPosInt(s)){throw new TypeError("sizeCalculation return invalid (expect positive integer)")}}else{throw new TypeError("invalid size value (must be positive integer). "+"When maxSize or maxEntrySize is used, sizeCalculation "+"or size must be set.")}}return s};this.#K=(e,s,i)=>{t[e]=s;if(this.#y){const s=this.#y-t[e];while(this.#v>s){this.#X(true)}}this.#v+=t[e];if(i){i.entrySize=s;i.totalCalculatedSize=this.#v}}}#Y=t=>{};#K=(t,e,s)=>{};#Z=(t,e,s,i)=>{if(s||i){throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}return 0};*#z({allowStale:t=this.allowStale}={}){if(this.#S){for(let e=this.#T;true;){if(!this.#Q(e)){break}if(t||!this.#H(e)){yield e}if(e===this.#E){break}else{e=this.#O[e]}}}}*#W({allowStale:t=this.allowStale}={}){if(this.#S){for(let e=this.#E;true;){if(!this.#Q(e)){break}if(t||!this.#H(e)){yield e}if(e===this.#T){break}else{e=this.#C[e]}}}}#Q(t){return t!==undefined&&this.#A.get(this.#x[t])===t}*entries(){for(const t of this.#z()){if(this.#k[t]!==undefined&&this.#x[t]!==undefined&&!this.#I(this.#k[t])){yield[this.#x[t],this.#k[t]]}}}*rentries(){for(const t of this.#W()){if(this.#k[t]!==undefined&&this.#x[t]!==undefined&&!this.#I(this.#k[t])){yield[this.#x[t],this.#k[t]]}}}*keys(){for(const t of this.#z()){const e=this.#x[t];if(e!==undefined&&!this.#I(this.#k[t])){yield e}}}*rkeys(){for(const t of this.#W()){const e=this.#x[t];if(e!==undefined&&!this.#I(this.#k[t])){yield e}}}*values(){for(const t of this.#z()){const e=this.#k[t];if(e!==undefined&&!this.#I(this.#k[t])){yield this.#k[t]}}}*rvalues(){for(const t of this.#W()){const e=this.#k[t];if(e!==undefined&&!this.#I(this.#k[t])){yield this.#k[t]}}}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const s of this.#z()){const i=this.#k[s];const n=this.#I(i)?i.__staleWhileFetching:i;if(n===undefined)continue;if(t(n,this.#x[s],this)){return this.get(this.#x[s],e)}}}forEach(t,e=this){for(const s of this.#z()){const i=this.#k[s];const n=this.#I(i)?i.__staleWhileFetching:i;if(n===undefined)continue;t.call(e,n,this.#x[s],this)}}rforEach(t,e=this){for(const s of this.#W()){const i=this.#k[s];const n=this.#I(i)?i.__staleWhileFetching:i;if(n===undefined)continue;t.call(e,n,this.#x[s],this)}}purgeStale(){let t=false;for(const e of this.#W({allowStale:true})){if(this.#H(e)){this.delete(this.#x[e]);t=true}}return t}info(t){const e=this.#A.get(t);if(e===undefined)return undefined;const s=this.#k[e];const i=this.#I(s)?s.__staleWhileFetching:s;if(i===undefined)return undefined;const n={value:i};if(this.#R&&this.#L){const t=this.#R[e];const s=this.#L[e];if(t&&s){const e=t-(St.now()-s);n.ttl=e;n.start=Date.now()}}if(this.#F){n.size=this.#F[e]}return n}dump(){const t=[];for(const e of this.#z({allowStale:true})){const s=this.#x[e];const i=this.#k[e];const n=this.#I(i)?i.__staleWhileFetching:i;if(n===undefined||s===undefined)continue;const r={value:n};if(this.#R&&this.#L){r.ttl=this.#R[e];const t=St.now()-this.#L[e];r.start=Math.floor(Date.now()-t)}if(this.#F){r.size=this.#F[e]}t.unshift([s,r])}return t}load(t){this.clear();for(const[e,s]of t){if(s.start){const t=Date.now()-s.start;s.start=St.now()-t}this.set(e,s.value,s)}}set(t,e,s={}){if(e===undefined){this.delete(t);return this}const{ttl:i=this.ttl,start:n,noDisposeOnSet:r=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=s;let{noUpdateTTL:h=this.noUpdateTTL}=s;const l=this.#Z(t,e,s.size||0,o);if(this.maxEntrySize&&l>this.maxEntrySize){if(a){a.set="miss";a.maxEntrySizeExceeded=true}this.delete(t);return this}let c=this.#S===0?undefined:this.#A.get(t);if(c===undefined){c=this.#S===0?this.#T:this.#P.length!==0?this.#P.pop():this.#S===this.#g?this.#X(false):this.#S;this.#x[c]=t;this.#k[c]=e;this.#A.set(t,c);this.#C[this.#T]=c;this.#O[c]=this.#T;this.#T=c;this.#S++;this.#K(c,l,a);if(a)a.set="add";h=false}else{this.#B(c);const s=this.#k[c];if(e!==s){if(this.#j&&this.#I(s)){s.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:e}=s;if(e!==undefined&&!r){if(this.#$){this.#w?.(e,t,"set")}if(this.#N){this.#M?.push([e,t,"set"])}}}else if(!r){if(this.#$){this.#w?.(s,t,"set")}if(this.#N){this.#M?.push([s,t,"set"])}}this.#Y(c);this.#K(c,l,a);this.#k[c]=e;if(a){a.set="replace";const t=s&&this.#I(s)?s.__staleWhileFetching:s;if(t!==undefined)a.oldValue=t}}else if(a){a.set="update"}}if(i!==0&&!this.#R){this.#G()}if(this.#R){if(!h){this.#U(c,i,n)}if(a)this.#J(a,c)}if(!r&&this.#N&&this.#M){const t=this.#M;let e;while(e=t?.shift()){this.#b?.(...e)}}return this}pop(){try{while(this.#S){const t=this.#k[this.#E];this.#X(true);if(this.#I(t)){if(t.__staleWhileFetching){return t.__staleWhileFetching}}else if(t!==undefined){return t}}}finally{if(this.#N&&this.#M){const t=this.#M;let e;while(e=t?.shift()){this.#b?.(...e)}}}}#X(t){const e=this.#E;const s=this.#x[e];const i=this.#k[e];if(this.#j&&this.#I(i)){i.__abortController.abort(new Error("evicted"))}else if(this.#$||this.#N){if(this.#$){this.#w?.(i,s,"evict")}if(this.#N){this.#M?.push([i,s,"evict"])}}this.#Y(e);if(t){this.#x[e]=undefined;this.#k[e]=undefined;this.#P.push(e)}if(this.#S===1){this.#E=this.#T=0;this.#P.length=0}else{this.#E=this.#C[e]}this.#A.delete(s);this.#S--;return e}has(t,e={}){const{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e;const n=this.#A.get(t);if(n!==undefined){const t=this.#k[n];if(this.#I(t)&&t.__staleWhileFetching===undefined){return false}if(!this.#H(n)){if(s){this.#q(n)}if(i){i.has="hit";this.#J(i,n)}return true}else if(i){i.has="stale";this.#J(i,n)}}else if(i){i.has="miss"}return false}peek(t,e={}){const{allowStale:s=this.allowStale}=e;const i=this.#A.get(t);if(i===undefined||!s&&this.#H(i)){return}const n=this.#k[i];return this.#I(n)?n.__staleWhileFetching:n}#D(t,e,s,i){const n=e===undefined?undefined:this.#k[e];if(this.#I(n)){return n}const r=new xt;const{signal:o}=s;o?.addEventListener("abort",(()=>r.abort(o.reason)),{signal:r.signal});const a={signal:r.signal,options:s,context:i};const cb=(i,n=false)=>{const{aborted:o}=r.signal;const l=s.ignoreFetchAbort&&i!==undefined;if(s.status){if(o&&!n){s.status.fetchAborted=true;s.status.fetchError=r.signal.reason;if(l)s.status.fetchAbortIgnored=true}else{s.status.fetchResolved=true}}if(o&&!l&&!n){return fetchFail(r.signal.reason)}const c=h;if(this.#k[e]===h){if(i===undefined){if(c.__staleWhileFetching){this.#k[e]=c.__staleWhileFetching}else{this.delete(t)}}else{if(s.status)s.status.fetchUpdated=true;this.set(t,i,a.options)}}return i};const eb=t=>{if(s.status){s.status.fetchRejected=true;s.status.fetchError=t}return fetchFail(t)};const fetchFail=i=>{const{aborted:n}=r.signal;const o=n&&s.allowStaleOnFetchAbort;const a=o||s.allowStaleOnFetchRejection;const l=a||s.noDeleteOnFetchRejection;const c=h;if(this.#k[e]===h){const s=!l||c.__staleWhileFetching===undefined;if(s){this.delete(t)}else if(!o){this.#k[e]=c.__staleWhileFetching}}if(a){if(s.status&&c.__staleWhileFetching!==undefined){s.status.returnedStale=true}return c.__staleWhileFetching}else if(c.__returned===c){throw i}};const pcall=(e,i)=>{const o=this.#_?.(t,n,a);if(o&&o instanceof Promise){o.then((t=>e(t===undefined?undefined:t)),i)}r.signal.addEventListener("abort",(()=>{if(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort){e(undefined);if(s.allowStaleOnFetchAbort){e=t=>cb(t,true)}}}))};if(s.status)s.status.fetchDispatched=true;const h=new Promise(pcall).then(cb,eb);const l=Object.assign(h,{__abortController:r,__staleWhileFetching:n,__returned:undefined});if(e===undefined){this.set(t,l,{...a.options,status:undefined});e=this.#A.get(t)}else{this.#k[e]=l}return l}#I(t){if(!this.#j)return false;const e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof xt}async fetch(t,e={}){const{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:r=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:d,forceRefresh:g=false,status:y,signal:w}=e;if(!this.#j){if(y)y.fetch="get";return this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:n,status:y})}const b={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:n,ttl:r,noDisposeOnSet:o,size:a,sizeCalculation:h,noUpdateTTL:l,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:p,ignoreFetchAbort:f,status:y,signal:w};let _=this.#A.get(t);if(_===undefined){if(y)y.fetch="miss";const e=this.#D(t,_,b,d);return e.__returned=e}else{const e=this.#k[_];if(this.#I(e)){const t=s&&e.__staleWhileFetching!==undefined;if(y){y.fetch="inflight";if(t)y.returnedStale=true}return t?e.__staleWhileFetching:e.__returned=e}const n=this.#H(_);if(!g&&!n){if(y)y.fetch="hit";this.#B(_);if(i){this.#q(_)}if(y)this.#J(y,_);return e}const r=this.#D(t,_,b,d);const o=r.__staleWhileFetching!==undefined;const a=o&&s;if(y){y.fetch=n?"stale":"refresh";if(a&&n)y.returnedStale=true}return a?r.__staleWhileFetching:r.__returned=r}}get(t,e={}){const{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:r}=e;const o=this.#A.get(t);if(o!==undefined){const e=this.#k[o];const a=this.#I(e);if(r)this.#J(r,o);if(this.#H(o)){if(r)r.get="stale";if(!a){if(!n){this.delete(t)}if(r&&s)r.returnedStale=true;return s?e:undefined}else{if(r&&s&&e.__staleWhileFetching!==undefined){r.returnedStale=true}return s?e.__staleWhileFetching:undefined}}else{if(r)r.get="hit";if(a){return e.__staleWhileFetching}this.#B(o);if(i){this.#q(o)}return e}}else if(r){r.get="miss"}}#tt(t,e){this.#O[e]=t;this.#C[t]=e}#B(t){if(t!==this.#T){if(t===this.#E){this.#E=this.#C[t]}else{this.#tt(this.#O[t],this.#C[t])}this.#tt(this.#T,t);this.#T=t}}delete(t){let e=false;if(this.#S!==0){const s=this.#A.get(t);if(s!==undefined){e=true;if(this.#S===1){this.clear()}else{this.#Y(s);const e=this.#k[s];if(this.#I(e)){e.__abortController.abort(new Error("deleted"))}else if(this.#$||this.#N){if(this.#$){this.#w?.(e,t,"delete")}if(this.#N){this.#M?.push([e,t,"delete"])}}this.#A.delete(t);this.#x[s]=undefined;this.#k[s]=undefined;if(s===this.#T){this.#T=this.#O[s]}else if(s===this.#E){this.#E=this.#C[s]}else{const t=this.#O[s];this.#C[t]=this.#C[s];const e=this.#C[s];this.#O[e]=this.#O[s]}this.#S--;this.#P.push(s)}}}if(this.#N&&this.#M?.length){const t=this.#M;let e;while(e=t?.shift()){this.#b?.(...e)}}return e}clear(){for(const t of this.#W({allowStale:true})){const e=this.#k[t];if(this.#I(e)){e.__abortController.abort(new Error("deleted"))}else{const s=this.#x[t];if(this.#$){this.#w?.(e,s,"delete")}if(this.#N){this.#M?.push([e,s,"delete"])}}}this.#A.clear();this.#k.fill(undefined);this.#x.fill(undefined);if(this.#R&&this.#L){this.#R.fill(0);this.#L.fill(0)}if(this.#F){this.#F.fill(0)}this.#E=0;this.#T=0;this.#P.length=0;this.#v=0;this.#S=0;if(this.#N&&this.#M){const t=this.#M;let e;while(e=t?.shift()){this.#b?.(...e)}}}}var Ot=__nccwpck_require__(24);var Et=__nccwpck_require__.t(Ot,2);const Tt=t(import.meta.url)("node:fs/promises");var Pt=__nccwpck_require__.n(Tt);var Mt=__nccwpck_require__(474);const Ft=t(import.meta.url)("node:stream");const Lt=t(import.meta.url)("node:string_decoder");const Rt=typeof process==="object"&&process?process:{stdout:null,stderr:null};const isStream=t=>!!t&&typeof t==="object"&&(t instanceof Minipass||t instanceof Ft||isReadable(t)||isWritable(t));const isReadable=t=>!!t&&typeof t==="object"&&t instanceof Mt.EventEmitter&&typeof t.pipe==="function"&&t.pipe!==Ft.Writable.prototype.pipe;const isWritable=t=>!!t&&typeof t==="object"&&t instanceof Mt.EventEmitter&&typeof t.write==="function"&&typeof t.end==="function";const $t=Symbol("EOF");const jt=Symbol("maybeEmitEnd");const Nt=Symbol("emittedEnd");const It=Symbol("emittingEnd");const Dt=Symbol("emittedError");const Bt=Symbol("closed");const zt=Symbol("read");const Wt=Symbol("flush");const Ht=Symbol("flushChunk");const Vt=Symbol("encoding");const Gt=Symbol("decoder");const Ut=Symbol("flowing");const qt=Symbol("paused");const Jt=Symbol("resume");const Yt=Symbol("buffer");const Zt=Symbol("pipes");const Kt=Symbol("bufferLength");const Xt=Symbol("bufferPush");const Qt=Symbol("bufferShift");const te=Symbol("objectMode");const ee=Symbol("destroyed");const se=Symbol("error");const ie=Symbol("emitData");const ne=Symbol("emitEnd");const re=Symbol("emitEnd2");const oe=Symbol("async");const ae=Symbol("abort");const he=Symbol("aborted");const le=Symbol("signal");const ce=Symbol("dataListeners");const ue=Symbol("discarded");const defer=t=>Promise.resolve().then(t);const nodefer=t=>t();const isEndish=t=>t==="end"||t==="finish"||t==="prefinish";const isArrayBufferLike=t=>t instanceof ArrayBuffer||!!t&&typeof t==="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0;const isArrayBufferView=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t);class Pipe{src;dest;opts;ondrain;constructor(t,e,s){this.src=t;this.dest=e;this.opts=s;this.ondrain=()=>t[Jt]();this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe();if(this.opts.end)this.dest.end()}}class PipeProxyErrors extends Pipe{unpipe(){this.src.removeListener("error",this.proxyErrors);super.unpipe()}constructor(t,e,s){super(t,e,s);this.proxyErrors=t=>e.emit("error",t);t.on("error",this.proxyErrors)}}const isObjectModeOptions=t=>!!t.objectMode;const isEncodingOptions=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer";class Minipass extends Mt.EventEmitter{[Ut]=false;[qt]=false;[Zt]=[];[Yt]=[];[te];[Vt];[oe];[Gt];[$t]=false;[Nt]=false;[It]=false;[Bt]=false;[Dt]=null;[Kt]=0;[ee]=false;[le];[he]=false;[ce]=0;[ue]=false;writable=true;readable=true;constructor(...t){const e=t[0]||{};super();if(e.objectMode&&typeof e.encoding==="string"){throw new TypeError("Encoding and objectMode may not be used together")}if(isObjectModeOptions(e)){this[te]=true;this[Vt]=null}else if(isEncodingOptions(e)){this[Vt]=e.encoding;this[te]=false}else{this[te]=false;this[Vt]=null}this[oe]=!!e.async;this[Gt]=this[Vt]?new Lt.StringDecoder(this[Vt]):null;if(e&&e.debugExposeBuffer===true){Object.defineProperty(this,"buffer",{get:()=>this[Yt]})}if(e&&e.debugExposePipes===true){Object.defineProperty(this,"pipes",{get:()=>this[Zt]})}const{signal:s}=e;if(s){this[le]=s;if(s.aborted){this[ae]()}else{s.addEventListener("abort",(()=>this[ae]()))}}}get bufferLength(){return this[Kt]}get encoding(){return this[Vt]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[te]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get["async"](){return this[oe]}set["async"](t){this[oe]=this[oe]||!!t}[ae](){this[he]=true;this.emit("abort",this[le]?.reason);this.destroy(this[le]?.reason)}get aborted(){return this[he]}set aborted(t){}write(t,e,s){if(this[he])return false;if(this[$t])throw new Error("write after end");if(this[ee]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof e==="function"){s=e;e="utf8"}if(!e)e="utf8";const i=this[oe]?defer:nodefer;if(!this[te]&&!Buffer.isBuffer(t)){if(isArrayBufferView(t)){t=Buffer.from(t.buffer,t.byteOffset,t.byteLength)}else if(isArrayBufferLike(t)){t=Buffer.from(t)}else if(typeof t!=="string"){throw new Error("Non-contiguous data written to non-objectMode stream")}}if(this[te]){if(this[Ut]&&this[Kt]!==0)this[Wt](true);if(this[Ut])this.emit("data",t);else this[Xt](t);if(this[Kt]!==0)this.emit("readable");if(s)i(s);return this[Ut]}if(!t.length){if(this[Kt]!==0)this.emit("readable");if(s)i(s);return this[Ut]}if(typeof t==="string"&&!(e===this[Vt]&&!this[Gt]?.lastNeed)){t=Buffer.from(t,e)}if(Buffer.isBuffer(t)&&this[Vt]){t=this[Gt].write(t)}if(this[Ut]&&this[Kt]!==0)this[Wt](true);if(this[Ut])this.emit("data",t);else this[Xt](t);if(this[Kt]!==0)this.emit("readable");if(s)i(s);return this[Ut]}read(t){if(this[ee])return null;this[ue]=false;if(this[Kt]===0||t===0||t&&t>this[Kt]){this[jt]();return null}if(this[te])t=null;if(this[Yt].length>1&&!this[te]){this[Yt]=[this[Vt]?this[Yt].join(""):Buffer.concat(this[Yt],this[Kt])]}const e=this[zt](t||null,this[Yt][0]);this[jt]();return e}[zt](t,e){if(this[te])this[Qt]();else{const s=e;if(t===s.length||t===null)this[Qt]();else if(typeof s==="string"){this[Yt][0]=s.slice(t);e=s.slice(0,t);this[Kt]-=t}else{this[Yt][0]=s.subarray(t);e=s.subarray(0,t);this[Kt]-=t}}this.emit("data",e);if(!this[Yt].length&&!this[$t])this.emit("drain");return e}end(t,e,s){if(typeof t==="function"){s=t;t=undefined}if(typeof e==="function"){s=e;e="utf8"}if(t!==undefined)this.write(t,e);if(s)this.once("end",s);this[$t]=true;this.writable=false;if(this[Ut]||!this[qt])this[jt]();return this}[Jt](){if(this[ee])return;if(!this[ce]&&!this[Zt].length){this[ue]=true}this[qt]=false;this[Ut]=true;this.emit("resume");if(this[Yt].length)this[Wt]();else if(this[$t])this[jt]();else this.emit("drain")}resume(){return this[Jt]()}pause(){this[Ut]=false;this[qt]=true;this[ue]=false}get destroyed(){return this[ee]}get flowing(){return this[Ut]}get paused(){return this[qt]}[Xt](t){if(this[te])this[Kt]+=1;else this[Kt]+=t.length;this[Yt].push(t)}[Qt](){if(this[te])this[Kt]-=1;else this[Kt]-=this[Yt][0].length;return this[Yt].shift()}[Wt](t=false){do{}while(this[Ht](this[Qt]())&&this[Yt].length);if(!t&&!this[Yt].length&&!this[$t])this.emit("drain")}[Ht](t){this.emit("data",t);return this[Ut]}pipe(t,e){if(this[ee])return t;this[ue]=false;const s=this[Nt];e=e||{};if(t===Rt.stdout||t===Rt.stderr)e.end=false;else e.end=e.end!==false;e.proxyErrors=!!e.proxyErrors;if(s){if(e.end)t.end()}else{this[Zt].push(!e.proxyErrors?new Pipe(this,t,e):new PipeProxyErrors(this,t,e));if(this[oe])defer((()=>this[Jt]()));else this[Jt]()}return t}unpipe(t){const e=this[Zt].find((e=>e.dest===t));if(e){if(this[Zt].length===1){if(this[Ut]&&this[ce]===0){this[Ut]=false}this[Zt]=[]}else this[Zt].splice(this[Zt].indexOf(e),1);e.unpipe()}}addListener(t,e){return this.on(t,e)}on(t,e){const s=super.on(t,e);if(t==="data"){this[ue]=false;this[ce]++;if(!this[Zt].length&&!this[Ut]){this[Jt]()}}else if(t==="readable"&&this[Kt]!==0){super.emit("readable")}else if(isEndish(t)&&this[Nt]){super.emit(t);this.removeAllListeners(t)}else if(t==="error"&&this[Dt]){const t=e;if(this[oe])defer((()=>t.call(this,this[Dt])));else t.call(this,this[Dt])}return s}removeListener(t,e){return this.off(t,e)}off(t,e){const s=super.off(t,e);if(t==="data"){this[ce]=this.listeners("data").length;if(this[ce]===0&&!this[ue]&&!this[Zt].length){this[Ut]=false}}return s}removeAllListeners(t){const e=super.removeAllListeners(t);if(t==="data"||t===undefined){this[ce]=0;if(!this[ue]&&!this[Zt].length){this[Ut]=false}}return e}get emittedEnd(){return this[Nt]}[jt](){if(!this[It]&&!this[Nt]&&!this[ee]&&this[Yt].length===0&&this[$t]){this[It]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[Bt])this.emit("close");this[It]=false}}emit(t,...e){const s=e[0];if(t!=="error"&&t!=="close"&&t!==ee&&this[ee]){return false}else if(t==="data"){return!this[te]&&!s?false:this[oe]?(defer((()=>this[ie](s))),true):this[ie](s)}else if(t==="end"){return this[ne]()}else if(t==="close"){this[Bt]=true;if(!this[Nt]&&!this[ee])return false;const t=super.emit("close");this.removeAllListeners("close");return t}else if(t==="error"){this[Dt]=s;super.emit(se,s);const t=!this[le]||this.listeners("error").length?super.emit("error",s):false;this[jt]();return t}else if(t==="resume"){const t=super.emit("resume");this[jt]();return t}else if(t==="finish"||t==="prefinish"){const e=super.emit(t);this.removeAllListeners(t);return e}const i=super.emit(t,...e);this[jt]();return i}[ie](t){for(const e of this[Zt]){if(e.dest.write(t)===false)this.pause()}const e=this[ue]?false:super.emit("data",t);this[jt]();return e}[ne](){if(this[Nt])return false;this[Nt]=true;this.readable=false;return this[oe]?(defer((()=>this[re]())),true):this[re]()}[re](){if(this[Gt]){const t=this[Gt].end();if(t){for(const e of this[Zt]){e.dest.write(t)}if(!this[ue])super.emit("data",t)}}for(const t of this[Zt]){t.end()}const t=super.emit("end");this.removeAllListeners("end");return t}async collect(){const t=Object.assign([],{dataLength:0});if(!this[te])t.dataLength=0;const e=this.promise();this.on("data",(e=>{t.push(e);if(!this[te])t.dataLength+=e.length}));await e;return t}async concat(){if(this[te]){throw new Error("cannot concat in objectMode")}const t=await this.collect();return this[Vt]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise(((t,e)=>{this.on(ee,(()=>e(new Error("stream destroyed"))));this.on("error",(t=>e(t)));this.on("end",(()=>t()))}))}[Symbol.asyncIterator](){this[ue]=false;let t=false;const stop=async()=>{this.pause();t=true;return{value:undefined,done:true}};const next=()=>{if(t)return stop();const e=this.read();if(e!==null)return Promise.resolve({done:false,value:e});if(this[$t])return stop();let s;let i;const onerr=t=>{this.off("data",ondata);this.off("end",onend);this.off(ee,ondestroy);stop();i(t)};const ondata=t=>{this.off("error",onerr);this.off("end",onend);this.off(ee,ondestroy);this.pause();s({value:t,done:!!this[$t]})};const onend=()=>{this.off("error",onerr);this.off("data",ondata);this.off(ee,ondestroy);stop();s({done:true,value:undefined})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((t,e)=>{i=e;s=t;this.once(ee,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next,throw:stop,return:stop,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[ue]=false;let t=false;const stop=()=>{this.pause();this.off(se,stop);this.off(ee,stop);this.off("end",stop);t=true;return{done:true,value:undefined}};const next=()=>{if(t)return stop();const e=this.read();return e===null?stop():{done:false,value:e}};this.once("end",stop);this.once(se,stop);this.once(ee,stop);return{next:next,throw:stop,return:stop,[Symbol.iterator](){return this}}}destroy(t){if(this[ee]){if(t)this.emit("error",t);else this.emit(ee);return this}this[ee]=true;this[ue]=true;this[Yt].length=0;this[Kt]=0;const e=this;if(typeof e.close==="function"&&!this[Bt])e.close();if(t)this.emit("error",t);else this.emit(ee);return this}static get isStream(){return isStream}}const fe=q.realpathSync.native;const pe={lstatSync:q.lstatSync,readdir:q.readdir,readdirSync:q.readdirSync,readlinkSync:q.readlinkSync,realpathSync:fe,promises:{lstat:Tt.lstat,readdir:Tt.readdir,readlink:Tt.readlink,realpath:Tt.realpath}};const fsFromOption=t=>!t||t===pe||t===Et?pe:{...pe,...t,promises:{...pe.promises,...t.promises||{}}};const de=/^\\\\\?\\([a-z]:)\\?$/i;const uncToDrive=t=>t.replace(/\//g,"\\").replace(de,"$1\\");const me=/[\\\/]/;const ge=0;const ye=1;const we=2;const be=4;const _e=6;const Se=8;const ve=10;const Ae=12;const xe=15;const ke=~xe;const Ce=16;const Oe=32;const Ee=64;const Te=128;const Pe=256;const Me=512;const Fe=Ee|Te|Me;const Le=1023;const entToType=t=>t.isFile()?Se:t.isDirectory()?be:t.isSymbolicLink()?ve:t.isCharacterDevice()?we:t.isBlockDevice()?_e:t.isSocket()?Ae:t.isFIFO()?ye:ge;const Re=new Map;const normalize=t=>{const e=Re.get(t);if(e)return e;const s=t.normalize("NFKD");Re.set(t,s);return s};const $e=new Map;const normalizeNocase=t=>{const e=$e.get(t);if(e)return e;const s=normalize(t.toLowerCase());$e.set(t,s);return s};class ResolveCache extends LRUCache{constructor(){super({max:256})}}class ChildrenCache extends LRUCache{constructor(t=16*1024){super({maxSize:t,sizeCalculation:t=>t.length+1})}}const je=Symbol("PathScurry setAsCwd");class PathBase{name;root;roots;parent;nocase;isCWD=false;#et;#st;get dev(){return this.#st}#it;get mode(){return this.#it}#nt;get nlink(){return this.#nt}#rt;get uid(){return this.#rt}#ot;get gid(){return this.#ot}#at;get rdev(){return this.#at}#ht;get blksize(){return this.#ht}#lt;get ino(){return this.#lt}#S;get size(){return this.#S}#ct;get blocks(){return this.#ct}#ut;get atimeMs(){return this.#ut}#ft;get mtimeMs(){return this.#ft}#pt;get ctimeMs(){return this.#pt}#dt;get birthtimeMs(){return this.#dt}#mt;get atime(){return this.#mt}#gt;get mtime(){return this.#gt}#yt;get ctime(){return this.#yt}#wt;get birthtime(){return this.#wt}#bt;#_t;#St;#vt;#At;#xt;#kt;#Ct;#Ot;#Et;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=ge,s,i,n,r,o){this.name=t;this.#bt=n?normalizeNocase(t):normalize(t);this.#kt=e&Le;this.nocase=n;this.roots=i;this.root=s||this;this.#Ct=r;this.#St=o.fullpath;this.#At=o.relative;this.#xt=o.relativePosix;this.parent=o.parent;if(this.parent){this.#et=this.parent.#et}else{this.#et=fsFromOption(o.fs)}}depth(){if(this.#_t!==undefined)return this.#_t;if(!this.parent)return this.#_t=0;return this.#_t=this.parent.depth()+1}childrenCache(){return this.#Ct}resolve(t){if(!t){return this}const e=this.getRootString(t);const s=t.substring(e.length);const i=s.split(this.splitSep);const n=e?this.getRoot(e).#Tt(i):this.#Tt(i);return n}#Tt(t){let e=this;for(const s of t){e=e.child(s)}return e}children(){const t=this.#Ct.get(this);if(t){return t}const e=Object.assign([],{provisional:0});this.#Ct.set(this,e);this.#kt&=~Ce;return e}child(t,e){if(t===""||t==="."){return this}if(t===".."){return this.parent||this}const s=this.children();const i=this.nocase?normalizeNocase(t):normalize(t);for(const t of s){if(t.#bt===i){return t}}const n=this.parent?this.sep:"";const r=this.#St?this.#St+n+t:undefined;const o=this.newChild(t,ge,{...e,parent:this,fullpath:r});if(!this.canReaddir()){o.#kt|=Te}s.push(o);return o}relative(){if(this.isCWD)return"";if(this.#At!==undefined){return this.#At}const t=this.name;const e=this.parent;if(!e){return this.#At=this.name}const s=e.relative();return s+(!s||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#xt!==undefined)return this.#xt;const t=this.name;const e=this.parent;if(!e){return this.#xt=this.fullpathPosix()}const s=e.relativePosix();return s+(!s||!e.parent?"":"/")+t}fullpath(){if(this.#St!==undefined){return this.#St}const t=this.name;const e=this.parent;if(!e){return this.#St=this.name}const s=e.fullpath();const i=s+(!e.parent?"":this.sep)+t;return this.#St=i}fullpathPosix(){if(this.#vt!==undefined)return this.#vt;if(this.sep==="/")return this.#vt=this.fullpath();if(!this.parent){const t=this.fullpath().replace(/\\/g,"/");if(/^[a-z]:\//i.test(t)){return this.#vt=`//?/${t}`}else{return this.#vt=t}}const t=this.parent;const e=t.fullpathPosix();const s=e+(!e||!t.parent?"":"/")+this.name;return this.#vt=s}isUnknown(){return(this.#kt&xe)===ge}isType(t){return this[`is${t}`]()}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.#kt&xe)===Se}isDirectory(){return(this.#kt&xe)===be}isCharacterDevice(){return(this.#kt&xe)===we}isBlockDevice(){return(this.#kt&xe)===_e}isFIFO(){return(this.#kt&xe)===ye}isSocket(){return(this.#kt&xe)===Ae}isSymbolicLink(){return(this.#kt&ve)===ve}lstatCached(){return this.#kt&Oe?this:undefined}readlinkCached(){return this.#Ot}realpathCached(){return this.#Et}readdirCached(){const t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#Ot)return true;if(!this.parent)return false;const t=this.#kt&xe;return!(t!==ge&&t!==ve||this.#kt&Pe||this.#kt&Te)}calledReaddir(){return!!(this.#kt&Ce)}isENOENT(){return!!(this.#kt&Te)}isNamed(t){return!this.nocase?this.#bt===normalize(t):this.#bt===normalizeNocase(t)}async readlink(){const t=this.#Ot;if(t){return t}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const t=await this.#et.promises.readlink(this.fullpath());const e=(await this.parent.realpath())?.resolve(t);if(e){return this.#Ot=e}}catch(t){this.#Pt(t.code);return undefined}}readlinkSync(){const t=this.#Ot;if(t){return t}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const t=this.#et.readlinkSync(this.fullpath());const e=this.parent.realpathSync()?.resolve(t);if(e){return this.#Ot=e}}catch(t){this.#Pt(t.code);return undefined}}#Mt(t){this.#kt|=Ce;for(let e=t.provisional;e<t.length;e++){const s=t[e];if(s)s.#Ft()}}#Ft(){if(this.#kt&Te)return;this.#kt=(this.#kt|Te)&ke;this.#Lt()}#Lt(){const t=this.children();t.provisional=0;for(const e of t){e.#Ft()}}#Rt(){this.#kt|=Me;this.#$t()}#$t(){if(this.#kt&Ee)return;let t=this.#kt;if((t&xe)===be)t&=ke;this.#kt=t|Ee;this.#Lt()}#jt(t=""){if(t==="ENOTDIR"||t==="EPERM"){this.#$t()}else if(t==="ENOENT"){this.#Ft()}else{this.children().provisional=0}}#Nt(t=""){if(t==="ENOTDIR"){const t=this.parent;t.#$t()}else if(t==="ENOENT"){this.#Ft()}}#Pt(t=""){let e=this.#kt;e|=Pe;if(t==="ENOENT")e|=Te;if(t==="EINVAL"||t==="UNKNOWN"){e&=ke}this.#kt=e;if(t==="ENOTDIR"&&this.parent){this.parent.#$t()}}#It(t,e){return this.#Dt(t,e)||this.#Bt(t,e)}#Bt(t,e){const s=entToType(t);const i=this.newChild(t.name,s,{parent:this});const n=i.#kt&xe;if(n!==be&&n!==ve&&n!==ge){i.#kt|=Ee}e.unshift(i);e.provisional++;return i}#Dt(t,e){for(let s=e.provisional;s<e.length;s++){const i=e[s];const n=this.nocase?normalizeNocase(t.name):normalize(t.name);if(n!==i.#bt){continue}return this.#zt(t,i,s,e)}}#zt(t,e,s,i){const n=e.name;e.#kt=e.#kt&ke|entToType(t);if(n!==t.name)e.name=t.name;if(s!==i.provisional){if(s===i.length-1)i.pop();else i.splice(s,1);i.unshift(e)}i.provisional++;return e}async lstat(){if((this.#kt&Te)===0){try{this.#Wt(await this.#et.promises.lstat(this.fullpath()));return this}catch(t){this.#Nt(t.code)}}}lstatSync(){if((this.#kt&Te)===0){try{this.#Wt(this.#et.lstatSync(this.fullpath()));return this}catch(t){this.#Nt(t.code)}}}#Wt(t){const{atime:e,atimeMs:s,birthtime:i,birthtimeMs:n,blksize:r,blocks:o,ctime:a,ctimeMs:h,dev:l,gid:c,ino:u,mode:f,mtime:p,mtimeMs:d,nlink:g,rdev:y,size:w,uid:b}=t;this.#mt=e;this.#ut=s;this.#wt=i;this.#dt=n;this.#ht=r;this.#ct=o;this.#yt=a;this.#pt=h;this.#st=l;this.#ot=c;this.#lt=u;this.#it=f;this.#gt=p;this.#ft=d;this.#nt=g;this.#at=y;this.#S=w;this.#rt=b;const _=entToType(t);this.#kt=this.#kt&ke|_|Oe;if(_!==ge&&_!==be&&_!==ve){this.#kt|=Ee}}#Ht=[];#Vt=false;#Gt(t){this.#Vt=false;const e=this.#Ht.slice();this.#Ht.length=0;e.forEach((e=>e(null,t)))}readdirCB(t,e=false){if(!this.canReaddir()){if(e)t(null,[]);else queueMicrotask((()=>t(null,[])));return}const s=this.children();if(this.calledReaddir()){const i=s.slice(0,s.provisional);if(e)t(null,i);else queueMicrotask((()=>t(null,i)));return}this.#Ht.push(t);if(this.#Vt){return}this.#Vt=true;const i=this.fullpath();this.#et.readdir(i,{withFileTypes:true},((t,e)=>{if(t){this.#jt(t.code);s.provisional=0}else{for(const t of e){this.#It(t,s)}this.#Mt(s)}this.#Gt(s.slice(0,s.provisional));return}))}#Ut;async readdir(){if(!this.canReaddir()){return[]}const t=this.children();if(this.calledReaddir()){return t.slice(0,t.provisional)}const e=this.fullpath();if(this.#Ut){await this.#Ut}else{let resolve=()=>{};this.#Ut=new Promise((t=>resolve=t));try{for(const s of await this.#et.promises.readdir(e,{withFileTypes:true})){this.#It(s,t)}this.#Mt(t)}catch(e){this.#jt(e.code);t.provisional=0}this.#Ut=undefined;resolve()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir()){return[]}const t=this.children();if(this.calledReaddir()){return t.slice(0,t.provisional)}const e=this.fullpath();try{for(const s of this.#et.readdirSync(e,{withFileTypes:true})){this.#It(s,t)}this.#Mt(t)}catch(e){this.#jt(e.code);t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#kt&Fe)return false;const t=xe&this.#kt;if(!(t===ge||t===be||t===ve)){return false}return true}shouldWalk(t,e){return(this.#kt&be)===be&&!(this.#kt&Fe)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#Et)return this.#Et;if((Me|Pe|Te)&this.#kt)return undefined;try{const t=await this.#et.promises.realpath(this.fullpath());return this.#Et=this.resolve(t)}catch(t){this.#Rt()}}realpathSync(){if(this.#Et)return this.#Et;if((Me|Pe|Te)&this.#kt)return undefined;try{const t=this.#et.realpathSync(this.fullpath());return this.#Et=this.resolve(t)}catch(t){this.#Rt()}}[je](t){if(t===this)return;t.isCWD=false;this.isCWD=true;const e=new Set([]);let s=[];let i=this;while(i&&i.parent){e.add(i);i.#At=s.join(this.sep);i.#xt=s.join("/");i=i.parent;s.push("..")}i=t;while(i&&i.parent&&!e.has(i)){i.#At=undefined;i.#xt=undefined;i=i.parent}}}class PathWin32 extends PathBase{sep="\\";splitSep=me;constructor(t,e=ge,s,i,n,r,o){super(t,e,s,i,n,r,o)}newChild(t,e=ge,s={}){return new PathWin32(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return G.win32.parse(t).root}getRoot(t){t=uncToDrive(t.toUpperCase());if(t===this.root.name){return this.root}for(const[e,s]of Object.entries(this.roots)){if(this.sameRoot(t,e)){return this.roots[t]=s}}return this.roots[t]=new PathScurryWin32(t,this).root}sameRoot(t,e=this.root.name){t=t.toUpperCase().replace(/\//g,"\\").replace(de,"$1\\");return t===e}}class PathPosix extends PathBase{splitSep="/";sep="/";constructor(t,e=ge,s,i,n,r,o){super(t,e,s,i,n,r,o)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=ge,s={}){return new PathPosix(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}}class PathScurryBase{root;rootPath;roots;cwd;#qt;#Jt;#Ct;nocase;#et;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16*1024,fs:o=pe}={}){this.#et=fsFromOption(o);if(t instanceof URL||t.startsWith("file://")){t=(0,n.fileURLToPath)(t)}const a=e.resolve(t);this.roots=Object.create(null);this.rootPath=this.parseRootPath(a);this.#qt=new ResolveCache;this.#Jt=new ResolveCache;this.#Ct=new ChildrenCache(r);const h=a.substring(this.rootPath.length).split(s);if(h.length===1&&!h[0]){h.pop()}if(i===undefined){throw new TypeError("must provide nocase setting to PathScurryBase ctor")}this.nocase=i;this.root=this.newRoot(this.#et);this.roots[this.rootPath]=this.root;let l=this.root;let c=h.length-1;const u=e.sep;let f=this.rootPath;let p=false;for(const t of h){const e=c--;l=l.child(t,{relative:new Array(e).fill("..").join(u),relativePosix:new Array(e).fill("..").join("/"),fullpath:f+=(p?"":u)+t});p=true}this.cwd=l}depth(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.depth()}childrenCache(){return this.#Ct}resolve(...t){let e="";for(let s=t.length-1;s>=0;s--){const i=t[s];if(!i||i===".")continue;e=e?`${i}/${e}`:i;if(this.isAbsolute(i)){break}}const s=this.#qt.get(e);if(s!==undefined){return s}const i=this.cwd.resolve(e).fullpath();this.#qt.set(e,i);return i}resolvePosix(...t){let e="";for(let s=t.length-1;s>=0;s--){const i=t[s];if(!i||i===".")continue;e=e?`${i}/${e}`:i;if(this.isAbsolute(i)){break}}const s=this.#Jt.get(e);if(s!==undefined){return s}const i=this.cwd.resolve(e).fullpathPosix();this.#Jt.set(e,i);return i}relative(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.relative()}relativePosix(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.relativePosix()}basename(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.name}dirname(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:true}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s}=e;if(!t.canReaddir()){return[]}else{const e=await t.readdir();return s?e:e.map((t=>t.name))}}readdirSync(t=this.cwd,e={withFileTypes:true}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true}=e;if(!t.canReaddir()){return[]}else if(s){return t.readdirSync()}else{return t.readdirSync().map((t=>t.name))}}async lstat(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.lstat()}lstatSync(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:n,walkFilter:r}=e;const o=[];if(!n||n(t)){o.push(s?t:t.fullpath())}const a=new Set;const walk=(t,e)=>{a.add(t);t.readdirCB(((t,h)=>{if(t){return e(t)}let l=h.length;if(!l)return e();const next=()=>{if(--l===0){e()}};for(const t of h){if(!n||n(t)){o.push(s?t:t.fullpath())}if(i&&t.isSymbolicLink()){t.realpath().then((t=>t?.isUnknown()?t.lstat():t)).then((t=>t?.shouldWalk(a,r)?walk(t,next):next()))}else{if(t.shouldWalk(a,r)){walk(t,next)}else{next()}}}}),true)};const h=t;return new Promise(((t,e)=>{walk(h,(s=>{if(s)return e(s);t(o)}))}))}walkSync(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:n,walkFilter:r}=e;const o=[];if(!n||n(t)){o.push(s?t:t.fullpath())}const a=new Set([t]);for(const t of a){const e=t.readdirSync();for(const t of e){if(!n||n(t)){o.push(s?t:t.fullpath())}let e=t;if(t.isSymbolicLink()){if(!(i&&(e=t.realpathSync())))continue;if(e.isUnknown())e.lstatSync()}if(e.shouldWalk(a,r)){a.add(e)}}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}return this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:n,walkFilter:r}=e;if(!n||n(t)){yield s?t:t.fullpath()}const o=new Set([t]);for(const t of o){const e=t.readdirSync();for(const t of e){if(!n||n(t)){yield s?t:t.fullpath()}let e=t;if(t.isSymbolicLink()){if(!(i&&(e=t.realpathSync())))continue;if(e.isUnknown())e.lstatSync()}if(e.shouldWalk(o,r)){o.add(e)}}}}stream(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:n,walkFilter:r}=e;const o=new Minipass({objectMode:true});if(!n||n(t)){o.write(s?t:t.fullpath())}const a=new Set;const h=[t];let l=0;const process=()=>{let t=false;while(!t){const e=h.shift();if(!e){if(l===0)o.end();return}l++;a.add(e);const onReaddir=(e,u,f=false)=>{if(e)return o.emit("error",e);if(i&&!f){const t=[];for(const e of u){if(e.isSymbolicLink()){t.push(e.realpath().then((t=>t?.isUnknown()?t.lstat():t)))}}if(t.length){Promise.all(t).then((()=>onReaddir(null,u,true)));return}}for(const e of u){if(e&&(!n||n(e))){if(!o.write(s?e:e.fullpath())){t=true}}}l--;for(const t of u){const e=t.realpathCached()||t;if(e.shouldWalk(a,r)){h.push(e)}}if(t&&!o.flowing){o.once("drain",process)}else if(!c){process()}};let c=true;e.readdirCB(onReaddir,true);c=false}};process();return o}streamSync(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:n,walkFilter:r}=e;const o=new Minipass({objectMode:true});const a=new Set;if(!n||n(t)){o.write(s?t:t.fullpath())}const h=[t];let l=0;const process=()=>{let t=false;while(!t){const e=h.shift();if(!e){if(l===0)o.end();return}l++;a.add(e);const c=e.readdirSync();for(const e of c){if(!n||n(e)){if(!o.write(s?e:e.fullpath())){t=true}}}l--;for(const t of c){let e=t;if(t.isSymbolicLink()){if(!(i&&(e=t.realpathSync())))continue;if(e.isUnknown())e.lstatSync()}if(e.shouldWalk(a,r)){h.push(e)}}}if(t&&!o.flowing)o.once("drain",process)};process();return o}chdir(t=this.cwd){const e=this.cwd;this.cwd=typeof t==="string"?this.cwd.resolve(t):t;this.cwd[je](e)}}class PathScurryWin32 extends PathScurryBase{sep="\\";constructor(t=process.cwd(),e={}){const{nocase:s=true}=e;super(t,G.win32,"\\",{...e,nocase:s});this.nocase=s;for(let t=this.cwd;t;t=t.parent){t.nocase=this.nocase}}parseRootPath(t){return G.win32.parse(t).root.toUpperCase()}newRoot(t){return new PathWin32(this.rootPath,be,undefined,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}}class PathScurryPosix extends PathScurryBase{sep="/";constructor(t=process.cwd(),e={}){const{nocase:s=false}=e;super(t,G.posix,"/",{...e,nocase:s});this.nocase=s}parseRootPath(t){return"/"}newRoot(t){return new PathPosix(this.rootPath,be,undefined,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}}class PathScurryDarwin extends PathScurryPosix{constructor(t=process.cwd(),e={}){const{nocase:s=true}=e;super(t,{...e,nocase:s})}}const Ne=process.platform==="win32"?PathWin32:PathPosix;const Ie=process.platform==="win32"?PathScurryWin32:process.platform==="darwin"?PathScurryDarwin:PathScurryPosix;const isPatternList=t=>t.length>=1;const isGlobList=t=>t.length>=1;class Pattern{#Yt;#Zt;#Kt;length;#Xt;#Qt;#te;#ee;#se;#ie;#ne=true;constructor(t,e,s,i){if(!isPatternList(t)){throw new TypeError("empty pattern list")}if(!isGlobList(e)){throw new TypeError("empty glob list")}if(e.length!==t.length){throw new TypeError("mismatched pattern list and glob list lengths")}this.length=t.length;if(s<0||s>=this.length){throw new TypeError("index out of range")}this.#Yt=t;this.#Zt=e;this.#Kt=s;this.#Xt=i;if(this.#Kt===0){if(this.isUNC()){const[t,e,s,i,...n]=this.#Yt;const[r,o,a,h,...l]=this.#Zt;if(n[0]===""){n.shift();l.shift()}const c=[t,e,s,i,""].join("/");const u=[r,o,a,h,""].join("/");this.#Yt=[c,...n];this.#Zt=[u,...l];this.length=this.#Yt.length}else if(this.isDrive()||this.isAbsolute()){const[t,...e]=this.#Yt;const[s,...i]=this.#Zt;if(e[0]===""){e.shift();i.shift()}const n=t+"/";const r=s+"/";this.#Yt=[n,...e];this.#Zt=[r,...i];this.length=this.#Yt.length}}}pattern(){return this.#Yt[this.#Kt]}isString(){return typeof this.#Yt[this.#Kt]==="string"}isGlobstar(){return this.#Yt[this.#Kt]===mt}isRegExp(){return this.#Yt[this.#Kt]instanceof RegExp}globString(){return this.#te=this.#te||(this.#Kt===0?this.isAbsolute()?this.#Zt[0]+this.#Zt.slice(1).join("/"):this.#Zt.join("/"):this.#Zt.slice(this.#Kt).join("/"))}hasMore(){return this.length>this.#Kt+1}rest(){if(this.#Qt!==undefined)return this.#Qt;if(!this.hasMore())return this.#Qt=null;this.#Qt=new Pattern(this.#Yt,this.#Zt,this.#Kt+1,this.#Xt);this.#Qt.#ie=this.#ie;this.#Qt.#se=this.#se;this.#Qt.#ee=this.#ee;return this.#Qt}isUNC(){const t=this.#Yt;return this.#se!==undefined?this.#se:this.#se=this.#Xt==="win32"&&this.#Kt===0&&t[0]===""&&t[1]===""&&typeof t[2]==="string"&&!!t[2]&&typeof t[3]==="string"&&!!t[3]}isDrive(){const t=this.#Yt;return this.#ee!==undefined?this.#ee:this.#ee=this.#Xt==="win32"&&this.#Kt===0&&this.length>1&&typeof t[0]==="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){const t=this.#Yt;return this.#ie!==undefined?this.#ie:this.#ie=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){const t=this.#Yt[0];return typeof t==="string"&&this.isAbsolute()&&this.#Kt===0?t:""}checkFollowGlobstar(){return!(this.#Kt===0||!this.isGlobstar()||!this.#ne)}markFollowGlobstar(){if(this.#Kt===0||!this.isGlobstar()||!this.#ne)return false;this.#ne=false;return true}}const De=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Ignore{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:s,noext:i,noglobstar:n,platform:r=De}){this.relative=[];this.absolute=[];this.relativeChildren=[];this.absoluteChildren=[];this.platform=r;this.mmopts={dot:true,nobrace:e,nocase:s,noext:i,noglobstar:n,optimizationLevel:2,platform:r,nocomment:true,nonegate:true};for(const e of t)this.add(e)}add(t){const e=new Minimatch(t,this.mmopts);for(let t=0;t<e.set.length;t++){const s=e.set[t];const i=e.globParts[t];if(!s||!i){throw new Error("invalid pattern object")}while(s[0]==="."&&i[0]==="."){s.shift();i.shift()}const n=new Pattern(s,i,0,this.platform);const r=new Minimatch(n.globString(),this.mmopts);const o=i[i.length-1]==="**";const a=n.isAbsolute();if(a)this.absolute.push(r);else this.relative.push(r);if(o){if(a)this.absoluteChildren.push(r);else this.relativeChildren.push(r)}}}ignored(t){const e=t.fullpath();const s=`${e}/`;const i=t.relative()||".";const n=`${i}/`;for(const t of this.relative){if(t.match(i)||t.match(n))return true}for(const t of this.absolute){if(t.match(e)||t.match(s))return true}return false}childrenIgnored(t){const e=t.fullpath()+"/";const s=(t.relative()||".")+"/";for(const t of this.relativeChildren){if(t.match(s))return true}for(const t of this.absoluteChildren){if(t.match(e))return true}return false}}class HasWalkedCache{store;constructor(t=new Map){this.store=t}copy(){return new HasWalkedCache(new Map(this.store))}hasWalked(t,e){return this.store.get(t.fullpath())?.has(e.globString())}storeWalked(t,e){const s=t.fullpath();const i=this.store.get(s);if(i)i.add(e.globString());else this.store.set(s,new Set([e.globString()]))}}class MatchRecord{store=new Map;add(t,e,s){const i=(e?2:0)|(s?1:0);const n=this.store.get(t);this.store.set(t,n===undefined?i:i&n)}entries(){return[...this.store.entries()].map((([t,e])=>[t,!!(e&2),!!(e&1)]))}}class SubWalks{store=new Map;add(t,e){if(!t.canReaddir()){return}const s=this.store.get(t);if(s){if(!s.find((t=>t.globString()===e.globString()))){s.push(e)}}else this.store.set(t,[e])}get(t){const e=this.store.get(t);if(!e){throw new Error("attempting to walk unknown path")}return e}entries(){return this.keys().map((t=>[t,this.store.get(t)]))}keys(){return[...this.store.keys()].filter((t=>t.canReaddir()))}}class Processor{hasWalkedCache;matches=new MatchRecord;subwalks=new SubWalks;patterns;follow;dot;opts;constructor(t,e){this.opts=t;this.follow=!!t.follow;this.dot=!!t.dot;this.hasWalkedCache=e?e.copy():new HasWalkedCache}processPatterns(t,e){this.patterns=e;const s=e.map((e=>[t,e]));for(let[t,e]of s){this.hasWalkedCache.storeWalked(t,e);const s=e.root();const i=e.isAbsolute()&&this.opts.absolute!==false;if(s){t=t.resolve(s==="/"&&this.opts.root!==undefined?this.opts.root:s);const i=e.rest();if(!i){this.matches.add(t,true,false);continue}else{e=i}}if(t.isENOENT())continue;let n;let r;let o=false;while(typeof(n=e.pattern())==="string"&&(r=e.rest())){const s=t.resolve(n);t=s;e=r;o=true}n=e.pattern();r=e.rest();if(o){if(this.hasWalkedCache.hasWalked(t,e))continue;this.hasWalkedCache.storeWalked(t,e)}if(typeof n==="string"){const e=n===".."||n===""||n===".";this.matches.add(t.resolve(n),i,e);continue}else if(n===mt){if(!t.isSymbolicLink()||this.follow||e.checkFollowGlobstar()){this.subwalks.add(t,e)}const s=r?.pattern();const n=r?.rest();if(!r||(s===""||s===".")&&!n){this.matches.add(t,i,s===""||s===".")}else{if(s===".."){const e=t.parent||t;if(!n)this.matches.add(e,i,true);else if(!this.hasWalkedCache.hasWalked(e,n)){this.subwalks.add(e,n)}}}}else if(n instanceof RegExp){this.subwalks.add(t,e)}}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new Processor(this.opts,this.hasWalkedCache)}filterEntries(t,e){const s=this.subwalks.get(t);const i=this.child();for(const t of e){for(const e of s){const s=e.isAbsolute();const n=e.pattern();const r=e.rest();if(n===mt){i.testGlobstar(t,e,r,s)}else if(n instanceof RegExp){i.testRegExp(t,n,r,s)}else{i.testString(t,n,r,s)}}}return i}testGlobstar(t,e,s,i){if(this.dot||!t.name.startsWith(".")){if(!e.hasMore()){this.matches.add(t,i,false)}if(t.canReaddir()){if(this.follow||!t.isSymbolicLink()){this.subwalks.add(t,e)}else if(t.isSymbolicLink()){if(s&&e.checkFollowGlobstar()){this.subwalks.add(t,s)}else if(e.markFollowGlobstar()){this.subwalks.add(t,e)}}}}if(s){const e=s.pattern();if(typeof e==="string"&&e!==".."&&e!==""&&e!=="."){this.testString(t,e,s.rest(),i)}else if(e===".."){const e=t.parent||t;this.subwalks.add(e,s)}else if(e instanceof RegExp){this.testRegExp(t,e,s.rest(),i)}}}testRegExp(t,e,s,i){if(!e.test(t.name))return;if(!s){this.matches.add(t,i,false)}else{this.subwalks.add(t,s)}}testString(t,e,s,i){if(!t.isNamed(e))return;if(!s){this.matches.add(t,i,false)}else{this.subwalks.add(t,s)}}}const makeIgnore=(t,e)=>typeof t==="string"?new Ignore([t],e):Array.isArray(t)?new Ignore(t,e):t;class GlobUtil{path;patterns;opts;seen=new Set;paused=false;aborted=false;#re=[];#oe;#ae;signal;maxDepth;includeChildMatches;constructor(t,e,s){this.patterns=t;this.path=e;this.opts=s;this.#ae=!s.posix&&s.platform==="win32"?"\\":"/";this.includeChildMatches=s.includeChildMatches!==false;if(s.ignore||!this.includeChildMatches){this.#oe=makeIgnore(s.ignore??[],s);if(!this.includeChildMatches&&typeof this.#oe.add!=="function"){const t="cannot ignore child matches, ignore lacks add() method.";throw new Error(t)}}this.maxDepth=s.maxDepth||Infinity;if(s.signal){this.signal=s.signal;this.signal.addEventListener("abort",(()=>{this.#re.length=0}))}}#he(t){return this.seen.has(t)||!!this.#oe?.ignored?.(t)}#le(t){return!!this.#oe?.childrenIgnored?.(t)}pause(){this.paused=true}resume(){if(this.signal?.aborted)return;this.paused=false;let t=undefined;while(!this.paused&&(t=this.#re.shift())){t()}}onResume(t){if(this.signal?.aborted)return;if(!this.paused){t()}else{this.#re.push(t)}}async matchCheck(t,e){if(e&&this.opts.nodir)return undefined;let s;if(this.opts.realpath){s=t.realpathCached()||await t.realpath();if(!s)return undefined;t=s}const i=t.isUnknown()||this.opts.stat;const n=i?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&n?.isSymbolicLink()){const t=await n.realpath();if(t&&(t.isUnknown()||this.opts.stat)){await t.lstat()}}return this.matchCheckTest(n,e)}matchCheckTest(t,e){return t&&(this.maxDepth===Infinity||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#he(t)?t:undefined}matchCheckSync(t,e){if(e&&this.opts.nodir)return undefined;let s;if(this.opts.realpath){s=t.realpathCached()||t.realpathSync();if(!s)return undefined;t=s}const i=t.isUnknown()||this.opts.stat;const n=i?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&n?.isSymbolicLink()){const t=n.realpathSync();if(t&&(t?.isUnknown()||this.opts.stat)){t.lstatSync()}}return this.matchCheckTest(n,e)}matchFinish(t,e){if(this.#he(t))return;if(!this.includeChildMatches&&this.#oe?.add){const e=`${t.relativePosix()}/**`;this.#oe.add(e)}const s=this.opts.absolute===undefined?e:this.opts.absolute;this.seen.add(t);const i=this.opts.mark&&t.isDirectory()?this.#ae:"";if(this.opts.withFileTypes){this.matchEmit(t)}else if(s){const e=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(e+i)}else{const e=this.opts.posix?t.relativePosix():t.relative();const s=this.opts.dotRelative&&!e.startsWith(".."+this.#ae)?"."+this.#ae:"";this.matchEmit(!e?"."+i:s+e+i)}}async match(t,e,s){const i=await this.matchCheck(t,s);if(i)this.matchFinish(i,e)}matchSync(t,e,s){const i=this.matchCheckSync(t,s);if(i)this.matchFinish(i,e)}walkCB(t,e,s){if(this.signal?.aborted)s();this.walkCB2(t,e,new Processor(this.opts),s)}walkCB2(t,e,s,i){if(this.#le(t))return i();if(this.signal?.aborted)i();if(this.paused){this.onResume((()=>this.walkCB2(t,e,s,i)));return}s.processPatterns(t,e);let n=1;const next=()=>{if(--n===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#he(t))continue;n++;this.match(t,e,i).then((()=>next()))}for(const t of s.subwalkTargets()){if(this.maxDepth!==Infinity&&t.depth()>=this.maxDepth){continue}n++;const e=t.readdirCached();if(t.calledReaddir())this.walkCB3(t,e,s,next);else{t.readdirCB(((e,i)=>this.walkCB3(t,i,s,next)),true)}}next()}walkCB3(t,e,s,i){s=s.filterEntries(t,e);let n=1;const next=()=>{if(--n===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#he(t))continue;n++;this.match(t,e,i).then((()=>next()))}for(const[t,e]of s.subwalks.entries()){n++;this.walkCB2(t,e,s.child(),next)}next()}walkCBSync(t,e,s){if(this.signal?.aborted)s();this.walkCB2Sync(t,e,new Processor(this.opts),s)}walkCB2Sync(t,e,s,i){if(this.#le(t))return i();if(this.signal?.aborted)i();if(this.paused){this.onResume((()=>this.walkCB2Sync(t,e,s,i)));return}s.processPatterns(t,e);let n=1;const next=()=>{if(--n===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#he(t))continue;this.matchSync(t,e,i)}for(const t of s.subwalkTargets()){if(this.maxDepth!==Infinity&&t.depth()>=this.maxDepth){continue}n++;const e=t.readdirSync();this.walkCB3Sync(t,e,s,next)}next()}walkCB3Sync(t,e,s,i){s=s.filterEntries(t,e);let n=1;const next=()=>{if(--n===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#he(t))continue;this.matchSync(t,e,i)}for(const[t,e]of s.subwalks.entries()){n++;this.walkCB2Sync(t,e,s.child(),next)}next()}}class GlobWalker extends GlobUtil{matches=new Set;constructor(t,e,s){super(t,e,s)}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){await this.path.lstat()}await new Promise(((t,e)=>{this.walkCB(this.path,this.patterns,(()=>{if(this.signal?.aborted){e(this.signal.reason)}else{t(this.matches)}}))}));return this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){this.path.lstatSync()}this.walkCBSync(this.path,this.patterns,(()=>{if(this.signal?.aborted)throw this.signal.reason}));return this.matches}}class GlobStream extends GlobUtil{results;constructor(t,e,s){super(t,e,s);this.results=new Minipass({signal:this.signal,objectMode:true});this.results.on("drain",(()=>this.resume()));this.results.on("resume",(()=>this.resume()))}matchEmit(t){this.results.write(t);if(!this.results.flowing)this.pause()}stream(){const t=this.path;if(t.isUnknown()){t.lstat().then((()=>{this.walkCB(t,this.patterns,(()=>this.results.end()))}))}else{this.walkCB(t,this.patterns,(()=>this.results.end()))}return this.results}streamSync(){if(this.path.isUnknown()){this.path.lstatSync()}this.walkCBSync(this.path,this.patterns,(()=>this.results.end()));return this.results}}const Be=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Glob{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(t,e){if(!e)throw new TypeError("glob options required");this.withFileTypes=!!e.withFileTypes;this.signal=e.signal;this.follow=!!e.follow;this.dot=!!e.dot;this.dotRelative=!!e.dotRelative;this.nodir=!!e.nodir;this.mark=!!e.mark;if(!e.cwd){this.cwd=""}else if(e.cwd instanceof URL||e.cwd.startsWith("file://")){e.cwd=(0,n.fileURLToPath)(e.cwd)}this.cwd=e.cwd||"";this.root=e.root;this.magicalBraces=!!e.magicalBraces;this.nobrace=!!e.nobrace;this.noext=!!e.noext;this.realpath=!!e.realpath;this.absolute=e.absolute;this.includeChildMatches=e.includeChildMatches!==false;this.noglobstar=!!e.noglobstar;this.matchBase=!!e.matchBase;this.maxDepth=typeof e.maxDepth==="number"?e.maxDepth:Infinity;this.stat=!!e.stat;this.ignore=e.ignore;if(this.withFileTypes&&this.absolute!==undefined){throw new Error("cannot set absolute and withFileTypes:true")}if(typeof t==="string"){t=[t]}this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===false;if(this.windowsPathsNoEscape){t=t.map((t=>t.replace(/\\/g,"/")))}if(this.matchBase){if(e.noglobstar){throw new TypeError("base matching requires globstar")}t=t.map((t=>t.includes("/")?t:`./**/${t}`))}this.pattern=t;this.platform=e.platform||Be;this.opts={...e,platform:this.platform};if(e.scurry){this.scurry=e.scurry;if(e.nocase!==undefined&&e.nocase!==e.scurry.nocase){throw new Error("nocase option contradicts provided scurry option")}}else{const t=e.platform==="win32"?PathScurryWin32:e.platform==="darwin"?PathScurryDarwin:e.platform?PathScurryPosix:Ie;this.scurry=new t(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;const s=this.platform==="darwin"||this.platform==="win32";const i={...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:true,noext:this.noext,nonegate:true,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug};const r=this.pattern.map((t=>new Minimatch(t,i)));const[o,a]=r.reduce(((t,e)=>{t[0].push(...e.set);t[1].push(...e.globParts);return t}),[[],[]]);this.patterns=o.map(((t,e)=>{const s=a[e];if(!s)throw new Error("invalid pattern object");return new Pattern(t,s,0,this.platform)}))}async walk(){return[...await new GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,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()}}const hasMagic=(t,e={})=>{if(!Array.isArray(t)){t=[t]}for(const s of t){if(new Minimatch(s,e).hasMagic())return true}return false};function globStreamSync(t,e={}){return new Glob(t,e).streamSync()}function globStream(t,e={}){return new Glob(t,e).stream()}function globSync(t,e={}){return new Glob(t,e).walkSync()}async function glob_(t,e={}){return new Glob(t,e).walk()}function globIterateSync(t,e={}){return new Glob(t,e).iterateSync()}function globIterate(t,e={}){return new Glob(t,e).iterate()}const ze=globStreamSync;const We=Object.assign(globStream,{sync:globStreamSync});const He=globIterateSync;const Ve=Object.assign(globIterate,{sync:globIterateSync});const Ge=Object.assign(globSync,{stream:globStreamSync,iterate:globIterateSync});const Ue=Object.assign(glob_,{glob:glob_,globSync:globSync,sync:Ge,globStream:globStream,stream:We,globStreamSync:globStreamSync,streamSync:ze,globIterate:globIterate,iterate:Ve,globIterateSync:globIterateSync,iterateSync:He,Glob:Glob,hasMagic:hasMagic,escape:escape_escape,unescape:unescape_unescape});Ue.glob=Ue;const qe=undefined;const{$:Je,cd:Ye}=qe("zx");let Ze=false;async function runAsync(t,e,s){Je.verbose=s?.verbose??Ze;if(s?.cwd){Ye(s.cwd)}return await(Je`${t} ${e}`)}async function setDefaultVerbose(t){Ze=t}const Ke=undefined;const{default:Xe}=Ke("@expo/json-file");let Qe=null;const ts=["@expo/fingerprint","create-expo","eslint-config-universe","expo-dev-client-components","expo-doctor","expo-env-info","expo-module-scripts","expo-module-template","expo-module-template-local","expo-test-runner","install-expo-modules","pod-install","uri-scheme","patch-project","create-expo-module","create-expo-nightly","@react-native-community/cli-platform-android","react","react-dom"];const es=["@react-native/assets-registry","@react-native/dev-middleware","@react-native/babel-preset","react-native"];async function addWorkspacePackagesToAppAsync(t,e){const s=await Xe.readAsync(U().join(t,"package.json"));const i=s.dependencies??{};for(const t of e){i[t.name]="workspace:*"}await Xe.mergeAsync(U().join(t,"package.json"),{dependencies:i})}async function reinstallPackagesAsync(t){await Promise.all([Pt().rm(U().join(t,"node_modules"),{recursive:true,force:true}),Pt().rm(U().join(t,"bun.lock"),{force:true}),Pt().rm(U().join(t,"bun.lockb"),{force:true}),Pt().rm(U().join(t,"yarn.lock"),{force:true})]);await runAsync("bun",["install","--ignore-scripts"],{cwd:t})}async function getExpoPackagesAsync(t){if(Qe!=null){return Qe}const e=await Ue("**/package.json",{cwd:U().join(t,"packages"),ignore:["**/example/**","**/node_modules/**","**/__tests__/**","**/__mocks__/**","**/__fixtures__/**","**/e2e/**","**/build/**"]});const s=(await Promise.all(e.map((async e=>{const s=U().join(t,"packages",U().dirname(e));return await createPackageAsync(s)})))).filter((t=>t!=null));Qe=s.sort(((t,e)=>t.name.localeCompare(e.name)));return Qe}async function getReactNativeTransitivePackagesAsync(t){const e=await Promise.all(es.map((e=>{const s=path.join(t,"node_modules",e);return Promise.resolve({name:e,path:s})})));return e}async function createPackageAsync(t){const e=U().join(t,"package.json");const s=U().dirname(e);const i=await Xe.readAsync(e);const n=i.name;if(ts.includes(n)){return null}return{name:n,path:s}}const ss=undefined;const{default:is}=ss("@expo/json-file");async function setupExpoRepoAsync(t,e,s){let i;const n=e&&J().existsSync(e);if(!n){i=U().join(t,"expo");console.log(`Cloning expo repository to ${i}`);console.time("Cloned expo repository");await runAsync("git",["clone","--depth=1","https://github.com/expo/expo.git",U().basename(i)],{cwd:U().dirname(i)});console.timeEnd("Cloned expo repository")}else{i=e}console.log(`Running \`yarn install\` in ${i}`);console.time("Installed dependencies in expo repository");await setupDependenciesAsync(i,s);try{await runAsync("yarn",["install"],{cwd:i})}catch(t){if(t instanceof Error){console.warn(`Failed to install dependencies in ${i}`,t.toString())}}console.timeEnd("Installed dependencies in expo repository");return i}async function packExpoBareTemplateTarballAsync(t,e){await J().promises.mkdir(e,{recursive:true});const{stdout:s}=await runAsync("npm",["pack","--json","--pack-destination",e],{cwd:U().join(t,"templates","expo-template-bare-minimum")});const i=JSON.parse(s);const n=i[0].filename;return U().join(e,n)}async function setupDependenciesAsync(t,e){const s=U().join(t,"package.json");const i=await is.readAsync(s);const n=i.resolutions??{};for(const t of es){n[t]=`${e}`}await is.mergeAsync(s,{resolutions:n})}async function getNpmVersionAsync(t,e){const{stdout:s}=await runAsync("npm",["view",`${t}@${e}`,"version"]);return s.trim()}const ns=t(import.meta.url)("node:assert");var rs=__nccwpck_require__.n(ns);const os=undefined;const{default:as}=os("@expo/json-file");async function createExpoApp(t,e){const s=e.template??"blank-typescript";const i=e.templateVersion??"canary";if(J().existsSync(t)){throw new Error(`Project already exists at ${t}`)}await runAsync("bunx",["create-expo-app",t,"--no-install",`--template`,`${s}@${i}`]);const n=await setupExpoRepoAsync(t,e.useExpoRepoPath,e.nightlyVersion);await setupProjectPackageJsonAsync(t,n,e.nightlyVersion);await setupMetroConfigAsync(t,n);await setupAppJsonAsync(t,{appId:e.appId,newArchEnabled:e.newArchEnabled});return n}async function setupProjectPackageJsonAsync(t,e,s){const i=U().join(t,"package.json");const n=await as.readAsync(i);const r=n.scripts??{};r["postinstall"]="bun --cwd expo postinstall";let o;const a=U().relative(t,e);if(a.startsWith("..")){o=e}else{o=a}const h=n.resolutions??{};for(const t of es){h[t]=`${s}`}await as.mergeAsync(i,{workspaces:[`${o}/packages/*`,`${o}/packages/@expo/*`],expo:{autolinking:{exclude:["expo-module-template","expo-module-template-local"]}},resolutions:h,scripts:r})}async function setupMetroConfigAsync(t,e){await J().promises.writeFile(U().join(t,"metro.config.js"),`const { getDefaultConfig } = require('expo/metro-config');\n\n/** @type {import('expo/metro-config').MetroConfig} */\nconst config = getDefaultConfig(__dirname);\n\nconfig.watchFolders = [\n ...config.watchFolders ?? [],\n __dirname,\n '${e}',\n];\n\nconfig.resolver.nodeModulesPaths = [\n ...config.resolver.nodeModulesPaths ?? [],\n '${e}/node_modules',\n];\n\nmodule.exports = config;`)}async function prebuildAppAsync(t,e){await runAsync("npx",["expo","prebuild","--no-install","--template",e],{cwd:t})}async function installCocoaPodsAsync(t){await runAsync("pod",["install"],{cwd:U().join(t,"ios")})}async function setupAppJsonAsync(t,{appId:e,newArchEnabled:s}){const i=U().join(t,"app.json");const n=await as.readAsync(i);const r=n.expo;rs()(isJSONObject(r));const o=r.android??{};const a=r.ios??{};rs()(isJSONObject(o));rs()(isJSONObject(a));o.package=e;a.bundleIdentifier=e;const h=r.plugins??[];rs()(isJSONArray(h));r.runtimeVersion="1.0.0";r.android=o;r.ios=a;r.plugins=h;r.newArchEnabled=s;await as.writeAsync(i,n)}function isJSONObject(t){return t!=null&&typeof t==="object"&&!Array.isArray(t)}function isJSONArray(t){return t!=null&&Array.isArray(t)}const hs=undefined;const{which:ls}=hs("zx");async function checkRequiredToolsAsync(t){const e=await Promise.all(t.map((t=>ls(t,{nothrow:true}))));for(const[s,i]of e.entries()){if(!i){throw new Error(`Missing required tool: ${t[s]}`)}}}const cs=JSON.parse('{"UU":"create-expo-nightly","rE":"0.2.2"}');const us=new z(cs.UU).version(cs.rE).description("Create an app for react-native nightlies testing.").argument("[path]","The output path for the app.",".").option("--name <name>","The name of the app to create.","test-nightlies").option("--expo-repo <path>",'The path to the expo repository. (default: Cloning to the "expo" directory in the output app)').option("-v, --verbose","Verbose output.").option("--app-id <name>","The Android applicationId and iOS bundleIdentifier.","dev.expo.testnightlies").option("--no-install","Skip installing CocoaPods.").option("--enable-new-architecture <boolean>","Enable / disable the New Architecture mode (default: new arch enabled).","true").parse(process.argv);async function src_runAsync(t){const e=us.opts();setDefaultVerbose(!!e.verbose);await checkRequiredToolsAsync(["bun","git","npm","yarn"]);const s=e.name;const i=U().join(U().resolve(us.args[0]||"."),s);const n=await getNpmVersionAsync("react-native","nightly");const r={appId:e.appId,newArchEnabled:e.enableNewArchitecture!=="false",nightlyVersion:n,useExpoRepoPath:e.expoRepo};console.log(F.cyan(`Setting up app at ${F.bold(i)} with ${F.bold("react-native@"+n)}`));const o=await createExpoApp(i,r);const a=await getExpoPackagesAsync(o);await addWorkspacePackagesToAppAsync(i,a);console.log(F.cyan(`Reinstalling packages`));await reinstallPackagesAsync(i);console.log(F.cyan(`Creating expo-template-bare-minimum tarball`));const h=await packExpoBareTemplateTarballAsync(o,U().join(i,".expo"));console.log(F.cyan(`Running prebuild`));await prebuildAppAsync(i,h);if(e.install){if(process.platform==="darwin"){await checkRequiredToolsAsync(["pod"]);console.log(`Installing CocoaPods dependencies`);console.time("Installed CocoaPods dependencies");await installCocoaPodsAsync(i);console.timeEnd("Installed CocoaPods dependencies")}}}(async()=>{us.parse(process.argv);try{await src_runAsync(cs.UU)}catch(t){console.error("Uncaught Error",t);process.exit(1)}})();
|
|
2
|
+
import{createRequire as t}from"module";var e={224:t=>{t.exports=balanced;function balanced(t,e,s){if(t instanceof RegExp)t=maybeMatch(t,s);if(e instanceof RegExp)e=maybeMatch(e,s);var i=range(t,e,s);return i&&{start:i[0],end:i[1],pre:s.slice(0,i[0]),body:s.slice(i[0]+t.length,i[1]),post:s.slice(i[1]+e.length)}}function maybeMatch(t,e){var s=e.match(t);return s?s[0]:null}balanced.range=range;function range(t,e,s){var i,n,r,o,a;var h=s.indexOf(t);var l=s.indexOf(e,h+1);var c=h;if(h>=0&&l>0){if(t===e){return[h,l]}i=[];r=s.length;while(c>=0&&!a){if(c==h){i.push(c);h=s.indexOf(t,c+1)}else if(i.length==1){a=[i.pop(),l]}else{n=i.pop();if(n<r){r=n;o=l}l=s.indexOf(e,c+1)}c=h<l&&h>=0?h:l}if(i.length){a=[r,o]}}return a}},365:(t,e,s)=>{var i=s(224);t.exports=expandTop;var n="\0SLASH"+Math.random()+"\0";var r="\0OPEN"+Math.random()+"\0";var o="\0CLOSE"+Math.random()+"\0";var a="\0COMMA"+Math.random()+"\0";var h="\0PERIOD"+Math.random()+"\0";function numeric(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function escapeBraces(t){return t.split("\\\\").join(n).split("\\{").join(r).split("\\}").join(o).split("\\,").join(a).split("\\.").join(h)}function unescapeBraces(t){return t.split(n).join("\\").split(r).join("{").split(o).join("}").split(a).join(",").split(h).join(".")}function parseCommaParts(t){if(!t)return[""];var e=[];var s=i("{","}",t);if(!s)return t.split(",");var n=s.pre;var r=s.body;var o=s.post;var a=n.split(",");a[a.length-1]+="{"+r+"}";var h=parseCommaParts(o);if(o.length){a[a.length-1]+=h.shift();a.push.apply(a,h)}e.push.apply(e,a);return e}function expandTop(t){if(!t)return[];if(t.substr(0,2)==="{}"){t="\\{\\}"+t.substr(2)}return expand(escapeBraces(t),true).map(unescapeBraces)}function embrace(t){return"{"+t+"}"}function isPadded(t){return/^-?0\d/.test(t)}function lte(t,e){return t<=e}function gte(t,e){return t>=e}function expand(t,e){var s=[];var n=i("{","}",t);if(!n)return[t];var r=n.pre;var a=n.post.length?expand(n.post,false):[""];if(/\$$/.test(n.pre)){for(var h=0;h<a.length;h++){var l=r+"{"+n.body+"}"+a[h];s.push(l)}}else{var c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body);var u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body);var f=c||u;var p=n.body.indexOf(",")>=0;if(!f&&!p){if(n.post.match(/,.*\}/)){t=n.pre+"{"+n.body+o+n.post;return expand(t)}return[t]}var d;if(f){d=n.body.split(/\.\./)}else{d=parseCommaParts(n.body);if(d.length===1){d=expand(d[0],false).map(embrace);if(d.length===1){return a.map((function(t){return n.pre+d[0]+t}))}}}var g;if(f){var y=numeric(d[0]);var w=numeric(d[1]);var b=Math.max(d[0].length,d[1].length);var _=d.length==3?Math.abs(numeric(d[2])):1;var S=lte;var v=w<y;if(v){_*=-1;S=gte}var A=d.some(isPadded);g=[];for(var x=y;S(x,w);x+=_){var k;if(u){k=String.fromCharCode(x);if(k==="\\")k=""}else{k=String(x);if(A){var C=b-k.length;if(C>0){var O=new Array(C+1).join("0");if(x<0)k="-"+O+k.slice(1);else k=O+k}}}g.push(k)}}else{g=[];for(var E=0;E<d.length;E++){g.push.apply(g,expand(d[E],false))}}for(var E=0;E<g.length;E++){for(var h=0;h<a.length;h++){var l=r+g[E]+a[h];if(!e||f||l)s.push(l)}}}return s}},421:e=>{e.exports=t(import.meta.url)("node:child_process")},474:e=>{e.exports=t(import.meta.url)("node:events")},24:e=>{e.exports=t(import.meta.url)("node:fs")},760:e=>{e.exports=t(import.meta.url)("node:path")},708:e=>{e.exports=t(import.meta.url)("node:process")},313:(t,e,s)=>{const{Argument:i}=s(854);const{Command:n}=s(600);const{CommanderError:r,InvalidArgumentError:o}=s(851);const{Help:a}=s(518);const{Option:h}=s(596);e.DM=new n;e.gu=t=>new n(t);e.Ww=(t,e)=>new h(t,e);e.er=(t,e)=>new i(t,e);e.uB=n;e.c$=h;e.ef=i;e._V=a;e.b7=r;e.Di=o;e.a2=o},854:(t,e,s)=>{const{InvalidArgumentError:i}=s(851);class Argument{constructor(t,e){this.description=e||"";this.variadic=false;this.parseArg=undefined;this.defaultValue=undefined;this.defaultValueDescription=undefined;this.argChoices=undefined;switch(t[0]){case"<":this.required=true;this._name=t.slice(1,-1);break;case"[":this.required=false;this._name=t.slice(1,-1);break;default:this.required=true;this._name=t;break}if(this._name.length>3&&this._name.slice(-3)==="..."){this.variadic=true;this._name=this._name.slice(0,-3)}}name(){return this._name}_concatValue(t,e){if(e===this.defaultValue||!Array.isArray(e)){return[t]}return e.concat(t)}default(t,e){this.defaultValue=t;this.defaultValueDescription=e;return this}argParser(t){this.parseArg=t;return this}choices(t){this.argChoices=t.slice();this.parseArg=(t,e)=>{if(!this.argChoices.includes(t)){throw new i(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._concatValue(t,e)}return t};return this}argRequired(){this.required=true;return this}argOptional(){this.required=false;return this}}function humanReadableArgName(t){const e=t.name()+(t.variadic===true?"...":"");return t.required?"<"+e+">":"["+e+"]"}e.Argument=Argument;e.humanReadableArgName=humanReadableArgName},600:(t,e,s)=>{const i=s(474).EventEmitter;const n=s(421);const r=s(760);const o=s(24);const a=s(708);const{Argument:h,humanReadableArgName:l}=s(854);const{CommanderError:c}=s(851);const{Help:u}=s(518);const{Option:f,DualOptions:p}=s(596);const{suggestSimilar:d}=s(266);class Command extends i{constructor(t){super();this.commands=[];this.options=[];this.parent=null;this._allowUnknownOption=false;this._allowExcessArguments=true;this.registeredArguments=[];this._args=this.registeredArguments;this.args=[];this.rawArgs=[];this.processedArgs=[];this._scriptPath=null;this._name=t||"";this._optionValues={};this._optionValueSources={};this._storeOptionsAsProperties=false;this._actionHandler=null;this._executableHandler=false;this._executableFile=null;this._executableDir=null;this._defaultCommandName=null;this._exitCallback=null;this._aliases=[];this._combineFlagAndOptionalValue=true;this._description="";this._summary="";this._argsDescription=undefined;this._enablePositionalOptions=false;this._passThroughOptions=false;this._lifeCycleHooks={};this._showHelpAfterError=false;this._showSuggestionAfterError=true;this._outputConfiguration={writeOut:t=>a.stdout.write(t),writeErr:t=>a.stderr.write(t),getOutHelpWidth:()=>a.stdout.isTTY?a.stdout.columns:undefined,getErrHelpWidth:()=>a.stderr.isTTY?a.stderr.columns:undefined,outputError:(t,e)=>e(t)};this._hidden=false;this._helpOption=undefined;this._addImplicitHelpCommand=undefined;this._helpCommand=undefined;this._helpConfiguration={}}copyInheritedSettings(t){this._outputConfiguration=t._outputConfiguration;this._helpOption=t._helpOption;this._helpCommand=t._helpCommand;this._helpConfiguration=t._helpConfiguration;this._exitCallback=t._exitCallback;this._storeOptionsAsProperties=t._storeOptionsAsProperties;this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue;this._allowExcessArguments=t._allowExcessArguments;this._enablePositionalOptions=t._enablePositionalOptions;this._showHelpAfterError=t._showHelpAfterError;this._showSuggestionAfterError=t._showSuggestionAfterError;return this}_getCommandAndAncestors(){const t=[];for(let e=this;e;e=e.parent){t.push(e)}return t}command(t,e,s){let i=e;let n=s;if(typeof i==="object"&&i!==null){n=i;i=null}n=n||{};const[,r,o]=t.match(/([^ ]+) *(.*)/);const a=this.createCommand(r);if(i){a.description(i);a._executableHandler=true}if(n.isDefault)this._defaultCommandName=a._name;a._hidden=!!(n.noHelp||n.hidden);a._executableFile=n.executableFile||null;if(o)a.arguments(o);this._registerCommand(a);a.parent=this;a.copyInheritedSettings(this);if(i)return this;return a}createCommand(t){return new Command(t)}createHelp(){return Object.assign(new u,this.configureHelp())}configureHelp(t){if(t===undefined)return this._helpConfiguration;this._helpConfiguration=t;return this}configureOutput(t){if(t===undefined)return this._outputConfiguration;Object.assign(this._outputConfiguration,t);return this}showHelpAfterError(t=true){if(typeof t!=="string")t=!!t;this._showHelpAfterError=t;return this}showSuggestionAfterError(t=true){this._showSuggestionAfterError=!!t;return this}addCommand(t,e){if(!t._name){throw new Error(`Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()`)}e=e||{};if(e.isDefault)this._defaultCommandName=t._name;if(e.noHelp||e.hidden)t._hidden=true;this._registerCommand(t);t.parent=this;t._checkForBrokenPassThrough();return this}createArgument(t,e){return new h(t,e)}argument(t,e,s,i){const n=this.createArgument(t,e);if(typeof s==="function"){n.default(i).argParser(s)}else{n.default(s)}this.addArgument(n);return this}arguments(t){t.trim().split(/ +/).forEach((t=>{this.argument(t)}));return this}addArgument(t){const e=this.registeredArguments.slice(-1)[0];if(e&&e.variadic){throw new Error(`only the last argument can be variadic '${e.name()}'`)}if(t.required&&t.defaultValue!==undefined&&t.parseArg===undefined){throw new Error(`a default value for a required argument is never used: '${t.name()}'`)}this.registeredArguments.push(t);return this}helpCommand(t,e){if(typeof t==="boolean"){this._addImplicitHelpCommand=t;return this}t=t??"help [command]";const[,s,i]=t.match(/([^ ]+) *(.*)/);const n=e??"display help for command";const r=this.createCommand(s);r.helpOption(false);if(i)r.arguments(i);if(n)r.description(n);this._addImplicitHelpCommand=true;this._helpCommand=r;return this}addHelpCommand(t,e){if(typeof t!=="object"){this.helpCommand(t,e);return this}this._addImplicitHelpCommand=true;this._helpCommand=t;return this}_getHelpCommand(){const t=this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"));if(t){if(this._helpCommand===undefined){this.helpCommand(undefined,undefined)}return this._helpCommand}return null}hook(t,e){const s=["preSubcommand","preAction","postAction"];if(!s.includes(t)){throw new Error(`Unexpected value for event passed to hook : '${t}'.\nExpecting one of '${s.join("', '")}'`)}if(this._lifeCycleHooks[t]){this._lifeCycleHooks[t].push(e)}else{this._lifeCycleHooks[t]=[e]}return this}exitOverride(t){if(t){this._exitCallback=t}else{this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync"){throw t}else{}}}return this}_exit(t,e,s){if(this._exitCallback){this._exitCallback(new c(t,e,s))}a.exit(t)}action(t){const listener=e=>{const s=this.registeredArguments.length;const i=e.slice(0,s);if(this._storeOptionsAsProperties){i[s]=this}else{i[s]=this.opts()}i.push(this);return t.apply(this,i)};this._actionHandler=listener;return this}createOption(t,e){return new f(t,e)}_callParseArg(t,e,s,i){try{return t.parseArg(e,s)}catch(t){if(t.code==="commander.invalidArgument"){const e=`${i} ${t.message}`;this.error(e,{exitCode:t.exitCode,code:t.code})}throw t}}_registerOption(t){const e=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(e){const s=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${s}'\n- already used by option '${e.flags}'`)}this.options.push(t)}_registerCommand(t){const knownBy=t=>[t.name()].concat(t.aliases());const e=knownBy(t).find((t=>this._findCommand(t)));if(e){const s=knownBy(this._findCommand(e)).join("|");const i=knownBy(t).join("|");throw new Error(`cannot add command '${i}' as already have command '${s}'`)}this.commands.push(t)}addOption(t){this._registerOption(t);const e=t.name();const s=t.attributeName();if(t.negate){const e=t.long.replace(/^--no-/,"--");if(!this._findOption(e)){this.setOptionValueWithSource(s,t.defaultValue===undefined?true:t.defaultValue,"default")}}else if(t.defaultValue!==undefined){this.setOptionValueWithSource(s,t.defaultValue,"default")}const handleOptionValue=(e,i,n)=>{if(e==null&&t.presetArg!==undefined){e=t.presetArg}const r=this.getOptionValue(s);if(e!==null&&t.parseArg){e=this._callParseArg(t,e,r,i)}else if(e!==null&&t.variadic){e=t._concatValue(e,r)}if(e==null){if(t.negate){e=false}else if(t.isBoolean()||t.optional){e=true}else{e=""}}this.setOptionValueWithSource(s,e,n)};this.on("option:"+e,(e=>{const s=`error: option '${t.flags}' argument '${e}' is invalid.`;handleOptionValue(e,s,"cli")}));if(t.envVar){this.on("optionEnv:"+e,(e=>{const s=`error: option '${t.flags}' value '${e}' from env '${t.envVar}' is invalid.`;handleOptionValue(e,s,"env")}))}return this}_optionEx(t,e,s,i,n){if(typeof e==="object"&&e instanceof f){throw new Error("To add an Option object use addOption() instead of option() or requiredOption()")}const r=this.createOption(e,s);r.makeOptionMandatory(!!t.mandatory);if(typeof i==="function"){r.default(n).argParser(i)}else if(i instanceof RegExp){const t=i;i=(e,s)=>{const i=t.exec(e);return i?i[0]:s};r.default(n).argParser(i)}else{r.default(i)}return this.addOption(r)}option(t,e,s,i){return this._optionEx({},t,e,s,i)}requiredOption(t,e,s,i){return this._optionEx({mandatory:true},t,e,s,i)}combineFlagAndOptionalValue(t=true){this._combineFlagAndOptionalValue=!!t;return this}allowUnknownOption(t=true){this._allowUnknownOption=!!t;return this}allowExcessArguments(t=true){this._allowExcessArguments=!!t;return this}enablePositionalOptions(t=true){this._enablePositionalOptions=!!t;return this}passThroughOptions(t=true){this._passThroughOptions=!!t;this._checkForBrokenPassThrough();return this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions){throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}}storeOptionsAsProperties(t=true){if(this.options.length){throw new Error("call .storeOptionsAsProperties() before adding options")}if(Object.keys(this._optionValues).length){throw new Error("call .storeOptionsAsProperties() before setting option values")}this._storeOptionsAsProperties=!!t;return this}getOptionValue(t){if(this._storeOptionsAsProperties){return this[t]}return this._optionValues[t]}setOptionValue(t,e){return this.setOptionValueWithSource(t,e,undefined)}setOptionValueWithSource(t,e,s){if(this._storeOptionsAsProperties){this[t]=e}else{this._optionValues[t]=e}this._optionValueSources[t]=s;return this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let e;this._getCommandAndAncestors().forEach((s=>{if(s.getOptionValueSource(t)!==undefined){e=s.getOptionValueSource(t)}}));return e}_prepareUserArgs(t,e){if(t!==undefined&&!Array.isArray(t)){throw new Error("first parameter to parse must be array or undefined")}e=e||{};if(t===undefined&&e.from===undefined){if(a.versions?.electron){e.from="electron"}const t=a.execArgv??[];if(t.includes("-e")||t.includes("--eval")||t.includes("-p")||t.includes("--print")){e.from="eval"}}if(t===undefined){t=a.argv}this.rawArgs=t.slice();let s;switch(e.from){case undefined:case"node":this._scriptPath=t[1];s=t.slice(2);break;case"electron":if(a.defaultApp){this._scriptPath=t[1];s=t.slice(2)}else{s=t.slice(1)}break;case"user":s=t.slice(0);break;case"eval":s=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${e.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);this._name=this._name||"program";return s}parse(t,e){const s=this._prepareUserArgs(t,e);this._parseCommand([],s);return this}async parseAsync(t,e){const s=this._prepareUserArgs(t,e);await this._parseCommand([],s);return this}_executeSubCommand(t,e){e=e.slice();let s=false;const i=[".js",".ts",".tsx",".mjs",".cjs"];function findFile(t,e){const s=r.resolve(t,e);if(o.existsSync(s))return s;if(i.includes(r.extname(e)))return undefined;const n=i.find((t=>o.existsSync(`${s}${t}`)));if(n)return`${s}${n}`;return undefined}this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();let h=t._executableFile||`${this._name}-${t._name}`;let l=this._executableDir||"";if(this._scriptPath){let t;try{t=o.realpathSync(this._scriptPath)}catch(e){t=this._scriptPath}l=r.resolve(r.dirname(t),l)}if(l){let e=findFile(l,h);if(!e&&!t._executableFile&&this._scriptPath){const s=r.basename(this._scriptPath,r.extname(this._scriptPath));if(s!==this._name){e=findFile(l,`${s}-${t._name}`)}}h=e||h}s=i.includes(r.extname(h));let u;if(a.platform!=="win32"){if(s){e.unshift(h);e=incrementNodeInspectorPort(a.execArgv).concat(e);u=n.spawn(a.argv[0],e,{stdio:"inherit"})}else{u=n.spawn(h,e,{stdio:"inherit"})}}else{e.unshift(h);e=incrementNodeInspectorPort(a.execArgv).concat(e);u=n.spawn(a.execPath,e,{stdio:"inherit"})}if(!u.killed){const t=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];t.forEach((t=>{a.on(t,(()=>{if(u.killed===false&&u.exitCode===null){u.kill(t)}}))}))}const f=this._exitCallback;u.on("close",(t=>{t=t??1;if(!f){a.exit(t)}else{f(new c(t,"commander.executeSubCommandAsync","(close)"))}}));u.on("error",(e=>{if(e.code==="ENOENT"){const e=l?`searched for local subcommand relative to directory '${l}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory";const s=`'${h}' does not exist\n - if '${t._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${e}`;throw new Error(s)}else if(e.code==="EACCES"){throw new Error(`'${h}' not executable`)}if(!f){a.exit(1)}else{const t=new c(1,"commander.executeSubCommandAsync","(error)");t.nestedError=e;f(t)}}));this.runningCommand=u}_dispatchSubcommand(t,e,s){const i=this._findCommand(t);if(!i)this.help({error:true});let n;n=this._chainOrCallSubCommandHook(n,i,"preSubcommand");n=this._chainOrCall(n,(()=>{if(i._executableHandler){this._executeSubCommand(i,e.concat(s))}else{return i._parseCommand(e,s)}}));return n}_dispatchHelpCommand(t){if(!t){this.help()}const e=this._findCommand(t);if(e&&!e._executableHandler){e.help()}return this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach(((t,e)=>{if(t.required&&this.args[e]==null){this.missingArgument(t.name())}}));if(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic){return}if(this.args.length>this.registeredArguments.length){this._excessArguments(this.args)}}_processArguments(){const myParseArg=(t,e,s)=>{let i=e;if(e!==null&&t.parseArg){const n=`error: command-argument value '${e}' is invalid for argument '${t.name()}'.`;i=this._callParseArg(t,e,s,n)}return i};this._checkNumberOfArguments();const t=[];this.registeredArguments.forEach(((e,s)=>{let i=e.defaultValue;if(e.variadic){if(s<this.args.length){i=this.args.slice(s);if(e.parseArg){i=i.reduce(((t,s)=>myParseArg(e,s,t)),e.defaultValue)}}else if(i===undefined){i=[]}}else if(s<this.args.length){i=this.args[s];if(e.parseArg){i=myParseArg(e,i,e.defaultValue)}}t[s]=i}));this.processedArgs=t}_chainOrCall(t,e){if(t&&t.then&&typeof t.then==="function"){return t.then((()=>e()))}return e()}_chainOrCallHooks(t,e){let s=t;const i=[];this._getCommandAndAncestors().reverse().filter((t=>t._lifeCycleHooks[e]!==undefined)).forEach((t=>{t._lifeCycleHooks[e].forEach((e=>{i.push({hookedCommand:t,callback:e})}))}));if(e==="postAction"){i.reverse()}i.forEach((t=>{s=this._chainOrCall(s,(()=>t.callback(t.hookedCommand,this)))}));return s}_chainOrCallSubCommandHook(t,e,s){let i=t;if(this._lifeCycleHooks[s]!==undefined){this._lifeCycleHooks[s].forEach((t=>{i=this._chainOrCall(i,(()=>t(this,e)))}))}return i}_parseCommand(t,e){const s=this.parseOptions(e);this._parseOptionsEnv();this._parseOptionsImplied();t=t.concat(s.operands);e=s.unknown;this.args=t.concat(e);if(t&&this._findCommand(t[0])){return this._dispatchSubcommand(t[0],t.slice(1),e)}if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name()){return this._dispatchHelpCommand(t[1])}if(this._defaultCommandName){this._outputHelpIfRequested(e);return this._dispatchSubcommand(this._defaultCommandName,t,e)}if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName){this.help({error:true})}this._outputHelpIfRequested(s.unknown);this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();const checkForUnknownOptions=()=>{if(s.unknown.length>0){this.unknownOption(s.unknown[0])}};const i=`command:${this.name()}`;if(this._actionHandler){checkForUnknownOptions();this._processArguments();let s;s=this._chainOrCallHooks(s,"preAction");s=this._chainOrCall(s,(()=>this._actionHandler(this.processedArgs)));if(this.parent){s=this._chainOrCall(s,(()=>{this.parent.emit(i,t,e)}))}s=this._chainOrCallHooks(s,"postAction");return s}if(this.parent&&this.parent.listenerCount(i)){checkForUnknownOptions();this._processArguments();this.parent.emit(i,t,e)}else if(t.length){if(this._findCommand("*")){return this._dispatchSubcommand("*",t,e)}if(this.listenerCount("command:*")){this.emit("command:*",t,e)}else if(this.commands.length){this.unknownCommand()}else{checkForUnknownOptions();this._processArguments()}}else if(this.commands.length){checkForUnknownOptions();this.help({error:true})}else{checkForUnknownOptions();this._processArguments()}}_findCommand(t){if(!t)return undefined;return this.commands.find((e=>e._name===t||e._aliases.includes(t)))}_findOption(t){return this.options.find((e=>e.is(t)))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((t=>{t.options.forEach((e=>{if(e.mandatory&&t.getOptionValue(e.attributeName())===undefined){t.missingMandatoryOptionValue(e)}}))}))}_checkForConflictingLocalOptions(){const t=this.options.filter((t=>{const e=t.attributeName();if(this.getOptionValue(e)===undefined){return false}return this.getOptionValueSource(e)!=="default"}));const e=t.filter((t=>t.conflictsWith.length>0));e.forEach((e=>{const s=t.find((t=>e.conflictsWith.includes(t.attributeName())));if(s){this._conflictingOption(e,s)}}))}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((t=>{t._checkForConflictingLocalOptions()}))}parseOptions(t){const e=[];const s=[];let i=e;const n=t.slice();function maybeOption(t){return t.length>1&&t[0]==="-"}let r=null;while(n.length){const t=n.shift();if(t==="--"){if(i===s)i.push(t);i.push(...n);break}if(r&&!maybeOption(t)){this.emit(`option:${r.name()}`,t);continue}r=null;if(maybeOption(t)){const e=this._findOption(t);if(e){if(e.required){const t=n.shift();if(t===undefined)this.optionMissingArgument(e);this.emit(`option:${e.name()}`,t)}else if(e.optional){let t=null;if(n.length>0&&!maybeOption(n[0])){t=n.shift()}this.emit(`option:${e.name()}`,t)}else{this.emit(`option:${e.name()}`)}r=e.variadic?e:null;continue}}if(t.length>2&&t[0]==="-"&&t[1]!=="-"){const e=this._findOption(`-${t[1]}`);if(e){if(e.required||e.optional&&this._combineFlagAndOptionalValue){this.emit(`option:${e.name()}`,t.slice(2))}else{this.emit(`option:${e.name()}`);n.unshift(`-${t.slice(2)}`)}continue}}if(/^--[^=]+=/.test(t)){const e=t.indexOf("=");const s=this._findOption(t.slice(0,e));if(s&&(s.required||s.optional)){this.emit(`option:${s.name()}`,t.slice(e+1));continue}}if(maybeOption(t)){i=s}if((this._enablePositionalOptions||this._passThroughOptions)&&e.length===0&&s.length===0){if(this._findCommand(t)){e.push(t);if(n.length>0)s.push(...n);break}else if(this._getHelpCommand()&&t===this._getHelpCommand().name()){e.push(t);if(n.length>0)e.push(...n);break}else if(this._defaultCommandName){s.push(t);if(n.length>0)s.push(...n);break}}if(this._passThroughOptions){i.push(t);if(n.length>0)i.push(...n);break}i.push(t)}return{operands:e,unknown:s}}opts(){if(this._storeOptionsAsProperties){const t={};const e=this.options.length;for(let s=0;s<e;s++){const e=this.options[s].attributeName();t[e]=e===this._versionOptionName?this._version:this[e]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce(((t,e)=>Object.assign(t,e.opts())),{})}error(t,e){this._outputConfiguration.outputError(`${t}\n`,this._outputConfiguration.writeErr);if(typeof this._showHelpAfterError==="string"){this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`)}else if(this._showHelpAfterError){this._outputConfiguration.writeErr("\n");this.outputHelp({error:true})}const s=e||{};const i=s.exitCode||1;const n=s.code||"commander.error";this._exit(i,n,t)}_parseOptionsEnv(){this.options.forEach((t=>{if(t.envVar&&t.envVar in a.env){const e=t.attributeName();if(this.getOptionValue(e)===undefined||["default","config","env"].includes(this.getOptionValueSource(e))){if(t.required||t.optional){this.emit(`optionEnv:${t.name()}`,a.env[t.envVar])}else{this.emit(`optionEnv:${t.name()}`)}}}}))}_parseOptionsImplied(){const t=new p(this.options);const hasCustomOptionValue=t=>this.getOptionValue(t)!==undefined&&!["default","implied"].includes(this.getOptionValueSource(t));this.options.filter((e=>e.implied!==undefined&&hasCustomOptionValue(e.attributeName())&&t.valueFromOption(this.getOptionValue(e.attributeName()),e))).forEach((t=>{Object.keys(t.implied).filter((t=>!hasCustomOptionValue(t))).forEach((e=>{this.setOptionValueWithSource(e,t.implied[e],"implied")}))}))}missingArgument(t){const e=`error: missing required argument '${t}'`;this.error(e,{code:"commander.missingArgument"})}optionMissingArgument(t){const e=`error: option '${t.flags}' argument missing`;this.error(e,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){const e=`error: required option '${t.flags}' not specified`;this.error(e,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,e){const findBestOptionFromValue=t=>{const e=t.attributeName();const s=this.getOptionValue(e);const i=this.options.find((t=>t.negate&&e===t.attributeName()));const n=this.options.find((t=>!t.negate&&e===t.attributeName()));if(i&&(i.presetArg===undefined&&s===false||i.presetArg!==undefined&&s===i.presetArg)){return i}return n||t};const getErrorMessage=t=>{const e=findBestOptionFromValue(t);const s=e.attributeName();const i=this.getOptionValueSource(s);if(i==="env"){return`environment variable '${e.envVar}'`}return`option '${e.flags}'`};const s=`error: ${getErrorMessage(t)} cannot be used with ${getErrorMessage(e)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let e="";if(t.startsWith("--")&&this._showSuggestionAfterError){let s=[];let i=this;do{const t=i.createHelp().visibleOptions(i).filter((t=>t.long)).map((t=>t.long));s=s.concat(t);i=i.parent}while(i&&!i._enablePositionalOptions);e=d(t,s)}const s=`error: unknown option '${t}'${e}`;this.error(s,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;const e=this.registeredArguments.length;const s=e===1?"":"s";const i=this.parent?` for '${this.name()}'`:"";const n=`error: too many arguments${i}. Expected ${e} argument${s} but got ${t.length}.`;this.error(n,{code:"commander.excessArguments"})}unknownCommand(){const t=this.args[0];let e="";if(this._showSuggestionAfterError){const s=[];this.createHelp().visibleCommands(this).forEach((t=>{s.push(t.name());if(t.alias())s.push(t.alias())}));e=d(t,s)}const s=`error: unknown command '${t}'${e}`;this.error(s,{code:"commander.unknownCommand"})}version(t,e,s){if(t===undefined)return this._version;this._version=t;e=e||"-V, --version";s=s||"output the version number";const i=this.createOption(e,s);this._versionOptionName=i.attributeName();this._registerOption(i);this.on("option:"+i.name(),(()=>{this._outputConfiguration.writeOut(`${t}\n`);this._exit(0,"commander.version",t)}));return this}description(t,e){if(t===undefined&&e===undefined)return this._description;this._description=t;if(e){this._argsDescription=e}return this}summary(t){if(t===undefined)return this._summary;this._summary=t;return this}alias(t){if(t===undefined)return this._aliases[0];let e=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler){e=this.commands[this.commands.length-1]}if(t===e._name)throw new Error("Command alias can't be the same as its name");const s=this.parent?._findCommand(t);if(s){const e=[s.name()].concat(s.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${e}'`)}e._aliases.push(t);return this}aliases(t){if(t===undefined)return this._aliases;t.forEach((t=>this.alias(t)));return this}usage(t){if(t===undefined){if(this._usage)return this._usage;const t=this.registeredArguments.map((t=>l(t)));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}this._usage=t;return this}name(t){if(t===undefined)return this._name;this._name=t;return this}nameFromFilename(t){this._name=r.basename(t,r.extname(t));return this}executableDir(t){if(t===undefined)return this._executableDir;this._executableDir=t;return this}helpInformation(t){const e=this.createHelp();if(e.helpWidth===undefined){e.helpWidth=t&&t.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()}return e.formatHelp(this,e)}_getHelpContext(t){t=t||{};const e={error:!!t.error};let s;if(e.error){s=t=>this._outputConfiguration.writeErr(t)}else{s=t=>this._outputConfiguration.writeOut(t)}e.write=t.write||s;e.command=this;return e}outputHelp(t){let e;if(typeof t==="function"){e=t;t=undefined}const s=this._getHelpContext(t);this._getCommandAndAncestors().reverse().forEach((t=>t.emit("beforeAllHelp",s)));this.emit("beforeHelp",s);let i=this.helpInformation(s);if(e){i=e(i);if(typeof i!=="string"&&!Buffer.isBuffer(i)){throw new Error("outputHelp callback must return a string or a Buffer")}}s.write(i);if(this._getHelpOption()?.long){this.emit(this._getHelpOption().long)}this.emit("afterHelp",s);this._getCommandAndAncestors().forEach((t=>t.emit("afterAllHelp",s)))}helpOption(t,e){if(typeof t==="boolean"){if(t){this._helpOption=this._helpOption??undefined}else{this._helpOption=null}return this}t=t??"-h, --help";e=e??"display help for command";this._helpOption=this.createOption(t,e);return this}_getHelpOption(){if(this._helpOption===undefined){this.helpOption(undefined,undefined)}return this._helpOption}addHelpOption(t){this._helpOption=t;return this}help(t){this.outputHelp(t);let e=a.exitCode||0;if(e===0&&t&&typeof t!=="function"&&t.error){e=1}this._exit(e,"commander.help","(outputHelp)")}addHelpText(t,e){const s=["beforeAll","before","after","afterAll"];if(!s.includes(t)){throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${s.join("', '")}'`)}const i=`${t}Help`;this.on(i,(t=>{let s;if(typeof e==="function"){s=e({error:t.error,command:t.command})}else{s=e}if(s){t.write(`${s}\n`)}}));return this}_outputHelpIfRequested(t){const e=this._getHelpOption();const s=e&&t.find((t=>e.is(t)));if(s){this.outputHelp();this._exit(0,"commander.helpDisplayed","(outputHelp)")}}}function incrementNodeInspectorPort(t){return t.map((t=>{if(!t.startsWith("--inspect")){return t}let e;let s="127.0.0.1";let i="9229";let n;if((n=t.match(/^(--inspect(-brk)?)$/))!==null){e=n[1]}else if((n=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null){e=n[1];if(/^\d+$/.test(n[3])){i=n[3]}else{s=n[3]}}else if((n=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null){e=n[1];s=n[3];i=n[4]}if(e&&i!=="0"){return`${e}=${s}:${parseInt(i)+1}`}return t}))}e.Command=Command},851:(t,e)=>{class CommanderError extends Error{constructor(t,e,s){super(s);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name;this.code=e;this.exitCode=t;this.nestedError=undefined}}class InvalidArgumentError extends CommanderError{constructor(t){super(1,"commander.invalidArgument",t);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name}}e.CommanderError=CommanderError;e.InvalidArgumentError=InvalidArgumentError},518:(t,e,s)=>{const{humanReadableArgName:i}=s(854);class Help{constructor(){this.helpWidth=undefined;this.sortSubcommands=false;this.sortOptions=false;this.showGlobalOptions=false}visibleCommands(t){const e=t.commands.filter((t=>!t._hidden));const s=t._getHelpCommand();if(s&&!s._hidden){e.push(s)}if(this.sortSubcommands){e.sort(((t,e)=>t.name().localeCompare(e.name())))}return e}compareOptions(t,e){const getSortKey=t=>t.short?t.short.replace(/^-/,""):t.long.replace(/^--/,"");return getSortKey(t).localeCompare(getSortKey(e))}visibleOptions(t){const e=t.options.filter((t=>!t.hidden));const s=t._getHelpOption();if(s&&!s.hidden){const i=s.short&&t._findOption(s.short);const n=s.long&&t._findOption(s.long);if(!i&&!n){e.push(s)}else if(s.long&&!n){e.push(t.createOption(s.long,s.description))}else if(s.short&&!i){e.push(t.createOption(s.short,s.description))}}if(this.sortOptions){e.sort(this.compareOptions)}return e}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];const e=[];for(let s=t.parent;s;s=s.parent){const t=s.options.filter((t=>!t.hidden));e.push(...t)}if(this.sortOptions){e.sort(this.compareOptions)}return e}visibleArguments(t){if(t._argsDescription){t.registeredArguments.forEach((e=>{e.description=e.description||t._argsDescription[e.name()]||""}))}if(t.registeredArguments.find((t=>t.description))){return t.registeredArguments}return[]}subcommandTerm(t){const e=t.registeredArguments.map((t=>i(t))).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(e?" "+e:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,e){return e.visibleCommands(t).reduce(((t,s)=>Math.max(t,e.subcommandTerm(s).length)),0)}longestOptionTermLength(t,e){return e.visibleOptions(t).reduce(((t,s)=>Math.max(t,e.optionTerm(s).length)),0)}longestGlobalOptionTermLength(t,e){return e.visibleGlobalOptions(t).reduce(((t,s)=>Math.max(t,e.optionTerm(s).length)),0)}longestArgumentTermLength(t,e){return e.visibleArguments(t).reduce(((t,s)=>Math.max(t,e.argumentTerm(s).length)),0)}commandUsage(t){let e=t._name;if(t._aliases[0]){e=e+"|"+t._aliases[0]}let s="";for(let e=t.parent;e;e=e.parent){s=e.name()+" "+s}return s+e+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){const e=[];if(t.argChoices){e.push(`choices: ${t.argChoices.map((t=>JSON.stringify(t))).join(", ")}`)}if(t.defaultValue!==undefined){const s=t.required||t.optional||t.isBoolean()&&typeof t.defaultValue==="boolean";if(s){e.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`)}}if(t.presetArg!==undefined&&t.optional){e.push(`preset: ${JSON.stringify(t.presetArg)}`)}if(t.envVar!==undefined){e.push(`env: ${t.envVar}`)}if(e.length>0){return`${t.description} (${e.join(", ")})`}return t.description}argumentDescription(t){const e=[];if(t.argChoices){e.push(`choices: ${t.argChoices.map((t=>JSON.stringify(t))).join(", ")}`)}if(t.defaultValue!==undefined){e.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`)}if(e.length>0){const s=`(${e.join(", ")})`;if(t.description){return`${t.description} ${s}`}return s}return t.description}formatHelp(t,e){const s=e.padWidth(t,e);const i=e.helpWidth||80;const n=2;const r=2;function formatItem(t,o){if(o){const a=`${t.padEnd(s+r)}${o}`;return e.wrap(a,i-n,s+r)}return t}function formatList(t){return t.join("\n").replace(/^/gm," ".repeat(n))}let o=[`Usage: ${e.commandUsage(t)}`,""];const a=e.commandDescription(t);if(a.length>0){o=o.concat([e.wrap(a,i,0),""])}const h=e.visibleArguments(t).map((t=>formatItem(e.argumentTerm(t),e.argumentDescription(t))));if(h.length>0){o=o.concat(["Arguments:",formatList(h),""])}const l=e.visibleOptions(t).map((t=>formatItem(e.optionTerm(t),e.optionDescription(t))));if(l.length>0){o=o.concat(["Options:",formatList(l),""])}if(this.showGlobalOptions){const s=e.visibleGlobalOptions(t).map((t=>formatItem(e.optionTerm(t),e.optionDescription(t))));if(s.length>0){o=o.concat(["Global Options:",formatList(s),""])}}const c=e.visibleCommands(t).map((t=>formatItem(e.subcommandTerm(t),e.subcommandDescription(t))));if(c.length>0){o=o.concat(["Commands:",formatList(c),""])}return o.join("\n")}padWidth(t,e){return Math.max(e.longestOptionTermLength(t,e),e.longestGlobalOptionTermLength(t,e),e.longestSubcommandTermLength(t,e),e.longestArgumentTermLength(t,e))}wrap(t,e,s,i=40){const n=" \\f\\t\\v - \ufeff";const r=new RegExp(`[\\n][${n}]+`);if(t.match(r))return t;const o=e-s;if(o<i)return t;const a=t.slice(0,s);const h=t.slice(s).replace("\r\n","\n");const l=" ".repeat(s);const c="";const u=`\\s${c}`;const f=new RegExp(`\n|.{1,${o-1}}([${u}]|$)|[^${u}]+?([${u}]|$)`,"g");const p=h.match(f)||[];return a+p.map(((t,e)=>{if(t==="\n")return"";return(e>0?l:"")+t.trimEnd()})).join("\n")}}e.Help=Help},596:(t,e,s)=>{const{InvalidArgumentError:i}=s(851);class Option{constructor(t,e){this.flags=t;this.description=e||"";this.required=t.includes("<");this.optional=t.includes("[");this.variadic=/\w\.\.\.[>\]]$/.test(t);this.mandatory=false;const s=splitOptionFlags(t);this.short=s.shortFlag;this.long=s.longFlag;this.negate=false;if(this.long){this.negate=this.long.startsWith("--no-")}this.defaultValue=undefined;this.defaultValueDescription=undefined;this.presetArg=undefined;this.envVar=undefined;this.parseArg=undefined;this.hidden=false;this.argChoices=undefined;this.conflictsWith=[];this.implied=undefined}default(t,e){this.defaultValue=t;this.defaultValueDescription=e;return this}preset(t){this.presetArg=t;return this}conflicts(t){this.conflictsWith=this.conflictsWith.concat(t);return this}implies(t){let e=t;if(typeof t==="string"){e={[t]:true}}this.implied=Object.assign(this.implied||{},e);return this}env(t){this.envVar=t;return this}argParser(t){this.parseArg=t;return this}makeOptionMandatory(t=true){this.mandatory=!!t;return this}hideHelp(t=true){this.hidden=!!t;return this}_concatValue(t,e){if(e===this.defaultValue||!Array.isArray(e)){return[t]}return e.concat(t)}choices(t){this.argChoices=t.slice();this.parseArg=(t,e)=>{if(!this.argChoices.includes(t)){throw new i(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._concatValue(t,e)}return t};return this}name(){if(this.long){return this.long.replace(/^--/,"")}return this.short.replace(/^-/,"")}attributeName(){return camelcase(this.name().replace(/^no-/,""))}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class DualOptions{constructor(t){this.positiveOptions=new Map;this.negativeOptions=new Map;this.dualOptions=new Set;t.forEach((t=>{if(t.negate){this.negativeOptions.set(t.attributeName(),t)}else{this.positiveOptions.set(t.attributeName(),t)}}));this.negativeOptions.forEach(((t,e)=>{if(this.positiveOptions.has(e)){this.dualOptions.add(e)}}))}valueFromOption(t,e){const s=e.attributeName();if(!this.dualOptions.has(s))return true;const i=this.negativeOptions.get(s).presetArg;const n=i!==undefined?i:false;return e.negate===(n===t)}}function camelcase(t){return t.split("-").reduce(((t,e)=>t+e[0].toUpperCase()+e.slice(1)))}function splitOptionFlags(t){let e;let s;const i=t.split(/[ |,]+/);if(i.length>1&&!/^[[<]/.test(i[1]))e=i.shift();s=i.shift();if(!e&&/^-[^-]$/.test(s)){e=s;s=undefined}return{shortFlag:e,longFlag:s}}e.Option=Option;e.DualOptions=DualOptions},266:(t,e)=>{const s=3;function editDistance(t,e){if(Math.abs(t.length-e.length)>s)return Math.max(t.length,e.length);const i=[];for(let e=0;e<=t.length;e++){i[e]=[e]}for(let t=0;t<=e.length;t++){i[0][t]=t}for(let s=1;s<=e.length;s++){for(let n=1;n<=t.length;n++){let r=1;if(t[n-1]===e[s-1]){r=0}else{r=1}i[n][s]=Math.min(i[n-1][s]+1,i[n][s-1]+1,i[n-1][s-1]+r);if(n>1&&s>1&&t[n-1]===e[s-2]&&t[n-2]===e[s-1]){i[n][s]=Math.min(i[n][s],i[n-2][s-2]+1)}}}return i[t.length][e.length]}function suggestSimilar(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));const i=t.startsWith("--");if(i){t=t.slice(2);e=e.map((t=>t.slice(2)))}let n=[];let r=s;const o=.4;e.forEach((e=>{if(e.length<=1)return;const s=editDistance(t,e);const i=Math.max(t.length,e.length);const a=(i-s)/i;if(a>o){if(s<r){r=s;n=[e]}else if(s===r){n.push(e)}}}));n.sort(((t,e)=>t.localeCompare(e)));if(i){n=n.map((t=>`--${t}`))}if(n.length>1){return`\n(Did you mean one of ${n.join(", ")}?)`}if(n.length===1){return`\n(Did you mean ${n[0]}?)`}return""}e.suggestSimilar=suggestSimilar}};var s={};function __nccwpck_require__(t){var i=s[t];if(i!==undefined){return i.exports}var n=s[t]={exports:{}};var r=true;try{e[t](n,n.exports,__nccwpck_require__);r=false}finally{if(r)delete s[t]}return n.exports}(()=>{__nccwpck_require__.n=t=>{var e=t&&t.__esModule?()=>t["default"]:()=>t;__nccwpck_require__.d(e,{a:e});return e}})();(()=>{var t=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__;var e;__nccwpck_require__.t=function(s,i){if(i&1)s=this(s);if(i&8)return s;if(typeof s==="object"&&s){if(i&4&&s.__esModule)return s;if(i&16&&typeof s.then==="function")return s}var n=Object.create(null);__nccwpck_require__.r(n);var r={};e=e||[null,t({}),t([]),t(t)];for(var o=i&2&&s;typeof o=="object"&&!~e.indexOf(o);o=t(o)){Object.getOwnPropertyNames(o).forEach((t=>r[t]=()=>s[t]))}r["default"]=()=>s;__nccwpck_require__.d(n,r);return n}})();(()=>{__nccwpck_require__.d=(t,e)=>{for(var s in e){if(__nccwpck_require__.o(e,s)&&!__nccwpck_require__.o(t,s)){Object.defineProperty(t,s,{enumerable:true,get:e[s]})}}}})();(()=>{__nccwpck_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e)})();(()=>{__nccwpck_require__.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=new URL(".",import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/)?1:0,-1)+"/";var i={};const n=t(import.meta.url)("node:url");globalThis.__filename=(0,n.fileURLToPath)(import.meta.url);const r=10;const wrapAnsi16=(t=0)=>e=>`[${e+t}m`;const wrapAnsi256=(t=0)=>e=>`[${38+t};5;${e}m`;const wrapAnsi16m=(t=0)=>(e,s,i)=>`[${38+t};2;${e};${s};${i}m`;const o={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};const a=Object.keys(o.modifier);const h=Object.keys(o.color);const l=Object.keys(o.bgColor);const c=[...h,...l];function assembleStyles(){const t=new Map;for(const[e,s]of Object.entries(o)){for(const[e,i]of Object.entries(s)){o[e]={open:`[${i[0]}m`,close:`[${i[1]}m`};s[e]=o[e];t.set(i[0],i[1])}Object.defineProperty(o,e,{value:s,enumerable:false})}Object.defineProperty(o,"codes",{value:t,enumerable:false});o.color.close="[39m";o.bgColor.close="[49m";o.color.ansi=wrapAnsi16();o.color.ansi256=wrapAnsi256();o.color.ansi16m=wrapAnsi16m();o.bgColor.ansi=wrapAnsi16(r);o.bgColor.ansi256=wrapAnsi256(r);o.bgColor.ansi16m=wrapAnsi16m(r);Object.defineProperties(o,{rgbToAnsi256:{value(t,e,s){if(t===e&&e===s){if(t<8){return 16}if(t>248){return 231}return Math.round((t-8)/247*24)+232}return 16+36*Math.round(t/255*5)+6*Math.round(e/255*5)+Math.round(s/255*5)},enumerable:false},hexToRgb:{value(t){const e=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!e){return[0,0,0]}let[s]=e;if(s.length===3){s=[...s].map((t=>t+t)).join("")}const i=Number.parseInt(s,16);return[i>>16&255,i>>8&255,i&255]},enumerable:false},hexToAnsi256:{value:t=>o.rgbToAnsi256(...o.hexToRgb(t)),enumerable:false},ansi256ToAnsi:{value(t){if(t<8){return 30+t}if(t<16){return 90+(t-8)}let e;let s;let i;if(t>=232){e=((t-232)*10+8)/255;s=e;i=e}else{t-=16;const n=t%36;e=Math.floor(t/36)/5;s=Math.floor(n/6)/5;i=n%6/5}const n=Math.max(e,s,i)*2;if(n===0){return 30}let r=30+(Math.round(i)<<2|Math.round(s)<<1|Math.round(e));if(n===2){r+=60}return r},enumerable:false},rgbToAnsi:{value:(t,e,s)=>o.ansi256ToAnsi(o.rgbToAnsi256(t,e,s)),enumerable:false},hexToAnsi:{value:t=>o.ansi256ToAnsi(o.hexToAnsi256(t)),enumerable:false}});return o}const u=assembleStyles();const f=u;var p=__nccwpck_require__(708);const d=t(import.meta.url)("node:os");const g=t(import.meta.url)("node:tty");function hasFlag(t,e=(globalThis.Deno?globalThis.Deno.args:p.argv)){const s=t.startsWith("-")?"":t.length===1?"-":"--";const i=e.indexOf(s+t);const n=e.indexOf("--");return i!==-1&&(n===-1||i<n)}const{env:y}=p;let w;if(hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")||hasFlag("color=never")){w=0}else if(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always")){w=1}function envForceColor(){if("FORCE_COLOR"in y){if(y.FORCE_COLOR==="true"){return 1}if(y.FORCE_COLOR==="false"){return 0}return y.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(y.FORCE_COLOR,10),3)}}function translateLevel(t){if(t===0){return false}return{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function _supportsColor(t,{streamIsTTY:e,sniffFlags:s=true}={}){const i=envForceColor();if(i!==undefined){w=i}const n=s?w:i;if(n===0){return 0}if(s){if(hasFlag("color=16m")||hasFlag("color=full")||hasFlag("color=truecolor")){return 3}if(hasFlag("color=256")){return 2}}if("TF_BUILD"in y&&"AGENT_NAME"in y){return 1}if(t&&!e&&n===undefined){return 0}const r=n||0;if(y.TERM==="dumb"){return r}if(p.platform==="win32"){const t=d.release().split(".");if(Number(t[0])>=10&&Number(t[2])>=10586){return Number(t[2])>=14931?3:2}return 1}if("CI"in y){if("GITHUB_ACTIONS"in y||"GITEA_ACTIONS"in y){return 3}if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((t=>t in y))||y.CI_NAME==="codeship"){return 1}return r}if("TEAMCITY_VERSION"in y){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(y.TEAMCITY_VERSION)?1:0}if(y.COLORTERM==="truecolor"){return 3}if(y.TERM==="xterm-kitty"){return 3}if("TERM_PROGRAM"in y){const t=Number.parseInt((y.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(y.TERM_PROGRAM){case"iTerm.app":{return t>=3?3:2}case"Apple_Terminal":{return 2}}}if(/-256(color)?$/i.test(y.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(y.TERM)){return 1}if("COLORTERM"in y){return 1}return r}function createSupportsColor(t,e={}){const s=_supportsColor(t,{streamIsTTY:t&&t.isTTY,...e});return translateLevel(s)}const b={stdout:createSupportsColor({isTTY:g.isatty(1)}),stderr:createSupportsColor({isTTY:g.isatty(2)})};const _=b;function stringReplaceAll(t,e,s){let i=t.indexOf(e);if(i===-1){return t}const n=e.length;let r=0;let o="";do{o+=t.slice(r,i)+e+s;r=i+n;i=t.indexOf(e,r)}while(i!==-1);o+=t.slice(r);return o}function stringEncaseCRLFWithFirstIndex(t,e,s,i){let n=0;let r="";do{const o=t[i-1]==="\r";r+=t.slice(n,o?i-1:i)+e+(o?"\r\n":"\n")+s;n=i+1;i=t.indexOf("\n",n)}while(i!==-1);r+=t.slice(n);return r}const{stdout:S,stderr:v}=_;const A=Symbol("GENERATOR");const x=Symbol("STYLER");const k=Symbol("IS_EMPTY");const C=["ansi","ansi","ansi256","ansi16m"];const O=Object.create(null);const applyOptions=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3)){throw new Error("The `level` option should be an integer from 0 to 3")}const s=S?S.level:0;t.level=e.level===undefined?s:e.level};class Chalk{constructor(t){return chalkFactory(t)}}const chalkFactory=t=>{const chalk=(...t)=>t.join(" ");applyOptions(chalk,t);Object.setPrototypeOf(chalk,createChalk.prototype);return chalk};function createChalk(t){return chalkFactory(t)}Object.setPrototypeOf(createChalk.prototype,Function.prototype);for(const[t,e]of Object.entries(f)){O[t]={get(){const s=createBuilder(this,createStyler(e.open,e.close,this[x]),this[k]);Object.defineProperty(this,t,{value:s});return s}}}O.visible={get(){const t=createBuilder(this,this[x],true);Object.defineProperty(this,"visible",{value:t});return t}};const getModelAnsi=(t,e,s,...i)=>{if(t==="rgb"){if(e==="ansi16m"){return f[s].ansi16m(...i)}if(e==="ansi256"){return f[s].ansi256(f.rgbToAnsi256(...i))}return f[s].ansi(f.rgbToAnsi(...i))}if(t==="hex"){return getModelAnsi("rgb",e,s,...f.hexToRgb(...i))}return f[s][t](...i)};const E=["rgb","hex","ansi256"];for(const t of E){O[t]={get(){const{level:e}=this;return function(...s){const i=createStyler(getModelAnsi(t,C[e],"color",...s),f.color.close,this[x]);return createBuilder(this,i,this[k])}}};const e="bg"+t[0].toUpperCase()+t.slice(1);O[e]={get(){const{level:e}=this;return function(...s){const i=createStyler(getModelAnsi(t,C[e],"bgColor",...s),f.bgColor.close,this[x]);return createBuilder(this,i,this[k])}}}}const T=Object.defineProperties((()=>{}),{...O,level:{enumerable:true,get(){return this[A].level},set(t){this[A].level=t}}});const createStyler=(t,e,s)=>{let i;let n;if(s===undefined){i=t;n=e}else{i=s.openAll+t;n=e+s.closeAll}return{open:t,close:e,openAll:i,closeAll:n,parent:s}};const createBuilder=(t,e,s)=>{const builder=(...t)=>applyStyle(builder,t.length===1?""+t[0]:t.join(" "));Object.setPrototypeOf(builder,T);builder[A]=t;builder[x]=e;builder[k]=s;return builder};const applyStyle=(t,e)=>{if(t.level<=0||!e){return t[k]?"":e}let s=t[x];if(s===undefined){return e}const{openAll:i,closeAll:n}=s;if(e.includes("")){while(s!==undefined){e=stringReplaceAll(e,s.close,s.open);s=s.parent}}const r=e.indexOf("\n");if(r!==-1){e=stringEncaseCRLFWithFirstIndex(e,n,i,r)}return i+e+n};Object.defineProperties(createChalk.prototype,O);const P=createChalk();const M=createChalk({level:v?v.level:0});const F=P;var L=__nccwpck_require__(313);const{DM:R,gu:$,er:j,Ww:N,b7:I,Di:D,a2:B,uB:z,ef:W,c$:H,_V:V}=L;var G=__nccwpck_require__(760);var U=__nccwpck_require__.n(G);const q=t(import.meta.url)("fs");var J=__nccwpck_require__.n(q);var Y=__nccwpck_require__(365);const Z=1024*64;const assertValidPattern=t=>{if(typeof t!=="string"){throw new TypeError("invalid pattern")}if(t.length>Z){throw new TypeError("pattern is too long")}};const K={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",true],"[:alpha:]":["\\p{L}\\p{Nl}",true],"[:ascii:]":["\\x"+"00-\\x"+"7f",false],"[:blank:]":["\\p{Zs}\\t",true],"[:cntrl:]":["\\p{Cc}",true],"[:digit:]":["\\p{Nd}",true],"[:graph:]":["\\p{Z}\\p{C}",true,true],"[:lower:]":["\\p{Ll}",true],"[:print:]":["\\p{C}",true],"[:punct:]":["\\p{P}",true],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",true],"[:upper:]":["\\p{Lu}",true],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",true],"[:xdigit:]":["A-Fa-f0-9",false]};const braceEscape=t=>t.replace(/[[\]\\-]/g,"\\$&");const regexpEscape=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const rangesToString=t=>t.join("");const parseClass=(t,e)=>{const s=e;if(t.charAt(s)!=="["){throw new Error("not in a brace expression")}const i=[];const n=[];let r=s+1;let o=false;let a=false;let h=false;let l=false;let c=s;let u="";t:while(r<t.length){const e=t.charAt(r);if((e==="!"||e==="^")&&r===s+1){l=true;r++;continue}if(e==="]"&&o&&!h){c=r+1;break}o=true;if(e==="\\"){if(!h){h=true;r++;continue}}if(e==="["&&!h){for(const[e,[o,h,l]]of Object.entries(K)){if(t.startsWith(e,r)){if(u){return["$.",false,t.length-s,true]}r+=e.length;if(l)n.push(o);else i.push(o);a=a||h;continue t}}}h=false;if(u){if(e>u){i.push(braceEscape(u)+"-"+braceEscape(e))}else if(e===u){i.push(braceEscape(e))}u="";r++;continue}if(t.startsWith("-]",r+1)){i.push(braceEscape(e+"-"));r+=2;continue}if(t.startsWith("-",r+1)){u=e;r+=2;continue}i.push(braceEscape(e));r++}if(c<r){return["",false,0,false]}if(!i.length&&!n.length){return["$.",false,t.length-s,true]}if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!l){const t=i[0].length===2?i[0].slice(-1):i[0];return[regexpEscape(t),false,c-s,false]}const f="["+(l?"^":"")+rangesToString(i)+"]";const p="["+(l?"":"^")+rangesToString(n)+"]";const d=i.length&&n.length?"("+f+"|"+p+")":i.length?f:p;return[d,a,c-s,true]};const unescape_unescape=(t,{windowsPathsNoEscape:e=false}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");const X=new Set(["!","?","+","*","@"]);const isExtglobType=t=>X.has(t);const Q="(?!(?:^|/)\\.\\.?(?:$|/))";const tt="(?!\\.)";const et=new Set(["[","."]);const st=new Set(["..","."]);const it=new Set("().*{}+?[]^$\\!");const regExpEscape=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const nt="[^/]";const rt=nt+"*?";const ot=nt+"+?";class AST{type;#t;#e;#s=false;#i=[];#n;#r;#o;#a=false;#h;#l;#c=false;constructor(t,e,s={}){this.type=t;if(t)this.#e=true;this.#n=e;this.#t=this.#n?this.#n.#t:this;this.#h=this.#t===this?s:this.#t.#h;this.#o=this.#t===this?[]:this.#t.#o;if(t==="!"&&!this.#t.#a)this.#o.push(this);this.#r=this.#n?this.#n.#i.length:0}get hasMagic(){if(this.#e!==undefined)return this.#e;for(const t of this.#i){if(typeof t==="string")continue;if(t.type||t.hasMagic)return this.#e=true}return this.#e}toString(){if(this.#l!==undefined)return this.#l;if(!this.type){return this.#l=this.#i.map((t=>String(t))).join("")}else{return this.#l=this.type+"("+this.#i.map((t=>String(t))).join("|")+")"}}#u(){if(this!==this.#t)throw new Error("should only call on root");if(this.#a)return this;this.toString();this.#a=true;let t;while(t=this.#o.pop()){if(t.type!=="!")continue;let e=t;let s=e.#n;while(s){for(let i=e.#r+1;!s.type&&i<s.#i.length;i++){for(const e of t.#i){if(typeof e==="string"){throw new Error("string part in extglob AST??")}e.copyIn(s.#i[i])}}e=s;s=e.#n}}return this}push(...t){for(const e of t){if(e==="")continue;if(typeof e!=="string"&&!(e instanceof AST&&e.#n===this)){throw new Error("invalid part: "+e)}this.#i.push(e)}}toJSON(){const t=this.type===null?this.#i.slice().map((t=>typeof t==="string"?t:t.toJSON())):[this.type,...this.#i.map((t=>t.toJSON()))];if(this.isStart()&&!this.type)t.unshift([]);if(this.isEnd()&&(this===this.#t||this.#t.#a&&this.#n?.type==="!")){t.push({})}return t}isStart(){if(this.#t===this)return true;if(!this.#n?.isStart())return false;if(this.#r===0)return true;const t=this.#n;for(let e=0;e<this.#r;e++){const s=t.#i[e];if(!(s instanceof AST&&s.type==="!")){return false}}return true}isEnd(){if(this.#t===this)return true;if(this.#n?.type==="!")return true;if(!this.#n?.isEnd())return false;if(!this.type)return this.#n?.isEnd();const t=this.#n?this.#n.#i.length:0;return this.#r===t-1}copyIn(t){if(typeof t==="string")this.push(t);else this.push(t.clone(this))}clone(t){const e=new AST(this.type,t);for(const t of this.#i){e.copyIn(t)}return e}static#f(t,e,s,i){let n=false;let r=false;let o=-1;let a=false;if(e.type===null){let h=s;let l="";while(h<t.length){const s=t.charAt(h++);if(n||s==="\\"){n=!n;l+=s;continue}if(r){if(h===o+1){if(s==="^"||s==="!"){a=true}}else if(s==="]"&&!(h===o+2&&a)){r=false}l+=s;continue}else if(s==="["){r=true;o=h;a=false;l+=s;continue}if(!i.noext&&isExtglobType(s)&&t.charAt(h)==="("){e.push(l);l="";const n=new AST(s,e);h=AST.#f(t,n,h,i);e.push(n);continue}l+=s}e.push(l);return h}let h=s+1;let l=new AST(null,e);const c=[];let u="";while(h<t.length){const s=t.charAt(h++);if(n||s==="\\"){n=!n;u+=s;continue}if(r){if(h===o+1){if(s==="^"||s==="!"){a=true}}else if(s==="]"&&!(h===o+2&&a)){r=false}u+=s;continue}else if(s==="["){r=true;o=h;a=false;u+=s;continue}if(isExtglobType(s)&&t.charAt(h)==="("){l.push(u);u="";const e=new AST(s,l);l.push(e);h=AST.#f(t,e,h,i);continue}if(s==="|"){l.push(u);u="";c.push(l);l=new AST(null,e);continue}if(s===")"){if(u===""&&e.#i.length===0){e.#c=true}l.push(u);u="";e.push(...c,l);return h}u+=s}e.type=null;e.#e=undefined;e.#i=[t.substring(s-1)];return h}static fromGlob(t,e={}){const s=new AST(null,undefined,e);AST.#f(t,s,0,e);return s}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();const t=this.toString();const[e,s,i,n]=this.toRegExpSource();const r=i||this.#e||this.#h.nocase&&!this.#h.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase();if(!r){return s}const o=(this.#h.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${e}$`,o),{_src:e,_glob:t})}get options(){return this.#h}toRegExpSource(t){const e=t??!!this.#h.dot;if(this.#t===this)this.#u();if(!this.type){const s=this.isStart()&&this.isEnd();const i=this.#i.map((e=>{const[i,n,r,o]=typeof e==="string"?AST.#p(e,this.#e,s):e.toRegExpSource(t);this.#e=this.#e||r;this.#s=this.#s||o;return i})).join("");let n="";if(this.isStart()){if(typeof this.#i[0]==="string"){const s=this.#i.length===1&&st.has(this.#i[0]);if(!s){const s=et;const r=e&&s.has(i.charAt(0))||i.startsWith("\\.")&&s.has(i.charAt(2))||i.startsWith("\\.\\.")&&s.has(i.charAt(4));const o=!e&&!t&&s.has(i.charAt(0));n=r?Q:o?tt:""}}}let r="";if(this.isEnd()&&this.#t.#a&&this.#n?.type==="!"){r="(?:$|\\/)"}const o=n+i+r;return[o,unescape_unescape(i),this.#e=!!this.#e,this.#s]}const s=this.type==="*"||this.type==="+";const i=this.type==="!"?"(?:(?!(?:":"(?:";let n=this.#d(e);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){const t=this.toString();this.#i=[t];this.type=null;this.#e=undefined;return[t,unescape_unescape(this.toString()),false,false]}let r=!s||t||e||!tt?"":this.#d(true);if(r===n){r=""}if(r){n=`(?:${n})(?:${r})*?`}let o="";if(this.type==="!"&&this.#c){o=(this.isStart()&&!e?tt:"")+ot}else{const s=this.type==="!"?"))"+(this.isStart()&&!e&&!t?tt:"")+rt+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&r?")":this.type==="*"&&r?`)?`:`)${this.type}`;o=i+n+s}return[o,unescape_unescape(n),this.#e=!!this.#e,this.#s]}#d(t){return this.#i.map((e=>{if(typeof e==="string"){throw new Error("string type in extglob ast??")}const[s,i,n,r]=e.toRegExpSource(t);this.#s=this.#s||r;return s})).filter((t=>!(this.isStart()&&this.isEnd())||!!t)).join("|")}static#p(t,e,s=false){let i=false;let n="";let r=false;for(let o=0;o<t.length;o++){const a=t.charAt(o);if(i){i=false;n+=(it.has(a)?"\\":"")+a;continue}if(a==="\\"){if(o===t.length-1){n+="\\\\"}else{i=true}continue}if(a==="["){const[s,i,a,h]=parseClass(t,o);if(a){n+=s;r=r||i;o+=a-1;e=e||h;continue}}if(a==="*"){if(s&&t==="*")n+=ot;else n+=rt;e=true;continue}if(a==="?"){n+=nt;e=true;continue}n+=regExpEscape(a)}return[n,unescape_unescape(t),!!e,r]}}const escape_escape=(t,{windowsPathsNoEscape:e=false}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");const minimatch=(t,e,s={})=>{assertValidPattern(e);if(!s.nocomment&&e.charAt(0)==="#"){return false}return new Minimatch(e,s).match(t)};const at=/^\*+([^+@!?\*\[\(]*)$/;const starDotExtTest=t=>e=>!e.startsWith(".")&&e.endsWith(t);const starDotExtTestDot=t=>e=>e.endsWith(t);const starDotExtTestNocase=t=>{t=t.toLowerCase();return e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)};const starDotExtTestNocaseDot=t=>{t=t.toLowerCase();return e=>e.toLowerCase().endsWith(t)};const ht=/^\*+\.\*+$/;const starDotStarTest=t=>!t.startsWith(".")&&t.includes(".");const starDotStarTestDot=t=>t!=="."&&t!==".."&&t.includes(".");const lt=/^\.\*+$/;const dotStarTest=t=>t!=="."&&t!==".."&&t.startsWith(".");const ct=/^\*+$/;const starTest=t=>t.length!==0&&!t.startsWith(".");const starTestDot=t=>t.length!==0&&t!=="."&&t!=="..";const ut=/^\?+([^+@!?\*\[\(]*)?$/;const qmarksTestNocase=([t,e=""])=>{const s=qmarksTestNoExt([t]);if(!e)return s;e=e.toLowerCase();return t=>s(t)&&t.toLowerCase().endsWith(e)};const qmarksTestNocaseDot=([t,e=""])=>{const s=qmarksTestNoExtDot([t]);if(!e)return s;e=e.toLowerCase();return t=>s(t)&&t.toLowerCase().endsWith(e)};const qmarksTestDot=([t,e=""])=>{const s=qmarksTestNoExtDot([t]);return!e?s:t=>s(t)&&t.endsWith(e)};const qmarksTest=([t,e=""])=>{const s=qmarksTestNoExt([t]);return!e?s:t=>s(t)&&t.endsWith(e)};const qmarksTestNoExt=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")};const qmarksTestNoExtDot=([t])=>{const e=t.length;return t=>t.length===e&&t!=="."&&t!==".."};const ft=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";const pt={win32:{sep:"\\"},posix:{sep:"/"}};const dt=ft==="win32"?pt.win32.sep:pt.posix.sep;minimatch.sep=dt;const mt=Symbol("globstar **");minimatch.GLOBSTAR=mt;const gt="[^/]";const yt=gt+"*?";const wt="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";const bt="(?:(?!(?:\\/|^)\\.).)*?";const filter=(t,e={})=>s=>minimatch(s,t,e);minimatch.filter=filter;const ext=(t,e={})=>Object.assign({},t,e);const defaults=t=>{if(!t||typeof t!=="object"||!Object.keys(t).length){return minimatch}const e=minimatch;const m=(s,i,n={})=>e(s,i,ext(t,n));return Object.assign(m,{Minimatch:class Minimatch extends e.Minimatch{constructor(e,s={}){super(e,ext(t,s))}static defaults(s){return e.defaults(ext(t,s)).Minimatch}},AST:class AST extends e.AST{constructor(e,s,i={}){super(e,s,ext(t,i))}static fromGlob(s,i={}){return e.AST.fromGlob(s,ext(t,i))}},unescape:(s,i={})=>e.unescape(s,ext(t,i)),escape:(s,i={})=>e.escape(s,ext(t,i)),filter:(s,i={})=>e.filter(s,ext(t,i)),defaults:s=>e.defaults(ext(t,s)),makeRe:(s,i={})=>e.makeRe(s,ext(t,i)),braceExpand:(s,i={})=>e.braceExpand(s,ext(t,i)),match:(s,i,n={})=>e.match(s,i,ext(t,n)),sep:e.sep,GLOBSTAR:mt})};minimatch.defaults=defaults;const braceExpand=(t,e={})=>{assertValidPattern(t);if(e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)){return[t]}return Y(t)};minimatch.braceExpand=braceExpand;const makeRe=(t,e={})=>new Minimatch(t,e).makeRe();minimatch.makeRe=makeRe;const match=(t,e,s={})=>{const i=new Minimatch(e,s);t=t.filter((t=>i.match(t)));if(i.options.nonull&&!t.length){t.push(e)}return t};minimatch.match=match;const _t=/[?*]|[+@!]\(.*?\)|\[|\]/;const esm_regExpEscape=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Minimatch{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){assertValidPattern(t);e=e||{};this.options=e;this.pattern=t;this.platform=e.platform||ft;this.isWindows=this.platform==="win32";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===false;if(this.windowsPathsNoEscape){this.pattern=this.pattern.replace(/\\/g,"/")}this.preserveMultipleSlashes=!!e.preserveMultipleSlashes;this.regexp=null;this.negate=false;this.nonegate=!!e.nonegate;this.comment=false;this.empty=false;this.partial=!!e.partial;this.nocase=!!this.options.nocase;this.windowsNoMagicRoot=e.windowsNoMagicRoot!==undefined?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase);this.globSet=[];this.globParts=[];this.set=[];this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1){return true}for(const t of this.set){for(const e of t){if(typeof e!=="string")return true}}return false}debug(...t){}make(){const t=this.pattern;const e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=true;return}if(!t){this.empty=true;return}this.parseNegate();this.globSet=[...new Set(this.braceExpand())];if(e.debug){this.debug=(...t)=>console.error(...t)}this.debug(this.pattern,this.globSet);const s=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(s);this.debug(this.pattern,this.globParts);let i=this.globParts.map(((t,e,s)=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=t[0]===""&&t[1]===""&&(t[2]==="?"||!_t.test(t[2]))&&!_t.test(t[3]);const s=/^[a-z]:/i.test(t[0]);if(e){return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))]}else if(s){return[t[0],...t.slice(1).map((t=>this.parse(t)))]}}return t.map((t=>this.parse(t)))}));this.debug(this.pattern,i);this.set=i.filter((t=>t.indexOf(false)===-1));if(this.isWindows){for(let t=0;t<this.set.length;t++){const e=this.set[t];if(e[0]===""&&e[1]===""&&this.globParts[t][2]==="?"&&typeof e[3]==="string"&&/^[a-z]:$/i.test(e[3])){e[2]="?"}}}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar){for(let e=0;e<t.length;e++){for(let s=0;s<t[e].length;s++){if(t[e][s]==="**"){t[e][s]="*"}}}}const{optimizationLevel:e=1}=this.options;if(e>=2){t=this.firstPhasePreProcess(t);t=this.secondPhasePreProcess(t)}else if(e>=1){t=this.levelOneOptimize(t)}else{t=this.adjascentGlobstarOptimize(t)}return t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;while(-1!==(e=t.indexOf("**",e+1))){let s=e;while(t[s+1]==="**"){s++}if(s!==e){t.splice(e,s-e)}}return t}))}levelOneOptimize(t){return t.map((t=>{t=t.reduce(((t,e)=>{const s=t[t.length-1];if(e==="**"&&s==="**"){return t}if(e===".."){if(s&&s!==".."&&s!=="."&&s!=="**"){t.pop();return t}}t.push(e);return t}),[]);return t.length===0?[""]:t}))}levelTwoFileOptimize(t){if(!Array.isArray(t)){t=this.slashSplit(t)}let e=false;do{e=false;if(!this.preserveMultipleSlashes){for(let s=1;s<t.length-1;s++){const i=t[s];if(s===1&&i===""&&t[0]==="")continue;if(i==="."||i===""){e=true;t.splice(s,1);s--}}if(t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")){e=true;t.pop()}}let s=0;while(-1!==(s=t.indexOf("..",s+1))){const i=t[s-1];if(i&&i!=="."&&i!==".."&&i!=="**"){e=true;t.splice(s-1,2);s-=2}}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=false;do{e=false;for(let s of t){let i=-1;while(-1!==(i=s.indexOf("**",i+1))){let n=i;while(s[n+1]==="**"){n++}if(n>i){s.splice(i+1,n-i)}let r=s[i+1];const o=s[i+2];const a=s[i+3];if(r!=="..")continue;if(!o||o==="."||o===".."||!a||a==="."||a===".."){continue}e=true;s.splice(i,1);const h=s.slice(0);h[i]="**";t.push(h);i--}if(!this.preserveMultipleSlashes){for(let t=1;t<s.length-1;t++){const i=s[t];if(t===1&&i===""&&s[0]==="")continue;if(i==="."||i===""){e=true;s.splice(t,1);t--}}if(s[0]==="."&&s.length===2&&(s[1]==="."||s[1]==="")){e=true;s.pop()}}let n=0;while(-1!==(n=s.indexOf("..",n+1))){const t=s[n-1];if(t&&t!=="."&&t!==".."&&t!=="**"){e=true;const t=n===1&&s[n+1]==="**";const i=t?["."]:[];s.splice(n-1,2,...i);if(s.length===0)s.push("");n-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++){for(let s=e+1;s<t.length;s++){const i=this.partsMatch(t[e],t[s],!this.preserveMultipleSlashes);if(i){t[e]=[];t[s]=i;break}}}return t.filter((t=>t.length))}partsMatch(t,e,s=false){let i=0;let n=0;let r=[];let o="";while(i<t.length&&n<e.length){if(t[i]===e[n]){r.push(o==="b"?e[n]:t[i]);i++;n++}else if(s&&t[i]==="**"&&e[n]===t[i+1]){r.push(t[i]);i++}else if(s&&e[n]==="**"&&t[i]===e[n+1]){r.push(e[n]);n++}else if(t[i]==="*"&&e[n]&&(this.options.dot||!e[n].startsWith("."))&&e[n]!=="**"){if(o==="b")return false;o="a";r.push(t[i]);i++;n++}else if(e[n]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(o==="a")return false;o="b";r.push(e[n]);i++;n++}else{return false}}return t.length===e.length&&r}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=false;let s=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++){e=!e;s++}if(s)this.pattern=t.slice(s);this.negate=e}matchOne(t,e,s=false){const i=this.options;if(this.isWindows){const s=typeof t[0]==="string"&&/^[a-z]:$/i.test(t[0]);const i=!s&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]);const n=typeof e[0]==="string"&&/^[a-z]:$/i.test(e[0]);const r=!n&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]==="string"&&/^[a-z]:$/i.test(e[3]);const o=i?3:s?0:undefined;const a=r?3:n?0:undefined;if(typeof o==="number"&&typeof a==="number"){const[s,i]=[t[o],e[a]];if(s.toLowerCase()===i.toLowerCase()){e[a]=s;if(a>o){e=e.slice(a)}else if(o>a){t=t.slice(o)}}}}const{optimizationLevel:n=1}=this.options;if(n>=2){t=this.levelTwoFileOptimize(t)}this.debug("matchOne",this,{file:t,pattern:e});this.debug("matchOne",t.length,e.length);for(var r=0,o=0,a=t.length,h=e.length;r<a&&o<h;r++,o++){this.debug("matchOne loop");var l=e[o];var c=t[r];this.debug(e,l,c);if(l===false){return false}if(l===mt){this.debug("GLOBSTAR",[e,l,c]);var u=r;var f=o+1;if(f===h){this.debug("** at the end");for(;r<a;r++){if(t[r]==="."||t[r]===".."||!i.dot&&t[r].charAt(0)===".")return false}return true}while(u<a){var p=t[u];this.debug("\nglobstar while",t,u,e,f,p);if(this.matchOne(t.slice(u),e.slice(f),s)){this.debug("globstar found match!",u,a,p);return true}else{if(p==="."||p===".."||!i.dot&&p.charAt(0)==="."){this.debug("dot detected!",t,u,e,f);break}this.debug("globstar swallow a segment, and continue");u++}}if(s){this.debug("\n>>> no match, partial?",t,u,e,f);if(u===a){return true}}return false}let n;if(typeof l==="string"){n=c===l;this.debug("string match",l,c,n)}else{n=l.test(c);this.debug("pattern match",l,c,n)}if(!n)return false}if(r===a&&o===h){return true}else if(r===a){return s}else if(o===h){return r===a-1&&t[r]===""}else{throw new Error("wtf?")}}braceExpand(){return braceExpand(this.pattern,this.options)}parse(t){assertValidPattern(t);const e=this.options;if(t==="**")return mt;if(t==="")return"";let s;let i=null;if(s=t.match(ct)){i=e.dot?starTestDot:starTest}else if(s=t.match(at)){i=(e.nocase?e.dot?starDotExtTestNocaseDot:starDotExtTestNocase:e.dot?starDotExtTestDot:starDotExtTest)(s[1])}else if(s=t.match(ut)){i=(e.nocase?e.dot?qmarksTestNocaseDot:qmarksTestNocase:e.dot?qmarksTestDot:qmarksTest)(s)}else if(s=t.match(ht)){i=e.dot?starDotStarTestDot:starDotStarTest}else if(s=t.match(lt)){i=dotStarTest}const n=AST.fromGlob(t,this.options).toMMPattern();if(i&&typeof n==="object"){Reflect.defineProperty(n,"test",{value:i})}return n}makeRe(){if(this.regexp||this.regexp===false)return this.regexp;const t=this.set;if(!t.length){this.regexp=false;return this.regexp}const e=this.options;const s=e.noglobstar?yt:e.dot?wt:bt;const i=new Set(e.nocase?["i"]:[]);let n=t.map((t=>{const e=t.map((t=>{if(t instanceof RegExp){for(const e of t.flags.split(""))i.add(e)}return typeof t==="string"?esm_regExpEscape(t):t===mt?mt:t._src}));e.forEach(((t,i)=>{const n=e[i+1];const r=e[i-1];if(t!==mt||r===mt){return}if(r===undefined){if(n!==undefined&&n!==mt){e[i+1]="(?:\\/|"+s+"\\/)?"+n}else{e[i]=s}}else if(n===undefined){e[i-1]=r+"(?:\\/|"+s+")?"}else if(n!==mt){e[i-1]=r+"(?:\\/|\\/"+s+"\\/)"+n;e[i+1]=mt}}));return e.filter((t=>t!==mt)).join("/")})).join("|");const[r,o]=t.length>1?["(?:",")"]:["",""];n="^"+r+n+o+"$";if(this.negate)n="^(?!"+n+").+$";try{this.regexp=new RegExp(n,[...i].join(""))}catch(t){this.regexp=false}return this.regexp}slashSplit(t){if(this.preserveMultipleSlashes){return t.split("/")}else if(this.isWindows&&/^\/\/[^\/]+/.test(t)){return["",...t.split(/\/+/)]}else{return t.split(/\/+/)}}match(t,e=this.partial){this.debug("match",t,this.pattern);if(this.comment){return false}if(this.empty){return t===""}if(t==="/"&&e){return true}const s=this.options;if(this.isWindows){t=t.split("\\").join("/")}const i=this.slashSplit(t);this.debug(this.pattern,"split",i);const n=this.set;this.debug(this.pattern,"set",n);let r=i[i.length-1];if(!r){for(let t=i.length-2;!r&&t>=0;t--){r=i[t]}}for(let t=0;t<n.length;t++){const o=n[t];let a=i;if(s.matchBase&&o.length===1){a=[r]}const h=this.matchOne(a,o,e);if(h){if(s.flipNegate){return true}return!this.negate}}if(s.flipNegate){return false}return this.negate}static defaults(t){return minimatch.defaults(t).Minimatch}}minimatch.AST=AST;minimatch.Minimatch=Minimatch;minimatch.escape=escape_escape;minimatch.unescape=unescape_unescape;const St=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date;const vt=new Set;const At=typeof process==="object"&&!!process?process:{};const emitWarning=(t,e,s,i)=>{typeof At.emitWarning==="function"?At.emitWarning(t,e,s,i):console.error(`[${s}] ${e}: ${t}`)};let xt=globalThis.AbortController;let kt=globalThis.AbortSignal;if(typeof xt==="undefined"){kt=class AbortSignal{onabort;_onabort=[];reason;aborted=false;addEventListener(t,e){this._onabort.push(e)}};xt=class AbortController{constructor(){warnACPolyfill()}signal=new kt;abort(t){if(this.signal.aborted)return;this.signal.reason=t;this.signal.aborted=true;for(const e of this.signal._onabort){e(t)}this.signal.onabort?.(t)}};let t=At.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1";const warnACPolyfill=()=>{if(!t)return;t=false;emitWarning("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",warnACPolyfill)}}const shouldWarn=t=>!vt.has(t);const Ct=Symbol("type");const isPosInt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t);const getUintArray=t=>!isPosInt(t)?null:t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?ZeroArray:null;class ZeroArray extends Array{constructor(t){super(t);this.fill(0)}}class Stack{heap;length;static#m=false;static create(t){const e=getUintArray(t);if(!e)return[];Stack.#m=true;const s=new Stack(t,e);Stack.#m=false;return s}constructor(t,e){if(!Stack.#m){throw new TypeError("instantiate Stack using Stack.create(n)")}this.heap=new e(t);this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class LRUCache{#g;#y;#w;#b;#_;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#S;#v;#A;#x;#k;#C;#O;#E;#T;#P;#M;#F;#L;#R;#$;#j;#N;static unsafeExposeInternals(t){return{starts:t.#L,ttls:t.#R,sizes:t.#F,keyMap:t.#A,keyList:t.#x,valList:t.#k,next:t.#C,prev:t.#O,get head(){return t.#E},get tail(){return t.#T},free:t.#P,isBackgroundFetch:e=>t.#I(e),backgroundFetch:(e,s,i,n)=>t.#D(e,s,i,n),moveToTail:e=>t.#B(e),indexes:e=>t.#z(e),rindexes:e=>t.#W(e),isStale:e=>t.#H(e)}}get max(){return this.#g}get maxSize(){return this.#y}get calculatedSize(){return this.#v}get size(){return this.#S}get fetchMethod(){return this.#_}get dispose(){return this.#w}get disposeAfter(){return this.#b}constructor(t){const{max:e=0,ttl:s,ttlResolution:i=1,ttlAutopurge:n,updateAgeOnGet:r,updateAgeOnHas:o,allowStale:a,dispose:h,disposeAfter:l,noDisposeOnSet:c,noUpdateTTL:u,maxSize:f=0,maxEntrySize:p=0,sizeCalculation:d,fetchMethod:g,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:_,ignoreFetchAbort:S}=t;if(e!==0&&!isPosInt(e)){throw new TypeError("max option must be a nonnegative integer")}const v=e?getUintArray(e):Array;if(!v){throw new Error("invalid max value: "+e)}this.#g=e;this.#y=f;this.maxEntrySize=p||this.#y;this.sizeCalculation=d;if(this.sizeCalculation){if(!this.#y&&!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(g!==undefined&&typeof g!=="function"){throw new TypeError("fetchMethod must be a function if specified")}this.#_=g;this.#j=!!g;this.#A=new Map;this.#x=new Array(e).fill(undefined);this.#k=new Array(e).fill(undefined);this.#C=new v(e);this.#O=new v(e);this.#E=0;this.#T=0;this.#P=Stack.create(e);this.#S=0;this.#v=0;if(typeof h==="function"){this.#w=h}if(typeof l==="function"){this.#b=l;this.#M=[]}else{this.#b=undefined;this.#M=undefined}this.#$=!!this.#w;this.#N=!!this.#b;this.noDisposeOnSet=!!c;this.noUpdateTTL=!!u;this.noDeleteOnFetchRejection=!!y;this.allowStaleOnFetchRejection=!!b;this.allowStaleOnFetchAbort=!!_;this.ignoreFetchAbort=!!S;if(this.maxEntrySize!==0){if(this.#y!==0){if(!isPosInt(this.#y)){throw new TypeError("maxSize must be a positive integer if specified")}}if(!isPosInt(this.maxEntrySize)){throw new TypeError("maxEntrySize must be a positive integer if specified")}this.#V()}this.allowStale=!!a;this.noDeleteOnStaleGet=!!w;this.updateAgeOnGet=!!r;this.updateAgeOnHas=!!o;this.ttlResolution=isPosInt(i)||i===0?i:1;this.ttlAutopurge=!!n;this.ttl=s||0;if(this.ttl){if(!isPosInt(this.ttl)){throw new TypeError("ttl must be a positive integer if specified")}this.#G()}if(this.#g===0&&this.ttl===0&&this.#y===0){throw new TypeError("At least one of max, maxSize, or ttl is required")}if(!this.ttlAutopurge&&!this.#g&&!this.#y){const t="LRU_CACHE_UNBOUNDED";if(shouldWarn(t)){vt.add(t);const e="TTL caching without ttlAutopurge, max, or maxSize can "+"result in unbounded memory consumption.";emitWarning(e,"UnboundedCacheWarning",t,LRUCache)}}}getRemainingTTL(t){return this.#A.has(t)?Infinity:0}#G(){const t=new ZeroArray(this.#g);const e=new ZeroArray(this.#g);this.#R=t;this.#L=e;this.#U=(s,i,n=St.now())=>{e[s]=i!==0?n:0;t[s]=i;if(i!==0&&this.ttlAutopurge){const t=setTimeout((()=>{if(this.#H(s)){this.delete(this.#x[s])}}),i+1);if(t.unref){t.unref()}}};this.#q=s=>{e[s]=t[s]!==0?St.now():0};this.#J=(i,n)=>{if(t[n]){const r=t[n];const o=e[n];if(!r||!o)return;i.ttl=r;i.start=o;i.now=s||getNow();const a=i.now-o;i.remainingTTL=r-a}};let s=0;const getNow=()=>{const t=St.now();if(this.ttlResolution>0){s=t;const e=setTimeout((()=>s=0),this.ttlResolution);if(e.unref){e.unref()}}return t};this.getRemainingTTL=i=>{const n=this.#A.get(i);if(n===undefined){return 0}const r=t[n];const o=e[n];if(!r||!o){return Infinity}const a=(s||getNow())-o;return r-a};this.#H=i=>{const n=e[i];const r=t[i];return!!r&&!!n&&(s||getNow())-n>r}}#q=()=>{};#J=()=>{};#U=()=>{};#H=()=>false;#V(){const t=new ZeroArray(this.#g);this.#v=0;this.#F=t;this.#Y=e=>{this.#v-=t[e];t[e]=0};this.#Z=(t,e,s,i)=>{if(this.#I(e)){return 0}if(!isPosInt(s)){if(i){if(typeof i!=="function"){throw new TypeError("sizeCalculation must be a function")}s=i(e,t);if(!isPosInt(s)){throw new TypeError("sizeCalculation return invalid (expect positive integer)")}}else{throw new TypeError("invalid size value (must be positive integer). "+"When maxSize or maxEntrySize is used, sizeCalculation "+"or size must be set.")}}return s};this.#K=(e,s,i)=>{t[e]=s;if(this.#y){const s=this.#y-t[e];while(this.#v>s){this.#X(true)}}this.#v+=t[e];if(i){i.entrySize=s;i.totalCalculatedSize=this.#v}}}#Y=t=>{};#K=(t,e,s)=>{};#Z=(t,e,s,i)=>{if(s||i){throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}return 0};*#z({allowStale:t=this.allowStale}={}){if(this.#S){for(let e=this.#T;true;){if(!this.#Q(e)){break}if(t||!this.#H(e)){yield e}if(e===this.#E){break}else{e=this.#O[e]}}}}*#W({allowStale:t=this.allowStale}={}){if(this.#S){for(let e=this.#E;true;){if(!this.#Q(e)){break}if(t||!this.#H(e)){yield e}if(e===this.#T){break}else{e=this.#C[e]}}}}#Q(t){return t!==undefined&&this.#A.get(this.#x[t])===t}*entries(){for(const t of this.#z()){if(this.#k[t]!==undefined&&this.#x[t]!==undefined&&!this.#I(this.#k[t])){yield[this.#x[t],this.#k[t]]}}}*rentries(){for(const t of this.#W()){if(this.#k[t]!==undefined&&this.#x[t]!==undefined&&!this.#I(this.#k[t])){yield[this.#x[t],this.#k[t]]}}}*keys(){for(const t of this.#z()){const e=this.#x[t];if(e!==undefined&&!this.#I(this.#k[t])){yield e}}}*rkeys(){for(const t of this.#W()){const e=this.#x[t];if(e!==undefined&&!this.#I(this.#k[t])){yield e}}}*values(){for(const t of this.#z()){const e=this.#k[t];if(e!==undefined&&!this.#I(this.#k[t])){yield this.#k[t]}}}*rvalues(){for(const t of this.#W()){const e=this.#k[t];if(e!==undefined&&!this.#I(this.#k[t])){yield this.#k[t]}}}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const s of this.#z()){const i=this.#k[s];const n=this.#I(i)?i.__staleWhileFetching:i;if(n===undefined)continue;if(t(n,this.#x[s],this)){return this.get(this.#x[s],e)}}}forEach(t,e=this){for(const s of this.#z()){const i=this.#k[s];const n=this.#I(i)?i.__staleWhileFetching:i;if(n===undefined)continue;t.call(e,n,this.#x[s],this)}}rforEach(t,e=this){for(const s of this.#W()){const i=this.#k[s];const n=this.#I(i)?i.__staleWhileFetching:i;if(n===undefined)continue;t.call(e,n,this.#x[s],this)}}purgeStale(){let t=false;for(const e of this.#W({allowStale:true})){if(this.#H(e)){this.delete(this.#x[e]);t=true}}return t}info(t){const e=this.#A.get(t);if(e===undefined)return undefined;const s=this.#k[e];const i=this.#I(s)?s.__staleWhileFetching:s;if(i===undefined)return undefined;const n={value:i};if(this.#R&&this.#L){const t=this.#R[e];const s=this.#L[e];if(t&&s){const e=t-(St.now()-s);n.ttl=e;n.start=Date.now()}}if(this.#F){n.size=this.#F[e]}return n}dump(){const t=[];for(const e of this.#z({allowStale:true})){const s=this.#x[e];const i=this.#k[e];const n=this.#I(i)?i.__staleWhileFetching:i;if(n===undefined||s===undefined)continue;const r={value:n};if(this.#R&&this.#L){r.ttl=this.#R[e];const t=St.now()-this.#L[e];r.start=Math.floor(Date.now()-t)}if(this.#F){r.size=this.#F[e]}t.unshift([s,r])}return t}load(t){this.clear();for(const[e,s]of t){if(s.start){const t=Date.now()-s.start;s.start=St.now()-t}this.set(e,s.value,s)}}set(t,e,s={}){if(e===undefined){this.delete(t);return this}const{ttl:i=this.ttl,start:n,noDisposeOnSet:r=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=s;let{noUpdateTTL:h=this.noUpdateTTL}=s;const l=this.#Z(t,e,s.size||0,o);if(this.maxEntrySize&&l>this.maxEntrySize){if(a){a.set="miss";a.maxEntrySizeExceeded=true}this.delete(t);return this}let c=this.#S===0?undefined:this.#A.get(t);if(c===undefined){c=this.#S===0?this.#T:this.#P.length!==0?this.#P.pop():this.#S===this.#g?this.#X(false):this.#S;this.#x[c]=t;this.#k[c]=e;this.#A.set(t,c);this.#C[this.#T]=c;this.#O[c]=this.#T;this.#T=c;this.#S++;this.#K(c,l,a);if(a)a.set="add";h=false}else{this.#B(c);const s=this.#k[c];if(e!==s){if(this.#j&&this.#I(s)){s.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:e}=s;if(e!==undefined&&!r){if(this.#$){this.#w?.(e,t,"set")}if(this.#N){this.#M?.push([e,t,"set"])}}}else if(!r){if(this.#$){this.#w?.(s,t,"set")}if(this.#N){this.#M?.push([s,t,"set"])}}this.#Y(c);this.#K(c,l,a);this.#k[c]=e;if(a){a.set="replace";const t=s&&this.#I(s)?s.__staleWhileFetching:s;if(t!==undefined)a.oldValue=t}}else if(a){a.set="update"}}if(i!==0&&!this.#R){this.#G()}if(this.#R){if(!h){this.#U(c,i,n)}if(a)this.#J(a,c)}if(!r&&this.#N&&this.#M){const t=this.#M;let e;while(e=t?.shift()){this.#b?.(...e)}}return this}pop(){try{while(this.#S){const t=this.#k[this.#E];this.#X(true);if(this.#I(t)){if(t.__staleWhileFetching){return t.__staleWhileFetching}}else if(t!==undefined){return t}}}finally{if(this.#N&&this.#M){const t=this.#M;let e;while(e=t?.shift()){this.#b?.(...e)}}}}#X(t){const e=this.#E;const s=this.#x[e];const i=this.#k[e];if(this.#j&&this.#I(i)){i.__abortController.abort(new Error("evicted"))}else if(this.#$||this.#N){if(this.#$){this.#w?.(i,s,"evict")}if(this.#N){this.#M?.push([i,s,"evict"])}}this.#Y(e);if(t){this.#x[e]=undefined;this.#k[e]=undefined;this.#P.push(e)}if(this.#S===1){this.#E=this.#T=0;this.#P.length=0}else{this.#E=this.#C[e]}this.#A.delete(s);this.#S--;return e}has(t,e={}){const{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e;const n=this.#A.get(t);if(n!==undefined){const t=this.#k[n];if(this.#I(t)&&t.__staleWhileFetching===undefined){return false}if(!this.#H(n)){if(s){this.#q(n)}if(i){i.has="hit";this.#J(i,n)}return true}else if(i){i.has="stale";this.#J(i,n)}}else if(i){i.has="miss"}return false}peek(t,e={}){const{allowStale:s=this.allowStale}=e;const i=this.#A.get(t);if(i===undefined||!s&&this.#H(i)){return}const n=this.#k[i];return this.#I(n)?n.__staleWhileFetching:n}#D(t,e,s,i){const n=e===undefined?undefined:this.#k[e];if(this.#I(n)){return n}const r=new xt;const{signal:o}=s;o?.addEventListener("abort",(()=>r.abort(o.reason)),{signal:r.signal});const a={signal:r.signal,options:s,context:i};const cb=(i,n=false)=>{const{aborted:o}=r.signal;const l=s.ignoreFetchAbort&&i!==undefined;if(s.status){if(o&&!n){s.status.fetchAborted=true;s.status.fetchError=r.signal.reason;if(l)s.status.fetchAbortIgnored=true}else{s.status.fetchResolved=true}}if(o&&!l&&!n){return fetchFail(r.signal.reason)}const c=h;if(this.#k[e]===h){if(i===undefined){if(c.__staleWhileFetching){this.#k[e]=c.__staleWhileFetching}else{this.delete(t)}}else{if(s.status)s.status.fetchUpdated=true;this.set(t,i,a.options)}}return i};const eb=t=>{if(s.status){s.status.fetchRejected=true;s.status.fetchError=t}return fetchFail(t)};const fetchFail=i=>{const{aborted:n}=r.signal;const o=n&&s.allowStaleOnFetchAbort;const a=o||s.allowStaleOnFetchRejection;const l=a||s.noDeleteOnFetchRejection;const c=h;if(this.#k[e]===h){const s=!l||c.__staleWhileFetching===undefined;if(s){this.delete(t)}else if(!o){this.#k[e]=c.__staleWhileFetching}}if(a){if(s.status&&c.__staleWhileFetching!==undefined){s.status.returnedStale=true}return c.__staleWhileFetching}else if(c.__returned===c){throw i}};const pcall=(e,i)=>{const o=this.#_?.(t,n,a);if(o&&o instanceof Promise){o.then((t=>e(t===undefined?undefined:t)),i)}r.signal.addEventListener("abort",(()=>{if(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort){e(undefined);if(s.allowStaleOnFetchAbort){e=t=>cb(t,true)}}}))};if(s.status)s.status.fetchDispatched=true;const h=new Promise(pcall).then(cb,eb);const l=Object.assign(h,{__abortController:r,__staleWhileFetching:n,__returned:undefined});if(e===undefined){this.set(t,l,{...a.options,status:undefined});e=this.#A.get(t)}else{this.#k[e]=l}return l}#I(t){if(!this.#j)return false;const e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof xt}async fetch(t,e={}){const{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:r=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:d,forceRefresh:g=false,status:y,signal:w}=e;if(!this.#j){if(y)y.fetch="get";return this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:n,status:y})}const b={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:n,ttl:r,noDisposeOnSet:o,size:a,sizeCalculation:h,noUpdateTTL:l,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:p,ignoreFetchAbort:f,status:y,signal:w};let _=this.#A.get(t);if(_===undefined){if(y)y.fetch="miss";const e=this.#D(t,_,b,d);return e.__returned=e}else{const e=this.#k[_];if(this.#I(e)){const t=s&&e.__staleWhileFetching!==undefined;if(y){y.fetch="inflight";if(t)y.returnedStale=true}return t?e.__staleWhileFetching:e.__returned=e}const n=this.#H(_);if(!g&&!n){if(y)y.fetch="hit";this.#B(_);if(i){this.#q(_)}if(y)this.#J(y,_);return e}const r=this.#D(t,_,b,d);const o=r.__staleWhileFetching!==undefined;const a=o&&s;if(y){y.fetch=n?"stale":"refresh";if(a&&n)y.returnedStale=true}return a?r.__staleWhileFetching:r.__returned=r}}get(t,e={}){const{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:r}=e;const o=this.#A.get(t);if(o!==undefined){const e=this.#k[o];const a=this.#I(e);if(r)this.#J(r,o);if(this.#H(o)){if(r)r.get="stale";if(!a){if(!n){this.delete(t)}if(r&&s)r.returnedStale=true;return s?e:undefined}else{if(r&&s&&e.__staleWhileFetching!==undefined){r.returnedStale=true}return s?e.__staleWhileFetching:undefined}}else{if(r)r.get="hit";if(a){return e.__staleWhileFetching}this.#B(o);if(i){this.#q(o)}return e}}else if(r){r.get="miss"}}#tt(t,e){this.#O[e]=t;this.#C[t]=e}#B(t){if(t!==this.#T){if(t===this.#E){this.#E=this.#C[t]}else{this.#tt(this.#O[t],this.#C[t])}this.#tt(this.#T,t);this.#T=t}}delete(t){let e=false;if(this.#S!==0){const s=this.#A.get(t);if(s!==undefined){e=true;if(this.#S===1){this.clear()}else{this.#Y(s);const e=this.#k[s];if(this.#I(e)){e.__abortController.abort(new Error("deleted"))}else if(this.#$||this.#N){if(this.#$){this.#w?.(e,t,"delete")}if(this.#N){this.#M?.push([e,t,"delete"])}}this.#A.delete(t);this.#x[s]=undefined;this.#k[s]=undefined;if(s===this.#T){this.#T=this.#O[s]}else if(s===this.#E){this.#E=this.#C[s]}else{const t=this.#O[s];this.#C[t]=this.#C[s];const e=this.#C[s];this.#O[e]=this.#O[s]}this.#S--;this.#P.push(s)}}}if(this.#N&&this.#M?.length){const t=this.#M;let e;while(e=t?.shift()){this.#b?.(...e)}}return e}clear(){for(const t of this.#W({allowStale:true})){const e=this.#k[t];if(this.#I(e)){e.__abortController.abort(new Error("deleted"))}else{const s=this.#x[t];if(this.#$){this.#w?.(e,s,"delete")}if(this.#N){this.#M?.push([e,s,"delete"])}}}this.#A.clear();this.#k.fill(undefined);this.#x.fill(undefined);if(this.#R&&this.#L){this.#R.fill(0);this.#L.fill(0)}if(this.#F){this.#F.fill(0)}this.#E=0;this.#T=0;this.#P.length=0;this.#v=0;this.#S=0;if(this.#N&&this.#M){const t=this.#M;let e;while(e=t?.shift()){this.#b?.(...e)}}}}var Ot=__nccwpck_require__(24);var Et=__nccwpck_require__.t(Ot,2);const Tt=t(import.meta.url)("node:fs/promises");var Pt=__nccwpck_require__.n(Tt);var Mt=__nccwpck_require__(474);const Ft=t(import.meta.url)("node:stream");const Lt=t(import.meta.url)("node:string_decoder");const Rt=typeof process==="object"&&process?process:{stdout:null,stderr:null};const isStream=t=>!!t&&typeof t==="object"&&(t instanceof Minipass||t instanceof Ft||isReadable(t)||isWritable(t));const isReadable=t=>!!t&&typeof t==="object"&&t instanceof Mt.EventEmitter&&typeof t.pipe==="function"&&t.pipe!==Ft.Writable.prototype.pipe;const isWritable=t=>!!t&&typeof t==="object"&&t instanceof Mt.EventEmitter&&typeof t.write==="function"&&typeof t.end==="function";const $t=Symbol("EOF");const jt=Symbol("maybeEmitEnd");const Nt=Symbol("emittedEnd");const It=Symbol("emittingEnd");const Dt=Symbol("emittedError");const Bt=Symbol("closed");const zt=Symbol("read");const Wt=Symbol("flush");const Ht=Symbol("flushChunk");const Vt=Symbol("encoding");const Gt=Symbol("decoder");const Ut=Symbol("flowing");const qt=Symbol("paused");const Jt=Symbol("resume");const Yt=Symbol("buffer");const Zt=Symbol("pipes");const Kt=Symbol("bufferLength");const Xt=Symbol("bufferPush");const Qt=Symbol("bufferShift");const te=Symbol("objectMode");const ee=Symbol("destroyed");const se=Symbol("error");const ie=Symbol("emitData");const ne=Symbol("emitEnd");const re=Symbol("emitEnd2");const oe=Symbol("async");const ae=Symbol("abort");const he=Symbol("aborted");const le=Symbol("signal");const ce=Symbol("dataListeners");const ue=Symbol("discarded");const defer=t=>Promise.resolve().then(t);const nodefer=t=>t();const isEndish=t=>t==="end"||t==="finish"||t==="prefinish";const isArrayBufferLike=t=>t instanceof ArrayBuffer||!!t&&typeof t==="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0;const isArrayBufferView=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t);class Pipe{src;dest;opts;ondrain;constructor(t,e,s){this.src=t;this.dest=e;this.opts=s;this.ondrain=()=>t[Jt]();this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe();if(this.opts.end)this.dest.end()}}class PipeProxyErrors extends Pipe{unpipe(){this.src.removeListener("error",this.proxyErrors);super.unpipe()}constructor(t,e,s){super(t,e,s);this.proxyErrors=t=>e.emit("error",t);t.on("error",this.proxyErrors)}}const isObjectModeOptions=t=>!!t.objectMode;const isEncodingOptions=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer";class Minipass extends Mt.EventEmitter{[Ut]=false;[qt]=false;[Zt]=[];[Yt]=[];[te];[Vt];[oe];[Gt];[$t]=false;[Nt]=false;[It]=false;[Bt]=false;[Dt]=null;[Kt]=0;[ee]=false;[le];[he]=false;[ce]=0;[ue]=false;writable=true;readable=true;constructor(...t){const e=t[0]||{};super();if(e.objectMode&&typeof e.encoding==="string"){throw new TypeError("Encoding and objectMode may not be used together")}if(isObjectModeOptions(e)){this[te]=true;this[Vt]=null}else if(isEncodingOptions(e)){this[Vt]=e.encoding;this[te]=false}else{this[te]=false;this[Vt]=null}this[oe]=!!e.async;this[Gt]=this[Vt]?new Lt.StringDecoder(this[Vt]):null;if(e&&e.debugExposeBuffer===true){Object.defineProperty(this,"buffer",{get:()=>this[Yt]})}if(e&&e.debugExposePipes===true){Object.defineProperty(this,"pipes",{get:()=>this[Zt]})}const{signal:s}=e;if(s){this[le]=s;if(s.aborted){this[ae]()}else{s.addEventListener("abort",(()=>this[ae]()))}}}get bufferLength(){return this[Kt]}get encoding(){return this[Vt]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[te]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get["async"](){return this[oe]}set["async"](t){this[oe]=this[oe]||!!t}[ae](){this[he]=true;this.emit("abort",this[le]?.reason);this.destroy(this[le]?.reason)}get aborted(){return this[he]}set aborted(t){}write(t,e,s){if(this[he])return false;if(this[$t])throw new Error("write after end");if(this[ee]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof e==="function"){s=e;e="utf8"}if(!e)e="utf8";const i=this[oe]?defer:nodefer;if(!this[te]&&!Buffer.isBuffer(t)){if(isArrayBufferView(t)){t=Buffer.from(t.buffer,t.byteOffset,t.byteLength)}else if(isArrayBufferLike(t)){t=Buffer.from(t)}else if(typeof t!=="string"){throw new Error("Non-contiguous data written to non-objectMode stream")}}if(this[te]){if(this[Ut]&&this[Kt]!==0)this[Wt](true);if(this[Ut])this.emit("data",t);else this[Xt](t);if(this[Kt]!==0)this.emit("readable");if(s)i(s);return this[Ut]}if(!t.length){if(this[Kt]!==0)this.emit("readable");if(s)i(s);return this[Ut]}if(typeof t==="string"&&!(e===this[Vt]&&!this[Gt]?.lastNeed)){t=Buffer.from(t,e)}if(Buffer.isBuffer(t)&&this[Vt]){t=this[Gt].write(t)}if(this[Ut]&&this[Kt]!==0)this[Wt](true);if(this[Ut])this.emit("data",t);else this[Xt](t);if(this[Kt]!==0)this.emit("readable");if(s)i(s);return this[Ut]}read(t){if(this[ee])return null;this[ue]=false;if(this[Kt]===0||t===0||t&&t>this[Kt]){this[jt]();return null}if(this[te])t=null;if(this[Yt].length>1&&!this[te]){this[Yt]=[this[Vt]?this[Yt].join(""):Buffer.concat(this[Yt],this[Kt])]}const e=this[zt](t||null,this[Yt][0]);this[jt]();return e}[zt](t,e){if(this[te])this[Qt]();else{const s=e;if(t===s.length||t===null)this[Qt]();else if(typeof s==="string"){this[Yt][0]=s.slice(t);e=s.slice(0,t);this[Kt]-=t}else{this[Yt][0]=s.subarray(t);e=s.subarray(0,t);this[Kt]-=t}}this.emit("data",e);if(!this[Yt].length&&!this[$t])this.emit("drain");return e}end(t,e,s){if(typeof t==="function"){s=t;t=undefined}if(typeof e==="function"){s=e;e="utf8"}if(t!==undefined)this.write(t,e);if(s)this.once("end",s);this[$t]=true;this.writable=false;if(this[Ut]||!this[qt])this[jt]();return this}[Jt](){if(this[ee])return;if(!this[ce]&&!this[Zt].length){this[ue]=true}this[qt]=false;this[Ut]=true;this.emit("resume");if(this[Yt].length)this[Wt]();else if(this[$t])this[jt]();else this.emit("drain")}resume(){return this[Jt]()}pause(){this[Ut]=false;this[qt]=true;this[ue]=false}get destroyed(){return this[ee]}get flowing(){return this[Ut]}get paused(){return this[qt]}[Xt](t){if(this[te])this[Kt]+=1;else this[Kt]+=t.length;this[Yt].push(t)}[Qt](){if(this[te])this[Kt]-=1;else this[Kt]-=this[Yt][0].length;return this[Yt].shift()}[Wt](t=false){do{}while(this[Ht](this[Qt]())&&this[Yt].length);if(!t&&!this[Yt].length&&!this[$t])this.emit("drain")}[Ht](t){this.emit("data",t);return this[Ut]}pipe(t,e){if(this[ee])return t;this[ue]=false;const s=this[Nt];e=e||{};if(t===Rt.stdout||t===Rt.stderr)e.end=false;else e.end=e.end!==false;e.proxyErrors=!!e.proxyErrors;if(s){if(e.end)t.end()}else{this[Zt].push(!e.proxyErrors?new Pipe(this,t,e):new PipeProxyErrors(this,t,e));if(this[oe])defer((()=>this[Jt]()));else this[Jt]()}return t}unpipe(t){const e=this[Zt].find((e=>e.dest===t));if(e){if(this[Zt].length===1){if(this[Ut]&&this[ce]===0){this[Ut]=false}this[Zt]=[]}else this[Zt].splice(this[Zt].indexOf(e),1);e.unpipe()}}addListener(t,e){return this.on(t,e)}on(t,e){const s=super.on(t,e);if(t==="data"){this[ue]=false;this[ce]++;if(!this[Zt].length&&!this[Ut]){this[Jt]()}}else if(t==="readable"&&this[Kt]!==0){super.emit("readable")}else if(isEndish(t)&&this[Nt]){super.emit(t);this.removeAllListeners(t)}else if(t==="error"&&this[Dt]){const t=e;if(this[oe])defer((()=>t.call(this,this[Dt])));else t.call(this,this[Dt])}return s}removeListener(t,e){return this.off(t,e)}off(t,e){const s=super.off(t,e);if(t==="data"){this[ce]=this.listeners("data").length;if(this[ce]===0&&!this[ue]&&!this[Zt].length){this[Ut]=false}}return s}removeAllListeners(t){const e=super.removeAllListeners(t);if(t==="data"||t===undefined){this[ce]=0;if(!this[ue]&&!this[Zt].length){this[Ut]=false}}return e}get emittedEnd(){return this[Nt]}[jt](){if(!this[It]&&!this[Nt]&&!this[ee]&&this[Yt].length===0&&this[$t]){this[It]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[Bt])this.emit("close");this[It]=false}}emit(t,...e){const s=e[0];if(t!=="error"&&t!=="close"&&t!==ee&&this[ee]){return false}else if(t==="data"){return!this[te]&&!s?false:this[oe]?(defer((()=>this[ie](s))),true):this[ie](s)}else if(t==="end"){return this[ne]()}else if(t==="close"){this[Bt]=true;if(!this[Nt]&&!this[ee])return false;const t=super.emit("close");this.removeAllListeners("close");return t}else if(t==="error"){this[Dt]=s;super.emit(se,s);const t=!this[le]||this.listeners("error").length?super.emit("error",s):false;this[jt]();return t}else if(t==="resume"){const t=super.emit("resume");this[jt]();return t}else if(t==="finish"||t==="prefinish"){const e=super.emit(t);this.removeAllListeners(t);return e}const i=super.emit(t,...e);this[jt]();return i}[ie](t){for(const e of this[Zt]){if(e.dest.write(t)===false)this.pause()}const e=this[ue]?false:super.emit("data",t);this[jt]();return e}[ne](){if(this[Nt])return false;this[Nt]=true;this.readable=false;return this[oe]?(defer((()=>this[re]())),true):this[re]()}[re](){if(this[Gt]){const t=this[Gt].end();if(t){for(const e of this[Zt]){e.dest.write(t)}if(!this[ue])super.emit("data",t)}}for(const t of this[Zt]){t.end()}const t=super.emit("end");this.removeAllListeners("end");return t}async collect(){const t=Object.assign([],{dataLength:0});if(!this[te])t.dataLength=0;const e=this.promise();this.on("data",(e=>{t.push(e);if(!this[te])t.dataLength+=e.length}));await e;return t}async concat(){if(this[te]){throw new Error("cannot concat in objectMode")}const t=await this.collect();return this[Vt]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise(((t,e)=>{this.on(ee,(()=>e(new Error("stream destroyed"))));this.on("error",(t=>e(t)));this.on("end",(()=>t()))}))}[Symbol.asyncIterator](){this[ue]=false;let t=false;const stop=async()=>{this.pause();t=true;return{value:undefined,done:true}};const next=()=>{if(t)return stop();const e=this.read();if(e!==null)return Promise.resolve({done:false,value:e});if(this[$t])return stop();let s;let i;const onerr=t=>{this.off("data",ondata);this.off("end",onend);this.off(ee,ondestroy);stop();i(t)};const ondata=t=>{this.off("error",onerr);this.off("end",onend);this.off(ee,ondestroy);this.pause();s({value:t,done:!!this[$t]})};const onend=()=>{this.off("error",onerr);this.off("data",ondata);this.off(ee,ondestroy);stop();s({done:true,value:undefined})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((t,e)=>{i=e;s=t;this.once(ee,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next,throw:stop,return:stop,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[ue]=false;let t=false;const stop=()=>{this.pause();this.off(se,stop);this.off(ee,stop);this.off("end",stop);t=true;return{done:true,value:undefined}};const next=()=>{if(t)return stop();const e=this.read();return e===null?stop():{done:false,value:e}};this.once("end",stop);this.once(se,stop);this.once(ee,stop);return{next:next,throw:stop,return:stop,[Symbol.iterator](){return this}}}destroy(t){if(this[ee]){if(t)this.emit("error",t);else this.emit(ee);return this}this[ee]=true;this[ue]=true;this[Yt].length=0;this[Kt]=0;const e=this;if(typeof e.close==="function"&&!this[Bt])e.close();if(t)this.emit("error",t);else this.emit(ee);return this}static get isStream(){return isStream}}const fe=q.realpathSync.native;const pe={lstatSync:q.lstatSync,readdir:q.readdir,readdirSync:q.readdirSync,readlinkSync:q.readlinkSync,realpathSync:fe,promises:{lstat:Tt.lstat,readdir:Tt.readdir,readlink:Tt.readlink,realpath:Tt.realpath}};const fsFromOption=t=>!t||t===pe||t===Et?pe:{...pe,...t,promises:{...pe.promises,...t.promises||{}}};const de=/^\\\\\?\\([a-z]:)\\?$/i;const uncToDrive=t=>t.replace(/\//g,"\\").replace(de,"$1\\");const me=/[\\\/]/;const ge=0;const ye=1;const we=2;const be=4;const _e=6;const Se=8;const ve=10;const Ae=12;const xe=15;const ke=~xe;const Ce=16;const Oe=32;const Ee=64;const Te=128;const Pe=256;const Me=512;const Fe=Ee|Te|Me;const Le=1023;const entToType=t=>t.isFile()?Se:t.isDirectory()?be:t.isSymbolicLink()?ve:t.isCharacterDevice()?we:t.isBlockDevice()?_e:t.isSocket()?Ae:t.isFIFO()?ye:ge;const Re=new Map;const normalize=t=>{const e=Re.get(t);if(e)return e;const s=t.normalize("NFKD");Re.set(t,s);return s};const $e=new Map;const normalizeNocase=t=>{const e=$e.get(t);if(e)return e;const s=normalize(t.toLowerCase());$e.set(t,s);return s};class ResolveCache extends LRUCache{constructor(){super({max:256})}}class ChildrenCache extends LRUCache{constructor(t=16*1024){super({maxSize:t,sizeCalculation:t=>t.length+1})}}const je=Symbol("PathScurry setAsCwd");class PathBase{name;root;roots;parent;nocase;isCWD=false;#et;#st;get dev(){return this.#st}#it;get mode(){return this.#it}#nt;get nlink(){return this.#nt}#rt;get uid(){return this.#rt}#ot;get gid(){return this.#ot}#at;get rdev(){return this.#at}#ht;get blksize(){return this.#ht}#lt;get ino(){return this.#lt}#S;get size(){return this.#S}#ct;get blocks(){return this.#ct}#ut;get atimeMs(){return this.#ut}#ft;get mtimeMs(){return this.#ft}#pt;get ctimeMs(){return this.#pt}#dt;get birthtimeMs(){return this.#dt}#mt;get atime(){return this.#mt}#gt;get mtime(){return this.#gt}#yt;get ctime(){return this.#yt}#wt;get birthtime(){return this.#wt}#bt;#_t;#St;#vt;#At;#xt;#kt;#Ct;#Ot;#Et;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=ge,s,i,n,r,o){this.name=t;this.#bt=n?normalizeNocase(t):normalize(t);this.#kt=e&Le;this.nocase=n;this.roots=i;this.root=s||this;this.#Ct=r;this.#St=o.fullpath;this.#At=o.relative;this.#xt=o.relativePosix;this.parent=o.parent;if(this.parent){this.#et=this.parent.#et}else{this.#et=fsFromOption(o.fs)}}depth(){if(this.#_t!==undefined)return this.#_t;if(!this.parent)return this.#_t=0;return this.#_t=this.parent.depth()+1}childrenCache(){return this.#Ct}resolve(t){if(!t){return this}const e=this.getRootString(t);const s=t.substring(e.length);const i=s.split(this.splitSep);const n=e?this.getRoot(e).#Tt(i):this.#Tt(i);return n}#Tt(t){let e=this;for(const s of t){e=e.child(s)}return e}children(){const t=this.#Ct.get(this);if(t){return t}const e=Object.assign([],{provisional:0});this.#Ct.set(this,e);this.#kt&=~Ce;return e}child(t,e){if(t===""||t==="."){return this}if(t===".."){return this.parent||this}const s=this.children();const i=this.nocase?normalizeNocase(t):normalize(t);for(const t of s){if(t.#bt===i){return t}}const n=this.parent?this.sep:"";const r=this.#St?this.#St+n+t:undefined;const o=this.newChild(t,ge,{...e,parent:this,fullpath:r});if(!this.canReaddir()){o.#kt|=Te}s.push(o);return o}relative(){if(this.isCWD)return"";if(this.#At!==undefined){return this.#At}const t=this.name;const e=this.parent;if(!e){return this.#At=this.name}const s=e.relative();return s+(!s||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#xt!==undefined)return this.#xt;const t=this.name;const e=this.parent;if(!e){return this.#xt=this.fullpathPosix()}const s=e.relativePosix();return s+(!s||!e.parent?"":"/")+t}fullpath(){if(this.#St!==undefined){return this.#St}const t=this.name;const e=this.parent;if(!e){return this.#St=this.name}const s=e.fullpath();const i=s+(!e.parent?"":this.sep)+t;return this.#St=i}fullpathPosix(){if(this.#vt!==undefined)return this.#vt;if(this.sep==="/")return this.#vt=this.fullpath();if(!this.parent){const t=this.fullpath().replace(/\\/g,"/");if(/^[a-z]:\//i.test(t)){return this.#vt=`//?/${t}`}else{return this.#vt=t}}const t=this.parent;const e=t.fullpathPosix();const s=e+(!e||!t.parent?"":"/")+this.name;return this.#vt=s}isUnknown(){return(this.#kt&xe)===ge}isType(t){return this[`is${t}`]()}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.#kt&xe)===Se}isDirectory(){return(this.#kt&xe)===be}isCharacterDevice(){return(this.#kt&xe)===we}isBlockDevice(){return(this.#kt&xe)===_e}isFIFO(){return(this.#kt&xe)===ye}isSocket(){return(this.#kt&xe)===Ae}isSymbolicLink(){return(this.#kt&ve)===ve}lstatCached(){return this.#kt&Oe?this:undefined}readlinkCached(){return this.#Ot}realpathCached(){return this.#Et}readdirCached(){const t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#Ot)return true;if(!this.parent)return false;const t=this.#kt&xe;return!(t!==ge&&t!==ve||this.#kt&Pe||this.#kt&Te)}calledReaddir(){return!!(this.#kt&Ce)}isENOENT(){return!!(this.#kt&Te)}isNamed(t){return!this.nocase?this.#bt===normalize(t):this.#bt===normalizeNocase(t)}async readlink(){const t=this.#Ot;if(t){return t}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const t=await this.#et.promises.readlink(this.fullpath());const e=(await this.parent.realpath())?.resolve(t);if(e){return this.#Ot=e}}catch(t){this.#Pt(t.code);return undefined}}readlinkSync(){const t=this.#Ot;if(t){return t}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const t=this.#et.readlinkSync(this.fullpath());const e=this.parent.realpathSync()?.resolve(t);if(e){return this.#Ot=e}}catch(t){this.#Pt(t.code);return undefined}}#Mt(t){this.#kt|=Ce;for(let e=t.provisional;e<t.length;e++){const s=t[e];if(s)s.#Ft()}}#Ft(){if(this.#kt&Te)return;this.#kt=(this.#kt|Te)&ke;this.#Lt()}#Lt(){const t=this.children();t.provisional=0;for(const e of t){e.#Ft()}}#Rt(){this.#kt|=Me;this.#$t()}#$t(){if(this.#kt&Ee)return;let t=this.#kt;if((t&xe)===be)t&=ke;this.#kt=t|Ee;this.#Lt()}#jt(t=""){if(t==="ENOTDIR"||t==="EPERM"){this.#$t()}else if(t==="ENOENT"){this.#Ft()}else{this.children().provisional=0}}#Nt(t=""){if(t==="ENOTDIR"){const t=this.parent;t.#$t()}else if(t==="ENOENT"){this.#Ft()}}#Pt(t=""){let e=this.#kt;e|=Pe;if(t==="ENOENT")e|=Te;if(t==="EINVAL"||t==="UNKNOWN"){e&=ke}this.#kt=e;if(t==="ENOTDIR"&&this.parent){this.parent.#$t()}}#It(t,e){return this.#Dt(t,e)||this.#Bt(t,e)}#Bt(t,e){const s=entToType(t);const i=this.newChild(t.name,s,{parent:this});const n=i.#kt&xe;if(n!==be&&n!==ve&&n!==ge){i.#kt|=Ee}e.unshift(i);e.provisional++;return i}#Dt(t,e){for(let s=e.provisional;s<e.length;s++){const i=e[s];const n=this.nocase?normalizeNocase(t.name):normalize(t.name);if(n!==i.#bt){continue}return this.#zt(t,i,s,e)}}#zt(t,e,s,i){const n=e.name;e.#kt=e.#kt&ke|entToType(t);if(n!==t.name)e.name=t.name;if(s!==i.provisional){if(s===i.length-1)i.pop();else i.splice(s,1);i.unshift(e)}i.provisional++;return e}async lstat(){if((this.#kt&Te)===0){try{this.#Wt(await this.#et.promises.lstat(this.fullpath()));return this}catch(t){this.#Nt(t.code)}}}lstatSync(){if((this.#kt&Te)===0){try{this.#Wt(this.#et.lstatSync(this.fullpath()));return this}catch(t){this.#Nt(t.code)}}}#Wt(t){const{atime:e,atimeMs:s,birthtime:i,birthtimeMs:n,blksize:r,blocks:o,ctime:a,ctimeMs:h,dev:l,gid:c,ino:u,mode:f,mtime:p,mtimeMs:d,nlink:g,rdev:y,size:w,uid:b}=t;this.#mt=e;this.#ut=s;this.#wt=i;this.#dt=n;this.#ht=r;this.#ct=o;this.#yt=a;this.#pt=h;this.#st=l;this.#ot=c;this.#lt=u;this.#it=f;this.#gt=p;this.#ft=d;this.#nt=g;this.#at=y;this.#S=w;this.#rt=b;const _=entToType(t);this.#kt=this.#kt&ke|_|Oe;if(_!==ge&&_!==be&&_!==ve){this.#kt|=Ee}}#Ht=[];#Vt=false;#Gt(t){this.#Vt=false;const e=this.#Ht.slice();this.#Ht.length=0;e.forEach((e=>e(null,t)))}readdirCB(t,e=false){if(!this.canReaddir()){if(e)t(null,[]);else queueMicrotask((()=>t(null,[])));return}const s=this.children();if(this.calledReaddir()){const i=s.slice(0,s.provisional);if(e)t(null,i);else queueMicrotask((()=>t(null,i)));return}this.#Ht.push(t);if(this.#Vt){return}this.#Vt=true;const i=this.fullpath();this.#et.readdir(i,{withFileTypes:true},((t,e)=>{if(t){this.#jt(t.code);s.provisional=0}else{for(const t of e){this.#It(t,s)}this.#Mt(s)}this.#Gt(s.slice(0,s.provisional));return}))}#Ut;async readdir(){if(!this.canReaddir()){return[]}const t=this.children();if(this.calledReaddir()){return t.slice(0,t.provisional)}const e=this.fullpath();if(this.#Ut){await this.#Ut}else{let resolve=()=>{};this.#Ut=new Promise((t=>resolve=t));try{for(const s of await this.#et.promises.readdir(e,{withFileTypes:true})){this.#It(s,t)}this.#Mt(t)}catch(e){this.#jt(e.code);t.provisional=0}this.#Ut=undefined;resolve()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir()){return[]}const t=this.children();if(this.calledReaddir()){return t.slice(0,t.provisional)}const e=this.fullpath();try{for(const s of this.#et.readdirSync(e,{withFileTypes:true})){this.#It(s,t)}this.#Mt(t)}catch(e){this.#jt(e.code);t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#kt&Fe)return false;const t=xe&this.#kt;if(!(t===ge||t===be||t===ve)){return false}return true}shouldWalk(t,e){return(this.#kt&be)===be&&!(this.#kt&Fe)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#Et)return this.#Et;if((Me|Pe|Te)&this.#kt)return undefined;try{const t=await this.#et.promises.realpath(this.fullpath());return this.#Et=this.resolve(t)}catch(t){this.#Rt()}}realpathSync(){if(this.#Et)return this.#Et;if((Me|Pe|Te)&this.#kt)return undefined;try{const t=this.#et.realpathSync(this.fullpath());return this.#Et=this.resolve(t)}catch(t){this.#Rt()}}[je](t){if(t===this)return;t.isCWD=false;this.isCWD=true;const e=new Set([]);let s=[];let i=this;while(i&&i.parent){e.add(i);i.#At=s.join(this.sep);i.#xt=s.join("/");i=i.parent;s.push("..")}i=t;while(i&&i.parent&&!e.has(i)){i.#At=undefined;i.#xt=undefined;i=i.parent}}}class PathWin32 extends PathBase{sep="\\";splitSep=me;constructor(t,e=ge,s,i,n,r,o){super(t,e,s,i,n,r,o)}newChild(t,e=ge,s={}){return new PathWin32(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return G.win32.parse(t).root}getRoot(t){t=uncToDrive(t.toUpperCase());if(t===this.root.name){return this.root}for(const[e,s]of Object.entries(this.roots)){if(this.sameRoot(t,e)){return this.roots[t]=s}}return this.roots[t]=new PathScurryWin32(t,this).root}sameRoot(t,e=this.root.name){t=t.toUpperCase().replace(/\//g,"\\").replace(de,"$1\\");return t===e}}class PathPosix extends PathBase{splitSep="/";sep="/";constructor(t,e=ge,s,i,n,r,o){super(t,e,s,i,n,r,o)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=ge,s={}){return new PathPosix(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}}class PathScurryBase{root;rootPath;roots;cwd;#qt;#Jt;#Ct;nocase;#et;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16*1024,fs:o=pe}={}){this.#et=fsFromOption(o);if(t instanceof URL||t.startsWith("file://")){t=(0,n.fileURLToPath)(t)}const a=e.resolve(t);this.roots=Object.create(null);this.rootPath=this.parseRootPath(a);this.#qt=new ResolveCache;this.#Jt=new ResolveCache;this.#Ct=new ChildrenCache(r);const h=a.substring(this.rootPath.length).split(s);if(h.length===1&&!h[0]){h.pop()}if(i===undefined){throw new TypeError("must provide nocase setting to PathScurryBase ctor")}this.nocase=i;this.root=this.newRoot(this.#et);this.roots[this.rootPath]=this.root;let l=this.root;let c=h.length-1;const u=e.sep;let f=this.rootPath;let p=false;for(const t of h){const e=c--;l=l.child(t,{relative:new Array(e).fill("..").join(u),relativePosix:new Array(e).fill("..").join("/"),fullpath:f+=(p?"":u)+t});p=true}this.cwd=l}depth(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.depth()}childrenCache(){return this.#Ct}resolve(...t){let e="";for(let s=t.length-1;s>=0;s--){const i=t[s];if(!i||i===".")continue;e=e?`${i}/${e}`:i;if(this.isAbsolute(i)){break}}const s=this.#qt.get(e);if(s!==undefined){return s}const i=this.cwd.resolve(e).fullpath();this.#qt.set(e,i);return i}resolvePosix(...t){let e="";for(let s=t.length-1;s>=0;s--){const i=t[s];if(!i||i===".")continue;e=e?`${i}/${e}`:i;if(this.isAbsolute(i)){break}}const s=this.#Jt.get(e);if(s!==undefined){return s}const i=this.cwd.resolve(e).fullpathPosix();this.#Jt.set(e,i);return i}relative(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.relative()}relativePosix(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.relativePosix()}basename(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.name}dirname(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:true}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s}=e;if(!t.canReaddir()){return[]}else{const e=await t.readdir();return s?e:e.map((t=>t.name))}}readdirSync(t=this.cwd,e={withFileTypes:true}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true}=e;if(!t.canReaddir()){return[]}else if(s){return t.readdirSync()}else{return t.readdirSync().map((t=>t.name))}}async lstat(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.lstat()}lstatSync(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:n,walkFilter:r}=e;const o=[];if(!n||n(t)){o.push(s?t:t.fullpath())}const a=new Set;const walk=(t,e)=>{a.add(t);t.readdirCB(((t,h)=>{if(t){return e(t)}let l=h.length;if(!l)return e();const next=()=>{if(--l===0){e()}};for(const t of h){if(!n||n(t)){o.push(s?t:t.fullpath())}if(i&&t.isSymbolicLink()){t.realpath().then((t=>t?.isUnknown()?t.lstat():t)).then((t=>t?.shouldWalk(a,r)?walk(t,next):next()))}else{if(t.shouldWalk(a,r)){walk(t,next)}else{next()}}}}),true)};const h=t;return new Promise(((t,e)=>{walk(h,(s=>{if(s)return e(s);t(o)}))}))}walkSync(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:n,walkFilter:r}=e;const o=[];if(!n||n(t)){o.push(s?t:t.fullpath())}const a=new Set([t]);for(const t of a){const e=t.readdirSync();for(const t of e){if(!n||n(t)){o.push(s?t:t.fullpath())}let e=t;if(t.isSymbolicLink()){if(!(i&&(e=t.realpathSync())))continue;if(e.isUnknown())e.lstatSync()}if(e.shouldWalk(a,r)){a.add(e)}}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}return this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:n,walkFilter:r}=e;if(!n||n(t)){yield s?t:t.fullpath()}const o=new Set([t]);for(const t of o){const e=t.readdirSync();for(const t of e){if(!n||n(t)){yield s?t:t.fullpath()}let e=t;if(t.isSymbolicLink()){if(!(i&&(e=t.realpathSync())))continue;if(e.isUnknown())e.lstatSync()}if(e.shouldWalk(o,r)){o.add(e)}}}}stream(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:n,walkFilter:r}=e;const o=new Minipass({objectMode:true});if(!n||n(t)){o.write(s?t:t.fullpath())}const a=new Set;const h=[t];let l=0;const process=()=>{let t=false;while(!t){const e=h.shift();if(!e){if(l===0)o.end();return}l++;a.add(e);const onReaddir=(e,u,f=false)=>{if(e)return o.emit("error",e);if(i&&!f){const t=[];for(const e of u){if(e.isSymbolicLink()){t.push(e.realpath().then((t=>t?.isUnknown()?t.lstat():t)))}}if(t.length){Promise.all(t).then((()=>onReaddir(null,u,true)));return}}for(const e of u){if(e&&(!n||n(e))){if(!o.write(s?e:e.fullpath())){t=true}}}l--;for(const t of u){const e=t.realpathCached()||t;if(e.shouldWalk(a,r)){h.push(e)}}if(t&&!o.flowing){o.once("drain",process)}else if(!c){process()}};let c=true;e.readdirCB(onReaddir,true);c=false}};process();return o}streamSync(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:n,walkFilter:r}=e;const o=new Minipass({objectMode:true});const a=new Set;if(!n||n(t)){o.write(s?t:t.fullpath())}const h=[t];let l=0;const process=()=>{let t=false;while(!t){const e=h.shift();if(!e){if(l===0)o.end();return}l++;a.add(e);const c=e.readdirSync();for(const e of c){if(!n||n(e)){if(!o.write(s?e:e.fullpath())){t=true}}}l--;for(const t of c){let e=t;if(t.isSymbolicLink()){if(!(i&&(e=t.realpathSync())))continue;if(e.isUnknown())e.lstatSync()}if(e.shouldWalk(a,r)){h.push(e)}}}if(t&&!o.flowing)o.once("drain",process)};process();return o}chdir(t=this.cwd){const e=this.cwd;this.cwd=typeof t==="string"?this.cwd.resolve(t):t;this.cwd[je](e)}}class PathScurryWin32 extends PathScurryBase{sep="\\";constructor(t=process.cwd(),e={}){const{nocase:s=true}=e;super(t,G.win32,"\\",{...e,nocase:s});this.nocase=s;for(let t=this.cwd;t;t=t.parent){t.nocase=this.nocase}}parseRootPath(t){return G.win32.parse(t).root.toUpperCase()}newRoot(t){return new PathWin32(this.rootPath,be,undefined,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}}class PathScurryPosix extends PathScurryBase{sep="/";constructor(t=process.cwd(),e={}){const{nocase:s=false}=e;super(t,G.posix,"/",{...e,nocase:s});this.nocase=s}parseRootPath(t){return"/"}newRoot(t){return new PathPosix(this.rootPath,be,undefined,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}}class PathScurryDarwin extends PathScurryPosix{constructor(t=process.cwd(),e={}){const{nocase:s=true}=e;super(t,{...e,nocase:s})}}const Ne=process.platform==="win32"?PathWin32:PathPosix;const Ie=process.platform==="win32"?PathScurryWin32:process.platform==="darwin"?PathScurryDarwin:PathScurryPosix;const isPatternList=t=>t.length>=1;const isGlobList=t=>t.length>=1;class Pattern{#Yt;#Zt;#Kt;length;#Xt;#Qt;#te;#ee;#se;#ie;#ne=true;constructor(t,e,s,i){if(!isPatternList(t)){throw new TypeError("empty pattern list")}if(!isGlobList(e)){throw new TypeError("empty glob list")}if(e.length!==t.length){throw new TypeError("mismatched pattern list and glob list lengths")}this.length=t.length;if(s<0||s>=this.length){throw new TypeError("index out of range")}this.#Yt=t;this.#Zt=e;this.#Kt=s;this.#Xt=i;if(this.#Kt===0){if(this.isUNC()){const[t,e,s,i,...n]=this.#Yt;const[r,o,a,h,...l]=this.#Zt;if(n[0]===""){n.shift();l.shift()}const c=[t,e,s,i,""].join("/");const u=[r,o,a,h,""].join("/");this.#Yt=[c,...n];this.#Zt=[u,...l];this.length=this.#Yt.length}else if(this.isDrive()||this.isAbsolute()){const[t,...e]=this.#Yt;const[s,...i]=this.#Zt;if(e[0]===""){e.shift();i.shift()}const n=t+"/";const r=s+"/";this.#Yt=[n,...e];this.#Zt=[r,...i];this.length=this.#Yt.length}}}pattern(){return this.#Yt[this.#Kt]}isString(){return typeof this.#Yt[this.#Kt]==="string"}isGlobstar(){return this.#Yt[this.#Kt]===mt}isRegExp(){return this.#Yt[this.#Kt]instanceof RegExp}globString(){return this.#te=this.#te||(this.#Kt===0?this.isAbsolute()?this.#Zt[0]+this.#Zt.slice(1).join("/"):this.#Zt.join("/"):this.#Zt.slice(this.#Kt).join("/"))}hasMore(){return this.length>this.#Kt+1}rest(){if(this.#Qt!==undefined)return this.#Qt;if(!this.hasMore())return this.#Qt=null;this.#Qt=new Pattern(this.#Yt,this.#Zt,this.#Kt+1,this.#Xt);this.#Qt.#ie=this.#ie;this.#Qt.#se=this.#se;this.#Qt.#ee=this.#ee;return this.#Qt}isUNC(){const t=this.#Yt;return this.#se!==undefined?this.#se:this.#se=this.#Xt==="win32"&&this.#Kt===0&&t[0]===""&&t[1]===""&&typeof t[2]==="string"&&!!t[2]&&typeof t[3]==="string"&&!!t[3]}isDrive(){const t=this.#Yt;return this.#ee!==undefined?this.#ee:this.#ee=this.#Xt==="win32"&&this.#Kt===0&&this.length>1&&typeof t[0]==="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){const t=this.#Yt;return this.#ie!==undefined?this.#ie:this.#ie=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){const t=this.#Yt[0];return typeof t==="string"&&this.isAbsolute()&&this.#Kt===0?t:""}checkFollowGlobstar(){return!(this.#Kt===0||!this.isGlobstar()||!this.#ne)}markFollowGlobstar(){if(this.#Kt===0||!this.isGlobstar()||!this.#ne)return false;this.#ne=false;return true}}const De=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Ignore{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:s,noext:i,noglobstar:n,platform:r=De}){this.relative=[];this.absolute=[];this.relativeChildren=[];this.absoluteChildren=[];this.platform=r;this.mmopts={dot:true,nobrace:e,nocase:s,noext:i,noglobstar:n,optimizationLevel:2,platform:r,nocomment:true,nonegate:true};for(const e of t)this.add(e)}add(t){const e=new Minimatch(t,this.mmopts);for(let t=0;t<e.set.length;t++){const s=e.set[t];const i=e.globParts[t];if(!s||!i){throw new Error("invalid pattern object")}while(s[0]==="."&&i[0]==="."){s.shift();i.shift()}const n=new Pattern(s,i,0,this.platform);const r=new Minimatch(n.globString(),this.mmopts);const o=i[i.length-1]==="**";const a=n.isAbsolute();if(a)this.absolute.push(r);else this.relative.push(r);if(o){if(a)this.absoluteChildren.push(r);else this.relativeChildren.push(r)}}}ignored(t){const e=t.fullpath();const s=`${e}/`;const i=t.relative()||".";const n=`${i}/`;for(const t of this.relative){if(t.match(i)||t.match(n))return true}for(const t of this.absolute){if(t.match(e)||t.match(s))return true}return false}childrenIgnored(t){const e=t.fullpath()+"/";const s=(t.relative()||".")+"/";for(const t of this.relativeChildren){if(t.match(s))return true}for(const t of this.absoluteChildren){if(t.match(e))return true}return false}}class HasWalkedCache{store;constructor(t=new Map){this.store=t}copy(){return new HasWalkedCache(new Map(this.store))}hasWalked(t,e){return this.store.get(t.fullpath())?.has(e.globString())}storeWalked(t,e){const s=t.fullpath();const i=this.store.get(s);if(i)i.add(e.globString());else this.store.set(s,new Set([e.globString()]))}}class MatchRecord{store=new Map;add(t,e,s){const i=(e?2:0)|(s?1:0);const n=this.store.get(t);this.store.set(t,n===undefined?i:i&n)}entries(){return[...this.store.entries()].map((([t,e])=>[t,!!(e&2),!!(e&1)]))}}class SubWalks{store=new Map;add(t,e){if(!t.canReaddir()){return}const s=this.store.get(t);if(s){if(!s.find((t=>t.globString()===e.globString()))){s.push(e)}}else this.store.set(t,[e])}get(t){const e=this.store.get(t);if(!e){throw new Error("attempting to walk unknown path")}return e}entries(){return this.keys().map((t=>[t,this.store.get(t)]))}keys(){return[...this.store.keys()].filter((t=>t.canReaddir()))}}class Processor{hasWalkedCache;matches=new MatchRecord;subwalks=new SubWalks;patterns;follow;dot;opts;constructor(t,e){this.opts=t;this.follow=!!t.follow;this.dot=!!t.dot;this.hasWalkedCache=e?e.copy():new HasWalkedCache}processPatterns(t,e){this.patterns=e;const s=e.map((e=>[t,e]));for(let[t,e]of s){this.hasWalkedCache.storeWalked(t,e);const s=e.root();const i=e.isAbsolute()&&this.opts.absolute!==false;if(s){t=t.resolve(s==="/"&&this.opts.root!==undefined?this.opts.root:s);const i=e.rest();if(!i){this.matches.add(t,true,false);continue}else{e=i}}if(t.isENOENT())continue;let n;let r;let o=false;while(typeof(n=e.pattern())==="string"&&(r=e.rest())){const s=t.resolve(n);t=s;e=r;o=true}n=e.pattern();r=e.rest();if(o){if(this.hasWalkedCache.hasWalked(t,e))continue;this.hasWalkedCache.storeWalked(t,e)}if(typeof n==="string"){const e=n===".."||n===""||n===".";this.matches.add(t.resolve(n),i,e);continue}else if(n===mt){if(!t.isSymbolicLink()||this.follow||e.checkFollowGlobstar()){this.subwalks.add(t,e)}const s=r?.pattern();const n=r?.rest();if(!r||(s===""||s===".")&&!n){this.matches.add(t,i,s===""||s===".")}else{if(s===".."){const e=t.parent||t;if(!n)this.matches.add(e,i,true);else if(!this.hasWalkedCache.hasWalked(e,n)){this.subwalks.add(e,n)}}}}else if(n instanceof RegExp){this.subwalks.add(t,e)}}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new Processor(this.opts,this.hasWalkedCache)}filterEntries(t,e){const s=this.subwalks.get(t);const i=this.child();for(const t of e){for(const e of s){const s=e.isAbsolute();const n=e.pattern();const r=e.rest();if(n===mt){i.testGlobstar(t,e,r,s)}else if(n instanceof RegExp){i.testRegExp(t,n,r,s)}else{i.testString(t,n,r,s)}}}return i}testGlobstar(t,e,s,i){if(this.dot||!t.name.startsWith(".")){if(!e.hasMore()){this.matches.add(t,i,false)}if(t.canReaddir()){if(this.follow||!t.isSymbolicLink()){this.subwalks.add(t,e)}else if(t.isSymbolicLink()){if(s&&e.checkFollowGlobstar()){this.subwalks.add(t,s)}else if(e.markFollowGlobstar()){this.subwalks.add(t,e)}}}}if(s){const e=s.pattern();if(typeof e==="string"&&e!==".."&&e!==""&&e!=="."){this.testString(t,e,s.rest(),i)}else if(e===".."){const e=t.parent||t;this.subwalks.add(e,s)}else if(e instanceof RegExp){this.testRegExp(t,e,s.rest(),i)}}}testRegExp(t,e,s,i){if(!e.test(t.name))return;if(!s){this.matches.add(t,i,false)}else{this.subwalks.add(t,s)}}testString(t,e,s,i){if(!t.isNamed(e))return;if(!s){this.matches.add(t,i,false)}else{this.subwalks.add(t,s)}}}const makeIgnore=(t,e)=>typeof t==="string"?new Ignore([t],e):Array.isArray(t)?new Ignore(t,e):t;class GlobUtil{path;patterns;opts;seen=new Set;paused=false;aborted=false;#re=[];#oe;#ae;signal;maxDepth;includeChildMatches;constructor(t,e,s){this.patterns=t;this.path=e;this.opts=s;this.#ae=!s.posix&&s.platform==="win32"?"\\":"/";this.includeChildMatches=s.includeChildMatches!==false;if(s.ignore||!this.includeChildMatches){this.#oe=makeIgnore(s.ignore??[],s);if(!this.includeChildMatches&&typeof this.#oe.add!=="function"){const t="cannot ignore child matches, ignore lacks add() method.";throw new Error(t)}}this.maxDepth=s.maxDepth||Infinity;if(s.signal){this.signal=s.signal;this.signal.addEventListener("abort",(()=>{this.#re.length=0}))}}#he(t){return this.seen.has(t)||!!this.#oe?.ignored?.(t)}#le(t){return!!this.#oe?.childrenIgnored?.(t)}pause(){this.paused=true}resume(){if(this.signal?.aborted)return;this.paused=false;let t=undefined;while(!this.paused&&(t=this.#re.shift())){t()}}onResume(t){if(this.signal?.aborted)return;if(!this.paused){t()}else{this.#re.push(t)}}async matchCheck(t,e){if(e&&this.opts.nodir)return undefined;let s;if(this.opts.realpath){s=t.realpathCached()||await t.realpath();if(!s)return undefined;t=s}const i=t.isUnknown()||this.opts.stat;const n=i?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&n?.isSymbolicLink()){const t=await n.realpath();if(t&&(t.isUnknown()||this.opts.stat)){await t.lstat()}}return this.matchCheckTest(n,e)}matchCheckTest(t,e){return t&&(this.maxDepth===Infinity||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#he(t)?t:undefined}matchCheckSync(t,e){if(e&&this.opts.nodir)return undefined;let s;if(this.opts.realpath){s=t.realpathCached()||t.realpathSync();if(!s)return undefined;t=s}const i=t.isUnknown()||this.opts.stat;const n=i?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&n?.isSymbolicLink()){const t=n.realpathSync();if(t&&(t?.isUnknown()||this.opts.stat)){t.lstatSync()}}return this.matchCheckTest(n,e)}matchFinish(t,e){if(this.#he(t))return;if(!this.includeChildMatches&&this.#oe?.add){const e=`${t.relativePosix()}/**`;this.#oe.add(e)}const s=this.opts.absolute===undefined?e:this.opts.absolute;this.seen.add(t);const i=this.opts.mark&&t.isDirectory()?this.#ae:"";if(this.opts.withFileTypes){this.matchEmit(t)}else if(s){const e=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(e+i)}else{const e=this.opts.posix?t.relativePosix():t.relative();const s=this.opts.dotRelative&&!e.startsWith(".."+this.#ae)?"."+this.#ae:"";this.matchEmit(!e?"."+i:s+e+i)}}async match(t,e,s){const i=await this.matchCheck(t,s);if(i)this.matchFinish(i,e)}matchSync(t,e,s){const i=this.matchCheckSync(t,s);if(i)this.matchFinish(i,e)}walkCB(t,e,s){if(this.signal?.aborted)s();this.walkCB2(t,e,new Processor(this.opts),s)}walkCB2(t,e,s,i){if(this.#le(t))return i();if(this.signal?.aborted)i();if(this.paused){this.onResume((()=>this.walkCB2(t,e,s,i)));return}s.processPatterns(t,e);let n=1;const next=()=>{if(--n===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#he(t))continue;n++;this.match(t,e,i).then((()=>next()))}for(const t of s.subwalkTargets()){if(this.maxDepth!==Infinity&&t.depth()>=this.maxDepth){continue}n++;const e=t.readdirCached();if(t.calledReaddir())this.walkCB3(t,e,s,next);else{t.readdirCB(((e,i)=>this.walkCB3(t,i,s,next)),true)}}next()}walkCB3(t,e,s,i){s=s.filterEntries(t,e);let n=1;const next=()=>{if(--n===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#he(t))continue;n++;this.match(t,e,i).then((()=>next()))}for(const[t,e]of s.subwalks.entries()){n++;this.walkCB2(t,e,s.child(),next)}next()}walkCBSync(t,e,s){if(this.signal?.aborted)s();this.walkCB2Sync(t,e,new Processor(this.opts),s)}walkCB2Sync(t,e,s,i){if(this.#le(t))return i();if(this.signal?.aborted)i();if(this.paused){this.onResume((()=>this.walkCB2Sync(t,e,s,i)));return}s.processPatterns(t,e);let n=1;const next=()=>{if(--n===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#he(t))continue;this.matchSync(t,e,i)}for(const t of s.subwalkTargets()){if(this.maxDepth!==Infinity&&t.depth()>=this.maxDepth){continue}n++;const e=t.readdirSync();this.walkCB3Sync(t,e,s,next)}next()}walkCB3Sync(t,e,s,i){s=s.filterEntries(t,e);let n=1;const next=()=>{if(--n===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#he(t))continue;this.matchSync(t,e,i)}for(const[t,e]of s.subwalks.entries()){n++;this.walkCB2Sync(t,e,s.child(),next)}next()}}class GlobWalker extends GlobUtil{matches=new Set;constructor(t,e,s){super(t,e,s)}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){await this.path.lstat()}await new Promise(((t,e)=>{this.walkCB(this.path,this.patterns,(()=>{if(this.signal?.aborted){e(this.signal.reason)}else{t(this.matches)}}))}));return this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){this.path.lstatSync()}this.walkCBSync(this.path,this.patterns,(()=>{if(this.signal?.aborted)throw this.signal.reason}));return this.matches}}class GlobStream extends GlobUtil{results;constructor(t,e,s){super(t,e,s);this.results=new Minipass({signal:this.signal,objectMode:true});this.results.on("drain",(()=>this.resume()));this.results.on("resume",(()=>this.resume()))}matchEmit(t){this.results.write(t);if(!this.results.flowing)this.pause()}stream(){const t=this.path;if(t.isUnknown()){t.lstat().then((()=>{this.walkCB(t,this.patterns,(()=>this.results.end()))}))}else{this.walkCB(t,this.patterns,(()=>this.results.end()))}return this.results}streamSync(){if(this.path.isUnknown()){this.path.lstatSync()}this.walkCBSync(this.path,this.patterns,(()=>this.results.end()));return this.results}}const Be=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Glob{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(t,e){if(!e)throw new TypeError("glob options required");this.withFileTypes=!!e.withFileTypes;this.signal=e.signal;this.follow=!!e.follow;this.dot=!!e.dot;this.dotRelative=!!e.dotRelative;this.nodir=!!e.nodir;this.mark=!!e.mark;if(!e.cwd){this.cwd=""}else if(e.cwd instanceof URL||e.cwd.startsWith("file://")){e.cwd=(0,n.fileURLToPath)(e.cwd)}this.cwd=e.cwd||"";this.root=e.root;this.magicalBraces=!!e.magicalBraces;this.nobrace=!!e.nobrace;this.noext=!!e.noext;this.realpath=!!e.realpath;this.absolute=e.absolute;this.includeChildMatches=e.includeChildMatches!==false;this.noglobstar=!!e.noglobstar;this.matchBase=!!e.matchBase;this.maxDepth=typeof e.maxDepth==="number"?e.maxDepth:Infinity;this.stat=!!e.stat;this.ignore=e.ignore;if(this.withFileTypes&&this.absolute!==undefined){throw new Error("cannot set absolute and withFileTypes:true")}if(typeof t==="string"){t=[t]}this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===false;if(this.windowsPathsNoEscape){t=t.map((t=>t.replace(/\\/g,"/")))}if(this.matchBase){if(e.noglobstar){throw new TypeError("base matching requires globstar")}t=t.map((t=>t.includes("/")?t:`./**/${t}`))}this.pattern=t;this.platform=e.platform||Be;this.opts={...e,platform:this.platform};if(e.scurry){this.scurry=e.scurry;if(e.nocase!==undefined&&e.nocase!==e.scurry.nocase){throw new Error("nocase option contradicts provided scurry option")}}else{const t=e.platform==="win32"?PathScurryWin32:e.platform==="darwin"?PathScurryDarwin:e.platform?PathScurryPosix:Ie;this.scurry=new t(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;const s=this.platform==="darwin"||this.platform==="win32";const i={...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:true,noext:this.noext,nonegate:true,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug};const r=this.pattern.map((t=>new Minimatch(t,i)));const[o,a]=r.reduce(((t,e)=>{t[0].push(...e.set);t[1].push(...e.globParts);return t}),[[],[]]);this.patterns=o.map(((t,e)=>{const s=a[e];if(!s)throw new Error("invalid pattern object");return new Pattern(t,s,0,this.platform)}))}async walk(){return[...await new GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,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()}}const hasMagic=(t,e={})=>{if(!Array.isArray(t)){t=[t]}for(const s of t){if(new Minimatch(s,e).hasMagic())return true}return false};function globStreamSync(t,e={}){return new Glob(t,e).streamSync()}function globStream(t,e={}){return new Glob(t,e).stream()}function globSync(t,e={}){return new Glob(t,e).walkSync()}async function glob_(t,e={}){return new Glob(t,e).walk()}function globIterateSync(t,e={}){return new Glob(t,e).iterateSync()}function globIterate(t,e={}){return new Glob(t,e).iterate()}const ze=globStreamSync;const We=Object.assign(globStream,{sync:globStreamSync});const He=globIterateSync;const Ve=Object.assign(globIterate,{sync:globIterateSync});const Ge=Object.assign(globSync,{stream:globStreamSync,iterate:globIterateSync});const Ue=Object.assign(glob_,{glob:glob_,globSync:globSync,sync:Ge,globStream:globStream,stream:We,globStreamSync:globStreamSync,streamSync:ze,globIterate:globIterate,iterate:Ve,globIterateSync:globIterateSync,iterateSync:He,Glob:Glob,hasMagic:hasMagic,escape:escape_escape,unescape:unescape_unescape});Ue.glob=Ue;const qe=undefined;const{$:Je,cd:Ye}=qe("zx");let Ze=false;async function runAsync(t,e,s){Je.verbose=s?.verbose??Ze;if(s?.cwd){Ye(s.cwd)}return await(Je`${t} ${e}`)}async function setDefaultVerbose(t){Ze=t}const Ke=undefined;const{default:Xe}=Ke("@expo/json-file");let Qe=null;const ts=["@expo/fingerprint","create-expo","eslint-config-universe","expo-dev-client-components","expo-doctor","expo-env-info","expo-module-scripts","expo-module-template","expo-module-template-local","expo-test-runner","install-expo-modules","pod-install","uri-scheme","patch-project","create-expo-module","create-expo-nightly","@react-native-community/cli-platform-android","react","react-dom"];const es=["@react-native/assets-registry","@react-native/dev-middleware","@react-native/babel-preset","react-native"];async function addWorkspacePackagesToAppAsync(t,e){const s=await Xe.readAsync(U().join(t,"package.json"));const i=s.dependencies??{};for(const t of e){i[t.name]="workspace:*"}await Xe.mergeAsync(U().join(t,"package.json"),{dependencies:i})}async function reinstallPackagesAsync(t){await Promise.all([Pt().rm(U().join(t,"node_modules"),{recursive:true,force:true}),Pt().rm(U().join(t,"bun.lock"),{force:true}),Pt().rm(U().join(t,"bun.lockb"),{force:true}),Pt().rm(U().join(t,"yarn.lock"),{force:true})]);await runAsync("bun",["install","--ignore-scripts"],{cwd:t})}async function getExpoPackagesAsync(t){if(Qe!=null){return Qe}const e=await Ue("**/package.json",{cwd:U().join(t,"packages"),ignore:["**/example/**","**/node_modules/**","**/__tests__/**","**/__mocks__/**","**/__fixtures__/**","**/e2e/**","**/build/**"]});const s=(await Promise.all(e.map((async e=>{const s=U().join(t,"packages",U().dirname(e));return await createPackageAsync(s)})))).filter((t=>t!=null));Qe=s.sort(((t,e)=>t.name.localeCompare(e.name)));return Qe}async function getReactNativeTransitivePackagesAsync(t){const e=await Promise.all(es.map((e=>{const s=path.join(t,"node_modules",e);return Promise.resolve({name:e,path:s})})));return e}async function createPackageAsync(t){const e=U().join(t,"package.json");const s=U().dirname(e);const i=await Xe.readAsync(e);const n=i.name;if(ts.includes(n)){return null}return{name:n,path:s}}const ss=undefined;const{default:is}=ss("@expo/json-file");async function setupExpoRepoAsync(t,e,s){let i;const n=e&&J().existsSync(e);if(!n){i=U().join(t,"expo");console.log(`Cloning expo repository to ${i}`);console.time("Cloned expo repository");await runAsync("git",["clone","--depth=1","https://github.com/expo/expo.git",U().basename(i)],{cwd:U().dirname(i)});console.timeEnd("Cloned expo repository")}else{i=e}console.log(`Running \`yarn install\` in ${i}`);console.time("Installed dependencies in expo repository");await setupDependenciesAsync(i,s);try{await runAsync("yarn",["install"],{cwd:i})}catch(t){if(t instanceof Error){console.warn(`Failed to install dependencies in ${i}`,t.toString())}}console.timeEnd("Installed dependencies in expo repository");return i}async function packExpoBareTemplateTarballAsync(t,e){await J().promises.mkdir(e,{recursive:true});const{stdout:s}=await runAsync("npm",["pack","--json","--pack-destination",e],{cwd:U().join(t,"templates","expo-template-bare-minimum")});const i=JSON.parse(s);const n=i[0].filename;return U().join(e,n)}async function setupDependenciesAsync(t,e){const s=U().join(t,"package.json");const i=await is.readAsync(s);const n=i.resolutions??{};for(const t of es){n[t]=`${e}`}await is.mergeAsync(s,{resolutions:n})}async function getNpmVersionAsync(t,e){const{stdout:s}=await runAsync("npm",["view",`${t}@${e}`,"version"]);return s.trim()}const ns=t(import.meta.url)("node:assert");var rs=__nccwpck_require__.n(ns);const os=undefined;const{default:as}=os("@expo/json-file");async function createExpoApp(t,e){const s=e.template??"blank-typescript";const i=e.templateVersion??"canary";if(J().existsSync(t)){throw new Error(`Project already exists at ${t}`)}await runAsync("bunx",["create-expo-app",t,"--no-install",`--template`,`${s}@${i}`]);const n=await setupExpoRepoAsync(t,e.useExpoRepoPath,e.nightlyVersion);await setupProjectPackageJsonAsync(t,n,e.nightlyVersion);await setupMetroConfigAsync(t,n);await setupAppJsonAsync(t,{appId:e.appId,newArchEnabled:e.newArchEnabled});return n}async function setupProjectPackageJsonAsync(t,e,s){const i=U().join(t,"package.json");const n=await as.readAsync(i);const r=n.scripts??{};r["postinstall"]="bun --cwd expo postinstall";let o;const a=U().relative(t,e);if(a.startsWith("..")){o=e}else{o=a}const h=n.resolutions??{};for(const t of es){h[t]=`${s}`}await as.mergeAsync(i,{workspaces:[`${o}/packages/*`,`${o}/packages/@expo/*`],expo:{autolinking:{exclude:["expo-module-template","expo-module-template-local"]}},resolutions:h,scripts:r})}async function setupMetroConfigAsync(t,e){await J().promises.writeFile(U().join(t,"metro.config.js"),`const { getDefaultConfig } = require('expo/metro-config');\n\n/** @type {import('expo/metro-config').MetroConfig} */\nconst config = getDefaultConfig(__dirname);\n\nconfig.watchFolders = [\n ...config.watchFolders ?? [],\n __dirname,\n '${e}',\n];\n\nconfig.resolver.nodeModulesPaths = [\n ...config.resolver.nodeModulesPaths ?? [],\n '${e}/node_modules',\n];\n\nmodule.exports = config;`)}async function prebuildAppAsync(t,e){await runAsync("npx",["expo","prebuild","--no-install","--template",e],{cwd:t})}async function installCocoaPodsAsync(t){await runAsync("pod",["install"],{cwd:U().join(t,"ios")})}async function setupAppJsonAsync(t,{appId:e,newArchEnabled:s}){const i=U().join(t,"app.json");const n=await as.readAsync(i);const r=n.expo;rs()(isJSONObject(r));const o=r.android??{};const a=r.ios??{};rs()(isJSONObject(o));rs()(isJSONObject(a));o.package=e;a.bundleIdentifier=e;const h=r.plugins??[];rs()(isJSONArray(h));r.runtimeVersion="1.0.0";r.android=o;r.ios=a;r.plugins=h;r.newArchEnabled=s;await as.writeAsync(i,n)}function isJSONObject(t){return t!=null&&typeof t==="object"&&!Array.isArray(t)}function isJSONArray(t){return t!=null&&Array.isArray(t)}const hs=undefined;const{which:ls}=hs("zx");async function checkRequiredToolsAsync(t){const e=await Promise.all(t.map((t=>ls(t,{nothrow:true}))));for(const[s,i]of e.entries()){if(!i){throw new Error(`Missing required tool: ${t[s]}`)}}}const cs=JSON.parse('{"UU":"create-expo-nightly","rE":"0.2.3"}');const us=new z(cs.UU).version(cs.rE).description("Create an app for react-native nightlies testing.").argument("[path]","The output path for the app.",".").option("--name <name>","The name of the app to create.","test-nightlies").option("--expo-repo <path>",'The path to the expo repository. (default: Cloning to the "expo" directory in the output app)').option("-v, --verbose","Verbose output.").option("--app-id <name>","The Android applicationId and iOS bundleIdentifier.","dev.expo.testnightlies").option("--no-install","Skip installing CocoaPods.").option("--enable-new-architecture <boolean>","Enable / disable the New Architecture mode (default: new arch enabled).","true").parse(process.argv);async function src_runAsync(t){const e=us.opts();setDefaultVerbose(!!e.verbose);await checkRequiredToolsAsync(["bun","git","npm","yarn"]);const s=e.name;const i=U().join(U().resolve(us.args[0]||"."),s);const n=await getNpmVersionAsync("react-native","nightly");const r={appId:e.appId,newArchEnabled:e.enableNewArchitecture!=="false",nightlyVersion:n,useExpoRepoPath:e.expoRepo};console.log(F.cyan(`Setting up app at ${F.bold(i)} with ${F.bold("react-native@"+n)}`));const o=await createExpoApp(i,r);const a=await getExpoPackagesAsync(o);await addWorkspacePackagesToAppAsync(i,a);console.log(F.cyan(`Reinstalling packages`));await reinstallPackagesAsync(i);console.log(F.cyan(`Creating expo-template-bare-minimum tarball`));const h=await packExpoBareTemplateTarballAsync(o,U().join(i,".expo"));console.log(F.cyan(`Running prebuild`));await prebuildAppAsync(i,h);if(e.install){if(process.platform==="darwin"){await checkRequiredToolsAsync(["pod"]);console.log(`Installing CocoaPods dependencies`);console.time("Installed CocoaPods dependencies");await installCocoaPodsAsync(i);console.timeEnd("Installed CocoaPods dependencies")}}}(async()=>{us.parse(process.argv);try{await src_runAsync(cs.UU)}catch(t){console.error("Uncaught Error",t);process.exit(1)}})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-expo-nightly",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "A tool to create an Expo app for react-native nightlies testing",
|
|
6
6
|
"keywords": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"directory": "packages/create-expo-nightly"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@expo/json-file": "^10.0.
|
|
40
|
+
"@expo/json-file": "^10.0.3",
|
|
41
41
|
"zx": "^8.2.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"@vercel/ncc": "^0.38.3",
|
|
46
46
|
"chalk": "^5.3.0",
|
|
47
47
|
"commander": "^12.1.0",
|
|
48
|
-
"expo-module-scripts": "^5.0.
|
|
48
|
+
"expo-module-scripts": "^5.0.3",
|
|
49
49
|
"glob": "^10.3.10"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "ef0b9ecf9645d3e93587d5ee5030dbfcbf735bbd"
|
|
52
52
|
}
|