codenest-cli 0.0.1
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 +51 -0
- package/bin/index.js +2 -0
- package/dist/index.js +1 -0
- package/package.json +37 -0
package/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# codenest-cli
|
|
2
|
+

|
|
3
|
+
|
|
4
|
+
## 📖简介
|
|
5
|
+
|
|
6
|
+
`codenest-cli` 是一个用于快速创建前端项目的脚手架工具。
|
|
7
|
+
|
|
8
|
+
## 📙模板
|
|
9
|
+
- ✅快速生成一个基于 [elpis](https://www.npmjs.com/package/@wshiqyuan/elpis) 框架的[项目模板](https://github.com/wshiqyuan/elpis-demo)
|
|
10
|
+
|
|
11
|
+
## 📦安装
|
|
12
|
+
|
|
13
|
+
确保你已经安装了 [Node.js](https://nodejs.org/)(建议使用 LTS 版本),然后全局安装本工具:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g codenest-cli
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
或者使用 `npx` 直接运行而无需安装:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx codenest-cli create my-project
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## 📒使用方法
|
|
26
|
+
|
|
27
|
+
查看脚手架版本:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
codenest-cli --version
|
|
31
|
+
```
|
|
32
|
+
or
|
|
33
|
+
```bash
|
|
34
|
+
codenest-cli -v
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
在终端中执行以下命令来创建新项目:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
codenest-cli create <project-name>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
按照提示输入项目名称并选择合适的模板即可自动生成项目结构。
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
### 📑示例
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# 创建名为 my-app 的新项目
|
|
50
|
+
codenest-cli create my-app
|
|
51
|
+
```
|
package/bin/index.js
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("node:events"),t=require("node:child_process"),n=require("node:path"),r=require("node:fs"),s=require("node:process"),i=require("node:buffer"),o=require("node:tty"),u=require("node:util"),a=require("node:os"),l=require("node:readline"),c=require("node:async_hooks"),h=require("node:stream");function D(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var p=D(l);function d(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var f,m,g={},F={},C={};function b(){if(f)return C;f=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 C.CommanderError=e,C.InvalidArgumentError=class extends e{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}},C}function E(){if(m)return F;m=1;const{InvalidArgumentError:e}=b();return F.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}},F.humanReadableArgName=function(e){const t=e.name()+(!0===e.variadic?"...":"");return e.required?"<"+t+">":"["+t+"]"},F}var y,w={},v={};function _(){if(y)return v;y=1;const{humanReadableArgName:e}=E();function t(e){return e.replace(/\x1b\[\d*(;\d*)*m/g,"")}return v.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 u=t.visibleArguments(e).map(e=>s(t.styleArgumentTerm(t.argumentTerm(e)),t.styleArgumentDescription(t.argumentDescription(e))));i=i.concat(this.formatItemList("Arguments:",u,t));const a=this.groupItems(e.options,t.visibleOptions(e),e=>e.helpGroupHeading??"Options:");if(a.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 u;if(o<this.minWidthToWrap||r.preformatted(n))u=n;else{u=r.boxWrap(n,o).replace(/\n/g,"\n"+" ".repeat(t+2))}return s+i+" ".repeat(2)+u.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")}},v.stripColor=t,v}var O,B={};function k(){if(O)return B;O=1;const{InvalidArgumentError:e}=b();function t(e){return e.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}return B.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}},B.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)}},B}var A,x,T,S={};function R(){if(A)return S;A=1;return S.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]}?)`:""},S}var $=function(){if(T)return g;T=1;const{Argument:i}=E(),{Command:o}=function(){if(x)return w;x=1;const i=e.EventEmitter,o=t,u=n,a=r,l=s,{Argument:c,humanReadableArgName:h}=E(),{CommanderError:D}=b(),{Help:p,stripColor:d}=_(),{Option:f,DualOptions:m}=k(),{suggestSimilar:g}=R();class F extends i{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:()=>y()??(l.stdout.isTTY&&l.stdout.hasColors?.()),getErrHasColors:()=>y()??(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(/([^ ]+) *(.*)/),u=this.createCommand(i);return r&&(u.description(r),u._executableHandler=!0),s.isDefault&&(this._defaultCommandName=u._name),u._hidden=!(!s.noHelp&&!s.hidden),u._executableFile=s.executableFile||null,o&&u.arguments(o),this._registerCommand(u),u.parent=this,u.copyInheritedSettings(this),r?this:u}createCommand(e){return new F(e)}createHelp(){return Object.assign(new p,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 c(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 D(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 f(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 f)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(!a.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 r=[".js",".ts",".tsx",".mjs",".cjs"];function s(e,t){const n=u.resolve(e,t);if(a.existsSync(n))return n;if(r.includes(u.extname(t)))return;const s=r.find(e=>a.existsSync(`${n}${e}`));return s?`${n}${s}`:void 0}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i,c=e._executableFile||`${this._name}-${e._name}`,h=this._executableDir||"";if(this._scriptPath){let e;try{e=a.realpathSync(this._scriptPath)}catch{e=this._scriptPath}h=u.resolve(u.dirname(e),h)}if(h){let t=s(h,c);if(!t&&!e._executableFile&&this._scriptPath){const n=u.basename(this._scriptPath,u.extname(this._scriptPath));n!==this._name&&(t=s(h,`${n}-${e._name}`))}c=t||c}n=r.includes(u.extname(c)),"win32"!==l.platform?n?(t.unshift(c),t=C(l.execArgv).concat(t),i=o.spawn(l.argv[0],t,{stdio:"inherit"})):i=o.spawn(c,t,{stdio:"inherit"}):(this._checkForMissingExecutable(c,h,e._name),t.unshift(c),t=C(l.execArgv).concat(t),i=o.spawn(l.execPath,t,{stdio:"inherit"})),i.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(e=>{l.on(e,()=>{!1===i.killed&&null===i.exitCode&&i.kill(e)})});const p=this._exitCallback;i.on("close",e=>{e=e??1,p?p(new D(e,"commander.executeSubCommandAsync","(close)")):l.exit(e)}),i.on("error",t=>{if("ENOENT"===t.code)this._checkForMissingExecutable(c,h,e._name);else if("EACCES"===t.code)throw new Error(`'${c}' not executable`);if(p){const e=new D(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t,p(e)}else l.exit(1)}),this.runningCommand=i}_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,u=null,a=0;for(;a<e.length||u;){const l=u??e[a++];if(u=null,"--"===l){r===n&&r.push(l),r.push(...e.slice(a));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[a++];void 0===n&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,n)}else if(t.optional){let n=null;a<e.length&&(!s(e[a])||i(e[a]))&&(n=e[a++]),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()}`),u=`-${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(a));break}if(this._getHelpCommand()&&l===this._getHelpCommand().name()){t.push(l,...e.slice(a));break}if(this._defaultCommandName){n.push(l,...e.slice(a));break}}if(this._passThroughOptions){r.push(l,...e.slice(a));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 m(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=g(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=g(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=u.basename(e,u.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 C(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 y(){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 w.Command=F,w.useColor=y,w}(),{CommanderError:u,InvalidArgumentError:a}=b(),{Help:l}=_(),{Option:c}=k();return g.program=new o,g.createCommand=e=>new o(e),g.createOption=(e,t)=>new c(e,t),g.createArgument=(e,t)=>new i(e,t),g.Command=o,g.Option=c,g.Argument=i,g.Help=l,g.CommanderError=u,g.InvalidArgumentError=a,g.InvalidOptionArgumentError=a,g}(),M=d($);const{program:j,createCommand:L,createArgument:P,createOption:I,CommanderError:U,InvalidArgumentError:N,InvalidOptionArgumentError:H,Command:G,Argument:V,Option:q,Help:W}=M;const z=(e,t=[])=>"up"===e.name||t.includes("vim")&&"k"===e.name||t.includes("emacs")&&e.ctrl&&"p"===e.name,Y=(e,t=[])=>"down"===e.name||t.includes("vim")&&"j"===e.name||t.includes("emacs")&&e.ctrl&&"n"===e.name,K=e=>"backspace"===e.name,J=e=>"enter"===e.name||"return"===e.name;class Q extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(e){super(),this.cause=e?.cause}}class X extends Error{name="CancelPromptError";message="Prompt was canceled"}class Z extends Error{name="ExitPromptError"}class ee extends Error{name="HookError"}class te extends Error{name="ValidationError"}const ne=new c.AsyncLocalStorage;function re(){const e=ne.getStore();if(!e)throw new ee("[Inquirer] Hook functions can only be called from within a prompt");return e}function se(){return re().rl}function ie(e){return c.AsyncResource.bind((...t)=>{const n=re();let r=!1;const s=n.handleChange;n.handleChange=()=>{r=!0};const i=e(...t);return r&&s(),n.handleChange=s,i})}function oe(e){const t=re(),{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 ue={queue(e){const t=re(),{index:n}=t;t.hooksEffect.push(()=>{t.hooksCleanup[n]?.();const r=e(se());if(null!=r&&"function"!=typeof r)throw new te("useEffect return value must be a cleanup function or nothing.");t.hooksCleanup[n]=r})},run(){const e=re();ie(()=>{e.hooksEffect.forEach(e=>{e()}),e.hooksEffect.length=0})()},clearAll(){const e=re();e.hooksCleanup.forEach(e=>{e?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}};function ae(e){return oe(t=>{const n=c.AsyncResource.bind(function(e){t.get()!==e&&(t.set(e),re().handleChange())});if(t.initialized)return[t.get(),n];const r="function"==typeof e?e():e;return t.set(r),[r,n]})}function le(e,t){oe(n=>{const r=n.get();(!Array.isArray(r)||t.some((e,t)=>!Object.is(e,r[t])))&&ue.queue(e),n.set(t)})}const ce={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:"╱"},he={...ce,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:"⅒"},De={...ce,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"},pe=("win32"!==s.platform?"linux"!==s.env.TERM:Boolean(s.env.WT_SESSION)||Boolean(s.env.TERMINUS_SUBLIME)||"{cmd::Cmder}"===s.env.ConEmuTask||"Terminus-Sublime"===s.env.TERM_PROGRAM||"vscode"===s.env.TERM_PROGRAM||"xterm-256color"===s.env.TERM||"alacritty"===s.env.TERM||"JetBrains-JediTerm"===s.env.TERMINAL_EMULATOR)?he:De,de={prefix:{idle:u.styleText("blue","?"),done:u.styleText("green",pe.tick)},spinner:{interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"].map(e=>u.styleText("yellow",e))},style:{answer:e=>u.styleText("cyan",e),message:e=>u.styleText("bold",e),error:e=>u.styleText("red",`> ${e}`),defaultAnswer:e=>u.styleText("dim",`(${e})`),help:e=>u.styleText("dim",e),highlight:e=>u.styleText("cyan",e),key:e=>u.styleText("cyan",u.styleText("bold",`<${e}>`))}};function fe(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 me(...e){const t={};for(const n of e)for(const[e,r]of Object.entries(n)){const n=t[e];t[e]=fe(n)&&fe(r)?me(n,r):r}return t}function ge(...e){return me(...[de,...e.filter(e=>null!=e)])}function Fe({status:e="idle",theme:t}){const[n,r]=ae(!1),[s,i]=ae(0),{prefix:o,spinner:u}=ge(t);if(le(()=>{if("loading"===e){let e,t=-1;const n=setTimeout(()=>{r(!0),e=setInterval(()=>{t+=1,i(t%u.frames.length)},u.interval)},300);return()=>{clearTimeout(n),clearInterval(e)}}r(!1)},[e]),n)return u.frames[s];return"string"==typeof o?o:o["loading"===e?"idle":e]??o.idle}function Ce(e,t){return oe(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 be(e){return ae({current:e})[0]}function Ee(e){const t=be(e);t.current=e,le(e=>{let n=!1;const r=ie((r,s)=>{n||t.current(s,e)});return e.input.on("keypress",r),()=>{n=!0,e.input.removeListener("keypress",r)}},[])}var ye,we;var ve=d(we?ye:(we=1,ye=function(e){const t=function(e){const t={defaultWidth:0,output:process.stdout,tty:o};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 _e=function({onlyFirst:e=!1}={}){return new RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]",e?void 0:"g")}();function Oe(e){if("string"!=typeof e)throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(_e,"")}function Be(e,{ambiguousAsWide:t=!1}={}){return function(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}(e),12288===(n=e)||n>=65281&&n<=65376||n>=65504&&n<=65510||function(e){return e>=4352&&e<=4447||8986===e||8987===e||9001===e||9002===e||e>=9193&&e<=9196||9200===e||9203===e||9725===e||9726===e||9748===e||9749===e||e>=9776&&e<=9783||e>=9800&&e<=9811||9855===e||e>=9866&&e<=9871||9875===e||9889===e||9898===e||9899===e||9917===e||9918===e||9924===e||9925===e||9934===e||9940===e||9962===e||9970===e||9971===e||9973===e||9978===e||9981===e||9989===e||9994===e||9995===e||10024===e||10060===e||10062===e||e>=10067&&e<=10069||10071===e||e>=10133&&e<=10135||10160===e||10175===e||11035===e||11036===e||11088===e||11093===e||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||110589===e||110590===e||e>=110592&&e<=110882||110898===e||e>=110928&&e<=110930||110933===e||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||126980===e||127183===e||127374===e||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||127568===e||127569===e||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||127988===e||e>=127992&&e<=128062||128064===e||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||128378===e||128405===e||128406===e||128420===e||e>=128507&&e<=128591||e>=128640&&e<=128709||128716===e||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||128747===e||128748===e||e>=128756&&e<=128764||e>=128992&&e<=129003||129008===e||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||129736===e||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}(e)||t&&function(e){return 161===e||164===e||167===e||168===e||170===e||173===e||174===e||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||198===e||208===e||215===e||216===e||e>=222&&e<=225||230===e||e>=232&&e<=234||236===e||237===e||240===e||242===e||243===e||e>=247&&e<=250||252===e||254===e||257===e||273===e||275===e||283===e||294===e||295===e||299===e||e>=305&&e<=307||312===e||e>=319&&e<=322||324===e||e>=328&&e<=331||333===e||338===e||339===e||358===e||359===e||363===e||462===e||464===e||466===e||468===e||470===e||472===e||474===e||476===e||593===e||609===e||708===e||711===e||e>=713&&e<=715||717===e||720===e||e>=728&&e<=731||733===e||735===e||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||1025===e||e>=1040&&e<=1103||1105===e||8208===e||e>=8211&&e<=8214||8216===e||8217===e||8220===e||8221===e||e>=8224&&e<=8226||e>=8228&&e<=8231||8240===e||8242===e||8243===e||8245===e||8251===e||8254===e||8308===e||8319===e||e>=8321&&e<=8324||8364===e||8451===e||8453===e||8457===e||8467===e||8470===e||8481===e||8482===e||8486===e||8491===e||8531===e||8532===e||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||8585===e||e>=8592&&e<=8601||8632===e||8633===e||8658===e||8660===e||8679===e||8704===e||8706===e||8707===e||8711===e||8712===e||8715===e||8719===e||8721===e||8725===e||8730===e||e>=8733&&e<=8736||8739===e||8741===e||e>=8743&&e<=8748||8750===e||e>=8756&&e<=8759||8764===e||8765===e||8776===e||8780===e||8786===e||8800===e||8801===e||e>=8804&&e<=8807||8810===e||8811===e||8814===e||8815===e||8834===e||8835===e||8838===e||8839===e||8853===e||8857===e||8869===e||8895===e||8978===e||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||9632===e||9633===e||e>=9635&&e<=9641||9650===e||9651===e||9654===e||9655===e||9660===e||9661===e||9664===e||9665===e||e>=9670&&e<=9672||9675===e||e>=9678&&e<=9681||e>=9698&&e<=9701||9711===e||9733===e||9734===e||9737===e||9742===e||9743===e||9756===e||9758===e||9792===e||9794===e||9824===e||9825===e||e>=9827&&e<=9829||e>=9831&&e<=9834||9836===e||9837===e||9839===e||9886===e||9887===e||9919===e||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||9955===e||9960===e||9961===e||e>=9963&&e<=9969||9972===e||e>=9974&&e<=9977||9979===e||9980===e||9982===e||9983===e||10045===e||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||65533===e||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||127375===e||127376===e||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}(e)?2:1;var n}var ke=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;const Ae=new Intl.Segmenter,xe=/^\p{Default_Ignorable_Code_Point}$/u;function Te(e,t={}){if("string"!=typeof e||0===e.length)return 0;const{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t;if(r||(e=Oe(e)),0===e.length)return 0;let s=0;const i={ambiguousAsWide:!n};for(const{segment:t}of Ae.segment(e)){const e=t.codePointAt(0);e<=31||e>=127&&e<=159||(e>=8203&&e<=8207||65279===e||e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071||e>=55296&&e<=57343||e>=65024&&e<=65039||xe.test(t)||(ke().test(t)?s+=2:s+=Be(e,i)))}return s}const Se=(e=0)=>t=>`[${t+e}m`,Re=(e=0)=>t=>`[${38+e};5;${t}m`,$e=(e=0)=>(t,n,r)=>`[${38+e};2;${t};${n};${r}m`,Me={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(Me.modifier);Object.keys(Me.color),Object.keys(Me.bgColor);const je=function(){const e=new Map;for(const[t,n]of Object.entries(Me)){for(const[t,r]of Object.entries(n))Me[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=Me[t],e.set(r[0],r[1]);Object.defineProperty(Me,t,{value:n,enumerable:!1})}return Object.defineProperty(Me,"codes",{value:e,enumerable:!1}),Me.color.close="[39m",Me.bgColor.close="[49m",Me.color.ansi=Se(),Me.color.ansi256=Re(),Me.color.ansi16m=$e(),Me.bgColor.ansi=Se(10),Me.bgColor.ansi256=Re(10),Me.bgColor.ansi16m=$e(10),Object.defineProperties(Me,{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=>Me.rgbToAnsi256(...Me.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)=>Me.ansi256ToAnsi(Me.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>Me.ansi256ToAnsi(Me.hexToAnsi256(e)),enumerable:!1}}),Me}(),Le=new Set(["",""]),Pe="]8;;",Ie=e=>`${Le.values().next().value}[${e}m`,Ue=e=>`${Le.values().next().value}${Pe}${e}`,Ne=(e,t,n)=>{const r=[...t];let s=!1,i=!1,o=Te(Oe(e.at(-1)));for(const[t,u]of r.entries()){const a=Te(u);if(o+a<=n?e[e.length-1]+=u:(e.push(u),o=0),Le.has(u)){s=!0;i=r.slice(t+1,t+1+4).join("")===Pe}s?i?""===u&&(s=!1,i=!1):"m"===u&&(s=!1):(o+=a,o===n&&t<r.length-1&&(e.push(""),o=0))}!o&&e.at(-1).length>0&&e.length>1&&(e[e.length-2]+=e.pop())},He=(e,t,n={})=>{if(!1!==n.trim&&""===e.trim())return"";let r,s,i="";const o=(e=>e.split(" ").map(e=>Te(e)))(e);let u=[""];for(const[r,s]of e.split(" ").entries()){!1!==n.trim&&(u[u.length-1]=u.at(-1).trimStart());let e=Te(u.at(-1));if(0!==r&&(e>=t&&(!1===n.wordWrap||!1===n.trim)&&(u.push(""),e=0),(e>0||!1===n.trim)&&(u[u.length-1]+=" ",e++)),n.hard&&o[r]>t){const n=t-e,i=1+Math.floor((o[r]-n-1)/t);Math.floor((o[r]-1)/t)<i&&u.push(""),Ne(u,s,t);continue}if(e+o[r]>t&&e>0&&o[r]>0){if(!1===n.wordWrap&&e<t){Ne(u,s,t);continue}u.push("")}e+o[r]>t&&!1===n.wordWrap?Ne(u,s,t):u[u.length-1]+=s}!1!==n.trim&&(u=u.map(e=>(e=>{const t=e.split(" ");let n=t.length;for(;n>0&&!(Te(t[n-1])>0);)n--;return n===t.length?e:t.slice(0,n).join(" ")+t.slice(n).join("")})(e)));const a=u.join("\n"),l=[...a];let c=0;for(const[e,t]of l.entries()){if(i+=t,Le.has(t)){const{groups:e}=new RegExp(`(?:\\[(?<code>\\d+)m|\\${Pe}(?<uri>.*))`).exec(a.slice(c))||{groups:{}};if(void 0!==e.code){const t=Number.parseFloat(e.code);r=39===t?void 0:t}else void 0!==e.uri&&(s=0===e.uri.length?void 0:e.uri)}const n=je.codes.get(Number(r));"\n"===l[e+1]?(s&&(i+=Ue("")),r&&n&&(i+=Ie(n))):"\n"===t&&(r&&n&&(i+=Ie(r)),s&&(i+=Ue(s))),c+=t.length}return i};function Ge(e,t){return e.split("\n").flatMap(e=>{return(n=e,r=t,s={trim:!1,hard:!0},String(n).normalize().replaceAll("\r\n","\n").split("\n").map(e=>He(e,r,s)).join("\n")).split("\n").map(e=>e.trimEnd());var n,r,s}).join("\n")}function Ve(){return ve({defaultWidth:80,output:se().output})}function qe({items:e,active:t,renderItem:n,pageSize:r,loop:s=!0}){const i=Ve(),o=t=>(t%e.length+e.length)%e.length,u=e.map((e,r)=>null==e?[]:Ge(n({item:e,index:r,isActive:r===t}),i).split("\n")),a=u.reduce((e,t)=>e+t.length,0),l=e=>u[e]??[],c=function({active:e,renderedItems:t,pageSize:n,loop:r}){const s=be({lastPointer:e,lastActive:void 0}),{lastPointer:i,lastActive:o}=s.current,u=Math.floor(n/2),a=t.reduce((e,t)=>e+t.length,0),l=t.slice(0,e).reduce((e,t)=>e+t.length,0);let c=l;if(a>n)if(r)c=i,null!=o&&o<e&&e-o<n&&(c=Math.min(u,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);c=r<n-u?n-r:Math.min(l,u)}return s.current.lastPointer=c,s.current.lastActive=e,c}({active:t,renderedItems:u,pageSize:r,loop:s}),h=l(t).slice(0,r),D=c+h.length<=r?c:r-h.length,p=Array.from({length:r});p.splice(D,h.length,...h);const d=new Set([t]);let f=D+h.length,m=o(t+1);for(;f<r&&!d.has(m)&&(s&&a>r?m!==t:m>t);){const e=l(m).slice(0,r-f);p.splice(f,e.length,...e),d.add(m),f+=e.length,m=o(m+1)}for(f=D-1,m=o(t-1);f>=0&&!d.has(m)&&(s&&a>r?m!==t:m<t);){const e=l(m),t=e.slice(Math.max(0,e.length-f-1));p.splice(f-t.length+1,t.length,...t),d.add(m),f-=t.length,m=o(m-1)}return p.filter(e=>"string"==typeof e).join("\n")}var We,ze;var Ye=function(){if(ze)return We;ze=1;const e=h;return We=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)}},We}(),Ke=d(Ye);const Je=[];Je.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Je.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Je.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Qe=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,Xe=Symbol.for("signal-exit emitter"),Ze=globalThis,et=Object.defineProperty.bind(Object);class tt{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Ze[Xe])return Ze[Xe];et(Ze,Xe,{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 nt{}const rt=globalThis.process,{onExit:st}=(it=Qe(rt)?new class extends nt{#r="win32"===rt.platform?"SIGINT":"SIGHUP";#s=new tt;#i;#o;#u;#a={};#l=!1;constructor(e){super(),this.#i=e,this.#a={};for(const t of Je)this.#a[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.#u=e.reallyExit,this.#o=e.emit}onExit(e,t){if(!Qe(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 Je)try{const t=this.#a[e];t&&this.#i.on(e,t)}catch(e){}this.#i.emit=(e,...t)=>this.#c(e,...t),this.#i.reallyExit=e=>this.#h(e)}}unload(){this.#l&&(this.#l=!1,Je.forEach(e=>{const t=this.#a[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.#u,this.#s.count-=1)}#h(e){return Qe(this.#i)?(this.#i.exitCode=e||0,this.#s.emit("exit",this.#i.exitCode,null),this.#u.call(this.#i,this.#i.exitCode)):0}#c(e,...t){const n=this.#o;if("exit"===e&&Qe(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)}}(rt):new class extends nt{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>it.onExit(e,t),load:()=>it.load(),unload:()=>it.unload()});var it;const ot="[",ut=(e=1)=>e>0?`${ot}${e}A`:"",at=(e=1)=>e>0?`${ot}${e}B`:"",lt=(e,t)=>`${ot}${e+1}G`,ct="[2K",ht=e=>e>0?(ct+ut(1)).repeat(e-1)+ct+"[G":"",Dt=e=>e.split("\n").length;class pt{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=u.stripVTControlCharacters(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=Ve();e=Ge(e,i),t=Ge(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?Dt(t):0);a>0&&(o+=ut(a)),o+=lt(this.cursorPos.cols),this.write(at(this.extraLinesUnderPrompt)+ht(this.height)+o),this.extraLinesUnderPrompt=a,this.height=Dt(o)}checkCursorPos(){const e=this.rl.getCursorPos();e.cols!==this.cursorPos.cols&&(this.write(lt(e.cols)),this.cursorPos=e)}done({clearContent:e}){this.rl.setPrompt("");let t=at(this.extraLinesUnderPrompt);t+=e?ht(this.height):"\n",t+="[?25h",this.write(t),this.rl.close()}}class dt extends Promise{static withResolver(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}}function ft(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:s=process.stdin,signal:i}=r,o=new Set,u=new Ke;u.pipe(r.output??process.stdout);const a=p.createInterface({terminal:!0,input:s,output:u}),l=new pt(a),{promise:h,resolve:D,reject:d}=dt.withResolver(),f=()=>d(new X);if(i){const e=()=>d(new Q({cause:i.reason}));if(i.aborted)return e(),Object.assign(h,{cancel:f});i.addEventListener("abort",e),o.add(()=>i.removeEventListener("abort",e))}o.add(st((e,t)=>{d(new Z(`User force closed the prompt with ${e} ${t}`))}));const m=()=>d(new Z("User force closed the prompt with SIGINT"));a.on("SIGINT",m),o.add(()=>a.removeListener("SIGINT",m));const g=()=>l.checkCursorPos();return a.input.on("keypress",g),o.add(()=>a.input.removeListener("keypress",g)),function(e,t){const n=function(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}(e);return ne.run(n,()=>t(function(e){n.handleChange=()=>{n.index=0,e()},n.handleChange()}))}(a,s=>{const i=c.AsyncResource.bind(()=>ue.clearAll());return a.on("close",i),o.add(()=>a.removeListener("close",i)),s(()=>{try{const r=e(n,e=>{setImmediate(()=>D(e))});if(void 0===r){const e=t[1]?.getFileName();throw new Error(`Prompt functions must return a string.\n at ${e}`)}const[s,i]="string"==typeof r?[r]:r;l.render(s,i),ue.run()}catch(e){d(e)}}),Object.assign(h.then(e=>(ue.clearAll(),e),e=>{throw ue.clearAll(),e}).finally(()=>{o.forEach(e=>e()),l.done({clearContent:Boolean(r.clearPromptOnDone)}),u.end()}).then(()=>h),{cancel:f})})}}class mt{separator=u.styleText("dim",Array.from({length:15}).join(pe.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 gt={validationFailureMode:"keep"};var Ft=ft((e,t)=>{const{prefill:n="tab"}=e,r=ge(gt,e.theme),[s,i]=ae("idle"),[o="",u]=ae(e.default),[a,l]=ae(),[c,h]=ae(""),D=Fe({status:s,theme:r});Ee(async(n,a)=>{if("idle"===s)if(J(n)){const n=c||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(""):a.write(c),l(s),i("idle"))}else K(n)&&!c?u(void 0):(e=>"tab"===e.name)(n)&&!c?(u(void 0),a.clearLine(0),a.write(o),h(o)):(h(a.line),l(void 0))}),le(e=>{"editable"===n&&o&&(e.write(o),h(o))},[]);const p=r.style.message(e.message,s);let d,f=c;"function"==typeof e.transformer?f=e.transformer(c,{isFinal:"done"===s}):"done"===s&&(f=r.style.answer(c)),o&&"done"!==s&&!c&&(d=r.style.defaultAnswer(o));let m="";return a&&(m=r.style.error(a)),[[D,p,d,f].filter(e=>void 0!==e).join(" "),m]});const Ct={icon:{cursor:pe.pointer},style:{disabled:e=>u.styleText("dim",`- ${e}`),description:e=>u.styleText("cyan",e),keysHelpTip:e=>e.map(([e,t])=>`${u.styleText("bold",e)} ${u.styleText("dim",t)}`).join(u.styleText("dim"," • "))},indexMode:"hidden",keybindings:[]};function bt(e){return!mt.isSeparator(e)&&!e.disabled}var Et=ft((e,t)=>{const{loop:n=!0,pageSize:r=7}=e,s=ge(Ct,e.theme),{keybindings:i}=s,[o,u]=ae("idle"),a=Fe({status:o,theme:s}),l=be(),c=!i.includes("vim"),h=Ce(()=>e.choices.map(e=>{if(mt.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]),D=Ce(()=>{const e=h.findIndex(bt),t=h.findLastIndex(bt);if(-1===e)throw new te("[select prompt] No selectable choices. All choices are disabled.");return{first:e,last:t}},[h]),p=Ce(()=>"default"in e?h.findIndex(t=>bt(t)&&t.value===e.default):-1,[e.default,h]),[d,f]=ae(-1===p?D.first:p),m=h[d];Ee((e,r)=>{if(clearTimeout(l.current),J(e))u("done"),t(m.value);else if(z(e,i)||Y(e,i)){if(r.clearLine(0),n||z(e,i)&&d!==D.first||Y(e,i)&&d!==D.last){const t=z(e,i)?-1:1;let n=d;do{n=(n+t+h.length)%h.length}while(!bt(h[n]));f(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=>!mt.isSeparator(n)&&(t++,t===e)),s=h[n];null!=s&&bt(s)&&f(n),l.current=setTimeout(()=>{r.clearLine(0)},700)}else if(K(e))r.clearLine(0);else if(c){const e=r.line.toLowerCase(),t=h.findIndex(t=>!(mt.isSeparator(t)||!bt(t))&&t.name.toLowerCase().startsWith(e));-1!==t&&f(t),l.current=setTimeout(()=>{r.clearLine(0)},700)}}),le(()=>()=>{clearTimeout(l.current)},[]);const g=s.style.message(e.message,o),F=s.style.keysHelpTip([["↑↓","navigate"],["⏎","select"]]);let C=0;const b=qe({items:h,active:d,renderItem({item:e,isActive:t,index:n}){if(mt.isSeparator(e))return C++,` ${e.separator}`;const r="number"===s.indexMode?n+1-C+". ":"";if(e.disabled){const t="string"==typeof e.disabled?e.disabled:"(disabled)";return s.style.disabled(`${r}${e.name} ${t}`)}return(t?s.style.highlight:e=>e)(`${t?s.icon.cursor:" "} ${r}${e.name}`)},pageSize:r,loop:n});if("done"===o)return[a,g,s.style.answer(m.short)].filter(Boolean).join(" ");const{description:E}=m;return`${[[a,g].filter(Boolean).join(" "),b," ",E?s.style.description(E):"",F].filter(Boolean).join("\n").trimEnd()}[?25l`});const yt=new Map([["elpis",{name:"elpis",downloadUrl:"https://github.com/wshiqyuan/elpis-demo.git",description:"elpis 框架项目模板",branch:"develop"}]]);var wt,vt,_t,Ot,Bt,kt={},At={},xt={exports:{}},Tt={exports:{}};function St(){if(vt)return wt;vt=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 wt=function(u,a){a=a||{};var l=typeof u;if("string"===l&&u.length>0)return function(o){if((o=String(o)).length>100)return;var u=/^(-?(?:\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(!u)return;var a=parseFloat(u[1]);switch((u[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*i;case"weeks":case"week":case"w":return a*s;case"days":case"day":case"d":return a*r;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*t;case"seconds":case"second":case"secs":case"sec":case"s":return a*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(u);if("number"===l&&isFinite(u))return a.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"}(u):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"}(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))}}function Rt(){if(Ot)return _t;return Ot=1,_t=function(e){function t(e){let r,s,i,o=null;function u(...e){if(!u.enabled)return;const n=u,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 u.namespace=e,u.useColors=t.useColors(),u.color=t.selectColor(e),u.extend=n,u.destroy=t.destroy,Object.defineProperty(u,"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(u),u}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=St(),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},_t}var $t,Mt,jt,Lt,Pt,It,Ut,Nt,Ht={exports:{}};function Gt(){return Mt?$t:(Mt=1,$t=(e,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 Vt(){if(Lt)return jt;Lt=1;const e=a,t=o,n=Gt(),{env:r}=process;let s;function i(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function u(t,i){if(0===s)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(t&&!i&&void 0===s)return 0;const o=s||0;if("dumb"===r.TERM)return o;if("win32"===process.platform){const t=e.release().split(".");return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(e=>e in r)||"codeship"===r.CI_NAME?1:o;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if("truecolor"===r.COLORTERM)return 3;if("TERM_PROGRAM"in r){const e=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:o}return n("no-color")||n("no-colors")||n("color=false")||n("color=never")?s=0:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(s=1),"FORCE_COLOR"in r&&(s="true"===r.FORCE_COLOR?1:"false"===r.FORCE_COLOR?0:0===r.FORCE_COLOR.length?1:Math.min(parseInt(r.FORCE_COLOR,10),3)),jt={supportsColor:function(e){return i(u(e,e&&e.isTTY))},stdout:i(u(!0,t.isatty(1))),stderr:i(u(!0,t.isatty(2)))}}function qt(){return Pt||(Pt=1,function(e,t){const n=o,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=Vt();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=Rt()(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)}}(Ht,Ht.exports)),Ht.exports}function Wt(){return It||(It=1,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?xt.exports=(Bt||(Bt=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=Rt()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Tt,Tt.exports)),Tt.exports):xt.exports=qt()),xt.exports}function zt(){return Ut||(Ut=1,function(e){var t=At&&At.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0});const n=r,s=t(Wt()).default("@kwsites/file-exists");e.exists=function(t,r=e.READABLE){return function(e,t,r){s("checking %s",e);try{const i=n.statSync(e);return i.isFile()&&t?(s("[OK] path represents a file"),!0):i.isDirectory()&&r?(s("[OK] path represents a directory"),!0):(s("[FAIL] path represents something other than a file or directory"),!1)}catch(e){if("ENOENT"===e.code)return s("[FAIL] path is not accessible: %o",e),!1;throw s("[FATAL] %o",e),e}}(t,(r&e.FILE)>0,(r&e.FOLDER)>0)},e.FILE=1,e.FOLDER=2,e.READABLE=e.FILE+e.FOLDER}(At)),At}var Yt,Kt,Jt=(Nt||(Nt=1,Yt=kt,Object.defineProperty(Yt,"__esModule",{value:!0}),function(e){for(var t in e)Yt.hasOwnProperty(t)||(Yt[t]=e[t])}(zt())),kt),Qt=d(Wt()),Xt={};var Zt,en=function(){if(Kt)return Xt;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 Kt=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.createDeferred=Xt.deferred=void 0,Xt.deferred=e,Xt.createDeferred=e,Xt.default=e,Xt}(),tn=Object.defineProperty,nn=Object.getOwnPropertyDescriptor,rn=Object.getOwnPropertyNames,sn=Object.prototype.hasOwnProperty,on=(e,t)=>function(){return e&&(t=(0,e[rn(e)[0]])(e=0)),t},un=(e,t)=>{for(var n in t)tn(e,n,{get:t[n],enumerable:!0})},an=e=>((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of rn(t))sn.call(e,s)||s===n||tn(e,s,{get:()=>t[s],enumerable:!(r=nn(t,s))||r.enumerable});return e})(tn({},"__esModule",{value:!0}),e);function ln(e){return e instanceof String&&Zt.has(e)}function cn(e){return Zt.get(e)||[]}var hn,Dn,pn,dn,fn,mn,gn=on({"src/lib/args/pathspec.ts"(){Zt=new WeakMap}}),Fn=on({"src/lib/errors/git-error.ts"(){hn=class extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}}}),Cn=on({"src/lib/errors/git-response-error.ts"(){Fn(),Dn=class extends hn{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),bn=on({"src/lib/errors/task-configuration-error.ts"(){Fn(),pn=class extends hn{constructor(e){super(void 0,e)}}}});function En(e){return"function"!=typeof e?fn:e}function yn(e){return"function"==typeof e&&e!==fn}function wn(e,t){const n=e.indexOf(t);return n<=0?[e,""]:[e.substr(0,n),e.substr(n+1)]}function vn(e,t=0){return On(e)&&e.length>t?e[t]:void 0}function _n(e,t=0){if(On(e)&&e.length>t)return e[e.length-1-t]}function On(e){return Wn(e)}function Bn(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 kn(e,t){return Bn(e,!0).map(e=>t(e))}function An(e){return Jt.exists(e,Jt.FOLDER)}function xn(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function Tn(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function Sn(e,t){if(Array.isArray(e)){const n=e.indexOf(t);n>=0&&e.splice(n,1)}else e.delete(t);return t}function Rn(e){return Array.isArray(e)?e:[e]}function $n(e){return e.replace(/[\s-]+(.)/g,(e,t)=>t.toUpperCase())}function Mn(e){return Rn(e).map(e=>e instanceof String?e:String(e))}function jn(e,t=0){if(null==e)return t;const n=parseInt(e,10);return Number.isNaN(n)?t:n}function Ln(e,t){const n=[];for(let r=0,s=e.length;r<s;r++)n.push(t,e[r]);return n}function Pn(e){return(Array.isArray(e)?i.Buffer.concat(e):e).toString("utf-8")}function In(e,t){const n={};return t.forEach(t=>{void 0!==e[t]&&(n[t]=e[t])}),n}function Un(e=0){return new Promise(t=>setTimeout(t,e))}function Nn(e){if(!1!==e)return e}var Hn,Gn,Vn,qn,Wn,zn=on({"src/lib/utils/util.ts"(){nr(),dn="\0",fn=()=>{},mn=Object.prototype.toString.call.bind(Object.prototype.toString)}});function Yn(e,t,n){return t(e)?e:arguments.length>2?n:void 0}function Kn(e,t){const n=ln(e)?"string":typeof e;return/number|string|boolean/.test(n)&&(!t||!t.includes(n))}function Jn(e){return!!e&&"[object Object]"===mn(e)}function Qn(e){return"function"==typeof e}var Xn,Zn,er,tr,nr=on({"src/lib/utils/argument-filters.ts"(){gn(),zn(),Hn=e=>Array.isArray(e),Gn=e=>"number"==typeof e,Vn=e=>"string"==typeof e,qn=e=>Vn(e)||Array.isArray(e)&&e.every(Vn),Wn=e=>null!=e&&!"number|boolean|function".includes(typeof e)&&"number"==typeof e.length}}),rr=on({"src/lib/utils/exit-codes.ts"(){Xn=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(Xn||{})}}),sr=on({"src/lib/utils/git-output-streams.ts"(){Zn=class e{constructor(e,t){this.stdOut=e,this.stdErr=t}asStrings(){return new e(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}});function ir(){throw new Error("LineParser:useMatches not implemented")}var or,ur=on({"src/lib/utils/line-parser.ts"(){er=class{constructor(e,t){this.matches=[],this.useMatches=ir,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))}},tr=class extends er{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 ar(...e){const t=process.cwd(),n=Object.assign({baseDir:t,...or},...e.filter(e=>"object"==typeof e&&e));return n.baseDir=n.baseDir||t,n.trimmed=!0===n.trimmed,n}var lr=on({"src/lib/utils/simple-git-options.ts"(){or={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function cr(e,t=[]){return Jn(e)?Object.keys(e).reduce((t,n)=>{const r=e[n];if(ln(r))t.push(r);else if(Kn(r,["boolean"]))t.push(n+"="+r);else if(Array.isArray(r))for(const e of r)Kn(e,["string","number"])||t.push(n+"="+e);else t.push(n);return t},t):t}function hr(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 cr(Dr(e),r),n||r.push(...function(e){const t="function"==typeof _n(e);return Mn(Yn(_n(e,t?1:0),Hn,[]))}(e)),r}function Dr(e){const t=Qn(_n(e));return Yn(_n(e,t?1:0),Jn)}function pr(e,t=!0){const n=En(_n(e));return t||yn(n)?n:void 0}var dr=on({"src/lib/utils/task-options.ts"(){nr(),zn(),gn()}});function fr(e,t){return e(t.stdOut,t.stdErr)}function mr(e,t,n,r=!0){return Rn(n).forEach(n=>{for(let s=Bn(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 gr=on({"src/lib/utils/task-parser.ts"(){zn()}}),Fr={};un(Fr,{ExitCodes:()=>Xn,GitOutputStreams:()=>Zn,LineParser:()=>er,NOOP:()=>fn,NULL:()=>dn,RemoteLineParser:()=>tr,append:()=>xn,appendTaskOptions:()=>cr,asArray:()=>Rn,asCamelCase:()=>$n,asFunction:()=>En,asNumber:()=>jn,asStringArray:()=>Mn,bufferToString:()=>Pn,callTaskParser:()=>fr,createInstanceConfig:()=>ar,delay:()=>Un,filterArray:()=>Hn,filterFunction:()=>Qn,filterHasLength:()=>Wn,filterNumber:()=>Gn,filterPlainObject:()=>Jn,filterPrimitives:()=>Kn,filterString:()=>Vn,filterStringOrStringArray:()=>qn,filterType:()=>Yn,first:()=>vn,folderExists:()=>An,forEachLineWithContent:()=>kn,getTrailingOptions:()=>hr,including:()=>Tn,isUserFunction:()=>yn,last:()=>_n,objectToString:()=>mn,orVoid:()=>Nn,parseStringResponse:()=>mr,pick:()=>In,prefixedArray:()=>Ln,remove:()=>Sn,splitOn:()=>wn,toLinesWithContent:()=>Bn,trailingFunctionArgument:()=>pr,trailingOptionsArgument:()=>Dr});var Cr,br,Er,yr=on({"src/lib/utils/index.ts"(){nr(),rr(),sr(),ur(),lr(),dr(),gr(),zn()}}),wr={};function vr(e){switch(e){case"bare":return Or();case"root":return _r()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:br,parser:Er}}function _r(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:br,parser:e=>/^\.(git)?$/.test(e.trim())}}function Or(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:br,parser:Er}}un(wr,{CheckRepoActions:()=>Cr,checkIsBareRepoTask:()=>Or,checkIsRepoRootTask:()=>_r,checkIsRepoTask:()=>vr});var Br,kr,Ar,xr,Tr=on({"src/lib/tasks/check-is-repo.ts"(){yr(),Cr=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(Cr||{}),br=({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)},Er=e=>"true"===e.trim()}});var Sr,Rr=on({"src/lib/responses/CleanSummary.ts"(){yr(),Br=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},kr=/^[a-z]+\s*/i,Ar=/^[a-z]+\s+[a-z]+\s*/i,xr=/\/$/}}),$r={};function Mr(e){return{commands:Sr,format:"empty",parser:e}}function jr(e){return{commands:Sr,format:"empty",parser(){throw"string"==typeof e?new pn(e):e}}}function Lr(e,t=!1){return{commands:e,format:"utf-8",parser:e=>t?String(e).trim():e}}function Pr(e){return{commands:e,format:"buffer",parser:e=>e}}function Ir(e){return"buffer"===e.format}function Ur(e){return"empty"===e.format||!e.commands.length}un($r,{EMPTY_COMMANDS:()=>Sr,adhocExecTask:()=>Mr,configurationErrorTask:()=>jr,isBufferTask:()=>Ir,isEmptyTask:()=>Ur,straightThroughBufferTask:()=>Pr,straightThroughStringTask:()=>Lr});var Nr,Hr,Gr,Vr,qr,Wr=on({"src/lib/tasks/task.ts"(){bn(),Sr=[]}}),zr={};function Yr(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)&&qr.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(Qr)?jr(Nr):Kr(n,r)):jr(Gr+JSON.stringify(e)):jr(Hr)}function Kr(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser:t=>function(e,t){const n=new Br(e),r=e?Ar:kr;return Bn(t).forEach(e=>{const t=e.replace(r,"");n.paths.push(t),(xr.test(t)?n.folders:n.files).push(t)}),n}("n"===e,t)}}function Jr(e){return Array.isArray(e)&&e.every(e=>qr.has(e))}function Qr(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:"--interactive"===e}un(zr,{CONFIG_ERROR_INTERACTIVE_MODE:()=>Nr,CONFIG_ERROR_MODE_REQUIRED:()=>Hr,CONFIG_ERROR_UNKNOWN_OPTION:()=>Gr,CleanOptions:()=>Vr,cleanTask:()=>Kr,cleanWithOptionsTask:()=>Yr,isCleanOptionsArray:()=>Jr});var Xr,Zr=on({"src/lib/tasks/clean.ts"(){Rr(),yr(),Wr(),Nr="Git clean interactive mode is not supported",Hr='Git clean mode parameter ("n" or "f") is required',Gr="Git clean unknown option found in: ",Vr=(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))(Vr||{}),qr=new Set(["i",...Mn(Object.values(Vr))])}});function es(e){return e.replace(/^(file):/,"")}function*ts(e,t=null){const n=e.split("\0");for(let e=0,r=n.length-1;e<r;){const r=es(n[e++]);let s=n[e++],i=t;if(s.includes("\n")){const e=wn(s,"\n");i=e[0],s=e[1]}yield{file:r,key:i,value:s}}}var ns,rs=on({"src/lib/responses/ConfigList.ts"(){yr(),Xr=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=_n(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 ss(e,t){return"string"==typeof e&&Object.hasOwn(ns,e)?e:t}function is(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 ts(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 os(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 Xr;for(const n of ts(e))t.addValue(n.file,String(n.key),n.value);return t}(e)}}var us,as,ls=on({"src/lib/tasks/config.ts"(){rs(),yr(),ns=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(ns||{})}});function cs(e){return as.has(e)}var hs,Ds,ps,ds,fs=on({"src/lib/tasks/diff-name-status.ts"(){us=(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))(us||{}),as=new Set(Object.values(us))}});function ms(){return{grep(e){const t=pr(arguments),n=hr(arguments);for(const e of hs)if(n.includes(e))return this._runTask(jr(`git.grep: use of "${e}" is not supported.`),t);"string"==typeof e&&(e=function(...e){return(new ds).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 kn(e,e=>{const[r,s,i]=e.split(dn);t.add(r),(n[r]=n[r]||[]).push({line:jn(s),path:r,preview:i})}),{paths:t,results:n}}(e)},t)}}}var gs,Fs,Cs=on({"src/lib/tasks/grep.ts"(){yr(),Wr(),hs=["-h"],Ds=Symbol("grepQuery"),ds=class{constructor(){this[ps]=[]}*[(ps=Ds,Symbol.iterator)](){for(const e of this[Ds])yield e}and(...e){return e.length&&this[Ds].push("--and","(",...Ln(e,"-e"),")"),this}param(...e){return this[Ds].push(...Ln(e,"-e")),this}}}}),bs={};function Es(e,t){const n=["reset"];return ws(e)&&n.push(`--${e}`),n.push(...t),Lr(n)}function ys(e){if(ws(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function ws(e){return"string"==typeof e&&Fs.includes(e)}un(bs,{ResetMode:()=>gs,getResetMode:()=>ys,resetTask:()=>Es});var vs=on({"src/lib/tasks/reset.ts"(){yr(),Wr(),gs=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(gs||{}),Fs=Mn(Object.values(gs))}});function _s(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 Os(e,t,n,r=function(){return Qt("simple-git")}()){const s=e&&`[${e}]`||"",i=[],o="string"==typeof t?r.extend(t):t,u=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}(Yn(t,Vn),o,r);return function t(n){const i=n&&`[${n}]`||"",u=o&&_s(o,i)||fn,l=_s(r,`${s} ${i}`,u);return Object.assign(o?u:l,{label:e,sibling:a,info:l,step:t})}(n);function a(t,n){return xn(i,Os(e,u.replace(/^[^:]+/,t),n,r))}}var Bs,ks,As=on({"src/lib/git-logger.ts"(){yr(),Qt.formatters.L=e=>String(Wn(e)?e.length:"-"),Qt.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):mn(e)}}),xs=on({"src/lib/runners/tasks-pending-queue.ts"(){Fn(),As(),Bs=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:Os(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 hn(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 Ts(e,t){return{method:vn(e.commands)||"",commands:t}}function Ss(e,t,n,r){return s=>{n("%s received %L bytes",t,s),r("%B",s),e.push(s)}}var Rs,$s=on({"src/lib/runners/git-executor-chain.ts"(){Fn(),Wr(),yr(),xs(),ks=class{constructor(e,t,n){this._executor=e,this._scheduler=t,this._plugins=n,this._chain=Promise.resolve(),this._queue=new Bs}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(Ur(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 hn?Object.assign(t,{task:e}):new hn(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","",Ts(e,e.commands)),r=this._plugins.exec("spawn.args",[...e.commands],Ts(e,e.commands)),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),Ir(e)?fr(e.parser,i):fr(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:u}=n;return new Promise((a,l)=>{r("Preparing to handle process response exitCode=%d stdOut=",s);const{error:c}=this._plugins.exec("task.error",{error:i},{...Ts(e,t),...n});return c&&e.onError?(r.info("exitCode=%s handling with custom error handler"),e.onError(n,c,e=>{r.info("custom error handler treated as success"),r("custom error returned a %s",mn(e)),a(new Zn(Array.isArray(e)?Buffer.concat(e):e,Buffer.concat(u)))},l)):c?(r.info("handling as error: exitCode=%s stdErr=%s rejection=%o",s,u.length,i),l(c)):(r.info("retrieving task output complete"),void a(new Zn(Buffer.concat(o),Buffer.concat(u))))})}async gitResponse(e,n,r,s,i){const o=i.sibling("output"),u=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},Ts(e,e.commands));return new Promise(a=>{const l=[],c=[];i.info("%s %o",n,r),i("%O",u);let h=this._beforeSpawn(e,r);if(h)return a({stdOut:l,stdErr:c,exitCode:9901,rejection:h});this._plugins.exec("spawn.before",void 0,{...Ts(e,r),kill(e){h=e||h}});const D=t.spawn(n,r,u);D.stdout.on("data",Ss(l,"stdOut",i,o.step("stdOut"))),D.stderr.on("data",Ss(c,"stdErr",i,o.step("stdErr"))),D.on("error",function(e,t){return n=>{t("[ERROR] child process exception %o",n),e.push(Buffer.from(String(n.stack),"ascii"))}}(c,i)),s&&(i("Passing child process stdOut/stdErr to custom outputHandler"),s(n,D.stdout,D.stderr,[...r])),this._plugins.exec("spawn.after",void 0,{...Ts(e,r),spawned:D,close(e,t){a({stdOut:l,stdErr:c,exitCode:e,rejection:h||t})},kill(e){D.killed||(h=e,D.kill("SIGINT"))}})})}_beforeSpawn(e,t){let n;return this._plugins.exec("spawn.before",void 0,{...Ts(e,t),kill(e){n=e||n}}),n}}}}),Ms={};un(Ms,{GitExecutor:()=>Rs});var js=on({"src/lib/runners/git-executor.ts"(){$s(),Rs=class{constructor(e,t,n){this.cwd=e,this._scheduler=t,this._plugins=n,this._chain=new ks(this,this._scheduler,this._plugins)}chain(){return new ks(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function Ls(e,t,n=fn){t.then(e=>{n(null,e)},t=>{t?.task===e&&n(t instanceof Dn?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=fn};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 Ps=on({"src/lib/task-callback.ts"(){Cn(),yr()}});function Is(e,t){return Mr(n=>{if(!An(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||n).cwd=e})}var Us=on({"src/lib/tasks/change-working-directory.ts"(){yr(),Wr()}});function Ns(e){const t=["checkout",...e];return"-b"===t[1]&&t.includes("-B")&&(t[1]=Sn(t,"-B")),Lr(t)}var Hs,Gs=on({"src/lib/tasks/checkout.ts"(){yr(),Wr()}});var Vs,qs=on({"src/lib/tasks/count-objects.ts"(){yr(),Hs=new er(/([a-z-]+): (\d+)$/,(e,[t,n])=>{const r=$n(t);Object.hasOwn(e,r)&&(e[r]=jn(n))})}});function Ws(e){return mr({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},Vs,e)}var zs=on({"src/lib/parsers/parse-commit.ts"(){yr(),Vs=[new er(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,n,r])=>{e.branch=t,e.commit=r,e.root=!!n}),new er(/\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 er(/(\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 er(/^(\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 Ys(){return{commit(e,...t){const n=pr(arguments),r=function(e){return!qn(e)&&jr("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",...Ln(e,"-m"),...t,...n],format:"utf-8",parser:Ws}}(Rn(e),Rn(Yn(t[0],qn,[])),[...Mn(Yn(t[1],Hn,[])),...hr(arguments,0,!0)]);return this._runTask(r,n)}}}var Ks=on({"src/lib/tasks/commit.ts"(){zs(),yr(),Wr()}});var Js=on({"src/lib/tasks/first-commit.ts"(){yr(),Wr()}});var Qs,Xs,Zs,ei=on({"src/lib/tasks/hash-object.ts"(){Wr()}});var ti,ni=on({"src/lib/responses/InitSummary.ts"(){Qs=class{constructor(e,t,n,r){this.bare=e,this.path=t,this.existing=n,this.gitDir=r}},Xs=/^Init.+ repository in (.+)$/,Zs=/^Rein.+ in (.+)$/}});function ri(e=!1,t,n){const r=["init",...n];return e&&!function(e){return e.includes(ti)}(r)&&r.splice(1,0,ti),{commands:r,format:"utf-8",parser:e=>function(e,t,n){const r=String(n).trim();let s;if(s=Xs.exec(r))return new Qs(e,t,!1,s[1]);if(s=Zs.exec(r))return new Qs(e,t,!0,s[1]);let i="";const o=r.split(" ");for(;o.length;)if("in"===o.shift()){i=o.join(" ");break}return new Qs(e,t,/^re/i.test(r),i)}(r.includes("--bare"),t,e)}}var si,ii=on({"src/lib/tasks/init.ts"(){ni(),ti="--bare"}});function oi(e){for(let t=0;t<e.length;t++){const n=si.exec(e[t]);if(n)return`--${n[1]}`}return""}function ui(e){return si.test(e)}var ai,li,ci,hi,Di,pi,di=on({"src/lib/args/log-format.ts"(){si=/^--(stat|numstat|name-only|name-status)(=|$)/}}),fi=on({"src/lib/responses/DiffSummary.ts"(){ai=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function mi(e=""){const t=pi[e];return e=>mr(new ai,t,e,!1)}var gi,Fi,Ci,bi,Ei=on({"src/lib/parsers/parse-diff-summary.ts"(){di(),fi(),fs(),yr(),li=[new er(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,n,r=""])=>{e.files.push({file:t.trim(),changes:jn(n),insertions:r.replace(/[^+]/g,"").length,deletions:r.replace(/[^-]/g,"").length,binary:!1})}),new er(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,n,r])=>{e.files.push({file:t.trim(),before:jn(n),after:jn(r),binary:!0})}),new er(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,n])=>{const r=/(\d+) i/.exec(n),s=/(\d+) d/.exec(n);e.changed=jn(t),e.insertions=jn(r?.[1]),e.deletions=jn(s?.[1])})],ci=[new er(/(\d+)\t(\d+)\t(.+)$/,(e,[t,n,r])=>{const s=jn(t),i=jn(n);e.changed++,e.insertions+=s,e.deletions+=i,e.files.push({file:r,changes:s+i,insertions:s,deletions:i,binary:!1})}),new er(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],hi=[new er(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],Di=[new er(/([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:Nn(cs(t)&&t),from:Nn(!!i&&r!==i&&r),similarity:jn(n)})})],pi={"":li,"--stat":li,"--numstat":ci,"--name-status":Di,"--name-only":hi}}});function yi(e=Ci,t=bi,n=""){const r=mi(n);return function(n){const s=Bn(n.trim(),!1,gi).map(function(n){const s=n.split(Fi),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 wi=on({"src/lib/parsers/parse-list-log-summary.ts"(){yr(),Ei(),di(),gi="òòòòòò ",Fi=" òò",Ci=" ò ",bi=["hash","date","message","refs","author_name","author_email"]}}),vi={};function _i(e){let t=oi(e);const n=["diff"];return""===t&&(t="--stat",n.push("--stat=4096")),n.push(...e),Oi(n)||{commands:n,format:"utf-8",parser:mi(t)}}function Oi(e){const t=e.filter(ui);return t.length>1?jr(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`):t.length&&e.includes("-z")?jr(`Summary flag ${t} parsing is not compatible with null termination option '-z'`):void 0}un(vi,{diffSummaryTask:()=>_i,validateLogFormatConfig:()=>Oi});var Bi,ki=on({"src/lib/tasks/diff.ts"(){di(),Ei(),Wr()}});function Ai(e={},t=[]){const n=Yn(e.splitter,Vn,Ci),r=Jn(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=[],u=[`--pretty=format:${gi}${i}${Fi}`,...t],a=e.n||e["max-count"]||e.maxCount;if(a&&u.push(`--max-count=${a}`),e.from||e.to){const t=!1!==e.symmetric?"...":"..";o.push(`${e.from||""}${t}${e.to||""}`)}return Vn(e.file)&&u.push("--follow",function(...e){const t=new String(e);return Zt.set(t,e),t}(e.file)),cr(function(e){return Object.keys(e).reduce((t,n)=>(n in Bi||(t[n]=e[n]),t),{})}(e),u),{fields:s,splitter:n,commands:[...u,...o]}}function xi(){return{log(...e){const t=pr(arguments),n=Ai(Dr(arguments),Mn(Yn(arguments[0],Hn,[]))),r=function(e,t){return Vn(e)&&Vn(t)&&jr("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}(...e)||Oi(n.commands)||function(e){return function(e,t,n){const r=yi(e,t,oi(n));return{commands:["log",...n],format:"utf-8",parser:r}}(e.splitter,e.fields,e.commands)}(n);return this._runTask(r,t)}}}var Ti,Si,Ri,$i,Mi,ji=on({"src/lib/tasks/log.ts"(){di(),gn(),wi(),yr(),Wr(),ki(),Bi=(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))(Bi||{})}}),Li=on({"src/lib/responses/MergeSummary.ts"(){Ti=class{constructor(e,t=null,n){this.reason=e,this.file=t,this.meta=n}toString(){return`${this.file}:${this.reason}`}},Si=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"}}}}),Pi=on({"src/lib/responses/PullSummary.ts"(){Ri=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},$i=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function Ii(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 Ui(e){const t=/^\s*(\d+)/.exec(e),n=/delta (\d+)/i.exec(e);return{count:jn(t&&t[1]||"0"),delta:jn(n&&n[1]||"0")}}var Ni,Hi,Gi=on({"src/lib/parsers/parse-remote-objects.ts"(){yr(),Mi=[new tr(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,n])=>{const r=t.toLowerCase(),s=Ii(e.remoteMessages);Object.assign(s,{[r]:jn(n)})}),new tr(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,n])=>{const r=t.toLowerCase(),s=Ii(e.remoteMessages);Object.assign(s,{[r]:jn(n)})}),new tr(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,n,r])=>{const s=Ii(e.remoteMessages);s.total=Ui(t),s.reused=Ui(n),s.packReused=jn(r)})]}});function Vi(e,t){return mr({remoteMessages:new Hi},Ni,t)}var qi,Wi,zi,Yi,Ki,Ji,Qi=on({"src/lib/parsers/parse-remote-messages.ts"(){yr(),Gi(),Ni=[new tr(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...Mi,new tr([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new tr([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,n,r])=>{e.remoteMessages.vulnerabilities={count:jn(t),summary:n,url:r}})],Hi=class{constructor(){this.all=[]}}}});var Xi,Zi,eo,to=on({"src/lib/parsers/parse-pull.ts"(){Pi(),yr(),Qi(),qi=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,Wi=/^(create|delete) mode \d+ (.+)/,zi=[new er(/^\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 er(qi,(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 er(Wi,(e,[t,n])=>{xn(e.files,n),xn("create"===t?e.created:e.deleted,n)})],Yi=[new er(/^from\s(.+)$/i,(e,[t])=>{e.remote=t}),new er(/^fatal:\s(.+)$/,(e,[t])=>{e.message=t}),new er(/([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})],Ki=(e,t)=>mr(new Ri,zi,[e,t]),Ji=(e,t)=>Object.assign(new Ri,Ki(e,t),Vi(0,t))}}),no=on({"src/lib/parsers/parse-merge.ts"(){Li(),yr(),to(),Xi=[new er(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new er(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,n])=>{e.conflicts.push(new Ti(t,n))}),new er(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,n,r])=>{e.conflicts.push(new Ti(t,n,{deleteRef:r}))}),new er(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new Ti(t,null))}),new er(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],Zi=(e,t)=>Object.assign(eo(e,t),Ji(e,t)),eo=e=>mr(new Si,Xi,e)}});function ro(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(e,t){const n=Zi(e,t);if(n.failed)throw new Dn(n);return n}}:jr("Git.merge requires at least one option")}var so,io,oo,uo=on({"src/lib/tasks/merge.ts"(){Cn(),no(),Wr()}});var ao=on({"src/lib/parsers/parse-push.ts"(){yr(),Qi(),so=[new er(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new er(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref={...e.ref||{},local:t}}),new er(/^[=*-]\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 er(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,n,r])=>{e.branch={...e.branch||{},local:t,remote:n,remoteName:r}}),new er(/^([^:]+):(\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}}})],io=(e,t)=>({...oo(e,t),...Vi(0,t)}),oo=(e,t)=>mr({pushed:[]},so,[e,t])}}),lo={};function co(e={},t){return xn(t,"--tags"),ho(e,t)}function ho(e={},t){const n=["push",...t];return e.branch&&n.splice(1,0,e.branch),e.remote&&n.splice(1,0,e.remote),Sn(n,"-v"),xn(n,"--verbose"),xn(n,"--porcelain"),{commands:n,format:"utf-8",parser:io}}un(lo,{pushTagsTask:()=>co,pushTask:()=>ho});var Do=on({"src/lib/tasks/push.ts"(){ao(),yr()}});var po,fo,mo,go,Fo,Co=on({"src/lib/tasks/show.ts"(){yr(),Wr()}}),bo=on({"src/lib/responses/FileStatusSummary.ts"(){po=/^(.+)\0(.+)$/,fo=class{constructor(e,t,n){if(this.path=e,this.index=t,this.working_dir=n,"R"===t||"R"===n){const t=po.exec(e)||[null,e,e];this.from=t[2]||"",this.path=t[1]||""}}}}});function Eo(e){const[t,n]=e.split(dn);return{from:n||t,to:t}}function yo(e,t,n){return[`${e}${t}`,n]}function wo(e,...t){return t.map(t=>yo(e,t,(e,t)=>xn(e.conflicted,t)))}function vo(e,t){const n=t.trim();switch(" "){case n.charAt(2):return r(n.charAt(0),n.charAt(1),n.substr(3));case n.charAt(1):return r(" ",n.charAt(0),n.substr(2));default:return}function r(t,n,r){const s=`${t}${n}`,i=go.get(s);i&&i(e,r),"##"!==s&&"!!"!==s&&e.files.push(new fo(r,t,n))}}var _o,Oo=on({"src/lib/responses/StatusSummary.ts"(){yr(),bo(),mo=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}},go=new Map([yo(" ","A",(e,t)=>xn(e.created,t)),yo(" ","D",(e,t)=>xn(e.deleted,t)),yo(" ","M",(e,t)=>xn(e.modified,t)),yo("A"," ",(e,t)=>xn(e.created,t)&&xn(e.staged,t)),yo("A","M",(e,t)=>xn(e.created,t)&&xn(e.staged,t)&&xn(e.modified,t)),yo("D"," ",(e,t)=>xn(e.deleted,t)&&xn(e.staged,t)),yo("M"," ",(e,t)=>xn(e.modified,t)&&xn(e.staged,t)),yo("M","M",(e,t)=>xn(e.modified,t)&&xn(e.staged,t)),yo("R"," ",(e,t)=>{xn(e.renamed,Eo(t))}),yo("R","M",(e,t)=>{const n=Eo(t);xn(e.renamed,n),xn(e.modified,n.to)}),yo("!","!",(e,t)=>{xn(e.ignored=e.ignored||[],t)}),yo("?","?",(e,t)=>xn(e.not_added,t)),...wo("A","A","U"),...wo("D","D","U"),...wo("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=Yn(n?.[1],Vn,null),n=/\.{3}(\S*)/.exec(t),e.tracking=Yn(n?.[1],Vn,null),n=/\son\s(\S+?)(?=\.{3}|$)/.exec(t),n&&(e.current=Yn(n?.[1],Vn,e.current)),e.detached=/\(no branch\)/.test(t)}]]),Fo=function(e){const t=e.split(dn),n=new mo;for(let e=0,r=t.length;e<r;){let r=t[e++].trim();r&&("R"===r.charAt(0)&&(r+=dn+(t[e++]||"")),vo(n,r))}return n}}});var Bo,ko,Ao=on({"src/lib/tasks/status.ts"(){Oo(),_o=["--null","-z"]}});function xo(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 To(e){return e===Bo?xo(0,0,0,"",!1):mr(xo(0,0,0,e),ko,e)}var So,Ro=on({"src/lib/tasks/version.ts"(){yr(),Bo="installed=false",ko=[new er(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,n,r,s=""])=>{Object.assign(e,xo(jn(t),jn(n),jn(r),s))}),new er(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,n,r,s=""])=>{Object.assign(e,xo(jn(t),jn(n),r,s))})]}}),$o={};un($o,{SimpleGitApi:()=>So});var Mo,jo,Lo=on({"src/lib/simple-git-api.ts"(){Ps(),Us(),Gs(),qs(),Ks(),ls(),Js(),Cs(),ei(),ii(),ji(),uo(),Do(),Co(),Ao(),Wr(),Ro(),yr(),So=class{constructor(e){this._executor=e}_runTask(e,t){const n=this._executor.chain(),r=n.push(e);return t&&Ls(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(Lr(["add",...Rn(e)]),pr(arguments))}cwd(e){const t=pr(arguments);return"string"==typeof e?this._runTask(Is(e,this._executor),t):"string"==typeof e?.path?this._runTask(Is(e.path,e.root&&this._executor||void 0),t):this._runTask(jr("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"),Lr(n,!0)}(e,!0===t),pr(arguments))}init(e){return this._runTask(ri(!0===e,this._executor.cwd,hr(arguments)),pr(arguments))}merge(){return this._runTask(ro(hr(arguments)),pr(arguments))}mergeFromTo(e,t){return Vn(e)&&Vn(t)?this._runTask(ro([e,t,...hr(arguments)]),pr(arguments,!1)):this._runTask(jr("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){const e=ho({remote:Yn(arguments[0],Vn),branch:Yn(arguments[1],Vn)},hr(arguments));return this._runTask(e,pr(arguments))}stash(){return this._runTask(Lr(["stash",...hr(arguments)]),pr(arguments))}status(){return this._runTask({format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...hr(arguments).filter(e=>!_o.includes(e))],parser:e=>Fo(e)},pr(arguments))}},Object.assign(So.prototype,{checkout(){return this._runTask(Ns(hr(arguments,1)),pr(arguments))},checkoutBranch(e,t){return this._runTask(Ns(["-b",e,t,...hr(arguments)]),pr(arguments))},checkoutLocalBranch(e){return this._runTask(Ns(["-b",e,...hr(arguments)]),pr(arguments))}},Ys(),{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],ss(n[1],"local")),pr(arguments))},getConfig(e,t){return this._runTask(is(e,ss(t,void 0)),pr(arguments))},listConfig(...e){return this._runTask(os(ss(e[0],void 0)),pr(arguments))}},{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser:e=>mr({count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0},[Hs],e)})}},{firstCommit(){return this._runTask(Lr(["rev-list","--max-parents=0","HEAD"],!0),pr(arguments))}},ms(),xi(),{showBuffer(){const e=["show",...hr(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(Pr(e),pr(arguments))},show(){const e=["show",...hr(arguments,1)];return this._runTask(Lr(e),pr(arguments))}},{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:To,onError(e,t,n,r){if(-2===e.exitCode)return n(Buffer.from(Bo));r(t)}})}})}}),Po={};un(Po,{Scheduler:()=>jo});var Io=on({"src/lib/runners/scheduler.ts"(){yr(),As(),Mo=(()=>{let e=0;return()=>{e++;const{promise:t,done:n}=en.createDeferred();return{promise:t,done:n,id:e}}})(),jo=class{constructor(e=2){this.concurrency=e,this.logger=Os("","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=xn(this.running,this.pending.shift());this.logger("Attempting id=%s",e.id),e.done(()=>{this.logger("Completing id=",e.id),Sn(this.running,e),this.schedule()})}next(){const{promise:e,id:t}=xn(this.pending,Mo());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),Uo={};function No(e,t){return Lr(["apply",...t,...e])}un(Uo,{applyPatchTask:()=>No});var Ho,Go=on({"src/lib/tasks/apply-patch.ts"(){Wr()}});var Vo,qo,Wo,zo=on({"src/lib/responses/BranchDeleteSummary.ts"(){Ho=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function Yo(e,t){return 1===t&&Vo.test(e)}var Ko,Jo,Qo,Xo=on({"src/lib/parsers/parse-branch-delete.ts"(){zo(),yr(),Vo=/^error[^']+'([^']+)'/m,qo=[new er(/(\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 er(Vo,(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})],Wo=(e,t)=>mr(new Ho,qo,[e,t])}}),Zo=on({"src/lib/responses/BranchSummary.ts"(){Ko=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 eu(e){return e?e.charAt(0):""}function tu(e,t=!1){return mr(new Ko,t?[Qo]:Jo,e)}var nu=on({"src/lib/parsers/parse-branch.ts"(){Zo(),yr(),Jo=[new er(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,n,r,s])=>{e.push(eu(t),!0,n,r,s)}),new er(/^([*+]\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s,(e,[t,n,r,s])=>{e.push(eu(t),!1,n,r,s)})],Qo=new er(/^(\S+)$/s,(e,[t])=>{e.push("*",!1,t,"","")})}}),ru={};function su(e){const t=["-d","-D","--delete"];return e.some(e=>t.includes(e))}function iu(e){const t=su(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?Wo(e,r).all[0]:tu(e,n)}}function ou(){return{format:"utf-8",commands:["branch","-v"],parser:e=>tu(e)}}function uu(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser:(e,t)=>Wo(e,t),onError({exitCode:e,stdOut:t},n,r,s){if(!Yo(String(n),e))return s(n);r(t)}}}function au(e,t=!1){const n={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser:(t,n)=>Wo(t,n).branches[e],onError({exitCode:e,stdErr:t,stdOut:r},s,i,o){if(!Yo(String(s),e))return o(s);throw new Dn(n.parser(Pn(r),Pn(t)),String(s))}};return n}un(ru,{branchLocalTask:()=>ou,branchTask:()=>iu,containsDeleteBranchCommand:()=>su,deleteBranchTask:()=>au,deleteBranchesTask:()=>uu});var lu,cu=on({"src/lib/tasks/branch.ts"(){Cn(),Xo(),nu(),yr()}});function hu(e){const t=e.trim().replace(/^["']|["']$/g,"");return t&&n.normalize(t)}var Du=on({"src/lib/responses/CheckIgnore.ts"(){lu=e=>e.split(/\n/g).map(hu).filter(Boolean)}}),pu={};function du(e){return{commands:["check-ignore",...e],format:"utf-8",parser:lu}}un(pu,{checkIgnoreTask:()=>du});var fu=on({"src/lib/tasks/check-ignore.ts"(){Du()}}),mu={};function gu(e){return/^--upload-pack(=|$)/.test(e)}function Fu(e,t,n){const r=["clone",...n];Vn(e)&&r.push(e),Vn(t)&&r.push(t);return r.find(gu)?jr("git.fetch: potential exploit argument blocked."):Lr(r)}function Cu(e,t,n){return xn(n,"--mirror"),Fu(e,t,n)}un(mu,{cloneMirrorTask:()=>Cu,cloneTask:()=>Fu});var bu,Eu=on({"src/lib/tasks/clone.ts"(){Wr(),yr()}});function yu(e,t){return mr({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},bu,[e,t])}var wu=on({"src/lib/parsers/parse-fetch.ts"(){yr(),bu=[new er(/From (.+)$/,(e,[t])=>{e.remote=t}),new er(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,n])=>{e.branches.push({name:t,tracking:n})}),new er(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,n])=>{e.tags.push({name:t,tracking:n})}),new er(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new er(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,n,r,s])=>{e.updated.push({name:r,tracking:s,to:n,from:t})})]}}),vu={};function _u(e){return/^--upload-pack(=|$)/.test(e)}function Ou(e,t,n){const r=["fetch",...n];e&&t&&r.push(e,t);return r.find(_u)?jr("git.fetch: potential exploit argument blocked."):{commands:r,format:"utf-8",parser:yu}}un(vu,{fetchTask:()=>Ou});var Bu,ku=on({"src/lib/tasks/fetch.ts"(){wu(),Wr()}});function Au(e){return mr({moves:[]},Bu,e)}var xu=on({"src/lib/parsers/parse-move.ts"(){yr(),Bu=[new er(/^Renaming (.+) to (.+)$/,(e,[t,n])=>{e.moves.push({from:t,to:n})})]}}),Tu={};function Su(e,t){return{commands:["mv","-v",...Rn(e),t],format:"utf-8",parser:Au}}un(Tu,{moveTask:()=>Su});var Ru=on({"src/lib/tasks/move.ts"(){xu(),yr()}}),$u={};function Mu(e,t,n){const r=["pull",...n];return e&&t&&r.splice(1,0,e,t),{commands:r,format:"utf-8",parser:(e,t)=>Ji(e,t),onError(e,t,n,r){const s=function(e,t){const n=mr(new $i,Yi,[e,t]);return n.message&&n}(Pn(e.stdOut),Pn(e.stdErr));if(s)return r(new Dn(s));r(t)}}}un($u,{pullTask:()=>Mu});var ju=on({"src/lib/tasks/pull.ts"(){Cn(),to(),yr()}});function Lu(e){const t={};return Iu(e,([e])=>t[e]={name:e}),Object.values(t)}function Pu(e){const t={};return Iu(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 Iu(e,t){kn(e,e=>t(e.split(/\s+/)))}var Uu=on({"src/lib/responses/GetRemoteSummary.ts"(){yr()}}),Nu={};function Hu(e,t,n){return Lr(["remote","add",...n,e,t])}function Gu(e){const t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?Pu:Lu}}function Vu(e){const t=[...e];return"ls-remote"!==t[0]&&t.unshift("ls-remote"),Lr(t)}function qu(e){const t=[...e];return"remote"!==t[0]&&t.unshift("remote"),Lr(t)}function Wu(e){return Lr(["remote","remove",e])}un(Nu,{addRemoteTask:()=>Hu,getRemotesTask:()=>Gu,listRemotesTask:()=>Vu,remoteTask:()=>qu,removeRemoteTask:()=>Wu});var zu=on({"src/lib/tasks/remote.ts"(){Uu(),Wr()}}),Yu={};function Ku(e={},t){const n=Ai(e),r=["stash","list",...n.commands,...t],s=yi(n.splitter,n.fields,oi(r));return Oi(r)||{commands:r,format:"utf-8",parser:s}}un(Yu,{stashListTask:()=>Ku});var Ju=on({"src/lib/tasks/stash-list.ts"(){di(),wi(),ki(),ji()}}),Qu={};function Xu(e,t){return ea(["add",e,t])}function Zu(e){return ea(["init",...e])}function ea(e){const t=[...e];return"submodule"!==t[0]&&t.unshift("submodule"),Lr(t)}function ta(e){return ea(["update",...e])}un(Qu,{addSubModuleTask:()=>Xu,initSubModuleTask:()=>Zu,subModuleTask:()=>ea,updateSubModuleTask:()=>ta});var na,ra,sa=on({"src/lib/tasks/sub-module.ts"(){Wr()}});function ia(e,t){return e===t?0:e>t?1:-1}function oa(e){return e.trim()}function ua(e){return"string"==typeof e&&parseInt(e.replace(/^\D+/g,""),10)||0}var aa=on({"src/lib/responses/TagList.ts"(){na=class{constructor(e,t){this.all=e,this.latest=t}},ra=function(e,t=!1){const n=e.split("\n").map(oa).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?ia(e,t):0}(ua(n[0]),ua(r[0]));for(let e=0,t=Math.max(n.length,r.length);e<t;e++){const t=ia(ua(n[e]),ua(r[e]));if(t)return t}return 0});const r=t?n[0]:[...n].reverse().find(e=>e.indexOf(".")>=0);return new na(n,r)}}}),la={};function ca(e=[]){const t=e.some(e=>/^--sort=/.test(e));return{format:"utf-8",commands:["tag","-l",...e],parser:e=>ra(e,t)}}function ha(e){return{format:"utf-8",commands:["tag",e],parser:()=>({name:e})}}function Da(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser:()=>({name:e})}}un(la,{addAnnotatedTagTask:()=>Da,addTagTask:()=>ha,tagListTask:()=>ca});var pa,da,fa=on({"src/lib/tasks/tag.ts"(){aa()}}),ma=(pa={"src/git.js"(e,t){var{GitExecutor:n}=(js(),an(Ms)),{SimpleGitApi:r}=(Lo(),an($o)),{Scheduler:s}=(Io(),an(Po)),{configurationErrorTask:i}=(Wr(),an($r)),{asArray:o,filterArray:u,filterPrimitives:a,filterString:l,filterStringOrStringArray:c,filterType:h,getTrailingOptions:D,trailingFunctionArgument:p,trailingOptionsArgument:d}=(yr(),an(Fr)),{applyPatchTask:f}=(Go(),an(Uo)),{branchTask:m,branchLocalTask:g,deleteBranchesTask:F,deleteBranchTask:C}=(cu(),an(ru)),{checkIgnoreTask:b}=(fu(),an(pu)),{checkIsRepoTask:E}=(Tr(),an(wr)),{cloneTask:y,cloneMirrorTask:w}=(Eu(),an(mu)),{cleanWithOptionsTask:v,isCleanOptionsArray:_}=(Zr(),an(zr)),{diffSummaryTask:O}=(ki(),an(vi)),{fetchTask:B}=(ku(),an(vu)),{moveTask:k}=(Ru(),an(Tu)),{pullTask:A}=(ju(),an($u)),{pushTagsTask:x}=(Do(),an(lo)),{addRemoteTask:T,getRemotesTask:S,listRemotesTask:R,remoteTask:$,removeRemoteTask:M}=(zu(),an(Nu)),{getResetMode:j,resetTask:L}=(vs(),an(bs)),{stashListTask:P}=(Ju(),an(Yu)),{addSubModuleTask:I,initSubModuleTask:U,subModuleTask:N,updateSubModuleTask:H}=(sa(),an(Qu)),{addAnnotatedTagTask:G,addTagTask:V,tagListTask:q}=(fa(),an(la)),{straightThroughBufferTask:W,straightThroughStringTask:z}=(Wr(),an($r));function Y(e,t){this._plugins=t,this._executor=new n(e.baseDir,new s(e.maxConcurrentProcesses),t),this._trimmed=e.trimmed}function K(e,t,n,r){return"string"!=typeof n?i(`git.${e}() requires a string 'repoPath'`):t(n,h(r,l),D(arguments))}(Y.prototype=Object.create(r.prototype)).constructor=Y,Y.prototype.customBinary=function(e){return this._plugins.reconfigure("binary",e),this},Y.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},Y.prototype.stashList=function(e){return this._runTask(P(d(arguments)||{},u(e)&&e||[]),p(arguments))},Y.prototype.clone=function(){return this._runTask(K("clone",y,...arguments),p(arguments))},Y.prototype.mirror=function(){return this._runTask(K("mirror",w,...arguments),p(arguments))},Y.prototype.mv=function(e,t){return this._runTask(k(e,t),p(arguments))},Y.prototype.checkoutLatestTag=function(e){var t=this;return this.pull(function(){t.tags(function(n,r){t.checkout(r.latest,e)})})},Y.prototype.pull=function(e,t,n,r){return this._runTask(A(h(e,l),h(t,l),D(arguments)),p(arguments))},Y.prototype.fetch=function(e,t){return this._runTask(B(h(e,l),h(t,l),D(arguments)),p(arguments))},Y.prototype.silent=function(e){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},Y.prototype.tags=function(e,t){return this._runTask(q(D(arguments)),p(arguments))},Y.prototype.rebase=function(){return this._runTask(z(["rebase",...D(arguments)]),p(arguments))},Y.prototype.reset=function(e){return this._runTask(L(j(e),D(arguments)),p(arguments))},Y.prototype.revert=function(e){const t=p(arguments);return"string"!=typeof e?this._runTask(i("Commit must be a string"),t):this._runTask(z(["revert",...D(arguments,0,!0),e]),t)},Y.prototype.addTag=function(e){const t="string"==typeof e?V(e):i("Git.addTag requires a tag name");return this._runTask(t,p(arguments))},Y.prototype.addAnnotatedTag=function(e,t){return this._runTask(G(e,t),p(arguments))},Y.prototype.deleteLocalBranch=function(e,t,n){return this._runTask(C(e,"boolean"==typeof t&&t),p(arguments))},Y.prototype.deleteLocalBranches=function(e,t,n){return this._runTask(F(e,"boolean"==typeof t&&t),p(arguments))},Y.prototype.branch=function(e,t){return this._runTask(m(D(arguments)),p(arguments))},Y.prototype.branchLocal=function(e){return this._runTask(g(),p(arguments))},Y.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(!a(n[e])){n.splice(e,n.length-e);break}n.push(...D(arguments,0,!0));var r=p(arguments);return n.length?this._runTask(z(n,this._trimmed),r):this._runTask(i("Raw: must supply one or more command to execute"),r)},Y.prototype.submoduleAdd=function(e,t,n){return this._runTask(I(e,t),p(arguments))},Y.prototype.submoduleUpdate=function(e,t){return this._runTask(H(D(arguments,!0)),p(arguments))},Y.prototype.submoduleInit=function(e,t){return this._runTask(U(D(arguments,!0)),p(arguments))},Y.prototype.subModule=function(e,t){return this._runTask(N(D(arguments)),p(arguments))},Y.prototype.listRemote=function(){return this._runTask(R(D(arguments)),p(arguments))},Y.prototype.addRemote=function(e,t,n){return this._runTask(T(e,t,D(arguments)),p(arguments))},Y.prototype.removeRemote=function(e,t){return this._runTask(M(e),p(arguments))},Y.prototype.getRemotes=function(e,t){return this._runTask(S(!0===e),p(arguments))},Y.prototype.remote=function(e,t){return this._runTask($(D(arguments)),p(arguments))},Y.prototype.tag=function(e,t){const n=D(arguments);return"tag"!==n[0]&&n.unshift("tag"),this._runTask(z(n),p(arguments))},Y.prototype.updateServerInfo=function(e){return this._runTask(z(["update-server-info"]),p(arguments))},Y.prototype.pushTags=function(e,t){const n=x({remote:h(e,l)},D(arguments));return this._runTask(n,p(arguments))},Y.prototype.rm=function(e){return this._runTask(z(["rm","-f",...o(e)]),p(arguments))},Y.prototype.rmKeepLocal=function(e){return this._runTask(z(["rm","--cached",...o(e)]),p(arguments))},Y.prototype.catFile=function(e,t){return this._catFile("utf-8",arguments)},Y.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},Y.prototype._catFile=function(e,t){var n=p(t),r=["cat-file"],s=t[0];if("string"==typeof s)return this._runTask(i("Git.catFile: options must be supplied as an array of strings"),n);Array.isArray(s)&&r.push.apply(r,s);const o="buffer"===e?W(r):z(r);return this._runTask(o,n)},Y.prototype.diff=function(e,t){const n=l(e)?i("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):z(["diff",...D(arguments)]);return this._runTask(n,p(arguments))},Y.prototype.diffSummary=function(){return this._runTask(O(D(arguments,1)),p(arguments))},Y.prototype.applyPatch=function(e){const t=c(e)?f(o(e),D([].slice.call(arguments,1))):i("git.applyPatch requires one or more string patches as the first argument");return this._runTask(t,p(arguments))},Y.prototype.revparse=function(){const e=["rev-parse",...D(arguments,!0)];return this._runTask(z(e,!0),p(arguments))},Y.prototype.clean=function(e,t,n){const r=_(e),s=r&&e.join("")||h(e,l)||"",i=D([].slice.call(arguments,r?1:0));return this._runTask(v(s,i),p(arguments))},Y.prototype.exec=function(e){const t={commands:[],format:"utf-8",parser(){"function"==typeof e&&e()}};return this._runTask(t)},Y.prototype.clearQueue=function(){return this},Y.prototype.checkIgnore=function(e,t){return this._runTask(b(o(h(e,c,[]))),p(arguments))},Y.prototype.checkIsRepo=function(e,t){return this._runTask(E(h(e,l)),p(arguments))},t.exports=Y}},function(){return da||(0,pa[rn(pa)[0]])((da={exports:{}}).exports,da),da.exports});gn(),Fn();var ga=class extends hn{constructor(e,t){super(void 0,t),this.config=e}};Fn(),Fn();var Fa=class extends hn{constructor(e,t,n){super(e,n),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};function Ca({allowUnsafeProtocolOverride:e=!1,allowUnsafePack:t=!1}={}){return{type:"spawn.args",action:(n,r)=>(n.forEach((s,i)=>{const o=i<n.length?n[i+1]:"";e||function(e,t){if(function(e){return"string"==typeof e&&"-c"===e.trim().toLowerCase()}(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new Fa(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}(s,o),t||function(e,t){if(/^\s*--(upload|receive)-pack/.test(e))throw new Fa(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if("clone"===t&&/^\s*-u\b/.test(e))throw new Fa(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if("push"===t&&/^\s*--exec\b/.test(e))throw new Fa(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}(s,r.method)}),n)}}Cn(),bn(),Tr(),Zr(),ls(),fs(),Cs(),vs(),yr(),yr();var ba=en.deferred().promise;function Ea({onClose:e=!0,onExit:t=50}={}){function n(e,t,n){!1!==e&&(!0===e?t.promise:t.promise.then(()=>Un(e))).then(n.done)}return{type:"spawn.after",async action(r,{spawned:s,close:i}){const o=function(){let r=-1;const s={close:en.deferred(),closeTimeout:en.deferred(),exit:en.deferred(),exitTimeout:en.deferred()},i=Promise.race([!1===e?ba:s.closeTimeout.promise,!1===t?ba: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 u=!0,a=()=>{u=!1};s.stdout?.on("data",a),s.stderr?.on("data",a),s.on("error",a),s.on("close",e=>o.close(e)),s.on("exit",e=>o.exit(e));try{await o.result,u&&await Un(50),i(o.exitCode)}catch(e){i(o.exitCode,e)}}}}yr();var ya="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function wa(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function va(e,t){if(e.length<1||e.length>2)throw new Fa(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(wa)){if(!t)throw new Fa(void 0,"binary",ya);console.warn(ya)}const[n,r]=e;return{binary:n,prefix:r}}function _a(e){return!(!e.exitCode||!e.stdErr.length)}function Oa(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function Ba(e=!1,t=_a,n=Oa){return(r,s)=>!e&&r||!t(s)?r:n(s)}function ka(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 hn(void 0,r.toString("utf-8"))}:{error:r}}}}Fn(),yr();var Aa=class{constructor(){this.plugins=new Set,this.events=new e.EventEmitter}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){const n=xn(this.plugins,{type:e,action:t});return()=>this.plugins.delete(n)}add(e){const t=[];return Rn(e).forEach(e=>e&&this.plugins.add(xn(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 xa(e){return String(e.toLowerCase().split(" ",1))||"unknown"}yr(),yr(),gn(),yr();var Ta=ma();Cn();var Sa,Ra,$a,Ma,ja,La,Pa,Ia,Ua,Na,Ha,Ga,Va,qa,Wa,za=function(e,t){const n=new Aa,r=ar(e&&("string"==typeof e?{baseDir:e}:e)||{},t);if(!An(r.baseDir))throw new ga(r,"Cannot use simple-git on a directory that does not exist");return Array.isArray(r.config)&&n.add(function(e){const t=Ln(e,"-c");return{type:"spawn.args",action:e=>[...t,...e]}}(r.config)),n.add(Ca(r.unsafe)),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(ln(s))r(cn(s));else{if("--"===s){r(e.slice(n+1).flatMap(e=>ln(e)&&cn(e)||e));break}t.push(s)}}return n?[...t,"--",...n.map(String)]:t}}),n.add(Ea(r.completion)),r.abort&&n.add(function(e){if(!e)return;const t={type:"spawn.after",action(t,n){function r(){n.kill(new Fa(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 Fa(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)?Tn(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:xa(n[1]),progress:jn(n[2]),processed:jn(n[3]),total:jn(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(a,e)}function u(){s.spawned.stdout?.off("data",o),s.spawned.stderr?.off("data",o),s.spawned.off("exit",u),s.spawned.off("close",u),i&&clearTimeout(i)}function a(){u(),s.kill(new Fa(void 0,"timeout","block timeout reached"))}n&&s.spawned.stdout?.on("data",o),t&&s.spawned.stderr?.on("data",o),s.spawned.on("exit",u),s.spawned.on("close",u),o()}}}(r.timeout)),r.spawnOptions&&n.add(function(e){const t=In(e,["uid","gid"]);return{type:"spawn.options",action:e=>({...t,...e})}}(r.spawnOptions)),n.add(ka(Ba(!0))),r.errors&&n.add(ka(r.errors)),function(e,t=["git"],n=!1){let r=va(Rn(t),n);e.on("binary",e=>{r=va(Rn(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 Ta(r,n)},Ya={exports:{}};function Ka(){if(Ma)return $a;Ma=1;const e=Ra?Sa:(Ra=1,Sa={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(const n of Object.keys(e))t[e[n]]=n;const n={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"]}};$a=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:r})}function r(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}return n.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,s=Math.min(t,n,r),i=Math.max(t,n,r),o=i-s;let u,a;i===s?u=0:t===i?u=(n-r)/o:n===i?u=2+(r-t)/o:r===i&&(u=4+(t-n)/o),u=Math.min(60*u,360),u<0&&(u+=360);const l=(s+i)/2;return a=i===s?0:l<=.5?o/(i+s):o/(2-i-s),[u,100*a,100*l]},n.rgb.hsv=function(e){let t,n,r,s,i;const o=e[0]/255,u=e[1]/255,a=e[2]/255,l=Math.max(o,u,a),c=l-Math.min(o,u,a),h=function(e){return(l-e)/6/c+.5};return 0===c?(s=0,i=0):(i=c/l,t=h(o),n=h(u),r=h(a),o===l?s=r-n:u===l?s=1/3+t-r:a===l&&(s=2/3+n-t),s<0?s+=1:s>1&&(s-=1)),[360*s,100*i,100*l]},n.rgb.hwb=function(e){const t=e[0],r=e[1];let s=e[2];const i=n.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(r,s));return s=1-1/255*Math.max(t,Math.max(r,s)),[i,100*o,100*s]},n.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,s=Math.min(1-t,1-n,1-r);return[100*((1-t-s)/(1-s)||0),100*((1-n-s)/(1-s)||0),100*((1-r-s)/(1-s)||0),100*s]},n.rgb.keyword=function(n){const s=t[n];if(s)return s;let i,o=1/0;for(const t of Object.keys(e)){const s=r(n,e[t]);s<o&&(o=s,i=t)}return i},n.keyword.rgb=function(t){return e[t]},n.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let r=t[0],s=t[1],i=t[2];r/=95.047,s/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*s-16,500*(r-s),200*(s-i)]},n.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let s,i,o;if(0===n)return o=255*r,[o,o,o];s=r<.5?r*(1+n):r+n-r*n;const u=2*r-s,a=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,o=6*i<1?u+6*(s-u)*i:2*i<1?s:3*i<2?u+(s-u)*(2/3-i)*6:u,a[e]=255*o;return a},n.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,s=n;const i=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,s*=i<=1?i:2-i;return[t,100*(0===r?2*s/(i+s):2*n/(r+n)),100*((r+n)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const s=Math.floor(t)%6,i=t-Math.floor(t),o=255*r*(1-n),u=255*r*(1-n*i),a=255*r*(1-n*(1-i));switch(r*=255,s){case 0:return[r,a,o];case 1:return[u,r,o];case 2:return[o,r,a];case 3:return[o,u,r];case 4:return[a,o,r];case 5:return[r,o,u]}},n.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,s=Math.max(r,.01);let i,o;o=(2-n)*r;const u=(2-n)*s;return i=n*s,i/=u<=1?u:2-u,i=i||0,o/=2,[t,100*i,100*o]},n.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const s=n+r;let i;s>1&&(n/=s,r/=s);const o=Math.floor(6*t),u=1-r;i=6*t-o,1&o&&(i=1-i);const a=n+i*(u-n);let l,c,h;switch(o){default:case 6:case 0:l=u,c=a,h=n;break;case 1:l=a,c=u,h=n;break;case 2:l=n,c=u,h=a;break;case 3:l=n,c=a,h=u;break;case 4:l=a,c=n,h=u;break;case 5:l=u,c=n,h=a}return[255*l,255*c,255*h]},n.cmyk.rgb=function(e){const 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))]},n.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let s,i,o;return s=3.2406*t+-1.5372*n+-.4986*r,i=-.9689*t+1.8758*n+.0415*r,o=.0557*t+-.204*n+1.057*r,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=Math.min(Math.max(0,s),1),i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),[255*s,255*i,255*o]},n.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},n.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const s=n**3,i=t**3,o=r**3;return n=s>.008856?s:(n-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,r=o>.008856?o:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},n.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let s;s=360*Math.atan2(r,n)/2/Math.PI,s<0&&(s+=360);return[t,Math.sqrt(n*n+r*r),s]},n.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},n.rgb.ansi16=function(e,t=null){const[r,s,i]=e;let o=null===t?n.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),0===o)return 30;let u=30+(Math.round(i/255)<<2|Math.round(s/255)<<1|Math.round(r/255));return 2===o&&(u+=60),u},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const 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},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map(e=>e+e).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},n.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,s=Math.max(Math.max(t,n),r),i=Math.min(Math.min(t,n),r),o=s-i;let u,a;return u=o<1?i/(1-o):0,a=o<=0?0:s===t?(n-r)/o%6:s===n?2+(r-t)/o:4+(t-n)/o,a/=6,a%=1,[360*a,100*o,100*u]},n.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let s=0;return r<1&&(s=(n-.5*r)/(1-r)),[e[0],100*r,100*s]},n.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let s=0;return r<1&&(s=(n-r)/(1-r)),[e[0],100*r,100*s]},n.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const s=[0,0,0],i=t%1*6,o=i%1,u=1-o;let a=0;switch(Math.floor(i)){case 0:s[0]=1,s[1]=o,s[2]=0;break;case 1:s[0]=u,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=o;break;case 3:s[0]=0,s[1]=u,s[2]=1;break;case 4:s[0]=o,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=u}return a=(1-n)*r,[255*(n*s[0]+a),255*(n*s[1]+a),255*(n*s[2]+a)]},n.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},n.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let 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]},n.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},n.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let s=0;return r<1&&(s=(n-r)/(1-r)),[e[0],100*r,100*s]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},$a}function Ja(){if(La)return ja;La=1;const e=Ka();function t(t){const n=function(){const t={},n=Object.keys(e);for(let e=n.length,r=0;r<e;r++)t[n[r]]={distance:-1,parent:null};return t}(),r=[t];for(n[t].distance=0;r.length;){const t=r.pop(),s=Object.keys(e[t]);for(let e=s.length,i=0;i<e;i++){const e=s[i],o=n[e];-1===o.distance&&(o.distance=n[t].distance+1,o.parent=t,r.unshift(e))}}return n}function n(e,t){return function(n){return t(e(n))}}function r(t,r){const s=[r[t].parent,t];let i=e[r[t].parent][t],o=r[t].parent;for(;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 ja=function(e){const n=t(e),s={},i=Object.keys(n);for(let e=i.length,t=0;t<e;t++){const e=i[t];null!==n[e].parent&&(s[e]=r(e,n))}return s}}function Qa(){if(Ia)return Pa;Ia=1;const e=Ka(),t=Ja(),n={};return Object.keys(e).forEach(r=>{n[r]={},Object.defineProperty(n[r],"channels",{value:e[r].channels}),Object.defineProperty(n[r],"labels",{value:e[r].labels});const s=t(r);Object.keys(s).forEach(e=>{const t=s[e];n[r][e]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[r][e].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)})}),Pa=n}function Xa(){return Ua||(Ua=1,function(e){const t=(e,t)=>(...n)=>`[${e(...n)+t}m`,n=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};5;${r}m`},r=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};2;${r[0]};${r[1]};${r[2]}m`},s=e=>e,i=(e,t,n)=>[e,t,n],o=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{const r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})};let u;const a=(e,t,n,r)=>{void 0===u&&(u=Qa());const s=r?10:0,i={};for(const[r,o]of Object.entries(u)){const u="ansi16"===r?"ansi":r;r===t?i[u]=e(n,s):"object"==typeof o&&(i[u]=e(o[t],s))}return i};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,u={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};u.color.gray=u.color.blackBright,u.bgColor.bgGray=u.bgColor.bgBlackBright,u.color.grey=u.color.blackBright,u.bgColor.bgGrey=u.bgColor.bgBlackBright;for(const[t,n]of Object.entries(u)){for(const[t,r]of Object.entries(n))u[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=u[t],e.set(r[0],r[1]);Object.defineProperty(u,t,{value:n,enumerable:!1})}return Object.defineProperty(u,"codes",{value:e,enumerable:!1}),u.color.close="[39m",u.bgColor.close="[49m",o(u.color,"ansi",()=>a(t,"ansi16",s,!1)),o(u.color,"ansi256",()=>a(n,"ansi256",s,!1)),o(u.color,"ansi16m",()=>a(r,"rgb",i,!1)),o(u.bgColor,"ansi",()=>a(t,"ansi16",s,!0)),o(u.bgColor,"ansi256",()=>a(n,"ansi256",s,!0)),o(u.bgColor,"ansi16m",()=>a(r,"rgb",i,!0)),u}})}(Ya)),Ya.exports}var Za=function(){if(Wa)return qa;Wa=1;const e=Xa(),{stdout:t,stderr:n}=Vt(),{stringReplaceAll:r,stringEncaseCRLFWithFirstIndex:s}=Ha?Na:(Ha=1,Na={stringReplaceAll:(e,t,n)=>{let r=e.indexOf(t);if(-1===r)return e;const s=t.length;let i=0,o="";do{o+=e.substr(i,r-i)+t+n,i=r+s,r=e.indexOf(t,i)}while(-1!==r);return o+=e.substr(i),o},stringEncaseCRLFWithFirstIndex:(e,t,n,r)=>{let s=0,i="";do{const o="\r"===e[r-1];i+=e.substr(s,(o?r-1:r)-s)+t+(o?"\r\n":"\n")+n,s=r+1,r=e.indexOf("\n",s)}while(-1!==r);return i+=e.substr(s),i}}),{isArray:i}=Array,o=["ansi","ansi","ansi256","ansi16m"],u=Object.create(null);class a{constructor(e){return l(e)}}const l=e=>{const n={};return((e,n={})=>{if(n.level&&!(Number.isInteger(n.level)&&n.level>=0&&n.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const r=t?t.level:0;e.level=void 0===n.level?r:n.level})(n,e),n.template=(...e)=>g(n.template,...e),Object.setPrototypeOf(n,c.prototype),Object.setPrototypeOf(n.template,n),n.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},n.template.Instance=a,n.template};function c(e){return l(e)}for(const[t,n]of Object.entries(e))u[t]={get(){const e=d(this,p(n.open,n.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:e}),e}};u.visible={get(){const e=d(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const h=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const t of h)u[t]={get(){const{level:n}=this;return function(...r){const s=p(e.color[o[n]][t](...r),e.color.close,this._styler);return d(this,s,this._isEmpty)}}};for(const t of h){u["bg"+t[0].toUpperCase()+t.slice(1)]={get(){const{level:n}=this;return function(...r){const s=p(e.bgColor[o[n]][t](...r),e.bgColor.close,this._styler);return d(this,s,this._isEmpty)}}}}const D=Object.defineProperties(()=>{},{...u,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),p=(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}},d=(e,t,n)=>{const r=(...e)=>i(e[0])&&i(e[0].raw)?f(r,g(r,...e)):f(r,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(r,D),r._generator=e,r._styler=t,r._isEmpty=n,r},f=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let n=e._styler;if(void 0===n)return t;const{openAll:i,closeAll:o}=n;if(-1!==t.indexOf(""))for(;void 0!==n;)t=r(t,n.close,n.open),n=n.parent;const u=t.indexOf("\n");return-1!==u&&(t=s(t,o,i,u)),i+t+o};let m;const g=(e,...t)=>{const[n]=t;if(!i(n)||!i(n.raw))return t.join(" ");const r=t.slice(1),s=[n.raw[0]];for(let e=1;e<n.length;e++)s.push(String(r[e-1]).replace(/[{}\\]/g,"\\$&"),String(n.raw[e]));return void 0===m&&(m=function(){if(Va)return Ga;Va=1;const e=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|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}|{[a-f\d]{1,6}})|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){const t="u"===e[0],n="{"===e[1];return t&&!n&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&n?String.fromCodePoint(parseInt(e.slice(2,-1),16)):s.get(e)||e}function o(e,t){const s=[],o=t.trim().split(/\s*,\s*/g);let u;for(const t of o){const o=Number(t);if(Number.isNaN(o)){if(!(u=t.match(n)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);s.push(u[2].replace(r,(e,t,n)=>t?i(t):n))}else s.push(o)}return s}function u(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 a(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,t]of Object.entries(n))if(Array.isArray(t)){if(!(e in r))throw new Error(`Unknown Chalk style: ${e}`);r=t.length>0?r[e](...t):r[e]}return r}return Ga=(t,n)=>{const r=[],s=[];let o=[];if(n.replace(e,(e,n,l,c,h,D)=>{if(n)o.push(i(n));else if(c){const e=o.join("");o=[],s.push(0===r.length?e:a(t,r)(e)),r.push({inverse:l,styles:u(c)})}else if(h){if(0===r.length)throw new Error("Found extraneous } in Chalk template literal");s.push(a(t,r)(o.join(""))),o=[],r.pop()}else o.push(D)}),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("")},Ga}()),m(e,s.join(""))};Object.defineProperties(c.prototype,u);const F=c();return F.supportsColor=t,F.stderr=c({level:n?n.level:0}),F.stderr.supportsColor=n,qa=F}(),el=d(Za);const tl=require("progress-estimator")({spinner:{interval:100,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"].map(e=>el.gray(e))}}),nl={baseDir:process.cwd(),binary:"git",maxConcurrentProcesses:6};async function rl(e){const t=Array.from(yt).map(e=>{const[t,n]=e;return{name:t,value:t,description:n.description}});e||(e=await Ft({message:"Please enter the project name."}));const s=n.resolve(process.cwd(),e);if(r.existsSync(s)){if(!await(i=e,console.warn(`${i} already exists. Do you want to overwrite it?`),Et({message:'if you want to overwrite it, please select "yes".',choices:[{name:"yes",value:!0},{name:"no",value:!1}]})))return;await r.rm(s,{recursive:!0,force:!0},t=>{t?console.error(t):console.log(`${e} has been deleted.`)})}var i;const o=await Et({message:"Please select the project template.",choices:t}),u=yt.get(o);u&&(async(e,t,n)=>{const r=za(nl);try{await tl(r.clone(e,t,n),`Scaffolding project in ${process.cwd()}`,{estimate:3e4}),console.log(el.green("Done.")),console.log(el.blackBright("===================================")),console.log(el.whiteBright("Now you can run:")),console.log(`cd ${el.blueBright(t)}`),console.log(`${el.yellow("npm")} install`)}catch(e){console.error(el.red("clone error"),e)}})(u.downloadUrl,e,["-b",u.branch]),console.log("create",e)}const sl=new G("codenest");sl.version("0.0.1","-v, --version"),sl.command("create").description("Create a new project").argument("[name]","<project-name>").action(async e=>{e?rl(e):console.log("Please specify the project name. For example: codenest create <project-name>")}),sl.parse();
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "codenest-cli",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "codenest-cli 脚手架",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
+
"build": "rollup -c rollup.config.js"
|
|
9
|
+
},
|
|
10
|
+
"keywords": ["Webpack", "Vue", "nodejs", "Element Plus", "koa"],
|
|
11
|
+
"author": "wshiqyuan",
|
|
12
|
+
"bin": {
|
|
13
|
+
"codenest": "bin/index.js"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"bin",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"license": "ISC",
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@inquirer/prompts": "^8.1.0",
|
|
23
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
24
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
25
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
26
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
27
|
+
"@types/node": "^25.0.3",
|
|
28
|
+
"chalk": "4.1.2",
|
|
29
|
+
"commander": "^14.0.2",
|
|
30
|
+
"fs-extra": "^11.3.3",
|
|
31
|
+
"progress-estimator": "^0.3.1",
|
|
32
|
+
"rollup": "^4.53.5",
|
|
33
|
+
"rollup-plugin-node-externals": "^8.1.2",
|
|
34
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
|
35
|
+
"simple-git": "^3.30.0"
|
|
36
|
+
}
|
|
37
|
+
}
|