@tobylai/qmcli 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/qmcli.cjs +88 -0
- package/package.json +6 -3
package/dist/qmcli.cjs
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var j6=Object.create;var{getPrototypeOf:z6,defineProperty:q3,getOwnPropertyNames:O6}=Object;var Y6=Object.prototype.hasOwnProperty;var b=(D,_,F)=>{F=D!=null?j6(z6(D)):{};let u=_||!D||!D.__esModule?q3(F,"default",{value:D,enumerable:!0}):F;for(let B of O6(D))if(!Y6.call(u,B))q3(u,B,{get:()=>D[B],enumerable:!0});return u};var P=(D,_)=>()=>(_||D((_={exports:{}}).exports,_),_.exports);var O2=P((g0)=>{class h0 extends Error{constructor(D,_,F){super(F);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=_,this.exitCode=D,this.nestedError=void 0}}class G3 extends h0{constructor(D){super(1,"commander.invalidArgument",D);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}g0.CommanderError=h0;g0.InvalidArgumentError=G3});var t2=P((m0)=>{var{InvalidArgumentError:w6}=O2();class X3{constructor(D,_){switch(this.description=_||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,D[0]){case"<":this.required=!0,this._name=D.slice(1,-1);break;case"[":this.required=!1,this._name=D.slice(1,-1);break;default:this.required=!0,this._name=D;break}if(this._name.length>3&&this._name.slice(-3)==="...")this.variadic=!0,this._name=this._name.slice(0,-3)}name(){return this._name}_concatValue(D,_){if(_===this.defaultValue||!Array.isArray(_))return[D];return _.concat(D)}default(D,_){return this.defaultValue=D,this.defaultValueDescription=_,this}argParser(D){return this.parseArg=D,this}choices(D){return this.argChoices=D.slice(),this.parseArg=(_,F)=>{if(!this.argChoices.includes(_))throw new w6(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._concatValue(_,F);return _},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}function S6(D){let _=D.name()+(D.variadic===!0?"...":"");return D.required?"<"+_+">":"["+_+"]"}m0.Argument=X3;m0.humanReadableArgName=S6});var c0=P((d0)=>{var{humanReadableArgName:P6}=t2();class Z3{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(D){this.helpWidth=this.helpWidth??D.helpWidth??80}visibleCommands(D){let _=D.commands.filter((u)=>!u._hidden),F=D._getHelpCommand();if(F&&!F._hidden)_.push(F);if(this.sortSubcommands)_.sort((u,B)=>{return u.name().localeCompare(B.name())});return _}compareOptions(D,_){let F=(u)=>{return u.short?u.short.replace(/^-/,""):u.long.replace(/^--/,"")};return F(D).localeCompare(F(_))}visibleOptions(D){let _=D.options.filter((u)=>!u.hidden),F=D._getHelpOption();if(F&&!F.hidden){let u=F.short&&D._findOption(F.short),B=F.long&&D._findOption(F.long);if(!u&&!B)_.push(F);else if(F.long&&!B)_.push(D.createOption(F.long,F.description));else if(F.short&&!u)_.push(D.createOption(F.short,F.description))}if(this.sortOptions)_.sort(this.compareOptions);return _}visibleGlobalOptions(D){if(!this.showGlobalOptions)return[];let _=[];for(let F=D.parent;F;F=F.parent){let u=F.options.filter((B)=>!B.hidden);_.push(...u)}if(this.sortOptions)_.sort(this.compareOptions);return _}visibleArguments(D){if(D._argsDescription)D.registeredArguments.forEach((_)=>{_.description=_.description||D._argsDescription[_.name()]||""});if(D.registeredArguments.find((_)=>_.description))return D.registeredArguments;return[]}subcommandTerm(D){let _=D.registeredArguments.map((F)=>P6(F)).join(" ");return D._name+(D._aliases[0]?"|"+D._aliases[0]:"")+(D.options.length?" [options]":"")+(_?" "+_:"")}optionTerm(D){return D.flags}argumentTerm(D){return D.name()}longestSubcommandTermLength(D,_){return _.visibleCommands(D).reduce((F,u)=>{return Math.max(F,this.displayWidth(_.styleSubcommandTerm(_.subcommandTerm(u))))},0)}longestOptionTermLength(D,_){return _.visibleOptions(D).reduce((F,u)=>{return Math.max(F,this.displayWidth(_.styleOptionTerm(_.optionTerm(u))))},0)}longestGlobalOptionTermLength(D,_){return _.visibleGlobalOptions(D).reduce((F,u)=>{return Math.max(F,this.displayWidth(_.styleOptionTerm(_.optionTerm(u))))},0)}longestArgumentTermLength(D,_){return _.visibleArguments(D).reduce((F,u)=>{return Math.max(F,this.displayWidth(_.styleArgumentTerm(_.argumentTerm(u))))},0)}commandUsage(D){let _=D._name;if(D._aliases[0])_=_+"|"+D._aliases[0];let F="";for(let u=D.parent;u;u=u.parent)F=u.name()+" "+F;return F+_+" "+D.usage()}commandDescription(D){return D.description()}subcommandDescription(D){return D.summary()||D.description()}optionDescription(D){let _=[];if(D.argChoices)_.push(`choices: ${D.argChoices.map((F)=>JSON.stringify(F)).join(", ")}`);if(D.defaultValue!==void 0){if(D.required||D.optional||D.isBoolean()&&typeof D.defaultValue==="boolean")_.push(`default: ${D.defaultValueDescription||JSON.stringify(D.defaultValue)}`)}if(D.presetArg!==void 0&&D.optional)_.push(`preset: ${JSON.stringify(D.presetArg)}`);if(D.envVar!==void 0)_.push(`env: ${D.envVar}`);if(_.length>0)return`${D.description} (${_.join(", ")})`;return D.description}argumentDescription(D){let _=[];if(D.argChoices)_.push(`choices: ${D.argChoices.map((F)=>JSON.stringify(F)).join(", ")}`);if(D.defaultValue!==void 0)_.push(`default: ${D.defaultValueDescription||JSON.stringify(D.defaultValue)}`);if(_.length>0){let F=`(${_.join(", ")})`;if(D.description)return`${D.description} ${F}`;return F}return D.description}formatHelp(D,_){let F=_.padWidth(D,_),u=_.helpWidth??80;function B(G,A){return _.formatItem(G,F,A,_)}let E=[`${_.styleTitle("Usage:")} ${_.styleUsage(_.commandUsage(D))}`,""],C=_.commandDescription(D);if(C.length>0)E=E.concat([_.boxWrap(_.styleCommandDescription(C),u),""]);let $=_.visibleArguments(D).map((G)=>{return B(_.styleArgumentTerm(_.argumentTerm(G)),_.styleArgumentDescription(_.argumentDescription(G)))});if($.length>0)E=E.concat([_.styleTitle("Arguments:"),...$,""]);let q=_.visibleOptions(D).map((G)=>{return B(_.styleOptionTerm(_.optionTerm(G)),_.styleOptionDescription(_.optionDescription(G)))});if(q.length>0)E=E.concat([_.styleTitle("Options:"),...q,""]);if(_.showGlobalOptions){let G=_.visibleGlobalOptions(D).map((A)=>{return B(_.styleOptionTerm(_.optionTerm(A)),_.styleOptionDescription(_.optionDescription(A)))});if(G.length>0)E=E.concat([_.styleTitle("Global Options:"),...G,""])}let Q=_.visibleCommands(D).map((G)=>{return B(_.styleSubcommandTerm(_.subcommandTerm(G)),_.styleSubcommandDescription(_.subcommandDescription(G)))});if(Q.length>0)E=E.concat([_.styleTitle("Commands:"),...Q,""]);return E.join(`
|
|
3
|
+
`)}displayWidth(D){return J3(D).length}styleTitle(D){return D}styleUsage(D){return D.split(" ").map((_)=>{if(_==="[options]")return this.styleOptionText(_);if(_==="[command]")return this.styleSubcommandText(_);if(_[0]==="["||_[0]==="<")return this.styleArgumentText(_);return this.styleCommandText(_)}).join(" ")}styleCommandDescription(D){return this.styleDescriptionText(D)}styleOptionDescription(D){return this.styleDescriptionText(D)}styleSubcommandDescription(D){return this.styleDescriptionText(D)}styleArgumentDescription(D){return this.styleDescriptionText(D)}styleDescriptionText(D){return D}styleOptionTerm(D){return this.styleOptionText(D)}styleSubcommandTerm(D){return D.split(" ").map((_)=>{if(_==="[options]")return this.styleOptionText(_);if(_[0]==="["||_[0]==="<")return this.styleArgumentText(_);return this.styleSubcommandText(_)}).join(" ")}styleArgumentTerm(D){return this.styleArgumentText(D)}styleOptionText(D){return D}styleArgumentText(D){return D}styleSubcommandText(D){return D}styleCommandText(D){return D}padWidth(D,_){return Math.max(_.longestOptionTermLength(D,_),_.longestGlobalOptionTermLength(D,_),_.longestSubcommandTermLength(D,_),_.longestArgumentTermLength(D,_))}preformatted(D){return/\n[^\S\r\n]/.test(D)}formatItem(D,_,F,u){let E=" ".repeat(2);if(!F)return E+D;let C=D.padEnd(_+D.length-u.displayWidth(D)),$=2,Q=(this.helpWidth??80)-_-$-2,G;if(Q<this.minWidthToWrap||u.preformatted(F))G=F;else G=u.boxWrap(F,Q).replace(/\n/g,`
|
|
4
|
+
`+" ".repeat(_+$));return E+C+" ".repeat($)+G.replace(/\n/g,`
|
|
5
|
+
${E}`)}boxWrap(D,_){if(_<this.minWidthToWrap)return D;let F=D.split(/\r\n|\n/),u=/[\s]*[^\s]+/g,B=[];return F.forEach((E)=>{let C=E.match(u);if(C===null){B.push("");return}let $=[C.shift()],q=this.displayWidth($[0]);C.forEach((Q)=>{let G=this.displayWidth(Q);if(q+G<=_){$.push(Q),q+=G;return}B.push($.join(""));let A=Q.trimStart();$=[A],q=this.displayWidth(A)}),B.push($.join(""))}),B.join(`
|
|
6
|
+
`)}}function J3(D){let _=/\x1b\[\d*(;\d*)*m/g;return D.replace(_,"")}d0.Help=Z3;d0.stripColor=J3});var l0=P((p0)=>{var{InvalidArgumentError:x6}=O2();class A3{constructor(D,_){this.flags=D,this.description=_||"",this.required=D.includes("<"),this.optional=D.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(D),this.mandatory=!1;let F=k6(D);if(this.short=F.shortFlag,this.long=F.longFlag,this.negate=!1,this.long)this.negate=this.long.startsWith("--no-");this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(D,_){return this.defaultValue=D,this.defaultValueDescription=_,this}preset(D){return this.presetArg=D,this}conflicts(D){return this.conflictsWith=this.conflictsWith.concat(D),this}implies(D){let _=D;if(typeof D==="string")_={[D]:!0};return this.implied=Object.assign(this.implied||{},_),this}env(D){return this.envVar=D,this}argParser(D){return this.parseArg=D,this}makeOptionMandatory(D=!0){return this.mandatory=!!D,this}hideHelp(D=!0){return this.hidden=!!D,this}_concatValue(D,_){if(_===this.defaultValue||!Array.isArray(_))return[D];return _.concat(D)}choices(D){return this.argChoices=D.slice(),this.parseArg=(_,F)=>{if(!this.argChoices.includes(_))throw new x6(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._concatValue(_,F);return _},this}name(){if(this.long)return this.long.replace(/^--/,"");return this.short.replace(/^-/,"")}attributeName(){if(this.negate)return Q3(this.name().replace(/^no-/,""));return Q3(this.name())}is(D){return this.short===D||this.long===D}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class K3{constructor(D){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,D.forEach((_)=>{if(_.negate)this.negativeOptions.set(_.attributeName(),_);else this.positiveOptions.set(_.attributeName(),_)}),this.negativeOptions.forEach((_,F)=>{if(this.positiveOptions.has(F))this.dualOptions.add(F)})}valueFromOption(D,_){let F=_.attributeName();if(!this.dualOptions.has(F))return!0;let u=this.negativeOptions.get(F).presetArg,B=u!==void 0?u:!1;return _.negate===(B===D)}}function Q3(D){return D.split("-").reduce((_,F)=>{return _+F[0].toUpperCase()+F.slice(1)})}function k6(D){let _,F,u=/^-[^-]$/,B=/^--[^-]/,E=D.split(/[ |,]+/).concat("guard");if(u.test(E[0]))_=E.shift();if(B.test(E[0]))F=E.shift();if(!_&&u.test(E[0]))_=E.shift();if(!_&&B.test(E[0]))_=F,F=E.shift();if(E[0].startsWith("-")){let C=E[0],$=`option creation failed due to '${C}' in option flags '${D}'`;if(/^-[^-][^-]/.test(C))throw new Error(`${$}
|
|
7
|
+
- a short flag is a single dash and a single character
|
|
8
|
+
- either use a single dash and a single character (for a short flag)
|
|
9
|
+
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(u.test(C))throw new Error(`${$}
|
|
10
|
+
- too many short flags`);if(B.test(C))throw new Error(`${$}
|
|
11
|
+
- too many long flags`);throw new Error(`${$}
|
|
12
|
+
- unrecognised flag format`)}if(_===void 0&&F===void 0)throw new Error(`option creation failed due to no flags found in '${D}'.`);return{shortFlag:_,longFlag:F}}p0.Option=A3;p0.DualOptions=K3});var M3=P((W3)=>{function y6(D,_){if(Math.abs(D.length-_.length)>3)return Math.max(D.length,_.length);let F=[];for(let u=0;u<=D.length;u++)F[u]=[u];for(let u=0;u<=_.length;u++)F[0][u]=u;for(let u=1;u<=_.length;u++)for(let B=1;B<=D.length;B++){let E=1;if(D[B-1]===_[u-1])E=0;else E=1;if(F[B][u]=Math.min(F[B-1][u]+1,F[B][u-1]+1,F[B-1][u-1]+E),B>1&&u>1&&D[B-1]===_[u-2]&&D[B-2]===_[u-1])F[B][u]=Math.min(F[B][u],F[B-2][u-2]+1)}return F[D.length][_.length]}function v6(D,_){if(!_||_.length===0)return"";_=Array.from(new Set(_));let F=D.startsWith("--");if(F)D=D.slice(2),_=_.map((C)=>C.slice(2));let u=[],B=3,E=0.4;if(_.forEach((C)=>{if(C.length<=1)return;let $=y6(D,C),q=Math.max(D.length,C.length);if((q-$)/q>E){if($<B)B=$,u=[C];else if($===B)u.push(C)}}),u.sort((C,$)=>C.localeCompare($)),F)u=u.map((C)=>`--${C}`);if(u.length>1)return`
|
|
13
|
+
(Did you mean one of ${u.join(", ")}?)`;if(u.length===1)return`
|
|
14
|
+
(Did you mean ${u[0]}?)`;return""}W3.suggestSimilar=v6});var I3=P((r0)=>{var b6=require("node:events").EventEmitter,i0=require("node:child_process"),PD=require("node:path"),e2=require("node:fs"),d=require("node:process"),{Argument:f6,humanReadableArgName:h6}=t2(),{CommanderError:n0}=O2(),{Help:g6,stripColor:m6}=c0(),{Option:R3,DualOptions:d6}=l0(),{suggestSimilar:V3}=M3();class s0 extends b6{constructor(D){super();this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=D||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:(_)=>d.stdout.write(_),writeErr:(_)=>d.stderr.write(_),outputError:(_,F)=>F(_),getOutHelpWidth:()=>d.stdout.isTTY?d.stdout.columns:void 0,getErrHelpWidth:()=>d.stderr.isTTY?d.stderr.columns:void 0,getOutHasColors:()=>o0()??(d.stdout.isTTY&&d.stdout.hasColors?.()),getErrHasColors:()=>o0()??(d.stderr.isTTY&&d.stderr.hasColors?.()),stripColor:(_)=>m6(_)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(D){return this._outputConfiguration=D._outputConfiguration,this._helpOption=D._helpOption,this._helpCommand=D._helpCommand,this._helpConfiguration=D._helpConfiguration,this._exitCallback=D._exitCallback,this._storeOptionsAsProperties=D._storeOptionsAsProperties,this._combineFlagAndOptionalValue=D._combineFlagAndOptionalValue,this._allowExcessArguments=D._allowExcessArguments,this._enablePositionalOptions=D._enablePositionalOptions,this._showHelpAfterError=D._showHelpAfterError,this._showSuggestionAfterError=D._showSuggestionAfterError,this}_getCommandAndAncestors(){let D=[];for(let _=this;_;_=_.parent)D.push(_);return D}command(D,_,F){let u=_,B=F;if(typeof u==="object"&&u!==null)B=u,u=null;B=B||{};let[,E,C]=D.match(/([^ ]+) *(.*)/),$=this.createCommand(E);if(u)$.description(u),$._executableHandler=!0;if(B.isDefault)this._defaultCommandName=$._name;if($._hidden=!!(B.noHelp||B.hidden),$._executableFile=B.executableFile||null,C)$.arguments(C);if(this._registerCommand($),$.parent=this,$.copyInheritedSettings(this),u)return this;return $}createCommand(D){return new s0(D)}createHelp(){return Object.assign(new g6,this.configureHelp())}configureHelp(D){if(D===void 0)return this._helpConfiguration;return this._helpConfiguration=D,this}configureOutput(D){if(D===void 0)return this._outputConfiguration;return Object.assign(this._outputConfiguration,D),this}showHelpAfterError(D=!0){if(typeof D!=="string")D=!!D;return this._showHelpAfterError=D,this}showSuggestionAfterError(D=!0){return this._showSuggestionAfterError=!!D,this}addCommand(D,_){if(!D._name)throw new Error(`Command passed to .addCommand() must have a name
|
|
15
|
+
- specify the name in Command constructor or using .name()`);if(_=_||{},_.isDefault)this._defaultCommandName=D._name;if(_.noHelp||_.hidden)D._hidden=!0;return this._registerCommand(D),D.parent=this,D._checkForBrokenPassThrough(),this}createArgument(D,_){return new f6(D,_)}argument(D,_,F,u){let B=this.createArgument(D,_);if(typeof F==="function")B.default(u).argParser(F);else B.default(F);return this.addArgument(B),this}arguments(D){return D.trim().split(/ +/).forEach((_)=>{this.argument(_)}),this}addArgument(D){let _=this.registeredArguments.slice(-1)[0];if(_&&_.variadic)throw new Error(`only the last argument can be variadic '${_.name()}'`);if(D.required&&D.defaultValue!==void 0&&D.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${D.name()}'`);return this.registeredArguments.push(D),this}helpCommand(D,_){if(typeof D==="boolean")return this._addImplicitHelpCommand=D,this;D=D??"help [command]";let[,F,u]=D.match(/([^ ]+) *(.*)/),B=_??"display help for command",E=this.createCommand(F);if(E.helpOption(!1),u)E.arguments(u);if(B)E.description(B);return this._addImplicitHelpCommand=!0,this._helpCommand=E,this}addHelpCommand(D,_){if(typeof D!=="object")return this.helpCommand(D,_),this;return this._addImplicitHelpCommand=!0,this._helpCommand=D,this}_getHelpCommand(){if(this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))){if(this._helpCommand===void 0)this.helpCommand(void 0,void 0);return this._helpCommand}return null}hook(D,_){let F=["preSubcommand","preAction","postAction"];if(!F.includes(D))throw new Error(`Unexpected value for event passed to hook : '${D}'.
|
|
16
|
+
Expecting one of '${F.join("', '")}'`);if(this._lifeCycleHooks[D])this._lifeCycleHooks[D].push(_);else this._lifeCycleHooks[D]=[_];return this}exitOverride(D){if(D)this._exitCallback=D;else this._exitCallback=(_)=>{if(_.code!=="commander.executeSubCommandAsync")throw _};return this}_exit(D,_,F){if(this._exitCallback)this._exitCallback(new n0(D,_,F));d.exit(D)}action(D){let _=(F)=>{let u=this.registeredArguments.length,B=F.slice(0,u);if(this._storeOptionsAsProperties)B[u]=this;else B[u]=this.opts();return B.push(this),D.apply(this,B)};return this._actionHandler=_,this}createOption(D,_){return new R3(D,_)}_callParseArg(D,_,F,u){try{return D.parseArg(_,F)}catch(B){if(B.code==="commander.invalidArgument"){let E=`${u} ${B.message}`;this.error(E,{exitCode:B.exitCode,code:B.code})}throw B}}_registerOption(D){let _=D.short&&this._findOption(D.short)||D.long&&this._findOption(D.long);if(_){let F=D.long&&this._findOption(D.long)?D.long:D.short;throw new Error(`Cannot add option '${D.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${F}'
|
|
17
|
+
- already used by option '${_.flags}'`)}this.options.push(D)}_registerCommand(D){let _=(u)=>{return[u.name()].concat(u.aliases())},F=_(D).find((u)=>this._findCommand(u));if(F){let u=_(this._findCommand(F)).join("|"),B=_(D).join("|");throw new Error(`cannot add command '${B}' as already have command '${u}'`)}this.commands.push(D)}addOption(D){this._registerOption(D);let _=D.name(),F=D.attributeName();if(D.negate){let B=D.long.replace(/^--no-/,"--");if(!this._findOption(B))this.setOptionValueWithSource(F,D.defaultValue===void 0?!0:D.defaultValue,"default")}else if(D.defaultValue!==void 0)this.setOptionValueWithSource(F,D.defaultValue,"default");let u=(B,E,C)=>{if(B==null&&D.presetArg!==void 0)B=D.presetArg;let $=this.getOptionValue(F);if(B!==null&&D.parseArg)B=this._callParseArg(D,B,$,E);else if(B!==null&&D.variadic)B=D._concatValue(B,$);if(B==null)if(D.negate)B=!1;else if(D.isBoolean()||D.optional)B=!0;else B="";this.setOptionValueWithSource(F,B,C)};if(this.on("option:"+_,(B)=>{let E=`error: option '${D.flags}' argument '${B}' is invalid.`;u(B,E,"cli")}),D.envVar)this.on("optionEnv:"+_,(B)=>{let E=`error: option '${D.flags}' value '${B}' from env '${D.envVar}' is invalid.`;u(B,E,"env")});return this}_optionEx(D,_,F,u,B){if(typeof _==="object"&&_ instanceof R3)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let E=this.createOption(_,F);if(E.makeOptionMandatory(!!D.mandatory),typeof u==="function")E.default(B).argParser(u);else if(u instanceof RegExp){let C=u;u=($,q)=>{let Q=C.exec($);return Q?Q[0]:q},E.default(B).argParser(u)}else E.default(u);return this.addOption(E)}option(D,_,F,u){return this._optionEx({},D,_,F,u)}requiredOption(D,_,F,u){return this._optionEx({mandatory:!0},D,_,F,u)}combineFlagAndOptionalValue(D=!0){return this._combineFlagAndOptionalValue=!!D,this}allowUnknownOption(D=!0){return this._allowUnknownOption=!!D,this}allowExcessArguments(D=!0){return this._allowExcessArguments=!!D,this}enablePositionalOptions(D=!0){return this._enablePositionalOptions=!!D,this}passThroughOptions(D=!0){return this._passThroughOptions=!!D,this._checkForBrokenPassThrough(),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(D=!0){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");return this._storeOptionsAsProperties=!!D,this}getOptionValue(D){if(this._storeOptionsAsProperties)return this[D];return this._optionValues[D]}setOptionValue(D,_){return this.setOptionValueWithSource(D,_,void 0)}setOptionValueWithSource(D,_,F){if(this._storeOptionsAsProperties)this[D]=_;else this._optionValues[D]=_;return this._optionValueSources[D]=F,this}getOptionValueSource(D){return this._optionValueSources[D]}getOptionValueSourceWithGlobals(D){let _;return this._getCommandAndAncestors().forEach((F)=>{if(F.getOptionValueSource(D)!==void 0)_=F.getOptionValueSource(D)}),_}_prepareUserArgs(D,_){if(D!==void 0&&!Array.isArray(D))throw new Error("first parameter to parse must be array or undefined");if(_=_||{},D===void 0&&_.from===void 0){if(d.versions?.electron)_.from="electron";let u=d.execArgv??[];if(u.includes("-e")||u.includes("--eval")||u.includes("-p")||u.includes("--print"))_.from="eval"}if(D===void 0)D=d.argv;this.rawArgs=D.slice();let F;switch(_.from){case void 0:case"node":this._scriptPath=D[1],F=D.slice(2);break;case"electron":if(d.defaultApp)this._scriptPath=D[1],F=D.slice(2);else F=D.slice(1);break;case"user":F=D.slice(0);break;case"eval":F=D.slice(1);break;default:throw new Error(`unexpected parse option { from: '${_.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);return this._name=this._name||"program",F}parse(D,_){this._prepareForParse();let F=this._prepareUserArgs(D,_);return this._parseCommand([],F),this}async parseAsync(D,_){this._prepareForParse();let F=this._prepareUserArgs(D,_);return await this._parseCommand([],F),this}_prepareForParse(){if(this._savedState===null)this.saveStateBeforeParse();else this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
|
|
18
|
+
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(D,_,F){if(e2.existsSync(D))return;let u=_?`searched for local subcommand relative to directory '${_}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",B=`'${D}' does not exist
|
|
19
|
+
- if '${F}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
20
|
+
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
21
|
+
- ${u}`;throw new Error(B)}_executeSubCommand(D,_){_=_.slice();let F=!1,u=[".js",".ts",".tsx",".mjs",".cjs"];function B(Q,G){let A=PD.resolve(Q,G);if(e2.existsSync(A))return A;if(u.includes(PD.extname(G)))return;let M=u.find((J)=>e2.existsSync(`${A}${J}`));if(M)return`${A}${M}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let E=D._executableFile||`${this._name}-${D._name}`,C=this._executableDir||"";if(this._scriptPath){let Q;try{Q=e2.realpathSync(this._scriptPath)}catch{Q=this._scriptPath}C=PD.resolve(PD.dirname(Q),C)}if(C){let Q=B(C,E);if(!Q&&!D._executableFile&&this._scriptPath){let G=PD.basename(this._scriptPath,PD.extname(this._scriptPath));if(G!==this._name)Q=B(C,`${G}-${D._name}`)}E=Q||E}F=u.includes(PD.extname(E));let $;if(d.platform!=="win32")if(F)_.unshift(E),_=U3(d.execArgv).concat(_),$=i0.spawn(d.argv[0],_,{stdio:"inherit"});else $=i0.spawn(E,_,{stdio:"inherit"});else this._checkForMissingExecutable(E,C,D._name),_.unshift(E),_=U3(d.execArgv).concat(_),$=i0.spawn(d.execPath,_,{stdio:"inherit"});if(!$.killed)["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((G)=>{d.on(G,()=>{if($.killed===!1&&$.exitCode===null)$.kill(G)})});let q=this._exitCallback;$.on("close",(Q)=>{if(Q=Q??1,!q)d.exit(Q);else q(new n0(Q,"commander.executeSubCommandAsync","(close)"))}),$.on("error",(Q)=>{if(Q.code==="ENOENT")this._checkForMissingExecutable(E,C,D._name);else if(Q.code==="EACCES")throw new Error(`'${E}' not executable`);if(!q)d.exit(1);else{let G=new n0(1,"commander.executeSubCommandAsync","(error)");G.nestedError=Q,q(G)}}),this.runningCommand=$}_dispatchSubcommand(D,_,F){let u=this._findCommand(D);if(!u)this.help({error:!0});u._prepareForParse();let B;return B=this._chainOrCallSubCommandHook(B,u,"preSubcommand"),B=this._chainOrCall(B,()=>{if(u._executableHandler)this._executeSubCommand(u,_.concat(F));else return u._parseCommand(_,F)}),B}_dispatchHelpCommand(D){if(!D)this.help();let _=this._findCommand(D);if(_&&!_._executableHandler)_.help();return this._dispatchSubcommand(D,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){if(this.registeredArguments.forEach((D,_)=>{if(D.required&&this.args[_]==null)this.missingArgument(D.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)return;if(this.args.length>this.registeredArguments.length)this._excessArguments(this.args)}_processArguments(){let D=(F,u,B)=>{let E=u;if(u!==null&&F.parseArg){let C=`error: command-argument value '${u}' is invalid for argument '${F.name()}'.`;E=this._callParseArg(F,u,B,C)}return E};this._checkNumberOfArguments();let _=[];this.registeredArguments.forEach((F,u)=>{let B=F.defaultValue;if(F.variadic){if(u<this.args.length){if(B=this.args.slice(u),F.parseArg)B=B.reduce((E,C)=>{return D(F,C,E)},F.defaultValue)}else if(B===void 0)B=[]}else if(u<this.args.length){if(B=this.args[u],F.parseArg)B=D(F,B,F.defaultValue)}_[u]=B}),this.processedArgs=_}_chainOrCall(D,_){if(D&&D.then&&typeof D.then==="function")return D.then(()=>_());return _()}_chainOrCallHooks(D,_){let F=D,u=[];if(this._getCommandAndAncestors().reverse().filter((B)=>B._lifeCycleHooks[_]!==void 0).forEach((B)=>{B._lifeCycleHooks[_].forEach((E)=>{u.push({hookedCommand:B,callback:E})})}),_==="postAction")u.reverse();return u.forEach((B)=>{F=this._chainOrCall(F,()=>{return B.callback(B.hookedCommand,this)})}),F}_chainOrCallSubCommandHook(D,_,F){let u=D;if(this._lifeCycleHooks[F]!==void 0)this._lifeCycleHooks[F].forEach((B)=>{u=this._chainOrCall(u,()=>{return B(this,_)})});return u}_parseCommand(D,_){let F=this.parseOptions(_);if(this._parseOptionsEnv(),this._parseOptionsImplied(),D=D.concat(F.operands),_=F.unknown,this.args=D.concat(_),D&&this._findCommand(D[0]))return this._dispatchSubcommand(D[0],D.slice(1),_);if(this._getHelpCommand()&&D[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(D[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(_),this._dispatchSubcommand(this._defaultCommandName,D,_);if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName)this.help({error:!0});this._outputHelpIfRequested(F.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let u=()=>{if(F.unknown.length>0)this.unknownOption(F.unknown[0])},B=`command:${this.name()}`;if(this._actionHandler){u(),this._processArguments();let E;if(E=this._chainOrCallHooks(E,"preAction"),E=this._chainOrCall(E,()=>this._actionHandler(this.processedArgs)),this.parent)E=this._chainOrCall(E,()=>{this.parent.emit(B,D,_)});return E=this._chainOrCallHooks(E,"postAction"),E}if(this.parent&&this.parent.listenerCount(B))u(),this._processArguments(),this.parent.emit(B,D,_);else if(D.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",D,_);if(this.listenerCount("command:*"))this.emit("command:*",D,_);else if(this.commands.length)this.unknownCommand();else u(),this._processArguments()}else if(this.commands.length)u(),this.help({error:!0});else u(),this._processArguments()}_findCommand(D){if(!D)return;return this.commands.find((_)=>_._name===D||_._aliases.includes(D))}_findOption(D){return this.options.find((_)=>_.is(D))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((D)=>{D.options.forEach((_)=>{if(_.mandatory&&D.getOptionValue(_.attributeName())===void 0)D.missingMandatoryOptionValue(_)})})}_checkForConflictingLocalOptions(){let D=this.options.filter((F)=>{let u=F.attributeName();if(this.getOptionValue(u)===void 0)return!1;return this.getOptionValueSource(u)!=="default"});D.filter((F)=>F.conflictsWith.length>0).forEach((F)=>{let u=D.find((B)=>F.conflictsWith.includes(B.attributeName()));if(u)this._conflictingOption(F,u)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((D)=>{D._checkForConflictingLocalOptions()})}parseOptions(D){let _=[],F=[],u=_,B=D.slice();function E($){return $.length>1&&$[0]==="-"}let C=null;while(B.length){let $=B.shift();if($==="--"){if(u===F)u.push($);u.push(...B);break}if(C&&!E($)){this.emit(`option:${C.name()}`,$);continue}if(C=null,E($)){let q=this._findOption($);if(q){if(q.required){let Q=B.shift();if(Q===void 0)this.optionMissingArgument(q);this.emit(`option:${q.name()}`,Q)}else if(q.optional){let Q=null;if(B.length>0&&!E(B[0]))Q=B.shift();this.emit(`option:${q.name()}`,Q)}else this.emit(`option:${q.name()}`);C=q.variadic?q:null;continue}}if($.length>2&&$[0]==="-"&&$[1]!=="-"){let q=this._findOption(`-${$[1]}`);if(q){if(q.required||q.optional&&this._combineFlagAndOptionalValue)this.emit(`option:${q.name()}`,$.slice(2));else this.emit(`option:${q.name()}`),B.unshift(`-${$.slice(2)}`);continue}}if(/^--[^=]+=/.test($)){let q=$.indexOf("="),Q=this._findOption($.slice(0,q));if(Q&&(Q.required||Q.optional)){this.emit(`option:${Q.name()}`,$.slice(q+1));continue}}if(E($))u=F;if((this._enablePositionalOptions||this._passThroughOptions)&&_.length===0&&F.length===0){if(this._findCommand($)){if(_.push($),B.length>0)F.push(...B);break}else if(this._getHelpCommand()&&$===this._getHelpCommand().name()){if(_.push($),B.length>0)_.push(...B);break}else if(this._defaultCommandName){if(F.push($),B.length>0)F.push(...B);break}}if(this._passThroughOptions){if(u.push($),B.length>0)u.push(...B);break}u.push($)}return{operands:_,unknown:F}}opts(){if(this._storeOptionsAsProperties){let D={},_=this.options.length;for(let F=0;F<_;F++){let u=this.options[F].attributeName();D[u]=u===this._versionOptionName?this._version:this[u]}return D}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((D,_)=>Object.assign(D,_.opts()),{})}error(D,_){if(this._outputConfiguration.outputError(`${D}
|
|
22
|
+
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==="string")this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
23
|
+
`);else if(this._showHelpAfterError)this._outputConfiguration.writeErr(`
|
|
24
|
+
`),this.outputHelp({error:!0});let F=_||{},u=F.exitCode||1,B=F.code||"commander.error";this._exit(u,B,D)}_parseOptionsEnv(){this.options.forEach((D)=>{if(D.envVar&&D.envVar in d.env){let _=D.attributeName();if(this.getOptionValue(_)===void 0||["default","config","env"].includes(this.getOptionValueSource(_)))if(D.required||D.optional)this.emit(`optionEnv:${D.name()}`,d.env[D.envVar]);else this.emit(`optionEnv:${D.name()}`)}})}_parseOptionsImplied(){let D=new d6(this.options),_=(F)=>{return this.getOptionValue(F)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(F))};this.options.filter((F)=>F.implied!==void 0&&_(F.attributeName())&&D.valueFromOption(this.getOptionValue(F.attributeName()),F)).forEach((F)=>{Object.keys(F.implied).filter((u)=>!_(u)).forEach((u)=>{this.setOptionValueWithSource(u,F.implied[u],"implied")})})}missingArgument(D){let _=`error: missing required argument '${D}'`;this.error(_,{code:"commander.missingArgument"})}optionMissingArgument(D){let _=`error: option '${D.flags}' argument missing`;this.error(_,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(D){let _=`error: required option '${D.flags}' not specified`;this.error(_,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(D,_){let F=(E)=>{let C=E.attributeName(),$=this.getOptionValue(C),q=this.options.find((G)=>G.negate&&C===G.attributeName()),Q=this.options.find((G)=>!G.negate&&C===G.attributeName());if(q&&(q.presetArg===void 0&&$===!1||q.presetArg!==void 0&&$===q.presetArg))return q;return Q||E},u=(E)=>{let C=F(E),$=C.attributeName();if(this.getOptionValueSource($)==="env")return`environment variable '${C.envVar}'`;return`option '${C.flags}'`},B=`error: ${u(D)} cannot be used with ${u(_)}`;this.error(B,{code:"commander.conflictingOption"})}unknownOption(D){if(this._allowUnknownOption)return;let _="";if(D.startsWith("--")&&this._showSuggestionAfterError){let u=[],B=this;do{let E=B.createHelp().visibleOptions(B).filter((C)=>C.long).map((C)=>C.long);u=u.concat(E),B=B.parent}while(B&&!B._enablePositionalOptions);_=V3(D,u)}let F=`error: unknown option '${D}'${_}`;this.error(F,{code:"commander.unknownOption"})}_excessArguments(D){if(this._allowExcessArguments)return;let _=this.registeredArguments.length,F=_===1?"":"s",B=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${_} argument${F} but got ${D.length}.`;this.error(B,{code:"commander.excessArguments"})}unknownCommand(){let D=this.args[0],_="";if(this._showSuggestionAfterError){let u=[];this.createHelp().visibleCommands(this).forEach((B)=>{if(u.push(B.name()),B.alias())u.push(B.alias())}),_=V3(D,u)}let F=`error: unknown command '${D}'${_}`;this.error(F,{code:"commander.unknownCommand"})}version(D,_,F){if(D===void 0)return this._version;this._version=D,_=_||"-V, --version",F=F||"output the version number";let u=this.createOption(_,F);return this._versionOptionName=u.attributeName(),this._registerOption(u),this.on("option:"+u.name(),()=>{this._outputConfiguration.writeOut(`${D}
|
|
25
|
+
`),this._exit(0,"commander.version",D)}),this}description(D,_){if(D===void 0&&_===void 0)return this._description;if(this._description=D,_)this._argsDescription=_;return this}summary(D){if(D===void 0)return this._summary;return this._summary=D,this}alias(D){if(D===void 0)return this._aliases[0];let _=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)_=this.commands[this.commands.length-1];if(D===_._name)throw new Error("Command alias can't be the same as its name");let F=this.parent?._findCommand(D);if(F){let u=[F.name()].concat(F.aliases()).join("|");throw new Error(`cannot add alias '${D}' to command '${this.name()}' as already have command '${u}'`)}return _._aliases.push(D),this}aliases(D){if(D===void 0)return this._aliases;return D.forEach((_)=>this.alias(_)),this}usage(D){if(D===void 0){if(this._usage)return this._usage;let _=this.registeredArguments.map((F)=>{return h6(F)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?_:[]).join(" ")}return this._usage=D,this}name(D){if(D===void 0)return this._name;return this._name=D,this}nameFromFilename(D){return this._name=PD.basename(D,PD.extname(D)),this}executableDir(D){if(D===void 0)return this._executableDir;return this._executableDir=D,this}helpInformation(D){let _=this.createHelp(),F=this._getOutputContext(D);_.prepareContext({error:F.error,helpWidth:F.helpWidth,outputHasColors:F.hasColors});let u=_.formatHelp(this,_);if(F.hasColors)return u;return this._outputConfiguration.stripColor(u)}_getOutputContext(D){D=D||{};let _=!!D.error,F,u,B;if(_)F=(C)=>this._outputConfiguration.writeErr(C),u=this._outputConfiguration.getErrHasColors(),B=this._outputConfiguration.getErrHelpWidth();else F=(C)=>this._outputConfiguration.writeOut(C),u=this._outputConfiguration.getOutHasColors(),B=this._outputConfiguration.getOutHelpWidth();return{error:_,write:(C)=>{if(!u)C=this._outputConfiguration.stripColor(C);return F(C)},hasColors:u,helpWidth:B}}outputHelp(D){let _;if(typeof D==="function")_=D,D=void 0;let F=this._getOutputContext(D),u={error:F.error,write:F.write,command:this};this._getCommandAndAncestors().reverse().forEach((E)=>E.emit("beforeAllHelp",u)),this.emit("beforeHelp",u);let B=this.helpInformation({error:F.error});if(_){if(B=_(B),typeof B!=="string"&&!Buffer.isBuffer(B))throw new Error("outputHelp callback must return a string or a Buffer")}if(F.write(B),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",u),this._getCommandAndAncestors().forEach((E)=>E.emit("afterAllHelp",u))}helpOption(D,_){if(typeof D==="boolean"){if(D)this._helpOption=this._helpOption??void 0;else this._helpOption=null;return this}return D=D??"-h, --help",_=_??"display help for command",this._helpOption=this.createOption(D,_),this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption(D){return this._helpOption=D,this}help(D){this.outputHelp(D);let _=Number(d.exitCode??0);if(_===0&&D&&typeof D!=="function"&&D.error)_=1;this._exit(_,"commander.help","(outputHelp)")}addHelpText(D,_){let F=["beforeAll","before","after","afterAll"];if(!F.includes(D))throw new Error(`Unexpected value for position to addHelpText.
|
|
26
|
+
Expecting one of '${F.join("', '")}'`);let u=`${D}Help`;return this.on(u,(B)=>{let E;if(typeof _==="function")E=_({error:B.error,command:B.command});else E=_;if(E)B.write(`${E}
|
|
27
|
+
`)}),this}_outputHelpIfRequested(D){let _=this._getHelpOption();if(_&&D.find((u)=>_.is(u)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function U3(D){return D.map((_)=>{if(!_.startsWith("--inspect"))return _;let F,u="127.0.0.1",B="9229",E;if((E=_.match(/^(--inspect(-brk)?)$/))!==null)F=E[1];else if((E=_.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(F=E[1],/^\d+$/.test(E[3]))B=E[3];else u=E[3];else if((E=_.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)F=E[1],u=E[3],B=E[4];if(F&&B!=="0")return`${F}=${u}:${parseInt(B)+1}`;return _})}function o0(){if(d.env.NO_COLOR||d.env.FORCE_COLOR==="0"||d.env.FORCE_COLOR==="false")return!1;if(d.env.FORCE_COLOR||d.env.CLICOLOR_FORCE!==void 0)return!0;return}r0.Command=s0;r0.useColor=o0});var N3=P((UD)=>{var{Argument:H3}=t2(),{Command:a0}=I3(),{CommanderError:c6,InvalidArgumentError:L3}=O2(),{Help:p6}=c0(),{Option:T3}=l0();UD.program=new a0;UD.createCommand=(D)=>new a0(D);UD.createOption=(D,_)=>new T3(D,_);UD.createArgument=(D,_)=>new H3(D,_);UD.Command=a0;UD.Option=T3;UD.Argument=H3;UD.Help=p6;UD.CommanderError=c6;UD.InvalidArgumentError=L3;UD.InvalidOptionArgumentError=L3});var S2=P((E7,S3)=>{var i6=require("node:tty"),n6=i6?.WriteStream?.prototype?.hasColors?.()??!1,v=(D,_)=>{if(!n6)return(B)=>B;let F=`\x1B[${D}m`,u=`\x1B[${_}m`;return(B)=>{let E=B+"",C=E.indexOf(u);if(C===-1)return F+E+u;let $=F,q=0;while(C!==-1)$+=E.slice(q,C)+F,q=C+u.length,C=E.indexOf(u,q);return $+=E.slice(q)+u,$}},y={};y.reset=v(0,0);y.bold=v(1,22);y.dim=v(2,22);y.italic=v(3,23);y.underline=v(4,24);y.overline=v(53,55);y.inverse=v(7,27);y.hidden=v(8,28);y.strikethrough=v(9,29);y.black=v(30,39);y.red=v(31,39);y.green=v(32,39);y.yellow=v(33,39);y.blue=v(34,39);y.magenta=v(35,39);y.cyan=v(36,39);y.white=v(37,39);y.gray=v(90,39);y.bgBlack=v(40,49);y.bgRed=v(41,49);y.bgGreen=v(42,49);y.bgYellow=v(43,49);y.bgBlue=v(44,49);y.bgMagenta=v(45,49);y.bgCyan=v(46,49);y.bgWhite=v(47,49);y.bgGray=v(100,49);y.redBright=v(91,39);y.greenBright=v(92,39);y.yellowBright=v(93,39);y.blueBright=v(94,39);y.magentaBright=v(95,39);y.cyanBright=v(96,39);y.whiteBright=v(97,39);y.bgRedBright=v(101,49);y.bgGreenBright=v(102,49);y.bgYellowBright=v(103,49);y.bgBlueBright=v(104,49);y.bgMagentaBright=v(105,49);y.bgCyanBright=v(106,49);y.bgWhiteBright=v(107,49);S3.exports=y});var f3=P((T7,b3)=>{b3.exports=_u;function Du(D){let _={defaultWidth:0,output:process.stdout,tty:require("tty")};if(!D)return _;return Object.keys(_).forEach(function(F){if(!D[F])D[F]=_[F]}),D}function _u(D){let _=Du(D);if(_.output.getWindowSize)return _.output.getWindowSize()[0]||_.defaultWidth;if(_.tty.getWindowSize)return _.tty.getWindowSize()[1]||_.defaultWidth;if(_.output.columns)return _.output.columns;if(process.env.CLI_WIDTH){let F=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(F)&&F!==0)return F}return _.defaultWidth}});var g3=P((N7,h3)=>{h3.exports=({onlyFirst:D=!1}={})=>{let _=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(_,D?void 0:"g")}});var C8=P((j7,m3)=>{var Fu=g3();m3.exports=(D)=>typeof D==="string"?D.replace(Fu(),""):D});var c3=P((z7,$8)=>{var d3=(D)=>{if(Number.isNaN(D))return!1;if(D>=4352&&(D<=4447||D===9001||D===9002||11904<=D&&D<=12871&&D!==12351||12880<=D&&D<=19903||19968<=D&&D<=42182||43360<=D&&D<=43388||44032<=D&&D<=55203||63744<=D&&D<=64255||65040<=D&&D<=65049||65072<=D&&D<=65131||65281<=D&&D<=65376||65504<=D&&D<=65510||110592<=D&&D<=110593||127488<=D&&D<=127569||131072<=D&&D<=262141))return!0;return!1};$8.exports=d3;$8.exports.default=d3});var l3=P((O7,p3)=>{p3.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var G8=P((Y7,q8)=>{var uu=C8(),Bu=c3(),Eu=l3(),i3=(D)=>{if(typeof D!=="string"||D.length===0)return 0;if(D=uu(D),D.length===0)return 0;D=D.replace(Eu()," ");let _=0;for(let F=0;F<D.length;F++){let u=D.codePointAt(F);if(u<=31||u>=127&&u<=159)continue;if(u>=768&&u<=879)continue;if(u>65535)F++;_+=Bu(u)?2:1}return _};q8.exports=i3;q8.exports.default=i3});var o3=P((w7,n3)=>{n3.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var X8=P((S7,r3)=>{var P2=o3(),s3={};for(let D of Object.keys(P2))s3[P2[D]]=D;var S={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};r3.exports=S;for(let D of Object.keys(S)){if(!("channels"in S[D]))throw new Error("missing channels property: "+D);if(!("labels"in S[D]))throw new Error("missing channel labels property: "+D);if(S[D].labels.length!==S[D].channels)throw new Error("channel and label counts mismatch: "+D);let{channels:_,labels:F}=S[D];delete S[D].channels,delete S[D].labels,Object.defineProperty(S[D],"channels",{value:_}),Object.defineProperty(S[D],"labels",{value:F})}S.rgb.hsl=function(D){let _=D[0]/255,F=D[1]/255,u=D[2]/255,B=Math.min(_,F,u),E=Math.max(_,F,u),C=E-B,$,q;if(E===B)$=0;else if(_===E)$=(F-u)/C;else if(F===E)$=2+(u-_)/C;else if(u===E)$=4+(_-F)/C;if($=Math.min($*60,360),$<0)$+=360;let Q=(B+E)/2;if(E===B)q=0;else if(Q<=0.5)q=C/(E+B);else q=C/(2-E-B);return[$,q*100,Q*100]};S.rgb.hsv=function(D){let _,F,u,B,E,C=D[0]/255,$=D[1]/255,q=D[2]/255,Q=Math.max(C,$,q),G=Q-Math.min(C,$,q),A=function(M){return(Q-M)/6/G+0.5};if(G===0)B=0,E=0;else{if(E=G/Q,_=A(C),F=A($),u=A(q),C===Q)B=u-F;else if($===Q)B=0.3333333333333333+_-u;else if(q===Q)B=0.6666666666666666+F-_;if(B<0)B+=1;else if(B>1)B-=1}return[B*360,E*100,Q*100]};S.rgb.hwb=function(D){let _=D[0],F=D[1],u=D[2],B=S.rgb.hsl(D)[0],E=0.00392156862745098*Math.min(_,Math.min(F,u));return u=1-0.00392156862745098*Math.max(_,Math.max(F,u)),[B,E*100,u*100]};S.rgb.cmyk=function(D){let _=D[0]/255,F=D[1]/255,u=D[2]/255,B=Math.min(1-_,1-F,1-u),E=(1-_-B)/(1-B)||0,C=(1-F-B)/(1-B)||0,$=(1-u-B)/(1-B)||0;return[E*100,C*100,$*100,B*100]};function Cu(D,_){return(D[0]-_[0])**2+(D[1]-_[1])**2+(D[2]-_[2])**2}S.rgb.keyword=function(D){let _=s3[D];if(_)return _;let F=1/0,u;for(let B of Object.keys(P2)){let E=P2[B],C=Cu(D,E);if(C<F)F=C,u=B}return u};S.keyword.rgb=function(D){return P2[D]};S.rgb.xyz=function(D){let _=D[0]/255,F=D[1]/255,u=D[2]/255;_=_>0.04045?((_+0.055)/1.055)**2.4:_/12.92,F=F>0.04045?((F+0.055)/1.055)**2.4:F/12.92,u=u>0.04045?((u+0.055)/1.055)**2.4:u/12.92;let B=_*0.4124+F*0.3576+u*0.1805,E=_*0.2126+F*0.7152+u*0.0722,C=_*0.0193+F*0.1192+u*0.9505;return[B*100,E*100,C*100]};S.rgb.lab=function(D){let _=S.rgb.xyz(D),F=_[0],u=_[1],B=_[2];F/=95.047,u/=100,B/=108.883,F=F>0.008856?F**0.3333333333333333:7.787*F+0.13793103448275862,u=u>0.008856?u**0.3333333333333333:7.787*u+0.13793103448275862,B=B>0.008856?B**0.3333333333333333:7.787*B+0.13793103448275862;let E=116*u-16,C=500*(F-u),$=200*(u-B);return[E,C,$]};S.hsl.rgb=function(D){let _=D[0]/360,F=D[1]/100,u=D[2]/100,B,E,C;if(F===0)return C=u*255,[C,C,C];if(u<0.5)B=u*(1+F);else B=u+F-u*F;let $=2*u-B,q=[0,0,0];for(let Q=0;Q<3;Q++){if(E=_+0.3333333333333333*-(Q-1),E<0)E++;if(E>1)E--;if(6*E<1)C=$+(B-$)*6*E;else if(2*E<1)C=B;else if(3*E<2)C=$+(B-$)*(0.6666666666666666-E)*6;else C=$;q[Q]=C*255}return q};S.hsl.hsv=function(D){let _=D[0],F=D[1]/100,u=D[2]/100,B=F,E=Math.max(u,0.01);u*=2,F*=u<=1?u:2-u,B*=E<=1?E:2-E;let C=(u+F)/2,$=u===0?2*B/(E+B):2*F/(u+F);return[_,$*100,C*100]};S.hsv.rgb=function(D){let _=D[0]/60,F=D[1]/100,u=D[2]/100,B=Math.floor(_)%6,E=_-Math.floor(_),C=255*u*(1-F),$=255*u*(1-F*E),q=255*u*(1-F*(1-E));switch(u*=255,B){case 0:return[u,q,C];case 1:return[$,u,C];case 2:return[C,u,q];case 3:return[C,$,u];case 4:return[q,C,u];case 5:return[u,C,$]}};S.hsv.hsl=function(D){let _=D[0],F=D[1]/100,u=D[2]/100,B=Math.max(u,0.01),E,C;C=(2-F)*u;let $=(2-F)*B;return E=F*B,E/=$<=1?$:2-$,E=E||0,C/=2,[_,E*100,C*100]};S.hwb.rgb=function(D){let _=D[0]/360,F=D[1]/100,u=D[2]/100,B=F+u,E;if(B>1)F/=B,u/=B;let C=Math.floor(6*_),$=1-u;if(E=6*_-C,(C&1)!==0)E=1-E;let q=F+E*($-F),Q,G,A;switch(C){default:case 6:case 0:Q=$,G=q,A=F;break;case 1:Q=q,G=$,A=F;break;case 2:Q=F,G=$,A=q;break;case 3:Q=F,G=q,A=$;break;case 4:Q=q,G=F,A=$;break;case 5:Q=$,G=F,A=q;break}return[Q*255,G*255,A*255]};S.cmyk.rgb=function(D){let _=D[0]/100,F=D[1]/100,u=D[2]/100,B=D[3]/100,E=1-Math.min(1,_*(1-B)+B),C=1-Math.min(1,F*(1-B)+B),$=1-Math.min(1,u*(1-B)+B);return[E*255,C*255,$*255]};S.xyz.rgb=function(D){let _=D[0]/100,F=D[1]/100,u=D[2]/100,B,E,C;return B=_*3.2406+F*-1.5372+u*-0.4986,E=_*-0.9689+F*1.8758+u*0.0415,C=_*0.0557+F*-0.204+u*1.057,B=B>0.0031308?1.055*B**0.4166666666666667-0.055:B*12.92,E=E>0.0031308?1.055*E**0.4166666666666667-0.055:E*12.92,C=C>0.0031308?1.055*C**0.4166666666666667-0.055:C*12.92,B=Math.min(Math.max(0,B),1),E=Math.min(Math.max(0,E),1),C=Math.min(Math.max(0,C),1),[B*255,E*255,C*255]};S.xyz.lab=function(D){let _=D[0],F=D[1],u=D[2];_/=95.047,F/=100,u/=108.883,_=_>0.008856?_**0.3333333333333333:7.787*_+0.13793103448275862,F=F>0.008856?F**0.3333333333333333:7.787*F+0.13793103448275862,u=u>0.008856?u**0.3333333333333333:7.787*u+0.13793103448275862;let B=116*F-16,E=500*(_-F),C=200*(F-u);return[B,E,C]};S.lab.xyz=function(D){let _=D[0],F=D[1],u=D[2],B,E,C;E=(_+16)/116,B=F/500+E,C=E-u/200;let $=E**3,q=B**3,Q=C**3;return E=$>0.008856?$:(E-0.13793103448275862)/7.787,B=q>0.008856?q:(B-0.13793103448275862)/7.787,C=Q>0.008856?Q:(C-0.13793103448275862)/7.787,B*=95.047,E*=100,C*=108.883,[B,E,C]};S.lab.lch=function(D){let _=D[0],F=D[1],u=D[2],B;if(B=Math.atan2(u,F)*360/2/Math.PI,B<0)B+=360;let C=Math.sqrt(F*F+u*u);return[_,C,B]};S.lch.lab=function(D){let _=D[0],F=D[1],B=D[2]/360*2*Math.PI,E=F*Math.cos(B),C=F*Math.sin(B);return[_,E,C]};S.rgb.ansi16=function(D,_=null){let[F,u,B]=D,E=_===null?S.rgb.hsv(D)[2]:_;if(E=Math.round(E/50),E===0)return 30;let C=30+(Math.round(B/255)<<2|Math.round(u/255)<<1|Math.round(F/255));if(E===2)C+=60;return C};S.hsv.ansi16=function(D){return S.rgb.ansi16(S.hsv.rgb(D),D[2])};S.rgb.ansi256=function(D){let _=D[0],F=D[1],u=D[2];if(_===F&&F===u){if(_<8)return 16;if(_>248)return 231;return Math.round((_-8)/247*24)+232}return 16+36*Math.round(_/255*5)+6*Math.round(F/255*5)+Math.round(u/255*5)};S.ansi16.rgb=function(D){let _=D%10;if(_===0||_===7){if(D>50)_+=3.5;return _=_/10.5*255,[_,_,_]}let F=(~~(D>50)+1)*0.5,u=(_&1)*F*255,B=(_>>1&1)*F*255,E=(_>>2&1)*F*255;return[u,B,E]};S.ansi256.rgb=function(D){if(D>=232){let E=(D-232)*10+8;return[E,E,E]}D-=16;let _,F=Math.floor(D/36)/5*255,u=Math.floor((_=D%36)/6)/5*255,B=_%6/5*255;return[F,u,B]};S.rgb.hex=function(D){let F=(((Math.round(D[0])&255)<<16)+((Math.round(D[1])&255)<<8)+(Math.round(D[2])&255)).toString(16).toUpperCase();return"000000".substring(F.length)+F};S.hex.rgb=function(D){let _=D.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!_)return[0,0,0];let F=_[0];if(_[0].length===3)F=F.split("").map(($)=>{return $+$}).join("");let u=parseInt(F,16),B=u>>16&255,E=u>>8&255,C=u&255;return[B,E,C]};S.rgb.hcg=function(D){let _=D[0]/255,F=D[1]/255,u=D[2]/255,B=Math.max(Math.max(_,F),u),E=Math.min(Math.min(_,F),u),C=B-E,$,q;if(C<1)$=E/(1-C);else $=0;if(C<=0)q=0;else if(B===_)q=(F-u)/C%6;else if(B===F)q=2+(u-_)/C;else q=4+(_-F)/C;return q/=6,q%=1,[q*360,C*100,$*100]};S.hsl.hcg=function(D){let _=D[1]/100,F=D[2]/100,u=F<0.5?2*_*F:2*_*(1-F),B=0;if(u<1)B=(F-0.5*u)/(1-u);return[D[0],u*100,B*100]};S.hsv.hcg=function(D){let _=D[1]/100,F=D[2]/100,u=_*F,B=0;if(u<1)B=(F-u)/(1-u);return[D[0],u*100,B*100]};S.hcg.rgb=function(D){let _=D[0]/360,F=D[1]/100,u=D[2]/100;if(F===0)return[u*255,u*255,u*255];let B=[0,0,0],E=_%1*6,C=E%1,$=1-C,q=0;switch(Math.floor(E)){case 0:B[0]=1,B[1]=C,B[2]=0;break;case 1:B[0]=$,B[1]=1,B[2]=0;break;case 2:B[0]=0,B[1]=1,B[2]=C;break;case 3:B[0]=0,B[1]=$,B[2]=1;break;case 4:B[0]=C,B[1]=0,B[2]=1;break;default:B[0]=1,B[1]=0,B[2]=$}return q=(1-F)*u,[(F*B[0]+q)*255,(F*B[1]+q)*255,(F*B[2]+q)*255]};S.hcg.hsv=function(D){let _=D[1]/100,F=D[2]/100,u=_+F*(1-_),B=0;if(u>0)B=_/u;return[D[0],B*100,u*100]};S.hcg.hsl=function(D){let _=D[1]/100,u=D[2]/100*(1-_)+0.5*_,B=0;if(u>0&&u<0.5)B=_/(2*u);else if(u>=0.5&&u<1)B=_/(2*(1-u));return[D[0],B*100,u*100]};S.hcg.hwb=function(D){let _=D[1]/100,F=D[2]/100,u=_+F*(1-_);return[D[0],(u-_)*100,(1-u)*100]};S.hwb.hcg=function(D){let _=D[1]/100,u=1-D[2]/100,B=u-_,E=0;if(B<1)E=(u-B)/(1-B);return[D[0],B*100,E*100]};S.apple.rgb=function(D){return[D[0]/65535*255,D[1]/65535*255,D[2]/65535*255]};S.rgb.apple=function(D){return[D[0]/255*65535,D[1]/255*65535,D[2]/255*65535]};S.gray.rgb=function(D){return[D[0]/100*255,D[0]/100*255,D[0]/100*255]};S.gray.hsl=function(D){return[0,0,D[0]]};S.gray.hsv=S.gray.hsl;S.gray.hwb=function(D){return[0,100,D[0]]};S.gray.cmyk=function(D){return[0,0,0,D[0]]};S.gray.lab=function(D){return[D[0],0,0]};S.gray.hex=function(D){let _=Math.round(D[0]/100*255)&255,u=((_<<16)+(_<<8)+_).toString(16).toUpperCase();return"000000".substring(u.length)+u};S.rgb.gray=function(D){return[(D[0]+D[1]+D[2])/3/255*100]}});var t3=P((P7,a3)=>{var u0=X8();function $u(){let D={},_=Object.keys(u0);for(let F=_.length,u=0;u<F;u++)D[_[u]]={distance:-1,parent:null};return D}function qu(D){let _=$u(),F=[D];_[D].distance=0;while(F.length){let u=F.pop(),B=Object.keys(u0[u]);for(let E=B.length,C=0;C<E;C++){let $=B[C],q=_[$];if(q.distance===-1)q.distance=_[u].distance+1,q.parent=u,F.unshift($)}}return _}function Gu(D,_){return function(F){return _(D(F))}}function Xu(D,_){let F=[_[D].parent,D],u=u0[_[D].parent][D],B=_[D].parent;while(_[B].parent)F.unshift(_[B].parent),u=Gu(u0[_[B].parent][B],u),B=_[B].parent;return u.conversion=F,u}a3.exports=function(D){let _=qu(D),F={},u=Object.keys(_);for(let B=u.length,E=0;E<B;E++){let C=u[E];if(_[C].parent===null)continue;F[C]=Xu(C,_)}return F}});var D_=P((x7,e3)=>{var Z8=X8(),Zu=t3(),Z2={},Ju=Object.keys(Z8);function Qu(D){let _=function(...F){let u=F[0];if(u===void 0||u===null)return u;if(u.length>1)F=u;return D(F)};if("conversion"in D)_.conversion=D.conversion;return _}function Au(D){let _=function(...F){let u=F[0];if(u===void 0||u===null)return u;if(u.length>1)F=u;let B=D(F);if(typeof B==="object")for(let E=B.length,C=0;C<E;C++)B[C]=Math.round(B[C]);return B};if("conversion"in D)_.conversion=D.conversion;return _}Ju.forEach((D)=>{Z2[D]={},Object.defineProperty(Z2[D],"channels",{value:Z8[D].channels}),Object.defineProperty(Z2[D],"labels",{value:Z8[D].labels});let _=Zu(D);Object.keys(_).forEach((u)=>{let B=_[u];Z2[D][u]=Au(B),Z2[D][u].raw=Qu(B)})});e3.exports=Z2});var C_=P((k7,E_)=>{var __=(D,_)=>(...F)=>{return`\x1B[${D(...F)+_}m`},F_=(D,_)=>(...F)=>{let u=D(...F);return`\x1B[${38+_};5;${u}m`},u_=(D,_)=>(...F)=>{let u=D(...F);return`\x1B[${38+_};2;${u[0]};${u[1]};${u[2]}m`},B0=(D)=>D,B_=(D,_,F)=>[D,_,F],J2=(D,_,F)=>{Object.defineProperty(D,_,{get:()=>{let u=F();return Object.defineProperty(D,_,{value:u,enumerable:!0,configurable:!0}),u},enumerable:!0,configurable:!0})},J8,Q2=(D,_,F,u)=>{if(J8===void 0)J8=D_();let B=u?10:0,E={};for(let[C,$]of Object.entries(J8)){let q=C==="ansi16"?"ansi":C;if(C===_)E[q]=D(F,B);else if(typeof $==="object")E[q]=D($[_],B)}return E};function Ku(){let D=new Map,_={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],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],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],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};_.color.gray=_.color.blackBright,_.bgColor.bgGray=_.bgColor.bgBlackBright,_.color.grey=_.color.blackBright,_.bgColor.bgGrey=_.bgColor.bgBlackBright;for(let[F,u]of Object.entries(_)){for(let[B,E]of Object.entries(u))_[B]={open:`\x1B[${E[0]}m`,close:`\x1B[${E[1]}m`},u[B]=_[B],D.set(E[0],E[1]);Object.defineProperty(_,F,{value:u,enumerable:!1})}return Object.defineProperty(_,"codes",{value:D,enumerable:!1}),_.color.close="\x1B[39m",_.bgColor.close="\x1B[49m",J2(_.color,"ansi",()=>Q2(__,"ansi16",B0,!1)),J2(_.color,"ansi256",()=>Q2(F_,"ansi256",B0,!1)),J2(_.color,"ansi16m",()=>Q2(u_,"rgb",B_,!1)),J2(_.bgColor,"ansi",()=>Q2(__,"ansi16",B0,!0)),J2(_.bgColor,"ansi256",()=>Q2(F_,"ansi256",B0,!0)),J2(_.bgColor,"ansi16m",()=>Q2(u_,"rgb",B_,!0)),_}Object.defineProperty(E_,"exports",{enumerable:!0,get:Ku})});var G_=P((y7,q_)=>{var x2=G8(),Wu=C8(),Mu=C_(),A8=new Set(["\x1B",""]),$_=(D)=>`${A8.values().next().value}[${D}m`,Ru=(D)=>D.split(" ").map((_)=>x2(_)),Q8=(D,_,F)=>{let u=[..._],B=!1,E=x2(Wu(D[D.length-1]));for(let[C,$]of u.entries()){let q=x2($);if(E+q<=F)D[D.length-1]+=$;else D.push($),E=0;if(A8.has($))B=!0;else if(B&&$==="m"){B=!1;continue}if(B)continue;if(E+=q,E===F&&C<u.length-1)D.push(""),E=0}if(!E&&D[D.length-1].length>0&&D.length>1)D[D.length-2]+=D.pop()},Vu=(D)=>{let _=D.split(" "),F=_.length;while(F>0){if(x2(_[F-1])>0)break;F--}if(F===_.length)return D;return _.slice(0,F).join(" ")+_.slice(F).join("")},Uu=(D,_,F={})=>{if(F.trim!==!1&&D.trim()==="")return"";let u="",B="",E,C=Ru(D),$=[""];for(let[q,Q]of D.split(" ").entries()){if(F.trim!==!1)$[$.length-1]=$[$.length-1].trimLeft();let G=x2($[$.length-1]);if(q!==0){if(G>=_&&(F.wordWrap===!1||F.trim===!1))$.push(""),G=0;if(G>0||F.trim===!1)$[$.length-1]+=" ",G++}if(F.hard&&C[q]>_){let A=_-G,M=1+Math.floor((C[q]-A-1)/_);if(Math.floor((C[q]-1)/_)<M)$.push("");Q8($,Q,_);continue}if(G+C[q]>_&&G>0&&C[q]>0){if(F.wordWrap===!1&&G<_){Q8($,Q,_);continue}$.push("")}if(G+C[q]>_&&F.wordWrap===!1){Q8($,Q,_);continue}$[$.length-1]+=Q}if(F.trim!==!1)$=$.map(Vu);u=$.join(`
|
|
28
|
+
`);for(let[q,Q]of[...u].entries()){if(B+=Q,A8.has(Q)){let A=parseFloat(/\d[^m]*/.exec(u.slice(q,q+4)));E=A===39?null:A}let G=Mu.codes.get(Number(E));if(E&&G){if(u[q+1]===`
|
|
29
|
+
`)B+=$_(G);else if(Q===`
|
|
30
|
+
`)B+=$_(E)}}return B};q_.exports=(D,_,F)=>{return String(D).normalize().replace(/\r\n/g,`
|
|
31
|
+
`).split(`
|
|
32
|
+
`).map((u)=>Uu(u,_,F)).join(`
|
|
33
|
+
`)}});var M_=P((i7,W_)=>{var Lu=require("stream");class K_ extends Lu{#F=null;constructor(D={}){super(D);this.writable=this.readable=!0,this.muted=!1,this.on("pipe",this._onpipe),this.replace=D.replace,this._prompt=D.prompt||null,this._hadControl=!1}#_(D,_){if(this._dest)return this._dest[D];if(this._src)return this._src[D];return _}#D(D,..._){if(typeof this._dest?.[D]==="function")this._dest[D](..._);if(typeof this._src?.[D]==="function")this._src[D](..._)}get isTTY(){if(this.#F!==null)return this.#F;return this.#_("isTTY",!1)}set isTTY(D){this.#F=D}get rows(){return this.#_("rows")}get columns(){return this.#_("columns")}mute(){this.muted=!0}unmute(){this.muted=!1}_onpipe(D){this._src=D}pipe(D,_){return this._dest=D,super.pipe(D,_)}pause(){if(this._src)return this._src.pause()}resume(){if(this._src)return this._src.resume()}write(D){if(this.muted){if(!this.replace)return!0;if(D.match(/^\u001b/)){if(D.indexOf(this._prompt)===0)D=D.slice(this._prompt.length),D=D.replace(/./g,this.replace),D=this._prompt+D;return this._hadControl=!0,this.emit("data",D)}else{if(this._prompt&&this._hadControl&&D.indexOf(this._prompt)===0)this._hadControl=!1,this.emit("data",this._prompt),D=D.slice(this._prompt.length);D=D.toString().replace(/./g,this.replace)}}this.emit("data",D)}end(D){if(this.muted)if(D&&this.replace)D=D.toString().replace(/./g,this.replace);else D=null;if(D)this.emit("data",D);this.emit("end")}destroy(...D){return this.#D("destroy",...D)}destroySoon(...D){return this.#D("destroySoon",...D)}close(...D){return this.#D("close",...D)}}W_.exports=K_});var U8=P((t7,V8)=>{var f=V8.exports;V8.exports.default=f;var c="\x1B[",v2="\x1B]",A2="\x07",$0=";",H_=process.env.TERM_PROGRAM==="Apple_Terminal";f.cursorTo=(D,_)=>{if(typeof D!=="number")throw new TypeError("The `x` argument is required");if(typeof _!=="number")return c+(D+1)+"G";return c+(_+1)+";"+(D+1)+"H"};f.cursorMove=(D,_)=>{if(typeof D!=="number")throw new TypeError("The `x` argument is required");let F="";if(D<0)F+=c+-D+"D";else if(D>0)F+=c+D+"C";if(_<0)F+=c+-_+"A";else if(_>0)F+=c+_+"B";return F};f.cursorUp=(D=1)=>c+D+"A";f.cursorDown=(D=1)=>c+D+"B";f.cursorForward=(D=1)=>c+D+"C";f.cursorBackward=(D=1)=>c+D+"D";f.cursorLeft=c+"G";f.cursorSavePosition=H_?"\x1B7":c+"s";f.cursorRestorePosition=H_?"\x1B8":c+"u";f.cursorGetPosition=c+"6n";f.cursorNextLine=c+"E";f.cursorPrevLine=c+"F";f.cursorHide=c+"?25l";f.cursorShow=c+"?25h";f.eraseLines=(D)=>{let _="";for(let F=0;F<D;F++)_+=f.eraseLine+(F<D-1?f.cursorUp():"");if(D)_+=f.cursorLeft;return _};f.eraseEndLine=c+"K";f.eraseStartLine=c+"1K";f.eraseLine=c+"2K";f.eraseDown=c+"J";f.eraseUp=c+"1J";f.eraseScreen=c+"2J";f.scrollUp=c+"S";f.scrollDown=c+"T";f.clearScreen="\x1Bc";f.clearTerminal=process.platform==="win32"?`${f.eraseScreen}${c}0f`:`${f.eraseScreen}${c}3J${c}H`;f.beep=A2;f.link=(D,_)=>{return[v2,"8",$0,$0,_,A2,D,v2,"8",$0,$0,A2].join("")};f.image=(D,_={})=>{let F=`${v2}1337;File=inline=1`;if(_.width)F+=`;width=${_.width}`;if(_.height)F+=`;height=${_.height}`;if(_.preserveAspectRatio===!1)F+=";preserveAspectRatio=0";return F+":"+D.toString("base64")+A2};f.iTerm={setCwd:(D=process.cwd())=>`${v2}50;CurrentDir=${D}${A2}`,annotation:(D,_={})=>{let F=`${v2}1337;`,u=typeof _.x!=="undefined",B=typeof _.y!=="undefined";if((u||B)&&!(u&&B&&typeof _.length!=="undefined"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");if(D=D.replace(/\|/g,""),F+=_.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",_.length>0)F+=(u?[D,_.length,_.x,_.y]:[_.length,D]).join("|");else F+=D;return F+A2}}});var k_=P((h4,x_)=>{var iD=require("constants"),ku=process.cwd,Z0=null,yu=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!Z0)Z0=ku.call(process);return Z0};try{process.cwd()}catch(D){}if(typeof process.chdir==="function"){if(N8=process.chdir,process.chdir=function(D){Z0=null,N8.call(process,D)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,N8)}var N8;x_.exports=vu;function vu(D){if(iD.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))_(D);if(!D.lutimes)F(D);if(D.chown=E(D.chown),D.fchown=E(D.fchown),D.lchown=E(D.lchown),D.chmod=u(D.chmod),D.fchmod=u(D.fchmod),D.lchmod=u(D.lchmod),D.chownSync=C(D.chownSync),D.fchownSync=C(D.fchownSync),D.lchownSync=C(D.lchownSync),D.chmodSync=B(D.chmodSync),D.fchmodSync=B(D.fchmodSync),D.lchmodSync=B(D.lchmodSync),D.stat=$(D.stat),D.fstat=$(D.fstat),D.lstat=$(D.lstat),D.statSync=q(D.statSync),D.fstatSync=q(D.fstatSync),D.lstatSync=q(D.lstatSync),D.chmod&&!D.lchmod)D.lchmod=function(G,A,M){if(M)process.nextTick(M)},D.lchmodSync=function(){};if(D.chown&&!D.lchown)D.lchown=function(G,A,M,J){if(J)process.nextTick(J)},D.lchownSync=function(){};if(yu==="win32")D.rename=typeof D.rename!=="function"?D.rename:function(G){function A(M,J,X){var W=Date.now(),K=0;G(M,J,function R(V){if(V&&(V.code==="EACCES"||V.code==="EPERM"||V.code==="EBUSY")&&Date.now()-W<60000){if(setTimeout(function(){D.stat(J,function(Z,U){if(Z&&Z.code==="ENOENT")G(M,J,R);else X(V)})},K),K<100)K+=10;return}if(X)X(V)})}if(Object.setPrototypeOf)Object.setPrototypeOf(A,G);return A}(D.rename);D.read=typeof D.read!=="function"?D.read:function(G){function A(M,J,X,W,K,R){var V;if(R&&typeof R==="function"){var Z=0;V=function(U,I,N){if(U&&U.code==="EAGAIN"&&Z<10)return Z++,G.call(D,M,J,X,W,K,V);R.apply(this,arguments)}}return G.call(D,M,J,X,W,K,V)}if(Object.setPrototypeOf)Object.setPrototypeOf(A,G);return A}(D.read),D.readSync=typeof D.readSync!=="function"?D.readSync:function(G){return function(A,M,J,X,W){var K=0;while(!0)try{return G.call(D,A,M,J,X,W)}catch(R){if(R.code==="EAGAIN"&&K<10){K++;continue}throw R}}}(D.readSync);function _(G){G.lchmod=function(A,M,J){G.open(A,iD.O_WRONLY|iD.O_SYMLINK,M,function(X,W){if(X){if(J)J(X);return}G.fchmod(W,M,function(K){G.close(W,function(R){if(J)J(K||R)})})})},G.lchmodSync=function(A,M){var J=G.openSync(A,iD.O_WRONLY|iD.O_SYMLINK,M),X=!0,W;try{W=G.fchmodSync(J,M),X=!1}finally{if(X)try{G.closeSync(J)}catch(K){}else G.closeSync(J)}return W}}function F(G){if(iD.hasOwnProperty("O_SYMLINK")&&G.futimes)G.lutimes=function(A,M,J,X){G.open(A,iD.O_SYMLINK,function(W,K){if(W){if(X)X(W);return}G.futimes(K,M,J,function(R){G.close(K,function(V){if(X)X(R||V)})})})},G.lutimesSync=function(A,M,J){var X=G.openSync(A,iD.O_SYMLINK),W,K=!0;try{W=G.futimesSync(X,M,J),K=!1}finally{if(K)try{G.closeSync(X)}catch(R){}else G.closeSync(X)}return W};else if(G.futimes)G.lutimes=function(A,M,J,X){if(X)process.nextTick(X)},G.lutimesSync=function(){}}function u(G){if(!G)return G;return function(A,M,J){return G.call(D,A,M,function(X){if(Q(X))X=null;if(J)J.apply(this,arguments)})}}function B(G){if(!G)return G;return function(A,M){try{return G.call(D,A,M)}catch(J){if(!Q(J))throw J}}}function E(G){if(!G)return G;return function(A,M,J,X){return G.call(D,A,M,J,function(W){if(Q(W))W=null;if(X)X.apply(this,arguments)})}}function C(G){if(!G)return G;return function(A,M,J){try{return G.call(D,A,M,J)}catch(X){if(!Q(X))throw X}}}function $(G){if(!G)return G;return function(A,M,J){if(typeof M==="function")J=M,M=null;function X(W,K){if(K){if(K.uid<0)K.uid+=4294967296;if(K.gid<0)K.gid+=4294967296}if(J)J.apply(this,arguments)}return M?G.call(D,A,M,X):G.call(D,A,X)}}function q(G){if(!G)return G;return function(A,M){var J=M?G.call(D,A,M):G.call(D,A);if(J){if(J.uid<0)J.uid+=4294967296;if(J.gid<0)J.gid+=4294967296}return J}}function Q(G){if(!G)return!0;if(G.code==="ENOSYS")return!0;var A=!process.getuid||process.getuid()!==0;if(A){if(G.code==="EINVAL"||G.code==="EPERM")return!0}return!1}}});var b_=P((g4,v_)=>{var y_=require("stream").Stream;v_.exports=bu;function bu(D){return{ReadStream:_,WriteStream:F};function _(u,B){if(!(this instanceof _))return new _(u,B);y_.call(this);var E=this;this.path=u,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,B=B||{};var C=Object.keys(B);for(var $=0,q=C.length;$<q;$++){var Q=C[$];this[Q]=B[Q]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!=="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){E._read()});return}D.open(this.path,this.flags,this.mode,function(G,A){if(G){E.emit("error",G),E.readable=!1;return}E.fd=A,E.emit("open",A),E._read()})}function F(u,B){if(!(this instanceof F))return new F(u,B);y_.call(this),this.path=u,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,B=B||{};var E=Object.keys(B);for(var C=0,$=E.length;C<$;C++){var q=E[C];this[q]=B[q]}if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=D.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var h_=P((m4,f_)=>{f_.exports=hu;var fu=Object.getPrototypeOf||function(D){return D.__proto__};function hu(D){if(D===null||typeof D!=="object")return D;if(D instanceof Object)var _={__proto__:fu(D)};else var _=Object.create(null);return Object.getOwnPropertyNames(D).forEach(function(F){Object.defineProperty(_,F,Object.getOwnPropertyDescriptor(D,F))}),_}});var c_=P((d4,O8)=>{var DD=require("fs"),gu=k_(),mu=b_(),du=h_(),J0=require("util"),JD,A0;if(typeof Symbol==="function"&&typeof Symbol.for==="function")JD=Symbol.for("graceful-fs.queue"),A0=Symbol.for("graceful-fs.previous");else JD="___graceful-fs.queue",A0="___graceful-fs.previous";function cu(){}function d_(D,_){Object.defineProperty(D,JD,{get:function(){return _}})}var B2=cu;if(J0.debuglog)B2=J0.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))B2=function(){var D=J0.format.apply(J0,arguments);D="GFS4: "+D.split(/\n/).join(`
|
|
34
|
+
GFS4: `),console.error(D)};if(!DD[JD]){if(g_=global[JD]||[],d_(DD,g_),DD.close=function(D){function _(F,u){return D.call(DD,F,function(B){if(!B)m_();if(typeof u==="function")u.apply(this,arguments)})}return Object.defineProperty(_,A0,{value:D}),_}(DD.close),DD.closeSync=function(D){function _(F){D.apply(DD,arguments),m_()}return Object.defineProperty(_,A0,{value:D}),_}(DD.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){B2(DD[JD]),require("assert").equal(DD[JD].length,0)})}var g_;if(!global[JD])d_(global,DD[JD]);O8.exports=j8(du(DD));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!DD.__patched)O8.exports=j8(DD),DD.__patched=!0;function j8(D){gu(D),D.gracefulify=j8,D.createReadStream=I,D.createWriteStream=N;var _=D.readFile;D.readFile=F;function F(T,w,O){if(typeof w==="function")O=w,w=null;return h(T,w,O);function h(g,t,i,n){return _(g,t,function(o){if(o&&(o.code==="EMFILE"||o.code==="ENFILE"))M2([h,[g,t,i],o,n||Date.now(),Date.now()]);else if(typeof i==="function")i.apply(this,arguments)})}}var u=D.writeFile;D.writeFile=B;function B(T,w,O,h){if(typeof O==="function")h=O,O=null;return g(T,w,O,h);function g(t,i,n,o,ZD){return u(t,i,n,function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))M2([g,[t,i,n,o],r,ZD||Date.now(),Date.now()]);else if(typeof o==="function")o.apply(this,arguments)})}}var E=D.appendFile;if(E)D.appendFile=C;function C(T,w,O,h){if(typeof O==="function")h=O,O=null;return g(T,w,O,h);function g(t,i,n,o,ZD){return E(t,i,n,function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))M2([g,[t,i,n,o],r,ZD||Date.now(),Date.now()]);else if(typeof o==="function")o.apply(this,arguments)})}}var $=D.copyFile;if($)D.copyFile=q;function q(T,w,O,h){if(typeof O==="function")h=O,O=0;return g(T,w,O,h);function g(t,i,n,o,ZD){return $(t,i,n,function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))M2([g,[t,i,n,o],r,ZD||Date.now(),Date.now()]);else if(typeof o==="function")o.apply(this,arguments)})}}var Q=D.readdir;D.readdir=A;var G=/^v[0-5]\./;function A(T,w,O){if(typeof w==="function")O=w,w=null;var h=G.test(process.version)?function t(i,n,o,ZD){return Q(i,g(i,n,o,ZD))}:function t(i,n,o,ZD){return Q(i,n,g(i,n,o,ZD))};return h(T,w,O);function g(t,i,n,o){return function(ZD,r){if(ZD&&(ZD.code==="EMFILE"||ZD.code==="ENFILE"))M2([h,[t,i,n],ZD,o||Date.now(),Date.now()]);else{if(r&&r.sort)r.sort();if(typeof n==="function")n.call(this,ZD,r)}}}}if(process.version.substr(0,4)==="v0.8"){var M=mu(D);R=M.ReadStream,Z=M.WriteStream}var J=D.ReadStream;if(J)R.prototype=Object.create(J.prototype),R.prototype.open=V;var X=D.WriteStream;if(X)Z.prototype=Object.create(X.prototype),Z.prototype.open=U;Object.defineProperty(D,"ReadStream",{get:function(){return R},set:function(T){R=T},enumerable:!0,configurable:!0}),Object.defineProperty(D,"WriteStream",{get:function(){return Z},set:function(T){Z=T},enumerable:!0,configurable:!0});var W=R;Object.defineProperty(D,"FileReadStream",{get:function(){return W},set:function(T){W=T},enumerable:!0,configurable:!0});var K=Z;Object.defineProperty(D,"FileWriteStream",{get:function(){return K},set:function(T){K=T},enumerable:!0,configurable:!0});function R(T,w){if(this instanceof R)return J.apply(this,arguments),this;else return R.apply(Object.create(R.prototype),arguments)}function V(){var T=this;x(T.path,T.flags,T.mode,function(w,O){if(w){if(T.autoClose)T.destroy();T.emit("error",w)}else T.fd=O,T.emit("open",O),T.read()})}function Z(T,w){if(this instanceof Z)return X.apply(this,arguments),this;else return Z.apply(Object.create(Z.prototype),arguments)}function U(){var T=this;x(T.path,T.flags,T.mode,function(w,O){if(w)T.destroy(),T.emit("error",w);else T.fd=O,T.emit("open",O)})}function I(T,w){return new D.ReadStream(T,w)}function N(T,w){return new D.WriteStream(T,w)}var j=D.open;D.open=x;function x(T,w,O,h){if(typeof O==="function")h=O,O=null;return g(T,w,O,h);function g(t,i,n,o,ZD){return j(t,i,n,function(r,S9){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))M2([g,[t,i,n,o],r,ZD||Date.now(),Date.now()]);else if(typeof o==="function")o.apply(this,arguments)})}}return D}function M2(D){B2("ENQUEUE",D[0].name,D[1]),DD[JD].push(D),z8()}var Q0;function m_(){var D=Date.now();for(var _=0;_<DD[JD].length;++_)if(DD[JD][_].length>2)DD[JD][_][3]=D,DD[JD][_][4]=D;z8()}function z8(){if(clearTimeout(Q0),Q0=void 0,DD[JD].length===0)return;var D=DD[JD].shift(),_=D[0],F=D[1],u=D[2],B=D[3],E=D[4];if(B===void 0)B2("RETRY",_.name,F),_.apply(null,F);else if(Date.now()-B>=60000){B2("TIMEOUT",_.name,F);var C=F.pop();if(typeof C==="function")C.call(null,u)}else{var $=Date.now()-E,q=Math.max(E-B,1),Q=Math.min(q*1.2,100);if($>=Q)B2("RETRY",_.name,F),_.apply(null,F.concat([B]));else DD[JD].push(D)}if(Q0===void 0)Q0=setTimeout(z8,0)}});var SF=P((rB,wF)=>{class YF{constructor(D,_,F){this.etaBufferLength=D||100,this.valueBuffer=[F],this.timeBuffer=[_],this.eta="0"}update(D,_,F){this.valueBuffer.push(_),this.timeBuffer.push(D),this.calculate(F-_)}getTime(){return this.eta}calculate(D){let _=this.valueBuffer.length,F=Math.min(this.etaBufferLength,_),u=this.valueBuffer[_-1]-this.valueBuffer[_-F],B=this.timeBuffer[_-1]-this.timeBuffer[_-F],E=u/B;this.valueBuffer=this.valueBuffer.slice(-this.etaBufferLength),this.timeBuffer=this.timeBuffer.slice(-this.etaBufferLength);let C=Math.ceil(D/E/1000);if(isNaN(C))this.eta="NULL";else if(!isFinite(C))this.eta="INF";else if(C>1e7)this.eta="INF";else if(C<0)this.eta=0;else this.eta=C}}wF.exports=YF});var c8=P((aB,xF)=>{var q2=require("readline");class PF{constructor(D){this.stream=D,this.linewrap=!0,this.dy=0}cursorSave(){if(!this.stream.isTTY)return;this.stream.write("\x1B7")}cursorRestore(){if(!this.stream.isTTY)return;this.stream.write("\x1B8")}cursor(D){if(!this.stream.isTTY)return;if(D)this.stream.write("\x1B[?25h");else this.stream.write("\x1B[?25l")}cursorTo(D=null,_=null){if(!this.stream.isTTY)return;q2.cursorTo(this.stream,D,_)}cursorRelative(D=null,_=null){if(!this.stream.isTTY)return;this.dy=this.dy+_,q2.moveCursor(this.stream,D,_)}cursorRelativeReset(){if(!this.stream.isTTY)return;q2.moveCursor(this.stream,0,-this.dy),q2.cursorTo(this.stream,0,null),this.dy=0}clearRight(){if(!this.stream.isTTY)return;q2.clearLine(this.stream,1)}clearLine(){if(!this.stream.isTTY)return;q2.clearLine(this.stream,0)}clearBottom(){if(!this.stream.isTTY)return;q2.clearScreenDown(this.stream)}newline(){this.stream.write(`
|
|
35
|
+
`),this.dy++}write(D,_=!1){if(this.linewrap===!0&&_===!1)this.stream.write(D.substr(0,this.getWidth()));else this.stream.write(D)}lineWrapping(D){if(!this.stream.isTTY)return;if(this.linewrap=D,D)this.stream.write("\x1B[?7h");else this.stream.write("\x1B[?7l")}isTTY(){return this.stream.isTTY===!0}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}}xF.exports=PF});var p8=P((tB,kF)=>{kF.exports=function D(_,F,u){if(F.autopadding!==!0)return _;function B(E,C){return(F.autopaddingChar+E).slice(-C)}switch(u){case"percentage":return B(_,3);default:return _}}});var l8=P((eB,yF)=>{yF.exports=function D(_,F){let u=Math.round(_*F.barsize),B=F.barsize-u;return F.barCompleteString.substr(0,u)+F.barGlue+F.barIncompleteString.substr(0,B)}});var i8=P((DE,vF)=>{vF.exports=function D(_,F,u){function B(C){if(u)return u*Math.round(C/u);else return C}function E(C){return(F.autopaddingChar+C).slice(-2)}if(_>3600)return E(Math.floor(_/3600))+"h"+E(B(_%3600/60))+"m";else if(_>60)return E(Math.floor(_/60))+"m"+E(B(_%60))+"s";else if(_>10)return E(B(_))+"s";else return E(_)+"s"}});var n8=P((_E,bF)=>{var Z5=G8(),J5=p8(),Q5=l8(),A5=i8();bF.exports=function D(_,F,u){let B=_.format,E=_.formatTime||A5,C=_.formatValue||J5,$=_.formatBar||Q5,q=Math.floor(F.progress*100)+"",Q=F.stopTime||Date.now(),G=Math.round((Q-F.startTime)/1000),A=Object.assign({},u,{bar:$(F.progress,_),percentage:C(q,_,"percentage"),total:C(F.total,_,"total"),value:C(F.value,_,"value"),eta:C(F.eta,_,"eta"),eta_formatted:E(F.eta,_,5),duration:C(G,_,"duration"),duration_formatted:E(G,_,1)});B=B.replace(/\{(\w+)\}/g,function(X,W){if(typeof A[W]!=="undefined")return A[W];return X});let M=Math.max(0,F.maxWidth-Z5(B)-2),J=Math.floor(M/2);switch(_.align){case"right":B=M>0?" ".repeat(M)+B:B;break;case"center":B=J>0?" ".repeat(J)+B:B;break;case"left":default:break}return B}});var N0=P((FE,fF)=>{function l(D,_){if(typeof D==="undefined"||D===null)return _;else return D}fF.exports={parse:function D(_,F){let u={},B=Object.assign({},F,_);return u.throttleTime=1000/l(B.fps,10),u.stream=l(B.stream,process.stderr),u.terminal=l(B.terminal,null),u.clearOnComplete=l(B.clearOnComplete,!1),u.stopOnComplete=l(B.stopOnComplete,!1),u.barsize=l(B.barsize,40),u.align=l(B.align,"left"),u.hideCursor=l(B.hideCursor,!1),u.linewrap=l(B.linewrap,!1),u.barGlue=l(B.barGlue,""),u.barCompleteChar=l(B.barCompleteChar,"="),u.barIncompleteChar=l(B.barIncompleteChar,"-"),u.format=l(B.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),u.formatTime=l(B.formatTime,null),u.formatValue=l(B.formatValue,null),u.formatBar=l(B.formatBar,null),u.etaBufferLength=l(B.etaBuffer,10),u.etaAsynchronousUpdate=l(B.etaAsynchronousUpdate,!1),u.progressCalculationRelative=l(B.progressCalculationRelative,!1),u.synchronousUpdate=l(B.synchronousUpdate,!0),u.noTTYOutput=l(B.noTTYOutput,!1),u.notTTYSchedule=l(B.notTTYSchedule,2000),u.emptyOnZero=l(B.emptyOnZero,!1),u.forceRedraw=l(B.forceRedraw,!1),u.autopadding=l(B.autopadding,!1),u.gracefulExit=l(B.gracefulExit,!1),u},assignDerivedOptions:function D(_){return _.barCompleteString=_.barCompleteChar.repeat(_.barsize+1),_.barIncompleteString=_.barIncompleteChar.repeat(_.barsize+1),_.autopaddingChar=_.autopadding?l(_.autopaddingChar," "):"",_}}});var o8=P((uE,gF)=>{var hF=SF(),K5=c8(),W5=n8(),M5=N0(),R5=require("events");gF.exports=class D extends R5{constructor(_){super();this.options=M5.assignDerivedOptions(_),this.terminal=this.options.terminal?this.options.terminal:new K5(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new hF(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format==="function"?this.options.format:W5}render(_=!1){let F={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};if(this.options.etaAsynchronousUpdate)this.updateETA();let u=this.formatter(this.options,F,this.payload);if(_||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=u)this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(u),this.terminal.clearRight(),this.lastDrawnString=u,this.lastRedraw=Date.now(),this.emit("redraw-post")}start(_,F,u){this.value=F||0,this.total=typeof _!=="undefined"&&_>=0?_:100,this.startValue=F||0,this.payload=u||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new hF(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",_,F)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(_,F={}){if(typeof _==="number")this.value=_,this.eta.update(Date.now(),_,this.total);let u=(typeof _==="object"?_:F)||{};this.emit("update",this.total,this.value);for(let B in u)this.payload[B]=u[B];if(this.value>=this.getTotal()&&this.options.stopOnComplete)this.stop()}getProgress(){let _=this.value/this.total;if(this.options.progressCalculationRelative)_=(this.value-this.startValue)/(this.total-this.startValue);if(isNaN(_))_=this.options&&this.options.emptyOnZero?0:1;return _=Math.min(Math.max(_,0),1),_}increment(_=1,F={}){if(typeof _==="object")this.update(this.value+1,_);else this.update(this.value+_,F)}getTotal(){return this.total}setTotal(_){if(typeof _!=="undefined"&&_>=0)this.total=_}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var dF=P((BE,mF)=>{var V5=o8(),U5=N0();mF.exports=class D extends V5{constructor(_,F){super(U5.parse(_,F));if(this.timer=null,this.options.noTTYOutput&&this.terminal.isTTY()===!1)this.options.synchronousUpdate=!1;this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){if(this.timer)clearTimeout(this.timer),this.timer=null;if(super.render(),this.options.noTTYOutput&&this.terminal.isTTY()===!1)this.terminal.newline();this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(_,F){if(!this.timer)return;if(super.update(_,F),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now())this.render()}start(_,F,u){if(this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1)return;if(this.sigintCallback===null&&this.options.gracefulExit)this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback);if(this.terminal.cursorSave(),this.options.hideCursor===!0)this.terminal.cursor(!1);if(this.options.linewrap===!1)this.terminal.lineWrapping(!1);super.start(_,F,u),this.render()}stop(){if(!this.timer)return;if(this.sigintCallback)process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null;if(this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,this.options.hideCursor===!0)this.terminal.cursor(!0);if(this.options.linewrap===!1)this.terminal.lineWrapping(!0);if(this.terminal.cursorRestore(),this.options.clearOnComplete)this.terminal.cursorTo(0,null),this.terminal.clearLine();else this.terminal.newline()}}});var pF=P((EE,cF)=>{var I5=c8(),H5=o8(),L5=N0(),T5=require("events");cF.exports=class D extends T5{constructor(_,F){super();this.bars=[],this.options=L5.parse(_,F),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new I5(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(_,F,u,B={}){let E=new H5(Object.assign({},this.options,{terminal:this.terminal},B));if(this.bars.push(E),this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1)return E;if(this.sigintCallback===null&&this.options.gracefulExit)this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback);if(!this.isActive){if(this.options.hideCursor===!0)this.terminal.cursor(!1);if(this.options.linewrap===!1)this.terminal.lineWrapping(!1);this.timer=setTimeout(this.update.bind(this),this.schedulingRate)}return this.isActive=!0,E.start(_,F,u),this.emit("start"),E}remove(_){let F=this.bars.indexOf(_);if(F<0)return!1;return this.bars.splice(F,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0}update(){if(this.timer)clearTimeout(this.timer),this.timer=null;if(this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0){this.terminal.clearLine();while(this.loggingBuffer.length>0)this.terminal.write(this.loggingBuffer.shift(),!0)}for(let _=0;_<this.bars.length;_++){if(_>0)this.terminal.newline();this.bars[_].render()}if(this.emit("redraw-post"),this.options.noTTYOutput&&this.terminal.isTTY()===!1)this.terminal.newline(),this.terminal.newline();if(this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find((_)=>_.isActive))this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback)process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null;if(this.isActive=!1,this.options.hideCursor===!0)this.terminal.cursor(!0);if(this.options.linewrap===!1)this.terminal.lineWrapping(!0);if(this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let _=0;_<this.bars.length;_++){if(_>0)this.terminal.newline();this.bars[_].render(),this.bars[_].stop()}this.terminal.newline()}this.emit("stop")}log(_){this.loggingBuffer.push(_)}}});var iF=P((CE,lF)=>{lF.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var oF=P(($E,nF)=>{nF.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"█",barIncompleteChar:"░"}});var rF=P((qE,sF)=>{sF.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"█",barIncompleteChar:"░"}});var tF=P((GE,aF)=>{aF.exports={format:" {bar}■ {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"■",barIncompleteChar:" "}});var D1=P((XE,eF)=>{var N5=iF(),j5=oF(),z5=rF(),O5=tF();eF.exports={legacy:N5,shades_classic:j5,shades_grey:z5,rect:O5}});var u1=P((ZE,F1)=>{var _1=dF(),Y5=pF(),w5=D1(),S5=n8(),P5=p8(),x5=l8(),k5=i8();F1.exports={Bar:_1,SingleBar:_1,MultiBar:Y5,Presets:w5,Format:{Formatter:S5,BarFormat:x5,ValueFormat:P5,TimeFormat:k5}}});var r8=P((ME,G1)=>{/*! arch. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var $1=require("child_process"),q1=require("fs"),f5=require("path");G1.exports=function D(){if(process.arch==="x64")return"x64";if(process.platform==="darwin"){var _=process.arch==="arm64",F=$1.execSync("sysctl -in sysctl.proc_translated",{encoding:"utf8"})===`1
|
|
36
|
+
`;return _||F?"arm64":"x64"}if(process.platform==="win32"){var u=!1;try{u=!!(process.env.SYSTEMROOT&&q1.statSync(process.env.SYSTEMROOT))}catch($){}var B=u?process.env.SYSTEMROOT:"C:\\Windows",E=!1;try{E=!!q1.statSync(f5.join(B,"sysnative"))}catch($){}return E?"x64":"x86"}if(process.platform==="linux"){var C=$1.execSync("getconf LONG_BIT",{encoding:"utf8"});return C===`64
|
|
37
|
+
`?"x64":"x86"}return"x86"}});var a8=P((VE,A1)=>{A1.exports={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,END64HDR:20,END64SIG:117853008,END64START:4,END64OFF:8,END64NUMDISKS:16,ZIP64SIG:101075792,ZIP64HDR:56,ZIP64LEAD:12,ZIP64SIZE:4,ZIP64VEM:12,ZIP64VER:14,ZIP64DSK:16,ZIP64DSKDIR:20,ZIP64SUB:24,ZIP64TOT:32,ZIP64SIZB:40,ZIP64OFF:48,ZIP64EXTRA:56,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,AES_ENCRYPT:99,FLG_ENC:1,FLG_COMP1:2,FLG_COMP2:4,FLG_DESC:8,FLG_ENH:16,FLG_PATCH:32,FLG_STR:64,FLG_EFS:2048,FLG_MSK:4096,FILE:2,BUFFER:1,NONE:0,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24}});var O0=P((W1)=>{var K1={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",DESCRIPTOR_NOT_EXIST:"No descriptor present",DESCRIPTOR_UNKNOWN:"Unknown descriptor format",DESCRIPTOR_FAULTY:"Descriptor data is malformed",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed {0}",FILE_IN_THE_WAY:"There is a file in the way: {0}",UNKNOWN_METHOD:"Invalid/unsupported compression method",AVAIL_DATA:"inflate::Available inflate data did not terminate",INVALID_DISTANCE:"inflate::Invalid literal/length or distance code in fixed or dynamic block",TO_MANY_CODES:"inflate::Dynamic block code description: too many length or distance codes",INVALID_REPEAT_LEN:"inflate::Dynamic block code description: repeat more than specified lengths",INVALID_REPEAT_FIRST:"inflate::Dynamic block code description: repeat lengths with no first length",INCOMPLETE_CODES:"inflate::Dynamic block code description: code lengths codes incomplete",INVALID_DYN_DISTANCE:"inflate::Dynamic block code description: invalid distance code lengths",INVALID_CODES_LEN:"inflate::Dynamic block code description: invalid literal/length code lengths",INVALID_STORE_BLOCK:"inflate::Stored block length did not match one's complement",INVALID_BLOCK_TYPE:"inflate::Invalid block type (type == 3)",CANT_EXTRACT_FILE:"Could not extract the file",CANT_OVERRIDE:"Target file already exists",DISK_ENTRY_TOO_LARGE:"Number of disk entries is too large",NO_ZIP:"No zip file was loaded",NO_ENTRY:"Entry doesn't exist",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:'File not found: "{0}"',NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found",INVALID_PASS_PARAM:"Incompatible password parameter",WRONG_PASSWORD:"Wrong Password",COMMENT_TOO_LONG:"Comment is too long",EXTRA_FIELD_PARSE_ERROR:"Extra field parsing error"};function h5(D){return function(..._){if(_.length)D=D.replace(/\{(\d)\}/g,(F,u)=>_[u]||"");return new Error("ADM-ZIP: "+D)}}for(let D of Object.keys(K1))W1[D]=h5(K1[D])});var I1=P((IE,U1)=>{var g5=require("fs"),GD=require("path"),M1=a8(),m5=O0(),d5=typeof process==="object"&&process.platform==="win32",R1=(D)=>typeof D==="object"&&D!==null,V1=new Uint32Array(256).map((D,_)=>{for(let F=0;F<8;F++)if((_&1)!==0)_=3988292384^_>>>1;else _>>>=1;return _>>>0});function ED(D){if(this.sep=GD.sep,this.fs=g5,R1(D)){if(R1(D.fs)&&typeof D.fs.statSync==="function")this.fs=D.fs}}U1.exports=ED;ED.prototype.makeDir=function(D){let _=this;function F(u){let B=u.split(_.sep)[0];u.split(_.sep).forEach(function(E){if(!E||E.substr(-1,1)===":")return;B+=_.sep+E;var C;try{C=_.fs.statSync(B)}catch($){_.fs.mkdirSync(B)}if(C&&C.isFile())throw m5.FILE_IN_THE_WAY(`"${B}"`)})}F(D)};ED.prototype.writeFileTo=function(D,_,F,u){let B=this;if(B.fs.existsSync(D)){if(!F)return!1;var E=B.fs.statSync(D);if(E.isDirectory())return!1}var C=GD.dirname(D);if(!B.fs.existsSync(C))B.makeDir(C);var $;try{$=B.fs.openSync(D,"w",438)}catch(q){B.fs.chmodSync(D,438),$=B.fs.openSync(D,"w",438)}if($)try{B.fs.writeSync($,_,0,_.length,0)}finally{B.fs.closeSync($)}return B.fs.chmodSync(D,u||438),!0};ED.prototype.writeFileToAsync=function(D,_,F,u,B){if(typeof u==="function")B=u,u=void 0;let E=this;E.fs.exists(D,function(C){if(C&&!F)return B(!1);E.fs.stat(D,function($,q){if(C&&q.isDirectory())return B(!1);var Q=GD.dirname(D);E.fs.exists(Q,function(G){if(!G)E.makeDir(Q);E.fs.open(D,"w",438,function(A,M){if(A)E.fs.chmod(D,438,function(){E.fs.open(D,"w",438,function(J,X){E.fs.write(X,_,0,_.length,0,function(){E.fs.close(X,function(){E.fs.chmod(D,u||438,function(){B(!0)})})})})});else if(M)E.fs.write(M,_,0,_.length,0,function(){E.fs.close(M,function(){E.fs.chmod(D,u||438,function(){B(!0)})})});else E.fs.chmod(D,u||438,function(){B(!0)})})})})})};ED.prototype.findFiles=function(D){let _=this;function F(u,B,E){if(typeof B==="boolean")E=B,B=void 0;let C=[];return _.fs.readdirSync(u).forEach(function($){let q=GD.join(u,$),Q=_.fs.statSync(q);if(!B||B.test(q))C.push(GD.normalize(q)+(Q.isDirectory()?_.sep:""));if(Q.isDirectory()&&E)C=C.concat(F(q,B,E))}),C}return F(D,void 0,!0)};ED.prototype.findFilesAsync=function(D,_){let F=this,u=[];F.fs.readdir(D,function(B,E){if(B)return _(B);let C=E.length;if(!C)return _(null,u);E.forEach(function($){$=GD.join(D,$),F.fs.stat($,function(q,Q){if(q)return _(q);if(Q){if(u.push(GD.normalize($)+(Q.isDirectory()?F.sep:"")),Q.isDirectory())F.findFilesAsync($,function(G,A){if(G)return _(G);if(u=u.concat(A),!--C)_(null,u)});else if(!--C)_(null,u)}})})})};ED.prototype.getAttributes=function(){};ED.prototype.setAttributes=function(){};ED.crc32update=function(D,_){return V1[(D^_)&255]^D>>>8};ED.crc32=function(D){if(typeof D==="string")D=Buffer.from(D,"utf8");let _=D.length,F=-1;for(let u=0;u<_;)F=ED.crc32update(F,D[u++]);return~F>>>0};ED.methodToString=function(D){switch(D){case M1.STORED:return"STORED ("+D+")";case M1.DEFLATED:return"DEFLATED ("+D+")";default:return"UNSUPPORTED ("+D+")"}};ED.canonical=function(D){if(!D)return"";let _=GD.posix.normalize("/"+D.split("\\").join("/"));return GD.join(".",_)};ED.zipnamefix=function(D){if(!D)return"";let _=GD.posix.normalize("/"+D.split("\\").join("/"));return GD.posix.join(".",_)};ED.findLast=function(D,_){if(!Array.isArray(D))throw new TypeError("arr is not array");let F=D.length>>>0;for(let u=F-1;u>=0;u--)if(_(D[u],u,D))return D[u];return};ED.sanitize=function(D,_){D=GD.resolve(GD.normalize(D));var F=_.split("/");for(var u=0,B=F.length;u<B;u++){var E=GD.normalize(GD.join(D,F.slice(u,B).join(GD.sep)));if(E.indexOf(D)===0)return E}return GD.normalize(GD.join(D,GD.basename(_)))};ED.toBuffer=function D(_,F){if(Buffer.isBuffer(_))return _;else if(_ instanceof Uint8Array)return Buffer.from(_);else return typeof _==="string"?F(_):Buffer.alloc(0)};ED.readBigUInt64LE=function(D,_){var F=Buffer.from(D.slice(_,_+8));return F.swap64(),parseInt(`0x${F.toString("hex")}`)};ED.fromDOS2Date=function(D){return new Date((D>>25&127)+1980,Math.max((D>>21&15)-1,0),Math.max(D>>16&31,1),D>>11&31,D>>5&63,(D&31)<<1)};ED.fromDate2DOS=function(D){let _=0,F=0;if(D.getFullYear()>1979)_=(D.getFullYear()-1980&127)<<9|D.getMonth()+1<<5|D.getDate(),F=D.getHours()<<11|D.getMinutes()<<5|D.getSeconds()>>1;return _<<16|F};ED.isWin=d5;ED.crcTable=V1});var L1=P((HE,H1)=>{var c5=require("path");H1.exports=function(D,{fs:_}){var F=D||"",u=E(),B=null;function E(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}if(F&&_.existsSync(F))B=_.statSync(F),u.directory=B.isDirectory(),u.mtime=B.mtime,u.atime=B.atime,u.executable=(73&B.mode)!==0,u.readonly=(128&B.mode)===0,u.hidden=c5.basename(F)[0]===".";else console.warn("Invalid path: "+F);return{get directory(){return u.directory},get readOnly(){return u.readonly},get hidden(){return u.hidden},get mtime(){return u.mtime},get atime(){return u.atime},get executable(){return u.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:F,isDirectory:u.directory,isReadOnly:u.readonly,isHidden:u.hidden,isExecutable:u.executable,mTime:u.mtime,aTime:u.atime}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var N1=P((LE,T1)=>{T1.exports={efs:!0,encode:(D)=>Buffer.from(D,"utf8"),decode:(D)=>D.toString("utf8")}});var T2=P((TE,L2)=>{L2.exports=I1();L2.exports.Constants=a8();L2.exports.Errors=O0();L2.exports.FileAttr=L1();L2.exports.decoder=N1()});var z1=P((NE,j1)=>{var oD=T2(),z=oD.Constants;j1.exports=function(){var D=20,_=10,F=0,u=0,B=0,E=0,C=0,$=0,q=0,Q=0,G=0,A=0,M=0,J=0,X=0;D|=oD.isWin?2560:768,F|=z.FLG_EFS;let W={extraLen:0},K=(Z)=>Math.max(0,Z)>>>0,R=(Z)=>Math.max(0,Z)&65535,V=(Z)=>Math.max(0,Z)&255;return B=oD.fromDate2DOS(new Date),{get made(){return D},set made(Z){D=Z},get version(){return _},set version(Z){_=Z},get flags(){return F},set flags(Z){F=Z},get flags_efs(){return(F&z.FLG_EFS)>0},set flags_efs(Z){if(Z)F|=z.FLG_EFS;else F&=~z.FLG_EFS},get flags_desc(){return(F&z.FLG_DESC)>0},set flags_desc(Z){if(Z)F|=z.FLG_DESC;else F&=~z.FLG_DESC},get method(){return u},set method(Z){switch(Z){case z.STORED:this.version=10;case z.DEFLATED:default:this.version=20}u=Z},get time(){return oD.fromDOS2Date(this.timeval)},set time(Z){this.timeval=oD.fromDate2DOS(Z)},get timeval(){return B},set timeval(Z){B=K(Z)},get timeHighByte(){return V(B>>>8)},get crc(){return E},set crc(Z){E=K(Z)},get compressedSize(){return C},set compressedSize(Z){C=K(Z)},get size(){return $},set size(Z){$=K(Z)},get fileNameLength(){return q},set fileNameLength(Z){q=Z},get extraLength(){return Q},set extraLength(Z){Q=Z},get extraLocalLength(){return W.extraLen},set extraLocalLength(Z){W.extraLen=Z},get commentLength(){return G},set commentLength(Z){G=Z},get diskNumStart(){return A},set diskNumStart(Z){A=K(Z)},get inAttr(){return M},set inAttr(Z){M=K(Z)},get attr(){return J},set attr(Z){J=K(Z)},get fileAttr(){return(J||0)>>16&4095},get offset(){return X},set offset(Z){X=K(Z)},get encrypted(){return(F&z.FLG_ENC)===z.FLG_ENC},get centralHeaderSize(){return z.CENHDR+q+Q+G},get realDataOffset(){return X+z.LOCHDR+W.fnameLen+W.extraLen},get localHeader(){return W},loadLocalHeaderFromBinary:function(Z){var U=Z.slice(X,X+z.LOCHDR);if(U.readUInt32LE(0)!==z.LOCSIG)throw oD.Errors.INVALID_LOC();W.version=U.readUInt16LE(z.LOCVER),W.flags=U.readUInt16LE(z.LOCFLG),W.method=U.readUInt16LE(z.LOCHOW),W.time=U.readUInt32LE(z.LOCTIM),W.crc=U.readUInt32LE(z.LOCCRC),W.compressedSize=U.readUInt32LE(z.LOCSIZ),W.size=U.readUInt32LE(z.LOCLEN),W.fnameLen=U.readUInt16LE(z.LOCNAM),W.extraLen=U.readUInt16LE(z.LOCEXT);let I=X+z.LOCHDR+W.fnameLen,N=I+W.extraLen;return Z.slice(I,N)},loadFromBinary:function(Z){if(Z.length!==z.CENHDR||Z.readUInt32LE(0)!==z.CENSIG)throw oD.Errors.INVALID_CEN();D=Z.readUInt16LE(z.CENVEM),_=Z.readUInt16LE(z.CENVER),F=Z.readUInt16LE(z.CENFLG),u=Z.readUInt16LE(z.CENHOW),B=Z.readUInt32LE(z.CENTIM),E=Z.readUInt32LE(z.CENCRC),C=Z.readUInt32LE(z.CENSIZ),$=Z.readUInt32LE(z.CENLEN),q=Z.readUInt16LE(z.CENNAM),Q=Z.readUInt16LE(z.CENEXT),G=Z.readUInt16LE(z.CENCOM),A=Z.readUInt16LE(z.CENDSK),M=Z.readUInt16LE(z.CENATT),J=Z.readUInt32LE(z.CENATX),X=Z.readUInt32LE(z.CENOFF)},localHeaderToBinary:function(){var Z=Buffer.alloc(z.LOCHDR);return Z.writeUInt32LE(z.LOCSIG,0),Z.writeUInt16LE(_,z.LOCVER),Z.writeUInt16LE(F,z.LOCFLG),Z.writeUInt16LE(u,z.LOCHOW),Z.writeUInt32LE(B,z.LOCTIM),Z.writeUInt32LE(E,z.LOCCRC),Z.writeUInt32LE(C,z.LOCSIZ),Z.writeUInt32LE($,z.LOCLEN),Z.writeUInt16LE(q,z.LOCNAM),Z.writeUInt16LE(W.extraLen,z.LOCEXT),Z},centralHeaderToBinary:function(){var Z=Buffer.alloc(z.CENHDR+q+Q+G);return Z.writeUInt32LE(z.CENSIG,0),Z.writeUInt16LE(D,z.CENVEM),Z.writeUInt16LE(_,z.CENVER),Z.writeUInt16LE(F,z.CENFLG),Z.writeUInt16LE(u,z.CENHOW),Z.writeUInt32LE(B,z.CENTIM),Z.writeUInt32LE(E,z.CENCRC),Z.writeUInt32LE(C,z.CENSIZ),Z.writeUInt32LE($,z.CENLEN),Z.writeUInt16LE(q,z.CENNAM),Z.writeUInt16LE(Q,z.CENEXT),Z.writeUInt16LE(G,z.CENCOM),Z.writeUInt16LE(A,z.CENDSK),Z.writeUInt16LE(M,z.CENATT),Z.writeUInt32LE(J,z.CENATX),Z.writeUInt32LE(X,z.CENOFF),Z},toJSON:function(){let Z=function(U){return U+" bytes"};return{made:D,version:_,flags:F,method:oD.methodToString(u),time:this.time,crc:"0x"+E.toString(16).toUpperCase(),compressedSize:Z(C),size:Z($),fileNameLength:Z(q),extraLength:Z(Q),commentLength:Z(G),diskNumStart:A,inAttr:M,attr:J,offset:X,centralHeaderSize:Z(z.CENHDR+q+Q+G)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var Y1=P((jE,O1)=>{var N2=T2(),_D=N2.Constants;O1.exports=function(){var D=0,_=0,F=0,u=0,B=0;return{get diskEntries(){return D},set diskEntries(E){D=_=E},get totalEntries(){return _},set totalEntries(E){_=D=E},get size(){return F},set size(E){F=E},get offset(){return u},set offset(E){u=E},get commentLength(){return B},set commentLength(E){B=E},get mainHeaderSize(){return _D.ENDHDR+B},loadFromBinary:function(E){if((E.length!==_D.ENDHDR||E.readUInt32LE(0)!==_D.ENDSIG)&&(E.length<_D.ZIP64HDR||E.readUInt32LE(0)!==_D.ZIP64SIG))throw N2.Errors.INVALID_END();if(E.readUInt32LE(0)===_D.ENDSIG)D=E.readUInt16LE(_D.ENDSUB),_=E.readUInt16LE(_D.ENDTOT),F=E.readUInt32LE(_D.ENDSIZ),u=E.readUInt32LE(_D.ENDOFF),B=E.readUInt16LE(_D.ENDCOM);else D=N2.readBigUInt64LE(E,_D.ZIP64SUB),_=N2.readBigUInt64LE(E,_D.ZIP64TOT),F=N2.readBigUInt64LE(E,_D.ZIP64SIZE),u=N2.readBigUInt64LE(E,_D.ZIP64OFF),B=0},toBinary:function(){var E=Buffer.alloc(_D.ENDHDR+B);return E.writeUInt32LE(_D.ENDSIG,0),E.writeUInt32LE(0,4),E.writeUInt16LE(D,_D.ENDSUB),E.writeUInt16LE(_,_D.ENDTOT),E.writeUInt32LE(F,_D.ENDSIZ),E.writeUInt32LE(u,_D.ENDOFF),E.writeUInt16LE(B,_D.ENDCOM),E.fill(" ",_D.ENDHDR),E},toJSON:function(){let E=function(C,$){let q=C.toString(16).toUpperCase();while(q.length<$)q="0"+q;return"0x"+q};return{diskEntries:D,totalEntries:_,size:F+" bytes",offset:E(u,4),commentLength:B}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var e8=P((t8)=>{t8.EntryHeader=z1();t8.MainHeader=Y1()});var S1=P((OE,w1)=>{w1.exports=function(D){var _=require("zlib"),F={chunkSize:(parseInt(D.length/1024)+1)*1024};return{deflate:function(){return _.deflateRawSync(D,F)},deflateAsync:function(u){var B=_.createDeflateRaw(F),E=[],C=0;B.on("data",function($){E.push($),C+=$.length}),B.on("end",function(){var $=Buffer.alloc(C),q=0;$.fill(0);for(var Q=0;Q<E.length;Q++){var G=E[Q];G.copy($,q),q+=G.length}u&&u($)}),B.end(D)}}}});var x1=P((YE,P1)=>{var p5=+(process.versions?process.versions.node:"").split(".")[0]||0;P1.exports=function(D,_){var F=require("zlib");let u=p5>=15&&_>0?{maxOutputLength:_}:{};return{inflate:function(){return F.inflateRawSync(D,u)},inflateAsync:function(B){var E=F.createInflateRaw(u),C=[],$=0;E.on("data",function(q){C.push(q),$+=q.length}),E.on("end",function(){var q=Buffer.alloc($),Q=0;q.fill(0);for(var G=0;G<C.length;G++){var A=C[G];A.copy(q,Q),Q+=A.length}B&&B(q)}),E.end(D)}}}});var f1=P((wE,b1)=>{var{randomFillSync:k1}=require("crypto"),l5=O0(),i5=new Uint32Array(256).map((D,_)=>{for(let F=0;F<8;F++)if((_&1)!==0)_=_>>>1^3988292384;else _>>>=1;return _>>>0}),v1=(D,_)=>Math.imul(D,_)>>>0,y1=(D,_)=>{return i5[(D^_)&255]^D>>>8},p2=()=>{if(typeof k1==="function")return k1(Buffer.alloc(12));else return p2.node()};p2.node=()=>{let D=Buffer.alloc(12),_=D.length;for(let F=0;F<_;F++)D[F]=Math.random()*256&255;return D};var Y0={genSalt:p2};function w0(D){let _=Buffer.isBuffer(D)?D:Buffer.from(D);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let F=0;F<_.length;F++)this.updateKeys(_[F])}w0.prototype.updateKeys=function(D){let _=this.keys;return _[0]=y1(_[0],D),_[1]+=_[0]&255,_[1]=v1(_[1],134775813)+1,_[2]=y1(_[2],_[1]>>>24),D};w0.prototype.next=function(){let D=(this.keys[2]|2)>>>0;return v1(D,D^1)>>8&255};function n5(D){let _=new w0(D);return function(F){let u=Buffer.alloc(F.length),B=0;for(let E of F)u[B++]=_.updateKeys(E^_.next());return u}}function o5(D){let _=new w0(D);return function(F,u,B=0){if(!u)u=Buffer.alloc(F.length);for(let E of F){let C=_.next();u[B++]=E^C,_.updateKeys(E)}return u}}function s5(D,_,F){if(!D||!Buffer.isBuffer(D)||D.length<12)return Buffer.alloc(0);let u=n5(F),B=u(D.slice(0,12)),E=(_.flags&8)===8?_.timeHighByte:_.crc>>>24;if(B[11]!==E)throw l5.WRONG_PASSWORD();return u(D.slice(12))}function r5(D){if(Buffer.isBuffer(D)&&D.length>=12)Y0.genSalt=function(){return D.slice(0,12)};else if(D==="node")Y0.genSalt=p2.node;else Y0.genSalt=p2}function a5(D,_,F,u=!1){if(D==null)D=Buffer.alloc(0);if(!Buffer.isBuffer(D))D=Buffer.from(D.toString());let B=o5(F),E=Y0.genSalt();if(E[11]=_.crc>>>24&255,u)E[10]=_.crc>>>16&255;let C=Buffer.alloc(D.length+12);return B(E,C),B(D,C,12)}b1.exports={decrypt:s5,encrypt:a5,_salter:r5}});var h1=P((S0)=>{S0.Deflater=S1();S0.Inflater=x1();S0.ZipCrypto=f1()});var _3=P((PE,g1)=>{var p=T2(),t5=e8(),CD=p.Constants,D3=h1();g1.exports=function(D,_){var F=new t5.EntryHeader,u=Buffer.alloc(0),B=Buffer.alloc(0),E=!1,C=null,$=Buffer.alloc(0),q=Buffer.alloc(0),Q=!0;let G=D,A=typeof G.decoder==="object"?G.decoder:p.decoder;Q=A.hasOwnProperty("efs")?A.efs:!1;function M(){if(!_||!(_ instanceof Uint8Array))return Buffer.alloc(0);return q=F.loadLocalHeaderFromBinary(_),_.slice(F.realDataOffset,F.realDataOffset+F.compressedSize)}function J(Z){if(!F.flags_desc){if(p.crc32(Z)!==F.localHeader.crc)return!1}else{let U={},I=F.realDataOffset+F.compressedSize;if(_.readUInt32LE(I)==CD.LOCSIG||_.readUInt32LE(I)==CD.CENSIG)throw p.Errors.DESCRIPTOR_NOT_EXIST();if(_.readUInt32LE(I)==CD.EXTSIG)U.crc=_.readUInt32LE(I+CD.EXTCRC),U.compressedSize=_.readUInt32LE(I+CD.EXTSIZ),U.size=_.readUInt32LE(I+CD.EXTLEN);else if(_.readUInt16LE(I+12)===19280)U.crc=_.readUInt32LE(I+CD.EXTCRC-4),U.compressedSize=_.readUInt32LE(I+CD.EXTSIZ-4),U.size=_.readUInt32LE(I+CD.EXTLEN-4);else throw p.Errors.DESCRIPTOR_UNKNOWN();if(U.compressedSize!==F.compressedSize||U.size!==F.size||U.crc!==F.crc)throw p.Errors.DESCRIPTOR_FAULTY();if(p.crc32(Z)!==U.crc)return!1}return!0}function X(Z,U,I){if(typeof U==="undefined"&&typeof Z==="string")I=Z,Z=void 0;if(E){if(Z&&U)U(Buffer.alloc(0),p.Errors.DIRECTORY_CONTENT_ERROR());return Buffer.alloc(0)}var N=M();if(N.length===0){if(Z&&U)U(N);return N}if(F.encrypted){if(typeof I!=="string"&&!Buffer.isBuffer(I))throw p.Errors.INVALID_PASS_PARAM();N=D3.ZipCrypto.decrypt(N,F,I)}var j=Buffer.alloc(F.size);switch(F.method){case p.Constants.STORED:if(N.copy(j),!J(j)){if(Z&&U)U(j,p.Errors.BAD_CRC());throw p.Errors.BAD_CRC()}else{if(Z&&U)U(j);return j}case p.Constants.DEFLATED:var x=new D3.Inflater(N,F.size);if(!Z){if(x.inflate(j).copy(j,0),!J(j))throw p.Errors.BAD_CRC(`"${A.decode(u)}"`);return j}else x.inflateAsync(function(T){if(T.copy(T,0),U)if(!J(T))U(T,p.Errors.BAD_CRC());else U(T)});break;default:if(Z&&U)U(Buffer.alloc(0),p.Errors.UNKNOWN_METHOD());throw p.Errors.UNKNOWN_METHOD()}}function W(Z,U){if((!C||!C.length)&&Buffer.isBuffer(_)){if(Z&&U)U(M());return M()}if(C.length&&!E){var I;switch(F.method){case p.Constants.STORED:if(F.compressedSize=F.size,I=Buffer.alloc(C.length),C.copy(I),Z&&U)U(I);return I;default:case p.Constants.DEFLATED:var N=new D3.Deflater(C);if(!Z){var j=N.deflate();return F.compressedSize=j.length,j}else N.deflateAsync(function(x){I=Buffer.alloc(x.length),F.compressedSize=x.length,x.copy(I),U&&U(I)});N=null;break}}else if(Z&&U)U(Buffer.alloc(0));else return Buffer.alloc(0)}function K(Z,U){return(Z.readUInt32LE(U+4)<<4)+Z.readUInt32LE(U)}function R(Z){try{var U=0,I,N,j;while(U+4<Z.length)if(I=Z.readUInt16LE(U),U+=2,N=Z.readUInt16LE(U),U+=2,j=Z.slice(U,U+N),U+=N,CD.ID_ZIP64===I)V(j)}catch(x){throw p.Errors.EXTRA_FIELD_PARSE_ERROR()}}function V(Z){var U,I,N,j;if(Z.length>=CD.EF_ZIP64_SCOMP){if(U=K(Z,CD.EF_ZIP64_SUNCOMP),F.size===CD.EF_ZIP64_OR_32)F.size=U}if(Z.length>=CD.EF_ZIP64_RHO){if(I=K(Z,CD.EF_ZIP64_SCOMP),F.compressedSize===CD.EF_ZIP64_OR_32)F.compressedSize=I}if(Z.length>=CD.EF_ZIP64_DSN){if(N=K(Z,CD.EF_ZIP64_RHO),F.offset===CD.EF_ZIP64_OR_32)F.offset=N}if(Z.length>=CD.EF_ZIP64_DSN+4){if(j=Z.readUInt32LE(CD.EF_ZIP64_DSN),F.diskNumStart===CD.EF_ZIP64_OR_16)F.diskNumStart=j}}return{get entryName(){return A.decode(u)},get rawEntryName(){return u},set entryName(Z){u=p.toBuffer(Z,A.encode);var U=u[u.length-1];E=U===47||U===92,F.fileNameLength=u.length},get efs(){if(typeof Q==="function")return Q(this.entryName);else return Q},get extra(){return $},set extra(Z){$=Z,F.extraLength=Z.length,R(Z)},get comment(){return A.decode(B)},set comment(Z){if(B=p.toBuffer(Z,A.encode),F.commentLength=B.length,B.length>65535)throw p.Errors.COMMENT_TOO_LONG()},get name(){var Z=A.decode(u);return E?Z.substr(Z.length-1).split("/").pop():Z.split("/").pop()},get isDirectory(){return E},getCompressedData:function(){return W(!1,null)},getCompressedDataAsync:function(Z){W(!0,Z)},setData:function(Z){if(C=p.toBuffer(Z,p.decoder.encode),!E&&C.length)F.size=C.length,F.method=p.Constants.DEFLATED,F.crc=p.crc32(Z),F.changed=!0;else F.method=p.Constants.STORED},getData:function(Z){if(F.changed)return C;else return X(!1,null,Z)},getDataAsync:function(Z,U){if(F.changed)Z(C);else X(!0,Z,U)},set attr(Z){F.attr=Z},get attr(){return F.attr},set header(Z){F.loadFromBinary(Z)},get header(){return F},packCentralHeader:function(){F.flags_efs=this.efs,F.extraLength=$.length;var Z=F.centralHeaderToBinary(),U=p.Constants.CENHDR;return u.copy(Z,U),U+=u.length,$.copy(Z,U),U+=F.extraLength,B.copy(Z,U),Z},packLocalHeader:function(){let Z=0;F.flags_efs=this.efs,F.extraLocalLength=q.length;let U=F.localHeaderToBinary(),I=Buffer.alloc(U.length+u.length+F.extraLocalLength);return U.copy(I,Z),Z+=U.length,u.copy(I,Z),Z+=u.length,q.copy(I,Z),Z+=q.length,I},toJSON:function(){let Z=function(U){return"<"+(U&&U.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:F.toJSON(),compressedData:Z(_),data:Z(C)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var c1=P((xE,d1)=>{var m1=_3(),e5=e8(),AD=T2();d1.exports=function(D,_){var F=[],u={},B=Buffer.alloc(0),E=new e5.MainHeader,C=!1,$=null;let q=new Set,Q=_,{noSort:G,decoder:A}=Q;if(D)X(Q.readEntries);else C=!0;function M(){let K=new Set;for(let R of Object.keys(u)){let V=R.split("/");if(V.pop(),!V.length)continue;for(let Z=0;Z<V.length;Z++){let U=V.slice(0,Z+1).join("/")+"/";K.add(U)}}for(let R of K)if(!(R in u)){let V=new m1(Q);V.entryName=R,V.attr=16,V.temporary=!0,F.push(V),u[V.entryName]=V,q.add(V)}}function J(){if(C=!0,u={},E.diskEntries>(D.length-E.offset)/AD.Constants.CENHDR)throw AD.Errors.DISK_ENTRY_TOO_LARGE();F=new Array(E.diskEntries);var K=E.offset;for(var R=0;R<F.length;R++){var V=K,Z=new m1(Q,D);if(Z.header=D.slice(V,V+=AD.Constants.CENHDR),Z.entryName=D.slice(V,V+=Z.header.fileNameLength),Z.header.extraLength)Z.extra=D.slice(V,V+=Z.header.extraLength);if(Z.header.commentLength)Z.comment=D.slice(V,V+Z.header.commentLength);K+=Z.header.centralHeaderSize,F[R]=Z,u[Z.entryName]=Z}q.clear(),M()}function X(K){var R=D.length-AD.Constants.ENDHDR,V=Math.max(0,R-65535),Z=V,U=D.length,I=-1,N=0;if(typeof Q.trailingSpace==="boolean"?Q.trailingSpace:!1)V=0;for(R;R>=Z;R--){if(D[R]!==80)continue;if(D.readUInt32LE(R)===AD.Constants.ENDSIG){I=R,N=R,U=R+AD.Constants.ENDHDR,Z=R-AD.Constants.END64HDR;continue}if(D.readUInt32LE(R)===AD.Constants.END64SIG){Z=V;continue}if(D.readUInt32LE(R)===AD.Constants.ZIP64SIG){I=R,U=R+AD.readBigUInt64LE(D,R+AD.Constants.ZIP64SIZE)+AD.Constants.ZIP64LEAD;break}}if(I==-1)throw AD.Errors.INVALID_FORMAT();if(E.loadFromBinary(D.slice(I,U)),E.commentLength)B=D.slice(N+AD.Constants.ENDHDR);if(K)J()}function W(){if(F.length>1&&!G)F.sort((K,R)=>K.entryName.toLowerCase().localeCompare(R.entryName.toLowerCase()))}return{get entries(){if(!C)J();return F.filter((K)=>!q.has(K))},get comment(){return A.decode(B)},set comment(K){B=AD.toBuffer(K,A.encode),E.commentLength=B.length},getEntryCount:function(){if(!C)return E.diskEntries;return F.length},forEach:function(K){this.entries.forEach(K)},getEntry:function(K){if(!C)J();return u[K]||null},setEntry:function(K){if(!C)J();F.push(K),u[K.entryName]=K,E.totalEntries=F.length},deleteFile:function(K,R=!0){if(!C)J();let V=u[K];this.getEntryChildren(V,R).map((U)=>U.entryName).forEach(this.deleteEntry)},deleteEntry:function(K){if(!C)J();let R=u[K],V=F.indexOf(R);if(V>=0)F.splice(V,1),delete u[K],E.totalEntries=F.length},getEntryChildren:function(K,R=!0){if(!C)J();if(typeof K==="object")if(K.isDirectory&&R){let V=[],Z=K.entryName;for(let U of F)if(U.entryName.startsWith(Z))V.push(U);return V}else return[K];return[]},getChildCount:function(K){if(K&&K.isDirectory){let R=this.getEntryChildren(K);return R.includes(K)?R.length-1:R.length}return 0},compressToBuffer:function(){if(!C)J();W();let K=[],R=[],V=0,Z=0;E.size=0,E.offset=0;let U=0;for(let j of this.entries){let x=j.getCompressedData();j.header.offset=Z;let T=j.packLocalHeader(),w=T.length+x.length;Z+=w,K.push(T),K.push(x);let O=j.packCentralHeader();R.push(O),E.size+=O.length,V+=w+O.length,U++}V+=E.mainHeaderSize,E.offset=Z,E.totalEntries=U,Z=0;let I=Buffer.alloc(V);for(let j of K)j.copy(I,Z),Z+=j.length;for(let j of R)j.copy(I,Z),Z+=j.length;let N=E.toBinary();if(B)B.copy(N,AD.Constants.ENDHDR);return N.copy(I,Z),D=I,C=!1,I},toAsyncBuffer:function(K,R,V,Z){try{if(!C)J();W();let U=[],I=[],N=0,j=0,x=0;E.size=0,E.offset=0;let T=function(w){if(w.length>0){let O=w.shift(),h=O.entryName+O.extra.toString();if(V)V(h);O.getCompressedDataAsync(function(g){if(Z)Z(h);O.header.offset=j;let t=O.packLocalHeader(),i=t.length+g.length;j+=i,U.push(t),U.push(g);let n=O.packCentralHeader();I.push(n),E.size+=n.length,N+=i+n.length,x++,T(w)})}else{N+=E.mainHeaderSize,E.offset=j,E.totalEntries=x,j=0;let O=Buffer.alloc(N);U.forEach(function(g){g.copy(O,j),j+=g.length}),I.forEach(function(g){g.copy(O,j),j+=g.length});let h=E.toBinary();if(B)B.copy(h,AD.Constants.ENDHDR);h.copy(O,j),D=O,C=!1,K(O)}};T(Array.from(this.entries))}catch(U){R(U)}}}}});var i1=P((kE,l1)=>{var FD=T2(),$D=require("path"),D9=_3(),_9=c1(),G2=(...D)=>FD.findLast(D,(_)=>typeof _==="boolean"),p1=(...D)=>FD.findLast(D,(_)=>typeof _==="string"),F9=(...D)=>FD.findLast(D,(_)=>typeof _==="function"),u9={noSort:!1,readEntries:!1,method:FD.Constants.NONE,fs:null};l1.exports=function(D,_){let F=null,u=Object.assign(Object.create(null),u9);if(D&&typeof D==="object"){if(!(D instanceof Uint8Array)){if(Object.assign(u,D),D=u.input?u.input:void 0,u.input)delete u.input}if(Buffer.isBuffer(D))F=D,u.method=FD.Constants.BUFFER,D=void 0}Object.assign(u,_);let B=new FD(u);if(typeof u.decoder!=="object"||typeof u.decoder.encode!=="function"||typeof u.decoder.decode!=="function")u.decoder=FD.decoder;if(D&&typeof D==="string")if(B.fs.existsSync(D))u.method=FD.Constants.FILE,u.filename=D,F=B.fs.readFileSync(D);else throw FD.Errors.INVALID_FILENAME();let E=new _9(F,u),{canonical:C,sanitize:$,zipnamefix:q}=FD;function Q(J){if(J&&E){var X;if(typeof J==="string")X=E.getEntry($D.posix.normalize(J));if(typeof J==="object"&&typeof J.entryName!=="undefined"&&typeof J.header!=="undefined")X=E.getEntry(J.entryName);if(X)return X}return null}function G(J){let{join:X,normalize:W,sep:K}=$D.posix;return X(".",W(K+J.split("\\").join(K)+K))}function A(J){if(J instanceof RegExp)return function(X){return function(W){return X.test(W)}}(J);else if(typeof J!=="function")return()=>!0;return J}let M=(J,X)=>{let W=X.slice(-1);return W=W===B.sep?B.sep:"",$D.relative(J,X)+W};return{readFile:function(J,X){var W=Q(J);return W&&W.getData(X)||null},childCount:function(J){let X=Q(J);if(X)return E.getChildCount(X)},readFileAsync:function(J,X){var W=Q(J);if(W)W.getDataAsync(X);else X(null,"getEntry failed for:"+J)},readAsText:function(J,X){var W=Q(J);if(W){var K=W.getData();if(K&&K.length)return K.toString(X||"utf8")}return""},readAsTextAsync:function(J,X,W){var K=Q(J);if(K)K.getDataAsync(function(R,V){if(V){X(R,V);return}if(R&&R.length)X(R.toString(W||"utf8"));else X("")});else X("")},deleteFile:function(J,X=!0){var W=Q(J);if(W)E.deleteFile(W.entryName,X)},deleteEntry:function(J){var X=Q(J);if(X)E.deleteEntry(X.entryName)},addZipComment:function(J){E.comment=J},getZipComment:function(){return E.comment||""},addZipEntryComment:function(J,X){var W=Q(J);if(W)W.comment=X},getZipEntryComment:function(J){var X=Q(J);if(X)return X.comment||"";return""},updateFile:function(J,X){var W=Q(J);if(W)W.setData(X)},addLocalFile:function(J,X,W,K){if(B.fs.existsSync(J)){X=X?G(X):"";let R=$D.win32.basename($D.win32.normalize(J));X+=W?W:R;let V=B.fs.statSync(J),Z=V.isFile()?B.fs.readFileSync(J):Buffer.alloc(0);if(V.isDirectory())X+=B.sep;this.addFile(X,Z,K,V)}else throw FD.Errors.FILE_NOT_FOUND(J)},addLocalFileAsync:function(J,X){J=typeof J==="object"?J:{localPath:J};let W=$D.resolve(J.localPath),{comment:K}=J,{zipPath:R,zipName:V}=J,Z=this;B.fs.stat(W,function(U,I){if(U)return X(U,!1);R=R?G(R):"";let N=$D.win32.basename($D.win32.normalize(W));if(R+=V?V:N,I.isFile())B.fs.readFile(W,function(j,x){if(j)return X(j,!1);return Z.addFile(R,x,K,I),setImmediate(X,void 0,!0)});else if(I.isDirectory())return R+=B.sep,Z.addFile(R,Buffer.alloc(0),K,I),setImmediate(X,void 0,!0)})},addLocalFolder:function(J,X,W){if(W=A(W),X=X?G(X):"",J=$D.normalize(J),B.fs.existsSync(J)){let K=B.findFiles(J),R=this;if(K.length)for(let V of K){let Z=$D.join(X,M(J,V));if(W(Z))R.addLocalFile(V,$D.dirname(Z))}}else throw FD.Errors.FILE_NOT_FOUND(J)},addLocalFolderAsync:function(J,X,W,K){K=A(K),W=W?G(W):"",J=$D.normalize(J);var R=this;B.fs.open(J,"r",function(V){if(V&&V.code==="ENOENT")X(void 0,FD.Errors.FILE_NOT_FOUND(J));else if(V)X(void 0,V);else{var Z=B.findFiles(J),U=-1,I=function(){if(U+=1,U<Z.length){var N=Z[U],j=M(J,N).split("\\").join("/");if(j=j.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),K(j))B.fs.stat(N,function(x,T){if(x)X(void 0,x);if(T.isFile())B.fs.readFile(N,function(w,O){if(w)X(void 0,w);else R.addFile(W+j,O,"",T),I()});else R.addFile(W+j+"/",Buffer.alloc(0),"",T),I()});else process.nextTick(()=>{I()})}else X(!0,void 0)};I()}})},addLocalFolderAsync2:function(J,X){let W=this;J=typeof J==="object"?J:{localPath:J},localPath=$D.resolve(G(J.localPath));let{zipPath:K,filter:R,namefix:V}=J;if(R instanceof RegExp)R=function(I){return function(N){return I.test(N)}}(R);else if(typeof R!=="function")R=function(){return!0};if(K=K?G(K):"",V=="latin1")V=(I)=>I.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,"");if(typeof V!=="function")V=(I)=>I;let Z=(I)=>$D.join(K,V(M(localPath,I))),U=(I)=>$D.win32.basename($D.win32.normalize(V(I)));B.fs.open(localPath,"r",function(I){if(I&&I.code==="ENOENT")X(void 0,FD.Errors.FILE_NOT_FOUND(localPath));else if(I)X(void 0,I);else B.findFilesAsync(localPath,function(N,j){if(N)return X(N);if(j=j.filter((x)=>R(Z(x))),!j.length)X(void 0,!1);setImmediate(j.reverse().reduce(function(x,T){return function(w,O){if(w||O===!1)return setImmediate(x,w,!1);W.addLocalFileAsync({localPath:T,zipPath:$D.dirname(Z(T)),zipName:U(T)},x)}},X))})})},addLocalFolderPromise:function(J,X){return new Promise((W,K)=>{this.addLocalFolderAsync2(Object.assign({localPath:J},X),(R,V)=>{if(R)K(R);if(V)W(this)})})},addFile:function(J,X,W,K){J=q(J);let R=Q(J),V=R!=null;if(!V)R=new D9(u),R.entryName=J;R.comment=W||"";let Z=typeof K==="object"&&K instanceof B.fs.Stats;if(Z)R.header.time=K.mtime;var U=R.isDirectory?16:0;let I=R.isDirectory?16384:32768;if(Z)I|=4095&K.mode;else if(typeof K==="number")I|=4095&K;else I|=R.isDirectory?493:420;if(U=(U|I<<16)>>>0,R.attr=U,R.setData(X),!V)E.setEntry(R);return R},getEntries:function(J){return E.password=J,E?E.entries:[]},getEntry:function(J){return Q(J)},getEntryCount:function(){return E.getEntryCount()},forEach:function(J){return E.forEach(J)},extractEntryTo:function(J,X,W,K,R,V){K=G2(!1,K),R=G2(!1,R),W=G2(!0,W),V=p1(R,V);var Z=Q(J);if(!Z)throw FD.Errors.NO_ENTRY();var U=C(Z.entryName),I=$(X,V&&!Z.isDirectory?V:W?U:$D.basename(U));if(Z.isDirectory){var N=E.getEntryChildren(Z);return N.forEach(function(T){if(T.isDirectory)return;var w=T.getData();if(!w)throw FD.Errors.CANT_EXTRACT_FILE();var O=C(T.entryName),h=$(X,W?O:$D.basename(O));let g=R?T.header.fileAttr:void 0;B.writeFileTo(h,w,K,g)}),!0}var j=Z.getData(E.password);if(!j)throw FD.Errors.CANT_EXTRACT_FILE();if(B.fs.existsSync(I)&&!K)throw FD.Errors.CANT_OVERRIDE();let x=R?J.header.fileAttr:void 0;return B.writeFileTo(I,j,K,x),!0},test:function(J){if(!E)return!1;for(var X in E.entries)try{if(X.isDirectory)continue;var W=E.entries[X].getData(J);if(!W)return!1}catch(K){return!1}return!0},extractAllTo:function(J,X,W,K){if(W=G2(!1,W),K=p1(W,K),X=G2(!1,X),!E)throw FD.Errors.NO_ZIP();E.entries.forEach(function(R){var V=$(J,C(R.entryName));if(R.isDirectory){B.makeDir(V);return}var Z=R.getData(K);if(!Z)throw FD.Errors.CANT_EXTRACT_FILE();let U=W?R.header.fileAttr:void 0;B.writeFileTo(V,Z,X,U);try{B.fs.utimesSync(V,R.header.time,R.header.time)}catch(I){throw FD.Errors.CANT_EXTRACT_FILE()}})},extractAllToAsync:function(J,X,W,K){if(K=F9(X,W,K),W=G2(!1,W),X=G2(!1,X),!K)return new Promise((I,N)=>{this.extractAllToAsync(J,X,W,function(j){if(j)N(j);else I(this)})});if(!E){K(FD.Errors.NO_ZIP());return}J=$D.resolve(J);let R=(I)=>$(J,$D.normalize(C(I.entryName))),V=(I,N)=>new Error(I+': "'+N+'"'),Z=[],U=[];E.entries.forEach((I)=>{if(I.isDirectory)Z.push(I);else U.push(I)});for(let I of Z){let N=R(I),j=W?I.header.fileAttr:void 0;try{if(B.makeDir(N),j)B.fs.chmodSync(N,j);B.fs.utimesSync(N,I.header.time,I.header.time)}catch(x){K(V("Unable to create folder",N))}}U.reverse().reduce(function(I,N){return function(j){if(j)I(j);else{let x=$D.normalize(C(N.entryName)),T=$(J,x);N.getDataAsync(function(w,O){if(O)I(O);else if(!w)I(FD.Errors.CANT_EXTRACT_FILE());else{let h=W?N.header.fileAttr:void 0;B.writeFileToAsync(T,w,X,h,function(g){if(!g)I(V("Unable to write file",T));B.fs.utimes(T,N.header.time,N.header.time,function(t){if(t)I(V("Unable to set times",T));else I()})})}})}}},K)()},writeZip:function(J,X){if(arguments.length===1){if(typeof J==="function")X=J,J=""}if(!J&&u.filename)J=u.filename;if(!J)return;var W=E.compressToBuffer();if(W){var K=B.writeFileTo(J,W,!0);if(typeof X==="function")X(!K?new Error("failed"):null,"")}},writeZipPromise:function(J,X){let{overwrite:W,perm:K}=Object.assign({overwrite:!0},X);return new Promise((R,V)=>{if(!J&&u.filename)J=u.filename;if(!J)V("ADM-ZIP: ZIP File Name Missing");this.toBufferPromise().then((Z)=>{let U=(I)=>I?R(I):V("ADM-ZIP: Wasn't able to write zip file");B.writeFileToAsync(J,Z,W,K,U)},V)})},toBufferPromise:function(){return new Promise((J,X)=>{E.toAsyncBuffer(J,X)})},toBuffer:function(J,X,W,K){if(typeof J==="function")return E.toAsyncBuffer(J,X,W,K),null;return E.compressToBuffer()}}}});var j3=b(N3()),{program:g9,createCommand:m9,createArgument:d9,createOption:c9,CommanderError:p9,InvalidArgumentError:l9,InvalidOptionArgumentError:i9,Command:Y2,Argument:n9,Option:o9,Help:s9}=j3.default;var D0=(D)=>D.name==="up"||D.name==="k"||D.ctrl&&D.name==="p",t0=(D)=>D.name==="down"||D.name==="j"||D.ctrl&&D.name==="n";var _0=(D)=>D.name==="backspace",z3=(D)=>"123456789".includes(D.name),cD=(D)=>D.name==="enter"||D.name==="return";class e0 extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(D){super();this.cause=D?.cause}}class D8 extends Error{name="CancelPromptError";message="Prompt was canceled"}class _8 extends Error{name="ExitPromptError"}class F8 extends Error{name="HookError"}class w2 extends Error{name="ValidationError"}var E8=require("node:async_hooks");var F0=require("node:async_hooks");var O3=new F0.AsyncLocalStorage;function l6(D){return{rl:D,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function Y3(D,_){let F=l6(D);return O3.run(F,()=>{function u(B){F.handleChange=()=>{F.index=0,B()},F.handleChange()}return _(u)})}function eD(){let D=O3.getStore();if(!D)throw new F8("[Inquirer] Hook functions can only be called from within a prompt");return D}function u8(){return eD().rl}function B8(D){let _=(...F)=>{let u=eD(),B=!1,E=u.handleChange;u.handleChange=()=>{B=!0};let C=D(...F);if(B)E();return u.handleChange=E,C};return F0.AsyncResource.bind(_)}function X2(D){let _=eD(),{index:F}=_,u={get(){return _.hooks[F]},set(E){_.hooks[F]=E},initialized:F in _.hooks},B=D(u);return _.index++,B}function w3(){eD().handleChange()}var D2={queue(D){let _=eD(),{index:F}=_;_.hooksEffect.push(()=>{_.hooksCleanup[F]?.();let u=D(u8());if(u!=null&&typeof u!=="function")throw new w2("useEffect return value must be a cleanup function or nothing.");_.hooksCleanup[F]=u})},run(){let D=eD();B8(()=>{D.hooksEffect.forEach((_)=>{_()}),D.hooksEffect.length=0})()},clearAll(){let D=eD();D.hooksCleanup.forEach((_)=>{_?.()}),D.hooksEffect.length=0,D.hooksCleanup.length=0}};function e(D){return X2((_)=>{let F=(B)=>{if(_.get()!==B)_.set(B),w3()};if(_.initialized)return[_.get(),F];let u=typeof D==="function"?D():D;return _.set(u),[u,F]})}function xD(D,_){X2((F)=>{let u=F.get();if(!Array.isArray(u)||_.some((E,C)=>!Object.is(E,u[C])))D2.queue(D);F.set(_)})}var ID=b(S2());var LD=b(require("node:process"));function o6(){if(LD.default.platform!=="win32")return LD.default.env.TERM!=="linux";return Boolean(LD.default.env.WT_SESSION)||Boolean(LD.default.env.TERMINUS_SUBLIME)||LD.default.env.ConEmuTask==="{cmd::Cmder}"||LD.default.env.TERM_PROGRAM==="Terminus-Sublime"||LD.default.env.TERM_PROGRAM==="vscode"||LD.default.env.TERM==="xterm-256color"||LD.default.env.TERM==="alacritty"||LD.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var P3={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},x3={tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},s6={tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},r6={...P3,...x3},a6={...P3,...s6},t6=o6(),e6=t6?r6:a6,pD=e6,C7=Object.entries(x3);var k3={prefix:{idle:ID.default.blue("?"),done:ID.default.green(pD.tick)},spinner:{interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"].map((D)=>ID.default.yellow(D))},style:{answer:ID.default.cyan,message:ID.default.bold,error:(D)=>ID.default.red(`> ${D}`),defaultAnswer:(D)=>ID.default.dim(`(${D})`),help:ID.default.dim,highlight:ID.default.cyan,key:(D)=>ID.default.cyan(ID.default.bold(`<${D}>`))}};function y3(D){if(typeof D!=="object"||D===null)return!1;let _=D;while(Object.getPrototypeOf(_)!==null)_=Object.getPrototypeOf(_);return Object.getPrototypeOf(D)===_}function v3(...D){let _={};for(let F of D)for(let[u,B]of Object.entries(F)){let E=_[u];_[u]=y3(E)&&y3(B)?v3(E,B):B}return _}function TD(...D){let _=[k3,...D.filter((F)=>F!=null)];return v3(..._)}function kD({status:D="idle",theme:_}){let[F,u]=e(!1),[B,E]=e(0),{prefix:C,spinner:$}=TD(_);if(xD(()=>{if(D==="loading"){let Q,G=-1,A=setTimeout(E8.AsyncResource.bind(()=>{u(!0),Q=setInterval(E8.AsyncResource.bind(()=>{G=G+1,E(G%$.frames.length)}),$.interval)}),300);return()=>{clearTimeout(A),clearInterval(Q)}}else u(!1)},[D]),F)return $.frames[B];return typeof C==="string"?C:C[D==="loading"?"idle":D]??C.idle}function _2(D,_){return X2((F)=>{let u=F.get();if(!u||u.dependencies.length!==_.length||u.dependencies.some((B,E)=>B!==_[E])){let B=D();return F.set({value:B,dependencies:_}),B}return u.value})}function OD(D){return e({current:D})[0]}function yD(D){let _=OD(D);_.current=D,xD((F)=>{let u=!1,B=B8((E,C)=>{if(u)return;_.current(C,F)});return F.input.on("keypress",B),()=>{u=!0,F.input.removeListener("keypress",B)}},[])}var X_=b(f3()),Z_=b(G_());function k2(D,_){return D.split(`
|
|
38
|
+
`).flatMap((F)=>Z_.default(F,_,{trim:!1,hard:!0}).split(`
|
|
39
|
+
`).map((u)=>u.trimEnd())).join(`
|
|
40
|
+
`)}function E0(){return X_.default({defaultWidth:80,output:u8().output})}function Iu(D,_){return k2(D,_).split(`
|
|
41
|
+
`)}function Hu(D,_){let F=_.length,u=(D%F+F)%F;return[..._.slice(u),..._.slice(0,u)]}function J_({items:D,width:_,renderItem:F,active:u,position:B,pageSize:E}){let C=D.map((X,W)=>({item:X,index:W,isActive:W===u})),$=Hu(u-B,C).slice(0,E),q=(X)=>$[X]==null?[]:Iu(F($[X]),_),Q=Array.from({length:E}),G=q(B).slice(0,E),A=B+G.length<=E?B:E-G.length;Q.splice(A,G.length,...G);let M=A+G.length,J=B+1;while(M<E&&J<$.length){for(let X of q(J))if(Q[M++]=X,M>=E)break;J++}M=A-1,J=B-1;while(M>=0&&J>=0){for(let X of q(J).reverse())if(Q[M--]=X,M<0)break;J--}return Q.filter((X)=>typeof X==="string")}function Q_({active:D,pageSize:_,total:F}){let u=Math.floor(_/2);if(F<=_||D<u)return D;if(D>=F-u)return D+_-F;return u}function A_({active:D,lastActive:_,total:F,pageSize:u,pointer:B}){if(F<=u)return D;if(_<D&&D-_<u)return Math.min(Math.floor(u/2),B+D-_);return B}function y2({items:D,active:_,renderItem:F,pageSize:u,loop:B=!0}){let E=OD({position:0,lastActive:0}),C=B?A_({active:_,lastActive:E.current.lastActive,total:D.length,pageSize:u,pointer:E.current.position}):Q_({active:_,total:D.length,pageSize:u});return E.current.position=C,E.current.lastActive=_,J_({items:D,width:E0(),renderItem:F,active:_,position:C,pageSize:u}).join(`
|
|
42
|
+
`)}var j_=b(require("node:readline")),z_=require("node:async_hooks"),O_=b(M_());var F2=[];F2.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")F2.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")F2.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var C0=(D)=>!!D&&typeof D==="object"&&typeof D.removeListener==="function"&&typeof D.emit==="function"&&typeof D.reallyExit==="function"&&typeof D.listeners==="function"&&typeof D.kill==="function"&&typeof D.pid==="number"&&typeof D.on==="function",K8=Symbol.for("signal-exit emitter"),W8=globalThis,Tu=Object.defineProperty.bind(Object);class R_{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(W8[K8])return W8[K8];Tu(W8,K8,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(D,_){this.listeners[D].push(_)}removeListener(D,_){let F=this.listeners[D],u=F.indexOf(_);if(u===-1)return;if(u===0&&F.length===1)F.length=0;else F.splice(u,1)}emit(D,_,F){if(this.emitted[D])return!1;this.emitted[D]=!0;let u=!1;for(let B of this.listeners[D])u=B(_,F)===!0||u;if(D==="exit")u=this.emit("afterExit",_,F)||u;return u}}class R8{}var Nu=(D)=>{return{onExit(_,F){return D.onExit(_,F)},load(){return D.load()},unload(){return D.unload()}}};class V_ extends R8{onExit(){return()=>{}}load(){}unload(){}}class U_ extends R8{#F=M8.platform==="win32"?"SIGINT":"SIGHUP";#_=new R_;#D;#E;#C;#B={};#u=!1;constructor(D){super();this.#D=D,this.#B={};for(let _ of F2)this.#B[_]=()=>{let F=this.#D.listeners(_),{count:u}=this.#_,B=D;if(typeof B.__signal_exit_emitter__==="object"&&typeof B.__signal_exit_emitter__.count==="number")u+=B.__signal_exit_emitter__.count;if(F.length===u){this.unload();let E=this.#_.emit("exit",null,_),C=_==="SIGHUP"?this.#F:_;if(!E)D.kill(D.pid,C)}};this.#C=D.reallyExit,this.#E=D.emit}onExit(D,_){if(!C0(this.#D))return()=>{};if(this.#u===!1)this.load();let F=_?.alwaysLast?"afterExit":"exit";return this.#_.on(F,D),()=>{if(this.#_.removeListener(F,D),this.#_.listeners.exit.length===0&&this.#_.listeners.afterExit.length===0)this.unload()}}load(){if(this.#u)return;this.#u=!0,this.#_.count+=1;for(let D of F2)try{let _=this.#B[D];if(_)this.#D.on(D,_)}catch(_){}this.#D.emit=(D,..._)=>{return this.#q(D,..._)},this.#D.reallyExit=(D)=>{return this.#$(D)}}unload(){if(!this.#u)return;this.#u=!1,F2.forEach((D)=>{let _=this.#B[D];if(!_)throw new Error("Listener not defined for signal: "+D);try{this.#D.removeListener(D,_)}catch(F){}}),this.#D.emit=this.#E,this.#D.reallyExit=this.#C,this.#_.count-=1}#$(D){if(!C0(this.#D))return 0;return this.#D.exitCode=D||0,this.#_.emit("exit",this.#D.exitCode,null),this.#C.call(this.#D,this.#D.exitCode)}#q(D,..._){let F=this.#E;if(D==="exit"&&C0(this.#D)){if(typeof _[0]==="number")this.#D.exitCode=_[0];let u=F.call(this.#D,D,..._);return this.#_.emit("exit",this.#D.exitCode,null),u}else return F.call(this.#D,D,..._)}}var M8=globalThis.process,{onExit:I_,load:s7,unload:r7}=Nu(C0(M8)?new U_(M8):new V_);var N_=require("node:util"),lD=b(U8());var L_=(D)=>D.split(`
|
|
43
|
+
`).length,ju=(D)=>D.split(`
|
|
44
|
+
`).pop()??"";function T_(D){return D>0?lD.default.cursorDown(D):""}class q0{rl;height=0;extraLinesUnderPrompt=0;cursorPos;constructor(D){this.rl=D,this.rl=D,this.cursorPos=D.getCursorPos()}write(D){this.rl.output.unmute(),this.rl.output.write(D),this.rl.output.mute()}render(D,_=""){let F=ju(D),u=N_.stripVTControlCharacters(F),B=u;if(this.rl.line.length>0)B=B.slice(0,-this.rl.line.length);this.rl.setPrompt(B),this.cursorPos=this.rl.getCursorPos();let E=E0();if(D=k2(D,E),_=k2(_,E),u.length%E===0)D+=`
|
|
45
|
+
`;let C=D+(_?`
|
|
46
|
+
`+_:""),q=Math.floor(u.length/E)-this.cursorPos.rows+(_?L_(_):0);if(q>0)C+=lD.default.cursorUp(q);C+=lD.default.cursorTo(this.cursorPos.cols),this.write(T_(this.extraLinesUnderPrompt)+lD.default.eraseLines(this.height)+C),this.extraLinesUnderPrompt=q,this.height=L_(C)}checkCursorPos(){let D=this.rl.getCursorPos();if(D.cols!==this.cursorPos.cols)this.write(lD.default.cursorTo(D.cols)),this.cursorPos=D}done({clearContent:D}){this.rl.setPrompt("");let _=T_(this.extraLinesUnderPrompt);_+=D?lD.default.eraseLines(this.height):`
|
|
47
|
+
`,_+=lD.default.cursorShow,this.write(_),this.rl.close()}}class I8 extends Promise{static withResolver(){let D,_;return{promise:new Promise((u,B)=>{D=u,_=B}),resolve:D,reject:_}}}function zu(){let D=Error.prepareStackTrace;try{let _=[];return Error.prepareStackTrace=(F,u)=>{let B=u.slice(1);return _=B,B},new Error().stack,_}finally{Error.prepareStackTrace=D}}function vD(D){let F=zu()[1]?.getFileName?.();return(B,E={})=>{let{input:C=process.stdin,signal:$}=E,q=new Set,Q=new O_.default;Q.pipe(E.output??process.stdout);let G=j_.createInterface({terminal:!0,input:C,output:Q}),A=new q0(G),{promise:M,resolve:J,reject:X}=I8.withResolver(),W=()=>X(new D8);if($){let R=()=>X(new e0({cause:$.reason}));if($.aborted)return R(),Object.assign(M,{cancel:W});$.addEventListener("abort",R),q.add(()=>$.removeEventListener("abort",R))}q.add(I_((R,V)=>{X(new _8(`User force closed the prompt with ${R} ${V}`))}));let K=()=>A.checkCursorPos();return G.input.on("keypress",K),q.add(()=>G.input.removeListener("keypress",K)),Y3(G,(R)=>{let V=z_.AsyncResource.bind(()=>D2.clearAll());return G.on("close",V),q.add(()=>G.removeListener("close",V)),R(()=>{try{let Z=D(B,(N)=>{setImmediate(()=>J(N))});if(Z===void 0)throw new Error(`Prompt functions must return a string.
|
|
48
|
+
at ${F}`);let[U,I]=typeof Z==="string"?[Z]:Z;A.render(U,I),D2.run()}catch(Z){X(Z)}}),Object.assign(M.then((Z)=>{return D2.clearAll(),Z},(Z)=>{throw D2.clearAll(),Z}).finally(()=>{q.forEach((Z)=>Z()),A.done({clearContent:Boolean(E.clearPromptOnDone)}),Q.end()}).then(()=>M),{cancel:W})})}}var Y_=b(S2());class ND{separator=Y_.default.dim(Array.from({length:15}).join(pD.line));type="separator";constructor(D){if(D)this.separator=D}static isSeparator(D){return Boolean(D&&typeof D==="object"&&"type"in D&&D.type==="separator")}}function w_(D,_){let F=_!==!1;if(/^(y|yes)/i.test(D))F=!0;else if(/^(n|no)/i.test(D))F=!1;return F}function S_(D){return D?"Yes":"No"}var u2=vD((D,_)=>{let{transformer:F=S_}=D,[u,B]=e("idle"),[E,C]=e(""),$=TD(D.theme),q=kD({status:u,theme:$});yD((M,J)=>{if(cD(M)){let X=w_(E,D.default);C(F(X)),B("done"),_(X)}else if(M.name==="tab"){let X=S_(!w_(E,D.default));J.clearLine(0),J.write(X),C(X)}else C(J.line)});let Q=E,G="";if(u==="done")Q=$.style.answer(E);else G=` ${$.style.defaultAnswer(D.default===!1?"y/N":"Y/n")}`;let A=$.style.message(D.message,u);return`${q} ${A}${G} ${Q}`});var Ou={validationFailureMode:"keep"},K2=vD((D,_)=>{let{required:F,validate:u=()=>!0}=D,B=TD(Ou,D.theme),[E,C]=e("idle"),[$="",q]=e(D.default),[Q,G]=e(),[A,M]=e(""),J=kD({status:E,theme:B});yD(async(V,Z)=>{if(E!=="idle")return;if(cD(V)){let U=A||$;C("loading");let I=F&&!U?"You must provide a value":await u(U);if(I===!0)M(U),C("done"),_(U);else{if(B.validationFailureMode==="clear")M("");else Z.write(A);G(I||"You must provide a valid value"),C("idle")}}else if(_0(V)&&!A)q(void 0);else if(V.name==="tab"&&!A)q(void 0),Z.clearLine(0),Z.write($),M($);else M(Z.line),G(void 0)});let X=B.style.message(D.message,E),W=A;if(typeof D.transformer==="function")W=D.transformer(A,{isFinal:E==="done"});else if(E==="done")W=B.style.answer(A);let K;if($&&E!=="done"&&!A)K=B.style.defaultAnswer($);let R="";if(Q)R=B.style.error(Q);return[[J,X,K,W].filter((V)=>V!==void 0).join(" "),R]});var G0=b(S2());var Yu={icon:{cursor:pD.pointer},style:{disabled:(D)=>G0.default.dim(`- ${D}`),searchTerm:(D)=>G0.default.cyan(D),description:(D)=>G0.default.cyan(D)},helpMode:"auto"};function H8(D){return!ND.isSeparator(D)&&!D.disabled}function wu(D){return D.map((_)=>{if(ND.isSeparator(_))return _;if(typeof _==="string")return{value:_,name:_,short:_,disabled:!1};let F=_.name??String(_.value);return{value:_.value,name:F,description:_.description,short:_.short??F,disabled:_.disabled??!1}})}var L8=vD((D,_)=>{let{pageSize:F=7,validate:u=()=>!0}=D,B=TD(Yu,D.theme),E=OD(!0),[C,$]=e("loading"),[q,Q]=e(""),[G,A]=e([]),[M,J]=e(),X=kD({status:C,theme:B}),W=_2(()=>{let T=G.findIndex(H8),w=G.findLastIndex(H8);return{first:T,last:w}},[G]),[K=W.first,R]=e();xD(()=>{let T=new AbortController;return $("loading"),J(void 0),(async()=>{try{let O=await D.source(q||void 0,{signal:T.signal});if(!T.signal.aborted)R(void 0),J(void 0),A(wu(O)),$("idle")}catch(O){if(!T.signal.aborted&&O instanceof Error)J(O.message)}})(),()=>{T.abort()}},[q]);let V=G[K];yD(async(T,w)=>{if(cD(T))if(V){$("loading");let O=await u(V.value);if($("idle"),O===!0)$("done"),_(V.value);else if(V.name===q)J(O||"You must provide a valid value");else w.write(V.name),Q(V.name)}else w.write(q);else if(T.name==="tab"&&V)w.clearLine(0),w.write(V.name),Q(V.name);else if(C!=="loading"&&(T.name==="up"||T.name==="down")){if(w.clearLine(0),T.name==="up"&&K!==W.first||T.name==="down"&&K!==W.last){let O=T.name==="up"?-1:1,h=K;do h=(h+O+G.length)%G.length;while(!H8(G[h]));R(h)}}else Q(w.line)});let Z=B.style.message(D.message,C);if(K>0)E.current=!1;let U="";if(G.length>1&&(B.helpMode==="always"||B.helpMode==="auto"&&E.current))U=G.length>F?`
|
|
49
|
+
${B.style.help("(Use arrow keys to reveal more choices)")}`:`
|
|
50
|
+
${B.style.help("(Use arrow keys)")}`;let I=y2({items:G,active:K,renderItem({item:T,isActive:w}){if(ND.isSeparator(T))return` ${T.separator}`;if(T.disabled){let g=typeof T.disabled==="string"?T.disabled:"(disabled)";return B.style.disabled(`${T.name} ${g}`)}let O=w?B.style.highlight:(g)=>g,h=w?B.icon.cursor:" ";return O(`${h} ${T.name}`)},pageSize:F,loop:!1}),N;if(M)N=B.style.error(M);else if(G.length===0&&q!==""&&C==="idle")N=B.style.error("No results found");let j;if(C==="done"&&V){let T=V.short;return`${X} ${Z} ${B.style.answer(T)}`}else j=B.style.searchTerm(q);let x=V?.description?`
|
|
51
|
+
${B.style.description(V.description)}`:"";return[[X,Z,j].filter(Boolean).join(" "),`${N??I}${U}${x}`]});var T8=b(S2());var P_=b(U8());var Su={icon:{cursor:pD.pointer},style:{disabled:(D)=>T8.default.dim(`- ${D}`),description:(D)=>T8.default.cyan(D)},helpMode:"auto"};function W2(D){return!ND.isSeparator(D)&&!D.disabled}function Pu(D){return D.map((_)=>{if(ND.isSeparator(_))return _;if(typeof _==="string")return{value:_,name:_,short:_,disabled:!1};let F=_.name??String(_.value);return{value:_.value,name:F,description:_.description,short:_.short??F,disabled:_.disabled??!1}})}var WD=vD((D,_)=>{let{loop:F=!0,pageSize:u=7}=D,B=OD(!0),E=TD(Su,D.theme),[C,$]=e("idle"),q=kD({status:C,theme:E}),Q=OD(),G=_2(()=>Pu(D.choices),[D.choices]),A=_2(()=>{let I=G.findIndex(W2),N=G.findLastIndex(W2);if(I===-1)throw new w2("[select prompt] No selectable choices. All choices are disabled.");return{first:I,last:N}},[G]),M=_2(()=>{if(!("default"in D))return-1;return G.findIndex((I)=>W2(I)&&I.value===D.default)},[D.default,G]),[J,X]=e(M===-1?A.first:M),W=G[J];yD((I,N)=>{if(clearTimeout(Q.current),cD(I))$("done"),_(W.value);else if(D0(I)||t0(I)){if(N.clearLine(0),F||D0(I)&&J!==A.first||t0(I)&&J!==A.last){let j=D0(I)?-1:1,x=J;do x=(x+j+G.length)%G.length;while(!W2(G[x]));X(x)}}else if(z3(I)){N.clearLine(0);let j=Number(I.name)-1,x=G[j];if(x!=null&&W2(x))X(j)}else if(_0(I))N.clearLine(0);else{let j=N.line.toLowerCase(),x=G.findIndex((T)=>{if(ND.isSeparator(T)||!W2(T))return!1;return T.name.toLowerCase().startsWith(j)});if(x!==-1)X(x);Q.current=setTimeout(()=>{N.clearLine(0)},700)}}),xD(()=>()=>{clearTimeout(Q.current)},[]);let K=E.style.message(D.message,C),R="",V="";if(E.helpMode==="always"||E.helpMode==="auto"&&B.current)if(B.current=!1,G.length>u)V=`
|
|
52
|
+
${E.style.help("(Use arrow keys to reveal more choices)")}`;else R=E.style.help("(Use arrow keys)");let Z=y2({items:G,active:J,renderItem({item:I,isActive:N}){if(ND.isSeparator(I))return` ${I.separator}`;if(I.disabled){let T=typeof I.disabled==="string"?I.disabled:"(disabled)";return E.style.disabled(`${I.name} ${T}`)}let j=N?E.style.highlight:(T)=>T,x=N?E.icon.cursor:" ";return j(`${x} ${I.name}`)},pageSize:u,loop:F});if(C==="done")return`${q} ${K} ${E.style.answer(W.short)}`;let U=W.description?`
|
|
53
|
+
${E.style.description(W.description)}`:"";return`${[q,K,R].filter(Boolean).join(" ")}
|
|
54
|
+
${Z}${V}${U}${P_.default.cursorHide}`});var X0={name:"@tobylai/qmcli",version:"0.0.10",description:"A quick minecraft launcher command-line interface",main:"dist/cli.js",type:"module",scripts:{dev:"bun cli.ts",build:"bun bun-build.ts cjs",buildexe:"bun bun-build.ts exe local",prepublishOnly:"bun run build",pub:"npm publish"},keywords:["minecraft","cli"],author:"tobylai-toby",license:"MIT",dependencies:{"@inquirer/prompts":"^7.3.1","adm-zip":"^0.5.16",arch:"^3.0.0",chalk:"^5.4.1","cli-progress":"^3.12.0",commander:"^13.1.0",configstore:"^7.0.0",jssha:"^3.3.1","zip-lib":"^1.0.5"},devDependencies:{"@types/adm-zip":"^0.5.7","@types/bun":"latest","@types/cli-progress":"^3.11.6","@types/configstore":"^6.0.2","@types/node":"^22.13.0",tsx:"^4.19.2"},bin:{qmcli:"dist/qmcli.cjs"},publishConfig:{registry:"https://registry.npmjs.org/",access:"public"},peerDependencies:{typescript:"^5.0.0"}};var R2=b(require("node:path")),MF=b(require("node:os")),g2=b(c_());var l_=b(require("os")),b2=b(require("path")),nD=l_.default.homedir(),{env:E2}=process,p_=E2.XDG_DATA_HOME||(nD?b2.default.join(nD,".local","share"):void 0),K0=E2.XDG_CONFIG_HOME||(nD?b2.default.join(nD,".config"):void 0),c4=E2.XDG_STATE_HOME||(nD?b2.default.join(nD,".local","state"):void 0),p4=E2.XDG_CACHE_HOME||(nD?b2.default.join(nD,".cache"):void 0),l4=E2.XDG_RUNTIME_DIR||void 0,pu=(E2.XDG_DATA_DIRS||"/usr/local/share/:/usr/share/").split(":");if(p_)pu.unshift(p_);var lu=(E2.XDG_CONFIG_DIRS||"/etc/xdg").split(":");if(K0)lu.unshift(K0);var XF=b(require("node:path"));var m=b(require("node:fs")),QD=require("node:util");var bD=(D,_)=>{return function F(...u){return D.apply(void 0,u).catch(_)}},YD=(D,_)=>{return function F(...u){try{return D.apply(void 0,u)}catch(B){return _(B)}}};var Y8=b(require("node:process")),i_=Y8.default.getuid?!Y8.default.getuid():!1,n_=1e4,MD=()=>{return};var f2={isChangeErrorOk:(D)=>{if(!f2.isNodeError(D))return!1;let{code:_}=D;if(_==="ENOSYS")return!0;if(!i_&&(_==="EINVAL"||_==="EPERM"))return!0;return!1},isNodeError:(D)=>{return D instanceof Error},isRetriableError:(D)=>{if(!f2.isNodeError(D))return!1;let{code:_}=D;if(_==="EMFILE"||_==="ENFILE"||_==="EAGAIN"||_==="EBUSY"||_==="EACCESS"||_==="EACCES"||_==="EACCS"||_==="EPERM")return!0;return!1},onChangeError:(D)=>{if(!f2.isNodeError(D))throw D;if(f2.isChangeErrorOk(D))return;throw D}},qD=f2;class o_{constructor(){this.interval=25,this.intervalId=void 0,this.limit=n_,this.queueActive=new Set,this.queueWaiting=new Set,this.init=()=>{if(this.intervalId)return;this.intervalId=setInterval(this.tick,this.interval)},this.reset=()=>{if(!this.intervalId)return;clearInterval(this.intervalId),delete this.intervalId},this.add=(D)=>{if(this.queueWaiting.add(D),this.queueActive.size<this.limit/2)this.tick();else this.init()},this.remove=(D)=>{this.queueWaiting.delete(D),this.queueActive.delete(D)},this.schedule=()=>{return new Promise((D)=>{let _=()=>this.remove(F),F=()=>D(_);this.add(F)})},this.tick=()=>{if(this.queueActive.size>=this.limit)return;if(!this.queueWaiting.size)return this.reset();for(let D of this.queueWaiting){if(this.queueActive.size>=this.limit)break;this.queueWaiting.delete(D),this.queueActive.add(D),D()}}}}var s_=new o_;var fD=(D,_)=>{return function F(u){return function B(...E){return s_.schedule().then((C)=>{let $=(Q)=>{return C(),Q},q=(Q)=>{if(C(),Date.now()>=u)throw Q;if(_(Q)){let G=Math.round(100*Math.random());return new Promise((M)=>setTimeout(M,G)).then(()=>B.apply(void 0,E))}throw Q};return D.apply(void 0,E).then($,q)})}}},hD=(D,_)=>{return function F(u){return function B(...E){try{return D.apply(void 0,E)}catch(C){if(Date.now()>u)throw C;if(_(C))return B.apply(void 0,E);throw C}}}};var iu={attempt:{chmod:bD(QD.promisify(m.default.chmod),qD.onChangeError),chown:bD(QD.promisify(m.default.chown),qD.onChangeError),close:bD(QD.promisify(m.default.close),MD),fsync:bD(QD.promisify(m.default.fsync),MD),mkdir:bD(QD.promisify(m.default.mkdir),MD),realpath:bD(QD.promisify(m.default.realpath),MD),stat:bD(QD.promisify(m.default.stat),MD),unlink:bD(QD.promisify(m.default.unlink),MD),chmodSync:YD(m.default.chmodSync,qD.onChangeError),chownSync:YD(m.default.chownSync,qD.onChangeError),closeSync:YD(m.default.closeSync,MD),existsSync:YD(m.default.existsSync,MD),fsyncSync:YD(m.default.fsync,MD),mkdirSync:YD(m.default.mkdirSync,MD),realpathSync:YD(m.default.realpathSync,MD),statSync:YD(m.default.statSync,MD),unlinkSync:YD(m.default.unlinkSync,MD)},retry:{close:fD(QD.promisify(m.default.close),qD.isRetriableError),fsync:fD(QD.promisify(m.default.fsync),qD.isRetriableError),open:fD(QD.promisify(m.default.open),qD.isRetriableError),readFile:fD(QD.promisify(m.default.readFile),qD.isRetriableError),rename:fD(QD.promisify(m.default.rename),qD.isRetriableError),stat:fD(QD.promisify(m.default.stat),qD.isRetriableError),write:fD(QD.promisify(m.default.write),qD.isRetriableError),writeFile:fD(QD.promisify(m.default.writeFile),qD.isRetriableError),closeSync:hD(m.default.closeSync,qD.isRetriableError),fsyncSync:hD(m.default.fsyncSync,qD.isRetriableError),openSync:hD(m.default.openSync,qD.isRetriableError),readFileSync:hD(m.default.readFileSync,qD.isRetriableError),renameSync:hD(m.default.renameSync,qD.isRetriableError),statSync:hD(m.default.statSync,qD.isRetriableError),writeSync:hD(m.default.writeSync,qD.isRetriableError),writeFileSync:hD(m.default.writeFileSync,qD.isRetriableError)}},XD=iu;var w8=b(require("node:os")),W0=b(require("node:process")),r_="utf8",S8=438,a_=511;var t_={},e_=w8.default.userInfo().uid,DF=w8.default.userInfo().gid;var _F=1000,FF=!!W0.default.getuid,CB=W0.default.getuid?!W0.default.getuid():!1,P8=128;var uF=(D)=>{return D instanceof Error&&"code"in D};var x8=(D)=>{return typeof D==="string"},M0=(D)=>{return D===void 0};var GF=b(require("node:path"));var C2=b(require("node:process"));var k8=b(require("node:process")),BF=k8.default.platform==="linux",R0=k8.default.platform==="win32";var y8=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(!R0)y8.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(BF)y8.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");var EF=y8;class CF{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=(D)=>{if(this.exited)return;this.exited=!0;for(let _ of this.callbacks)_();if(D)if(R0&&(D!=="SIGINT"&&D!=="SIGTERM"&&D!=="SIGKILL"))C2.default.kill(C2.default.pid,"SIGTERM");else C2.default.kill(C2.default.pid,D)},this.hook=()=>{C2.default.once("exit",()=>this.exit());for(let D of EF)try{C2.default.once(D,()=>this.exit(D))}catch{}},this.register=(D)=>{return this.callbacks.add(D),()=>{this.callbacks.delete(D)}},this.hook()}}var $F=new CF;var nu=$F.register,qF=nu;var RD={store:{},create:(D)=>{let _=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),F=Date.now().toString().slice(-10),u="tmp-",B=`.tmp-${F}${_}`;return`${D}${B}`},get:(D,_,F=!0)=>{let u=RD.truncate(_(D));if(u in RD.store)return RD.get(D,_,F);return RD.store[u]=F,[u,()=>delete RD.store[u]]},purge:(D)=>{if(!RD.store[D])return;delete RD.store[D],XD.attempt.unlink(D)},purgeSync:(D)=>{if(!RD.store[D])return;delete RD.store[D],XD.attempt.unlinkSync(D)},purgeSyncAll:()=>{for(let D in RD.store)RD.purgeSync(D)},truncate:(D)=>{let _=GF.default.basename(D);if(_.length<=P8)return D;let F=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(_);if(!F)return D;let u=_.length-P8;return`${D.slice(0,-_.length)}${F[1]}${F[2].slice(0,-u)}${F[3]}`}};qF(RD.purgeSyncAll);var h2=RD;function V0(D,_,F=t_){if(x8(F))return V0(D,_,{encoding:F});let u=Date.now()+((F.timeout??_F)||-1),B=null,E=null,C=null;try{let $=XD.attempt.realpathSync(D),q=!!$;D=$||D,[E,B]=h2.get(D,F.tmpCreate||h2.create,F.tmpPurge!==!1);let Q=FF&&M0(F.chown),G=M0(F.mode);if(q&&(Q||G)){let A=XD.attempt.statSync(D);if(A){if(F={...F},Q)F.chown={uid:A.uid,gid:A.gid};if(G)F.mode=A.mode}}if(!q){let A=XF.default.dirname(D);XD.attempt.mkdirSync(A,{mode:a_,recursive:!0})}if(C=XD.retry.openSync(u)(E,"w",F.mode||S8),F.tmpCreated)F.tmpCreated(E);if(x8(_))XD.retry.writeSync(u)(C,_,0,F.encoding||r_);else if(!M0(_))XD.retry.writeSync(u)(C,_,0,_.length,0);if(F.fsync!==!1)if(F.fsyncWait!==!1)XD.retry.fsyncSync(u)(C);else XD.attempt.fsync(C);if(XD.retry.closeSync(u)(C),C=null,F.chown&&(F.chown.uid!==e_||F.chown.gid!==DF))XD.attempt.chownSync(E,F.chown.uid,F.chown.gid);if(F.mode&&F.mode!==S8)XD.attempt.chmodSync(E,F.mode);try{XD.retry.renameSync(u)(E,D)}catch(A){if(!uF(A))throw A;if(A.code!=="ENAMETOOLONG")throw A;XD.retry.renameSync(u)(E,h2.truncate(D))}B(),E=null}finally{if(C)XD.attempt.closeSync(C);if(E)h2.purge(E)}}var $2=(D)=>{let _=typeof D;return D!==null&&(_==="object"||_==="function")};var v8=new Set(["__proto__","prototype","constructor"]),ou=new Set("0123456789");function U0(D){let _=[],F="",u="start",B=!1;for(let E of D)switch(E){case"\\":{if(u==="index")throw new Error("Invalid character in an index");if(u==="indexEnd")throw new Error("Invalid character after an index");if(B)F+=E;u="property",B=!B;break}case".":{if(u==="index")throw new Error("Invalid character in an index");if(u==="indexEnd"){u="property";break}if(B){B=!1,F+=E;break}if(v8.has(F))return[];_.push(F),F="",u="property";break}case"[":{if(u==="index")throw new Error("Invalid character in an index");if(u==="indexEnd"){u="index";break}if(B){B=!1,F+=E;break}if(u==="property"){if(v8.has(F))return[];_.push(F),F=""}u="index";break}case"]":{if(u==="index"){_.push(Number.parseInt(F,10)),F="",u="indexEnd";break}if(u==="indexEnd")throw new Error("Invalid character after an index")}default:{if(u==="index"&&!ou.has(E))throw new Error("Invalid character in an index");if(u==="indexEnd")throw new Error("Invalid character after an index");if(u==="start")u="property";if(B)B=!1,F+="\\";F+=E}}if(B)F+="\\";switch(u){case"property":{if(v8.has(F))return[];_.push(F);break}case"index":throw new Error("Index was not closed");case"start":{_.push("");break}}return _}function b8(D,_){if(typeof _!=="number"&&Array.isArray(D)){let F=Number.parseInt(_,10);return Number.isInteger(F)&&D[F]===D[_]}return!1}function ZF(D,_){if(b8(D,_))throw new Error("Cannot use string index")}function JF(D,_,F){if(!$2(D)||typeof _!=="string")return F===void 0?D:F;let u=U0(_);if(u.length===0)return F;for(let B=0;B<u.length;B++){let E=u[B];if(b8(D,E))D=B===u.length-1?void 0:null;else D=D[E];if(D===void 0||D===null){if(B!==u.length-1)return F;break}}return D===void 0?F:D}function f8(D,_,F){if(!$2(D)||typeof _!=="string")return D;let u=D,B=U0(_);for(let E=0;E<B.length;E++){let C=B[E];if(ZF(D,C),E===B.length-1)D[C]=F;else if(!$2(D[C]))D[C]=typeof B[E+1]==="number"?[]:{};D=D[C]}return u}function QF(D,_){if(!$2(D)||typeof _!=="string")return!1;let F=U0(_);for(let u=0;u<F.length;u++){let B=F[u];if(ZF(D,B),u===F.length-1)return delete D[B],!0;if(D=D[B],!$2(D))return!1}}function AF(D,_){if(!$2(D)||typeof _!=="string")return!1;let F=U0(_);if(F.length===0)return!1;for(let u of F){if(!$2(D)||!(u in D)||b8(D,u))return!1;D=D[u]}return!0}function su(D,_){let F=_?R2.default.join(D,"config.json"):R2.default.join("configstore",`${D}.json`),u=K0??g2.default.mkdtempSync(g2.default.realpathSync(MF.default.tmpdir())+R2.default.sep);return R2.default.join(u,F)}var KF="You don't have access to this file.",ru={mode:448,recursive:!0},WF={mode:384};class I0{constructor(D,_,F={}){if(this._path=F.configPath??su(D,F.globalConfigPath),_)this.all={..._,...this.all}}get all(){try{return JSON.parse(g2.default.readFileSync(this._path,"utf8"))}catch(D){if(D.code==="ENOENT")return{};if(D.code==="EACCES")D.message=`${D.message}
|
|
55
|
+
${KF}
|
|
56
|
+
`;if(D.name==="SyntaxError")return V0(this._path,"",WF),{};throw D}}set all(D){try{g2.default.mkdirSync(R2.default.dirname(this._path),ru),V0(this._path,JSON.stringify(D,void 0,"\t"),WF)}catch(_){if(_.code==="EACCES")_.message=`${_.message}
|
|
57
|
+
${KF}
|
|
58
|
+
`;throw _}}get size(){return Object.keys(this.all||{}).length}get(D){return JF(this.all,D)}set(D,_){let F=this.all;if(arguments.length===1)for(let u of Object.keys(D))f8(F,u,D[u]);else f8(F,D,_);this.all=F}has(D){return AF(this.all,D)}delete(D){let _=this.all;QF(_,D),this.all=_}clear(){this.all={}}get path(){return this._path}}var uD=new I0(X0.name,{users:[],mirror:"official",paths:["~/.minecraft"],lang:"en"});var RF=(D=0)=>(_)=>`\x1B[${_+D}m`,VF=(D=0)=>(_)=>`\x1B[${38+D};5;${_}m`,UF=(D=0)=>(_,F,u)=>`\x1B[${38+D};2;${_};${F};${u}m`,a={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]}},gB=Object.keys(a.modifier),au=Object.keys(a.color),tu=Object.keys(a.bgColor),mB=[...au,...tu];function eu(){let D=new Map;for(let[_,F]of Object.entries(a)){for(let[u,B]of Object.entries(F))a[u]={open:`\x1B[${B[0]}m`,close:`\x1B[${B[1]}m`},F[u]=a[u],D.set(B[0],B[1]);Object.defineProperty(a,_,{value:F,enumerable:!1})}return Object.defineProperty(a,"codes",{value:D,enumerable:!1}),a.color.close="\x1B[39m",a.bgColor.close="\x1B[49m",a.color.ansi=RF(),a.color.ansi256=VF(),a.color.ansi16m=UF(),a.bgColor.ansi=RF(10),a.bgColor.ansi256=VF(10),a.bgColor.ansi16m=UF(10),Object.defineProperties(a,{rgbToAnsi256:{value(_,F,u){if(_===F&&F===u){if(_<8)return 16;if(_>248)return 231;return Math.round((_-8)/247*24)+232}return 16+36*Math.round(_/255*5)+6*Math.round(F/255*5)+Math.round(u/255*5)},enumerable:!1},hexToRgb:{value(_){let F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(_.toString(16));if(!F)return[0,0,0];let[u]=F;if(u.length===3)u=[...u].map((E)=>E+E).join("");let B=Number.parseInt(u,16);return[B>>16&255,B>>8&255,B&255]},enumerable:!1},hexToAnsi256:{value:(_)=>a.rgbToAnsi256(...a.hexToRgb(_)),enumerable:!1},ansi256ToAnsi:{value(_){if(_<8)return 30+_;if(_<16)return 90+(_-8);let F,u,B;if(_>=232)F=((_-232)*10+8)/255,u=F,B=F;else{_-=16;let $=_%36;F=Math.floor(_/36)/5,u=Math.floor($/6)/5,B=$%6/5}let E=Math.max(F,u,B)*2;if(E===0)return 30;let C=30+(Math.round(B)<<2|Math.round(u)<<1|Math.round(F));if(E===2)C+=60;return C},enumerable:!1},rgbToAnsi:{value:(_,F,u)=>a.ansi256ToAnsi(a.rgbToAnsi256(_,F,u)),enumerable:!1},hexToAnsi:{value:(_)=>a.ansi256ToAnsi(a.hexToAnsi256(_)),enumerable:!1}}),a}var D5=eu(),jD=D5;var L0=b(require("node:process")),HF=b(require("node:os")),h8=b(require("node:tty"));function HD(D,_=globalThis.Deno?globalThis.Deno.args:L0.default.argv){let F=D.startsWith("-")?"":D.length===1?"-":"--",u=_.indexOf(F+D),B=_.indexOf("--");return u!==-1&&(B===-1||u<B)}var{env:BD}=L0.default,H0;if(HD("no-color")||HD("no-colors")||HD("color=false")||HD("color=never"))H0=0;else if(HD("color")||HD("colors")||HD("color=true")||HD("color=always"))H0=1;function _5(){if("FORCE_COLOR"in BD){if(BD.FORCE_COLOR==="true")return 1;if(BD.FORCE_COLOR==="false")return 0;return BD.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(BD.FORCE_COLOR,10),3)}}function F5(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function u5(D,{streamIsTTY:_,sniffFlags:F=!0}={}){let u=_5();if(u!==void 0)H0=u;let B=F?H0:u;if(B===0)return 0;if(F){if(HD("color=16m")||HD("color=full")||HD("color=truecolor"))return 3;if(HD("color=256"))return 2}if("TF_BUILD"in BD&&"AGENT_NAME"in BD)return 1;if(D&&!_&&B===void 0)return 0;let E=B||0;if(BD.TERM==="dumb")return E;if(L0.default.platform==="win32"){let C=HF.default.release().split(".");if(Number(C[0])>=10&&Number(C[2])>=10586)return Number(C[2])>=14931?3:2;return 1}if("CI"in BD){if(["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((C)=>(C in BD)))return 3;if(["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((C)=>(C in BD))||BD.CI_NAME==="codeship")return 1;return E}if("TEAMCITY_VERSION"in BD)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(BD.TEAMCITY_VERSION)?1:0;if(BD.COLORTERM==="truecolor")return 3;if(BD.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in BD){let C=Number.parseInt((BD.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(BD.TERM_PROGRAM){case"iTerm.app":return C>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(BD.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(BD.TERM))return 1;if("COLORTERM"in BD)return 1;return E}function IF(D,_={}){let F=u5(D,{streamIsTTY:D&&D.isTTY,..._});return F5(F)}var B5={stdout:IF({isTTY:h8.default.isatty(1)}),stderr:IF({isTTY:h8.default.isatty(2)})},LF=B5;function TF(D,_,F){let u=D.indexOf(_);if(u===-1)return D;let B=_.length,E=0,C="";do C+=D.slice(E,u)+_+F,E=u+B,u=D.indexOf(_,E);while(u!==-1);return C+=D.slice(E),C}function NF(D,_,F,u){let B=0,E="";do{let C=D[u-1]==="\r";E+=D.slice(B,C?u-1:u)+_+(C?`\r
|
|
59
|
+
`:`
|
|
60
|
+
`)+F,B=u+1,u=D.indexOf(`
|
|
61
|
+
`,B)}while(u!==-1);return E+=D.slice(B),E}var{stdout:jF,stderr:zF}=LF,g8=Symbol("GENERATOR"),V2=Symbol("STYLER"),m2=Symbol("IS_EMPTY"),OF=["ansi","ansi","ansi256","ansi16m"],U2=Object.create(null),E5=(D,_={})=>{if(_.level&&!(Number.isInteger(_.level)&&_.level>=0&&_.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let F=jF?jF.level:0;D.level=_.level===void 0?F:_.level};var C5=(D)=>{let _=(...F)=>F.join(" ");return E5(_,D),Object.setPrototypeOf(_,d2.prototype),_};function d2(D){return C5(D)}Object.setPrototypeOf(d2.prototype,Function.prototype);for(let[D,_]of Object.entries(jD))U2[D]={get(){let F=T0(this,d8(_.open,_.close,this[V2]),this[m2]);return Object.defineProperty(this,D,{value:F}),F}};U2.visible={get(){let D=T0(this,this[V2],!0);return Object.defineProperty(this,"visible",{value:D}),D}};var m8=(D,_,F,...u)=>{if(D==="rgb"){if(_==="ansi16m")return jD[F].ansi16m(...u);if(_==="ansi256")return jD[F].ansi256(jD.rgbToAnsi256(...u));return jD[F].ansi(jD.rgbToAnsi(...u))}if(D==="hex")return m8("rgb",_,F,...jD.hexToRgb(...u));return jD[F][D](...u)},$5=["rgb","hex","ansi256"];for(let D of $5){U2[D]={get(){let{level:F}=this;return function(...u){let B=d8(m8(D,OF[F],"color",...u),jD.color.close,this[V2]);return T0(this,B,this[m2])}}};let _="bg"+D[0].toUpperCase()+D.slice(1);U2[_]={get(){let{level:F}=this;return function(...u){let B=d8(m8(D,OF[F],"bgColor",...u),jD.bgColor.close,this[V2]);return T0(this,B,this[m2])}}}}var q5=Object.defineProperties(()=>{},{...U2,level:{enumerable:!0,get(){return this[g8].level},set(D){this[g8].level=D}}}),d8=(D,_,F)=>{let u,B;if(F===void 0)u=D,B=_;else u=F.openAll+D,B=_+F.closeAll;return{open:D,close:_,openAll:u,closeAll:B,parent:F}},T0=(D,_,F)=>{let u=(...B)=>G5(u,B.length===1?""+B[0]:B.join(" "));return Object.setPrototypeOf(u,q5),u[g8]=D,u[V2]=_,u[m2]=F,u},G5=(D,_)=>{if(D.level<=0||!_)return D[m2]?"":_;let F=D[V2];if(F===void 0)return _;let{openAll:u,closeAll:B}=F;if(_.includes("\x1B"))while(F!==void 0)_=TF(_,F.close,F.open),F=F.parent;let E=_.indexOf(`
|
|
62
|
+
`);if(E!==-1)_=NF(_,B,u,E);return u+_+B};Object.defineProperties(d2.prototype,U2);var X5=d2(),oB=d2({level:zF?zF.level:0});var k=X5;var B1=b(require("fs")),E1=b(u1());function y5(D){if(D<1024)return`${D} B`;else if(D<1048576)return`${(D/1024).toFixed(2)} KB`;else if(D<1073741824)return`${(D/1048576).toFixed(2)} MB`;else return`${(D/1073741824).toFixed(2)} GB`}class s8{maxParallel;queue;activeDownloads;progressBar;totalTasks=0;completedTasks=0;speedUpdateInterval;extra;downloadedSize=0;startTime=0;constructor(D,_){this.extra=_,this.maxParallel=D,this.queue=[],this.activeDownloads=new Map,this.startTime=Date.now(),this.progressBar=new E1.SingleBar({format(F,u,B){let E=F.barCompleteChar.repeat(B.finishedPercent*20)+F.barIncompleteChar.repeat((1-B.finishedPercent)*20);return`${B.title} | ${E} | ${(B.finishedPercent*100).toFixed(1)}% | ${B.completed}/${B.totalTasks} | ${B.speed}`+(_?.totalSize?` | tot:${y5(_?.totalSize)} | eta:${B.calcEta.toFixed(1)}s`:"")},barCompleteChar:"█",barIncompleteChar:"░",hideCursor:!0}),this.speedUpdateInterval=setInterval(()=>this.updateProgress(),100)}addTask(D){if(this.queue.push(D),this.totalTasks++,!this.progressBar.isActive)this.progressBar.start(this.totalTasks,0,{title:"Waiting...",speed:"0.00 B/s",completed:0,totalTasks:this.totalTasks,finishedPercent:0,calcEta:1/0});this.processQueue()}processQueue(){while(this.activeDownloads.size<this.maxParallel&&this.queue.length>0){let D=this.queue.shift();this.activeDownloads.set(D.filename,0),this.downloadFile(D)}}formatSpeed(D){let _=["B/s","KB/s","MB/s","GB/s"],F=D,u=0;while(F>=1024&&u<_.length-1)F/=1024,u++;return`${F.toFixed(2)} ${_[u]}`}updateProgress(D=!1){let _=Array.from(this.activeDownloads.keys()),F=this.downloadedSize/((Date.now()-this.startTime)/1000);this.progressBar.update(this.completedTasks,{title:D?k.green("Done"):_.length>0?`Downloading: (${_.length} active)`:"Preparing...",speed:this.formatSpeed(F),completed:this.completedTasks,totalTasks:this.totalTasks,finishedPercent:this.extra?.totalSize?this.downloadedSize/this.extra.totalSize:this.completedTasks/this.totalTasks,calcEta:this.extra?.totalSize?(this.extra.totalSize-this.downloadedSize)/F:0})}async downloadFile(D){try{let _=await fetch(D.url);if(!_.ok)throw new Error(`HTTP ${_.status}`);let F=B1.createWriteStream(D.filename);F.on("error",(C)=>{throw C});let u=_.body?.getReader();if(!u)throw new Error("No readable stream");let B=0,E=Date.now();while(!0){let{done:C,value:$}=await u.read();if(C)break;F.write($),B+=$.length,this.downloadedSize+=$.length;let q=(Date.now()-E)/1000+0.01;this.activeDownloads.set(D.filename,q>0?B/q:0)}F.end(),this.completedTasks++}catch(_){if((D.retries||20)>0)console.error(`♻️❌ ${D.filename}(retrying): ${_.message}`),await new Promise((F)=>setTimeout(F,3000)),this.queue.push({...D,retries:D.retries-1});else throw console.error(`❌⚙️ ${D.filename}(FAILED!): ${_.message}`),_}finally{this.activeDownloads.delete(D.filename),this.processQueue()}}async wait(){this.startTime=Date.now();while(this.activeDownloads.size>0||this.queue.length>0)await new Promise((D)=>setTimeout(D,100));this.updateProgress(!0),clearInterval(this.speedUpdateInterval),this.progressBar.stop()}}var j0={official:{launcher:"https://launcher.mojang.com",launchermeta:"https://launchermeta.mojang.com",pistonmeta:"https://piston-meta.mojang.com",resources:"http://resources.download.minecraft.net",libraries:"https://libraries.minecraft.net"},bmclapi:{launcher:"https://bmclapi2.bangbang93.com",launchermeta:"https://bmclapi2.bangbang93.com",pistonmeta:"https://bmclapi2.bangbang93.com",resources:"http://bmclapi2.bangbang93.com/assets",libraries:"https://bmclapi2.bangbang93.com/maven"}};function v5(D,_,F){return D.replace(j0.official[F],j0[_][F])}function I2(D){for(let _ of Object.keys(j0.official))if(D.startsWith(j0.official[_]))return v5(D,uD.get("mirror"),_);return D}var s=b(require("node:fs")),rD=b(require("node:path"));var C1={selectedProfile:"(Default)",profiles:{"(Default)":{name:"(Default)"}},clientToken:"88888888-8888-8888-8888-888888888888"};var c2=b(require("node:os")),X1=b(require("node:path")),Z1=b(r8());function J1(D){if(!D||D.length===0||D.length>255)return!1;if(D==="."||D==="..")return!1;if(D.includes("/")||D.includes("\\"))return!1;if(/[<>:"|?*\u0000-\u001F]/gu.test(D))return!1;if(/\.\./gu.test(D))return!1;if(/[\s.]$/u.test(D))return!1;if(/[\p{C}]/gu.test(D))return!1;return/^[^\s.]/u.test(D)&&D.trim()===D}function VD(D){if(D.startsWith("~/"))return X1.join(c2.homedir(),D.slice(2));return D}function H2(){if(c2.platform()==="win32")return"windows";else if(c2.platform()==="darwin")return"osx";else return"linux"}function Q1(){let D=Z1.default();if(D==="x64")return"";else return"-"+D}function z0(D,_={}){for(let F of D){let u=!0;if(F.os){let B=F.os,E=_.os||{};if(B.name&&E.name!==B.name)u=!1;if(B.version){if(!new RegExp(B.version).test(E.version||""))u=!1}if(B.arch&&E.arch!==B.arch)u=!1}if(F.features){let B=F.features;for(let[E,C]of Object.entries(B))if(_[E]!==C){u=!1;break}}if(u)return F.action==="allow"}return!1}var V6=b(i1());function n1(D,_,F,u){let B,E,C,$=_||[0],q=(F=F||0)>>>3,Q=u===-1?3:0;for(B=0;B<D.length;B+=1)C=B+q,E=C>>>2,$.length<=E&&$.push(0),$[E]|=D[B]<<8*(Q+u*(C%4));return{value:$,binLen:8*D.length+F}}function z2(D,_,F){switch(_){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(D){case"HEX":return function(u,B,E){return function(C,$,q,Q){let G,A,M,J;if(C.length%2!=0)throw new Error("String of HEX type must be in byte increments");let X=$||[0],W=(q=q||0)>>>3,K=Q===-1?3:0;for(G=0;G<C.length;G+=2){if(A=parseInt(C.substr(G,2),16),isNaN(A))throw new Error("String of HEX type contains invalid characters");for(J=(G>>>1)+W,M=J>>>2;X.length<=M;)X.push(0);X[M]|=A<<8*(K+Q*(J%4))}return{value:X,binLen:4*C.length+q}}(u,B,E,F)};case"TEXT":return function(u,B,E){return function(C,$,q,Q,G){let A,M,J,X,W,K,R,V,Z=0,U=q||[0],I=(Q=Q||0)>>>3;if($==="UTF8")for(R=G===-1?3:0,J=0;J<C.length;J+=1)for(A=C.charCodeAt(J),M=[],128>A?M.push(A):2048>A?(M.push(192|A>>>6),M.push(128|63&A)):55296>A||57344<=A?M.push(224|A>>>12,128|A>>>6&63,128|63&A):(J+=1,A=65536+((1023&A)<<10|1023&C.charCodeAt(J)),M.push(240|A>>>18,128|A>>>12&63,128|A>>>6&63,128|63&A)),X=0;X<M.length;X+=1){for(K=Z+I,W=K>>>2;U.length<=W;)U.push(0);U[W]|=M[X]<<8*(R+G*(K%4)),Z+=1}else for(R=G===-1?2:0,V=$==="UTF16LE"&&G!==1||$!=="UTF16LE"&&G===1,J=0;J<C.length;J+=1){for(A=C.charCodeAt(J),V===!0&&(X=255&A,A=X<<8|A>>>8),K=Z+I,W=K>>>2;U.length<=W;)U.push(0);U[W]|=A<<8*(R+G*(K%4)),Z+=2}return{value:U,binLen:8*Z+Q}}(u,_,B,E,F)};case"B64":return function(u,B,E){return function(C,$,q,Q){let G,A,M,J,X,W,K,R=0,V=$||[0],Z=(q=q||0)>>>3,U=Q===-1?3:0,I=C.indexOf("=");if(C.search(/^[a-zA-Z0-9=+/]+$/)===-1)throw new Error("Invalid character in base-64 string");if(C=C.replace(/=/g,""),I!==-1&&I<C.length)throw new Error("Invalid '=' found in base-64 string");for(A=0;A<C.length;A+=4){for(X=C.substr(A,4),J=0,M=0;M<X.length;M+=1)G="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(X.charAt(M)),J|=G<<18-6*M;for(M=0;M<X.length-1;M+=1){for(K=R+Z,W=K>>>2;V.length<=W;)V.push(0);V[W]|=(J>>>16-8*M&255)<<8*(U+Q*(K%4)),R+=1}}return{value:V,binLen:8*R+q}}(u,B,E,F)};case"BYTES":return function(u,B,E){return function(C,$,q,Q){let G,A,M,J,X=$||[0],W=(q=q||0)>>>3,K=Q===-1?3:0;for(A=0;A<C.length;A+=1)G=C.charCodeAt(A),J=A+W,M=J>>>2,X.length<=M&&X.push(0),X[M]|=G<<8*(K+Q*(J%4));return{value:X,binLen:8*C.length+q}}(u,B,E,F)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(u){throw new Error("ARRAYBUFFER not supported by this environment")}return function(u,B,E){return function(C,$,q,Q){return n1(new Uint8Array(C),$,q,Q)}(u,B,E,F)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(u){throw new Error("UINT8ARRAY not supported by this environment")}return function(u,B,E){return n1(u,B,E,F)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function o1(D,_,F,u){switch(D){case"HEX":return function(B){return function(E,C,$,q){let G,A,M="",J=C/8,X=$===-1?3:0;for(G=0;G<J;G+=1)A=E[G>>>2]>>>8*(X+$*(G%4)),M+="0123456789abcdef".charAt(A>>>4&15)+"0123456789abcdef".charAt(15&A);return q.outputUpper?M.toUpperCase():M}(B,_,F,u)};case"B64":return function(B){return function(E,C,$,q){let Q,G,A,M,J,X="",W=C/8,K=$===-1?3:0;for(Q=0;Q<W;Q+=3)for(M=Q+1<W?E[Q+1>>>2]:0,J=Q+2<W?E[Q+2>>>2]:0,A=(E[Q>>>2]>>>8*(K+$*(Q%4))&255)<<16|(M>>>8*(K+$*((Q+1)%4))&255)<<8|J>>>8*(K+$*((Q+2)%4))&255,G=0;G<4;G+=1)X+=8*Q+6*G<=C?"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(A>>>6*(3-G)&63):q.b64Pad;return X}(B,_,F,u)};case"BYTES":return function(B){return function(E,C,$){let q,Q,G="",A=C/8,M=$===-1?3:0;for(q=0;q<A;q+=1)Q=E[q>>>2]>>>8*(M+$*(q%4))&255,G+=String.fromCharCode(Q);return G}(B,_,F)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(B){throw new Error("ARRAYBUFFER not supported by this environment")}return function(B){return function(E,C,$){let q,Q=C/8,G=new ArrayBuffer(Q),A=new Uint8Array(G),M=$===-1?3:0;for(q=0;q<Q;q+=1)A[q]=E[q>>>2]>>>8*(M+$*(q%4))&255;return G}(B,_,F)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(B){throw new Error("UINT8ARRAY not supported by this environment")}return function(B){return function(E,C,$){let q,Q=C/8,G=$===-1?3:0,A=new Uint8Array(Q);for(q=0;q<Q;q+=1)A[q]=E[q>>>2]>>>8*(G+$*(q%4))&255;return A}(B,_,F)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}var n2=4294967296,Y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],gD=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],mD=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],o2="Chosen SHA variant is not supported",u6="Cannot set numRounds with MAC";function x0(D,_){let F,u,B=D.binLen>>>3,E=_.binLen>>>3,C=B<<3,$=4-B<<3;if(B%4!=0){for(F=0;F<E;F+=4)u=B+F>>>2,D.value[u]|=_.value[F>>>2]<<C,D.value.push(0),D.value[u+1]|=_.value[F>>>2]>>>$;return(D.value.length<<2)-4>=E+B&&D.value.pop(),{value:D.value,binLen:D.binLen+_.binLen}}return{value:D.value.concat(_.value),binLen:D.binLen+_.binLen}}function s1(D){let _={outputUpper:!1,b64Pad:"=",outputLen:-1},F=D||{};if(_.outputUpper=F.outputUpper||!1,F.b64Pad&&(_.b64Pad=F.b64Pad),F.outputLen){if(F.outputLen%8!=0)throw new Error("Output length must be a multiple of 8");_.outputLen=F.outputLen}else if(F.shakeLen){if(F.shakeLen%8!=0)throw new Error("Output length must be a multiple of 8");_.outputLen=F.shakeLen}if(typeof _.outputUpper!="boolean")throw new Error("Invalid outputUpper formatting option");if(typeof _.b64Pad!="string")throw new Error("Invalid b64Pad formatting option");return _}function sD(D,_,F,u){let B=D+" must include a value and format";if(!_){if(!u)throw new Error(B);return u}if(_.value===void 0||!_.format)throw new Error(B);return z2(_.format,_.encoding||"UTF8",F)(_.value)}class s2{constructor(D,_,F){let u=F||{};if(this.t=_,this.i=u.encoding||"UTF8",this.numRounds=u.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.o=D,this.h=[],this.u=0,this.l=!1,this.A=0,this.H=!1,this.S=[],this.p=[]}update(D){let _,F=0,u=this.m>>>5,B=this.C(D,this.h,this.u),E=B.binLen,C=B.value,$=E>>>5;for(_=0;_<$;_+=u)F+this.m<=E&&(this.U=this.v(C.slice(_,_+u),this.U),F+=this.m);return this.A+=F,this.h=C.slice(F>>>5),this.u=E%this.m,this.l=!0,this}getHash(D,_){let F,u,B=this.R,E=s1(_);if(this.K){if(E.outputLen===-1)throw new Error("Output length must be specified in options");B=E.outputLen}let C=o1(D,B,this.T,E);if(this.H&&this.g)return C(this.g(E));for(u=this.F(this.h.slice(),this.u,this.A,this.L(this.U),B),F=1;F<this.numRounds;F+=1)this.K&&B%32!=0&&(u[u.length-1]&=16777215>>>24-B%32),u=this.F(u,B,0,this.B(this.o),B);return C(u)}setHMACKey(D,_,F){if(!this.M)throw new Error("Variant does not support HMAC");if(this.l)throw new Error("Cannot set MAC key after calling update");let u=z2(_,(F||{}).encoding||"UTF8",this.T);this.k(u(D))}k(D){let _=this.m>>>3,F=_/4-1,u;if(this.numRounds!==1)throw new Error(u6);if(this.H)throw new Error("MAC key already set");for(_<D.binLen/8&&(D.value=this.F(D.value,D.binLen,0,this.B(this.o),this.R));D.value.length<=F;)D.value.push(0);for(u=0;u<=F;u+=1)this.S[u]=909522486^D.value[u],this.p[u]=1549556828^D.value[u];this.U=this.v(this.S,this.U),this.A=this.m,this.H=!0}getHMAC(D,_){let F=s1(_);return o1(D,this.R,this.T,F)(this.Y())}Y(){let D;if(!this.H)throw new Error("Cannot call getHMAC without first setting MAC key");let _=this.F(this.h.slice(),this.u,this.A,this.L(this.U),this.R);return D=this.v(this.p,this.B(this.o)),D=this.F(_,this.R,this.m,D,this.R),D}}function j2(D,_){return D<<_|D>>>32-_}function wD(D,_){return D>>>_|D<<32-_}function B6(D,_){return D>>>_}function r1(D,_,F){return D^_^F}function E6(D,_,F){return D&_^~D&F}function C6(D,_,F){return D&_^D&F^_&F}function B9(D){return wD(D,2)^wD(D,13)^wD(D,22)}function KD(D,_){let F=(65535&D)+(65535&_);return(65535&(D>>>16)+(_>>>16)+(F>>>16))<<16|65535&F}function E9(D,_,F,u){let B=(65535&D)+(65535&_)+(65535&F)+(65535&u);return(65535&(D>>>16)+(_>>>16)+(F>>>16)+(u>>>16)+(B>>>16))<<16|65535&B}function i2(D,_,F,u,B){let E=(65535&D)+(65535&_)+(65535&F)+(65535&u)+(65535&B);return(65535&(D>>>16)+(_>>>16)+(F>>>16)+(u>>>16)+(B>>>16)+(E>>>16))<<16|65535&E}function C9(D){return wD(D,7)^wD(D,18)^B6(D,3)}function $9(D){return wD(D,6)^wD(D,11)^wD(D,25)}function q9(D){return[1732584193,4023233417,2562383102,271733878,3285377520]}function $6(D,_){let F,u,B,E,C,$,q,Q=[];for(F=_[0],u=_[1],B=_[2],E=_[3],C=_[4],q=0;q<80;q+=1)Q[q]=q<16?D[q]:j2(Q[q-3]^Q[q-8]^Q[q-14]^Q[q-16],1),$=q<20?i2(j2(F,5),E6(u,B,E),C,1518500249,Q[q]):q<40?i2(j2(F,5),r1(u,B,E),C,1859775393,Q[q]):q<60?i2(j2(F,5),C6(u,B,E),C,2400959708,Q[q]):i2(j2(F,5),r1(u,B,E),C,3395469782,Q[q]),C=E,E=B,B=j2(u,30),u=F,F=$;return _[0]=KD(F,_[0]),_[1]=KD(u,_[1]),_[2]=KD(B,_[2]),_[3]=KD(E,_[3]),_[4]=KD(C,_[4]),_}function G9(D,_,F,u){let B,E=15+(_+65>>>9<<4),C=_+F;for(;D.length<=E;)D.push(0);for(D[_>>>5]|=128<<24-_%32,D[E]=4294967295&C,D[E-1]=C/n2|0,B=0;B<D.length;B+=16)u=$6(D.slice(B,B+16),u);return u}var X9=class extends s2{constructor(D,_,F){if(D!=="SHA-1")throw new Error(o2);super(D,_,F);let u=F||{};this.M=!0,this.g=this.Y,this.T=-1,this.C=z2(this.t,this.i,this.T),this.v=$6,this.L=function(B){return B.slice()},this.B=q9,this.F=G9,this.U=[1732584193,4023233417,2562383102,271733878,3285377520],this.m=512,this.R=160,this.K=!1,u.hmacKey&&this.k(sD("hmacKey",u.hmacKey,this.T))}};function a1(D){let _;return _=D=="SHA-224"?gD.slice():mD.slice(),_}function t1(D,_){let F,u,B,E,C,$,q,Q,G,A,M,J=[];for(F=_[0],u=_[1],B=_[2],E=_[3],C=_[4],$=_[5],q=_[6],Q=_[7],M=0;M<64;M+=1)J[M]=M<16?D[M]:E9(wD(X=J[M-2],17)^wD(X,19)^B6(X,10),J[M-7],C9(J[M-15]),J[M-16]),G=i2(Q,$9(C),E6(C,$,q),Y[M],J[M]),A=KD(B9(F),C6(F,u,B)),Q=q,q=$,$=C,C=KD(E,G),E=B,B=u,u=F,F=KD(G,A);var X;return _[0]=KD(F,_[0]),_[1]=KD(u,_[1]),_[2]=KD(B,_[2]),_[3]=KD(E,_[3]),_[4]=KD(C,_[4]),_[5]=KD($,_[5]),_[6]=KD(q,_[6]),_[7]=KD(Q,_[7]),_}var Z9=class extends s2{constructor(D,_,F){if(D!=="SHA-224"&&D!=="SHA-256")throw new Error(o2);super(D,_,F);let u=F||{};this.g=this.Y,this.M=!0,this.T=-1,this.C=z2(this.t,this.i,this.T),this.v=t1,this.L=function(B){return B.slice()},this.B=a1,this.F=function(B,E,C,$){return function(q,Q,G,A,M){let J,X,W=15+(Q+65>>>9<<4),K=Q+G;for(;q.length<=W;)q.push(0);for(q[Q>>>5]|=128<<24-Q%32,q[W]=4294967295&K,q[W-1]=K/n2|0,J=0;J<q.length;J+=16)A=t1(q.slice(J,J+16),A);return X=M==="SHA-224"?[A[0],A[1],A[2],A[3],A[4],A[5],A[6]]:A,X}(B,E,C,$,D)},this.U=a1(D),this.m=512,this.R=D==="SHA-224"?224:256,this.K=!1,u.hmacKey&&this.k(sD("hmacKey",u.hmacKey,this.T))}};class H{constructor(D,_){this.N=D,this.I=_}}function e1(D,_){let F;return _>32?(F=64-_,new H(D.I<<_|D.N>>>F,D.N<<_|D.I>>>F)):_!==0?(F=32-_,new H(D.N<<_|D.I>>>F,D.I<<_|D.N>>>F)):D}function SD(D,_){let F;return _<32?(F=32-_,new H(D.N>>>_|D.I<<F,D.I>>>_|D.N<<F)):(F=64-_,new H(D.I>>>_|D.N<<F,D.N>>>_|D.I<<F))}function q6(D,_){return new H(D.N>>>_,D.I>>>_|D.N<<32-_)}function J9(D,_,F){return new H(D.N&_.N^D.N&F.N^_.N&F.N,D.I&_.I^D.I&F.I^_.I&F.I)}function Q9(D){let _=SD(D,28),F=SD(D,34),u=SD(D,39);return new H(_.N^F.N^u.N,_.I^F.I^u.I)}function zD(D,_){let F,u;F=(65535&D.I)+(65535&_.I),u=(D.I>>>16)+(_.I>>>16)+(F>>>16);let B=(65535&u)<<16|65535&F;return F=(65535&D.N)+(65535&_.N)+(u>>>16),u=(D.N>>>16)+(_.N>>>16)+(F>>>16),new H((65535&u)<<16|65535&F,B)}function A9(D,_,F,u){let B,E;B=(65535&D.I)+(65535&_.I)+(65535&F.I)+(65535&u.I),E=(D.I>>>16)+(_.I>>>16)+(F.I>>>16)+(u.I>>>16)+(B>>>16);let C=(65535&E)<<16|65535&B;return B=(65535&D.N)+(65535&_.N)+(65535&F.N)+(65535&u.N)+(E>>>16),E=(D.N>>>16)+(_.N>>>16)+(F.N>>>16)+(u.N>>>16)+(B>>>16),new H((65535&E)<<16|65535&B,C)}function K9(D,_,F,u,B){let E,C;E=(65535&D.I)+(65535&_.I)+(65535&F.I)+(65535&u.I)+(65535&B.I),C=(D.I>>>16)+(_.I>>>16)+(F.I>>>16)+(u.I>>>16)+(B.I>>>16)+(E>>>16);let $=(65535&C)<<16|65535&E;return E=(65535&D.N)+(65535&_.N)+(65535&F.N)+(65535&u.N)+(65535&B.N)+(C>>>16),C=(D.N>>>16)+(_.N>>>16)+(F.N>>>16)+(u.N>>>16)+(B.N>>>16)+(E>>>16),new H((65535&C)<<16|65535&E,$)}function l2(D,_){return new H(D.N^_.N,D.I^_.I)}function W9(D){let _=SD(D,19),F=SD(D,61),u=q6(D,6);return new H(_.N^F.N^u.N,_.I^F.I^u.I)}function M9(D){let _=SD(D,1),F=SD(D,8),u=q6(D,7);return new H(_.N^F.N^u.N,_.I^F.I^u.I)}function R9(D){let _=SD(D,14),F=SD(D,18),u=SD(D,41);return new H(_.N^F.N^u.N,_.I^F.I^u.I)}var V9=[new H(Y[0],3609767458),new H(Y[1],602891725),new H(Y[2],3964484399),new H(Y[3],2173295548),new H(Y[4],4081628472),new H(Y[5],3053834265),new H(Y[6],2937671579),new H(Y[7],3664609560),new H(Y[8],2734883394),new H(Y[9],1164996542),new H(Y[10],1323610764),new H(Y[11],3590304994),new H(Y[12],4068182383),new H(Y[13],991336113),new H(Y[14],633803317),new H(Y[15],3479774868),new H(Y[16],2666613458),new H(Y[17],944711139),new H(Y[18],2341262773),new H(Y[19],2007800933),new H(Y[20],1495990901),new H(Y[21],1856431235),new H(Y[22],3175218132),new H(Y[23],2198950837),new H(Y[24],3999719339),new H(Y[25],766784016),new H(Y[26],2566594879),new H(Y[27],3203337956),new H(Y[28],1034457026),new H(Y[29],2466948901),new H(Y[30],3758326383),new H(Y[31],168717936),new H(Y[32],1188179964),new H(Y[33],1546045734),new H(Y[34],1522805485),new H(Y[35],2643833823),new H(Y[36],2343527390),new H(Y[37],1014477480),new H(Y[38],1206759142),new H(Y[39],344077627),new H(Y[40],1290863460),new H(Y[41],3158454273),new H(Y[42],3505952657),new H(Y[43],106217008),new H(Y[44],3606008344),new H(Y[45],1432725776),new H(Y[46],1467031594),new H(Y[47],851169720),new H(Y[48],3100823752),new H(Y[49],1363258195),new H(Y[50],3750685593),new H(Y[51],3785050280),new H(Y[52],3318307427),new H(Y[53],3812723403),new H(Y[54],2003034995),new H(Y[55],3602036899),new H(Y[56],1575990012),new H(Y[57],1125592928),new H(Y[58],2716904306),new H(Y[59],442776044),new H(Y[60],593698344),new H(Y[61],3733110249),new H(Y[62],2999351573),new H(Y[63],3815920427),new H(3391569614,3928383900),new H(3515267271,566280711),new H(3940187606,3454069534),new H(4118630271,4000239992),new H(116418474,1914138554),new H(174292421,2731055270),new H(289380356,3203993006),new H(460393269,320620315),new H(685471733,587496836),new H(852142971,1086792851),new H(1017036298,365543100),new H(1126000580,2618297676),new H(1288033470,3409855158),new H(1501505948,4234509866),new H(1607167915,987167468),new H(1816402316,1246189591)];function D6(D){return D==="SHA-384"?[new H(3418070365,gD[0]),new H(1654270250,gD[1]),new H(2438529370,gD[2]),new H(355462360,gD[3]),new H(1731405415,gD[4]),new H(41048885895,gD[5]),new H(3675008525,gD[6]),new H(1203062813,gD[7])]:[new H(mD[0],4089235720),new H(mD[1],2227873595),new H(mD[2],4271175723),new H(mD[3],1595750129),new H(mD[4],2917565137),new H(mD[5],725511199),new H(mD[6],4215389547),new H(mD[7],327033209)]}function _6(D,_){let F,u,B,E,C,$,q,Q,G,A,M,J,X=[];for(F=_[0],u=_[1],B=_[2],E=_[3],C=_[4],$=_[5],q=_[6],Q=_[7],M=0;M<80;M+=1)M<16?(J=2*M,X[M]=new H(D[J],D[J+1])):X[M]=A9(W9(X[M-2]),X[M-7],M9(X[M-15]),X[M-16]),G=K9(Q,R9(C),(K=$,R=q,new H((W=C).N&K.N^~W.N&R.N,W.I&K.I^~W.I&R.I)),V9[M],X[M]),A=zD(Q9(F),J9(F,u,B)),Q=q,q=$,$=C,C=zD(E,G),E=B,B=u,u=F,F=zD(G,A);var W,K,R;return _[0]=zD(F,_[0]),_[1]=zD(u,_[1]),_[2]=zD(B,_[2]),_[3]=zD(E,_[3]),_[4]=zD(C,_[4]),_[5]=zD($,_[5]),_[6]=zD(q,_[6]),_[7]=zD(Q,_[7]),_}var U9=class extends s2{constructor(D,_,F){if(D!=="SHA-384"&&D!=="SHA-512")throw new Error(o2);super(D,_,F);let u=F||{};this.g=this.Y,this.M=!0,this.T=-1,this.C=z2(this.t,this.i,this.T),this.v=_6,this.L=function(B){return B.slice()},this.B=D6,this.F=function(B,E,C,$){return function(q,Q,G,A,M){let J,X,W=31+(Q+129>>>10<<5),K=Q+G;for(;q.length<=W;)q.push(0);for(q[Q>>>5]|=128<<24-Q%32,q[W]=4294967295&K,q[W-1]=K/n2|0,J=0;J<q.length;J+=32)A=_6(q.slice(J,J+32),A);return X=M==="SHA-384"?[A[0].N,A[0].I,A[1].N,A[1].I,A[2].N,A[2].I,A[3].N,A[3].I,A[4].N,A[4].I,A[5].N,A[5].I]:[A[0].N,A[0].I,A[1].N,A[1].I,A[2].N,A[2].I,A[3].N,A[3].I,A[4].N,A[4].I,A[5].N,A[5].I,A[6].N,A[6].I,A[7].N,A[7].I],X}(B,E,C,$,D)},this.U=D6(D),this.m=1024,this.R=D==="SHA-384"?384:512,this.K=!1,u.hmacKey&&this.k(sD("hmacKey",u.hmacKey,this.T))}},I9=[new H(0,1),new H(0,32898),new H(2147483648,32906),new H(2147483648,2147516416),new H(0,32907),new H(0,2147483649),new H(2147483648,2147516545),new H(2147483648,32777),new H(0,138),new H(0,136),new H(0,2147516425),new H(0,2147483658),new H(0,2147516555),new H(2147483648,139),new H(2147483648,32905),new H(2147483648,32771),new H(2147483648,32770),new H(2147483648,128),new H(0,32778),new H(2147483648,2147483658),new H(2147483648,2147516545),new H(2147483648,32896),new H(0,2147483649),new H(2147483648,2147516424)],H9=[[0,36,3,41,18],[1,44,10,45,2],[62,6,43,15,61],[28,55,25,21,56],[27,20,39,8,14]];function u3(D){let _,F=[];for(_=0;_<5;_+=1)F[_]=[new H(0,0),new H(0,0),new H(0,0),new H(0,0),new H(0,0)];return F}function L9(D){let _,F=[];for(_=0;_<5;_+=1)F[_]=D[_].slice();return F}function P0(D,_){let F,u,B,E,C=[],$=[];if(D!==null)for(u=0;u<D.length;u+=2)_[(u>>>1)%5][(u>>>1)/5|0]=l2(_[(u>>>1)%5][(u>>>1)/5|0],new H(D[u+1],D[u]));for(F=0;F<24;F+=1){for(E=u3(),u=0;u<5;u+=1)C[u]=(q=_[u][0],Q=_[u][1],G=_[u][2],A=_[u][3],M=_[u][4],new H(q.N^Q.N^G.N^A.N^M.N,q.I^Q.I^G.I^A.I^M.I));for(u=0;u<5;u+=1)$[u]=l2(C[(u+4)%5],e1(C[(u+1)%5],1));for(u=0;u<5;u+=1)for(B=0;B<5;B+=1)_[u][B]=l2(_[u][B],$[u]);for(u=0;u<5;u+=1)for(B=0;B<5;B+=1)E[B][(2*u+3*B)%5]=e1(_[u][B],H9[u][B]);for(u=0;u<5;u+=1)for(B=0;B<5;B+=1)_[u][B]=l2(E[u][B],new H(~E[(u+1)%5][B].N&E[(u+2)%5][B].N,~E[(u+1)%5][B].I&E[(u+2)%5][B].I));_[0][0]=l2(_[0][0],I9[F])}var q,Q,G,A,M;return _}function G6(D){let _,F,u=0,B=[0,0],E=[4294967295&D,D/n2&2097151];for(_=6;_>=0;_--)F=E[_>>2]>>>8*_&255,F===0&&u===0||(B[u+1>>2]|=F<<8*(u+1),u+=1);return u=u!==0?u:1,B[0]|=u,{value:u+1>4?B:[B[0]],binLen:8+8*u}}function F3(D){return x0(G6(D.binLen),D)}function F6(D,_){let F,u=G6(_);u=x0(u,D);let B=_>>>2,E=(B-u.value.length%B)%B;for(F=0;F<E;F++)u.value.push(0);return u.value}var T9=class extends s2{constructor(D,_,F){let u=6,B=0;super(D,_,F);let E=F||{};if(this.numRounds!==1){if(E.kmacKey||E.hmacKey)throw new Error(u6);if(this.o==="CSHAKE128"||this.o==="CSHAKE256")throw new Error("Cannot set numRounds for CSHAKE variants")}switch(this.T=1,this.C=z2(this.t,this.i,this.T),this.v=P0,this.L=L9,this.B=u3,this.U=u3(),this.K=!1,D){case"SHA3-224":this.m=B=1152,this.R=224,this.M=!0,this.g=this.Y;break;case"SHA3-256":this.m=B=1088,this.R=256,this.M=!0,this.g=this.Y;break;case"SHA3-384":this.m=B=832,this.R=384,this.M=!0,this.g=this.Y;break;case"SHA3-512":this.m=B=576,this.R=512,this.M=!0,this.g=this.Y;break;case"SHAKE128":u=31,this.m=B=1344,this.R=-1,this.K=!0,this.M=!1,this.g=null;break;case"SHAKE256":u=31,this.m=B=1088,this.R=-1,this.K=!0,this.M=!1,this.g=null;break;case"KMAC128":u=4,this.m=B=1344,this.X(F),this.R=-1,this.K=!0,this.M=!1,this.g=this._;break;case"KMAC256":u=4,this.m=B=1088,this.X(F),this.R=-1,this.K=!0,this.M=!1,this.g=this._;break;case"CSHAKE128":this.m=B=1344,u=this.O(F),this.R=-1,this.K=!0,this.M=!1,this.g=null;break;case"CSHAKE256":this.m=B=1088,u=this.O(F),this.R=-1,this.K=!0,this.M=!1,this.g=null;break;default:throw new Error(o2)}this.F=function(C,$,q,Q,G){return function(A,M,J,X,W,K,R){let V,Z,U=0,I=[],N=W>>>5,j=M>>>5;for(V=0;V<j&&M>=W;V+=N)X=P0(A.slice(V,V+N),X),M-=W;for(A=A.slice(V),M%=W;A.length<N;)A.push(0);for(V=M>>>3,A[V>>2]^=K<<V%4*8,A[N-1]^=2147483648,X=P0(A,X);32*I.length<R&&(Z=X[U%5][U/5|0],I.push(Z.I),!(32*I.length>=R));)I.push(Z.N),U+=1,64*U%W==0&&(P0(null,X),U=0);return I}(C,$,0,Q,B,u,G)},E.hmacKey&&this.k(sD("hmacKey",E.hmacKey,this.T))}O(D,_){let F=function(B){let E=B||{};return{funcName:sD("funcName",E.funcName,1,{value:[],binLen:0}),customization:sD("Customization",E.customization,1,{value:[],binLen:0})}}(D||{});_&&(F.funcName=_);let u=x0(F3(F.funcName),F3(F.customization));if(F.customization.binLen!==0||F.funcName.binLen!==0){let B=F6(u,this.m>>>3);for(let E=0;E<B.length;E+=this.m>>>5)this.U=this.v(B.slice(E,E+(this.m>>>5)),this.U),this.A+=this.m;return 4}return 31}X(D){let _=function(u){let B=u||{};return{kmacKey:sD("kmacKey",B.kmacKey,1),funcName:{value:[1128353099],binLen:32},customization:sD("Customization",B.customization,1,{value:[],binLen:0})}}(D||{});this.O(D,_.funcName);let F=F6(F3(_.kmacKey),this.m>>>3);for(let u=0;u<F.length;u+=this.m>>>5)this.U=this.v(F.slice(u,u+(this.m>>>5)),this.U),this.A+=this.m;this.H=!0}_(D){let _=x0({value:this.h.slice(),binLen:this.u},function(F){let u,B,E=0,C=[0,0],$=[4294967295&F,F/n2&2097151];for(u=6;u>=0;u--)B=$[u>>2]>>>8*u&255,B===0&&E===0||(C[E>>2]|=B<<8*E,E+=1);return E=E!==0?E:1,C[E>>2]|=E<<8*E,{value:E+1>4?C:[C[0]],binLen:8+8*E}}(D.outputLen));return this.F(_.value,_.binLen,this.A,this.L(this.U),D.outputLen)}};class B3{constructor(D,_,F){if(D=="SHA-1")this.P=new X9(D,_,F);else if(D=="SHA-224"||D=="SHA-256")this.P=new Z9(D,_,F);else if(D=="SHA-384"||D=="SHA-512")this.P=new U9(D,_,F);else{if(D!="SHA3-224"&&D!="SHA3-256"&&D!="SHA3-384"&&D!="SHA3-512"&&D!="SHAKE128"&&D!="SHAKE256"&&D!="CSHAKE128"&&D!="CSHAKE256"&&D!="KMAC128"&&D!="KMAC256")throw new Error(o2);this.P=new T9(D,_,F)}}update(D){return this.P.update(D),this}getHash(D,_){return this.P.getHash(D,_)}setHMACKey(D,_,F){this.P.setHMACKey(D,_,F)}getHMAC(D,_){return this.P.getHMAC(D,_)}}var U6=require("node:child_process"),v0=b(r8()),b0=require("node:os");var X6=`<?xml version="1.0" encoding="UTF-8"?>
|
|
63
|
+
<Configuration status="WARN">
|
|
64
|
+
<Appenders>
|
|
65
|
+
<Console name="SysOut" target="SYSTEM_OUT">
|
|
66
|
+
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg{nolookups}%n" />
|
|
67
|
+
</Console>
|
|
68
|
+
<Queue name="ServerGuiConsole">
|
|
69
|
+
<PatternLayout pattern="[%d{HH:mm:ss} %level]: %msg{nolookups}%n" />
|
|
70
|
+
</Queue>
|
|
71
|
+
<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
|
|
72
|
+
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg{nolookups}%n" />
|
|
73
|
+
<Policies>
|
|
74
|
+
<TimeBasedTriggeringPolicy />
|
|
75
|
+
<OnStartupTriggeringPolicy />
|
|
76
|
+
</Policies>
|
|
77
|
+
</RollingRandomAccessFile>
|
|
78
|
+
</Appenders>
|
|
79
|
+
<Loggers>
|
|
80
|
+
<Root level="info">
|
|
81
|
+
<filters>
|
|
82
|
+
<MarkerFilter marker="NETWORK_PACKETS" onMatch="DENY" onMismatch="NEUTRAL" />
|
|
83
|
+
</filters>
|
|
84
|
+
<AppenderRef ref="SysOut"/>
|
|
85
|
+
<AppenderRef ref="File"/>
|
|
86
|
+
</Root>
|
|
87
|
+
</Loggers>
|
|
88
|
+
</Configuration>`;var Z6=require("node:crypto");function J6(D){let _=uD.get("users");_.push(D),uD.set("users",_)}function Q6(D){let _=uD.get("users"),F=_.findIndex((u)=>u.uuid===D.uuid);if(F!==-1)_.splice(F,1),uD.set("users",_)}function k0(){return uD.get("users")}function A6(D){let _=Z6.createHash("md5").update(`OfflinePlayer:${D}`,"utf8").digest();return _[6]=_[6]&15|48,_[8]=_[8]&63|128,_.subarray(0,4).toString("hex")+"-"+_.subarray(4,6).toString("hex")+"-"+_.subarray(6,8).toString("hex")+"-"+_.subarray(8,10).toString("hex")+"-"+_.subarray(10,16).toString("hex")}function K6(D){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(D)}var E3={lang_code:"en",lang_name:"English",app_desc:"A Quick Minecraft CLI Launcher",cmd_versions_desc:"manage minecraft versions",cmd_versions_add_desc:"add a minecraft version",cmd_versions_add_confirm_show_snapshots:"show snapshot (and old_alpha/old_beta) versions?",cmd_versions_fetching_versions:"fetching minecraft versions",cmd_versions_list_version_desc:"$1 type:$2 release:$3 update:$4",cmd_versions_add_select_version_prompt:"select a version",cmd_versions_enter_game_name_prompt:"enter game name:",select_mc_path_prompt:"select a minecraft path",select_mc_path_desc:"select the path which contains minecraft files and data","mctype.snapshot":"snapshot","mctype.old_alpha":"old_alpha","mctype.old_beta":"old_beta","mctype.release":"release",error_game_name_required:"game name is required",error_game_name_invalid:"game name is not a valid file name",error_game_name_exists:"game name $1 already exists",confirm_continue:"continue?",cmd_versions_list_desc:"list and manage minecraft versions (installed games)",cmd_versions_list_select_game_prompt:"versions (games) installed list:",cmd_versions_list_game_desc:"game name: $1 mc version: $2",cmd_versions_list_select_action_prompt:"select an action",cmd_versions_action_launch:"launch",cmd_versions_action_launch_desc:"launch the game",cmd_versions_action_edit:"edit",cmd_versions_action_edit_desc:"edit the game settings",cmd_versions_action_delete:"delete",cmd_versions_action_delete_desc:"delete the game",cmd_versions_action_edit_todo:"TODO",cmd_versions_action_delete_confirm:"Are you sure you want to delete $1?",cmd_versions_action_delete_start:"removing",cmd_versions_action_delete_finish:"removed",cmd_versions_action_delete_cancel:"canceled",cmd_settings_desc:"manage settings",cmd_settings_mirror_desc:"set mirror",cmd_settings_mirror_select_prompt:"select a mirror (current [$1])",cmd_settings_mirror_option_official:"(official) Minecraft Official",cmd_settings_mirror_option_official_desc:"Minecraft Official",cmd_settings_mirror_option_bmclapi:"(bmclapi) bangbang93 BMCLAPI",cmd_settings_mirror_option_bmclapi_desc:"BMCLAPI (by bangbang93.com)",cmd_settings_mirror_set_success:"set mirror to $1",cmd_settings_paths_desc:"manage minecraft paths",cmd_settings_paths_add_desc:"add a minecraft path",cmd_settings_paths_add_prompt:"enter a minecraft path",cmd_settings_paths_add_success:"added path $1",cmd_settings_paths_list_desc:"list and manage minecraft paths",cmd_settings_paths_list_select_prompt:"select a minecraft path",cmd_settings_paths_list_select_desc:"select the path which contains minecraft files and data",cmd_settings_paths_list_select_action_prompt:"select an action",cmd_settings_paths_list_action_info:"info",cmd_settings_paths_list_action_info_desc:"show info of the path",cmd_settings_paths_list_action_remove:"remove",cmd_settings_paths_list_action_remove_desc:"remove the path from the list",cmd_settings_paths_list_info_path:"path: $1",cmd_settings_paths_list_info_games:"games:",cmd_settings_paths_list_info_game_entry:"name:$1 | mc version:$2",cmd_settings_paths_list_action_remove_confirm:"Are you sure you want to remove $1 from the list?",cmd_settings_paths_list_action_remove_start:"removing",cmd_settings_paths_list_action_remove_finish:"removed",cmd_settings_paths_list_action_remove_cancel:"canceled",error_no_path_added:"no path added",error_path_required:"path is required",error_path_not_exist:"path does not exist",error_path_not_directory:"path is not a directory",error_path_already_added:"path already added",error_no_game_installed:"no game installed",cmd_settings_lang_desc:"modify language",cmd_settings_lang_select_prompt:"select a language [current:$1]",cmd_settings_lang_set_success:"set language to $1",cmd_users_desc:"add/manage users",cmd_users_add_desc:"add a user",cmd_users_add_select_type_prompt:"select a type",cmd_users_add_type_offline:"offline",cmd_users_add_type_offline_desc:"offline user",cmd_users_add_type_mojang:"mojang [todo]",cmd_users_add_type_mojang_desc:"mojang user [not implemented]",cmd_users_add_type_microsoft:"microsoft [todo]",cmd_users_add_type_microsoft_desc:"microsoft user [not implemented]",cmd_users_add_name_prompt:"enter a name",cmd_users_add_uuid_prompt:"enter a uuid",cmd_users_add_success:"add user $1 success",error_name_required:"name is required",error_name_invalid:"name is not valid, use name with 3-16 letters, numbers and underscores",error_uuid_invalid:"enter a unsigned 32 bit uuid, if you don't know what is a uuid, just leave it blank",cmd_users_list_desc:"list and manage users",cmd_users_list_select_user_prompt:"select a user",cmd_users_list_user_desc:"name:$1 uuid:$2 type:$3",cmd_users_list_select_action_prompt:"select an action",cmd_users_list_action_info:"info",cmd_users_list_action_info_desc:"check the info",cmd_users_list_action_delete:"delete",cmd_users_list_action_delete_desc:"delete the user",cmd_users_list_action_delete_confirm:"are you sure?",cmd_users_list_action_delete_success:"deleted!",cmd_users_list_action_delete_cancel:"canceled",cmd_users_list_info_name:"name: $1",cmd_users_list_info_uuid:"uuid: $1",cmd_users_list_info_type:"type: $1",error_no_users:"no users here",summary_info:"summary:",summary_game_name:"game name: $1",summary_version:"version: $1",summary_minecraft_path:"minecraft path: $1",operation_starting:"operation starting...",operation_completed:"operation completed.",operation_canceled:"operation canceled.",asset_hash_mismatch_redownload:"mismatch sha1 of $1, redownload",start_download:"start downloading",download_completed:"download completed",creating_neccessary_files:"creating neccessary files...",done:"Done!","user_type.offline":"offline","user_type.mojang":"mojang","user_type.microsoft":"microsoft",launch_precheck_no_users:"no users here, please add a user first",launch_user_select_prompt:"select a user",launch_user_select_user_desc:"uuid: $1 type: $2",launch_extracting_natives:"extracting natives...",launch_moving_files:"moving files...",launch_extracting_natives_done:"natives extracting done!",launch_starting:"starting minecraft..."};var W6={lang_code:"zh-CN",lang_name:"简体中文",app_desc:"一个快速的 Minecraft 命令行启动器",cmd_versions_desc:"管理 Minecraft 版本",cmd_versions_add_desc:"添加一个 Minecraft 版本",cmd_versions_add_confirm_show_snapshots:"是否显示快照(以及旧版 Alpha/Beta)版本?",cmd_versions_fetching_versions:"正在获取 Minecraft 版本",cmd_versions_list_version_desc:"$1 类型:$2 发布日期:$3 更新日期:$4",cmd_versions_add_select_version_prompt:"选择一个版本",cmd_versions_enter_game_name_prompt:"输入游戏名称:",select_mc_path_prompt:"选择一个 Minecraft 路径",select_mc_path_desc:"选择包含 Minecraft 文件和数据的路径","mctype.snapshot":"快照","mctype.old_alpha":"旧版 Alpha","mctype.old_beta":"旧版 Beta","mctype.release":"正式版",error_game_name_required:"游戏名称是必需的",error_game_name_invalid:"游戏名称不是一个有效的文件名",error_game_name_exists:"游戏名称 $1 已经存在",confirm_continue:"是否继续?",cmd_versions_list_desc:"列出并管理 Minecraft 版本(已安装的游戏)",cmd_versions_list_select_game_prompt:"已安装的游戏版本列表:",cmd_versions_list_game_desc:"游戏名称:$1 Minecraft 版本:$2",cmd_versions_list_select_action_prompt:"选择一个操作",cmd_versions_action_launch:"启动",cmd_versions_action_launch_desc:"启动游戏",cmd_versions_action_edit:"编辑",cmd_versions_action_edit_desc:"编辑游戏设置",cmd_versions_action_delete:"删除",cmd_versions_action_delete_desc:"删除游戏",cmd_versions_action_edit_todo:"待办",cmd_versions_action_delete_confirm:"你确定要删除 $1 吗?",cmd_versions_action_delete_start:"正在删除",cmd_versions_action_delete_finish:"已删除",cmd_versions_action_delete_cancel:"已取消",cmd_settings_desc:"管理设置",cmd_settings_mirror_desc:"设置镜像",cmd_settings_mirror_select_prompt:"选择一个镜像(当前 [$1])",cmd_settings_mirror_option_official:"(官方) Minecraft 官方",cmd_settings_mirror_option_official_desc:"Minecraft 官方",cmd_settings_mirror_option_bmclapi:"(bmclapi) bangbang93 BMCLAPI",cmd_settings_mirror_option_bmclapi_desc:"BMCLAPI(由 bangbang93.com 提供)",cmd_settings_mirror_set_success:"已将镜像设置为 $1",cmd_settings_paths_desc:"管理 Minecraft 路径",cmd_settings_paths_add_desc:"添加一个 Minecraft 路径",cmd_settings_paths_add_prompt:"输入一个 Minecraft 路径",cmd_settings_paths_add_success:"已添加路径 $1",cmd_settings_paths_list_desc:"列出并管理 Minecraft 路径",cmd_settings_paths_list_select_prompt:"选择一个 Minecraft 路径",cmd_settings_paths_list_select_desc:"选择包含 Minecraft 文件和数据的路径",cmd_settings_paths_list_select_action_prompt:"选择一个操作",cmd_settings_paths_list_action_info:"信息",cmd_settings_paths_list_action_info_desc:"显示路径信息",cmd_settings_paths_list_action_remove:"移除",cmd_settings_paths_list_action_remove_desc:"从列表中移除路径",cmd_settings_paths_list_info_path:"路径:$1",cmd_settings_paths_list_info_games:"游戏:",cmd_settings_paths_list_info_game_entry:"名称:$1 | Minecraft 版本:$2",cmd_settings_paths_list_action_remove_confirm:"你确定要从列表中移除 $1 吗?",cmd_settings_paths_list_action_remove_start:"正在移除",cmd_settings_paths_list_action_remove_finish:"已移除",cmd_settings_paths_list_action_remove_cancel:"已取消",error_no_path_added:"未添加任何路径",error_path_required:"路径是必需的",error_path_not_exist:"路径不存在",error_path_not_directory:"路径不是一个目录",error_path_already_added:"路径已添加",error_no_game_installed:"未安装任何游戏",cmd_settings_lang_desc:"修改语言",cmd_settings_lang_select_prompt:"选择语言 [当前:$1]",cmd_settings_lang_set_success:"已将语言设置为 $1",cmd_users_desc:"添加/管理用户",cmd_users_add_desc:"添加一个用户",cmd_users_add_select_type_prompt:"选择类型",cmd_users_add_type_offline:"离线",cmd_users_add_type_offline_desc:"离线用户",cmd_users_add_type_mojang:"Mojang [未实现]",cmd_users_add_type_mojang_desc:"Mojang 用户 [未实现]",cmd_users_add_type_microsoft:"Microsoft [未实现]",cmd_users_add_type_microsoft_desc:"Microsoft 用户 [未实现]",cmd_users_add_name_prompt:"输入一个名称",cmd_users_add_uuid_prompt:"输入一个 UUID",cmd_users_add_success:"添加用户 $1 成功",error_name_required:"名称是必需的",error_name_invalid:"名称无效,使用包含 3-16 个字母、数字和下划线的名称",error_uuid_invalid:"输入一个无符号的 32 位 UUID,如果你不知道什么是 UUID,只需留空即可",cmd_users_list_desc:"列出并管理用户",cmd_users_list_select_user_prompt:"选择一个用户",cmd_users_list_user_desc:"名称:$1 UUID:$2 类型:$3",cmd_users_list_select_action_prompt:"选择一个操作",cmd_users_list_action_info:"信息",cmd_users_list_action_info_desc:"查看信息",cmd_users_list_action_delete:"删除",cmd_users_list_action_delete_desc:"删除用户",cmd_users_list_action_delete_confirm:"你确定吗?",cmd_users_list_action_delete_success:"已删除!",cmd_users_list_action_delete_cancel:"已取消",cmd_users_list_info_name:"名称:$1",cmd_users_list_info_uuid:"UUID:$1",cmd_users_list_info_type:"类型:$1",error_no_users:"这里没有用户",summary_info:"概要:",summary_game_name:"游戏名称:$1",summary_version:"版本:$1",summary_minecraft_path:"Minecraft 路径:$1",operation_starting:"操作正在开始...",operation_completed:"操作已完成。",operation_canceled:"操作已取消。",asset_hash_mismatch_redownload:"$1 的 SHA1 不匹配,正在重新下载",start_download:"开始下载",download_completed:"下载完成",creating_neccessary_files:"正在创建必要的文件...",done:"完成!","user_type.offline":"离线","user_type.mojang":"Mojang","user_type.microsoft":"Microsoft",launch_precheck_no_users:"这里没有用户,请先添加一个用户",launch_user_select_prompt:"选择一个用户",launch_user_select_user_desc:"UUID:$1 类型:$2",launch_extracting_natives:"正在提取natives库文件...",launch_moving_files:"正在移动文件...",launch_extracting_natives_done:"natives库文件提取完成!",launch_starting:"正在启动 Minecraft..."};var y0={en:E3,"zh-CN":W6},M6=E3;function R6(D){M6=D}function L(D,..._){let F=M6[D]||D;for(let u=0;u<_.length;u++)F=F.replace(`$${u+1}`,_[u]);return F}async function I6(){let D=I2("https://launchermeta.mojang.com/mc/game/version_manifest.json");return(await(await fetch(D)).json()).versions}function dD(D){if(!s.existsSync(D))s.mkdirSync(D,{recursive:!0})}async function z9(D,_,F){let{assets:u,assetIndex:B}=D,E=0,C=await(await fetch(I2(B.url))).json();dD(`${_}/assets/indexes`),dD(`${_}/assets/objects`),dD(`${_}/assets/virtual`),dD(`${_}/assets/skins`),s.writeFileSync(`${_}/assets/indexes/${B.id}.json`,JSON.stringify(C));let $=[],q=B.id==="legacy";for(let Q in C.objects){let G=C.objects[Q].hash,A=I2(`https://resources.download.minecraft.net/${G.substring(0,2)}/${G}`),M=q?`${_}/assets/virtual/legacy/${Q}`:`${_}/assets/objects/${G.substring(0,2)}/${G}`;if(s.existsSync(M)){let J=new Uint8Array(s.readFileSync(M));if(new B3("SHA-1","UINT8ARRAY").update(J).getHash("HEX")!==C.objects[Q].hash)console.log(k.yellow(L("asset_hash_mismatch_redownload",Q)))}dD(rD.dirname(M)),$.push({url:A,filename:M,extra:{size:C.objects[Q].size}}),E+=C.objects[Q].size}return{tasks:$,totalSize:E}}async function H6(D,_,F){let u=`${_}/versions/${F}`;dD(u);let B=await(await fetch(D)).json();s.writeFileSync(`${u}/${F}.json`,JSON.stringify(B));let E=[],C=await z9(B,_,F),$=C.totalSize;E.push(...C.tasks);let{downloads:{client:q}}=B;E.push({url:q.url,filename:`${u}/${F}.jar`,extra:{size:q.size}}),$+=q.size,dD(`${_}/libraries`);for(let G of B.libraries){let{downloads:{artifact:A}}=G;if(A){let{path:M,url:J,size:X}=A;E.push({url:I2(J),filename:`${_}/libraries/${M}`,extra:{size:X}}),$+=X,dD(rD.dirname(`${_}/libraries/${M}`))}if(G.downloads.classifiers)for(let[M,J]of Object.entries(G.downloads.classifiers)){let{path:X,url:W,size:K}=J;dD(rD.dirname(`${_}/libraries/${X}`)),E.push({url:I2(W),filename:`${_}/libraries/${X}`,extra:{size:K}}),$+=K}}E.sort((G,A)=>A.extra.size-G.extra.size),console.log(k.green(L("start_download")));let Q=new s8(16,{totalSize:$});for(let G of E)Q.addTask(G);if(await Q.wait(),console.log(k.green(L("download_completed"))),console.log(k.cyan(L("creating_neccessary_files"))),!s.existsSync(`${_}/launcher_profiles.json`))s.writeFileSync(`${_}/launcher_profiles.json`,JSON.stringify(C1));console.log(k.green(L("done")))}async function C3(D){let _=`${D}/versions`,F=[];if(s.existsSync(_)){for(let u of s.readdirSync(_))if(s.existsSync(`${_}/${u}/${u}.json`))F.push(u)}return F}function O9(){if(H2()=="windows")return";";return":"}async function L6(D,_){let F=k0();if(F.length===0){console.log(k.red(L("launch_precheck_no_users")));return}let u=await WD({message:L("launcher_user_select_desc"),choices:F.map((X)=>({value:X,name:`${X.name} (${L("user_type."+X.type)})`,description:L("launch_user_select_user_desc",X.uuid,L("user_type."+X.type)),short:`${X.name} (${L("user_type."+X.type)})`}))});console.log(k.blue(L("launch_extracting_natives")));let B=H2(),E=Q1(),C=JSON.parse(s.readFileSync(`${D}/versions/${_}/${_}.json`,{encoding:"utf-8"})),$=[],q=[],Q=`${D}/versions/${_}/natives-${B}${E}`;for(let X of C.libraries){if(X.downloads.artifact){if(X.downloads.artifact.path.includes(`natives-${B}`))$.push(X.downloads.artifact.path);if(X.rules&&z0(X.rules,{os:{name:H2(),arch:v0.default(),version:b0.release()}}))q.push(`${D}/libraries/${X.downloads.artifact.path}`);else if(!X.rules)q.push(`${D}/libraries/${X.downloads.artifact.path}`)}if(X.downloads.classifiers){if(X.downloads.classifiers[`natives-${B}`])$.push(X.downloads.classifiers[`natives-${B}`].path)}if(E!=""){if(X.downloads.artifact){if(X.downloads.artifact.path.includes(`natives-${B}${E}`))$.push(X.downloads.artifact.path)}if(X.downloads.classifiers){if(X.downloads.classifiers[`natives-${B}${E}`])$.push(X.downloads.classifiers[`natives-${B}${E}`].path)}}}q.push(`${D}/versions/${_}/${_}.jar`),s.mkdirSync(`${Q}/tmp`,{recursive:!0});for(let X of $)new V6.default(`${D}/libraries/${X}`).extractAllTo(`${Q}/tmp`,!0);console.log(k.blue(L("launch_moving_files"))),s.readdirSync(`${Q}/tmp`,{withFileTypes:!0,recursive:!0}).forEach((X)=>{if(X.isFile()&&!X.name.endsWith(".git")&&!X.name.endsWith(".sha1")&&!X.name.endsWith(".class"))s.copyFileSync(rD.join(X.parentPath,X.name),rD.join(Q,X.name))}),s.rmSync(`${Q}/tmp`,{recursive:!0}),console.log(k.green(L("launch_extracting_natives_done")));let G=[],A={version_name:C.id,version_type:"QMCLI 0.0.1",game_directory:D,assets_root:`${D}/assets`,assets_index_name:C.assets,natives_directory:Q,launcher_name:"QMCLI",launcher_version:"0.0.1",classpath:`${q.join(O9())}`,resolution_width:"854",resolution_height:"480",auth_player_name:u.name,auth_uuid:u.uuid,auth_access_token:u.auth_access_token,user_properties:"{}",user_type:"msa"};G.push("-XX:+UnlockExperimentalVMOptions","-XX:+UseG1GC","-XX:G1NewSizePercent=20","-XX:G1ReservePercent=20","-XX:MaxGCPauseMillis=50","-XX:G1HeapRegionSize=32m","-XX:-UseAdaptiveSizePolicy","-XX:-OmitStackTraceInFastThrow","-XX:-DontCompileHugeMethods","-Dfml.ignoreInvalidMinecraftCertificates=true","-Dlog4j2.formatMsgNoLookups=true"),s.writeFileSync(`${D}/versions/${_}/log4j2-qmcli.xml`,X6,{encoding:"utf-8"}),G.push(C.logging.client.argument.replace("${path}",`${D}/versions/${_}/log4j2-qmcli.xml`)),G.push(`-Dminecraft.client.jar=${D}/versions/${_}/${_}.jar`);let M=(X)=>{for(let W of X)if(typeof W==="string"){let K=W;for(let[R,V]of Object.entries(A))K=K.replace(`\${${R}}`,V);G.push(K)}else if(z0(W.rules,{os:{name:H2(),arch:v0.default(),version:b0.release()}})){let K=Array.isArray(W.value)?W.value.map((R)=>`${R}`).join(" "):`${W.value}`;for(let[R,V]of Object.entries(A))K=K.replace(`\${${R}}`,V);G.push(K)}};if(C.arguments){M(C.arguments.jvm),G.push(C.mainClass);for(let X of C.arguments.game)if(typeof X==="string"){let W=X;for(let[K,R]of Object.entries(A))W=W.replace(`\${${K}}`,R);G.push(W)}else if(z0(X.rules,{os:{name:H2(),arch:v0.default(),version:b0.release()},has_custom_resolution:!0})){let W=Array.isArray(X.value)?X.value.map((K)=>`${K}`).join("|$|"):`${X.value}`;for(let[K,R]of Object.entries(A))W=W.replace(`\${${K}}`,R);G.push(...W.split("|$|"))}}else if(C.minecraftArguments){M([{rules:[{action:"allow",os:{name:"osx"}}],value:["-XstartOnFirstThread"]},{rules:[{action:"allow",os:{name:"windows"}}],value:"-XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump"},{rules:[{action:"allow",os:{arch:"x86"}}],value:"-Xss1M"},"-Djava.library.path=${natives_directory}","-Djna.tmpdir=${natives_directory}","-Dorg.lwjgl.system.SharedLibraryExtractPath=${natives_directory}","-Dio.netty.native.workdir=${natives_directory}","-Dminecraft.launcher.brand=${launcher_name}","-Dminecraft.launcher.version=${launcher_version}","-cp","${classpath}"]),G.push(C.mainClass);let X=C.minecraftArguments.split(" ");for(let W of X)if(W.startsWith("${")){let K=W;for(let[R,V]of Object.entries(A))K=K.replace(`\${${R}}`,V);G.push(K)}else G.push(W);G.push(...["--width",A.resolution_width,"--height",A.resolution_height])}if(u.type==="offline");let J="java "+G.map((X)=>{if(X.includes(" "))return`"${X}"`;else return X}).join(" ");console.log(k.green(L("launch_starting"))),U6.spawn("java",G,{stdio:"inherit",shell:!1,cwd:D})}function T6(D,_){s.rmSync(rD.join(D,"versions",_),{recursive:!0})}var tD=b(require("fs"));var $3=b(require("path"));var w9=y0[uD.get("lang")];R6(w9);var aD=new Y2;aD.name("qmcli").description(L("app_desc")).version(X0.version);var r2=new Y2;r2.name("versions");r2.description(L("cmd_versions_desc"));r2.command("add").description(L("cmd_versions_add_desc")).action(async()=>{let D=await u2({message:L("cmd_versions_add_confirm_show_snapshots")});console.log(k.green(L("cmd_versions_fetching_versions")));let F=(await I6()).filter(($)=>{if(D)return!0;else if($.type==="snapshot"||$.type==="old_beta"||$.type==="old_alpha")return!1;else return!0}).map(($)=>{return{value:$,name:`${$.id} (${L("mctype."+$.type)})`,description:L("cmd_versions_list_version_desc",$.id,L("mctype."+$.type),$.releaseTime,$.time),short:$.id}}),u=await L8({message:L("cmd_versions_add_select_version_prompt"),async source($){if(!$)return F;return F.filter((q)=>{return q.name?.toLowerCase().includes($.toLowerCase())})}}),B=await WD({message:L("select_mc_path_prompt"),choices:uD.get("paths").map(($)=>{return{value:$,name:$,description:L("select_mc_path_desc"),short:$}})}),E=await K2({message:L("cmd_versions_enter_game_name_prompt"),default:u.id,validate($){if(!$)return L("error_game_name_required");if(!J1($))return L("error_game_name_invalid");if(tD.existsSync($3.default.join(VD(B),"versions",$)))return L("error_game_name_exists",$);return!0}});if(console.log(k.green(L("summary_info"))),console.log(k.green(L("summary_game_name",E))),console.log(k.green(L("summary_version",u.id))),console.log(k.green(L("summary_minecraft_path",B))),!await u2({message:L("confirm_continue")})){console.log(k.red(L("operation_canceled")));return}console.log(k.green(L("operation_starting"))),await H6(u.url,VD(B),E),console.log(k.green(L("operation_completed")))});r2.command("list").description(L("cmd_versions_list_desc")).action(async()=>{let D=await WD({message:L("select_mc_path_prompt"),choices:uD.get("paths").map((B)=>{return{value:B,name:B,description:L("select_mc_path_desc"),short:B}})}),_=await C3(VD(D));if(_.length===0){console.log(k.red(L("error_no_game_installed")));return}let F=await WD({message:L("cmd_versions_list_select_game_prompt"),choices:_.map((B)=>{let E=JSON.parse(tD.readFileSync(`${VD(D)}/versions/${B}/${B}.json`,"utf-8"));return{value:B,name:B,description:L("cmd_versions_list_game_desc",B,E.id),short:B}})}),u=await WD({message:L("cmd_versions_list_select_action_prompt"),choices:[{value:"launch",name:L("cmd_versions_action_launch"),description:L("cmd_versions_action_launch_desc")},{value:"edit",name:L("cmd_versions_action_edit"),description:L("cmd_versions_action_edit_desc")},{value:"delete",name:L("cmd_versions_action_delete"),description:L("cmd_versions_action_delete_desc")}]});if(u==="launch")console.log(k.green(L("operation_launching"))),await L6(VD(D),F);else if(u==="edit")console.log(k.yellow(L("cmd_versions_action_edit_todo")));else if(u==="delete")if(await u2({message:L("cmd_versions_action_delete_confirm",F),default:!1}))console.log(k.green(L("operation_starting"))),T6(VD(D),F),console.log(k.green(L("operation_completed")));else console.log(k.red(L("operation_canceled")))});aD.addCommand(r2);var a2=new Y2;a2.name("settings").description(L("cmd_settings_desc"));a2.command("mirror").description(L("cmd_settings_mirror_desc")).action(async()=>{let D=await WD({message:L("cmd_settings_mirror_select_prompt",uD.get("mirror")),default:uD.get("mirror"),choices:[{value:"official",name:L("cmd_settings_mirror_option_official"),description:L("cmd_settings_mirror_option_official_desc")},{value:"bmclapi",name:L("cmd_settings_mirror_option_bmclapi"),description:L("cmd_settings_mirror_option_bmclapi_desc")}]});uD.set("mirror",D),console.log(k.green(L("cmd_settings_mirror_set_success",D)))});var N6=a2.command("paths").description(L("cmd_settings_paths_desc"));N6.command("add").description(L("cmd_settings_paths_add_desc")).action(async()=>{let D=uD.get("paths"),_=await K2({message:L("cmd_settings_paths_add_prompt"),validate(u){if(!u)return L("error_path_required");if(!tD.existsSync(VD(u)))return L("error_path_not_exist");if(!tD.statSync(VD(u)).isDirectory())return L("error_path_not_directory");if(D.includes(u)||D.includes(VD(u)))return L("error_path_already_added");return!0}}),F=$3.default.resolve(VD(_));D.push(F),uD.set("paths",D),console.log(k.green(L("cmd_settings_paths_add_success",F)))});N6.command("list").description(L("cmd_settings_paths_list_desc")).action(async()=>{let D=uD.get("paths");if(D.length===0){console.log(k.red(L("error_no_path_added")));return}let _=await WD({message:L("cmd_settings_paths_list_select_prompt"),choices:D.map((u)=>{return{value:u,name:u,description:L("cmd_settings_paths_list_select_desc"),short:u}})}),F=await WD({message:L("cmd_settings_paths_list_select_action_prompt"),choices:[{value:"info",name:L("cmd_settings_paths_list_action_info"),description:L("cmd_settings_paths_list_action_info_desc")},{value:"remove",name:L("cmd_settings_paths_list_action_remove"),description:L("cmd_settings_paths_list_action_remove_desc")}]});if(F==="info"){console.log(k.blue(L("cmd_settings_paths_list_info_path",_)));let u=await C3(VD(_));if(u.length===0){console.log(k.red(L("error_no_game_installed")));return}console.log(k.blue(L("cmd_settings_paths_list_info_games")));for(let B of u){let E=JSON.parse(tD.readFileSync(`${VD(_)}/versions/${B}/${B}.json`,"utf-8"));console.log(k.blue(L("cmd_settings_paths_list_info_game_entry",B,E.id)))}}else if(F==="remove")if(await u2({message:L("cmd_settings_paths_list_action_remove_confirm",_),default:!1}))console.log(k.green(L("operation_starting"))),uD.set("paths",D.filter((B)=>B!==_)),console.log(k.green(L("operation_completed")));else console.log(k.red(L("operation_canceled")))});a2.command("lang").description(L("cmd_settings_lang_desc")).action(async()=>{let D=await WD({message:L("cmd_settings_lang_select_prompt",uD.get("lang")),default:uD.get("lang"),choices:Object.keys(y0).map((_)=>{return{value:_,name:`${y0[_].lang_name} (${_})`,short:_}})});uD.set("lang",D),console.log(k.green(L("cmd_settings_lang_set_success",D)))});aD.addCommand(a2);var f0=new Y2;f0.name("users").description(L("cmd_users_desc"));f0.command("add").description(L("cmd_users_add_desc")).action(async()=>{if(await WD({message:L("cmd_users_add_select_type_prompt"),choices:[{value:"offline",name:L("cmd_users_add_type_offline"),description:L("cmd_users_add_type_offline_desc")},{value:"microsoft",name:L("cmd_users_add_type_microsoft"),description:L("cmd_users_add_type_microsoft_desc")}]})==="offline"){let _=await K2({message:L("cmd_users_add_name_prompt"),validate(B){if(!B)return L("error_name_required");if(!/^[a-zA-Z0-9_]{3,16}$/.test(B))return L("error_name_invalid");return!0}}),F=await K2({message:L("cmd_users_add_uuid_prompt"),default:A6(_),validate(B){if(!K6(B))return L("error_uuid_invalid");return!0}});J6({name:_,uuid:F,type:"offline"}),console.log(k.green(L("cmd_users_add_success",_)))}});f0.command("list").description(L("cmd_users_list_desc")).action(async()=>{let D=k0();if(D.length===0){console.log(k.red(L("error_no_users")));return}let _=await WD({message:L("cmd_users_list_select_user_prompt"),choices:D.map((u)=>{return{value:u,name:`${u.name} (${u.type})`,description:L("cmd_users_list_user_desc",u.name,u.uuid,u.type),short:u.name}})}),F=await WD({message:L("cmd_users_list_select_action_prompt"),choices:[{value:"info",name:L("cmd_users_list_action_info"),description:L("cmd_users_list_action_info_desc")},{value:"delete",name:L("cmd_users_list_action_delete"),description:L("cmd_users_list_action_delete_desc")}]});if(F==="info")console.log(k.green(L("cmd_users_list_info_name",_.name))),console.log(k.green(L("cmd_users_list_info_uuid",_.uuid))),console.log(k.green(L("cmd_users_list_info_type",_.type)));else if(F==="delete")if(await u2({message:L("cmd_users_list_action_delete_confirm",_.name),default:!1}))Q6(_),console.log(k.green(L("cmd_users_list_action_delete_success")));else console.log(k.red(L("cmd_users_list_action_delete_cancel")))});aD.addCommand(f0);if(aD.args.length===0&&aD.commands.length===0)aD.help();aD.parse();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tobylai/qmcli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "A quick minecraft launcher command-line interface",
|
|
5
5
|
"main": "dist/cli.js",
|
|
6
6
|
"type": "module",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"dev": "bun cli.ts",
|
|
9
9
|
"build": "bun bun-build.ts cjs",
|
|
10
10
|
"buildexe": "bun bun-build.ts exe local",
|
|
11
|
-
"prepublishOnly": "bun run build"
|
|
11
|
+
"prepublishOnly": "bun run build",
|
|
12
|
+
"pub": "npm publish"
|
|
12
13
|
},
|
|
13
14
|
"keywords": [
|
|
14
15
|
"minecraft",
|
|
@@ -18,6 +19,7 @@
|
|
|
18
19
|
"license": "MIT",
|
|
19
20
|
"dependencies": {
|
|
20
21
|
"@inquirer/prompts": "^7.3.1",
|
|
22
|
+
"adm-zip": "^0.5.16",
|
|
21
23
|
"arch": "^3.0.0",
|
|
22
24
|
"chalk": "^5.4.1",
|
|
23
25
|
"cli-progress": "^3.12.0",
|
|
@@ -27,6 +29,7 @@
|
|
|
27
29
|
"zip-lib": "^1.0.5"
|
|
28
30
|
},
|
|
29
31
|
"devDependencies": {
|
|
32
|
+
"@types/adm-zip": "^0.5.7",
|
|
30
33
|
"@types/bun": "latest",
|
|
31
34
|
"@types/cli-progress": "^3.11.6",
|
|
32
35
|
"@types/configstore": "^6.0.2",
|
|
@@ -43,4 +46,4 @@
|
|
|
43
46
|
"peerDependencies": {
|
|
44
47
|
"typescript": "^5.0.0"
|
|
45
48
|
}
|
|
46
|
-
}
|
|
49
|
+
}
|