yezz-cli 0.0.3 โ 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/command/create.d.ts +3 -0
- package/dist/command/create.d.ts.map +1 -1
- package/dist/command/update.d.ts +2 -0
- package/dist/command/update.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +13 -7
package/README.md
CHANGED
package/dist/command/create.d.ts
CHANGED
|
@@ -6,5 +6,8 @@ export interface TemplateInfo {
|
|
|
6
6
|
}
|
|
7
7
|
export declare const templates: Map<string, TemplateInfo>;
|
|
8
8
|
export declare const isOverwrite: (fileName: string) => Promise<boolean>;
|
|
9
|
+
export declare const getNpmInfo: (npmName: string) => Promise<{}>;
|
|
10
|
+
export declare const getNpmLatestVersion: (npmName: string) => Promise<any>;
|
|
11
|
+
export declare const checkVersion: (name: string, curVersion: string) => Promise<boolean>;
|
|
9
12
|
export default function create(prjName?: string): Promise<void>;
|
|
10
13
|
//# sourceMappingURL=create.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/command/create.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/command/create.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAmB9C,CAAC;AAEH,eAAO,MAAM,WAAW,GAAU,UAAU,MAAM,qBASjD,CAAC;AAEF,eAAO,MAAM,UAAU,GAAU,SAAS,MAAM,gBAS/C,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAU,SAAS,MAAM,iBAIxD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAU,MAAM,MAAM,EAAE,YAAY,MAAM,qBAYlE,CAAC;AAEF,wBAA8B,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,iBA+CpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/command/update.ts"],"names":[],"mappings":"AAcA,wBAA8B,MAAM,kBAWnC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import e,{EventEmitter as t}from"node:events";import n,{spawn as r}from"node:child_process";import s,{normalize as i}from"node:path";import o from"node:fs";import a from"node:process";import c from"node:constants";import l from"node:stream";import u,{styleText as h,stripVTControlCharacters as p}from"node:util";import f from"node:assert";import d from"node:os";import m from"node:crypto";import g from"node:tty";import*as y from"node:readline";import{AsyncLocalStorage as b,AsyncResource as w}from"node:async_hooks";var _="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function v(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var k,S,O={},C={},x={};function E(){if(k)return x;k=1;class e extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}}return x.CommanderError=e,x.InvalidArgumentError=class extends e{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}},x}function T(){if(S)return C;S=1;const{InvalidArgumentError:e}=E();return C.Argument=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t!==this.defaultValue&&Array.isArray(t)?(t.push(e),t):[e]}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new e(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,n):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}},C.humanReadableArgName=function(e){const t=e.name()+(!0===e.variadic?"...":"");return e.required?"<"+t+">":"["+t+"]"},C}var A,D={},$={};function P(){if(A)return $;A=1;const{humanReadableArgName:e}=T();function t(e){return e.replace(/\x1b\[\d*(;\d*)*m/g,"")}return $.Help=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){const t=e.commands.filter(e=>!e._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((e,t)=>e.name().localeCompare(t.name())),t}compareOptions(e,t){const n=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){const t=e.options.filter(e=>!e.hidden),n=e._getHelpOption();if(n&&!n.hidden){const r=n.short&&e._findOption(n.short),s=n.long&&e._findOption(n.long);r||s?n.long&&!s?t.push(e.createOption(n.long,n.description)):n.short&&!r&&t.push(e.createOption(n.short,n.description)):t.push(n)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];const t=[];for(let n=e.parent;n;n=n.parent){const e=n.options.filter(e=>!e.hidden);t.push(...e)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(e=>e.description)?e.registeredArguments:[]}subcommandTerm(t){const n=t.registeredArguments.map(t=>e(t)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(n?" "+n:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(n)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(n)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let t=e.parent;t;t=t.parent)n=t.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(", ")}`),void 0!==e.defaultValue){(e.required||e.optional||e.isBoolean()&&"boolean"==typeof e.defaultValue)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}if(void 0!==e.presetArg&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),void 0!==e.envVar&&t.push(`env: ${e.envVar}`),t.length>0){const n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(", ")}`),void 0!==e.defaultValue&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){const n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,t,n){return 0===t.length?[]:[n.styleTitle(e),...t,""]}groupItems(e,t,n){const r=new Map;return e.forEach(e=>{const t=n(e);r.has(t)||r.set(t,[])}),t.forEach(e=>{const t=n(e);r.has(t)||r.set(t,[]),r.get(t).push(e)}),r}formatHelp(e,t){const n=t.padWidth(e,t),r=t.helpWidth??80;function s(e,r){return t.formatItem(e,n,r,t)}let i=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""];const o=t.commandDescription(e);o.length>0&&(i=i.concat([t.boxWrap(t.styleCommandDescription(o),r),""]));const a=t.visibleArguments(e).map(e=>s(t.styleArgumentTerm(t.argumentTerm(e)),t.styleArgumentDescription(t.argumentDescription(e))));i=i.concat(this.formatItemList("Arguments:",a,t));const c=this.groupItems(e.options,t.visibleOptions(e),e=>e.helpGroupHeading??"Options:");if(c.forEach((e,n)=>{const r=e.map(e=>s(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));i=i.concat(this.formatItemList(n,r,t))}),t.showGlobalOptions){const n=t.visibleGlobalOptions(e).map(e=>s(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));i=i.concat(this.formatItemList("Global Options:",n,t))}return this.groupItems(e.commands,t.visibleCommands(e),e=>e.helpGroup()||"Commands:").forEach((e,n)=>{const r=e.map(e=>s(t.styleSubcommandTerm(t.subcommandTerm(e)),t.styleSubcommandDescription(t.subcommandDescription(e))));i=i.concat(this.formatItemList(n,r,t))}),i.join("\n")}displayWidth(e){return t(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(e=>"[options]"===e?this.styleOptionText(e):"[command]"===e?this.styleSubcommandText(e):"["===e[0]||"<"===e[0]?this.styleArgumentText(e):this.styleCommandText(e)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(e=>"[options]"===e?this.styleOptionText(e):"["===e[0]||"<"===e[0]?this.styleArgumentText(e):this.styleSubcommandText(e)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,n,r){const s=" ".repeat(2);if(!n)return s+e;const i=e.padEnd(t+e.length-r.displayWidth(e)),o=(this.helpWidth??80)-t-2-2;let a;if(o<this.minWidthToWrap||r.preformatted(n))a=n;else{a=r.boxWrap(n,o).replace(/\n/g,"\n"+" ".repeat(t+2))}return s+i+" ".repeat(2)+a.replace(/\n/g,`\n${s}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;const n=e.split(/\r\n|\n/),r=/[\s]*[^\s]+/g,s=[];return n.forEach(e=>{const n=e.match(r);if(null===n)return void s.push("");let i=[n.shift()],o=this.displayWidth(i[0]);n.forEach(e=>{const n=this.displayWidth(e);if(o+n<=t)return i.push(e),void(o+=n);s.push(i.join(""));const r=e.trimStart();i=[r],o=this.displayWidth(r)}),s.push(i.join(""))}),s.join("\n")}},$.stripColor=t,$}var F,M={};function R(){if(F)return M;F=1;const{InvalidArgumentError:e}=E();function t(e){return e.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}return M.Option=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;const n=function(e){let t,n;const r=/^-[^-]$/,s=/^--[^-]/,i=e.split(/[ |,]+/).concat("guard");r.test(i[0])&&(t=i.shift());s.test(i[0])&&(n=i.shift());!t&&r.test(i[0])&&(t=i.shift());!t&&s.test(i[0])&&(t=n,n=i.shift());if(i[0].startsWith("-")){const t=i[0],n=`option creation failed due to '${t}' in option flags '${e}'`;if(/^-[^-][^-]/.test(t))throw new Error(`${n}\n- a short flag is a single dash and a single character\n - either use a single dash and a single character (for a short flag)\n - or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(r.test(t))throw new Error(`${n}\n- too many short flags`);if(s.test(t))throw new Error(`${n}\n- too many long flags`);throw new Error(`${n}\n- unrecognised flag format`)}if(void 0===t&&void 0===n)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:n}}(e);this.short=n.shortFlag,this.long=n.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,this.helpGroupHeading=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return"string"==typeof e&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,t){return t!==this.defaultValue&&Array.isArray(t)?(t.push(e),t):[e]}choices(t){return this.argChoices=t.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new e(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,n):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?t(this.name().replace(/^no-/,"")):t(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},M.DualOptions=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)}),this.negativeOptions.forEach((e,t)=>{this.positiveOptions.has(t)&&this.dualOptions.add(t)})}valueFromOption(e,t){const n=t.attributeName();if(!this.dualOptions.has(n))return!0;const r=this.negativeOptions.get(n).presetArg,s=void 0!==r&&r;return t.negate===(s===e)}},M}var L,j,I,B={};function N(){if(L)return B;L=1;return B.suggestSimilar=function(e,t){if(!t||0===t.length)return"";t=Array.from(new Set(t));const n=e.startsWith("--");n&&(e=e.slice(2),t=t.map(e=>e.slice(2)));let r=[],s=3;return t.forEach(t=>{if(t.length<=1)return;const n=function(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);const n=[];for(let t=0;t<=e.length;t++)n[t]=[t];for(let e=0;e<=t.length;e++)n[0][e]=e;for(let r=1;r<=t.length;r++)for(let s=1;s<=e.length;s++){let i=1;i=e[s-1]===t[r-1]?0:1,n[s][r]=Math.min(n[s-1][r]+1,n[s][r-1]+1,n[s-1][r-1]+i),s>1&&r>1&&e[s-1]===t[r-2]&&e[s-2]===t[r-1]&&(n[s][r]=Math.min(n[s][r],n[s-2][r-2]+1))}return n[e.length][t.length]}(e,t),i=Math.max(e.length,t.length);(i-n)/i>.4&&(n<s?(s=n,r=[t]):n===s&&r.push(t))}),r.sort((e,t)=>e.localeCompare(t)),n&&(r=r.map(e=>`--${e}`)),r.length>1?`\n(Did you mean one of ${r.join(", ")}?)`:1===r.length?`\n(Did you mean ${r[0]}?)`:""},B}var U=function(){if(I)return O;I=1;const{Argument:t}=T(),{Command:r}=function(){if(j)return D;j=1;const t=e.EventEmitter,r=n,i=s,c=o,l=a,{Argument:u,humanReadableArgName:h}=T(),{CommanderError:p}=E(),{Help:f,stripColor:d}=P(),{Option:m,DualOptions:g}=R(),{suggestSimilar:y}=N();class b extends t{constructor(e){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=e||"",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:e=>l.stdout.write(e),writeErr:e=>l.stderr.write(e),outputError:(e,t)=>t(e),getOutHelpWidth:()=>l.stdout.isTTY?l.stdout.columns:void 0,getErrHelpWidth:()=>l.stderr.isTTY?l.stderr.columns:void 0,getOutHasColors:()=>_()??(l.stdout.isTTY&&l.stdout.hasColors?.()),getErrHasColors:()=>_()??(l.stderr.isTTY&&l.stderr.hasColors?.()),stripColor:e=>d(e)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){const e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let r=t,s=n;"object"==typeof r&&null!==r&&(s=r,r=null),s=s||{};const[,i,o]=e.match(/([^ ]+) *(.*)/),a=this.createCommand(i);return r&&(a.description(r),a._executableHandler=!0),s.isDefault&&(this._defaultCommandName=a._name),a._hidden=!(!s.noHelp&&!s.hidden),a._executableFile=s.executableFile||null,o&&a.arguments(o),this._registerCommand(a),a.parent=this,a.copyInheritedSettings(this),r?this:a}createCommand(e){return new b(e)}createHelp(){return Object.assign(new f,this.configureHelp())}configureHelp(e){return void 0===e?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return void 0===e?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return"string"!=typeof e&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()");return(t=t||{}).isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new u(e,t)}argument(e,t,n,r){const s=this.createArgument(e,t);return"function"==typeof n?s.default(r).argParser(n):s.default(n),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(e=>{this.argument(e)}),this}addArgument(e){const t=this.registeredArguments.slice(-1)[0];if(t?.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&void 0!==e.defaultValue&&void 0===e.parseArg)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if("boolean"==typeof e)return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;const n=e??"help [command]",[,r,s]=n.match(/([^ ]+) *(.*)/),i=t??"display help for command",o=this.createCommand(r);return o.helpOption(!1),s&&o.arguments(s),i&&o.description(i),this._addImplicitHelpCommand=!0,this._helpCommand=o,(e||t)&&this._initCommandGroup(o),this}addHelpCommand(e,t){return"object"!=typeof e?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(void 0===this._helpCommand&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){const n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.\nExpecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return this._exitCallback=e||(e=>{if("commander.executeSubCommandAsync"!==e.code)throw e}),this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new p(e,t,n)),l.exit(e)}action(e){return this._actionHandler=t=>{const n=this.registeredArguments.length,r=t.slice(0,n);return this._storeOptionsAsProperties?r[n]=this:r[n]=this.opts(),r.push(this),e.apply(this,r)},this}createOption(e,t){return new m(e,t)}_callParseArg(e,t,n,r){try{return e.parseArg(t,n)}catch(e){if("commander.invalidArgument"===e.code){const t=`${r} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}}_registerOption(e){const t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){const n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'\n- already used by option '${t.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){const t=e=>[e.name()].concat(e.aliases()),n=t(e).find(e=>this._findCommand(e));if(n){const r=t(this._findCommand(n)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${r}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);const t=e.name(),n=e.attributeName();if(e.negate){const t=e.long.replace(/^--no-/,"--");this._findOption(t)||this.setOptionValueWithSource(n,void 0===e.defaultValue||e.defaultValue,"default")}else void 0!==e.defaultValue&&this.setOptionValueWithSource(n,e.defaultValue,"default");const r=(t,r,s)=>{null==t&&void 0!==e.presetArg&&(t=e.presetArg);const i=this.getOptionValue(n);null!==t&&e.parseArg?t=this._callParseArg(e,t,i,r):null!==t&&e.variadic&&(t=e._collectValue(t,i)),null==t&&(t=!e.negate&&(!(!e.isBoolean()&&!e.optional)||"")),this.setOptionValueWithSource(n,t,s)};return this.on("option:"+t,t=>{const n=`error: option '${e.flags}' argument '${t}' is invalid.`;r(t,n,"cli")}),e.envVar&&this.on("optionEnv:"+t,t=>{const n=`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`;r(t,n,"env")}),this}_optionEx(e,t,n,r,s){if("object"==typeof t&&t instanceof m)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");const i=this.createOption(t,n);if(i.makeOptionMandatory(!!e.mandatory),"function"==typeof r)i.default(s).argParser(r);else if(r instanceof RegExp){const e=r;r=(t,n)=>{const r=e.exec(t);return r?r[0]:n},i.default(s).argParser(r)}else i.default(r);return this.addOption(i)}option(e,t,n,r){return this._optionEx({},e,t,n,r)}requiredOption(e,t,n,r){return this._optionEx({mandatory:!0},e,t,n,r)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,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(e=!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=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{void 0!==n.getOptionValueSource(e)&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(void 0!==e&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},void 0===e&&void 0===t.from){l.versions?.electron&&(t.from="electron");const e=l.execArgv??[];(e.includes("-e")||e.includes("--eval")||e.includes("-p")||e.includes("--print"))&&(t.from="eval")}let n;switch(void 0===e&&(e=l.argv),this.rawArgs=e.slice(),t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":l.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){this._prepareForParse();const n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){this._prepareForParse();const n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_prepareForParse(){null===this._savedState?this.saveStateBeforeParse():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.\n- 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(e,t,n){if(!c.existsSync(e))throw new Error(`'${e}' does not exist\n - if '${n}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${t?`searched for local subcommand relative to directory '${t}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory"}`)}_executeSubCommand(e,t){t=t.slice();let n=!1;const s=[".js",".ts",".tsx",".mjs",".cjs"];function o(e,t){const n=i.resolve(e,t);if(c.existsSync(n))return n;if(s.includes(i.extname(t)))return;const r=s.find(e=>c.existsSync(`${n}${e}`));return r?`${n}${r}`:void 0}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let a,u=e._executableFile||`${this._name}-${e._name}`,h=this._executableDir||"";if(this._scriptPath){let e;try{e=c.realpathSync(this._scriptPath)}catch{e=this._scriptPath}h=i.resolve(i.dirname(e),h)}if(h){let t=o(h,u);if(!t&&!e._executableFile&&this._scriptPath){const n=i.basename(this._scriptPath,i.extname(this._scriptPath));n!==this._name&&(t=o(h,`${n}-${e._name}`))}u=t||u}n=s.includes(i.extname(u)),"win32"!==l.platform?n?(t.unshift(u),t=w(l.execArgv).concat(t),a=r.spawn(l.argv[0],t,{stdio:"inherit"})):a=r.spawn(u,t,{stdio:"inherit"}):(this._checkForMissingExecutable(u,h,e._name),t.unshift(u),t=w(l.execArgv).concat(t),a=r.spawn(l.execPath,t,{stdio:"inherit"})),a.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(e=>{l.on(e,()=>{!1===a.killed&&null===a.exitCode&&a.kill(e)})});const f=this._exitCallback;a.on("close",e=>{e=e??1,f?f(new p(e,"commander.executeSubCommandAsync","(close)")):l.exit(e)}),a.on("error",t=>{if("ENOENT"===t.code)this._checkForMissingExecutable(u,h,e._name);else if("EACCES"===t.code)throw new Error(`'${u}' not executable`);if(f){const e=new p(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t,f(e)}else l.exit(1)}),this.runningCommand=a}_dispatchSubcommand(e,t,n){const r=this._findCommand(e);let s;return r||this.help({error:!0}),r._prepareForParse(),s=this._chainOrCallSubCommandHook(s,r,"preSubcommand"),s=this._chainOrCall(s,()=>{if(!r._executableHandler)return r._parseCommand(t,n);this._executeSubCommand(r,t.concat(n))}),s}_dispatchHelpCommand(e){e||this.help();const t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&null==this.args[t]&&this.missingArgument(e.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic||this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){const e=(e,t,n)=>{let r=t;if(null!==t&&e.parseArg){const s=`error: command-argument value '${t}' is invalid for argument '${e.name()}'.`;r=this._callParseArg(e,t,n,s)}return r};this._checkNumberOfArguments();const t=[];this.registeredArguments.forEach((n,r)=>{let s=n.defaultValue;n.variadic?r<this.args.length?(s=this.args.slice(r),n.parseArg&&(s=s.reduce((t,r)=>e(n,r,t),n.defaultValue))):void 0===s&&(s=[]):r<this.args.length&&(s=this.args[r],n.parseArg&&(s=e(n,s,n.defaultValue))),t[r]=s}),this.processedArgs=t}_chainOrCall(e,t){return e?.then&&"function"==typeof e.then?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e;const r=[];return this._getCommandAndAncestors().reverse().filter(e=>void 0!==e._lifeCycleHooks[t]).forEach(e=>{e._lifeCycleHooks[t].forEach(t=>{r.push({hookedCommand:e,callback:t})})}),"postAction"===t&&r.reverse(),r.forEach(e=>{n=this._chainOrCall(n,()=>e.callback(e.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let r=e;return void 0!==this._lifeCycleHooks[n]&&this._lifeCycleHooks[n].forEach(e=>{r=this._chainOrCall(r,()=>e(this,t))}),r}_parseCommand(e,t){const n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();const r=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){let n;return r(),this._processArguments(),n=this._chainOrCallHooks(n,"preAction"),n=this._chainOrCall(n,()=>this._actionHandler(this.processedArgs)),this.parent&&(n=this._chainOrCall(n,()=>{this.parent.emit(s,e,t)})),n=this._chainOrCallHooks(n,"postAction"),n}if(this.parent?.listenerCount(s))r(),this._processArguments(),this.parent.emit(s,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&void 0===e.getOptionValue(t.attributeName())&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){const e=this.options.filter(e=>{const t=e.attributeName();return void 0!==this.getOptionValue(t)&&"default"!==this.getOptionValueSource(t)}),t=e.filter(e=>e.conflictsWith.length>0);t.forEach(t=>{const n=e.find(e=>t.conflictsWith.includes(e.attributeName()));n&&this._conflictingOption(t,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){const t=[],n=[];let r=t;function s(e){return e.length>1&&"-"===e[0]}const i=e=>!!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(e)&&!this._getCommandAndAncestors().some(e=>e.options.map(e=>e.short).some(e=>/^-\d$/.test(e)));let o=null,a=null,c=0;for(;c<e.length||a;){const l=a??e[c++];if(a=null,"--"===l){r===n&&r.push(l),r.push(...e.slice(c));break}if(!o||s(l)&&!i(l)){if(o=null,s(l)){const t=this._findOption(l);if(t){if(t.required){const n=e[c++];void 0===n&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,n)}else if(t.optional){let n=null;c<e.length&&(!s(e[c])||i(e[c]))&&(n=e[c++]),this.emit(`option:${t.name()}`,n)}else this.emit(`option:${t.name()}`);o=t.variadic?t:null;continue}}if(l.length>2&&"-"===l[0]&&"-"!==l[1]){const e=this._findOption(`-${l[1]}`);if(e){e.required||e.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${e.name()}`,l.slice(2)):(this.emit(`option:${e.name()}`),a=`-${l.slice(2)}`);continue}}if(/^--[^=]+=/.test(l)){const e=l.indexOf("="),t=this._findOption(l.slice(0,e));if(t&&(t.required||t.optional)){this.emit(`option:${t.name()}`,l.slice(e+1));continue}}if(r!==t||!s(l)||0===this.commands.length&&i(l)||(r=n),(this._enablePositionalOptions||this._passThroughOptions)&&0===t.length&&0===n.length){if(this._findCommand(l)){t.push(l),n.push(...e.slice(c));break}if(this._getHelpCommand()&&l===this._getHelpCommand().name()){t.push(l,...e.slice(c));break}if(this._defaultCommandName){n.push(l,...e.slice(c));break}}if(this._passThroughOptions){r.push(l,...e.slice(c));break}r.push(l)}else this.emit(`option:${o.name()}`,l)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){const e={},t=this.options.length;for(let n=0;n<t;n++){const t=this.options[n].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr),"string"==typeof this._showHelpAfterError?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr("\n"),this.outputHelp({error:!0}));const n=t||{},r=n.exitCode||1,s=n.code||"commander.error";this._exit(r,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in l.env){const t=e.attributeName();(void 0===this.getOptionValue(t)||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,l.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){const e=new g(this.options),t=e=>void 0!==this.getOptionValue(e)&&!["default","implied"].includes(this.getOptionValueSource(e));this.options.filter(n=>void 0!==n.implied&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(e=>{Object.keys(e.implied).filter(e=>!t(e)).forEach(t=>{this.setOptionValueWithSource(t,e.implied[t],"implied")})})}missingArgument(e){const t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){const t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){const n=e=>{const t=e.attributeName(),n=this.getOptionValue(t),r=this.options.find(e=>e.negate&&t===e.attributeName()),s=this.options.find(e=>!e.negate&&t===e.attributeName());return r&&(void 0===r.presetArg&&!1===n||void 0!==r.presetArg&&n===r.presetArg)?r:s||e},r=e=>{const t=n(e),r=t.attributeName();return"env"===this.getOptionValueSource(r)?`environment variable '${t.envVar}'`:`option '${t.flags}'`},s=`error: ${r(e)} cannot be used with ${r(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],r=this;do{const e=r.createHelp().visibleOptions(r).filter(e=>e.long).map(e=>e.long);n=n.concat(e),r=r.parent}while(r&&!r._enablePositionalOptions);t=y(e,n)}const n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;const t=this.registeredArguments.length,n=1===t?"":"s",r=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(r,{code:"commander.excessArguments"})}unknownCommand(){const e=this.args[0];let t="";if(this._showSuggestionAfterError){const n=[];this.createHelp().visibleCommands(this).forEach(e=>{n.push(e.name()),e.alias()&&n.push(e.alias())}),t=y(e,n)}const n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(void 0===e)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";const r=this.createOption(t,n);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on("option:"+r.name(),()=>{this._outputConfiguration.writeOut(`${e}\n`),this._exit(0,"commander.version",e)}),this}description(e,t){return void 0===e&&void 0===t?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return void 0===e?this._summary:(this._summary=e,this)}alias(e){if(void 0===e)return this._aliases[0];let t=this;if(0!==this.commands.length&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");const n=this.parent?._findCommand(e);if(n){const t=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${t}'`)}return t._aliases.push(e),this}aliases(e){return void 0===e?this._aliases:(e.forEach(e=>this.alias(e)),this)}usage(e){if(void 0===e){if(this._usage)return this._usage;const e=this.registeredArguments.map(e=>h(e));return[].concat(this.options.length||null!==this._helpOption?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?e:[]).join(" ")}return this._usage=e,this}name(e){return void 0===e?this._name:(this._name=e,this)}helpGroup(e){return void 0===e?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return void 0===e?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return void 0===e?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=i.basename(e,i.extname(e)),this}executableDir(e){return void 0===e?this._executableDir:(this._executableDir=e,this)}helpInformation(e){const t=this.createHelp(),n=this._getOutputContext(e);t.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});const r=t.formatHelp(this,t);return n.hasColors?r:this._outputConfiguration.stripColor(r)}_getOutputContext(e){const t=!!(e=e||{}).error;let n,r,s;return t?(n=e=>this._outputConfiguration.writeErr(e),r=this._outputConfiguration.getErrHasColors(),s=this._outputConfiguration.getErrHelpWidth()):(n=e=>this._outputConfiguration.writeOut(e),r=this._outputConfiguration.getOutHasColors(),s=this._outputConfiguration.getOutHelpWidth()),{error:t,write:e=>(r||(e=this._outputConfiguration.stripColor(e)),n(e)),hasColors:r,helpWidth:s}}outputHelp(e){let t;"function"==typeof e&&(t=e,e=void 0);const n=this._getOutputContext(e),r={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(e=>e.emit("beforeAllHelp",r)),this.emit("beforeHelp",r);let s=this.helpInformation({error:n.error});if(t&&(s=t(s),"string"!=typeof s&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(s),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",r),this._getCommandAndAncestors().forEach(e=>e.emit("afterAllHelp",r))}helpOption(e,t){return"boolean"==typeof e?(e?(null===this._helpOption&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",t??"display help for command"),(e||t)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return void 0===this._helpOption&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(l.exitCode??0);0===t&&e&&"function"!=typeof e&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){const n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${n.join("', '")}'`);const r=`${e}Help`;return this.on(r,e=>{let n;n="function"==typeof t?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)}),this}_outputHelpIfRequested(e){const t=this._getHelpOption();t&&e.find(e=>t.is(e))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}}function w(e){return e.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n,r="127.0.0.1",s="9229";return null!==(n=e.match(/^(--inspect(-brk)?)$/))?t=n[1]:null!==(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(t=n[1],/^\d+$/.test(n[3])?s=n[3]:r=n[3]):null!==(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(t=n[1],r=n[3],s=n[4]),t&&"0"!==s?`${t}=${r}:${parseInt(s)+1}`:e})}function _(){return!l.env.NO_COLOR&&"0"!==l.env.FORCE_COLOR&&"false"!==l.env.FORCE_COLOR&&(!(!l.env.FORCE_COLOR&&void 0===l.env.CLICOLOR_FORCE)||void 0)}return D.Command=b,D.useColor=_,D}(),{CommanderError:i,InvalidArgumentError:c}=E(),{Help:l}=P(),{Option:u}=R();return O.program=new r,O.createCommand=e=>new r(e),O.createOption=(e,t)=>new u(e,t),O.createArgument=(e,n)=>new t(e,n),O.Command=r,O.Option=u,O.Argument=t,O.Help=l,O.CommanderError=i,O.InvalidArgumentError=c,O.InvalidOptionArgumentError=c,O}(),G=v(U);const{program:H,createCommand:W,createArgument:V,createOption:q,CommanderError:z,InvalidArgumentError:Y,InvalidOptionArgumentError:J,Command:K,Argument:Q,Option:X,Help:Z}=G;const ee=new Set(["emacs","vim"]);function te(e){return ee.has(e)}function ne(){const e=process.env.INQUIRER_KEYBINDINGS;return e?Array.from(new Set(e.toLowerCase().split(/[\s,]+/).filter(te))):[]}const re=(e,t=[])=>"up"===e.name||t.includes("vim")&&"k"===e.name||t.includes("emacs")&&e.ctrl&&"p"===e.name,se=(e,t=[])=>"down"===e.name||t.includes("vim")&&"j"===e.name||t.includes("emacs")&&e.ctrl&&"n"===e.name,ie=e=>"backspace"===e.name,oe=e=>"enter"===e.name||"return"===e.name;class ae extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(e){super(),this.cause=e?.cause}}class ce extends Error{name="CancelPromptError";message="Prompt was canceled"}class le extends Error{name="ExitPromptError"}class ue extends Error{name="HookError"}class he extends Error{name="ValidationError"}const pe=new b;function fe(){const e=pe.getStore();if(!e)throw new ue("[Inquirer] Hook functions can only be called from within a prompt");return e}function de(){return fe().rl}function me(e){return w.bind((...t)=>{const n=fe();let r=!1;const s=n.handleChange;n.handleChange=()=>{r=!0};const i=e(...t);return r&&s(),n.handleChange=s,i})}function ge(e){const t=fe(),{index:n}=t,r=e({get:()=>t.hooks[n],set(e){t.hooks[n]=e},initialized:n in t.hooks});return t.index++,r}const ye={queue(e){const t=fe(),{index:n}=t;t.hooksEffect.push(()=>{t.hooksCleanup[n]?.();const r=e(de());if(null!=r&&"function"!=typeof r)throw new he("useEffect return value must be a cleanup function or nothing.");t.hooksCleanup[n]=r})},run(){const e=fe();me(()=>{e.hooksEffect.forEach(e=>{e()}),e.hooksEffect.length=0})()},clearAll(){const e=fe();e.hooksCleanup.forEach(e=>{e?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}};function be(e){return ge(t=>{const n=w.bind(function(e){t.get()!==e&&(t.set(e),fe().handleChange())});if(t.initialized)return[t.get(),n];const r=function(e){return"function"==typeof e}(e)?e():e;return t.set(r),[r,n]})}function we(e,t){ge(n=>{const r=n.get(),s=!Array.isArray(r)||t.some((e,t)=>!Object.is(e,r[t]));s&&ye.queue(e),n.set(t)})}const _e={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:"โฑ"},ve={..._e,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:"โ
"},ke={..._e,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"},Se=(a.platform.startsWith("win")?Boolean(a.env.CI)||Boolean(a.env.WT_SESSION)||Boolean(a.env.TERMINUS_SUBLIME)||"{cmd::Cmder}"===a.env.ConEmuTask||"Terminus-Sublime"===a.env.TERM_PROGRAM||"vscode"===a.env.TERM_PROGRAM||"xterm-256color"===a.env.TERM||"alacritty"===a.env.TERM||"JetBrains-JediTerm"===a.env.TERMINAL_EMULATOR:"linux"!==a.env.TERM)?ve:ke,Oe={prefix:{idle:h("blue","?"),done:h("green",Se.tick)},spinner:{interval:80,frames:["โ ","โ ","โ น","โ ธ","โ ผ","โ ด","โ ฆ","โ ง","โ ","โ "].map(e=>h("yellow",e))},keybindings:[],style:{answer:e=>h("cyan",e),message:e=>h("bold",e),error:e=>h("red",`> ${e}`),defaultAnswer:e=>h("dim",`(${e})`),help:e=>h("dim",e),highlight:e=>h("cyan",e),key:e=>h("cyan",h("bold",`<${e}>`))}};function Ce(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function xe(...e){const t={};for(const n of e)for(const[e,r]of Object.entries(n)){const n=t[e];t[e]=Ce(n)&&Ce(r)?xe(n,r):r}return t}function Ee(...e){return xe(...[{...Oe,keybindings:ne()},...e.filter(e=>null!=e)])}function Te({status:e="idle",theme:t}){const[n,r]=be(!1),[s,i]=be(0),{prefix:o,spinner:a}=Ee(t);if(we(()=>{if("loading"===e){let e,t=-1;const n=setTimeout(()=>{r(!0),e=setInterval(()=>{t+=1,i(t%a.frames.length)},a.interval)},300);return()=>{clearTimeout(n),clearInterval(e)}}r(!1)},[e]),n)return a.frames[s];return"string"==typeof o?o:o["loading"===e?"idle":e]??o.idle}function Ae(e,t){return ge(n=>{const r=n.get();if(!r||r.dependencies.length!==t.length||r.dependencies.some((e,n)=>e!==t[n])){const r=e();return n.set({value:r,dependencies:t}),r}return r.value})}function De(e){return be({current:e})[0]}function $e(e){const t=De(e);t.current=e,we(e=>{let n=!1;const r=me((r,s)=>{n||t.current(s,e)});return e.input.on("keypress",r),()=>{n=!0,e.input.removeListener("keypress",r)}},[])}var Pe,Fe;var Me=v(Fe?Pe:(Fe=1,Pe=function(e){const t=function(e){const t={defaultWidth:0,output:process.stdout,tty:g};return e?(Object.keys(t).forEach(function(n){e[n]||(e[n]=t[n])}),e):t}(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){const e=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(e)&&0!==e)return e}return t.defaultWidth}));const Re=(()=>{const e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let n=0;for(e.lastIndex=0;e.test(t);)n+=1;return t.length-n}})(),Le=e=>12288===e||e>=65281&&e<=65376||e>=65504&&e<=65510,je=e=>8987===e||9001===e||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141,Ie=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,Be=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Ne=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/uy,Ue=/\t{1,1000}/y,Ge=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy,He=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,We=/\p{M}+/gu,Ve={limit:1/0,ellipsis:""},qe=(e,t={},n={})=>{const r=t.limit??1/0,s=t.ellipsis??"",i=t?.ellipsisWidth??(s?qe(s,Ve,n).width:0),o=n.controlWidth??0,a=n.tabWidth??8,c=n.emojiWidth??2,l=n.regularWidth??1,u=n.wideWidth??2,h=[[He,l],[Ie,0],[Be,o],[Ue,a],[Ge,c],[Ne,u]];let p=0,f=0,d=e.length,m=0,g=!1,y=d,b=Math.max(0,r-i),w=0,_=0,v=0,k=0;e:for(;;){if(_>w||f>=d&&f>p){const t=e.slice(w,_)||e.slice(p,f);m=0;for(const e of t.replaceAll(We,"")){const t=e.codePointAt(0)||0;if(k=Le(t)?2:je(t)?u:l,v+k>b&&(y=Math.min(y,Math.max(w,p)+m)),v+k>r){g=!0;break e}m+=e.length,v+=k}w=_=0}if(f>=d)break e;for(let t=0,n=h.length;t<n;t++){const[n,s]=h[t];if(n.lastIndex=f,n.test(e)){if(m=n===Ne?Re(e.slice(f,n.lastIndex)):n===Ge?1:n.lastIndex-f,k=m*s,v+k>b&&(y=Math.min(y,f+Math.floor((b-v)/s))),v+k>r){g=!0;break e}v+=k,w=p,_=f,f=p=n.lastIndex;continue e}}f+=1}return{width:g?b:v,index:g?y:d,truncated:g,ellipsed:g&&r>=i}},ze={limit:1/0,ellipsis:"",ellipsisWidth:0},Ye=(e,t={})=>qe(e,ze,t).width,Je="",Ke="]8;;",Qe=new RegExp(`(?:\\[(?<code>\\d+)m|\\${Ke}(?<uri>.*))`,"y"),Xe=e=>e>=30&&e<=37||e>=90&&e<=97?39:e>=40&&e<=47||e>=100&&e<=107?49:1===e||2===e?22:3===e?23:4===e?24:7===e?27:8===e?28:9===e?29:0===e?0:void 0,Ze=e=>`${Je}[${e}m`,et=e=>`${Je}${Ke}${e}`,tt=(e,t,n)=>{const r=t[Symbol.iterator]();let s=!1,i=!1,o=e.at(-1),a=void 0===o?0:Ye(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){const o=c.value,h=Ye(o);a+h<=n?e[e.length-1]+=o:(e.push(o),a=0),o!==Je&&"ย"!==o||(s=!0,i=t.startsWith(Ke,u+1)),s?i?""===o&&(s=!1,i=!1):"m"===o&&(s=!1):(a+=h,a!==n||l.done||(e.push(""),a=0)),c=l,l=r.next(),u+=o.length}o=e.at(-1),!a&&void 0!==o&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},nt=(e,t,n={})=>{if(!1!==n.trim&&""===e.trim())return"";let r,s,i="";const o=e.split(" ");let a=[""],c=0;for(let e=0;e<o.length;e++){const r=o[e];if(!1!==n.trim){const e=a.at(-1)??"",t=e.trimStart();e.length!==t.length&&(a[a.length-1]=t,c=Ye(t))}0!==e&&(c>=t&&(!1===n.wordWrap||!1===n.trim)&&(a.push(""),c=0),(c||!1===n.trim)&&(a[a.length-1]+=" ",c++));const s=Ye(r);if(n.hard&&s>t){const e=t-c,n=1+Math.floor((s-e-1)/t);Math.floor((s-1)/t)<n&&a.push(""),tt(a,r,t),c=Ye(a.at(-1)??"");continue}if(c+s>t&&c&&s){if(!1===n.wordWrap&&c<t){tt(a,r,t),c=Ye(a.at(-1)??"");continue}a.push(""),c=0}c+s>t&&!1===n.wordWrap?(tt(a,r,t),c=Ye(a.at(-1)??"")):(a[a.length-1]+=r,c+=s)}!1!==n.trim&&(a=a.map(e=>(e=>{const t=e.split(" ");let n=t.length;for(;n&&!Ye(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(" ")+t.slice(n).join("")})(e)));const l=a.join("\n");let u=!1;for(let e=0;e<l.length;e++){const t=l[e];if(i+=t,u)u=!1;else if(u=t>="\ud800"&&t<="\udbff",u)continue;if(t===Je||"ย"===t){Qe.lastIndex=e+1;const t=Qe.exec(l),n=t?.groups;if(void 0!==n?.code){const e=Number.parseFloat(n.code);r=39===e?void 0:e}else void 0!==n?.uri&&(s=0===n.uri.length?void 0:n.uri)}if("\n"===l[e+1]){s&&(i+=et(""));const e=r?Xe(r):void 0;r&&e&&(i+=Ze(e))}else"\n"===t&&(r&&Xe(r)&&(i+=Ze(r)),s&&(i+=et(s)))}return i},rt=/\r?\n/;function st(e,t){return e.split("\n").flatMap(e=>{return(n=e,r=t,s={trim:!1,wordWrap:!1},String(n).normalize().split(rt).map(e=>nt(e,r,s)).join("\n")).split("\n").map(e=>e.trimEnd());var n,r,s}).join("\n")}function it(){return Me({defaultWidth:80,output:de().output})}function ot({items:e,active:t,renderItem:n,pageSize:r,loop:s=!0}){const i=it(),o=t=>(t%e.length+e.length)%e.length,a=e.map((e,r)=>null==e?[]:st(n({item:e,index:r,isActive:r===t}),i).split("\n")),c=a.reduce((e,t)=>e+t.length,0),l=e=>a[e]??[],u=function({active:e,renderedItems:t,pageSize:n,loop:r}){const s=De({lastPointer:e,lastActive:void 0}),{lastPointer:i,lastActive:o}=s.current,a=Math.floor(n/2),c=t.reduce((e,t)=>e+t.length,0),l=t.slice(0,e).reduce((e,t)=>e+t.length,0);let u=l;if(c>n)if(r)u=i,null!=o&&o<e&&e-o<n&&(u=Math.min(a,1===Math.abs(e-o)?Math.min(i+(t[o]?.length??0),Math.max(l,i)):i+e-o));else{const r=t.slice(e).reduce((e,t)=>e+t.length,0);u=r<n-a?n-r:Math.min(l,a)}return s.current.lastPointer=u,s.current.lastActive=e,u}({active:t,renderedItems:a,pageSize:r,loop:s}),h=l(t).slice(0,r),p=u+h.length<=r?u:r-h.length,f=Array.from({length:r});f.splice(p,h.length,...h);const d=new Set([t]);let m=p+h.length,g=o(t+1);for(;m<r&&!d.has(g)&&(s&&c>r?g!==t:g>t);){const e=l(g).slice(0,r-m);f.splice(m,e.length,...e),d.add(g),m+=e.length,g=o(g+1)}for(m=p-1,g=o(t-1);m>=0&&!d.has(g)&&(s&&c>r?g!==t:g<t);){const e=l(g),t=e.slice(Math.max(0,e.length-m-1));f.splice(m-t.length+1,t.length,...t),d.add(g),m-=t.length,g=o(g-1)}return f.filter(e=>"string"==typeof e).join("\n")}var at,ct;var lt=function(){if(ct)return at;ct=1;const e=l;return at=class extends e{#e=null;constructor(e={}){super(e),this.writable=this.readable=!0,this.muted=!1,this.on("pipe",this._onpipe),this.replace=e.replace,this._prompt=e.prompt||null,this._hadControl=!1}#t(e,t){return this._dest?this._dest[e]:this._src?this._src[e]:t}#n(e,...t){"function"==typeof this._dest?.[e]&&this._dest[e](...t),"function"==typeof this._src?.[e]&&this._src[e](...t)}get isTTY(){return null!==this.#e?this.#e:this.#t("isTTY",!1)}set isTTY(e){this.#e=e}get rows(){return this.#t("rows")}get columns(){return this.#t("columns")}mute(){this.muted=!0}unmute(){this.muted=!1}_onpipe(e){this._src=e}pipe(e,t){return this._dest=e,super.pipe(e,t)}pause(){if(this._src)return this._src.pause()}resume(){if(this._src)return this._src.resume()}write(e){if(this.muted){if(!this.replace)return!0;if(e.match(/^\u001b/))return 0===e.indexOf(this._prompt)&&(e=(e=e.slice(this._prompt.length)).replace(/./g,this.replace),e=this._prompt+e),this._hadControl=!0,this.emit("data",e);this._prompt&&this._hadControl&&0===e.indexOf(this._prompt)&&(this._hadControl=!1,this.emit("data",this._prompt),e=e.slice(this._prompt.length)),e=e.toString().replace(/./g,this.replace)}this.emit("data",e)}end(e){this.muted&&(e=e&&this.replace?e.toString().replace(/./g,this.replace):null),e&&this.emit("data",e),this.emit("end")}destroy(...e){return this.#n("destroy",...e)}destroySoon(...e){return this.#n("destroySoon",...e)}close(...e){return this.#n("close",...e)}},at}(),ut=v(lt);const ht=[];ht.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&ht.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&ht.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const pt=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,ft=Symbol.for("signal-exit emitter"),dt=globalThis,mt=Object.defineProperty.bind(Object);class gt{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(dt[ft])return dt[ft];mt(dt,ft,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const n=this.listeners[e],r=n.indexOf(t);-1!==r&&(0===r&&1===n.length?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(const s of this.listeners[e])r=!0===s(t,n)||r;return"exit"===e&&(r=this.emit("afterExit",t,n)||r),r}}class yt{}const bt=globalThis.process,{onExit:wt}=(_t=pt(bt)?new class extends yt{#r="win32"===bt.platform?"SIGINT":"SIGHUP";#s=new gt;#i;#o;#a;#c={};#l=!1;constructor(e){super(),this.#i=e,this.#c={};for(const t of ht)this.#c[t]=()=>{const n=this.#i.listeners(t);let{count:r}=this.#s;const s=e;if("object"==typeof s.__signal_exit_emitter__&&"number"==typeof s.__signal_exit_emitter__.count&&(r+=s.__signal_exit_emitter__.count),n.length===r){this.unload();const n=this.#s.emit("exit",null,t),r="SIGHUP"===t?this.#r:t;n||e.kill(e.pid,r)}};this.#a=e.reallyExit,this.#o=e.emit}onExit(e,t){if(!pt(this.#i))return()=>{};!1===this.#l&&this.load();const n=t?.alwaysLast?"afterExit":"exit";return this.#s.on(n,e),()=>{this.#s.removeListener(n,e),0===this.#s.listeners.exit.length&&0===this.#s.listeners.afterExit.length&&this.unload()}}load(){if(!this.#l){this.#l=!0,this.#s.count+=1;for(const e of ht)try{const t=this.#c[e];t&&this.#i.on(e,t)}catch(e){}this.#i.emit=(e,...t)=>this.#u(e,...t),this.#i.reallyExit=e=>this.#h(e)}}unload(){this.#l&&(this.#l=!1,ht.forEach(e=>{const t=this.#c[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#i.removeListener(e,t)}catch(e){}}),this.#i.emit=this.#o,this.#i.reallyExit=this.#a,this.#s.count-=1)}#h(e){return pt(this.#i)?(this.#i.exitCode=e||0,this.#s.emit("exit",this.#i.exitCode,null),this.#a.call(this.#i,this.#i.exitCode)):0}#u(e,...t){const n=this.#o;if("exit"===e&&pt(this.#i)){"number"==typeof t[0]&&(this.#i.exitCode=t[0]);const r=n.call(this.#i,e,...t);return this.#s.emit("exit",this.#i.exitCode,null),r}return n.call(this.#i,e,...t)}}(bt):new class extends yt{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>_t.onExit(e,t),load:()=>_t.load(),unload:()=>_t.unload()});var _t;const vt="[",kt=(e=1)=>e>0?`${vt}${e}A`:"",St=(e=1)=>e>0?`${vt}${e}B`:"",Ot=(e,t)=>`${vt}${e+1}G`,Ct="[2K",xt=e=>e>0?(Ct+kt(1)).repeat(e-1)+Ct+"[G":"",Et=e=>e.split("\n").length;class Tt{height=0;extraLinesUnderPrompt=0;cursorPos;rl;constructor(e){this.rl=e,this.cursorPos=e.getCursorPos()}write(e){this.rl.output.unmute(),this.rl.output.write(e),this.rl.output.mute()}render(e,t=""){const n=(e=>e.split("\n").pop()??"")(e),r=p(n);let s=r;this.rl.line.length>0&&(s=s.slice(0,-this.rl.line.length)),this.rl.setPrompt(s),this.cursorPos=this.rl.getCursorPos();const i=it();e=st(e,i),t=st(t,i),r.length%i===0&&(e+="\n");let o=e+(t?"\n"+t:"");const a=Math.floor(r.length/i)-this.cursorPos.rows+(t?Et(t):0);a>0&&(o+=kt(a)),o+=Ot(this.cursorPos.cols),this.write(St(this.extraLinesUnderPrompt)+xt(this.height)+o),this.extraLinesUnderPrompt=a,this.height=Et(o)}checkCursorPos(){const e=this.rl.getCursorPos();e.cols!==this.cursorPos.cols&&(this.write(Ot(e.cols)),this.cursorPos=e)}done({clearContent:e}){this.rl.setPrompt("");let t=St(this.extraLinesUnderPrompt);t+=e?xt(this.height):"\n",t+="[G",t+="[?25h",this.write(t),this.rl.close()}}class At extends Promise{static withResolver(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}}const Dt=globalThis.setImmediate;function $t(e){const t=function(){const e=Error.prepareStackTrace;let t=[];try{Error.prepareStackTrace=(e,n)=>{const r=n.slice(1);return t=r,r},(new Error).stack}catch{return t}return Error.prepareStackTrace=e,t}();return(n,r={})=>{const{input:i=process.stdin,signal:o}=r,a=new Set,c=new ut;c.pipe(r.output??process.stdout);const l=y.createInterface({terminal:!0,input:i,output:c});c.mute();const u=new Tt(l),{promise:h,resolve:p,reject:f}=At.withResolver(),d=()=>f(new ce);if(o){const e=()=>f(new ae({cause:o.reason}));if(o.aborted)return e(),Object.assign(h,{cancel:d});o.addEventListener("abort",e),a.add(()=>o.removeEventListener("abort",e))}a.add(wt((e,t)=>{f(new le(`User force closed the prompt with ${e} ${t}`))}));const m=()=>f(new le("User force closed the prompt with SIGINT"));return l.on("SIGINT",m),a.add(()=>l.removeListener("SIGINT",m)),function(e,t){const n=function(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}(e);return pe.run(n,()=>t(function(e){n.handleChange=()=>{n.index=0,e()},n.handleChange()}))}(l,o=>{const m=w.bind(()=>ye.clearAll());l.on("close",m),a.add(()=>l.removeListener("close",m));const g=()=>{const r=()=>u.checkCursorPos();l.input.on("keypress",r),a.add(()=>l.input.removeListener("keypress",r));let i=null;o(()=>{let r=!1;try{const o=e(n,e=>{r?p(e):i={value:e}});if(void 0===o){let e=t[1]?.getFileName();throw e&&!e.startsWith("file://")&&(e=s.resolve(e)),new Error(`Prompt functions must return a string.\n at ${e}`)}const[a,c]="string"==typeof o?[o]:o;u.render(a,c),ye.run()}catch(e){f(e)}if(r=!0,null!==i){const{value:e}=i;i=null,p(e)}})};return"readableFlowing"in i?Dt(g):g(),Object.assign(h.then(e=>(ye.clearAll(),e),e=>{throw ye.clearAll(),e}).finally(()=>{a.forEach(e=>e()),u.done({clearContent:Boolean(r.clearPromptOnDone)}),c.end()}).then(()=>h),{cancel:d})})}}class Pt{separator=h("dim",Array.from({length:15}).join(Se.line));type="separator";constructor(e){e&&(this.separator=e)}static isSeparator(e){return Boolean(e&&"object"==typeof e&&"type"in e&&"separator"===e.type)}}const Ft={validationFailureMode:"keep"};var Mt=$t((e,t)=>{const{prefill:n="tab"}=e,r=Ee(Ft,e.theme),[s,i]=be("idle"),[o,a]=be(String(e.default??"")),[c,l]=be(),[u,h]=be(""),p=Te({status:s,theme:r});$e(async(n,c)=>{if("idle"===s)if(oe(n)){const n=u||o;i("loading");const s=await async function(t){const{required:n,pattern:r,patternError:s="Invalid input"}=e;return n&&!t?"You must provide a value":r&&!r.test(t)?s:"function"!=typeof e.validate||await e.validate(t)||"You must provide a valid value"}(n);!0===s?(h(n),i("done"),t(n)):("clear"===r.validationFailureMode?h(""):c.write(u),l(s),i("idle"))}else ie(n)&&!u?a(""):(e=>"tab"===e.name)(n)&&!u?(a(""),c.clearLine(0),c.write(o),h(o)):(h(c.line),l(void 0))}),we(e=>{"editable"===n&&o&&(e.write(o),h(o))},[]);const f=r.style.message(e.message,s);let d,m=u;"function"==typeof e.transformer?m=e.transformer(u,{isFinal:"done"===s}):"done"===s&&(m=r.style.answer(u)),o&&"done"!==s&&!u&&(d=r.style.defaultAnswer(o));let g="";return c&&(g=r.style.error(c)),[[p,f,d,m].filter(e=>void 0!==e).join(" "),g]});const Rt={icon:{cursor:Se.pointer},style:{disabled:e=>h("dim",e),description:e=>h("cyan",e),keysHelpTip:e=>e.map(([e,t])=>`${h("bold",e)} ${h("dim",t)}`).join(h("dim"," โข "))},i18n:{disabledError:"This option is disabled and cannot be selected."},indexMode:"hidden"};function Lt(e){return!Pt.isSeparator(e)&&!e.disabled}function jt(e){return!Pt.isSeparator(e)}var It,Bt,Nt,Ut,Gt,Ht,Wt,Vt,qt,zt,Yt=$t((e,t)=>{const{loop:n=!0,pageSize:r=7}=e,s=Ee(Rt,e.theme),{keybindings:i}=s,[o,a]=be("idle"),c=Te({status:o,theme:s}),l=De(),u=!i.includes("vim"),h=Ae(()=>e.choices.map(e=>{if(Pt.isSeparator(e))return e;if("object"!=typeof e||null===e||!("value"in e)){const t=String(e);return{value:e,name:t,short:t,disabled:!1}}const t=e.name??String(e.value),n={value:e.value,name:t,short:e.short??t,disabled:e.disabled??!1};return e.description&&(n.description=e.description),n}),[e.choices]),p=Ae(()=>{const e=h.findIndex(jt),t=h.findLastIndex(jt);if(-1===e)throw new he("[select prompt] No selectable choices. All choices are disabled.");return{first:e,last:t}},[h]),f=Ae(()=>"default"in e?h.findIndex(t=>Lt(t)&&t.value===e.default):-1,[e.default,h]),[d,m]=be(-1===f?p.first:f),g=h[d];if(null==g||Pt.isSeparator(g))throw new Error("Active index does not point to a choice");const[y,b]=be();$e((e,r)=>{if(clearTimeout(l.current),y&&b(void 0),oe(e))g.disabled?b(s.i18n.disabledError):(a("done"),t(g.value));else if(re(e,i)||se(e,i)){if(r.clearLine(0),n||re(e,i)&&d!==p.first||se(e,i)&&d!==p.last){const t=re(e,i)?-1:1;let n=d;do{n=(n+t+h.length)%h.length}while(!jt(h[n]));m(n)}}else if((e=>"1234567890".includes(e.name))(e)&&!Number.isNaN(Number(r.line))){const e=Number(r.line)-1;let t=-1;const n=h.findIndex(n=>!Pt.isSeparator(n)&&(t++,t===e)),s=h[n];null!=s&&Lt(s)&&m(n),l.current=setTimeout(()=>{r.clearLine(0)},700)}else if(ie(e))r.clearLine(0);else if(u){const e=r.line.toLowerCase(),t=h.findIndex(t=>!(Pt.isSeparator(t)||!Lt(t))&&t.name.toLowerCase().startsWith(e));-1!==t&&m(t),l.current=setTimeout(()=>{r.clearLine(0)},700)}}),we(()=>()=>{clearTimeout(l.current)},[]);const w=s.style.message(e.message,o),_=s.style.keysHelpTip([["โโ","navigate"],["โ","select"]]);let v=0;const k=ot({items:h,active:d,renderItem({item:e,isActive:t,index:n}){if(Pt.isSeparator(e))return v++,` ${e.separator}`;const r=t?s.icon.cursor:" ",i="number"===s.indexMode?n+1-v+". ":"";if(e.disabled){const n="string"==typeof e.disabled?e.disabled:"(disabled)",r=t?s.icon.cursor:"-";return s.style.disabled(`${r} ${i}${e.name} ${n}`)}const o=t?s.style.highlight:e=>e;return o(`${r} ${i}${e.name}`)},pageSize:r,loop:n});if("done"===o)return[c,w,s.style.answer(g.short)].filter(Boolean).join(" ");const{description:S}=g;return`${[[c,w].filter(Boolean).join(" "),k," ",S?s.style.description(S):"",y?s.style.error(y):"",_].filter(Boolean).join("\n").trimEnd()}[?25l`}),Jt={},Kt={};function Qt(){return It||(It=1,Kt.fromCallback=function(e){return Object.defineProperty(function(...t){if("function"!=typeof t[t.length-1])return new Promise((n,r)=>{t.push((e,t)=>null!=e?r(e):n(t)),e.apply(this,t)});e.apply(this,t)},"name",{value:e.name})},Kt.fromPromise=function(e){return Object.defineProperty(function(...t){const n=t[t.length-1];if("function"!=typeof n)return e.apply(this,t);t.pop(),e.apply(this,t).then(e=>n(null,e),n)},"name",{value:e.name})}),Kt}function Xt(){if(Nt)return Bt;Nt=1;var e=c,t=process.cwd,n=null,r=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return n||(n=t.call(process)),n};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var s=process.chdir;process.chdir=function(e){n=null,s.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,s)}return Bt=function(t){e.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(t){t.lchmod=function(n,r,s){t.open(n,e.O_WRONLY|e.O_SYMLINK,r,function(e,n){e?s&&s(e):t.fchmod(n,r,function(e){t.close(n,function(t){s&&s(e||t)})})})},t.lchmodSync=function(n,r){var s,i=t.openSync(n,e.O_WRONLY|e.O_SYMLINK,r),o=!0;try{s=t.fchmodSync(i,r),o=!1}finally{if(o)try{t.closeSync(i)}catch(e){}else t.closeSync(i)}return s}}(t);t.lutimes||function(t){e.hasOwnProperty("O_SYMLINK")&&t.futimes?(t.lutimes=function(n,r,s,i){t.open(n,e.O_SYMLINK,function(e,n){e?i&&i(e):t.futimes(n,r,s,function(e){t.close(n,function(t){i&&i(e||t)})})})},t.lutimesSync=function(n,r,s){var i,o=t.openSync(n,e.O_SYMLINK),a=!0;try{i=t.futimesSync(o,r,s),a=!1}finally{if(a)try{t.closeSync(o)}catch(e){}else t.closeSync(o)}return i}):t.futimes&&(t.lutimes=function(e,t,n,r){r&&process.nextTick(r)},t.lutimesSync=function(){})}(t);t.chown=i(t.chown),t.fchown=i(t.fchown),t.lchown=i(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=o(t.chownSync),t.fchownSync=o(t.fchownSync),t.lchownSync=o(t.lchownSync),t.chmodSync=s(t.chmodSync),t.fchmodSync=s(t.fchmodSync),t.lchmodSync=s(t.lchmodSync),t.stat=a(t.stat),t.fstat=a(t.fstat),t.lstat=a(t.lstat),t.statSync=c(t.statSync),t.fstatSync=c(t.fstatSync),t.lstatSync=c(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(e,t,n){n&&process.nextTick(n)},t.lchmodSync=function(){});t.chown&&!t.lchown&&(t.lchown=function(e,t,n,r){r&&process.nextTick(r)},t.lchownSync=function(){});"win32"===r&&(t.rename="function"!=typeof t.rename?t.rename:function(e){function n(n,r,s){var i=Date.now(),o=0;e(n,r,function a(c){if(c&&("EACCES"===c.code||"EPERM"===c.code||"EBUSY"===c.code)&&Date.now()-i<6e4)return setTimeout(function(){t.stat(r,function(t,i){t&&"ENOENT"===t.code?e(n,r,a):s(c)})},o),void(o<100&&(o+=10));s&&s(c)})}return Object.setPrototypeOf&&Object.setPrototypeOf(n,e),n}(t.rename));function n(e){return e?function(n,r,s){return e.call(t,n,r,function(e){l(e)&&(e=null),s&&s.apply(this,arguments)})}:e}function s(e){return e?function(n,r){try{return e.call(t,n,r)}catch(e){if(!l(e))throw e}}:e}function i(e){return e?function(n,r,s,i){return e.call(t,n,r,s,function(e){l(e)&&(e=null),i&&i.apply(this,arguments)})}:e}function o(e){return e?function(n,r,s){try{return e.call(t,n,r,s)}catch(e){if(!l(e))throw e}}:e}function a(e){return e?function(n,r,s){function i(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),s&&s.apply(this,arguments)}return"function"==typeof r&&(s=r,r=null),r?e.call(t,n,r,i):e.call(t,n,i)}:e}function c(e){return e?function(n,r){var s=r?e.call(t,n,r):e.call(t,n);return s&&(s.uid<0&&(s.uid+=4294967296),s.gid<0&&(s.gid+=4294967296)),s}:e}function l(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}t.read="function"!=typeof t.read?t.read:function(e){function n(n,r,s,i,o,a){var c;if(a&&"function"==typeof a){var l=0;c=function(u,h,p){if(u&&"EAGAIN"===u.code&&l<10)return l++,e.call(t,n,r,s,i,o,c);a.apply(this,arguments)}}return e.call(t,n,r,s,i,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,e),n}(t.read),t.readSync="function"!=typeof t.readSync?t.readSync:(u=t.readSync,function(e,n,r,s,i){for(var o=0;;)try{return u.call(t,e,n,r,s,i)}catch(e){if("EAGAIN"===e.code&&o<10){o++;continue}throw e}});var u},Bt}function Zt(){if(qt)return Vt;qt=1;var e,t,n=o,r=Xt(),s=function(){if(Gt)return Ut;Gt=1;var e=l.Stream;return Ut=function(t){return{ReadStream:function n(r,s){if(!(this instanceof n))return new n(r,s);e.call(this);var i=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,s=s||{};for(var o=Object.keys(s),a=0,c=o.length;a<c;a++){var l=o[a];this[l]=s[l]}if(this.encoding&&this.setEncoding(this.encoding),void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}null===this.fd?t.open(this.path,this.flags,this.mode,function(e,t){if(e)return i.emit("error",e),void(i.readable=!1);i.fd=t,i.emit("open",t),i._read()}):process.nextTick(function(){i._read()})},WriteStream:function n(r,s){if(!(this instanceof n))return new n(r,s);e.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,s=s||{};for(var i=Object.keys(s),o=0,a=i.length;o<a;o++){var c=i[o];this[c]=s[c]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}},Ut}(),i=function(){if(Wt)return Ht;Wt=1,Ht=function(t){if(null===t||"object"!=typeof t)return t;if(t instanceof Object)var n={__proto__:e(t)};else n=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n};var e=Object.getPrototypeOf||function(e){return e.__proto__};return Ht}(),a=u;function c(t,n){Object.defineProperty(t,e,{get:function(){return n}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(e=Symbol.for("graceful-fs.queue"),t=Symbol.for("graceful-fs.previous")):(e="___graceful-fs.queue",t="___graceful-fs.previous");var h,p=function(){};if(a.debuglog?p=a.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(p=function(){var e=a.format.apply(a,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!n[e]){var d=_[e]||[];c(n,d),n.close=function(e){function r(t,r){return e.call(n,t,function(e){e||y(),"function"==typeof r&&r.apply(this,arguments)})}return Object.defineProperty(r,t,{value:e}),r}(n.close),n.closeSync=function(e){function r(t){e.apply(n,arguments),y()}return Object.defineProperty(r,t,{value:e}),r}(n.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){p(n[e]),f.equal(n[e].length,0)})}function m(e){r(e),e.gracefulify=m,e.createReadStream=function(t,n){return new e.ReadStream(t,n)},e.createWriteStream=function(t,n){return new e.WriteStream(t,n)};var t=e.readFile;e.readFile=function(e,n,r){"function"==typeof n&&(r=n,n=null);return function e(n,r,s,i){return t(n,r,function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof s&&s.apply(this,arguments):g([e,[n,r,s],t,i||Date.now(),Date.now()])})}(e,n,r)};var n=e.writeFile;e.writeFile=function(e,t,r,s){"function"==typeof r&&(s=r,r=null);return function e(t,r,s,i,o){return n(t,r,s,function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof i&&i.apply(this,arguments):g([e,[t,r,s,i],n,o||Date.now(),Date.now()])})}(e,t,r,s)};var i=e.appendFile;i&&(e.appendFile=function(e,t,n,r){"function"==typeof n&&(r=n,n=null);return function e(t,n,r,s,o){return i(t,n,r,function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?"function"==typeof s&&s.apply(this,arguments):g([e,[t,n,r,s],i,o||Date.now(),Date.now()])})}(e,t,n,r)});var o=e.copyFile;o&&(e.copyFile=function(e,t,n,r){"function"==typeof n&&(r=n,n=0);return function e(t,n,r,s,i){return o(t,n,r,function(o){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?"function"==typeof s&&s.apply(this,arguments):g([e,[t,n,r,s],o,i||Date.now(),Date.now()])})}(e,t,n,r)});var a=e.readdir;e.readdir=function(e,t,n){"function"==typeof t&&(n=t,t=null);var r=c.test(process.version)?function(e,t,n,r){return a(e,s(e,t,n,r))}:function(e,t,n,r){return a(e,t,s(e,t,n,r))};return r(e,t,n);function s(e,t,n,s){return function(i,o){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?(o&&o.sort&&o.sort(),"function"==typeof n&&n.call(this,i,o)):g([r,[e,t,n],i,s||Date.now(),Date.now()])}}};var c=/^v[0-5]\./;if("v0.8"===process.version.substr(0,4)){var l=s(e);d=l.ReadStream,y=l.WriteStream}var u=e.ReadStream;u&&(d.prototype=Object.create(u.prototype),d.prototype.open=function(){var e=this;w(e.path,e.flags,e.mode,function(t,n){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n),e.read())})});var h=e.WriteStream;h&&(y.prototype=Object.create(h.prototype),y.prototype.open=function(){var e=this;w(e.path,e.flags,e.mode,function(t,n){t?(e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n))})}),Object.defineProperty(e,"ReadStream",{get:function(){return d},set:function(e){d=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return y},set:function(e){y=e},enumerable:!0,configurable:!0});var p=d;Object.defineProperty(e,"FileReadStream",{get:function(){return p},set:function(e){p=e},enumerable:!0,configurable:!0});var f=y;function d(e,t){return this instanceof d?(u.apply(this,arguments),this):d.apply(Object.create(d.prototype),arguments)}function y(e,t){return this instanceof y?(h.apply(this,arguments),this):y.apply(Object.create(y.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return f},set:function(e){f=e},enumerable:!0,configurable:!0});var b=e.open;function w(e,t,n,r){return"function"==typeof n&&(r=n,n=null),function e(t,n,r,s,i){return b(t,n,r,function(o,a){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?"function"==typeof s&&s.apply(this,arguments):g([e,[t,n,r,s],o,i||Date.now(),Date.now()])})}(e,t,n,r)}return e.open=w,e}function g(t){p("ENQUEUE",t[0].name,t[1]),n[e].push(t),b()}function y(){for(var t=Date.now(),r=0;r<n[e].length;++r)n[e][r].length>2&&(n[e][r][3]=t,n[e][r][4]=t);b()}function b(){if(clearTimeout(h),h=void 0,0!==n[e].length){var t=n[e].shift(),r=t[0],s=t[1],i=t[2],o=t[3],a=t[4];if(void 0===o)p("RETRY",r.name,s),r.apply(null,s);else if(Date.now()-o>=6e4){p("TIMEOUT",r.name,s);var c=s.pop();"function"==typeof c&&c.call(null,i)}else{var l=Date.now()-a,u=Math.max(a-o,1);l>=Math.min(1.2*u,100)?(p("RETRY",r.name,s),r.apply(null,s.concat([o]))):n[e].push(t)}void 0===h&&(h=setTimeout(b,0))}}return _[e]||c(_,n[e]),Vt=m(i(n)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!n.__patched&&(Vt=m(n),n.__patched=!0),Vt}function en(){return zt||(zt=1,function(e){const t=Qt().fromCallback,n=Zt(),r=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter(e=>"function"==typeof n[e]);Object.assign(e,n),r.forEach(r=>{e[r]=t(n[r])}),e.exists=function(e,t){return"function"==typeof t?n.exists(e,t):new Promise(t=>n.exists(e,t))},e.read=function(e,t,r,s,i,o){return"function"==typeof o?n.read(e,t,r,s,i,o):new Promise((o,a)=>{n.read(e,t,r,s,i,(e,t,n)=>{if(e)return a(e);o({bytesRead:t,buffer:n})})})},e.write=function(e,t,...r){return"function"==typeof r[r.length-1]?n.write(e,t,...r):new Promise((s,i)=>{n.write(e,t,...r,(e,t,n)=>{if(e)return i(e);s({bytesWritten:t,buffer:n})})})},e.readv=function(e,t,...r){return"function"==typeof r[r.length-1]?n.readv(e,t,...r):new Promise((s,i)=>{n.readv(e,t,...r,(e,t,n)=>{if(e)return i(e);s({bytesRead:t,buffers:n})})})},e.writev=function(e,t,...r){return"function"==typeof r[r.length-1]?n.writev(e,t,...r):new Promise((s,i)=>{n.writev(e,t,...r,(e,t,n)=>{if(e)return i(e);s({bytesWritten:t,buffers:n})})})},"function"==typeof n.realpath.native?e.realpath.native=t(n.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")}(Jt)),Jt}var tn,nn,rn,sn,on,an,cn,ln,un,hn,pn,fn,dn,mn,gn,yn,bn,wn,_n,vn,kn,Sn,On,Cn,xn,En,Tn,An,Dn,$n,Pn,Fn,Mn,Rn,Ln,jn,In,Bn,Nn,Un,Gn,Hn,Wn,Vn,qn,zn,Yn,Jn,Kn,Qn,Xn,Zn,er,tr,nr,rr,sr={},ir={};function or(){if(tn)return ir;tn=1;const e=s;return ir.checkPath=function(t){if("win32"===process.platform){if(/[<>:"|?*]/.test(t.replace(e.parse(t).root,""))){const e=new Error(`Path contains invalid characters: ${t}`);throw e.code="EINVAL",e}}},ir}function ar(){if(nn)return sr;nn=1;const e=en(),{checkPath:t}=or(),n=e=>"number"==typeof e?e:{mode:511,...e}.mode;return sr.makeDir=async(r,s)=>(t(r),e.mkdir(r,{mode:n(s),recursive:!0})),sr.makeDirSync=(r,s)=>(t(r),e.mkdirSync(r,{mode:n(s),recursive:!0})),sr}function cr(){if(sn)return rn;sn=1;const e=Qt().fromPromise,{makeDir:t,makeDirSync:n}=ar(),r=e(t);return rn={mkdirs:r,mkdirsSync:n,mkdirp:r,mkdirpSync:n,ensureDir:r,ensureDirSync:n}}function lr(){if(an)return on;an=1;const e=Qt().fromPromise,t=en();return on={pathExists:e(function(e){return t.access(e).then(()=>!0).catch(()=>!1)}),pathExistsSync:t.existsSync}}function ur(){if(ln)return cn;ln=1;const e=en(),t=Qt().fromPromise;return cn={utimesMillis:t(async function(t,n,r){const s=await e.open(t,"r+");let i=null;try{await e.futimes(s,n,r)}catch(e){i=e}finally{try{await e.close(s)}catch(e){i||(i=e)}}if(i)throw i}),utimesMillisSync:function(t,n,r){const s=e.openSync(t,"r+");let i=null;try{e.futimesSync(s,n,r)}catch(e){i=e}finally{try{e.closeSync(s)}catch(e){i||(i=e)}}if(i)throw i}},cn}function hr(){if(hn)return un;hn=1;const e=en(),t=s,n=Qt().fromPromise;function r(e,t){return void 0!==t.ino&&void 0!==t.dev&&t.ino===e.ino&&t.dev===e.dev}function i(e,n){const r=t.resolve(e).split(t.sep).filter(e=>e),s=t.resolve(n).split(t.sep).filter(e=>e);return r.every((e,t)=>s[t]===e)}function o(e,t,n){return`Cannot ${n} '${e}' to a subdirectory of itself, '${t}'.`}return un={checkPaths:n(async function(n,s,a,c){const{srcStat:l,destStat:u}=await function(t,n,r){const s=r.dereference?t=>e.stat(t,{bigint:!0}):t=>e.lstat(t,{bigint:!0});return Promise.all([s(t),s(n).catch(e=>{if("ENOENT"===e.code)return null;throw e})]).then(([e,t])=>({srcStat:e,destStat:t}))}(n,s,c);if(u){if(r(l,u)){const e=t.basename(n),r=t.basename(s);if("move"===a&&e!==r&&e.toLowerCase()===r.toLowerCase())return{srcStat:l,destStat:u,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(l.isDirectory()&&!u.isDirectory())throw new Error(`Cannot overwrite non-directory '${s}' with directory '${n}'.`);if(!l.isDirectory()&&u.isDirectory())throw new Error(`Cannot overwrite directory '${s}' with non-directory '${n}'.`)}if(l.isDirectory()&&i(n,s))throw new Error(o(n,s,a));return{srcStat:l,destStat:u}}),checkPathsSync:function(n,s,a,c){const{srcStat:l,destStat:u}=function(t,n,r){let s;const i=r.dereference?t=>e.statSync(t,{bigint:!0}):t=>e.lstatSync(t,{bigint:!0}),o=i(t);try{s=i(n)}catch(e){if("ENOENT"===e.code)return{srcStat:o,destStat:null};throw e}return{srcStat:o,destStat:s}}(n,s,c);if(u){if(r(l,u)){const e=t.basename(n),r=t.basename(s);if("move"===a&&e!==r&&e.toLowerCase()===r.toLowerCase())return{srcStat:l,destStat:u,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(l.isDirectory()&&!u.isDirectory())throw new Error(`Cannot overwrite non-directory '${s}' with directory '${n}'.`);if(!l.isDirectory()&&u.isDirectory())throw new Error(`Cannot overwrite directory '${s}' with non-directory '${n}'.`)}if(l.isDirectory()&&i(n,s))throw new Error(o(n,s,a));return{srcStat:l,destStat:u}},checkParentPaths:n(async function n(s,i,a,c){const l=t.resolve(t.dirname(s)),u=t.resolve(t.dirname(a));if(u===l||u===t.parse(u).root)return;let h;try{h=await e.stat(u,{bigint:!0})}catch(e){if("ENOENT"===e.code)return;throw e}if(r(i,h))throw new Error(o(s,a,c));return n(s,i,u,c)}),checkParentPathsSync:function n(s,i,a,c){const l=t.resolve(t.dirname(s)),u=t.resolve(t.dirname(a));if(u===l||u===t.parse(u).root)return;let h;try{h=e.statSync(u,{bigint:!0})}catch(e){if("ENOENT"===e.code)return;throw e}if(r(i,h))throw new Error(o(s,a,c));return n(s,i,u,c)},isSrcSubdir:i,areIdentical:r},un}function pr(){if(fn)return pn;return fn=1,pn={asyncIteratorConcurrentProcess:async function(e,t){const n=[];for await(const r of e)n.push(t(r).then(()=>null,e=>e??new Error("unknown error")));await Promise.all(n.map(e=>e.then(e=>{if(null!==e)throw e})))}}}function fr(){if(mn)return dn;mn=1;const e=en(),t=s,{mkdirs:n}=cr(),{pathExists:r}=lr(),{utimesMillis:i}=ur(),o=hr(),{asyncIteratorConcurrentProcess:a}=pr();async function c(e,t,n){return!n.filter||n.filter(e,t)}async function l(n,r,s,i){const h=i.dereference?e.stat:e.lstat,p=await h(r);if(p.isDirectory())return async function(n,r,s,i,u){r||await e.mkdir(i);await a(await e.opendir(s),async e=>{const n=t.join(s,e.name),r=t.join(i,e.name);if(await c(n,r,u)){const{destStat:e}=await o.checkPaths(n,r,"copy",u);await l(e,n,r,u)}}),r||await e.chmod(i,n.mode)}(p,n,r,s,i);if(p.isFile()||p.isCharacterDevice()||p.isBlockDevice())return async function(t,n,r,s,i){if(!n)return u(t,r,s,i);if(i.overwrite)return await e.unlink(s),u(t,r,s,i);if(i.errorOnExist)throw new Error(`'${s}' already exists`)}(p,n,r,s,i);if(p.isSymbolicLink())return async function(n,r,s,i){let a=await e.readlink(r);i.dereference&&(a=t.resolve(process.cwd(),a));if(!n)return e.symlink(a,s);let c=null;try{c=await e.readlink(s)}catch(t){if("EINVAL"===t.code||"UNKNOWN"===t.code)return e.symlink(a,s);throw t}i.dereference&&(c=t.resolve(process.cwd(),c));if(a!==c){if(o.isSrcSubdir(a,c))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${c}'.`);if(o.isSrcSubdir(c,a))throw new Error(`Cannot overwrite '${c}' with '${a}'.`)}return await e.unlink(s),e.symlink(a,s)}(n,r,s,i);if(p.isSocket())throw new Error(`Cannot copy a socket file: ${r}`);if(p.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${r}`);throw new Error(`Unknown file: ${r}`)}async function u(t,n,r,s){if(await e.copyFile(n,r),s.preserveTimestamps){128&t.mode||await function(t,n){return e.chmod(t,128|n)}(r,t.mode);const s=await e.stat(n);await i(r,s.atime,s.mtime)}return e.chmod(r,t.mode)}return dn=async function(e,s,i={}){"function"==typeof i&&(i={filter:i}),i.clobber=!("clobber"in i)||!!i.clobber,i.overwrite="overwrite"in i?!!i.overwrite:i.clobber,i.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0001");const{srcStat:a,destStat:u}=await o.checkPaths(e,s,"copy",i);if(await o.checkParentPaths(e,a,s,"copy"),!await c(e,s,i))return;const h=t.dirname(s);await r(h)||await n(h),await l(u,e,s,i)},dn}function dr(){if(yn)return gn;yn=1;const e=Zt(),t=s,n=cr().mkdirsSync,r=ur().utimesMillisSync,i=hr();function o(n,r,s,o){const u=(o.dereference?e.statSync:e.lstatSync)(r);if(u.isDirectory())return function(t,n,r,s,i){return n?l(r,s,i):function(t,n,r,s){return e.mkdirSync(r),l(n,r,s),c(r,t)}(t.mode,r,s,i)}(u,n,r,s,o);if(u.isFile()||u.isCharacterDevice()||u.isBlockDevice())return function(t,n,r,s,i){return n?function(t,n,r,s){if(s.overwrite)return e.unlinkSync(r),a(t,n,r,s);if(s.errorOnExist)throw new Error(`'${r}' already exists`)}(t,r,s,i):a(t,r,s,i)}(u,n,r,s,o);if(u.isSymbolicLink())return function(n,r,s,o){let a=e.readlinkSync(r);o.dereference&&(a=t.resolve(process.cwd(),a));if(n){let n;try{n=e.readlinkSync(s)}catch(t){if("EINVAL"===t.code||"UNKNOWN"===t.code)return e.symlinkSync(a,s);throw t}if(o.dereference&&(n=t.resolve(process.cwd(),n)),a!==n){if(i.isSrcSubdir(a,n))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${n}'.`);if(i.isSrcSubdir(n,a))throw new Error(`Cannot overwrite '${n}' with '${a}'.`)}return function(t,n){return e.unlinkSync(n),e.symlinkSync(t,n)}(a,s)}return e.symlinkSync(a,s)}(n,r,s,o);if(u.isSocket())throw new Error(`Cannot copy a socket file: ${r}`);if(u.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${r}`);throw new Error(`Unknown file: ${r}`)}function a(t,n,s,i){return e.copyFileSync(n,s),i.preserveTimestamps&&function(t,n,s){(function(e){return!(128&e)})(t)&&function(e,t){c(e,128|t)}(s,t);(function(t,n){const s=e.statSync(t);r(n,s.atime,s.mtime)})(n,s)}(t.mode,n,s),c(s,t.mode)}function c(t,n){return e.chmodSync(t,n)}function l(t,n,r){const s=e.opendirSync(t);try{let e;for(;null!==(e=s.readSync());)u(e.name,t,n,r)}finally{s.closeSync()}}function u(e,n,r,s){const a=t.join(n,e),c=t.join(r,e);if(s.filter&&!s.filter(a,c))return;const{destStat:l}=i.checkPathsSync(a,c,"copy",s);return o(l,a,c,s)}return gn=function(r,s,a){"function"==typeof a&&(a={filter:a}),(a=a||{}).clobber=!("clobber"in a)||!!a.clobber,a.overwrite="overwrite"in a?!!a.overwrite:a.clobber,a.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0002");const{srcStat:c,destStat:l}=i.checkPathsSync(r,s,"copy",a);if(i.checkParentPathsSync(r,c,s,"copy"),a.filter&&!a.filter(r,s))return;const u=t.dirname(s);return e.existsSync(u)||n(u),o(l,r,s,a)},gn}function mr(){if(wn)return bn;wn=1;const e=Qt().fromPromise;return bn={copy:e(fr()),copySync:dr()}}function gr(){if(vn)return _n;vn=1;const e=Zt(),t=Qt().fromCallback;return _n={remove:t(function(t,n){e.rm(t,{recursive:!0,force:!0},n)}),removeSync:function(t){e.rmSync(t,{recursive:!0,force:!0})}}}function yr(){if(Sn)return kn;Sn=1;const e=Qt().fromPromise,t=en(),n=s,r=cr(),i=gr(),o=e(async function(e){let s;try{s=await t.readdir(e)}catch{return r.mkdirs(e)}return Promise.all(s.map(t=>i.remove(n.join(e,t))))});function a(e){let s;try{s=t.readdirSync(e)}catch{return r.mkdirsSync(e)}s.forEach(t=>{t=n.join(e,t),i.removeSync(t)})}return kn={emptyDirSync:a,emptydirSync:a,emptyDir:o,emptydir:o}}function br(){if(Cn)return On;Cn=1;const e=Qt().fromPromise,t=s,n=en(),r=cr();return On={createFile:e(async function(e){let s;try{s=await n.stat(e)}catch{}if(s&&s.isFile())return;const i=t.dirname(e);let o=null;try{o=await n.stat(i)}catch(t){if("ENOENT"===t.code)return await r.mkdirs(i),void await n.writeFile(e,"");throw t}o.isDirectory()?await n.writeFile(e,""):await n.readdir(i)}),createFileSync:function(e){let s;try{s=n.statSync(e)}catch{}if(s&&s.isFile())return;const i=t.dirname(e);try{n.statSync(i).isDirectory()||n.readdirSync(i)}catch(e){if(!e||"ENOENT"!==e.code)throw e;r.mkdirsSync(i)}n.writeFileSync(e,"")}}}function wr(){if(En)return xn;En=1;const e=Qt().fromPromise,t=s,n=en(),r=cr(),{pathExists:i}=lr(),{areIdentical:o}=hr();return xn={createLink:e(async function(e,s){let a,c;try{a=await n.lstat(s,{bigint:!0})}catch{}try{c=await n.lstat(e,{bigint:!0})}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}if(a&&o(c,a))return;const l=t.dirname(s);await i(l)||await r.mkdirs(l),await n.link(e,s)}),createLinkSync:function(e,s){let i;try{i=n.lstatSync(s,{bigint:!0})}catch{}try{const t=n.lstatSync(e,{bigint:!0});if(i&&o(t,i))return}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const a=t.dirname(s);return n.existsSync(a)||r.mkdirsSync(a),n.linkSync(e,s)}}}function _r(){if(An)return Tn;An=1;const e=s,t=en(),{pathExists:n}=lr(),r=Qt().fromPromise;return Tn={symlinkPaths:r(async function(r,s){if(e.isAbsolute(r)){try{await t.lstat(r)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:r,toDst:r}}const i=e.dirname(s),o=e.join(i,r);if(await n(o))return{toCwd:o,toDst:r};try{await t.lstat(r)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:r,toDst:e.relative(i,r)}}),symlinkPathsSync:function(n,r){if(e.isAbsolute(n)){if(!t.existsSync(n))throw new Error("absolute srcpath does not exist");return{toCwd:n,toDst:n}}const s=e.dirname(r),i=e.join(s,n);if(t.existsSync(i))return{toCwd:i,toDst:n};if(!t.existsSync(n))throw new Error("relative srcpath does not exist");return{toCwd:n,toDst:e.relative(s,n)}}}}function vr(){if($n)return Dn;$n=1;const e=en(),t=Qt().fromPromise;return Dn={symlinkType:t(async function(t,n){if(n)return n;let r;try{r=await e.lstat(t)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}),symlinkTypeSync:function(t,n){if(n)return n;let r;try{r=e.lstatSync(t)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}}}function kr(){if(Fn)return Pn;Fn=1;const e=Qt().fromPromise,t=s,n=en(),{mkdirs:r,mkdirsSync:i}=cr(),{symlinkPaths:o,symlinkPathsSync:a}=_r(),{symlinkType:c,symlinkTypeSync:l}=vr(),{pathExists:u}=lr(),{areIdentical:h}=hr();return Pn={createSymlink:e(async function(e,s,i){let a;try{a=await n.lstat(s)}catch{}if(a&&a.isSymbolicLink()){let r;if(t.isAbsolute(e))r=await n.stat(e,{bigint:!0});else{const i=t.dirname(s),o=t.join(i,e);try{r=await n.stat(o,{bigint:!0})}catch{r=await n.stat(e,{bigint:!0})}}const i=await n.stat(s,{bigint:!0});if(h(r,i))return}const l=await o(e,s);e=l.toDst;const p=await c(l.toCwd,i),f=t.dirname(s);return await u(f)||await r(f),n.symlink(e,s,p)}),createSymlinkSync:function(e,r,s){let o;try{o=n.lstatSync(r)}catch{}if(o&&o.isSymbolicLink()){let s;if(t.isAbsolute(e))s=n.statSync(e,{bigint:!0});else{const i=t.dirname(r),o=t.join(i,e);try{s=n.statSync(o,{bigint:!0})}catch{s=n.statSync(e,{bigint:!0})}}const i=n.statSync(r,{bigint:!0});if(h(s,i))return}const c=a(e,r);e=c.toDst,s=l(c.toCwd,s);const u=t.dirname(r);return n.existsSync(u)||i(u),n.symlinkSync(e,r,s)}}}function Sr(){if(Rn)return Mn;Rn=1;const{createFile:e,createFileSync:t}=br(),{createLink:n,createLinkSync:r}=wr(),{createSymlink:s,createSymlinkSync:i}=kr();return Mn={createFile:e,createFileSync:t,ensureFile:e,ensureFileSync:t,createLink:n,createLinkSync:r,ensureLink:n,ensureLinkSync:r,createSymlink:s,createSymlinkSync:i,ensureSymlink:s,ensureSymlinkSync:i}}function Or(){if(jn)return Ln;return jn=1,Ln={stringify:function(e,{EOL:t="\n",finalEOL:n=!0,replacer:r=null,spaces:s}={}){const i=n?t:"",o=JSON.stringify(e,r,s);if(void 0===o)throw new TypeError(`Converting ${typeof e} value to JSON is not supported`);return o.replace(/\n/g,t)+i},stripBom:function(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}}}function Cr(){if(Un)return Nn;Un=1;const e=function(){if(Bn)return In;let e;Bn=1;try{e=Zt()}catch(t){e=o}const t=Qt(),{stringify:n,stripBom:r}=Or(),s=t.fromPromise(async function(n,s={}){"string"==typeof s&&(s={encoding:s});const i=s.fs||e,o=!("throws"in s)||s.throws;let a,c=await t.fromCallback(i.readFile)(n,s);c=r(c);try{a=JSON.parse(c,s?s.reviver:null)}catch(e){if(o)throw e.message=`${n}: ${e.message}`,e;return null}return a}),i=t.fromPromise(async function(r,s,i={}){const o=i.fs||e,a=n(s,i);await t.fromCallback(o.writeFile)(r,a,i)});return In={readFile:s,readFileSync:function(t,n={}){"string"==typeof n&&(n={encoding:n});const s=n.fs||e,i=!("throws"in n)||n.throws;try{let e=s.readFileSync(t,n);return e=r(e),JSON.parse(e,n.reviver)}catch(e){if(i)throw e.message=`${t}: ${e.message}`,e;return null}},writeFile:i,writeFileSync:function(t,r,s={}){const i=s.fs||e,o=n(r,s);return i.writeFileSync(t,o,s)}},In}();return Nn={readJson:e.readFile,readJsonSync:e.readFileSync,writeJson:e.writeFile,writeJsonSync:e.writeFileSync}}function xr(){if(Hn)return Gn;Hn=1;const e=Qt().fromPromise,t=en(),n=s,r=cr(),i=lr().pathExists;return Gn={outputFile:e(async function(e,s,o="utf-8"){const a=n.dirname(e);return await i(a)||await r.mkdirs(a),t.writeFile(e,s,o)}),outputFileSync:function(e,...s){const i=n.dirname(e);t.existsSync(i)||r.mkdirsSync(i),t.writeFileSync(e,...s)}},Gn}function Er(){if(Vn)return Wn;Vn=1;const{stringify:e}=Or(),{outputFile:t}=xr();return Wn=async function(n,r,s={}){const i=e(r,s);await t(n,i,s)},Wn}function Tr(){if(zn)return qn;zn=1;const{stringify:e}=Or(),{outputFileSync:t}=xr();return qn=function(n,r,s){const i=e(r,s);t(n,i,s)},qn}function Ar(){if(Jn)return Yn;Jn=1;const e=Qt().fromPromise,t=Cr();return t.outputJson=e(Er()),t.outputJsonSync=Tr(),t.outputJSON=t.outputJson,t.outputJSONSync=t.outputJsonSync,t.writeJSON=t.writeJson,t.writeJSONSync=t.writeJsonSync,t.readJSON=t.readJson,t.readJSONSync=t.readJsonSync,Yn=t}function Dr(){if(Qn)return Kn;Qn=1;const e=en(),t=s,{copy:n}=mr(),{remove:r}=gr(),{mkdirp:i}=cr(),{pathExists:o}=lr(),a=hr();return Kn=async function(s,c,l={}){const u=l.overwrite||l.clobber||!1,{srcStat:h,isChangingCase:p=!1}=await a.checkPaths(s,c,"move",l);await a.checkParentPaths(s,h,c,"move");const f=t.dirname(c);return t.parse(f).root!==f&&await i(f),async function(t,s,i,a){if(!a)if(i)await r(s);else if(await o(s))throw new Error("dest already exists.");try{await e.rename(t,s)}catch(e){if("EXDEV"!==e.code)throw e;await async function(e,t,s){const i={overwrite:s,errorOnExist:!0,preserveTimestamps:!0};return await n(e,t,i),r(e)}(t,s,i)}}(s,c,u,p)},Kn}function $r(){if(Zn)return Xn;Zn=1;const e=Zt(),t=s,n=mr().copySync,r=gr().removeSync,i=cr().mkdirpSync,o=hr();function a(t,s,i){try{e.renameSync(t,s)}catch(e){if("EXDEV"!==e.code)throw e;return function(e,t,s){const i={overwrite:s,errorOnExist:!0,preserveTimestamps:!0};return n(e,t,i),r(e)}(t,s,i)}}return Xn=function(n,s,c){const l=(c=c||{}).overwrite||c.clobber||!1,{srcStat:u,isChangingCase:h=!1}=o.checkPathsSync(n,s,"move",c);return o.checkParentPathsSync(n,u,s,"move"),function(e){const n=t.dirname(e);return t.parse(n).root===n}(s)||i(t.dirname(s)),function(t,n,s,i){if(i)return a(t,n,s);if(s)return r(n),a(t,n,s);if(e.existsSync(n))throw new Error("dest already exists.");return a(t,n,s)}(n,s,l,h)},Xn}function Pr(){if(tr)return er;tr=1;const e=Qt().fromPromise;return er={move:e(Dr()),moveSync:$r()}}function Fr(){return rr?nr:(rr=1,nr={...en(),...mr(),...yr(),...Sr(),...Ar(),...cr(),...Pr(),...xr(),...lr(),...gr()})}var Mr=v(Fr());const Rr=(e=0)=>t=>`[${t+e}m`,Lr=(e=0)=>t=>`[${38+e};5;${t}m`,jr=(e=0)=>(t,n,r)=>`[${38+e};2;${t};${n};${r}m`,Ir={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]}};Object.keys(Ir.modifier);Object.keys(Ir.color),Object.keys(Ir.bgColor);const Br=function(){const e=new Map;for(const[t,n]of Object.entries(Ir)){for(const[t,r]of Object.entries(n))Ir[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=Ir[t],e.set(r[0],r[1]);Object.defineProperty(Ir,t,{value:n,enumerable:!1})}return Object.defineProperty(Ir,"codes",{value:e,enumerable:!1}),Ir.color.close="[39m",Ir.bgColor.close="[49m",Ir.color.ansi=Rr(),Ir.color.ansi256=Lr(),Ir.color.ansi16m=jr(),Ir.bgColor.ansi=Rr(10),Ir.bgColor.ansi256=Lr(10),Ir.bgColor.ansi16m=jr(10),Object.defineProperties(Ir,{rgbToAnsi256:{value:(e,t,n)=>e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value(e){const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;3===n.length&&(n=[...n].map(e=>e+e).join(""));const r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},enumerable:!1},hexToAnsi256:{value:e=>Ir.rgbToAnsi256(...Ir.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return e-8+90;let t,n,r;if(e>=232)t=(10*(e-232)+8)/255,n=t,r=t;else{const s=(e-=16)%36;t=Math.floor(e/36)/5,n=Math.floor(s/6)/5,r=s%6/5}const s=2*Math.max(t,n,r);if(0===s)return 30;let i=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return 2===s&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>Ir.ansi256ToAnsi(Ir.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>Ir.ansi256ToAnsi(Ir.hexToAnsi256(e)),enumerable:!1}}),Ir}(),Nr=(()=>{if(!("navigator"in globalThis))return 0;if(globalThis.navigator.userAgentData){const e=navigator.userAgentData.brands.find(({brand:e})=>"Chromium"===e);if(e&&e.version>93)return 3}return/\b(Chrome|Chromium)\//.test(globalThis.navigator.userAgent)?1:0})(),Ur=0!==Nr&&{level:Nr},Gr={stdout:Ur,stderr:Ur};function Hr(e,t,n){let r=e.indexOf(t);if(-1===r)return e;const s=t.length;let i=0,o="";do{o+=e.slice(i,r)+t+n,i=r+s,r=e.indexOf(t,i)}while(-1!==r);return o+=e.slice(i),o}const{stdout:Wr,stderr:Vr}=Gr,qr=Symbol("GENERATOR"),zr=Symbol("STYLER"),Yr=Symbol("IS_EMPTY"),Jr=["ansi","ansi","ansi256","ansi16m"],Kr=Object.create(null),Qr=e=>{const t=(...e)=>e.join(" ");return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const n=Wr?Wr.level:0;e.level=void 0===t.level?n:t.level})(t,e),Object.setPrototypeOf(t,Xr.prototype),t};function Xr(e){return Qr(e)}Object.setPrototypeOf(Xr.prototype,Function.prototype);for(const[e,t]of Object.entries(Br))Kr[e]={get(){const n=rs(this,ns(t.open,t.close,this[zr]),this[Yr]);return Object.defineProperty(this,e,{value:n}),n}};Kr.visible={get(){const e=rs(this,this[zr],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const Zr=(e,t,n,...r)=>"rgb"===e?"ansi16m"===t?Br[n].ansi16m(...r):"ansi256"===t?Br[n].ansi256(Br.rgbToAnsi256(...r)):Br[n].ansi(Br.rgbToAnsi(...r)):"hex"===e?Zr("rgb",t,n,...Br.hexToRgb(...r)):Br[n][e](...r),es=["rgb","hex","ansi256"];for(const e of es){Kr[e]={get(){const{level:t}=this;return function(...n){const r=ns(Zr(e,Jr[t],"color",...n),Br.color.close,this[zr]);return rs(this,r,this[Yr])}}};Kr["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...n){const r=ns(Zr(e,Jr[t],"bgColor",...n),Br.bgColor.close,this[zr]);return rs(this,r,this[Yr])}}}}const ts=Object.defineProperties(()=>{},{...Kr,level:{enumerable:!0,get(){return this[qr].level},set(e){this[qr].level=e}}}),ns=(e,t,n)=>{let r,s;return void 0===n?(r=e,s=t):(r=n.openAll+e,s=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:s,parent:n}},rs=(e,t,n)=>{const r=(...e)=>ss(r,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(r,ts),r[qr]=e,r[zr]=t,r[Yr]=n,r},ss=(e,t)=>{if(e.level<=0||!t)return e[Yr]?"":t;let n=e[zr];if(void 0===n)return t;const{openAll:r,closeAll:s}=n;if(t.includes(""))for(;void 0!==n;)t=Hr(t,n.close,n.open),n=n.parent;const i=t.indexOf("\n");return-1!==i&&(t=function(e,t,n,r){let s=0,i="";do{const o="\r"===e[r-1];i+=e.slice(s,o?r-1:r)+t+(o?"\r\n":"\n")+n,s=r+1,r=e.indexOf("\n",s)}while(-1!==r);return i+=e.slice(s),i}(t,s,r,i)),r+t+s};Object.defineProperties(Xr.prototype,Kr);const is=Xr();Xr({level:Vr?Vr.level:0});var os,as,cs={dots:{interval:80,frames:["โ ","โ ","โ น","โ ธ","โ ผ","โ ด","โ ฆ","โ ง","โ ","โ "]},dots2:{interval:80,frames:["โฃพ","โฃฝ","โฃป","โขฟ","โกฟ","โฃ","โฃฏ","โฃท"]},dots3:{interval:80,frames:["โ ","โ ","โ ","โ ","โ ","โ ฆ","โ ด","โ ฒ","โ ณ","โ "]},dots4:{interval:80,frames:["โ ","โ ","โ ","โ ","โ ","โ ธ","โ ฐ","โ ","โ ฐ","โ ธ","โ ","โ ","โ ","โ "]},dots5:{interval:80,frames:["โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ฒ","โ ด","โ ฆ","โ ","โ ","โ ","โ ","โ ","โ ","โ "]},dots6:{interval:80,frames:["โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ฒ","โ ด","โ ค","โ ","โ ","โ ค","โ ด","โ ฒ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ "]},dots7:{interval:80,frames:["โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ฆ","โ ค","โ ","โ ","โ ค","โ ฆ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ "]},dots8:{interval:80,frames:["โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ฒ","โ ด","โ ค","โ ","โ ","โ ค","โ ","โ ","โ ค","โ ฆ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ "]},dots9:{interval:80,frames:["โขน","โขบ","โขผ","โฃธ","โฃ","โกง","โก","โก"]},dots10:{interval:80,frames:["โข","โข","โข","โก","โก","โก","โก "]},dots11:{interval:100,frames:["โ ","โ ","โ ","โก","โข","โ ","โ ","โ "]},dots12:{interval:80,frames:["โขโ ","โกโ ","โ โ ","โขโ ","โกโ ","โ
โ ","โขโ ","โกโ ","โ โ ","โขโ ","โกโ ","โ โ ","โขโ ","โกโ ","โ โ ","โ โ ","โ โ ","โ โ ","โ โ ","โ โ ฉ","โ โข","โ โก","โขโ ฉ","โกโข","โ โก","โขโ ฉ","โกโข","โ
โก","โขโ จ","โกโข","โ โก","โขโ ","โกโข","โ โก","โขโ ","โกโ ","โ โ ","โ โ ","โ โ ","โ โ ","โ โ ","โ โ ฉ","โ โข","โ โก","โ โ ฉ","โ โข","โ โก","โ โ ฉ","โ โข","โ โก","โ โ จ","โ โข","โ โก","โ โ ","โ โข","โ โก"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["โ ","-","โ","โ","โ","-"]},pipe:{interval:100,frames:["โค","โ","โด","โ","โ","โ","โฌ","โ"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["โถ","โธ","โน","โบ","โน","โท"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","ยด","-","_","_","_"]},hamburger:{interval:100,frames:["โฑ","โฒ","โด"]},growVertical:{interval:120,frames:["โ","โ","โ","โ
","โ","โ","โ","โ
","โ","โ"]},growHorizontal:{interval:120,frames:["โ","โ","โ","โ","โ","โ","โ","โ","โ","โ","โ","โ"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","ยฐ","O","o","."]},noise:{interval:100,frames:["โ","โ","โ"]},bounce:{interval:120,frames:["โ ","โ ","โ ","โ "]},boxBounce:{interval:120,frames:["โ","โ","โ","โ"]},boxBounce2:{interval:100,frames:["โ","โ","โ","โ"]},triangle:{interval:50,frames:["โข","โฃ","โค","โฅ"]},arc:{interval:100,frames:["โ","โ ","โ","โ","โก","โ"]},circle:{interval:120,frames:["โก","โ","โ "]},squareCorners:{interval:180,frames:["โฐ","โณ","โฒ","โฑ"]},circleQuarters:{interval:120,frames:["โด","โท","โถ","โต"]},circleHalves:{interval:50,frames:["โ","โ","โ","โ"]},squish:{interval:100,frames:["โซ","โช"]},toggle:{interval:250,frames:["โถ","โท"]},toggle2:{interval:80,frames:["โซ","โช"]},toggle3:{interval:120,frames:["โก","โ "]},toggle4:{interval:100,frames:["โ ","โก","โช","โซ"]},toggle5:{interval:100,frames:["โฎ","โฏ"]},toggle6:{interval:300,frames:["แ","แ"]},toggle7:{interval:80,frames:["โฆพ","โฆฟ"]},toggle8:{interval:100,frames:["โ","โ"]},toggle9:{interval:100,frames:["โ","โ"]},toggle10:{interval:100,frames:["ใ","ใ","ใ"]},toggle11:{interval:50,frames:["โง","โง"]},toggle12:{interval:120,frames:["โ","โ"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["โ","โ","โ","โ","โ","โ","โ","โ"]},arrow2:{interval:80,frames:["โฌ๏ธ ","โ๏ธ ","โก๏ธ ","โ๏ธ ","โฌ๏ธ ","โ๏ธ ","โฌ
๏ธ ","โ๏ธ "]},arrow3:{interval:120,frames:["โนโนโนโนโน","โธโนโนโนโน","โนโธโนโนโน","โนโนโธโนโน","โนโนโนโธโน","โนโนโนโนโธ"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( โ )","( โ )","( โ )","( โ )","( โ)","( โ )","( โ )","( โ )","( โ )","(โ )"]},smiley:{interval:200,frames:["๐ ","๐ "]},monkey:{interval:300,frames:["๐ ","๐ ","๐ ","๐ "]},hearts:{interval:100,frames:["๐ ","๐ ","๐ ","๐ ","โค๏ธ "]},clock:{interval:100,frames:["๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ "]},earth:{interval:180,frames:["๐ ","๐ ","๐ "]},moon:{interval:80,frames:["๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ "]},runner:{interval:140,frames:["๐ถ ","๐ "]},pong:{interval:80,frames:["โโ โ","โโ โ","โ โ โ","โ โ โ","โ โก โ","โ โ โ","โ โ โ","โ โ โ","โ โ โ","โ โ โ","โ โก โ","โ โ โ","โ โ โ","โ โ โ","โ โ โ","โ โ โ","โ โกโ","โ โ โ","โ โ โ","โ โ โ","โ โ โ","โ โ โ","โ โก โ","โ โ โ","โ โ โ","โ โ โ","โ โ โ","โ โ โ","โ โก โ","โโ โ"]},shark:{interval:120,frames:["โ|\\____________โ","โ_|\\___________โ","โ__|\\__________โ","โ___|\\_________โ","โ____|\\________โ","โ_____|\\_______โ","โ______|\\______โ","โ_______|\\_____โ","โ________|\\____โ","โ_________|\\___โ","โ__________|\\__โ","โ___________|\\_โ","โ____________|\\โ","โ____________/|โ","โ___________/|_โ","โ__________/|__โ","โ_________/|___โ","โ________/|____โ","โ_______/|_____โ","โ______/|______โ","โ_____/|_______โ","โ____/|________โ","โ___/|_________โ","โ__/|__________โ","โ_/|___________โ","โ/|____________โ"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["โ๏ธ ","โ๏ธ ","โ๏ธ ","๐ค ","โ
๏ธ ","๐ฅ ","โ๏ธ ","๐ง ","๐จ ","๐ง ","๐จ ","๐ง ","๐จ ","โ ","๐จ ","๐ง ","๐จ ","โ๏ธ ","๐ฅ ","โ
๏ธ ","๐ค ","โ๏ธ ","โ๏ธ "]},christmas:{interval:400,frames:["๐ฒ","๐"]},grenade:{interval:80,frames:["ุ ","โฒ "," ยด "," โพ "," โธ"," โธ"," |"," โ"," โ"," เทด "," โ"," "," "," "]},point:{interval:125,frames:["โโโ","โโโ","โโโ","โโโ","โโโ"]},layer:{interval:150,frames:["-","=","โก"]}};var ls,us={exports:{}},hs={exports:{}};function ps(){return ls||(ls=1,function(){const e=hs.exports,t="[",n="]",r="",s=";",i="Apple_Terminal"===process.env.TERM_PROGRAM;e.cursorTo=(e,n)=>{if("number"!=typeof e)throw new TypeError("The `x` argument is required");return"number"!=typeof n?t+(e+1)+"G":t+(n+1)+";"+(e+1)+"H"},e.cursorMove=(e,n)=>{if("number"!=typeof e)throw new TypeError("The `x` argument is required");let r="";return e<0?r+=t+-e+"D":e>0&&(r+=t+e+"C"),n<0?r+=t+-n+"A":n>0&&(r+=t+n+"B"),r},e.cursorUp=e=>t+("number"==typeof e?e:1)+"A",e.cursorDown=e=>t+("number"==typeof e?e:1)+"B",e.cursorForward=e=>t+("number"==typeof e?e:1)+"C",e.cursorBackward=e=>t+("number"==typeof e?e:1)+"D",e.cursorLeft="[G",e.cursorSavePosition=t+(i?"7":"s"),e.cursorRestorePosition=t+(i?"8":"u"),e.cursorGetPosition="[6n",e.cursorNextLine="[E",e.cursorPrevLine="[F",e.cursorHide="[?25l",e.cursorShow="[?25h",e.eraseLines=t=>{let n="";for(let r=0;r<t;r++)n+=e.eraseLine+(r<t-1?e.cursorUp():"");return t&&(n+=e.cursorLeft),n},e.eraseEndLine="[K",e.eraseStartLine="[1K",e.eraseLine="[2K",e.eraseDown="[J",e.eraseUp="[1J",e.eraseScreen="[2J",e.scrollUp="[S",e.scrollDown="[T",e.clearScreen="c",e.clearTerminal="win32"===process.platform?`${e.eraseScreen}${t}0f`:`${e.eraseScreen}${t}3J${t}H`,e.beep=r,e.link=(e,t)=>[n,"8",s,s,t,r,e,n,"8",s,s,r].join(""),e.image=(e,t)=>{let s=n+"1337;File=inline=1";return(t=t||{}).width&&(s+=`;width=${t.width}`),t.height&&(s+=`;height=${t.height}`),!1===t.preserveAspectRatio&&(s+=";preserveAspectRatio=0"),s+":"+e.toString("base64")+r},e.iTerm={},e.iTerm.setCwd=e=>n+"50;CurrentDir="+(e||process.cwd())+r}()),hs.exports}var fs,ds,ms,gs,ys={};function bs(){return ds?fs:(ds=1,fs=(e,t)=>{for(const n of Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e})}function ws(){if(gs)return ms;gs=1;const e=bs();return ms=(t,n)=>{if(!0===n)throw new TypeError("The second argument is now an options object");if("function"!=typeof t)throw new TypeError("Expected a function");let r;n=n||{};let s=!1;const i=t.displayName||t.name||"<anonymous>",o=function(){if(s){if(!0===n.throw)throw new Error(`Function \`${i}\` can only be called once`);return r}return s=!0,r=t.apply(this,arguments),t=null,r};return e(o,t),o},ms}var _s,vs,ks,Ss,Os,Cs,xs,Es,Ts,As,Ds,$s,Ps,Fs,Ms,Rs,Ls,js,Is,Bs,Ns,Us,Gs,Hs,Ws={exports:{}},Vs={exports:{}};function qs(){return _s||(_s=1,(e=Vs).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),Vs.exports;var e}function zs(){if(vs)return Ws.exports;vs=1;var t=_.process;const n=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(n(t)){var r,s=f,i=qs(),o=/^win/i.test(t.platform),a=e;"function"!=typeof a&&(a=a.EventEmitter),t.__signal_exit_emitter__?r=t.__signal_exit_emitter__:((r=t.__signal_exit_emitter__=new a).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),Ws.exports=function(e,t){if(!n(_.process))return function(){};s.equal(typeof e,"function","a callback must be provided for exit handler"),!1===h&&p();var i="exit";t&&t.alwaysLast&&(i="afterexit");return r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&c()}};var c=function(){h&&n(_.process)&&(h=!1,i.forEach(function(e){try{t.removeListener(e,u[e])}catch(e){}}),t.emit=g,t.reallyExit=d,r.count-=1)};Ws.exports.unload=c;var l=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},u={};i.forEach(function(e){u[e]=function(){n(_.process)&&(t.listeners(e).length===r.count&&(c(),l("exit",null,e),l("afterexit",null,e),o&&"SIGHUP"===e&&(e="SIGINT"),t.kill(t.pid,e)))}}),Ws.exports.signals=function(){return i};var h=!1,p=function(){!h&&n(_.process)&&(h=!0,r.count+=1,i=i.filter(function(e){try{return t.on(e,u[e]),!0}catch(e){return!1}}),t.emit=y,t.reallyExit=m)};Ws.exports.load=p;var d=t.reallyExit,m=function(e){n(_.process)&&(t.exitCode=e||0,l("exit",t.exitCode,null),l("afterexit",t.exitCode,null),d.call(t,t.exitCode))},g=t.emit,y=function(e,r){if("exit"===e&&n(_.process)){void 0!==r&&(t.exitCode=r);var s=g.apply(this,arguments);return l("exit",t.exitCode,null),l("afterexit",t.exitCode,null),s}return g.apply(this,arguments)}}else Ws.exports=function(){return function(){}};return Ws.exports}function Ys(){if(Ss)return ks;Ss=1;const e=ws(),t=zs();return ks=e(()=>{t(()=>{process.stderr.write("[?25h")},{alwaysLast:!0})})}function Js(){return Os||(Os=1,function(e){const t=Ys();let n=!1;e.show=e=>{const t=e||process.stderr;t.isTTY&&(n=!1,t.write("[?25h"))},e.hide=e=>{const r=e||process.stderr;r.isTTY&&(t(),n=!0,r.write("[?25l"))},e.toggle=(t,r)=>{void 0!==t&&(n=t),n?e.show(r):e.hide(r)}}(ys)),ys}function Ks(){return xs?Cs:(xs=1,Cs=()=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");return new RegExp(e,"g")})}function Qs(){if(Ts)return Es;Ts=1;const e=Ks();return Es=t=>"string"==typeof t?t.replace(e(),""):t,Es}function Xs(){return Ds||(Ds=1,As=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141))),As}function Zs(){if(Ps)return $s;Ps=1;const e=Qs(),t=Xs();return $s=n=>{if("string"!=typeof n||0===n.length)return 0;n=e(n);let r=0;for(let e=0;e<n.length;e++){const s=n.codePointAt(e);s<=31||s>=127&&s<=159||(s>=768&&s<=879||(s>65535&&e++,r+=t(s)?2:1))}return r},$s}function ei(){if(Ms)return Fs;Ms=1;const e=Zs(),t=Qs(),n=new Set(["","ย"]),r=new Map([[0,0],[1,22],[2,22],[3,23],[4,24],[7,27],[8,28],[9,29],[30,39],[31,39],[32,39],[33,39],[34,39],[35,39],[36,39],[37,39],[90,39],[40,49],[41,49],[42,49],[43,49],[44,49],[45,49],[46,49],[47,49]]),s=e=>`${n.values().next().value}[${e}m`,i=(r,s,i)=>{const o=Array.from(s);let a=!1,c=e(t(r[r.length-1]));for(const t of o.entries()){const s=t[0],l=t[1],u=e(l);if(c+u<=i?r[r.length-1]+=l:(r.push(l),c=0),n.has(l))a=!0;else if(a&&"m"===l){a=!1;continue}a||(c+=u,c===i&&s<o.length-1&&(r.push(""),c=0))}!c&&r[r.length-1].length>0&&r.length>1&&(r[r.length-2]+=r.pop())},o=(t,o,a)=>{const c=a||{};if(""===t.trim())return!1===c.trim?t:t.trim();let l,u="",h="";const p=(t=>t.split(" ").map(t=>e(t)))(t),f=t.split(" "),d=[""];for(const t of Array.from(f).entries()){const n=t[0],r=t[1];d[d.length-1]=!1===c.trim?d[d.length-1]:d[d.length-1].trim();let s=e(d[d.length-1]);if((s||""===r)&&(s===o&&!1===c.wordWrap&&(d.push(""),s=0),d[d.length-1]+=" ",s++),p[n]>o&&c.hard)s&&d.push(""),i(d,r,o);else{if(s+p[n]>o&&s>0){if(!1===c.wordWrap&&s<o){i(d,r,o);continue}d.push("")}s+p[n]>o&&!1===c.wordWrap?i(d,r,o):d[d.length-1]+=r}}u=d.map(e=>!1===c.trim?e:e.trim()).join("\n");for(const e of Array.from(u).entries()){const t=e[0],i=e[1];if(h+=i,n.has(i)){const e=parseFloat(/\d[^m]*/.exec(u.slice(t,t+4)));l=39===e?null:e}const o=r.get(Number(l));l&&o&&("\n"===u[t+1]?h+=s(o):"\n"===i&&(h+=s(l)))}return h};return Fs=(e,t,n)=>String(e).normalize().split("\n").map(e=>o(e,t,n)).join("\n"),Fs}function ti(){if(Rs)return us.exports;Rs=1;const e=ps(),t=Js(),n=ei(),r=(r,s)=>{s=Object.assign({showCursor:!1},s);let i=0;const o=function(){s.showCursor||t.hide();let o=[].join.call(arguments," ")+"\n";o=n(o,(e=>{const t=e.columns;return t?"win32"===process.platform?t-1:t:80})(r),{trim:!1,hard:!0,wordWrap:!1}),r.write(e.eraseLines(i)+o),i=o.split("\n").length};return o.clear=()=>{r.write(e.eraseLines(i)),i=0},o.done=()=>{i=0,s.showCursor||t.show()},o};return us.exports=r(process.stdout),us.exports.stderr=r(process.stderr),us.exports.create=r,us.exports}function ni(){if(Hs)return Gs;Hs=1;const{createHash:e}=m,{humanizeActual:t,humanizeRemaining:n}=function(){if(js)return Ls;js=1;const e=1e3,t=6e4,n=36e5;return Ls={humanizeActual:r=>{let s;return r<e?(r=Math.round(r),s="ms"):r<t?(r=(r/e).toFixed(1),s="secs"):r<n?(r=(r/t).toFixed(1),s="mins"):(r=(r/n).toFixed(1),s="hours"),r%1==0?`${Math.round(r)} ${s}`:`${r} ${s}`},humanizeRemaining:(r,s)=>{let i;return s<e?(r=Math.round(r),s=Math.round(s),i="ms"):s<t?(r=(r/e).toFixed(1),s=(s/e).toFixed(1),i="s"):s<n?(r=(r/t).toFixed(1),s=(s/t).toFixed(1),i="m"):(r=(r/n).toFixed(1),s=(s/n).toFixed(1),i="h"),`${r}${i}, estimated ${s}${i}`}}}(),{getEstimate:r,updateEstimate:i}=function(){if(Bs)return Is;Bs=1;const{existsSync:e,mkdirSync:t,readFileSync:n,writeFileSync:r}=o,{join:i}=s,a=(t,r)=>{const s=i(r,t);return e(s)?n(s,"utf8").split("\n").filter(e=>e).map(e=>Number.parseInt(e,10)):[]};return Is={getEstimate:(e,t,n)=>{const r=a(e,n);return r.length<3&&t&&r.push(t),r.length>0?r.reduce((e,t)=>e+t,0)/r.length:t},updateEstimate:(n,s,o)=>{e(o)||t(o);const c=a(n,o);c.push(s),c.length>10&&c.shift();const l=i(o,n);r(l,c.join("\n"))}}}(),{getProgressBar:a}=(Us||(Us=1,Ns={getProgressBar:(e,t,n=20)=>{e=Math.max(0,Math.min(.99,e));const r=` ${Math.round(100*e)}%`.padEnd(n);let s="";for(let i=0;i<n;i++){const o=r.charAt(i);s+=e>0&&i/n<=e?t.progressForeground(o):t.progressBackground(o)}return s}}),Ns);return Gs=s=>{const{logFunction:o,spinner:c,storagePath:l,theme:u}=s;return async(s,h,p)=>{let f,{estimate:d,id:m}=p||{};if(!m){const t=e("sha1");t.update(h),m=t.digest("hex")}try{d=r(m,d,l);const e=Date.now(),{frames:p,interval:g}=c;let y=0;f=setInterval(()=>{y=++y%p.length;let t=u`{asciiInProgress ${p[y]}} {label ${h}}`;if(d>0){const r=Date.now()-e,s=d-r;let i=n(r,d);i=s<0?u.estimateExceeded(i):u.estimate(i);const o=a(r/d,u);t+=u` ${o} {estimate ${i}}`}o(t)},g);const b=await s,w=Date.now()-e;i(m,w,l);const _=t(w);return o(u`{asciiCompleted โ} {label ${h}} {estimate ${_}}`),o.done(),b}catch(e){throw o.clear(),e}finally{clearInterval(f)}}},Gs}var ri,si,ii={exports:{}};function oi(){if(si)return ri;si=1;var e=/[|\\{}()[\]^$+*?.]/g;return ri=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(e,"\\$&")}}var ai,ci,li,ui,hi,pi,fi,di,mi,gi,yi,bi,wi,_i,vi,ki,Si,Oi,Ci,xi={exports:{}},Ei={exports:{}};function Ti(){if(li)return Ei.exports;li=1;var e=ci?ai:(ci=1,ai={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]}),t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);var r=Ei.exports={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"]}};for(var s in r)if(r.hasOwnProperty(s)){if(!("channels"in r[s]))throw new Error("missing channels property: "+s);if(!("labels"in r[s]))throw new Error("missing channel labels property: "+s);if(r[s].labels.length!==r[s].channels)throw new Error("channel and label counts mismatch: "+s);var i=r[s].channels,o=r[s].labels;delete r[s].channels,delete r[s].labels,Object.defineProperty(r[s],"channels",{value:i}),Object.defineProperty(r[s],"labels",{value:o})}function a(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2)}return r.rgb.hsl=function(e){var t,n,r=e[0]/255,s=e[1]/255,i=e[2]/255,o=Math.min(r,s,i),a=Math.max(r,s,i),c=a-o;return a===o?t=0:r===a?t=(s-i)/c:s===a?t=2+(i-r)/c:i===a&&(t=4+(r-s)/c),(t=Math.min(60*t,360))<0&&(t+=360),n=(o+a)/2,[t,100*(a===o?0:n<=.5?c/(a+o):c/(2-a-o)),100*n]},r.rgb.hsv=function(e){var t,n,r,s,i,o=e[0]/255,a=e[1]/255,c=e[2]/255,l=Math.max(o,a,c),u=l-Math.min(o,a,c),h=function(e){return(l-e)/6/u+.5};return 0===u?s=i=0:(i=u/l,t=h(o),n=h(a),r=h(c),o===l?s=r-n:a===l?s=1/3+t-r:c===l&&(s=2/3+n-t),s<0?s+=1:s>1&&(s-=1)),[360*s,100*i,100*l]},r.rgb.hwb=function(e){var t=e[0],n=e[1],s=e[2];return[r.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(n,s))),100*(s=1-1/255*Math.max(t,Math.max(n,s)))]},r.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,s=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-s)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-s-t)/(1-t)||0),100*t]},r.rgb.keyword=function(n){var r=t[n];if(r)return r;var s,i=1/0;for(var o in e)if(e.hasOwnProperty(o)){var c=a(n,e[o]);c<i&&(i=c,s=o)}return s},r.keyword.rgb=function(t){return e[t]},r.rgb.xyz=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},r.rgb.lab=function(e){var t=r.rgb.xyz(e),n=t[0],s=t[1],i=t[2];return s/=100,i/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(s=s>.008856?Math.pow(s,1/3):7.787*s+16/116)-16,500*(n-s),200*(s-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},r.hsl.rgb=function(e){var t,n,r,s,i,o=e[0]/360,a=e[1]/100,c=e[2]/100;if(0===a)return[i=255*c,i,i];t=2*c-(n=c<.5?c*(1+a):c+a-c*a),s=[0,0,0];for(var l=0;l<3;l++)(r=o+1/3*-(l-1))<0&&r++,r>1&&r--,i=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,s[l]=255*i;return s},r.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,s=n,i=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,s*=i<=1?i:2-i,[t,100*(0===r?2*s/(i+s):2*n/(r+n)),100*((r+n)/2)]},r.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,s=Math.floor(t)%6,i=t-Math.floor(t),o=255*r*(1-n),a=255*r*(1-n*i),c=255*r*(1-n*(1-i));switch(r*=255,s){case 0:return[r,c,o];case 1:return[a,r,o];case 2:return[o,r,c];case 3:return[o,a,r];case 4:return[c,o,r];case 5:return[r,o,a]}},r.hsv.hsl=function(e){var t,n,r,s=e[0],i=e[1]/100,o=e[2]/100,a=Math.max(o,.01);return r=(2-i)*o,n=i*a,[s,100*(n=(n/=(t=(2-i)*a)<=1?t:2-t)||0),100*(r/=2)]},r.hwb.rgb=function(e){var t,n,r,s,i,o,a,c=e[0]/360,l=e[1]/100,u=e[2]/100,h=l+u;switch(h>1&&(l/=h,u/=h),r=6*c-(t=Math.floor(6*c)),1&t&&(r=1-r),s=l+r*((n=1-u)-l),t){default:case 6:case 0:i=n,o=s,a=l;break;case 1:i=s,o=n,a=l;break;case 2:i=l,o=n,a=s;break;case 3:i=l,o=s,a=n;break;case 4:i=s,o=l,a=n;break;case 5:i=n,o=l,a=s}return[255*i,255*o,255*a]},r.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,s=e[3]/100;return[255*(1-Math.min(1,t*(1-s)+s)),255*(1-Math.min(1,n*(1-s)+s)),255*(1-Math.min(1,r*(1-s)+s))]},r.xyz.rgb=function(e){var t,n,r,s=e[0]/100,i=e[1]/100,o=e[2]/100;return n=-.9689*s+1.8758*i+.0415*o,r=.0557*s+-.204*i+1.057*o,t=(t=3.2406*s+-1.5372*i+-.4986*o)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},r.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},r.lab.xyz=function(e){var t,n,r,s=e[0];t=e[1]/500+(n=(s+16)/116),r=n-e[2]/200;var i=Math.pow(n,3),o=Math.pow(t,3),a=Math.pow(r,3);return n=i>.008856?i:(n-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,r=a>.008856?a:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},r.lab.lch=function(e){var t,n=e[0],r=e[1],s=e[2];return(t=360*Math.atan2(s,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+s*s),t]},r.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},r.rgb.ansi16=function(e){var t=e[0],n=e[1],s=e[2],i=1 in arguments?arguments[1]:r.rgb.hsv(e)[2];if(0===(i=Math.round(i/50)))return 30;var o=30+(Math.round(s/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===i&&(o+=60),o},r.hsv.ansi16=function(e){return r.rgb.ansi16(r.hsv.rgb(e),e[2])},r.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},r.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},r.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},r.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},r.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map(function(e){return e+e}).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},r.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,s=e[2]/255,i=Math.max(Math.max(n,r),s),o=Math.min(Math.min(n,r),s),a=i-o;return t=a<=0?0:i===n?(r-s)/a%6:i===r?2+(s-n)/a:4+(n-r)/a+4,t/=6,[360*(t%=1),100*a,100*(a<1?o/(1-a):0)]},r.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,s=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(s=(n-.5*r)/(1-r)),[e[0],100*r,100*s]},r.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,s=0;return r<1&&(s=(n-r)/(1-r)),[e[0],100*r,100*s]},r.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var s,i=[0,0,0],o=t%1*6,a=o%1,c=1-a;switch(Math.floor(o)){case 0:i[0]=1,i[1]=a,i[2]=0;break;case 1:i[0]=c,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=a;break;case 3:i[0]=0,i[1]=c,i[2]=1;break;case 4:i[0]=a,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=c}return s=(1-n)*r,[255*(n*i[0]+s),255*(n*i[1]+s),255*(n*i[2]+s)]},r.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},r.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},r.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},r.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,s=0;return r<1&&(s=(n-r)/(1-r)),[e[0],100*r,100*s]},r.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},r.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},r.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},r.gray.hsl=r.gray.hsv=function(e){return[0,0,e[0]]},r.gray.hwb=function(e){return[0,100,e[0]]},r.gray.cmyk=function(e){return[0,0,0,e[0]]},r.gray.lab=function(e){return[e[0],0,0]},r.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},r.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},Ei.exports}function Ai(){if(hi)return ui;hi=1;var e=Ti();function t(t){var n=function(){for(var t={},n=Object.keys(e),r=n.length,s=0;s<r;s++)t[n[s]]={distance:-1,parent:null};return t}(),r=[t];for(n[t].distance=0;r.length;)for(var s=r.pop(),i=Object.keys(e[s]),o=i.length,a=0;a<o;a++){var c=i[a],l=n[c];-1===l.distance&&(l.distance=n[s].distance+1,l.parent=s,r.unshift(c))}return n}function n(e,t){return function(n){return t(e(n))}}function r(t,r){for(var s=[r[t].parent,t],i=e[r[t].parent][t],o=r[t].parent;r[o].parent;)s.unshift(r[o].parent),i=n(e[r[o].parent][o],i),o=r[o].parent;return i.conversion=s,i}return ui=function(e){for(var n=t(e),s={},i=Object.keys(n),o=i.length,a=0;a<o;a++){var c=i[a];null!==n[c].parent&&(s[c]=r(c,n))}return s},ui}function Di(){if(fi)return pi;fi=1;var e=Ti(),t=Ai(),n={};return Object.keys(e).forEach(function(r){n[r]={},Object.defineProperty(n[r],"channels",{value:e[r].channels}),Object.defineProperty(n[r],"labels",{value:e[r].labels});var s=t(r);Object.keys(s).forEach(function(e){var t=s[e];n[r][e]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var r=n.length,s=0;s<r;s++)n[s]=Math.round(n[s]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[r][e].raw=function(e){var t=function(t){return null==t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)})}),pi=n}function $i(){return di||(di=1,function(e){const t=Di(),n=(e,n)=>function(){return`[${e.apply(t,arguments)+n}m`},r=(e,n)=>function(){const r=e.apply(t,arguments);return`[${38+n};5;${r}m`},s=(e,n)=>function(){const r=e.apply(t,arguments);return`[${38+n};2;${r[0]};${r[1]};${r[2]}m`};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,i={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],gray:[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]}};i.color.grey=i.color.gray;for(const t of Object.keys(i)){const n=i[t];for(const t of Object.keys(n)){const r=n[t];i[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=i[t],e.set(r[0],r[1])}Object.defineProperty(i,t,{value:n,enumerable:!1}),Object.defineProperty(i,"codes",{value:e,enumerable:!1})}const o=e=>e,a=(e,t,n)=>[e,t,n];i.color.close="[39m",i.bgColor.close="[49m",i.color.ansi={ansi:n(o,0)},i.color.ansi256={ansi256:r(o,0)},i.color.ansi16m={rgb:s(a,0)},i.bgColor.ansi={ansi:n(o,10)},i.bgColor.ansi256={ansi256:r(o,10)},i.bgColor.ansi16m={rgb:s(a,10)};for(let e of Object.keys(t)){if("object"!=typeof t[e])continue;const o=t[e];"ansi16"===e&&(e="ansi"),"ansi16"in o&&(i.color.ansi[e]=n(o.ansi16,0),i.bgColor.ansi[e]=n(o.ansi16,10)),"ansi256"in o&&(i.color.ansi256[e]=r(o.ansi256,0),i.bgColor.ansi256[e]=r(o.ansi256,10)),"rgb"in o&&(i.color.ansi16m[e]=s(o.rgb,0),i.bgColor.ansi16m[e]=s(o.rgb,10))}return i}})}(xi)),xi.exports}function Pi(){return gi?mi:(gi=1,mi=(e,t)=>{t=t||process.argv;const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),s=t.indexOf("--");return-1!==r&&(-1===s||r<s)})}function Fi(){if(bi)return yi;bi=1;const e=d,t=Pi(),n=process.env;let r;function s(s){const i=function(s){if(!1===r)return 0;if(t("color=16m")||t("color=full")||t("color=truecolor"))return 3;if(t("color=256"))return 2;if(s&&!s.isTTY&&!0!==r)return 0;const i=r?1:0;if("win32"===process.platform){const t=e.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in n)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in n)||"codeship"===n.CI_NAME?1:i;if("TEAMCITY_VERSION"in n)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(n.TEAMCITY_VERSION)?1:0;if("truecolor"===n.COLORTERM)return 3;if("TERM_PROGRAM"in n){const e=parseInt((n.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(n.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(n.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(n.TERM)||"COLORTERM"in n?1:(n.TERM,i)}(s);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(i)}return t("no-color")||t("no-colors")||t("color=false")?r=!1:(t("color")||t("colors")||t("color=true")||t("color=always"))&&(r=!0),"FORCE_COLOR"in n&&(r=0===n.FORCE_COLOR.length||0!==parseInt(n.FORCE_COLOR,10)),yi={supportsColor:s,stdout:s(process.stdout),stderr:s(process.stderr)}}function Mi(){return vi||(vi=1,function(e){const t=oi(),n=$i(),r=Fi().stdout,s=function(){if(_i)return wi;_i=1;const e=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,t=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,n=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,r=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,s=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function i(e){return"u"===e[0]&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):s.get(e)||e}function o(e,t){const s=[],o=t.trim().split(/\s*,\s*/g);let a;for(const t of o)if(isNaN(t)){if(!(a=t.match(n)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);s.push(a[2].replace(r,(e,t,n)=>t?i(t):n))}else s.push(Number(t));return s}function a(e){t.lastIndex=0;const n=[];let r;for(;null!==(r=t.exec(e));){const e=r[1];if(r[2]){const t=o(e,r[2]);n.push([e].concat(t))}else n.push([e])}return n}function c(e,t){const n={};for(const e of t)for(const t of e.styles)n[t[0]]=e.inverse?null:t.slice(1);let r=e;for(const e of Object.keys(n))if(Array.isArray(n[e])){if(!(e in r))throw new Error(`Unknown Chalk style: ${e}`);r=n[e].length>0?r[e].apply(r,n[e]):r[e]}return r}return wi=(t,n)=>{const r=[],s=[];let o=[];if(n.replace(e,(e,n,l,u,h,p)=>{if(n)o.push(i(n));else if(u){const e=o.join("");o=[],s.push(0===r.length?e:c(t,r)(e)),r.push({inverse:l,styles:a(u)})}else if(h){if(0===r.length)throw new Error("Found extraneous } in Chalk template literal");s.push(c(t,r)(o.join(""))),o=[],r.pop()}else o.push(p)}),s.push(o.join("")),r.length>0){const e=`Chalk template literal is missing ${r.length} closing bracket${1===r.length?"":"s"} (\`}\`)`;throw new Error(e)}return s.join("")},wi}(),i="win32"===process.platform&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),o=["ansi","ansi","ansi256","ansi16m"],a=new Set(["gray"]),c=Object.create(null);function l(e,t){t=t||{};const n=r?r.level:0;e.level=void 0===t.level?n:t.level,e.enabled="enabled"in t?t.enabled:e.level>0}function u(e){if(!this||!(this instanceof u)||this.template){const t={};return l(t,e),t.template=function(){const e=[].slice.call(arguments);return d.apply(null,[t.template].concat(e))},Object.setPrototypeOf(t,u.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=u,t.template}l(this,e)}i&&(n.blue.open="[94m");for(const e of Object.keys(n))n[e].closeRe=new RegExp(t(n[e].close),"g"),c[e]={get(){const t=n[e];return p.call(this,this._styles?this._styles.concat(t):[t],this._empty,e)}};c.visible={get(){return p.call(this,this._styles||[],!0,"visible")}},n.color.closeRe=new RegExp(t(n.color.close),"g");for(const e of Object.keys(n.color.ansi))a.has(e)||(c[e]={get(){const t=this.level;return function(){const r={open:n.color[o[t]][e].apply(null,arguments),close:n.color.close,closeRe:n.color.closeRe};return p.call(this,this._styles?this._styles.concat(r):[r],this._empty,e)}}});n.bgColor.closeRe=new RegExp(t(n.bgColor.close),"g");for(const e of Object.keys(n.bgColor.ansi)){if(a.has(e))continue;c["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const t=this.level;return function(){const r={open:n.bgColor[o[t]][e].apply(null,arguments),close:n.bgColor.close,closeRe:n.bgColor.closeRe};return p.call(this,this._styles?this._styles.concat(r):[r],this._empty,e)}}}}const h=Object.defineProperties(()=>{},c);function p(e,t,n){const r=function(){return f.apply(r,arguments)};r._styles=e,r._empty=t;const s=this;return Object.defineProperty(r,"level",{enumerable:!0,get:()=>s.level,set(e){s.level=e}}),Object.defineProperty(r,"enabled",{enumerable:!0,get:()=>s.enabled,set(e){s.enabled=e}}),r.hasGrey=this.hasGrey||"gray"===n||"grey"===n,r.__proto__=h,r}function f(){const e=arguments,t=e.length;let r=String(arguments[0]);if(0===t)return"";if(t>1)for(let n=1;n<t;n++)r+=" "+e[n];if(!this.enabled||this.level<=0||!r)return this._empty?"":r;const s=n.dim.open;i&&this.hasGrey&&(n.dim.open="");for(const e of this._styles.slice().reverse())r=e.open+r.replace(e.closeRe,e.open)+e.close,r=r.replace(/\r?\n/g,`${e.close}$&${e.open}`);return n.dim.open=s,r}function d(e,t){if(!Array.isArray(t))return[].slice.call(arguments,1).join(" ");const n=[].slice.call(arguments,2),r=[t.raw[0]];for(let e=1;e<t.length;e++)r.push(String(n[e-1]).replace(/[{}\\]/g,"\\$&")),r.push(String(t.raw[e]));return s(e,r.join(""))}Object.defineProperties(u.prototype,c),e.exports=u(),e.exports.supportsColor=r,e.exports.default=e.exports}(ii)),ii.exports}function Ri(){if(Si)return ki;Si=1;const e="#171717",t="#757575",n="#00de6d",r="#007272",s="#cf000b",i="#ffdd00",o="#ffffff",a=Mi().constructor();return a.asciiCompleted=a.hex(n),a.asciiInProgress=a.hex(i),a.estimate=a.hex(t),a.estimateExceeded=a.hex(s),a.label=a,a.percentage=a,a.progressBackground=a.bgHex(r).hex(o),a.progressForeground=a.bgHex(n).hex(e),ki=a}var Li,ji,Ii,Bi,Ni,Ui=function(){if(Ci)return Oi;Ci=1;const{dots:e}=as?os:(as=1,os=cs),t=ti(),{tmpdir:n}=d,r=ni(),s={logFunction:t,spinner:e,storagePath:`${n()}/progress-estimator`,theme:Ri()};return Oi=e=>r({...s,...e})}(),Gi=v(Ui),Hi={},Wi={},Vi={exports:{}},qi={exports:{}};function zi(){if(ji)return Li;ji=1;var e=1e3,t=60*e,n=60*t,r=24*n,s=7*r,i=365.25*r;function o(e,t,n,r){var s=t>=1.5*n;return Math.round(e/n)+" "+r+(s?"s":"")}return Li=function(a,c){c=c||{};var l=typeof a;if("string"===l&&a.length>0)return function(o){if((o=String(o)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*i;case"weeks":case"week":case"w":return c*s;case"days":case"day":case"d":return c*r;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(a);if("number"===l&&isFinite(a))return c.long?function(s){var i=Math.abs(s);if(i>=r)return o(s,i,r,"day");if(i>=n)return o(s,i,n,"hour");if(i>=t)return o(s,i,t,"minute");if(i>=e)return o(s,i,e,"second");return s+" ms"}(a):function(s){var i=Math.abs(s);if(i>=r)return Math.round(s/r)+"d";if(i>=n)return Math.round(s/n)+"h";if(i>=t)return Math.round(s/t)+"m";if(i>=e)return Math.round(s/e)+"s";return s+"ms"}(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))}}function Yi(){if(Bi)return Ii;return Bi=1,Ii=function(e){function t(e){let r,s,i,o=null;function a(...e){if(!a.enabled)return;const n=a,s=Number(new Date),i=s-(r||s);n.diff=i,n.prev=r,n.curr=s,r=s,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,s)=>{if("%%"===r)return"%";o++;const i=t.formatters[s];if("function"==typeof i){const t=e[o];r=i.call(n,t),e.splice(o,1),o--}return r}),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(s!==t.namespaces&&(s=t.namespaces,i=t.enabled(e)),i),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e,t){let n=0,r=0,s=-1,i=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||"*"===t[r]))"*"===t[r]?(s=r,i=n,r++):(n++,r++);else{if(-1===s)return!1;r=s+1,i++,n=i}for(;r<t.length&&"*"===t[r];)r++;return r===t.length}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of n)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const n of t.skips)if(r(e,n))return!1;for(const n of t.names)if(r(e,n))return!0;return!1},t.humanize=zi(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},Ii}var Ji,Ki,Qi,Xi,Zi={exports:{}};function eo(){return Ji||(Ji=1,function(e,t){const n=g,r=u;t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(r.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:s}=this;if(s){const t=this.color,s="[3"+(t<8?t:"8;5;"+t),i=` ${s};1m${r} [0m`;n[0]=i+n[0].split("\n").join("\n"+i),n.push(s+"m+"+e.exports.humanize(this.diff)+"[0m")}else n[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+r+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=r.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=Fi();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase());let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e},{}),e.exports=Yi()(t);const{formatters:s}=e.exports;s.o=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts).split("\n").map(e=>e.trim()).join(" ")},s.O=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts)}}(Zi,Zi.exports)),Zi.exports}function to(){return Ki||(Ki=1,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?Vi.exports=(Ni||(Ni=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,s=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(s=r))}),t.splice(s,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=Yi()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(qi,qi.exports)),qi.exports):Vi.exports=eo()),Vi.exports}function no(){return Qi||(Qi=1,function(e){var t=Wi&&Wi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0});const n=o,r=t(to()).default("@kwsites/file-exists");e.exists=function(t,s=e.READABLE){return function(e,t,s){r("checking %s",e);try{const i=n.statSync(e);return i.isFile()&&t?(r("[OK] path represents a file"),!0):i.isDirectory()&&s?(r("[OK] path represents a directory"),!0):(r("[FAIL] path represents something other than a file or directory"),!1)}catch(e){if("ENOENT"===e.code)return r("[FAIL] path is not accessible: %o",e),!1;throw r("[FATAL] %o",e),e}}(t,(s&e.FILE)>0,(s&e.FOLDER)>0)},e.FILE=1,e.FOLDER=2,e.READABLE=e.FILE+e.FOLDER}(Wi)),Wi}var ro,so=(Xi||(Xi=1,ro=Hi,Object.defineProperty(ro,"__esModule",{value:!0}),function(e){for(var t in e)ro.hasOwnProperty(t)||(ro[t]=e[t])}(no())),Hi);const io=new WeakMap;function oo(...e){const t=new String(e);return io.set(t,e),t}function ao(e){return e instanceof String&&io.has(e)}function co(e){return io.get(e)??[]}var lo,uo=v(to()),ho={};var po=function(){if(lo)return ho;function e(){let e,t,n="pending";return{promise:new Promise((n,r)=>{e=n,t=r}),done(t){"pending"===n&&(n="resolved",e(t))},fail(e){"pending"===n&&(n="rejected",t(e))},get fulfilled(){return"pending"!==n},get status(){return n}}}return lo=1,Object.defineProperty(ho,"__esModule",{value:!0}),ho.createDeferred=ho.deferred=void 0,ho.deferred=e,ho.createDeferred=e,ho.default=e,ho}();function*fo(e,t){const n="global"===t;for(const t of e)t.isGlobal===n&&(yield t)}const mo=new Set(["--add","--edit","--remove-section","--rename-section","--replace-all","--unset","--unset-all","-e"]),go=new Set(["--get","--get-all","--get-color","--get-colorbool","--get-regexp","--get-urlmatch","--list","-l"]),yo=new Set(["edit","remove-section","rename-section","set","unset"]),bo=new Set(["get","get-color","get-colorbool","list"]);function wo(e=!1,t=[]){const n=t.at(0)?.toLowerCase();return void 0===n?null:{isWrite:e,isRead:!e,key:n,value:t.at(1)}}function _o(e){const t=e?.indexOf("=")||-1;return!e||t<0?null:{key:e.slice(0,t).trim().toLowerCase(),value:e.slice(t+1)}}function vo({name:e}){return"-c"===e||"--config"===e?"inline":"--config-env"===e?"env":void 0}function*ko(e){for(const t of e){const e=vo(t),n=e&&_o(t.value);n&&(yield{...n,scope:e})}}function So(e,t,n){const r={read:[],write:[...ko(t)]};return"config"===e&&function(e,t,n){if(null===n)return;const r=function(e,t){return t.isWrite&&void 0!==t.value?{key:t.key,value:t.value,scope:e}:{key:t.key,scope:e}}(t,n);n.isWrite?e.write.push(r):e.read.push(r)}(r,function(e){for(const{name:t}of fo(e,"task"))switch(t){case"--global":return"global";case"--system":return"system";case"--worktree":return"worktree";case"--local":return"local";case"--file":case"-f":return"file"}return"local"}(t),function(e,t){for(const{name:n}of fo(e,"task")){if(mo.has(n))return wo(!0,t);if(go.has(n))return wo(!1,t)}const n=t.at(0)?.toLowerCase();return void 0===n?null:yo.has(n)?wo(!0,t.slice(1)):bo.has(n)?wo(!1,t.slice(1)):1===t.length?wo(!1,t):wo(!0,t)}(t,n)),r}const Oo={short:new Map([["c",!0]])},Co={short:new Map([["C",!0],["P",!1],["h",!1],["p",!1],["v",!1],...Oo.short.entries()]),long:new Set(["attr-source","config-env","exec-path","git-dir","list-cmds","namespace","super-prefix","work-tree"])},xo={clone:{short:new Map([["b",!0],["j",!0],["l",!1],["n",!1],["o",!0],["q",!1],["s",!1],["u",!0]]),long:new Set(["branch","config","jobs","origin","upload-pack","u","template"])},commit:{short:new Map([["C",!0],["F",!0],["c",!0],["m",!0],["t",!0]]),long:new Set(["file","message","reedit-message","reuse-message","template"])},config:{short:new Map([["e",!1],["f",!0],["l",!1]]),long:new Set(["blob","comment","default","file","type","value"])},fetch:{short:new Map,long:new Set(["upload-pack"])},init:{short:new Map,long:new Set(["template"])},pull:{short:new Map,long:new Set(["upload-pack"])},push:{short:new Map,long:new Set(["exec","receive-pack"])}},Eo={short:new Map,long:new Set};function To(e,t=Co){if(e.startsWith("--")){const n=e.indexOf("=");if(n>2)return[{name:e.slice(0,n),value:e.slice(n+1),needsNext:!1}];const r=e.slice(2);return[{name:e,needsNext:t.long.has(r)}]}if(2===e.length){const n=e.charAt(1);return[{name:e,needsNext:!0===t.short.get(n)}]}return function(e,t){const n=e.slice(1).split(""),r=[];for(let s=0;s<n.length;s++){const i=n[s],o=t.get(i);if(void 0===o)return[{name:e,needsNext:!1}];if(o){const e=n.slice(s+1).join("");if(e&&![...e].every(e=>t.has(e)))return r.push({name:`-${i}`,value:e,needsNext:!1}),r}r.push({name:`-${i}`,needsNext:o})}return r}(e,t.short)}function Ao(e,t,n=[]){const r=function(e){const t=xo[e??""]??Eo;return{short:new Map([...Oo.short.entries(),...t.short.entries()]),long:t.long}}(t),s=[],i=[];let o=0;for(;o<e.length;){const t=e[o];if(ao(t)){i.push(...co(t)),o++;continue}const a=String(t);if("--"===a){for(let t=o+1;t<e.length;t++){const n=e[t];ao(n)?i.push(...co(n)):i.push(String(n))}break}if(!a.startsWith("-")||a.length<2){s.push(a),o++;continue}const c=To(a,r);let l=o+1;for(const t of c){const r={name:t.name,value:t.value,absorbedNext:!1,isGlobal:!1};t.needsNext&&void 0===r.value&&l<e.length&&!ao(e[l])&&(r.value=String(e[l]),r.absorbedNext=!0,l++),n.push(r)}o=l}return{flags:n,positionals:s,pathspecs:i}}function*Do({write:e}){for(const t of e)for(const e of Fo){const n=e(t.key);n&&(yield n)}}function $o(e,t,n=String(e)){const r="string"==typeof e?new RegExp(`\\s*${e.toLowerCase()}`):e;return function(e){if(r.test(e))return{category:t,message:`Configuring ${n} is not permitted without enabling ${t}`}}}function Po(e,t){return $o(new RegExp(`\\s*${e.toLowerCase().replace(/\./g,"(..+)?.")}`),t,e)}const Fo=[$o("alias","allowUnsafeAlias"),$o("core.askPass","allowUnsafeAskPass"),$o("core.editor","allowUnsafeEditor"),$o("core.fsmonitor","allowUnsafeFsMonitor"),$o("core.gitProxy","allowUnsafeGitProxy"),$o("core.hooksPath","allowUnsafeHooksPath"),$o("core.pager","allowUnsafePager"),$o("core.sshCommand","allowUnsafeSshCommand"),Po("credential.helper","allowUnsafeCredentialHelper"),Po("diff.command","allowUnsafeDiffExternal"),$o("diff.external","allowUnsafeDiffExternal"),Po("diff.textconv","allowUnsafeDiffTextConv"),Po("filter.clean","allowUnsafeFilter"),Po("filter.smudge","allowUnsafeFilter"),Po("gpg.program","allowUnsafeGpgProgram"),$o("init.templateDir","allowUnsafeTemplateDir"),Po("merge.driver","allowUnsafeMergeDriver"),Po("mergetool.path","allowUnsafeMergeDriver"),Po("mergetool.cmd","allowUnsafeMergeDriver"),Po("protocol.allow","allowUnsafeProtocolOverride"),Po("remote.receivepack","allowUnsafePack"),Po("remote.uploadpack","allowUnsafePack"),$o("sequence.editor","allowUnsafeEditor")];function*Mo(e,t){for(const n of t)for(const t of Lo){const r=t(e,n.name);r&&(yield r)}}function Ro(e,t,n,r=String(t)){const s="string"==typeof t?new RegExp(`\\s*${t.toLowerCase()}`):t,i=`Use of ${e?`${e} with option `:""}${r} is not permitted without enabling ${n}`;return function(t,r){if((!e||t===e)&&s.test(r))return{category:n,message:i}}}const Lo=[Ro(null,/--(upload|receive)-pack/,"allowUnsafePack","--upload-pack or --receive-pack"),Ro("clone",/^-\w*u/,"allowUnsafePack"),Ro("clone","--u","allowUnsafePack"),Ro("push","--exec","allowUnsafePack"),Ro(null,"--template","allowUnsafeTemplateDir")];function jo(e,t,n){return[...Mo(e,t),...Do(n)]}function Io(...e){const{flags:t,taskIndex:n}=function(e,t=[]){let n=0;for(;n<e.length;){const r=String(e[n]);if(!r.startsWith("-")||r.length<2)break;const s=To(r);let i=n+1;for(const n of s){const r={name:n.name,value:n.value,absorbedNext:!1,isGlobal:!0};n.needsNext&&void 0===r.value&&i<e.length&&(r.value=String(e[i]),r.absorbedNext=!0,i++),t.push(r)}n=i}return{flags:t,taskIndex:n}}(e),r=n<e.length?String(e[n]).toLowerCase():null,s=null!==r?e.slice(n+1):[],{positionals:i,pathspecs:o}=Ao(s,r,t),a=So(r,t,i);return{task:r,flags:t.map(No),paths:o,config:a,vulnerabilities:Bo(jo(r,t,a))}}function Bo(e){return Object.defineProperty(e,"vulnerabilities",{value:e})}function No({value:e,name:t}){return void 0!==e?{name:t,value:e}:{name:t}}const Uo={editor:"allowUnsafeEditor",git_askpass:"allowUnsafeAskPass",git_config_global:"allowUnsafeConfigPaths",git_config_system:"allowUnsafeConfigPaths",git_config_count:"allowUnsafeConfigEnvCount",git_config:"allowUnsafeConfigPaths",git_editor:"allowUnsafeEditor",git_exec_path:"allowUnsafeConfigPaths",git_external_diff:"allowUnsafeDiffExternal",git_pager:"allowUnsafePager",git_proxy_command:"allowUnsafeGitProxy",git_template_dir:"allowUnsafeTemplateDir",git_sequence_editor:"allowUnsafeEditor",git_ssh:"allowUnsafeSshCommand",git_ssh_command:"allowUnsafeSshCommand",pager:"allowUnsafePager",prefix:"allowUnsafeConfigPaths",ssh_askpass:"allowUnsafeAskPass"};function*Go(e){const t=parseInt(e.git_config_count??"0",10);for(let n=0;n<t;n++){const t=e[`git_config_key_${n}`],r=e[`git_config_value_${n}`];void 0!==t&&(yield{key:t.toLowerCase().trim(),value:r,scope:"env"})}}function*Ho(e){for(const t of Object.keys(e))if(Wo(t)){const e=Uo[t];yield{category:e,message:`Use of "${t.toUpperCase()}" is not permitted without enabling ${e}`}}}function Wo(e){return Object.hasOwn(Uo,e)}function Vo(e){const t=function(e){const t={};for(const[n,r]of Object.entries(e)){const e=n.toLowerCase().trim();(Wo(e)||e.startsWith("git"))&&(t[e]=String(r))}return t}(e),n={read:[],write:[...Go(t)]};return{config:n,vulnerabilities:[...Ho(t),...jo(null,[],n)]}}var qo,zo,Yo,Jo,Ko,Qo,Xo=Object.defineProperty,Zo=Object.getOwnPropertyDescriptor,ea=Object.getOwnPropertyNames,ta=Object.prototype.hasOwnProperty,na=(e,t)=>function(){return e&&(t=(0,e[ea(e)[0]])(e=0)),t},ra=(e,t)=>{for(var n in t)Xo(e,n,{get:t[n],enumerable:!0})},sa=e=>((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of ea(t))ta.call(e,s)||s===n||Xo(e,s,{get:()=>t[s],enumerable:!(r=Zo(t,s))||r.enumerable});return e})(Xo({},"__esModule",{value:!0}),e),ia=na({"src/lib/errors/git-error.ts"(){qo=class extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}}}),oa=na({"src/lib/errors/git-response-error.ts"(){ia(),zo=class extends qo{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),aa=na({"src/lib/errors/task-configuration-error.ts"(){ia(),Yo=class extends qo{constructor(e){super(void 0,e)}}}});function ca(e){return"function"!=typeof e?Ko:e}function la(e){return"function"==typeof e&&e!==Ko}function ua(e,t){const n=e.indexOf(t);return n<=0?[e,""]:[e.substr(0,n),e.substr(n+1)]}function ha(e,t=0){return fa(e)&&e.length>t?e[t]:void 0}function pa(e,t=0){if(fa(e)&&e.length>t)return e[e.length-1-t]}function fa(e){return Fa(e)}function da(e="",t=!0,n="\n"){return e.split(n).reduce((e,n)=>{const r=t?n.trim():n;return r&&e.push(r),e},[])}function ma(e,t){return da(e,!0).map(e=>t(e))}function ga(e){return so.exists(e,so.FOLDER)}function ya(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function ba(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function wa(e,t){if(Array.isArray(e)){const n=e.indexOf(t);n>=0&&e.splice(n,1)}else e.delete(t);return t}function _a(e){return Array.isArray(e)?e:[e]}function va(e){return e.replace(/[\s-]+(.)/g,(e,t)=>t.toUpperCase())}function ka(e){return _a(e).map(e=>e instanceof String?e:String(e))}function Sa(e,t=0){if(null==e)return t;const n=parseInt(e,10);return Number.isNaN(n)?t:n}function Oa(e,t){const n=[];for(let r=0,s=e.length;r<s;r++)n.push(t,e[r]);return n}function Ca(e){return(Array.isArray(e)?Buffer.concat(e):e).toString("utf-8")}function xa(e,t){const n={};return t.forEach(t=>{void 0!==e[t]&&(n[t]=e[t])}),n}function Ea(e=0){return new Promise(t=>setTimeout(t,e))}function Ta(e){if(!1!==e)return e}var Aa,Da,$a,Pa,Fa,Ma=na({"src/lib/utils/util.ts"(){Ha(),Jo="\0",Ko=()=>{},Qo=Object.prototype.toString.call.bind(Object.prototype.toString)}});function Ra(e,t,n){return t(e)?e:arguments.length>2?n:void 0}function La(e,t){const n=ao(e)?"string":typeof e;return/number|string|boolean/.test(n)&&(!t||!t.includes(n))}function ja(e){return!!e&&"[object Object]"===Qo(e)}function Ia(e){return"function"==typeof e}var Ba,Na,Ua,Ga,Ha=na({"src/lib/utils/argument-filters.ts"(){Ma(),Aa=e=>Array.isArray(e),Da=e=>"number"==typeof e,$a=e=>"string"==typeof e||ao(e),Pa=e=>$a(e)||Array.isArray(e)&&e.every($a),Fa=e=>null!=e&&!"number|boolean|function".includes(typeof e)&&"number"==typeof e.length}}),Wa=na({"src/lib/utils/exit-codes.ts"(){Ba=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(Ba||{})}}),Va=na({"src/lib/utils/git-output-streams.ts"(){Na=class e{constructor(e,t){this.stdOut=e,this.stdErr=t}asStrings(){return new e(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}});function qa(){throw new Error("LineParser:useMatches not implemented")}var za,Ya=na({"src/lib/utils/line-parser.ts"(){Ua=class{constructor(e,t){this.matches=[],this.useMatches=qa,this.parse=(e,t)=>(this.resetMatches(),!!this._regExp.every((t,n)=>this.addMatch(t,n,e(n)))&&!1!==this.useMatches(t,this.prepareMatches())),this._regExp=Array.isArray(e)?e:[e],t&&(this.useMatches=t)}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,t,n){const r=n&&e.exec(n);return r&&this.pushMatch(t,r),!!r}pushMatch(e,t){this.matches.push(...t.slice(1))}},Ga=class extends Ua{addMatch(e,t,n){return/^remote:\s/.test(String(n))&&super.addMatch(e,t,n)}pushMatch(e,t){(e>0||t.length>1)&&super.pushMatch(e,t)}}}});function Ja(...e){const t=process.cwd(),n=Object.assign({baseDir:t,...za},...e.filter(e=>"object"==typeof e&&e));return n.baseDir=n.baseDir||t,n.trimmed=!0===n.trimmed,n}var Ka=na({"src/lib/utils/simple-git-options.ts"(){za={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function Qa(e,t=[]){return ja(e)?Object.keys(e).reduce((t,n)=>{const r=e[n];if(ao(r))t.push(r);else if(La(r,["boolean"]))t.push(n+"="+r);else if(Array.isArray(r))for(const e of r)La(e,["string","number"])||t.push(n+"="+e);else t.push(n);return t},t):t}function Xa(e,t=0,n=!1){const r=[];for(let n=0,s=t<0?e.length:t;n<s;n++)"string|number".includes(typeof e[n])&&r.push(String(e[n]));return Qa(Za(e),r),n||r.push(...function(e){const t="function"==typeof pa(e);return ka(Ra(pa(e,t?1:0),Aa,[]))}(e)),r}function Za(e){const t=Ia(pa(e));return Ra(pa(e,t?1:0),ja)}function ec(e,t=!0){const n=ca(pa(e));return t||la(n)?n:void 0}var tc=na({"src/lib/utils/task-options.ts"(){Ha(),Ma()}});function nc(e,t){return e(t.stdOut,t.stdErr)}function rc(e,t,n,r=!0){return _a(n).forEach(n=>{for(let s=da(n,r),i=0,o=s.length;i<o;i++){const n=(e=0)=>{if(!(i+e>=o))return s[i+e]};t.some(({parse:t})=>t(n,e))}}),e}var sc=na({"src/lib/utils/task-parser.ts"(){Ma()}}),ic={};ra(ic,{ExitCodes:()=>Ba,GitOutputStreams:()=>Na,LineParser:()=>Ua,NOOP:()=>Ko,NULL:()=>Jo,RemoteLineParser:()=>Ga,append:()=>ya,appendTaskOptions:()=>Qa,asArray:()=>_a,asCamelCase:()=>va,asFunction:()=>ca,asNumber:()=>Sa,asStringArray:()=>ka,bufferToString:()=>Ca,callTaskParser:()=>nc,createInstanceConfig:()=>Ja,delay:()=>Ea,filterArray:()=>Aa,filterFunction:()=>Ia,filterHasLength:()=>Fa,filterNumber:()=>Da,filterPlainObject:()=>ja,filterPrimitives:()=>La,filterString:()=>$a,filterStringOrStringArray:()=>Pa,filterType:()=>Ra,first:()=>ha,folderExists:()=>ga,forEachLineWithContent:()=>ma,getTrailingOptions:()=>Xa,including:()=>ba,isUserFunction:()=>la,last:()=>pa,objectToString:()=>Qo,orVoid:()=>Ta,parseStringResponse:()=>rc,pick:()=>xa,prefixedArray:()=>Oa,remove:()=>wa,splitOn:()=>ua,toLinesWithContent:()=>da,trailingFunctionArgument:()=>ec,trailingOptionsArgument:()=>Za});var oc,ac,cc,lc=na({"src/lib/utils/index.ts"(){Ha(),Wa(),Va(),Ya(),Ka(),tc(),sc(),Ma()}}),uc={};function hc(e){switch(e){case"bare":return fc();case"root":return pc()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:ac,parser:cc}}function pc(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:ac,parser:e=>/^\.(git)?$/.test(e.trim())}}function fc(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:ac,parser:cc}}ra(uc,{CheckRepoActions:()=>oc,checkIsBareRepoTask:()=>fc,checkIsRepoRootTask:()=>pc,checkIsRepoTask:()=>hc});var dc,mc,gc,yc,bc=na({"src/lib/tasks/check-is-repo.ts"(){lc(),oc=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(oc||{}),ac=({exitCode:e},t,n,r)=>{if(128===e&&function(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}(t))return n(Buffer.from("false"));r(t)},cc=e=>"true"===e.trim()}});var wc,_c=na({"src/lib/responses/CleanSummary.ts"(){lc(),dc=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},mc=/^[a-z]+\s*/i,gc=/^[a-z]+\s+[a-z]+\s*/i,yc=/\/$/}}),vc={};function kc(e){return{commands:wc,format:"empty",parser:e}}function Sc(e){return{commands:wc,format:"empty",parser(){throw"string"==typeof e?new Yo(e):e}}}function Oc(e,t=!1){return{commands:e,format:"utf-8",parser:e=>t?String(e).trim():e}}function Cc(e){return{commands:e,format:"buffer",parser:e=>e}}function xc(e){return"buffer"===e.format}function Ec(e){return"empty"===e.format||!e.commands.length}ra(vc,{EMPTY_COMMANDS:()=>wc,adhocExecTask:()=>kc,configurationErrorTask:()=>Sc,isBufferTask:()=>xc,isEmptyTask:()=>Ec,straightThroughBufferTask:()=>Cc,straightThroughStringTask:()=>Oc});var Tc,Ac,Dc,$c,Pc,Fc=na({"src/lib/tasks/task.ts"(){aa(),wc=[]}}),Mc={};function Rc(e,t){const{cleanMode:n,options:r,valid:s}=function(e){let t,n=[],r={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(e=>{!function(e){return"f"===e||"n"===e}(e)?r.options=r.options&&function(e){return/^-[a-z]$/i.test(e)&&Pc.has(e.charAt(1))}(n[n.length]=`-${e}`):(t=e,r.cleanMode=!0)}),{cleanMode:t,options:n,valid:r}}(e);return n?s.options?(r.push(...t),r.some(Ic)?Sc(Tc):Lc(n,r)):Sc(Dc+JSON.stringify(e)):Sc(Ac)}function Lc(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser:t=>function(e,t){const n=new dc(e),r=e?gc:mc;return da(t).forEach(e=>{const t=e.replace(r,"");n.paths.push(t),(yc.test(t)?n.folders:n.files).push(t)}),n}("n"===e,t)}}function jc(e){return Array.isArray(e)&&e.every(e=>Pc.has(e))}function Ic(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:"--interactive"===e}ra(Mc,{CONFIG_ERROR_INTERACTIVE_MODE:()=>Tc,CONFIG_ERROR_MODE_REQUIRED:()=>Ac,CONFIG_ERROR_UNKNOWN_OPTION:()=>Dc,CleanOptions:()=>$c,cleanTask:()=>Lc,cleanWithOptionsTask:()=>Rc,isCleanOptionsArray:()=>jc});var Bc,Nc=na({"src/lib/tasks/clean.ts"(){_c(),lc(),Fc(),Tc="Git clean interactive mode is not supported",Ac='Git clean mode parameter ("n" or "f") is required',Dc="Git clean unknown option found in: ",$c=(e=>(e.DRY_RUN="n",e.FORCE="f",e.IGNORED_INCLUDED="x",e.IGNORED_ONLY="X",e.EXCLUDING="e",e.QUIET="q",e.RECURSIVE="d",e))($c||{}),Pc=new Set(["i",...ka(Object.values($c))])}});function Uc(e){return e.replace(/^(file):/,"")}function*Gc(e,t=null){const n=e.split("\0");for(let e=0,r=n.length-1;e<r;){const r=Uc(n[e++]);let s=n[e++],i=t;if(s.includes("\n")){const e=ua(s,"\n");i=e[0],s=e[1]}yield{file:r,key:i,value:s}}}var Hc,Wc=na({"src/lib/responses/ConfigList.ts"(){lc(),Bc=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||(this._all=this.files.reduce((e,t)=>Object.assign(e,this.values[t]),{})),this._all}addFile(e){if(!(e in this.values)){const t=pa(this.files);this.values[e]=t?Object.create(this.values[t]):{},this.files.push(e)}return this.values[e]}addValue(e,t,n){const r=this.addFile(e);Object.hasOwn(r,t)?Array.isArray(r[t])?r[t].push(n):r[t]=[r[t],n]:r[t]=n,this._all=void 0}}}});function Vc(e,t){return"string"==typeof e&&Object.hasOwn(Hc,e)?e:t}function qc(e,t){const n=["config","--null","--show-origin","--get-all",e];return t&&n.splice(1,0,`--${t}`),{commands:n,format:"utf-8",parser:t=>function(e,t){let n=null;const r=[],s=new Map;for(const i of Gc(e,t))i.key===t&&(r.push(n=i.value),s.has(i.file)||s.set(i.file,[]),s.get(i.file).push(n));return{key:t,paths:Array.from(s.keys()),scopes:s,value:n,values:r}}(t,e)}}function zc(e){const t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser:e=>function(e){const t=new Bc;for(const n of Gc(e))t.addValue(n.file,String(n.key),n.value);return t}(e)}}var Yc,Jc,Kc=na({"src/lib/tasks/config.ts"(){Wc(),lc(),Hc=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(Hc||{})}});function Qc(e){return Jc.has(e)}var Xc,Zc,el,tl,nl=na({"src/lib/tasks/diff-name-status.ts"(){Yc=(e=>(e.ADDED="A",e.COPIED="C",e.DELETED="D",e.MODIFIED="M",e.RENAMED="R",e.CHANGED="T",e.UNMERGED="U",e.UNKNOWN="X",e.BROKEN="B",e))(Yc||{}),Jc=new Set(Object.values(Yc))}});function rl(){return{grep(e){const t=ec(arguments),n=Xa(arguments);for(const e of Xc)if(n.includes(e))return this._runTask(Sc(`git.grep: use of "${e}" is not supported.`),t);"string"==typeof e&&(e=function(...e){return(new tl).param(...e)}().param(e));const r=["grep","--null","-n","--full-name",...n,...e];return this._runTask({commands:r,format:"utf-8",parser:e=>function(e){const t=new Set,n={};return ma(e,e=>{const[r,s,i]=e.split(Jo);t.add(r),(n[r]=n[r]||[]).push({line:Sa(s),path:r,preview:i})}),{paths:t,results:n}}(e)},t)}}}var sl,il,ol=na({"src/lib/tasks/grep.ts"(){lc(),Fc(),Xc=["-h"],Zc=Symbol("grepQuery"),tl=class{constructor(){this[el]=[]}*[(el=Zc,Symbol.iterator)](){for(const e of this[Zc])yield e}and(...e){return e.length&&this[Zc].push("--and","(",...Oa(e,"-e"),")"),this}param(...e){return this[Zc].push(...Oa(e,"-e")),this}}}}),al={};function cl(e,t){const n=["reset"];return ul(e)&&n.push(`--${e}`),n.push(...t),Oc(n)}function ll(e){if(ul(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function ul(e){return"string"==typeof e&&il.includes(e)}ra(al,{ResetMode:()=>sl,getResetMode:()=>ll,resetTask:()=>cl});var hl=na({"src/lib/tasks/reset.ts"(){lc(),Fc(),sl=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(sl||{}),il=ka(Object.values(sl))}});function pl(e,t,n){return t&&String(t).replace(/\s*/,"")?(r,...s)=>{e(`%s ${r}`,t,...s),n&&n(r,...s)}:n?(t,...r)=>{e(t,...r),n(t,...r)}:e}function fl(e,t,n,r=function(){return uo("simple-git")}()){const s=e&&`[${e}]`||"",i=[],o="string"==typeof t?r.extend(t):t,a=function(e,t,{namespace:n}){if("string"==typeof e)return e;const r=t&&t.namespace||"";return r.startsWith(n)?r.substr(n.length+1):r||n}(Ra(t,$a),o,r);return function t(n){const i=n&&`[${n}]`||"",a=o&&pl(o,i)||Ko,l=pl(r,`${s} ${i}`,a);return Object.assign(o?a:l,{label:e,sibling:c,info:l,step:t})}(n);function c(t,n){return ya(i,fl(e,a.replace(/^[^:]+/,t),n,r))}}var dl,ml,gl=na({"src/lib/git-logger.ts"(){lc(),uo.formatters.L=e=>String(Fa(e)?e.length:"-"),uo.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):Qo(e)}}),yl=na({"src/lib/runners/tasks-pending-queue.ts"(){ia(),gl(),dl=class e{constructor(e="GitExecutor"){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(t){const n=e.getName(t.commands[0]);return{task:t,logger:fl(this.logLabel,n),name:n}}push(e){const t=this.createProgress(e);return t.logger("Adding task to the queue, commands = %o",e.commands),this._queue.set(e,t),t}fatal(e){for(const[t,{logger:n}]of Array.from(this._queue.entries()))t===e.task?(n.info("Failed %o",e),n("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):n.info("A fatal exception occurred in a previous task, the queue has been purged: %o",e.message),this.complete(t);if(0!==this._queue.size)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(e){this.withProgress(e)&&this._queue.delete(e)}attempt(e){const t=this.withProgress(e);if(!t)throw new qo(void 0,"TasksPendingQueue: attempt called for an unknown task");return t.logger("Starting task"),t}static getName(t="empty"){return`task:${t}:${++e.counter}`}static{this.counter=0}}}});function bl(e,t){return{method:ha(e.commands)||"",commands:t}}function wl(e,t,n,r){return s=>{n("%s received %L bytes",t,s),r("%B",s),e.push(s)}}var _l,vl=na({"src/lib/runners/git-executor-chain.ts"(){ia(),Fc(),lc(),yl(),ml=class{constructor(e,t,n){this._executor=e,this._scheduler=t,this._plugins=n,this._chain=Promise.resolve(),this._queue=new dl}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){return this._queue.push(e),this._chain=this._chain.then(()=>this.attemptTask(e))}async attemptTask(e){const t=await this._scheduler.next(),n=()=>this._queue.complete(e);try{const{logger:t}=this._queue.attempt(e);return await(Ec(e)?this.attemptEmptyTask(e,t):this.attemptRemoteTask(e,t))}catch(t){throw this.onFatalException(e,t)}finally{n(),t()}}onFatalException(e,t){const n=t instanceof qo?Object.assign(t,{task:e}):new qo(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(n),n}async attemptRemoteTask(e,t){const n=this._plugins.exec("spawn.binary","",bl(e,e.commands)),r=this._plugins.exec("spawn.args",[...e.commands],{...bl(e,e.commands),env:{...this.env}}),s=await this.gitResponse(e,n,r,this.outputHandler,t.step("SPAWN")),i=await this.handleTaskData(e,r,s,t.step("HANDLE"));return t("passing response to task's parser as a %s",e.format),xc(e)?nc(e.parser,i):nc(e.parser,i.asStrings())}async attemptEmptyTask(e,t){return t("empty task bypassing child process to call to task's parser"),e.parser(this)}handleTaskData(e,t,n,r){const{exitCode:s,rejection:i,stdOut:o,stdErr:a}=n;return new Promise((c,l)=>{r("Preparing to handle process response exitCode=%d stdOut=",s);const{error:u}=this._plugins.exec("task.error",{error:i},{...bl(e,t),...n});return u&&e.onError?(r.info("exitCode=%s handling with custom error handler"),e.onError(n,u,e=>{r.info("custom error handler treated as success"),r("custom error returned a %s",Qo(e)),c(new Na(Array.isArray(e)?Buffer.concat(e):e,Buffer.concat(a)))},l)):u?(r.info("handling as error: exitCode=%s stdErr=%s rejection=%o",s,a.length,i),l(u)):(r.info("retrieving task output complete"),void c(new Na(Buffer.concat(o),Buffer.concat(a))))})}async gitResponse(e,t,n,s,i){const o=i.sibling("output"),a=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},bl(e,e.commands));return new Promise(c=>{const l=[],u=[];i.info("%s %o",t,n),i("%O",a);let h=this._beforeSpawn(e,n);if(h)return c({stdOut:l,stdErr:u,exitCode:9901,rejection:h});this._plugins.exec("spawn.before",void 0,{...bl(e,n),kill(e){h=e||h}});const p=r(t,n,a);p.stdout.on("data",wl(l,"stdOut",i,o.step("stdOut"))),p.stderr.on("data",wl(u,"stdErr",i,o.step("stdErr"))),p.on("error",function(e,t){return n=>{t("[ERROR] child process exception %o",n),e.push(Buffer.from(String(n.stack),"ascii"))}}(u,i)),s&&(i("Passing child process stdOut/stdErr to custom outputHandler"),s(t,p.stdout,p.stderr,[...n])),this._plugins.exec("spawn.after",void 0,{...bl(e,n),spawned:p,close(e,t){c({stdOut:l,stdErr:u,exitCode:e,rejection:h||t})},kill(e){p.killed||(h=e,p.kill("SIGINT"))}})})}_beforeSpawn(e,t){let n;return this._plugins.exec("spawn.before",void 0,{...bl(e,t),kill(e){n=e||n}}),n}}}}),kl={};ra(kl,{GitExecutor:()=>_l});var Sl=na({"src/lib/runners/git-executor.ts"(){vl(),_l=class{constructor(e,t,n){this.cwd=e,this._scheduler=t,this._plugins=n,this._chain=new ml(this,this._scheduler,this._plugins)}chain(){return new ml(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function Ol(e,t,n=Ko){t.then(e=>{n(null,e)},t=>{t?.task===e&&n(t instanceof zo?function(e){let t=e=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${e} should be GitResponseError.git.${e}, this will no longer be available in version 3`),t=Ko};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce(n,{}));function n(n,r){return r in e||(n[r]={enumerable:!1,configurable:!1,get:()=>(t(r),e.git[r])}),n}}(t):t,void 0)})}var Cl=na({"src/lib/task-callback.ts"(){oa(),lc()}});function xl(e,t){return kc(n=>{if(!ga(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||n).cwd=e})}var El=na({"src/lib/tasks/change-working-directory.ts"(){lc(),Fc()}});function Tl(e){const t=["checkout",...e];return"-b"===t[1]&&t.includes("-B")&&(t[1]=wa(t,"-B")),Oc(t)}var Al,Dl=na({"src/lib/tasks/checkout.ts"(){lc(),Fc()}});var $l,Pl=na({"src/lib/tasks/count-objects.ts"(){lc(),Al=new Ua(/([a-z-]+): (\d+)$/,(e,[t,n])=>{const r=va(t);Object.hasOwn(e,r)&&(e[r]=Sa(n))})}});function Fl(e){return rc({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},$l,e)}var Ml=na({"src/lib/parsers/parse-commit.ts"(){lc(),$l=[new Ua(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,n,r])=>{e.branch=t,e.commit=r,e.root=!!n}),new Ua(/\s*Author:\s(.+)/i,(e,[t])=>{const n=t.split("<"),r=n.pop();r&&r.includes("@")&&(e.author={email:r.substr(0,r.length-1),name:n.join("<").trim()})}),new Ua(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(e,[t,n,r])=>{e.summary.changes=parseInt(t,10)||0,e.summary.insertions=parseInt(n,10)||0,e.summary.deletions=parseInt(r,10)||0}),new Ua(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(e,[t,n,r])=>{e.summary.changes=parseInt(t,10)||0;const s=parseInt(n,10)||0;"-"===r?e.summary.deletions=s:"+"===r&&(e.summary.insertions=s)})]}});function Rl(){return{commit(e,...t){const n=ec(arguments),r=function(e){return!Pa(e)&&Sc("git.commit: requires the commit message to be supplied as a string/string[]")}(e)||function(e,t,n){return{commands:["-c","core.abbrev=40","commit",...Oa(e,"-m"),...t,...n],format:"utf-8",parser:Fl}}(_a(e),_a(Ra(t[0],Pa,[])),[...ka(Ra(t[1],Aa,[])),...Xa(arguments,0,!0)]);return this._runTask(r,n)}}}var Ll=na({"src/lib/tasks/commit.ts"(){Ml(),lc(),Fc()}});var jl=na({"src/lib/tasks/first-commit.ts"(){lc(),Fc()}});var Il,Bl,Nl,Ul=na({"src/lib/tasks/hash-object.ts"(){Fc()}});var Gl,Hl=na({"src/lib/responses/InitSummary.ts"(){Il=class{constructor(e,t,n,r){this.bare=e,this.path=t,this.existing=n,this.gitDir=r}},Bl=/^Init.+ repository in (.+)$/,Nl=/^Rein.+ in (.+)$/}});function Wl(e=!1,t,n){const r=["init",...n];return e&&!function(e){return e.includes(Gl)}(r)&&r.splice(1,0,Gl),{commands:r,format:"utf-8",parser:e=>function(e,t,n){const r=String(n).trim();let s;if(s=Bl.exec(r))return new Il(e,t,!1,s[1]);if(s=Nl.exec(r))return new Il(e,t,!0,s[1]);let i="";const o=r.split(" ");for(;o.length;)if("in"===o.shift()){i=o.join(" ");break}return new Il(e,t,/^re/i.test(r),i)}(r.includes("--bare"),t,e)}}var Vl,ql=na({"src/lib/tasks/init.ts"(){Hl(),Gl="--bare"}});function zl(e){for(let t=0;t<e.length;t++){const n=Vl.exec(e[t]);if(n)return`--${n[1]}`}return""}function Yl(e){return Vl.test(e)}var Jl,Kl,Ql,Xl,Zl,eu,tu=na({"src/lib/args/log-format.ts"(){Vl=/^--(stat|numstat|name-only|name-status)(=|$)/}}),nu=na({"src/lib/responses/DiffSummary.ts"(){Jl=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function ru(e=""){const t=eu[e];return e=>rc(new Jl,t,e,!1)}var su,iu,ou,au,cu=na({"src/lib/parsers/parse-diff-summary.ts"(){tu(),nu(),nl(),lc(),Kl=[new Ua(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,n,r=""])=>{e.files.push({file:t.trim(),changes:Sa(n),insertions:r.replace(/[^+]/g,"").length,deletions:r.replace(/[^-]/g,"").length,binary:!1})}),new Ua(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,n,r])=>{e.files.push({file:t.trim(),before:Sa(n),after:Sa(r),binary:!0})}),new Ua(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,n])=>{const r=/(\d+) i/.exec(n),s=/(\d+) d/.exec(n);e.changed=Sa(t),e.insertions=Sa(r?.[1]),e.deletions=Sa(s?.[1])})],Ql=[new Ua(/(\d+)\t(\d+)\t(.+)$/,(e,[t,n,r])=>{const s=Sa(t),i=Sa(n);e.changed++,e.insertions+=s,e.deletions+=i,e.files.push({file:r,changes:s+i,insertions:s,deletions:i,binary:!1})}),new Ua(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],Xl=[new Ua(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],Zl=[new Ua(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(e,[t,n,r,s,i])=>{e.changed++,e.files.push({file:i??r,changes:0,insertions:0,deletions:0,binary:!1,status:Ta(Qc(t)&&t),from:Ta(!!i&&r!==i&&r),similarity:Sa(n)})})],eu={"":Kl,"--stat":Kl,"--numstat":Ql,"--name-status":Zl,"--name-only":Xl}}});function lu(e=ou,t=au,n=""){const r=ru(n);return function(n){const s=da(n.trim(),!1,su).map(function(n){const s=n.split(iu),i=function(e,t){return t.reduce((t,n,r)=>(t[n]=e[r]||"",t),Object.create({diff:null}))}(s[0].split(e),t);return s.length>1&&s[1].trim()&&(i.diff=r(s[1])),i});return{all:s,latest:s.length&&s[0]||null,total:s.length}}}var uu=na({"src/lib/parsers/parse-list-log-summary.ts"(){lc(),cu(),tu(),su="รฒรฒรฒรฒรฒรฒ ",iu=" รฒรฒ",ou=" รฒ ",au=["hash","date","message","refs","author_name","author_email"]}}),hu={};function pu(e){let t=zl(e);const n=["diff"];return""===t&&(t="--stat",n.push("--stat=4096")),n.push(...e),fu(n)||{commands:n,format:"utf-8",parser:ru(t)}}function fu(e){const t=e.filter(Yl);return t.length>1?Sc(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`):t.length&&e.includes("-z")?Sc(`Summary flag ${t} parsing is not compatible with null termination option '-z'`):void 0}ra(hu,{diffSummaryTask:()=>pu,validateLogFormatConfig:()=>fu});var du,mu=na({"src/lib/tasks/diff.ts"(){tu(),cu(),Fc()}});function gu(e={},t=[]){const n=Ra(e.splitter,$a,ou),r=ja(e.format)?e.format:{hash:"%H",date:!1===e.strictDate?"%ai":"%aI",message:"%s",refs:"%D",body:e.multiLine?"%B":"%b",author_name:!1!==e.mailMap?"%aN":"%an",author_email:!1!==e.mailMap?"%aE":"%ae"},[s,i]=function(e,t){const n=[],r=[];return Object.keys(e).forEach(t=>{n.push(t),r.push(String(e[t]))}),[n,r.join(t)]}(r,n),o=[],a=[`--pretty=format:${su}${i}${iu}`,...t],c=e.n||e["max-count"]||e.maxCount;if(c&&a.push(`--max-count=${c}`),e.from||e.to){const t=!1!==e.symmetric?"...":"..";o.push(`${e.from||""}${t}${e.to||""}`)}return $a(e.file)&&a.push("--follow",oo(e.file)),Qa(function(e){return Object.keys(e).reduce((t,n)=>(n in du||(t[n]=e[n]),t),{})}(e),a),{fields:s,splitter:n,commands:[...a,...o]}}function yu(){return{log(...e){const t=ec(arguments),n=gu(Za(arguments),ka(Ra(arguments[0],Aa,[]))),r=function(e,t){return $a(e)&&$a(t)&&Sc("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}(...e)||fu(n.commands)||function(e){return function(e,t,n){const r=lu(e,t,zl(n));return{commands:["log",...n],format:"utf-8",parser:r}}(e.splitter,e.fields,e.commands)}(n);return this._runTask(r,t)}}}var bu,wu,_u,vu,ku,Su=na({"src/lib/tasks/log.ts"(){tu(),uu(),lc(),Fc(),mu(),du=(e=>(e[e["--pretty"]=0]="--pretty",e[e["max-count"]=1]="max-count",e[e.maxCount=2]="maxCount",e[e.n=3]="n",e[e.file=4]="file",e[e.format=5]="format",e[e.from=6]="from",e[e.to=7]="to",e[e.splitter=8]="splitter",e[e.symmetric=9]="symmetric",e[e.mailMap=10]="mailMap",e[e.multiLine=11]="multiLine",e[e.strictDate=12]="strictDate",e))(du||{})}}),Ou=na({"src/lib/responses/MergeSummary.ts"(){bu=class{constructor(e,t=null,n){this.reason=e,this.file=t,this.meta=n}toString(){return`${this.file}:${this.reason}`}},wu=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),Cu=na({"src/lib/responses/PullSummary.ts"(){_u=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},vu=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function xu(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function Eu(e){const t=/^\s*(\d+)/.exec(e),n=/delta (\d+)/i.exec(e);return{count:Sa(t&&t[1]||"0"),delta:Sa(n&&n[1]||"0")}}var Tu,Au,Du=na({"src/lib/parsers/parse-remote-objects.ts"(){lc(),ku=[new Ga(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,n])=>{const r=t.toLowerCase(),s=xu(e.remoteMessages);Object.assign(s,{[r]:Sa(n)})}),new Ga(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,n])=>{const r=t.toLowerCase(),s=xu(e.remoteMessages);Object.assign(s,{[r]:Sa(n)})}),new Ga(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,n,r])=>{const s=xu(e.remoteMessages);s.total=Eu(t),s.reused=Eu(n),s.packReused=Sa(r)})]}});function $u(e,t){return rc({remoteMessages:new Au},Tu,t)}var Pu,Fu,Mu,Ru,Lu,ju,Iu=na({"src/lib/parsers/parse-remote-messages.ts"(){lc(),Du(),Tu=[new Ga(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...ku,new Ga([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new Ga([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,n,r])=>{e.remoteMessages.vulnerabilities={count:Sa(t),summary:n,url:r}})],Au=class{constructor(){this.all=[]}}}});var Bu,Nu,Uu,Gu=na({"src/lib/parsers/parse-pull.ts"(){Cu(),lc(),Iu(),Pu=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,Fu=/^(create|delete) mode \d+ (.+)/,Mu=[new Ua(/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,(e,[t,n,r])=>{e.files.push(t),n&&(e.insertions[t]=n.length),r&&(e.deletions[t]=r.length)}),new Ua(Pu,(e,[t,,n,,r])=>(void 0!==n||void 0!==r)&&(e.summary.changes=+t||0,e.summary.insertions=+n||0,e.summary.deletions=+r||0,!0)),new Ua(Fu,(e,[t,n])=>{ya(e.files,n),ya("create"===t?e.created:e.deleted,n)})],Ru=[new Ua(/^from\s(.+)$/i,(e,[t])=>{e.remote=t}),new Ua(/^fatal:\s(.+)$/,(e,[t])=>{e.message=t}),new Ua(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(e,[t,n,r,s])=>{e.branch.local=r,e.hash.local=t,e.branch.remote=s,e.hash.remote=n})],Lu=(e,t)=>rc(new _u,Mu,[e,t]),ju=(e,t)=>Object.assign(new _u,Lu(e,t),$u(0,t))}}),Hu=na({"src/lib/parsers/parse-merge.ts"(){Ou(),lc(),Gu(),Bu=[new Ua(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new Ua(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,n])=>{e.conflicts.push(new bu(t,n))}),new Ua(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,n,r])=>{e.conflicts.push(new bu(t,n,{deleteRef:r}))}),new Ua(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new bu(t,null))}),new Ua(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],Nu=(e,t)=>Object.assign(Uu(e,t),ju(e,t)),Uu=e=>rc(new wu,Bu,e)}});function Wu(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(e,t){const n=Nu(e,t);if(n.failed)throw new zo(n);return n}}:Sc("Git.merge requires at least one option")}var Vu,qu,zu,Yu=na({"src/lib/tasks/merge.ts"(){oa(),Hu(),Fc()}});var Ju=na({"src/lib/parsers/parse-push.ts"(){lc(),Iu(),Vu=[new Ua(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new Ua(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref={...e.ref||{},local:t}}),new Ua(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,n,r])=>{e.pushed.push(function(e,t,n){const r=n.includes("deleted"),s=n.includes("tag")||/^refs\/tags/.test(e),i=!n.includes("new");return{deleted:r,tag:s,branch:!s,new:!i,alreadyUpdated:i,local:e,remote:t}}(t,n,r))}),new Ua(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,n,r])=>{e.branch={...e.branch||{},local:t,remote:n,remoteName:r}}),new Ua(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[t,n,r,s])=>{e.update={head:{local:t,remote:n},hash:{from:r,to:s}}})],qu=(e,t)=>({...zu(e,t),...$u(0,t)}),zu=(e,t)=>rc({pushed:[]},Vu,[e,t])}}),Ku={};function Qu(e={},t){return ya(t,"--tags"),Xu(e,t)}function Xu(e={},t){const n=["push",...t];return e.branch&&n.splice(1,0,e.branch),e.remote&&n.splice(1,0,e.remote),wa(n,"-v"),ya(n,"--verbose"),ya(n,"--porcelain"),{commands:n,format:"utf-8",parser:qu}}ra(Ku,{pushTagsTask:()=>Qu,pushTask:()=>Xu});var Zu=na({"src/lib/tasks/push.ts"(){Ju(),lc()}});var eh,th,nh,rh,sh,ih=na({"src/lib/tasks/show.ts"(){lc(),Fc()}}),oh=na({"src/lib/responses/FileStatusSummary.ts"(){eh=/^(.+)\0(.+)$/,th=class{constructor(e,t,n){if(this.path=e,this.index=t,this.working_dir=n,"R"===t||"R"===n){const t=eh.exec(e)||[null,e,e];this.from=t[2]||"",this.path=t[1]||""}}}}});function ah(e){const[t,n]=e.split(Jo);return{from:n||t,to:t}}function ch(e,t,n){return[`${e}${t}`,n]}function lh(e,...t){return t.map(t=>ch(e,t,(e,t)=>e.conflicted.push(t)))}function uh(e,t){const n=t.trim();switch(" "){case n.charAt(2):return r(n.charAt(0),n.charAt(1),n.slice(3));case n.charAt(1):return r(" ",n.charAt(0),n.slice(2));default:return}function r(t,n,r){const s=`${t}${n}`,i=rh.get(s);i&&i(e,r),"##"!==s&&"!!"!==s&&e.files.push(new th(r,t,n))}}var hh,ph=na({"src/lib/responses/StatusSummary.ts"(){lc(),oh(),nh=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},rh=new Map([ch(" ","A",(e,t)=>e.created.push(t)),ch(" ","D",(e,t)=>e.deleted.push(t)),ch(" ","M",(e,t)=>e.modified.push(t)),ch("A"," ",(e,t)=>{e.created.push(t),e.staged.push(t)}),ch("A","M",(e,t)=>{e.created.push(t),e.staged.push(t),e.modified.push(t)}),ch("D"," ",(e,t)=>{e.deleted.push(t),e.staged.push(t)}),ch("M"," ",(e,t)=>{e.modified.push(t),e.staged.push(t)}),ch("M","M",(e,t)=>{e.modified.push(t),e.staged.push(t)}),ch("R"," ",(e,t)=>{e.renamed.push(ah(t))}),ch("R","M",(e,t)=>{const n=ah(t);e.renamed.push(n),e.modified.push(n.to)}),ch("!","!",(e,t)=>{(e.ignored=e.ignored||[]).push(t)}),ch("?","?",(e,t)=>e.not_added.push(t)),...lh("A","A","U"),...lh("D","D","U"),...lh("U","A","D","U"),["##",(e,t)=>{let n=/ahead (\d+)/.exec(t);e.ahead=n&&+n[1]||0,n=/behind (\d+)/.exec(t),e.behind=n&&+n[1]||0,n=/^(.+?(?=(?:\.{3}|\s|$)))/.exec(t),e.current=Ra(n?.[1],$a,null),n=/\.{3}(\S*)/.exec(t),e.tracking=Ra(n?.[1],$a,null),n=/\son\s(\S+?)(?=\.{3}|$)/.exec(t),n&&(e.current=Ra(n?.[1],$a,e.current)),e.detached=/\(no branch\)/.test(t)}]]),sh=function(e){const t=e.split(Jo),n=new nh;for(let e=0,r=t.length;e<r;){let r=t[e++].trim();r&&("R"===r.charAt(0)&&(r+=Jo+(t[e++]||"")),uh(n,r))}return n}}});var fh,dh,mh=na({"src/lib/tasks/status.ts"(){ph(),hh=["--null","-z"]}});function gh(e=0,t=0,n=0,r="",s=!0){return Object.defineProperty({major:e,minor:t,patch:n,agent:r,installed:s},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function yh(e){return e===fh?gh(0,0,0,"",!1):rc(gh(0,0,0,e),dh,e)}var bh,wh,_h=na({"src/lib/tasks/version.ts"(){lc(),fh="installed=false",dh=[new Ua(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,n,r,s=""])=>{Object.assign(e,gh(Sa(t),Sa(n),Sa(r),s))}),new Ua(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,n,r,s=""])=>{Object.assign(e,gh(Sa(t),Sa(n),r,s))})]}});function vh(e,t,n,...r){return $a(n)?t(n,Ra(r[0],$a),Xa(arguments)):Sc(`git.${e}() requires a string 'repoPath'`)}var kh,Sh=na({"src/lib/tasks/clone.ts"(){Fc(),lc(),bh=(e,t,n)=>{const r=["clone",...n];return $a(e)&&r.push(oo(e)),$a(t)&&r.push(oo(t)),Oc(r)},wh=(e,t,n)=>(ya(n,"--mirror"),bh(e,t,n))}}),Oh={};ra(Oh,{SimpleGitApi:()=>kh});var Ch,xh,Eh=na({"src/lib/simple-git-api.ts"(){Cl(),El(),Dl(),Pl(),Ll(),Kc(),jl(),ol(),Ul(),ql(),Su(),Yu(),Zu(),ih(),mh(),Fc(),_h(),lc(),Sh(),kh=class{constructor(e){this._executor=e}_runTask(e,t){const n=this._executor.chain(),r=n.push(e);return t&&Ol(e,r,t),Object.create(this,{then:{value:r.then.bind(r)},catch:{value:r.catch.bind(r)},_executor:{value:n}})}add(e){return this._runTask(Oc(["add",..._a(e)]),ec(arguments))}cwd(e){const t=ec(arguments);return"string"==typeof e?this._runTask(xl(e,this._executor),t):"string"==typeof e?.path?this._runTask(xl(e.path,e.root&&this._executor||void 0),t):this._runTask(Sc("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(function(e,t){const n=["hash-object",e];return t&&n.push("-w"),Oc(n,!0)}(e,!0===t),ec(arguments))}init(e){return this._runTask(Wl(!0===e,this._executor.cwd,Xa(arguments)),ec(arguments))}merge(){return this._runTask(Wu(Xa(arguments)),ec(arguments))}mergeFromTo(e,t){return $a(e)&&$a(t)?this._runTask(Wu([e,t,...Xa(arguments)]),ec(arguments,!1)):this._runTask(Sc("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){const e=Xu({remote:Ra(arguments[0],$a),branch:Ra(arguments[1],$a)},Xa(arguments));return this._runTask(e,ec(arguments))}stash(){return this._runTask(Oc(["stash",...Xa(arguments)]),ec(arguments))}status(){return this._runTask({format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...Xa(arguments).filter(e=>!hh.includes(e))],parser:e=>sh(e)},ec(arguments))}},Object.assign(kh.prototype,{checkout(){return this._runTask(Tl(Xa(arguments,1)),ec(arguments))},checkoutBranch(e,t){return this._runTask(Tl(["-b",e,t,...Xa(arguments)]),ec(arguments))},checkoutLocalBranch(e){return this._runTask(Tl(["-b",e,...Xa(arguments)]),ec(arguments))}},{clone(e,...t){return this._runTask(vh("clone",bh,Ra(e,$a),...t),ec(arguments))},mirror(e,...t){return this._runTask(vh("mirror",wh,Ra(e,$a),...t),ec(arguments))}},Rl(),{addConfig(e,t,...n){return this._runTask(function(e,t,n,r){const s=["config",`--${r}`];return n&&s.push("--add"),s.push(e,t),{commands:s,format:"utf-8",parser:e=>e}}(e,t,!0===n[0],Vc(n[1],"local")),ec(arguments))},getConfig(e,t){return this._runTask(qc(e,Vc(t,void 0)),ec(arguments))},listConfig(...e){return this._runTask(zc(Vc(e[0],void 0)),ec(arguments))}},{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser:e=>rc({count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0},[Al],e)})}},{firstCommit(){return this._runTask(Oc(["rev-list","--max-parents=0","HEAD"],!0),ec(arguments))}},rl(),yu(),{showBuffer(){const e=["show",...Xa(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(Cc(e),ec(arguments))},show(){const e=["show",...Xa(arguments,1)];return this._runTask(Oc(e),ec(arguments))}},{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:yh,onError(e,t,n,r){if(-2===e.exitCode)return n(Buffer.from(fh));r(t)}})}})}}),Th={};ra(Th,{Scheduler:()=>xh});var Ah=na({"src/lib/runners/scheduler.ts"(){lc(),gl(),Ch=(()=>{let e=0;return()=>{e++;const{promise:t,done:n}=po.createDeferred();return{promise:t,done:n,id:e}}})(),xh=class{constructor(e=2){this.concurrency=e,this.logger=fl("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency)return void this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);const e=ya(this.running,this.pending.shift());this.logger("Attempting id=%s",e.id),e.done(()=>{this.logger("Completing id=",e.id),wa(this.running,e),this.schedule()})}next(){const{promise:e,id:t}=ya(this.pending,Ch());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),Dh={};function $h(e,t){return Oc(["apply",...t,...e])}ra(Dh,{applyPatchTask:()=>$h});var Ph,Fh=na({"src/lib/tasks/apply-patch.ts"(){Fc()}});var Mh,Rh,Lh,jh=na({"src/lib/responses/BranchDeleteSummary.ts"(){Ph=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function Ih(e,t){return 1===t&&Mh.test(e)}var Bh,Nh,Uh,Gh=na({"src/lib/parsers/parse-branch-delete.ts"(){jh(),lc(),Mh=/^error[^']+'([^']+)'/m,Rh=[new Ua(/(\S+)\s+\(\S+\s([^)]+)\)/,(e,[t,n])=>{const r=function(e,t){return{branch:e,hash:t,success:!0}}(t,n);e.all.push(r),e.branches[t]=r}),new Ua(Mh,(e,[t])=>{const n=function(e){return{branch:e,hash:null,success:!1}}(t);e.errors.push(n),e.all.push(n),e.branches[t]=n})],Lh=(e,t)=>rc(new Ph,Rh,[e,t])}}),Hh=na({"src/lib/responses/BranchSummary.ts"(){Bh=class{constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(e,t,n,r,s){"*"===e&&(this.detached=t,this.current=n),this.all.push(n),this.branches[n]={current:"*"===e,linkedWorkTree:"+"===e,name:n,commit:r,label:s}}}}});function Wh(e){return e?e.charAt(0):""}function Vh(e,t=!1){return rc(new Bh,t?[Uh]:Nh,e)}var qh=na({"src/lib/parsers/parse-branch.ts"(){Hh(),lc(),Nh=[new Ua(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,n,r,s])=>{e.push(Wh(t),!0,n,r,s)}),new Ua(/^([*+]\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s,(e,[t,n,r,s])=>{e.push(Wh(t),!1,n,r,s)})],Uh=new Ua(/^(\S+)$/s,(e,[t])=>{e.push("*",!1,t,"","")})}}),zh={};function Yh(e){const t=["-d","-D","--delete"];return e.some(e=>t.includes(e))}function Jh(e){const t=Yh(e),n=e.includes("--show-current"),r=["branch",...e];return 1===r.length&&r.push("-a"),r.includes("-v")||r.splice(1,0,"-v"),{format:"utf-8",commands:r,parser:(e,r)=>t?Lh(e,r).all[0]:Vh(e,n)}}function Kh(){return{format:"utf-8",commands:["branch","-v"],parser:e=>Vh(e)}}function Qh(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser:(e,t)=>Lh(e,t),onError({exitCode:e,stdOut:t},n,r,s){if(!Ih(String(n),e))return s(n);r(t)}}}function Xh(e,t=!1){const n={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser:(t,n)=>Lh(t,n).branches[e],onError({exitCode:e,stdErr:t,stdOut:r},s,i,o){if(!Ih(String(s),e))return o(s);throw new zo(n.parser(Ca(r),Ca(t)),String(s))}};return n}ra(zh,{branchLocalTask:()=>Kh,branchTask:()=>Jh,containsDeleteBranchCommand:()=>Yh,deleteBranchTask:()=>Xh,deleteBranchesTask:()=>Qh});var Zh,ep=na({"src/lib/tasks/branch.ts"(){oa(),Gh(),qh(),lc()}});function tp(e){const t=e.trim().replace(/^["']|["']$/g,"");return t&&i(t)}var np=na({"src/lib/responses/CheckIgnore.ts"(){Zh=e=>e.split(/\n/g).map(tp).filter(Boolean)}}),rp={};function sp(e){return{commands:["check-ignore",...e],format:"utf-8",parser:Zh}}ra(rp,{checkIgnoreTask:()=>sp});var ip,op=na({"src/lib/tasks/check-ignore.ts"(){np()}});function ap(e,t){return rc({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},ip,[e,t])}var cp=na({"src/lib/parsers/parse-fetch.ts"(){lc(),ip=[new Ua(/From (.+)$/,(e,[t])=>{e.remote=t}),new Ua(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,n])=>{e.branches.push({name:t,tracking:n})}),new Ua(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,n])=>{e.tags.push({name:t,tracking:n})}),new Ua(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new Ua(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,n,r,s])=>{e.updated.push({name:r,tracking:s,to:n,from:t})})]}}),lp={};function up(e){return/^--upload-pack(=|$)/.test(e)}function hp(e,t,n){const r=["fetch",...n];e&&t&&r.push(e,t);return r.find(up)?Sc("git.fetch: potential exploit argument blocked."):{commands:r,format:"utf-8",parser:ap}}ra(lp,{fetchTask:()=>hp});var pp,fp=na({"src/lib/tasks/fetch.ts"(){cp(),Fc()}});function dp(e){return rc({moves:[]},pp,e)}var mp=na({"src/lib/parsers/parse-move.ts"(){lc(),pp=[new Ua(/^Renaming (.+) to (.+)$/,(e,[t,n])=>{e.moves.push({from:t,to:n})})]}}),gp={};function yp(e,t){return{commands:["mv","-v",..._a(e),t],format:"utf-8",parser:dp}}ra(gp,{moveTask:()=>yp});var bp=na({"src/lib/tasks/move.ts"(){mp(),lc()}}),wp={};function _p(e,t,n){const r=["pull",...n];return e&&t&&r.splice(1,0,e,t),{commands:r,format:"utf-8",parser:(e,t)=>ju(e,t),onError(e,t,n,r){const s=function(e,t){const n=rc(new vu,Ru,[e,t]);return n.message&&n}(Ca(e.stdOut),Ca(e.stdErr));if(s)return r(new zo(s));r(t)}}}ra(wp,{pullTask:()=>_p});var vp=na({"src/lib/tasks/pull.ts"(){oa(),Gu(),lc()}});function kp(e){const t={};return Op(e,([e])=>t[e]={name:e}),Object.values(t)}function Sp(e){const t={};return Op(e,([e,n,r])=>{Object.hasOwn(t,e)||(t[e]={name:e,refs:{fetch:"",push:""}}),r&&n&&(t[e].refs[r.replace(/[^a-z]/g,"")]=n)}),Object.values(t)}function Op(e,t){ma(e,e=>t(e.split(/\s+/)))}var Cp=na({"src/lib/responses/GetRemoteSummary.ts"(){lc()}}),xp={};function Ep(e,t,n){return Oc(["remote","add",...n,e,t])}function Tp(e){const t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?Sp:kp}}function Ap(e){const t=[...e];return"ls-remote"!==t[0]&&t.unshift("ls-remote"),Oc(t)}function Dp(e){const t=[...e];return"remote"!==t[0]&&t.unshift("remote"),Oc(t)}function $p(e){return Oc(["remote","remove",e])}ra(xp,{addRemoteTask:()=>Ep,getRemotesTask:()=>Tp,listRemotesTask:()=>Ap,remoteTask:()=>Dp,removeRemoteTask:()=>$p});var Pp=na({"src/lib/tasks/remote.ts"(){Cp(),Fc()}}),Fp={};function Mp(e={},t){const n=gu(e),r=["stash","list",...n.commands,...t],s=lu(n.splitter,n.fields,zl(r));return fu(r)||{commands:r,format:"utf-8",parser:s}}ra(Fp,{stashListTask:()=>Mp});var Rp=na({"src/lib/tasks/stash-list.ts"(){tu(),uu(),mu(),Su()}}),Lp={};function jp(e,t){return Bp(["add",e,t])}function Ip(e){return Bp(["init",...e])}function Bp(e){const t=[...e];return"submodule"!==t[0]&&t.unshift("submodule"),Oc(t)}function Np(e){return Bp(["update",...e])}ra(Lp,{addSubModuleTask:()=>jp,initSubModuleTask:()=>Ip,subModuleTask:()=>Bp,updateSubModuleTask:()=>Np});var Up,Gp,Hp=na({"src/lib/tasks/sub-module.ts"(){Fc()}});function Wp(e,t){return e===t?0:e>t?1:-1}function Vp(e){return e.trim()}function qp(e){return"string"==typeof e&&parseInt(e.replace(/^\D+/g,""),10)||0}var zp=na({"src/lib/responses/TagList.ts"(){Up=class{constructor(e,t){this.all=e,this.latest=t}},Gp=function(e,t=!1){const n=e.split("\n").map(Vp).filter(Boolean);t||n.sort(function(e,t){const n=e.split("."),r=t.split(".");if(1===n.length||1===r.length)return function(e,t){const n=Number.isNaN(e);return n!==Number.isNaN(t)?n?1:-1:n?Wp(e,t):0}(qp(n[0]),qp(r[0]));for(let e=0,t=Math.max(n.length,r.length);e<t;e++){const t=Wp(qp(n[e]),qp(r[e]));if(t)return t}return 0});const r=t?n[0]:[...n].reverse().find(e=>e.indexOf(".")>=0);return new Up(n,r)}}}),Yp={};function Jp(e=[]){const t=e.some(e=>/^--sort=/.test(e));return{format:"utf-8",commands:["tag","-l",...e],parser:e=>Gp(e,t)}}function Kp(e){return{format:"utf-8",commands:["tag",e],parser:()=>({name:e})}}function Qp(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser:()=>({name:e})}}ra(Yp,{addAnnotatedTagTask:()=>Qp,addTagTask:()=>Kp,tagListTask:()=>Jp});var Xp,Zp,ef=na({"src/lib/tasks/tag.ts"(){zp()}}),tf=(Xp={"src/git.js"(e,t){var{GitExecutor:n}=(Sl(),sa(kl)),{SimpleGitApi:r}=(Eh(),sa(Oh)),{Scheduler:s}=(Ah(),sa(Th)),{adhocExecTask:i,configurationErrorTask:o}=(Fc(),sa(vc)),{asArray:a,filterArray:c,filterPrimitives:l,filterString:u,filterStringOrStringArray:h,filterType:p,getTrailingOptions:f,trailingFunctionArgument:d,trailingOptionsArgument:m}=(lc(),sa(ic)),{applyPatchTask:g}=(Fh(),sa(Dh)),{branchTask:y,branchLocalTask:b,deleteBranchesTask:w,deleteBranchTask:_}=(ep(),sa(zh)),{checkIgnoreTask:v}=(op(),sa(rp)),{checkIsRepoTask:k}=(bc(),sa(uc)),{cleanWithOptionsTask:S,isCleanOptionsArray:O}=(Nc(),sa(Mc)),{diffSummaryTask:C}=(mu(),sa(hu)),{fetchTask:x}=(fp(),sa(lp)),{moveTask:E}=(bp(),sa(gp)),{pullTask:T}=(vp(),sa(wp)),{pushTagsTask:A}=(Zu(),sa(Ku)),{addRemoteTask:D,getRemotesTask:$,listRemotesTask:P,remoteTask:F,removeRemoteTask:M}=(Pp(),sa(xp)),{getResetMode:R,resetTask:L}=(hl(),sa(al)),{stashListTask:j}=(Rp(),sa(Fp)),{addSubModuleTask:I,initSubModuleTask:B,subModuleTask:N,updateSubModuleTask:U}=(Hp(),sa(Lp)),{addAnnotatedTagTask:G,addTagTask:H,tagListTask:W}=(ef(),sa(Yp)),{straightThroughBufferTask:V,straightThroughStringTask:q}=(Fc(),sa(vc));function z(e,t){this._plugins=t,this._executor=new n(e.baseDir,new s(e.maxConcurrentProcesses),t),this._trimmed=e.trimmed}(z.prototype=Object.create(r.prototype)).constructor=z,z.prototype.customBinary=function(e){return this._plugins.reconfigure("binary",e),this},z.prototype.env=function(e,t){return 1===arguments.length&&"object"==typeof e?this._executor.env=e:(this._executor.env=this._executor.env||{})[e]=t,this},z.prototype.stashList=function(e){return this._runTask(j(m(arguments)||{},c(e)&&e||[]),d(arguments))},z.prototype.mv=function(e,t){return this._runTask(E(e,t),d(arguments))},z.prototype.checkoutLatestTag=function(e){var t=this;return this.pull(function(){t.tags(function(n,r){t.checkout(r.latest,e)})})},z.prototype.pull=function(e,t,n,r){return this._runTask(T(p(e,u),p(t,u),f(arguments)),d(arguments))},z.prototype.fetch=function(e,t){return this._runTask(x(p(e,u),p(t,u),f(arguments)),d(arguments))},z.prototype.silent=function(e){return this._runTask(i(()=>console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this method will be removed.")))},z.prototype.tags=function(e,t){return this._runTask(W(f(arguments)),d(arguments))},z.prototype.rebase=function(){return this._runTask(q(["rebase",...f(arguments)]),d(arguments))},z.prototype.reset=function(e){return this._runTask(L(R(e),f(arguments)),d(arguments))},z.prototype.revert=function(e){const t=d(arguments);return"string"!=typeof e?this._runTask(o("Commit must be a string"),t):this._runTask(q(["revert",...f(arguments,0,!0),e]),t)},z.prototype.addTag=function(e){const t="string"==typeof e?H(e):o("Git.addTag requires a tag name");return this._runTask(t,d(arguments))},z.prototype.addAnnotatedTag=function(e,t){return this._runTask(G(e,t),d(arguments))},z.prototype.deleteLocalBranch=function(e,t,n){return this._runTask(_(e,"boolean"==typeof t&&t),d(arguments))},z.prototype.deleteLocalBranches=function(e,t,n){return this._runTask(w(e,"boolean"==typeof t&&t),d(arguments))},z.prototype.branch=function(e,t){return this._runTask(y(f(arguments)),d(arguments))},z.prototype.branchLocal=function(e){return this._runTask(b(),d(arguments))},z.prototype.raw=function(e){const t=!Array.isArray(e),n=[].slice.call(t?arguments:e,0);for(let e=0;e<n.length&&t;e++)if(!l(n[e])){n.splice(e,n.length-e);break}n.push(...f(arguments,0,!0));var r=d(arguments);return n.length?this._runTask(q(n,this._trimmed),r):this._runTask(o("Raw: must supply one or more command to execute"),r)},z.prototype.submoduleAdd=function(e,t,n){return this._runTask(I(e,t),d(arguments))},z.prototype.submoduleUpdate=function(e,t){return this._runTask(U(f(arguments,!0)),d(arguments))},z.prototype.submoduleInit=function(e,t){return this._runTask(B(f(arguments,!0)),d(arguments))},z.prototype.subModule=function(e,t){return this._runTask(N(f(arguments)),d(arguments))},z.prototype.listRemote=function(){return this._runTask(P(f(arguments)),d(arguments))},z.prototype.addRemote=function(e,t,n){return this._runTask(D(e,t,f(arguments)),d(arguments))},z.prototype.removeRemote=function(e,t){return this._runTask(M(e),d(arguments))},z.prototype.getRemotes=function(e,t){return this._runTask($(!0===e),d(arguments))},z.prototype.remote=function(e,t){return this._runTask(F(f(arguments)),d(arguments))},z.prototype.tag=function(e,t){const n=f(arguments);return"tag"!==n[0]&&n.unshift("tag"),this._runTask(q(n),d(arguments))},z.prototype.updateServerInfo=function(e){return this._runTask(q(["update-server-info"]),d(arguments))},z.prototype.pushTags=function(e,t){const n=A({remote:p(e,u)},f(arguments));return this._runTask(n,d(arguments))},z.prototype.rm=function(e){return this._runTask(q(["rm","-f",...a(e)]),d(arguments))},z.prototype.rmKeepLocal=function(e){return this._runTask(q(["rm","--cached",...a(e)]),d(arguments))},z.prototype.catFile=function(e,t){return this._catFile("utf-8",arguments)},z.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},z.prototype._catFile=function(e,t){var n=d(t),r=["cat-file"],s=t[0];if("string"==typeof s)return this._runTask(o("Git.catFile: options must be supplied as an array of strings"),n);Array.isArray(s)&&r.push.apply(r,s);const i="buffer"===e?V(r):q(r);return this._runTask(i,n)},z.prototype.diff=function(e,t){const n=u(e)?o("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):q(["diff",...f(arguments)]);return this._runTask(n,d(arguments))},z.prototype.diffSummary=function(){return this._runTask(C(f(arguments,1)),d(arguments))},z.prototype.applyPatch=function(e){const t=h(e)?g(a(e),f([].slice.call(arguments,1))):o("git.applyPatch requires one or more string patches as the first argument");return this._runTask(t,d(arguments))},z.prototype.revparse=function(){const e=["rev-parse",...f(arguments,!0)];return this._runTask(q(e,!0),d(arguments))},z.prototype.clean=function(e,t,n){const r=O(e),s=r&&e.join("")||p(e,u)||"",i=f([].slice.call(arguments,r?1:0));return this._runTask(S(s,i),d(arguments))},z.prototype.exec=function(e){const t={commands:[],format:"utf-8",parser(){"function"==typeof e&&e()}};return this._runTask(t)},z.prototype.clearQueue=function(){return this._runTask(i(()=>console.warn("simple-git deprecation notice: clearQueue() is deprecated and will be removed, switch to using the abortPlugin instead.")))},z.prototype.checkIgnore=function(e,t){return this._runTask(v(a(p(e,h,[]))),d(arguments))},z.prototype.checkIsRepo=function(e,t){return this._runTask(k(p(e,u)),d(arguments))},t.exports=z}},function(){return Zp||(0,Xp[ea(Xp)[0]])((Zp={exports:{}}).exports,Zp),Zp.exports});ia();var nf=class extends qo{constructor(e,t){super(void 0,t),this.config=e}};ia(),ia();var rf=class extends qo{constructor(e,t,n){super(e,n),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};function sf(e={}){return{type:"spawn.args",action(t,{env:n}){for(const r of function(e,t){return[...Io(...e).vulnerabilities,...Vo(t).vulnerabilities]}(t,n))if(!0!==e[r.category])throw new rf(void 0,"unsafe",r.message);return t}}}oa(),aa(),bc(),Nc(),Kc(),nl(),ol(),hl(),lc(),lc();var of=po.deferred().promise;function af({onClose:e=!0,onExit:t=50}={}){function n(e,t,n){!1!==e&&(!0===e?t.promise:t.promise.then(()=>Ea(e))).then(n.done)}return{type:"spawn.after",async action(r,{spawned:s,close:i}){const o=function(){let r=-1;const s={close:po.deferred(),closeTimeout:po.deferred(),exit:po.deferred(),exitTimeout:po.deferred()},i=Promise.race([!1===e?of:s.closeTimeout.promise,!1===t?of:s.exitTimeout.promise]);return n(e,s.close,s.closeTimeout),n(t,s.exit,s.exitTimeout),{close(e){r=e,s.close.done()},exit(e){r=e,s.exit.done()},get exitCode(){return r},result:i}}();let a=!0,c=()=>{a=!1};s.stdout?.on("data",c),s.stderr?.on("data",c),s.on("error",c),s.on("close",e=>o.close(e)),s.on("exit",e=>o.exit(e));try{await o.result,a&&await Ea(50),i(o.exitCode)}catch(e){i(o.exitCode,e)}}}}lc();var cf="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function lf(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_~-]+)$/i.test(e)}function uf(e,t){if(e.length<1||e.length>2)throw new rf(void 0,"binary","Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings");if(e.some(lf)){if(!t)throw new rf(void 0,"binary",cf);console.warn(cf)}const[n,r]=e;return{binary:n,prefix:r}}function hf(e){return!(!e.exitCode||!e.stdErr.length)}function pf(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function ff(e=!1,t=hf,n=pf){return(r,s)=>!e&&r||!t(s)?r:n(s)}function df(e){return{type:"task.error",action(t,n){const r=e(t.error,{stdErr:n.stdErr,stdOut:n.stdOut,exitCode:n.exitCode});return Buffer.isBuffer(r)?{error:new qo(void 0,r.toString("utf-8"))}:{error:r}}}}ia(),lc();var mf=class{constructor(){this.plugins=new Set,this.events=new t}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){const n=ya(this.plugins,{type:e,action:t});return()=>this.plugins.delete(n)}add(e){const t=[];return _a(e).forEach(e=>e&&this.plugins.add(ya(t,e))),()=>{t.forEach(e=>this.plugins.delete(e))}}exec(e,t,n){let r=t;const s=Object.freeze(Object.create(n));for(const t of this.plugins)t.type===e&&(r=t.action(r,s));return r}};function gf(e){return String(e.toLowerCase().split(" ",1))||"unknown"}lc(),lc(),lc();var yf=tf();oa();var bf=function(e,t){const n=new mf,r=Ja(e&&("string"==typeof e?{baseDir:e}:e)||{},t);if(!ga(r.baseDir))throw new nf(r,"Cannot use simple-git on a directory that does not exist");return Array.isArray(r.config)&&n.add(function(e){const t=Oa(e,"-c");return{type:"spawn.args",action:e=>[...t,...e]}}(r.config)),n.add(sf(r.unsafe)),n.add(af(r.completion)),r.abort&&n.add(function(e){if(!e)return;const t={type:"spawn.after",action(t,n){function r(){n.kill(new rf(void 0,"abort","Abort signal received"))}e.addEventListener("abort",r),n.spawned.on("close",()=>e.removeEventListener("abort",r))}};return[{type:"spawn.before",action(t,n){e.aborted&&n.kill(new rf(void 0,"abort","Abort already signaled"))}},t]}(r.abort)),r.progress&&n.add(function(e){const t="--progress",n=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action:(e,r)=>n.includes(r.method)?ba(e,t):e},{type:"spawn.after",action(n,r){r.commands.includes(t)&&r.spawned.stderr?.on("data",t=>{const n=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(t.toString("utf8"));n&&e({method:r.method,stage:gf(n[1]),progress:Sa(n[2]),processed:Sa(n[3]),total:Sa(n[4])})})}}]}(r.progress)),r.timeout&&n.add(function({block:e,stdErr:t=!0,stdOut:n=!0}){if(e>0)return{type:"spawn.after",action(r,s){let i;function o(){i&&clearTimeout(i),i=setTimeout(c,e)}function a(){s.spawned.stdout?.off("data",o),s.spawned.stderr?.off("data",o),s.spawned.off("exit",a),s.spawned.off("close",a),i&&clearTimeout(i)}function c(){a(),s.kill(new rf(void 0,"timeout","block timeout reached"))}n&&s.spawned.stdout?.on("data",o),t&&s.spawned.stderr?.on("data",o),s.spawned.on("exit",a),s.spawned.on("close",a),o()}}}(r.timeout)),r.spawnOptions&&n.add(function(e){const t=xa(e,["uid","gid"]);return{type:"spawn.options",action:e=>({...t,...e})}}(r.spawnOptions)),n.add({type:"spawn.args",action(e){const t=[];let n;function r(e){(n=n||[]).push(...e)}for(let n=0;n<e.length;n++){const s=e[n];if(ao(s))r(co(s));else{if("--"===s){r(e.slice(n+1).flatMap(e=>ao(e)&&co(e)||e));break}t.push(s)}}return n?[...t,"--",...n.map(String)]:t}}),n.add(df(ff(!0))),r.errors&&n.add(df(r.errors)),function(e,t=["git"],n=!1){let r=uf(_a(t),n);e.on("binary",e=>{r=uf(_a(e),n)}),e.append("spawn.binary",()=>r.binary),e.append("spawn.args",e=>r.prefix?[r.prefix,...e]:e)}(n,r.binary,r.unsafe?.allowUnsafeCustomBinary),new yf(r,n)};const wf=e=>String(e??""),_f={info(e){console.log(is.cyan(wf(e)))},success(e){console.log(is.green(`โ ${wf(e)}`))},warn(e){console.log(is.yellow(`! ${wf(e)}`))},error(e){console.error(is.red(`ร ${wf(e)}`))}},vf=Gi({spinner:{interval:300,frames:["โ ","โ ","โ น","โ ธ","โ ผ","โ ด","โ ฆ","โ ง","โ ","โ "].map(e=>is.blue(e))}}),kf={baseDir:process.cwd(),binary:"git",maxConcurrentProcesses:6},Sf=new Map([["Vite4-Vue3-Typescript-template",{name:"admin-template",downloadUrl:"git@gitee.com:sohucw/admin-pro.git",description:"Vue3ๆๆฏๆ ๅผๅๆจกๆฟ",branch:"dev11"}],["Vite-temp",{name:"admin-template",downloadUrl:"git@gitee.com:sohucw/admin-pro.git",description:"Vue3ๆๆฏๆ ๅผๅๆจกๆฟ",branch:"dev10"}]]);async function Of(e){const t=[...Sf.entries()].map(e=>{const[t,n]=e;return{name:t,value:t,description:n.description}});e||(e=await Mt({message:"่ฏท่พๅ
ฅ้กน็ฎๅ็งฐ"}));const n=s.resolve(process.cwd(),e);if(Mr.existsSync(n)){if(!await(async e=>(_f.warn(`${e} ๆไปถๅทฒๅญๅจ !`),Yt({message:"ๆฏๅฆ่ฆ็ๅๆไปถ: ",choices:[{name:"่ฆ็",value:!0},{name:"ๅๆถ",value:!1}]})))(e))return;await Mr.remove(n)}const r=await Yt({message:"่ฏท้ๆฉๆจกๆฟ",choices:t}),i=Sf.get(r);i?await(async(e,t,n)=>{const r=bf(kf);try{await vf(r.clone(e,t,n),"ไปฃ็ ไธ่ฝฝไธญ: ",{estimate:8e3}),console.log(),console.log(is.blueBright("==================================")),console.log(is.blueBright("=== ๆฌข่ฟไฝฟ็จ yezz-cli ่ๆๆถ ===")),console.log(is.blueBright("==================================")),console.log(),_f.success(`้กน็ฎๅๅปบๆๅ ${is.blueBright(t)}`),_f.success("ๆง่กไปฅไธๅฝไปคๅฏๅจ้กน็ฎ๏ผ"),_f.info(`cd ${is.blueBright(t)}`),_f.info(`${is.yellow("pnpm")} install`),_f.info(`${is.yellow("pnpm")} run dev`)}catch(e){_f.error("ไธ่ฝฝๅคฑ่ดฅ"),_f.error(String(e))}})(i.downloadUrl,e,["-b",`${i.branch}`]):_f.error(`${r} ๆจกๆฟไธๅญๅจ`)}const Cf=new K("yezz");Cf.version("0.0.2","-v, --version"),Cf.command("create").description("create a new project").argument("[name]","้กน็ฎๅ็งฐ").action(async e=>{Of(e)}),Cf.parse();
|
|
2
|
+
import{Command as t}from"commander";import{input as e,select as i}from"@inquirer/prompts";import r from"axios";import s from"chalk";import n from"fs-extra";import o from"lodash";import a from"node:path";import l from"progress-estimator";import f from"simple-git";import h from"node:child_process";import c from"node:process";import{stripVTControlCharacters as u}from"node:util";var m="0.0.4";const d=t=>String(t??""),_={info(t){console.log(s.cyan(d(t)))},success(t){console.log(s.green(`โ ${d(t)}`))},warn(t){console.log(s.yellow(`! ${d(t)}`))},error(t){console.error(s.red(`ร ${d(t)}`))}},p=l({spinner:{interval:300,frames:["โ ","โ ","โ น","โ ธ","โ ผ","โ ด","โ ฆ","โ ง","โ ","โ "].map(t=>s.blue(t))}}),g={baseDir:process.cwd(),binary:"git",maxConcurrentProcesses:6},v=new Map([["Vite4-Vue3-Typescript-template",{name:"admin-template",downloadUrl:"git@gitee.com:sohucw/admin-pro.git",description:"Vue3ๆๆฏๆ ๅผๅๆจกๆฟ",branch:"dev11"}],["Vite-temp",{name:"admin-template",downloadUrl:"git@gitee.com:sohucw/admin-pro.git",description:"Vue3ๆๆฏๆ ๅผๅๆจกๆฟ",branch:"dev10"}]]),x=async t=>{const{data:e}=await(async t=>{const e="https://registry.npmjs.org/"+t;let i={};try{i=await r.get(e)}catch(t){_.error(t)}return i})(t);return e["dist-tags"].latest};async function y(t){const r=[...v.entries()].map(t=>{const[e,i]=t;return{name:e,value:e,description:i.description}});t||(t=await e({message:"่ฏท่พๅ
ฅ้กน็ฎๅ็งฐ"}));const l=a.resolve(process.cwd(),t);if(n.existsSync(l)){if(!await(async t=>(_.warn(`${t} ๆไปถๅทฒๅญๅจ !`),i({message:"ๆฏๅฆ่ฆ็ๅๆไปถ: ",choices:[{name:"่ฆ็",value:!0},{name:"ๅๆถ",value:!1}]})))(t))return;await n.remove(l)}const h=await i({message:"่ฏท้ๆฉๆจกๆฟ",choices:r});await(async(t,e)=>{const i=await x(t),r=o.gt(i,e);return r?(_.info(`ๆฃๆตๅฐ yezz ๆๆฐ็:${s.blueBright(i)} ๅฝๅ็ๆฌ:${s.blueBright(e)} ~`),_.info(`ๅฏไฝฟ็จ ${s.yellow("pnpm")} install yezz-cli@latest ๆดๆฐ ~`)):_.info(`ๅฝๅๅทฒๆฏๆๆฐ็ๆฌ ${s.blueBright(e)} ~`),r})("yezz-cli",m);const c=v.get(h);c?await(async(t,e,i)=>{const r=f(g);try{await p(r.clone(t,e,i),"ไปฃ็ ไธ่ฝฝไธญ: ",{estimate:8e3}),console.log(),console.log(s.blueBright("==================================")),console.log(s.blueBright("=== ๆฌข่ฟไฝฟ็จ yezz-cli ่ๆๆถ ===")),console.log(s.blueBright("==================================")),console.log(),_.success(`้กน็ฎๅๅปบๆๅ ${s.blueBright(e)}`),_.success("ๆง่กไปฅไธๅฝไปคๅฏๅจ้กน็ฎ๏ผ"),_.info(`cd ${s.blueBright(e)}`),_.info(`${s.yellow("pnpm")} install`),_.info(`${s.yellow("pnpm")} run dev`)}catch(t){_.error("ไธ่ฝฝๅคฑ่ดฅ"),_.error(String(t))}})(c.downloadUrl,t,["-b",`${c.branch}`]):_.error(`${h} ๆจกๆฟไธๅญๅจ`)}const b=(t,e,i,r)=>{if("length"===i||"prototype"===i)return;if("arguments"===i||"caller"===i)return;const s=Object.getOwnPropertyDescriptor(t,i),n=Object.getOwnPropertyDescriptor(e,i);!w(s,n)&&r||Object.defineProperty(t,i,n)},w=function(t,e){return void 0===t||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},T=(t,e)=>`/* Wrapped ${t}*/\n${e}`,S=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),E=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");function I(t,e,{ignoreNonConfigurable:i=!1}={}){const{name:r}=t;for(const r of Reflect.ownKeys(e))b(t,e,r,i);return((t,e)=>{const i=Object.getPrototypeOf(e);i!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,i)})(t,e),((t,e,i)=>{const r=""===i?"":`with ${i.trim()}() `,s=T.bind(null,r,e.toString());Object.defineProperty(s,"name",E);const{writable:n,enumerable:o,configurable:a}=S;Object.defineProperty(t,"toString",{value:s,writable:n,enumerable:o,configurable:a})})(t,e,r),t}const P=new WeakMap,R=(t,e={})=>{if("function"!=typeof t)throw new TypeError("Expected a function");let i,r=0;const s=t.displayName||t.name||"<anonymous>",n=function(...o){if(P.set(n,++r),1===r)i=t.apply(this,o),t=void 0;else if(!0===e.throw)throw new Error(`Function \`${s}\` can only be called once`);return i};return I(n,t),P.set(n,r),n};R.callCount=t=>{if(!P.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return P.get(t)};const C=[];C.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&C.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&C.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const O=t=>!!t&&"object"==typeof t&&"function"==typeof t.removeListener&&"function"==typeof t.emit&&"function"==typeof t.reallyExit&&"function"==typeof t.listeners&&"function"==typeof t.kill&&"number"==typeof t.pid&&"function"==typeof t.on,B=Symbol.for("signal-exit emitter"),L=globalThis,k=Object.defineProperty.bind(Object);class W{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(L[B])return L[B];k(L,B,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,e){this.listeners[t].push(e)}removeListener(t,e){const i=this.listeners[t],r=i.indexOf(e);-1!==r&&(0===r&&1===i.length?i.length=0:i.splice(r,1))}emit(t,e,i){if(this.emitted[t])return!1;this.emitted[t]=!0;let r=!1;for(const s of this.listeners[t])r=!0===s(e,i)||r;return"exit"===t&&(r=this.emit("afterExit",e,i)||r),r}}class A{}const M=globalThis.process,{onExit:$}=(j=O(M)?new class extends A{#t="win32"===M.platform?"SIGINT":"SIGHUP";#e=new W;#i;#r;#s;#n={};#o=!1;constructor(t){super(),this.#i=t,this.#n={};for(const e of C)this.#n[e]=()=>{const i=this.#i.listeners(e);let{count:r}=this.#e;const s=t;if("object"==typeof s.__signal_exit_emitter__&&"number"==typeof s.__signal_exit_emitter__.count&&(r+=s.__signal_exit_emitter__.count),i.length===r){this.unload();const i=this.#e.emit("exit",null,e),r="SIGHUP"===e?this.#t:e;i||t.kill(t.pid,r)}};this.#s=t.reallyExit,this.#r=t.emit}onExit(t,e){if(!O(this.#i))return()=>{};!1===this.#o&&this.load();const i=e?.alwaysLast?"afterExit":"exit";return this.#e.on(i,t),()=>{this.#e.removeListener(i,t),0===this.#e.listeners.exit.length&&0===this.#e.listeners.afterExit.length&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#e.count+=1;for(const t of C)try{const e=this.#n[t];e&&this.#i.on(t,e)}catch(t){}this.#i.emit=(t,...e)=>this.#a(t,...e),this.#i.reallyExit=t=>this.#l(t)}}unload(){this.#o&&(this.#o=!1,C.forEach(t=>{const e=this.#n[t];if(!e)throw new Error("Listener not defined for signal: "+t);try{this.#i.removeListener(t,e)}catch(t){}}),this.#i.emit=this.#r,this.#i.reallyExit=this.#s,this.#e.count-=1)}#l(t){return O(this.#i)?(this.#i.exitCode=t||0,this.#e.emit("exit",this.#i.exitCode,null),this.#s.call(this.#i,this.#i.exitCode)):0}#a(t,...e){const i=this.#r;if("exit"===t&&O(this.#i)){"number"==typeof e[0]&&(this.#i.exitCode=e[0]);const r=i.call(this.#i,t,...e);return this.#e.emit("exit",this.#i.exitCode,null),r}return i.call(this.#i,t,...e)}}(M):new class extends A{onExit(){return()=>{}}load(){}unload(){}},{onExit:(t,e)=>j.onExit(t,e),load:()=>j.load(),unload:()=>j.unload()});var j;const F=c.stderr.isTTY?c.stderr:c.stdout.isTTY?c.stdout:void 0,G=F?R(()=>{$(()=>{F.write("[?25h")},{alwaysLast:!0})}):()=>{};let D=!1;const H={show:(t=c.stderr)=>{t.isTTY&&(D=!1,t.write("[?25h"))},hide:(t=c.stderr)=>{t.isTTY&&(G(),D=!0,t.write("[?25l"))},toggle:(t,e)=>{void 0!==t&&(D=t),D?H.show(e):H.hide(e)}};var z={dots:{interval:80,frames:["โ ","โ ","โ น","โ ธ","โ ผ","โ ด","โ ฆ","โ ง","โ ","โ "]},dots2:{interval:80,frames:["โฃพ","โฃฝ","โฃป","โขฟ","โกฟ","โฃ","โฃฏ","โฃท"]},dots3:{interval:80,frames:["โ ","โ ","โ ","โ ","โ ","โ ฆ","โ ด","โ ฒ","โ ณ","โ "]},dots4:{interval:80,frames:["โ ","โ ","โ ","โ ","โ ","โ ธ","โ ฐ","โ ","โ ฐ","โ ธ","โ ","โ ","โ ","โ "]},dots5:{interval:80,frames:["โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ฒ","โ ด","โ ฆ","โ ","โ ","โ ","โ ","โ ","โ ","โ "]},dots6:{interval:80,frames:["โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ฒ","โ ด","โ ค","โ ","โ ","โ ค","โ ด","โ ฒ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ "]},dots7:{interval:80,frames:["โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ฆ","โ ค","โ ","โ ","โ ค","โ ฆ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ "]},dots8:{interval:80,frames:["โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ฒ","โ ด","โ ค","โ ","โ ","โ ค","โ ","โ ","โ ค","โ ฆ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ "]},dots9:{interval:80,frames:["โขน","โขบ","โขผ","โฃธ","โฃ","โกง","โก","โก"]},dots10:{interval:80,frames:["โข","โข","โข","โก","โก","โก","โก "]},dots11:{interval:100,frames:["โ ","โ ","โ ","โก","โข","โ ","โ ","โ "]},dots12:{interval:80,frames:["โขโ ","โกโ ","โ โ ","โขโ ","โกโ ","โ
โ ","โขโ ","โกโ ","โ โ ","โขโ ","โกโ ","โ โ ","โขโ ","โกโ ","โ โ ","โ โ ","โ โ ","โ โ ","โ โ ","โ โ ฉ","โ โข","โ โก","โขโ ฉ","โกโข","โ โก","โขโ ฉ","โกโข","โ
โก","โขโ จ","โกโข","โ โก","โขโ ","โกโข","โ โก","โขโ ","โกโ ","โ โ ","โ โ ","โ โ ","โ โ ","โ โ ","โ โ ฉ","โ โข","โ โก","โ โ ฉ","โ โข","โ โก","โ โ ฉ","โ โข","โ โก","โ โ จ","โ โข","โ โก","โ โ ","โ โข","โ โก"]},dots13:{interval:80,frames:["โฃผ","โฃน","โขป","โ ฟ","โก","โฃ","โฃง","โฃถ"]},dots14:{interval:80,frames:["โ โ ","โ โ ","โ โ น","โ โขธ","โ โฃฐ","โขโฃ ","โฃโฃ","โฃโก","โฃโ ","โกโ ","โ โ ","โ โ "]},dots8Bit:{interval:80,frames:["โ ","โ ","โ ","โ ","โ ","โ
","โ ","โ ","โก","โก","โก","โก","โก","โก
","โก","โก","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โก","โก","โก","โก","โก","โก","โก","โก","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โก","โก","โก","โก","โก","โก","โก","โก","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โ ","โก","โก","โก","โก","โก","โก","โก","โก","โ ","โ ก","โ ข","โ ฃ","โ ค","โ ฅ","โ ฆ","โ ง","โก ","โกก","โกข","โกฃ","โกค","โกฅ","โกฆ","โกง","โ จ","โ ฉ","โ ช","โ ซ","โ ฌ","โ ญ","โ ฎ","โ ฏ","โกจ","โกฉ","โกช","โกซ","โกฌ","โกญ","โกฎ","โกฏ","โ ฐ","โ ฑ","โ ฒ","โ ณ","โ ด","โ ต","โ ถ","โ ท","โกฐ","โกฑ","โกฒ","โกณ","โกด","โกต","โกถ","โกท","โ ธ","โ น","โ บ","โ ป","โ ผ","โ ฝ","โ พ","โ ฟ","โกธ","โกน","โกบ","โกป","โกผ","โกฝ","โกพ","โกฟ","โข","โข","โข","โข","โข","โข
","โข","โข","โฃ","โฃ","โฃ","โฃ","โฃ","โฃ
","โฃ","โฃ","โข","โข","โข","โข","โข","โข","โข","โข","โฃ","โฃ","โฃ","โฃ","โฃ","โฃ","โฃ","โฃ","โข","โข","โข","โข","โข","โข","โข","โข","โฃ","โฃ","โฃ","โฃ","โฃ","โฃ","โฃ","โฃ","โข","โข","โข","โข","โข","โข","โข","โข","โฃ","โฃ","โฃ","โฃ","โฃ","โฃ","โฃ","โฃ","โข ","โขก","โขข","โขฃ","โขค","โขฅ","โขฆ","โขง","โฃ ","โฃก","โฃข","โฃฃ","โฃค","โฃฅ","โฃฆ","โฃง","โขจ","โขฉ","โขช","โขซ","โขฌ","โขญ","โขฎ","โขฏ","โฃจ","โฃฉ","โฃช","โฃซ","โฃฌ","โฃญ","โฃฎ","โฃฏ","โขฐ","โขฑ","โขฒ","โขณ","โขด","โขต","โขถ","โขท","โฃฐ","โฃฑ","โฃฒ","โฃณ","โฃด","โฃต","โฃถ","โฃท","โขธ","โขน","โขบ","โขป","โขผ","โขฝ","โขพ","โขฟ","โฃธ","โฃน","โฃบ","โฃป","โฃผ","โฃฝ","โฃพ","โฃฟ"]},dotsCircle:{interval:80,frames:["โข ","โ โ ","โ โ ","โ โ ฑ"," โกฑ","โขโกฐ","โขโก ","โขโก"]},sand:{interval:80,frames:["โ ","โ ","โ ","โก","โก","โก","โก ","โฃ","โฃ","โฃ","โฃ","โฃ","โฃ","โฃค","โฃฅ","โฃฆ","โฃฎ","โฃถ","โฃท","โฃฟ","โกฟ","โ ฟ","โข","โ ","โก","โ ","โ ซ","โข","โ ","โ ","โก","โ ","โ ","โ ก","โข"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["โ ","-","โ","โ","โ","-"]},rollingLine:{interval:80,frames:["/ "," - "," \\ "," |"," |"," \\ "," - ","/ "]},pipe:{interval:100,frames:["โค","โ","โด","โ","โ","โ","โฌ","โ"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["โถ","โธ","โน","โบ","โน","โท"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","ยด","-","_","_","_"]},hamburger:{interval:100,frames:["โฑ","โฒ","โด"]},growVertical:{interval:120,frames:["โ","โ","โ","โ
","โ","โ","โ","โ
","โ","โ"]},growHorizontal:{interval:120,frames:["โ","โ","โ","โ","โ","โ","โ","โ","โ","โ","โ","โ"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","ยฐ","O","o","."]},noise:{interval:100,frames:["โ","โ","โ"]},bounce:{interval:120,frames:["โ ","โ ","โ ","โ "]},boxBounce:{interval:120,frames:["โ","โ","โ","โ"]},boxBounce2:{interval:100,frames:["โ","โ","โ","โ"]},triangle:{interval:50,frames:["โข","โฃ","โค","โฅ"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["โ","โ ","โ","โ","โก","โ"]},circle:{interval:120,frames:["โก","โ","โ "]},squareCorners:{interval:180,frames:["โฐ","โณ","โฒ","โฑ"]},circleQuarters:{interval:120,frames:["โด","โท","โถ","โต"]},circleHalves:{interval:50,frames:["โ","โ","โ","โ"]},squish:{interval:100,frames:["โซ","โช"]},toggle:{interval:250,frames:["โถ","โท"]},toggle2:{interval:80,frames:["โซ","โช"]},toggle3:{interval:120,frames:["โก","โ "]},toggle4:{interval:100,frames:["โ ","โก","โช","โซ"]},toggle5:{interval:100,frames:["โฎ","โฏ"]},toggle6:{interval:300,frames:["แ","แ"]},toggle7:{interval:80,frames:["โฆพ","โฆฟ"]},toggle8:{interval:100,frames:["โ","โ"]},toggle9:{interval:100,frames:["โ","โ"]},toggle10:{interval:100,frames:["ใ","ใ","ใ"]},toggle11:{interval:50,frames:["โง","โง"]},toggle12:{interval:120,frames:["โ","โ"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["โ","โ","โ","โ","โ","โ","โ","โ"]},arrow2:{interval:80,frames:["โฌ๏ธ ","โ๏ธ ","โก๏ธ ","โ๏ธ ","โฌ๏ธ ","โ๏ธ ","โฌ
๏ธ ","โ๏ธ "]},arrow3:{interval:120,frames:["โนโนโนโนโน","โธโนโนโนโน","โนโธโนโนโน","โนโนโธโนโน","โนโนโนโธโน","โนโนโนโนโธ"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( โ )","( โ )","( โ )","( โ )","( โ)","( โ )","( โ )","( โ )","( โ )","(โ )"]},smiley:{interval:200,frames:["๐ ","๐ "]},monkey:{interval:300,frames:["๐ ","๐ ","๐ ","๐ "]},hearts:{interval:100,frames:["๐ ","๐ ","๐ ","๐ ","๐ "]},clock:{interval:100,frames:["๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ "]},earth:{interval:180,frames:["๐ ","๐ ","๐ "]},material:{interval:17,frames:["โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ","โโโโโโโโโโโโโโโโโโโโ"]},moon:{interval:80,frames:["๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ "]},runner:{interval:140,frames:["๐ถ ","๐ "]},pong:{interval:80,frames:["โโ โ","โโ โ","โ โ โ","โ โ โ","โ โก โ","โ โ โ","โ โ โ","โ โ โ","โ โ โ","โ โ โ","โ โก โ","โ โ โ","โ โ โ","โ โ โ","โ โ โ","โ โ โ","โ โกโ","โ โ โ","โ โ โ","โ โ โ","โ โ โ","โ โ โ","โ โก โ","โ โ โ","โ โ โ","โ โ โ","โ โ โ","โ โ โ","โ โก โ","โโ โ"]},shark:{interval:120,frames:["โ|\\____________โ","โ_|\\___________โ","โ__|\\__________โ","โ___|\\_________โ","โ____|\\________โ","โ_____|\\_______โ","โ______|\\______โ","โ_______|\\_____โ","โ________|\\____โ","โ_________|\\___โ","โ__________|\\__โ","โ___________|\\_โ","โ____________|\\โ","โ____________/|โ","โ___________/|_โ","โ__________/|__โ","โ_________/|___โ","โ________/|____โ","โ_______/|_____โ","โ______/|______โ","โ_____/|_______โ","โ____/|________โ","โ___/|_________โ","โ__/|__________โ","โ_/|___________โ","โ/|____________โ"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["โ๏ธ ","โ๏ธ ","โ๏ธ ","๐ค ","โ
๏ธ ","๐ฅ ","โ๏ธ ","๐ง ","๐จ ","๐ง ","๐จ ","๐ง ","๐จ ","โ ","๐จ ","๐ง ","๐จ ","โ๏ธ ","๐ฅ ","โ
๏ธ ","๐ค ","โ๏ธ ","โ๏ธ "]},christmas:{interval:400,frames:["๐ฒ","๐"]},grenade:{interval:80,frames:["ุ ","โฒ "," ยด "," โพ "," โธ"," โธ"," |"," โ"," โ"," เทด "," โ"," "," "," "]},point:{interval:125,frames:["โโโ","โโโ","โโโ","โโโ","โโโ"]},layer:{interval:150,frames:["-","=","โก"]},betaWave:{interval:80,frames:["ฯฮฒฮฒฮฒฮฒฮฒฮฒ","ฮฒฯฮฒฮฒฮฒฮฒฮฒ","ฮฒฮฒฯฮฒฮฒฮฒฮฒ","ฮฒฮฒฮฒฯฮฒฮฒฮฒ","ฮฒฮฒฮฒฮฒฯฮฒฮฒ","ฮฒฮฒฮฒฮฒฮฒฯฮฒ","ฮฒฮฒฮฒฮฒฮฒฮฒฯ"]},fingerDance:{interval:160,frames:["๐ค ","๐ค ","๐ ","โ ","๐ค ","๐ "]},fistBump:{interval:80,frames:["๐คใใใใ๐ค ","๐คใใใใ๐ค ","๐คใใใใ๐ค ","ใ๐คใใ๐คใ ","ใใ๐ค๐คใใ ","ใ๐คโจ๐คใใ ","๐คใโจใ๐คใ "]},soccerHeader:{interval:80,frames:[" ๐งโฝ๏ธ ๐ง ","๐ง โฝ๏ธ ๐ง ","๐ง โฝ๏ธ ๐ง ","๐ง โฝ๏ธ ๐ง ","๐ง โฝ๏ธ ๐ง ","๐ง โฝ๏ธ ๐ง ","๐ง โฝ๏ธ๐ง ","๐ง โฝ๏ธ ๐ง ","๐ง โฝ๏ธ ๐ง ","๐ง โฝ๏ธ ๐ง ","๐ง โฝ๏ธ ๐ง ","๐ง โฝ๏ธ ๐ง "]},mindblown:{interval:160,frames:["๐ ","๐ ","๐ฎ ","๐ฎ ","๐ฆ ","๐ฆ ","๐ง ","๐ง ","๐คฏ ","๐ฅ ","โจ ","ใ ","ใ ","ใ "]},speaker:{interval:160,frames:["๐ ","๐ ","๐ ","๐ "]},orangePulse:{interval:100,frames:["๐ธ ","๐ถ ","๐ ","๐ ","๐ถ "]},bluePulse:{interval:100,frames:["๐น ","๐ท ","๐ต ","๐ต ","๐ท "]},orangeBluePulse:{interval:100,frames:["๐ธ ","๐ถ ","๐ ","๐ ","๐ถ ","๐น ","๐ท ","๐ต ","๐ต ","๐ท "]},timeTravel:{interval:100,frames:["๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ ","๐ "]},aesthetic:{interval:80,frames:["โฐโฑโฑโฑโฑโฑโฑ","โฐโฐโฑโฑโฑโฑโฑ","โฐโฐโฐโฑโฑโฑโฑ","โฐโฐโฐโฐโฑโฑโฑ","โฐโฐโฐโฐโฐโฑโฑ","โฐโฐโฐโฐโฐโฐโฑ","โฐโฐโฐโฐโฐโฐโฐ","โฐโฑโฑโฑโฑโฑโฑ"]},dwarfFortress:{interval:80,frames:[" โโโโโโยฃยฃยฃ ","โบโโโโโโยฃยฃยฃ ","โบโโโโโโยฃยฃยฃ ","โบโโโโโโยฃยฃยฃ ","โบโโโโโโยฃยฃยฃ ","โบโโโโโโยฃยฃยฃ ","โบโโโโโโยฃยฃยฃ ","โบโโโโโโยฃยฃยฃ ","โบโโโโโโยฃยฃยฃ ","โบ โโโโโยฃยฃยฃ "," โบโโโโโยฃยฃยฃ "," โบโโโโโยฃยฃยฃ "," โบโโโโโยฃยฃยฃ "," โบโโโโโยฃยฃยฃ "," โบโโโโโยฃยฃยฃ "," โบโโโโโยฃยฃยฃ "," โบโโโโโยฃยฃยฃ "," โบโโโโโยฃยฃยฃ "," โบ โโโโยฃยฃยฃ "," โบโโโโยฃยฃยฃ "," โบโโโโยฃยฃยฃ "," โบโโโโยฃยฃยฃ "," โบโโโโยฃยฃยฃ "," โบโโโโยฃยฃยฃ "," โบโโโโยฃยฃยฃ "," โบโโโโยฃยฃยฃ "," โบโโโโยฃยฃยฃ "," โบ โโโยฃยฃยฃ "," โบโโโยฃยฃยฃ "," โบโโโยฃยฃยฃ "," โบโโโยฃยฃยฃ "," โบโโโยฃยฃยฃ "," โบโโโยฃยฃยฃ "," โบโโโยฃยฃยฃ "," โบโโโยฃยฃยฃ "," โบโโโยฃยฃยฃ "," โบ โโยฃยฃยฃ "," โบโโยฃยฃยฃ "," โบโโยฃยฃยฃ "," โบโโยฃยฃยฃ "," โบโโยฃยฃยฃ "," โบโโยฃยฃยฃ "," โบโโยฃยฃยฃ "," โบโโยฃยฃยฃ "," โบโโยฃยฃยฃ "," โบ โยฃยฃยฃ "," โบโยฃยฃยฃ "," โบโยฃยฃยฃ "," โบโยฃยฃยฃ "," โบโยฃยฃยฃ "," โบโยฃยฃยฃ "," โบโยฃยฃยฃ "," โบโยฃยฃยฃ "," โบโยฃยฃยฃ "," โบ ยฃยฃยฃ "," โบยฃยฃยฃ "," โบยฃยฃยฃ "," โบโยฃยฃ "," โบโยฃยฃ "," โบโยฃยฃ "," โบโยฃยฃ "," โบโยฃยฃ "," โบโยฃยฃ "," โบ ยฃยฃ "," โบยฃยฃ "," โบยฃยฃ "," โบโยฃ "," โบโยฃ "," โบโยฃ "," โบโยฃ "," โบโยฃ "," โบโยฃ "," โบ ยฃ "," โบยฃ "," โบยฃ "," โบโ "," โบโ "," โบโ "," โบโ "," โบโ "," โบโ "," โบ "," โบ &"," โบ โผ&"," โบ โผ &"," โบโผ &"," โบโผ & "," โผ & "," โบ & "," โผ & "," โบ & "," โผ & "," โบ & ","โผ & "," & "," & "," & โ "," & โ "," & โ "," & ยฃ "," & โยฃ "," & โยฃ "," & โยฃ "," & ยฃยฃ "," & โยฃยฃ "," & โยฃยฃ ","& โยฃยฃ ","& ยฃยฃยฃ "," โยฃยฃยฃ "," โยฃยฃยฃ "," โยฃยฃยฃ "," โยฃยฃยฃ "," โโยฃยฃยฃ "," โโยฃยฃยฃ "," โโยฃยฃยฃ "," โโยฃยฃยฃ "," โโโยฃยฃยฃ "," โโโยฃยฃยฃ "," โโโยฃยฃยฃ "," โโโยฃยฃยฃ "," โโโโยฃยฃยฃ "," โโโโยฃยฃยฃ "," โโโโยฃยฃยฃ "," โโโโยฃยฃยฃ "," โโโโโยฃยฃยฃ "," โโโโโยฃยฃยฃ "," โโโโโยฃยฃยฃ "," โโโโโยฃยฃยฃ "," โโโโโโยฃยฃยฃ "," โโโโโโยฃยฃยฃ "," โโโโโโยฃยฃยฃ "," โโโโโโยฃยฃยฃ "," โโโโโโยฃยฃยฃ "]},fish:{interval:80,frames:["~~~~~~~~~~~~~~~~~~~~","> ~~~~~~~~~~~~~~~~~~","ยบ> ~~~~~~~~~~~~~~~~~","(ยบ> ~~~~~~~~~~~~~~~~","((ยบ> ~~~~~~~~~~~~~~~","<((ยบ> ~~~~~~~~~~~~~~","><((ยบ> ~~~~~~~~~~~~~"," ><((ยบ> ~~~~~~~~~~~~","~ ><((ยบ> ~~~~~~~~~~~","~~ <>((ยบ> ~~~~~~~~~~","~~~ ><((ยบ> ~~~~~~~~~","~~~~ <>((ยบ> ~~~~~~~~","~~~~~ ><((ยบ> ~~~~~~~","~~~~~~ <>((ยบ> ~~~~~~","~~~~~~~ ><((ยบ> ~~~~~","~~~~~~~~ <>((ยบ> ~~~~","~~~~~~~~~ ><((ยบ> ~~~","~~~~~~~~~~ <>((ยบ> ~~","~~~~~~~~~~~ ><((ยบ> ~","~~~~~~~~~~~~ <>((ยบ> ","~~~~~~~~~~~~~ ><((ยบ>","~~~~~~~~~~~~~~ <>((ยบ","~~~~~~~~~~~~~~~ ><((","~~~~~~~~~~~~~~~~ <>(","~~~~~~~~~~~~~~~~~ ><","~~~~~~~~~~~~~~~~~~ <","~~~~~~~~~~~~~~~~~~~~"]}};const N=function({onlyFirst:t=!1}={}){return new RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]",t?void 0:"g")}();const U=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],Y=[12288,12288,65281,65376,65504,65510],V=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],q=(t,e)=>{let i=0,r=Math.floor(t.length/2)-1;for(;i<=r;){const s=Math.floor((i+r)/2),n=2*s;if(e<t[n])r=s-1;else{if(!(e>t[n+1]))return!0;i=s+1}}return!1},[J,K]=Q(V);function Q(t){let e=t[0],i=t[1];for(let r=0;r<t.length;r+=2){const s=t[r],n=t[r+1];if(19968>=s&&19968<=n)return[s,n];n-s>i-e&&(e=s,i=n)}return[e,i]}function X(t,{ambiguousAsWide:e=!1}={}){return function(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}(t),(t=>!(t<12288||t>65510)&&q(Y,t))(t)||(t=>t>=J&&t<=K||!(t<4352||t>262141)&&q(V,t))(t)||e&&(t=>!(t<161||t>1114109)&&q(U,t))(t)?2:1}const Z=new Intl.Segmenter,tt=/^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Format}|\p{Mark}|\p{Surrogate})+$/v,et=/^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}\p{Surrogate}]+/v,it=/^\p{RGI_Emoji}$/v,rt=/^[\d#*]\u20E3$/,st=/\p{Extended_Pictographic}/gu;function nt(t){if(t.length>50)return!1;if(rt.test(t))return!0;if(t.includes("โ")){const e=t.match(st);return null!==e&&e.length>=2}return!1}function ot(t){return t.replace(et,"")}function at(t){return tt.test(t)}function lt(t){return t>=4352&&t<=4447||t>=43360&&t<=43388}function ft(t){return t>=4448&&t<=4519||t>=55216&&t<=55238}function ht(t){return t>=4520&&t<=4607||t>=55243&&t<=55291}function ct(t){return lt(t)||ft(t)||ht(t)}function ut(t,e){const i=[];for(const e of t)tt.test(e)||i.push(e.codePointAt(0));if(0===i.length)return;let r=0;for(let t=0;t<i.length;t++){const s=i[t];if(!ct(s)){if(0===r)return;for(let s=t;s<i.length;s++)r+=X(i[s],e);return r}lt(s)&&ft(i[t+1])?(r+=2,t+=ht(i[t+2])?2:1):r+=X(s,e)}return r}function mt(t,e){let i=0,r=!0;for(const s of t)r?r=!1:s>="๏ผ"&&s<="๏ฟฏ"&&(i+=X(s.codePointAt(0),e));return i}function dt(t,e={}){if("string"!=typeof t||0===t.length)return 0;const{ambiguousIsNarrow:i=!0,countAnsiEscapeCodes:r=!1}=e;let s=t;if(r||!s.includes("")&&!s.includes("ย")||(s=function(t){if("string"!=typeof t)throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.includes("")||t.includes("ย")?t.replace(N,""):t}(s)),0===s.length)return 0;if(/^[\u0020-\u007E]*$/.test(s))return s.length;let n=0;const o={ambiguousAsWide:!i};for(const{segment:t}of Z.segment(s)){if(at(t))continue;if(it.test(t)||nt(t)){n+=2;continue}const e=ot(t),i=ut(e,o);if(void 0!==i){n+=i;continue}n+=X(e.codePointAt(0),o),n+=mt(e,o)}return n}const _t=new class{#f=0;#h;#c=!1;#u=!1;#m=t=>{if(!t?.length)return;3===("string"==typeof t?t.codePointAt(0):t[0])&&c.kill(c.pid,"SIGINT")};start(){this.#f++,1===this.#f&&this.#d()}stop(){0!==this.#f&&0===--this.#f&&this.#_()}#d(){const{stdin:t}=c;"win32"!==c.platform&&t?.isTTY&&"function"==typeof t.setRawMode?(this.#h=t,this.#c=t.isPaused(),this.#u=Boolean(t.isRaw),t.setRawMode(!0),t.prependListener("data",this.#m),this.#c&&t.resume()):this.#h=void 0}#_(){if(!this.#h)return;const t=this.#h;t.off("data",this.#m),t.isTTY&&t.setRawMode?.(this.#u),this.#c&&t.pause(),this.#h=void 0,this.#c=!1,this.#u=!1}};var pt=Object.freeze(_t);const gt=new Map,vt=new Set(["black","red","green","yellow","blue","magenta","cyan","white","gray"]);class xt{#p=0;#g=-1;#v=0;#x;#y;#b;#w;#T=new Map;#S=!1;#E;#I;#P=!1;#R;#C(t){this.#S=!0;try{return t()}finally{this.#S=!1}}#O(){this.isSpinning&&this.render()}#B(t,e){if(null==t)return"";if("string"==typeof t)return t;if(Buffer.isBuffer(t)||ArrayBuffer.isView(t)){const i="string"==typeof e&&e&&"buffer"!==e?e:"utf8";return Buffer.from(t).toString(i)}return String(t)}#L(t){if(!t)return!1;const e=t.at(-1);return"\n"===e||"\r"===e}#k(){this.#I||(this.#I=setTimeout(()=>{this.#I=void 0,this.isSpinning&&this.#O()},200),"function"==typeof this.#I?.unref&&this.#I.unref())}#W(){this.#I&&(clearTimeout(this.#I),this.#I=void 0)}#A(t,e,i,r){return this.#M(i," ")+t+("string"==typeof e?(t?" ":"")+e:"")+this.#$(r," ")}constructor(t){if("string"==typeof t&&(t={text:t}),this.#x={color:"cyan",stream:c.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#x.color,this.#b=this.#x.stream,"boolean"!=typeof this.#x.isEnabled&&(this.#x.isEnabled=function({stream:t=process.stdout}={}){return Boolean(t&&t.isTTY&&"dumb"!==process.env.TERM&&!("CI"in process.env))}({stream:this.#b})),"boolean"!=typeof this.#x.isSilent&&(this.#x.isSilent=!1),void 0!==this.#x.interval&&!(Number.isInteger(this.#x.interval)&&this.#x.interval>0))throw new Error("The `interval` option must be a positive integer");const e=this.#x.interval;this.spinner=this.#x.spinner,this.#x.interval=e,this.text=this.#x.text,this.prefixText=this.#x.prefixText,this.suffixText=this.#x.suffixText,this.indent=this.#x.indent,"test"===c.env.NODE_ENV&&(this._stream=this.#b,this._isEnabled=this.#x.isEnabled,Object.defineProperty(this,"_linesToClear",{get(){return this.#p},set(t){this.#p=t}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#g}}),Object.defineProperty(this,"_lineCount",{get(){const t=this.#b.columns??80,e="function"==typeof this.#x.prefixText?"":this.#x.prefixText,i="function"==typeof this.#x.suffixText?"":this.#x.suffixText,r="string"==typeof e&&""!==e?e+" ":"",s="string"==typeof i&&""!==i?" "+i:"",n=" ".repeat(this.#x.indent)+r+"-"+("string"==typeof this.#x.text?" "+this.#x.text:"")+s;return this.#j(n,t)}}))}get indent(){return this.#x.indent}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#x.indent=t}get interval(){return this.#x.interval??this.#y.interval??100}get spinner(){return this.#y}set spinner(t){if(this.#g=-1,this.#x.interval=void 0,"object"==typeof t){if(!Array.isArray(t.frames)||0===t.frames.length||t.frames.some(t=>"string"!=typeof t))throw new Error("The given spinner must have a non-empty `frames` array of strings");if(void 0!==t.interval&&!(Number.isInteger(t.interval)&&t.interval>0))throw new Error("`spinner.interval` must be a positive integer if provided");this.#y=t}else if(function(){const{env:t}=c,{TERM:e,TERM_PROGRAM:i}=t;return"win32"!==c.platform?"linux"!==e:Boolean(t.WT_SESSION)||Boolean(t.TERMINUS_SUBLIME)||"{cmd::Cmder}"===t.ConEmuTask||"Terminus-Sublime"===i||"vscode"===i||"xterm-256color"===e||"alacritty"===e||"rxvt-unicode"===e||"rxvt-unicode-256color"===e||"JetBrains-JediTerm"===t.TERMINAL_EMULATOR}())if(void 0===t)this.#y=z.dots;else{if("default"===t||!z[t])throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`);this.#y=z[t]}else this.#y=z.line}get text(){return this.#x.text}set text(t=""){this.#x.text=t}get prefixText(){return this.#x.prefixText}set prefixText(t=""){this.#x.prefixText=t}get suffixText(){return this.#x.suffixText}set suffixText(t=""){this.#x.suffixText=t}get isSpinning(){return void 0!==this.#w}#F(t,e,i=!1){const r="function"==typeof t?t():t;return"string"==typeof r&&""!==r?i?e+r:r+e:""}#M(t=this.#x.prefixText,e=" "){return this.#F(t,e,!1)}#$(t=this.#x.suffixText,e=" "){return this.#F(t,e,!0)}#j(t,e){let i=0;for(const r of u(t).split("\n"))i+=Math.max(1,Math.ceil(dt(r)/e));return i}get color(){return this.#R}set color(t){if(void 0!==t&&!1!==t&&!vt.has(t))throw new Error("The `color` option must be a valid color or `false` to disable");this.#R=t}get isEnabled(){return this.#x.isEnabled&&!this.#x.isSilent}set isEnabled(t){if("boolean"!=typeof t)throw new TypeError("The `isEnabled` option must be a boolean");this.#x.isEnabled=t}get isSilent(){return this.#x.isSilent}set isSilent(t){if("boolean"!=typeof t)throw new TypeError("The `isSilent` option must be a boolean");this.#x.isSilent=t}frame(){const t=Date.now();(-1===this.#g||t-this.#v>=this.interval)&&(this.#g=(this.#g+1)%this.#y.frames.length,this.#v=t);const{frames:e}=this.#y;let i=e[this.#g];this.#R&&(i=s[this.#R](i));return this.#M(this.#x.prefixText," ")+i+("string"==typeof this.text?" "+this.text:"")+this.#$(this.#x.suffixText," ")}clear(){return this.isEnabled&&this.#b.isTTY?(this.#C(()=>{this.#b.cursorTo(0);for(let t=0;t<this.#p;t++)t>0&&this.#b.moveCursor(0,-1),this.#b.clearLine(1);this.#x.indent&&this.#b.cursorTo(this.#x.indent)}),this.#p=0,this):this}#G(t){if(!t||this.#T.has(t)||!t.isTTY||"function"!=typeof t.write)return;gt.has(t)&&console.warn("[ora] Multiple concurrent spinners detected. This may cause visual corruption. Use one spinner at a time.");const e=t.write;this.#T.set(t,e),gt.set(t,this),t.write=(i,r,s)=>this.#D(t,e,i,r,s)}#H(){if(!this.isEnabled||this.#T.size>0)return;const t=new Set([this.#b,c.stdout,c.stderr]);for(const e of t)this.#G(e)}#z(){for(const[t,e]of this.#T)t.write=e,gt.get(t)===this&>.delete(t);this.#T.clear()}#D(t,e,i,r,s){if("function"==typeof r&&(s=r,r=void 0),this.#S)return e.call(t,i,r,s);this.clear();const n=this.#B(i,r),o=this.#L(n),a=e.call(t,i,r,s);return o?this.#W():n.length>0&&this.#k(),this.isSpinning&&!this.#I&&this.render(),a}render(){if(!this.isEnabled||this.#E||this.#I)return this;const t=this.#b.isTTY;let e=!1;try{t&&(this.#C(()=>this.#b.write("[?2026h")),e=!0),this.clear();let i=this.frame();const r=this.#b.columns??80,s=this.#j(i,r),n=this.#b.rows;if(n&&n>1&&s>n){const t=i.split("\n"),e=n-1;i=[...t.slice(0,e),"... (content truncated to fit terminal)"].join("\n")}!1===this.#C(()=>this.#b.write(i))&&this.#b.isTTY&&(this.#E=()=>{this.#E=void 0,this.#O()},this.#b.once("drain",this.#E)),this.#p=this.#j(i,r)}finally{e&&this.#C(()=>this.#b.write("[?2026l"))}return this}start(t){if(t&&(this.text=t),this.isSilent)return this;if(!this.isEnabled){const t=this.text?"-":"",e=" ".repeat(this.#x.indent)+this.#A(t,this.text,this.#x.prefixText,this.#x.suffixText);return""!==e.trim()&&this.#C(()=>this.#b.write(e+"\n")),this}return this.isSpinning||(this.#x.hideCursor&&H.hide(this.#b),this.#x.discardStdin&&c.stdin.isTTY&&(pt.start(),this.#P=!0),this.#H(),this.render(),this.#w=setInterval(this.render.bind(this),this.interval)),this}stop(){return clearInterval(this.#w),this.#w=void 0,this.#g=-1,this.#v=0,this.#W(),this.#z(),this.#E&&(this.#b.removeListener("drain",this.#E),this.#E=void 0),this.isEnabled&&(this.clear(),this.#x.hideCursor&&H.show(this.#b)),this.#P&&(this.#P=!1,pt.stop()),this}succeed(t){return this.stopAndPersist({symbol:"โ
",text:t})}fail(t){return this.stopAndPersist({symbol:"โ๏ธ",text:t})}warn(t){return this.stopAndPersist({symbol:"โ ๏ธ",text:t})}info(t){return this.stopAndPersist({symbol:"โน๏ธ",text:t})}stopAndPersist(t={}){if(this.isSilent)return this;const e=t.symbol??" ",i=t.text??this.text,r=t.prefixText??this.#x.prefixText,s=t.suffixText??this.#x.suffixText,n=this.#A(e,i,r,s)+"\n";return this.stop(),this.#C(()=>this.#b.write(n)),this}}const yt=(bt={text:"yezz-cli ๆญฃๅจๆดๆฐไธญ...",spinner:{interval:300,frames:["โ ","โ ","โ น","โ ธ","โ ผ","โ ด","โ ฆ","โ ง","โ ","โ "].map(t=>s.blue(t))}},new xt(bt));var bt;const wt=new t("yezz");wt.version(m,"-v, --version"),wt.command("update").description("ๆดๆฐ dawei ่ณๆๆฐ็ๆฌ").action(async()=>{await async function(){yt.start(),h.exec("npm update yezz-cli -g",t=>{yt.stop(),t?(console.error(s.red("ๆดๆฐๅคฑ่ดฅ๏ผ่ฏท็จๅ้่ฏ")),yt.fail("ๆดๆฐๅคฑ่ดฅ๏ผ่ฏท็จๅ้่ฏ")):yt.succeed("ๆดๆฐๆๅ๏ผ")})}()}),wt.command("create").description("create a new project").argument("[name]","้กน็ฎๅ็งฐ").action(async t=>{await y(t)}),wt.parse();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yezz-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "yezz-cli is a command line tool for scaffolding projects.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -23,21 +23,27 @@
|
|
|
23
23
|
"author": "yzz",
|
|
24
24
|
"license": "ISC",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@inquirer/prompts": "^8.5.0",
|
|
27
26
|
"@rollup/plugin-commonjs": "^29.0.2",
|
|
28
27
|
"@rollup/plugin-json": "^6.1.0",
|
|
29
28
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
30
29
|
"@rollup/plugin-terser": "^1.0.0",
|
|
31
30
|
"@types/fs-extra": "^11.0.4",
|
|
31
|
+
"@types/lodash": "^4.17.24",
|
|
32
32
|
"@types/node": "^25.9.1",
|
|
33
|
-
"
|
|
34
|
-
"commander": "^14.0.3",
|
|
35
|
-
"fs-extra": "^11.3.5",
|
|
36
|
-
"progress-estimator": "^0.3.1",
|
|
33
|
+
"ora": "^9.4.0",
|
|
37
34
|
"rollup": "^4.60.4",
|
|
38
35
|
"rollup-plugin-node-externals": "^9.0.1",
|
|
39
36
|
"rollup-plugin-typescript2": "^0.37.0",
|
|
40
|
-
"simple-git": "^3.36.0",
|
|
41
37
|
"typescript": "^6.0.3"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@inquirer/prompts": "^8.5.1",
|
|
41
|
+
"axios": "^1.16.1",
|
|
42
|
+
"chalk": "^5.6.2",
|
|
43
|
+
"commander": "^14.0.3",
|
|
44
|
+
"fs-extra": "^11.3.5",
|
|
45
|
+
"lodash": "^4.18.1",
|
|
46
|
+
"progress-estimator": "^0.3.1",
|
|
47
|
+
"simple-git": "^3.36.0"
|
|
42
48
|
}
|
|
43
49
|
}
|