@tobylai/qmcli 0.0.9 → 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.
Files changed (2) hide show
  1. package/dist/qmcli.cjs +50 -50
  2. package/package.json +5 -3
package/dist/qmcli.cjs CHANGED
@@ -1,65 +1,65 @@
1
1
  #!/usr/bin/env node
2
- var e4=Object.create;var{getPrototypeOf:D9,defineProperty:G1,getOwnPropertyNames:_9}=Object;var u9=Object.prototype.hasOwnProperty;var x=(D,_,u)=>{u=D!=null?e4(D9(D)):{};let F=_||!D||!D.__esModule?G1(u,"default",{value:D,enumerable:!0}):u;for(let B of _9(D))if(!u9.call(F,B))G1(F,B,{get:()=>D[B],enumerable:!0});return F};var N=(D,_)=>()=>(_||D((_={exports:{}}).exports,_),_.exports);var h0=N((I3)=>{class L3 extends Error{constructor(D,_,u){super(u);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=_,this.exitCode=D,this.nestedError=void 0}}class q1 extends L3{constructor(D){super(1,"commander.invalidArgument",D);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}I3.CommanderError=L3;I3.InvalidArgumentError=q1});var K2=N((R3)=>{var{InvalidArgumentError:F9}=h0();class X1{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=(_,u)=>{if(!this.argChoices.includes(_))throw new F9(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._concatValue(_,u);return _},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}function B9(D){let _=D.name()+(D.variadic===!0?"...":"");return D.required?"<"+_+">":"["+_+"]"}R3.Argument=X1;R3.humanReadableArgName=B9});var T3=N((N3)=>{var{humanReadableArgName:E9}=K2();class Z1{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((F)=>!F._hidden),u=D._getHelpCommand();if(u&&!u._hidden)_.push(u);if(this.sortSubcommands)_.sort((F,B)=>{return F.name().localeCompare(B.name())});return _}compareOptions(D,_){let u=(F)=>{return F.short?F.short.replace(/^-/,""):F.long.replace(/^--/,"")};return u(D).localeCompare(u(_))}visibleOptions(D){let _=D.options.filter((F)=>!F.hidden),u=D._getHelpOption();if(u&&!u.hidden){let F=u.short&&D._findOption(u.short),B=u.long&&D._findOption(u.long);if(!F&&!B)_.push(u);else if(u.long&&!B)_.push(D.createOption(u.long,u.description));else if(u.short&&!F)_.push(D.createOption(u.short,u.description))}if(this.sortOptions)_.sort(this.compareOptions);return _}visibleGlobalOptions(D){if(!this.showGlobalOptions)return[];let _=[];for(let u=D.parent;u;u=u.parent){let F=u.options.filter((B)=>!B.hidden);_.push(...F)}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((u)=>E9(u)).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((u,F)=>{return Math.max(u,this.displayWidth(_.styleSubcommandTerm(_.subcommandTerm(F))))},0)}longestOptionTermLength(D,_){return _.visibleOptions(D).reduce((u,F)=>{return Math.max(u,this.displayWidth(_.styleOptionTerm(_.optionTerm(F))))},0)}longestGlobalOptionTermLength(D,_){return _.visibleGlobalOptions(D).reduce((u,F)=>{return Math.max(u,this.displayWidth(_.styleOptionTerm(_.optionTerm(F))))},0)}longestArgumentTermLength(D,_){return _.visibleArguments(D).reduce((u,F)=>{return Math.max(u,this.displayWidth(_.styleArgumentTerm(_.argumentTerm(F))))},0)}commandUsage(D){let _=D._name;if(D._aliases[0])_=_+"|"+D._aliases[0];let u="";for(let F=D.parent;F;F=F.parent)u=F.name()+" "+u;return u+_+" "+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((u)=>JSON.stringify(u)).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((u)=>JSON.stringify(u)).join(", ")}`);if(D.defaultValue!==void 0)_.push(`default: ${D.defaultValueDescription||JSON.stringify(D.defaultValue)}`);if(_.length>0){let u=`(${_.join(", ")})`;if(D.description)return`${D.description} ${u}`;return u}return D.description}formatHelp(D,_){let u=_.padWidth(D,_),F=_.helpWidth??80;function B(G,Z){return _.formatItem(G,u,Z,_)}let E=[`${_.styleTitle("Usage:")} ${_.styleUsage(_.commandUsage(D))}`,""],C=_.commandDescription(D);if(C.length>0)E=E.concat([_.boxWrap(_.styleCommandDescription(C),F),""]);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((Z)=>{return B(_.styleOptionTerm(_.optionTerm(Z)),_.styleOptionDescription(_.optionDescription(Z)))});if(G.length>0)E=E.concat([_.styleTitle("Global Options:"),...G,""])}let X=_.visibleCommands(D).map((G)=>{return B(_.styleSubcommandTerm(_.subcommandTerm(G)),_.styleSubcommandDescription(_.subcommandDescription(G)))});if(X.length>0)E=E.concat([_.styleTitle("Commands:"),...X,""]);return E.join(`
3
- `)}displayWidth(D){return J1(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,_,u,F){let E=" ".repeat(2);if(!u)return E+D;let C=D.padEnd(_+D.length-F.displayWidth(D)),$=2,X=(this.helpWidth??80)-_-$-2,G;if(X<this.minWidthToWrap||F.preformatted(u))G=u;else G=F.boxWrap(u,X).replace(/\n/g,`
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
4
  `+" ".repeat(_+$));return E+C+" ".repeat($)+G.replace(/\n/g,`
5
- ${E}`)}boxWrap(D,_){if(_<this.minWidthToWrap)return D;let u=D.split(/\r\n|\n/),F=/[\s]*[^\s]+/g,B=[];return u.forEach((E)=>{let C=E.match(F);if(C===null){B.push("");return}let $=[C.shift()],q=this.displayWidth($[0]);C.forEach((X)=>{let G=this.displayWidth(X);if(q+G<=_){$.push(X),q+=G;return}B.push($.join(""));let Z=X.trimStart();$=[Z],q=this.displayWidth(Z)}),B.push($.join(""))}),B.join(`
6
- `)}}function J1(D){let _=/\x1b\[\d*(;\d*)*m/g;return D.replace(_,"")}N3.Help=Z1;N3.stripColor=J1});var O3=N((j3)=>{var{InvalidArgumentError:C9}=h0();class K1{constructor(D,_){this.flags=D,this.description=_||"",this.required=D.includes("<"),this.optional=D.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(D),this.mandatory=!1;let u=$9(D);if(this.short=u.shortFlag,this.long=u.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=(_,u)=>{if(!this.argChoices.includes(_))throw new C9(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._concatValue(_,u);return _},this}name(){if(this.long)return this.long.replace(/^--/,"");return this.short.replace(/^-/,"")}attributeName(){if(this.negate)return Q1(this.name().replace(/^no-/,""));return Q1(this.name())}is(D){return this.short===D||this.long===D}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class U1{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((_,u)=>{if(this.positiveOptions.has(u))this.dualOptions.add(u)})}valueFromOption(D,_){let u=_.attributeName();if(!this.dualOptions.has(u))return!0;let F=this.negativeOptions.get(u).presetArg,B=F!==void 0?F:!1;return _.negate===(B===D)}}function Q1(D){return D.split("-").reduce((_,u)=>{return _+u[0].toUpperCase()+u.slice(1)})}function $9(D){let _,u,F=/^-[^-]$/,B=/^--[^-]/,E=D.split(/[ |,]+/).concat("guard");if(F.test(E[0]))_=E.shift();if(B.test(E[0]))u=E.shift();if(!_&&F.test(E[0]))_=E.shift();if(!_&&B.test(E[0]))_=u,u=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(`${$}
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
7
  - a short flag is a single dash and a single character
8
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(F.test(C))throw new Error(`${$}
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
10
  - too many short flags`);if(B.test(C))throw new Error(`${$}
11
11
  - too many long flags`);throw new Error(`${$}
12
- - unrecognised flag format`)}if(_===void 0&&u===void 0)throw new Error(`option creation failed due to no flags found in '${D}'.`);return{shortFlag:_,longFlag:u}}j3.Option=K1;j3.DualOptions=U1});var M1=N((H1)=>{function G9(D,_){if(Math.abs(D.length-_.length)>3)return Math.max(D.length,_.length);let u=[];for(let F=0;F<=D.length;F++)u[F]=[F];for(let F=0;F<=_.length;F++)u[0][F]=F;for(let F=1;F<=_.length;F++)for(let B=1;B<=D.length;B++){let E=1;if(D[B-1]===_[F-1])E=0;else E=1;if(u[B][F]=Math.min(u[B-1][F]+1,u[B][F-1]+1,u[B-1][F-1]+E),B>1&&F>1&&D[B-1]===_[F-2]&&D[B-2]===_[F-1])u[B][F]=Math.min(u[B][F],u[B-2][F-2]+1)}return u[D.length][_.length]}function q9(D,_){if(!_||_.length===0)return"";_=Array.from(new Set(_));let u=D.startsWith("--");if(u)D=D.slice(2),_=_.map((C)=>C.slice(2));let F=[],B=3,E=0.4;if(_.forEach((C)=>{if(C.length<=1)return;let $=G9(D,C),q=Math.max(D.length,C.length);if((q-$)/q>E){if($<B)B=$,F=[C];else if($===B)F.push(C)}}),F.sort((C,$)=>C.localeCompare($)),u)F=F.map((C)=>`--${C}`);if(F.length>1)return`
13
- (Did you mean one of ${F.join(", ")}?)`;if(F.length===1)return`
14
- (Did you mean ${F[0]}?)`;return""}H1.suggestSimilar=q9});var L1=N((x3)=>{var X9=require("node:events").EventEmitter,P3=require("node:child_process"),yD=require("node:path"),U2=require("node:fs"),b=require("node:process"),{Argument:Z9,humanReadableArgName:J9}=K2(),{CommanderError:z3}=h0(),{Help:Q9,stripColor:K9}=T3(),{Option:W1,DualOptions:U9}=O3(),{suggestSimilar:A1}=M1();class w3 extends X9{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:(_)=>b.stdout.write(_),writeErr:(_)=>b.stderr.write(_),outputError:(_,u)=>u(_),getOutHelpWidth:()=>b.stdout.isTTY?b.stdout.columns:void 0,getErrHelpWidth:()=>b.stderr.isTTY?b.stderr.columns:void 0,getOutHasColors:()=>Y3()??(b.stdout.isTTY&&b.stdout.hasColors?.()),getErrHasColors:()=>Y3()??(b.stderr.isTTY&&b.stderr.hasColors?.()),stripColor:(_)=>K9(_)},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,_,u){let F=_,B=u;if(typeof F==="object"&&F!==null)B=F,F=null;B=B||{};let[,E,C]=D.match(/([^ ]+) *(.*)/),$=this.createCommand(E);if(F)$.description(F),$._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),F)return this;return $}createCommand(D){return new w3(D)}createHelp(){return Object.assign(new Q9,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 Z9(D,_)}argument(D,_,u,F){let B=this.createArgument(D,_);if(typeof u==="function")B.default(F).argParser(u);else B.default(u);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[,u,F]=D.match(/([^ ]+) *(.*)/),B=_??"display help for command",E=this.createCommand(u);if(E.helpOption(!1),F)E.arguments(F);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 u=["preSubcommand","preAction","postAction"];if(!u.includes(D))throw new Error(`Unexpected value for event passed to hook : '${D}'.
16
- Expecting one of '${u.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,_,u){if(this._exitCallback)this._exitCallback(new z3(D,_,u));b.exit(D)}action(D){let _=(u)=>{let F=this.registeredArguments.length,B=u.slice(0,F);if(this._storeOptionsAsProperties)B[F]=this;else B[F]=this.opts();return B.push(this),D.apply(this,B)};return this._actionHandler=_,this}createOption(D,_){return new W1(D,_)}_callParseArg(D,_,u,F){try{return D.parseArg(_,u)}catch(B){if(B.code==="commander.invalidArgument"){let E=`${F} ${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 u=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 '${u}'
17
- - already used by option '${_.flags}'`)}this.options.push(D)}_registerCommand(D){let _=(F)=>{return[F.name()].concat(F.aliases())},u=_(D).find((F)=>this._findCommand(F));if(u){let F=_(this._findCommand(u)).join("|"),B=_(D).join("|");throw new Error(`cannot add command '${B}' as already have command '${F}'`)}this.commands.push(D)}addOption(D){this._registerOption(D);let _=D.name(),u=D.attributeName();if(D.negate){let B=D.long.replace(/^--no-/,"--");if(!this._findOption(B))this.setOptionValueWithSource(u,D.defaultValue===void 0?!0:D.defaultValue,"default")}else if(D.defaultValue!==void 0)this.setOptionValueWithSource(u,D.defaultValue,"default");let F=(B,E,C)=>{if(B==null&&D.presetArg!==void 0)B=D.presetArg;let $=this.getOptionValue(u);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(u,B,C)};if(this.on("option:"+_,(B)=>{let E=`error: option '${D.flags}' argument '${B}' is invalid.`;F(B,E,"cli")}),D.envVar)this.on("optionEnv:"+_,(B)=>{let E=`error: option '${D.flags}' value '${B}' from env '${D.envVar}' is invalid.`;F(B,E,"env")});return this}_optionEx(D,_,u,F,B){if(typeof _==="object"&&_ instanceof W1)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let E=this.createOption(_,u);if(E.makeOptionMandatory(!!D.mandatory),typeof F==="function")E.default(B).argParser(F);else if(F instanceof RegExp){let C=F;F=($,q)=>{let X=C.exec($);return X?X[0]:q},E.default(B).argParser(F)}else E.default(F);return this.addOption(E)}option(D,_,u,F){return this._optionEx({},D,_,u,F)}requiredOption(D,_,u,F){return this._optionEx({mandatory:!0},D,_,u,F)}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,_,u){if(this._storeOptionsAsProperties)this[D]=_;else this._optionValues[D]=_;return this._optionValueSources[D]=u,this}getOptionValueSource(D){return this._optionValueSources[D]}getOptionValueSourceWithGlobals(D){let _;return this._getCommandAndAncestors().forEach((u)=>{if(u.getOptionValueSource(D)!==void 0)_=u.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(b.versions?.electron)_.from="electron";let F=b.execArgv??[];if(F.includes("-e")||F.includes("--eval")||F.includes("-p")||F.includes("--print"))_.from="eval"}if(D===void 0)D=b.argv;this.rawArgs=D.slice();let u;switch(_.from){case void 0:case"node":this._scriptPath=D[1],u=D.slice(2);break;case"electron":if(b.defaultApp)this._scriptPath=D[1],u=D.slice(2);else u=D.slice(1);break;case"user":u=D.slice(0);break;case"eval":u=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",u}parse(D,_){this._prepareForParse();let u=this._prepareUserArgs(D,_);return this._parseCommand([],u),this}async parseAsync(D,_){this._prepareForParse();let u=this._prepareUserArgs(D,_);return await this._parseCommand([],u),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,_,u){if(U2.existsSync(D))return;let F=_?`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 '${u}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
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
20
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
21
- - ${F}`;throw new Error(B)}_executeSubCommand(D,_){_=_.slice();let u=!1,F=[".js",".ts",".tsx",".mjs",".cjs"];function B(X,G){let Z=yD.resolve(X,G);if(U2.existsSync(Z))return Z;if(F.includes(yD.extname(G)))return;let J=F.find((K)=>U2.existsSync(`${Z}${K}`));if(J)return`${Z}${J}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let E=D._executableFile||`${this._name}-${D._name}`,C=this._executableDir||"";if(this._scriptPath){let X;try{X=U2.realpathSync(this._scriptPath)}catch{X=this._scriptPath}C=yD.resolve(yD.dirname(X),C)}if(C){let X=B(C,E);if(!X&&!D._executableFile&&this._scriptPath){let G=yD.basename(this._scriptPath,yD.extname(this._scriptPath));if(G!==this._name)X=B(C,`${G}-${D._name}`)}E=X||E}u=F.includes(yD.extname(E));let $;if(b.platform!=="win32")if(u)_.unshift(E),_=V1(b.execArgv).concat(_),$=P3.spawn(b.argv[0],_,{stdio:"inherit"});else $=P3.spawn(E,_,{stdio:"inherit"});else this._checkForMissingExecutable(E,C,D._name),_.unshift(E),_=V1(b.execArgv).concat(_),$=P3.spawn(b.execPath,_,{stdio:"inherit"});if(!$.killed)["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((G)=>{b.on(G,()=>{if($.killed===!1&&$.exitCode===null)$.kill(G)})});let q=this._exitCallback;$.on("close",(X)=>{if(X=X??1,!q)b.exit(X);else q(new z3(X,"commander.executeSubCommandAsync","(close)"))}),$.on("error",(X)=>{if(X.code==="ENOENT")this._checkForMissingExecutable(E,C,D._name);else if(X.code==="EACCES")throw new Error(`'${E}' not executable`);if(!q)b.exit(1);else{let G=new z3(1,"commander.executeSubCommandAsync","(error)");G.nestedError=X,q(G)}}),this.runningCommand=$}_dispatchSubcommand(D,_,u){let F=this._findCommand(D);if(!F)this.help({error:!0});F._prepareForParse();let B;return B=this._chainOrCallSubCommandHook(B,F,"preSubcommand"),B=this._chainOrCall(B,()=>{if(F._executableHandler)this._executeSubCommand(F,_.concat(u));else return F._parseCommand(_,u)}),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=(u,F,B)=>{let E=F;if(F!==null&&u.parseArg){let C=`error: command-argument value '${F}' is invalid for argument '${u.name()}'.`;E=this._callParseArg(u,F,B,C)}return E};this._checkNumberOfArguments();let _=[];this.registeredArguments.forEach((u,F)=>{let B=u.defaultValue;if(u.variadic){if(F<this.args.length){if(B=this.args.slice(F),u.parseArg)B=B.reduce((E,C)=>{return D(u,C,E)},u.defaultValue)}else if(B===void 0)B=[]}else if(F<this.args.length){if(B=this.args[F],u.parseArg)B=D(u,B,u.defaultValue)}_[F]=B}),this.processedArgs=_}_chainOrCall(D,_){if(D&&D.then&&typeof D.then==="function")return D.then(()=>_());return _()}_chainOrCallHooks(D,_){let u=D,F=[];if(this._getCommandAndAncestors().reverse().filter((B)=>B._lifeCycleHooks[_]!==void 0).forEach((B)=>{B._lifeCycleHooks[_].forEach((E)=>{F.push({hookedCommand:B,callback:E})})}),_==="postAction")F.reverse();return F.forEach((B)=>{u=this._chainOrCall(u,()=>{return B.callback(B.hookedCommand,this)})}),u}_chainOrCallSubCommandHook(D,_,u){let F=D;if(this._lifeCycleHooks[u]!==void 0)this._lifeCycleHooks[u].forEach((B)=>{F=this._chainOrCall(F,()=>{return B(this,_)})});return F}_parseCommand(D,_){let u=this.parseOptions(_);if(this._parseOptionsEnv(),this._parseOptionsImplied(),D=D.concat(u.operands),_=u.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(u.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let F=()=>{if(u.unknown.length>0)this.unknownOption(u.unknown[0])},B=`command:${this.name()}`;if(this._actionHandler){F(),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))F(),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 F(),this._processArguments()}else if(this.commands.length)F(),this.help({error:!0});else F(),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((u)=>{let F=u.attributeName();if(this.getOptionValue(F)===void 0)return!1;return this.getOptionValueSource(F)!=="default"});D.filter((u)=>u.conflictsWith.length>0).forEach((u)=>{let F=D.find((B)=>u.conflictsWith.includes(B.attributeName()));if(F)this._conflictingOption(u,F)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((D)=>{D._checkForConflictingLocalOptions()})}parseOptions(D){let _=[],u=[],F=_,B=D.slice();function E($){return $.length>1&&$[0]==="-"}let C=null;while(B.length){let $=B.shift();if($==="--"){if(F===u)F.push($);F.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 X=B.shift();if(X===void 0)this.optionMissingArgument(q);this.emit(`option:${q.name()}`,X)}else if(q.optional){let X=null;if(B.length>0&&!E(B[0]))X=B.shift();this.emit(`option:${q.name()}`,X)}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("="),X=this._findOption($.slice(0,q));if(X&&(X.required||X.optional)){this.emit(`option:${X.name()}`,$.slice(q+1));continue}}if(E($))F=u;if((this._enablePositionalOptions||this._passThroughOptions)&&_.length===0&&u.length===0){if(this._findCommand($)){if(_.push($),B.length>0)u.push(...B);break}else if(this._getHelpCommand()&&$===this._getHelpCommand().name()){if(_.push($),B.length>0)_.push(...B);break}else if(this._defaultCommandName){if(u.push($),B.length>0)u.push(...B);break}}if(this._passThroughOptions){if(F.push($),B.length>0)F.push(...B);break}F.push($)}return{operands:_,unknown:u}}opts(){if(this._storeOptionsAsProperties){let D={},_=this.options.length;for(let u=0;u<_;u++){let F=this.options[u].attributeName();D[F]=F===this._versionOptionName?this._version:this[F]}return D}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((D,_)=>Object.assign(D,_.opts()),{})}error(D,_){if(this._outputConfiguration.outputError(`${D}
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
22
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==="string")this._outputConfiguration.writeErr(`${this._showHelpAfterError}
23
23
  `);else if(this._showHelpAfterError)this._outputConfiguration.writeErr(`
24
- `),this.outputHelp({error:!0});let u=_||{},F=u.exitCode||1,B=u.code||"commander.error";this._exit(F,B,D)}_parseOptionsEnv(){this.options.forEach((D)=>{if(D.envVar&&D.envVar in b.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()}`,b.env[D.envVar]);else this.emit(`optionEnv:${D.name()}`)}})}_parseOptionsImplied(){let D=new U9(this.options),_=(u)=>{return this.getOptionValue(u)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(u))};this.options.filter((u)=>u.implied!==void 0&&_(u.attributeName())&&D.valueFromOption(this.getOptionValue(u.attributeName()),u)).forEach((u)=>{Object.keys(u.implied).filter((F)=>!_(F)).forEach((F)=>{this.setOptionValueWithSource(F,u.implied[F],"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 u=(E)=>{let C=E.attributeName(),$=this.getOptionValue(C),q=this.options.find((G)=>G.negate&&C===G.attributeName()),X=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 X||E},F=(E)=>{let C=u(E),$=C.attributeName();if(this.getOptionValueSource($)==="env")return`environment variable '${C.envVar}'`;return`option '${C.flags}'`},B=`error: ${F(D)} cannot be used with ${F(_)}`;this.error(B,{code:"commander.conflictingOption"})}unknownOption(D){if(this._allowUnknownOption)return;let _="";if(D.startsWith("--")&&this._showSuggestionAfterError){let F=[],B=this;do{let E=B.createHelp().visibleOptions(B).filter((C)=>C.long).map((C)=>C.long);F=F.concat(E),B=B.parent}while(B&&!B._enablePositionalOptions);_=A1(D,F)}let u=`error: unknown option '${D}'${_}`;this.error(u,{code:"commander.unknownOption"})}_excessArguments(D){if(this._allowExcessArguments)return;let _=this.registeredArguments.length,u=_===1?"":"s",B=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${_} argument${u} but got ${D.length}.`;this.error(B,{code:"commander.excessArguments"})}unknownCommand(){let D=this.args[0],_="";if(this._showSuggestionAfterError){let F=[];this.createHelp().visibleCommands(this).forEach((B)=>{if(F.push(B.name()),B.alias())F.push(B.alias())}),_=A1(D,F)}let u=`error: unknown command '${D}'${_}`;this.error(u,{code:"commander.unknownCommand"})}version(D,_,u){if(D===void 0)return this._version;this._version=D,_=_||"-V, --version",u=u||"output the version number";let F=this.createOption(_,u);return this._versionOptionName=F.attributeName(),this._registerOption(F),this.on("option:"+F.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 u=this.parent?._findCommand(D);if(u){let F=[u.name()].concat(u.aliases()).join("|");throw new Error(`cannot add alias '${D}' to command '${this.name()}' as already have command '${F}'`)}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((u)=>{return J9(u)});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=yD.basename(D,yD.extname(D)),this}executableDir(D){if(D===void 0)return this._executableDir;return this._executableDir=D,this}helpInformation(D){let _=this.createHelp(),u=this._getOutputContext(D);_.prepareContext({error:u.error,helpWidth:u.helpWidth,outputHasColors:u.hasColors});let F=_.formatHelp(this,_);if(u.hasColors)return F;return this._outputConfiguration.stripColor(F)}_getOutputContext(D){D=D||{};let _=!!D.error,u,F,B;if(_)u=(C)=>this._outputConfiguration.writeErr(C),F=this._outputConfiguration.getErrHasColors(),B=this._outputConfiguration.getErrHelpWidth();else u=(C)=>this._outputConfiguration.writeOut(C),F=this._outputConfiguration.getOutHasColors(),B=this._outputConfiguration.getOutHelpWidth();return{error:_,write:(C)=>{if(!F)C=this._outputConfiguration.stripColor(C);return u(C)},hasColors:F,helpWidth:B}}outputHelp(D){let _;if(typeof D==="function")_=D,D=void 0;let u=this._getOutputContext(D),F={error:u.error,write:u.write,command:this};this._getCommandAndAncestors().reverse().forEach((E)=>E.emit("beforeAllHelp",F)),this.emit("beforeHelp",F);let B=this.helpInformation({error:u.error});if(_){if(B=_(B),typeof B!=="string"&&!Buffer.isBuffer(B))throw new Error("outputHelp callback must return a string or a Buffer")}if(u.write(B),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",F),this._getCommandAndAncestors().forEach((E)=>E.emit("afterAllHelp",F))}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(b.exitCode??0);if(_===0&&D&&typeof D!=="function"&&D.error)_=1;this._exit(_,"commander.help","(outputHelp)")}addHelpText(D,_){let u=["beforeAll","before","after","afterAll"];if(!u.includes(D))throw new Error(`Unexpected value for position to addHelpText.
26
- Expecting one of '${u.join("', '")}'`);let F=`${D}Help`;return this.on(F,(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((F)=>_.is(F)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function V1(D){return D.map((_)=>{if(!_.startsWith("--inspect"))return _;let u,F="127.0.0.1",B="9229",E;if((E=_.match(/^(--inspect(-brk)?)$/))!==null)u=E[1];else if((E=_.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(u=E[1],/^\d+$/.test(E[3]))B=E[3];else F=E[3];else if((E=_.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)u=E[1],F=E[3],B=E[4];if(u&&B!=="0")return`${u}=${F}:${parseInt(B)+1}`;return _})}function Y3(){if(b.env.NO_COLOR||b.env.FORCE_COLOR==="0"||b.env.FORCE_COLOR==="false")return!1;if(b.env.FORCE_COLOR||b.env.CLICOLOR_FORCE!==void 0)return!0;return}x3.Command=w3;x3.useColor=Y3});var T1=N((UD)=>{var{Argument:I1}=K2(),{Command:S3}=L1(),{CommanderError:H9,InvalidArgumentError:R1}=h0(),{Help:M9}=T3(),{Option:N1}=O3();UD.program=new S3;UD.createCommand=(D)=>new S3(D);UD.createOption=(D,_)=>new N1(D,_);UD.createArgument=(D,_)=>new I1(D,_);UD.Command=S3;UD.Option=N1;UD.Argument=I1;UD.Help=M9;UD.CommanderError=H9;UD.InvalidArgumentError=R1;UD.InvalidOptionArgumentError=R1});var g0=N((ZB,w1)=>{var A9=require("node:tty"),V9=A9?.WriteStream?.prototype?.hasColors?.()??!1,w=(D,_)=>{if(!V9)return(B)=>B;let u=`\x1B[${D}m`,F=`\x1B[${_}m`;return(B)=>{let E=B+"",C=E.indexOf(F);if(C===-1)return u+E+F;let $=u,q=0;while(C!==-1)$+=E.slice(q,C)+u,q=C+F.length,C=E.indexOf(F,q);return $+=E.slice(q)+F,$}},Y={};Y.reset=w(0,0);Y.bold=w(1,22);Y.dim=w(2,22);Y.italic=w(3,23);Y.underline=w(4,24);Y.overline=w(53,55);Y.inverse=w(7,27);Y.hidden=w(8,28);Y.strikethrough=w(9,29);Y.black=w(30,39);Y.red=w(31,39);Y.green=w(32,39);Y.yellow=w(33,39);Y.blue=w(34,39);Y.magenta=w(35,39);Y.cyan=w(36,39);Y.white=w(37,39);Y.gray=w(90,39);Y.bgBlack=w(40,49);Y.bgRed=w(41,49);Y.bgGreen=w(42,49);Y.bgYellow=w(43,49);Y.bgBlue=w(44,49);Y.bgMagenta=w(45,49);Y.bgCyan=w(46,49);Y.bgWhite=w(47,49);Y.bgGray=w(100,49);Y.redBright=w(91,39);Y.greenBright=w(92,39);Y.yellowBright=w(93,39);Y.blueBright=w(94,39);Y.magentaBright=w(95,39);Y.cyanBright=w(96,39);Y.whiteBright=w(97,39);Y.bgRedBright=w(101,49);Y.bgGreenBright=w(102,49);Y.bgYellowBright=w(103,49);Y.bgBlueBright=w(104,49);Y.bgMagentaBright=w(105,49);Y.bgCyanBright=w(106,49);Y.bgWhiteBright=w(107,49);w1.exports=Y});var h1=N((YB,b1)=>{b1.exports=P9;function O9(D){let _={defaultWidth:0,output:process.stdout,tty:require("tty")};if(!D)return _;return Object.keys(_).forEach(function(u){if(!D[u])D[u]=_[u]}),D}function P9(D){let _=O9(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 u=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(u)&&u!==0)return u}return _.defaultWidth}});var d1=N((wB,m1)=>{m1.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 f3=N((xB,g1)=>{var z9=d1();g1.exports=(D)=>typeof D==="string"?D.replace(z9(),""):D});var c1=N((SB,c3)=>{var f1=(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};c3.exports=f1;c3.exports.default=f1});var l1=N((yB,p1)=>{p1.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 l3=N((kB,p3)=>{var Y9=f3(),w9=c1(),x9=l1(),i1=(D)=>{if(typeof D!=="string"||D.length===0)return 0;if(D=Y9(D),D.length===0)return 0;D=D.replace(x9()," ");let _=0;for(let u=0;u<D.length;u++){let F=D.codePointAt(u);if(F<=31||F>=127&&F<=159)continue;if(F>=768&&F<=879)continue;if(F>65535)u++;_+=w9(F)?2:1}return _};p3.exports=i1;p3.exports.default=i1});var a1=N((vB,n1)=>{n1.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 i3=N((bB,r1)=>{var f0=a1(),s1={};for(let D of Object.keys(f0))s1[f0[D]]=D;var R={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"]}};r1.exports=R;for(let D of Object.keys(R)){if(!("channels"in R[D]))throw new Error("missing channels property: "+D);if(!("labels"in R[D]))throw new Error("missing channel labels property: "+D);if(R[D].labels.length!==R[D].channels)throw new Error("channel and label counts mismatch: "+D);let{channels:_,labels:u}=R[D];delete R[D].channels,delete R[D].labels,Object.defineProperty(R[D],"channels",{value:_}),Object.defineProperty(R[D],"labels",{value:u})}R.rgb.hsl=function(D){let _=D[0]/255,u=D[1]/255,F=D[2]/255,B=Math.min(_,u,F),E=Math.max(_,u,F),C=E-B,$,q;if(E===B)$=0;else if(_===E)$=(u-F)/C;else if(u===E)$=2+(F-_)/C;else if(F===E)$=4+(_-u)/C;if($=Math.min($*60,360),$<0)$+=360;let X=(B+E)/2;if(E===B)q=0;else if(X<=0.5)q=C/(E+B);else q=C/(2-E-B);return[$,q*100,X*100]};R.rgb.hsv=function(D){let _,u,F,B,E,C=D[0]/255,$=D[1]/255,q=D[2]/255,X=Math.max(C,$,q),G=X-Math.min(C,$,q),Z=function(J){return(X-J)/6/G+0.5};if(G===0)B=0,E=0;else{if(E=G/X,_=Z(C),u=Z($),F=Z(q),C===X)B=F-u;else if($===X)B=0.3333333333333333+_-F;else if(q===X)B=0.6666666666666666+u-_;if(B<0)B+=1;else if(B>1)B-=1}return[B*360,E*100,X*100]};R.rgb.hwb=function(D){let _=D[0],u=D[1],F=D[2],B=R.rgb.hsl(D)[0],E=0.00392156862745098*Math.min(_,Math.min(u,F));return F=1-0.00392156862745098*Math.max(_,Math.max(u,F)),[B,E*100,F*100]};R.rgb.cmyk=function(D){let _=D[0]/255,u=D[1]/255,F=D[2]/255,B=Math.min(1-_,1-u,1-F),E=(1-_-B)/(1-B)||0,C=(1-u-B)/(1-B)||0,$=(1-F-B)/(1-B)||0;return[E*100,C*100,$*100,B*100]};function S9(D,_){return(D[0]-_[0])**2+(D[1]-_[1])**2+(D[2]-_[2])**2}R.rgb.keyword=function(D){let _=s1[D];if(_)return _;let u=1/0,F;for(let B of Object.keys(f0)){let E=f0[B],C=S9(D,E);if(C<u)u=C,F=B}return F};R.keyword.rgb=function(D){return f0[D]};R.rgb.xyz=function(D){let _=D[0]/255,u=D[1]/255,F=D[2]/255;_=_>0.04045?((_+0.055)/1.055)**2.4:_/12.92,u=u>0.04045?((u+0.055)/1.055)**2.4:u/12.92,F=F>0.04045?((F+0.055)/1.055)**2.4:F/12.92;let B=_*0.4124+u*0.3576+F*0.1805,E=_*0.2126+u*0.7152+F*0.0722,C=_*0.0193+u*0.1192+F*0.9505;return[B*100,E*100,C*100]};R.rgb.lab=function(D){let _=R.rgb.xyz(D),u=_[0],F=_[1],B=_[2];u/=95.047,F/=100,B/=108.883,u=u>0.008856?u**0.3333333333333333:7.787*u+0.13793103448275862,F=F>0.008856?F**0.3333333333333333:7.787*F+0.13793103448275862,B=B>0.008856?B**0.3333333333333333:7.787*B+0.13793103448275862;let E=116*F-16,C=500*(u-F),$=200*(F-B);return[E,C,$]};R.hsl.rgb=function(D){let _=D[0]/360,u=D[1]/100,F=D[2]/100,B,E,C;if(u===0)return C=F*255,[C,C,C];if(F<0.5)B=F*(1+u);else B=F+u-F*u;let $=2*F-B,q=[0,0,0];for(let X=0;X<3;X++){if(E=_+0.3333333333333333*-(X-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[X]=C*255}return q};R.hsl.hsv=function(D){let _=D[0],u=D[1]/100,F=D[2]/100,B=u,E=Math.max(F,0.01);F*=2,u*=F<=1?F:2-F,B*=E<=1?E:2-E;let C=(F+u)/2,$=F===0?2*B/(E+B):2*u/(F+u);return[_,$*100,C*100]};R.hsv.rgb=function(D){let _=D[0]/60,u=D[1]/100,F=D[2]/100,B=Math.floor(_)%6,E=_-Math.floor(_),C=255*F*(1-u),$=255*F*(1-u*E),q=255*F*(1-u*(1-E));switch(F*=255,B){case 0:return[F,q,C];case 1:return[$,F,C];case 2:return[C,F,q];case 3:return[C,$,F];case 4:return[q,C,F];case 5:return[F,C,$]}};R.hsv.hsl=function(D){let _=D[0],u=D[1]/100,F=D[2]/100,B=Math.max(F,0.01),E,C;C=(2-u)*F;let $=(2-u)*B;return E=u*B,E/=$<=1?$:2-$,E=E||0,C/=2,[_,E*100,C*100]};R.hwb.rgb=function(D){let _=D[0]/360,u=D[1]/100,F=D[2]/100,B=u+F,E;if(B>1)u/=B,F/=B;let C=Math.floor(6*_),$=1-F;if(E=6*_-C,(C&1)!==0)E=1-E;let q=u+E*($-u),X,G,Z;switch(C){default:case 6:case 0:X=$,G=q,Z=u;break;case 1:X=q,G=$,Z=u;break;case 2:X=u,G=$,Z=q;break;case 3:X=u,G=q,Z=$;break;case 4:X=q,G=u,Z=$;break;case 5:X=$,G=u,Z=q;break}return[X*255,G*255,Z*255]};R.cmyk.rgb=function(D){let _=D[0]/100,u=D[1]/100,F=D[2]/100,B=D[3]/100,E=1-Math.min(1,_*(1-B)+B),C=1-Math.min(1,u*(1-B)+B),$=1-Math.min(1,F*(1-B)+B);return[E*255,C*255,$*255]};R.xyz.rgb=function(D){let _=D[0]/100,u=D[1]/100,F=D[2]/100,B,E,C;return B=_*3.2406+u*-1.5372+F*-0.4986,E=_*-0.9689+u*1.8758+F*0.0415,C=_*0.0557+u*-0.204+F*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]};R.xyz.lab=function(D){let _=D[0],u=D[1],F=D[2];_/=95.047,u/=100,F/=108.883,_=_>0.008856?_**0.3333333333333333:7.787*_+0.13793103448275862,u=u>0.008856?u**0.3333333333333333:7.787*u+0.13793103448275862,F=F>0.008856?F**0.3333333333333333:7.787*F+0.13793103448275862;let B=116*u-16,E=500*(_-u),C=200*(u-F);return[B,E,C]};R.lab.xyz=function(D){let _=D[0],u=D[1],F=D[2],B,E,C;E=(_+16)/116,B=u/500+E,C=E-F/200;let $=E**3,q=B**3,X=C**3;return E=$>0.008856?$:(E-0.13793103448275862)/7.787,B=q>0.008856?q:(B-0.13793103448275862)/7.787,C=X>0.008856?X:(C-0.13793103448275862)/7.787,B*=95.047,E*=100,C*=108.883,[B,E,C]};R.lab.lch=function(D){let _=D[0],u=D[1],F=D[2],B;if(B=Math.atan2(F,u)*360/2/Math.PI,B<0)B+=360;let C=Math.sqrt(u*u+F*F);return[_,C,B]};R.lch.lab=function(D){let _=D[0],u=D[1],B=D[2]/360*2*Math.PI,E=u*Math.cos(B),C=u*Math.sin(B);return[_,E,C]};R.rgb.ansi16=function(D,_=null){let[u,F,B]=D,E=_===null?R.rgb.hsv(D)[2]:_;if(E=Math.round(E/50),E===0)return 30;let C=30+(Math.round(B/255)<<2|Math.round(F/255)<<1|Math.round(u/255));if(E===2)C+=60;return C};R.hsv.ansi16=function(D){return R.rgb.ansi16(R.hsv.rgb(D),D[2])};R.rgb.ansi256=function(D){let _=D[0],u=D[1],F=D[2];if(_===u&&u===F){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(u/255*5)+Math.round(F/255*5)};R.ansi16.rgb=function(D){let _=D%10;if(_===0||_===7){if(D>50)_+=3.5;return _=_/10.5*255,[_,_,_]}let u=(~~(D>50)+1)*0.5,F=(_&1)*u*255,B=(_>>1&1)*u*255,E=(_>>2&1)*u*255;return[F,B,E]};R.ansi256.rgb=function(D){if(D>=232){let E=(D-232)*10+8;return[E,E,E]}D-=16;let _,u=Math.floor(D/36)/5*255,F=Math.floor((_=D%36)/6)/5*255,B=_%6/5*255;return[u,F,B]};R.rgb.hex=function(D){let u=(((Math.round(D[0])&255)<<16)+((Math.round(D[1])&255)<<8)+(Math.round(D[2])&255)).toString(16).toUpperCase();return"000000".substring(u.length)+u};R.hex.rgb=function(D){let _=D.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!_)return[0,0,0];let u=_[0];if(_[0].length===3)u=u.split("").map(($)=>{return $+$}).join("");let F=parseInt(u,16),B=F>>16&255,E=F>>8&255,C=F&255;return[B,E,C]};R.rgb.hcg=function(D){let _=D[0]/255,u=D[1]/255,F=D[2]/255,B=Math.max(Math.max(_,u),F),E=Math.min(Math.min(_,u),F),C=B-E,$,q;if(C<1)$=E/(1-C);else $=0;if(C<=0)q=0;else if(B===_)q=(u-F)/C%6;else if(B===u)q=2+(F-_)/C;else q=4+(_-u)/C;return q/=6,q%=1,[q*360,C*100,$*100]};R.hsl.hcg=function(D){let _=D[1]/100,u=D[2]/100,F=u<0.5?2*_*u:2*_*(1-u),B=0;if(F<1)B=(u-0.5*F)/(1-F);return[D[0],F*100,B*100]};R.hsv.hcg=function(D){let _=D[1]/100,u=D[2]/100,F=_*u,B=0;if(F<1)B=(u-F)/(1-F);return[D[0],F*100,B*100]};R.hcg.rgb=function(D){let _=D[0]/360,u=D[1]/100,F=D[2]/100;if(u===0)return[F*255,F*255,F*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-u)*F,[(u*B[0]+q)*255,(u*B[1]+q)*255,(u*B[2]+q)*255]};R.hcg.hsv=function(D){let _=D[1]/100,u=D[2]/100,F=_+u*(1-_),B=0;if(F>0)B=_/F;return[D[0],B*100,F*100]};R.hcg.hsl=function(D){let _=D[1]/100,F=D[2]/100*(1-_)+0.5*_,B=0;if(F>0&&F<0.5)B=_/(2*F);else if(F>=0.5&&F<1)B=_/(2*(1-F));return[D[0],B*100,F*100]};R.hcg.hwb=function(D){let _=D[1]/100,u=D[2]/100,F=_+u*(1-_);return[D[0],(F-_)*100,(1-F)*100]};R.hwb.hcg=function(D){let _=D[1]/100,F=1-D[2]/100,B=F-_,E=0;if(B<1)E=(F-B)/(1-B);return[D[0],B*100,E*100]};R.apple.rgb=function(D){return[D[0]/65535*255,D[1]/65535*255,D[2]/65535*255]};R.rgb.apple=function(D){return[D[0]/255*65535,D[1]/255*65535,D[2]/255*65535]};R.gray.rgb=function(D){return[D[0]/100*255,D[0]/100*255,D[0]/100*255]};R.gray.hsl=function(D){return[0,0,D[0]]};R.gray.hsv=R.gray.hsl;R.gray.hwb=function(D){return[0,100,D[0]]};R.gray.cmyk=function(D){return[0,0,0,D[0]]};R.gray.lab=function(D){return[D[0],0,0]};R.gray.hex=function(D){let _=Math.round(D[0]/100*255)&255,F=((_<<16)+(_<<8)+_).toString(16).toUpperCase();return"000000".substring(F.length)+F};R.rgb.gray=function(D){return[(D[0]+D[1]+D[2])/3/255*100]}});var t1=N((hB,o1)=>{var A2=i3();function y9(){let D={},_=Object.keys(A2);for(let u=_.length,F=0;F<u;F++)D[_[F]]={distance:-1,parent:null};return D}function k9(D){let _=y9(),u=[D];_[D].distance=0;while(u.length){let F=u.pop(),B=Object.keys(A2[F]);for(let E=B.length,C=0;C<E;C++){let $=B[C],q=_[$];if(q.distance===-1)q.distance=_[F].distance+1,q.parent=F,u.unshift($)}}return _}function v9(D,_){return function(u){return _(D(u))}}function b9(D,_){let u=[_[D].parent,D],F=A2[_[D].parent][D],B=_[D].parent;while(_[B].parent)u.unshift(_[B].parent),F=v9(A2[_[B].parent][B],F),B=_[B].parent;return F.conversion=u,F}o1.exports=function(D){let _=k9(D),u={},F=Object.keys(_);for(let B=F.length,E=0;E<B;E++){let C=F[E];if(_[C].parent===null)continue;u[C]=b9(C,_)}return u}});var D_=N((mB,e1)=>{var n3=i3(),h9=t1(),L0={},m9=Object.keys(n3);function d9(D){let _=function(...u){let F=u[0];if(F===void 0||F===null)return F;if(F.length>1)u=F;return D(u)};if("conversion"in D)_.conversion=D.conversion;return _}function g9(D){let _=function(...u){let F=u[0];if(F===void 0||F===null)return F;if(F.length>1)u=F;let B=D(u);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 _}m9.forEach((D)=>{L0[D]={},Object.defineProperty(L0[D],"channels",{value:n3[D].channels}),Object.defineProperty(L0[D],"labels",{value:n3[D].labels});let _=h9(D);Object.keys(_).forEach((F)=>{let B=_[F];L0[D][F]=g9(B),L0[D][F].raw=d9(B)})});e1.exports=L0});var C_=N((dB,E_)=>{var __=(D,_)=>(...u)=>{return`\x1B[${D(...u)+_}m`},u_=(D,_)=>(...u)=>{let F=D(...u);return`\x1B[${38+_};5;${F}m`},F_=(D,_)=>(...u)=>{let F=D(...u);return`\x1B[${38+_};2;${F[0]};${F[1]};${F[2]}m`},V2=(D)=>D,B_=(D,_,u)=>[D,_,u],I0=(D,_,u)=>{Object.defineProperty(D,_,{get:()=>{let F=u();return Object.defineProperty(D,_,{value:F,enumerable:!0,configurable:!0}),F},enumerable:!0,configurable:!0})},a3,R0=(D,_,u,F)=>{if(a3===void 0)a3=D_();let B=F?10:0,E={};for(let[C,$]of Object.entries(a3)){let q=C==="ansi16"?"ansi":C;if(C===_)E[q]=D(u,B);else if(typeof $==="object")E[q]=D($[_],B)}return E};function f9(){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[u,F]of Object.entries(_)){for(let[B,E]of Object.entries(F))_[B]={open:`\x1B[${E[0]}m`,close:`\x1B[${E[1]}m`},F[B]=_[B],D.set(E[0],E[1]);Object.defineProperty(_,u,{value:F,enumerable:!1})}return Object.defineProperty(_,"codes",{value:D,enumerable:!1}),_.color.close="\x1B[39m",_.bgColor.close="\x1B[49m",I0(_.color,"ansi",()=>R0(__,"ansi16",V2,!1)),I0(_.color,"ansi256",()=>R0(u_,"ansi256",V2,!1)),I0(_.color,"ansi16m",()=>R0(F_,"rgb",B_,!1)),I0(_.bgColor,"ansi",()=>R0(__,"ansi16",V2,!0)),I0(_.bgColor,"ansi256",()=>R0(u_,"ansi256",V2,!0)),I0(_.bgColor,"ansi16m",()=>R0(F_,"rgb",B_,!0)),_}Object.defineProperty(E_,"exports",{enumerable:!0,get:f9})});var q_=N((gB,G_)=>{var c0=l3(),c9=f3(),p9=C_(),r3=new Set(["\x1B","›"]),$_=(D)=>`${r3.values().next().value}[${D}m`,l9=(D)=>D.split(" ").map((_)=>c0(_)),s3=(D,_,u)=>{let F=[..._],B=!1,E=c0(c9(D[D.length-1]));for(let[C,$]of F.entries()){let q=c0($);if(E+q<=u)D[D.length-1]+=$;else D.push($),E=0;if(r3.has($))B=!0;else if(B&&$==="m"){B=!1;continue}if(B)continue;if(E+=q,E===u&&C<F.length-1)D.push(""),E=0}if(!E&&D[D.length-1].length>0&&D.length>1)D[D.length-2]+=D.pop()},i9=(D)=>{let _=D.split(" "),u=_.length;while(u>0){if(c0(_[u-1])>0)break;u--}if(u===_.length)return D;return _.slice(0,u).join(" ")+_.slice(u).join("")},n9=(D,_,u={})=>{if(u.trim!==!1&&D.trim()==="")return"";let F="",B="",E,C=l9(D),$=[""];for(let[q,X]of D.split(" ").entries()){if(u.trim!==!1)$[$.length-1]=$[$.length-1].trimLeft();let G=c0($[$.length-1]);if(q!==0){if(G>=_&&(u.wordWrap===!1||u.trim===!1))$.push(""),G=0;if(G>0||u.trim===!1)$[$.length-1]+=" ",G++}if(u.hard&&C[q]>_){let Z=_-G,J=1+Math.floor((C[q]-Z-1)/_);if(Math.floor((C[q]-1)/_)<J)$.push("");s3($,X,_);continue}if(G+C[q]>_&&G>0&&C[q]>0){if(u.wordWrap===!1&&G<_){s3($,X,_);continue}$.push("")}if(G+C[q]>_&&u.wordWrap===!1){s3($,X,_);continue}$[$.length-1]+=X}if(u.trim!==!1)$=$.map(i9);F=$.join(`
28
- `);for(let[q,X]of[...F].entries()){if(B+=X,r3.has(X)){let Z=parseFloat(/\d[^m]*/.exec(F.slice(q,q+4)));E=Z===39?null:Z}let G=p9.codes.get(Number(E));if(E&&G){if(F[q+1]===`
29
- `)B+=$_(G);else if(X===`
30
- `)B+=$_(E)}}return B};G_.exports=(D,_,u)=>{return String(D).normalize().replace(/\r\n/g,`
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
31
  `).split(`
32
- `).map((F)=>n9(F,_,u)).join(`
33
- `)}});var M_=N((tB,H_)=>{var r9=require("stream");class U_ extends r9{#u=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.#u!==null)return this.#u;return this.#_("isTTY",!1)}set isTTY(D){this.#u=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)}}H_.exports=U_});var u8=N((BE,_8)=>{var y=_8.exports;_8.exports.default=y;var h="\x1B[",i0="\x1B]",N0="\x07",R2=";",I_=process.env.TERM_PROGRAM==="Apple_Terminal";y.cursorTo=(D,_)=>{if(typeof D!=="number")throw new TypeError("The `x` argument is required");if(typeof _!=="number")return h+(D+1)+"G";return h+(_+1)+";"+(D+1)+"H"};y.cursorMove=(D,_)=>{if(typeof D!=="number")throw new TypeError("The `x` argument is required");let u="";if(D<0)u+=h+-D+"D";else if(D>0)u+=h+D+"C";if(_<0)u+=h+-_+"A";else if(_>0)u+=h+_+"B";return u};y.cursorUp=(D=1)=>h+D+"A";y.cursorDown=(D=1)=>h+D+"B";y.cursorForward=(D=1)=>h+D+"C";y.cursorBackward=(D=1)=>h+D+"D";y.cursorLeft=h+"G";y.cursorSavePosition=I_?"\x1B7":h+"s";y.cursorRestorePosition=I_?"\x1B8":h+"u";y.cursorGetPosition=h+"6n";y.cursorNextLine=h+"E";y.cursorPrevLine=h+"F";y.cursorHide=h+"?25l";y.cursorShow=h+"?25h";y.eraseLines=(D)=>{let _="";for(let u=0;u<D;u++)_+=y.eraseLine+(u<D-1?y.cursorUp():"");if(D)_+=y.cursorLeft;return _};y.eraseEndLine=h+"K";y.eraseStartLine=h+"1K";y.eraseLine=h+"2K";y.eraseDown=h+"J";y.eraseUp=h+"1J";y.eraseScreen=h+"2J";y.scrollUp=h+"S";y.scrollDown=h+"T";y.clearScreen="\x1Bc";y.clearTerminal=process.platform==="win32"?`${y.eraseScreen}${h}0f`:`${y.eraseScreen}${h}3J${h}H`;y.beep=N0;y.link=(D,_)=>{return[i0,"8",R2,R2,_,N0,D,i0,"8",R2,R2,N0].join("")};y.image=(D,_={})=>{let u=`${i0}1337;File=inline=1`;if(_.width)u+=`;width=${_.width}`;if(_.height)u+=`;height=${_.height}`;if(_.preserveAspectRatio===!1)u+=";preserveAspectRatio=0";return u+":"+D.toString("base64")+N0};y.iTerm={setCwd:(D=process.cwd())=>`${i0}50;CurrentDir=${D}${N0}`,annotation:(D,_={})=>{let u=`${i0}1337;`,F=typeof _.x!=="undefined",B=typeof _.y!=="undefined";if((F||B)&&!(F&&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,""),u+=_.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",_.length>0)u+=(F?[D,_.length,_.x,_.y]:[_.length,D]).join("|");else u+=D;return u+N0}}});var y_=N((lE,S_)=>{var oD=require("constants"),$7=process.cwd,O2=null,G7=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!O2)O2=$7.call(process);return O2};try{process.cwd()}catch(D){}if(typeof process.chdir==="function"){if($8=process.chdir,process.chdir=function(D){O2=null,$8.call(process,D)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,$8)}var $8;S_.exports=q7;function q7(D){if(oD.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))_(D);if(!D.lutimes)u(D);if(D.chown=E(D.chown),D.fchown=E(D.fchown),D.lchown=E(D.lchown),D.chmod=F(D.chmod),D.fchmod=F(D.fchmod),D.lchmod=F(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,Z,J){if(J)process.nextTick(J)},D.lchmodSync=function(){};if(D.chown&&!D.lchown)D.lchown=function(G,Z,J,K){if(K)process.nextTick(K)},D.lchownSync=function(){};if(G7==="win32")D.rename=typeof D.rename!=="function"?D.rename:function(G){function Z(J,K,Q){var M=Date.now(),W=0;G(J,K,function V(L){if(L&&(L.code==="EACCES"||L.code==="EPERM"||L.code==="EBUSY")&&Date.now()-M<60000){if(setTimeout(function(){D.stat(K,function(T,S){if(T&&T.code==="ENOENT")G(J,K,V);else Q(L)})},W),W<100)W+=10;return}if(Q)Q(L)})}if(Object.setPrototypeOf)Object.setPrototypeOf(Z,G);return Z}(D.rename);D.read=typeof D.read!=="function"?D.read:function(G){function Z(J,K,Q,M,W,V){var L;if(V&&typeof V==="function"){var T=0;L=function(S,j,v){if(S&&S.code==="EAGAIN"&&T<10)return T++,G.call(D,J,K,Q,M,W,L);V.apply(this,arguments)}}return G.call(D,J,K,Q,M,W,L)}if(Object.setPrototypeOf)Object.setPrototypeOf(Z,G);return Z}(D.read),D.readSync=typeof D.readSync!=="function"?D.readSync:function(G){return function(Z,J,K,Q,M){var W=0;while(!0)try{return G.call(D,Z,J,K,Q,M)}catch(V){if(V.code==="EAGAIN"&&W<10){W++;continue}throw V}}}(D.readSync);function _(G){G.lchmod=function(Z,J,K){G.open(Z,oD.O_WRONLY|oD.O_SYMLINK,J,function(Q,M){if(Q){if(K)K(Q);return}G.fchmod(M,J,function(W){G.close(M,function(V){if(K)K(W||V)})})})},G.lchmodSync=function(Z,J){var K=G.openSync(Z,oD.O_WRONLY|oD.O_SYMLINK,J),Q=!0,M;try{M=G.fchmodSync(K,J),Q=!1}finally{if(Q)try{G.closeSync(K)}catch(W){}else G.closeSync(K)}return M}}function u(G){if(oD.hasOwnProperty("O_SYMLINK")&&G.futimes)G.lutimes=function(Z,J,K,Q){G.open(Z,oD.O_SYMLINK,function(M,W){if(M){if(Q)Q(M);return}G.futimes(W,J,K,function(V){G.close(W,function(L){if(Q)Q(V||L)})})})},G.lutimesSync=function(Z,J,K){var Q=G.openSync(Z,oD.O_SYMLINK),M,W=!0;try{M=G.futimesSync(Q,J,K),W=!1}finally{if(W)try{G.closeSync(Q)}catch(V){}else G.closeSync(Q)}return M};else if(G.futimes)G.lutimes=function(Z,J,K,Q){if(Q)process.nextTick(Q)},G.lutimesSync=function(){}}function F(G){if(!G)return G;return function(Z,J,K){return G.call(D,Z,J,function(Q){if(X(Q))Q=null;if(K)K.apply(this,arguments)})}}function B(G){if(!G)return G;return function(Z,J){try{return G.call(D,Z,J)}catch(K){if(!X(K))throw K}}}function E(G){if(!G)return G;return function(Z,J,K,Q){return G.call(D,Z,J,K,function(M){if(X(M))M=null;if(Q)Q.apply(this,arguments)})}}function C(G){if(!G)return G;return function(Z,J,K){try{return G.call(D,Z,J,K)}catch(Q){if(!X(Q))throw Q}}}function $(G){if(!G)return G;return function(Z,J,K){if(typeof J==="function")K=J,J=null;function Q(M,W){if(W){if(W.uid<0)W.uid+=4294967296;if(W.gid<0)W.gid+=4294967296}if(K)K.apply(this,arguments)}return J?G.call(D,Z,J,Q):G.call(D,Z,Q)}}function q(G){if(!G)return G;return function(Z,J){var K=J?G.call(D,Z,J):G.call(D,Z);if(K){if(K.uid<0)K.uid+=4294967296;if(K.gid<0)K.gid+=4294967296}return K}}function X(G){if(!G)return!0;if(G.code==="ENOSYS")return!0;var Z=!process.getuid||process.getuid()!==0;if(Z){if(G.code==="EINVAL"||G.code==="EPERM")return!0}return!1}}});var b_=N((iE,v_)=>{var k_=require("stream").Stream;v_.exports=X7;function X7(D){return{ReadStream:_,WriteStream:u};function _(F,B){if(!(this instanceof _))return new _(F,B);k_.call(this);var E=this;this.path=F,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 X=C[$];this[X]=B[X]}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,Z){if(G){E.emit("error",G),E.readable=!1;return}E.fd=Z,E.emit("open",Z),E._read()})}function u(F,B){if(!(this instanceof u))return new u(F,B);k_.call(this),this.path=F,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 m_=N((nE,h_)=>{h_.exports=J7;var Z7=Object.getPrototypeOf||function(D){return D.__proto__};function J7(D){if(D===null||typeof D!=="object")return D;if(D instanceof Object)var _={__proto__:Z7(D)};else var _=Object.create(null);return Object.getOwnPropertyNames(D).forEach(function(u){Object.defineProperty(_,u,Object.getOwnPropertyDescriptor(D,u))}),_}});var c_=N((aE,X8)=>{var a=require("fs"),Q7=y_(),K7=b_(),U7=m_(),P2=require("util"),ED,Y2;if(typeof Symbol==="function"&&typeof Symbol.for==="function")ED=Symbol.for("graceful-fs.queue"),Y2=Symbol.for("graceful-fs.previous");else ED="___graceful-fs.queue",Y2="___graceful-fs.previous";function H7(){}function f_(D,_){Object.defineProperty(D,ED,{get:function(){return _}})}var K0=H7;if(P2.debuglog)K0=P2.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))K0=function(){var D=P2.format.apply(P2,arguments);D="GFS4: "+D.split(/\n/).join(`
34
- GFS4: `),console.error(D)};if(!a[ED]){if(d_=global[ED]||[],f_(a,d_),a.close=function(D){function _(u,F){return D.call(a,u,function(B){if(!B)g_();if(typeof F==="function")F.apply(this,arguments)})}return Object.defineProperty(_,Y2,{value:D}),_}(a.close),a.closeSync=function(D){function _(u){D.apply(a,arguments),g_()}return Object.defineProperty(_,Y2,{value:D}),_}(a.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){K0(a[ED]),require("assert").equal(a[ED].length,0)})}var d_;if(!global[ED])f_(global,a[ED]);X8.exports=G8(U7(a));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!a.__patched)X8.exports=G8(a),a.__patched=!0;function G8(D){Q7(D),D.gracefulify=G8,D.createReadStream=j,D.createWriteStream=v;var _=D.readFile;D.readFile=u;function u(A,z,P){if(typeof z==="function")P=z,z=null;return c(A,z,P);function c(t,uD,i,s){return _(t,uD,function(g){if(g&&(g.code==="EMFILE"||g.code==="ENFILE"))O0([c,[t,uD,i],g,s||Date.now(),Date.now()]);else if(typeof i==="function")i.apply(this,arguments)})}}var F=D.writeFile;D.writeFile=B;function B(A,z,P,c){if(typeof P==="function")c=P,P=null;return t(A,z,P,c);function t(uD,i,s,g,BD){return F(uD,i,s,function(p){if(p&&(p.code==="EMFILE"||p.code==="ENFILE"))O0([t,[uD,i,s,g],p,BD||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}var E=D.appendFile;if(E)D.appendFile=C;function C(A,z,P,c){if(typeof P==="function")c=P,P=null;return t(A,z,P,c);function t(uD,i,s,g,BD){return E(uD,i,s,function(p){if(p&&(p.code==="EMFILE"||p.code==="ENFILE"))O0([t,[uD,i,s,g],p,BD||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}var $=D.copyFile;if($)D.copyFile=q;function q(A,z,P,c){if(typeof P==="function")c=P,P=0;return t(A,z,P,c);function t(uD,i,s,g,BD){return $(uD,i,s,function(p){if(p&&(p.code==="EMFILE"||p.code==="ENFILE"))O0([t,[uD,i,s,g],p,BD||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}var X=D.readdir;D.readdir=Z;var G=/^v[0-5]\./;function Z(A,z,P){if(typeof z==="function")P=z,z=null;var c=G.test(process.version)?function uD(i,s,g,BD){return X(i,t(i,s,g,BD))}:function uD(i,s,g,BD){return X(i,s,t(i,s,g,BD))};return c(A,z,P);function t(uD,i,s,g){return function(BD,p){if(BD&&(BD.code==="EMFILE"||BD.code==="ENFILE"))O0([c,[uD,i,s],BD,g||Date.now(),Date.now()]);else{if(p&&p.sort)p.sort();if(typeof s==="function")s.call(this,BD,p)}}}}if(process.version.substr(0,4)==="v0.8"){var J=K7(D);V=J.ReadStream,T=J.WriteStream}var K=D.ReadStream;if(K)V.prototype=Object.create(K.prototype),V.prototype.open=L;var Q=D.WriteStream;if(Q)T.prototype=Object.create(Q.prototype),T.prototype.open=S;Object.defineProperty(D,"ReadStream",{get:function(){return V},set:function(A){V=A},enumerable:!0,configurable:!0}),Object.defineProperty(D,"WriteStream",{get:function(){return T},set:function(A){T=A},enumerable:!0,configurable:!0});var M=V;Object.defineProperty(D,"FileReadStream",{get:function(){return M},set:function(A){M=A},enumerable:!0,configurable:!0});var W=T;Object.defineProperty(D,"FileWriteStream",{get:function(){return W},set:function(A){W=A},enumerable:!0,configurable:!0});function V(A,z){if(this instanceof V)return K.apply(this,arguments),this;else return V.apply(Object.create(V.prototype),arguments)}function L(){var A=this;_D(A.path,A.flags,A.mode,function(z,P){if(z){if(A.autoClose)A.destroy();A.emit("error",z)}else A.fd=P,A.emit("open",P),A.read()})}function T(A,z){if(this instanceof T)return Q.apply(this,arguments),this;else return T.apply(Object.create(T.prototype),arguments)}function S(){var A=this;_D(A.path,A.flags,A.mode,function(z,P){if(z)A.destroy(),A.emit("error",z);else A.fd=P,A.emit("open",P)})}function j(A,z){return new D.ReadStream(A,z)}function v(A,z){return new D.WriteStream(A,z)}var DD=D.open;D.open=_D;function _D(A,z,P,c){if(typeof P==="function")c=P,P=null;return t(A,z,P,c);function t(uD,i,s,g,BD){return DD(uD,i,s,function(p,bF){if(p&&(p.code==="EMFILE"||p.code==="ENFILE"))O0([t,[uD,i,s,g],p,BD||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}return D}function O0(D){K0("ENQUEUE",D[0].name,D[1]),a[ED].push(D),q8()}var z2;function g_(){var D=Date.now();for(var _=0;_<a[ED].length;++_)if(a[ED][_].length>2)a[ED][_][3]=D,a[ED][_][4]=D;q8()}function q8(){if(clearTimeout(z2),z2=void 0,a[ED].length===0)return;var D=a[ED].shift(),_=D[0],u=D[1],F=D[2],B=D[3],E=D[4];if(B===void 0)K0("RETRY",_.name,u),_.apply(null,u);else if(Date.now()-B>=60000){K0("TIMEOUT",_.name,u);var C=u.pop();if(typeof C==="function")C.call(null,F)}else{var $=Date.now()-E,q=Math.max(E-B,1),X=Math.min(q*1.2,100);if($>=X)K0("RETRY",_.name,u),_.apply(null,u.concat([B]));else a[ED].push(D)}if(z2===void 0)z2=setTimeout(q8,0)}});var w6=N((u$,Y6)=>{class z6{constructor(D,_,u){this.etaBufferLength=D||100,this.valueBuffer=[u],this.timeBuffer=[_],this.eta="0"}update(D,_,u){this.valueBuffer.push(_),this.timeBuffer.push(D),this.calculate(u-_)}getTime(){return this.eta}calculate(D){let _=this.valueBuffer.length,u=Math.min(this.etaBufferLength,_),F=this.valueBuffer[_-1]-this.valueBuffer[_-u],B=this.timeBuffer[_-1]-this.timeBuffer[_-u],E=F/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}}Y6.exports=z6});var T8=N((F$,S6)=>{var W0=require("readline");class x6{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;W0.cursorTo(this.stream,D,_)}cursorRelative(D=null,_=null){if(!this.stream.isTTY)return;this.dy=this.dy+_,W0.moveCursor(this.stream,D,_)}cursorRelativeReset(){if(!this.stream.isTTY)return;W0.moveCursor(this.stream,0,-this.dy),W0.cursorTo(this.stream,0,null),this.dy=0}clearRight(){if(!this.stream.isTTY)return;W0.clearLine(this.stream,1)}clearLine(){if(!this.stream.isTTY)return;W0.clearLine(this.stream,0)}clearBottom(){if(!this.stream.isTTY)return;W0.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)}}S6.exports=x6});var j8=N((B$,y6)=>{y6.exports=function D(_,u,F){if(u.autopadding!==!0)return _;function B(E,C){return(u.autopaddingChar+E).slice(-C)}switch(F){case"percentage":return B(_,3);default:return _}}});var O8=N((E$,k6)=>{k6.exports=function D(_,u){let F=Math.round(_*u.barsize),B=u.barsize-F;return u.barCompleteString.substr(0,F)+u.barGlue+u.barIncompleteString.substr(0,B)}});var P8=N((C$,v6)=>{v6.exports=function D(_,u,F){function B(C){if(F)return F*Math.round(C/F);else return C}function E(C){return(u.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 z8=N(($$,b6)=>{var h7=l3(),m7=j8(),d7=O8(),g7=P8();b6.exports=function D(_,u,F){let B=_.format,E=_.formatTime||g7,C=_.formatValue||m7,$=_.formatBar||d7,q=Math.floor(u.progress*100)+"",X=u.stopTime||Date.now(),G=Math.round((X-u.startTime)/1000),Z=Object.assign({},F,{bar:$(u.progress,_),percentage:C(q,_,"percentage"),total:C(u.total,_,"total"),value:C(u.value,_,"value"),eta:C(u.eta,_,"eta"),eta_formatted:E(u.eta,_,5),duration:C(G,_,"duration"),duration_formatted:E(G,_,1)});B=B.replace(/\{(\w+)\}/g,function(Q,M){if(typeof Z[M]!=="undefined")return Z[M];return Q});let J=Math.max(0,u.maxWidth-h7(B)-2),K=Math.floor(J/2);switch(_.align){case"right":B=J>0?" ".repeat(J)+B:B;break;case"center":B=K>0?" ".repeat(K)+B:B;break;case"left":default:break}return B}});var g2=N((G$,h6)=>{function m(D,_){if(typeof D==="undefined"||D===null)return _;else return D}h6.exports={parse:function D(_,u){let F={},B=Object.assign({},u,_);return F.throttleTime=1000/m(B.fps,10),F.stream=m(B.stream,process.stderr),F.terminal=m(B.terminal,null),F.clearOnComplete=m(B.clearOnComplete,!1),F.stopOnComplete=m(B.stopOnComplete,!1),F.barsize=m(B.barsize,40),F.align=m(B.align,"left"),F.hideCursor=m(B.hideCursor,!1),F.linewrap=m(B.linewrap,!1),F.barGlue=m(B.barGlue,""),F.barCompleteChar=m(B.barCompleteChar,"="),F.barIncompleteChar=m(B.barIncompleteChar,"-"),F.format=m(B.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),F.formatTime=m(B.formatTime,null),F.formatValue=m(B.formatValue,null),F.formatBar=m(B.formatBar,null),F.etaBufferLength=m(B.etaBuffer,10),F.etaAsynchronousUpdate=m(B.etaAsynchronousUpdate,!1),F.progressCalculationRelative=m(B.progressCalculationRelative,!1),F.synchronousUpdate=m(B.synchronousUpdate,!0),F.noTTYOutput=m(B.noTTYOutput,!1),F.notTTYSchedule=m(B.notTTYSchedule,2000),F.emptyOnZero=m(B.emptyOnZero,!1),F.forceRedraw=m(B.forceRedraw,!1),F.autopadding=m(B.autopadding,!1),F.gracefulExit=m(B.gracefulExit,!1),F},assignDerivedOptions:function D(_){return _.barCompleteString=_.barCompleteChar.repeat(_.barsize+1),_.barIncompleteString=_.barIncompleteChar.repeat(_.barsize+1),_.autopaddingChar=_.autopadding?m(_.autopaddingChar," "):"",_}}});var Y8=N((q$,d6)=>{var m6=w6(),f7=T8(),c7=z8(),p7=g2(),l7=require("events");d6.exports=class D extends l7{constructor(_){super();this.options=p7.assignDerivedOptions(_),this.terminal=this.options.terminal?this.options.terminal:new f7(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 m6(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format==="function"?this.options.format:c7}render(_=!1){let u={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 F=this.formatter(this.options,u,this.payload);if(_||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=F)this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(F),this.terminal.clearRight(),this.lastDrawnString=F,this.lastRedraw=Date.now(),this.emit("redraw-post")}start(_,u,F){this.value=u||0,this.total=typeof _!=="undefined"&&_>=0?_:100,this.startValue=u||0,this.payload=F||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new m6(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",_,u)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(_,u={}){if(typeof _==="number")this.value=_,this.eta.update(Date.now(),_,this.total);let F=(typeof _==="object"?_:u)||{};this.emit("update",this.total,this.value);for(let B in F)this.payload[B]=F[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,u={}){if(typeof _==="object")this.update(this.value+1,_);else this.update(this.value+_,u)}getTotal(){return this.total}setTotal(_){if(typeof _!=="undefined"&&_>=0)this.total=_}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var f6=N((X$,g6)=>{var i7=Y8(),n7=g2();g6.exports=class D extends i7{constructor(_,u){super(n7.parse(_,u));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(_,u){if(!this.timer)return;if(super.update(_,u),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now())this.render()}start(_,u,F){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(_,u,F),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 p6=N((Z$,c6)=>{var a7=T8(),s7=Y8(),r7=g2(),o7=require("events");c6.exports=class D extends o7{constructor(_,u){super();this.bars=[],this.options=r7.parse(_,u),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new a7(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(_,u,F,B={}){let E=new s7(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(_,u,F),this.emit("start"),E}remove(_){let u=this.bars.indexOf(_);if(u<0)return!1;return this.bars.splice(u,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 i6=N((J$,l6)=>{l6.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var a6=N((Q$,n6)=>{n6.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"█",barIncompleteChar:"░"}});var r6=N((K$,s6)=>{s6.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"█",barIncompleteChar:"░"}});var t6=N((U$,o6)=>{o6.exports={format:" {bar}■ {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"■",barIncompleteChar:" "}});var D5=N((H$,e6)=>{var t7=i6(),e7=a6(),Du=r6(),_u=t6();e6.exports={legacy:t7,shades_classic:e7,shades_grey:Du,rect:_u}});var F5=N((M$,u5)=>{var _5=f6(),uu=p6(),Fu=D5(),Bu=z8(),Eu=j8(),Cu=O8(),$u=P8();u5.exports={Bar:_5,SingleBar:_5,MultiBar:uu,Presets:Fu,Format:{Formatter:Bu,BarFormat:Cu,ValueFormat:Eu,TimeFormat:$u}}});var x8=N((R$,q5)=>{/*! arch. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var $5=require("child_process"),G5=require("fs"),Zu=require("path");q5.exports=function D(){if(process.arch==="x64")return"x64";if(process.platform==="darwin"){var _=process.arch==="arm64",u=$5.execSync("sysctl -in sysctl.proc_translated",{encoding:"utf8"})===`1
36
- `;return _||u?"arm64":"x64"}if(process.platform==="win32"){var F=!1;try{F=!!(process.env.SYSTEMROOT&&G5.statSync(process.env.SYSTEMROOT))}catch($){}var B=F?process.env.SYSTEMROOT:"C:\\Windows",E=!1;try{E=!!G5.statSync(Zu.join(B,"sysnative"))}catch($){}return E?"x64":"x86"}if(process.platform==="linux"){var C=$5.execSync("getconf LONG_BIT",{encoding:"utf8"});return C===`64
37
- `?"x64":"x86"}return"x86"}});var H5=N((T$,U5)=>{function Ju(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}var Qu=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function K5(D){if(Buffer.isBuffer(D))return D;if(typeof D==="number")return Buffer.alloc(D);else if(typeof D==="string")return Buffer.from(D);else throw new Error("input must be buffer, number, or string, received "+typeof D)}function Ku(D){let _=K5(4);return _.writeInt32BE(D,0),_}function S8(D,_){if(D=K5(D),Buffer.isBuffer(_))_=_.readUInt32BE(0);let u=~~_^-1;for(var F=0;F<D.length;F++)u=Qu[(u^D[F])&255]^u>>>8;return u^-1}function y8(){return Ku(S8.apply(null,arguments))}y8.signed=function(){return S8.apply(null,arguments)};y8.unsigned=function(){return S8.apply(null,arguments)>>>0};var Uu=y8,Hu=Ju(Uu);U5.exports=Hu});var y5=N((g8)=>{var M5=require("fs"),a2=require("stream").Transform,V5=require("stream").PassThrough,L5=require("zlib"),m8=require("util"),Mu=require("events").EventEmitter,Wu=require("events").errorMonitor,I5=H5();g8.ZipFile=_0;g8.dateToDosDateTime=S5;m8.inherits(_0,Mu);function _0(){this.outputStream=new V5,this.entries=[],this.outputStreamCursor=0,this.ended=!1,this.allDone=!1,this.forceZip64Eocd=!1,this.errored=!1,this.on(Wu,function(){this.errored=!0})}_0.prototype.addFile=function(D,_,u){var F=this;if(_=r2(_,!1),u==null)u={};if(s2(F))return;var B=new d(_,!1,u);F.entries.push(B),M5.stat(D,function(E,C){if(E)return F.emit("error",E);if(!C.isFile())return F.emit("error",new Error("not a file: "+D));if(B.uncompressedSize=C.size,u.mtime==null)B.setLastModDate(C.mtime);if(u.mode==null)B.setFileAttributesMode(C.mode);B.setFileDataPumpFunction(function(){var $=M5.createReadStream(D);B.state=d.FILE_DATA_IN_PROGRESS,$.on("error",function(q){F.emit("error",q)}),R5(F,B,$)}),D0(F)})};_0.prototype.addReadStream=function(D,_,u){this.addReadStreamLazy(_,u,function(F){F(null,D)})};_0.prototype.addReadStreamLazy=function(D,_,u){var F=this;if(typeof _==="function")u=_,_=null;if(_==null)_={};if(D=r2(D,!1),s2(F))return;var B=new d(D,!1,_);F.entries.push(B),B.setFileDataPumpFunction(function(){B.state=d.FILE_DATA_IN_PROGRESS,u(function(E,C){if(E)return F.emit("error",E);R5(F,B,C)})}),D0(F)};_0.prototype.addBuffer=function(D,_,u){var F=this;if(_=r2(_,!1),D.length>1073741823)throw new Error("buffer too large: "+D.length+" > 1073741823");if(u==null)u={};if(u.size!=null)throw new Error("options.size not allowed");if(s2(F))return;var B=new d(_,!1,u);if(B.uncompressedSize=D.length,B.crc32=I5.unsigned(D),B.crcAndFileSizeKnown=!0,F.entries.push(B),B.compressionLevel===0)E(D);else L5.deflateRaw(D,{level:B.compressionLevel},function(C,$){E($)});function E(C){B.compressedSize=C.length,B.setFileDataPumpFunction(function(){A0(F,C),A0(F,B.getDataDescriptor()),B.state=d.FILE_DATA_DONE,setImmediate(function(){D0(F)})}),D0(F)}};_0.prototype.addEmptyDirectory=function(D,_){var u=this;if(D=r2(D,!0),_==null)_={};if(_.size!=null)throw new Error("options.size not allowed");if(_.compress!=null)throw new Error("options.compress not allowed");if(_.compressionLevel!=null)throw new Error("options.compressionLevel not allowed");if(s2(u))return;var F=new d(D,!0,_);u.entries.push(F),F.setFileDataPumpFunction(function(){A0(u,F.getDataDescriptor()),F.state=d.FILE_DATA_DONE,D0(u)}),D0(u)};var Au=eD([80,75,5,6]);_0.prototype.end=function(D,_){if(typeof D==="function")_=D,D=null;if(D==null)D={};if(this.ended)return;if(this.ended=!0,this.errored)return;if(this.calculatedTotalSizeCallback=_,this.forceZip64Eocd=!!D.forceZip64Format,D.comment){if(typeof D.comment==="string")this.comment=Ru(D.comment);else this.comment=D.comment;if(this.comment.length>65535)throw new Error("comment is too large");if(D2(this.comment,Au))throw new Error("comment contains end of central directory record signature")}else this.comment=_2;D0(this)};function A0(D,_){D.outputStream.write(_),D.outputStreamCursor+=_.length}function R5(D,_,u){var F=new d8,B=new n2,E=_.compressionLevel!==0?new L5.DeflateRaw({level:_.compressionLevel}):new V5,C=new n2;u.pipe(F).pipe(B).pipe(E).pipe(C).pipe(D.outputStream,{end:!1}),C.on("end",function(){if(_.crc32=F.crc32,_.uncompressedSize==null)_.uncompressedSize=B.byteCount;else if(_.uncompressedSize!==B.byteCount)return D.emit("error",new Error("file data stream has unexpected number of bytes"));_.compressedSize=C.byteCount,D.outputStreamCursor+=_.compressedSize,A0(D,_.getDataDescriptor()),_.state=d.FILE_DATA_DONE,D0(D)})}function Vu(D){if(D.compress!=null&&D.compressionLevel!=null){if(!!D.compress!==!!D.compressionLevel)throw new Error("conflicting settings for compress and compressionLevel")}if(D.compressionLevel!=null)return D.compressionLevel;if(D.compress===!1)return 0;return 6}function D0(D){if(D.allDone||D.errored)return;if(D.ended&&D.calculatedTotalSizeCallback!=null){var _=Lu(D);if(_!=null)D.calculatedTotalSizeCallback(_),D.calculatedTotalSizeCallback=null}var u=F();function F(){for(var E=0;E<D.entries.length;E++){var C=D.entries[E];if(C.state<d.FILE_DATA_DONE)return C}return null}if(u!=null){if(u.state<d.READY_TO_PUMP_FILE_DATA)return;if(u.state===d.FILE_DATA_IN_PROGRESS)return;u.relativeOffsetOfLocalHeader=D.outputStreamCursor;var B=u.getLocalFileHeader();A0(D,B),u.doFileDataPump()}else if(D.ended)D.offsetOfStartOfCentralDirectory=D.outputStreamCursor,D.entries.forEach(function(E){var C=E.getCentralDirectoryRecord();A0(D,C)}),A0(D,Iu(D)),D.outputStream.end(),D.allDone=!0}function Lu(D){var _=0,u=0;for(var F=0;F<D.entries.length;F++){var B=D.entries[F];if(B.compressionLevel!==0)return-1;if(B.state>=d.READY_TO_PUMP_FILE_DATA){if(B.uncompressedSize==null)return-1}else if(B.uncompressedSize==null)return null;B.relativeOffsetOfLocalHeader=_;var E=B.useZip64Format();if(_+=N5+B.utf8FileName.length,_+=B.uncompressedSize,!B.crcAndFileSizeKnown)if(E)_+=w5;else _+=Y5;if(u+=x5+B.utf8FileName.length+B.fileComment.length,!B.forceDosTimestamp)u+=v8;if(E)u+=b8}var C=0;if(D.forceZip64Eocd||D.entries.length>=65535||u>=65535||_>=4294967295)C+=l2+k8;return C+=i2+D.comment.length,_+u+C}function s2(D){if(D.ended)throw new Error("cannot add entries after calling end()");if(D.errored)return!0;return!1}var l2=56,k8=20,i2=22;function Iu(D,_){var u=!1,F=D.entries.length;if(D.forceZip64Eocd||D.entries.length>=65535)F=65535,u=!0;var B=D.outputStreamCursor-D.offsetOfStartOfCentralDirectory,E=B;if(D.forceZip64Eocd||B>=4294967295)E=4294967295,u=!0;var C=D.offsetOfStartOfCentralDirectory;if(D.forceZip64Eocd||D.offsetOfStartOfCentralDirectory>=4294967295)C=4294967295,u=!0;if(_)if(u)return l2+k8+i2;else return i2;var $=qD(i2+D.comment.length);if($.writeUInt32LE(101010256,0),$.writeUInt16LE(0,4),$.writeUInt16LE(0,6),$.writeUInt16LE(F,8),$.writeUInt16LE(F,10),$.writeUInt32LE(E,12),$.writeUInt32LE(C,16),$.writeUInt16LE(D.comment.length,20),D.comment.copy($,22),!u)return $;var q=qD(l2);q.writeUInt32LE(101075792,0),ID(q,l2-12,4),q.writeUInt16LE(O5,12),q.writeUInt16LE(j5,14),q.writeUInt32LE(0,16),q.writeUInt32LE(0,20),ID(q,D.entries.length,24),ID(q,D.entries.length,32),ID(q,B,40),ID(q,D.offsetOfStartOfCentralDirectory,48);var X=qD(k8);return X.writeUInt32LE(117853008,0),X.writeUInt32LE(0,4),ID(X,D.outputStreamCursor,8),X.writeUInt32LE(1,16),Buffer.concat([q,X,$])}function r2(D,_){if(D==="")throw new Error("empty metadataPath");if(D=D.replace(/\\/g,"/"),/^[a-zA-Z]:/.test(D)||/^\//.test(D))throw new Error("absolute path: "+D);if(D.split("/").indexOf("..")!==-1)throw new Error("invalid relative path: "+D);var u=/\/$/.test(D);if(_){if(!u)D+="/"}else if(u)throw new Error("file path cannot end with '/': "+D);return D}var _2=qD(0);function d(D,_,u){if(this.utf8FileName=eD(D),this.utf8FileName.length>65535)throw new Error("utf8 file name too long. "+utf8FileName.length+" > 65535");if(this.isDirectory=_,this.state=d.WAITING_FOR_METADATA,this.setLastModDate(u.mtime!=null?u.mtime:new Date),this.forceDosTimestamp=!!u.forceDosTimestamp,u.mode!=null)this.setFileAttributesMode(u.mode);else this.setFileAttributesMode(_?16893:33204);if(_)this.crcAndFileSizeKnown=!0,this.crc32=0,this.uncompressedSize=0,this.compressedSize=0;else if(this.crcAndFileSizeKnown=!1,this.crc32=null,this.uncompressedSize=null,this.compressedSize=null,u.size!=null)this.uncompressedSize=u.size;if(_)this.compressionLevel=0;else this.compressionLevel=Vu(u);if(this.forceZip64Format=!!u.forceZip64Format,u.fileComment){if(typeof u.fileComment==="string")this.fileComment=eD(u.fileComment,"utf-8");else this.fileComment=u.fileComment;if(this.fileComment.length>65535)throw new Error("fileComment is too large")}else this.fileComment=_2}d.WAITING_FOR_METADATA=0;d.READY_TO_PUMP_FILE_DATA=1;d.FILE_DATA_IN_PROGRESS=2;d.FILE_DATA_DONE=3;d.prototype.setLastModDate=function(D){this.mtime=D;var _=S5(D);this.lastModFileTime=_.time,this.lastModFileDate=_.date};d.prototype.setFileAttributesMode=function(D){if((D&65535)!==D)throw new Error("invalid mode. expected: 0 <= "+D+" <= 65535");this.externalFileAttributes=D<<16>>>0};d.prototype.setFileDataPumpFunction=function(D){this.doFileDataPump=D,this.state=d.READY_TO_PUMP_FILE_DATA};d.prototype.useZip64Format=function(){return this.forceZip64Format||this.uncompressedSize!=null&&this.uncompressedSize>4294967294||this.compressedSize!=null&&this.compressedSize>4294967294||this.relativeOffsetOfLocalHeader!=null&&this.relativeOffsetOfLocalHeader>4294967294};var N5=30,T5=20,j5=45,O5=831,P5=2048,z5=8;d.prototype.getLocalFileHeader=function(){var D=0,_=0,u=0;if(this.crcAndFileSizeKnown)D=this.crc32,_=this.compressedSize,u=this.uncompressedSize;var F=qD(N5),B=P5;if(!this.crcAndFileSizeKnown)B|=z5;return F.writeUInt32LE(67324752,0),F.writeUInt16LE(T5,4),F.writeUInt16LE(B,6),F.writeUInt16LE(this.getCompressionMethod(),8),F.writeUInt16LE(this.lastModFileTime,10),F.writeUInt16LE(this.lastModFileDate,12),F.writeUInt32LE(D,14),F.writeUInt32LE(_,18),F.writeUInt32LE(u,22),F.writeUInt16LE(this.utf8FileName.length,26),F.writeUInt16LE(0,28),Buffer.concat([F,this.utf8FileName])};var Y5=16,w5=24;d.prototype.getDataDescriptor=function(){if(this.crcAndFileSizeKnown)return _2;if(!this.useZip64Format()){var D=qD(Y5);return D.writeUInt32LE(134695760,0),D.writeUInt32LE(this.crc32,4),D.writeUInt32LE(this.compressedSize,8),D.writeUInt32LE(this.uncompressedSize,12),D}else{var D=qD(w5);return D.writeUInt32LE(134695760,0),D.writeUInt32LE(this.crc32,4),ID(D,this.compressedSize,8),ID(D,this.uncompressedSize,16),D}};var x5=46,v8=9,b8=28;d.prototype.getCentralDirectoryRecord=function(){var D=qD(x5),_=P5;if(!this.crcAndFileSizeKnown)_|=z5;var u=_2;if(!this.forceDosTimestamp){u=qD(v8),u.writeUInt16LE(21589,0),u.writeUInt16LE(v8-4,2);var F=1,B=2;u.writeUInt8(F|B,4);var E=Math.floor(this.mtime.getTime()/1000);if(E<-2147483648)E=-2147483648;if(E>2147483647)E=2147483647;u.writeUInt32LE(E,5)}var C=this.compressedSize,$=this.uncompressedSize,q=this.relativeOffsetOfLocalHeader,X=T5,G=_2;if(this.useZip64Format())C=4294967295,$=4294967295,q=4294967295,X=j5,G=qD(b8),G.writeUInt16LE(1,0),G.writeUInt16LE(b8-4,2),ID(G,this.uncompressedSize,4),ID(G,this.compressedSize,12),ID(G,this.relativeOffsetOfLocalHeader,20);return D.writeUInt32LE(33639248,0),D.writeUInt16LE(O5,4),D.writeUInt16LE(X,6),D.writeUInt16LE(_,8),D.writeUInt16LE(this.getCompressionMethod(),10),D.writeUInt16LE(this.lastModFileTime,12),D.writeUInt16LE(this.lastModFileDate,14),D.writeUInt32LE(this.crc32,16),D.writeUInt32LE(C,20),D.writeUInt32LE($,24),D.writeUInt16LE(this.utf8FileName.length,28),D.writeUInt16LE(u.length+G.length,30),D.writeUInt16LE(this.fileComment.length,32),D.writeUInt16LE(0,34),D.writeUInt16LE(0,36),D.writeUInt32LE(this.externalFileAttributes,38),D.writeUInt32LE(q,42),Buffer.concat([D,this.utf8FileName,u,G,this.fileComment])};d.prototype.getCompressionMethod=function(){var D=0,_=8;return this.compressionLevel===0?D:_};var W5=new Date(1980,0,1),A5=new Date(2107,11,31,23,59,58);function S5(D){if(D<W5)D=W5;else if(D>A5)D=A5;var _=0;_|=D.getDate()&31,_|=(D.getMonth()+1&15)<<5,_|=(D.getFullYear()-1980&127)<<9;var u=0;return u|=Math.floor(D.getSeconds()/2),u|=(D.getMinutes()&63)<<5,u|=(D.getHours()&31)<<11,{date:_,time:u}}function ID(D,_,u){var F=Math.floor(_/4294967296),B=_%4294967296;D.writeUInt32LE(B,u),D.writeUInt32LE(F,u+4)}m8.inherits(n2,a2);function n2(D){a2.call(this,D),this.byteCount=0}n2.prototype._transform=function(D,_,u){this.byteCount+=D.length,u(null,D)};m8.inherits(d8,a2);function d8(D){a2.call(this,D),this.crc32=0}d8.prototype._transform=function(D,_,u){this.crc32=I5.unsigned(D,this.crc32),u(null,D)};var h8="\x00☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ";if(h8.length!==256)throw new Error("assertion failure");var p2=null;function Ru(D){if(/^[\x20-\x7e]*$/.test(D))return eD(D,"utf-8");if(p2==null){p2={};for(var _=0;_<h8.length;_++)p2[h8[_]]=_}var u=qD(D.length);for(var _=0;_<D.length;_++){var F=p2[D[_]];if(F==null)throw new Error("character not encodable in CP437: "+JSON.stringify(D[_]));u[_]=F}return u}function qD(D){qD=_;try{return qD(D)}catch(F){return qD=u,qD(D)}function _(F){return Buffer.allocUnsafe(F)}function u(F){return new Buffer(F)}}function eD(D,_){eD=u;try{return eD(D,_)}catch(B){return eD=F,eD(D,_)}function u(B,E){return Buffer.from(B,E)}function F(B,E){return new Buffer(B,E)}}function D2(D,_){D2=u;try{return D2(D,_)}catch(B){return D2=F,D2(D,_)}function u(B,E){return B.includes(E)}function F(B,E){for(var C=0;C<=B.length-E.length;C++)for(var $=0;;$++){if($===E.length)return!0;if(B[C+$]!==E[$])break}return!1}}});var o2=N((QD)=>{Object.defineProperty(QD,"__esModule",{value:!0});QD.unlink=Nu;QD.mkdir=Tu;QD.realpath=ju;QD.stat=Ou;QD.lstat=Pu;QD.chmod=zu;QD.readdir=Yu;QD.access=wu;QD.rmdir=xu;QD.symlink=Su;QD.readlink=yu;var RD=require("fs"),ND=require("util");function Nu(D){return ND.promisify(RD.unlink)(D)}function Tu(D,_){return ND.promisify(RD.mkdir)(D,_)}function ju(D){return ND.promisify(RD.realpath)(D)}function Ou(D){return ND.promisify(RD.stat)(D)}function Pu(D){return ND.promisify(RD.lstat)(D)}function zu(D,_){return ND.promisify(RD.chmod)(D,_)}function Yu(D){return ND.promisify(RD.readdir)(D)}function wu(D,_){return ND.promisify(RD.access)(D,_)}function xu(D){return ND.promisify(RD.rmdir)(D)}function Su(D,_,u){return ND.promisify(RD.symlink)(D,_,u)}function yu(D){return ND.promisify(RD.readlink)(D)}});var f8=N((u0)=>{Object.defineProperty(u0,"__esModule",{value:!0});u0.readdirp=v5;u0.getFileEntry=b5;u0.ensureFolder=h5;u0.pathExists=ku;u0.rimraf=m5;u0.isRootPath=d5;var t2=require("path"),TD=o2();async function v5(D){let _=[],u=await TD.readdir(D);for(let F of u){let B=t2.join(D,F),E=await b5(B);if(!E.isSymbolicLink&&E.type==="dir"){let C=await v5(B);if(C.length>0){_.push(...C);continue}}_.push(E)}return _}async function b5(D){let _=await TD.lstat(D),u=!1,F="file";if(_.isDirectory())F="dir";else if(_.isSymbolicLink()){if(u=!0,(await TD.stat(D)).isDirectory())F="dir"}return{path:D,isSymbolicLink:u,type:F,mtime:_.mtime,mode:_.mode}}async function h5(D){if(D===t2.dirname(D))return Promise.resolve();try{await k5(D)}catch(_){if(_.code==="ENOENT")return await h5(t2.dirname(D)),k5(D);return Promise.reject(_)}}async function ku(D){try{return await TD.access(D),!0}catch(_){return!1}}async function m5(D){if(d5(D))return Promise.reject(new Error(`Refuse to recursively delete root, path: "${D}"`));try{let _=await TD.lstat(D);if(_.isDirectory()&&!_.isSymbolicLink()){let u=await TD.readdir(D);await Promise.all(u.map((F)=>m5(t2.join(D,F)))),await TD.rmdir(D)}else{let u=_.mode;if(!(u&128))await TD.chmod(D,u|128);return TD.unlink(D)}}catch(_){if(_.code!=="ENOENT")throw _}}async function k5(D){try{await TD.mkdir(D,511)}catch(_){if(_.code==="ENOENT")return Promise.reject(_);try{if(!(await TD.stat(D)).isDirectory())return Promise.reject(new Error(`"${D}" exists and is not a directory.`))}catch(u){throw _}}}var vu=65,bu=90,hu=97,mu=122,du=58,gu=92,fu=47;function cu(D){return D>=vu&&D<=bu||D>=hu&&D<=mu}var pu="\\",lu="/";function d5(D){if(!D)return!1;if(D===pu||D===lu)return!0;if(process.platform==="win32"){if(D.length>3)return!1;return cu(D.charCodeAt(0))&&D.charCodeAt(1)===du&&(D.length===2||D.charCodeAt(2)===gu||D.charCodeAt(2)===fu)}return!1}});var c8=N((S0)=>{Object.defineProperty(S0,"__esModule",{value:!0});S0.Cancelable=S0.CancellationToken=void 0;class g5{constructor(){this._isCancelled=!1,this._callbacks=new Set}get isCancelled(){return this._isCancelled}onCancelled(D){if(this.isCancelled)return D(),()=>{};return this._callbacks.add(D),()=>this._callbacks.delete(D)}cancel(){if(this._isCancelled)return;this._isCancelled=!0,this._callbacks.forEach((D)=>D()),this._callbacks.clear()}}S0.CancellationToken=g5;class f5{wrapError(D,_){if(_)return this.canceledError();return D}canceledError(){let D=new Error("Canceled");return D.name=D.message,D}}S0.Cancelable=f5});var l8=N((D3)=>{Object.defineProperty(D3,"__esModule",{value:!0});D3.Zip=void 0;var iu=y5(),c5=require("fs"),p8=f8(),e2=require("path"),p5=o2(),l5=c8();class i5 extends l5.Cancelable{constructor(D){super();this.options=D,this.isPipe=!1,this.zipFiles=[],this.zipFolders=[]}addFile(D,_){let u=_;if(!u)u=e2.basename(D);this.zipFiles.push({path:D,metadataPath:u})}addFolder(D,_){this.zipFolders.push({path:D,metadataPath:_})}async archive(D){if(!D)return Promise.reject(new Error("zipPath must not be empty"));let _=new l5.CancellationToken;return this.token=_,this.isPipe=!1,await p8.ensureFolder(e2.dirname(D)),this.yazlFile=new iu.ZipFile,new Promise(async(u,F)=>{this.yazlFile.once("error",(E)=>{F(this.wrapError(E,_.isCancelled))});let B=this.yazlFile;if(!_.isCancelled)this.zipStream=c5.createWriteStream(D),this.zipStream.once("error",(E)=>{F(this.wrapError(E,_.isCancelled))}),this.zipStream.once("close",()=>{if(_.isCancelled)F(this.canceledError());else u(void 0)}),B.outputStream.once("error",(E)=>{F(this.wrapError(E,_.isCancelled))}),B.outputStream.pipe(this.zipStream),this.isPipe=!0;try{let E=this.zipFiles;for(let C of E){let $=await p8.getFileEntry(C.path);await this.addEntry(B,$,C,_)}if(this.zipFolders.length>0)await this.walkDir(this.zipFolders,_)}catch(E){F(this.wrapError(E,_.isCancelled));return}B.end()})}cancel(){if(this.token)this.token.cancel(),this.token=null;this.stopPipe(this.canceledError())}async addEntry(D,_,u,F){if(_.isSymbolicLink)if(this.followSymlink())if(_.type==="dir"){let B=await p5.realpath(u.path);await this.walkDir([{path:B,metadataPath:u.metadataPath}],F)}else D.addFile(u.path,u.metadataPath,this.getYazlOption());else await this.addSymlink(D,_,u.metadataPath);else if(_.type==="dir")D.addEmptyDirectory(u.metadataPath,{mtime:_.mtime,mode:_.mode});else await this.addFileStream(D,_,u.metadataPath,F)}addFileStream(D,_,u,F){return new Promise((B,E)=>{let C=c5.createReadStream(_.path);C.once("error",($)=>{let q=this.wrapError($,F.isCancelled);this.stopPipe(q),E(q)}),C.once("close",()=>{B()}),D.addReadStream(C,u,Object.assign(Object.assign({},this.getYazlOption()),{mode:_.mode,mtime:_.mtime}))})}async addSymlink(D,_,u){let F=await p5.readlink(_.path);D.addBuffer(Buffer.from(F),u,Object.assign(Object.assign({},this.getYazlOption()),{mtime:_.mtime,mode:_.mode}))}async walkDir(D,_){for(let u of D){if(_.isCancelled)return;let F=await p8.readdirp(u.path);if(F.length>0)for(let B of F){if(_.isCancelled)return;let E=e2.relative(u.path,B.path),C=u.metadataPath?e2.join(u.metadataPath,E):E;await this.addEntry(this.yazlFile,B,{path:B.path,metadataPath:C},_)}else if(u.metadataPath)this.yazlFile.addEmptyDirectory(u.metadataPath)}}stopPipe(D){if(this.isPipe)this.yazlFile.outputStream.unpipe(this.zipStream),this.zipStream.destroy(D),this.isPipe=!1}followSymlink(){let D=!1;if(this.options&&this.options.followSymlinks===!0)D=!0;return D}getYazlOption(){if(!this.options)return;if(typeof this.options.compressionLevel!=="number")return;return{compressionLevel:this.options.compressionLevel}}}D3.Zip=i5});var r5=N((w$,s5)=>{s5.exports=_3;function _3(){this.pending=0,this.max=1/0,this.listeners=[],this.waiting=[],this.error=null}_3.prototype.go=function(D){if(this.pending<this.max)a5(this,D);else this.waiting.push(D)};_3.prototype.wait=function(D){if(this.pending===0)D(this.error);else this.listeners.push(D)};_3.prototype.hold=function(){return n5(this)};function n5(D){D.pending+=1;var _=!1;return u;function u(B){if(_)throw new Error("callback called twice");if(_=!0,D.error=D.error||B,D.pending-=1,D.waiting.length>0&&D.pending<D.max)a5(D,D.waiting.shift());else if(D.pending===0){var E=D.listeners;D.listeners=[],E.forEach(F)}}function F(B){B(D.error)}}function a5(D,_){_(n5(D))}});var t5=N((F2)=>{var u2=require("fs"),u3=require("util"),i8=require("stream"),o5=i8.Readable,n8=i8.Writable,nu=i8.PassThrough,au=r5(),F3=require("events").EventEmitter;F2.createFromBuffer=su;F2.createFromFd=ru;F2.BufferSlicer=cD;F2.FdSlicer=fD;u3.inherits(fD,F3);function fD(D,_){_=_||{},F3.call(this),this.fd=D,this.pend=new au,this.pend.max=1,this.refCount=0,this.autoClose=!!_.autoClose}fD.prototype.read=function(D,_,u,F,B){var E=this;E.pend.go(function(C){u2.read(E.fd,D,_,u,F,function($,q,X){C(),B($,q,X)})})};fD.prototype.write=function(D,_,u,F,B){var E=this;E.pend.go(function(C){u2.write(E.fd,D,_,u,F,function($,q,X){C(),B($,q,X)})})};fD.prototype.createReadStream=function(D){return new B3(this,D)};fD.prototype.createWriteStream=function(D){return new E3(this,D)};fD.prototype.ref=function(){this.refCount+=1};fD.prototype.unref=function(){var D=this;if(D.refCount-=1,D.refCount>0)return;if(D.refCount<0)throw new Error("invalid unref");if(D.autoClose)u2.close(D.fd,_);function _(u){if(u)D.emit("error",u);else D.emit("close")}};u3.inherits(B3,o5);function B3(D,_){_=_||{},o5.call(this,_),this.context=D,this.context.ref(),this.start=_.start||0,this.endOffset=_.end,this.pos=this.start,this.destroyed=!1}B3.prototype._read=function(D){var _=this;if(_.destroyed)return;var u=Math.min(_._readableState.highWaterMark,D);if(_.endOffset!=null)u=Math.min(u,_.endOffset-_.pos);if(u<=0){_.destroyed=!0,_.push(null),_.context.unref();return}_.context.pend.go(function(F){if(_.destroyed)return F();var B=Buffer.allocUnsafe(u);u2.read(_.context.fd,B,0,u,_.pos,function(E,C){if(E)_.destroy(E);else if(C===0)_.destroyed=!0,_.push(null),_.context.unref();else _.pos+=C,_.push(B.slice(0,C));F()})})};B3.prototype.destroy=function(D){if(this.destroyed)return;D=D||new Error("stream destroyed"),this.destroyed=!0,this.emit("error",D),this.context.unref()};u3.inherits(E3,n8);function E3(D,_){_=_||{},n8.call(this,_),this.context=D,this.context.ref(),this.start=_.start||0,this.endOffset=_.end==null?1/0:+_.end,this.bytesWritten=0,this.pos=this.start,this.destroyed=!1,this.on("finish",this.destroy.bind(this))}E3.prototype._write=function(D,_,u){var F=this;if(F.destroyed)return;if(F.pos+D.length>F.endOffset){var B=new Error("maximum file length exceeded");B.code="ETOOBIG",F.destroy(),u(B);return}F.context.pend.go(function(E){if(F.destroyed)return E();u2.write(F.context.fd,D,0,D.length,F.pos,function(C,$){if(C)F.destroy(),E(),u(C);else F.bytesWritten+=$,F.pos+=$,F.emit("progress"),E(),u()})})};E3.prototype.destroy=function(){if(this.destroyed)return;this.destroyed=!0,this.context.unref()};u3.inherits(cD,F3);function cD(D,_){F3.call(this),_=_||{},this.refCount=0,this.buffer=D,this.maxChunkSize=_.maxChunkSize||Number.MAX_SAFE_INTEGER}cD.prototype.read=function(D,_,u,F,B){if(!(0<=_&&_<=D.length))throw new RangeError("offset outside buffer: 0 <= "+_+" <= "+D.length);if(F<0)throw new RangeError("position is negative: "+F);if(_+u>D.length)u=D.length-_;if(F+u>this.buffer.length)u=this.buffer.length-F;if(u<=0){setImmediate(function(){B(null,0)});return}this.buffer.copy(D,_,F,F+u),setImmediate(function(){B(null,u)})};cD.prototype.write=function(D,_,u,F,B){D.copy(this.buffer,F,_,_+u),setImmediate(function(){B(null,u,D)})};cD.prototype.createReadStream=function(D){D=D||{};var _=new nu(D);_.destroyed=!1,_.start=D.start||0,_.endOffset=D.end,_.pos=_.endOffset||this.buffer.length;var u=this.buffer.slice(_.start,_.pos),F=0;while(!0){var B=F+this.maxChunkSize;if(B>=u.length){if(F<u.length)_.write(u.slice(F,u.length));break}_.write(u.slice(F,B)),F=B}return _.end(),_.destroy=function(){_.destroyed=!0},_};cD.prototype.createWriteStream=function(D){var _=this;D=D||{};var u=new n8(D);return u.start=D.start||0,u.endOffset=D.end==null?this.buffer.length:+D.end,u.bytesWritten=0,u.pos=u.start,u.destroyed=!1,u._write=function(F,B,E){if(u.destroyed)return;var C=u.pos+F.length;if(C>u.endOffset){var $=new Error("maximum file length exceeded");$.code="ETOOBIG",u.destroyed=!0,E($);return}F.copy(_.buffer,u.pos,0,F.length),u.bytesWritten+=F.length,u.pos=C,u.emit("progress"),E()},u.destroy=function(){u.destroyed=!0},u};cD.prototype.ref=function(){this.refCount+=1};cD.prototype.unref=function(){if(this.refCount-=1,this.refCount<0)throw new Error("invalid unref")};function su(D,_){return new cD(D,_)}function ru(D,_){return new fD(D,_)}});var _4=N((S$,D4)=>{var F0=require("buffer").Buffer,a8=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];if(typeof Int32Array!=="undefined")a8=new Int32Array(a8);function e5(D){if(F0.isBuffer(D))return D;var _=typeof F0.alloc==="function"&&typeof F0.from==="function";if(typeof D==="number")return _?F0.alloc(D):new F0(D);else if(typeof D==="string")return _?F0.from(D):new F0(D);else throw new Error("input must be buffer, number, or string, received "+typeof D)}function ou(D){var _=e5(4);return _.writeInt32BE(D,0),_}function s8(D,_){if(D=e5(D),F0.isBuffer(_))_=_.readUInt32BE(0);var u=~~_^-1;for(var F=0;F<D.length;F++)u=a8[(u^D[F])&255]^u>>>8;return u^-1}function r8(){return ou(s8.apply(null,arguments))}r8.signed=function(){return s8.apply(null,arguments)};r8.unsigned=function(){return s8.apply(null,arguments)>>>0};D4.exports=r8});var Z4=N((KD)=>{var o8=require("fs"),tu=require("zlib"),u4=t5(),eu=_4(),G3=require("util"),q3=require("events").EventEmitter,F4=require("stream").Transform,e8=require("stream").PassThrough,DF=require("stream").Writable;KD.open=_F;KD.fromFd=B4;KD.fromBuffer=uF;KD.fromRandomAccessReader=D1;KD.dosDateTimeToDate=$4;KD.getFileNameLowLevel=G4;KD.validateFileName=q4;KD.parseExtraFields=X4;KD.ZipFile=wD;KD.Entry=B2;KD.LocalFileHeader=C4;KD.RandomAccessReader=B0;function _F(D,_,u){if(typeof _==="function")u=_,_=null;if(_==null)_={};if(_.autoClose==null)_.autoClose=!0;if(_.lazyEntries==null)_.lazyEntries=!1;if(_.decodeStrings==null)_.decodeStrings=!0;if(_.validateEntrySizes==null)_.validateEntrySizes=!0;if(_.strictFileNames==null)_.strictFileNames=!1;if(u==null)u=$3;o8.open(D,"r",function(F,B){if(F)return u(F);B4(B,_,function(E,C){if(E)o8.close(B,$3);u(E,C)})})}function B4(D,_,u){if(typeof _==="function")u=_,_=null;if(_==null)_={};if(_.autoClose==null)_.autoClose=!1;if(_.lazyEntries==null)_.lazyEntries=!1;if(_.decodeStrings==null)_.decodeStrings=!0;if(_.validateEntrySizes==null)_.validateEntrySizes=!0;if(_.strictFileNames==null)_.strictFileNames=!1;if(u==null)u=$3;o8.fstat(D,function(F,B){if(F)return u(F);var E=u4.createFromFd(D,{autoClose:!0});D1(E,B.size,_,u)})}function uF(D,_,u){if(typeof _==="function")u=_,_=null;if(_==null)_={};if(_.autoClose=!1,_.lazyEntries==null)_.lazyEntries=!1;if(_.decodeStrings==null)_.decodeStrings=!0;if(_.validateEntrySizes==null)_.validateEntrySizes=!0;if(_.strictFileNames==null)_.strictFileNames=!1;var F=u4.createFromBuffer(D,{maxChunkSize:65536});D1(F,D.length,_,u)}function D1(D,_,u,F){if(typeof u==="function")F=u,u=null;if(u==null)u={};if(u.autoClose==null)u.autoClose=!0;if(u.lazyEntries==null)u.lazyEntries=!1;if(u.decodeStrings==null)u.decodeStrings=!0;var B=!!u.decodeStrings;if(u.validateEntrySizes==null)u.validateEntrySizes=!0;if(u.strictFileNames==null)u.strictFileNames=!1;if(F==null)F=$3;if(typeof _!=="number")throw new Error("expected totalSize parameter to be a number");if(_>Number.MAX_SAFE_INTEGER)throw new Error("zip file too large. only file sizes up to 2^52 are supported due to JavaScript's Number type being an IEEE 754 double.");D.ref();var E=22,C=20,$=65535,q=Math.min(C+E+$,_),X=pD(q),G=_-X.length;k0(D,X,0,q,G,function(Z){if(Z)return F(Z);for(var J=q-E;J>=0;J-=1){if(X.readUInt32LE(J)!==101010256)continue;var K=X.subarray(J),Q=K.readUInt16LE(4),M=K.readUInt16LE(10),W=K.readUInt32LE(16),V=K.readUInt16LE(20),L=K.length-E;if(V!==L)return F(new Error("Invalid comment length. Expected: "+L+". Found: "+V+". Are there extra bytes at the end of the file? Or is the end of central dir signature `PK☺☻` in the comment?"));var T=B?C3(K.subarray(22),!1):K.subarray(22);if(J-C>=0&&X.readUInt32LE(J-C)===117853008){var S=X.subarray(J-C,J-C+C),j=y0(S,8),v=pD(56);return k0(D,v,0,v.length,j,function(DD){if(DD)return F(DD);if(v.readUInt32LE(0)!==101075792)return F(new Error("invalid zip64 end of central directory record signature"));if(Q=v.readUInt32LE(16),Q!==0)return F(new Error("multi-disk zip files are not supported: found disk number: "+Q));return M=y0(v,32),W=y0(v,48),F(null,new wD(D,W,_,M,T,u.autoClose,u.lazyEntries,B,u.validateEntrySizes,u.strictFileNames))})}if(Q!==0)return F(new Error("multi-disk zip files are not supported: found disk number: "+Q));return F(null,new wD(D,W,_,M,T,u.autoClose,u.lazyEntries,B,u.validateEntrySizes,u.strictFileNames))}F(new Error("End of central directory record signature not found. Either not a zip file, or file is truncated."))})}G3.inherits(wD,q3);function wD(D,_,u,F,B,E,C,$,q,X){var G=this;if(q3.call(G),G.reader=D,G.reader.on("error",function(Z){E4(G,Z)}),G.reader.once("close",function(){G.emit("close")}),G.readEntryCursor=_,G.fileSize=u,G.entryCount=F,G.comment=B,G.entriesRead=0,G.autoClose=!!E,G.lazyEntries=!!C,G.decodeStrings=!!$,G.validateEntrySizes=!!q,G.strictFileNames=!!X,G.isOpen=!0,G.emittedError=!1,!G.lazyEntries)G._readEntry()}wD.prototype.close=function(){if(!this.isOpen)return;this.isOpen=!1,this.reader.unref()};function YD(D,_){if(D.autoClose)D.close();E4(D,_)}function E4(D,_){if(D.emittedError)return;D.emittedError=!0,D.emit("error",_)}wD.prototype.readEntry=function(){if(!this.lazyEntries)throw new Error("readEntry() called without lazyEntries:true");this._readEntry()};wD.prototype._readEntry=function(){var D=this;if(D.entryCount===D.entriesRead){setImmediate(function(){if(D.autoClose)D.close();if(D.emittedError)return;D.emit("end")});return}if(D.emittedError)return;var _=pD(46);k0(D.reader,_,0,_.length,D.readEntryCursor,function(u){if(u)return YD(D,u);if(D.emittedError)return;var F=new B2,B=_.readUInt32LE(0);if(B!==33639248)return YD(D,new Error("invalid central directory file header signature: 0x"+B.toString(16)));if(F.versionMadeBy=_.readUInt16LE(4),F.versionNeededToExtract=_.readUInt16LE(6),F.generalPurposeBitFlag=_.readUInt16LE(8),F.compressionMethod=_.readUInt16LE(10),F.lastModFileTime=_.readUInt16LE(12),F.lastModFileDate=_.readUInt16LE(14),F.crc32=_.readUInt32LE(16),F.compressedSize=_.readUInt32LE(20),F.uncompressedSize=_.readUInt32LE(24),F.fileNameLength=_.readUInt16LE(28),F.extraFieldLength=_.readUInt16LE(30),F.fileCommentLength=_.readUInt16LE(32),F.internalFileAttributes=_.readUInt16LE(36),F.externalFileAttributes=_.readUInt32LE(38),F.relativeOffsetOfLocalHeader=_.readUInt32LE(42),F.generalPurposeBitFlag&64)return YD(D,new Error("strong encryption is not supported"));D.readEntryCursor+=46,_=pD(F.fileNameLength+F.extraFieldLength+F.fileCommentLength),k0(D.reader,_,0,_.length,D.readEntryCursor,function(E){if(E)return YD(D,E);if(D.emittedError)return;F.fileNameRaw=_.subarray(0,F.fileNameLength);var C=F.fileNameLength+F.extraFieldLength;F.extraFieldRaw=_.subarray(F.fileNameLength,C),F.fileCommentRaw=_.subarray(C,C+F.fileCommentLength);try{F.extraFields=X4(F.extraFieldRaw)}catch(M){return YD(D,M)}if(D.decodeStrings){var $=(F.generalPurposeBitFlag&2048)!==0;F.fileComment=C3(F.fileCommentRaw,$),F.fileName=G4(F.generalPurposeBitFlag,F.fileNameRaw,F.extraFields,D.strictFileNames);var q=q4(F.fileName);if(q!=null)return YD(D,new Error(q))}else F.fileComment=F.fileCommentRaw,F.fileName=F.fileNameRaw;F.comment=F.fileComment,D.readEntryCursor+=_.length,D.entriesRead+=1;for(var X=0;X<F.extraFields.length;X++){var G=F.extraFields[X];if(G.id!==1)continue;var Z=G.data,J=0;if(F.uncompressedSize===4294967295){if(J+8>Z.length)return YD(D,new Error("zip64 extended information extra field does not include uncompressed size"));F.uncompressedSize=y0(Z,J),J+=8}if(F.compressedSize===4294967295){if(J+8>Z.length)return YD(D,new Error("zip64 extended information extra field does not include compressed size"));F.compressedSize=y0(Z,J),J+=8}if(F.relativeOffsetOfLocalHeader===4294967295){if(J+8>Z.length)return YD(D,new Error("zip64 extended information extra field does not include relative header offset"));F.relativeOffsetOfLocalHeader=y0(Z,J),J+=8}break}if(D.validateEntrySizes&&F.compressionMethod===0){var K=F.uncompressedSize;if(F.isEncrypted())K+=12;if(F.compressedSize!==K){var Q="compressed/uncompressed size mismatch for stored file: "+F.compressedSize+" != "+F.uncompressedSize;return YD(D,new Error(Q))}}if(D.emit("entry",F),!D.lazyEntries)D._readEntry()})})};wD.prototype.openReadStream=function(D,_,u){var F=this,B=0,E=D.compressedSize;if(u==null)u=_,_=null;if(_==null)_={};else{if(_.decrypt!=null){if(!D.isEncrypted())throw new Error("options.decrypt can only be specified for encrypted entries");if(_.decrypt!==!1)throw new Error("invalid options.decrypt value: "+_.decrypt);if(D.isCompressed()){if(_.decompress!==!1)throw new Error("entry is encrypted and compressed, and options.decompress !== false")}}if(_.decompress!=null){if(!D.isCompressed())throw new Error("options.decompress can only be specified for compressed entries");if(!(_.decompress===!1||_.decompress===!0))throw new Error("invalid options.decompress value: "+_.decompress)}if(_.start!=null||_.end!=null){if(D.isCompressed()&&_.decompress!==!1)throw new Error("start/end range not allowed for compressed entry without options.decompress === false");if(D.isEncrypted()&&_.decrypt!==!1)throw new Error("start/end range not allowed for encrypted entry without options.decrypt === false")}if(_.start!=null){if(B=_.start,B<0)throw new Error("options.start < 0");if(B>D.compressedSize)throw new Error("options.start > entry.compressedSize")}if(_.end!=null){if(E=_.end,E<0)throw new Error("options.end < 0");if(E>D.compressedSize)throw new Error("options.end > entry.compressedSize");if(E<B)throw new Error("options.end < options.start")}}if(!F.isOpen)return u(new Error("closed"));if(D.isEncrypted()){if(_.decrypt!==!1)return u(new Error("entry is encrypted, and options.decrypt !== false"))}var C;if(D.compressionMethod===0)C=!1;else if(D.compressionMethod===8)C=_.decompress!=null?_.decompress:!0;else return u(new Error("unsupported compression method: "+D.compressionMethod));F.readLocalFileHeader(D,{minimal:!0},function($,q){if($)return u($);F.openReadStreamLowLevel(q.fileDataStart,D.compressedSize,B,E,C,D.uncompressedSize,u)})};wD.prototype.openReadStreamLowLevel=function(D,_,u,F,B,E,C){var $=this,q=D+_,X=$.reader.createReadStream({start:D+u,end:D+F}),G=X;if(B){var Z=!1,J=tu.createInflateRaw();if(X.on("error",function(K){setImmediate(function(){if(!Z)J.emit("error",K)})}),X.pipe(J),$.validateEntrySizes)G=new E2(E),J.on("error",function(K){setImmediate(function(){if(!Z)G.emit("error",K)})}),J.pipe(G);else G=J;t8(G,function(){if(Z=!0,J!==G)J.unpipe(G);X.unpipe(J),X.destroy()})}C(null,G)};wD.prototype.readLocalFileHeader=function(D,_,u){var F=this;if(u==null)u=_,_=null;if(_==null)_={};F.reader.ref();var B=pD(30);k0(F.reader,B,0,B.length,D.relativeOffsetOfLocalHeader,function(E){try{if(E)return u(E);var C=B.readUInt32LE(0);if(C!==67324752)return u(new Error("invalid local file header signature: 0x"+C.toString(16)));var $=B.readUInt16LE(26),q=B.readUInt16LE(28),X=D.relativeOffsetOfLocalHeader+30+$+q;if(X+D.compressedSize>F.fileSize)return u(new Error("file data overflows file bounds: "+X+" + "+D.compressedSize+" > "+F.fileSize));if(_.minimal)return u(null,{fileDataStart:X});var G=new C4;G.fileDataStart=X,G.versionNeededToExtract=B.readUInt16LE(4),G.generalPurposeBitFlag=B.readUInt16LE(6),G.compressionMethod=B.readUInt16LE(8),G.lastModFileTime=B.readUInt16LE(10),G.lastModFileDate=B.readUInt16LE(12),G.crc32=B.readUInt32LE(14),G.compressedSize=B.readUInt32LE(18),G.uncompressedSize=B.readUInt32LE(22),G.fileNameLength=$,G.extraFieldLength=q,B=pD($+q),F.reader.ref(),k0(F.reader,B,0,B.length,D.relativeOffsetOfLocalHeader+30,function(Z){try{if(Z)return u(Z);return G.fileName=B.subarray(0,$),G.extraField=B.subarray($),u(null,G)}finally{F.reader.unref()}})}finally{F.reader.unref()}})};function B2(){}B2.prototype.getLastModDate=function(D){if(D==null)D={};if(!D.forceDosFormat)for(var _=0;_<this.extraFields.length;_++){var u=this.extraFields[_];if(u.id===21589){var F=u.data;if(F.length<5)continue;var B=F[0],E=1;if(!(B&E))continue;var C=F.readInt32LE(1);return new Date(C*1000)}else if(u.id===10){var F=u.data,$=4;while($<F.length+4){var q=F.readUInt16LE($);$+=2;var X=F.readUInt16LE($);if($+=2,q!==1){$+=X;continue}if(X<8||$+X>F.length)break;var G=4294967296*F.readInt32LE($+4)+F.readUInt32LE($),Z=G/1e4-11644473600000;return new Date(Z)}}}return $4(this.lastModFileDate,this.lastModFileTime,D.timezone)};B2.prototype.isEncrypted=function(){return(this.generalPurposeBitFlag&1)!==0};B2.prototype.isCompressed=function(){return this.compressionMethod===8};function C4(){}function $4(D,_,u){var F=D&31,B=(D>>5&15)-1,E=(D>>9&127)+1980,C=0,$=(_&31)*2,q=_>>5&63,X=_>>11&31;if(u==null||u==="local")return new Date(E,B,F,X,q,$,C);else if(u==="UTC")return new Date(Date.UTC(E,B,F,X,q,$,C));else throw new Error("unrecognized options.timezone: "+options.timezone)}function G4(D,_,u,F){var B=null;for(var E=0;E<u.length;E++){var C=u[E];if(C.id===28789){if(C.data.length<6)continue;if(C.data.readUInt8(0)!==1)continue;var $=C.data.readUInt32LE(1);if(eu.unsigned(_)!==$)continue;B=C3(C.data.subarray(5),!0);break}}if(B==null){var q=(D&2048)!==0;B=C3(_,q)}if(!F)B=B.replace(/\\/g,"/");return B}function q4(D){if(D.indexOf("\\")!==-1)return"invalid characters in fileName: "+D;if(/^[a-zA-Z]:/.test(D)||/^\//.test(D))return"absolute path: "+D;if(D.split("/").indexOf("..")!==-1)return"invalid relative path: "+D;return null}function X4(D){var _=[],u=0;while(u<D.length-3){var F=D.readUInt16LE(u+0),B=D.readUInt16LE(u+2),E=u+4,C=E+B;if(C>D.length)throw new Error("extra field length exceeds extra field buffer size");var $=D.subarray(E,C);_.push({id:F,data:$}),u=C}return _}function k0(D,_,u,F,B,E){if(F===0)return setImmediate(function(){E(null,pD(0))});D.read(_,u,F,B,function(C,$){if(C)return E(C);if($<F)return E(new Error("unexpected EOF"));E()})}G3.inherits(E2,F4);function E2(D){F4.call(this),this.actualByteCount=0,this.expectedByteCount=D}E2.prototype._transform=function(D,_,u){if(this.actualByteCount+=D.length,this.actualByteCount>this.expectedByteCount){var F="too many bytes in the stream. expected "+this.expectedByteCount+". got at least "+this.actualByteCount;return u(new Error(F))}u(null,D)};E2.prototype._flush=function(D){if(this.actualByteCount<this.expectedByteCount){var _="not enough bytes in the stream. expected "+this.expectedByteCount+". got only "+this.actualByteCount;return D(new Error(_))}D()};G3.inherits(B0,q3);function B0(){q3.call(this),this.refCount=0}B0.prototype.ref=function(){this.refCount+=1};B0.prototype.unref=function(){var D=this;if(D.refCount-=1,D.refCount>0)return;if(D.refCount<0)throw new Error("invalid unref");D.close(_);function _(u){if(u)return D.emit("error",u);D.emit("close")}};B0.prototype.createReadStream=function(D){if(D==null)D={};var{start:_,end:u}=D;if(_===u){var F=new e8;return setImmediate(function(){F.end()}),F}var B=this._readStreamForRange(_,u),E=!1,C=new X3(this);B.on("error",function(q){setImmediate(function(){if(!E)C.emit("error",q)})}),t8(C,function(){B.unpipe(C),C.unref(),B.destroy()});var $=new E2(u-_);return C.on("error",function(q){setImmediate(function(){if(!E)$.emit("error",q)})}),t8($,function(){E=!0,C.unpipe($),C.destroy()}),B.pipe(C).pipe($)};B0.prototype._readStreamForRange=function(D,_){throw new Error("not implemented")};B0.prototype.read=function(D,_,u,F,B){var E=this.createReadStream({start:F,end:F+u}),C=new DF,$=0;C._write=function(q,X,G){q.copy(D,_+$,0,q.length),$+=q.length,G()},C.on("finish",B),E.on("error",function(q){B(q)}),E.pipe(C)};B0.prototype.close=function(D){setImmediate(D)};G3.inherits(X3,e8);function X3(D){e8.call(this),this.context=D,this.context.ref(),this.unreffedYet=!1}X3.prototype._flush=function(D){this.unref(),D()};X3.prototype.unref=function(D){if(this.unreffedYet)return;this.unreffedYet=!0,this.context.unref()};var FF="\x00☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ";function C3(D,_){if(_)return D.toString("utf8");else{var u="";for(var F=0;F<D.length;F++)u+=FF[D[F]];return u}}function y0(D,_){var u=D.readUInt32LE(_),F=D.readUInt32LE(_+4);return F*4294967296+u}var pD;if(typeof Buffer.allocUnsafe==="function")pD=function(D){return Buffer.allocUnsafe(D)};else pD=function(D){return new Buffer(D)};function t8(D,_){if(typeof D.destroy==="function")D._destroy=function(u,F){if(_(),F!=null)F(u)};else D.destroy=_}function $3(D){if(D)throw D}});var _1=N((Q3)=>{Object.defineProperty(Q3,"__esModule",{value:!0});Q3.Unzip=void 0;var J4=Z4(),Z3=f8(),BF=require("fs"),C2=require("path"),J3=o2(),Q4=c8();class K4{constructor(D){this._entryCount=D,this._isPrevented=!1}get entryName(){return this._entryName}set entryName(D){this._entryName=D}get entryCount(){return this._entryCount}get isPrevented(){return this._isPrevented}preventDefault(){this._isPrevented=!0}reset(){this._isPrevented=!1}}class U4{constructor(D,_,u){this._targetFolder=D,this._realTargetFolder=_,this.symlinkAsFileOnWindows=u,this._symlinkFileNames=[]}get decodeEntryFileName(){return this._decodeEntryFileName}set decodeEntryFileName(D){this._decodeEntryFileName=D}get targetFolder(){return this._targetFolder}get realTargetFolder(){return this._realTargetFolder}get symlinkFileNames(){return this._symlinkFileNames}getFilePath(){return C2.join(this.targetFolder,this.decodeEntryFileName)}async isOutsideTargetFolder(D){if(this.symlinkFileNames.length===0)return!1;if(process.platform==="win32"&&this.symlinkAsFileOnWindows)return!1;for(let _ of this.symlinkFileNames)if(D.includes(_)){if((await J3.realpath(D)).indexOf(this.realTargetFolder)!==0)return!0}return!1}}class H4 extends Q4.Cancelable{constructor(D){super();this.options=D}async extract(D,_){let u=0,F=new Q4.CancellationToken;if(this.token=F,this.isOverwrite())await Z3.rimraf(_);if(F.isCancelled)return Promise.reject(this.canceledError());await Z3.ensureFolder(_);let B=await J3.realpath(_),E=await this.openZip(D,F);return this.zipFile=E,E.readEntry(),new Promise((C,$)=>{let q=null,X=E.entryCount;if(E.once("error",(J)=>{this.closeZip(),$(this.wrapError(J,F.isCancelled))}),E.once("close",()=>{if(this.zipFile=null,q)$(this.wrapError(q,F.isCancelled));else if(F.isCancelled)$(this.canceledError());else if(X===0)C(void 0)}),F.isCancelled){this.closeZip();return}let G=new U4(_,B,this.symlinkToFile()),Z=new K4(X);E.on("entry",async(J)=>{let Q=J.fileName.toString("utf8").replace(/\\/g,"/"),M=J4.validateFileName(Q);if(M!=null){q=new Error(M),this.closeZip(),$(q);return}Z.entryName=Q,this.onEntryCallback(Z),G.decodeEntryFileName=Q;try{if(Z.isPrevented)Z.reset(),E.readEntry();else await this.handleEntry(E,J,G,F);if(u++,u===X)C()}catch(W){q=this.wrapError(W,F.isCancelled),this.closeZip(),$(q)}})})}cancel(){if(this.token)this.token.cancel(),this.token=null;this.closeZip()}closeZip(){if(this.zipFile)this.zipFile.close(),this.zipFile=null}openZip(D,_){return new Promise((u,F)=>{J4.open(D,{lazyEntries:!0,decodeStrings:!1},(B,E)=>{if(B)F(this.wrapError(B,_.isCancelled));else u(E)})})}async handleEntry(D,_,u,F){if(/\/$/.test(u.decodeEntryFileName))await Z3.ensureFolder(u.getFilePath()),D.readEntry();else await this.extractEntry(D,_,u,F)}openZipFileStream(D,_,u){return new Promise((F,B)=>{D.openReadStream(_,(E,C)=>{if(E)B(this.wrapError(E,u.isCancelled));else F(C)})})}async extractEntry(D,_,u,F){let B=u.getFilePath(),E=C2.dirname(B);if(await Z3.ensureFolder(E),await u.isOutsideTargetFolder(E)){let q=new Error(`Refuse to write file outside "${u.targetFolder}", file: "${B}"`);return q.name="AFWRITE",Promise.reject(q)}let $=await this.openZipFileStream(D,_,F);await this.writeEntryToFile($,_,u,F),D.readEntry()}async writeEntryToFile(D,_,u,F){let B;return F.onCancelled(()=>{if(B)D.unpipe(B),B.destroy(this.canceledError())}),new Promise(async(E,C)=>{try{let $=u.getFilePath(),q=this.modeFromEntry(_),X=(q&61440)===40960;if(D.once("error",(G)=>{C(this.wrapError(G,F.isCancelled))}),X)u.symlinkFileNames.push(u.decodeEntryFileName);if(X&&!this.symlinkToFile()){let G="";D.on("data",(Z)=>{if(Z instanceof String)G+=Z;else G+=Z.toString()}),D.once("end",()=>{this.createSymlink(G,$).then(E,C)})}else B=BF.createWriteStream($,{mode:q}),B.once("close",()=>E()),B.once("error",(G)=>{C(this.wrapError(G,F.isCancelled))}),D.pipe(B)}catch($){C(this.wrapError($,F.isCancelled))}})}modeFromEntry(D){let _=D.externalFileAttributes>>16||33188;return[448,56,7].map((u)=>_&u).reduce((u,F)=>u+F,_&61440)}async createSymlink(D,_){let u="file";if(process.platform==="win32")if(/\/$/.test(D))u="dir";else{let F=D;if(!C2.isAbsolute(D))F=C2.join(C2.dirname(_),D);try{if((await J3.stat(F)).isDirectory())u="dir"}catch(B){}}await J3.symlink(D,_,u)}isOverwrite(){if(this.options&&this.options.overwrite)return!0;return!1}onEntryCallback(D){if(this.options&&this.options.onEntry)this.options.onEntry(D)}symlinkToFile(){let D=!1;if(process.platform==="win32")if(this.options&&this.options.symlinkAsFileOnWindows===!1)D=!1;else D=!0;return D}}Q3.Unzip=H4});var A4=N((jD)=>{var EF=jD&&jD.__createBinding||(Object.create?function(D,_,u,F){if(F===void 0)F=u;var B=Object.getOwnPropertyDescriptor(_,u);if(!B||("get"in B?!_.__esModule:B.writable||B.configurable))B={enumerable:!0,get:function(){return _[u]}};Object.defineProperty(D,F,B)}:function(D,_,u,F){if(F===void 0)F=u;D[F]=_[u]}),M4=jD&&jD.__exportStar||function(D,_){for(var u in D)if(u!=="default"&&!Object.prototype.hasOwnProperty.call(_,u))EF(_,D,u)};Object.defineProperty(jD,"__esModule",{value:!0});jD.archiveFile=$F;jD.archiveFolder=GF;jD.extract=qF;var W4=l8(),CF=_1();M4(l8(),jD);M4(_1(),jD);function $F(D,_,u){let F=new W4.Zip(u);return F.addFile(D),F.archive(_)}function GF(D,_,u){let F=new W4.Zip(u);return F.addFolder(D),F.archive(_)}function qF(D,_,u){return new CF.Unzip(u).extract(D,_)}});var j1=x(T1()),{program:iF,createCommand:nF,createArgument:aF,createOption:sF,CommanderError:rF,InvalidArgumentError:oF,InvalidOptionArgumentError:tF,Command:m0,Argument:eF,Option:DB,Help:_B}=j1.default;var H2=(D)=>D.name==="up"||D.name==="k"||D.ctrl&&D.name==="p",y3=(D)=>D.name==="down"||D.name==="j"||D.ctrl&&D.name==="n";var M2=(D)=>D.name==="backspace",O1=(D)=>"123456789".includes(D.name),aD=(D)=>D.name==="enter"||D.name==="return";class k3 extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(D){super();this.cause=D?.cause}}class v3 extends Error{name="CancelPromptError";message="Prompt was canceled"}class b3 extends Error{name="ExitPromptError"}class h3 extends Error{name="HookError"}class d0 extends Error{name="ValidationError"}var g3=require("node:async_hooks");var W2=require("node:async_hooks");var P1=new W2.AsyncLocalStorage;function W9(D){return{rl:D,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function z1(D,_){let u=W9(D);return P1.run(u,()=>{function F(B){u.handleChange=()=>{u.index=0,B()},u.handleChange()}return _(F)})}function q0(){let D=P1.getStore();if(!D)throw new h3("[Inquirer] Hook functions can only be called from within a prompt");return D}function m3(){return q0().rl}function d3(D){let _=(...u)=>{let F=q0(),B=!1,E=F.handleChange;F.handleChange=()=>{B=!0};let C=D(...u);if(B)E();return F.handleChange=E,C};return W2.AsyncResource.bind(_)}function V0(D){let _=q0(),{index:u}=_,F={get(){return _.hooks[u]},set(E){_.hooks[u]=E},initialized:u in _.hooks},B=D(F);return _.index++,B}function Y1(){q0().handleChange()}var X0={queue(D){let _=q0(),{index:u}=_;_.hooksEffect.push(()=>{_.hooksCleanup[u]?.();let F=D(m3());if(F!=null&&typeof F!=="function")throw new d0("useEffect return value must be a cleanup function or nothing.");_.hooksCleanup[u]=F})},run(){let D=q0();d3(()=>{D.hooksEffect.forEach((_)=>{_()}),D.hooksEffect.length=0})()},clearAll(){let D=q0();D.hooksCleanup.forEach((_)=>{_?.()}),D.hooksEffect.length=0,D.hooksCleanup.length=0}};function n(D){return V0((_)=>{let u=(B)=>{if(_.get()!==B)_.set(B),Y1()};if(_.initialized)return[_.get(),u];let F=typeof D==="function"?D():D;return _.set(F),[F,u]})}function kD(D,_){V0((u)=>{let F=u.get();if(!Array.isArray(F)||_.some((E,C)=>!Object.is(E,F[C])))X0.queue(D);u.set(_)})}var HD=x(g0());var WD=x(require("node:process"));function L9(){if(WD.default.platform!=="win32")return WD.default.env.TERM!=="linux";return Boolean(WD.default.env.WT_SESSION)||Boolean(WD.default.env.TERMINUS_SUBLIME)||WD.default.env.ConEmuTask==="{cmd::Cmder}"||WD.default.env.TERM_PROGRAM==="Terminus-Sublime"||WD.default.env.TERM_PROGRAM==="vscode"||WD.default.env.TERM==="xterm-256color"||WD.default.env.TERM==="alacritty"||WD.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var x1={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:"╱"},S1={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:"⅒"},I9={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"},R9={...x1,...S1},N9={...x1,...I9},T9=L9(),j9=T9?R9:N9,sD=j9,JB=Object.entries(S1);var y1={prefix:{idle:HD.default.blue("?"),done:HD.default.green(sD.tick)},spinner:{interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"].map((D)=>HD.default.yellow(D))},style:{answer:HD.default.cyan,message:HD.default.bold,error:(D)=>HD.default.red(`> ${D}`),defaultAnswer:(D)=>HD.default.dim(`(${D})`),help:HD.default.dim,highlight:HD.default.cyan,key:(D)=>HD.default.cyan(HD.default.bold(`<${D}>`))}};function k1(D){if(typeof D!=="object"||D===null)return!1;let _=D;while(Object.getPrototypeOf(_)!==null)_=Object.getPrototypeOf(_);return Object.getPrototypeOf(D)===_}function v1(...D){let _={};for(let u of D)for(let[F,B]of Object.entries(u)){let E=_[F];_[F]=k1(E)&&k1(B)?v1(E,B):B}return _}function AD(...D){let _=[y1,...D.filter((u)=>u!=null)];return v1(..._)}function vD({status:D="idle",theme:_}){let[u,F]=n(!1),[B,E]=n(0),{prefix:C,spinner:$}=AD(_);if(kD(()=>{if(D==="loading"){let X,G=-1,Z=setTimeout(g3.AsyncResource.bind(()=>{F(!0),X=setInterval(g3.AsyncResource.bind(()=>{G=G+1,E(G%$.frames.length)}),$.interval)}),300);return()=>{clearTimeout(Z),clearInterval(X)}}else F(!1)},[D]),u)return $.frames[B];return typeof C==="string"?C:C[D==="loading"?"idle":D]??C.idle}function Z0(D,_){return V0((u)=>{let F=u.get();if(!F||F.dependencies.length!==_.length||F.dependencies.some((B,E)=>B!==_[E])){let B=D();return u.set({value:B,dependencies:_}),B}return F.value})}function PD(D){return n({current:D})[0]}function bD(D){let _=PD(D);_.current=D,kD((u)=>{let F=!1,B=d3((E,C)=>{if(F)return;_.current(C,u)});return u.input.on("keypress",B),()=>{F=!0,u.input.removeListener("keypress",B)}},[])}var X_=x(h1()),Z_=x(q_());function p0(D,_){return D.split(`
38
- `).flatMap((u)=>Z_.default(u,_,{trim:!1,hard:!0}).split(`
39
- `).map((F)=>F.trimEnd())).join(`
40
- `)}function L2(){return X_.default({defaultWidth:80,output:m3().output})}function a9(D,_){return p0(D,_).split(`
41
- `)}function s9(D,_){let u=_.length,F=(D%u+u)%u;return[..._.slice(F),..._.slice(0,F)]}function J_({items:D,width:_,renderItem:u,active:F,position:B,pageSize:E}){let C=D.map((Q,M)=>({item:Q,index:M,isActive:M===F})),$=s9(F-B,C).slice(0,E),q=(Q)=>$[Q]==null?[]:a9(u($[Q]),_),X=Array.from({length:E}),G=q(B).slice(0,E),Z=B+G.length<=E?B:E-G.length;X.splice(Z,G.length,...G);let J=Z+G.length,K=B+1;while(J<E&&K<$.length){for(let Q of q(K))if(X[J++]=Q,J>=E)break;K++}J=Z-1,K=B-1;while(J>=0&&K>=0){for(let Q of q(K).reverse())if(X[J--]=Q,J<0)break;K--}return X.filter((Q)=>typeof Q==="string")}function Q_({active:D,pageSize:_,total:u}){let F=Math.floor(_/2);if(u<=_||D<F)return D;if(D>=u-F)return D+_-u;return F}function K_({active:D,lastActive:_,total:u,pageSize:F,pointer:B}){if(u<=F)return D;if(_<D&&D-_<F)return Math.min(Math.floor(F/2),B+D-_);return B}function l0({items:D,active:_,renderItem:u,pageSize:F,loop:B=!0}){let E=PD({position:0,lastActive:0}),C=B?K_({active:_,lastActive:E.current.lastActive,total:D.length,pageSize:F,pointer:E.current.position}):Q_({active:_,total:D.length,pageSize:F});return E.current.position=C,E.current.lastActive=_,J_({items:D,width:L2(),renderItem:u,active:_,position:C,pageSize:F}).join(`
42
- `)}var j_=x(require("node:readline")),O_=require("node:async_hooks"),P_=x(M_());var J0=[];J0.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")J0.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")J0.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var I2=(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",o3=Symbol.for("signal-exit emitter"),t3=globalThis,o9=Object.defineProperty.bind(Object);class W_{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(t3[o3])return t3[o3];o9(t3,o3,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(D,_){this.listeners[D].push(_)}removeListener(D,_){let u=this.listeners[D],F=u.indexOf(_);if(F===-1)return;if(F===0&&u.length===1)u.length=0;else u.splice(F,1)}emit(D,_,u){if(this.emitted[D])return!1;this.emitted[D]=!0;let F=!1;for(let B of this.listeners[D])F=B(_,u)===!0||F;if(D==="exit")F=this.emit("afterExit",_,u)||F;return F}}class D8{}var t9=(D)=>{return{onExit(_,u){return D.onExit(_,u)},load(){return D.load()},unload(){return D.unload()}}};class A_ extends D8{onExit(){return()=>{}}load(){}unload(){}}class V_ extends D8{#u=e3.platform==="win32"?"SIGINT":"SIGHUP";#_=new W_;#D;#E;#C;#B={};#F=!1;constructor(D){super();this.#D=D,this.#B={};for(let _ of J0)this.#B[_]=()=>{let u=this.#D.listeners(_),{count:F}=this.#_,B=D;if(typeof B.__signal_exit_emitter__==="object"&&typeof B.__signal_exit_emitter__.count==="number")F+=B.__signal_exit_emitter__.count;if(u.length===F){this.unload();let E=this.#_.emit("exit",null,_),C=_==="SIGHUP"?this.#u:_;if(!E)D.kill(D.pid,C)}};this.#C=D.reallyExit,this.#E=D.emit}onExit(D,_){if(!I2(this.#D))return()=>{};if(this.#F===!1)this.load();let u=_?.alwaysLast?"afterExit":"exit";return this.#_.on(u,D),()=>{if(this.#_.removeListener(u,D),this.#_.listeners.exit.length===0&&this.#_.listeners.afterExit.length===0)this.unload()}}load(){if(this.#F)return;this.#F=!0,this.#_.count+=1;for(let D of J0)try{let _=this.#B[D];if(_)this.#D.on(D,_)}catch(_){}this.#D.emit=(D,..._)=>{return this.#G(D,..._)},this.#D.reallyExit=(D)=>{return this.#$(D)}}unload(){if(!this.#F)return;this.#F=!1,J0.forEach((D)=>{let _=this.#B[D];if(!_)throw new Error("Listener not defined for signal: "+D);try{this.#D.removeListener(D,_)}catch(u){}}),this.#D.emit=this.#E,this.#D.reallyExit=this.#C,this.#_.count-=1}#$(D){if(!I2(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)}#G(D,..._){let u=this.#E;if(D==="exit"&&I2(this.#D)){if(typeof _[0]==="number")this.#D.exitCode=_[0];let F=u.call(this.#D,D,..._);return this.#_.emit("exit",this.#D.exitCode,null),F}else return u.call(this.#D,D,..._)}}var e3=globalThis.process,{onExit:L_,load:_E,unload:uE}=t9(I2(e3)?new V_(e3):new A_);var T_=require("node:util"),rD=x(u8());var R_=(D)=>D.split(`
43
- `).length,e9=(D)=>D.split(`
44
- `).pop()??"";function N_(D){return D>0?rD.default.cursorDown(D):""}class N2{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 u=e9(D),F=T_.stripVTControlCharacters(u),B=F;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=L2();if(D=p0(D,E),_=p0(_,E),F.length%E===0)D+=`
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
45
  `;let C=D+(_?`
46
- `+_:""),q=Math.floor(F.length/E)-this.cursorPos.rows+(_?R_(_):0);if(q>0)C+=rD.default.cursorUp(q);C+=rD.default.cursorTo(this.cursorPos.cols),this.write(N_(this.extraLinesUnderPrompt)+rD.default.eraseLines(this.height)+C),this.extraLinesUnderPrompt=q,this.height=R_(C)}checkCursorPos(){let D=this.rl.getCursorPos();if(D.cols!==this.cursorPos.cols)this.write(rD.default.cursorTo(D.cols)),this.cursorPos=D}done({clearContent:D}){this.rl.setPrompt("");let _=N_(this.extraLinesUnderPrompt);_+=D?rD.default.eraseLines(this.height):`
47
- `,_+=rD.default.cursorShow,this.write(_),this.rl.close()}}class F8 extends Promise{static withResolver(){let D,_;return{promise:new Promise((F,B)=>{D=F,_=B}),resolve:D,reject:_}}}function D7(){let D=Error.prepareStackTrace;try{let _=[];return Error.prepareStackTrace=(u,F)=>{let B=F.slice(1);return _=B,B},new Error().stack,_}finally{Error.prepareStackTrace=D}}function hD(D){let u=D7()[1]?.getFileName?.();return(B,E={})=>{let{input:C=process.stdin,signal:$}=E,q=new Set,X=new P_.default;X.pipe(E.output??process.stdout);let G=j_.createInterface({terminal:!0,input:C,output:X}),Z=new N2(G),{promise:J,resolve:K,reject:Q}=F8.withResolver(),M=()=>Q(new v3);if($){let V=()=>Q(new k3({cause:$.reason}));if($.aborted)return V(),Object.assign(J,{cancel:M});$.addEventListener("abort",V),q.add(()=>$.removeEventListener("abort",V))}q.add(L_((V,L)=>{Q(new b3(`User force closed the prompt with ${V} ${L}`))}));let W=()=>Z.checkCursorPos();return G.input.on("keypress",W),q.add(()=>G.input.removeListener("keypress",W)),z1(G,(V)=>{let L=O_.AsyncResource.bind(()=>X0.clearAll());return G.on("close",L),q.add(()=>G.removeListener("close",L)),V(()=>{try{let T=D(B,(v)=>{setImmediate(()=>K(v))});if(T===void 0)throw new Error(`Prompt functions must return a string.
48
- at ${u}`);let[S,j]=typeof T==="string"?[T]:T;Z.render(S,j),X0.run()}catch(T){Q(T)}}),Object.assign(J.then((T)=>{return X0.clearAll(),T},(T)=>{throw X0.clearAll(),T}).finally(()=>{q.forEach((T)=>T()),Z.done({clearContent:Boolean(E.clearPromptOnDone)}),X.end()}).then(()=>J),{cancel:M})})}}var z_=x(g0());class VD{separator=z_.default.dim(Array.from({length:15}).join(sD.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 Y_(D,_){let u=_!==!1;if(/^(y|yes)/i.test(D))u=!0;else if(/^(n|no)/i.test(D))u=!1;return u}function w_(D){return D?"Yes":"No"}var Q0=hD((D,_)=>{let{transformer:u=w_}=D,[F,B]=n("idle"),[E,C]=n(""),$=AD(D.theme),q=vD({status:F,theme:$});bD((J,K)=>{if(aD(J)){let Q=Y_(E,D.default);C(u(Q)),B("done"),_(Q)}else if(J.name==="tab"){let Q=w_(!Y_(E,D.default));K.clearLine(0),K.write(Q),C(Q)}else C(K.line)});let X=E,G="";if(F==="done")X=$.style.answer(E);else G=` ${$.style.defaultAnswer(D.default===!1?"y/N":"Y/n")}`;let Z=$.style.message(D.message,F);return`${q} ${Z}${G} ${X}`});var _7={validationFailureMode:"keep"},T0=hD((D,_)=>{let{required:u,validate:F=()=>!0}=D,B=AD(_7,D.theme),[E,C]=n("idle"),[$="",q]=n(D.default),[X,G]=n(),[Z,J]=n(""),K=vD({status:E,theme:B});bD(async(L,T)=>{if(E!=="idle")return;if(aD(L)){let S=Z||$;C("loading");let j=u&&!S?"You must provide a value":await F(S);if(j===!0)J(S),C("done"),_(S);else{if(B.validationFailureMode==="clear")J("");else T.write(Z);G(j||"You must provide a valid value"),C("idle")}}else if(M2(L)&&!Z)q(void 0);else if(L.name==="tab"&&!Z)q(void 0),T.clearLine(0),T.write($),J($);else J(T.line),G(void 0)});let Q=B.style.message(D.message,E),M=Z;if(typeof D.transformer==="function")M=D.transformer(Z,{isFinal:E==="done"});else if(E==="done")M=B.style.answer(Z);let W;if($&&E!=="done"&&!Z)W=B.style.defaultAnswer($);let V="";if(X)V=B.style.error(X);return[[K,Q,W,M].filter((L)=>L!==void 0).join(" "),V]});var T2=x(g0());var u7={icon:{cursor:sD.pointer},style:{disabled:(D)=>T2.default.dim(`- ${D}`),searchTerm:(D)=>T2.default.cyan(D),description:(D)=>T2.default.cyan(D)},helpMode:"auto"};function B8(D){return!VD.isSeparator(D)&&!D.disabled}function F7(D){return D.map((_)=>{if(VD.isSeparator(_))return _;if(typeof _==="string")return{value:_,name:_,short:_,disabled:!1};let u=_.name??String(_.value);return{value:_.value,name:u,description:_.description,short:_.short??u,disabled:_.disabled??!1}})}var E8=hD((D,_)=>{let{pageSize:u=7,validate:F=()=>!0}=D,B=AD(u7,D.theme),E=PD(!0),[C,$]=n("loading"),[q,X]=n(""),[G,Z]=n([]),[J,K]=n(),Q=vD({status:C,theme:B}),M=Z0(()=>{let A=G.findIndex(B8),z=G.findLastIndex(B8);return{first:A,last:z}},[G]),[W=M.first,V]=n();kD(()=>{let A=new AbortController;return $("loading"),K(void 0),(async()=>{try{let P=await D.source(q||void 0,{signal:A.signal});if(!A.signal.aborted)V(void 0),K(void 0),Z(F7(P)),$("idle")}catch(P){if(!A.signal.aborted&&P instanceof Error)K(P.message)}})(),()=>{A.abort()}},[q]);let L=G[W];bD(async(A,z)=>{if(aD(A))if(L){$("loading");let P=await F(L.value);if($("idle"),P===!0)$("done"),_(L.value);else if(L.name===q)K(P||"You must provide a valid value");else z.write(L.name),X(L.name)}else z.write(q);else if(A.name==="tab"&&L)z.clearLine(0),z.write(L.name),X(L.name);else if(C!=="loading"&&(A.name==="up"||A.name==="down")){if(z.clearLine(0),A.name==="up"&&W!==M.first||A.name==="down"&&W!==M.last){let P=A.name==="up"?-1:1,c=W;do c=(c+P+G.length)%G.length;while(!B8(G[c]));V(c)}}else X(z.line)});let T=B.style.message(D.message,C);if(W>0)E.current=!1;let S="";if(G.length>1&&(B.helpMode==="always"||B.helpMode==="auto"&&E.current))S=G.length>u?`
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
49
  ${B.style.help("(Use arrow keys to reveal more choices)")}`:`
50
- ${B.style.help("(Use arrow keys)")}`;let j=l0({items:G,active:W,renderItem({item:A,isActive:z}){if(VD.isSeparator(A))return` ${A.separator}`;if(A.disabled){let t=typeof A.disabled==="string"?A.disabled:"(disabled)";return B.style.disabled(`${A.name} ${t}`)}let P=z?B.style.highlight:(t)=>t,c=z?B.icon.cursor:" ";return P(`${c} ${A.name}`)},pageSize:u,loop:!1}),v;if(J)v=B.style.error(J);else if(G.length===0&&q!==""&&C==="idle")v=B.style.error("No results found");let DD;if(C==="done"&&L){let A=L.short;return`${Q} ${T} ${B.style.answer(A)}`}else DD=B.style.searchTerm(q);let _D=L?.description?`
51
- ${B.style.description(L.description)}`:"";return[[Q,T,DD].filter(Boolean).join(" "),`${v??j}${S}${_D}`]});var C8=x(g0());var x_=x(u8());var B7={icon:{cursor:sD.pointer},style:{disabled:(D)=>C8.default.dim(`- ${D}`),description:(D)=>C8.default.cyan(D)},helpMode:"auto"};function j0(D){return!VD.isSeparator(D)&&!D.disabled}function E7(D){return D.map((_)=>{if(VD.isSeparator(_))return _;if(typeof _==="string")return{value:_,name:_,short:_,disabled:!1};let u=_.name??String(_.value);return{value:_.value,name:u,description:_.description,short:_.short??u,disabled:_.disabled??!1}})}var GD=hD((D,_)=>{let{loop:u=!0,pageSize:F=7}=D,B=PD(!0),E=AD(B7,D.theme),[C,$]=n("idle"),q=vD({status:C,theme:E}),X=PD(),G=Z0(()=>E7(D.choices),[D.choices]),Z=Z0(()=>{let j=G.findIndex(j0),v=G.findLastIndex(j0);if(j===-1)throw new d0("[select prompt] No selectable choices. All choices are disabled.");return{first:j,last:v}},[G]),J=Z0(()=>{if(!("default"in D))return-1;return G.findIndex((j)=>j0(j)&&j.value===D.default)},[D.default,G]),[K,Q]=n(J===-1?Z.first:J),M=G[K];bD((j,v)=>{if(clearTimeout(X.current),aD(j))$("done"),_(M.value);else if(H2(j)||y3(j)){if(v.clearLine(0),u||H2(j)&&K!==Z.first||y3(j)&&K!==Z.last){let DD=H2(j)?-1:1,_D=K;do _D=(_D+DD+G.length)%G.length;while(!j0(G[_D]));Q(_D)}}else if(O1(j)){v.clearLine(0);let DD=Number(j.name)-1,_D=G[DD];if(_D!=null&&j0(_D))Q(DD)}else if(M2(j))v.clearLine(0);else{let DD=v.line.toLowerCase(),_D=G.findIndex((A)=>{if(VD.isSeparator(A)||!j0(A))return!1;return A.name.toLowerCase().startsWith(DD)});if(_D!==-1)Q(_D);X.current=setTimeout(()=>{v.clearLine(0)},700)}}),kD(()=>()=>{clearTimeout(X.current)},[]);let W=E.style.message(D.message,C),V="",L="";if(E.helpMode==="always"||E.helpMode==="auto"&&B.current)if(B.current=!1,G.length>F)L=`
52
- ${E.style.help("(Use arrow keys to reveal more choices)")}`;else V=E.style.help("(Use arrow keys)");let T=l0({items:G,active:K,renderItem({item:j,isActive:v}){if(VD.isSeparator(j))return` ${j.separator}`;if(j.disabled){let A=typeof j.disabled==="string"?j.disabled:"(disabled)";return E.style.disabled(`${j.name} ${A}`)}let DD=v?E.style.highlight:(A)=>A,_D=v?E.icon.cursor:" ";return DD(`${_D} ${j.name}`)},pageSize:F,loop:u});if(C==="done")return`${q} ${W} ${E.style.answer(M.short)}`;let S=M.description?`
53
- ${E.style.description(M.description)}`:"";return`${[q,W,V].filter(Boolean).join(" ")}
54
- ${T}${L}${S}${x_.default.cursorHide}`});var j2={name:"@tobylai/qmcli",version:"0.0.9",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",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/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 P0=x(require("node:path")),M6=x(require("node:os")),r0=x(c_());var l_=x(require("os")),n0=x(require("path")),tD=l_.default.homedir(),{env:U0}=process,p_=U0.XDG_DATA_HOME||(tD?n0.default.join(tD,".local","share"):void 0),w2=U0.XDG_CONFIG_HOME||(tD?n0.default.join(tD,".config"):void 0),sE=U0.XDG_STATE_HOME||(tD?n0.default.join(tD,".local","state"):void 0),rE=U0.XDG_CACHE_HOME||(tD?n0.default.join(tD,".cache"):void 0),oE=U0.XDG_RUNTIME_DIR||void 0,M7=(U0.XDG_DATA_DIRS||"/usr/local/share/:/usr/share/").split(":");if(p_)M7.unshift(p_);var W7=(U0.XDG_CONFIG_DIRS||"/etc/xdg").split(":");if(w2)W7.unshift(w2);var X6=x(require("node:path"));var k=x(require("node:fs")),CD=require("node:util");var mD=(D,_)=>{return function u(...F){return D.apply(void 0,F).catch(_)}},zD=(D,_)=>{return function u(...F){try{return D.apply(void 0,F)}catch(B){return _(B)}}};var Z8=x(require("node:process")),i_=Z8.default.getuid?!Z8.default.getuid():!1,n_=1e4,XD=()=>{return};var a0={isChangeErrorOk:(D)=>{if(!a0.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(!a0.isNodeError(D))return!1;let{code:_}=D;if(_==="EMFILE"||_==="ENFILE"||_==="EAGAIN"||_==="EBUSY"||_==="EACCESS"||_==="EACCES"||_==="EACCS"||_==="EPERM")return!0;return!1},onChangeError:(D)=>{if(!a0.isNodeError(D))throw D;if(a0.isChangeErrorOk(D))return;throw D}},e=a0;class a_{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(u),u=()=>D(_);this.add(u)})},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 a_;var dD=(D,_)=>{return function u(F){return function B(...E){return s_.schedule().then((C)=>{let $=(X)=>{return C(),X},q=(X)=>{if(C(),Date.now()>=F)throw X;if(_(X)){let G=Math.round(100*Math.random());return new Promise((J)=>setTimeout(J,G)).then(()=>B.apply(void 0,E))}throw X};return D.apply(void 0,E).then($,q)})}}},gD=(D,_)=>{return function u(F){return function B(...E){try{return D.apply(void 0,E)}catch(C){if(Date.now()>F)throw C;if(_(C))return B.apply(void 0,E);throw C}}}};var A7={attempt:{chmod:mD(CD.promisify(k.default.chmod),e.onChangeError),chown:mD(CD.promisify(k.default.chown),e.onChangeError),close:mD(CD.promisify(k.default.close),XD),fsync:mD(CD.promisify(k.default.fsync),XD),mkdir:mD(CD.promisify(k.default.mkdir),XD),realpath:mD(CD.promisify(k.default.realpath),XD),stat:mD(CD.promisify(k.default.stat),XD),unlink:mD(CD.promisify(k.default.unlink),XD),chmodSync:zD(k.default.chmodSync,e.onChangeError),chownSync:zD(k.default.chownSync,e.onChangeError),closeSync:zD(k.default.closeSync,XD),existsSync:zD(k.default.existsSync,XD),fsyncSync:zD(k.default.fsync,XD),mkdirSync:zD(k.default.mkdirSync,XD),realpathSync:zD(k.default.realpathSync,XD),statSync:zD(k.default.statSync,XD),unlinkSync:zD(k.default.unlinkSync,XD)},retry:{close:dD(CD.promisify(k.default.close),e.isRetriableError),fsync:dD(CD.promisify(k.default.fsync),e.isRetriableError),open:dD(CD.promisify(k.default.open),e.isRetriableError),readFile:dD(CD.promisify(k.default.readFile),e.isRetriableError),rename:dD(CD.promisify(k.default.rename),e.isRetriableError),stat:dD(CD.promisify(k.default.stat),e.isRetriableError),write:dD(CD.promisify(k.default.write),e.isRetriableError),writeFile:dD(CD.promisify(k.default.writeFile),e.isRetriableError),closeSync:gD(k.default.closeSync,e.isRetriableError),fsyncSync:gD(k.default.fsyncSync,e.isRetriableError),openSync:gD(k.default.openSync,e.isRetriableError),readFileSync:gD(k.default.readFileSync,e.isRetriableError),renameSync:gD(k.default.renameSync,e.isRetriableError),statSync:gD(k.default.statSync,e.isRetriableError),writeSync:gD(k.default.writeSync,e.isRetriableError),writeFileSync:gD(k.default.writeFileSync,e.isRetriableError)}},FD=A7;var J8=x(require("node:os")),x2=x(require("node:process")),r_="utf8",Q8=438,o_=511;var t_={},e_=J8.default.userInfo().uid,D6=J8.default.userInfo().gid;var _6=1000,u6=!!x2.default.getuid,JC=x2.default.getuid?!x2.default.getuid():!1,K8=128;var F6=(D)=>{return D instanceof Error&&"code"in D};var U8=(D)=>{return typeof D==="string"},S2=(D)=>{return D===void 0};var q6=x(require("node:path"));var H0=x(require("node:process"));var H8=x(require("node:process")),B6=H8.default.platform==="linux",y2=H8.default.platform==="win32";var M8=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(!y2)M8.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(B6)M8.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");var E6=M8;class C6{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(y2&&(D!=="SIGINT"&&D!=="SIGTERM"&&D!=="SIGKILL"))H0.default.kill(H0.default.pid,"SIGTERM");else H0.default.kill(H0.default.pid,D)},this.hook=()=>{H0.default.once("exit",()=>this.exit());for(let D of E6)try{H0.default.once(D,()=>this.exit(D))}catch{}},this.register=(D)=>{return this.callbacks.add(D),()=>{this.callbacks.delete(D)}},this.hook()}}var $6=new C6;var V7=$6.register,G6=V7;var ZD={store:{},create:(D)=>{let _=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),u=Date.now().toString().slice(-10),F="tmp-",B=`.tmp-${u}${_}`;return`${D}${B}`},get:(D,_,u=!0)=>{let F=ZD.truncate(_(D));if(F in ZD.store)return ZD.get(D,_,u);return ZD.store[F]=u,[F,()=>delete ZD.store[F]]},purge:(D)=>{if(!ZD.store[D])return;delete ZD.store[D],FD.attempt.unlink(D)},purgeSync:(D)=>{if(!ZD.store[D])return;delete ZD.store[D],FD.attempt.unlinkSync(D)},purgeSyncAll:()=>{for(let D in ZD.store)ZD.purgeSync(D)},truncate:(D)=>{let _=q6.default.basename(D);if(_.length<=K8)return D;let u=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(_);if(!u)return D;let F=_.length-K8;return`${D.slice(0,-_.length)}${u[1]}${u[2].slice(0,-F)}${u[3]}`}};G6(ZD.purgeSyncAll);var s0=ZD;function k2(D,_,u=t_){if(U8(u))return k2(D,_,{encoding:u});let F=Date.now()+((u.timeout??_6)||-1),B=null,E=null,C=null;try{let $=FD.attempt.realpathSync(D),q=!!$;D=$||D,[E,B]=s0.get(D,u.tmpCreate||s0.create,u.tmpPurge!==!1);let X=u6&&S2(u.chown),G=S2(u.mode);if(q&&(X||G)){let Z=FD.attempt.statSync(D);if(Z){if(u={...u},X)u.chown={uid:Z.uid,gid:Z.gid};if(G)u.mode=Z.mode}}if(!q){let Z=X6.default.dirname(D);FD.attempt.mkdirSync(Z,{mode:o_,recursive:!0})}if(C=FD.retry.openSync(F)(E,"w",u.mode||Q8),u.tmpCreated)u.tmpCreated(E);if(U8(_))FD.retry.writeSync(F)(C,_,0,u.encoding||r_);else if(!S2(_))FD.retry.writeSync(F)(C,_,0,_.length,0);if(u.fsync!==!1)if(u.fsyncWait!==!1)FD.retry.fsyncSync(F)(C);else FD.attempt.fsync(C);if(FD.retry.closeSync(F)(C),C=null,u.chown&&(u.chown.uid!==e_||u.chown.gid!==D6))FD.attempt.chownSync(E,u.chown.uid,u.chown.gid);if(u.mode&&u.mode!==Q8)FD.attempt.chmodSync(E,u.mode);try{FD.retry.renameSync(F)(E,D)}catch(Z){if(!F6(Z))throw Z;if(Z.code!=="ENAMETOOLONG")throw Z;FD.retry.renameSync(F)(E,s0.truncate(D))}B(),E=null}finally{if(C)FD.attempt.closeSync(C);if(E)s0.purge(E)}}var M0=(D)=>{let _=typeof D;return D!==null&&(_==="object"||_==="function")};var W8=new Set(["__proto__","prototype","constructor"]),L7=new Set("0123456789");function v2(D){let _=[],u="",F="start",B=!1;for(let E of D)switch(E){case"\\":{if(F==="index")throw new Error("Invalid character in an index");if(F==="indexEnd")throw new Error("Invalid character after an index");if(B)u+=E;F="property",B=!B;break}case".":{if(F==="index")throw new Error("Invalid character in an index");if(F==="indexEnd"){F="property";break}if(B){B=!1,u+=E;break}if(W8.has(u))return[];_.push(u),u="",F="property";break}case"[":{if(F==="index")throw new Error("Invalid character in an index");if(F==="indexEnd"){F="index";break}if(B){B=!1,u+=E;break}if(F==="property"){if(W8.has(u))return[];_.push(u),u=""}F="index";break}case"]":{if(F==="index"){_.push(Number.parseInt(u,10)),u="",F="indexEnd";break}if(F==="indexEnd")throw new Error("Invalid character after an index")}default:{if(F==="index"&&!L7.has(E))throw new Error("Invalid character in an index");if(F==="indexEnd")throw new Error("Invalid character after an index");if(F==="start")F="property";if(B)B=!1,u+="\\";u+=E}}if(B)u+="\\";switch(F){case"property":{if(W8.has(u))return[];_.push(u);break}case"index":throw new Error("Index was not closed");case"start":{_.push("");break}}return _}function A8(D,_){if(typeof _!=="number"&&Array.isArray(D)){let u=Number.parseInt(_,10);return Number.isInteger(u)&&D[u]===D[_]}return!1}function Z6(D,_){if(A8(D,_))throw new Error("Cannot use string index")}function J6(D,_,u){if(!M0(D)||typeof _!=="string")return u===void 0?D:u;let F=v2(_);if(F.length===0)return u;for(let B=0;B<F.length;B++){let E=F[B];if(A8(D,E))D=B===F.length-1?void 0:null;else D=D[E];if(D===void 0||D===null){if(B!==F.length-1)return u;break}}return D===void 0?u:D}function V8(D,_,u){if(!M0(D)||typeof _!=="string")return D;let F=D,B=v2(_);for(let E=0;E<B.length;E++){let C=B[E];if(Z6(D,C),E===B.length-1)D[C]=u;else if(!M0(D[C]))D[C]=typeof B[E+1]==="number"?[]:{};D=D[C]}return F}function Q6(D,_){if(!M0(D)||typeof _!=="string")return!1;let u=v2(_);for(let F=0;F<u.length;F++){let B=u[F];if(Z6(D,B),F===u.length-1)return delete D[B],!0;if(D=D[B],!M0(D))return!1}}function K6(D,_){if(!M0(D)||typeof _!=="string")return!1;let u=v2(_);if(u.length===0)return!1;for(let F of u){if(!M0(D)||!(F in D)||A8(D,F))return!1;D=D[F]}return!0}function I7(D,_){let u=_?P0.default.join(D,"config.json"):P0.default.join("configstore",`${D}.json`),F=w2??r0.default.mkdtempSync(r0.default.realpathSync(M6.default.tmpdir())+P0.default.sep);return P0.default.join(F,u)}var U6="You don't have access to this file.",R7={mode:448,recursive:!0},H6={mode:384};class b2{constructor(D,_,u={}){if(this._path=u.configPath??I7(D,u.globalConfigPath),_)this.all={..._,...this.all}}get all(){try{return JSON.parse(r0.default.readFileSync(this._path,"utf8"))}catch(D){if(D.code==="ENOENT")return{};if(D.code==="EACCES")D.message=`${D.message}
55
- ${U6}
56
- `;if(D.name==="SyntaxError")return k2(this._path,"",H6),{};throw D}}set all(D){try{r0.default.mkdirSync(P0.default.dirname(this._path),R7),k2(this._path,JSON.stringify(D,void 0,"\t"),H6)}catch(_){if(_.code==="EACCES")_.message=`${_.message}
57
- ${U6}
58
- `;throw _}}get size(){return Object.keys(this.all||{}).length}get(D){return J6(this.all,D)}set(D,_){let u=this.all;if(arguments.length===1)for(let F of Object.keys(D))V8(u,F,D[F]);else V8(u,D,_);this.all=u}has(D){return K6(this.all,D)}delete(D){let _=this.all;Q6(_,D),this.all=_}clear(){this.all={}}get path(){return this._path}}var r=new b2(j2.name,{users:[],mirror:"official",paths:["~/.minecraft"],lang:"en"});var W6=(D=0)=>(_)=>`\x1B[${_+D}m`,A6=(D=0)=>(_)=>`\x1B[${38+D};5;${_}m`,V6=(D=0)=>(_,u,F)=>`\x1B[${38+D};2;${_};${u};${F}m`,l={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]}},iC=Object.keys(l.modifier),N7=Object.keys(l.color),T7=Object.keys(l.bgColor),nC=[...N7,...T7];function j7(){let D=new Map;for(let[_,u]of Object.entries(l)){for(let[F,B]of Object.entries(u))l[F]={open:`\x1B[${B[0]}m`,close:`\x1B[${B[1]}m`},u[F]=l[F],D.set(B[0],B[1]);Object.defineProperty(l,_,{value:u,enumerable:!1})}return Object.defineProperty(l,"codes",{value:D,enumerable:!1}),l.color.close="\x1B[39m",l.bgColor.close="\x1B[49m",l.color.ansi=W6(),l.color.ansi256=A6(),l.color.ansi16m=V6(),l.bgColor.ansi=W6(10),l.bgColor.ansi256=A6(10),l.bgColor.ansi16m=V6(10),Object.defineProperties(l,{rgbToAnsi256:{value(_,u,F){if(_===u&&u===F){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(u/255*5)+Math.round(F/255*5)},enumerable:!1},hexToRgb:{value(_){let u=/[a-f\d]{6}|[a-f\d]{3}/i.exec(_.toString(16));if(!u)return[0,0,0];let[F]=u;if(F.length===3)F=[...F].map((E)=>E+E).join("");let B=Number.parseInt(F,16);return[B>>16&255,B>>8&255,B&255]},enumerable:!1},hexToAnsi256:{value:(_)=>l.rgbToAnsi256(...l.hexToRgb(_)),enumerable:!1},ansi256ToAnsi:{value(_){if(_<8)return 30+_;if(_<16)return 90+(_-8);let u,F,B;if(_>=232)u=((_-232)*10+8)/255,F=u,B=u;else{_-=16;let $=_%36;u=Math.floor(_/36)/5,F=Math.floor($/6)/5,B=$%6/5}let E=Math.max(u,F,B)*2;if(E===0)return 30;let C=30+(Math.round(B)<<2|Math.round(F)<<1|Math.round(u));if(E===2)C+=60;return C},enumerable:!1},rgbToAnsi:{value:(_,u,F)=>l.ansi256ToAnsi(l.rgbToAnsi256(_,u,F)),enumerable:!1},hexToAnsi:{value:(_)=>l.ansi256ToAnsi(l.hexToAnsi256(_)),enumerable:!1}}),l}var O7=j7(),LD=O7;var m2=x(require("node:process")),I6=x(require("node:os")),L8=x(require("node:tty"));function MD(D,_=globalThis.Deno?globalThis.Deno.args:m2.default.argv){let u=D.startsWith("-")?"":D.length===1?"-":"--",F=_.indexOf(u+D),B=_.indexOf("--");return F!==-1&&(B===-1||F<B)}var{env:o}=m2.default,h2;if(MD("no-color")||MD("no-colors")||MD("color=false")||MD("color=never"))h2=0;else if(MD("color")||MD("colors")||MD("color=true")||MD("color=always"))h2=1;function P7(){if("FORCE_COLOR"in o){if(o.FORCE_COLOR==="true")return 1;if(o.FORCE_COLOR==="false")return 0;return o.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(o.FORCE_COLOR,10),3)}}function z7(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function Y7(D,{streamIsTTY:_,sniffFlags:u=!0}={}){let F=P7();if(F!==void 0)h2=F;let B=u?h2:F;if(B===0)return 0;if(u){if(MD("color=16m")||MD("color=full")||MD("color=truecolor"))return 3;if(MD("color=256"))return 2}if("TF_BUILD"in o&&"AGENT_NAME"in o)return 1;if(D&&!_&&B===void 0)return 0;let E=B||0;if(o.TERM==="dumb")return E;if(m2.default.platform==="win32"){let C=I6.default.release().split(".");if(Number(C[0])>=10&&Number(C[2])>=10586)return Number(C[2])>=14931?3:2;return 1}if("CI"in o){if(["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((C)=>(C in o)))return 3;if(["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((C)=>(C in o))||o.CI_NAME==="codeship")return 1;return E}if("TEAMCITY_VERSION"in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0;if(o.COLORTERM==="truecolor")return 3;if(o.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in o){let C=Number.parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return C>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(o.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM))return 1;if("COLORTERM"in o)return 1;return E}function L6(D,_={}){let u=Y7(D,{streamIsTTY:D&&D.isTTY,..._});return z7(u)}var w7={stdout:L6({isTTY:L8.default.isatty(1)}),stderr:L6({isTTY:L8.default.isatty(2)})},R6=w7;function N6(D,_,u){let F=D.indexOf(_);if(F===-1)return D;let B=_.length,E=0,C="";do C+=D.slice(E,F)+_+u,E=F+B,F=D.indexOf(_,E);while(F!==-1);return C+=D.slice(E),C}function T6(D,_,u,F){let B=0,E="";do{let C=D[F-1]==="\r";E+=D.slice(B,C?F-1:F)+_+(C?`\r
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
59
  `:`
60
- `)+u,B=F+1,F=D.indexOf(`
61
- `,B)}while(F!==-1);return E+=D.slice(B),E}var{stdout:j6,stderr:O6}=R6,I8=Symbol("GENERATOR"),z0=Symbol("STYLER"),o0=Symbol("IS_EMPTY"),P6=["ansi","ansi","ansi256","ansi16m"],Y0=Object.create(null),x7=(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 u=j6?j6.level:0;D.level=_.level===void 0?u:_.level};var S7=(D)=>{let _=(...u)=>u.join(" ");return x7(_,D),Object.setPrototypeOf(_,t0.prototype),_};function t0(D){return S7(D)}Object.setPrototypeOf(t0.prototype,Function.prototype);for(let[D,_]of Object.entries(LD))Y0[D]={get(){let u=d2(this,N8(_.open,_.close,this[z0]),this[o0]);return Object.defineProperty(this,D,{value:u}),u}};Y0.visible={get(){let D=d2(this,this[z0],!0);return Object.defineProperty(this,"visible",{value:D}),D}};var R8=(D,_,u,...F)=>{if(D==="rgb"){if(_==="ansi16m")return LD[u].ansi16m(...F);if(_==="ansi256")return LD[u].ansi256(LD.rgbToAnsi256(...F));return LD[u].ansi(LD.rgbToAnsi(...F))}if(D==="hex")return R8("rgb",_,u,...LD.hexToRgb(...F));return LD[u][D](...F)},y7=["rgb","hex","ansi256"];for(let D of y7){Y0[D]={get(){let{level:u}=this;return function(...F){let B=N8(R8(D,P6[u],"color",...F),LD.color.close,this[z0]);return d2(this,B,this[o0])}}};let _="bg"+D[0].toUpperCase()+D.slice(1);Y0[_]={get(){let{level:u}=this;return function(...F){let B=N8(R8(D,P6[u],"bgColor",...F),LD.bgColor.close,this[z0]);return d2(this,B,this[o0])}}}}var k7=Object.defineProperties(()=>{},{...Y0,level:{enumerable:!0,get(){return this[I8].level},set(D){this[I8].level=D}}}),N8=(D,_,u)=>{let F,B;if(u===void 0)F=D,B=_;else F=u.openAll+D,B=_+u.closeAll;return{open:D,close:_,openAll:F,closeAll:B,parent:u}},d2=(D,_,u)=>{let F=(...B)=>v7(F,B.length===1?""+B[0]:B.join(" "));return Object.setPrototypeOf(F,k7),F[I8]=D,F[z0]=_,F[o0]=u,F},v7=(D,_)=>{if(D.level<=0||!_)return D[o0]?"":_;let u=D[z0];if(u===void 0)return _;let{openAll:F,closeAll:B}=u;if(_.includes("\x1B"))while(u!==void 0)_=N6(_,u.close,u.open),u=u.parent;let E=_.indexOf(`
62
- `);if(E!==-1)_=T6(_,B,F,E);return F+_+B};Object.defineProperties(t0.prototype,Y0);var b7=t0(),D$=t0({level:O6?O6.level:0});var O=b7;var B5=x(require("fs")),E5=x(F5());function Gu(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 w8{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 E5.SingleBar({format(u,F,B){let E=u.barCompleteChar.repeat(B.finishedPercent*20)+u.barIncompleteChar.repeat((1-B.finishedPercent)*20);return`${B.title} | ${E} | ${(B.finishedPercent*100).toFixed(1)}% | ${B.completed}/${B.totalTasks} | ${B.speed}`+(_?.totalSize?` | tot:${Gu(_?.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"],u=D,F=0;while(u>=1024&&F<_.length-1)u/=1024,F++;return`${u.toFixed(2)} ${_[F]}`}updateProgress(D=!1){let _=Array.from(this.activeDownloads.keys()),u=this.downloadedSize/((Date.now()-this.startTime)/1000);this.progressBar.update(this.completedTasks,{title:D?O.green("Done"):_.length>0?`Downloading: (${_.length} active)`:"Preparing...",speed:this.formatSpeed(u),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)/u:0})}async downloadFile(D){try{let _=await fetch(D.url);if(!_.ok)throw new Error(`HTTP ${_.status}`);let u=B5.createWriteStream(D.filename);u.on("error",(C)=>{throw C});let F=_.body?.getReader();if(!F)throw new Error("No readable stream");let B=0,E=Date.now();while(!0){let{done:C,value:$}=await F.read();if(C)break;u.write($),B+=$.length,this.downloadedSize+=$.length;let q=(Date.now()-E)/1000+0.01;this.activeDownloads.set(D.filename,q>0?B/q:0)}u.end(),this.completedTasks++}catch(_){if((D.retries||20)>0)console.error(`♻️❌ ${D.filename}(retrying): ${_.message}`),await new Promise((u)=>setTimeout(u,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 f2={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 qu(D,_,u){return D.replace(f2.official[u],f2[_][u])}function w0(D){for(let _ of Object.keys(f2.official))if(D.startsWith(f2.official[_]))return qu(D,r.get("mirror"),_);return D}var f=x(require("node:fs")),C0=x(require("node:path"));var C5={selectedProfile:"(Default)",profiles:{"(Default)":{name:"(Default)"}},clientToken:"88888888-8888-8888-8888-888888888888"};var e0=x(require("node:os")),X5=x(require("node:path")),Z5=x(x8());function J5(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 JD(D){if(D.startsWith("~/"))return X5.join(e0.homedir(),D.slice(2));return D}function x0(){if(e0.platform()==="win32")return"windows";else if(e0.platform()==="darwin")return"osx";else return"linux"}function Q5(){let D=Z5.default();if(D==="x64")return"";else return"-"+D}function c2(D,_={}){for(let u of D){let F=!0;if(u.os){let B=u.os,E=_.os||{};if(B.name&&E.name!==B.name)F=!1;if(B.version){if(!new RegExp(B.version).test(E.version||""))F=!1}if(B.arch&&E.arch!==B.arch)F=!1}if(u.features){let B=u.features;for(let[E,C]of Object.entries(B))if(_[E]!==C){F=!1;break}}if(F)return u.action==="allow"}return!1}var i4=x(A4());function V4(D,_,u,F){let B,E,C,$=_||[0],q=(u=u||0)>>>3,X=F===-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*(X+F*(C%4));return{value:$,binLen:8*D.length+u}}function b0(D,_,u){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(F,B,E){return function(C,$,q,X){let G,Z,J,K;if(C.length%2!=0)throw new Error("String of HEX type must be in byte increments");let Q=$||[0],M=(q=q||0)>>>3,W=X===-1?3:0;for(G=0;G<C.length;G+=2){if(Z=parseInt(C.substr(G,2),16),isNaN(Z))throw new Error("String of HEX type contains invalid characters");for(K=(G>>>1)+M,J=K>>>2;Q.length<=J;)Q.push(0);Q[J]|=Z<<8*(W+X*(K%4))}return{value:Q,binLen:4*C.length+q}}(F,B,E,u)};case"TEXT":return function(F,B,E){return function(C,$,q,X,G){let Z,J,K,Q,M,W,V,L,T=0,S=q||[0],j=(X=X||0)>>>3;if($==="UTF8")for(V=G===-1?3:0,K=0;K<C.length;K+=1)for(Z=C.charCodeAt(K),J=[],128>Z?J.push(Z):2048>Z?(J.push(192|Z>>>6),J.push(128|63&Z)):55296>Z||57344<=Z?J.push(224|Z>>>12,128|Z>>>6&63,128|63&Z):(K+=1,Z=65536+((1023&Z)<<10|1023&C.charCodeAt(K)),J.push(240|Z>>>18,128|Z>>>12&63,128|Z>>>6&63,128|63&Z)),Q=0;Q<J.length;Q+=1){for(W=T+j,M=W>>>2;S.length<=M;)S.push(0);S[M]|=J[Q]<<8*(V+G*(W%4)),T+=1}else for(V=G===-1?2:0,L=$==="UTF16LE"&&G!==1||$!=="UTF16LE"&&G===1,K=0;K<C.length;K+=1){for(Z=C.charCodeAt(K),L===!0&&(Q=255&Z,Z=Q<<8|Z>>>8),W=T+j,M=W>>>2;S.length<=M;)S.push(0);S[M]|=Z<<8*(V+G*(W%4)),T+=2}return{value:S,binLen:8*T+X}}(F,_,B,E,u)};case"B64":return function(F,B,E){return function(C,$,q,X){let G,Z,J,K,Q,M,W,V=0,L=$||[0],T=(q=q||0)>>>3,S=X===-1?3:0,j=C.indexOf("=");if(C.search(/^[a-zA-Z0-9=+/]+$/)===-1)throw new Error("Invalid character in base-64 string");if(C=C.replace(/=/g,""),j!==-1&&j<C.length)throw new Error("Invalid '=' found in base-64 string");for(Z=0;Z<C.length;Z+=4){for(Q=C.substr(Z,4),K=0,J=0;J<Q.length;J+=1)G="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(Q.charAt(J)),K|=G<<18-6*J;for(J=0;J<Q.length-1;J+=1){for(W=V+T,M=W>>>2;L.length<=M;)L.push(0);L[M]|=(K>>>16-8*J&255)<<8*(S+X*(W%4)),V+=1}}return{value:L,binLen:8*V+q}}(F,B,E,u)};case"BYTES":return function(F,B,E){return function(C,$,q,X){let G,Z,J,K,Q=$||[0],M=(q=q||0)>>>3,W=X===-1?3:0;for(Z=0;Z<C.length;Z+=1)G=C.charCodeAt(Z),K=Z+M,J=K>>>2,Q.length<=J&&Q.push(0),Q[J]|=G<<8*(W+X*(K%4));return{value:Q,binLen:8*C.length+q}}(F,B,E,u)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(F){throw new Error("ARRAYBUFFER not supported by this environment")}return function(F,B,E){return function(C,$,q,X){return V4(new Uint8Array(C),$,q,X)}(F,B,E,u)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(F){throw new Error("UINT8ARRAY not supported by this environment")}return function(F,B,E){return V4(F,B,E,u)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function L4(D,_,u,F){switch(D){case"HEX":return function(B){return function(E,C,$,q){let G,Z,J="",K=C/8,Q=$===-1?3:0;for(G=0;G<K;G+=1)Z=E[G>>>2]>>>8*(Q+$*(G%4)),J+="0123456789abcdef".charAt(Z>>>4&15)+"0123456789abcdef".charAt(15&Z);return q.outputUpper?J.toUpperCase():J}(B,_,u,F)};case"B64":return function(B){return function(E,C,$,q){let X,G,Z,J,K,Q="",M=C/8,W=$===-1?3:0;for(X=0;X<M;X+=3)for(J=X+1<M?E[X+1>>>2]:0,K=X+2<M?E[X+2>>>2]:0,Z=(E[X>>>2]>>>8*(W+$*(X%4))&255)<<16|(J>>>8*(W+$*((X+1)%4))&255)<<8|K>>>8*(W+$*((X+2)%4))&255,G=0;G<4;G+=1)Q+=8*X+6*G<=C?"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Z>>>6*(3-G)&63):q.b64Pad;return Q}(B,_,u,F)};case"BYTES":return function(B){return function(E,C,$){let q,X,G="",Z=C/8,J=$===-1?3:0;for(q=0;q<Z;q+=1)X=E[q>>>2]>>>8*(J+$*(q%4))&255,G+=String.fromCharCode(X);return G}(B,_,u)};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,X=C/8,G=new ArrayBuffer(X),Z=new Uint8Array(G),J=$===-1?3:0;for(q=0;q<X;q+=1)Z[q]=E[q>>>2]>>>8*(J+$*(q%4))&255;return G}(B,_,u)};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,X=C/8,G=$===-1?3:0,Z=new Uint8Array(X);for(q=0;q<X;q+=1)Z[q]=E[q>>>2]>>>8*(G+$*(q%4))&255;return Z}(B,_,u)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}var q2=4294967296,I=[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],lD=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],iD=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],X2="Chosen SHA variant is not supported",Y4="Cannot set numRounds with MAC";function U3(D,_){let u,F,B=D.binLen>>>3,E=_.binLen>>>3,C=B<<3,$=4-B<<3;if(B%4!=0){for(u=0;u<E;u+=4)F=B+u>>>2,D.value[F]|=_.value[u>>>2]<<C,D.value.push(0),D.value[F+1]|=_.value[u>>>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 I4(D){let _={outputUpper:!1,b64Pad:"=",outputLen:-1},u=D||{};if(_.outputUpper=u.outputUpper||!1,u.b64Pad&&(_.b64Pad=u.b64Pad),u.outputLen){if(u.outputLen%8!=0)throw new Error("Output length must be a multiple of 8");_.outputLen=u.outputLen}else if(u.shakeLen){if(u.shakeLen%8!=0)throw new Error("Output length must be a multiple of 8");_.outputLen=u.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 E0(D,_,u,F){let B=D+" must include a value and format";if(!_){if(!F)throw new Error(B);return F}if(_.value===void 0||!_.format)throw new Error(B);return b0(_.format,_.encoding||"UTF8",u)(_.value)}class Z2{constructor(D,_,u){let F=u||{};if(this.t=_,this.i=F.encoding||"UTF8",this.numRounds=F.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 _,u=0,F=this.m>>>5,B=this.C(D,this.h,this.u),E=B.binLen,C=B.value,$=E>>>5;for(_=0;_<$;_+=F)u+this.m<=E&&(this.U=this.v(C.slice(_,_+F),this.U),u+=this.m);return this.A+=u,this.h=C.slice(u>>>5),this.u=E%this.m,this.l=!0,this}getHash(D,_){let u,F,B=this.R,E=I4(_);if(this.K){if(E.outputLen===-1)throw new Error("Output length must be specified in options");B=E.outputLen}let C=L4(D,B,this.T,E);if(this.H&&this.g)return C(this.g(E));for(F=this.F(this.h.slice(),this.u,this.A,this.L(this.U),B),u=1;u<this.numRounds;u+=1)this.K&&B%32!=0&&(F[F.length-1]&=16777215>>>24-B%32),F=this.F(F,B,0,this.B(this.o),B);return C(F)}setHMACKey(D,_,u){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 F=b0(_,(u||{}).encoding||"UTF8",this.T);this.k(F(D))}k(D){let _=this.m>>>3,u=_/4-1,F;if(this.numRounds!==1)throw new Error(Y4);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<=u;)D.value.push(0);for(F=0;F<=u;F+=1)this.S[F]=909522486^D.value[F],this.p[F]=1549556828^D.value[F];this.U=this.v(this.S,this.U),this.A=this.m,this.H=!0}getHMAC(D,_){let u=I4(_);return L4(D,this.R,this.T,u)(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 v0(D,_){return D<<_|D>>>32-_}function xD(D,_){return D>>>_|D<<32-_}function w4(D,_){return D>>>_}function R4(D,_,u){return D^_^u}function x4(D,_,u){return D&_^~D&u}function S4(D,_,u){return D&_^D&u^_&u}function XF(D){return xD(D,2)^xD(D,13)^xD(D,22)}function $D(D,_){let u=(65535&D)+(65535&_);return(65535&(D>>>16)+(_>>>16)+(u>>>16))<<16|65535&u}function ZF(D,_,u,F){let B=(65535&D)+(65535&_)+(65535&u)+(65535&F);return(65535&(D>>>16)+(_>>>16)+(u>>>16)+(F>>>16)+(B>>>16))<<16|65535&B}function G2(D,_,u,F,B){let E=(65535&D)+(65535&_)+(65535&u)+(65535&F)+(65535&B);return(65535&(D>>>16)+(_>>>16)+(u>>>16)+(F>>>16)+(B>>>16)+(E>>>16))<<16|65535&E}function JF(D){return xD(D,7)^xD(D,18)^w4(D,3)}function QF(D){return xD(D,6)^xD(D,11)^xD(D,25)}function KF(D){return[1732584193,4023233417,2562383102,271733878,3285377520]}function y4(D,_){let u,F,B,E,C,$,q,X=[];for(u=_[0],F=_[1],B=_[2],E=_[3],C=_[4],q=0;q<80;q+=1)X[q]=q<16?D[q]:v0(X[q-3]^X[q-8]^X[q-14]^X[q-16],1),$=q<20?G2(v0(u,5),x4(F,B,E),C,1518500249,X[q]):q<40?G2(v0(u,5),R4(F,B,E),C,1859775393,X[q]):q<60?G2(v0(u,5),S4(F,B,E),C,2400959708,X[q]):G2(v0(u,5),R4(F,B,E),C,3395469782,X[q]),C=E,E=B,B=v0(F,30),F=u,u=$;return _[0]=$D(u,_[0]),_[1]=$D(F,_[1]),_[2]=$D(B,_[2]),_[3]=$D(E,_[3]),_[4]=$D(C,_[4]),_}function UF(D,_,u,F){let B,E=15+(_+65>>>9<<4),C=_+u;for(;D.length<=E;)D.push(0);for(D[_>>>5]|=128<<24-_%32,D[E]=4294967295&C,D[E-1]=C/q2|0,B=0;B<D.length;B+=16)F=y4(D.slice(B,B+16),F);return F}var HF=class extends Z2{constructor(D,_,u){if(D!=="SHA-1")throw new Error(X2);super(D,_,u);let F=u||{};this.M=!0,this.g=this.Y,this.T=-1,this.C=b0(this.t,this.i,this.T),this.v=y4,this.L=function(B){return B.slice()},this.B=KF,this.F=UF,this.U=[1732584193,4023233417,2562383102,271733878,3285377520],this.m=512,this.R=160,this.K=!1,F.hmacKey&&this.k(E0("hmacKey",F.hmacKey,this.T))}};function N4(D){let _;return _=D=="SHA-224"?lD.slice():iD.slice(),_}function T4(D,_){let u,F,B,E,C,$,q,X,G,Z,J,K=[];for(u=_[0],F=_[1],B=_[2],E=_[3],C=_[4],$=_[5],q=_[6],X=_[7],J=0;J<64;J+=1)K[J]=J<16?D[J]:ZF(xD(Q=K[J-2],17)^xD(Q,19)^w4(Q,10),K[J-7],JF(K[J-15]),K[J-16]),G=G2(X,QF(C),x4(C,$,q),I[J],K[J]),Z=$D(XF(u),S4(u,F,B)),X=q,q=$,$=C,C=$D(E,G),E=B,B=F,F=u,u=$D(G,Z);var Q;return _[0]=$D(u,_[0]),_[1]=$D(F,_[1]),_[2]=$D(B,_[2]),_[3]=$D(E,_[3]),_[4]=$D(C,_[4]),_[5]=$D($,_[5]),_[6]=$D(q,_[6]),_[7]=$D(X,_[7]),_}var MF=class extends Z2{constructor(D,_,u){if(D!=="SHA-224"&&D!=="SHA-256")throw new Error(X2);super(D,_,u);let F=u||{};this.g=this.Y,this.M=!0,this.T=-1,this.C=b0(this.t,this.i,this.T),this.v=T4,this.L=function(B){return B.slice()},this.B=N4,this.F=function(B,E,C,$){return function(q,X,G,Z,J){let K,Q,M=15+(X+65>>>9<<4),W=X+G;for(;q.length<=M;)q.push(0);for(q[X>>>5]|=128<<24-X%32,q[M]=4294967295&W,q[M-1]=W/q2|0,K=0;K<q.length;K+=16)Z=T4(q.slice(K,K+16),Z);return Q=J==="SHA-224"?[Z[0],Z[1],Z[2],Z[3],Z[4],Z[5],Z[6]]:Z,Q}(B,E,C,$,D)},this.U=N4(D),this.m=512,this.R=D==="SHA-224"?224:256,this.K=!1,F.hmacKey&&this.k(E0("hmacKey",F.hmacKey,this.T))}};class U{constructor(D,_){this.N=D,this.I=_}}function j4(D,_){let u;return _>32?(u=64-_,new U(D.I<<_|D.N>>>u,D.N<<_|D.I>>>u)):_!==0?(u=32-_,new U(D.N<<_|D.I>>>u,D.I<<_|D.N>>>u)):D}function SD(D,_){let u;return _<32?(u=32-_,new U(D.N>>>_|D.I<<u,D.I>>>_|D.N<<u)):(u=64-_,new U(D.I>>>_|D.N<<u,D.N>>>_|D.I<<u))}function k4(D,_){return new U(D.N>>>_,D.I>>>_|D.N<<32-_)}function WF(D,_,u){return new U(D.N&_.N^D.N&u.N^_.N&u.N,D.I&_.I^D.I&u.I^_.I&u.I)}function AF(D){let _=SD(D,28),u=SD(D,34),F=SD(D,39);return new U(_.N^u.N^F.N,_.I^u.I^F.I)}function OD(D,_){let u,F;u=(65535&D.I)+(65535&_.I),F=(D.I>>>16)+(_.I>>>16)+(u>>>16);let B=(65535&F)<<16|65535&u;return u=(65535&D.N)+(65535&_.N)+(F>>>16),F=(D.N>>>16)+(_.N>>>16)+(u>>>16),new U((65535&F)<<16|65535&u,B)}function VF(D,_,u,F){let B,E;B=(65535&D.I)+(65535&_.I)+(65535&u.I)+(65535&F.I),E=(D.I>>>16)+(_.I>>>16)+(u.I>>>16)+(F.I>>>16)+(B>>>16);let C=(65535&E)<<16|65535&B;return B=(65535&D.N)+(65535&_.N)+(65535&u.N)+(65535&F.N)+(E>>>16),E=(D.N>>>16)+(_.N>>>16)+(u.N>>>16)+(F.N>>>16)+(B>>>16),new U((65535&E)<<16|65535&B,C)}function LF(D,_,u,F,B){let E,C;E=(65535&D.I)+(65535&_.I)+(65535&u.I)+(65535&F.I)+(65535&B.I),C=(D.I>>>16)+(_.I>>>16)+(u.I>>>16)+(F.I>>>16)+(B.I>>>16)+(E>>>16);let $=(65535&C)<<16|65535&E;return E=(65535&D.N)+(65535&_.N)+(65535&u.N)+(65535&F.N)+(65535&B.N)+(C>>>16),C=(D.N>>>16)+(_.N>>>16)+(u.N>>>16)+(F.N>>>16)+(B.N>>>16)+(E>>>16),new U((65535&C)<<16|65535&E,$)}function $2(D,_){return new U(D.N^_.N,D.I^_.I)}function IF(D){let _=SD(D,19),u=SD(D,61),F=k4(D,6);return new U(_.N^u.N^F.N,_.I^u.I^F.I)}function RF(D){let _=SD(D,1),u=SD(D,8),F=k4(D,7);return new U(_.N^u.N^F.N,_.I^u.I^F.I)}function NF(D){let _=SD(D,14),u=SD(D,18),F=SD(D,41);return new U(_.N^u.N^F.N,_.I^u.I^F.I)}var TF=[new U(I[0],3609767458),new U(I[1],602891725),new U(I[2],3964484399),new U(I[3],2173295548),new U(I[4],4081628472),new U(I[5],3053834265),new U(I[6],2937671579),new U(I[7],3664609560),new U(I[8],2734883394),new U(I[9],1164996542),new U(I[10],1323610764),new U(I[11],3590304994),new U(I[12],4068182383),new U(I[13],991336113),new U(I[14],633803317),new U(I[15],3479774868),new U(I[16],2666613458),new U(I[17],944711139),new U(I[18],2341262773),new U(I[19],2007800933),new U(I[20],1495990901),new U(I[21],1856431235),new U(I[22],3175218132),new U(I[23],2198950837),new U(I[24],3999719339),new U(I[25],766784016),new U(I[26],2566594879),new U(I[27],3203337956),new U(I[28],1034457026),new U(I[29],2466948901),new U(I[30],3758326383),new U(I[31],168717936),new U(I[32],1188179964),new U(I[33],1546045734),new U(I[34],1522805485),new U(I[35],2643833823),new U(I[36],2343527390),new U(I[37],1014477480),new U(I[38],1206759142),new U(I[39],344077627),new U(I[40],1290863460),new U(I[41],3158454273),new U(I[42],3505952657),new U(I[43],106217008),new U(I[44],3606008344),new U(I[45],1432725776),new U(I[46],1467031594),new U(I[47],851169720),new U(I[48],3100823752),new U(I[49],1363258195),new U(I[50],3750685593),new U(I[51],3785050280),new U(I[52],3318307427),new U(I[53],3812723403),new U(I[54],2003034995),new U(I[55],3602036899),new U(I[56],1575990012),new U(I[57],1125592928),new U(I[58],2716904306),new U(I[59],442776044),new U(I[60],593698344),new U(I[61],3733110249),new U(I[62],2999351573),new U(I[63],3815920427),new U(3391569614,3928383900),new U(3515267271,566280711),new U(3940187606,3454069534),new U(4118630271,4000239992),new U(116418474,1914138554),new U(174292421,2731055270),new U(289380356,3203993006),new U(460393269,320620315),new U(685471733,587496836),new U(852142971,1086792851),new U(1017036298,365543100),new U(1126000580,2618297676),new U(1288033470,3409855158),new U(1501505948,4234509866),new U(1607167915,987167468),new U(1816402316,1246189591)];function O4(D){return D==="SHA-384"?[new U(3418070365,lD[0]),new U(1654270250,lD[1]),new U(2438529370,lD[2]),new U(355462360,lD[3]),new U(1731405415,lD[4]),new U(41048885895,lD[5]),new U(3675008525,lD[6]),new U(1203062813,lD[7])]:[new U(iD[0],4089235720),new U(iD[1],2227873595),new U(iD[2],4271175723),new U(iD[3],1595750129),new U(iD[4],2917565137),new U(iD[5],725511199),new U(iD[6],4215389547),new U(iD[7],327033209)]}function P4(D,_){let u,F,B,E,C,$,q,X,G,Z,J,K,Q=[];for(u=_[0],F=_[1],B=_[2],E=_[3],C=_[4],$=_[5],q=_[6],X=_[7],J=0;J<80;J+=1)J<16?(K=2*J,Q[J]=new U(D[K],D[K+1])):Q[J]=VF(IF(Q[J-2]),Q[J-7],RF(Q[J-15]),Q[J-16]),G=LF(X,NF(C),(W=$,V=q,new U((M=C).N&W.N^~M.N&V.N,M.I&W.I^~M.I&V.I)),TF[J],Q[J]),Z=OD(AF(u),WF(u,F,B)),X=q,q=$,$=C,C=OD(E,G),E=B,B=F,F=u,u=OD(G,Z);var M,W,V;return _[0]=OD(u,_[0]),_[1]=OD(F,_[1]),_[2]=OD(B,_[2]),_[3]=OD(E,_[3]),_[4]=OD(C,_[4]),_[5]=OD($,_[5]),_[6]=OD(q,_[6]),_[7]=OD(X,_[7]),_}var jF=class extends Z2{constructor(D,_,u){if(D!=="SHA-384"&&D!=="SHA-512")throw new Error(X2);super(D,_,u);let F=u||{};this.g=this.Y,this.M=!0,this.T=-1,this.C=b0(this.t,this.i,this.T),this.v=P4,this.L=function(B){return B.slice()},this.B=O4,this.F=function(B,E,C,$){return function(q,X,G,Z,J){let K,Q,M=31+(X+129>>>10<<5),W=X+G;for(;q.length<=M;)q.push(0);for(q[X>>>5]|=128<<24-X%32,q[M]=4294967295&W,q[M-1]=W/q2|0,K=0;K<q.length;K+=32)Z=P4(q.slice(K,K+32),Z);return Q=J==="SHA-384"?[Z[0].N,Z[0].I,Z[1].N,Z[1].I,Z[2].N,Z[2].I,Z[3].N,Z[3].I,Z[4].N,Z[4].I,Z[5].N,Z[5].I]:[Z[0].N,Z[0].I,Z[1].N,Z[1].I,Z[2].N,Z[2].I,Z[3].N,Z[3].I,Z[4].N,Z[4].I,Z[5].N,Z[5].I,Z[6].N,Z[6].I,Z[7].N,Z[7].I],Q}(B,E,C,$,D)},this.U=O4(D),this.m=1024,this.R=D==="SHA-384"?384:512,this.K=!1,F.hmacKey&&this.k(E0("hmacKey",F.hmacKey,this.T))}},OF=[new U(0,1),new U(0,32898),new U(2147483648,32906),new U(2147483648,2147516416),new U(0,32907),new U(0,2147483649),new U(2147483648,2147516545),new U(2147483648,32777),new U(0,138),new U(0,136),new U(0,2147516425),new U(0,2147483658),new U(0,2147516555),new U(2147483648,139),new U(2147483648,32905),new U(2147483648,32771),new U(2147483648,32770),new U(2147483648,128),new U(0,32778),new U(2147483648,2147483658),new U(2147483648,2147516545),new U(2147483648,32896),new U(0,2147483649),new U(2147483648,2147516424)],PF=[[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 F1(D){let _,u=[];for(_=0;_<5;_+=1)u[_]=[new U(0,0),new U(0,0),new U(0,0),new U(0,0),new U(0,0)];return u}function zF(D){let _,u=[];for(_=0;_<5;_+=1)u[_]=D[_].slice();return u}function K3(D,_){let u,F,B,E,C=[],$=[];if(D!==null)for(F=0;F<D.length;F+=2)_[(F>>>1)%5][(F>>>1)/5|0]=$2(_[(F>>>1)%5][(F>>>1)/5|0],new U(D[F+1],D[F]));for(u=0;u<24;u+=1){for(E=F1(),F=0;F<5;F+=1)C[F]=(q=_[F][0],X=_[F][1],G=_[F][2],Z=_[F][3],J=_[F][4],new U(q.N^X.N^G.N^Z.N^J.N,q.I^X.I^G.I^Z.I^J.I));for(F=0;F<5;F+=1)$[F]=$2(C[(F+4)%5],j4(C[(F+1)%5],1));for(F=0;F<5;F+=1)for(B=0;B<5;B+=1)_[F][B]=$2(_[F][B],$[F]);for(F=0;F<5;F+=1)for(B=0;B<5;B+=1)E[B][(2*F+3*B)%5]=j4(_[F][B],PF[F][B]);for(F=0;F<5;F+=1)for(B=0;B<5;B+=1)_[F][B]=$2(E[F][B],new U(~E[(F+1)%5][B].N&E[(F+2)%5][B].N,~E[(F+1)%5][B].I&E[(F+2)%5][B].I));_[0][0]=$2(_[0][0],OF[u])}var q,X,G,Z,J;return _}function v4(D){let _,u,F=0,B=[0,0],E=[4294967295&D,D/q2&2097151];for(_=6;_>=0;_--)u=E[_>>2]>>>8*_&255,u===0&&F===0||(B[F+1>>2]|=u<<8*(F+1),F+=1);return F=F!==0?F:1,B[0]|=F,{value:F+1>4?B:[B[0]],binLen:8+8*F}}function u1(D){return U3(v4(D.binLen),D)}function z4(D,_){let u,F=v4(_);F=U3(F,D);let B=_>>>2,E=(B-F.value.length%B)%B;for(u=0;u<E;u++)F.value.push(0);return F.value}var YF=class extends Z2{constructor(D,_,u){let F=6,B=0;super(D,_,u);let E=u||{};if(this.numRounds!==1){if(E.kmacKey||E.hmacKey)throw new Error(Y4);if(this.o==="CSHAKE128"||this.o==="CSHAKE256")throw new Error("Cannot set numRounds for CSHAKE variants")}switch(this.T=1,this.C=b0(this.t,this.i,this.T),this.v=K3,this.L=zF,this.B=F1,this.U=F1(),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":F=31,this.m=B=1344,this.R=-1,this.K=!0,this.M=!1,this.g=null;break;case"SHAKE256":F=31,this.m=B=1088,this.R=-1,this.K=!0,this.M=!1,this.g=null;break;case"KMAC128":F=4,this.m=B=1344,this.X(u),this.R=-1,this.K=!0,this.M=!1,this.g=this._;break;case"KMAC256":F=4,this.m=B=1088,this.X(u),this.R=-1,this.K=!0,this.M=!1,this.g=this._;break;case"CSHAKE128":this.m=B=1344,F=this.O(u),this.R=-1,this.K=!0,this.M=!1,this.g=null;break;case"CSHAKE256":this.m=B=1088,F=this.O(u),this.R=-1,this.K=!0,this.M=!1,this.g=null;break;default:throw new Error(X2)}this.F=function(C,$,q,X,G){return function(Z,J,K,Q,M,W,V){let L,T,S=0,j=[],v=M>>>5,DD=J>>>5;for(L=0;L<DD&&J>=M;L+=v)Q=K3(Z.slice(L,L+v),Q),J-=M;for(Z=Z.slice(L),J%=M;Z.length<v;)Z.push(0);for(L=J>>>3,Z[L>>2]^=W<<L%4*8,Z[v-1]^=2147483648,Q=K3(Z,Q);32*j.length<V&&(T=Q[S%5][S/5|0],j.push(T.I),!(32*j.length>=V));)j.push(T.N),S+=1,64*S%M==0&&(K3(null,Q),S=0);return j}(C,$,0,X,B,F,G)},E.hmacKey&&this.k(E0("hmacKey",E.hmacKey,this.T))}O(D,_){let u=function(B){let E=B||{};return{funcName:E0("funcName",E.funcName,1,{value:[],binLen:0}),customization:E0("Customization",E.customization,1,{value:[],binLen:0})}}(D||{});_&&(u.funcName=_);let F=U3(u1(u.funcName),u1(u.customization));if(u.customization.binLen!==0||u.funcName.binLen!==0){let B=z4(F,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(F){let B=F||{};return{kmacKey:E0("kmacKey",B.kmacKey,1),funcName:{value:[1128353099],binLen:32},customization:E0("Customization",B.customization,1,{value:[],binLen:0})}}(D||{});this.O(D,_.funcName);let u=z4(u1(_.kmacKey),this.m>>>3);for(let F=0;F<u.length;F+=this.m>>>5)this.U=this.v(u.slice(F,F+(this.m>>>5)),this.U),this.A+=this.m;this.H=!0}_(D){let _=U3({value:this.h.slice(),binLen:this.u},function(u){let F,B,E=0,C=[0,0],$=[4294967295&u,u/q2&2097151];for(F=6;F>=0;F--)B=$[F>>2]>>>8*F&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 B1{constructor(D,_,u){if(D=="SHA-1")this.P=new HF(D,_,u);else if(D=="SHA-224"||D=="SHA-256")this.P=new MF(D,_,u);else if(D=="SHA-384"||D=="SHA-512")this.P=new jF(D,_,u);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(X2);this.P=new YF(D,_,u)}}update(D){return this.P.update(D),this}getHash(D,_){return this.P.getHash(D,_)}setHMACKey(D,_,u){this.P.setHMACKey(D,_,u)}getHMAC(D,_){return this.P.getHMAC(D,_)}}var n4=require("node:child_process"),W3=x(x8()),A3=require("node:os");var b4=`<?xml version="1.0" encoding="UTF-8"?>
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
63
  <Configuration status="WARN">
64
64
  <Appenders>
65
65
  <Console name="SysOut" target="SYSTEM_OUT">
@@ -85,4 +85,4 @@ ${U6}
85
85
  <AppenderRef ref="File"/>
86
86
  </Root>
87
87
  </Loggers>
88
- </Configuration>`;var h4=require("node:crypto");function m4(D){let _=r.get("users");_.push(D),r.set("users",_)}function d4(D){let _=r.get("users"),u=_.findIndex((F)=>F.uuid===D.uuid);if(u!==-1)_.splice(u,1),r.set("users",_)}function H3(){return r.get("users")}function g4(D){let _=h4.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 f4(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 E1={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 c4={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 M3={en:E1,"zh-CN":c4},p4=E1;function l4(D){p4=D}function H(D,..._){let u=p4[D]||D;for(let F=0;F<_.length;F++)u=u.replace(`$${F+1}`,_[F]);return u}async function a4(){let D=w0("https://launchermeta.mojang.com/mc/game/version_manifest.json");return(await(await fetch(D)).json()).versions}function nD(D){if(!f.existsSync(D))f.mkdirSync(D,{recursive:!0})}async function SF(D,_,u){let{assets:F,assetIndex:B}=D,E=0,C=await(await fetch(w0(B.url))).json();nD(`${_}/assets/indexes`),nD(`${_}/assets/objects`),nD(`${_}/assets/virtual`),nD(`${_}/assets/skins`),f.writeFileSync(`${_}/assets/indexes/${B.id}.json`,JSON.stringify(C));let $=[],q=B.id==="legacy";for(let X in C.objects){let G=C.objects[X].hash,Z=w0(`https://resources.download.minecraft.net/${G.substring(0,2)}/${G}`),J=q?`${_}/assets/virtual/legacy/${X}`:`${_}/assets/objects/${G.substring(0,2)}/${G}`;if(f.existsSync(J)){let K=new Uint8Array(f.readFileSync(J));if(new B1("SHA-1","UINT8ARRAY").update(K).getHash("HEX")!==C.objects[X].hash)console.log(O.yellow(H("asset_hash_mismatch_redownload",X)))}nD(C0.dirname(J)),$.push({url:Z,filename:J,extra:{size:C.objects[X].size}}),E+=C.objects[X].size}return{tasks:$,totalSize:E}}async function s4(D,_,u){let F=`${_}/versions/${u}`;nD(F);let B=await(await fetch(D)).json();f.writeFileSync(`${F}/${u}.json`,JSON.stringify(B));let E=[],C=await SF(B,_,u),$=C.totalSize;E.push(...C.tasks);let{downloads:{client:q}}=B;E.push({url:q.url,filename:`${F}/${u}.jar`,extra:{size:q.size}}),$+=q.size,nD(`${_}/libraries`);for(let G of B.libraries){let{downloads:{artifact:Z}}=G;if(Z){let{path:J,url:K,size:Q}=Z;E.push({url:w0(K),filename:`${_}/libraries/${J}`,extra:{size:Q}}),$+=Q,nD(C0.dirname(`${_}/libraries/${J}`))}if(G.downloads.classifiers)for(let[J,K]of Object.entries(G.downloads.classifiers)){let{path:Q,url:M,size:W}=K;nD(C0.dirname(`${_}/libraries/${Q}`)),E.push({url:w0(M),filename:`${_}/libraries/${Q}`,extra:{size:W}}),$+=W}}E.sort((G,Z)=>Z.extra.size-G.extra.size),console.log(O.green(H("start_download")));let X=new w8(16,{totalSize:$});for(let G of E)X.addTask(G);if(await X.wait(),console.log(O.green(H("download_completed"))),console.log(O.cyan(H("creating_neccessary_files"))),!f.existsSync(`${_}/launcher_profiles.json`))f.writeFileSync(`${_}/launcher_profiles.json`,JSON.stringify(C5));console.log(O.green(H("done")))}async function C1(D){let _=`${D}/versions`,u=[];if(f.existsSync(_)){for(let F of f.readdirSync(_))if(f.existsSync(`${_}/${F}/${F}.json`))u.push(F)}return u}function yF(){if(x0()=="windows")return";";return":"}async function r4(D,_){let u=H3();if(u.length===0){console.log(O.red(H("launch_precheck_no_users")));return}let F=await GD({message:H("launcher_user_select_desc"),choices:u.map((Q)=>({value:Q,name:`${Q.name} (${H("user_type."+Q.type)})`,description:H("launch_user_select_user_desc",Q.uuid,H("user_type."+Q.type)),short:`${Q.name} (${H("user_type."+Q.type)})`}))});console.log(O.blue(H("launch_extracting_natives")));let B=x0(),E=Q5(),C=JSON.parse(f.readFileSync(`${D}/versions/${_}/${_}.json`,{encoding:"utf-8"})),$=[],q=[],X=`${D}/versions/${_}/natives-${B}${E}`;for(let Q of C.libraries){if(Q.downloads.artifact){if(Q.downloads.artifact.path.includes(`natives-${B}`))$.push(Q.downloads.artifact.path);if(Q.rules&&c2(Q.rules,{os:{name:x0(),arch:W3.default(),version:A3.release()}}))q.push(`${D}/libraries/${Q.downloads.artifact.path}`);else if(!Q.rules)q.push(`${D}/libraries/${Q.downloads.artifact.path}`)}if(Q.downloads.classifiers){if(Q.downloads.classifiers[`natives-${B}`])$.push(Q.downloads.classifiers[`natives-${B}`].path)}if(E!=""){if(Q.downloads.artifact){if(Q.downloads.artifact.path.includes(`natives-${B}${E}`))$.push(Q.downloads.artifact.path)}if(Q.downloads.classifiers){if(Q.downloads.classifiers[`natives-${B}${E}`])$.push(Q.downloads.classifiers[`natives-${B}${E}`].path)}}}q.push(`${D}/versions/${_}/${_}.jar`),f.mkdirSync(`${X}/tmp`,{recursive:!0});for(let Q of $)await i4.default.extract(`${D}/libraries/${Q}`,`${X}/tmp`);console.log(O.blue(H("launch_moving_files"))),f.readdirSync(`${X}/tmp`,{withFileTypes:!0,recursive:!0}).forEach((Q)=>{if(Q.isFile()&&!Q.name.endsWith(".git")&&!Q.name.endsWith(".sha1")&&!Q.name.endsWith(".class"))f.copyFileSync(C0.join(Q.parentPath,Q.name),C0.join(X,Q.name))}),f.rmSync(`${X}/tmp`,{recursive:!0}),console.log(O.green(H("launch_extracting_natives_done")));let G=[],Z={version_name:C.id,version_type:"QMCLI 0.0.1",game_directory:D,assets_root:`${D}/assets`,assets_index_name:C.assets,natives_directory:X,launcher_name:"QMCLI",launcher_version:"0.0.1",classpath:`${q.join(yF())}`,resolution_width:"854",resolution_height:"480",auth_player_name:F.name,auth_uuid:F.uuid,auth_access_token:F.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"),f.writeFileSync(`${D}/versions/${_}/log4j2-qmcli.xml`,b4,{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 J=(Q)=>{for(let M of Q)if(typeof M==="string"){let W=M;for(let[V,L]of Object.entries(Z))W=W.replace(`\${${V}}`,L);G.push(W)}else if(c2(M.rules,{os:{name:x0(),arch:W3.default(),version:A3.release()}})){let W=Array.isArray(M.value)?M.value.map((V)=>`${V}`).join(" "):`${M.value}`;for(let[V,L]of Object.entries(Z))W=W.replace(`\${${V}}`,L);G.push(W)}};if(C.arguments){J(C.arguments.jvm),G.push(C.mainClass);for(let Q of C.arguments.game)if(typeof Q==="string"){let M=Q;for(let[W,V]of Object.entries(Z))M=M.replace(`\${${W}}`,V);G.push(M)}else if(c2(Q.rules,{os:{name:x0(),arch:W3.default(),version:A3.release()},has_custom_resolution:!0})){let M=Array.isArray(Q.value)?Q.value.map((W)=>`${W}`).join("|$|"):`${Q.value}`;for(let[W,V]of Object.entries(Z))M=M.replace(`\${${W}}`,V);G.push(...M.split("|$|"))}}else if(C.minecraftArguments){J([{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 Q=C.minecraftArguments.split(" ");for(let M of Q)if(M.startsWith("${")){let W=M;for(let[V,L]of Object.entries(Z))W=W.replace(`\${${V}}`,L);G.push(W)}else G.push(M);G.push(...["--width",Z.resolution_width,"--height",Z.resolution_height])}if(F.type==="offline");let K="java "+G.map((Q)=>{if(Q.includes(" "))return`"${Q}"`;else return Q}).join(" ");console.log(O.green(H("launch_starting"))),n4.spawn("java",G,{stdio:"inherit",shell:!1,cwd:D})}function o4(D,_){f.rmSync(C0.join(D,"versions",_),{recursive:!0})}var G0=x(require("fs"));var $1=x(require("path"));var vF=M3[r.get("lang")];l4(vF);var $0=new m0;$0.name("qmcli").description(H("app_desc")).version(j2.version);var J2=new m0;J2.name("versions");J2.description(H("cmd_versions_desc"));J2.command("add").description(H("cmd_versions_add_desc")).action(async()=>{let D=await Q0({message:H("cmd_versions_add_confirm_show_snapshots")});console.log(O.green(H("cmd_versions_fetching_versions")));let u=(await a4()).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} (${H("mctype."+$.type)})`,description:H("cmd_versions_list_version_desc",$.id,H("mctype."+$.type),$.releaseTime,$.time),short:$.id}}),F=await E8({message:H("cmd_versions_add_select_version_prompt"),async source($){if(!$)return u;return u.filter((q)=>{return q.name?.toLowerCase().includes($.toLowerCase())})}}),B=await GD({message:H("select_mc_path_prompt"),choices:r.get("paths").map(($)=>{return{value:$,name:$,description:H("select_mc_path_desc"),short:$}})}),E=await T0({message:H("cmd_versions_enter_game_name_prompt"),default:F.id,validate($){if(!$)return H("error_game_name_required");if(!J5($))return H("error_game_name_invalid");if(G0.existsSync($1.default.join(JD(B),"versions",$)))return H("error_game_name_exists",$);return!0}});if(console.log(O.green(H("summary_info"))),console.log(O.green(H("summary_game_name",E))),console.log(O.green(H("summary_version",F.id))),console.log(O.green(H("summary_minecraft_path",B))),!await Q0({message:H("confirm_continue")})){console.log(O.red(H("operation_canceled")));return}console.log(O.green(H("operation_starting"))),await s4(F.url,JD(B),E),console.log(O.green(H("operation_completed")))});J2.command("list").description(H("cmd_versions_list_desc")).action(async()=>{let D=await GD({message:H("select_mc_path_prompt"),choices:r.get("paths").map((B)=>{return{value:B,name:B,description:H("select_mc_path_desc"),short:B}})}),_=await C1(JD(D));if(_.length===0){console.log(O.red(H("error_no_game_installed")));return}let u=await GD({message:H("cmd_versions_list_select_game_prompt"),choices:_.map((B)=>{let E=JSON.parse(G0.readFileSync(`${JD(D)}/versions/${B}/${B}.json`,"utf-8"));return{value:B,name:B,description:H("cmd_versions_list_game_desc",B,E.id),short:B}})}),F=await GD({message:H("cmd_versions_list_select_action_prompt"),choices:[{value:"launch",name:H("cmd_versions_action_launch"),description:H("cmd_versions_action_launch_desc")},{value:"edit",name:H("cmd_versions_action_edit"),description:H("cmd_versions_action_edit_desc")},{value:"delete",name:H("cmd_versions_action_delete"),description:H("cmd_versions_action_delete_desc")}]});if(F==="launch")console.log(O.green(H("operation_launching"))),await r4(JD(D),u);else if(F==="edit")console.log(O.yellow(H("cmd_versions_action_edit_todo")));else if(F==="delete")if(await Q0({message:H("cmd_versions_action_delete_confirm",u),default:!1}))console.log(O.green(H("operation_starting"))),o4(JD(D),u),console.log(O.green(H("operation_completed")));else console.log(O.red(H("operation_canceled")))});$0.addCommand(J2);var Q2=new m0;Q2.name("settings").description(H("cmd_settings_desc"));Q2.command("mirror").description(H("cmd_settings_mirror_desc")).action(async()=>{let D=await GD({message:H("cmd_settings_mirror_select_prompt",r.get("mirror")),default:r.get("mirror"),choices:[{value:"official",name:H("cmd_settings_mirror_option_official"),description:H("cmd_settings_mirror_option_official_desc")},{value:"bmclapi",name:H("cmd_settings_mirror_option_bmclapi"),description:H("cmd_settings_mirror_option_bmclapi_desc")}]});r.set("mirror",D),console.log(O.green(H("cmd_settings_mirror_set_success",D)))});var t4=Q2.command("paths").description(H("cmd_settings_paths_desc"));t4.command("add").description(H("cmd_settings_paths_add_desc")).action(async()=>{let D=r.get("paths"),_=await T0({message:H("cmd_settings_paths_add_prompt"),validate(F){if(!F)return H("error_path_required");if(!G0.existsSync(JD(F)))return H("error_path_not_exist");if(!G0.statSync(JD(F)).isDirectory())return H("error_path_not_directory");if(D.includes(F)||D.includes(JD(F)))return H("error_path_already_added");return!0}}),u=$1.default.resolve(JD(_));D.push(u),r.set("paths",D),console.log(O.green(H("cmd_settings_paths_add_success",u)))});t4.command("list").description(H("cmd_settings_paths_list_desc")).action(async()=>{let D=r.get("paths");if(D.length===0){console.log(O.red(H("error_no_path_added")));return}let _=await GD({message:H("cmd_settings_paths_list_select_prompt"),choices:D.map((F)=>{return{value:F,name:F,description:H("cmd_settings_paths_list_select_desc"),short:F}})}),u=await GD({message:H("cmd_settings_paths_list_select_action_prompt"),choices:[{value:"info",name:H("cmd_settings_paths_list_action_info"),description:H("cmd_settings_paths_list_action_info_desc")},{value:"remove",name:H("cmd_settings_paths_list_action_remove"),description:H("cmd_settings_paths_list_action_remove_desc")}]});if(u==="info"){console.log(O.blue(H("cmd_settings_paths_list_info_path",_)));let F=await C1(JD(_));if(F.length===0){console.log(O.red(H("error_no_game_installed")));return}console.log(O.blue(H("cmd_settings_paths_list_info_games")));for(let B of F){let E=JSON.parse(G0.readFileSync(`${JD(_)}/versions/${B}/${B}.json`,"utf-8"));console.log(O.blue(H("cmd_settings_paths_list_info_game_entry",B,E.id)))}}else if(u==="remove")if(await Q0({message:H("cmd_settings_paths_list_action_remove_confirm",_),default:!1}))console.log(O.green(H("operation_starting"))),r.set("paths",D.filter((B)=>B!==_)),console.log(O.green(H("operation_completed")));else console.log(O.red(H("operation_canceled")))});Q2.command("lang").description(H("cmd_settings_lang_desc")).action(async()=>{let D=await GD({message:H("cmd_settings_lang_select_prompt",r.get("lang")),default:r.get("lang"),choices:Object.keys(M3).map((_)=>{return{value:_,name:`${M3[_].lang_name} (${_})`,short:_}})});r.set("lang",D),console.log(O.green(H("cmd_settings_lang_set_success",D)))});$0.addCommand(Q2);var V3=new m0;V3.name("users").description(H("cmd_users_desc"));V3.command("add").description(H("cmd_users_add_desc")).action(async()=>{if(await GD({message:H("cmd_users_add_select_type_prompt"),choices:[{value:"offline",name:H("cmd_users_add_type_offline"),description:H("cmd_users_add_type_offline_desc")},{value:"microsoft",name:H("cmd_users_add_type_microsoft"),description:H("cmd_users_add_type_microsoft_desc")}]})==="offline"){let _=await T0({message:H("cmd_users_add_name_prompt"),validate(B){if(!B)return H("error_name_required");if(!/^[a-zA-Z0-9_]{3,16}$/.test(B))return H("error_name_invalid");return!0}}),u=await T0({message:H("cmd_users_add_uuid_prompt"),default:g4(_),validate(B){if(!f4(B))return H("error_uuid_invalid");return!0}});m4({name:_,uuid:u,type:"offline"}),console.log(O.green(H("cmd_users_add_success",_)))}});V3.command("list").description(H("cmd_users_list_desc")).action(async()=>{let D=H3();if(D.length===0){console.log(O.red(H("error_no_users")));return}let _=await GD({message:H("cmd_users_list_select_user_prompt"),choices:D.map((F)=>{return{value:F,name:`${F.name} (${F.type})`,description:H("cmd_users_list_user_desc",F.name,F.uuid,F.type),short:F.name}})}),u=await GD({message:H("cmd_users_list_select_action_prompt"),choices:[{value:"info",name:H("cmd_users_list_action_info"),description:H("cmd_users_list_action_info_desc")},{value:"delete",name:H("cmd_users_list_action_delete"),description:H("cmd_users_list_action_delete_desc")}]});if(u==="info")console.log(O.green(H("cmd_users_list_info_name",_.name))),console.log(O.green(H("cmd_users_list_info_uuid",_.uuid))),console.log(O.green(H("cmd_users_list_info_type",_.type)));else if(u==="delete")if(await Q0({message:H("cmd_users_list_action_delete_confirm",_.name),default:!1}))d4(_),console.log(O.green(H("cmd_users_list_action_delete_success")));else console.log(O.red(H("cmd_users_list_action_delete_cancel")))});$0.addCommand(V3);if($0.args.length===0&&$0.commands.length===0)$0.help();$0.parse();
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();