react-grab 0.0.85 → 0.0.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.cjs CHANGED
@@ -1,155 +1,155 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';var child_process=require('child_process'),Kd=require('fs'),vt=require('path'),ke=require('process'),Jd=require('readline'),my=require('events'),module$1=require('module'),stream=require('stream'),wy=require('os'),mf=require('tty'),zd=require('fs/promises'),http=require('http');var _documentCurrentScript=typeof document!=='undefined'?document.currentScript:null;function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Kd__default=/*#__PURE__*/_interopDefault(Kd);var vt__default=/*#__PURE__*/_interopDefault(vt);var ke__default=/*#__PURE__*/_interopDefault(ke);var Jd__default=/*#__PURE__*/_interopDefault(Jd);var my__default=/*#__PURE__*/_interopDefault(my);var wy__default=/*#__PURE__*/_interopDefault(wy);var mf__default=/*#__PURE__*/_interopDefault(mf);var zd__default=/*#__PURE__*/_interopDefault(zd);var qg=Object.create;var aa=Object.defineProperty;var Lg=Object.getOwnPropertyDescriptor;var jg=Object.getOwnPropertyNames;var Gg=Object.getPrototypeOf,Vg=Object.prototype.hasOwnProperty;var $=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var D=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ug=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of jg(e))!Vg.call(t,i)&&i!==r&&aa(t,i,{get:()=>e[i],enumerable:!(s=Lg(e,i))||s.enumerable});return t};var we=(t,e,r)=>(r=t!=null?qg(Gg(t)):{},Ug(aa(r,"default",{value:t,enumerable:true}),t));var rr=D(hi=>{var qr=class extends Error{constructor(e,r,s){super(s),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=e,this.nestedError=void 0;}},ci=class extends qr{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};hi.CommanderError=qr;hi.InvalidArgumentError=ci;});var Lr=D(fi=>{var{InvalidArgumentError:Wg}=rr(),di=class{constructor(e,r){switch(this.description=r||"",this.variadic=false,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case "<":this.required=true,this._name=e.slice(1,-1);break;case "[":this.required=false,this._name=e.slice(1,-1);break;default:this.required=true,this._name=e;break}this._name.endsWith("...")&&(this.variadic=true,this._name=this._name.slice(0,-3));}name(){return this._name}_collectValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:(r.push(e),r)}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,s)=>{if(!this.argChoices.includes(r))throw new Wg(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,s):r},this}argRequired(){return this.required=true,this}argOptional(){return this.required=false,this}};function Yg(t){let e=t.name()+(t.variadic===true?"...":"");return t.required?"<"+e+">":"["+e+"]"}fi.Argument=di;fi.humanReadableArgName=Yg;});var gi=D(mi=>{var{humanReadableArgName:Jg}=Lr(),pi=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=false,this.sortOptions=false,this.showGlobalOptions=false;}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80;}visibleCommands(e){let r=e.commands.filter(i=>!i._hidden),s=e._getHelpCommand();return s&&!s._hidden&&r.push(s),this.sortSubcommands&&r.sort((i,n)=>i.name().localeCompare(n.name())),r}compareOptions(e,r){let s=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return s(e).localeCompare(s(r))}visibleOptions(e){let r=e.options.filter(i=>!i.hidden),s=e._getHelpOption();if(s&&!s.hidden){let i=s.short&&e._findOption(s.short),n=s.long&&e._findOption(s.long);!i&&!n?r.push(s):s.long&&!n?r.push(e.createOption(s.long,s.description)):s.short&&!i&&r.push(e.createOption(s.short,s.description));}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(e){if(!this.showGlobalOptions)return [];let r=[];for(let s=e.parent;s;s=s.parent){let i=s.options.filter(n=>!n.hidden);r.push(...i);}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(r=>{r.description=r.description||e._argsDescription[r.name()]||"";}),e.registeredArguments.find(r=>r.description)?e.registeredArguments:[]}subcommandTerm(e){let r=e.registeredArguments.map(s=>Jg(s)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,r){return r.visibleCommands(e).reduce((s,i)=>Math.max(s,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(i)))),0)}longestOptionTermLength(e,r){return r.visibleOptions(e).reduce((s,i)=>Math.max(s,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,r){return r.visibleGlobalOptions(e).reduce((s,i)=>Math.max(s,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestArgumentTermLength(e,r){return r.visibleArguments(e).reduce((s,i)=>Math.max(s,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(i)))),0)}commandUsage(e){let r=e._name;e._aliases[0]&&(r=r+"|"+e._aliases[0]);let s="";for(let i=e.parent;i;i=i.parent)s=i.name()+" "+s;return s+r+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(s=>JSON.stringify(s)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&r.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&r.push(`env: ${e.envVar}`),r.length>0){let s=`(${r.join(", ")})`;return e.description?`${e.description} ${s}`:s}return e.description}argumentDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(s=>JSON.stringify(s)).join(", ")}`),e.defaultValue!==void 0&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),r.length>0){let s=`(${r.join(", ")})`;return e.description?`${e.description} ${s}`:s}return e.description}formatItemList(e,r,s){return r.length===0?[]:[s.styleTitle(e),...r,""]}groupItems(e,r,s){let i=new Map;return e.forEach(n=>{let o=s(n);i.has(o)||i.set(o,[]);}),r.forEach(n=>{let o=s(n);i.has(o)||i.set(o,[]),i.get(o).push(n);}),i}formatHelp(e,r){let s=r.padWidth(e,r),i=r.helpWidth??80;function n(c,d){return r.formatItem(c,s,d,r)}let o=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(e))}`,""],u=r.commandDescription(e);u.length>0&&(o=o.concat([r.boxWrap(r.styleCommandDescription(u),i),""]));let a=r.visibleArguments(e).map(c=>n(r.styleArgumentTerm(r.argumentTerm(c)),r.styleArgumentDescription(r.argumentDescription(c))));if(o=o.concat(this.formatItemList("Arguments:",a,r)),this.groupItems(e.options,r.visibleOptions(e),c=>c.helpGroupHeading??"Options:").forEach((c,d)=>{let f=c.map(p=>n(r.styleOptionTerm(r.optionTerm(p)),r.styleOptionDescription(r.optionDescription(p))));o=o.concat(this.formatItemList(d,f,r));}),r.showGlobalOptions){let c=r.visibleGlobalOptions(e).map(d=>n(r.styleOptionTerm(r.optionTerm(d)),r.styleOptionDescription(r.optionDescription(d))));o=o.concat(this.formatItemList("Global Options:",c,r));}return this.groupItems(e.commands,r.visibleCommands(e),c=>c.helpGroup()||"Commands:").forEach((c,d)=>{let f=c.map(p=>n(r.styleSubcommandTerm(r.subcommandTerm(p)),r.styleSubcommandDescription(r.subcommandDescription(p))));o=o.concat(this.formatItemList(d,f,r));}),o.join(`
3
- `)}displayWidth(e){return la(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).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(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).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,r){return Math.max(r.longestOptionTermLength(e,r),r.longestGlobalOptionTermLength(e,r),r.longestSubcommandTermLength(e,r),r.longestArgumentTermLength(e,r))}preformatted(e){return /\n[^\S\r\n]/.test(e)}formatItem(e,r,s,i){let o=" ".repeat(2);if(!s)return o+e;let u=e.padEnd(r+e.length-i.displayWidth(e)),a=2,l=(this.helpWidth??80)-r-a-2,c;return l<this.minWidthToWrap||i.preformatted(s)?c=s:c=i.boxWrap(s,l).replace(/\n/g,`
2
+ 'use strict';var child_process=require('child_process'),Zd=require('fs'),Ft=require('path'),ke=require('process'),Xd=require('readline'),Ey=require('events'),module$1=require('module'),stream=require('stream'),My=require('os'),bf=require('tty'),Qd=require('fs/promises'),http=require('http');var _documentCurrentScript=typeof document!=='undefined'?document.currentScript:null;function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Zd__default=/*#__PURE__*/_interopDefault(Zd);var Ft__default=/*#__PURE__*/_interopDefault(Ft);var ke__default=/*#__PURE__*/_interopDefault(ke);var Xd__default=/*#__PURE__*/_interopDefault(Xd);var Ey__default=/*#__PURE__*/_interopDefault(Ey);var My__default=/*#__PURE__*/_interopDefault(My);var bf__default=/*#__PURE__*/_interopDefault(bf);var Qd__default=/*#__PURE__*/_interopDefault(Qd);var Xg=Object.create;var ha=Object.defineProperty;var Zg=Object.getOwnPropertyDescriptor;var Qg=Object.getOwnPropertyNames;var eD=Object.getPrototypeOf,tD=Object.prototype.hasOwnProperty;var $=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var D=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var rD=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Qg(e))!tD.call(t,i)&&i!==r&&ha(t,i,{get:()=>e[i],enumerable:!(s=Zg(e,i))||s.enumerable});return t};var be=(t,e,r)=>(r=t!=null?Xg(eD(t)):{},rD(ha(r,"default",{value:t,enumerable:true}),t));var or=D(pi=>{var Vr=class extends Error{constructor(e,r,s){super(s),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=e,this.nestedError=void 0;}},fi=class extends Vr{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};pi.CommanderError=Vr;pi.InvalidArgumentError=fi;});var Ur=D(gi=>{var{InvalidArgumentError:sD}=or(),mi=class{constructor(e,r){switch(this.description=r||"",this.variadic=false,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case "<":this.required=true,this._name=e.slice(1,-1);break;case "[":this.required=false,this._name=e.slice(1,-1);break;default:this.required=true,this._name=e;break}this._name.endsWith("...")&&(this.variadic=true,this._name=this._name.slice(0,-3));}name(){return this._name}_collectValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:(r.push(e),r)}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,s)=>{if(!this.argChoices.includes(r))throw new sD(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,s):r},this}argRequired(){return this.required=true,this}argOptional(){return this.required=false,this}};function iD(t){let e=t.name()+(t.variadic===true?"...":"");return t.required?"<"+e+">":"["+e+"]"}gi.Argument=mi;gi.humanReadableArgName=iD;});var yi=D(bi=>{var{humanReadableArgName:nD}=Ur(),Di=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=false,this.sortOptions=false,this.showGlobalOptions=false;}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80;}visibleCommands(e){let r=e.commands.filter(i=>!i._hidden),s=e._getHelpCommand();return s&&!s._hidden&&r.push(s),this.sortSubcommands&&r.sort((i,n)=>i.name().localeCompare(n.name())),r}compareOptions(e,r){let s=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return s(e).localeCompare(s(r))}visibleOptions(e){let r=e.options.filter(i=>!i.hidden),s=e._getHelpOption();if(s&&!s.hidden){let i=s.short&&e._findOption(s.short),n=s.long&&e._findOption(s.long);!i&&!n?r.push(s):s.long&&!n?r.push(e.createOption(s.long,s.description)):s.short&&!i&&r.push(e.createOption(s.short,s.description));}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(e){if(!this.showGlobalOptions)return [];let r=[];for(let s=e.parent;s;s=s.parent){let i=s.options.filter(n=>!n.hidden);r.push(...i);}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(r=>{r.description=r.description||e._argsDescription[r.name()]||"";}),e.registeredArguments.find(r=>r.description)?e.registeredArguments:[]}subcommandTerm(e){let r=e.registeredArguments.map(s=>nD(s)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,r){return r.visibleCommands(e).reduce((s,i)=>Math.max(s,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(i)))),0)}longestOptionTermLength(e,r){return r.visibleOptions(e).reduce((s,i)=>Math.max(s,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,r){return r.visibleGlobalOptions(e).reduce((s,i)=>Math.max(s,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestArgumentTermLength(e,r){return r.visibleArguments(e).reduce((s,i)=>Math.max(s,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(i)))),0)}commandUsage(e){let r=e._name;e._aliases[0]&&(r=r+"|"+e._aliases[0]);let s="";for(let i=e.parent;i;i=i.parent)s=i.name()+" "+s;return s+r+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(s=>JSON.stringify(s)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&r.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&r.push(`env: ${e.envVar}`),r.length>0){let s=`(${r.join(", ")})`;return e.description?`${e.description} ${s}`:s}return e.description}argumentDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(s=>JSON.stringify(s)).join(", ")}`),e.defaultValue!==void 0&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),r.length>0){let s=`(${r.join(", ")})`;return e.description?`${e.description} ${s}`:s}return e.description}formatItemList(e,r,s){return r.length===0?[]:[s.styleTitle(e),...r,""]}groupItems(e,r,s){let i=new Map;return e.forEach(n=>{let o=s(n);i.has(o)||i.set(o,[]);}),r.forEach(n=>{let o=s(n);i.has(o)||i.set(o,[]),i.get(o).push(n);}),i}formatHelp(e,r){let s=r.padWidth(e,r),i=r.helpWidth??80;function n(c,d){return r.formatItem(c,s,d,r)}let o=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(e))}`,""],u=r.commandDescription(e);u.length>0&&(o=o.concat([r.boxWrap(r.styleCommandDescription(u),i),""]));let a=r.visibleArguments(e).map(c=>n(r.styleArgumentTerm(r.argumentTerm(c)),r.styleArgumentDescription(r.argumentDescription(c))));if(o=o.concat(this.formatItemList("Arguments:",a,r)),this.groupItems(e.options,r.visibleOptions(e),c=>c.helpGroupHeading??"Options:").forEach((c,d)=>{let f=c.map(p=>n(r.styleOptionTerm(r.optionTerm(p)),r.styleOptionDescription(r.optionDescription(p))));o=o.concat(this.formatItemList(d,f,r));}),r.showGlobalOptions){let c=r.visibleGlobalOptions(e).map(d=>n(r.styleOptionTerm(r.optionTerm(d)),r.styleOptionDescription(r.optionDescription(d))));o=o.concat(this.formatItemList("Global Options:",c,r));}return this.groupItems(e.commands,r.visibleCommands(e),c=>c.helpGroup()||"Commands:").forEach((c,d)=>{let f=c.map(p=>n(r.styleSubcommandTerm(r.subcommandTerm(p)),r.styleSubcommandDescription(r.subcommandDescription(p))));o=o.concat(this.formatItemList(d,f,r));}),o.join(`
3
+ `)}displayWidth(e){return da(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).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(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).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,r){return Math.max(r.longestOptionTermLength(e,r),r.longestGlobalOptionTermLength(e,r),r.longestSubcommandTermLength(e,r),r.longestArgumentTermLength(e,r))}preformatted(e){return /\n[^\S\r\n]/.test(e)}formatItem(e,r,s,i){let o=" ".repeat(2);if(!s)return o+e;let u=e.padEnd(r+e.length-i.displayWidth(e)),a=2,l=(this.helpWidth??80)-r-a-2,c;return l<this.minWidthToWrap||i.preformatted(s)?c=s:c=i.boxWrap(s,l).replace(/\n/g,`
4
4
  `+" ".repeat(r+a)),o+u+" ".repeat(a)+c.replace(/\n/g,`
5
5
  ${o}`)}boxWrap(e,r){if(r<this.minWidthToWrap)return e;let s=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,n=[];return s.forEach(o=>{let u=o.match(i);if(u===null){n.push("");return}let a=[u.shift()],h=this.displayWidth(a[0]);u.forEach(l=>{let c=this.displayWidth(l);if(h+c<=r){a.push(l),h+=c;return}n.push(a.join(""));let d=l.trimStart();a=[d],h=this.displayWidth(d);}),n.push(a.join(""));}),n.join(`
6
- `)}};function la(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}mi.Help=pi;mi.stripColor=la;});var Ci=D(yi=>{var{InvalidArgumentError:Kg}=rr(),Di=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=false;let s=zg(e);this.short=s.shortFlag,this.long=s.longFlag,this.negate=false,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=false,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0;}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let r=e;return typeof e=="string"&&(r={[e]:true}),this.implied=Object.assign(this.implied||{},r),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=true){return this.mandatory=!!e,this}hideHelp(e=true){return this.hidden=!!e,this}_collectValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:(r.push(e),r)}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,s)=>{if(!this.argChoices.includes(r))throw new Kg(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,s):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?ca(this.name().replace(/^no-/,"")):ca(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}},bi=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r);}),this.negativeOptions.forEach((r,s)=>{this.positiveOptions.has(s)&&this.dualOptions.add(s);});}valueFromOption(e,r){let s=r.attributeName();if(!this.dualOptions.has(s))return true;let i=this.negativeOptions.get(s).presetArg,n=i!==void 0?i:false;return r.negate===(n===e)}};function ca(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function zg(t){let e,r,s=/^-[^-]$/,i=/^--[^-]/,n=t.split(/[ |,]+/).concat("guard");if(s.test(n[0])&&(e=n.shift()),i.test(n[0])&&(r=n.shift()),!e&&s.test(n[0])&&(e=n.shift()),!e&&i.test(n[0])&&(e=r,r=n.shift()),n[0].startsWith("-")){let o=n[0],u=`option creation failed due to '${o}' in option flags '${t}'`;throw /^-[^-][^-]/.test(o)?new Error(`${u}
6
+ `)}};function da(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}bi.Help=Di;bi.stripColor=da;});var _i=D(xi=>{var{InvalidArgumentError:oD}=or(),vi=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=false;let s=uD(e);this.short=s.shortFlag,this.long=s.longFlag,this.negate=false,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=false,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0;}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let r=e;return typeof e=="string"&&(r={[e]:true}),this.implied=Object.assign(this.implied||{},r),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=true){return this.mandatory=!!e,this}hideHelp(e=true){return this.hidden=!!e,this}_collectValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:(r.push(e),r)}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,s)=>{if(!this.argChoices.includes(r))throw new oD(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,s):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?fa(this.name().replace(/^no-/,"")):fa(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}},Ci=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r);}),this.negativeOptions.forEach((r,s)=>{this.positiveOptions.has(s)&&this.dualOptions.add(s);});}valueFromOption(e,r){let s=r.attributeName();if(!this.dualOptions.has(s))return true;let i=this.negativeOptions.get(s).presetArg,n=i!==void 0?i:false;return r.negate===(n===e)}};function fa(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function uD(t){let e,r,s=/^-[^-]$/,i=/^--[^-]/,n=t.split(/[ |,]+/).concat("guard");if(s.test(n[0])&&(e=n.shift()),i.test(n[0])&&(r=n.shift()),!e&&s.test(n[0])&&(e=n.shift()),!e&&i.test(n[0])&&(e=r,r=n.shift()),n[0].startsWith("-")){let o=n[0],u=`option creation failed due to '${o}' in option flags '${t}'`;throw /^-[^-][^-]/.test(o)?new Error(`${u}
7
7
  - a short flag is a single dash and a single character
8
8
  - either use a single dash and a single character (for a short flag)
9
9
  - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):s.test(o)?new Error(`${u}
10
10
  - too many short flags`):i.test(o)?new Error(`${u}
11
11
  - too many long flags`):new Error(`${u}
12
- - unrecognised flag format`)}if(e===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return {shortFlag:e,longFlag:r}}yi.Option=Di;yi.DualOptions=bi;});var da=D(ha=>{function Xg(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let r=[];for(let s=0;s<=t.length;s++)r[s]=[s];for(let s=0;s<=e.length;s++)r[0][s]=s;for(let s=1;s<=e.length;s++)for(let i=1;i<=t.length;i++){let n=1;t[i-1]===e[s-1]?n=0:n=1,r[i][s]=Math.min(r[i-1][s]+1,r[i][s-1]+1,r[i-1][s-1]+n),i>1&&s>1&&t[i-1]===e[s-2]&&t[i-2]===e[s-1]&&(r[i][s]=Math.min(r[i][s],r[i-2][s-2]+1));}return r[t.length][e.length]}function Zg(t,e){if(!e||e.length===0)return "";e=Array.from(new Set(e));let r=t.startsWith("--");r&&(t=t.slice(2),e=e.map(o=>o.slice(2)));let s=[],i=3,n=.4;return e.forEach(o=>{if(o.length<=1)return;let u=Xg(t,o),a=Math.max(t.length,o.length);(a-u)/a>n&&(u<i?(i=u,s=[o]):u===i&&s.push(o));}),s.sort((o,u)=>o.localeCompare(u)),r&&(s=s.map(o=>`--${o}`)),s.length>1?`
12
+ - unrecognised flag format`)}if(e===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return {shortFlag:e,longFlag:r}}xi.Option=vi;xi.DualOptions=Ci;});var ma=D(pa=>{function aD(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let r=[];for(let s=0;s<=t.length;s++)r[s]=[s];for(let s=0;s<=e.length;s++)r[0][s]=s;for(let s=1;s<=e.length;s++)for(let i=1;i<=t.length;i++){let n=1;t[i-1]===e[s-1]?n=0:n=1,r[i][s]=Math.min(r[i-1][s]+1,r[i][s-1]+1,r[i-1][s-1]+n),i>1&&s>1&&t[i-1]===e[s-2]&&t[i-2]===e[s-1]&&(r[i][s]=Math.min(r[i][s],r[i-2][s-2]+1));}return r[t.length][e.length]}function lD(t,e){if(!e||e.length===0)return "";e=Array.from(new Set(e));let r=t.startsWith("--");r&&(t=t.slice(2),e=e.map(o=>o.slice(2)));let s=[],i=3,n=.4;return e.forEach(o=>{if(o.length<=1)return;let u=aD(t,o),a=Math.max(t.length,o.length);(a-u)/a>n&&(u<i?(i=u,s=[o]):u===i&&s.push(o));}),s.sort((o,u)=>o.localeCompare(u)),r&&(s=s.map(o=>`--${o}`)),s.length>1?`
13
13
  (Did you mean one of ${s.join(", ")}?)`:s.length===1?`
14
- (Did you mean ${s[0]}?)`:""}ha.suggestSimilar=Zg;});var ga=D(wi=>{var Qg=$("events").EventEmitter,_i=$("child_process"),ze=$("path"),jr=$("fs"),N=$("process"),{Argument:eD,humanReadableArgName:tD}=Lr(),{CommanderError:vi}=rr(),{Help:rD,stripColor:sD}=gi(),{Option:fa,DualOptions:iD}=Ci(),{suggestSimilar:pa}=da(),xi=class t extends Qg{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=false,this._allowExcessArguments=false,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=false,this._actionHandler=null,this._executableHandler=false,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=true,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=false,this._passThroughOptions=false,this._lifeCycleHooks={},this._showHelpAfterError=false,this._showSuggestionAfterError=true,this._savedState=null,this._outputConfiguration={writeOut:r=>N.stdout.write(r),writeErr:r=>N.stderr.write(r),outputError:(r,s)=>s(r),getOutHelpWidth:()=>N.stdout.isTTY?N.stdout.columns:void 0,getErrHelpWidth:()=>N.stderr.isTTY?N.stderr.columns:void 0,getOutHasColors:()=>Fi()??(N.stdout.isTTY&&N.stdout.hasColors?.()),getErrHasColors:()=>Fi()??(N.stderr.isTTY&&N.stderr.hasColors?.()),stripColor:r=>sD(r)},this._hidden=false,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(){let e=[];for(let r=this;r;r=r.parent)e.push(r);return e}command(e,r,s){let i=r,n=s;typeof i=="object"&&i!==null&&(n=i,i=null),n=n||{};let[,o,u]=e.match(/([^ ]+) *(.*)/),a=this.createCommand(o);return i&&(a.description(i),a._executableHandler=true),n.isDefault&&(this._defaultCommandName=a._name),a._hidden=!!(n.noHelp||n.hidden),a._executableFile=n.executableFile||null,u&&a.arguments(u),this._registerCommand(a),a.parent=this,a.copyInheritedSettings(this),i?this:a}createCommand(e){return new t(e)}createHelp(){return Object.assign(new rD,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=true){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=true){return this._showSuggestionAfterError=!!e,this}addCommand(e,r){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
15
- - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=e._name),(r.noHelp||r.hidden)&&(e._hidden=true),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,r){return new eD(e,r)}argument(e,r,s,i){let n=this.createArgument(e,r);return typeof s=="function"?n.default(i).argParser(s):n.default(s),this.addArgument(n),this}arguments(e){return e.trim().split(/ +/).forEach(r=>{this.argument(r);}),this}addArgument(e){let r=this.registeredArguments.slice(-1)[0];if(r?.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,r){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let s=e??"help [command]",[,i,n]=s.match(/([^ ]+) *(.*)/),o=r??"display help for command",u=this.createCommand(i);return u.helpOption(false),n&&u.arguments(n),o&&u.description(o),this._addImplicitHelpCommand=true,this._helpCommand=u,(e||r)&&this._initCommandGroup(u),this}addHelpCommand(e,r){return typeof e!="object"?(this.helpCommand(e,r),this):(this._addImplicitHelpCommand=true,this._helpCommand=e,this._initCommandGroup(e),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,r){let s=["preSubcommand","preAction","postAction"];if(!s.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
16
- Expecting one of '${s.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,s){this._exitCallback&&this._exitCallback(new vi(e,r,s)),N.exit(e);}action(e){let r=s=>{let i=this.registeredArguments.length,n=s.slice(0,i);return this._storeOptionsAsProperties?n[i]=this:n[i]=this.opts(),n.push(this),e.apply(this,n)};return this._actionHandler=r,this}createOption(e,r){return new fa(e,r)}_callParseArg(e,r,s,i){try{return e.parseArg(r,s)}catch(n){if(n.code==="commander.invalidArgument"){let o=`${i} ${n.message}`;this.error(o,{exitCode:n.exitCode,code:n.code});}throw n}}_registerOption(e){let r=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(r){let s=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 '${s}'
17
- - already used by option '${r.flags}'`)}this._initOptionGroup(e),this.options.push(e);}_registerCommand(e){let r=i=>[i.name()].concat(i.aliases()),s=r(e).find(i=>this._findCommand(i));if(s){let i=r(this._findCommand(s)).join("|"),n=r(e).join("|");throw new Error(`cannot add command '${n}' as already have command '${i}'`)}this._initCommandGroup(e),this.commands.push(e);}addOption(e){this._registerOption(e);let r=e.name(),s=e.attributeName();if(e.negate){let n=e.long.replace(/^--no-/,"--");this._findOption(n)||this.setOptionValueWithSource(s,e.defaultValue===void 0?true:e.defaultValue,"default");}else e.defaultValue!==void 0&&this.setOptionValueWithSource(s,e.defaultValue,"default");let i=(n,o,u)=>{n==null&&e.presetArg!==void 0&&(n=e.presetArg);let a=this.getOptionValue(s);n!==null&&e.parseArg?n=this._callParseArg(e,n,a,o):n!==null&&e.variadic&&(n=e._collectValue(n,a)),n==null&&(e.negate?n=false:e.isBoolean()||e.optional?n=true:n=""),this.setOptionValueWithSource(s,n,u);};return this.on("option:"+r,n=>{let o=`error: option '${e.flags}' argument '${n}' is invalid.`;i(n,o,"cli");}),e.envVar&&this.on("optionEnv:"+r,n=>{let o=`error: option '${e.flags}' value '${n}' from env '${e.envVar}' is invalid.`;i(n,o,"env");}),this}_optionEx(e,r,s,i,n){if(typeof r=="object"&&r instanceof fa)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(r,s);if(o.makeOptionMandatory(!!e.mandatory),typeof i=="function")o.default(n).argParser(i);else if(i instanceof RegExp){let u=i;i=(a,h)=>{let l=u.exec(a);return l?l[0]:h},o.default(n).argParser(i);}else o.default(i);return this.addOption(o)}option(e,r,s,i){return this._optionEx({},e,r,s,i)}requiredOption(e,r,s,i){return this._optionEx({mandatory:true},e,r,s,i)}combineFlagAndOptionalValue(e=true){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=true){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=true){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=true){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=true){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=true){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,r){return this.setOptionValueWithSource(e,r,void 0)}setOptionValueWithSource(e,r,s){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this._optionValueSources[e]=s,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let r;return this._getCommandAndAncestors().forEach(s=>{s.getOptionValueSource(e)!==void 0&&(r=s.getOptionValueSource(e));}),r}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},e===void 0&&r.from===void 0){N.versions?.electron&&(r.from="electron");let i=N.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(r.from="eval");}e===void 0&&(e=N.argv),this.rawArgs=e.slice();let s;switch(r.from){case void 0:case "node":this._scriptPath=e[1],s=e.slice(2);break;case "electron":N.defaultApp?(this._scriptPath=e[1],s=e.slice(2)):s=e.slice(1);break;case "user":s=e.slice(0);break;case "eval":s=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return !this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",s}parse(e,r){this._prepareForParse();let s=this._prepareUserArgs(e,r);return this._parseCommand([],s),this}async parseAsync(e,r){this._prepareForParse();let s=this._prepareUserArgs(e,r);return await this._parseCommand([],s),this}_prepareForParse(){this._savedState===null?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.
18
- - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[];}_checkForMissingExecutable(e,r,s){if(jr.existsSync(e))return;let i=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",n=`'${e}' does not exist
14
+ (Did you mean ${s[0]}?)`:""}pa.suggestSimilar=lD;});var ya=D(Oi=>{var cD=$("events").EventEmitter,wi=$("child_process"),Xe=$("path"),Wr=$("fs"),q=$("process"),{Argument:hD,humanReadableArgName:dD}=Ur(),{CommanderError:Fi}=or(),{Help:fD,stripColor:pD}=yi(),{Option:ga,DualOptions:mD}=_i(),{suggestSimilar:Da}=ma(),Ei=class t extends cD{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=false,this._allowExcessArguments=false,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=false,this._actionHandler=null,this._executableHandler=false,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=true,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=false,this._passThroughOptions=false,this._lifeCycleHooks={},this._showHelpAfterError=false,this._showSuggestionAfterError=true,this._savedState=null,this._outputConfiguration={writeOut:r=>q.stdout.write(r),writeErr:r=>q.stderr.write(r),outputError:(r,s)=>s(r),getOutHelpWidth:()=>q.stdout.isTTY?q.stdout.columns:void 0,getErrHelpWidth:()=>q.stderr.isTTY?q.stderr.columns:void 0,getOutHasColors:()=>Ai()??(q.stdout.isTTY&&q.stdout.hasColors?.()),getErrHasColors:()=>Ai()??(q.stderr.isTTY&&q.stderr.hasColors?.()),stripColor:r=>pD(r)},this._hidden=false,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(){let e=[];for(let r=this;r;r=r.parent)e.push(r);return e}command(e,r,s){let i=r,n=s;typeof i=="object"&&i!==null&&(n=i,i=null),n=n||{};let[,o,u]=e.match(/([^ ]+) *(.*)/),a=this.createCommand(o);return i&&(a.description(i),a._executableHandler=true),n.isDefault&&(this._defaultCommandName=a._name),a._hidden=!!(n.noHelp||n.hidden),a._executableFile=n.executableFile||null,u&&a.arguments(u),this._registerCommand(a),a.parent=this,a.copyInheritedSettings(this),i?this:a}createCommand(e){return new t(e)}createHelp(){return Object.assign(new fD,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=true){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=true){return this._showSuggestionAfterError=!!e,this}addCommand(e,r){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
15
+ - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=e._name),(r.noHelp||r.hidden)&&(e._hidden=true),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,r){return new hD(e,r)}argument(e,r,s,i){let n=this.createArgument(e,r);return typeof s=="function"?n.default(i).argParser(s):n.default(s),this.addArgument(n),this}arguments(e){return e.trim().split(/ +/).forEach(r=>{this.argument(r);}),this}addArgument(e){let r=this.registeredArguments.slice(-1)[0];if(r?.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,r){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let s=e??"help [command]",[,i,n]=s.match(/([^ ]+) *(.*)/),o=r??"display help for command",u=this.createCommand(i);return u.helpOption(false),n&&u.arguments(n),o&&u.description(o),this._addImplicitHelpCommand=true,this._helpCommand=u,(e||r)&&this._initCommandGroup(u),this}addHelpCommand(e,r){return typeof e!="object"?(this.helpCommand(e,r),this):(this._addImplicitHelpCommand=true,this._helpCommand=e,this._initCommandGroup(e),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,r){let s=["preSubcommand","preAction","postAction"];if(!s.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
16
+ Expecting one of '${s.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,s){this._exitCallback&&this._exitCallback(new Fi(e,r,s)),q.exit(e);}action(e){let r=s=>{let i=this.registeredArguments.length,n=s.slice(0,i);return this._storeOptionsAsProperties?n[i]=this:n[i]=this.opts(),n.push(this),e.apply(this,n)};return this._actionHandler=r,this}createOption(e,r){return new ga(e,r)}_callParseArg(e,r,s,i){try{return e.parseArg(r,s)}catch(n){if(n.code==="commander.invalidArgument"){let o=`${i} ${n.message}`;this.error(o,{exitCode:n.exitCode,code:n.code});}throw n}}_registerOption(e){let r=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(r){let s=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 '${s}'
17
+ - already used by option '${r.flags}'`)}this._initOptionGroup(e),this.options.push(e);}_registerCommand(e){let r=i=>[i.name()].concat(i.aliases()),s=r(e).find(i=>this._findCommand(i));if(s){let i=r(this._findCommand(s)).join("|"),n=r(e).join("|");throw new Error(`cannot add command '${n}' as already have command '${i}'`)}this._initCommandGroup(e),this.commands.push(e);}addOption(e){this._registerOption(e);let r=e.name(),s=e.attributeName();if(e.negate){let n=e.long.replace(/^--no-/,"--");this._findOption(n)||this.setOptionValueWithSource(s,e.defaultValue===void 0?true:e.defaultValue,"default");}else e.defaultValue!==void 0&&this.setOptionValueWithSource(s,e.defaultValue,"default");let i=(n,o,u)=>{n==null&&e.presetArg!==void 0&&(n=e.presetArg);let a=this.getOptionValue(s);n!==null&&e.parseArg?n=this._callParseArg(e,n,a,o):n!==null&&e.variadic&&(n=e._collectValue(n,a)),n==null&&(e.negate?n=false:e.isBoolean()||e.optional?n=true:n=""),this.setOptionValueWithSource(s,n,u);};return this.on("option:"+r,n=>{let o=`error: option '${e.flags}' argument '${n}' is invalid.`;i(n,o,"cli");}),e.envVar&&this.on("optionEnv:"+r,n=>{let o=`error: option '${e.flags}' value '${n}' from env '${e.envVar}' is invalid.`;i(n,o,"env");}),this}_optionEx(e,r,s,i,n){if(typeof r=="object"&&r instanceof ga)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(r,s);if(o.makeOptionMandatory(!!e.mandatory),typeof i=="function")o.default(n).argParser(i);else if(i instanceof RegExp){let u=i;i=(a,h)=>{let l=u.exec(a);return l?l[0]:h},o.default(n).argParser(i);}else o.default(i);return this.addOption(o)}option(e,r,s,i){return this._optionEx({},e,r,s,i)}requiredOption(e,r,s,i){return this._optionEx({mandatory:true},e,r,s,i)}combineFlagAndOptionalValue(e=true){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=true){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=true){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=true){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=true){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=true){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,r){return this.setOptionValueWithSource(e,r,void 0)}setOptionValueWithSource(e,r,s){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this._optionValueSources[e]=s,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let r;return this._getCommandAndAncestors().forEach(s=>{s.getOptionValueSource(e)!==void 0&&(r=s.getOptionValueSource(e));}),r}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},e===void 0&&r.from===void 0){q.versions?.electron&&(r.from="electron");let i=q.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(r.from="eval");}e===void 0&&(e=q.argv),this.rawArgs=e.slice();let s;switch(r.from){case void 0:case "node":this._scriptPath=e[1],s=e.slice(2);break;case "electron":q.defaultApp?(this._scriptPath=e[1],s=e.slice(2)):s=e.slice(1);break;case "user":s=e.slice(0);break;case "eval":s=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return !this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",s}parse(e,r){this._prepareForParse();let s=this._prepareUserArgs(e,r);return this._parseCommand([],s),this}async parseAsync(e,r){this._prepareForParse();let s=this._prepareUserArgs(e,r);return await this._parseCommand([],s),this}_prepareForParse(){this._savedState===null?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.
18
+ - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[];}_checkForMissingExecutable(e,r,s){if(Wr.existsSync(e))return;let i=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",n=`'${e}' does not exist
19
19
  - if '${s}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
20
20
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
21
- - ${i}`;throw new Error(n)}_executeSubCommand(e,r){r=r.slice();let s=false,i=[".js",".ts",".tsx",".mjs",".cjs"];function n(l,c){let d=ze.resolve(l,c);if(jr.existsSync(d))return d;if(i.includes(ze.extname(c)))return;let f=i.find(p=>jr.existsSync(`${d}${p}`));if(f)return `${d}${f}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,u=this._executableDir||"";if(this._scriptPath){let l;try{l=jr.realpathSync(this._scriptPath);}catch{l=this._scriptPath;}u=ze.resolve(ze.dirname(l),u);}if(u){let l=n(u,o);if(!l&&!e._executableFile&&this._scriptPath){let c=ze.basename(this._scriptPath,ze.extname(this._scriptPath));c!==this._name&&(l=n(u,`${c}-${e._name}`));}o=l||o;}s=i.includes(ze.extname(o));let a;N.platform!=="win32"?s?(r.unshift(o),r=ma(N.execArgv).concat(r),a=_i.spawn(N.argv[0],r,{stdio:"inherit"})):a=_i.spawn(o,r,{stdio:"inherit"}):(this._checkForMissingExecutable(o,u,e._name),r.unshift(o),r=ma(N.execArgv).concat(r),a=_i.spawn(N.execPath,r,{stdio:"inherit"})),a.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{N.on(c,()=>{a.killed===false&&a.exitCode===null&&a.kill(c);});});let h=this._exitCallback;a.on("close",l=>{l=l??1,h?h(new vi(l,"commander.executeSubCommandAsync","(close)")):N.exit(l);}),a.on("error",l=>{if(l.code==="ENOENT")this._checkForMissingExecutable(o,u,e._name);else if(l.code==="EACCES")throw new Error(`'${o}' not executable`);if(!h)N.exit(1);else {let c=new vi(1,"commander.executeSubCommandAsync","(error)");c.nestedError=l,h(c);}}),this.runningCommand=a;}_dispatchSubcommand(e,r,s){let i=this._findCommand(e);i||this.help({error:true}),i._prepareForParse();let n;return n=this._chainOrCallSubCommandHook(n,i,"preSubcommand"),n=this._chainOrCall(n,()=>{if(i._executableHandler)this._executeSubCommand(i,r.concat(s));else return i._parseCommand(r,s)}),n}_dispatchHelpCommand(e){e||this.help();let r=this._findCommand(e);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,r)=>{e.required&&this.args[r]==null&&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(){let e=(s,i,n)=>{let o=i;if(i!==null&&s.parseArg){let u=`error: command-argument value '${i}' is invalid for argument '${s.name()}'.`;o=this._callParseArg(s,i,n,u);}return o};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((s,i)=>{let n=s.defaultValue;s.variadic?i<this.args.length?(n=this.args.slice(i),s.parseArg&&(n=n.reduce((o,u)=>e(s,u,o),s.defaultValue))):n===void 0&&(n=[]):i<this.args.length&&(n=this.args[i],s.parseArg&&(n=e(s,n,s.defaultValue))),r[i]=n;}),this.processedArgs=r;}_chainOrCall(e,r){return e?.then&&typeof e.then=="function"?e.then(()=>r()):r()}_chainOrCallHooks(e,r){let s=e,i=[];return this._getCommandAndAncestors().reverse().filter(n=>n._lifeCycleHooks[r]!==void 0).forEach(n=>{n._lifeCycleHooks[r].forEach(o=>{i.push({hookedCommand:n,callback:o});});}),r==="postAction"&&i.reverse(),i.forEach(n=>{s=this._chainOrCall(s,()=>n.callback(n.hookedCommand,this));}),s}_chainOrCallSubCommandHook(e,r,s){let i=e;return this._lifeCycleHooks[s]!==void 0&&this._lifeCycleHooks[s].forEach(n=>{i=this._chainOrCall(i,()=>n(this,r));}),i}_parseCommand(e,r){let s=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(s.operands),r=s.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,e,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:true}),this._outputHelpIfRequested(s.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{s.unknown.length>0&&this.unknownOption(s.unknown[0]);},n=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(n,e,r);})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent?.listenerCount(n))i(),this._processArguments(),this.parent.emit(n,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(i(),this._processArguments());}else this.commands.length?(i(),this.help({error:true})):(i(),this._processArguments());}_findCommand(e){if(e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r);});});}_checkForConflictingLocalOptions(){let e=this.options.filter(s=>{let i=s.attributeName();return this.getOptionValue(i)===void 0?false:this.getOptionValueSource(i)!=="default"});e.filter(s=>s.conflictsWith.length>0).forEach(s=>{let i=e.find(n=>s.conflictsWith.includes(n.attributeName()));i&&this._conflictingOption(s,i);});}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions();});}parseOptions(e){let r=[],s=[],i=r;function n(l){return l.length>1&&l[0]==="-"}let o=l=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(l)?!this._getCommandAndAncestors().some(c=>c.options.map(d=>d.short).some(d=>/^-\d$/.test(d))):false,u=null,a=null,h=0;for(;h<e.length||a;){let l=a??e[h++];if(a=null,l==="--"){i===s&&i.push(l),i.push(...e.slice(h));break}if(u&&(!n(l)||o(l))){this.emit(`option:${u.name()}`,l);continue}if(u=null,n(l)){let c=this._findOption(l);if(c){if(c.required){let d=e[h++];d===void 0&&this.optionMissingArgument(c),this.emit(`option:${c.name()}`,d);}else if(c.optional){let d=null;h<e.length&&(!n(e[h])||o(e[h]))&&(d=e[h++]),this.emit(`option:${c.name()}`,d);}else this.emit(`option:${c.name()}`);u=c.variadic?c:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let c=this._findOption(`-${l[1]}`);if(c){c.required||c.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${c.name()}`,l.slice(2)):(this.emit(`option:${c.name()}`),a=`-${l.slice(2)}`);continue}}if(/^--[^=]+=/.test(l)){let c=l.indexOf("="),d=this._findOption(l.slice(0,c));if(d&&(d.required||d.optional)){this.emit(`option:${d.name()}`,l.slice(c+1));continue}}if(i===r&&n(l)&&!(this.commands.length===0&&o(l))&&(i=s),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&s.length===0){if(this._findCommand(l)){r.push(l),s.push(...e.slice(h));break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){r.push(l,...e.slice(h));break}else if(this._defaultCommandName){s.push(l,...e.slice(h));break}}if(this._passThroughOptions){i.push(l,...e.slice(h));break}i.push(l);}return {operands:r,unknown:s}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let s=0;s<r;s++){let i=this.options[s].attributeName();e[i]=i===this._versionOptionName?this._version:this[i];}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,r)=>Object.assign(e,r.opts()),{})}error(e,r){this._outputConfiguration.outputError(`${e}
21
+ - ${i}`;throw new Error(n)}_executeSubCommand(e,r){r=r.slice();let s=false,i=[".js",".ts",".tsx",".mjs",".cjs"];function n(l,c){let d=Xe.resolve(l,c);if(Wr.existsSync(d))return d;if(i.includes(Xe.extname(c)))return;let f=i.find(p=>Wr.existsSync(`${d}${p}`));if(f)return `${d}${f}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,u=this._executableDir||"";if(this._scriptPath){let l;try{l=Wr.realpathSync(this._scriptPath);}catch{l=this._scriptPath;}u=Xe.resolve(Xe.dirname(l),u);}if(u){let l=n(u,o);if(!l&&!e._executableFile&&this._scriptPath){let c=Xe.basename(this._scriptPath,Xe.extname(this._scriptPath));c!==this._name&&(l=n(u,`${c}-${e._name}`));}o=l||o;}s=i.includes(Xe.extname(o));let a;q.platform!=="win32"?s?(r.unshift(o),r=ba(q.execArgv).concat(r),a=wi.spawn(q.argv[0],r,{stdio:"inherit"})):a=wi.spawn(o,r,{stdio:"inherit"}):(this._checkForMissingExecutable(o,u,e._name),r.unshift(o),r=ba(q.execArgv).concat(r),a=wi.spawn(q.execPath,r,{stdio:"inherit"})),a.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{q.on(c,()=>{a.killed===false&&a.exitCode===null&&a.kill(c);});});let h=this._exitCallback;a.on("close",l=>{l=l??1,h?h(new Fi(l,"commander.executeSubCommandAsync","(close)")):q.exit(l);}),a.on("error",l=>{if(l.code==="ENOENT")this._checkForMissingExecutable(o,u,e._name);else if(l.code==="EACCES")throw new Error(`'${o}' not executable`);if(!h)q.exit(1);else {let c=new Fi(1,"commander.executeSubCommandAsync","(error)");c.nestedError=l,h(c);}}),this.runningCommand=a;}_dispatchSubcommand(e,r,s){let i=this._findCommand(e);i||this.help({error:true}),i._prepareForParse();let n;return n=this._chainOrCallSubCommandHook(n,i,"preSubcommand"),n=this._chainOrCall(n,()=>{if(i._executableHandler)this._executeSubCommand(i,r.concat(s));else return i._parseCommand(r,s)}),n}_dispatchHelpCommand(e){e||this.help();let r=this._findCommand(e);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,r)=>{e.required&&this.args[r]==null&&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(){let e=(s,i,n)=>{let o=i;if(i!==null&&s.parseArg){let u=`error: command-argument value '${i}' is invalid for argument '${s.name()}'.`;o=this._callParseArg(s,i,n,u);}return o};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((s,i)=>{let n=s.defaultValue;s.variadic?i<this.args.length?(n=this.args.slice(i),s.parseArg&&(n=n.reduce((o,u)=>e(s,u,o),s.defaultValue))):n===void 0&&(n=[]):i<this.args.length&&(n=this.args[i],s.parseArg&&(n=e(s,n,s.defaultValue))),r[i]=n;}),this.processedArgs=r;}_chainOrCall(e,r){return e?.then&&typeof e.then=="function"?e.then(()=>r()):r()}_chainOrCallHooks(e,r){let s=e,i=[];return this._getCommandAndAncestors().reverse().filter(n=>n._lifeCycleHooks[r]!==void 0).forEach(n=>{n._lifeCycleHooks[r].forEach(o=>{i.push({hookedCommand:n,callback:o});});}),r==="postAction"&&i.reverse(),i.forEach(n=>{s=this._chainOrCall(s,()=>n.callback(n.hookedCommand,this));}),s}_chainOrCallSubCommandHook(e,r,s){let i=e;return this._lifeCycleHooks[s]!==void 0&&this._lifeCycleHooks[s].forEach(n=>{i=this._chainOrCall(i,()=>n(this,r));}),i}_parseCommand(e,r){let s=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(s.operands),r=s.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,e,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:true}),this._outputHelpIfRequested(s.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{s.unknown.length>0&&this.unknownOption(s.unknown[0]);},n=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(n,e,r);})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent?.listenerCount(n))i(),this._processArguments(),this.parent.emit(n,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(i(),this._processArguments());}else this.commands.length?(i(),this.help({error:true})):(i(),this._processArguments());}_findCommand(e){if(e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r);});});}_checkForConflictingLocalOptions(){let e=this.options.filter(s=>{let i=s.attributeName();return this.getOptionValue(i)===void 0?false:this.getOptionValueSource(i)!=="default"});e.filter(s=>s.conflictsWith.length>0).forEach(s=>{let i=e.find(n=>s.conflictsWith.includes(n.attributeName()));i&&this._conflictingOption(s,i);});}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions();});}parseOptions(e){let r=[],s=[],i=r;function n(l){return l.length>1&&l[0]==="-"}let o=l=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(l)?!this._getCommandAndAncestors().some(c=>c.options.map(d=>d.short).some(d=>/^-\d$/.test(d))):false,u=null,a=null,h=0;for(;h<e.length||a;){let l=a??e[h++];if(a=null,l==="--"){i===s&&i.push(l),i.push(...e.slice(h));break}if(u&&(!n(l)||o(l))){this.emit(`option:${u.name()}`,l);continue}if(u=null,n(l)){let c=this._findOption(l);if(c){if(c.required){let d=e[h++];d===void 0&&this.optionMissingArgument(c),this.emit(`option:${c.name()}`,d);}else if(c.optional){let d=null;h<e.length&&(!n(e[h])||o(e[h]))&&(d=e[h++]),this.emit(`option:${c.name()}`,d);}else this.emit(`option:${c.name()}`);u=c.variadic?c:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let c=this._findOption(`-${l[1]}`);if(c){c.required||c.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${c.name()}`,l.slice(2)):(this.emit(`option:${c.name()}`),a=`-${l.slice(2)}`);continue}}if(/^--[^=]+=/.test(l)){let c=l.indexOf("="),d=this._findOption(l.slice(0,c));if(d&&(d.required||d.optional)){this.emit(`option:${d.name()}`,l.slice(c+1));continue}}if(i===r&&n(l)&&!(this.commands.length===0&&o(l))&&(i=s),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&s.length===0){if(this._findCommand(l)){r.push(l),s.push(...e.slice(h));break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){r.push(l,...e.slice(h));break}else if(this._defaultCommandName){s.push(l,...e.slice(h));break}}if(this._passThroughOptions){i.push(l,...e.slice(h));break}i.push(l);}return {operands:r,unknown:s}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let s=0;s<r;s++){let i=this.options[s].attributeName();e[i]=i===this._versionOptionName?this._version:this[i];}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,r)=>Object.assign(e,r.opts()),{})}error(e,r){this._outputConfiguration.outputError(`${e}
22
22
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
23
23
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
24
- `),this.outputHelp({error:true}));let s=r||{},i=s.exitCode||1,n=s.code||"commander.error";this._exit(i,n,e);}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in N.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,N.env[e.envVar]):this.emit(`optionEnv:${e.name()}`));}});}_parseOptionsImplied(){let e=new iD(this.options),r=s=>this.getOptionValue(s)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(s));this.options.filter(s=>s.implied!==void 0&&r(s.attributeName())&&e.valueFromOption(this.getOptionValue(s.attributeName()),s)).forEach(s=>{Object.keys(s.implied).filter(i=>!r(i)).forEach(i=>{this.setOptionValueWithSource(i,s.implied[i],"implied");});});}missingArgument(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"});}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"});}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"});}_conflictingOption(e,r){let s=o=>{let u=o.attributeName(),a=this.getOptionValue(u),h=this.options.find(c=>c.negate&&u===c.attributeName()),l=this.options.find(c=>!c.negate&&u===c.attributeName());return h&&(h.presetArg===void 0&&a===false||h.presetArg!==void 0&&a===h.presetArg)?h:l||o},i=o=>{let u=s(o),a=u.attributeName();return this.getOptionValueSource(a)==="env"?`environment variable '${u.envVar}'`:`option '${u.flags}'`},n=`error: ${i(e)} cannot be used with ${i(r)}`;this.error(n,{code:"commander.conflictingOption"});}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],n=this;do{let o=n.createHelp().visibleOptions(n).filter(u=>u.long).map(u=>u.long);i=i.concat(o),n=n.parent;}while(n&&!n._enablePositionalOptions);r=pa(e,i);}let s=`error: unknown option '${e}'${r}`;this.error(s,{code:"commander.unknownOption"});}_excessArguments(e){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,s=r===1?"":"s",n=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${s} but got ${e.length}.`;this.error(n,{code:"commander.excessArguments"});}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(n=>{i.push(n.name()),n.alias()&&i.push(n.alias());}),r=pa(e,i);}let s=`error: unknown command '${e}'${r}`;this.error(s,{code:"commander.unknownCommand"});}version(e,r,s){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",s=s||"output the version number";let i=this.createOption(r,s);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
25
- `),this._exit(0,"commander.version",e);}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),e===r._name)throw new Error("Command alias can't be the same as its name");let s=this.parent?._findCommand(e);if(s){let i=[s.name()].concat(s.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(s=>tD(s));return [].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?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=ze.basename(e,ze.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp(),s=this._getOutputContext(e);r.prepareContext({error:s.error,helpWidth:s.helpWidth,outputHasColors:s.hasColors});let i=r.formatHelp(this,r);return s.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let r=!!e.error,s,i,n;return r?(s=u=>this._outputConfiguration.writeErr(u),i=this._outputConfiguration.getErrHasColors(),n=this._outputConfiguration.getErrHelpWidth()):(s=u=>this._outputConfiguration.writeOut(u),i=this._outputConfiguration.getOutHasColors(),n=this._outputConfiguration.getOutHelpWidth()),{error:r,write:u=>(i||(u=this._outputConfiguration.stripColor(u)),s(u)),hasColors:i,helpWidth:n}}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let s=this._getOutputContext(e),i={error:s.error,write:s.write,command:this};this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let n=this.helpInformation({error:s.error});if(r&&(n=r(n),typeof n!="string"&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");s.write(n),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",i));}helpOption(e,r){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",r??"display help for command"),(e||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let r=Number(N.exitCode??0);r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)");}addHelpText(e,r){let s=["beforeAll","before","after","afterAll"];if(!s.includes(e))throw new Error(`Unexpected value for position to addHelpText.
24
+ `),this.outputHelp({error:true}));let s=r||{},i=s.exitCode||1,n=s.code||"commander.error";this._exit(i,n,e);}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in q.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,q.env[e.envVar]):this.emit(`optionEnv:${e.name()}`));}});}_parseOptionsImplied(){let e=new mD(this.options),r=s=>this.getOptionValue(s)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(s));this.options.filter(s=>s.implied!==void 0&&r(s.attributeName())&&e.valueFromOption(this.getOptionValue(s.attributeName()),s)).forEach(s=>{Object.keys(s.implied).filter(i=>!r(i)).forEach(i=>{this.setOptionValueWithSource(i,s.implied[i],"implied");});});}missingArgument(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"});}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"});}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"});}_conflictingOption(e,r){let s=o=>{let u=o.attributeName(),a=this.getOptionValue(u),h=this.options.find(c=>c.negate&&u===c.attributeName()),l=this.options.find(c=>!c.negate&&u===c.attributeName());return h&&(h.presetArg===void 0&&a===false||h.presetArg!==void 0&&a===h.presetArg)?h:l||o},i=o=>{let u=s(o),a=u.attributeName();return this.getOptionValueSource(a)==="env"?`environment variable '${u.envVar}'`:`option '${u.flags}'`},n=`error: ${i(e)} cannot be used with ${i(r)}`;this.error(n,{code:"commander.conflictingOption"});}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],n=this;do{let o=n.createHelp().visibleOptions(n).filter(u=>u.long).map(u=>u.long);i=i.concat(o),n=n.parent;}while(n&&!n._enablePositionalOptions);r=Da(e,i);}let s=`error: unknown option '${e}'${r}`;this.error(s,{code:"commander.unknownOption"});}_excessArguments(e){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,s=r===1?"":"s",n=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${s} but got ${e.length}.`;this.error(n,{code:"commander.excessArguments"});}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(n=>{i.push(n.name()),n.alias()&&i.push(n.alias());}),r=Da(e,i);}let s=`error: unknown command '${e}'${r}`;this.error(s,{code:"commander.unknownCommand"});}version(e,r,s){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",s=s||"output the version number";let i=this.createOption(r,s);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
25
+ `),this._exit(0,"commander.version",e);}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),e===r._name)throw new Error("Command alias can't be the same as its name");let s=this.parent?._findCommand(e);if(s){let i=[s.name()].concat(s.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(s=>dD(s));return [].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?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=Xe.basename(e,Xe.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp(),s=this._getOutputContext(e);r.prepareContext({error:s.error,helpWidth:s.helpWidth,outputHasColors:s.hasColors});let i=r.formatHelp(this,r);return s.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let r=!!e.error,s,i,n;return r?(s=u=>this._outputConfiguration.writeErr(u),i=this._outputConfiguration.getErrHasColors(),n=this._outputConfiguration.getErrHelpWidth()):(s=u=>this._outputConfiguration.writeOut(u),i=this._outputConfiguration.getOutHasColors(),n=this._outputConfiguration.getOutHelpWidth()),{error:r,write:u=>(i||(u=this._outputConfiguration.stripColor(u)),s(u)),hasColors:i,helpWidth:n}}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let s=this._getOutputContext(e),i={error:s.error,write:s.write,command:this};this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let n=this.helpInformation({error:s.error});if(r&&(n=r(n),typeof n!="string"&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");s.write(n),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",i));}helpOption(e,r){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",r??"display help for command"),(e||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let r=Number(q.exitCode??0);r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)");}addHelpText(e,r){let s=["beforeAll","before","after","afterAll"];if(!s.includes(e))throw new Error(`Unexpected value for position to addHelpText.
26
26
  Expecting one of '${s.join("', '")}'`);let i=`${e}Help`;return this.on(i,n=>{let o;typeof r=="function"?o=r({error:n.error,command:n.command}):o=r,o&&n.write(`${o}
27
- `);}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"));}};function ma(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,s="127.0.0.1",i="9229",n;return (n=e.match(/^(--inspect(-brk)?)$/))!==null?r=n[1]:(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=n[1],/^\d+$/.test(n[3])?i=n[3]:s=n[3]):(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=n[1],s=n[3],i=n[4]),r&&i!=="0"?`${r}=${s}:${parseInt(i)+1}`:e})}function Fi(){if(N.env.NO_COLOR||N.env.FORCE_COLOR==="0"||N.env.FORCE_COLOR==="false")return false;if(N.env.FORCE_COLOR||N.env.CLICOLOR_FORCE!==void 0)return true}wi.Command=xi;wi.useColor=Fi;});var Ca=D(_e=>{var{Argument:Da}=Lr(),{Command:Ei}=ga(),{CommanderError:nD,InvalidArgumentError:ba}=rr(),{Help:oD}=gi(),{Option:ya}=Ci();_e.program=new Ei;_e.createCommand=t=>new Ei(t);_e.createOption=(t,e)=>new ya(t,e);_e.createArgument=(t,e)=>new Da(t,e);_e.Command=Ei;_e.Option=ya;_e.Argument=Da;_e.Help=oD;_e.CommanderError=nD;_e.InvalidArgumentError=ba;_e.InvalidOptionArgumentError=ba;});var sr=D(($E,Ai)=>{var Vr=process||{},va=Vr.argv||[],Gr=Vr.env||{},uD=!(Gr.NO_COLOR||va.includes("--no-color"))&&(!!Gr.FORCE_COLOR||va.includes("--color")||Vr.platform==="win32"||(Vr.stdout||{}).isTTY&&Gr.TERM!=="dumb"||!!Gr.CI),aD=(t,e,r=t)=>s=>{let i=""+s,n=i.indexOf(e,t.length);return ~n?t+lD(i,e,r,n)+e:t+i+e},lD=(t,e,r,s)=>{let i="",n=0;do i+=t.substring(n,s)+r,n=s+e.length,s=t.indexOf(e,n);while(~s);return i+t.substring(n)},xa=(t=uD)=>{let e=t?aD:()=>String;return {isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};Ai.exports=xa();Ai.exports.createColors=xa;});var X=D((kE,wa)=>{var{FORCE_COLOR:cD,NODE_DISABLE_COLORS:hD,TERM:dD}=process.env,q={enabled:!hD&&dD!=="dumb"&&cD!=="0",reset:G(0,0),bold:G(1,22),dim:G(2,22),italic:G(3,23),underline:G(4,24),inverse:G(7,27),hidden:G(8,28),strikethrough:G(9,29),black:G(30,39),red:G(31,39),green:G(32,39),yellow:G(33,39),blue:G(34,39),magenta:G(35,39),cyan:G(36,39),white:G(37,39),gray:G(90,39),grey:G(90,39),bgBlack:G(40,49),bgRed:G(41,49),bgGreen:G(42,49),bgYellow:G(43,49),bgBlue:G(44,49),bgMagenta:G(45,49),bgCyan:G(46,49),bgWhite:G(47,49)};function Fa(t,e){let r=0,s,i="",n="";for(;r<t.length;r++)s=t[r],i+=s.open,n+=s.close,e.includes(s.close)&&(e=e.replace(s.rgx,s.close+s.open));return i+e+n}function fD(t,e){let r={has:t,keys:e};return r.reset=q.reset.bind(r),r.bold=q.bold.bind(r),r.dim=q.dim.bind(r),r.italic=q.italic.bind(r),r.underline=q.underline.bind(r),r.inverse=q.inverse.bind(r),r.hidden=q.hidden.bind(r),r.strikethrough=q.strikethrough.bind(r),r.black=q.black.bind(r),r.red=q.red.bind(r),r.green=q.green.bind(r),r.yellow=q.yellow.bind(r),r.blue=q.blue.bind(r),r.magenta=q.magenta.bind(r),r.cyan=q.cyan.bind(r),r.white=q.white.bind(r),r.gray=q.gray.bind(r),r.grey=q.grey.bind(r),r.bgBlack=q.bgBlack.bind(r),r.bgRed=q.bgRed.bind(r),r.bgGreen=q.bgGreen.bind(r),r.bgYellow=q.bgYellow.bind(r),r.bgBlue=q.bgBlue.bind(r),r.bgMagenta=q.bgMagenta.bind(r),r.bgCyan=q.bgCyan.bind(r),r.bgWhite=q.bgWhite.bind(r),r}function G(t,e){let r={open:`\x1B[${t}m`,close:`\x1B[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(s){return this!==void 0&&this.has!==void 0?(this.has.includes(t)||(this.has.push(t),this.keys.push(r)),s===void 0?this:q.enabled?Fa(this.keys,s+""):s+""):s===void 0?fD([t],[r]):q.enabled?Fa([r],s+""):s+""}}wa.exports=q;});var Aa=D((IE,Ea)=>{Ea.exports=(t,e)=>{if(!(t.meta&&t.name!=="escape")){if(t.ctrl){if(t.name==="a")return "first";if(t.name==="c"||t.name==="d")return "abort";if(t.name==="e")return "last";if(t.name==="g")return "reset"}if(e){if(t.name==="j")return "down";if(t.name==="k")return "up"}return t.name==="return"||t.name==="enter"?"submit":t.name==="backspace"?"delete":t.name==="delete"?"deleteForward":t.name==="abort"?"abort":t.name==="escape"?"exit":t.name==="tab"?"next":t.name==="pagedown"?"nextPage":t.name==="pageup"?"prevPage":t.name==="home"?"home":t.name==="end"?"end":t.name==="up"?"up":t.name==="down"?"down":t.name==="right"?"right":t.name==="left"?"left":false}};});var Ur=D((BE,Oa)=>{Oa.exports=t=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),r=new RegExp(e,"g");return typeof t=="string"?t.replace(r,""):t};});var Q=D((ME,Sa)=>{var Oi="\x1B",Z=`${Oi}[`,pD="\x07",Si={to(t,e){return e?`${Z}${e+1};${t+1}H`:`${Z}${t+1}G`},move(t,e){let r="";return t<0?r+=`${Z}${-t}D`:t>0&&(r+=`${Z}${t}C`),e<0?r+=`${Z}${-e}A`:e>0&&(r+=`${Z}${e}B`),r},up:(t=1)=>`${Z}${t}A`,down:(t=1)=>`${Z}${t}B`,forward:(t=1)=>`${Z}${t}C`,backward:(t=1)=>`${Z}${t}D`,nextLine:(t=1)=>`${Z}E`.repeat(t),prevLine:(t=1)=>`${Z}F`.repeat(t),left:`${Z}G`,hide:`${Z}?25l`,show:`${Z}?25h`,save:`${Oi}7`,restore:`${Oi}8`},mD={up:(t=1)=>`${Z}S`.repeat(t),down:(t=1)=>`${Z}T`.repeat(t)},gD={screen:`${Z}2J`,up:(t=1)=>`${Z}1J`.repeat(t),down:(t=1)=>`${Z}J`.repeat(t),line:`${Z}2K`,lineEnd:`${Z}K`,lineStart:`${Z}1K`,lines(t){let e="";for(let r=0;r<t;r++)e+=this.line+(r<t-1?Si.up():"");return t&&(e+=Si.left),e}};Sa.exports={cursor:Si,scroll:mD,erase:gD,beep:pD};});var ka=D((HE,$a)=>{function DD(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=bD(t))||e){r&&(t=r);var s=0,i=function(){};return {s:i,n:function(){return s>=t.length?{done:true}:{done:false,value:t[s++]}},e:function(h){throw h},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
28
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n=true,o=false,u;return {s:function(){r=r.call(t);},n:function(){var h=r.next();return n=h.done,h},e:function(h){o=true,u=h;},f:function(){try{!n&&r.return!=null&&r.return();}finally{if(o)throw u}}}}function bD(t,e){if(t){if(typeof t=="string")return Ra(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ra(t,e)}}function Ra(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}var yD=Ur(),Pa=Q(),Ta=Pa.erase,CD=Pa.cursor,_D=t=>[...yD(t)].length;$a.exports=function(t,e){if(!e)return Ta.line+CD.to(0);let r=0,s=t.split(/\r?\n/);var i=DD(s),n;try{for(i.s();!(n=i.n()).done;){let o=n.value;r+=1+Math.floor(Math.max(_D(o)-1,0)/e);}}catch(o){i.e(o);}finally{i.f();}return Ta.lines(r)};});var Ri=D((NE,Ia)=>{var ir={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},vD={arrowUp:ir.arrowUp,arrowDown:ir.arrowDown,arrowLeft:ir.arrowLeft,arrowRight:ir.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},xD=process.platform==="win32"?vD:ir;Ia.exports=xD;});var Ma=D((qE,Ba)=>{var kt=X(),bt=Ri(),Ti=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"\u{1F603}".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),FD=t=>Ti[t]||Ti.default,nr=Object.freeze({aborted:kt.red(bt.cross),done:kt.green(bt.tick),exited:kt.yellow(bt.cross),default:kt.cyan("?")}),wD=(t,e,r)=>e?nr.aborted:r?nr.exited:t?nr.done:nr.default,ED=t=>kt.gray(t?bt.ellipsis:bt.pointerSmall),AD=(t,e)=>kt.gray(t?e?bt.pointerSmall:"+":bt.line);Ba.exports={styles:Ti,render:FD,symbols:nr,symbol:wD,delimiter:ED,item:AD};});var Na=D((LE,Ha)=>{var OD=Ur();Ha.exports=function(t,e){let r=String(OD(t)||"").split(/\r?\n/);return e?r.map(s=>Math.ceil(s.length/e)).reduce((s,i)=>s+i):r.length};});var La=D((jE,qa)=>{qa.exports=(t,e={})=>{let r=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",s=e.width;return (t||"").split(/\r?\n/g).map(i=>i.split(/\s+/g).reduce((n,o)=>(o.length+r.length>=s||n[n.length-1].length+o.length+1<s?n[n.length-1]+=` ${o}`:n.push(`${r}${o}`),n),[r]).join(`
27
+ `);}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"));}};function ba(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,s="127.0.0.1",i="9229",n;return (n=e.match(/^(--inspect(-brk)?)$/))!==null?r=n[1]:(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=n[1],/^\d+$/.test(n[3])?i=n[3]:s=n[3]):(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=n[1],s=n[3],i=n[4]),r&&i!=="0"?`${r}=${s}:${parseInt(i)+1}`:e})}function Ai(){if(q.env.NO_COLOR||q.env.FORCE_COLOR==="0"||q.env.FORCE_COLOR==="false")return false;if(q.env.FORCE_COLOR||q.env.CLICOLOR_FORCE!==void 0)return true}Oi.Command=Ei;Oi.useColor=Ai;});var _a=D(xe=>{var{Argument:va}=Ur(),{Command:Ri}=ya(),{CommanderError:gD,InvalidArgumentError:Ca}=or(),{Help:DD}=yi(),{Option:xa}=_i();xe.program=new Ri;xe.createCommand=t=>new Ri(t);xe.createOption=(t,e)=>new xa(t,e);xe.createArgument=(t,e)=>new va(t,e);xe.Command=Ri;xe.Option=xa;xe.Argument=va;xe.Help=DD;xe.CommanderError=gD;xe.InvalidArgumentError=Ca;xe.InvalidOptionArgumentError=Ca;});var Nt=D((KE,Si)=>{var Yr=process||{},Fa=Yr.argv||[],Kr=Yr.env||{},bD=!(Kr.NO_COLOR||Fa.includes("--no-color"))&&(!!Kr.FORCE_COLOR||Fa.includes("--color")||Yr.platform==="win32"||(Yr.stdout||{}).isTTY&&Kr.TERM!=="dumb"||!!Kr.CI),yD=(t,e,r=t)=>s=>{let i=""+s,n=i.indexOf(e,t.length);return ~n?t+vD(i,e,r,n)+e:t+i+e},vD=(t,e,r,s)=>{let i="",n=0;do i+=t.substring(n,s)+r,n=s+e.length,s=t.indexOf(e,n);while(~s);return i+t.substring(n)},Ea=(t=bD)=>{let e=t?yD:()=>String;return {isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};Si.exports=Ea();Si.exports.createColors=Ea;});var X=D((YE,Oa)=>{var{FORCE_COLOR:CD,NODE_DISABLE_COLORS:xD,TERM:_D}=process.env,L={enabled:!xD&&_D!=="dumb"&&CD!=="0",reset:G(0,0),bold:G(1,22),dim:G(2,22),italic:G(3,23),underline:G(4,24),inverse:G(7,27),hidden:G(8,28),strikethrough:G(9,29),black:G(30,39),red:G(31,39),green:G(32,39),yellow:G(33,39),blue:G(34,39),magenta:G(35,39),cyan:G(36,39),white:G(37,39),gray:G(90,39),grey:G(90,39),bgBlack:G(40,49),bgRed:G(41,49),bgGreen:G(42,49),bgYellow:G(43,49),bgBlue:G(44,49),bgMagenta:G(45,49),bgCyan:G(46,49),bgWhite:G(47,49)};function Aa(t,e){let r=0,s,i="",n="";for(;r<t.length;r++)s=t[r],i+=s.open,n+=s.close,e.includes(s.close)&&(e=e.replace(s.rgx,s.close+s.open));return i+e+n}function wD(t,e){let r={has:t,keys:e};return r.reset=L.reset.bind(r),r.bold=L.bold.bind(r),r.dim=L.dim.bind(r),r.italic=L.italic.bind(r),r.underline=L.underline.bind(r),r.inverse=L.inverse.bind(r),r.hidden=L.hidden.bind(r),r.strikethrough=L.strikethrough.bind(r),r.black=L.black.bind(r),r.red=L.red.bind(r),r.green=L.green.bind(r),r.yellow=L.yellow.bind(r),r.blue=L.blue.bind(r),r.magenta=L.magenta.bind(r),r.cyan=L.cyan.bind(r),r.white=L.white.bind(r),r.gray=L.gray.bind(r),r.grey=L.grey.bind(r),r.bgBlack=L.bgBlack.bind(r),r.bgRed=L.bgRed.bind(r),r.bgGreen=L.bgGreen.bind(r),r.bgYellow=L.bgYellow.bind(r),r.bgBlue=L.bgBlue.bind(r),r.bgMagenta=L.bgMagenta.bind(r),r.bgCyan=L.bgCyan.bind(r),r.bgWhite=L.bgWhite.bind(r),r}function G(t,e){let r={open:`\x1B[${t}m`,close:`\x1B[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(s){return this!==void 0&&this.has!==void 0?(this.has.includes(t)||(this.has.push(t),this.keys.push(r)),s===void 0?this:L.enabled?Aa(this.keys,s+""):s+""):s===void 0?wD([t],[r]):L.enabled?Aa([r],s+""):s+""}}Oa.exports=L;});var Sa=D((JE,Ra)=>{Ra.exports=(t,e)=>{if(!(t.meta&&t.name!=="escape")){if(t.ctrl){if(t.name==="a")return "first";if(t.name==="c"||t.name==="d")return "abort";if(t.name==="e")return "last";if(t.name==="g")return "reset"}if(e){if(t.name==="j")return "down";if(t.name==="k")return "up"}return t.name==="return"||t.name==="enter"?"submit":t.name==="backspace"?"delete":t.name==="delete"?"deleteForward":t.name==="abort"?"abort":t.name==="escape"?"exit":t.name==="tab"?"next":t.name==="pagedown"?"nextPage":t.name==="pageup"?"prevPage":t.name==="home"?"home":t.name==="end"?"end":t.name==="up"?"up":t.name==="down"?"down":t.name==="right"?"right":t.name==="left"?"left":false}};});var Jr=D((zE,Ta)=>{Ta.exports=t=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),r=new RegExp(e,"g");return typeof t=="string"?t.replace(r,""):t};});var Q=D((XE,Pa)=>{var Ti="\x1B",Z=`${Ti}[`,FD="\x07",Pi={to(t,e){return e?`${Z}${e+1};${t+1}H`:`${Z}${t+1}G`},move(t,e){let r="";return t<0?r+=`${Z}${-t}D`:t>0&&(r+=`${Z}${t}C`),e<0?r+=`${Z}${-e}A`:e>0&&(r+=`${Z}${e}B`),r},up:(t=1)=>`${Z}${t}A`,down:(t=1)=>`${Z}${t}B`,forward:(t=1)=>`${Z}${t}C`,backward:(t=1)=>`${Z}${t}D`,nextLine:(t=1)=>`${Z}E`.repeat(t),prevLine:(t=1)=>`${Z}F`.repeat(t),left:`${Z}G`,hide:`${Z}?25l`,show:`${Z}?25h`,save:`${Ti}7`,restore:`${Ti}8`},ED={up:(t=1)=>`${Z}S`.repeat(t),down:(t=1)=>`${Z}T`.repeat(t)},AD={screen:`${Z}2J`,up:(t=1)=>`${Z}1J`.repeat(t),down:(t=1)=>`${Z}J`.repeat(t),line:`${Z}2K`,lineEnd:`${Z}K`,lineStart:`${Z}1K`,lines(t){let e="";for(let r=0;r<t;r++)e+=this.line+(r<t-1?Pi.up():"");return t&&(e+=Pi.left),e}};Pa.exports={cursor:Pi,scroll:ED,erase:AD,beep:FD};});var Ba=D((ZE,Ma)=>{function OD(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=RD(t))||e){r&&(t=r);var s=0,i=function(){};return {s:i,n:function(){return s>=t.length?{done:true}:{done:false,value:t[s++]}},e:function(h){throw h},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
28
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n=true,o=false,u;return {s:function(){r=r.call(t);},n:function(){var h=r.next();return n=h.done,h},e:function(h){o=true,u=h;},f:function(){try{!n&&r.return!=null&&r.return();}finally{if(o)throw u}}}}function RD(t,e){if(t){if(typeof t=="string")return $a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $a(t,e)}}function $a(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}var SD=Jr(),Ia=Q(),ka=Ia.erase,TD=Ia.cursor,PD=t=>[...SD(t)].length;Ma.exports=function(t,e){if(!e)return ka.line+TD.to(0);let r=0,s=t.split(/\r?\n/);var i=OD(s),n;try{for(i.s();!(n=i.n()).done;){let o=n.value;r+=1+Math.floor(Math.max(PD(o)-1,0)/e);}}catch(o){i.e(o);}finally{i.f();}return ka.lines(r)};});var $i=D((QE,Ha)=>{var ur={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},$D={arrowUp:ur.arrowUp,arrowDown:ur.arrowDown,arrowLeft:ur.arrowLeft,arrowRight:ur.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},kD=process.platform==="win32"?$D:ur;Ha.exports=kD;});var qa=D((e1,Na)=>{var qt=X(),Ct=$i(),ki=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"\u{1F603}".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),ID=t=>ki[t]||ki.default,ar=Object.freeze({aborted:qt.red(Ct.cross),done:qt.green(Ct.tick),exited:qt.yellow(Ct.cross),default:qt.cyan("?")}),MD=(t,e,r)=>e?ar.aborted:r?ar.exited:t?ar.done:ar.default,BD=t=>qt.gray(t?Ct.ellipsis:Ct.pointerSmall),HD=(t,e)=>qt.gray(t?e?Ct.pointerSmall:"+":Ct.line);Na.exports={styles:ki,render:ID,symbols:ar,symbol:MD,delimiter:BD,item:HD};});var ja=D((t1,La)=>{var ND=Jr();La.exports=function(t,e){let r=String(ND(t)||"").split(/\r?\n/);return e?r.map(s=>Math.ceil(s.length/e)).reduce((s,i)=>s+i):r.length};});var Va=D((r1,Ga)=>{Ga.exports=(t,e={})=>{let r=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",s=e.width;return (t||"").split(/\r?\n/g).map(i=>i.split(/\s+/g).reduce((n,o)=>(o.length+r.length>=s||n[n.length-1].length+o.length+1<s?n[n.length-1]+=` ${o}`:n.push(`${r}${o}`),n),[r]).join(`
29
29
  `)).join(`
30
- `)};});var Ga=D((GE,ja)=>{ja.exports=(t,e,r)=>{r=r||e;let s=Math.min(e-r,t-Math.floor(r/2));s<0&&(s=0);let i=Math.min(s+r,e);return {startIndex:s,endIndex:i}};});var Ee=D((VE,Va)=>{Va.exports={action:Aa(),clear:ka(),style:Ma(),strip:Ur(),figures:Ri(),lines:Na(),wrap:La(),entriesToDisplay:Ga()};});var Xe=D((UE,Ya)=>{var Ua=$("readline"),SD=Ee(),RD=SD.action,TD=$("events"),Wa=Q(),PD=Wa.beep,$D=Wa.cursor,kD=X(),Pi=class extends TD{constructor(e={}){super(),this.firstRender=true,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let r=Ua.createInterface({input:this.in,escapeCodeTimeout:50});Ua.emitKeypressEvents(this.in,r),this.in.isTTY&&this.in.setRawMode(true);let s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,i=(n,o)=>{let u=RD(o,s);u===false?this._&&this._(n,o):typeof this[u]=="function"?this[u](o):this.bell();};this.close=()=>{this.out.write($D.show),this.in.removeListener("keypress",i),this.in.isTTY&&this.in.setRawMode(false),r.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=true;},this.in.on("keypress",i);}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited});}bell(){this.out.write(PD);}render(){this.onRender(kD),this.firstRender&&(this.firstRender=false);}};Ya.exports=Pi;});var Za=D((WE,Xa)=>{function Ja(t,e,r,s,i,n,o){try{var u=t[n](o),a=u.value;}catch(h){r(h);return}u.done?e(a):Promise.resolve(a).then(s,i);}function Ka(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(a){Ja(n,s,i,o,u,"next",a);}function u(a){Ja(n,s,i,o,u,"throw",a);}o(void 0);})}}var Wr=X(),ID=Xe(),za=Q(),BD=za.erase,or=za.cursor,Yr=Ee(),$i=Yr.style,ki=Yr.clear,MD=Yr.lines,HD=Yr.figures,Ii=class extends ID{constructor(e={}){super(e),this.transform=$i.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>true),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=ki("",this.out.columns),this.render();}set value(e){!e&&this.initial?(this.placeholder=true,this.rendered=Wr.gray(this.transform.render(this.initial))):(this.placeholder=false,this.rendered=this.transform.render(e)),this._value=e,this.fire();}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render();}exit(){this.abort();}abort(){this.value=this.value||this.initial,this.done=this.aborted=true,this.error=false,this.red=false,this.fire(),this.render(),this.out.write(`
31
- `),this.close();}validate(){var e=this;return Ka(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=false),e.error=!r;})()}submit(){var e=this;return Ka(function*(){if(e.value=e.value||e.initial,e.cursorOffset=0,e.cursor=e.rendered.length,yield e.validate(),e.error){e.red=true,e.fire(),e.render();return}e.done=true,e.aborted=false,e.fire(),e.render(),e.out.write(`
32
- `),e.close();})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render();}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e);}_(e,r){let s=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.value=`${s}${e}${i}`,this.red=false,this.cursor=this.placeholder?0:s.length+1,this.render();}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),r=this.value.slice(this.cursor);this.value=`${e}${r}`,this.red=false,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor+1);this.value=`${e}${r}`,this.red=false,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render();}first(){this.cursor=0,this.render();}last(){this.cursor=this.value.length,this.render();}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render();}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render();}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(or.down(MD(this.outputError,this.out.columns)-1)+ki(this.outputError,this.out.columns)),this.out.write(ki(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[$i.symbol(this.done,this.aborted),Wr.bold(this.msg),$i.delimiter(this.done),this.red?Wr.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
30
+ `)};});var Wa=D((s1,Ua)=>{Ua.exports=(t,e,r)=>{r=r||e;let s=Math.min(e-r,t-Math.floor(r/2));s<0&&(s=0);let i=Math.min(s+r,e);return {startIndex:s,endIndex:i}};});var Ee=D((i1,Ka)=>{Ka.exports={action:Sa(),clear:Ba(),style:qa(),strip:Jr(),figures:$i(),lines:ja(),wrap:Va(),entriesToDisplay:Wa()};});var Ze=D((n1,za)=>{var Ya=$("readline"),qD=Ee(),LD=qD.action,jD=$("events"),Ja=Q(),GD=Ja.beep,VD=Ja.cursor,UD=X(),Ii=class extends jD{constructor(e={}){super(),this.firstRender=true,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let r=Ya.createInterface({input:this.in,escapeCodeTimeout:50});Ya.emitKeypressEvents(this.in,r),this.in.isTTY&&this.in.setRawMode(true);let s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,i=(n,o)=>{let u=LD(o,s);u===false?this._&&this._(n,o):typeof this[u]=="function"?this[u](o):this.bell();};this.close=()=>{this.out.write(VD.show),this.in.removeListener("keypress",i),this.in.isTTY&&this.in.setRawMode(false),r.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=true;},this.in.on("keypress",i);}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited});}bell(){this.out.write(GD);}render(){this.onRender(UD),this.firstRender&&(this.firstRender=false);}};za.exports=Ii;});var tl=D((o1,el)=>{function Xa(t,e,r,s,i,n,o){try{var u=t[n](o),a=u.value;}catch(h){r(h);return}u.done?e(a):Promise.resolve(a).then(s,i);}function Za(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(a){Xa(n,s,i,o,u,"next",a);}function u(a){Xa(n,s,i,o,u,"throw",a);}o(void 0);})}}var zr=X(),WD=Ze(),Qa=Q(),KD=Qa.erase,lr=Qa.cursor,Xr=Ee(),Mi=Xr.style,Bi=Xr.clear,YD=Xr.lines,JD=Xr.figures,Hi=class extends WD{constructor(e={}){super(e),this.transform=Mi.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>true),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=Bi("",this.out.columns),this.render();}set value(e){!e&&this.initial?(this.placeholder=true,this.rendered=zr.gray(this.transform.render(this.initial))):(this.placeholder=false,this.rendered=this.transform.render(e)),this._value=e,this.fire();}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render();}exit(){this.abort();}abort(){this.value=this.value||this.initial,this.done=this.aborted=true,this.error=false,this.red=false,this.fire(),this.render(),this.out.write(`
31
+ `),this.close();}validate(){var e=this;return Za(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=false),e.error=!r;})()}submit(){var e=this;return Za(function*(){if(e.value=e.value||e.initial,e.cursorOffset=0,e.cursor=e.rendered.length,yield e.validate(),e.error){e.red=true,e.fire(),e.render();return}e.done=true,e.aborted=false,e.fire(),e.render(),e.out.write(`
32
+ `),e.close();})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render();}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e);}_(e,r){let s=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.value=`${s}${e}${i}`,this.red=false,this.cursor=this.placeholder?0:s.length+1,this.render();}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),r=this.value.slice(this.cursor);this.value=`${e}${r}`,this.red=false,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor+1);this.value=`${e}${r}`,this.red=false,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render();}first(){this.cursor=0,this.render();}last(){this.cursor=this.value.length,this.render();}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render();}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render();}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(lr.down(YD(this.outputError,this.out.columns)-1)+Bi(this.outputError,this.out.columns)),this.out.write(Bi(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Mi.symbol(this.done,this.aborted),zr.bold(this.msg),Mi.delimiter(this.done),this.red?zr.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
33
33
  `).reduce((e,r,s)=>e+`
34
- ${s?" ":HD.pointerSmall} ${Wr.red().italic(r)}`,"")),this.out.write(BD.line+or.to(0)+this.outputText+or.save+this.outputError+or.restore+or.move(this.cursorOffset,0)));}};Xa.exports=Ii;});var rl=D((YE,tl)=>{var Ze=X(),ND=Xe(),ur=Ee(),Qa=ur.style,el=ur.clear,Jr=ur.figures,qD=ur.wrap,LD=ur.entriesToDisplay,jD=Q(),GD=jD.cursor,Bi=class extends ND{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((r,s)=>(typeof r=="string"&&(r={title:r,value:s}),{title:r&&(r.title||r.value||r),value:r&&(r.value===void 0?s:r.value),description:r&&r.description,selected:r&&r.selected,disabled:r&&r.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=el("",this.out.columns),this.render();}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire();}reset(){this.moveCursor(0),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
34
+ ${s?" ":JD.pointerSmall} ${zr.red().italic(r)}`,"")),this.out.write(KD.line+lr.to(0)+this.outputText+lr.save+this.outputError+lr.restore+lr.move(this.cursorOffset,0)));}};el.exports=Hi;});var nl=D((u1,il)=>{var Qe=X(),zD=Ze(),cr=Ee(),rl=cr.style,sl=cr.clear,Zr=cr.figures,XD=cr.wrap,ZD=cr.entriesToDisplay,QD=Q(),e0=QD.cursor,Ni=class extends zD{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((r,s)=>(typeof r=="string"&&(r={title:r,value:s}),{title:r&&(r.title||r.value||r),value:r&&(r.value===void 0?s:r.value),description:r&&r.description,selected:r&&r.selected,disabled:r&&r.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=sl("",this.out.columns),this.render();}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire();}reset(){this.moveCursor(0),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
35
35
  `),this.close();}submit(){this.selection.disabled?this.bell():(this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
36
- `),this.close());}first(){this.moveCursor(0),this.render();}last(){this.moveCursor(this.choices.length-1),this.render();}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render();}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render();}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render();}_(e,r){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(GD.hide):this.out.write(el(this.outputText,this.out.columns)),super.render();let e=LD(this.cursor,this.choices.length,this.optionsPerPage),r=e.startIndex,s=e.endIndex;if(this.outputText=[Qa.symbol(this.done,this.aborted),Ze.bold(this.msg),Qa.delimiter(false),this.done?this.selection.title:this.selection.disabled?Ze.yellow(this.warn):Ze.gray(this.hint)].join(" "),!this.done){this.outputText+=`
37
- `;for(let i=r;i<s;i++){let n,o,u="",a=this.choices[i];i===r&&r>0?o=Jr.arrowUp:i===s-1&&s<this.choices.length?o=Jr.arrowDown:o=" ",a.disabled?(n=this.cursor===i?Ze.gray().underline(a.title):Ze.strikethrough().gray(a.title),o=(this.cursor===i?Ze.bold().gray(Jr.pointer)+" ":" ")+o):(n=this.cursor===i?Ze.cyan().underline(a.title):a.title,o=(this.cursor===i?Ze.cyan(Jr.pointer)+" ":" ")+o,a.description&&this.cursor===i&&(u=` - ${a.description}`,(o.length+n.length+u.length>=this.out.columns||a.description.split(/\r?\n/).length>1)&&(u=`
38
- `+qD(a.description,{margin:3,width:this.out.columns})))),this.outputText+=`${o} ${n}${Ze.gray(u)}
39
- `;}}this.out.write(this.outputText);}};tl.exports=Bi;});var al=D((JE,ul)=>{var Kr=X(),VD=Xe(),nl=Ee(),sl=nl.style,UD=nl.clear,ol=Q(),il=ol.cursor,WD=ol.erase,Mi=class extends VD{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
36
+ `),this.close());}first(){this.moveCursor(0),this.render();}last(){this.moveCursor(this.choices.length-1),this.render();}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render();}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render();}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render();}_(e,r){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(e0.hide):this.out.write(sl(this.outputText,this.out.columns)),super.render();let e=ZD(this.cursor,this.choices.length,this.optionsPerPage),r=e.startIndex,s=e.endIndex;if(this.outputText=[rl.symbol(this.done,this.aborted),Qe.bold(this.msg),rl.delimiter(false),this.done?this.selection.title:this.selection.disabled?Qe.yellow(this.warn):Qe.gray(this.hint)].join(" "),!this.done){this.outputText+=`
37
+ `;for(let i=r;i<s;i++){let n,o,u="",a=this.choices[i];i===r&&r>0?o=Zr.arrowUp:i===s-1&&s<this.choices.length?o=Zr.arrowDown:o=" ",a.disabled?(n=this.cursor===i?Qe.gray().underline(a.title):Qe.strikethrough().gray(a.title),o=(this.cursor===i?Qe.bold().gray(Zr.pointer)+" ":" ")+o):(n=this.cursor===i?Qe.cyan().underline(a.title):a.title,o=(this.cursor===i?Qe.cyan(Zr.pointer)+" ":" ")+o,a.description&&this.cursor===i&&(u=` - ${a.description}`,(o.length+n.length+u.length>=this.out.columns||a.description.split(/\r?\n/).length>1)&&(u=`
38
+ `+XD(a.description,{margin:3,width:this.out.columns})))),this.outputText+=`${o} ${n}${Qe.gray(u)}
39
+ `;}}this.out.write(this.outputText);}};il.exports=Ni;});var hl=D((a1,cl)=>{var Qr=X(),t0=Ze(),al=Ee(),ol=al.style,r0=al.clear,ll=Q(),ul=ll.cursor,s0=ll.erase,qi=class extends t0{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
40
40
  `),this.close();}submit(){this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
41
- `),this.close();}deactivate(){if(this.value===false)return this.bell();this.value=false,this.render();}activate(){if(this.value===true)return this.bell();this.value=true,this.render();}delete(){this.deactivate();}left(){this.deactivate();}right(){this.activate();}down(){this.deactivate();}up(){this.activate();}next(){this.value=!this.value,this.fire(),this.render();}_(e,r){if(e===" ")this.value=!this.value;else if(e==="1")this.value=true;else if(e==="0")this.value=false;else return this.bell();this.render();}render(){this.closed||(this.firstRender?this.out.write(il.hide):this.out.write(UD(this.outputText,this.out.columns)),super.render(),this.outputText=[sl.symbol(this.done,this.aborted),Kr.bold(this.msg),sl.delimiter(this.done),this.value?this.inactive:Kr.cyan().underline(this.inactive),Kr.gray("/"),this.value?Kr.cyan().underline(this.active):this.active].join(" "),this.out.write(WD.line+il.to(0)+this.outputText));}};ul.exports=Mi;});var Me=D((KE,ll)=>{var Hi=class t{constructor({token:e,date:r,parts:s,locales:i}){this.token=e,this.date=r||new Date,this.parts=s||[this],this.locales=i||{};}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((r,s)=>s>e&&r instanceof t)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),r=e.indexOf(this);return e.find((s,i)=>i>r&&s instanceof t)}toString(){return String(this.date)}};ll.exports=Hi;});var hl=D((zE,cl)=>{var YD=Me(),Ni=class extends YD{constructor(e={}){super(e);}up(){this.date.setHours((this.date.getHours()+12)%24);}down(){this.up();}toString(){let e=this.date.getHours()>12?"pm":"am";return /\A/.test(this.token)?e.toUpperCase():e}};cl.exports=Ni;});var fl=D((XE,dl)=>{var JD=Me(),KD=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),qi=class extends JD{constructor(e={}){super(e);}up(){this.date.setDate(this.date.getDate()+1);}down(){this.date.setDate(this.date.getDate()-1);}setTo(e){this.date.setDate(parseInt(e.substr(-2)));}toString(){let e=this.date.getDate(),r=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+KD(e):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:e}};dl.exports=qi;});var ml=D((ZE,pl)=>{var zD=Me(),Li=class extends zD{constructor(e={}){super(e);}up(){this.date.setHours(this.date.getHours()+1);}down(){this.date.setHours(this.date.getHours()-1);}setTo(e){this.date.setHours(parseInt(e.substr(-2)));}toString(){let e=this.date.getHours();return /h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};pl.exports=Li;});var Dl=D((QE,gl)=>{var XD=Me(),ji=class extends XD{constructor(e={}){super(e);}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1);}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1);}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)));}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};gl.exports=ji;});var yl=D((e1,bl)=>{var ZD=Me(),Gi=class extends ZD{constructor(e={}){super(e);}up(){this.date.setMinutes(this.date.getMinutes()+1);}down(){this.date.setMinutes(this.date.getMinutes()-1);}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)));}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};bl.exports=Gi;});var _l=D((t1,Cl)=>{var QD=Me(),Vi=class extends QD{constructor(e={}){super(e);}up(){this.date.setMonth(this.date.getMonth()+1);}down(){this.date.setMonth(this.date.getMonth()-1);}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e);}toString(){let e=this.date.getMonth(),r=this.token.length;return r===2?String(e+1).padStart(2,"0"):r===3?this.locales.monthsShort[e]:r===4?this.locales.months[e]:String(e+1)}};Cl.exports=Vi;});var xl=D((r1,vl)=>{var e0=Me(),Ui=class extends e0{constructor(e={}){super(e);}up(){this.date.setSeconds(this.date.getSeconds()+1);}down(){this.date.setSeconds(this.date.getSeconds()-1);}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)));}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};vl.exports=Ui;});var wl=D((s1,Fl)=>{var t0=Me(),Wi=class extends t0{constructor(e={}){super(e);}up(){this.date.setFullYear(this.date.getFullYear()+1);}down(){this.date.setFullYear(this.date.getFullYear()-1);}setTo(e){this.date.setFullYear(e.substr(-4));}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};Fl.exports=Wi;});var Al=D((i1,El)=>{El.exports={DatePart:Me(),Meridiem:hl(),Day:fl(),Hours:ml(),Milliseconds:Dl(),Minutes:yl(),Month:_l(),Seconds:xl(),Year:wl()};});var Ml=D((n1,Bl)=>{function Ol(t,e,r,s,i,n,o){try{var u=t[n](o),a=u.value;}catch(h){r(h);return}u.done?e(a):Promise.resolve(a).then(s,i);}function Sl(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(a){Ol(n,s,i,o,u,"next",a);}function u(a){Ol(n,s,i,o,u,"throw",a);}o(void 0);})}}var Yi=X(),r0=Xe(),Ki=Ee(),Rl=Ki.style,Tl=Ki.clear,s0=Ki.figures,Il=Q(),i0=Il.erase,Pl=Il.cursor,Qe=Al(),$l=Qe.DatePart,n0=Qe.Meridiem,o0=Qe.Day,u0=Qe.Hours,a0=Qe.Milliseconds,l0=Qe.Minutes,c0=Qe.Month,h0=Qe.Seconds,d0=Qe.Year,f0=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,kl={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new o0(t),3:t=>new c0(t),4:t=>new d0(t),5:t=>new n0(t),6:t=>new u0(t),7:t=>new l0(t),8:t=>new h0(t),9:t=>new a0(t)},p0={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},Ji=class extends r0{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(p0,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>true),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=Tl("",this.out.columns),this.render();}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime());}set mask(e){let r;for(this.parts=[];r=f0.exec(e);){let i=r.shift(),n=r.findIndex(o=>o!=null);this.parts.push(n in kl?kl[n]({token:r[n]||i,date:this.date,parts:this.parts,locales:this.locales}):r[n]||i);}let s=this.parts.reduce((i,n)=>(typeof n=="string"&&typeof i[i.length-1]=="string"?i[i.length-1]+=n:i.push(n),i),[]);this.parts.splice(0),this.parts.push(...s),this.reset();}moveCursor(e){this.typed="",this.cursor=e,this.fire();}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof $l)),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.error=false,this.fire(),this.render(),this.out.write(`
42
- `),this.close();}validate(){var e=this;return Sl(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=false),e.error=!r;})()}submit(){var e=this;return Sl(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}e.done=true,e.aborted=false,e.fire(),e.render(),e.out.write(`
43
- `),e.close();})()}up(){this.typed="",this.parts[this.cursor].up(),this.render();}down(){this.typed="",this.parts[this.cursor].down(),this.render();}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render();}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render();}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(r=>r instanceof $l)),this.render();}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render());}render(){this.closed||(this.firstRender?this.out.write(Pl.hide):this.out.write(Tl(this.outputText,this.out.columns)),super.render(),this.outputText=[Rl.symbol(this.done,this.aborted),Yi.bold(this.msg),Rl.delimiter(false),this.parts.reduce((e,r,s)=>e.concat(s===this.cursor&&!this.done?Yi.cyan().underline(r.toString()):r),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
41
+ `),this.close();}deactivate(){if(this.value===false)return this.bell();this.value=false,this.render();}activate(){if(this.value===true)return this.bell();this.value=true,this.render();}delete(){this.deactivate();}left(){this.deactivate();}right(){this.activate();}down(){this.deactivate();}up(){this.activate();}next(){this.value=!this.value,this.fire(),this.render();}_(e,r){if(e===" ")this.value=!this.value;else if(e==="1")this.value=true;else if(e==="0")this.value=false;else return this.bell();this.render();}render(){this.closed||(this.firstRender?this.out.write(ul.hide):this.out.write(r0(this.outputText,this.out.columns)),super.render(),this.outputText=[ol.symbol(this.done,this.aborted),Qr.bold(this.msg),ol.delimiter(this.done),this.value?this.inactive:Qr.cyan().underline(this.inactive),Qr.gray("/"),this.value?Qr.cyan().underline(this.active):this.active].join(" "),this.out.write(s0.line+ul.to(0)+this.outputText));}};cl.exports=qi;});var He=D((l1,dl)=>{var Li=class t{constructor({token:e,date:r,parts:s,locales:i}){this.token=e,this.date=r||new Date,this.parts=s||[this],this.locales=i||{};}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((r,s)=>s>e&&r instanceof t)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),r=e.indexOf(this);return e.find((s,i)=>i>r&&s instanceof t)}toString(){return String(this.date)}};dl.exports=Li;});var pl=D((c1,fl)=>{var i0=He(),ji=class extends i0{constructor(e={}){super(e);}up(){this.date.setHours((this.date.getHours()+12)%24);}down(){this.up();}toString(){let e=this.date.getHours()>12?"pm":"am";return /\A/.test(this.token)?e.toUpperCase():e}};fl.exports=ji;});var gl=D((h1,ml)=>{var n0=He(),o0=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),Gi=class extends n0{constructor(e={}){super(e);}up(){this.date.setDate(this.date.getDate()+1);}down(){this.date.setDate(this.date.getDate()-1);}setTo(e){this.date.setDate(parseInt(e.substr(-2)));}toString(){let e=this.date.getDate(),r=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+o0(e):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:e}};ml.exports=Gi;});var bl=D((d1,Dl)=>{var u0=He(),Vi=class extends u0{constructor(e={}){super(e);}up(){this.date.setHours(this.date.getHours()+1);}down(){this.date.setHours(this.date.getHours()-1);}setTo(e){this.date.setHours(parseInt(e.substr(-2)));}toString(){let e=this.date.getHours();return /h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};Dl.exports=Vi;});var vl=D((f1,yl)=>{var a0=He(),Ui=class extends a0{constructor(e={}){super(e);}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1);}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1);}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)));}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};yl.exports=Ui;});var xl=D((p1,Cl)=>{var l0=He(),Wi=class extends l0{constructor(e={}){super(e);}up(){this.date.setMinutes(this.date.getMinutes()+1);}down(){this.date.setMinutes(this.date.getMinutes()-1);}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)));}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};Cl.exports=Wi;});var wl=D((m1,_l)=>{var c0=He(),Ki=class extends c0{constructor(e={}){super(e);}up(){this.date.setMonth(this.date.getMonth()+1);}down(){this.date.setMonth(this.date.getMonth()-1);}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e);}toString(){let e=this.date.getMonth(),r=this.token.length;return r===2?String(e+1).padStart(2,"0"):r===3?this.locales.monthsShort[e]:r===4?this.locales.months[e]:String(e+1)}};_l.exports=Ki;});var El=D((g1,Fl)=>{var h0=He(),Yi=class extends h0{constructor(e={}){super(e);}up(){this.date.setSeconds(this.date.getSeconds()+1);}down(){this.date.setSeconds(this.date.getSeconds()-1);}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)));}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};Fl.exports=Yi;});var Ol=D((D1,Al)=>{var d0=He(),Ji=class extends d0{constructor(e={}){super(e);}up(){this.date.setFullYear(this.date.getFullYear()+1);}down(){this.date.setFullYear(this.date.getFullYear()-1);}setTo(e){this.date.setFullYear(e.substr(-4));}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};Al.exports=Ji;});var Sl=D((b1,Rl)=>{Rl.exports={DatePart:He(),Meridiem:pl(),Day:gl(),Hours:bl(),Milliseconds:vl(),Minutes:xl(),Month:wl(),Seconds:El(),Year:Ol()};});var ql=D((y1,Nl)=>{function Tl(t,e,r,s,i,n,o){try{var u=t[n](o),a=u.value;}catch(h){r(h);return}u.done?e(a):Promise.resolve(a).then(s,i);}function Pl(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(a){Tl(n,s,i,o,u,"next",a);}function u(a){Tl(n,s,i,o,u,"throw",a);}o(void 0);})}}var zi=X(),f0=Ze(),Zi=Ee(),$l=Zi.style,kl=Zi.clear,p0=Zi.figures,Hl=Q(),m0=Hl.erase,Il=Hl.cursor,et=Sl(),Ml=et.DatePart,g0=et.Meridiem,D0=et.Day,b0=et.Hours,y0=et.Milliseconds,v0=et.Minutes,C0=et.Month,x0=et.Seconds,_0=et.Year,w0=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,Bl={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new D0(t),3:t=>new C0(t),4:t=>new _0(t),5:t=>new g0(t),6:t=>new b0(t),7:t=>new v0(t),8:t=>new x0(t),9:t=>new y0(t)},F0={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},Xi=class extends f0{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(F0,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>true),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=kl("",this.out.columns),this.render();}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime());}set mask(e){let r;for(this.parts=[];r=w0.exec(e);){let i=r.shift(),n=r.findIndex(o=>o!=null);this.parts.push(n in Bl?Bl[n]({token:r[n]||i,date:this.date,parts:this.parts,locales:this.locales}):r[n]||i);}let s=this.parts.reduce((i,n)=>(typeof n=="string"&&typeof i[i.length-1]=="string"?i[i.length-1]+=n:i.push(n),i),[]);this.parts.splice(0),this.parts.push(...s),this.reset();}moveCursor(e){this.typed="",this.cursor=e,this.fire();}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof Ml)),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.error=false,this.fire(),this.render(),this.out.write(`
42
+ `),this.close();}validate(){var e=this;return Pl(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=false),e.error=!r;})()}submit(){var e=this;return Pl(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}e.done=true,e.aborted=false,e.fire(),e.render(),e.out.write(`
43
+ `),e.close();})()}up(){this.typed="",this.parts[this.cursor].up(),this.render();}down(){this.typed="",this.parts[this.cursor].down(),this.render();}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render();}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render();}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(r=>r instanceof Ml)),this.render();}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render());}render(){this.closed||(this.firstRender?this.out.write(Il.hide):this.out.write(kl(this.outputText,this.out.columns)),super.render(),this.outputText=[$l.symbol(this.done,this.aborted),zi.bold(this.msg),$l.delimiter(false),this.parts.reduce((e,r,s)=>e.concat(s===this.cursor&&!this.done?zi.cyan().underline(r.toString()):r),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
44
44
  `).reduce((e,r,s)=>e+`
45
- ${s?" ":s0.pointerSmall} ${Yi.red().italic(r)}`,"")),this.out.write(i0.line+Pl.to(0)+this.outputText));}};Bl.exports=Ji;});var Vl=D((o1,Gl)=>{function Hl(t,e,r,s,i,n,o){try{var u=t[n](o),a=u.value;}catch(h){r(h);return}u.done?e(a):Promise.resolve(a).then(s,i);}function Nl(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(a){Hl(n,s,i,o,u,"next",a);}function u(a){Hl(n,s,i,o,u,"throw",a);}o(void 0);})}}var zr=X(),m0=Xe(),jl=Q(),Xr=jl.cursor,g0=jl.erase,Zr=Ee(),zi=Zr.style,D0=Zr.figures,ql=Zr.clear,b0=Zr.lines,y0=/[0-9]/,Xi=t=>t!==void 0,Ll=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},Zi=class extends m0{constructor(e={}){super(e),this.transform=zi.render(e.style),this.msg=e.message,this.initial=Xi(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=Xi(e.min)?e.min:-1/0,this.max=Xi(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>true),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render();}set value(e){!e&&e!==0?(this.placeholder=true,this.rendered=zr.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=false,this.rendered=this.transform.render(`${Ll(e,this.round)}`),this._value=Ll(e,this.round)),this.fire();}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||y0.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render();}exit(){this.abort();}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=true,this.error=false,this.fire(),this.render(),this.out.write(`
46
- `),this.close();}validate(){var e=this;return Nl(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=false),e.error=!r;})()}submit(){var e=this;return Nl(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}let r=e.value;e.value=r!==""?r:e.initial,e.done=true,e.aborted=false,e.error=false,e.fire(),e.render(),e.out.write(`
47
- `),e.close();})()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render();}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render();}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render();}next(){this.value=this.initial,this.fire(),this.render();}_(e,r){if(!this.valid(e))return this.bell();let s=Date.now();if(s-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=s,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render();}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(Xr.down(b0(this.outputError,this.out.columns)-1)+ql(this.outputError,this.out.columns)),this.out.write(ql(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[zi.symbol(this.done,this.aborted),zr.bold(this.msg),zi.delimiter(this.done),!this.done||!this.done&&!this.placeholder?zr[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
45
+ ${s?" ":p0.pointerSmall} ${zi.red().italic(r)}`,"")),this.out.write(m0.line+Il.to(0)+this.outputText));}};Nl.exports=Xi;});var Kl=D((v1,Wl)=>{function Ll(t,e,r,s,i,n,o){try{var u=t[n](o),a=u.value;}catch(h){r(h);return}u.done?e(a):Promise.resolve(a).then(s,i);}function jl(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(a){Ll(n,s,i,o,u,"next",a);}function u(a){Ll(n,s,i,o,u,"throw",a);}o(void 0);})}}var es=X(),E0=Ze(),Ul=Q(),ts=Ul.cursor,A0=Ul.erase,rs=Ee(),Qi=rs.style,O0=rs.figures,Gl=rs.clear,R0=rs.lines,S0=/[0-9]/,en=t=>t!==void 0,Vl=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},tn=class extends E0{constructor(e={}){super(e),this.transform=Qi.render(e.style),this.msg=e.message,this.initial=en(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=en(e.min)?e.min:-1/0,this.max=en(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>true),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render();}set value(e){!e&&e!==0?(this.placeholder=true,this.rendered=es.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=false,this.rendered=this.transform.render(`${Vl(e,this.round)}`),this._value=Vl(e,this.round)),this.fire();}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||S0.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render();}exit(){this.abort();}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=true,this.error=false,this.fire(),this.render(),this.out.write(`
46
+ `),this.close();}validate(){var e=this;return jl(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=false),e.error=!r;})()}submit(){var e=this;return jl(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}let r=e.value;e.value=r!==""?r:e.initial,e.done=true,e.aborted=false,e.error=false,e.fire(),e.render(),e.out.write(`
47
+ `),e.close();})()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render();}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render();}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render();}next(){this.value=this.initial,this.fire(),this.render();}_(e,r){if(!this.valid(e))return this.bell();let s=Date.now();if(s-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=s,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render();}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(ts.down(R0(this.outputError,this.out.columns)-1)+Gl(this.outputError,this.out.columns)),this.out.write(Gl(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Qi.symbol(this.done,this.aborted),es.bold(this.msg),Qi.delimiter(this.done),!this.done||!this.done&&!this.placeholder?es[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
48
48
  `).reduce((e,r,s)=>e+`
49
- ${s?" ":D0.pointerSmall} ${zr.red().italic(r)}`,"")),this.out.write(g0.line+Xr.to(0)+this.outputText+Xr.save+this.outputError+Xr.restore));}};Gl.exports=Zi;});var en=D((u1,Yl)=>{var He=X(),C0=Q(),_0=C0.cursor,v0=Xe(),ar=Ee(),Ul=ar.clear,ct=ar.figures,Wl=ar.style,x0=ar.wrap,F0=ar.entriesToDisplay,Qi=class extends v0{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=false,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((r,s)=>(typeof r=="string"&&(r={title:r,value:s}),{title:r&&(r.title||r.value||r),description:r&&r.description,value:r&&(r.value===void 0?s:r.value),selected:r&&r.selected,disabled:r&&r.disabled})),this.clear=Ul("",this.out.columns),e.overrideRender||this.render();}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render();}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
49
+ ${s?" ":O0.pointerSmall} ${es.red().italic(r)}`,"")),this.out.write(A0.line+ts.to(0)+this.outputText+ts.save+this.outputError+ts.restore));}};Wl.exports=tn;});var sn=D((C1,zl)=>{var Ne=X(),T0=Q(),P0=T0.cursor,$0=Ze(),hr=Ee(),Yl=hr.clear,ht=hr.figures,Jl=hr.style,k0=hr.wrap,I0=hr.entriesToDisplay,rn=class extends $0{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=false,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((r,s)=>(typeof r=="string"&&(r={title:r,value:s}),{title:r&&(r.title||r.value||r),description:r&&r.description,value:r&&(r.value===void 0?s:r.value),selected:r&&r.selected,disabled:r&&r.disabled})),this.clear=Yl("",this.out.columns),e.overrideRender||this.render();}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render();}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
50
50
  `),this.close();}submit(){let e=this.value.filter(r=>r.selected);this.minSelected&&e.length<this.minSelected?(this.showMinError=true,this.render()):(this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
51
51
  `),this.close());}first(){this.cursor=0,this.render();}last(){this.cursor=this.value.length-1,this.render();}next(){this.cursor=(this.cursor+1)%this.value.length,this.render();}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render();}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render();}left(){this.value[this.cursor].selected=false,this.render();}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true,this.render();}handleSpaceToggle(){let e=this.value[this.cursor];if(e.selected)e.selected=false,this.render();else {if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=true,this.render();}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let e=!this.value[this.cursor].selected;this.value.filter(r=>!r.disabled).forEach(r=>r.selected=e),this.render();}_(e,r){if(e===" ")this.handleSpaceToggle();else if(e==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
52
52
  Instructions:
53
- ${ct.arrowUp}/${ct.arrowDown}: Highlight option
54
- ${ct.arrowLeft}/${ct.arrowRight}/[space]: Toggle selection
53
+ ${ht.arrowUp}/${ht.arrowDown}: Highlight option
54
+ ${ht.arrowLeft}/${ht.arrowRight}/[space]: Toggle selection
55
55
  `+(this.maxChoices===void 0?` a: Toggle all
56
- `:"")+" enter/return: Complete answer":""}renderOption(e,r,s,i){let n=(r.selected?He.green(ct.radioOn):ct.radioOff)+" "+i+" ",o,u;return r.disabled?o=e===s?He.gray().underline(r.title):He.strikethrough().gray(r.title):(o=e===s?He.cyan().underline(r.title):r.title,e===s&&r.description&&(u=` - ${r.description}`,(n.length+o.length+u.length>=this.out.columns||r.description.split(/\r?\n/).length>1)&&(u=`
57
- `+x0(r.description,{margin:n.length,width:this.out.columns})))),n+o+He.gray(u||"")}paginateOptions(e){if(e.length===0)return He.red("No matches for this query.");let r=F0(this.cursor,e.length,this.optionsPerPage),s=r.startIndex,i=r.endIndex,n,o=[];for(let u=s;u<i;u++)u===s&&s>0?n=ct.arrowUp:u===i-1&&i<e.length?n=ct.arrowDown:n=" ",o.push(this.renderOption(this.cursor,e[u],u,n));return `
56
+ `:"")+" enter/return: Complete answer":""}renderOption(e,r,s,i){let n=(r.selected?Ne.green(ht.radioOn):ht.radioOff)+" "+i+" ",o,u;return r.disabled?o=e===s?Ne.gray().underline(r.title):Ne.strikethrough().gray(r.title):(o=e===s?Ne.cyan().underline(r.title):r.title,e===s&&r.description&&(u=` - ${r.description}`,(n.length+o.length+u.length>=this.out.columns||r.description.split(/\r?\n/).length>1)&&(u=`
57
+ `+k0(r.description,{margin:n.length,width:this.out.columns})))),n+o+Ne.gray(u||"")}paginateOptions(e){if(e.length===0)return Ne.red("No matches for this query.");let r=I0(this.cursor,e.length,this.optionsPerPage),s=r.startIndex,i=r.endIndex,n,o=[];for(let u=s;u<i;u++)u===s&&s>0?n=ht.arrowUp:u===i-1&&i<e.length?n=ht.arrowDown:n=" ",o.push(this.renderOption(this.cursor,e[u],u,n));return `
58
58
  `+o.join(`
59
- `)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[He.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(He.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(_0.hide),super.render();let e=[Wl.symbol(this.done,this.aborted),He.bold(this.msg),Wl.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=He.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=false),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=Ul(e,this.out.columns);}};Yl.exports=Qi;});var ec=D((a1,Ql)=>{function Jl(t,e,r,s,i,n,o){try{var u=t[n](o),a=u.value;}catch(h){r(h);return}u.done?e(a):Promise.resolve(a).then(s,i);}function w0(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(a){Jl(n,s,i,o,u,"next",a);}function u(a){Jl(n,s,i,o,u,"throw",a);}o(void 0);})}}var lr=X(),E0=Xe(),Zl=Q(),A0=Zl.erase,Kl=Zl.cursor,cr=Ee(),tn=cr.style,zl=cr.clear,rn=cr.figures,O0=cr.wrap,S0=cr.entriesToDisplay,Xl=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),R0=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),T0=(t,e)=>{let r=t.findIndex(s=>s.value===e||s.title===e);return r>-1?r:void 0},sn=class extends E0{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:T0(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||false,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=tn.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=zl("",this.out.columns),this.complete(this.render),this.render();}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e;}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=Xl(this.suggestions,e):this.value=this.fallback.value,this.fire();}complete(e){var r=this;return w0(function*(){let s=r.completing=r.suggest(r.input,r.choices),i=yield s;if(r.completing!==s)return;r.suggestions=i.map((o,u,a)=>({title:R0(a,u),value:Xl(a,u),description:o.description})),r.completing=false;let n=Math.max(i.length-1,0);r.moveSelect(Math.min(n,r.select)),e&&e();})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render();}),this.render();}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
59
+ `)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[Ne.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(Ne.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(P0.hide),super.render();let e=[Jl.symbol(this.done,this.aborted),Ne.bold(this.msg),Jl.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=Ne.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=false),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=Yl(e,this.out.columns);}};zl.exports=rn;});var sc=D((x1,rc)=>{function Xl(t,e,r,s,i,n,o){try{var u=t[n](o),a=u.value;}catch(h){r(h);return}u.done?e(a):Promise.resolve(a).then(s,i);}function M0(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(a){Xl(n,s,i,o,u,"next",a);}function u(a){Xl(n,s,i,o,u,"throw",a);}o(void 0);})}}var dr=X(),B0=Ze(),tc=Q(),H0=tc.erase,Zl=tc.cursor,fr=Ee(),nn=fr.style,Ql=fr.clear,on=fr.figures,N0=fr.wrap,q0=fr.entriesToDisplay,ec=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),L0=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),j0=(t,e)=>{let r=t.findIndex(s=>s.value===e||s.title===e);return r>-1?r:void 0},un=class extends B0{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:j0(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||false,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=nn.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=Ql("",this.out.columns),this.complete(this.render),this.render();}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e;}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=ec(this.suggestions,e):this.value=this.fallback.value,this.fire();}complete(e){var r=this;return M0(function*(){let s=r.completing=r.suggest(r.input,r.choices),i=yield s;if(r.completing!==s)return;r.suggestions=i.map((o,u,a)=>({title:L0(a,u),value:ec(a,u),description:o.description})),r.completing=false;let n=Math.max(i.length-1,0);r.moveSelect(Math.min(n,r.select)),e&&e();})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render();}),this.render();}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
60
60
  `),this.close());}abort(){this.done=this.aborted=true,this.exited=false,this.fire(),this.render(),this.out.write(`
61
61
  `),this.close();}submit(){this.done=true,this.aborted=this.exited=false,this.fire(),this.render(),this.out.write(`
62
- `),this.close();}_(e,r){let s=this.input.slice(0,this.cursor),i=this.input.slice(this.cursor);this.input=`${s}${e}${i}`,this.cursor=s.length+1,this.complete(this.render),this.render();}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),r=this.input.slice(this.cursor);this.input=`${e}${r}`,this.complete(this.render),this.cursor=this.cursor-1,this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor+1);this.input=`${e}${r}`,this.complete(this.render),this.render();}first(){this.moveSelect(0),this.render();}last(){this.moveSelect(this.suggestions.length-1),this.render();}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render();}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render();}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render();}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render();}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render();}renderOption(e,r,s,i){let n,o=s?rn.arrowUp:i?rn.arrowDown:" ",u=r?lr.cyan().underline(e.title):e.title;return o=(r?lr.cyan(rn.pointer)+" ":" ")+o,e.description&&(n=` - ${e.description}`,(o.length+u.length+n.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(n=`
63
- `+O0(e.description,{margin:3,width:this.out.columns}))),o+" "+u+lr.gray(n||"")}render(){if(this.closed)return;this.firstRender?this.out.write(Kl.hide):this.out.write(zl(this.outputText,this.out.columns)),super.render();let e=S0(this.select,this.choices.length,this.limit),r=e.startIndex,s=e.endIndex;if(this.outputText=[tn.symbol(this.done,this.aborted,this.exited),lr.bold(this.msg),tn.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let i=this.suggestions.slice(r,s).map((n,o)=>this.renderOption(n,this.select===o+r,o===0&&r>0,o+r===s-1&&s<this.choices.length)).join(`
62
+ `),this.close();}_(e,r){let s=this.input.slice(0,this.cursor),i=this.input.slice(this.cursor);this.input=`${s}${e}${i}`,this.cursor=s.length+1,this.complete(this.render),this.render();}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),r=this.input.slice(this.cursor);this.input=`${e}${r}`,this.complete(this.render),this.cursor=this.cursor-1,this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor+1);this.input=`${e}${r}`,this.complete(this.render),this.render();}first(){this.moveSelect(0),this.render();}last(){this.moveSelect(this.suggestions.length-1),this.render();}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render();}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render();}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render();}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render();}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render();}renderOption(e,r,s,i){let n,o=s?on.arrowUp:i?on.arrowDown:" ",u=r?dr.cyan().underline(e.title):e.title;return o=(r?dr.cyan(on.pointer)+" ":" ")+o,e.description&&(n=` - ${e.description}`,(o.length+u.length+n.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(n=`
63
+ `+N0(e.description,{margin:3,width:this.out.columns}))),o+" "+u+dr.gray(n||"")}render(){if(this.closed)return;this.firstRender?this.out.write(Zl.hide):this.out.write(Ql(this.outputText,this.out.columns)),super.render();let e=q0(this.select,this.choices.length,this.limit),r=e.startIndex,s=e.endIndex;if(this.outputText=[nn.symbol(this.done,this.aborted,this.exited),dr.bold(this.msg),nn.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let i=this.suggestions.slice(r,s).map((n,o)=>this.renderOption(n,this.select===o+r,o===0&&r>0,o+r===s-1&&s<this.choices.length)).join(`
64
64
  `);this.outputText+=`
65
- `+(i||lr.gray(this.fallback.title));}this.out.write(A0.line+Kl.to(0)+this.outputText);}};Ql.exports=sn;});var ic=D((l1,sc)=>{var et=X(),P0=Q(),$0=P0.cursor,k0=en(),on=Ee(),tc=on.clear,rc=on.style,It=on.figures,nn=class extends k0{constructor(e={}){e.overrideRender=true,super(e),this.inputValue="",this.clear=tc("",this.out.columns),this.filteredOptions=this.value,this.render();}last(){this.cursor=this.filteredOptions.length-1,this.render();}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render();}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render();}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render();}left(){this.filteredOptions[this.cursor].selected=false,this.render();}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true,this.render();}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions());}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(s=>this.inputValue?!!(typeof s.title=="string"&&s.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof s.value=="string"&&s.value.toLowerCase().includes(this.inputValue.toLowerCase())):true);let r=this.filteredOptions.findIndex(s=>s===e);this.cursor=r<0?0:r,this.render();}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=false,this.render();else {if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=true,this.render();}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions();}_(e,r){e===" "?this.handleSpaceToggle():this.handleInputChange(e);}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
65
+ `+(i||dr.gray(this.fallback.title));}this.out.write(H0.line+Zl.to(0)+this.outputText);}};rc.exports=un;});var uc=D((_1,oc)=>{var tt=X(),G0=Q(),V0=G0.cursor,U0=sn(),ln=Ee(),ic=ln.clear,nc=ln.style,Lt=ln.figures,an=class extends U0{constructor(e={}){e.overrideRender=true,super(e),this.inputValue="",this.clear=ic("",this.out.columns),this.filteredOptions=this.value,this.render();}last(){this.cursor=this.filteredOptions.length-1,this.render();}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render();}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render();}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render();}left(){this.filteredOptions[this.cursor].selected=false,this.render();}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true,this.render();}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions());}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(s=>this.inputValue?!!(typeof s.title=="string"&&s.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof s.value=="string"&&s.value.toLowerCase().includes(this.inputValue.toLowerCase())):true);let r=this.filteredOptions.findIndex(s=>s===e);this.cursor=r<0?0:r,this.render();}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=false,this.render();else {if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=true,this.render();}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions();}_(e,r){e===" "?this.handleSpaceToggle():this.handleInputChange(e);}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
66
66
  Instructions:
67
- ${It.arrowUp}/${It.arrowDown}: Highlight option
68
- ${It.arrowLeft}/${It.arrowRight}/[space]: Toggle selection
67
+ ${Lt.arrowUp}/${Lt.arrowDown}: Highlight option
68
+ ${Lt.arrowLeft}/${Lt.arrowRight}/[space]: Toggle selection
69
69
  [a,b,c]/delete: Filter choices
70
70
  enter/return: Complete answer
71
71
  `:""}renderCurrentInput(){return `
72
- Filtered results for: ${this.inputValue?this.inputValue:et.gray("Enter something to filter")}
73
- `}renderOption(e,r,s){let i;return r.disabled?i=e===s?et.gray().underline(r.title):et.strikethrough().gray(r.title):i=e===s?et.cyan().underline(r.title):r.title,(r.selected?et.green(It.radioOn):It.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[et.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(et.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write($0.hide),super.render();let e=[rc.symbol(this.done,this.aborted),et.bold(this.msg),rc.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=et.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=false),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=tc(e,this.out.columns);}};sc.exports=nn;});var hc=D((c1,cc)=>{var nc=X(),I0=Xe(),ac=Ee(),oc=ac.style,B0=ac.clear,lc=Q(),M0=lc.erase,uc=lc.cursor,un=class extends I0{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
72
+ Filtered results for: ${this.inputValue?this.inputValue:tt.gray("Enter something to filter")}
73
+ `}renderOption(e,r,s){let i;return r.disabled?i=e===s?tt.gray().underline(r.title):tt.strikethrough().gray(r.title):i=e===s?tt.cyan().underline(r.title):r.title,(r.selected?tt.green(Lt.radioOn):Lt.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[tt.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(tt.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(V0.hide),super.render();let e=[nc.symbol(this.done,this.aborted),tt.bold(this.msg),nc.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=tt.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=false),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=ic(e,this.out.columns);}};oc.exports=an;});var pc=D((w1,fc)=>{var ac=X(),W0=Ze(),hc=Ee(),lc=hc.style,K0=hc.clear,dc=Q(),Y0=dc.erase,cc=dc.cursor,cn=class extends W0{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
74
74
  `),this.close();}submit(){this.value=this.value||false,this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
75
- `),this.close();}_(e,r){return e.toLowerCase()==="y"?(this.value=true,this.submit()):e.toLowerCase()==="n"?(this.value=false,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(uc.hide):this.out.write(B0(this.outputText,this.out.columns)),super.render(),this.outputText=[oc.symbol(this.done,this.aborted),nc.bold(this.msg),oc.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:nc.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(M0.line+uc.to(0)+this.outputText));}};cc.exports=un;});var fc=D((h1,dc)=>{dc.exports={TextPrompt:Za(),SelectPrompt:rl(),TogglePrompt:al(),DatePrompt:Ml(),NumberPrompt:Vl(),MultiselectPrompt:en(),AutocompletePrompt:ec(),AutocompleteMultiselectPrompt:ic(),ConfirmPrompt:hc()};});var mc=D(pc=>{var de=pc,H0=fc(),Qr=t=>t;function Ne(t,e,r={}){return new Promise((s,i)=>{let n=new H0[t](e),o=r.onAbort||Qr,u=r.onSubmit||Qr,a=r.onExit||Qr;n.on("state",e.onState||Qr),n.on("submit",h=>s(u(h))),n.on("exit",h=>s(a(h))),n.on("abort",h=>i(o(h)));})}de.text=t=>Ne("TextPrompt",t);de.password=t=>(t.style="password",de.text(t));de.invisible=t=>(t.style="invisible",de.text(t));de.number=t=>Ne("NumberPrompt",t);de.date=t=>Ne("DatePrompt",t);de.confirm=t=>Ne("ConfirmPrompt",t);de.list=t=>{let e=t.separator||",";return Ne("TextPrompt",t,{onSubmit:r=>r.split(e).map(s=>s.trim())})};de.toggle=t=>Ne("TogglePrompt",t);de.select=t=>Ne("SelectPrompt",t);de.multiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(s=>s.selected).map(s=>s.value);return Ne("MultiselectPrompt",t,{onAbort:e,onSubmit:e})};de.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(s=>s.selected).map(s=>s.value);return Ne("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};var N0=(t,e)=>Promise.resolve(e.filter(r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));de.autocomplete=t=>(t.suggest=t.suggest||N0,t.choices=[].concat(t.choices||[]),Ne("AutocompletePrompt",t));});var xc=D((f1,vc)=>{function gc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,s);}return r}function Dc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?gc(Object(r),true).forEach(function(s){q0(t,s,r[s]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gc(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s));});}return t}function q0(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:true,configurable:true,writable:true}):t[e]=r,t}function L0(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=j0(t))||e){r&&(t=r);var s=0,i=function(){};return {s:i,n:function(){return s>=t.length?{done:true}:{done:false,value:t[s++]}},e:function(h){throw h},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
76
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n=true,o=false,u;return {s:function(){r=r.call(t);},n:function(){var h=r.next();return n=h.done,h},e:function(h){o=true,u=h;},f:function(){try{!n&&r.return!=null&&r.return();}finally{if(o)throw u}}}}function j0(t,e){if(t){if(typeof t=="string")return bc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bc(t,e)}}function bc(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}function yc(t,e,r,s,i,n,o){try{var u=t[n](o),a=u.value;}catch(h){r(h);return}u.done?e(a):Promise.resolve(a).then(s,i);}function Cc(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(a){yc(n,s,i,o,u,"next",a);}function u(a){yc(n,s,i,o,u,"throw",a);}o(void 0);})}}var an=mc(),G0=["suggest","format","onState","validate","onRender","type"],_c=()=>{};function ht(){return ln.apply(this,arguments)}function ln(){return ln=Cc(function*(t=[],{onSubmit:e=_c,onCancel:r=_c}={}){let s={},i=ht._override||{};t=[].concat(t);let n,o,u,a,h,l,c=function(){var g=Cc(function*(b,y,v=false){if(!(!v&&b.validate&&b.validate(y)!==true))return b.format?yield b.format(y,s):y});return function(y,v){return g.apply(this,arguments)}}();var d=L0(t),f;try{for(d.s();!(f=d.n()).done;){o=f.value;var p=o;if(a=p.name,h=p.type,typeof h=="function"&&(h=yield h(n,Dc({},s),o),o.type=h),!!h){for(let g in o){if(G0.includes(g))continue;let b=o[g];o[g]=typeof b=="function"?yield b(n,Dc({},s),l):b;}if(l=o,typeof o.message!="string")throw new Error("prompt message is required");var m=o;if(a=m.name,h=m.type,an[h]===void 0)throw new Error(`prompt type (${h}) is not defined`);if(i[o.name]!==void 0&&(n=yield c(o,i[o.name]),n!==void 0)){s[a]=n;continue}try{n=ht._injected?V0(ht._injected,o.initial):yield an[h](o),s[a]=n=yield c(o,n,!0),u=yield e(o,n,s);}catch{u=!(yield r(o,s));}if(u)return s}}}catch(g){d.e(g);}finally{d.f();}return s}),ln.apply(this,arguments)}function V0(t,e){let r=t.shift();if(r instanceof Error)throw r;return r===void 0?e:r}function U0(t){ht._injected=(ht._injected||[]).concat(t);}function W0(t){ht._override=Object.assign({},t);}vc.exports=Object.assign(ht,{prompt:ht,prompts:an,inject:U0,override:W0});});var wc=D((p1,Fc)=>{Fc.exports=(t,e)=>{if(!(t.meta&&t.name!=="escape")){if(t.ctrl){if(t.name==="a")return "first";if(t.name==="c"||t.name==="d")return "abort";if(t.name==="e")return "last";if(t.name==="g")return "reset"}if(e){if(t.name==="j")return "down";if(t.name==="k")return "up"}return t.name==="return"||t.name==="enter"?"submit":t.name==="backspace"?"delete":t.name==="delete"?"deleteForward":t.name==="abort"?"abort":t.name==="escape"?"exit":t.name==="tab"?"next":t.name==="pagedown"?"nextPage":t.name==="pageup"?"prevPage":t.name==="home"?"home":t.name==="end"?"end":t.name==="up"?"up":t.name==="down"?"down":t.name==="right"?"right":t.name==="left"?"left":false}};});var es=D((m1,Ec)=>{Ec.exports=t=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),r=new RegExp(e,"g");return typeof t=="string"?t.replace(r,""):t};});var Sc=D((g1,Oc)=>{var Y0=es(),{erase:Ac,cursor:J0}=Q(),K0=t=>[...Y0(t)].length;Oc.exports=function(t,e){if(!e)return Ac.line+J0.to(0);let r=0,s=t.split(/\r?\n/);for(let i of s)r+=1+Math.floor(Math.max(K0(i)-1,0)/e);return Ac.lines(r)};});var cn=D((D1,Rc)=>{var hr={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},z0={arrowUp:hr.arrowUp,arrowDown:hr.arrowDown,arrowLeft:hr.arrowLeft,arrowRight:hr.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},X0=process.platform==="win32"?z0:hr;Rc.exports=X0;});var Pc=D((b1,Tc)=>{var Bt=X(),yt=cn(),hn=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"\u{1F603}".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),Z0=t=>hn[t]||hn.default,dr=Object.freeze({aborted:Bt.red(yt.cross),done:Bt.green(yt.tick),exited:Bt.yellow(yt.cross),default:Bt.cyan("?")}),Q0=(t,e,r)=>e?dr.aborted:r?dr.exited:t?dr.done:dr.default,eb=t=>Bt.gray(t?yt.ellipsis:yt.pointerSmall),tb=(t,e)=>Bt.gray(t?e?yt.pointerSmall:"+":yt.line);Tc.exports={styles:hn,render:Z0,symbols:dr,symbol:Q0,delimiter:eb,item:tb};});var kc=D((y1,$c)=>{var rb=es();$c.exports=function(t,e){let r=String(rb(t)||"").split(/\r?\n/);return e?r.map(s=>Math.ceil(s.length/e)).reduce((s,i)=>s+i):r.length};});var Bc=D((C1,Ic)=>{Ic.exports=(t,e={})=>{let r=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",s=e.width;return (t||"").split(/\r?\n/g).map(i=>i.split(/\s+/g).reduce((n,o)=>(o.length+r.length>=s||n[n.length-1].length+o.length+1<s?n[n.length-1]+=` ${o}`:n.push(`${r}${o}`),n),[r]).join(`
75
+ `),this.close();}_(e,r){return e.toLowerCase()==="y"?(this.value=true,this.submit()):e.toLowerCase()==="n"?(this.value=false,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(cc.hide):this.out.write(K0(this.outputText,this.out.columns)),super.render(),this.outputText=[lc.symbol(this.done,this.aborted),ac.bold(this.msg),lc.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:ac.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(Y0.line+cc.to(0)+this.outputText));}};fc.exports=cn;});var gc=D((F1,mc)=>{mc.exports={TextPrompt:tl(),SelectPrompt:nl(),TogglePrompt:hl(),DatePrompt:ql(),NumberPrompt:Kl(),MultiselectPrompt:sn(),AutocompletePrompt:sc(),AutocompleteMultiselectPrompt:uc(),ConfirmPrompt:pc()};});var bc=D(Dc=>{var de=Dc,J0=gc(),ss=t=>t;function qe(t,e,r={}){return new Promise((s,i)=>{let n=new J0[t](e),o=r.onAbort||ss,u=r.onSubmit||ss,a=r.onExit||ss;n.on("state",e.onState||ss),n.on("submit",h=>s(u(h))),n.on("exit",h=>s(a(h))),n.on("abort",h=>i(o(h)));})}de.text=t=>qe("TextPrompt",t);de.password=t=>(t.style="password",de.text(t));de.invisible=t=>(t.style="invisible",de.text(t));de.number=t=>qe("NumberPrompt",t);de.date=t=>qe("DatePrompt",t);de.confirm=t=>qe("ConfirmPrompt",t);de.list=t=>{let e=t.separator||",";return qe("TextPrompt",t,{onSubmit:r=>r.split(e).map(s=>s.trim())})};de.toggle=t=>qe("TogglePrompt",t);de.select=t=>qe("SelectPrompt",t);de.multiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(s=>s.selected).map(s=>s.value);return qe("MultiselectPrompt",t,{onAbort:e,onSubmit:e})};de.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(s=>s.selected).map(s=>s.value);return qe("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};var z0=(t,e)=>Promise.resolve(e.filter(r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));de.autocomplete=t=>(t.suggest=t.suggest||z0,t.choices=[].concat(t.choices||[]),qe("AutocompletePrompt",t));});var Ec=D((A1,Fc)=>{function yc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,s);}return r}function vc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?yc(Object(r),true).forEach(function(s){X0(t,s,r[s]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yc(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s));});}return t}function X0(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:true,configurable:true,writable:true}):t[e]=r,t}function Z0(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Q0(t))||e){r&&(t=r);var s=0,i=function(){};return {s:i,n:function(){return s>=t.length?{done:true}:{done:false,value:t[s++]}},e:function(h){throw h},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
76
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n=true,o=false,u;return {s:function(){r=r.call(t);},n:function(){var h=r.next();return n=h.done,h},e:function(h){o=true,u=h;},f:function(){try{!n&&r.return!=null&&r.return();}finally{if(o)throw u}}}}function Q0(t,e){if(t){if(typeof t=="string")return Cc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Cc(t,e)}}function Cc(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}function xc(t,e,r,s,i,n,o){try{var u=t[n](o),a=u.value;}catch(h){r(h);return}u.done?e(a):Promise.resolve(a).then(s,i);}function _c(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(a){xc(n,s,i,o,u,"next",a);}function u(a){xc(n,s,i,o,u,"throw",a);}o(void 0);})}}var hn=bc(),eb=["suggest","format","onState","validate","onRender","type"],wc=()=>{};function dt(){return dn.apply(this,arguments)}function dn(){return dn=_c(function*(t=[],{onSubmit:e=wc,onCancel:r=wc}={}){let s={},i=dt._override||{};t=[].concat(t);let n,o,u,a,h,l,c=function(){var g=_c(function*(y,v,_=false){if(!(!_&&y.validate&&y.validate(v)!==true))return y.format?yield y.format(v,s):v});return function(v,_){return g.apply(this,arguments)}}();var d=Z0(t),f;try{for(d.s();!(f=d.n()).done;){o=f.value;var p=o;if(a=p.name,h=p.type,typeof h=="function"&&(h=yield h(n,vc({},s),o),o.type=h),!!h){for(let g in o){if(eb.includes(g))continue;let y=o[g];o[g]=typeof y=="function"?yield y(n,vc({},s),l):y;}if(l=o,typeof o.message!="string")throw new Error("prompt message is required");var m=o;if(a=m.name,h=m.type,hn[h]===void 0)throw new Error(`prompt type (${h}) is not defined`);if(i[o.name]!==void 0&&(n=yield c(o,i[o.name]),n!==void 0)){s[a]=n;continue}try{n=dt._injected?tb(dt._injected,o.initial):yield hn[h](o),s[a]=n=yield c(o,n,!0),u=yield e(o,n,s);}catch{u=!(yield r(o,s));}if(u)return s}}}catch(g){d.e(g);}finally{d.f();}return s}),dn.apply(this,arguments)}function tb(t,e){let r=t.shift();if(r instanceof Error)throw r;return r===void 0?e:r}function rb(t){dt._injected=(dt._injected||[]).concat(t);}function sb(t){dt._override=Object.assign({},t);}Fc.exports=Object.assign(dt,{prompt:dt,prompts:hn,inject:rb,override:sb});});var Oc=D((O1,Ac)=>{Ac.exports=(t,e)=>{if(!(t.meta&&t.name!=="escape")){if(t.ctrl){if(t.name==="a")return "first";if(t.name==="c"||t.name==="d")return "abort";if(t.name==="e")return "last";if(t.name==="g")return "reset"}if(e){if(t.name==="j")return "down";if(t.name==="k")return "up"}return t.name==="return"||t.name==="enter"?"submit":t.name==="backspace"?"delete":t.name==="delete"?"deleteForward":t.name==="abort"?"abort":t.name==="escape"?"exit":t.name==="tab"?"next":t.name==="pagedown"?"nextPage":t.name==="pageup"?"prevPage":t.name==="home"?"home":t.name==="end"?"end":t.name==="up"?"up":t.name==="down"?"down":t.name==="right"?"right":t.name==="left"?"left":false}};});var is=D((R1,Rc)=>{Rc.exports=t=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),r=new RegExp(e,"g");return typeof t=="string"?t.replace(r,""):t};});var Pc=D((S1,Tc)=>{var ib=is(),{erase:Sc,cursor:nb}=Q(),ob=t=>[...ib(t)].length;Tc.exports=function(t,e){if(!e)return Sc.line+nb.to(0);let r=0,s=t.split(/\r?\n/);for(let i of s)r+=1+Math.floor(Math.max(ob(i)-1,0)/e);return Sc.lines(r)};});var fn=D((T1,$c)=>{var pr={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},ub={arrowUp:pr.arrowUp,arrowDown:pr.arrowDown,arrowLeft:pr.arrowLeft,arrowRight:pr.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},ab=process.platform==="win32"?ub:pr;$c.exports=ab;});var Ic=D((P1,kc)=>{var jt=X(),xt=fn(),pn=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"\u{1F603}".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),lb=t=>pn[t]||pn.default,mr=Object.freeze({aborted:jt.red(xt.cross),done:jt.green(xt.tick),exited:jt.yellow(xt.cross),default:jt.cyan("?")}),cb=(t,e,r)=>e?mr.aborted:r?mr.exited:t?mr.done:mr.default,hb=t=>jt.gray(t?xt.ellipsis:xt.pointerSmall),db=(t,e)=>jt.gray(t?e?xt.pointerSmall:"+":xt.line);kc.exports={styles:pn,render:lb,symbols:mr,symbol:cb,delimiter:hb,item:db};});var Bc=D(($1,Mc)=>{var fb=is();Mc.exports=function(t,e){let r=String(fb(t)||"").split(/\r?\n/);return e?r.map(s=>Math.ceil(s.length/e)).reduce((s,i)=>s+i):r.length};});var Nc=D((k1,Hc)=>{Hc.exports=(t,e={})=>{let r=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",s=e.width;return (t||"").split(/\r?\n/g).map(i=>i.split(/\s+/g).reduce((n,o)=>(o.length+r.length>=s||n[n.length-1].length+o.length+1<s?n[n.length-1]+=` ${o}`:n.push(`${r}${o}`),n),[r]).join(`
77
77
  `)).join(`
78
- `)};});var Hc=D((_1,Mc)=>{Mc.exports=(t,e,r)=>{r=r||e;let s=Math.min(e-r,t-Math.floor(r/2));s<0&&(s=0);let i=Math.min(s+r,e);return {startIndex:s,endIndex:i}};});var Ae=D((v1,Nc)=>{Nc.exports={action:wc(),clear:Sc(),style:Pc(),strip:es(),figures:cn(),lines:kc(),wrap:Bc(),entriesToDisplay:Hc()};});var tt=D((x1,Lc)=>{var qc=$("readline"),{action:sb}=Ae(),ib=$("events"),{beep:nb,cursor:ob}=Q(),ub=X(),dn=class extends ib{constructor(e={}){super(),this.firstRender=true,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let r=qc.createInterface({input:this.in,escapeCodeTimeout:50});qc.emitKeypressEvents(this.in,r),this.in.isTTY&&this.in.setRawMode(true);let s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,i=(n,o)=>{let u=sb(o,s);u===false?this._&&this._(n,o):typeof this[u]=="function"?this[u](o):this.bell();};this.close=()=>{this.out.write(ob.show),this.in.removeListener("keypress",i),this.in.isTTY&&this.in.setRawMode(false),r.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=true;},this.in.on("keypress",i);}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited});}bell(){this.out.write(nb);}render(){this.onRender(ub),this.firstRender&&(this.firstRender=false);}};Lc.exports=dn;});var Gc=D((F1,jc)=>{var ts=X(),ab=tt(),{erase:lb,cursor:fr}=Q(),{style:fn,clear:pn,lines:cb,figures:hb}=Ae(),mn=class extends ab{constructor(e={}){super(e),this.transform=fn.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>true),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=pn("",this.out.columns),this.render();}set value(e){!e&&this.initial?(this.placeholder=true,this.rendered=ts.gray(this.transform.render(this.initial))):(this.placeholder=false,this.rendered=this.transform.render(e)),this._value=e,this.fire();}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render();}exit(){this.abort();}abort(){this.value=this.value||this.initial,this.done=this.aborted=true,this.error=false,this.red=false,this.fire(),this.render(),this.out.write(`
78
+ `)};});var Lc=D((I1,qc)=>{qc.exports=(t,e,r)=>{r=r||e;let s=Math.min(e-r,t-Math.floor(r/2));s<0&&(s=0);let i=Math.min(s+r,e);return {startIndex:s,endIndex:i}};});var Ae=D((M1,jc)=>{jc.exports={action:Oc(),clear:Pc(),style:Ic(),strip:is(),figures:fn(),lines:Bc(),wrap:Nc(),entriesToDisplay:Lc()};});var rt=D((B1,Vc)=>{var Gc=$("readline"),{action:pb}=Ae(),mb=$("events"),{beep:gb,cursor:Db}=Q(),bb=X(),mn=class extends mb{constructor(e={}){super(),this.firstRender=true,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let r=Gc.createInterface({input:this.in,escapeCodeTimeout:50});Gc.emitKeypressEvents(this.in,r),this.in.isTTY&&this.in.setRawMode(true);let s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,i=(n,o)=>{let u=pb(o,s);u===false?this._&&this._(n,o):typeof this[u]=="function"?this[u](o):this.bell();};this.close=()=>{this.out.write(Db.show),this.in.removeListener("keypress",i),this.in.isTTY&&this.in.setRawMode(false),r.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=true;},this.in.on("keypress",i);}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited});}bell(){this.out.write(gb);}render(){this.onRender(bb),this.firstRender&&(this.firstRender=false);}};Vc.exports=mn;});var Wc=D((H1,Uc)=>{var ns=X(),yb=rt(),{erase:vb,cursor:gr}=Q(),{style:gn,clear:Dn,lines:Cb,figures:xb}=Ae(),bn=class extends yb{constructor(e={}){super(e),this.transform=gn.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>true),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=Dn("",this.out.columns),this.render();}set value(e){!e&&this.initial?(this.placeholder=true,this.rendered=ns.gray(this.transform.render(this.initial))):(this.placeholder=false,this.rendered=this.transform.render(e)),this._value=e,this.fire();}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render();}exit(){this.abort();}abort(){this.value=this.value||this.initial,this.done=this.aborted=true,this.error=false,this.red=false,this.fire(),this.render(),this.out.write(`
79
79
  `),this.close();}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=false),this.error=!e;}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=true,this.fire(),this.render();return}this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
80
- `),this.close();}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render();}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e);}_(e,r){let s=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.value=`${s}${e}${i}`,this.red=false,this.cursor=this.placeholder?0:s.length+1,this.render();}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),r=this.value.slice(this.cursor);this.value=`${e}${r}`,this.red=false,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor+1);this.value=`${e}${r}`,this.red=false,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render();}first(){this.cursor=0,this.render();}last(){this.cursor=this.value.length,this.render();}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render();}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render();}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(fr.down(cb(this.outputError,this.out.columns)-1)+pn(this.outputError,this.out.columns)),this.out.write(pn(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[fn.symbol(this.done,this.aborted),ts.bold(this.msg),fn.delimiter(this.done),this.red?ts.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
80
+ `),this.close();}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render();}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e);}_(e,r){let s=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.value=`${s}${e}${i}`,this.red=false,this.cursor=this.placeholder?0:s.length+1,this.render();}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),r=this.value.slice(this.cursor);this.value=`${e}${r}`,this.red=false,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor+1);this.value=`${e}${r}`,this.red=false,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render();}first(){this.cursor=0,this.render();}last(){this.cursor=this.value.length,this.render();}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render();}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render();}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(gr.down(Cb(this.outputError,this.out.columns)-1)+Dn(this.outputError,this.out.columns)),this.out.write(Dn(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[gn.symbol(this.done,this.aborted),ns.bold(this.msg),gn.delimiter(this.done),this.red?ns.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
81
81
  `).reduce((e,r,s)=>e+`
82
- ${s?" ":hb.pointerSmall} ${ts.red().italic(r)}`,"")),this.out.write(lb.line+fr.to(0)+this.outputText+fr.save+this.outputError+fr.restore+fr.move(this.cursorOffset,0)));}};jc.exports=mn;});var Yc=D((w1,Wc)=>{var rt=X(),db=tt(),{style:Vc,clear:Uc,figures:rs,wrap:fb,entriesToDisplay:pb}=Ae(),{cursor:mb}=Q(),gn=class extends db{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((r,s)=>(typeof r=="string"&&(r={title:r,value:s}),{title:r&&(r.title||r.value||r),value:r&&(r.value===void 0?s:r.value),description:r&&r.description,selected:r&&r.selected,disabled:r&&r.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=Uc("",this.out.columns),this.render();}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire();}reset(){this.moveCursor(0),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
82
+ ${s?" ":xb.pointerSmall} ${ns.red().italic(r)}`,"")),this.out.write(vb.line+gr.to(0)+this.outputText+gr.save+this.outputError+gr.restore+gr.move(this.cursorOffset,0)));}};Uc.exports=bn;});var zc=D((N1,Jc)=>{var st=X(),_b=rt(),{style:Kc,clear:Yc,figures:os,wrap:wb,entriesToDisplay:Fb}=Ae(),{cursor:Eb}=Q(),yn=class extends _b{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((r,s)=>(typeof r=="string"&&(r={title:r,value:s}),{title:r&&(r.title||r.value||r),value:r&&(r.value===void 0?s:r.value),description:r&&r.description,selected:r&&r.selected,disabled:r&&r.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=Yc("",this.out.columns),this.render();}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire();}reset(){this.moveCursor(0),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
83
83
  `),this.close();}submit(){this.selection.disabled?this.bell():(this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
84
- `),this.close());}first(){this.moveCursor(0),this.render();}last(){this.moveCursor(this.choices.length-1),this.render();}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render();}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render();}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render();}_(e,r){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(mb.hide):this.out.write(Uc(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:r}=pb(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[Vc.symbol(this.done,this.aborted),rt.bold(this.msg),Vc.delimiter(false),this.done?this.selection.title:this.selection.disabled?rt.yellow(this.warn):rt.gray(this.hint)].join(" "),!this.done){this.outputText+=`
85
- `;for(let s=e;s<r;s++){let i,n,o="",u=this.choices[s];s===e&&e>0?n=rs.arrowUp:s===r-1&&r<this.choices.length?n=rs.arrowDown:n=" ",u.disabled?(i=this.cursor===s?rt.gray().underline(u.title):rt.strikethrough().gray(u.title),n=(this.cursor===s?rt.bold().gray(rs.pointer)+" ":" ")+n):(i=this.cursor===s?rt.cyan().underline(u.title):u.title,n=(this.cursor===s?rt.cyan(rs.pointer)+" ":" ")+n,u.description&&this.cursor===s&&(o=` - ${u.description}`,(n.length+i.length+o.length>=this.out.columns||u.description.split(/\r?\n/).length>1)&&(o=`
86
- `+fb(u.description,{margin:3,width:this.out.columns})))),this.outputText+=`${n} ${i}${rt.gray(o)}
87
- `;}}this.out.write(this.outputText);}};Wc.exports=gn;});var Xc=D((E1,zc)=>{var ss=X(),gb=tt(),{style:Jc,clear:Db}=Ae(),{cursor:Kc,erase:bb}=Q(),Dn=class extends gb{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
84
+ `),this.close());}first(){this.moveCursor(0),this.render();}last(){this.moveCursor(this.choices.length-1),this.render();}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render();}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render();}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render();}_(e,r){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(Eb.hide):this.out.write(Yc(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:r}=Fb(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[Kc.symbol(this.done,this.aborted),st.bold(this.msg),Kc.delimiter(false),this.done?this.selection.title:this.selection.disabled?st.yellow(this.warn):st.gray(this.hint)].join(" "),!this.done){this.outputText+=`
85
+ `;for(let s=e;s<r;s++){let i,n,o="",u=this.choices[s];s===e&&e>0?n=os.arrowUp:s===r-1&&r<this.choices.length?n=os.arrowDown:n=" ",u.disabled?(i=this.cursor===s?st.gray().underline(u.title):st.strikethrough().gray(u.title),n=(this.cursor===s?st.bold().gray(os.pointer)+" ":" ")+n):(i=this.cursor===s?st.cyan().underline(u.title):u.title,n=(this.cursor===s?st.cyan(os.pointer)+" ":" ")+n,u.description&&this.cursor===s&&(o=` - ${u.description}`,(n.length+i.length+o.length>=this.out.columns||u.description.split(/\r?\n/).length>1)&&(o=`
86
+ `+wb(u.description,{margin:3,width:this.out.columns})))),this.outputText+=`${n} ${i}${st.gray(o)}
87
+ `;}}this.out.write(this.outputText);}};Jc.exports=yn;});var eh=D((q1,Qc)=>{var us=X(),Ab=rt(),{style:Xc,clear:Ob}=Ae(),{cursor:Zc,erase:Rb}=Q(),vn=class extends Ab{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
88
88
  `),this.close();}submit(){this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
89
- `),this.close();}deactivate(){if(this.value===false)return this.bell();this.value=false,this.render();}activate(){if(this.value===true)return this.bell();this.value=true,this.render();}delete(){this.deactivate();}left(){this.deactivate();}right(){this.activate();}down(){this.deactivate();}up(){this.activate();}next(){this.value=!this.value,this.fire(),this.render();}_(e,r){if(e===" ")this.value=!this.value;else if(e==="1")this.value=true;else if(e==="0")this.value=false;else return this.bell();this.render();}render(){this.closed||(this.firstRender?this.out.write(Kc.hide):this.out.write(Db(this.outputText,this.out.columns)),super.render(),this.outputText=[Jc.symbol(this.done,this.aborted),ss.bold(this.msg),Jc.delimiter(this.done),this.value?this.inactive:ss.cyan().underline(this.inactive),ss.gray("/"),this.value?ss.cyan().underline(this.active):this.active].join(" "),this.out.write(bb.line+Kc.to(0)+this.outputText));}};zc.exports=Dn;});var qe=D((A1,Zc)=>{var bn=class t{constructor({token:e,date:r,parts:s,locales:i}){this.token=e,this.date=r||new Date,this.parts=s||[this],this.locales=i||{};}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((r,s)=>s>e&&r instanceof t)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),r=e.indexOf(this);return e.find((s,i)=>i>r&&s instanceof t)}toString(){return String(this.date)}};Zc.exports=bn;});var eh=D((O1,Qc)=>{var yb=qe(),yn=class extends yb{constructor(e={}){super(e);}up(){this.date.setHours((this.date.getHours()+12)%24);}down(){this.up();}toString(){let e=this.date.getHours()>12?"pm":"am";return /\A/.test(this.token)?e.toUpperCase():e}};Qc.exports=yn;});var rh=D((S1,th)=>{var Cb=qe(),_b=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),Cn=class extends Cb{constructor(e={}){super(e);}up(){this.date.setDate(this.date.getDate()+1);}down(){this.date.setDate(this.date.getDate()-1);}setTo(e){this.date.setDate(parseInt(e.substr(-2)));}toString(){let e=this.date.getDate(),r=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+_b(e):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:e}};th.exports=Cn;});var ih=D((R1,sh)=>{var vb=qe(),_n=class extends vb{constructor(e={}){super(e);}up(){this.date.setHours(this.date.getHours()+1);}down(){this.date.setHours(this.date.getHours()-1);}setTo(e){this.date.setHours(parseInt(e.substr(-2)));}toString(){let e=this.date.getHours();return /h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};sh.exports=_n;});var oh=D((T1,nh)=>{var xb=qe(),vn=class extends xb{constructor(e={}){super(e);}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1);}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1);}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)));}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};nh.exports=vn;});var ah=D((P1,uh)=>{var Fb=qe(),xn=class extends Fb{constructor(e={}){super(e);}up(){this.date.setMinutes(this.date.getMinutes()+1);}down(){this.date.setMinutes(this.date.getMinutes()-1);}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)));}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};uh.exports=xn;});var ch=D(($1,lh)=>{var wb=qe(),Fn=class extends wb{constructor(e={}){super(e);}up(){this.date.setMonth(this.date.getMonth()+1);}down(){this.date.setMonth(this.date.getMonth()-1);}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e);}toString(){let e=this.date.getMonth(),r=this.token.length;return r===2?String(e+1).padStart(2,"0"):r===3?this.locales.monthsShort[e]:r===4?this.locales.months[e]:String(e+1)}};lh.exports=Fn;});var dh=D((k1,hh)=>{var Eb=qe(),wn=class extends Eb{constructor(e={}){super(e);}up(){this.date.setSeconds(this.date.getSeconds()+1);}down(){this.date.setSeconds(this.date.getSeconds()-1);}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)));}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};hh.exports=wn;});var ph=D((I1,fh)=>{var Ab=qe(),En=class extends Ab{constructor(e={}){super(e);}up(){this.date.setFullYear(this.date.getFullYear()+1);}down(){this.date.setFullYear(this.date.getFullYear()-1);}setTo(e){this.date.setFullYear(e.substr(-4));}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};fh.exports=En;});var gh=D((B1,mh)=>{mh.exports={DatePart:qe(),Meridiem:eh(),Day:rh(),Hours:ih(),Milliseconds:oh(),Minutes:ah(),Month:ch(),Seconds:dh(),Year:ph()};});var xh=D((M1,vh)=>{var An=X(),Ob=tt(),{style:Dh,clear:bh,figures:Sb}=Ae(),{erase:Rb,cursor:yh}=Q(),{DatePart:Ch,Meridiem:Tb,Day:Pb,Hours:$b,Milliseconds:kb,Minutes:Ib,Month:Bb,Seconds:Mb,Year:Hb}=gh(),Nb=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,_h={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new Pb(t),3:t=>new Bb(t),4:t=>new Hb(t),5:t=>new Tb(t),6:t=>new $b(t),7:t=>new Ib(t),8:t=>new Mb(t),9:t=>new kb(t)},qb={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},On=class extends Ob{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(qb,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>true),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=bh("",this.out.columns),this.render();}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime());}set mask(e){let r;for(this.parts=[];r=Nb.exec(e);){let i=r.shift(),n=r.findIndex(o=>o!=null);this.parts.push(n in _h?_h[n]({token:r[n]||i,date:this.date,parts:this.parts,locales:this.locales}):r[n]||i);}let s=this.parts.reduce((i,n)=>(typeof n=="string"&&typeof i[i.length-1]=="string"?i[i.length-1]+=n:i.push(n),i),[]);this.parts.splice(0),this.parts.push(...s),this.reset();}moveCursor(e){this.typed="",this.cursor=e,this.fire();}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof Ch)),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.error=false,this.fire(),this.render(),this.out.write(`
89
+ `),this.close();}deactivate(){if(this.value===false)return this.bell();this.value=false,this.render();}activate(){if(this.value===true)return this.bell();this.value=true,this.render();}delete(){this.deactivate();}left(){this.deactivate();}right(){this.activate();}down(){this.deactivate();}up(){this.activate();}next(){this.value=!this.value,this.fire(),this.render();}_(e,r){if(e===" ")this.value=!this.value;else if(e==="1")this.value=true;else if(e==="0")this.value=false;else return this.bell();this.render();}render(){this.closed||(this.firstRender?this.out.write(Zc.hide):this.out.write(Ob(this.outputText,this.out.columns)),super.render(),this.outputText=[Xc.symbol(this.done,this.aborted),us.bold(this.msg),Xc.delimiter(this.done),this.value?this.inactive:us.cyan().underline(this.inactive),us.gray("/"),this.value?us.cyan().underline(this.active):this.active].join(" "),this.out.write(Rb.line+Zc.to(0)+this.outputText));}};Qc.exports=vn;});var Le=D((L1,th)=>{var Cn=class t{constructor({token:e,date:r,parts:s,locales:i}){this.token=e,this.date=r||new Date,this.parts=s||[this],this.locales=i||{};}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((r,s)=>s>e&&r instanceof t)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),r=e.indexOf(this);return e.find((s,i)=>i>r&&s instanceof t)}toString(){return String(this.date)}};th.exports=Cn;});var sh=D((j1,rh)=>{var Sb=Le(),xn=class extends Sb{constructor(e={}){super(e);}up(){this.date.setHours((this.date.getHours()+12)%24);}down(){this.up();}toString(){let e=this.date.getHours()>12?"pm":"am";return /\A/.test(this.token)?e.toUpperCase():e}};rh.exports=xn;});var nh=D((G1,ih)=>{var Tb=Le(),Pb=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),_n=class extends Tb{constructor(e={}){super(e);}up(){this.date.setDate(this.date.getDate()+1);}down(){this.date.setDate(this.date.getDate()-1);}setTo(e){this.date.setDate(parseInt(e.substr(-2)));}toString(){let e=this.date.getDate(),r=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+Pb(e):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:e}};ih.exports=_n;});var uh=D((V1,oh)=>{var $b=Le(),wn=class extends $b{constructor(e={}){super(e);}up(){this.date.setHours(this.date.getHours()+1);}down(){this.date.setHours(this.date.getHours()-1);}setTo(e){this.date.setHours(parseInt(e.substr(-2)));}toString(){let e=this.date.getHours();return /h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};oh.exports=wn;});var lh=D((U1,ah)=>{var kb=Le(),Fn=class extends kb{constructor(e={}){super(e);}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1);}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1);}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)));}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};ah.exports=Fn;});var hh=D((W1,ch)=>{var Ib=Le(),En=class extends Ib{constructor(e={}){super(e);}up(){this.date.setMinutes(this.date.getMinutes()+1);}down(){this.date.setMinutes(this.date.getMinutes()-1);}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)));}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};ch.exports=En;});var fh=D((K1,dh)=>{var Mb=Le(),An=class extends Mb{constructor(e={}){super(e);}up(){this.date.setMonth(this.date.getMonth()+1);}down(){this.date.setMonth(this.date.getMonth()-1);}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e);}toString(){let e=this.date.getMonth(),r=this.token.length;return r===2?String(e+1).padStart(2,"0"):r===3?this.locales.monthsShort[e]:r===4?this.locales.months[e]:String(e+1)}};dh.exports=An;});var mh=D((Y1,ph)=>{var Bb=Le(),On=class extends Bb{constructor(e={}){super(e);}up(){this.date.setSeconds(this.date.getSeconds()+1);}down(){this.date.setSeconds(this.date.getSeconds()-1);}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)));}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};ph.exports=On;});var Dh=D((J1,gh)=>{var Hb=Le(),Rn=class extends Hb{constructor(e={}){super(e);}up(){this.date.setFullYear(this.date.getFullYear()+1);}down(){this.date.setFullYear(this.date.getFullYear()-1);}setTo(e){this.date.setFullYear(e.substr(-4));}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};gh.exports=Rn;});var yh=D((z1,bh)=>{bh.exports={DatePart:Le(),Meridiem:sh(),Day:nh(),Hours:uh(),Milliseconds:lh(),Minutes:hh(),Month:fh(),Seconds:mh(),Year:Dh()};});var Eh=D((X1,Fh)=>{var Sn=X(),Nb=rt(),{style:vh,clear:Ch,figures:qb}=Ae(),{erase:Lb,cursor:xh}=Q(),{DatePart:_h,Meridiem:jb,Day:Gb,Hours:Vb,Milliseconds:Ub,Minutes:Wb,Month:Kb,Seconds:Yb,Year:Jb}=yh(),zb=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,wh={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new Gb(t),3:t=>new Kb(t),4:t=>new Jb(t),5:t=>new jb(t),6:t=>new Vb(t),7:t=>new Wb(t),8:t=>new Yb(t),9:t=>new Ub(t)},Xb={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},Tn=class extends Nb{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(Xb,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>true),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=Ch("",this.out.columns),this.render();}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime());}set mask(e){let r;for(this.parts=[];r=zb.exec(e);){let i=r.shift(),n=r.findIndex(o=>o!=null);this.parts.push(n in wh?wh[n]({token:r[n]||i,date:this.date,parts:this.parts,locales:this.locales}):r[n]||i);}let s=this.parts.reduce((i,n)=>(typeof n=="string"&&typeof i[i.length-1]=="string"?i[i.length-1]+=n:i.push(n),i),[]);this.parts.splice(0),this.parts.push(...s),this.reset();}moveCursor(e){this.typed="",this.cursor=e,this.fire();}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof _h)),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.error=false,this.fire(),this.render(),this.out.write(`
90
90
  `),this.close();}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=false),this.error=!e;}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
91
- `),this.close();}up(){this.typed="",this.parts[this.cursor].up(),this.render();}down(){this.typed="",this.parts[this.cursor].down(),this.render();}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render();}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render();}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(r=>r instanceof Ch)),this.render();}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render());}render(){this.closed||(this.firstRender?this.out.write(yh.hide):this.out.write(bh(this.outputText,this.out.columns)),super.render(),this.outputText=[Dh.symbol(this.done,this.aborted),An.bold(this.msg),Dh.delimiter(false),this.parts.reduce((e,r,s)=>e.concat(s===this.cursor&&!this.done?An.cyan().underline(r.toString()):r),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
91
+ `),this.close();}up(){this.typed="",this.parts[this.cursor].up(),this.render();}down(){this.typed="",this.parts[this.cursor].down(),this.render();}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render();}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render();}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(r=>r instanceof _h)),this.render();}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render());}render(){this.closed||(this.firstRender?this.out.write(xh.hide):this.out.write(Ch(this.outputText,this.out.columns)),super.render(),this.outputText=[vh.symbol(this.done,this.aborted),Sn.bold(this.msg),vh.delimiter(false),this.parts.reduce((e,r,s)=>e.concat(s===this.cursor&&!this.done?Sn.cyan().underline(r.toString()):r),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
92
92
  `).reduce((e,r,s)=>e+`
93
- ${s?" ":Sb.pointerSmall} ${An.red().italic(r)}`,"")),this.out.write(Rb.line+yh.to(0)+this.outputText));}};vh.exports=On;});var Ah=D((H1,Eh)=>{var is=X(),Lb=tt(),{cursor:ns,erase:jb}=Q(),{style:Sn,figures:Gb,clear:Fh,lines:Vb}=Ae(),Ub=/[0-9]/,Rn=t=>t!==void 0,wh=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},Tn=class extends Lb{constructor(e={}){super(e),this.transform=Sn.render(e.style),this.msg=e.message,this.initial=Rn(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=Rn(e.min)?e.min:-1/0,this.max=Rn(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>true),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render();}set value(e){!e&&e!==0?(this.placeholder=true,this.rendered=is.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=false,this.rendered=this.transform.render(`${wh(e,this.round)}`),this._value=wh(e,this.round)),this.fire();}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||Ub.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render();}exit(){this.abort();}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=true,this.error=false,this.fire(),this.render(),this.out.write(`
93
+ ${s?" ":qb.pointerSmall} ${Sn.red().italic(r)}`,"")),this.out.write(Lb.line+xh.to(0)+this.outputText));}};Fh.exports=Tn;});var Sh=D((Z1,Rh)=>{var as=X(),Zb=rt(),{cursor:ls,erase:Qb}=Q(),{style:Pn,figures:ey,clear:Ah,lines:ty}=Ae(),ry=/[0-9]/,$n=t=>t!==void 0,Oh=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},kn=class extends Zb{constructor(e={}){super(e),this.transform=Pn.render(e.style),this.msg=e.message,this.initial=$n(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=$n(e.min)?e.min:-1/0,this.max=$n(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>true),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render();}set value(e){!e&&e!==0?(this.placeholder=true,this.rendered=as.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=false,this.rendered=this.transform.render(`${Oh(e,this.round)}`),this._value=Oh(e,this.round)),this.fire();}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||ry.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render();}exit(){this.abort();}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=true,this.error=false,this.fire(),this.render(),this.out.write(`
94
94
  `),this.close();}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=false),this.error=!e;}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let e=this.value;this.value=e!==""?e:this.initial,this.done=true,this.aborted=false,this.error=false,this.fire(),this.render(),this.out.write(`
95
- `),this.close();}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render();}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render();}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render();}next(){this.value=this.initial,this.fire(),this.render();}_(e,r){if(!this.valid(e))return this.bell();let s=Date.now();if(s-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=s,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render();}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(ns.down(Vb(this.outputError,this.out.columns)-1)+Fh(this.outputError,this.out.columns)),this.out.write(Fh(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Sn.symbol(this.done,this.aborted),is.bold(this.msg),Sn.delimiter(this.done),!this.done||!this.done&&!this.placeholder?is[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
95
+ `),this.close();}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render();}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render();}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render();}next(){this.value=this.initial,this.fire(),this.render();}_(e,r){if(!this.valid(e))return this.bell();let s=Date.now();if(s-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=s,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render();}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(ls.down(ty(this.outputError,this.out.columns)-1)+Ah(this.outputError,this.out.columns)),this.out.write(Ah(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Pn.symbol(this.done,this.aborted),as.bold(this.msg),Pn.delimiter(this.done),!this.done||!this.done&&!this.placeholder?as[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
96
96
  `).reduce((e,r,s)=>e+`
97
- ${s?" ":Gb.pointerSmall} ${is.red().italic(r)}`,"")),this.out.write(jb.line+ns.to(0)+this.outputText+ns.save+this.outputError+ns.restore));}};Eh.exports=Tn;});var $n=D((N1,Rh)=>{var Le=X(),{cursor:Wb}=Q(),Yb=tt(),{clear:Oh,figures:dt,style:Sh,wrap:Jb,entriesToDisplay:Kb}=Ae(),Pn=class extends Yb{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=false,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((r,s)=>(typeof r=="string"&&(r={title:r,value:s}),{title:r&&(r.title||r.value||r),description:r&&r.description,value:r&&(r.value===void 0?s:r.value),selected:r&&r.selected,disabled:r&&r.disabled})),this.clear=Oh("",this.out.columns),e.overrideRender||this.render();}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render();}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
97
+ ${s?" ":ey.pointerSmall} ${as.red().italic(r)}`,"")),this.out.write(Qb.line+ls.to(0)+this.outputText+ls.save+this.outputError+ls.restore));}};Rh.exports=kn;});var Mn=D((Q1,$h)=>{var je=X(),{cursor:sy}=Q(),iy=rt(),{clear:Th,figures:ft,style:Ph,wrap:ny,entriesToDisplay:oy}=Ae(),In=class extends iy{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=false,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((r,s)=>(typeof r=="string"&&(r={title:r,value:s}),{title:r&&(r.title||r.value||r),description:r&&r.description,value:r&&(r.value===void 0?s:r.value),selected:r&&r.selected,disabled:r&&r.disabled})),this.clear=Th("",this.out.columns),e.overrideRender||this.render();}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render();}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
98
98
  `),this.close();}submit(){let e=this.value.filter(r=>r.selected);this.minSelected&&e.length<this.minSelected?(this.showMinError=true,this.render()):(this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
99
99
  `),this.close());}first(){this.cursor=0,this.render();}last(){this.cursor=this.value.length-1,this.render();}next(){this.cursor=(this.cursor+1)%this.value.length,this.render();}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render();}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render();}left(){this.value[this.cursor].selected=false,this.render();}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true,this.render();}handleSpaceToggle(){let e=this.value[this.cursor];if(e.selected)e.selected=false,this.render();else {if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=true,this.render();}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let e=!this.value[this.cursor].selected;this.value.filter(r=>!r.disabled).forEach(r=>r.selected=e),this.render();}_(e,r){if(e===" ")this.handleSpaceToggle();else if(e==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
100
100
  Instructions:
101
- ${dt.arrowUp}/${dt.arrowDown}: Highlight option
102
- ${dt.arrowLeft}/${dt.arrowRight}/[space]: Toggle selection
101
+ ${ft.arrowUp}/${ft.arrowDown}: Highlight option
102
+ ${ft.arrowLeft}/${ft.arrowRight}/[space]: Toggle selection
103
103
  `+(this.maxChoices===void 0?` a: Toggle all
104
- `:"")+" enter/return: Complete answer":""}renderOption(e,r,s,i){let n=(r.selected?Le.green(dt.radioOn):dt.radioOff)+" "+i+" ",o,u;return r.disabled?o=e===s?Le.gray().underline(r.title):Le.strikethrough().gray(r.title):(o=e===s?Le.cyan().underline(r.title):r.title,e===s&&r.description&&(u=` - ${r.description}`,(n.length+o.length+u.length>=this.out.columns||r.description.split(/\r?\n/).length>1)&&(u=`
105
- `+Jb(r.description,{margin:n.length,width:this.out.columns})))),n+o+Le.gray(u||"")}paginateOptions(e){if(e.length===0)return Le.red("No matches for this query.");let{startIndex:r,endIndex:s}=Kb(this.cursor,e.length,this.optionsPerPage),i,n=[];for(let o=r;o<s;o++)o===r&&r>0?i=dt.arrowUp:o===s-1&&s<e.length?i=dt.arrowDown:i=" ",n.push(this.renderOption(this.cursor,e[o],o,i));return `
104
+ `:"")+" enter/return: Complete answer":""}renderOption(e,r,s,i){let n=(r.selected?je.green(ft.radioOn):ft.radioOff)+" "+i+" ",o,u;return r.disabled?o=e===s?je.gray().underline(r.title):je.strikethrough().gray(r.title):(o=e===s?je.cyan().underline(r.title):r.title,e===s&&r.description&&(u=` - ${r.description}`,(n.length+o.length+u.length>=this.out.columns||r.description.split(/\r?\n/).length>1)&&(u=`
105
+ `+ny(r.description,{margin:n.length,width:this.out.columns})))),n+o+je.gray(u||"")}paginateOptions(e){if(e.length===0)return je.red("No matches for this query.");let{startIndex:r,endIndex:s}=oy(this.cursor,e.length,this.optionsPerPage),i,n=[];for(let o=r;o<s;o++)o===r&&r>0?i=ft.arrowUp:o===s-1&&s<e.length?i=ft.arrowDown:i=" ",n.push(this.renderOption(this.cursor,e[o],o,i));return `
106
106
  `+n.join(`
107
- `)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[Le.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(Le.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(Wb.hide),super.render();let e=[Sh.symbol(this.done,this.aborted),Le.bold(this.msg),Sh.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=Le.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=false),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=Oh(e,this.out.columns);}};Rh.exports=Pn;});var Ih=D((q1,kh)=>{var pr=X(),zb=tt(),{erase:Xb,cursor:Th}=Q(),{style:kn,clear:Ph,figures:In,wrap:Zb,entriesToDisplay:Qb}=Ae(),$h=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),ey=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),ty=(t,e)=>{let r=t.findIndex(s=>s.value===e||s.title===e);return r>-1?r:void 0},Bn=class extends zb{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:ty(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||false,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=kn.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=Ph("",this.out.columns),this.complete(this.render),this.render();}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e;}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=$h(this.suggestions,e):this.value=this.fallback.value,this.fire();}async complete(e){let r=this.completing=this.suggest(this.input,this.choices),s=await r;if(this.completing!==r)return;this.suggestions=s.map((n,o,u)=>({title:ey(u,o),value:$h(u,o),description:n.description})),this.completing=false;let i=Math.max(s.length-1,0);this.moveSelect(Math.min(i,this.select)),e&&e();}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render();}),this.render();}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
107
+ `)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[je.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(je.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(sy.hide),super.render();let e=[Ph.symbol(this.done,this.aborted),je.bold(this.msg),Ph.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=je.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=false),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=Th(e,this.out.columns);}};$h.exports=In;});var Hh=D((e2,Bh)=>{var Dr=X(),uy=rt(),{erase:ay,cursor:kh}=Q(),{style:Bn,clear:Ih,figures:Hn,wrap:ly,entriesToDisplay:cy}=Ae(),Mh=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),hy=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),dy=(t,e)=>{let r=t.findIndex(s=>s.value===e||s.title===e);return r>-1?r:void 0},Nn=class extends uy{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:dy(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||false,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=Bn.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=Ih("",this.out.columns),this.complete(this.render),this.render();}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e;}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=Mh(this.suggestions,e):this.value=this.fallback.value,this.fire();}async complete(e){let r=this.completing=this.suggest(this.input,this.choices),s=await r;if(this.completing!==r)return;this.suggestions=s.map((n,o,u)=>({title:hy(u,o),value:Mh(u,o),description:n.description})),this.completing=false;let i=Math.max(s.length-1,0);this.moveSelect(Math.min(i,this.select)),e&&e();}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render();}),this.render();}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
108
108
  `),this.close());}abort(){this.done=this.aborted=true,this.exited=false,this.fire(),this.render(),this.out.write(`
109
109
  `),this.close();}submit(){this.done=true,this.aborted=this.exited=false,this.fire(),this.render(),this.out.write(`
110
- `),this.close();}_(e,r){let s=this.input.slice(0,this.cursor),i=this.input.slice(this.cursor);this.input=`${s}${e}${i}`,this.cursor=s.length+1,this.complete(this.render),this.render();}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),r=this.input.slice(this.cursor);this.input=`${e}${r}`,this.complete(this.render),this.cursor=this.cursor-1,this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor+1);this.input=`${e}${r}`,this.complete(this.render),this.render();}first(){this.moveSelect(0),this.render();}last(){this.moveSelect(this.suggestions.length-1),this.render();}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render();}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render();}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render();}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render();}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render();}renderOption(e,r,s,i){let n,o=s?In.arrowUp:i?In.arrowDown:" ",u=r?pr.cyan().underline(e.title):e.title;return o=(r?pr.cyan(In.pointer)+" ":" ")+o,e.description&&(n=` - ${e.description}`,(o.length+u.length+n.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(n=`
111
- `+Zb(e.description,{margin:3,width:this.out.columns}))),o+" "+u+pr.gray(n||"")}render(){if(this.closed)return;this.firstRender?this.out.write(Th.hide):this.out.write(Ph(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:r}=Qb(this.select,this.choices.length,this.limit);if(this.outputText=[kn.symbol(this.done,this.aborted,this.exited),pr.bold(this.msg),kn.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let s=this.suggestions.slice(e,r).map((i,n)=>this.renderOption(i,this.select===n+e,n===0&&e>0,n+e===r-1&&r<this.choices.length)).join(`
110
+ `),this.close();}_(e,r){let s=this.input.slice(0,this.cursor),i=this.input.slice(this.cursor);this.input=`${s}${e}${i}`,this.cursor=s.length+1,this.complete(this.render),this.render();}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),r=this.input.slice(this.cursor);this.input=`${e}${r}`,this.complete(this.render),this.cursor=this.cursor-1,this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor+1);this.input=`${e}${r}`,this.complete(this.render),this.render();}first(){this.moveSelect(0),this.render();}last(){this.moveSelect(this.suggestions.length-1),this.render();}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render();}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render();}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render();}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render();}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render();}renderOption(e,r,s,i){let n,o=s?Hn.arrowUp:i?Hn.arrowDown:" ",u=r?Dr.cyan().underline(e.title):e.title;return o=(r?Dr.cyan(Hn.pointer)+" ":" ")+o,e.description&&(n=` - ${e.description}`,(o.length+u.length+n.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(n=`
111
+ `+ly(e.description,{margin:3,width:this.out.columns}))),o+" "+u+Dr.gray(n||"")}render(){if(this.closed)return;this.firstRender?this.out.write(kh.hide):this.out.write(Ih(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:r}=cy(this.select,this.choices.length,this.limit);if(this.outputText=[Bn.symbol(this.done,this.aborted,this.exited),Dr.bold(this.msg),Bn.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let s=this.suggestions.slice(e,r).map((i,n)=>this.renderOption(i,this.select===n+e,n===0&&e>0,n+e===r-1&&r<this.choices.length)).join(`
112
112
  `);this.outputText+=`
113
- `+(s||pr.gray(this.fallback.title));}this.out.write(Xb.line+Th.to(0)+this.outputText);}};kh.exports=Bn;});var Nh=D((L1,Hh)=>{var st=X(),{cursor:ry}=Q(),sy=$n(),{clear:Bh,style:Mh,figures:Mt}=Ae(),Mn=class extends sy{constructor(e={}){e.overrideRender=true,super(e),this.inputValue="",this.clear=Bh("",this.out.columns),this.filteredOptions=this.value,this.render();}last(){this.cursor=this.filteredOptions.length-1,this.render();}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render();}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render();}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render();}left(){this.filteredOptions[this.cursor].selected=false,this.render();}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true,this.render();}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions());}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(s=>this.inputValue?!!(typeof s.title=="string"&&s.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof s.value=="string"&&s.value.toLowerCase().includes(this.inputValue.toLowerCase())):true);let r=this.filteredOptions.findIndex(s=>s===e);this.cursor=r<0?0:r,this.render();}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=false,this.render();else {if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=true,this.render();}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions();}_(e,r){e===" "?this.handleSpaceToggle():this.handleInputChange(e);}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
113
+ `+(s||Dr.gray(this.fallback.title));}this.out.write(ay.line+kh.to(0)+this.outputText);}};Bh.exports=Nn;});var jh=D((t2,Lh)=>{var it=X(),{cursor:fy}=Q(),py=Mn(),{clear:Nh,style:qh,figures:Gt}=Ae(),qn=class extends py{constructor(e={}){e.overrideRender=true,super(e),this.inputValue="",this.clear=Nh("",this.out.columns),this.filteredOptions=this.value,this.render();}last(){this.cursor=this.filteredOptions.length-1,this.render();}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render();}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render();}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render();}left(){this.filteredOptions[this.cursor].selected=false,this.render();}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true,this.render();}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions());}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(s=>this.inputValue?!!(typeof s.title=="string"&&s.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof s.value=="string"&&s.value.toLowerCase().includes(this.inputValue.toLowerCase())):true);let r=this.filteredOptions.findIndex(s=>s===e);this.cursor=r<0?0:r,this.render();}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=false,this.render();else {if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=true,this.render();}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions();}_(e,r){e===" "?this.handleSpaceToggle():this.handleInputChange(e);}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
114
114
  Instructions:
115
- ${Mt.arrowUp}/${Mt.arrowDown}: Highlight option
116
- ${Mt.arrowLeft}/${Mt.arrowRight}/[space]: Toggle selection
115
+ ${Gt.arrowUp}/${Gt.arrowDown}: Highlight option
116
+ ${Gt.arrowLeft}/${Gt.arrowRight}/[space]: Toggle selection
117
117
  [a,b,c]/delete: Filter choices
118
118
  enter/return: Complete answer
119
119
  `:""}renderCurrentInput(){return `
120
- Filtered results for: ${this.inputValue?this.inputValue:st.gray("Enter something to filter")}
121
- `}renderOption(e,r,s){let i;return r.disabled?i=e===s?st.gray().underline(r.title):st.strikethrough().gray(r.title):i=e===s?st.cyan().underline(r.title):r.title,(r.selected?st.green(Mt.radioOn):Mt.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[st.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(st.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(ry.hide),super.render();let e=[Mh.symbol(this.done,this.aborted),st.bold(this.msg),Mh.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=st.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=false),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=Bh(e,this.out.columns);}};Hh.exports=Mn;});var Vh=D((j1,Gh)=>{var qh=X(),iy=tt(),{style:Lh,clear:ny}=Ae(),{erase:oy,cursor:jh}=Q(),Hn=class extends iy{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
120
+ Filtered results for: ${this.inputValue?this.inputValue:it.gray("Enter something to filter")}
121
+ `}renderOption(e,r,s){let i;return r.disabled?i=e===s?it.gray().underline(r.title):it.strikethrough().gray(r.title):i=e===s?it.cyan().underline(r.title):r.title,(r.selected?it.green(Gt.radioOn):Gt.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[it.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(it.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(fy.hide),super.render();let e=[qh.symbol(this.done,this.aborted),it.bold(this.msg),qh.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=it.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=false),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=Nh(e,this.out.columns);}};Lh.exports=qn;});var Kh=D((r2,Wh)=>{var Gh=X(),my=rt(),{style:Vh,clear:gy}=Ae(),{erase:Dy,cursor:Uh}=Q(),Ln=class extends my{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
122
122
  `),this.close();}submit(){this.value=this.value||false,this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
123
- `),this.close();}_(e,r){return e.toLowerCase()==="y"?(this.value=true,this.submit()):e.toLowerCase()==="n"?(this.value=false,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(jh.hide):this.out.write(ny(this.outputText,this.out.columns)),super.render(),this.outputText=[Lh.symbol(this.done,this.aborted),qh.bold(this.msg),Lh.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:qh.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(oy.line+jh.to(0)+this.outputText));}};Gh.exports=Hn;});var Wh=D((G1,Uh)=>{Uh.exports={TextPrompt:Gc(),SelectPrompt:Yc(),TogglePrompt:Xc(),DatePrompt:xh(),NumberPrompt:Ah(),MultiselectPrompt:$n(),AutocompletePrompt:Ih(),AutocompleteMultiselectPrompt:Nh(),ConfirmPrompt:Vh()};});var Jh=D(Yh=>{var fe=Yh,uy=Wh(),os=t=>t;function je(t,e,r={}){return new Promise((s,i)=>{let n=new uy[t](e),o=r.onAbort||os,u=r.onSubmit||os,a=r.onExit||os;n.on("state",e.onState||os),n.on("submit",h=>s(u(h))),n.on("exit",h=>s(a(h))),n.on("abort",h=>i(o(h)));})}fe.text=t=>je("TextPrompt",t);fe.password=t=>(t.style="password",fe.text(t));fe.invisible=t=>(t.style="invisible",fe.text(t));fe.number=t=>je("NumberPrompt",t);fe.date=t=>je("DatePrompt",t);fe.confirm=t=>je("ConfirmPrompt",t);fe.list=t=>{let e=t.separator||",";return je("TextPrompt",t,{onSubmit:r=>r.split(e).map(s=>s.trim())})};fe.toggle=t=>je("TogglePrompt",t);fe.select=t=>je("SelectPrompt",t);fe.multiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(s=>s.selected).map(s=>s.value);return je("MultiselectPrompt",t,{onAbort:e,onSubmit:e})};fe.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(s=>s.selected).map(s=>s.value);return je("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};var ay=(t,e)=>Promise.resolve(e.filter(r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));fe.autocomplete=t=>(t.suggest=t.suggest||ay,t.choices=[].concat(t.choices||[]),je("AutocompletePrompt",t));});var Xh=D((U1,zh)=>{var Nn=Jh(),ly=["suggest","format","onState","validate","onRender","type"],Kh=()=>{};async function ft(t=[],{onSubmit:e=Kh,onCancel:r=Kh}={}){let s={},i=ft._override||{};t=[].concat(t);let n,o,u,a,h,l,c=async(d,f,p=false)=>{if(!(!p&&d.validate&&d.validate(f)!==true))return d.format?await d.format(f,s):f};for(o of t)if({name:a,type:h}=o,typeof h=="function"&&(h=await h(n,{...s},o),o.type=h),!!h){for(let d in o){if(ly.includes(d))continue;let f=o[d];o[d]=typeof f=="function"?await f(n,{...s},l):f;}if(l=o,typeof o.message!="string")throw new Error("prompt message is required");if({name:a,type:h}=o,Nn[h]===void 0)throw new Error(`prompt type (${h}) is not defined`);if(i[o.name]!==void 0&&(n=await c(o,i[o.name]),n!==void 0)){s[a]=n;continue}try{n=ft._injected?cy(ft._injected,o.initial):await Nn[h](o),s[a]=n=await c(o,n,!0),u=await e(o,n,s);}catch{u=!await r(o,s);}if(u)return s}return s}function cy(t,e){let r=t.shift();if(r instanceof Error)throw r;return r===void 0?e:r}function hy(t){ft._injected=(ft._injected||[]).concat(t);}function dy(t){ft._override=Object.assign({},t);}zh.exports=Object.assign(ft,{prompt:ft,prompts:Nn,inject:hy,override:dy});});var us=D((W1,Zh)=>{function fy(t){t=(Array.isArray(t)?t:t.split(".")).map(Number);let e=0,r=process.versions.node.split(".").map(Number);for(;e<t.length;e++){if(r[e]>t[e])return false;if(t[e]>r[e])return true}return false}Zh.exports=fy("8.6.0")?xc():Xh();});var Sf=D((MA,K_)=>{K_.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}};});var Uo=D((HA,Tf)=>{var ys=Object.assign({},Sf()),Rf=Object.keys(ys);Object.defineProperty(ys,"random",{get(){let t=Math.floor(Math.random()*Rf.length),e=Rf[t];return ys[e]}});Tf.exports=ys;});var Zf=D((VO,su)=>{var Av=Object.prototype.hasOwnProperty,he="~";function Fr(){}Object.create&&(Fr.prototype=Object.create(null),new Fr().__proto__||(he=false));function Ov(t,e,r){this.fn=t,this.context=e,this.once=r||false;}function Xf(t,e,r,s,i){if(typeof r!="function")throw new TypeError("The listener must be a function");var n=new Ov(r,s||t,i),o=he?he+e:e;return t._events[o]?t._events[o].fn?t._events[o]=[t._events[o],n]:t._events[o].push(n):(t._events[o]=n,t._eventsCount++),t}function Ts(t,e){--t._eventsCount===0?t._events=new Fr:delete t._events[e];}function ae(){this._events=new Fr,this._eventsCount=0;}ae.prototype.eventNames=function(){var e=[],r,s;if(this._eventsCount===0)return e;for(s in r=this._events)Av.call(r,s)&&e.push(he?s.slice(1):s);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(r)):e};ae.prototype.listeners=function(e){var r=he?he+e:e,s=this._events[r];if(!s)return [];if(s.fn)return [s.fn];for(var i=0,n=s.length,o=new Array(n);i<n;i++)o[i]=s[i].fn;return o};ae.prototype.listenerCount=function(e){var r=he?he+e:e,s=this._events[r];return s?s.fn?1:s.length:0};ae.prototype.emit=function(e,r,s,i,n,o){var u=he?he+e:e;if(!this._events[u])return false;var a=this._events[u],h=arguments.length,l,c;if(a.fn){switch(a.once&&this.removeListener(e,a.fn,void 0,true),h){case 1:return a.fn.call(a.context),true;case 2:return a.fn.call(a.context,r),true;case 3:return a.fn.call(a.context,r,s),true;case 4:return a.fn.call(a.context,r,s,i),true;case 5:return a.fn.call(a.context,r,s,i,n),true;case 6:return a.fn.call(a.context,r,s,i,n,o),true}for(c=1,l=new Array(h-1);c<h;c++)l[c-1]=arguments[c];a.fn.apply(a.context,l);}else {var d=a.length,f;for(c=0;c<d;c++)switch(a[c].once&&this.removeListener(e,a[c].fn,void 0,true),h){case 1:a[c].fn.call(a[c].context);break;case 2:a[c].fn.call(a[c].context,r);break;case 3:a[c].fn.call(a[c].context,r,s);break;case 4:a[c].fn.call(a[c].context,r,s,i);break;default:if(!l)for(f=1,l=new Array(h-1);f<h;f++)l[f-1]=arguments[f];a[c].fn.apply(a[c].context,l);}}return true};ae.prototype.on=function(e,r,s){return Xf(this,e,r,s,false)};ae.prototype.once=function(e,r,s){return Xf(this,e,r,s,true)};ae.prototype.removeListener=function(e,r,s,i){var n=he?he+e:e;if(!this._events[n])return this;if(!r)return Ts(this,n),this;var o=this._events[n];if(o.fn)o.fn===r&&(!i||o.once)&&(!s||o.context===s)&&Ts(this,n);else {for(var u=0,a=[],h=o.length;u<h;u++)(o[u].fn!==r||i&&!o[u].once||s&&o[u].context!==s)&&a.push(o[u]);a.length?this._events[n]=a.length===1?a[0]:a:Ts(this,n);}return this};ae.prototype.removeAllListeners=function(e){var r;return e?(r=he?he+e:e,this._events[r]&&Ts(this,r)):(this._events=new Fr,this._eventsCount=0),this};ae.prototype.off=ae.prototype.removeListener;ae.prototype.addListener=ae.prototype.on;ae.prefixed=he;ae.EventEmitter=ae;typeof su<"u"&&(su.exports=ae);});var ep=D((UO,Qf)=>{Qf.exports=function(e,r){if(r=r.split(":")[0],e=+e,!e)return false;switch(r){case "http":case "ws":return e!==80;case "https":case "wss":return e!==443;case "ftp":return e!==21;case "gopher":return e!==70;case "file":return false}return e!==0};});var Ps=D(rp=>{var nt=rp,Sv=$("url"),tp=$("util")._extend,Rv=ep(),Tv=/(^|,)\s*upgrade\s*($|,)/i,iu=/^https|wss/;nt.isSSL=iu;nt.setupOutgoing=function(t,e,r,s){t.port=e[s||"target"].port||(iu.test(e[s||"target"].protocol)?443:80),["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"].forEach(function(u){t[u]=e[s||"target"][u];}),t.method=e.method||r.method,t.headers=tp({},r.headers),e.headers&&tp(t.headers,e.headers),e.auth&&(t.auth=e.auth),e.ca&&(t.ca=e.ca),iu.test(e[s||"target"].protocol)&&(t.rejectUnauthorized=typeof e.secure>"u"?true:e.secure),t.agent=e.agent||false,t.localAddress=e.localAddress,t.agent||(t.headers=t.headers||{},(typeof t.headers.connection!="string"||!Tv.test(t.headers.connection))&&(t.headers.connection="close"));var i=e[s||"target"],n=i&&e.prependPath!==false&&i.path||"",o=e.toProxy?r.url:Sv.parse(r.url).path||"";return o=e.ignorePath?"":o,t.path=nt.urlJoin(n,o),e.changeOrigin&&(t.headers.host=Rv(t.port,e[s||"target"].protocol)&&!Pv(t.host)?t.host+":"+t.port:t.host),t};nt.setupSocket=function(t){return t.setTimeout(0),t.setNoDelay(true),t.setKeepAlive(true,0),t};nt.getPort=function(t){var e=t.headers.host?t.headers.host.match(/:(\d+)/):"";return e?e[1]:nt.hasEncryptedConnection(t)?"443":"80"};nt.hasEncryptedConnection=function(t){return !!(t.connection.encrypted||t.connection.pair)};nt.urlJoin=function(){var t=Array.prototype.slice.call(arguments),e=t.length-1,r=t[e],s=r.split("?"),i;return t[e]=s.shift(),i=[t.filter(Boolean).join("/").replace(/\/+/g,"/").replace("http:/","http://").replace("https:/","https://")],i.push.apply(i,s),i.join("?")};nt.rewriteCookieProperty=function t(e,r,s){return Array.isArray(e)?e.map(function(i){return t(i,r,s)}):e.replace(new RegExp("(;\\s*"+s+"=)([^;]+)","i"),function(i,n,o){var u;if(o in r)u=r[o];else if("*"in r)u=r["*"];else return i;return u?n+u:""})};function Pv(t){return !!~t.indexOf(":")}});var op=D((YO,np)=>{var sp=$("url"),ip=Ps(),$v=/^201|30(1|2|7|8)$/;np.exports={removeChunked:function(e,r,s){e.httpVersion==="1.0"&&delete s.headers["transfer-encoding"];},setConnection:function(e,r,s){e.httpVersion==="1.0"?s.headers.connection=e.headers.connection||"close":e.httpVersion!=="2.0"&&!s.headers.connection&&(s.headers.connection=e.headers.connection||"keep-alive");},setRedirectHostRewrite:function(e,r,s,i){if((i.hostRewrite||i.autoRewrite||i.protocolRewrite)&&s.headers.location&&$v.test(s.statusCode)){var n=sp.parse(i.target),o=sp.parse(s.headers.location);if(n.host!=o.host)return;i.hostRewrite?o.host=i.hostRewrite:i.autoRewrite&&(o.host=e.headers.host),i.protocolRewrite&&(o.protocol=i.protocolRewrite),s.headers.location=o.format();}},writeHeaders:function(e,r,s,i){var n=i.cookieDomainRewrite,o=i.cookiePathRewrite,u=i.preserveHeaderKeyCase,a,h=function(d,f){f!=null&&(n&&d.toLowerCase()==="set-cookie"&&(f=ip.rewriteCookieProperty(f,n,"domain")),o&&d.toLowerCase()==="set-cookie"&&(f=ip.rewriteCookieProperty(f,o,"path")),r.setHeader(String(d).trim(),f));};if(typeof n=="string"&&(n={"*":n}),typeof o=="string"&&(o={"*":o}),u&&s.rawHeaders!=null){a={};for(var l=0;l<s.rawHeaders.length;l+=2){var c=s.rawHeaders[l];a[c.toLowerCase()]=c;}}Object.keys(s.headers).forEach(function(d){var f=s.headers[d];u&&a&&(d=a[d]||d),h(d,f);});},writeStatusCode:function(e,r,s){s.statusMessage?(r.statusCode=s.statusCode,r.statusMessage=s.statusMessage):r.statusCode=s.statusCode;}};});var ap=D((JO,up)=>{var Jt=1e3,Kt=Jt*60,zt=Kt*60,wt=zt*24,kv=wt*7,Iv=wt*365.25;up.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Bv(t);if(r==="number"&&isFinite(t))return e.long?Hv(t):Mv(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Bv(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),s=(e[2]||"ms").toLowerCase();switch(s){case "years":case "year":case "yrs":case "yr":case "y":return r*Iv;case "weeks":case "week":case "w":return r*kv;case "days":case "day":case "d":return r*wt;case "hours":case "hour":case "hrs":case "hr":case "h":return r*zt;case "minutes":case "minute":case "mins":case "min":case "m":return r*Kt;case "seconds":case "second":case "secs":case "sec":case "s":return r*Jt;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return r;default:return}}}}function Mv(t){var e=Math.abs(t);return e>=wt?Math.round(t/wt)+"d":e>=zt?Math.round(t/zt)+"h":e>=Kt?Math.round(t/Kt)+"m":e>=Jt?Math.round(t/Jt)+"s":t+"ms"}function Hv(t){var e=Math.abs(t);return e>=wt?$s(t,e,wt,"day"):e>=zt?$s(t,e,zt,"hour"):e>=Kt?$s(t,e,Kt,"minute"):e>=Jt?$s(t,e,Jt,"second"):t+" ms"}function $s(t,e,r,s){var i=e>=r*1.5;return Math.round(t/r)+" "+s+(i?"s":"")}});var nu=D((KO,lp)=>{function Nv(t){r.debug=r,r.default=r,r.coerce=a,r.disable=o,r.enable=i,r.enabled=u,r.humanize=ap(),r.destroy=h,Object.keys(t).forEach(l=>{r[l]=t[l];}),r.names=[],r.skips=[],r.formatters={};function e(l){let c=0;for(let d=0;d<l.length;d++)c=(c<<5)-c+l.charCodeAt(d),c|=0;return r.colors[Math.abs(c)%r.colors.length]}r.selectColor=e;function r(l){let c,d=null,f,p;function m(...g){if(!m.enabled)return;let b=m,y=Number(new Date),v=y-(c||y);b.diff=v,b.prev=c,b.curr=y,c=y,g[0]=r.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let F=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(R,P)=>{if(R==="%%")return "%";F++;let O=r.formatters[P];if(typeof O=="function"){let T=g[F];R=O.call(b,T),g.splice(F,1),F--;}return R}),r.formatArgs.call(b,g),(b.log||r.log).apply(b,g);}return m.namespace=l,m.useColors=r.useColors(),m.color=r.selectColor(l),m.extend=s,m.destroy=r.destroy,Object.defineProperty(m,"enabled",{enumerable:true,configurable:false,get:()=>d!==null?d:(f!==r.namespaces&&(f=r.namespaces,p=r.enabled(l)),p),set:g=>{d=g;}}),typeof r.init=="function"&&r.init(m),m}function s(l,c){let d=r(this.namespace+(typeof c>"u"?":":c)+l);return d.log=this.log,d}function i(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let c=(typeof l=="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of c)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d);}function n(l,c){let d=0,f=0,p=-1,m=0;for(;d<l.length;)if(f<c.length&&(c[f]===l[d]||c[f]==="*"))c[f]==="*"?(p=f,m=d,f++):(d++,f++);else if(p!==-1)f=p+1,m++,d=m;else return false;for(;f<c.length&&c[f]==="*";)f++;return f===c.length}function o(){let l=[...r.names,...r.skips.map(c=>"-"+c)].join(",");return r.enable(""),l}function u(l){for(let c of r.skips)if(n(l,c))return false;for(let c of r.names)if(n(l,c))return true;return false}function a(l){return l instanceof Error?l.stack||l.message:l}function h(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");}return r.enable(r.load()),r}lp.exports=Nv;});var cp=D((pe,ks)=>{pe.formatArgs=Lv;pe.save=jv;pe.load=Gv;pe.useColors=qv;pe.storage=Vv();pe.destroy=(()=>{let t=false;return ()=>{t||(t=true,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));}})();pe.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"];function qv(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return true;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return false;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Lv(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+ks.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,s=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(s=r));}),t.splice(s,0,e);}pe.log=console.debug||console.log||(()=>{});function jv(t){try{t?pe.storage.setItem("debug",t):pe.storage.removeItem("debug");}catch{}}function Gv(){let t;try{t=pe.storage.getItem("debug")||pe.storage.getItem("DEBUG");}catch{}return !t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function Vv(){try{return localStorage}catch{}}ks.exports=nu()(pe);var{formatters:Uv}=ks.exports;Uv.j=function(t){try{return JSON.stringify(t)}catch(e){return "[UnexpectedJSONParseError]: "+e.message}};});var dp=D((zO,hp)=>{hp.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",s=e.indexOf(r+t),i=e.indexOf("--");return s!==-1&&(i===-1||s<i)};});var mp=D((XO,pp)=>{var Wv=$("os"),fp=$("tty"),xe=dp(),{env:ne}=process,Is;xe("no-color")||xe("no-colors")||xe("color=false")||xe("color=never")?Is=0:(xe("color")||xe("colors")||xe("color=true")||xe("color=always"))&&(Is=1);function Yv(){if("FORCE_COLOR"in ne)return ne.FORCE_COLOR==="true"?1:ne.FORCE_COLOR==="false"?0:ne.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ne.FORCE_COLOR,10),3)}function Jv(t){return t===0?false:{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function Kv(t,{streamIsTTY:e,sniffFlags:r=true}={}){let s=Yv();s!==void 0&&(Is=s);let i=r?Is:s;if(i===0)return 0;if(r){if(xe("color=16m")||xe("color=full")||xe("color=truecolor"))return 3;if(xe("color=256"))return 2}if(t&&!e&&i===void 0)return 0;let n=i||0;if(ne.TERM==="dumb")return n;if(process.platform==="win32"){let o=Wv.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in ne)return ["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(o=>o in ne)||ne.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in ne)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ne.TEAMCITY_VERSION)?1:0;if(ne.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ne){let o=Number.parseInt((ne.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ne.TERM_PROGRAM){case "iTerm.app":return o>=3?3:2;case "Apple_Terminal":return 2}}return /-256(color)?$/i.test(ne.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ne.TERM)||"COLORTERM"in ne?1:n}function ou(t,e={}){let r=Kv(t,{streamIsTTY:t&&t.isTTY,...e});return Jv(r)}pp.exports={supportsColor:ou,stdout:ou({isTTY:fp.isatty(1)}),stderr:ou({isTTY:fp.isatty(2)})};});var Dp=D((oe,Ms)=>{var zv=$("tty"),Bs=$("util");oe.init=sx;oe.log=ex;oe.formatArgs=Zv;oe.save=tx;oe.load=rx;oe.useColors=Xv;oe.destroy=Bs.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");oe.colors=[6,2,3,4,5,1];try{let t=mp();t&&(t.stderr||t).level>=2&&(oe.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{}oe.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,n)=>n.toUpperCase()),s=process.env[e];return /^(yes|on|true|enabled)$/i.test(s)?s=true:/^(no|off|false|disabled)$/i.test(s)?s=false:s==="null"?s=null:s=Number(s),t[r]=s,t},{});function Xv(){return "colors"in oe.inspectOpts?!!oe.inspectOpts.colors:zv.isatty(process.stderr.fd)}function Zv(t){let{namespace:e,useColors:r}=this;if(r){let s=this.color,i="\x1B[3"+(s<8?s:"8;5;"+s),n=` ${i};1m${e} \x1B[0m`;t[0]=n+t[0].split(`
123
+ `),this.close();}_(e,r){return e.toLowerCase()==="y"?(this.value=true,this.submit()):e.toLowerCase()==="n"?(this.value=false,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(Uh.hide):this.out.write(gy(this.outputText,this.out.columns)),super.render(),this.outputText=[Vh.symbol(this.done,this.aborted),Gh.bold(this.msg),Vh.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Gh.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(Dy.line+Uh.to(0)+this.outputText));}};Wh.exports=Ln;});var Jh=D((s2,Yh)=>{Yh.exports={TextPrompt:Wc(),SelectPrompt:zc(),TogglePrompt:eh(),DatePrompt:Eh(),NumberPrompt:Sh(),MultiselectPrompt:Mn(),AutocompletePrompt:Hh(),AutocompleteMultiselectPrompt:jh(),ConfirmPrompt:Kh()};});var Xh=D(zh=>{var fe=zh,by=Jh(),cs=t=>t;function Ge(t,e,r={}){return new Promise((s,i)=>{let n=new by[t](e),o=r.onAbort||cs,u=r.onSubmit||cs,a=r.onExit||cs;n.on("state",e.onState||cs),n.on("submit",h=>s(u(h))),n.on("exit",h=>s(a(h))),n.on("abort",h=>i(o(h)));})}fe.text=t=>Ge("TextPrompt",t);fe.password=t=>(t.style="password",fe.text(t));fe.invisible=t=>(t.style="invisible",fe.text(t));fe.number=t=>Ge("NumberPrompt",t);fe.date=t=>Ge("DatePrompt",t);fe.confirm=t=>Ge("ConfirmPrompt",t);fe.list=t=>{let e=t.separator||",";return Ge("TextPrompt",t,{onSubmit:r=>r.split(e).map(s=>s.trim())})};fe.toggle=t=>Ge("TogglePrompt",t);fe.select=t=>Ge("SelectPrompt",t);fe.multiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(s=>s.selected).map(s=>s.value);return Ge("MultiselectPrompt",t,{onAbort:e,onSubmit:e})};fe.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(s=>s.selected).map(s=>s.value);return Ge("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};var yy=(t,e)=>Promise.resolve(e.filter(r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));fe.autocomplete=t=>(t.suggest=t.suggest||yy,t.choices=[].concat(t.choices||[]),Ge("AutocompletePrompt",t));});var ed=D((n2,Qh)=>{var jn=Xh(),vy=["suggest","format","onState","validate","onRender","type"],Zh=()=>{};async function pt(t=[],{onSubmit:e=Zh,onCancel:r=Zh}={}){let s={},i=pt._override||{};t=[].concat(t);let n,o,u,a,h,l,c=async(d,f,p=false)=>{if(!(!p&&d.validate&&d.validate(f)!==true))return d.format?await d.format(f,s):f};for(o of t)if({name:a,type:h}=o,typeof h=="function"&&(h=await h(n,{...s},o),o.type=h),!!h){for(let d in o){if(vy.includes(d))continue;let f=o[d];o[d]=typeof f=="function"?await f(n,{...s},l):f;}if(l=o,typeof o.message!="string")throw new Error("prompt message is required");if({name:a,type:h}=o,jn[h]===void 0)throw new Error(`prompt type (${h}) is not defined`);if(i[o.name]!==void 0&&(n=await c(o,i[o.name]),n!==void 0)){s[a]=n;continue}try{n=pt._injected?Cy(pt._injected,o.initial):await jn[h](o),s[a]=n=await c(o,n,!0),u=await e(o,n,s);}catch{u=!await r(o,s);}if(u)return s}return s}function Cy(t,e){let r=t.shift();if(r instanceof Error)throw r;return r===void 0?e:r}function xy(t){pt._injected=(pt._injected||[]).concat(t);}function _y(t){pt._override=Object.assign({},t);}Qh.exports=Object.assign(pt,{prompt:pt,prompts:jn,inject:xy,override:_y});});var br=D((o2,td)=>{function wy(t){t=(Array.isArray(t)?t:t.split(".")).map(Number);let e=0,r=process.versions.node.split(".").map(Number);for(;e<t.length;e++){if(r[e]>t[e])return false;if(t[e]>r[e])return true}return false}td.exports=wy("8.6.0")?Ec():ed();});var Pf=D((XA,ox)=>{ox.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}};});var Yo=D((ZA,kf)=>{var xs=Object.assign({},Pf()),$f=Object.keys(xs);Object.defineProperty(xs,"random",{get(){let t=Math.floor(Math.random()*$f.length),e=$f[t];return xs[e]}});kf.exports=xs;});var lp=D((fR,ou)=>{var Lx=Object.prototype.hasOwnProperty,he="~";function Ar(){}Object.create&&(Ar.prototype=Object.create(null),new Ar().__proto__||(he=false));function jx(t,e,r){this.fn=t,this.context=e,this.once=r||false;}function ap(t,e,r,s,i){if(typeof r!="function")throw new TypeError("The listener must be a function");var n=new jx(r,s||t,i),o=he?he+e:e;return t._events[o]?t._events[o].fn?t._events[o]=[t._events[o],n]:t._events[o].push(n):(t._events[o]=n,t._eventsCount++),t}function Is(t,e){--t._eventsCount===0?t._events=new Ar:delete t._events[e];}function ae(){this._events=new Ar,this._eventsCount=0;}ae.prototype.eventNames=function(){var e=[],r,s;if(this._eventsCount===0)return e;for(s in r=this._events)Lx.call(r,s)&&e.push(he?s.slice(1):s);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(r)):e};ae.prototype.listeners=function(e){var r=he?he+e:e,s=this._events[r];if(!s)return [];if(s.fn)return [s.fn];for(var i=0,n=s.length,o=new Array(n);i<n;i++)o[i]=s[i].fn;return o};ae.prototype.listenerCount=function(e){var r=he?he+e:e,s=this._events[r];return s?s.fn?1:s.length:0};ae.prototype.emit=function(e,r,s,i,n,o){var u=he?he+e:e;if(!this._events[u])return false;var a=this._events[u],h=arguments.length,l,c;if(a.fn){switch(a.once&&this.removeListener(e,a.fn,void 0,true),h){case 1:return a.fn.call(a.context),true;case 2:return a.fn.call(a.context,r),true;case 3:return a.fn.call(a.context,r,s),true;case 4:return a.fn.call(a.context,r,s,i),true;case 5:return a.fn.call(a.context,r,s,i,n),true;case 6:return a.fn.call(a.context,r,s,i,n,o),true}for(c=1,l=new Array(h-1);c<h;c++)l[c-1]=arguments[c];a.fn.apply(a.context,l);}else {var d=a.length,f;for(c=0;c<d;c++)switch(a[c].once&&this.removeListener(e,a[c].fn,void 0,true),h){case 1:a[c].fn.call(a[c].context);break;case 2:a[c].fn.call(a[c].context,r);break;case 3:a[c].fn.call(a[c].context,r,s);break;case 4:a[c].fn.call(a[c].context,r,s,i);break;default:if(!l)for(f=1,l=new Array(h-1);f<h;f++)l[f-1]=arguments[f];a[c].fn.apply(a[c].context,l);}}return true};ae.prototype.on=function(e,r,s){return ap(this,e,r,s,false)};ae.prototype.once=function(e,r,s){return ap(this,e,r,s,true)};ae.prototype.removeListener=function(e,r,s,i){var n=he?he+e:e;if(!this._events[n])return this;if(!r)return Is(this,n),this;var o=this._events[n];if(o.fn)o.fn===r&&(!i||o.once)&&(!s||o.context===s)&&Is(this,n);else {for(var u=0,a=[],h=o.length;u<h;u++)(o[u].fn!==r||i&&!o[u].once||s&&o[u].context!==s)&&a.push(o[u]);a.length?this._events[n]=a.length===1?a[0]:a:Is(this,n);}return this};ae.prototype.removeAllListeners=function(e){var r;return e?(r=he?he+e:e,this._events[r]&&Is(this,r)):(this._events=new Ar,this._eventsCount=0),this};ae.prototype.off=ae.prototype.removeListener;ae.prototype.addListener=ae.prototype.on;ae.prefixed=he;ae.EventEmitter=ae;typeof ou<"u"&&(ou.exports=ae);});var hp=D((pR,cp)=>{cp.exports=function(e,r){if(r=r.split(":")[0],e=+e,!e)return false;switch(r){case "http":case "ws":return e!==80;case "https":case "wss":return e!==443;case "ftp":return e!==21;case "gopher":return e!==70;case "file":return false}return e!==0};});var Ms=D(fp=>{var ut=fp,Gx=$("url"),dp=$("util")._extend,Vx=hp(),Ux=/(^|,)\s*upgrade\s*($|,)/i,uu=/^https|wss/;ut.isSSL=uu;ut.setupOutgoing=function(t,e,r,s){t.port=e[s||"target"].port||(uu.test(e[s||"target"].protocol)?443:80),["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"].forEach(function(u){t[u]=e[s||"target"][u];}),t.method=e.method||r.method,t.headers=dp({},r.headers),e.headers&&dp(t.headers,e.headers),e.auth&&(t.auth=e.auth),e.ca&&(t.ca=e.ca),uu.test(e[s||"target"].protocol)&&(t.rejectUnauthorized=typeof e.secure>"u"?true:e.secure),t.agent=e.agent||false,t.localAddress=e.localAddress,t.agent||(t.headers=t.headers||{},(typeof t.headers.connection!="string"||!Ux.test(t.headers.connection))&&(t.headers.connection="close"));var i=e[s||"target"],n=i&&e.prependPath!==false&&i.path||"",o=e.toProxy?r.url:Gx.parse(r.url).path||"";return o=e.ignorePath?"":o,t.path=ut.urlJoin(n,o),e.changeOrigin&&(t.headers.host=Vx(t.port,e[s||"target"].protocol)&&!Wx(t.host)?t.host+":"+t.port:t.host),t};ut.setupSocket=function(t){return t.setTimeout(0),t.setNoDelay(true),t.setKeepAlive(true,0),t};ut.getPort=function(t){var e=t.headers.host?t.headers.host.match(/:(\d+)/):"";return e?e[1]:ut.hasEncryptedConnection(t)?"443":"80"};ut.hasEncryptedConnection=function(t){return !!(t.connection.encrypted||t.connection.pair)};ut.urlJoin=function(){var t=Array.prototype.slice.call(arguments),e=t.length-1,r=t[e],s=r.split("?"),i;return t[e]=s.shift(),i=[t.filter(Boolean).join("/").replace(/\/+/g,"/").replace("http:/","http://").replace("https:/","https://")],i.push.apply(i,s),i.join("?")};ut.rewriteCookieProperty=function t(e,r,s){return Array.isArray(e)?e.map(function(i){return t(i,r,s)}):e.replace(new RegExp("(;\\s*"+s+"=)([^;]+)","i"),function(i,n,o){var u;if(o in r)u=r[o];else if("*"in r)u=r["*"];else return i;return u?n+u:""})};function Wx(t){return !!~t.indexOf(":")}});var Dp=D((gR,gp)=>{var pp=$("url"),mp=Ms(),Kx=/^201|30(1|2|7|8)$/;gp.exports={removeChunked:function(e,r,s){e.httpVersion==="1.0"&&delete s.headers["transfer-encoding"];},setConnection:function(e,r,s){e.httpVersion==="1.0"?s.headers.connection=e.headers.connection||"close":e.httpVersion!=="2.0"&&!s.headers.connection&&(s.headers.connection=e.headers.connection||"keep-alive");},setRedirectHostRewrite:function(e,r,s,i){if((i.hostRewrite||i.autoRewrite||i.protocolRewrite)&&s.headers.location&&Kx.test(s.statusCode)){var n=pp.parse(i.target),o=pp.parse(s.headers.location);if(n.host!=o.host)return;i.hostRewrite?o.host=i.hostRewrite:i.autoRewrite&&(o.host=e.headers.host),i.protocolRewrite&&(o.protocol=i.protocolRewrite),s.headers.location=o.format();}},writeHeaders:function(e,r,s,i){var n=i.cookieDomainRewrite,o=i.cookiePathRewrite,u=i.preserveHeaderKeyCase,a,h=function(d,f){f!=null&&(n&&d.toLowerCase()==="set-cookie"&&(f=mp.rewriteCookieProperty(f,n,"domain")),o&&d.toLowerCase()==="set-cookie"&&(f=mp.rewriteCookieProperty(f,o,"path")),r.setHeader(String(d).trim(),f));};if(typeof n=="string"&&(n={"*":n}),typeof o=="string"&&(o={"*":o}),u&&s.rawHeaders!=null){a={};for(var l=0;l<s.rawHeaders.length;l+=2){var c=s.rawHeaders[l];a[c.toLowerCase()]=c;}}Object.keys(s.headers).forEach(function(d){var f=s.headers[d];u&&a&&(d=a[d]||d),h(d,f);});},writeStatusCode:function(e,r,s){s.statusMessage?(r.statusCode=s.statusCode,r.statusMessage=s.statusMessage):r.statusCode=s.statusCode;}};});var yp=D((DR,bp)=>{var Zt=1e3,Qt=Zt*60,er=Qt*60,St=er*24,Yx=St*7,Jx=St*365.25;bp.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return zx(t);if(r==="number"&&isFinite(t))return e.long?Zx(t):Xx(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function zx(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),s=(e[2]||"ms").toLowerCase();switch(s){case "years":case "year":case "yrs":case "yr":case "y":return r*Jx;case "weeks":case "week":case "w":return r*Yx;case "days":case "day":case "d":return r*St;case "hours":case "hour":case "hrs":case "hr":case "h":return r*er;case "minutes":case "minute":case "mins":case "min":case "m":return r*Qt;case "seconds":case "second":case "secs":case "sec":case "s":return r*Zt;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return r;default:return}}}}function Xx(t){var e=Math.abs(t);return e>=St?Math.round(t/St)+"d":e>=er?Math.round(t/er)+"h":e>=Qt?Math.round(t/Qt)+"m":e>=Zt?Math.round(t/Zt)+"s":t+"ms"}function Zx(t){var e=Math.abs(t);return e>=St?Bs(t,e,St,"day"):e>=er?Bs(t,e,er,"hour"):e>=Qt?Bs(t,e,Qt,"minute"):e>=Zt?Bs(t,e,Zt,"second"):t+" ms"}function Bs(t,e,r,s){var i=e>=r*1.5;return Math.round(t/r)+" "+s+(i?"s":"")}});var au=D((bR,vp)=>{function Qx(t){r.debug=r,r.default=r,r.coerce=a,r.disable=o,r.enable=i,r.enabled=u,r.humanize=yp(),r.destroy=h,Object.keys(t).forEach(l=>{r[l]=t[l];}),r.names=[],r.skips=[],r.formatters={};function e(l){let c=0;for(let d=0;d<l.length;d++)c=(c<<5)-c+l.charCodeAt(d),c|=0;return r.colors[Math.abs(c)%r.colors.length]}r.selectColor=e;function r(l){let c,d=null,f,p;function m(...g){if(!m.enabled)return;let y=m,v=Number(new Date),_=v-(c||v);y.diff=_,y.prev=c,y.curr=v,c=v,g[0]=r.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let F=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(S,P)=>{if(S==="%%")return "%";F++;let O=r.formatters[P];if(typeof O=="function"){let T=g[F];S=O.call(y,T),g.splice(F,1),F--;}return S}),r.formatArgs.call(y,g),(y.log||r.log).apply(y,g);}return m.namespace=l,m.useColors=r.useColors(),m.color=r.selectColor(l),m.extend=s,m.destroy=r.destroy,Object.defineProperty(m,"enabled",{enumerable:true,configurable:false,get:()=>d!==null?d:(f!==r.namespaces&&(f=r.namespaces,p=r.enabled(l)),p),set:g=>{d=g;}}),typeof r.init=="function"&&r.init(m),m}function s(l,c){let d=r(this.namespace+(typeof c>"u"?":":c)+l);return d.log=this.log,d}function i(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let c=(typeof l=="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of c)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d);}function n(l,c){let d=0,f=0,p=-1,m=0;for(;d<l.length;)if(f<c.length&&(c[f]===l[d]||c[f]==="*"))c[f]==="*"?(p=f,m=d,f++):(d++,f++);else if(p!==-1)f=p+1,m++,d=m;else return false;for(;f<c.length&&c[f]==="*";)f++;return f===c.length}function o(){let l=[...r.names,...r.skips.map(c=>"-"+c)].join(",");return r.enable(""),l}function u(l){for(let c of r.skips)if(n(l,c))return false;for(let c of r.names)if(n(l,c))return true;return false}function a(l){return l instanceof Error?l.stack||l.message:l}function h(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");}return r.enable(r.load()),r}vp.exports=Qx;});var Cp=D((pe,Hs)=>{pe.formatArgs=t_;pe.save=r_;pe.load=s_;pe.useColors=e_;pe.storage=i_();pe.destroy=(()=>{let t=false;return ()=>{t||(t=true,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));}})();pe.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"];function e_(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return true;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return false;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function t_(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Hs.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,s=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(s=r));}),t.splice(s,0,e);}pe.log=console.debug||console.log||(()=>{});function r_(t){try{t?pe.storage.setItem("debug",t):pe.storage.removeItem("debug");}catch{}}function s_(){let t;try{t=pe.storage.getItem("debug")||pe.storage.getItem("DEBUG");}catch{}return !t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function i_(){try{return localStorage}catch{}}Hs.exports=au()(pe);var{formatters:n_}=Hs.exports;n_.j=function(t){try{return JSON.stringify(t)}catch(e){return "[UnexpectedJSONParseError]: "+e.message}};});var _p=D((yR,xp)=>{xp.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",s=e.indexOf(r+t),i=e.indexOf("--");return s!==-1&&(i===-1||s<i)};});var Ep=D((vR,Fp)=>{var o_=$("os"),wp=$("tty"),we=_p(),{env:oe}=process,Ns;we("no-color")||we("no-colors")||we("color=false")||we("color=never")?Ns=0:(we("color")||we("colors")||we("color=true")||we("color=always"))&&(Ns=1);function u_(){if("FORCE_COLOR"in oe)return oe.FORCE_COLOR==="true"?1:oe.FORCE_COLOR==="false"?0:oe.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(oe.FORCE_COLOR,10),3)}function a_(t){return t===0?false:{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function l_(t,{streamIsTTY:e,sniffFlags:r=true}={}){let s=u_();s!==void 0&&(Ns=s);let i=r?Ns:s;if(i===0)return 0;if(r){if(we("color=16m")||we("color=full")||we("color=truecolor"))return 3;if(we("color=256"))return 2}if(t&&!e&&i===void 0)return 0;let n=i||0;if(oe.TERM==="dumb")return n;if(process.platform==="win32"){let o=o_.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in oe)return ["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(o=>o in oe)||oe.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in oe)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(oe.TEAMCITY_VERSION)?1:0;if(oe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in oe){let o=Number.parseInt((oe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(oe.TERM_PROGRAM){case "iTerm.app":return o>=3?3:2;case "Apple_Terminal":return 2}}return /-256(color)?$/i.test(oe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(oe.TERM)||"COLORTERM"in oe?1:n}function lu(t,e={}){let r=l_(t,{streamIsTTY:t&&t.isTTY,...e});return a_(r)}Fp.exports={supportsColor:lu,stdout:lu({isTTY:wp.isatty(1)}),stderr:lu({isTTY:wp.isatty(2)})};});var Op=D((ue,Ls)=>{var c_=$("tty"),qs=$("util");ue.init=D_;ue.log=p_;ue.formatArgs=d_;ue.save=m_;ue.load=g_;ue.useColors=h_;ue.destroy=qs.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ue.colors=[6,2,3,4,5,1];try{let t=Ep();t&&(t.stderr||t).level>=2&&(ue.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{}ue.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,n)=>n.toUpperCase()),s=process.env[e];return /^(yes|on|true|enabled)$/i.test(s)?s=true:/^(no|off|false|disabled)$/i.test(s)?s=false:s==="null"?s=null:s=Number(s),t[r]=s,t},{});function h_(){return "colors"in ue.inspectOpts?!!ue.inspectOpts.colors:c_.isatty(process.stderr.fd)}function d_(t){let{namespace:e,useColors:r}=this;if(r){let s=this.color,i="\x1B[3"+(s<8?s:"8;5;"+s),n=` ${i};1m${e} \x1B[0m`;t[0]=n+t[0].split(`
124
124
  `).join(`
125
- `+n),t.push(i+"m+"+Ms.exports.humanize(this.diff)+"\x1B[0m");}else t[0]=Qv()+e+" "+t[0];}function Qv(){return oe.inspectOpts.hideDate?"":new Date().toISOString()+" "}function ex(...t){return process.stderr.write(Bs.formatWithOptions(oe.inspectOpts,...t)+`
126
- `)}function tx(t){t?process.env.DEBUG=t:delete process.env.DEBUG;}function rx(){return process.env.DEBUG}function sx(t){t.inspectOpts={};let e=Object.keys(oe.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=oe.inspectOpts[e[r]];}Ms.exports=nu()(oe);var{formatters:gp}=Ms.exports;gp.o=function(t){return this.inspectOpts.colors=this.useColors,Bs.inspect(t,this.inspectOpts).split(`
127
- `).map(e=>e.trim()).join(" ")};gp.O=function(t){return this.inspectOpts.colors=this.useColors,Bs.inspect(t,this.inspectOpts)};});var au=D((ZO,uu)=>{typeof process>"u"||process.type==="renderer"||process.browser===true||process.__nwjs?uu.exports=cp():uu.exports=Dp();});var yp=D((QO,bp)=>{var wr;bp.exports=function(){if(!wr){try{wr=au()("follow-redirects");}catch{}typeof wr!="function"&&(wr=function(){});}wr.apply(null,arguments);};});var Fp=D((eS,Cu)=>{var Ar=$("url"),Er=Ar.URL,ix=$("http"),nx=$("https"),fu=$("stream").Writable,pu=$("assert"),Cp=yp();(function(){var e=typeof process<"u",r=typeof window<"u"&&typeof document<"u",s=At(Error.captureStackTrace);!e&&(r||!s)&&console.warn("The follow-redirects package should be excluded from browser builds.");})();var mu=false;try{pu(new Er(""));}catch(t){mu=t.code==="ERR_INVALID_URL";}var ox=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],gu=["abort","aborted","connect","error","socket","timeout"],Du=Object.create(null);gu.forEach(function(t){Du[t]=function(e,r,s){this._redirectable.emit(t,e,r,s);};});var cu=Or("ERR_INVALID_URL","Invalid URL",TypeError),hu=Or("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),ux=Or("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",hu),ax=Or("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),lx=Or("ERR_STREAM_WRITE_AFTER_END","write after end"),cx=fu.prototype.destroy||vp;function me(t,e){fu.call(this),this._sanitizeOptions(t),this._options=t,this._ended=false,this._ending=false,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var r=this;this._onNativeResponse=function(s){try{r._processResponse(s);}catch(i){r.emit("error",i instanceof hu?i:new hu({cause:i}));}},this._performRequest();}me.prototype=Object.create(fu.prototype);me.prototype.abort=function(){yu(this._currentRequest),this._currentRequest.abort(),this.emit("abort");};me.prototype.destroy=function(t){return yu(this._currentRequest,t),cx.call(this,t),this};me.prototype.write=function(t,e,r){if(this._ending)throw new lx;if(!Et(t)&&!fx(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(At(e)&&(r=e,e=null),t.length===0){r&&r();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,r)):(this.emit("error",new ax),this.abort());};me.prototype.end=function(t,e,r){if(At(t)?(r=t,t=e=null):At(e)&&(r=e,e=null),!t)this._ended=this._ending=true,this._currentRequest.end(null,null,r);else {var s=this,i=this._currentRequest;this.write(t,e,function(){s._ended=true,i.end(null,null,r);}),this._ending=true;}};me.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e);};me.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t);};me.prototype.setTimeout=function(t,e){var r=this;function s(o){o.setTimeout(t),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy);}function i(o){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),n();},t),s(o);}function n(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",n),r.removeListener("error",n),r.removeListener("response",n),r.removeListener("close",n),e&&r.removeListener("timeout",e),r.socket||r._currentRequest.removeListener("socket",i);}return e&&this.on("timeout",e),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",s),this.on("abort",n),this.on("error",n),this.on("response",n),this.on("close",n),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){me.prototype[t]=function(e,r){return this._currentRequest[t](e,r)};});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(me.prototype,t,{get:function(){return this._currentRequest[t]}});});me.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e));}};me.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e)throw new TypeError("Unsupported protocol "+t);if(this._options.agents){var r=t.slice(0,-1);this._options.agent=this._options.agents[r];}var s=this._currentRequest=e.request(this._options,this._onNativeResponse);s._redirectable=this;for(var i of gu)s.on(i,Du[i]);if(this._currentUrl=/^\//.test(this._options.path)?Ar.format(this._options):this._options.path,this._isRedirect){var n=0,o=this,u=this._requestBodyBuffers;(function a(h){if(s===o._currentRequest)if(h)o.emit("error",h);else if(n<u.length){var l=u[n++];s.finished||s.write(l.data,l.encoding,a);}else o._ended&&s.end();})();}};me.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var r=t.headers.location;if(!r||this._options.followRedirects===false||e<300||e>=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(yu(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new ux;var s,i=this._options.beforeRedirect;i&&(s=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var n=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],lu(/^content-/i,this._options.headers));var o=lu(/^host$/i,this._options.headers),u=bu(this._currentUrl),a=o||u.host,h=/^\w+:/.test(r)?this._currentUrl:Ar.format(Object.assign(u,{host:a})),l=hx(r,h);if(Cp("redirecting to",l.href),this._isRedirect=true,du(l,this._options),(l.protocol!==u.protocol&&l.protocol!=="https:"||l.host!==a&&!dx(l.host,a))&&lu(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),At(i)){var c={headers:t.headers,statusCode:e},d={url:h,method:n,headers:s};i(this._options,c,d),this._sanitizeOptions(this._options);}this._performRequest();};function _p(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(s){var i=s+":",n=r[i]=t[s],o=e[s]=Object.create(n);function u(h,l,c){return px(h)?h=du(h):Et(h)?h=du(bu(h)):(c=l,l=xp(h),h={protocol:i}),At(l)&&(c=l,l=null),l=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},h,l),l.nativeProtocols=r,!Et(l.host)&&!Et(l.hostname)&&(l.hostname="::1"),pu.equal(l.protocol,i,"protocol mismatch"),Cp("options",l),new me(l,c)}function a(h,l,c){var d=o.request(h,l,c);return d.end(),d}Object.defineProperties(o,{request:{value:u,configurable:true,enumerable:true,writable:true},get:{value:a,configurable:true,enumerable:true,writable:true}});}),e}function vp(){}function bu(t){var e;if(mu)e=new Er(t);else if(e=xp(Ar.parse(t)),!Et(e.protocol))throw new cu({input:t});return e}function hx(t,e){return mu?new Er(t,e):bu(Ar.resolve(e,t))}function xp(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new cu({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new cu({input:t.href||t});return t}function du(t,e){var r=e||{};for(var s of ox)r[s]=t[s];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function lu(t,e){var r;for(var s in e)t.test(s)&&(r=e[s],delete e[s]);return r===null||typeof r>"u"?void 0:String(r).trim()}function Or(t,e,r){function s(i){At(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,i||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e;}return s.prototype=new(r||Error),Object.defineProperties(s.prototype,{constructor:{value:s,enumerable:false},name:{value:"Error ["+t+"]",enumerable:false}}),s}function yu(t,e){for(var r of gu)t.removeListener(r,Du[r]);t.on("error",vp),t.destroy(e);}function dx(t,e){pu(Et(t)&&Et(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function Et(t){return typeof t=="string"||t instanceof String}function At(t){return typeof t=="function"}function fx(t){return typeof t=="object"&&"length"in t}function px(t){return Er&&t instanceof Er}Cu.exports=_p({http:ix,https:nx});Cu.exports.wrap=_p;});var Ep=D((tS,wp)=>{var mx=$("http"),gx=$("https"),Sr=op(),Hs=Ps(),Dx=Fp();Sr=Object.keys(Sr).map(function(t){return Sr[t]});var bx={http:mx,https:gx};wp.exports={deleteLength:function(e,r,s){(e.method==="DELETE"||e.method==="OPTIONS")&&!e.headers["content-length"]&&(e.headers["content-length"]="0",delete e.headers["transfer-encoding"]);},timeout:function(e,r,s){s.timeout&&e.socket.setTimeout(s.timeout);},XHeaders:function(e,r,s){if(s.xfwd){var i=e.isSpdy||Hs.hasEncryptedConnection(e),n={for:e.connection.remoteAddress||e.socket.remoteAddress,port:Hs.getPort(e),proto:i?"https":"http"};["for","port","proto"].forEach(function(o){e.headers["x-forwarded-"+o]=(e.headers["x-forwarded-"+o]||"")+(e.headers["x-forwarded-"+o]?",":"")+n[o];}),e.headers["x-forwarded-host"]=e.headers["x-forwarded-host"]||e.headers.host||"";}},stream:function(e,r,s,i,n,o){n.emit("start",e,r,s.target||s.forward);var u=s.followRedirects?Dx:bx,a=u.http,h=u.https;if(s.forward){var l=(s.forward.protocol==="https:"?h:a).request(Hs.setupOutgoing(s.ssl||{},s,e,"forward")),c=p(l,s.forward);if(e.on("error",c),l.on("error",c),(s.buffer||e).pipe(l),!s.target)return r.end()}var d=(s.target.protocol==="https:"?h:a).request(Hs.setupOutgoing(s.ssl||{},s,e));d.on("socket",function(m){n&&!d.getHeader("expect")&&n.emit("proxyReq",d,e,r,s);}),s.proxyTimeout&&d.setTimeout(s.proxyTimeout,function(){d.abort();}),e.on("aborted",function(){d.abort();});var f=p(d,s.target);e.on("error",f),d.on("error",f);function p(m,g){return function(y){if(e.socket.destroyed&&y.code==="ECONNRESET")return n.emit("econnreset",y,e,r,g),m.abort();o?o(y,e,r,g):n.emit("error",y,e,r,g);}}(s.buffer||e).pipe(d),d.on("response",function(m){if(n&&n.emit("proxyRes",m,e,r),!r.headersSent&&!s.selfHandleResponse)for(var g=0;g<Sr.length&&!Sr[g](e,r,m,s);g++);r.finished?n&&n.emit("end",e,r,m):(m.on("end",function(){n&&n.emit("end",e,r,m);}),s.selfHandleResponse||m.pipe(r));});}};});var Op=D((rS,Ap)=>{var yx=$("http"),Cx=$("https"),Xt=Ps();Ap.exports={checkMethodAndHeader:function(e,r){if(e.method!=="GET"||!e.headers.upgrade||e.headers.upgrade.toLowerCase()!=="websocket")return r.destroy(),true},XHeaders:function(e,r,s){if(s.xfwd){var i={for:e.connection.remoteAddress||e.socket.remoteAddress,port:Xt.getPort(e),proto:Xt.hasEncryptedConnection(e)?"wss":"ws"};["for","port","proto"].forEach(function(n){e.headers["x-forwarded-"+n]=(e.headers["x-forwarded-"+n]||"")+(e.headers["x-forwarded-"+n]?",":"")+i[n];});}},stream:function(e,r,s,i,n,o){var u=function(l,c){return Object.keys(c).reduce(function(d,f){var p=c[f];if(!Array.isArray(p))return d.push(f+": "+p),d;for(var m=0;m<p.length;m++)d.push(f+": "+p[m]);return d},[l]).join(`\r
125
+ `+n),t.push(i+"m+"+Ls.exports.humanize(this.diff)+"\x1B[0m");}else t[0]=f_()+e+" "+t[0];}function f_(){return ue.inspectOpts.hideDate?"":new Date().toISOString()+" "}function p_(...t){return process.stderr.write(qs.formatWithOptions(ue.inspectOpts,...t)+`
126
+ `)}function m_(t){t?process.env.DEBUG=t:delete process.env.DEBUG;}function g_(){return process.env.DEBUG}function D_(t){t.inspectOpts={};let e=Object.keys(ue.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=ue.inspectOpts[e[r]];}Ls.exports=au()(ue);var{formatters:Ap}=Ls.exports;Ap.o=function(t){return this.inspectOpts.colors=this.useColors,qs.inspect(t,this.inspectOpts).split(`
127
+ `).map(e=>e.trim()).join(" ")};Ap.O=function(t){return this.inspectOpts.colors=this.useColors,qs.inspect(t,this.inspectOpts)};});var hu=D((CR,cu)=>{typeof process>"u"||process.type==="renderer"||process.browser===true||process.__nwjs?cu.exports=Cp():cu.exports=Op();});var Sp=D((xR,Rp)=>{var Or;Rp.exports=function(){if(!Or){try{Or=hu()("follow-redirects");}catch{}typeof Or!="function"&&(Or=function(){});}Or.apply(null,arguments);};});var Ip=D((_R,_u)=>{var Sr=$("url"),Rr=Sr.URL,b_=$("http"),y_=$("https"),gu=$("stream").Writable,Du=$("assert"),Tp=Sp();(function(){var e=typeof process<"u",r=typeof window<"u"&&typeof document<"u",s=Pt(Error.captureStackTrace);!e&&(r||!s)&&console.warn("The follow-redirects package should be excluded from browser builds.");})();var bu=false;try{Du(new Rr(""));}catch(t){bu=t.code==="ERR_INVALID_URL";}var v_=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],yu=["abort","aborted","connect","error","socket","timeout"],vu=Object.create(null);yu.forEach(function(t){vu[t]=function(e,r,s){this._redirectable.emit(t,e,r,s);};});var fu=Tr("ERR_INVALID_URL","Invalid URL",TypeError),pu=Tr("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),C_=Tr("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",pu),x_=Tr("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),__=Tr("ERR_STREAM_WRITE_AFTER_END","write after end"),w_=gu.prototype.destroy||$p;function me(t,e){gu.call(this),this._sanitizeOptions(t),this._options=t,this._ended=false,this._ending=false,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var r=this;this._onNativeResponse=function(s){try{r._processResponse(s);}catch(i){r.emit("error",i instanceof pu?i:new pu({cause:i}));}},this._performRequest();}me.prototype=Object.create(gu.prototype);me.prototype.abort=function(){xu(this._currentRequest),this._currentRequest.abort(),this.emit("abort");};me.prototype.destroy=function(t){return xu(this._currentRequest,t),w_.call(this,t),this};me.prototype.write=function(t,e,r){if(this._ending)throw new __;if(!Tt(t)&&!A_(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Pt(e)&&(r=e,e=null),t.length===0){r&&r();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,r)):(this.emit("error",new x_),this.abort());};me.prototype.end=function(t,e,r){if(Pt(t)?(r=t,t=e=null):Pt(e)&&(r=e,e=null),!t)this._ended=this._ending=true,this._currentRequest.end(null,null,r);else {var s=this,i=this._currentRequest;this.write(t,e,function(){s._ended=true,i.end(null,null,r);}),this._ending=true;}};me.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e);};me.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t);};me.prototype.setTimeout=function(t,e){var r=this;function s(o){o.setTimeout(t),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy);}function i(o){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),n();},t),s(o);}function n(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",n),r.removeListener("error",n),r.removeListener("response",n),r.removeListener("close",n),e&&r.removeListener("timeout",e),r.socket||r._currentRequest.removeListener("socket",i);}return e&&this.on("timeout",e),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",s),this.on("abort",n),this.on("error",n),this.on("response",n),this.on("close",n),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){me.prototype[t]=function(e,r){return this._currentRequest[t](e,r)};});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(me.prototype,t,{get:function(){return this._currentRequest[t]}});});me.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e));}};me.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e)throw new TypeError("Unsupported protocol "+t);if(this._options.agents){var r=t.slice(0,-1);this._options.agent=this._options.agents[r];}var s=this._currentRequest=e.request(this._options,this._onNativeResponse);s._redirectable=this;for(var i of yu)s.on(i,vu[i]);if(this._currentUrl=/^\//.test(this._options.path)?Sr.format(this._options):this._options.path,this._isRedirect){var n=0,o=this,u=this._requestBodyBuffers;(function a(h){if(s===o._currentRequest)if(h)o.emit("error",h);else if(n<u.length){var l=u[n++];s.finished||s.write(l.data,l.encoding,a);}else o._ended&&s.end();})();}};me.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var r=t.headers.location;if(!r||this._options.followRedirects===false||e<300||e>=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(xu(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new C_;var s,i=this._options.beforeRedirect;i&&(s=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var n=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],du(/^content-/i,this._options.headers));var o=du(/^host$/i,this._options.headers),u=Cu(this._currentUrl),a=o||u.host,h=/^\w+:/.test(r)?this._currentUrl:Sr.format(Object.assign(u,{host:a})),l=F_(r,h);if(Tp("redirecting to",l.href),this._isRedirect=true,mu(l,this._options),(l.protocol!==u.protocol&&l.protocol!=="https:"||l.host!==a&&!E_(l.host,a))&&du(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Pt(i)){var c={headers:t.headers,statusCode:e},d={url:h,method:n,headers:s};i(this._options,c,d),this._sanitizeOptions(this._options);}this._performRequest();};function Pp(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(s){var i=s+":",n=r[i]=t[s],o=e[s]=Object.create(n);function u(h,l,c){return O_(h)?h=mu(h):Tt(h)?h=mu(Cu(h)):(c=l,l=kp(h),h={protocol:i}),Pt(l)&&(c=l,l=null),l=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},h,l),l.nativeProtocols=r,!Tt(l.host)&&!Tt(l.hostname)&&(l.hostname="::1"),Du.equal(l.protocol,i,"protocol mismatch"),Tp("options",l),new me(l,c)}function a(h,l,c){var d=o.request(h,l,c);return d.end(),d}Object.defineProperties(o,{request:{value:u,configurable:true,enumerable:true,writable:true},get:{value:a,configurable:true,enumerable:true,writable:true}});}),e}function $p(){}function Cu(t){var e;if(bu)e=new Rr(t);else if(e=kp(Sr.parse(t)),!Tt(e.protocol))throw new fu({input:t});return e}function F_(t,e){return bu?new Rr(t,e):Cu(Sr.resolve(e,t))}function kp(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new fu({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new fu({input:t.href||t});return t}function mu(t,e){var r=e||{};for(var s of v_)r[s]=t[s];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function du(t,e){var r;for(var s in e)t.test(s)&&(r=e[s],delete e[s]);return r===null||typeof r>"u"?void 0:String(r).trim()}function Tr(t,e,r){function s(i){Pt(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,i||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e;}return s.prototype=new(r||Error),Object.defineProperties(s.prototype,{constructor:{value:s,enumerable:false},name:{value:"Error ["+t+"]",enumerable:false}}),s}function xu(t,e){for(var r of yu)t.removeListener(r,vu[r]);t.on("error",$p),t.destroy(e);}function E_(t,e){Du(Tt(t)&&Tt(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function Tt(t){return typeof t=="string"||t instanceof String}function Pt(t){return typeof t=="function"}function A_(t){return typeof t=="object"&&"length"in t}function O_(t){return Rr&&t instanceof Rr}_u.exports=Pp({http:b_,https:y_});_u.exports.wrap=Pp;});var Bp=D((wR,Mp)=>{var R_=$("http"),S_=$("https"),Pr=Dp(),js=Ms(),T_=Ip();Pr=Object.keys(Pr).map(function(t){return Pr[t]});var P_={http:R_,https:S_};Mp.exports={deleteLength:function(e,r,s){(e.method==="DELETE"||e.method==="OPTIONS")&&!e.headers["content-length"]&&(e.headers["content-length"]="0",delete e.headers["transfer-encoding"]);},timeout:function(e,r,s){s.timeout&&e.socket.setTimeout(s.timeout);},XHeaders:function(e,r,s){if(s.xfwd){var i=e.isSpdy||js.hasEncryptedConnection(e),n={for:e.connection.remoteAddress||e.socket.remoteAddress,port:js.getPort(e),proto:i?"https":"http"};["for","port","proto"].forEach(function(o){e.headers["x-forwarded-"+o]=(e.headers["x-forwarded-"+o]||"")+(e.headers["x-forwarded-"+o]?",":"")+n[o];}),e.headers["x-forwarded-host"]=e.headers["x-forwarded-host"]||e.headers.host||"";}},stream:function(e,r,s,i,n,o){n.emit("start",e,r,s.target||s.forward);var u=s.followRedirects?T_:P_,a=u.http,h=u.https;if(s.forward){var l=(s.forward.protocol==="https:"?h:a).request(js.setupOutgoing(s.ssl||{},s,e,"forward")),c=p(l,s.forward);if(e.on("error",c),l.on("error",c),(s.buffer||e).pipe(l),!s.target)return r.end()}var d=(s.target.protocol==="https:"?h:a).request(js.setupOutgoing(s.ssl||{},s,e));d.on("socket",function(m){n&&!d.getHeader("expect")&&n.emit("proxyReq",d,e,r,s);}),s.proxyTimeout&&d.setTimeout(s.proxyTimeout,function(){d.abort();}),e.on("aborted",function(){d.abort();});var f=p(d,s.target);e.on("error",f),d.on("error",f);function p(m,g){return function(v){if(e.socket.destroyed&&v.code==="ECONNRESET")return n.emit("econnreset",v,e,r,g),m.abort();o?o(v,e,r,g):n.emit("error",v,e,r,g);}}(s.buffer||e).pipe(d),d.on("response",function(m){if(n&&n.emit("proxyRes",m,e,r),!r.headersSent&&!s.selfHandleResponse)for(var g=0;g<Pr.length&&!Pr[g](e,r,m,s);g++);r.finished?n&&n.emit("end",e,r,m):(m.on("end",function(){n&&n.emit("end",e,r,m);}),s.selfHandleResponse||m.pipe(r));});}};});var Np=D((FR,Hp)=>{var $_=$("http"),k_=$("https"),tr=Ms();Hp.exports={checkMethodAndHeader:function(e,r){if(e.method!=="GET"||!e.headers.upgrade||e.headers.upgrade.toLowerCase()!=="websocket")return r.destroy(),true},XHeaders:function(e,r,s){if(s.xfwd){var i={for:e.connection.remoteAddress||e.socket.remoteAddress,port:tr.getPort(e),proto:tr.hasEncryptedConnection(e)?"wss":"ws"};["for","port","proto"].forEach(function(n){e.headers["x-forwarded-"+n]=(e.headers["x-forwarded-"+n]||"")+(e.headers["x-forwarded-"+n]?",":"")+i[n];});}},stream:function(e,r,s,i,n,o){var u=function(l,c){return Object.keys(c).reduce(function(d,f){var p=c[f];if(!Array.isArray(p))return d.push(f+": "+p),d;for(var m=0;m<p.length;m++)d.push(f+": "+p[m]);return d},[l]).join(`\r
128
128
  `)+`\r
129
129
  \r
130
- `};Xt.setupSocket(r),i&&i.length&&r.unshift(i);var a=(Xt.isSSL.test(s.target.protocol)?Cx:yx).request(Xt.setupOutgoing(s.ssl||{},s,e));return n&&n.emit("proxyReqWs",a,e,r,s,i),a.on("error",h),a.on("response",function(l){l.upgrade||(r.write(u("HTTP/"+l.httpVersion+" "+l.statusCode+" "+l.statusMessage,l.headers)),l.pipe(r));}),a.on("upgrade",function(l,c,d){c.on("error",h),c.on("end",function(){n.emit("close",l,c,d);}),r.on("error",function(){c.end();}),Xt.setupSocket(c),d&&d.length&&c.unshift(d),r.write(u("HTTP/1.1 101 Switching Protocols",l.headers)),c.pipe(r).pipe(c),n.emit("open",c),n.emit("proxySocket",c);}),a.end();function h(l){o?o(l,e,r):n.emit("error",l,e,r),r.end();}}};});var Ip=D((sS,kp)=>{var Pp=kp.exports,Sp=$("util")._extend,_x=$("url").parse,$p=Zf(),vx=$("http"),xx=$("https"),Rp=Ep(),Tp=Op();Pp.Server=Ot;function _u(t){return function(e){return function(r,s){var i=t==="ws"?this.wsPasses:this.webPasses,n=[].slice.call(arguments),o=n.length-1,u,a;typeof n[o]=="function"&&(a=n[o],o--);var h=e;if(!(n[o]instanceof Buffer)&&n[o]!==s&&(h=Sp({},e),Sp(h,n[o]),o--),n[o]instanceof Buffer&&(u=n[o]),["target","forward"].forEach(function(c){typeof h[c]=="string"&&(h[c]=_x(h[c]));}),!h.target&&!h.forward)return this.emit("error",new Error("Must provide a proper URL as target"));for(var l=0;l<i.length&&!i[l](r,s,h,u,this,a);l++);}}}Pp.createRightProxy=_u;function Ot(t){$p.call(this),t=t||{},t.prependPath=t.prependPath!==false,this.web=this.proxyRequest=_u("web")(t),this.ws=this.proxyWebsocketRequest=_u("ws")(t),this.options=t,this.webPasses=Object.keys(Rp).map(function(e){return Rp[e]}),this.wsPasses=Object.keys(Tp).map(function(e){return Tp[e]}),this.on("error",this.onError,this);}$("util").inherits(Ot,$p);Ot.prototype.onError=function(t){if(this.listeners("error").length===1)throw t};Ot.prototype.listen=function(t,e){var r=this,s=function(i,n){r.web(i,n);};return this._server=this.options.ssl?xx.createServer(this.options.ssl,s):vx.createServer(s),this.options.ws&&this._server.on("upgrade",function(i,n,o){r.ws(i,n,o);}),this._server.listen(t,e),this};Ot.prototype.close=function(t){var e=this;this._server&&this._server.close(r);function r(){e._server=null,t&&t.apply(null,arguments);}};Ot.prototype.before=function(t,e,r){if(t!=="ws"&&t!=="web")throw new Error("type must be `web` or `ws`");var s=t==="ws"?this.wsPasses:this.webPasses,i=false;if(s.forEach(function(n,o){n.name===e&&(i=o);}),i===false)throw new Error("No such pass");s.splice(i,0,r);};Ot.prototype.after=function(t,e,r){if(t!=="ws"&&t!=="web")throw new Error("type must be `web` or `ws`");var s=t==="ws"?this.wsPasses:this.webPasses,i=false;if(s.forEach(function(n,o){n.name===e&&(i=o);}),i===false)throw new Error("No such pass");s.splice(i++,0,r);};});var Mp=D((iS,Bp)=>{var Rr=Ip().Server;function vu(t){return new Rr(t)}Rr.createProxyServer=vu;Rr.createServer=vu;Rr.createProxy=vu;Bp.exports=Rr;});var Np=D((nS,Hp)=>{Hp.exports=Mp();});var qs=D(Ns=>{Object.defineProperty(Ns,"__esModule",{value:true});Ns.ERRORS=void 0;var qp;(function(t){t.ERR_CONFIG_FACTORY_TARGET_MISSING='[HPM] Missing "target" option. Example: {target: "http://www.example.org"}',t.ERR_CONTEXT_MATCHER_GENERIC='[HPM] Invalid pathFilter. Expecting something like: "/api" or ["/api", "/ajax"]',t.ERR_CONTEXT_MATCHER_INVALID_ARRAY='[HPM] Invalid pathFilter. Plain paths (e.g. "/api") can not be mixed with globs (e.g. "/api/**"). Expecting something like: ["/api", "/ajax"] or ["/api/**", "!**.html"].',t.ERR_PATH_REWRITER_CONFIG="[HPM] Invalid pathRewrite config. Expecting object with pathRewrite config or a rewrite function";})(qp||(Ns.ERRORS=qp={}));});var Lp=D(xu=>{Object.defineProperty(xu,"__esModule",{value:true});xu.verifyConfig=wx;var Fx=qs();function wx(t){if(!t.target&&!t.router)throw new Error(Fx.ERRORS.ERR_CONFIG_FACTORY_TARGET_MISSING)}});var ot=D(Ls=>{Object.defineProperty(Ls,"__esModule",{value:true});Ls.Debug=void 0;var Ex=au();Ls.Debug=Ex("http-proxy-middleware");});var jp=D(js=>{Object.defineProperty(js,"__esModule",{value:true});js.debugProxyErrorsPlugin=void 0;var Ax=ot(),St=Ax.Debug.extend("debug-proxy-errors-plugin"),Ox=t=>{t.on("error",(e,r,s,i)=>{St(`http-proxy error event:
131
- %O`,e);}),t.on("proxyReq",(e,r,s)=>{s.on("error",i=>{St(`Socket error in proxyReq event:
132
- %O`,i);});}),t.on("proxyRes",(e,r,s)=>{s.on("close",()=>{s.writableEnded||(St("Destroying proxyRes in proxyRes close event"),e.destroy());});}),t.on("proxyReqWs",(e,r,s)=>{s.on("error",i=>{St(`Socket error in proxyReqWs event:
133
- %O`,i);});}),t.on("open",e=>{e.on("error",r=>{St(`Socket error in open event:
134
- %O`,r);});}),t.on("close",(e,r,s)=>{r.on("error",i=>{St(`Socket error in close event:
135
- %O`,i);});}),t.on("econnreset",(e,r,s,i)=>{St(`http-proxy econnreset event:
136
- %O`,e);});};js.debugProxyErrorsPlugin=Ox;});var Gp=D(Fu=>{Object.defineProperty(Fu,"__esModule",{value:true});Fu.getStatusCode=Sx;function Sx(t){let e;if(/HPE_INVALID/.test(t))e=502;else switch(t){case "ECONNRESET":case "ENOTFOUND":case "ECONNREFUSED":case "ETIMEDOUT":e=504;break;default:e=500;break}return e}});var Vp=D(Gs=>{Object.defineProperty(Gs,"__esModule",{value:true});Gs.errorResponsePlugin=void 0;var Rx=Gp();function Tx(t){return t&&typeof t.writeHead=="function"}function Px(t){return t&&typeof t.write=="function"&&!("writeHead"in t)}var $x=(t,e)=>{t.on("error",(r,s,i,n)=>{if(!s&&!i)throw r;if(Tx(i)){if(!i.headersSent){let u=(0, Rx.getStatusCode)(r.code);i.writeHead(u);}let o=s.headers&&s.headers.host;i.end(`Error occurred while trying to proxy: ${o}${s.url}`);}else Px(i)&&i.destroy();});};Gs.errorResponsePlugin=$x;});var Vs=D(wu=>{Object.defineProperty(wu,"__esModule",{value:true});wu.getLogger=Ix;var kx={info:()=>{},warn:()=>{},error:()=>{}};function Ix(t){return t.logger||kx}});var Up=D(Eu=>{Object.defineProperty(Eu,"__esModule",{value:true});Eu.getPort=Bx;function Bx(t){return Object.keys(t||{})?.[0]?.split(":")[1]}});var Yp=D(Us=>{Object.defineProperty(Us,"__esModule",{value:true});Us.loggerPlugin=void 0;var Wp=$("url"),Mx=Vs(),Hx=Up(),Nx=(t,e)=>{let r=(0, Mx.getLogger)(e);t.on("error",(s,i,n,o)=>{let a=`${i?.headers?.host}${i?.url}`,h=`${o?.href}`;r.error("[HPM] Error occurred while proxying request %s to %s [%s] (%s)",a,h,s.code||s,"https://nodejs.org/api/errors.html#errors_common_system_errors");}),t.on("proxyRes",(s,i,n)=>{let o=i.originalUrl??`${i.baseUrl||""}${i.url}`,u;try{let l=(0,Hx.getPort)(s.req?.agent?.sockets),c={protocol:s.req.protocol,host:s.req.host,pathname:s.req.path};u=new Wp.URL(`${c.protocol}//${c.host}${c.pathname}`),l&&(u.port=l);}catch{u=new Wp.URL(e.target),u.pathname=s.req.path;}let a=u.toString(),h=`[HPM] ${i.method} ${o} -> ${a} [${s.statusCode}]`;r.info(h);}),t.on("open",s=>{r.info("[HPM] Client connected: %o",s.address());}),t.on("close",(s,i,n)=>{r.info("[HPM] Client disconnected: %o",i.address());});};Us.loggerPlugin=Nx;});var Ws=D(Au=>{Object.defineProperty(Au,"__esModule",{value:true});Au.getFunctionName=qx;function qx(t){return t.name||"[anonymous Function]"}});var Jp=D(Ys=>{Object.defineProperty(Ys,"__esModule",{value:true});Ys.proxyEventsPlugin=void 0;var Lx=ot(),jx=Ws(),Gx=Lx.Debug.extend("proxy-events-plugin"),Vx=(t,e)=>{Object.entries(e.on||{}).forEach(([r,s])=>{Gx(`register event handler: "${r}" -> "${(0, jx.getFunctionName)(s)}"`),t.on(r,s);});};Ys.proxyEventsPlugin=Vx;});var Ou=D(Ue=>{var Ux=Ue&&Ue.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:true,get:function(){return e[r]}}),Object.defineProperty(t,s,i);}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r];}),Js=Ue&&Ue.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Ux(e,t,r);};Object.defineProperty(Ue,"__esModule",{value:true});Js(jp(),Ue);Js(Vp(),Ue);Js(Yp(),Ue);Js(Jp(),Ue);});var Kp=D(Su=>{Object.defineProperty(Su,"__esModule",{value:true});Su.getPlugins=Wx;var Ks=Ou();function Wx(t){let e=t.on?.error?[]:[Ks.errorResponsePlugin],r=t.ejectPlugins?[]:[Ks.debugProxyErrorsPlugin,Ks.proxyEventsPlugin,Ks.loggerPlugin,...e],s=t.plugins??[];return [...r,...s]}});var Xp=D((yS,zp)=>{zp.exports=function(e){if(typeof e!="string"||e==="")return false;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return true;e=e.slice(r.index+r[0].length);}return false};});var em=D((CS,Qp)=>{var Yx=Xp(),Zp={"{":"}","(":")","[":"]"},Jx=function(t){if(t[0]==="!")return true;for(var e=0,r=-2,s=-2,i=-2,n=-2,o=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||s!==-1&&t[e]==="["&&t[e+1]!=="]"&&(s<e&&(s=t.indexOf("]",e)),s>e&&(o===-1||o>s||(o=t.indexOf("\\",e),o===-1||o>s)))||i!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(i=t.indexOf("}",e),i>e&&(o=t.indexOf("\\",e),o===-1||o>i))||n!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(n=t.indexOf(")",e),n>e&&(o=t.indexOf("\\",e),o===-1||o>n))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(r<e&&(r=t.indexOf("|",e)),r!==-1&&t[r+1]!==")"&&(n=t.indexOf(")",r),n>r&&(o=t.indexOf("\\",r),o===-1||o>n))))return true;if(t[e]==="\\"){var u=t[e+1];e+=2;var a=Zp[u];if(a){var h=t.indexOf(a,e);h!==-1&&(e=h+1);}if(t[e]==="!")return true}else e++;}return false},Kx=function(t){if(t[0]==="!")return true;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return true;if(t[e]==="\\"){var r=t[e+1];e+=2;var s=Zp[r];if(s){var i=t.indexOf(s,e);i!==-1&&(e=i+1);}if(t[e]==="!")return true}else e++;}return false};Qp.exports=function(e,r){if(typeof e!="string"||e==="")return false;if(Yx(e))return true;var s=Jx;return r&&r.strict===false&&(s=Kx),s(e)};});var zs=D(Fe=>{Fe.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):false;Fe.find=(t,e)=>t.nodes.find(r=>r.type===e);Fe.exceedsLimit=(t,e,r=1,s)=>s===false||!Fe.isInteger(t)||!Fe.isInteger(e)?false:(Number(e)-Number(t))/Number(r)>=s;Fe.escapeNode=(t,e=0,r)=>{let s=t.nodes[e];s&&(r&&s.type===r||s.type==="open"||s.type==="close")&&s.escaped!==true&&(s.value="\\"+s.value,s.escaped=true);};Fe.encloseBrace=t=>t.type!=="brace"||t.commas>>0+t.ranges>>0?false:(t.invalid=true,true);Fe.isInvalidBrace=t=>t.type!=="brace"?false:t.invalid===true||t.dollar?true:!(t.commas>>0+t.ranges>>0)||t.open!==true||t.close!==true?(t.invalid=true,true):false;Fe.isOpenOrClose=t=>t.type==="open"||t.type==="close"?true:t.open===true||t.close===true;Fe.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);Fe.flatten=(...t)=>{let e=[],r=s=>{for(let i=0;i<s.length;i++){let n=s[i];if(Array.isArray(n)){r(n);continue}n!==void 0&&e.push(n);}return e};return r(t),e};});var Xs=D((vS,rm)=>{var tm=zs();rm.exports=(t,e={})=>{let r=(s,i={})=>{let n=e.escapeInvalid&&tm.isInvalidBrace(i),o=s.invalid===true&&e.escapeInvalid===true,u="";if(s.value)return (n||o)&&tm.isOpenOrClose(s)?"\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(let a of s.nodes)u+=r(a);return u};return r(t)};});var im=D((xS,sm)=>{sm.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):false};});var fm=D((FS,dm)=>{var nm=im(),Rt=(t,e,r)=>{if(nm(t)===false)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(nm(e)===false)throw new TypeError("toRegexRange: expected the second argument to be a number.");let s={relaxZeros:true,...r};typeof s.strictZeros=="boolean"&&(s.relaxZeros=s.strictZeros===false);let i=String(s.relaxZeros),n=String(s.shorthand),o=String(s.capture),u=String(s.wrap),a=t+":"+e+"="+i+n+o+u;if(Rt.cache.hasOwnProperty(a))return Rt.cache[a].result;let h=Math.min(t,e),l=Math.max(t,e);if(Math.abs(h-l)===1){let m=t+"|"+e;return s.capture?`(${m})`:s.wrap===false?m:`(?:${m})`}let c=hm(t)||hm(e),d={min:t,max:e,a:h,b:l},f=[],p=[];if(c&&(d.isPadded=c,d.maxLen=String(d.max).length),h<0){let m=l<0?Math.abs(l):1;p=om(m,Math.abs(h),d,s),h=d.a=0;}return l>=0&&(f=om(h,l,d,s)),d.negatives=p,d.positives=f,d.result=zx(p,f),s.capture===true?d.result=`(${d.result})`:s.wrap!==false&&f.length+p.length>1&&(d.result=`(?:${d.result})`),Rt.cache[a]=d,d.result};function zx(t,e,r){let s=Ru(t,e,"-",false)||[],i=Ru(e,t,"",false)||[],n=Ru(t,e,"-?",true)||[];return s.concat(n).concat(i).join("|")}function Xx(t,e){let r=1,s=1,i=am(t,r),n=new Set([e]);for(;t<=i&&i<=e;)n.add(i),r+=1,i=am(t,r);for(i=lm(e+1,s)-1;t<i&&i<=e;)n.add(i),s+=1,i=lm(e+1,s)-1;return n=[...n],n.sort(eF),n}function Zx(t,e,r){if(t===e)return {pattern:t,count:[],digits:0};let s=Qx(t,e),i=s.length,n="",o=0;for(let u=0;u<i;u++){let[a,h]=s[u];a===h?n+=a:a!=="0"||h!=="9"?n+=tF(a,h):o++;}return o&&(n+=r.shorthand===true?"\\d":"[0-9]"),{pattern:n,count:[o],digits:i}}function om(t,e,r,s){let i=Xx(t,e),n=[],o=t,u;for(let a=0;a<i.length;a++){let h=i[a],l=Zx(String(o),String(h),s),c="";if(!r.isPadded&&u&&u.pattern===l.pattern){u.count.length>1&&u.count.pop(),u.count.push(l.count[0]),u.string=u.pattern+cm(u.count),o=h+1;continue}r.isPadded&&(c=rF(h,r,s)),l.string=c+l.pattern+cm(l.count),n.push(l),o=h+1,u=l;}return n}function Ru(t,e,r,s,i){let n=[];for(let o of t){let{string:u}=o;!s&&!um(e,"string",u)&&n.push(r+u),s&&um(e,"string",u)&&n.push(r+u);}return n}function Qx(t,e){let r=[];for(let s=0;s<t.length;s++)r.push([t[s],e[s]]);return r}function eF(t,e){return t>e?1:e>t?-1:0}function um(t,e,r){return t.some(s=>s[e]===r)}function am(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function lm(t,e){return t-t%Math.pow(10,e)}function cm(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function tF(t,e,r){return `[${t}${e-t===1?"":"-"}${e}]`}function hm(t){return /^-?(0+)\d/.test(t)}function rF(t,e,r){if(!e.isPadded)return t;let s=Math.abs(e.maxLen-String(t).length),i=r.relaxZeros!==false;switch(s){case 0:return "";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:return i?`0{0,${s}}`:`0{${s}}`}}Rt.cache={};Rt.clearCache=()=>Rt.cache={};dm.exports=Rt;});var $u=D((wS,Cm)=>{var sF=$("util"),mm=fm(),pm=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),iF=t=>e=>t===true?Number(e):String(e),Tu=t=>typeof t=="number"||typeof t=="string"&&t!=="",Tr=t=>Number.isInteger(+t),Pu=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return false;for(;e[++r]==="0";);return r>0},nF=(t,e,r)=>typeof t=="string"||typeof e=="string"?true:r.stringify===true,oF=(t,e,r)=>{if(e>0){let s=t[0]==="-"?"-":"";s&&(t=t.slice(1)),t=s+t.padStart(s?e-1:e,"0");}return r===false?String(t):t},Qs=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},uF=(t,e,r)=>{t.negatives.sort((u,a)=>u<a?-1:u>a?1:0),t.positives.sort((u,a)=>u<a?-1:u>a?1:0);let s=e.capture?"":"?:",i="",n="",o;return t.positives.length&&(i=t.positives.map(u=>Qs(String(u),r)).join("|")),t.negatives.length&&(n=`-(${s}${t.negatives.map(u=>Qs(String(u),r)).join("|")})`),i&&n?o=`${i}|${n}`:o=i||n,e.wrap?`(${s}${o})`:o},gm=(t,e,r,s)=>{if(r)return mm(t,e,{wrap:false,...s});let i=String.fromCharCode(t);if(t===e)return i;let n=String.fromCharCode(e);return `[${i}-${n}]`},Dm=(t,e,r)=>{if(Array.isArray(t)){let s=r.wrap===true,i=r.capture?"":"?:";return s?`(${i}${t.join("|")})`:t.join("|")}return mm(t,e,r)},bm=(...t)=>new RangeError("Invalid range arguments: "+sF.inspect(...t)),ym=(t,e,r)=>{if(r.strictRanges===true)throw bm([t,e]);return []},aF=(t,e)=>{if(e.strictRanges===true)throw new TypeError(`Expected step "${t}" to be a number`);return []},lF=(t,e,r=1,s={})=>{let i=Number(t),n=Number(e);if(!Number.isInteger(i)||!Number.isInteger(n)){if(s.strictRanges===true)throw bm([t,e]);return []}i===0&&(i=0),n===0&&(n=0);let o=i>n,u=String(t),a=String(e),h=String(r);r=Math.max(Math.abs(r),1);let l=Pu(u)||Pu(a)||Pu(h),c=l?Math.max(u.length,a.length,h.length):0,d=l===false&&nF(t,e,s)===false,f=s.transform||iF(d);if(s.toRegex&&r===1)return gm(Qs(t,c),Qs(e,c),true,s);let p={negatives:[],positives:[]},m=y=>p[y<0?"negatives":"positives"].push(Math.abs(y)),g=[],b=0;for(;o?i>=n:i<=n;)s.toRegex===true&&r>1?m(i):g.push(oF(f(i,b),c,d)),i=o?i-r:i+r,b++;return s.toRegex===true?r>1?uF(p,s,c):Dm(g,null,{wrap:false,...s}):g},cF=(t,e,r=1,s={})=>{if(!Tr(t)&&t.length>1||!Tr(e)&&e.length>1)return ym(t,e,s);let i=s.transform||(d=>String.fromCharCode(d)),n=`${t}`.charCodeAt(0),o=`${e}`.charCodeAt(0),u=n>o,a=Math.min(n,o),h=Math.max(n,o);if(s.toRegex&&r===1)return gm(a,h,false,s);let l=[],c=0;for(;u?n>=o:n<=o;)l.push(i(n,c)),n=u?n-r:n+r,c++;return s.toRegex===true?Dm(l,null,{wrap:false,options:s}):l},Zs=(t,e,r,s={})=>{if(e==null&&Tu(t))return [t];if(!Tu(t)||!Tu(e))return ym(t,e,s);if(typeof r=="function")return Zs(t,e,1,{transform:r});if(pm(r))return Zs(t,e,0,r);let i={...s};return i.capture===true&&(i.wrap=true),r=r||i.step||1,Tr(r)?Tr(t)&&Tr(e)?lF(t,e,r,i):cF(t,e,Math.max(Math.abs(r),1),i):r!=null&&!pm(r)?aF(r,i):Zs(t,e,1,r)};Cm.exports=Zs;});var xm=D((ES,vm)=>{var hF=$u(),_m=zs(),dF=(t,e={})=>{let r=(s,i={})=>{let n=_m.isInvalidBrace(i),o=s.invalid===true&&e.escapeInvalid===true,u=n===true||o===true,a=e.escapeInvalid===true?"\\":"",h="";if(s.isOpen===true)return a+s.value;if(s.isClose===true)return console.log("node.isClose",a,s.value),a+s.value;if(s.type==="open")return u?a+s.value:"(";if(s.type==="close")return u?a+s.value:")";if(s.type==="comma")return s.prev.type==="comma"?"":u?s.value:"|";if(s.value)return s.value;if(s.nodes&&s.ranges>0){let l=_m.reduce(s.nodes),c=hF(...l,{...e,wrap:false,toRegex:true,strictZeros:true});if(c.length!==0)return l.length>1&&c.length>1?`(${c})`:c}if(s.nodes)for(let l of s.nodes)h+=r(l,s);return h};return r(t)};vm.exports=dF;});var Em=D((AS,wm)=>{var fF=$u(),Fm=Xs(),Zt=zs(),Tt=(t="",e="",r=false)=>{let s=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?Zt.flatten(e).map(i=>`{${i}}`):e;for(let i of t)if(Array.isArray(i))for(let n of i)s.push(Tt(n,e,r));else for(let n of e)r===true&&typeof n=="string"&&(n=`{${n}}`),s.push(Array.isArray(n)?Tt(i,n,r):i+n);return Zt.flatten(s)},pF=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,s=(i,n={})=>{i.queue=[];let o=n,u=n.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,u=o.queue;if(i.invalid||i.dollar){u.push(Tt(u.pop(),Fm(i,e)));return}if(i.type==="brace"&&i.invalid!==true&&i.nodes.length===2){u.push(Tt(u.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let c=Zt.reduce(i.nodes);if(Zt.exceedsLimit(...c,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let d=fF(...c,e);d.length===0&&(d=Fm(i,e)),u.push(Tt(u.pop(),d)),i.nodes=[];return}let a=Zt.encloseBrace(i),h=i.queue,l=i;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,h=l.queue;for(let c=0;c<i.nodes.length;c++){let d=i.nodes[c];if(d.type==="comma"&&i.type==="brace"){c===1&&h.push(""),h.push("");continue}if(d.type==="close"){u.push(Tt(u.pop(),h,a));continue}if(d.value&&d.type!=="open"){h.push(Tt(h.pop(),d.value));continue}d.nodes&&s(d,i);}return h};return Zt.flatten(s(t))};wm.exports=pF;});var Om=D((OS,Am)=>{Am.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
137
- `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"};});var $m=D((SS,Pm)=>{var mF=Xs(),{MAX_LENGTH:Sm,CHAR_BACKSLASH:ku,CHAR_BACKTICK:gF,CHAR_COMMA:DF,CHAR_DOT:bF,CHAR_LEFT_PARENTHESES:yF,CHAR_RIGHT_PARENTHESES:CF,CHAR_LEFT_CURLY_BRACE:_F,CHAR_RIGHT_CURLY_BRACE:vF,CHAR_LEFT_SQUARE_BRACKET:Rm,CHAR_RIGHT_SQUARE_BRACKET:Tm,CHAR_DOUBLE_QUOTE:xF,CHAR_SINGLE_QUOTE:FF,CHAR_NO_BREAK_SPACE:wF,CHAR_ZERO_WIDTH_NOBREAK_SPACE:EF}=Om(),AF=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},s=typeof r.maxLength=="number"?Math.min(Sm,r.maxLength):Sm;if(t.length>s)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${s})`);let i={type:"root",input:t,nodes:[]},n=[i],o=i,u=i,a=0,h=t.length,l=0,c=0,d,f=()=>t[l++],p=m=>{if(m.type==="text"&&u.type==="dot"&&(u.type="text"),u&&u.type==="text"&&m.type==="text"){u.value+=m.value;return}return o.nodes.push(m),m.parent=o,m.prev=u,u=m,m};for(p({type:"bos"});l<h;)if(o=n[n.length-1],d=f(),!(d===EF||d===wF)){if(d===ku){p({type:"text",value:(e.keepEscaping?d:"")+f()});continue}if(d===Tm){p({type:"text",value:"\\"+d});continue}if(d===Rm){a++;let m;for(;l<h&&(m=f());){if(d+=m,m===Rm){a++;continue}if(m===ku){d+=f();continue}if(m===Tm&&(a--,a===0))break}p({type:"text",value:d});continue}if(d===yF){o=p({type:"paren",nodes:[]}),n.push(o),p({type:"text",value:d});continue}if(d===CF){if(o.type!=="paren"){p({type:"text",value:d});continue}o=n.pop(),p({type:"text",value:d}),o=n[n.length-1];continue}if(d===xF||d===FF||d===gF){let m=d,g;for(e.keepQuotes!==true&&(d="");l<h&&(g=f());){if(g===ku){d+=g+f();continue}if(g===m){e.keepQuotes===true&&(d+=g);break}d+=g;}p({type:"text",value:d});continue}if(d===_F){c++;let g={type:"brace",open:true,close:false,dollar:u.value&&u.value.slice(-1)==="$"||o.dollar===true,depth:c,commas:0,ranges:0,nodes:[]};o=p(g),n.push(o),p({type:"open",value:d});continue}if(d===vF){if(o.type!=="brace"){p({type:"text",value:d});continue}let m="close";o=n.pop(),o.close=true,p({type:m,value:d}),c--,o=n[n.length-1];continue}if(d===DF&&c>0){if(o.ranges>0){o.ranges=0;let m=o.nodes.shift();o.nodes=[m,{type:"text",value:mF(o)}];}p({type:"comma",value:d}),o.commas++;continue}if(d===bF&&c>0&&o.commas===0){let m=o.nodes;if(c===0||m.length===0){p({type:"text",value:d});continue}if(u.type==="dot"){if(o.range=[],u.value+=d,u.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=true,o.ranges=0,u.type="text";continue}o.ranges++,o.args=[];continue}if(u.type==="range"){m.pop();let g=m[m.length-1];g.value+=u.value+d,u=g,o.ranges--;continue}p({type:"dot",value:d});continue}p({type:"text",value:d});}do if(o=n.pop(),o.type!=="root"){o.nodes.forEach(b=>{b.nodes||(b.type==="open"&&(b.isOpen=true),b.type==="close"&&(b.isClose=true),b.nodes||(b.type="text"),b.invalid=true);});let m=n[n.length-1],g=m.nodes.indexOf(o);m.nodes.splice(g,1,...o.nodes);}while(n.length>0);return p({type:"eos"}),i};Pm.exports=AF;});var Bm=D((RS,Im)=>{var km=Xs(),OF=xm(),SF=Em(),RF=$m(),ye=(t,e={})=>{let r=[];if(Array.isArray(t))for(let s of t){let i=ye.create(s,e);Array.isArray(i)?r.push(...i):r.push(i);}else r=[].concat(ye.create(t,e));return e&&e.expand===true&&e.nodupes===true&&(r=[...new Set(r)]),r};ye.parse=(t,e={})=>RF(t,e);ye.stringify=(t,e={})=>km(typeof t=="string"?ye.parse(t,e):t,e);ye.compile=(t,e={})=>(typeof t=="string"&&(t=ye.parse(t,e)),OF(t,e));ye.expand=(t,e={})=>{typeof t=="string"&&(t=ye.parse(t,e));let r=SF(t,e);return e.noempty===true&&(r=r.filter(Boolean)),e.nodupes===true&&(r=[...new Set(r)]),r};ye.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==true?ye.compile(t,e):ye.expand(t,e);Im.exports=ye;});var Pr=D((TS,Lm)=>{var TF=$("path"),We="\\\\/",Mm=`[^${We}]`,ut="\\.",PF="\\+",$F="\\?",ei="\\/",kF="(?=.)",Hm="[^/]",Iu=`(?:${ei}|$)`,Nm=`(?:^|${ei})`,Bu=`${ut}{1,2}${Iu}`,IF=`(?!${ut})`,BF=`(?!${Nm}${Bu})`,MF=`(?!${ut}{0,1}${Iu})`,HF=`(?!${Bu})`,NF=`[^.${ei}]`,qF=`${Hm}*?`,qm={DOT_LITERAL:ut,PLUS_LITERAL:PF,QMARK_LITERAL:$F,SLASH_LITERAL:ei,ONE_CHAR:kF,QMARK:Hm,END_ANCHOR:Iu,DOTS_SLASH:Bu,NO_DOT:IF,NO_DOTS:BF,NO_DOT_SLASH:MF,NO_DOTS_SLASH:HF,QMARK_NO_DOT:NF,STAR:qF,START_ANCHOR:Nm},LF={...qm,SLASH_LITERAL:`[${We}]`,QMARK:Mm,STAR:`${Mm}*?`,DOTS_SLASH:`${ut}{1,2}(?:[${We}]|$)`,NO_DOT:`(?!${ut})`,NO_DOTS:`(?!(?:^|[${We}])${ut}{1,2}(?:[${We}]|$))`,NO_DOT_SLASH:`(?!${ut}{0,1}(?:[${We}]|$))`,NO_DOTS_SLASH:`(?!${ut}{1,2}(?:[${We}]|$))`,QMARK_NO_DOT:`[^.${We}]`,START_ANCHOR:`(?:^|[${We}])`,END_ANCHOR:`(?:[${We}]|$)`},jF={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Lm.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:jF,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:TF.sep,extglobChars(t){return {"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===true?LF:qm}};});var $r=D(ge=>{var GF=$("path"),VF=process.platform==="win32",{REGEX_BACKSLASH:UF,REGEX_REMOVE_BACKSLASH:WF,REGEX_SPECIAL_CHARS:YF,REGEX_SPECIAL_CHARS_GLOBAL:JF}=Pr();ge.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);ge.hasRegexChars=t=>YF.test(t);ge.isRegexChar=t=>t.length===1&&ge.hasRegexChars(t);ge.escapeRegex=t=>t.replace(JF,"\\$1");ge.toPosixSlashes=t=>t.replace(UF,"/");ge.removeBackslashes=t=>t.replace(WF,e=>e==="\\"?"":e);ge.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};ge.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:VF===true||GF.sep==="\\";ge.escapeLast=(t,e,r)=>{let s=t.lastIndexOf(e,r);return s===-1?t:t[s-1]==="\\"?ge.escapeLast(t,e,s-1):`${t.slice(0,s)}\\${t.slice(s)}`};ge.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};ge.wrapOutput=(t,e={},r={})=>{let s=r.contains?"":"^",i=r.contains?"":"$",n=`${s}(?:${t})${i}`;return e.negated===true&&(n=`(?:^(?!${n}).*$)`),n};});var Km=D(($S,Jm)=>{var jm=$r(),{CHAR_ASTERISK:Mu,CHAR_AT:KF,CHAR_BACKWARD_SLASH:kr,CHAR_COMMA:zF,CHAR_DOT:Hu,CHAR_EXCLAMATION_MARK:Nu,CHAR_FORWARD_SLASH:Ym,CHAR_LEFT_CURLY_BRACE:qu,CHAR_LEFT_PARENTHESES:Lu,CHAR_LEFT_SQUARE_BRACKET:XF,CHAR_PLUS:ZF,CHAR_QUESTION_MARK:Gm,CHAR_RIGHT_CURLY_BRACE:QF,CHAR_RIGHT_PARENTHESES:Vm,CHAR_RIGHT_SQUARE_BRACKET:ew}=Pr(),Um=t=>t===Ym||t===kr,Wm=t=>{t.isPrefix!==true&&(t.depth=t.isGlobstar?1/0:1);},tw=(t,e)=>{let r=e||{},s=t.length-1,i=r.parts===true||r.scanToEnd===true,n=[],o=[],u=[],a=t,h=-1,l=0,c=0,d=false,f=false,p=false,m=false,g=false,b=false,y=false,v=false,F=false,E=false,R=0,P,O,T={value:"",depth:0,isGlob:false},te=()=>h>=s,x=()=>a.charCodeAt(h+1),Y=()=>(P=O,a.charCodeAt(++h));for(;h<s;){O=Y();let le;if(O===kr){y=T.backslashes=true,O=Y(),O===qu&&(b=true);continue}if(b===true||O===qu){for(R++;te()!==true&&(O=Y());){if(O===kr){y=T.backslashes=true,Y();continue}if(O===qu){R++;continue}if(b!==true&&O===Hu&&(O=Y())===Hu){if(d=T.isBrace=true,p=T.isGlob=true,E=true,i===true)continue;break}if(b!==true&&O===zF){if(d=T.isBrace=true,p=T.isGlob=true,E=true,i===true)continue;break}if(O===QF&&(R--,R===0)){b=false,d=T.isBrace=true,E=true;break}}if(i===true)continue;break}if(O===Ym){if(n.push(h),o.push(T),T={value:"",depth:0,isGlob:false},E===true)continue;if(P===Hu&&h===l+1){l+=2;continue}c=h+1;continue}if(r.noext!==true&&(O===ZF||O===KF||O===Mu||O===Gm||O===Nu)===true&&x()===Lu){if(p=T.isGlob=true,m=T.isExtglob=true,E=true,O===Nu&&h===l&&(F=true),i===true){for(;te()!==true&&(O=Y());){if(O===kr){y=T.backslashes=true,O=Y();continue}if(O===Vm){p=T.isGlob=true,E=true;break}}continue}break}if(O===Mu){if(P===Mu&&(g=T.isGlobstar=true),p=T.isGlob=true,E=true,i===true)continue;break}if(O===Gm){if(p=T.isGlob=true,E=true,i===true)continue;break}if(O===XF){for(;te()!==true&&(le=Y());){if(le===kr){y=T.backslashes=true,Y();continue}if(le===ew){f=T.isBracket=true,p=T.isGlob=true,E=true;break}}if(i===true)continue;break}if(r.nonegate!==true&&O===Nu&&h===l){v=T.negated=true,l++;continue}if(r.noparen!==true&&O===Lu){if(p=T.isGlob=true,i===true){for(;te()!==true&&(O=Y());){if(O===Lu){y=T.backslashes=true,O=Y();continue}if(O===Vm){E=true;break}}continue}break}if(p===true){if(E=true,i===true)continue;break}}r.noext===true&&(m=false,p=false);let V=a,at="",C="";l>0&&(at=a.slice(0,l),a=a.slice(l),c-=l),V&&p===true&&c>0?(V=a.slice(0,c),C=a.slice(c)):p===true?(V="",C=a):V=a,V&&V!==""&&V!=="/"&&V!==a&&Um(V.charCodeAt(V.length-1))&&(V=V.slice(0,-1)),r.unescape===true&&(C&&(C=jm.removeBackslashes(C)),V&&y===true&&(V=jm.removeBackslashes(V)));let _={prefix:at,input:t,start:l,base:V,glob:C,isBrace:d,isBracket:f,isGlob:p,isExtglob:m,isGlobstar:g,negated:v,negatedExtglob:F};if(r.tokens===true&&(_.maxDepth=0,Um(O)||o.push(T),_.tokens=o),r.parts===true||r.tokens===true){let le;for(let H=0;H<n.length;H++){let Ie=le?le+1:l,Be=n[H],De=t.slice(Ie,Be);r.tokens&&(H===0&&l!==0?(o[H].isPrefix=true,o[H].value=at):o[H].value=De,Wm(o[H]),_.maxDepth+=o[H].depth),(H!==0||De!=="")&&u.push(De),le=Be;}if(le&&le+1<t.length){let H=t.slice(le+1);u.push(H),r.tokens&&(o[o.length-1].value=H,Wm(o[o.length-1]),_.maxDepth+=o[o.length-1].depth);}_.slashes=n,_.parts=u;}return _};Jm.exports=tw;});var Zm=D((kS,Xm)=>{var ti=Pr(),Ce=$r(),{MAX_LENGTH:ri,POSIX_REGEX_SOURCE:rw,REGEX_NON_SPECIAL_CHARS:sw,REGEX_SPECIAL_CHARS_BACKREF:iw,REPLACEMENTS:zm}=ti,nw=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r);}catch{return t.map(i=>Ce.escapeRegex(i)).join("..")}return r},Qt=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,ju=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=zm[t]||t;let r={...e},s=typeof r.maxLength=="number"?Math.min(ri,r.maxLength):ri,i=t.length;if(i>s)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);let n={type:"bos",value:"",output:r.prepend||""},o=[n],u=r.capture?"":"?:",a=Ce.isWindows(e),h=ti.globChars(a),l=ti.extglobChars(h),{DOT_LITERAL:c,PLUS_LITERAL:d,SLASH_LITERAL:f,ONE_CHAR:p,DOTS_SLASH:m,NO_DOT:g,NO_DOT_SLASH:b,NO_DOTS_SLASH:y,QMARK:v,QMARK_NO_DOT:F,STAR:E,START_ANCHOR:R}=h,P=S=>`(${u}(?:(?!${R}${S.dot?m:c}).)*?)`,O=r.dot?"":g,T=r.dot?v:F,te=r.bash===true?P(r):E;r.capture&&(te=`(${te})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let x={input:t,index:-1,start:0,dot:r.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:o};t=Ce.removePrefix(t,x),i=t.length;let Y=[],V=[],at=[],C=n,_,le=()=>x.index===i-1,H=x.peek=(S=1)=>t[x.index+S],Ie=x.advance=()=>t[++x.index]||"",Be=()=>t.slice(x.index+1),De=(S="",U=0)=>{x.consumed+=S,x.index+=U;},Br=S=>{x.output+=S.output!=null?S.output:S.value,De(S.value);},Hg=()=>{let S=1;for(;H()==="!"&&(H(2)!=="("||H(3)==="?");)Ie(),x.start++,S++;return S%2===0?false:(x.negated=true,x.start++,true)},Mr=S=>{x[S]++,at.push(S);},Dt=S=>{x[S]--,at.pop();},I=S=>{if(C.type==="globstar"){let U=x.braces>0&&(S.type==="comma"||S.type==="brace"),A=S.extglob===true||Y.length&&(S.type==="pipe"||S.type==="paren");S.type!=="slash"&&S.type!=="paren"&&!U&&!A&&(x.output=x.output.slice(0,-C.output.length),C.type="star",C.value="*",C.output=te,x.output+=C.output);}if(Y.length&&S.type!=="paren"&&(Y[Y.length-1].inner+=S.value),(S.value||S.output)&&Br(S),C&&C.type==="text"&&S.type==="text"){C.value+=S.value,C.output=(C.output||"")+S.value;return}S.prev=C,o.push(S),C=S;},Hr=(S,U)=>{let A={...l[U],conditions:1,inner:""};A.prev=C,A.parens=x.parens,A.output=x.output;let k=(r.capture?"(":"")+A.open;Mr("parens"),I({type:S,value:U,output:x.output?"":p}),I({type:"paren",extglob:true,value:Ie(),output:k}),Y.push(A);},Ng=S=>{let U=S.close+(r.capture?")":""),A;if(S.type==="negate"){let k=te;if(S.inner&&S.inner.length>1&&S.inner.includes("/")&&(k=P(r)),(k!==te||le()||/^\)+$/.test(Be()))&&(U=S.close=`)$))${k}`),S.inner.includes("*")&&(A=Be())&&/^\.[^\\/.]+$/.test(A)){let z=ju(A,{...e,fastpaths:false}).output;U=S.close=`)${z})${k})`;}S.prev.type==="bos"&&(x.negatedExtglob=true);}I({type:"paren",extglob:true,value:_,output:U}),Dt("parens");};if(r.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(t)){let S=false,U=t.replace(iw,(A,k,z,ce,se,li)=>ce==="\\"?(S=true,A):ce==="?"?k?k+ce+(se?v.repeat(se.length):""):li===0?T+(se?v.repeat(se.length):""):v.repeat(z.length):ce==="."?c.repeat(z.length):ce==="*"?k?k+ce+(se?te:""):te:k?A:`\\${A}`);return S===true&&(r.unescape===true?U=U.replace(/\\/g,""):U=U.replace(/\\+/g,A=>A.length%2===0?"\\\\":A?"\\":"")),U===t&&r.contains===true?(x.output=t,x):(x.output=Ce.wrapOutput(U,x,e),x)}for(;!le();){if(_=Ie(),_==="\0")continue;if(_==="\\"){let A=H();if(A==="/"&&r.bash!==true||A==="."||A===";")continue;if(!A){_+="\\",I({type:"text",value:_});continue}let k=/^\\+/.exec(Be()),z=0;if(k&&k[0].length>2&&(z=k[0].length,x.index+=z,z%2!==0&&(_+="\\")),r.unescape===true?_=Ie():_+=Ie(),x.brackets===0){I({type:"text",value:_});continue}}if(x.brackets>0&&(_!=="]"||C.value==="["||C.value==="[^")){if(r.posix!==false&&_===":"){let A=C.value.slice(1);if(A.includes("[")&&(C.posix=true,A.includes(":"))){let k=C.value.lastIndexOf("["),z=C.value.slice(0,k),ce=C.value.slice(k+2),se=rw[ce];if(se){C.value=z+se,x.backtrack=true,Ie(),!n.output&&o.indexOf(C)===1&&(n.output=p);continue}}}(_==="["&&H()!==":"||_==="-"&&H()==="]")&&(_=`\\${_}`),_==="]"&&(C.value==="["||C.value==="[^")&&(_=`\\${_}`),r.posix===true&&_==="!"&&C.value==="["&&(_="^"),C.value+=_,Br({value:_});continue}if(x.quotes===1&&_!=='"'){_=Ce.escapeRegex(_),C.value+=_,Br({value:_});continue}if(_==='"'){x.quotes=x.quotes===1?0:1,r.keepQuotes===true&&I({type:"text",value:_});continue}if(_==="("){Mr("parens"),I({type:"paren",value:_});continue}if(_===")"){if(x.parens===0&&r.strictBrackets===true)throw new SyntaxError(Qt("opening","("));let A=Y[Y.length-1];if(A&&x.parens===A.parens+1){Ng(Y.pop());continue}I({type:"paren",value:_,output:x.parens?")":"\\)"}),Dt("parens");continue}if(_==="["){if(r.nobracket===true||!Be().includes("]")){if(r.nobracket!==true&&r.strictBrackets===true)throw new SyntaxError(Qt("closing","]"));_=`\\${_}`;}else Mr("brackets");I({type:"bracket",value:_});continue}if(_==="]"){if(r.nobracket===true||C&&C.type==="bracket"&&C.value.length===1){I({type:"text",value:_,output:`\\${_}`});continue}if(x.brackets===0){if(r.strictBrackets===true)throw new SyntaxError(Qt("opening","["));I({type:"text",value:_,output:`\\${_}`});continue}Dt("brackets");let A=C.value.slice(1);if(C.posix!==true&&A[0]==="^"&&!A.includes("/")&&(_=`/${_}`),C.value+=_,Br({value:_}),r.literalBrackets===false||Ce.hasRegexChars(A))continue;let k=Ce.escapeRegex(C.value);if(x.output=x.output.slice(0,-C.value.length),r.literalBrackets===true){x.output+=k,C.value=k;continue}C.value=`(${u}${k}|${C.value})`,x.output+=C.value;continue}if(_==="{"&&r.nobrace!==true){Mr("braces");let A={type:"brace",value:_,output:"(",outputIndex:x.output.length,tokensIndex:x.tokens.length};V.push(A),I(A);continue}if(_==="}"){let A=V[V.length-1];if(r.nobrace===true||!A){I({type:"text",value:_,output:_});continue}let k=")";if(A.dots===true){let z=o.slice(),ce=[];for(let se=z.length-1;se>=0&&(o.pop(),z[se].type!=="brace");se--)z[se].type!=="dots"&&ce.unshift(z[se].value);k=nw(ce,r),x.backtrack=true;}if(A.comma!==true&&A.dots!==true){let z=x.output.slice(0,A.outputIndex),ce=x.tokens.slice(A.tokensIndex);A.value=A.output="\\{",_=k="\\}",x.output=z;for(let se of ce)x.output+=se.output||se.value;}I({type:"brace",value:_,output:k}),Dt("braces"),V.pop();continue}if(_==="|"){Y.length>0&&Y[Y.length-1].conditions++,I({type:"text",value:_});continue}if(_===","){let A=_,k=V[V.length-1];k&&at[at.length-1]==="braces"&&(k.comma=true,A="|"),I({type:"comma",value:_,output:A});continue}if(_==="/"){if(C.type==="dot"&&x.index===x.start+1){x.start=x.index+1,x.consumed="",x.output="",o.pop(),C=n;continue}I({type:"slash",value:_,output:f});continue}if(_==="."){if(x.braces>0&&C.type==="dot"){C.value==="."&&(C.output=c);let A=V[V.length-1];C.type="dots",C.output+=_,C.value+=_,A.dots=true;continue}if(x.braces+x.parens===0&&C.type!=="bos"&&C.type!=="slash"){I({type:"text",value:_,output:c});continue}I({type:"dot",value:_,output:c});continue}if(_==="?"){if(!(C&&C.value==="(")&&r.noextglob!==true&&H()==="("&&H(2)!=="?"){Hr("qmark",_);continue}if(C&&C.type==="paren"){let k=H(),z=_;if(k==="<"&&!Ce.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(C.value==="("&&!/[!=<:]/.test(k)||k==="<"&&!/<([!=]|\w+>)/.test(Be()))&&(z=`\\${_}`),I({type:"text",value:_,output:z});continue}if(r.dot!==true&&(C.type==="slash"||C.type==="bos")){I({type:"qmark",value:_,output:F});continue}I({type:"qmark",value:_,output:v});continue}if(_==="!"){if(r.noextglob!==true&&H()==="("&&(H(2)!=="?"||!/[!=<:]/.test(H(3)))){Hr("negate",_);continue}if(r.nonegate!==true&&x.index===0){Hg();continue}}if(_==="+"){if(r.noextglob!==true&&H()==="("&&H(2)!=="?"){Hr("plus",_);continue}if(C&&C.value==="("||r.regex===false){I({type:"plus",value:_,output:d});continue}if(C&&(C.type==="bracket"||C.type==="paren"||C.type==="brace")||x.parens>0){I({type:"plus",value:_});continue}I({type:"plus",value:d});continue}if(_==="@"){if(r.noextglob!==true&&H()==="("&&H(2)!=="?"){I({type:"at",extglob:true,value:_,output:""});continue}I({type:"text",value:_});continue}if(_!=="*"){(_==="$"||_==="^")&&(_=`\\${_}`);let A=sw.exec(Be());A&&(_+=A[0],x.index+=A[0].length),I({type:"text",value:_});continue}if(C&&(C.type==="globstar"||C.star===true)){C.type="star",C.star=true,C.value+=_,C.output=te,x.backtrack=true,x.globstar=true,De(_);continue}let S=Be();if(r.noextglob!==true&&/^\([^?]/.test(S)){Hr("star",_);continue}if(C.type==="star"){if(r.noglobstar===true){De(_);continue}let A=C.prev,k=A.prev,z=A.type==="slash"||A.type==="bos",ce=k&&(k.type==="star"||k.type==="globstar");if(r.bash===true&&(!z||S[0]&&S[0]!=="/")){I({type:"star",value:_,output:""});continue}let se=x.braces>0&&(A.type==="comma"||A.type==="brace"),li=Y.length&&(A.type==="pipe"||A.type==="paren");if(!z&&A.type!=="paren"&&!se&&!li){I({type:"star",value:_,output:""});continue}for(;S.slice(0,3)==="/**";){let Nr=t[x.index+4];if(Nr&&Nr!=="/")break;S=S.slice(3),De("/**",3);}if(A.type==="bos"&&le()){C.type="globstar",C.value+=_,C.output=P(r),x.output=C.output,x.globstar=true,De(_);continue}if(A.type==="slash"&&A.prev.type!=="bos"&&!ce&&le()){x.output=x.output.slice(0,-(A.output+C.output).length),A.output=`(?:${A.output}`,C.type="globstar",C.output=P(r)+(r.strictSlashes?")":"|$)"),C.value+=_,x.globstar=true,x.output+=A.output+C.output,De(_);continue}if(A.type==="slash"&&A.prev.type!=="bos"&&S[0]==="/"){let Nr=S[1]!==void 0?"|$":"";x.output=x.output.slice(0,-(A.output+C.output).length),A.output=`(?:${A.output}`,C.type="globstar",C.output=`${P(r)}${f}|${f}${Nr})`,C.value+=_,x.output+=A.output+C.output,x.globstar=true,De(_+Ie()),I({type:"slash",value:"/",output:""});continue}if(A.type==="bos"&&S[0]==="/"){C.type="globstar",C.value+=_,C.output=`(?:^|${f}|${P(r)}${f})`,x.output=C.output,x.globstar=true,De(_+Ie()),I({type:"slash",value:"/",output:""});continue}x.output=x.output.slice(0,-C.output.length),C.type="globstar",C.output=P(r),C.value+=_,x.output+=C.output,x.globstar=true,De(_);continue}let U={type:"star",value:_,output:te};if(r.bash===true){U.output=".*?",(C.type==="bos"||C.type==="slash")&&(U.output=O+U.output),I(U);continue}if(C&&(C.type==="bracket"||C.type==="paren")&&r.regex===true){U.output=_,I(U);continue}(x.index===x.start||C.type==="slash"||C.type==="dot")&&(C.type==="dot"?(x.output+=b,C.output+=b):r.dot===true?(x.output+=y,C.output+=y):(x.output+=O,C.output+=O),H()!=="*"&&(x.output+=p,C.output+=p)),I(U);}for(;x.brackets>0;){if(r.strictBrackets===true)throw new SyntaxError(Qt("closing","]"));x.output=Ce.escapeLast(x.output,"["),Dt("brackets");}for(;x.parens>0;){if(r.strictBrackets===true)throw new SyntaxError(Qt("closing",")"));x.output=Ce.escapeLast(x.output,"("),Dt("parens");}for(;x.braces>0;){if(r.strictBrackets===true)throw new SyntaxError(Qt("closing","}"));x.output=Ce.escapeLast(x.output,"{"),Dt("braces");}if(r.strictSlashes!==true&&(C.type==="star"||C.type==="bracket")&&I({type:"maybe_slash",value:"",output:`${f}?`}),x.backtrack===true){x.output="";for(let S of x.tokens)x.output+=S.output!=null?S.output:S.value,S.suffix&&(x.output+=S.suffix);}return x};ju.fastpaths=(t,e)=>{let r={...e},s=typeof r.maxLength=="number"?Math.min(ri,r.maxLength):ri,i=t.length;if(i>s)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);t=zm[t]||t;let n=Ce.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:u,ONE_CHAR:a,DOTS_SLASH:h,NO_DOT:l,NO_DOTS:c,NO_DOTS_SLASH:d,STAR:f,START_ANCHOR:p}=ti.globChars(n),m=r.dot?c:l,g=r.dot?d:l,b=r.capture?"":"?:",y={negated:false,prefix:""},v=r.bash===true?".*?":f;r.capture&&(v=`(${v})`);let F=O=>O.noglobstar===true?v:`(${b}(?:(?!${p}${O.dot?h:o}).)*?)`,E=O=>{switch(O){case "*":return `${m}${a}${v}`;case ".*":return `${o}${a}${v}`;case "*.*":return `${m}${v}${o}${a}${v}`;case "*/*":return `${m}${v}${u}${a}${g}${v}`;case "**":return m+F(r);case "**/*":return `(?:${m}${F(r)}${u})?${g}${a}${v}`;case "**/*.*":return `(?:${m}${F(r)}${u})?${g}${v}${o}${a}${v}`;case "**/.*":return `(?:${m}${F(r)}${u})?${o}${a}${v}`;default:{let T=/^(.*?)\.(\w+)$/.exec(O);if(!T)return;let te=E(T[1]);return te?te+o+T[2]:void 0}}},R=Ce.removePrefix(t,y),P=E(R);return P&&r.strictSlashes!==true&&(P+=`${u}?`),P};Xm.exports=ju;});var eg=D((IS,Qm)=>{var ow=$("path"),uw=Km(),Gu=Zm(),Vu=$r(),aw=Pr(),lw=t=>t&&typeof t=="object"&&!Array.isArray(t),re=(t,e,r=false)=>{if(Array.isArray(t)){let l=t.map(d=>re(d,e,r));return d=>{for(let f of l){let p=f(d);if(p)return p}return false}}let s=lw(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!s)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},n=Vu.isWindows(e),o=s?re.compileRe(t,e):re.makeRe(t,e,false,true),u=o.state;delete o.state;let a=()=>false;if(i.ignore){let l={...e,ignore:null,onMatch:null,onResult:null};a=re(i.ignore,l,r);}let h=(l,c=false)=>{let{isMatch:d,match:f,output:p}=re.test(l,o,e,{glob:t,posix:n}),m={glob:t,state:u,regex:o,posix:n,input:l,output:p,match:f,isMatch:d};return typeof i.onResult=="function"&&i.onResult(m),d===false?(m.isMatch=false,c?m:false):a(l)?(typeof i.onIgnore=="function"&&i.onIgnore(m),m.isMatch=false,c?m:false):(typeof i.onMatch=="function"&&i.onMatch(m),c?m:true)};return r&&(h.state=u),h};re.test=(t,e,r,{glob:s,posix:i}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return {isMatch:false,output:""};let n=r||{},o=n.format||(i?Vu.toPosixSlashes:null),u=t===s,a=u&&o?o(t):t;return u===false&&(a=o?o(t):t,u=a===s),(u===false||n.capture===true)&&(n.matchBase===true||n.basename===true?u=re.matchBase(t,e,r,i):u=e.exec(a)),{isMatch:!!u,match:u,output:a}};re.matchBase=(t,e,r,s=Vu.isWindows(r))=>(e instanceof RegExp?e:re.makeRe(e,r)).test(ow.basename(t));re.isMatch=(t,e,r)=>re(e,r)(t);re.parse=(t,e)=>Array.isArray(t)?t.map(r=>re.parse(r,e)):Gu(t,{...e,fastpaths:false});re.scan=(t,e)=>uw(t,e);re.compileRe=(t,e,r=false,s=false)=>{if(r===true)return t.output;let i=e||{},n=i.contains?"":"^",o=i.contains?"":"$",u=`${n}(?:${t.output})${o}`;t&&t.negated===true&&(u=`^(?!${u}).*$`);let a=re.toRegex(u,e);return s===true&&(a.state=t),a};re.makeRe=(t,e={},r=false,s=false)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let i={negated:false,fastpaths:true};return e.fastpaths!==false&&(t[0]==="."||t[0]==="*")&&(i.output=Gu.fastpaths(t,e)),i.output||(i=Gu(t,e)),re.compileRe(i,e,r,s)};re.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===true)throw r;return /$^/}};re.constants=aw;Qm.exports=re;});var rg=D((BS,tg)=>{tg.exports=eg();});var ag=D((MS,ug)=>{var ig=$("util"),ng=Bm(),Ye=rg(),Uu=$r(),sg=t=>t===""||t==="./",og=t=>{let e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1},W=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let s=new Set,i=new Set,n=new Set,o=0,u=l=>{n.add(l.output),r&&r.onResult&&r.onResult(l);};for(let l=0;l<e.length;l++){let c=Ye(String(e[l]),{...r,onResult:u},true),d=c.state.negated||c.state.negatedExtglob;d&&o++;for(let f of t){let p=c(f,true);(d?!p.isMatch:p.isMatch)&&(d?s.add(p.output):(s.delete(p.output),i.add(p.output)));}}let h=(o===e.length?[...n]:[...i]).filter(l=>!s.has(l));if(r&&h.length===0){if(r.failglob===true)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===true||r.nullglob===true)return r.unescape?e.map(l=>l.replace(/\\/g,"")):e}return h};W.match=W;W.matcher=(t,e)=>Ye(t,e);W.isMatch=(t,e,r)=>Ye(e,r)(t);W.any=W.isMatch;W.not=(t,e,r={})=>{e=[].concat(e).map(String);let s=new Set,i=[],n=u=>{r.onResult&&r.onResult(u),i.push(u.output);},o=new Set(W(t,e,{...r,onResult:n}));for(let u of i)o.has(u)||s.add(u);return [...s]};W.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${ig.inspect(t)}"`);if(Array.isArray(e))return e.some(s=>W.contains(t,s,r));if(typeof e=="string"){if(sg(t)||sg(e))return false;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return true}return W.isMatch(t,e,{...r,contains:true})};W.matchKeys=(t,e,r)=>{if(!Uu.isObject(t))throw new TypeError("Expected the first argument to be an object");let s=W(Object.keys(t),e,r),i={};for(let n of s)i[n]=t[n];return i};W.some=(t,e,r)=>{let s=[].concat(t);for(let i of [].concat(e)){let n=Ye(String(i),r);if(s.some(o=>n(o)))return true}return false};W.every=(t,e,r)=>{let s=[].concat(t);for(let i of [].concat(e)){let n=Ye(String(i),r);if(!s.every(o=>n(o)))return false}return true};W.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${ig.inspect(t)}"`);return [].concat(e).every(s=>Ye(s,r)(t))};W.capture=(t,e,r)=>{let s=Uu.isWindows(r),n=Ye.makeRe(String(t),{...r,capture:true}).exec(s?Uu.toPosixSlashes(e):e);if(n)return n.slice(1).map(o=>o===void 0?"":o)};W.makeRe=(...t)=>Ye.makeRe(...t);W.scan=(...t)=>Ye.scan(...t);W.parse=(t,e)=>{let r=[];for(let s of [].concat(t||[]))for(let i of ng(String(s),e))r.push(Ye.parse(i,e));return r};W.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===true||!og(t)?[t]:ng(t,e)};W.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return W.braces(t,{...e,expand:true})};W.hasBraces=og;ug.exports=W;});var mg=D(Yu=>{Object.defineProperty(Yu,"__esModule",{value:true});Yu.matchPathFilter=dw;var dg=em(),cw=ag(),hw=$("url"),lg=qs();function dw(t="/",e,r){if(cg(t))return fg(t,e);if(hg(t))return pg(t,e);if(Array.isArray(t)){if(t.every(cg))return pw(t,e);if(t.every(hg))return fw(t,e);throw new Error(lg.ERRORS.ERR_CONTEXT_MATCHER_INVALID_ARRAY)}if(typeof t=="function"){let s=Wu(e);return t(s,r)}throw new Error(lg.ERRORS.ERR_CONTEXT_MATCHER_GENERIC)}function fg(t,e){return Wu(e)?.indexOf(t)===0}function pg(t,e){let r=Wu(e),s=cw([r],t);return s&&s.length>0}function fw(t,e){return pg(t,e)}function pw(t,e){let r=false;for(let s of t)if(fg(s,e)){r=true;break}return r}function Wu(t){return t&&hw.parse(t).pathname}function cg(t){return typeof t=="string"&&!dg(t)}function hg(t){return dg(t)}});var Ku=D(Ju=>{Object.defineProperty(Ju,"__esModule",{value:true});function gg(t){return Object.prototype.toString.call(t)==="[object Object]"}function mw(t){var e,r;return gg(t)===false?false:(e=t.constructor,e===void 0?true:(r=e.prototype,!(gg(r)===false||r.hasOwnProperty("isPrototypeOf")===false)))}Ju.isPlainObject=mw;});var yg=D(zu=>{Object.defineProperty(zu,"__esModule",{value:true});zu.createPathRewriter=bw;var Dg=Ku(),gw=qs(),Dw=ot(),bg=Dw.Debug.extend("path-rewriter");function bw(t){let e;if(!yw(t))return;if(typeof t=="function")return t;return e=Cw(t),r;function r(s){let i=s;for(let n of e)if(n.regex.test(s)){i=i.replace(n.regex,n.value),bg('rewriting path from "%s" to "%s"',s,i);break}return i}}function yw(t){if(typeof t=="function")return true;if((0, Dg.isPlainObject)(t))return Object.keys(t).length!==0;if(t==null)return false;throw new Error(gw.ERRORS.ERR_PATH_REWRITER_CONFIG)}function Cw(t){let e=[];if((0, Dg.isPlainObject)(t))for(let[r,s]of Object.entries(t))e.push({regex:new RegExp(r),value:s}),bg('rewrite rule created: "%s" ~> "%s"',r,s);return e}});var _g=D(Xu=>{Object.defineProperty(Xu,"__esModule",{value:true});Xu.getTarget=xw;var _w=Ku(),vw=ot(),Cg=vw.Debug.extend("router");async function xw(t,e){let r,s=e.router;return (0, _w.isPlainObject)(s)?r=Fw(t,s):typeof s=="function"&&(r=await s(t)),r}function Fw(t,e){let r,s=t.headers.host,i=t.url,n=s+i;for(let[o,u]of Object.entries(e))if(ww(o)){if(n.indexOf(o)>-1){r=u,Cg('match: "%s" -> "%s"',o,r);break}}else if(o===s){r=u,Cg('match: "%s" -> "%s"',s,r);break}return r}function ww(t){return t.indexOf("/")>-1}});var vg=D(si=>{Object.defineProperty(si,"__esModule",{value:true});si.HttpProxyMiddleware=void 0;var Ew=Np(),Aw=Lp(),Ow=Kp(),Sw=mg(),Rw=yg(),Tw=_g(),Je=ot(),Pw=Ws(),$w=Vs(),Zu=class{constructor(e){this.wsInternalSubscribed=false,this.serverOnCloseSubscribed=false,this.middleware=async(r,s,i)=>{if(this.shouldProxy(this.proxyOptions.pathFilter,r))try{let o=await this.prepareProxyRequest(r);(0,Je.Debug)("proxy request to target: %O",o.target),this.proxy.web(r,s,o);}catch(o){i?.(o);}else i?.();let n=(r.socket??r.connection)?.server;n&&!this.serverOnCloseSubscribed&&(n.on("close",()=>{(0, Je.Debug)("server close signal received: closing proxy server"),this.proxy.close();}),this.serverOnCloseSubscribed=true),this.proxyOptions.ws===true&&this.catchUpgradeRequest(n);},this.catchUpgradeRequest=r=>{this.wsInternalSubscribed||((0, Je.Debug)("subscribing to server upgrade event"),r.on("upgrade",this.handleUpgrade),this.wsInternalSubscribed=true);},this.handleUpgrade=async(r,s,i)=>{try{if(this.shouldProxy(this.proxyOptions.pathFilter,r)){let n=await this.prepareProxyRequest(r);this.proxy.ws(r,s,i,n),(0,Je.Debug)("server upgrade event received. Proxying WebSocket");}}catch(n){this.proxy.emit("error",n,r,s);}},this.shouldProxy=(r,s)=>{try{return (0,Sw.matchPathFilter)(r,s.url,s)}catch(i){return (0, Je.Debug)("Error: matchPathFilter() called with request url: ",`"${s.url}"`),this.logger.error(i),false}},this.prepareProxyRequest=async r=>{this.middleware.__LEGACY_HTTP_PROXY_MIDDLEWARE__&&(r.url=r.originalUrl||r.url);let s=Object.assign({},this.proxyOptions);return await this.applyRouter(r,s),await this.applyPathRewrite(r,this.pathRewriter),s},this.applyRouter=async(r,s)=>{let i;s.router&&(i=await Tw.getTarget(r,s),i&&((0, Je.Debug)('router new target: "%s"',i),s.target=i));},this.applyPathRewrite=async(r,s)=>{if(s){let i=await s(r.url,r);typeof i=="string"?((0, Je.Debug)("pathRewrite new path: %s",r.url),r.url=i):(0, Je.Debug)("pathRewrite: no rewritten path found: %s",r.url);}},(0, Aw.verifyConfig)(e),this.proxyOptions=e,this.logger=(0, $w.getLogger)(e),(0, Je.Debug)("create proxy server"),this.proxy=Ew.createProxyServer({}),this.registerPlugins(this.proxy,this.proxyOptions),this.pathRewriter=Rw.createPathRewriter(this.proxyOptions.pathRewrite),this.middleware.upgrade=(r,s,i)=>{this.wsInternalSubscribed||this.handleUpgrade(r,s,i);};}registerPlugins(e,r){(0, Ow.getPlugins)(r).forEach(i=>{(0, Je.Debug)(`register plugin: "${(0, Pw.getFunctionName)(i)}"`),i(e,r);});}};si.HttpProxyMiddleware=Zu;});var ea=D(Qu=>{Object.defineProperty(Qu,"__esModule",{value:true});Qu.createProxyMiddleware=Iw;var kw=vg();function Iw(t){let{middleware:e}=new kw.HttpProxyMiddleware(t);return e}});var xg=D(ra=>{Object.defineProperty(ra,"__esModule",{value:true});ra.responseInterceptor=Hw;var ta=$("zlib"),Bw=ot(),Mw=Ws(),er=Bw.Debug.extend("response-interceptor");function Hw(t){return async function(r,s,i){er("intercept proxy response");let n=r,o=Buffer.from("","utf8"),u=Nw(r,r.headers["content-encoding"]);u.on("data",a=>o=Buffer.concat([o,a])),u.on("end",async()=>{qw(r,i),er("call interceptor function: %s",(0, Mw.getFunctionName)(t));let a=Buffer.from(await t(o,n,s,i));er("set content-length: %s",Buffer.byteLength(a,"utf8")),i.setHeader("content-length",Buffer.byteLength(a,"utf8")),er("write intercepted response"),i.write(a),i.end();}),u.on("error",a=>{i.end(`Error fetching proxied request: ${a.message}`);});}}function Nw(t,e){let r=t,s;switch(e){case "gzip":s=ta.createGunzip();break;case "br":s=ta.createBrotliDecompress();break;case "deflate":s=ta.createInflate();break;}return s&&(er("decompress proxy response with 'content-encoding': %s",e),r.pipe(s),r=s),r}function qw(t,e){if(er("copy original response headers"),e.statusCode=t.statusCode,e.statusMessage=t.statusMessage,e.setHeader){let r=Object.keys(t.headers);r=r.filter(s=>!["content-encoding","transfer-encoding"].includes(s)),r.forEach(s=>{let i=t.headers[s];s==="set-cookie"&&(i=Array.isArray(i)?i:[i],i=i.map(n=>n.replace(/Domain=[^;]+?/i,""))),e.setHeader(s,i);});}else e.headers=t.headers;}});var Fg=D(sa=>{Object.defineProperty(sa,"__esModule",{value:true});sa.fixRequestBody=jw;var Lw=$("querystring");function jw(t,e){if(e.readableLength!==0)return;let r=e.body;if(!r)return;let s=t.getHeader("Content-Type");if(!s)return;let i=n=>{t.setHeader("Content-Length",Buffer.byteLength(n)),t.write(n);};s.includes("application/json")||s.includes("+json")?i(JSON.stringify(r)):s.includes("application/x-www-form-urlencoded")?i(Lw.stringify(r)):s.includes("multipart/form-data")&&i(Gw(s,r));}function Gw(t,e){let r=t.replace(/^.*boundary=(.*)$/,"$1"),s="";for(let[i,n]of Object.entries(e))s+=`--${r}\r
130
+ `};tr.setupSocket(r),i&&i.length&&r.unshift(i);var a=(tr.isSSL.test(s.target.protocol)?k_:$_).request(tr.setupOutgoing(s.ssl||{},s,e));return n&&n.emit("proxyReqWs",a,e,r,s,i),a.on("error",h),a.on("response",function(l){l.upgrade||(r.write(u("HTTP/"+l.httpVersion+" "+l.statusCode+" "+l.statusMessage,l.headers)),l.pipe(r));}),a.on("upgrade",function(l,c,d){c.on("error",h),c.on("end",function(){n.emit("close",l,c,d);}),r.on("error",function(){c.end();}),tr.setupSocket(c),d&&d.length&&c.unshift(d),r.write(u("HTTP/1.1 101 Switching Protocols",l.headers)),c.pipe(r).pipe(c),n.emit("open",c),n.emit("proxySocket",c);}),a.end();function h(l){o?o(l,e,r):n.emit("error",l,e,r),r.end();}}};});var Wp=D((ER,Up)=>{var Gp=Up.exports,qp=$("util")._extend,I_=$("url").parse,Vp=lp(),M_=$("http"),B_=$("https"),Lp=Bp(),jp=Np();Gp.Server=$t;function wu(t){return function(e){return function(r,s){var i=t==="ws"?this.wsPasses:this.webPasses,n=[].slice.call(arguments),o=n.length-1,u,a;typeof n[o]=="function"&&(a=n[o],o--);var h=e;if(!(n[o]instanceof Buffer)&&n[o]!==s&&(h=qp({},e),qp(h,n[o]),o--),n[o]instanceof Buffer&&(u=n[o]),["target","forward"].forEach(function(c){typeof h[c]=="string"&&(h[c]=I_(h[c]));}),!h.target&&!h.forward)return this.emit("error",new Error("Must provide a proper URL as target"));for(var l=0;l<i.length&&!i[l](r,s,h,u,this,a);l++);}}}Gp.createRightProxy=wu;function $t(t){Vp.call(this),t=t||{},t.prependPath=t.prependPath!==false,this.web=this.proxyRequest=wu("web")(t),this.ws=this.proxyWebsocketRequest=wu("ws")(t),this.options=t,this.webPasses=Object.keys(Lp).map(function(e){return Lp[e]}),this.wsPasses=Object.keys(jp).map(function(e){return jp[e]}),this.on("error",this.onError,this);}$("util").inherits($t,Vp);$t.prototype.onError=function(t){if(this.listeners("error").length===1)throw t};$t.prototype.listen=function(t,e){var r=this,s=function(i,n){r.web(i,n);};return this._server=this.options.ssl?B_.createServer(this.options.ssl,s):M_.createServer(s),this.options.ws&&this._server.on("upgrade",function(i,n,o){r.ws(i,n,o);}),this._server.listen(t,e),this};$t.prototype.close=function(t){var e=this;this._server&&this._server.close(r);function r(){e._server=null,t&&t.apply(null,arguments);}};$t.prototype.before=function(t,e,r){if(t!=="ws"&&t!=="web")throw new Error("type must be `web` or `ws`");var s=t==="ws"?this.wsPasses:this.webPasses,i=false;if(s.forEach(function(n,o){n.name===e&&(i=o);}),i===false)throw new Error("No such pass");s.splice(i,0,r);};$t.prototype.after=function(t,e,r){if(t!=="ws"&&t!=="web")throw new Error("type must be `web` or `ws`");var s=t==="ws"?this.wsPasses:this.webPasses,i=false;if(s.forEach(function(n,o){n.name===e&&(i=o);}),i===false)throw new Error("No such pass");s.splice(i++,0,r);};});var Yp=D((AR,Kp)=>{var $r=Wp().Server;function Fu(t){return new $r(t)}$r.createProxyServer=Fu;$r.createServer=Fu;$r.createProxy=Fu;Kp.exports=$r;});var zp=D((OR,Jp)=>{Jp.exports=Yp();});var Vs=D(Gs=>{Object.defineProperty(Gs,"__esModule",{value:true});Gs.ERRORS=void 0;var Xp;(function(t){t.ERR_CONFIG_FACTORY_TARGET_MISSING='[HPM] Missing "target" option. Example: {target: "http://www.example.org"}',t.ERR_CONTEXT_MATCHER_GENERIC='[HPM] Invalid pathFilter. Expecting something like: "/api" or ["/api", "/ajax"]',t.ERR_CONTEXT_MATCHER_INVALID_ARRAY='[HPM] Invalid pathFilter. Plain paths (e.g. "/api") can not be mixed with globs (e.g. "/api/**"). Expecting something like: ["/api", "/ajax"] or ["/api/**", "!**.html"].',t.ERR_PATH_REWRITER_CONFIG="[HPM] Invalid pathRewrite config. Expecting object with pathRewrite config or a rewrite function";})(Xp||(Gs.ERRORS=Xp={}));});var Zp=D(Eu=>{Object.defineProperty(Eu,"__esModule",{value:true});Eu.verifyConfig=N_;var H_=Vs();function N_(t){if(!t.target&&!t.router)throw new Error(H_.ERRORS.ERR_CONFIG_FACTORY_TARGET_MISSING)}});var at=D(Us=>{Object.defineProperty(Us,"__esModule",{value:true});Us.Debug=void 0;var q_=hu();Us.Debug=q_("http-proxy-middleware");});var Qp=D(Ws=>{Object.defineProperty(Ws,"__esModule",{value:true});Ws.debugProxyErrorsPlugin=void 0;var L_=at(),kt=L_.Debug.extend("debug-proxy-errors-plugin"),j_=t=>{t.on("error",(e,r,s,i)=>{kt(`http-proxy error event:
131
+ %O`,e);}),t.on("proxyReq",(e,r,s)=>{s.on("error",i=>{kt(`Socket error in proxyReq event:
132
+ %O`,i);});}),t.on("proxyRes",(e,r,s)=>{s.on("close",()=>{s.writableEnded||(kt("Destroying proxyRes in proxyRes close event"),e.destroy());});}),t.on("proxyReqWs",(e,r,s)=>{s.on("error",i=>{kt(`Socket error in proxyReqWs event:
133
+ %O`,i);});}),t.on("open",e=>{e.on("error",r=>{kt(`Socket error in open event:
134
+ %O`,r);});}),t.on("close",(e,r,s)=>{r.on("error",i=>{kt(`Socket error in close event:
135
+ %O`,i);});}),t.on("econnreset",(e,r,s,i)=>{kt(`http-proxy econnreset event:
136
+ %O`,e);});};Ws.debugProxyErrorsPlugin=j_;});var em=D(Au=>{Object.defineProperty(Au,"__esModule",{value:true});Au.getStatusCode=G_;function G_(t){let e;if(/HPE_INVALID/.test(t))e=502;else switch(t){case "ECONNRESET":case "ENOTFOUND":case "ECONNREFUSED":case "ETIMEDOUT":e=504;break;default:e=500;break}return e}});var tm=D(Ks=>{Object.defineProperty(Ks,"__esModule",{value:true});Ks.errorResponsePlugin=void 0;var V_=em();function U_(t){return t&&typeof t.writeHead=="function"}function W_(t){return t&&typeof t.write=="function"&&!("writeHead"in t)}var K_=(t,e)=>{t.on("error",(r,s,i,n)=>{if(!s&&!i)throw r;if(U_(i)){if(!i.headersSent){let u=(0, V_.getStatusCode)(r.code);i.writeHead(u);}let o=s.headers&&s.headers.host;i.end(`Error occurred while trying to proxy: ${o}${s.url}`);}else W_(i)&&i.destroy();});};Ks.errorResponsePlugin=K_;});var Ys=D(Ou=>{Object.defineProperty(Ou,"__esModule",{value:true});Ou.getLogger=J_;var Y_={info:()=>{},warn:()=>{},error:()=>{}};function J_(t){return t.logger||Y_}});var rm=D(Ru=>{Object.defineProperty(Ru,"__esModule",{value:true});Ru.getPort=z_;function z_(t){return Object.keys(t||{})?.[0]?.split(":")[1]}});var im=D(Js=>{Object.defineProperty(Js,"__esModule",{value:true});Js.loggerPlugin=void 0;var sm=$("url"),X_=Ys(),Z_=rm(),Q_=(t,e)=>{let r=(0, X_.getLogger)(e);t.on("error",(s,i,n,o)=>{let a=`${i?.headers?.host}${i?.url}`,h=`${o?.href}`;r.error("[HPM] Error occurred while proxying request %s to %s [%s] (%s)",a,h,s.code||s,"https://nodejs.org/api/errors.html#errors_common_system_errors");}),t.on("proxyRes",(s,i,n)=>{let o=i.originalUrl??`${i.baseUrl||""}${i.url}`,u;try{let l=(0,Z_.getPort)(s.req?.agent?.sockets),c={protocol:s.req.protocol,host:s.req.host,pathname:s.req.path};u=new sm.URL(`${c.protocol}//${c.host}${c.pathname}`),l&&(u.port=l);}catch{u=new sm.URL(e.target),u.pathname=s.req.path;}let a=u.toString(),h=`[HPM] ${i.method} ${o} -> ${a} [${s.statusCode}]`;r.info(h);}),t.on("open",s=>{r.info("[HPM] Client connected: %o",s.address());}),t.on("close",(s,i,n)=>{r.info("[HPM] Client disconnected: %o",i.address());});};Js.loggerPlugin=Q_;});var zs=D(Su=>{Object.defineProperty(Su,"__esModule",{value:true});Su.getFunctionName=ew;function ew(t){return t.name||"[anonymous Function]"}});var nm=D(Xs=>{Object.defineProperty(Xs,"__esModule",{value:true});Xs.proxyEventsPlugin=void 0;var tw=at(),rw=zs(),sw=tw.Debug.extend("proxy-events-plugin"),iw=(t,e)=>{Object.entries(e.on||{}).forEach(([r,s])=>{sw(`register event handler: "${r}" -> "${(0, rw.getFunctionName)(s)}"`),t.on(r,s);});};Xs.proxyEventsPlugin=iw;});var Tu=D(We=>{var nw=We&&We.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:true,get:function(){return e[r]}}),Object.defineProperty(t,s,i);}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r];}),Zs=We&&We.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&nw(e,t,r);};Object.defineProperty(We,"__esModule",{value:true});Zs(Qp(),We);Zs(tm(),We);Zs(im(),We);Zs(nm(),We);});var om=D(Pu=>{Object.defineProperty(Pu,"__esModule",{value:true});Pu.getPlugins=ow;var Qs=Tu();function ow(t){let e=t.on?.error?[]:[Qs.errorResponsePlugin],r=t.ejectPlugins?[]:[Qs.debugProxyErrorsPlugin,Qs.proxyEventsPlugin,Qs.loggerPlugin,...e],s=t.plugins??[];return [...r,...s]}});var am=D((jR,um)=>{um.exports=function(e){if(typeof e!="string"||e==="")return false;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return true;e=e.slice(r.index+r[0].length);}return false};});var hm=D((GR,cm)=>{var uw=am(),lm={"{":"}","(":")","[":"]"},aw=function(t){if(t[0]==="!")return true;for(var e=0,r=-2,s=-2,i=-2,n=-2,o=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||s!==-1&&t[e]==="["&&t[e+1]!=="]"&&(s<e&&(s=t.indexOf("]",e)),s>e&&(o===-1||o>s||(o=t.indexOf("\\",e),o===-1||o>s)))||i!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(i=t.indexOf("}",e),i>e&&(o=t.indexOf("\\",e),o===-1||o>i))||n!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(n=t.indexOf(")",e),n>e&&(o=t.indexOf("\\",e),o===-1||o>n))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(r<e&&(r=t.indexOf("|",e)),r!==-1&&t[r+1]!==")"&&(n=t.indexOf(")",r),n>r&&(o=t.indexOf("\\",r),o===-1||o>n))))return true;if(t[e]==="\\"){var u=t[e+1];e+=2;var a=lm[u];if(a){var h=t.indexOf(a,e);h!==-1&&(e=h+1);}if(t[e]==="!")return true}else e++;}return false},lw=function(t){if(t[0]==="!")return true;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return true;if(t[e]==="\\"){var r=t[e+1];e+=2;var s=lm[r];if(s){var i=t.indexOf(s,e);i!==-1&&(e=i+1);}if(t[e]==="!")return true}else e++;}return false};cm.exports=function(e,r){if(typeof e!="string"||e==="")return false;if(uw(e))return true;var s=aw;return r&&r.strict===false&&(s=lw),s(e)};});var ei=D(Fe=>{Fe.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):false;Fe.find=(t,e)=>t.nodes.find(r=>r.type===e);Fe.exceedsLimit=(t,e,r=1,s)=>s===false||!Fe.isInteger(t)||!Fe.isInteger(e)?false:(Number(e)-Number(t))/Number(r)>=s;Fe.escapeNode=(t,e=0,r)=>{let s=t.nodes[e];s&&(r&&s.type===r||s.type==="open"||s.type==="close")&&s.escaped!==true&&(s.value="\\"+s.value,s.escaped=true);};Fe.encloseBrace=t=>t.type!=="brace"||t.commas>>0+t.ranges>>0?false:(t.invalid=true,true);Fe.isInvalidBrace=t=>t.type!=="brace"?false:t.invalid===true||t.dollar?true:!(t.commas>>0+t.ranges>>0)||t.open!==true||t.close!==true?(t.invalid=true,true):false;Fe.isOpenOrClose=t=>t.type==="open"||t.type==="close"?true:t.open===true||t.close===true;Fe.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);Fe.flatten=(...t)=>{let e=[],r=s=>{for(let i=0;i<s.length;i++){let n=s[i];if(Array.isArray(n)){r(n);continue}n!==void 0&&e.push(n);}return e};return r(t),e};});var ti=D((UR,fm)=>{var dm=ei();fm.exports=(t,e={})=>{let r=(s,i={})=>{let n=e.escapeInvalid&&dm.isInvalidBrace(i),o=s.invalid===true&&e.escapeInvalid===true,u="";if(s.value)return (n||o)&&dm.isOpenOrClose(s)?"\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(let a of s.nodes)u+=r(a);return u};return r(t)};});var mm=D((WR,pm)=>{pm.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):false};});var wm=D((KR,_m)=>{var gm=mm(),It=(t,e,r)=>{if(gm(t)===false)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(gm(e)===false)throw new TypeError("toRegexRange: expected the second argument to be a number.");let s={relaxZeros:true,...r};typeof s.strictZeros=="boolean"&&(s.relaxZeros=s.strictZeros===false);let i=String(s.relaxZeros),n=String(s.shorthand),o=String(s.capture),u=String(s.wrap),a=t+":"+e+"="+i+n+o+u;if(It.cache.hasOwnProperty(a))return It.cache[a].result;let h=Math.min(t,e),l=Math.max(t,e);if(Math.abs(h-l)===1){let m=t+"|"+e;return s.capture?`(${m})`:s.wrap===false?m:`(?:${m})`}let c=xm(t)||xm(e),d={min:t,max:e,a:h,b:l},f=[],p=[];if(c&&(d.isPadded=c,d.maxLen=String(d.max).length),h<0){let m=l<0?Math.abs(l):1;p=Dm(m,Math.abs(h),d,s),h=d.a=0;}return l>=0&&(f=Dm(h,l,d,s)),d.negatives=p,d.positives=f,d.result=cw(p,f),s.capture===true?d.result=`(${d.result})`:s.wrap!==false&&f.length+p.length>1&&(d.result=`(?:${d.result})`),It.cache[a]=d,d.result};function cw(t,e,r){let s=$u(t,e,"-",false)||[],i=$u(e,t,"",false)||[],n=$u(t,e,"-?",true)||[];return s.concat(n).concat(i).join("|")}function hw(t,e){let r=1,s=1,i=ym(t,r),n=new Set([e]);for(;t<=i&&i<=e;)n.add(i),r+=1,i=ym(t,r);for(i=vm(e+1,s)-1;t<i&&i<=e;)n.add(i),s+=1,i=vm(e+1,s)-1;return n=[...n],n.sort(pw),n}function dw(t,e,r){if(t===e)return {pattern:t,count:[],digits:0};let s=fw(t,e),i=s.length,n="",o=0;for(let u=0;u<i;u++){let[a,h]=s[u];a===h?n+=a:a!=="0"||h!=="9"?n+=mw(a,h):o++;}return o&&(n+=r.shorthand===true?"\\d":"[0-9]"),{pattern:n,count:[o],digits:i}}function Dm(t,e,r,s){let i=hw(t,e),n=[],o=t,u;for(let a=0;a<i.length;a++){let h=i[a],l=dw(String(o),String(h),s),c="";if(!r.isPadded&&u&&u.pattern===l.pattern){u.count.length>1&&u.count.pop(),u.count.push(l.count[0]),u.string=u.pattern+Cm(u.count),o=h+1;continue}r.isPadded&&(c=gw(h,r,s)),l.string=c+l.pattern+Cm(l.count),n.push(l),o=h+1,u=l;}return n}function $u(t,e,r,s,i){let n=[];for(let o of t){let{string:u}=o;!s&&!bm(e,"string",u)&&n.push(r+u),s&&bm(e,"string",u)&&n.push(r+u);}return n}function fw(t,e){let r=[];for(let s=0;s<t.length;s++)r.push([t[s],e[s]]);return r}function pw(t,e){return t>e?1:e>t?-1:0}function bm(t,e,r){return t.some(s=>s[e]===r)}function ym(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function vm(t,e){return t-t%Math.pow(10,e)}function Cm(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function mw(t,e,r){return `[${t}${e-t===1?"":"-"}${e}]`}function xm(t){return /^-?(0+)\d/.test(t)}function gw(t,e,r){if(!e.isPadded)return t;let s=Math.abs(e.maxLen-String(t).length),i=r.relaxZeros!==false;switch(s){case 0:return "";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:return i?`0{0,${s}}`:`0{${s}}`}}It.cache={};It.clearCache=()=>It.cache={};_m.exports=It;});var Mu=D((YR,Tm)=>{var Dw=$("util"),Em=wm(),Fm=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),bw=t=>e=>t===true?Number(e):String(e),ku=t=>typeof t=="number"||typeof t=="string"&&t!=="",kr=t=>Number.isInteger(+t),Iu=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return false;for(;e[++r]==="0";);return r>0},yw=(t,e,r)=>typeof t=="string"||typeof e=="string"?true:r.stringify===true,vw=(t,e,r)=>{if(e>0){let s=t[0]==="-"?"-":"";s&&(t=t.slice(1)),t=s+t.padStart(s?e-1:e,"0");}return r===false?String(t):t},si=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},Cw=(t,e,r)=>{t.negatives.sort((u,a)=>u<a?-1:u>a?1:0),t.positives.sort((u,a)=>u<a?-1:u>a?1:0);let s=e.capture?"":"?:",i="",n="",o;return t.positives.length&&(i=t.positives.map(u=>si(String(u),r)).join("|")),t.negatives.length&&(n=`-(${s}${t.negatives.map(u=>si(String(u),r)).join("|")})`),i&&n?o=`${i}|${n}`:o=i||n,e.wrap?`(${s}${o})`:o},Am=(t,e,r,s)=>{if(r)return Em(t,e,{wrap:false,...s});let i=String.fromCharCode(t);if(t===e)return i;let n=String.fromCharCode(e);return `[${i}-${n}]`},Om=(t,e,r)=>{if(Array.isArray(t)){let s=r.wrap===true,i=r.capture?"":"?:";return s?`(${i}${t.join("|")})`:t.join("|")}return Em(t,e,r)},Rm=(...t)=>new RangeError("Invalid range arguments: "+Dw.inspect(...t)),Sm=(t,e,r)=>{if(r.strictRanges===true)throw Rm([t,e]);return []},xw=(t,e)=>{if(e.strictRanges===true)throw new TypeError(`Expected step "${t}" to be a number`);return []},_w=(t,e,r=1,s={})=>{let i=Number(t),n=Number(e);if(!Number.isInteger(i)||!Number.isInteger(n)){if(s.strictRanges===true)throw Rm([t,e]);return []}i===0&&(i=0),n===0&&(n=0);let o=i>n,u=String(t),a=String(e),h=String(r);r=Math.max(Math.abs(r),1);let l=Iu(u)||Iu(a)||Iu(h),c=l?Math.max(u.length,a.length,h.length):0,d=l===false&&yw(t,e,s)===false,f=s.transform||bw(d);if(s.toRegex&&r===1)return Am(si(t,c),si(e,c),true,s);let p={negatives:[],positives:[]},m=v=>p[v<0?"negatives":"positives"].push(Math.abs(v)),g=[],y=0;for(;o?i>=n:i<=n;)s.toRegex===true&&r>1?m(i):g.push(vw(f(i,y),c,d)),i=o?i-r:i+r,y++;return s.toRegex===true?r>1?Cw(p,s,c):Om(g,null,{wrap:false,...s}):g},ww=(t,e,r=1,s={})=>{if(!kr(t)&&t.length>1||!kr(e)&&e.length>1)return Sm(t,e,s);let i=s.transform||(d=>String.fromCharCode(d)),n=`${t}`.charCodeAt(0),o=`${e}`.charCodeAt(0),u=n>o,a=Math.min(n,o),h=Math.max(n,o);if(s.toRegex&&r===1)return Am(a,h,false,s);let l=[],c=0;for(;u?n>=o:n<=o;)l.push(i(n,c)),n=u?n-r:n+r,c++;return s.toRegex===true?Om(l,null,{wrap:false,options:s}):l},ri=(t,e,r,s={})=>{if(e==null&&ku(t))return [t];if(!ku(t)||!ku(e))return Sm(t,e,s);if(typeof r=="function")return ri(t,e,1,{transform:r});if(Fm(r))return ri(t,e,0,r);let i={...s};return i.capture===true&&(i.wrap=true),r=r||i.step||1,kr(r)?kr(t)&&kr(e)?_w(t,e,r,i):ww(t,e,Math.max(Math.abs(r),1),i):r!=null&&!Fm(r)?xw(r,i):ri(t,e,1,r)};Tm.exports=ri;});var km=D((JR,$m)=>{var Fw=Mu(),Pm=ei(),Ew=(t,e={})=>{let r=(s,i={})=>{let n=Pm.isInvalidBrace(i),o=s.invalid===true&&e.escapeInvalid===true,u=n===true||o===true,a=e.escapeInvalid===true?"\\":"",h="";if(s.isOpen===true)return a+s.value;if(s.isClose===true)return console.log("node.isClose",a,s.value),a+s.value;if(s.type==="open")return u?a+s.value:"(";if(s.type==="close")return u?a+s.value:")";if(s.type==="comma")return s.prev.type==="comma"?"":u?s.value:"|";if(s.value)return s.value;if(s.nodes&&s.ranges>0){let l=Pm.reduce(s.nodes),c=Fw(...l,{...e,wrap:false,toRegex:true,strictZeros:true});if(c.length!==0)return l.length>1&&c.length>1?`(${c})`:c}if(s.nodes)for(let l of s.nodes)h+=r(l,s);return h};return r(t)};$m.exports=Ew;});var Bm=D((zR,Mm)=>{var Aw=Mu(),Im=ti(),rr=ei(),Mt=(t="",e="",r=false)=>{let s=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?rr.flatten(e).map(i=>`{${i}}`):e;for(let i of t)if(Array.isArray(i))for(let n of i)s.push(Mt(n,e,r));else for(let n of e)r===true&&typeof n=="string"&&(n=`{${n}}`),s.push(Array.isArray(n)?Mt(i,n,r):i+n);return rr.flatten(s)},Ow=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,s=(i,n={})=>{i.queue=[];let o=n,u=n.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,u=o.queue;if(i.invalid||i.dollar){u.push(Mt(u.pop(),Im(i,e)));return}if(i.type==="brace"&&i.invalid!==true&&i.nodes.length===2){u.push(Mt(u.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let c=rr.reduce(i.nodes);if(rr.exceedsLimit(...c,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let d=Aw(...c,e);d.length===0&&(d=Im(i,e)),u.push(Mt(u.pop(),d)),i.nodes=[];return}let a=rr.encloseBrace(i),h=i.queue,l=i;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,h=l.queue;for(let c=0;c<i.nodes.length;c++){let d=i.nodes[c];if(d.type==="comma"&&i.type==="brace"){c===1&&h.push(""),h.push("");continue}if(d.type==="close"){u.push(Mt(u.pop(),h,a));continue}if(d.value&&d.type!=="open"){h.push(Mt(h.pop(),d.value));continue}d.nodes&&s(d,i);}return h};return rr.flatten(s(t))};Mm.exports=Ow;});var Nm=D((XR,Hm)=>{Hm.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
137
+ `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"};});var Vm=D((ZR,Gm)=>{var Rw=ti(),{MAX_LENGTH:qm,CHAR_BACKSLASH:Bu,CHAR_BACKTICK:Sw,CHAR_COMMA:Tw,CHAR_DOT:Pw,CHAR_LEFT_PARENTHESES:$w,CHAR_RIGHT_PARENTHESES:kw,CHAR_LEFT_CURLY_BRACE:Iw,CHAR_RIGHT_CURLY_BRACE:Mw,CHAR_LEFT_SQUARE_BRACKET:Lm,CHAR_RIGHT_SQUARE_BRACKET:jm,CHAR_DOUBLE_QUOTE:Bw,CHAR_SINGLE_QUOTE:Hw,CHAR_NO_BREAK_SPACE:Nw,CHAR_ZERO_WIDTH_NOBREAK_SPACE:qw}=Nm(),Lw=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},s=typeof r.maxLength=="number"?Math.min(qm,r.maxLength):qm;if(t.length>s)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${s})`);let i={type:"root",input:t,nodes:[]},n=[i],o=i,u=i,a=0,h=t.length,l=0,c=0,d,f=()=>t[l++],p=m=>{if(m.type==="text"&&u.type==="dot"&&(u.type="text"),u&&u.type==="text"&&m.type==="text"){u.value+=m.value;return}return o.nodes.push(m),m.parent=o,m.prev=u,u=m,m};for(p({type:"bos"});l<h;)if(o=n[n.length-1],d=f(),!(d===qw||d===Nw)){if(d===Bu){p({type:"text",value:(e.keepEscaping?d:"")+f()});continue}if(d===jm){p({type:"text",value:"\\"+d});continue}if(d===Lm){a++;let m;for(;l<h&&(m=f());){if(d+=m,m===Lm){a++;continue}if(m===Bu){d+=f();continue}if(m===jm&&(a--,a===0))break}p({type:"text",value:d});continue}if(d===$w){o=p({type:"paren",nodes:[]}),n.push(o),p({type:"text",value:d});continue}if(d===kw){if(o.type!=="paren"){p({type:"text",value:d});continue}o=n.pop(),p({type:"text",value:d}),o=n[n.length-1];continue}if(d===Bw||d===Hw||d===Sw){let m=d,g;for(e.keepQuotes!==true&&(d="");l<h&&(g=f());){if(g===Bu){d+=g+f();continue}if(g===m){e.keepQuotes===true&&(d+=g);break}d+=g;}p({type:"text",value:d});continue}if(d===Iw){c++;let g={type:"brace",open:true,close:false,dollar:u.value&&u.value.slice(-1)==="$"||o.dollar===true,depth:c,commas:0,ranges:0,nodes:[]};o=p(g),n.push(o),p({type:"open",value:d});continue}if(d===Mw){if(o.type!=="brace"){p({type:"text",value:d});continue}let m="close";o=n.pop(),o.close=true,p({type:m,value:d}),c--,o=n[n.length-1];continue}if(d===Tw&&c>0){if(o.ranges>0){o.ranges=0;let m=o.nodes.shift();o.nodes=[m,{type:"text",value:Rw(o)}];}p({type:"comma",value:d}),o.commas++;continue}if(d===Pw&&c>0&&o.commas===0){let m=o.nodes;if(c===0||m.length===0){p({type:"text",value:d});continue}if(u.type==="dot"){if(o.range=[],u.value+=d,u.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=true,o.ranges=0,u.type="text";continue}o.ranges++,o.args=[];continue}if(u.type==="range"){m.pop();let g=m[m.length-1];g.value+=u.value+d,u=g,o.ranges--;continue}p({type:"dot",value:d});continue}p({type:"text",value:d});}do if(o=n.pop(),o.type!=="root"){o.nodes.forEach(y=>{y.nodes||(y.type==="open"&&(y.isOpen=true),y.type==="close"&&(y.isClose=true),y.nodes||(y.type="text"),y.invalid=true);});let m=n[n.length-1],g=m.nodes.indexOf(o);m.nodes.splice(g,1,...o.nodes);}while(n.length>0);return p({type:"eos"}),i};Gm.exports=Lw;});var Km=D((QR,Wm)=>{var Um=ti(),jw=km(),Gw=Bm(),Vw=Vm(),ve=(t,e={})=>{let r=[];if(Array.isArray(t))for(let s of t){let i=ve.create(s,e);Array.isArray(i)?r.push(...i):r.push(i);}else r=[].concat(ve.create(t,e));return e&&e.expand===true&&e.nodupes===true&&(r=[...new Set(r)]),r};ve.parse=(t,e={})=>Vw(t,e);ve.stringify=(t,e={})=>Um(typeof t=="string"?ve.parse(t,e):t,e);ve.compile=(t,e={})=>(typeof t=="string"&&(t=ve.parse(t,e)),jw(t,e));ve.expand=(t,e={})=>{typeof t=="string"&&(t=ve.parse(t,e));let r=Gw(t,e);return e.noempty===true&&(r=r.filter(Boolean)),e.nodupes===true&&(r=[...new Set(r)]),r};ve.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==true?ve.compile(t,e):ve.expand(t,e);Wm.exports=ve;});var Ir=D((eS,Zm)=>{var Uw=$("path"),Ke="\\\\/",Ym=`[^${Ke}]`,lt="\\.",Ww="\\+",Kw="\\?",ii="\\/",Yw="(?=.)",Jm="[^/]",Hu=`(?:${ii}|$)`,zm=`(?:^|${ii})`,Nu=`${lt}{1,2}${Hu}`,Jw=`(?!${lt})`,zw=`(?!${zm}${Nu})`,Xw=`(?!${lt}{0,1}${Hu})`,Zw=`(?!${Nu})`,Qw=`[^.${ii}]`,eF=`${Jm}*?`,Xm={DOT_LITERAL:lt,PLUS_LITERAL:Ww,QMARK_LITERAL:Kw,SLASH_LITERAL:ii,ONE_CHAR:Yw,QMARK:Jm,END_ANCHOR:Hu,DOTS_SLASH:Nu,NO_DOT:Jw,NO_DOTS:zw,NO_DOT_SLASH:Xw,NO_DOTS_SLASH:Zw,QMARK_NO_DOT:Qw,STAR:eF,START_ANCHOR:zm},tF={...Xm,SLASH_LITERAL:`[${Ke}]`,QMARK:Ym,STAR:`${Ym}*?`,DOTS_SLASH:`${lt}{1,2}(?:[${Ke}]|$)`,NO_DOT:`(?!${lt})`,NO_DOTS:`(?!(?:^|[${Ke}])${lt}{1,2}(?:[${Ke}]|$))`,NO_DOT_SLASH:`(?!${lt}{0,1}(?:[${Ke}]|$))`,NO_DOTS_SLASH:`(?!${lt}{1,2}(?:[${Ke}]|$))`,QMARK_NO_DOT:`[^.${Ke}]`,START_ANCHOR:`(?:^|[${Ke}])`,END_ANCHOR:`(?:[${Ke}]|$)`},rF={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Zm.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:rF,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:Uw.sep,extglobChars(t){return {"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===true?tF:Xm}};});var Mr=D(ge=>{var sF=$("path"),iF=process.platform==="win32",{REGEX_BACKSLASH:nF,REGEX_REMOVE_BACKSLASH:oF,REGEX_SPECIAL_CHARS:uF,REGEX_SPECIAL_CHARS_GLOBAL:aF}=Ir();ge.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);ge.hasRegexChars=t=>uF.test(t);ge.isRegexChar=t=>t.length===1&&ge.hasRegexChars(t);ge.escapeRegex=t=>t.replace(aF,"\\$1");ge.toPosixSlashes=t=>t.replace(nF,"/");ge.removeBackslashes=t=>t.replace(oF,e=>e==="\\"?"":e);ge.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};ge.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:iF===true||sF.sep==="\\";ge.escapeLast=(t,e,r)=>{let s=t.lastIndexOf(e,r);return s===-1?t:t[s-1]==="\\"?ge.escapeLast(t,e,s-1):`${t.slice(0,s)}\\${t.slice(s)}`};ge.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};ge.wrapOutput=(t,e={},r={})=>{let s=r.contains?"":"^",i=r.contains?"":"$",n=`${s}(?:${t})${i}`;return e.negated===true&&(n=`(?:^(?!${n}).*$)`),n};});var og=D((rS,ng)=>{var Qm=Mr(),{CHAR_ASTERISK:qu,CHAR_AT:lF,CHAR_BACKWARD_SLASH:Br,CHAR_COMMA:cF,CHAR_DOT:Lu,CHAR_EXCLAMATION_MARK:ju,CHAR_FORWARD_SLASH:ig,CHAR_LEFT_CURLY_BRACE:Gu,CHAR_LEFT_PARENTHESES:Vu,CHAR_LEFT_SQUARE_BRACKET:hF,CHAR_PLUS:dF,CHAR_QUESTION_MARK:eg,CHAR_RIGHT_CURLY_BRACE:fF,CHAR_RIGHT_PARENTHESES:tg,CHAR_RIGHT_SQUARE_BRACKET:pF}=Ir(),rg=t=>t===ig||t===Br,sg=t=>{t.isPrefix!==true&&(t.depth=t.isGlobstar?1/0:1);},mF=(t,e)=>{let r=e||{},s=t.length-1,i=r.parts===true||r.scanToEnd===true,n=[],o=[],u=[],a=t,h=-1,l=0,c=0,d=false,f=false,p=false,m=false,g=false,y=false,v=false,_=false,F=false,E=false,S=0,P,O,T={value:"",depth:0,isGlob:false},te=()=>h>=s,w=()=>a.charCodeAt(h+1),K=()=>(P=O,a.charCodeAt(++h));for(;h<s;){O=K();let le;if(O===Br){v=T.backslashes=true,O=K(),O===Gu&&(y=true);continue}if(y===true||O===Gu){for(S++;te()!==true&&(O=K());){if(O===Br){v=T.backslashes=true,K();continue}if(O===Gu){S++;continue}if(y!==true&&O===Lu&&(O=K())===Lu){if(d=T.isBrace=true,p=T.isGlob=true,E=true,i===true)continue;break}if(y!==true&&O===cF){if(d=T.isBrace=true,p=T.isGlob=true,E=true,i===true)continue;break}if(O===fF&&(S--,S===0)){y=false,d=T.isBrace=true,E=true;break}}if(i===true)continue;break}if(O===ig){if(n.push(h),o.push(T),T={value:"",depth:0,isGlob:false},E===true)continue;if(P===Lu&&h===l+1){l+=2;continue}c=h+1;continue}if(r.noext!==true&&(O===dF||O===lF||O===qu||O===eg||O===ju)===true&&w()===Vu){if(p=T.isGlob=true,m=T.isExtglob=true,E=true,O===ju&&h===l&&(F=true),i===true){for(;te()!==true&&(O=K());){if(O===Br){v=T.backslashes=true,O=K();continue}if(O===tg){p=T.isGlob=true,E=true;break}}continue}break}if(O===qu){if(P===qu&&(g=T.isGlobstar=true),p=T.isGlob=true,E=true,i===true)continue;break}if(O===eg){if(p=T.isGlob=true,E=true,i===true)continue;break}if(O===hF){for(;te()!==true&&(le=K());){if(le===Br){v=T.backslashes=true,K();continue}if(le===pF){f=T.isBracket=true,p=T.isGlob=true,E=true;break}}if(i===true)continue;break}if(r.nonegate!==true&&O===ju&&h===l){_=T.negated=true,l++;continue}if(r.noparen!==true&&O===Vu){if(p=T.isGlob=true,i===true){for(;te()!==true&&(O=K());){if(O===Vu){v=T.backslashes=true,O=K();continue}if(O===tg){E=true;break}}continue}break}if(p===true){if(E=true,i===true)continue;break}}r.noext===true&&(m=false,p=false);let V=a,ct="",C="";l>0&&(ct=a.slice(0,l),a=a.slice(l),c-=l),V&&p===true&&c>0?(V=a.slice(0,c),C=a.slice(c)):p===true?(V="",C=a):V=a,V&&V!==""&&V!=="/"&&V!==a&&rg(V.charCodeAt(V.length-1))&&(V=V.slice(0,-1)),r.unescape===true&&(C&&(C=Qm.removeBackslashes(C)),V&&v===true&&(V=Qm.removeBackslashes(V)));let x={prefix:ct,input:t,start:l,base:V,glob:C,isBrace:d,isBracket:f,isGlob:p,isExtglob:m,isGlobstar:g,negated:_,negatedExtglob:F};if(r.tokens===true&&(x.maxDepth=0,rg(O)||o.push(T),x.tokens=o),r.parts===true||r.tokens===true){let le;for(let N=0;N<n.length;N++){let Ie=le?le+1:l,Me=n[N],De=t.slice(Ie,Me);r.tokens&&(N===0&&l!==0?(o[N].isPrefix=true,o[N].value=ct):o[N].value=De,sg(o[N]),x.maxDepth+=o[N].depth),(N!==0||De!=="")&&u.push(De),le=Me;}if(le&&le+1<t.length){let N=t.slice(le+1);u.push(N),r.tokens&&(o[o.length-1].value=N,sg(o[o.length-1]),x.maxDepth+=o[o.length-1].depth);}x.slashes=n,x.parts=u;}return x};ng.exports=mF;});var lg=D((sS,ag)=>{var ni=Ir(),Ce=Mr(),{MAX_LENGTH:oi,POSIX_REGEX_SOURCE:gF,REGEX_NON_SPECIAL_CHARS:DF,REGEX_SPECIAL_CHARS_BACKREF:bF,REPLACEMENTS:ug}=ni,yF=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r);}catch{return t.map(i=>Ce.escapeRegex(i)).join("..")}return r},sr=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,Uu=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=ug[t]||t;let r={...e},s=typeof r.maxLength=="number"?Math.min(oi,r.maxLength):oi,i=t.length;if(i>s)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);let n={type:"bos",value:"",output:r.prepend||""},o=[n],u=r.capture?"":"?:",a=Ce.isWindows(e),h=ni.globChars(a),l=ni.extglobChars(h),{DOT_LITERAL:c,PLUS_LITERAL:d,SLASH_LITERAL:f,ONE_CHAR:p,DOTS_SLASH:m,NO_DOT:g,NO_DOT_SLASH:y,NO_DOTS_SLASH:v,QMARK:_,QMARK_NO_DOT:F,STAR:E,START_ANCHOR:S}=h,P=R=>`(${u}(?:(?!${S}${R.dot?m:c}).)*?)`,O=r.dot?"":g,T=r.dot?_:F,te=r.bash===true?P(r):E;r.capture&&(te=`(${te})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let w={input:t,index:-1,start:0,dot:r.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:o};t=Ce.removePrefix(t,w),i=t.length;let K=[],V=[],ct=[],C=n,x,le=()=>w.index===i-1,N=w.peek=(R=1)=>t[w.index+R],Ie=w.advance=()=>t[++w.index]||"",Me=()=>t.slice(w.index+1),De=(R="",U=0)=>{w.consumed+=R,w.index+=U;},qr=R=>{w.output+=R.output!=null?R.output:R.value,De(R.value);},Jg=()=>{let R=1;for(;N()==="!"&&(N(2)!=="("||N(3)==="?");)Ie(),w.start++,R++;return R%2===0?false:(w.negated=true,w.start++,true)},Lr=R=>{w[R]++,ct.push(R);},vt=R=>{w[R]--,ct.pop();},M=R=>{if(C.type==="globstar"){let U=w.braces>0&&(R.type==="comma"||R.type==="brace"),A=R.extglob===true||K.length&&(R.type==="pipe"||R.type==="paren");R.type!=="slash"&&R.type!=="paren"&&!U&&!A&&(w.output=w.output.slice(0,-C.output.length),C.type="star",C.value="*",C.output=te,w.output+=C.output);}if(K.length&&R.type!=="paren"&&(K[K.length-1].inner+=R.value),(R.value||R.output)&&qr(R),C&&C.type==="text"&&R.type==="text"){C.value+=R.value,C.output=(C.output||"")+R.value;return}R.prev=C,o.push(R),C=R;},jr=(R,U)=>{let A={...l[U],conditions:1,inner:""};A.prev=C,A.parens=w.parens,A.output=w.output;let k=(r.capture?"(":"")+A.open;Lr("parens"),M({type:R,value:U,output:w.output?"":p}),M({type:"paren",extglob:true,value:Ie(),output:k}),K.push(A);},zg=R=>{let U=R.close+(r.capture?")":""),A;if(R.type==="negate"){let k=te;if(R.inner&&R.inner.length>1&&R.inner.includes("/")&&(k=P(r)),(k!==te||le()||/^\)+$/.test(Me()))&&(U=R.close=`)$))${k}`),R.inner.includes("*")&&(A=Me())&&/^\.[^\\/.]+$/.test(A)){let z=Uu(A,{...e,fastpaths:false}).output;U=R.close=`)${z})${k})`;}R.prev.type==="bos"&&(w.negatedExtglob=true);}M({type:"paren",extglob:true,value:x,output:U}),vt("parens");};if(r.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(t)){let R=false,U=t.replace(bF,(A,k,z,ce,ie,di)=>ce==="\\"?(R=true,A):ce==="?"?k?k+ce+(ie?_.repeat(ie.length):""):di===0?T+(ie?_.repeat(ie.length):""):_.repeat(z.length):ce==="."?c.repeat(z.length):ce==="*"?k?k+ce+(ie?te:""):te:k?A:`\\${A}`);return R===true&&(r.unescape===true?U=U.replace(/\\/g,""):U=U.replace(/\\+/g,A=>A.length%2===0?"\\\\":A?"\\":"")),U===t&&r.contains===true?(w.output=t,w):(w.output=Ce.wrapOutput(U,w,e),w)}for(;!le();){if(x=Ie(),x==="\0")continue;if(x==="\\"){let A=N();if(A==="/"&&r.bash!==true||A==="."||A===";")continue;if(!A){x+="\\",M({type:"text",value:x});continue}let k=/^\\+/.exec(Me()),z=0;if(k&&k[0].length>2&&(z=k[0].length,w.index+=z,z%2!==0&&(x+="\\")),r.unescape===true?x=Ie():x+=Ie(),w.brackets===0){M({type:"text",value:x});continue}}if(w.brackets>0&&(x!=="]"||C.value==="["||C.value==="[^")){if(r.posix!==false&&x===":"){let A=C.value.slice(1);if(A.includes("[")&&(C.posix=true,A.includes(":"))){let k=C.value.lastIndexOf("["),z=C.value.slice(0,k),ce=C.value.slice(k+2),ie=gF[ce];if(ie){C.value=z+ie,w.backtrack=true,Ie(),!n.output&&o.indexOf(C)===1&&(n.output=p);continue}}}(x==="["&&N()!==":"||x==="-"&&N()==="]")&&(x=`\\${x}`),x==="]"&&(C.value==="["||C.value==="[^")&&(x=`\\${x}`),r.posix===true&&x==="!"&&C.value==="["&&(x="^"),C.value+=x,qr({value:x});continue}if(w.quotes===1&&x!=='"'){x=Ce.escapeRegex(x),C.value+=x,qr({value:x});continue}if(x==='"'){w.quotes=w.quotes===1?0:1,r.keepQuotes===true&&M({type:"text",value:x});continue}if(x==="("){Lr("parens"),M({type:"paren",value:x});continue}if(x===")"){if(w.parens===0&&r.strictBrackets===true)throw new SyntaxError(sr("opening","("));let A=K[K.length-1];if(A&&w.parens===A.parens+1){zg(K.pop());continue}M({type:"paren",value:x,output:w.parens?")":"\\)"}),vt("parens");continue}if(x==="["){if(r.nobracket===true||!Me().includes("]")){if(r.nobracket!==true&&r.strictBrackets===true)throw new SyntaxError(sr("closing","]"));x=`\\${x}`;}else Lr("brackets");M({type:"bracket",value:x});continue}if(x==="]"){if(r.nobracket===true||C&&C.type==="bracket"&&C.value.length===1){M({type:"text",value:x,output:`\\${x}`});continue}if(w.brackets===0){if(r.strictBrackets===true)throw new SyntaxError(sr("opening","["));M({type:"text",value:x,output:`\\${x}`});continue}vt("brackets");let A=C.value.slice(1);if(C.posix!==true&&A[0]==="^"&&!A.includes("/")&&(x=`/${x}`),C.value+=x,qr({value:x}),r.literalBrackets===false||Ce.hasRegexChars(A))continue;let k=Ce.escapeRegex(C.value);if(w.output=w.output.slice(0,-C.value.length),r.literalBrackets===true){w.output+=k,C.value=k;continue}C.value=`(${u}${k}|${C.value})`,w.output+=C.value;continue}if(x==="{"&&r.nobrace!==true){Lr("braces");let A={type:"brace",value:x,output:"(",outputIndex:w.output.length,tokensIndex:w.tokens.length};V.push(A),M(A);continue}if(x==="}"){let A=V[V.length-1];if(r.nobrace===true||!A){M({type:"text",value:x,output:x});continue}let k=")";if(A.dots===true){let z=o.slice(),ce=[];for(let ie=z.length-1;ie>=0&&(o.pop(),z[ie].type!=="brace");ie--)z[ie].type!=="dots"&&ce.unshift(z[ie].value);k=yF(ce,r),w.backtrack=true;}if(A.comma!==true&&A.dots!==true){let z=w.output.slice(0,A.outputIndex),ce=w.tokens.slice(A.tokensIndex);A.value=A.output="\\{",x=k="\\}",w.output=z;for(let ie of ce)w.output+=ie.output||ie.value;}M({type:"brace",value:x,output:k}),vt("braces"),V.pop();continue}if(x==="|"){K.length>0&&K[K.length-1].conditions++,M({type:"text",value:x});continue}if(x===","){let A=x,k=V[V.length-1];k&&ct[ct.length-1]==="braces"&&(k.comma=true,A="|"),M({type:"comma",value:x,output:A});continue}if(x==="/"){if(C.type==="dot"&&w.index===w.start+1){w.start=w.index+1,w.consumed="",w.output="",o.pop(),C=n;continue}M({type:"slash",value:x,output:f});continue}if(x==="."){if(w.braces>0&&C.type==="dot"){C.value==="."&&(C.output=c);let A=V[V.length-1];C.type="dots",C.output+=x,C.value+=x,A.dots=true;continue}if(w.braces+w.parens===0&&C.type!=="bos"&&C.type!=="slash"){M({type:"text",value:x,output:c});continue}M({type:"dot",value:x,output:c});continue}if(x==="?"){if(!(C&&C.value==="(")&&r.noextglob!==true&&N()==="("&&N(2)!=="?"){jr("qmark",x);continue}if(C&&C.type==="paren"){let k=N(),z=x;if(k==="<"&&!Ce.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(C.value==="("&&!/[!=<:]/.test(k)||k==="<"&&!/<([!=]|\w+>)/.test(Me()))&&(z=`\\${x}`),M({type:"text",value:x,output:z});continue}if(r.dot!==true&&(C.type==="slash"||C.type==="bos")){M({type:"qmark",value:x,output:F});continue}M({type:"qmark",value:x,output:_});continue}if(x==="!"){if(r.noextglob!==true&&N()==="("&&(N(2)!=="?"||!/[!=<:]/.test(N(3)))){jr("negate",x);continue}if(r.nonegate!==true&&w.index===0){Jg();continue}}if(x==="+"){if(r.noextglob!==true&&N()==="("&&N(2)!=="?"){jr("plus",x);continue}if(C&&C.value==="("||r.regex===false){M({type:"plus",value:x,output:d});continue}if(C&&(C.type==="bracket"||C.type==="paren"||C.type==="brace")||w.parens>0){M({type:"plus",value:x});continue}M({type:"plus",value:d});continue}if(x==="@"){if(r.noextglob!==true&&N()==="("&&N(2)!=="?"){M({type:"at",extglob:true,value:x,output:""});continue}M({type:"text",value:x});continue}if(x!=="*"){(x==="$"||x==="^")&&(x=`\\${x}`);let A=DF.exec(Me());A&&(x+=A[0],w.index+=A[0].length),M({type:"text",value:x});continue}if(C&&(C.type==="globstar"||C.star===true)){C.type="star",C.star=true,C.value+=x,C.output=te,w.backtrack=true,w.globstar=true,De(x);continue}let R=Me();if(r.noextglob!==true&&/^\([^?]/.test(R)){jr("star",x);continue}if(C.type==="star"){if(r.noglobstar===true){De(x);continue}let A=C.prev,k=A.prev,z=A.type==="slash"||A.type==="bos",ce=k&&(k.type==="star"||k.type==="globstar");if(r.bash===true&&(!z||R[0]&&R[0]!=="/")){M({type:"star",value:x,output:""});continue}let ie=w.braces>0&&(A.type==="comma"||A.type==="brace"),di=K.length&&(A.type==="pipe"||A.type==="paren");if(!z&&A.type!=="paren"&&!ie&&!di){M({type:"star",value:x,output:""});continue}for(;R.slice(0,3)==="/**";){let Gr=t[w.index+4];if(Gr&&Gr!=="/")break;R=R.slice(3),De("/**",3);}if(A.type==="bos"&&le()){C.type="globstar",C.value+=x,C.output=P(r),w.output=C.output,w.globstar=true,De(x);continue}if(A.type==="slash"&&A.prev.type!=="bos"&&!ce&&le()){w.output=w.output.slice(0,-(A.output+C.output).length),A.output=`(?:${A.output}`,C.type="globstar",C.output=P(r)+(r.strictSlashes?")":"|$)"),C.value+=x,w.globstar=true,w.output+=A.output+C.output,De(x);continue}if(A.type==="slash"&&A.prev.type!=="bos"&&R[0]==="/"){let Gr=R[1]!==void 0?"|$":"";w.output=w.output.slice(0,-(A.output+C.output).length),A.output=`(?:${A.output}`,C.type="globstar",C.output=`${P(r)}${f}|${f}${Gr})`,C.value+=x,w.output+=A.output+C.output,w.globstar=true,De(x+Ie()),M({type:"slash",value:"/",output:""});continue}if(A.type==="bos"&&R[0]==="/"){C.type="globstar",C.value+=x,C.output=`(?:^|${f}|${P(r)}${f})`,w.output=C.output,w.globstar=true,De(x+Ie()),M({type:"slash",value:"/",output:""});continue}w.output=w.output.slice(0,-C.output.length),C.type="globstar",C.output=P(r),C.value+=x,w.output+=C.output,w.globstar=true,De(x);continue}let U={type:"star",value:x,output:te};if(r.bash===true){U.output=".*?",(C.type==="bos"||C.type==="slash")&&(U.output=O+U.output),M(U);continue}if(C&&(C.type==="bracket"||C.type==="paren")&&r.regex===true){U.output=x,M(U);continue}(w.index===w.start||C.type==="slash"||C.type==="dot")&&(C.type==="dot"?(w.output+=y,C.output+=y):r.dot===true?(w.output+=v,C.output+=v):(w.output+=O,C.output+=O),N()!=="*"&&(w.output+=p,C.output+=p)),M(U);}for(;w.brackets>0;){if(r.strictBrackets===true)throw new SyntaxError(sr("closing","]"));w.output=Ce.escapeLast(w.output,"["),vt("brackets");}for(;w.parens>0;){if(r.strictBrackets===true)throw new SyntaxError(sr("closing",")"));w.output=Ce.escapeLast(w.output,"("),vt("parens");}for(;w.braces>0;){if(r.strictBrackets===true)throw new SyntaxError(sr("closing","}"));w.output=Ce.escapeLast(w.output,"{"),vt("braces");}if(r.strictSlashes!==true&&(C.type==="star"||C.type==="bracket")&&M({type:"maybe_slash",value:"",output:`${f}?`}),w.backtrack===true){w.output="";for(let R of w.tokens)w.output+=R.output!=null?R.output:R.value,R.suffix&&(w.output+=R.suffix);}return w};Uu.fastpaths=(t,e)=>{let r={...e},s=typeof r.maxLength=="number"?Math.min(oi,r.maxLength):oi,i=t.length;if(i>s)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);t=ug[t]||t;let n=Ce.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:u,ONE_CHAR:a,DOTS_SLASH:h,NO_DOT:l,NO_DOTS:c,NO_DOTS_SLASH:d,STAR:f,START_ANCHOR:p}=ni.globChars(n),m=r.dot?c:l,g=r.dot?d:l,y=r.capture?"":"?:",v={negated:false,prefix:""},_=r.bash===true?".*?":f;r.capture&&(_=`(${_})`);let F=O=>O.noglobstar===true?_:`(${y}(?:(?!${p}${O.dot?h:o}).)*?)`,E=O=>{switch(O){case "*":return `${m}${a}${_}`;case ".*":return `${o}${a}${_}`;case "*.*":return `${m}${_}${o}${a}${_}`;case "*/*":return `${m}${_}${u}${a}${g}${_}`;case "**":return m+F(r);case "**/*":return `(?:${m}${F(r)}${u})?${g}${a}${_}`;case "**/*.*":return `(?:${m}${F(r)}${u})?${g}${_}${o}${a}${_}`;case "**/.*":return `(?:${m}${F(r)}${u})?${o}${a}${_}`;default:{let T=/^(.*?)\.(\w+)$/.exec(O);if(!T)return;let te=E(T[1]);return te?te+o+T[2]:void 0}}},S=Ce.removePrefix(t,v),P=E(S);return P&&r.strictSlashes!==true&&(P+=`${u}?`),P};ag.exports=Uu;});var hg=D((iS,cg)=>{var vF=$("path"),CF=og(),Wu=lg(),Ku=Mr(),xF=Ir(),_F=t=>t&&typeof t=="object"&&!Array.isArray(t),re=(t,e,r=false)=>{if(Array.isArray(t)){let l=t.map(d=>re(d,e,r));return d=>{for(let f of l){let p=f(d);if(p)return p}return false}}let s=_F(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!s)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},n=Ku.isWindows(e),o=s?re.compileRe(t,e):re.makeRe(t,e,false,true),u=o.state;delete o.state;let a=()=>false;if(i.ignore){let l={...e,ignore:null,onMatch:null,onResult:null};a=re(i.ignore,l,r);}let h=(l,c=false)=>{let{isMatch:d,match:f,output:p}=re.test(l,o,e,{glob:t,posix:n}),m={glob:t,state:u,regex:o,posix:n,input:l,output:p,match:f,isMatch:d};return typeof i.onResult=="function"&&i.onResult(m),d===false?(m.isMatch=false,c?m:false):a(l)?(typeof i.onIgnore=="function"&&i.onIgnore(m),m.isMatch=false,c?m:false):(typeof i.onMatch=="function"&&i.onMatch(m),c?m:true)};return r&&(h.state=u),h};re.test=(t,e,r,{glob:s,posix:i}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return {isMatch:false,output:""};let n=r||{},o=n.format||(i?Ku.toPosixSlashes:null),u=t===s,a=u&&o?o(t):t;return u===false&&(a=o?o(t):t,u=a===s),(u===false||n.capture===true)&&(n.matchBase===true||n.basename===true?u=re.matchBase(t,e,r,i):u=e.exec(a)),{isMatch:!!u,match:u,output:a}};re.matchBase=(t,e,r,s=Ku.isWindows(r))=>(e instanceof RegExp?e:re.makeRe(e,r)).test(vF.basename(t));re.isMatch=(t,e,r)=>re(e,r)(t);re.parse=(t,e)=>Array.isArray(t)?t.map(r=>re.parse(r,e)):Wu(t,{...e,fastpaths:false});re.scan=(t,e)=>CF(t,e);re.compileRe=(t,e,r=false,s=false)=>{if(r===true)return t.output;let i=e||{},n=i.contains?"":"^",o=i.contains?"":"$",u=`${n}(?:${t.output})${o}`;t&&t.negated===true&&(u=`^(?!${u}).*$`);let a=re.toRegex(u,e);return s===true&&(a.state=t),a};re.makeRe=(t,e={},r=false,s=false)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let i={negated:false,fastpaths:true};return e.fastpaths!==false&&(t[0]==="."||t[0]==="*")&&(i.output=Wu.fastpaths(t,e)),i.output||(i=Wu(t,e)),re.compileRe(i,e,r,s)};re.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===true)throw r;return /$^/}};re.constants=xF;cg.exports=re;});var fg=D((nS,dg)=>{dg.exports=hg();});var yg=D((oS,bg)=>{var mg=$("util"),gg=Km(),Ye=fg(),Yu=Mr(),pg=t=>t===""||t==="./",Dg=t=>{let e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1},W=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let s=new Set,i=new Set,n=new Set,o=0,u=l=>{n.add(l.output),r&&r.onResult&&r.onResult(l);};for(let l=0;l<e.length;l++){let c=Ye(String(e[l]),{...r,onResult:u},true),d=c.state.negated||c.state.negatedExtglob;d&&o++;for(let f of t){let p=c(f,true);(d?!p.isMatch:p.isMatch)&&(d?s.add(p.output):(s.delete(p.output),i.add(p.output)));}}let h=(o===e.length?[...n]:[...i]).filter(l=>!s.has(l));if(r&&h.length===0){if(r.failglob===true)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===true||r.nullglob===true)return r.unescape?e.map(l=>l.replace(/\\/g,"")):e}return h};W.match=W;W.matcher=(t,e)=>Ye(t,e);W.isMatch=(t,e,r)=>Ye(e,r)(t);W.any=W.isMatch;W.not=(t,e,r={})=>{e=[].concat(e).map(String);let s=new Set,i=[],n=u=>{r.onResult&&r.onResult(u),i.push(u.output);},o=new Set(W(t,e,{...r,onResult:n}));for(let u of i)o.has(u)||s.add(u);return [...s]};W.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${mg.inspect(t)}"`);if(Array.isArray(e))return e.some(s=>W.contains(t,s,r));if(typeof e=="string"){if(pg(t)||pg(e))return false;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return true}return W.isMatch(t,e,{...r,contains:true})};W.matchKeys=(t,e,r)=>{if(!Yu.isObject(t))throw new TypeError("Expected the first argument to be an object");let s=W(Object.keys(t),e,r),i={};for(let n of s)i[n]=t[n];return i};W.some=(t,e,r)=>{let s=[].concat(t);for(let i of [].concat(e)){let n=Ye(String(i),r);if(s.some(o=>n(o)))return true}return false};W.every=(t,e,r)=>{let s=[].concat(t);for(let i of [].concat(e)){let n=Ye(String(i),r);if(!s.every(o=>n(o)))return false}return true};W.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${mg.inspect(t)}"`);return [].concat(e).every(s=>Ye(s,r)(t))};W.capture=(t,e,r)=>{let s=Yu.isWindows(r),n=Ye.makeRe(String(t),{...r,capture:true}).exec(s?Yu.toPosixSlashes(e):e);if(n)return n.slice(1).map(o=>o===void 0?"":o)};W.makeRe=(...t)=>Ye.makeRe(...t);W.scan=(...t)=>Ye.scan(...t);W.parse=(t,e)=>{let r=[];for(let s of [].concat(t||[]))for(let i of gg(String(s),e))r.push(Ye.parse(i,e));return r};W.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===true||!Dg(t)?[t]:gg(t,e)};W.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return W.braces(t,{...e,expand:true})};W.hasBraces=Dg;bg.exports=W;});var Eg=D(zu=>{Object.defineProperty(zu,"__esModule",{value:true});zu.matchPathFilter=EF;var _g=hm(),wF=yg(),FF=$("url"),vg=Vs();function EF(t="/",e,r){if(Cg(t))return wg(t,e);if(xg(t))return Fg(t,e);if(Array.isArray(t)){if(t.every(Cg))return OF(t,e);if(t.every(xg))return AF(t,e);throw new Error(vg.ERRORS.ERR_CONTEXT_MATCHER_INVALID_ARRAY)}if(typeof t=="function"){let s=Ju(e);return t(s,r)}throw new Error(vg.ERRORS.ERR_CONTEXT_MATCHER_GENERIC)}function wg(t,e){return Ju(e)?.indexOf(t)===0}function Fg(t,e){let r=Ju(e),s=wF([r],t);return s&&s.length>0}function AF(t,e){return Fg(t,e)}function OF(t,e){let r=false;for(let s of t)if(wg(s,e)){r=true;break}return r}function Ju(t){return t&&FF.parse(t).pathname}function Cg(t){return typeof t=="string"&&!_g(t)}function xg(t){return _g(t)}});var Zu=D(Xu=>{Object.defineProperty(Xu,"__esModule",{value:true});function Ag(t){return Object.prototype.toString.call(t)==="[object Object]"}function RF(t){var e,r;return Ag(t)===false?false:(e=t.constructor,e===void 0?true:(r=e.prototype,!(Ag(r)===false||r.hasOwnProperty("isPrototypeOf")===false)))}Xu.isPlainObject=RF;});var Sg=D(Qu=>{Object.defineProperty(Qu,"__esModule",{value:true});Qu.createPathRewriter=PF;var Og=Zu(),SF=Vs(),TF=at(),Rg=TF.Debug.extend("path-rewriter");function PF(t){let e;if(!$F(t))return;if(typeof t=="function")return t;return e=kF(t),r;function r(s){let i=s;for(let n of e)if(n.regex.test(s)){i=i.replace(n.regex,n.value),Rg('rewriting path from "%s" to "%s"',s,i);break}return i}}function $F(t){if(typeof t=="function")return true;if((0, Og.isPlainObject)(t))return Object.keys(t).length!==0;if(t==null)return false;throw new Error(SF.ERRORS.ERR_PATH_REWRITER_CONFIG)}function kF(t){let e=[];if((0, Og.isPlainObject)(t))for(let[r,s]of Object.entries(t))e.push({regex:new RegExp(r),value:s}),Rg('rewrite rule created: "%s" ~> "%s"',r,s);return e}});var Pg=D(ea=>{Object.defineProperty(ea,"__esModule",{value:true});ea.getTarget=BF;var IF=Zu(),MF=at(),Tg=MF.Debug.extend("router");async function BF(t,e){let r,s=e.router;return (0, IF.isPlainObject)(s)?r=HF(t,s):typeof s=="function"&&(r=await s(t)),r}function HF(t,e){let r,s=t.headers.host,i=t.url,n=s+i;for(let[o,u]of Object.entries(e))if(NF(o)){if(n.indexOf(o)>-1){r=u,Tg('match: "%s" -> "%s"',o,r);break}}else if(o===s){r=u,Tg('match: "%s" -> "%s"',s,r);break}return r}function NF(t){return t.indexOf("/")>-1}});var $g=D(ui=>{Object.defineProperty(ui,"__esModule",{value:true});ui.HttpProxyMiddleware=void 0;var qF=zp(),LF=Zp(),jF=om(),GF=Eg(),VF=Sg(),UF=Pg(),Je=at(),WF=zs(),KF=Ys(),ta=class{constructor(e){this.wsInternalSubscribed=false,this.serverOnCloseSubscribed=false,this.middleware=async(r,s,i)=>{if(this.shouldProxy(this.proxyOptions.pathFilter,r))try{let o=await this.prepareProxyRequest(r);(0,Je.Debug)("proxy request to target: %O",o.target),this.proxy.web(r,s,o);}catch(o){i?.(o);}else i?.();let n=(r.socket??r.connection)?.server;n&&!this.serverOnCloseSubscribed&&(n.on("close",()=>{(0, Je.Debug)("server close signal received: closing proxy server"),this.proxy.close();}),this.serverOnCloseSubscribed=true),this.proxyOptions.ws===true&&this.catchUpgradeRequest(n);},this.catchUpgradeRequest=r=>{this.wsInternalSubscribed||((0, Je.Debug)("subscribing to server upgrade event"),r.on("upgrade",this.handleUpgrade),this.wsInternalSubscribed=true);},this.handleUpgrade=async(r,s,i)=>{try{if(this.shouldProxy(this.proxyOptions.pathFilter,r)){let n=await this.prepareProxyRequest(r);this.proxy.ws(r,s,i,n),(0,Je.Debug)("server upgrade event received. Proxying WebSocket");}}catch(n){this.proxy.emit("error",n,r,s);}},this.shouldProxy=(r,s)=>{try{return (0,GF.matchPathFilter)(r,s.url,s)}catch(i){return (0, Je.Debug)("Error: matchPathFilter() called with request url: ",`"${s.url}"`),this.logger.error(i),false}},this.prepareProxyRequest=async r=>{this.middleware.__LEGACY_HTTP_PROXY_MIDDLEWARE__&&(r.url=r.originalUrl||r.url);let s=Object.assign({},this.proxyOptions);return await this.applyRouter(r,s),await this.applyPathRewrite(r,this.pathRewriter),s},this.applyRouter=async(r,s)=>{let i;s.router&&(i=await UF.getTarget(r,s),i&&((0, Je.Debug)('router new target: "%s"',i),s.target=i));},this.applyPathRewrite=async(r,s)=>{if(s){let i=await s(r.url,r);typeof i=="string"?((0, Je.Debug)("pathRewrite new path: %s",r.url),r.url=i):(0, Je.Debug)("pathRewrite: no rewritten path found: %s",r.url);}},(0, LF.verifyConfig)(e),this.proxyOptions=e,this.logger=(0, KF.getLogger)(e),(0, Je.Debug)("create proxy server"),this.proxy=qF.createProxyServer({}),this.registerPlugins(this.proxy,this.proxyOptions),this.pathRewriter=VF.createPathRewriter(this.proxyOptions.pathRewrite),this.middleware.upgrade=(r,s,i)=>{this.wsInternalSubscribed||this.handleUpgrade(r,s,i);};}registerPlugins(e,r){(0, jF.getPlugins)(r).forEach(i=>{(0, Je.Debug)(`register plugin: "${(0, WF.getFunctionName)(i)}"`),i(e,r);});}};ui.HttpProxyMiddleware=ta;});var sa=D(ra=>{Object.defineProperty(ra,"__esModule",{value:true});ra.createProxyMiddleware=JF;var YF=$g();function JF(t){let{middleware:e}=new YF.HttpProxyMiddleware(t);return e}});var kg=D(na=>{Object.defineProperty(na,"__esModule",{value:true});na.responseInterceptor=ZF;var ia=$("zlib"),zF=at(),XF=zs(),ir=zF.Debug.extend("response-interceptor");function ZF(t){return async function(r,s,i){ir("intercept proxy response");let n=r,o=Buffer.from("","utf8"),u=QF(r,r.headers["content-encoding"]);u.on("data",a=>o=Buffer.concat([o,a])),u.on("end",async()=>{eE(r,i),ir("call interceptor function: %s",(0, XF.getFunctionName)(t));let a=Buffer.from(await t(o,n,s,i));ir("set content-length: %s",Buffer.byteLength(a,"utf8")),i.setHeader("content-length",Buffer.byteLength(a,"utf8")),ir("write intercepted response"),i.write(a),i.end();}),u.on("error",a=>{i.end(`Error fetching proxied request: ${a.message}`);});}}function QF(t,e){let r=t,s;switch(e){case "gzip":s=ia.createGunzip();break;case "br":s=ia.createBrotliDecompress();break;case "deflate":s=ia.createInflate();break;}return s&&(ir("decompress proxy response with 'content-encoding': %s",e),r.pipe(s),r=s),r}function eE(t,e){if(ir("copy original response headers"),e.statusCode=t.statusCode,e.statusMessage=t.statusMessage,e.setHeader){let r=Object.keys(t.headers);r=r.filter(s=>!["content-encoding","transfer-encoding"].includes(s)),r.forEach(s=>{let i=t.headers[s];s==="set-cookie"&&(i=Array.isArray(i)?i:[i],i=i.map(n=>n.replace(/Domain=[^;]+?/i,""))),e.setHeader(s,i);});}else e.headers=t.headers;}});var Ig=D(oa=>{Object.defineProperty(oa,"__esModule",{value:true});oa.fixRequestBody=rE;var tE=$("querystring");function rE(t,e){if(e.readableLength!==0)return;let r=e.body;if(!r)return;let s=t.getHeader("Content-Type");if(!s)return;let i=n=>{t.setHeader("Content-Length",Buffer.byteLength(n)),t.write(n);};s.includes("application/json")||s.includes("+json")?i(JSON.stringify(r)):s.includes("application/x-www-form-urlencoded")?i(tE.stringify(r)):s.includes("multipart/form-data")&&i(sE(s,r));}function sE(t,e){let r=t.replace(/^.*boundary=(.*)$/,"$1"),s="";for(let[i,n]of Object.entries(e))s+=`--${r}\r
138
138
  Content-Disposition: form-data; name="${i}"\r
139
139
  \r
140
140
  ${n}\r
141
- `;return s}});var wg=D(tr=>{Object.defineProperty(tr,"__esModule",{value:true});tr.fixRequestBody=tr.responseInterceptor=void 0;var Vw=xg();Object.defineProperty(tr,"responseInterceptor",{enumerable:true,get:function(){return Vw.responseInterceptor}});var Uw=Fg();Object.defineProperty(tr,"fixRequestBody",{enumerable:true,get:function(){return Uw.fixRequestBody}});});var Eg=D(Pt=>{var Ww=Pt&&Pt.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:true,get:function(){return e[r]}}),Object.defineProperty(t,s,i);}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r];}),Yw=Pt&&Pt.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Ww(e,t,r);};Object.defineProperty(Pt,"__esModule",{value:true});Yw(wg(),Pt);});var Ag=D(na=>{Object.defineProperty(na,"__esModule",{value:true});na.legacyOptionsAdapter=Zw;var Jw=$("url"),Kw=ot(),zw=Vs(),Ir=Kw.Debug.extend("legacy-options-adapter"),Xw={onError:"error",onProxyReq:"proxyReq",onProxyRes:"proxyRes",onProxyReqWs:"proxyReqWs",onOpen:"open",onClose:"close"};function Zw(t,e){let r={},s;if(typeof t=="string"&&Jw.parse(t).host)throw new Error(`Shorthand syntax is removed from legacyCreateProxyMiddleware().
141
+ `;return s}});var Mg=D(nr=>{Object.defineProperty(nr,"__esModule",{value:true});nr.fixRequestBody=nr.responseInterceptor=void 0;var iE=kg();Object.defineProperty(nr,"responseInterceptor",{enumerable:true,get:function(){return iE.responseInterceptor}});var nE=Ig();Object.defineProperty(nr,"fixRequestBody",{enumerable:true,get:function(){return nE.fixRequestBody}});});var Bg=D(Bt=>{var oE=Bt&&Bt.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:true,get:function(){return e[r]}}),Object.defineProperty(t,s,i);}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r];}),uE=Bt&&Bt.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&oE(e,t,r);};Object.defineProperty(Bt,"__esModule",{value:true});uE(Mg(),Bt);});var Hg=D(aa=>{Object.defineProperty(aa,"__esModule",{value:true});aa.legacyOptionsAdapter=dE;var aE=$("url"),lE=at(),cE=Ys(),Hr=lE.Debug.extend("legacy-options-adapter"),hE={onError:"error",onProxyReq:"proxyReq",onProxyRes:"proxyRes",onProxyReqWs:"proxyReqWs",onOpen:"open",onClose:"close"};function dE(t,e){let r={},s;if(typeof t=="string"&&aE.parse(t).host)throw new Error(`Shorthand syntax is removed from legacyCreateProxyMiddleware().
142
142
  Please use "legacyCreateProxyMiddleware({ target: 'http://www.example.org' })" instead.
143
143
 
144
144
  More details: https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#removed-shorthand-usage
145
- `);t&&e?(Ir("map legacy context/filter to options.pathFilter"),r={...e,pathFilter:t},s=ia(r),s.warn(`[http-proxy-middleware] Legacy "context" argument is deprecated. Migrate your "context" to "options.pathFilter":
145
+ `);t&&e?(Hr("map legacy context/filter to options.pathFilter"),r={...e,pathFilter:t},s=ua(r),s.warn(`[http-proxy-middleware] Legacy "context" argument is deprecated. Migrate your "context" to "options.pathFilter":
146
146
 
147
147
  const options = {
148
148
  pathFilter: '${t}',
149
149
  }
150
150
 
151
151
  More details: https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#removed-context-argument
152
- `)):t&&!e?(r={...t},s=ia(r)):s=ia({}),Object.entries(Xw).forEach(([o,u])=>{r[o]&&(r.on={...r.on},r.on[u]=r[o],Ir('map legacy event "%s" to "on.%s"',o,u),s.warn(`[http-proxy-middleware] Legacy "${o}" is deprecated. Migrate to "options.on.${u}":
152
+ `)):t&&!e?(r={...t},s=ua(r)):s=ua({}),Object.entries(hE).forEach(([o,u])=>{r[o]&&(r.on={...r.on},r.on[u]=r[o],Hr('map legacy event "%s" to "on.%s"',o,u),s.warn(`[http-proxy-middleware] Legacy "${o}" is deprecated. Migrate to "options.on.${u}":
153
153
 
154
154
  const options = {
155
155
  on: {
@@ -158,35 +158,35 @@ ${n}\r
158
158
  }
159
159
 
160
160
  More details: https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#refactored-proxy-events
161
- `));});let i=r.logProvider&&r.logProvider(),n=r.logLevel;return Ir("legacy logLevel",n),Ir("legacy logProvider: %O",i),typeof n=="string"&&n!=="silent"&&(Ir('map "logProvider" to "logger"'),s.warn(`[http-proxy-middleware] Legacy "logLevel" and "logProvider" are deprecated. Migrate to "options.logger":
161
+ `));});let i=r.logProvider&&r.logProvider(),n=r.logLevel;return Hr("legacy logLevel",n),Hr("legacy logProvider: %O",i),typeof n=="string"&&n!=="silent"&&(Hr('map "logProvider" to "logger"'),s.warn(`[http-proxy-middleware] Legacy "logLevel" and "logProvider" are deprecated. Migrate to "options.logger":
162
162
 
163
163
  const options = {
164
164
  logger: console,
165
165
  }
166
166
 
167
167
  More details: https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#removed-logprovider-and-loglevel-options
168
- `)),r}function ia(t){let e=t.logProvider&&t.logProvider();return e&&(t.logger=e),(0, zw.getLogger)(t)}});var Sg=D(oa=>{Object.defineProperty(oa,"__esModule",{value:true});oa.legacyCreateProxyMiddleware=rE;var Qw=ea(),eE=ot(),tE=Ag(),Og=eE.Debug.extend("legacy-create-proxy-middleware");function rE(t,e){Og("init");let r=(0, tE.legacyOptionsAdapter)(t,e),s=(0, Qw.createProxyMiddleware)(r);return Og("add marker for patching req.url (old behavior)"),s.__LEGACY_HTTP_PROXY_MIDDLEWARE__=true,s}});var Rg=D(ii=>{Object.defineProperty(ii,"__esModule",{value:true});ii.legacyCreateProxyMiddleware=void 0;var sE=Sg();Object.defineProperty(ii,"legacyCreateProxyMiddleware",{enumerable:true,get:function(){return sE.legacyCreateProxyMiddleware}});});var Tg=D($t=>{var iE=$t&&$t.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:true,get:function(){return e[r]}}),Object.defineProperty(t,s,i);}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r];}),nE=$t&&$t.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&iE(e,t,r);};Object.defineProperty($t,"__esModule",{value:true});nE(Rg(),$t);});var Pg=D(Ke=>{var oE=Ke&&Ke.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:true,get:function(){return e[r]}}),Object.defineProperty(t,s,i);}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r];}),ni=Ke&&Ke.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&oE(e,t,r);};Object.defineProperty(Ke,"__esModule",{value:true});ni(ea(),Ke);ni(Eg(),Ke);ni(Ou(),Ke);ni(Tg(),Ke);});var _a=we(Ca()),{program:vE,createCommand:xE,createArgument:FE,createOption:wE,CommanderError:EE,InvalidArgumentError:AE,InvalidOptionArgumentError:OE,Command:lt,Argument:SE,Option:RE,Help:TE}=_a.default;var As=we(sr()),tu=we(us());function So(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ln={},jn,td;function Se(){if(td)return jn;td=1;let t,e,r,s,i=true;typeof process<"u"&&({FORCE_COLOR:t,NODE_DISABLE_COLORS:e,NO_COLOR:r,TERM:s}=process.env||{},i=process.stdout&&process.stdout.isTTY);let n={enabled:!e&&r==null&&s!=="dumb"&&(t!=null&&t!=="0"||i),reset:a(0,0),bold:a(1,22),dim:a(2,22),italic:a(3,23),underline:a(4,24),inverse:a(7,27),hidden:a(8,28),strikethrough:a(9,29),black:a(30,39),red:a(31,39),green:a(32,39),yellow:a(33,39),blue:a(34,39),magenta:a(35,39),cyan:a(36,39),white:a(37,39),gray:a(90,39),grey:a(90,39),bgBlack:a(40,49),bgRed:a(41,49),bgGreen:a(42,49),bgYellow:a(43,49),bgBlue:a(44,49),bgMagenta:a(45,49),bgCyan:a(46,49),bgWhite:a(47,49)};function o(h,l){let c=0,d,f="",p="";for(;c<h.length;c++)d=h[c],f+=d.open,p+=d.close,~l.indexOf(d.close)&&(l=l.replace(d.rgx,d.close+d.open));return f+l+p}function u(h,l){let c={has:h,keys:l};return c.reset=n.reset.bind(c),c.bold=n.bold.bind(c),c.dim=n.dim.bind(c),c.italic=n.italic.bind(c),c.underline=n.underline.bind(c),c.inverse=n.inverse.bind(c),c.hidden=n.hidden.bind(c),c.strikethrough=n.strikethrough.bind(c),c.black=n.black.bind(c),c.red=n.red.bind(c),c.green=n.green.bind(c),c.yellow=n.yellow.bind(c),c.blue=n.blue.bind(c),c.magenta=n.magenta.bind(c),c.cyan=n.cyan.bind(c),c.white=n.white.bind(c),c.gray=n.gray.bind(c),c.grey=n.grey.bind(c),c.bgBlack=n.bgBlack.bind(c),c.bgRed=n.bgRed.bind(c),c.bgGreen=n.bgGreen.bind(c),c.bgYellow=n.bgYellow.bind(c),c.bgBlue=n.bgBlue.bind(c),c.bgMagenta=n.bgMagenta.bind(c),c.bgCyan=n.bgCyan.bind(c),c.bgWhite=n.bgWhite.bind(c),c}function a(h,l){let c={open:`\x1B[${h}m`,close:`\x1B[${l}m`,rgx:new RegExp(`\\x1b\\[${l}m`,"g")};return function(d){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(h)||(this.has.push(h),this.keys.push(c)),d===void 0?this:n.enabled?o(this.keys,d+""):d+""):d===void 0?u([h],[c]):n.enabled?o([c],d+""):d+""}}return jn=n,jn}var Gn,rd;function Ry(){return rd||(rd=1,Gn=(t,e)=>{if(!(t.meta&&t.name!=="escape")){if(t.ctrl)return t.name==="a"?"first":t.name==="c"||t.name==="d"?"abort":t.name==="e"?"last":t.name==="g"?"reset":t.name==="n"?"down":t.name==="p"?"up":void 0;if(e){if(t.name==="j")return "down";if(t.name==="k")return "up"}return t.name==="return"||t.name==="enter"?"submit":t.name==="backspace"?"delete":t.name==="delete"?"deleteForward":t.name==="abort"?"abort":t.name==="escape"?"exit":t.name==="tab"?"next":t.name==="pagedown"?"nextPage":t.name==="pageup"?"prevPage":t.name==="home"?"home":t.name==="end"?"end":t.name==="up"?"up":t.name==="down"?"down":t.name==="right"?"right":t.name==="left"?"left":false}}),Gn}var Vn,sd;function Ro(){return sd||(sd=1,Vn=t=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),r=new RegExp(e,"g");return typeof t=="string"?t.replace(r,""):t}),Vn}var Un,id;function Re(){if(id)return Un;id=1;let t="\x1B",e=`${t}[`,r="\x07",s={to(o,u){return u?`${e}${u+1};${o+1}H`:`${e}${o+1}G`},move(o,u){let a="";return o<0?a+=`${e}${-o}D`:o>0&&(a+=`${e}${o}C`),u<0?a+=`${e}${-u}A`:u>0&&(a+=`${e}${u}B`),a},up:(o=1)=>`${e}${o}A`,down:(o=1)=>`${e}${o}B`,forward:(o=1)=>`${e}${o}C`,backward:(o=1)=>`${e}${o}D`,nextLine:(o=1)=>`${e}E`.repeat(o),prevLine:(o=1)=>`${e}F`.repeat(o),left:`${e}G`,hide:`${e}?25l`,show:`${e}?25h`,save:`${t}7`,restore:`${t}8`},i={up:(o=1)=>`${e}S`.repeat(o),down:(o=1)=>`${e}T`.repeat(o)},n={screen:`${e}2J`,up:(o=1)=>`${e}1J`.repeat(o),down:(o=1)=>`${e}J`.repeat(o),line:`${e}2K`,lineEnd:`${e}K`,lineStart:`${e}1K`,lines(o){let u="";for(let a=0;a<o;a++)u+=this.line+(a<o-1?s.up():"");return o&&(u+=s.left),u}};return Un={cursor:s,scroll:i,erase:n,beep:r},Un}var Wn,nd;function Ty(){if(nd)return Wn;nd=1;let t=Ro(),{erase:e,cursor:r}=Re(),s=i=>[...t(i)].length;return Wn=function(i,n){if(!n)return e.line+r.to(0);let o=0,u=i.split(/\r?\n/);for(let a of u)o+=1+Math.floor(Math.max(s(a)-1,0)/n);return e.lines(o)},Wn}var Yn,od;function Xd(){if(od)return Yn;od=1;let t={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},e={arrowUp:t.arrowUp,arrowDown:t.arrowDown,arrowLeft:t.arrowLeft,arrowRight:t.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"};return Yn=process.platform==="win32"?e:t,Yn}var Jn,ud;function Py(){if(ud)return Jn;ud=1;let t=Se(),e=Xd(),r=Object.freeze({password:{scale:1,render:a=>"*".repeat(a.length)},emoji:{scale:2,render:a=>"\u{1F603}".repeat(a.length)},invisible:{scale:0,render:a=>""},default:{scale:1,render:a=>`${a}`}}),s=a=>r[a]||r.default,i=Object.freeze({aborted:t.red(e.cross),done:t.green(e.tick),exited:t.yellow(e.cross),default:t.cyan("?")});return Jn={styles:r,render:s,symbols:i,symbol:(a,h,l)=>h?i.aborted:l?i.exited:a?i.done:i.default,delimiter:a=>t.gray(a?e.ellipsis:e.pointerSmall),item:(a,h)=>t.gray(a?h?e.pointerSmall:"+":e.line)},Jn}var Kn,ad;function $y(){if(ad)return Kn;ad=1;let t=Ro();return Kn=function(e,r){let s=String(t(e)||"").split(/\r?\n/);return r?s.map(i=>Math.ceil(i.length/r)).reduce((i,n)=>i+n):s.length},Kn}var zn,ld;function ky(){return ld||(ld=1,zn=(t,e={})=>{let r=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",s=e.width;return (t||"").split(/\r?\n/g).map(i=>i.split(/\s+/g).reduce((n,o)=>(o.length+r.length>=s||n[n.length-1].length+o.length+1<s?n[n.length-1]+=` ${o}`:n.push(`${r}${o}`),n),[r]).join(`
168
+ `)),r}function ua(t){let e=t.logProvider&&t.logProvider();return e&&(t.logger=e),(0, cE.getLogger)(t)}});var qg=D(la=>{Object.defineProperty(la,"__esModule",{value:true});la.legacyCreateProxyMiddleware=gE;var fE=sa(),pE=at(),mE=Hg(),Ng=pE.Debug.extend("legacy-create-proxy-middleware");function gE(t,e){Ng("init");let r=(0, mE.legacyOptionsAdapter)(t,e),s=(0, fE.createProxyMiddleware)(r);return Ng("add marker for patching req.url (old behavior)"),s.__LEGACY_HTTP_PROXY_MIDDLEWARE__=true,s}});var Lg=D(ai=>{Object.defineProperty(ai,"__esModule",{value:true});ai.legacyCreateProxyMiddleware=void 0;var DE=qg();Object.defineProperty(ai,"legacyCreateProxyMiddleware",{enumerable:true,get:function(){return DE.legacyCreateProxyMiddleware}});});var jg=D(Ht=>{var bE=Ht&&Ht.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:true,get:function(){return e[r]}}),Object.defineProperty(t,s,i);}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r];}),yE=Ht&&Ht.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&bE(e,t,r);};Object.defineProperty(Ht,"__esModule",{value:true});yE(Lg(),Ht);});var Gg=D(ze=>{var vE=ze&&ze.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:true,get:function(){return e[r]}}),Object.defineProperty(t,s,i);}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r];}),li=ze&&ze.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&vE(e,t,r);};Object.defineProperty(ze,"__esModule",{value:true});li(sa(),ze);li(Bg(),ze);li(Tu(),ze);li(jg(),ze);});var wa=be(_a()),{program:ME,createCommand:BE,createArgument:HE,createOption:NE,CommanderError:qE,InvalidArgumentError:LE,InvalidOptionArgumentError:jE,Command:Be,Argument:GE,Option:VE,Help:UE}=wa.default;var Rs=be(Nt()),iu=be(br());function Po(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Vn={},Un,id;function Re(){if(id)return Un;id=1;let t,e,r,s,i=true;typeof process<"u"&&({FORCE_COLOR:t,NODE_DISABLE_COLORS:e,NO_COLOR:r,TERM:s}=process.env||{},i=process.stdout&&process.stdout.isTTY);let n={enabled:!e&&r==null&&s!=="dumb"&&(t!=null&&t!=="0"||i),reset:a(0,0),bold:a(1,22),dim:a(2,22),italic:a(3,23),underline:a(4,24),inverse:a(7,27),hidden:a(8,28),strikethrough:a(9,29),black:a(30,39),red:a(31,39),green:a(32,39),yellow:a(33,39),blue:a(34,39),magenta:a(35,39),cyan:a(36,39),white:a(37,39),gray:a(90,39),grey:a(90,39),bgBlack:a(40,49),bgRed:a(41,49),bgGreen:a(42,49),bgYellow:a(43,49),bgBlue:a(44,49),bgMagenta:a(45,49),bgCyan:a(46,49),bgWhite:a(47,49)};function o(h,l){let c=0,d,f="",p="";for(;c<h.length;c++)d=h[c],f+=d.open,p+=d.close,~l.indexOf(d.close)&&(l=l.replace(d.rgx,d.close+d.open));return f+l+p}function u(h,l){let c={has:h,keys:l};return c.reset=n.reset.bind(c),c.bold=n.bold.bind(c),c.dim=n.dim.bind(c),c.italic=n.italic.bind(c),c.underline=n.underline.bind(c),c.inverse=n.inverse.bind(c),c.hidden=n.hidden.bind(c),c.strikethrough=n.strikethrough.bind(c),c.black=n.black.bind(c),c.red=n.red.bind(c),c.green=n.green.bind(c),c.yellow=n.yellow.bind(c),c.blue=n.blue.bind(c),c.magenta=n.magenta.bind(c),c.cyan=n.cyan.bind(c),c.white=n.white.bind(c),c.gray=n.gray.bind(c),c.grey=n.grey.bind(c),c.bgBlack=n.bgBlack.bind(c),c.bgRed=n.bgRed.bind(c),c.bgGreen=n.bgGreen.bind(c),c.bgYellow=n.bgYellow.bind(c),c.bgBlue=n.bgBlue.bind(c),c.bgMagenta=n.bgMagenta.bind(c),c.bgCyan=n.bgCyan.bind(c),c.bgWhite=n.bgWhite.bind(c),c}function a(h,l){let c={open:`\x1B[${h}m`,close:`\x1B[${l}m`,rgx:new RegExp(`\\x1b\\[${l}m`,"g")};return function(d){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(h)||(this.has.push(h),this.keys.push(c)),d===void 0?this:n.enabled?o(this.keys,d+""):d+""):d===void 0?u([h],[c]):n.enabled?o([c],d+""):d+""}}return Un=n,Un}var Wn,nd;function Ly(){return nd||(nd=1,Wn=(t,e)=>{if(!(t.meta&&t.name!=="escape")){if(t.ctrl)return t.name==="a"?"first":t.name==="c"||t.name==="d"?"abort":t.name==="e"?"last":t.name==="g"?"reset":t.name==="n"?"down":t.name==="p"?"up":void 0;if(e){if(t.name==="j")return "down";if(t.name==="k")return "up"}return t.name==="return"||t.name==="enter"?"submit":t.name==="backspace"?"delete":t.name==="delete"?"deleteForward":t.name==="abort"?"abort":t.name==="escape"?"exit":t.name==="tab"?"next":t.name==="pagedown"?"nextPage":t.name==="pageup"?"prevPage":t.name==="home"?"home":t.name==="end"?"end":t.name==="up"?"up":t.name==="down"?"down":t.name==="right"?"right":t.name==="left"?"left":false}}),Wn}var Kn,od;function $o(){return od||(od=1,Kn=t=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),r=new RegExp(e,"g");return typeof t=="string"?t.replace(r,""):t}),Kn}var Yn,ud;function Se(){if(ud)return Yn;ud=1;let t="\x1B",e=`${t}[`,r="\x07",s={to(o,u){return u?`${e}${u+1};${o+1}H`:`${e}${o+1}G`},move(o,u){let a="";return o<0?a+=`${e}${-o}D`:o>0&&(a+=`${e}${o}C`),u<0?a+=`${e}${-u}A`:u>0&&(a+=`${e}${u}B`),a},up:(o=1)=>`${e}${o}A`,down:(o=1)=>`${e}${o}B`,forward:(o=1)=>`${e}${o}C`,backward:(o=1)=>`${e}${o}D`,nextLine:(o=1)=>`${e}E`.repeat(o),prevLine:(o=1)=>`${e}F`.repeat(o),left:`${e}G`,hide:`${e}?25l`,show:`${e}?25h`,save:`${t}7`,restore:`${t}8`},i={up:(o=1)=>`${e}S`.repeat(o),down:(o=1)=>`${e}T`.repeat(o)},n={screen:`${e}2J`,up:(o=1)=>`${e}1J`.repeat(o),down:(o=1)=>`${e}J`.repeat(o),line:`${e}2K`,lineEnd:`${e}K`,lineStart:`${e}1K`,lines(o){let u="";for(let a=0;a<o;a++)u+=this.line+(a<o-1?s.up():"");return o&&(u+=s.left),u}};return Yn={cursor:s,scroll:i,erase:n,beep:r},Yn}var Jn,ad;function jy(){if(ad)return Jn;ad=1;let t=$o(),{erase:e,cursor:r}=Se(),s=i=>[...t(i)].length;return Jn=function(i,n){if(!n)return e.line+r.to(0);let o=0,u=i.split(/\r?\n/);for(let a of u)o+=1+Math.floor(Math.max(s(a)-1,0)/n);return e.lines(o)},Jn}var zn,ld;function ef(){if(ld)return zn;ld=1;let t={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},e={arrowUp:t.arrowUp,arrowDown:t.arrowDown,arrowLeft:t.arrowLeft,arrowRight:t.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"};return zn=process.platform==="win32"?e:t,zn}var Xn,cd;function Gy(){if(cd)return Xn;cd=1;let t=Re(),e=ef(),r=Object.freeze({password:{scale:1,render:a=>"*".repeat(a.length)},emoji:{scale:2,render:a=>"\u{1F603}".repeat(a.length)},invisible:{scale:0,render:a=>""},default:{scale:1,render:a=>`${a}`}}),s=a=>r[a]||r.default,i=Object.freeze({aborted:t.red(e.cross),done:t.green(e.tick),exited:t.yellow(e.cross),default:t.cyan("?")});return Xn={styles:r,render:s,symbols:i,symbol:(a,h,l)=>h?i.aborted:l?i.exited:a?i.done:i.default,delimiter:a=>t.gray(a?e.ellipsis:e.pointerSmall),item:(a,h)=>t.gray(a?h?e.pointerSmall:"+":e.line)},Xn}var Zn,hd;function Vy(){if(hd)return Zn;hd=1;let t=$o();return Zn=function(e,r){let s=String(t(e)||"").split(/\r?\n/);return r?s.map(i=>Math.ceil(i.length/r)).reduce((i,n)=>i+n):s.length},Zn}var Qn,dd;function Uy(){return dd||(dd=1,Qn=(t,e={})=>{let r=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",s=e.width;return (t||"").split(/\r?\n/g).map(i=>i.split(/\s+/g).reduce((n,o)=>(o.length+r.length>=s||n[n.length-1].length+o.length+1<s?n[n.length-1]+=` ${o}`:n.push(`${r}${o}`),n),[r]).join(`
169
169
  `)).join(`
170
- `)}),zn}var Xn,cd;function Iy(){return cd||(cd=1,Xn=(t,e,r)=>{r=r||e;let s=Math.min(e-r,t-Math.floor(r/2));s<0&&(s=0);let i=Math.min(s+r,e);return {startIndex:s,endIndex:i}}),Xn}var Zn,hd;function Ge(){return hd||(hd=1,Zn={action:Ry(),clear:Ty(),style:Py(),strip:Ro(),figures:Xd(),lines:$y(),wrap:ky(),entriesToDisplay:Iy()}),Zn}var Qn,dd;function mt(){if(dd)return Qn;dd=1;let t=Jd__default.default,{action:e}=Ge(),r=my__default.default,{beep:s,cursor:i}=Re(),n=Se();class o extends r{constructor(a={}){super(),this.firstRender=true,this.in=a.stdin||process.stdin,this.out=a.stdout||process.stdout,this.onRender=(a.onRender||(()=>{})).bind(this);let h=t.createInterface({input:this.in,escapeCodeTimeout:50});t.emitKeypressEvents(this.in,h),this.in.isTTY&&this.in.setRawMode(true);let l=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,c=(d,f)=>{let p=e(f,l);p===false?this._&&this._(d,f):typeof this[p]=="function"?this[p](f):this.bell();};this.close=()=>{this.out.write(i.show),this.in.removeListener("keypress",c),this.in.isTTY&&this.in.setRawMode(false),h.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=true;},this.in.on("keypress",c);}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited});}bell(){this.out.write(s);}render(){this.onRender(n),this.firstRender&&(this.firstRender=false);}}return Qn=o,Qn}var eo,fd;function By(){if(fd)return eo;fd=1;let t=Se(),e=mt(),{erase:r,cursor:s}=Re(),{style:i,clear:n,lines:o,figures:u}=Ge();class a extends e{constructor(l={}){super(l),this.transform=i.render(l.style),this.scale=this.transform.scale,this.msg=l.message,this.initial=l.initial||"",this.validator=l.validate||(()=>true),this.value="",this.errorMsg=l.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=n("",this.out.columns),this.render();}set value(l){!l&&this.initial?(this.placeholder=true,this.rendered=t.gray(this.transform.render(this.initial))):(this.placeholder=false,this.rendered=this.transform.render(l)),this._value=l,this.fire();}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render();}exit(){this.abort();}abort(){this.value=this.value||this.initial,this.done=this.aborted=true,this.error=false,this.red=false,this.fire(),this.render(),this.out.write(`
170
+ `)}),Qn}var eo,fd;function Wy(){return fd||(fd=1,eo=(t,e,r)=>{r=r||e;let s=Math.min(e-r,t-Math.floor(r/2));s<0&&(s=0);let i=Math.min(s+r,e);return {startIndex:s,endIndex:i}}),eo}var to,pd;function Ve(){return pd||(pd=1,to={action:Ly(),clear:jy(),style:Gy(),strip:$o(),figures:ef(),lines:Vy(),wrap:Uy(),entriesToDisplay:Wy()}),to}var ro,md;function gt(){if(md)return ro;md=1;let t=Xd__default.default,{action:e}=Ve(),r=Ey__default.default,{beep:s,cursor:i}=Se(),n=Re();class o extends r{constructor(a={}){super(),this.firstRender=true,this.in=a.stdin||process.stdin,this.out=a.stdout||process.stdout,this.onRender=(a.onRender||(()=>{})).bind(this);let h=t.createInterface({input:this.in,escapeCodeTimeout:50});t.emitKeypressEvents(this.in,h),this.in.isTTY&&this.in.setRawMode(true);let l=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,c=(d,f)=>{let p=e(f,l);p===false?this._&&this._(d,f):typeof this[p]=="function"?this[p](f):this.bell();};this.close=()=>{this.out.write(i.show),this.in.removeListener("keypress",c),this.in.isTTY&&this.in.setRawMode(false),h.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=true;},this.in.on("keypress",c);}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited});}bell(){this.out.write(s);}render(){this.onRender(n),this.firstRender&&(this.firstRender=false);}}return ro=o,ro}var so,gd;function Ky(){if(gd)return so;gd=1;let t=Re(),e=gt(),{erase:r,cursor:s}=Se(),{style:i,clear:n,lines:o,figures:u}=Ve();class a extends e{constructor(l={}){super(l),this.transform=i.render(l.style),this.scale=this.transform.scale,this.msg=l.message,this.initial=l.initial||"",this.validator=l.validate||(()=>true),this.value="",this.errorMsg=l.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=n("",this.out.columns),this.render();}set value(l){!l&&this.initial?(this.placeholder=true,this.rendered=t.gray(this.transform.render(this.initial))):(this.placeholder=false,this.rendered=this.transform.render(l)),this._value=l,this.fire();}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render();}exit(){this.abort();}abort(){this.value=this.value||this.initial,this.done=this.aborted=true,this.error=false,this.red=false,this.fire(),this.render(),this.out.write(`
171
171
  `),this.close();}async validate(){let l=await this.validator(this.value);typeof l=="string"&&(this.errorMsg=l,l=false),this.error=!l;}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=true,this.fire(),this.render();return}this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
172
172
  `),this.close();}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render();}moveCursor(l){this.placeholder||(this.cursor=this.cursor+l,this.cursorOffset+=l);}_(l,c){let d=this.value.slice(0,this.cursor),f=this.value.slice(this.cursor);this.value=`${d}${l}${f}`,this.red=false,this.cursor=this.placeholder?0:d.length+1,this.render();}delete(){if(this.isCursorAtStart())return this.bell();let l=this.value.slice(0,this.cursor-1),c=this.value.slice(this.cursor);this.value=`${l}${c}`,this.red=false,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let l=this.value.slice(0,this.cursor),c=this.value.slice(this.cursor+1);this.value=`${l}${c}`,this.red=false,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render();}first(){this.cursor=0,this.render();}last(){this.cursor=this.value.length,this.render();}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render();}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render();}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(s.down(o(this.outputError,this.out.columns)-1)+n(this.outputError,this.out.columns)),this.out.write(n(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[i.symbol(this.done,this.aborted),t.bold(this.msg),i.delimiter(this.done),this.red?t.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
173
173
  `).reduce((l,c,d)=>l+`
174
- ${d?" ":u.pointerSmall} ${t.red().italic(c)}`,"")),this.out.write(r.line+s.to(0)+this.outputText+s.save+this.outputError+s.restore+s.move(this.cursorOffset,0)));}}return eo=a,eo}var to,pd;function My(){if(pd)return to;pd=1;let t=Se(),e=mt(),{style:r,clear:s,figures:i,wrap:n,entriesToDisplay:o}=Ge(),{cursor:u}=Re();class a extends e{constructor(l={}){super(l),this.msg=l.message,this.hint=l.hint||"- Use arrow-keys. Return to submit.",this.warn=l.warn||"- This option is disabled",this.cursor=l.initial||0,this.choices=l.choices.map((c,d)=>(typeof c=="string"&&(c={title:c,value:d}),{title:c&&(c.title||c.value||c),value:c&&(c.value===void 0?d:c.value),description:c&&c.description,selected:c&&c.selected,disabled:c&&c.disabled})),this.optionsPerPage=l.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=s("",this.out.columns),this.render();}moveCursor(l){this.cursor=l,this.value=this.choices[l].value,this.fire();}reset(){this.moveCursor(0),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
174
+ ${d?" ":u.pointerSmall} ${t.red().italic(c)}`,"")),this.out.write(r.line+s.to(0)+this.outputText+s.save+this.outputError+s.restore+s.move(this.cursorOffset,0)));}}return so=a,so}var io,Dd;function Yy(){if(Dd)return io;Dd=1;let t=Re(),e=gt(),{style:r,clear:s,figures:i,wrap:n,entriesToDisplay:o}=Ve(),{cursor:u}=Se();class a extends e{constructor(l={}){super(l),this.msg=l.message,this.hint=l.hint||"- Use arrow-keys. Return to submit.",this.warn=l.warn||"- This option is disabled",this.cursor=l.initial||0,this.choices=l.choices.map((c,d)=>(typeof c=="string"&&(c={title:c,value:d}),{title:c&&(c.title||c.value||c),value:c&&(c.value===void 0?d:c.value),description:c&&c.description,selected:c&&c.selected,disabled:c&&c.disabled})),this.optionsPerPage=l.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=s("",this.out.columns),this.render();}moveCursor(l){this.cursor=l,this.value=this.choices[l].value,this.fire();}reset(){this.moveCursor(0),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
175
175
  `),this.close();}submit(){this.selection.disabled?this.bell():(this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
176
176
  `),this.close());}first(){this.moveCursor(0),this.render();}last(){this.moveCursor(this.choices.length-1),this.render();}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render();}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render();}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render();}_(l,c){if(l===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(u.hide):this.out.write(s(this.outputText,this.out.columns)),super.render();let{startIndex:l,endIndex:c}=o(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[r.symbol(this.done,this.aborted),t.bold(this.msg),r.delimiter(false),this.done?this.selection.title:this.selection.disabled?t.yellow(this.warn):t.gray(this.hint)].join(" "),!this.done){this.outputText+=`
177
177
  `;for(let d=l;d<c;d++){let f,p,m="",g=this.choices[d];d===l&&l>0?p=i.arrowUp:d===c-1&&c<this.choices.length?p=i.arrowDown:p=" ",g.disabled?(f=this.cursor===d?t.gray().underline(g.title):t.strikethrough().gray(g.title),p=(this.cursor===d?t.bold().gray(i.pointer)+" ":" ")+p):(f=this.cursor===d?t.cyan().underline(g.title):g.title,p=(this.cursor===d?t.cyan(i.pointer)+" ":" ")+p,g.description&&this.cursor===d&&(m=` - ${g.description}`,(p.length+f.length+m.length>=this.out.columns||g.description.split(/\r?\n/).length>1)&&(m=`
178
178
  `+n(g.description,{margin:3,width:this.out.columns})))),this.outputText+=`${p} ${f}${t.gray(m)}
179
- `;}}this.out.write(this.outputText);}}return to=a,to}var ro,md;function Hy(){if(md)return ro;md=1;let t=Se(),e=mt(),{style:r,clear:s}=Ge(),{cursor:i,erase:n}=Re();class o extends e{constructor(a={}){super(a),this.msg=a.message,this.value=!!a.initial,this.active=a.active||"on",this.inactive=a.inactive||"off",this.initialValue=this.value,this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
179
+ `;}}this.out.write(this.outputText);}}return io=a,io}var no,bd;function Jy(){if(bd)return no;bd=1;let t=Re(),e=gt(),{style:r,clear:s}=Ve(),{cursor:i,erase:n}=Se();class o extends e{constructor(a={}){super(a),this.msg=a.message,this.value=!!a.initial,this.active=a.active||"on",this.inactive=a.inactive||"off",this.initialValue=this.value,this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
180
180
  `),this.close();}submit(){this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
181
- `),this.close();}deactivate(){if(this.value===false)return this.bell();this.value=false,this.render();}activate(){if(this.value===true)return this.bell();this.value=true,this.render();}delete(){this.deactivate();}left(){this.deactivate();}right(){this.activate();}down(){this.deactivate();}up(){this.activate();}next(){this.value=!this.value,this.fire(),this.render();}_(a,h){if(a===" ")this.value=!this.value;else if(a==="1")this.value=true;else if(a==="0")this.value=false;else return this.bell();this.render();}render(){this.closed||(this.firstRender?this.out.write(i.hide):this.out.write(s(this.outputText,this.out.columns)),super.render(),this.outputText=[r.symbol(this.done,this.aborted),t.bold(this.msg),r.delimiter(this.done),this.value?this.inactive:t.cyan().underline(this.inactive),t.gray("/"),this.value?t.cyan().underline(this.active):this.active].join(" "),this.out.write(n.line+i.to(0)+this.outputText));}}return ro=o,ro}var so,gd;function it(){if(gd)return so;gd=1;class t{constructor({token:r,date:s,parts:i,locales:n}){this.token=r,this.date=s||new Date,this.parts=i||[this],this.locales=n||{};}up(){}down(){}next(){let r=this.parts.indexOf(this);return this.parts.find((s,i)=>i>r&&s instanceof t)}setTo(r){}prev(){let r=[].concat(this.parts).reverse(),s=r.indexOf(this);return r.find((i,n)=>n>s&&i instanceof t)}toString(){return String(this.date)}}return so=t,so}var io,Dd;function Ny(){if(Dd)return io;Dd=1;let t=it();class e extends t{constructor(s={}){super(s);}up(){this.date.setHours((this.date.getHours()+12)%24);}down(){this.up();}toString(){let s=this.date.getHours()>12?"pm":"am";return /\A/.test(this.token)?s.toUpperCase():s}}return io=e,io}var no,bd;function qy(){if(bd)return no;bd=1;let t=it(),e=s=>(s=s%10,s===1?"st":s===2?"nd":s===3?"rd":"th");class r extends t{constructor(i={}){super(i);}up(){this.date.setDate(this.date.getDate()+1);}down(){this.date.setDate(this.date.getDate()-1);}setTo(i){this.date.setDate(parseInt(i.substr(-2)));}toString(){let i=this.date.getDate(),n=this.date.getDay();return this.token==="DD"?String(i).padStart(2,"0"):this.token==="Do"?i+e(i):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:i}}return no=r,no}var oo,yd;function Ly(){if(yd)return oo;yd=1;let t=it();class e extends t{constructor(s={}){super(s);}up(){this.date.setHours(this.date.getHours()+1);}down(){this.date.setHours(this.date.getHours()-1);}setTo(s){this.date.setHours(parseInt(s.substr(-2)));}toString(){let s=this.date.getHours();return /h/.test(this.token)&&(s=s%12||12),this.token.length>1?String(s).padStart(2,"0"):s}}return oo=e,oo}var uo,Cd;function jy(){if(Cd)return uo;Cd=1;let t=it();class e extends t{constructor(s={}){super(s);}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1);}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1);}setTo(s){this.date.setMilliseconds(parseInt(s.substr(-this.token.length)));}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}return uo=e,uo}var ao,_d;function Gy(){if(_d)return ao;_d=1;let t=it();class e extends t{constructor(s={}){super(s);}up(){this.date.setMinutes(this.date.getMinutes()+1);}down(){this.date.setMinutes(this.date.getMinutes()-1);}setTo(s){this.date.setMinutes(parseInt(s.substr(-2)));}toString(){let s=this.date.getMinutes();return this.token.length>1?String(s).padStart(2,"0"):s}}return ao=e,ao}var lo,vd;function Vy(){if(vd)return lo;vd=1;let t=it();class e extends t{constructor(s={}){super(s);}up(){this.date.setMonth(this.date.getMonth()+1);}down(){this.date.setMonth(this.date.getMonth()-1);}setTo(s){s=parseInt(s.substr(-2))-1,this.date.setMonth(s<0?0:s);}toString(){let s=this.date.getMonth(),i=this.token.length;return i===2?String(s+1).padStart(2,"0"):i===3?this.locales.monthsShort[s]:i===4?this.locales.months[s]:String(s+1)}}return lo=e,lo}var co,xd;function Uy(){if(xd)return co;xd=1;let t=it();class e extends t{constructor(s={}){super(s);}up(){this.date.setSeconds(this.date.getSeconds()+1);}down(){this.date.setSeconds(this.date.getSeconds()-1);}setTo(s){this.date.setSeconds(parseInt(s.substr(-2)));}toString(){let s=this.date.getSeconds();return this.token.length>1?String(s).padStart(2,"0"):s}}return co=e,co}var ho,Fd;function Wy(){if(Fd)return ho;Fd=1;let t=it();class e extends t{constructor(s={}){super(s);}up(){this.date.setFullYear(this.date.getFullYear()+1);}down(){this.date.setFullYear(this.date.getFullYear()-1);}setTo(s){this.date.setFullYear(s.substr(-4));}toString(){let s=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?s.substr(-2):s}}return ho=e,ho}var fo,wd;function Yy(){return wd||(wd=1,fo={DatePart:it(),Meridiem:Ny(),Day:qy(),Hours:Ly(),Milliseconds:jy(),Minutes:Gy(),Month:Vy(),Seconds:Uy(),Year:Wy()}),fo}var po,Ed;function Jy(){if(Ed)return po;Ed=1;let t=Se(),e=mt(),{style:r,clear:s,figures:i}=Ge(),{erase:n,cursor:o}=Re(),{DatePart:u,Meridiem:a,Day:h,Hours:l,Milliseconds:c,Minutes:d,Month:f,Seconds:p,Year:m}=Yy(),g=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,b={1:({token:F})=>F.replace(/\\(.)/g,"$1"),2:F=>new h(F),3:F=>new f(F),4:F=>new m(F),5:F=>new a(F),6:F=>new l(F),7:F=>new d(F),8:F=>new p(F),9:F=>new c(F)},y={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class v extends e{constructor(E={}){super(E),this.msg=E.message,this.cursor=0,this.typed="",this.locales=Object.assign(y,E.locales),this._date=E.initial||new Date,this.errorMsg=E.error||"Please Enter A Valid Value",this.validator=E.validate||(()=>true),this.mask=E.mask||"YYYY-MM-DD HH:mm:ss",this.clear=s("",this.out.columns),this.render();}get value(){return this.date}get date(){return this._date}set date(E){E&&this._date.setTime(E.getTime());}set mask(E){let R;for(this.parts=[];R=g.exec(E);){let O=R.shift(),T=R.findIndex(te=>te!=null);this.parts.push(T in b?b[T]({token:R[T]||O,date:this.date,parts:this.parts,locales:this.locales}):R[T]||O);}let P=this.parts.reduce((O,T)=>(typeof T=="string"&&typeof O[O.length-1]=="string"?O[O.length-1]+=T:O.push(T),O),[]);this.parts.splice(0),this.parts.push(...P),this.reset();}moveCursor(E){this.typed="",this.cursor=E,this.fire();}reset(){this.moveCursor(this.parts.findIndex(E=>E instanceof u)),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.error=false,this.fire(),this.render(),this.out.write(`
181
+ `),this.close();}deactivate(){if(this.value===false)return this.bell();this.value=false,this.render();}activate(){if(this.value===true)return this.bell();this.value=true,this.render();}delete(){this.deactivate();}left(){this.deactivate();}right(){this.activate();}down(){this.deactivate();}up(){this.activate();}next(){this.value=!this.value,this.fire(),this.render();}_(a,h){if(a===" ")this.value=!this.value;else if(a==="1")this.value=true;else if(a==="0")this.value=false;else return this.bell();this.render();}render(){this.closed||(this.firstRender?this.out.write(i.hide):this.out.write(s(this.outputText,this.out.columns)),super.render(),this.outputText=[r.symbol(this.done,this.aborted),t.bold(this.msg),r.delimiter(this.done),this.value?this.inactive:t.cyan().underline(this.inactive),t.gray("/"),this.value?t.cyan().underline(this.active):this.active].join(" "),this.out.write(n.line+i.to(0)+this.outputText));}}return no=o,no}var oo,yd;function nt(){if(yd)return oo;yd=1;class t{constructor({token:r,date:s,parts:i,locales:n}){this.token=r,this.date=s||new Date,this.parts=i||[this],this.locales=n||{};}up(){}down(){}next(){let r=this.parts.indexOf(this);return this.parts.find((s,i)=>i>r&&s instanceof t)}setTo(r){}prev(){let r=[].concat(this.parts).reverse(),s=r.indexOf(this);return r.find((i,n)=>n>s&&i instanceof t)}toString(){return String(this.date)}}return oo=t,oo}var uo,vd;function zy(){if(vd)return uo;vd=1;let t=nt();class e extends t{constructor(s={}){super(s);}up(){this.date.setHours((this.date.getHours()+12)%24);}down(){this.up();}toString(){let s=this.date.getHours()>12?"pm":"am";return /\A/.test(this.token)?s.toUpperCase():s}}return uo=e,uo}var ao,Cd;function Xy(){if(Cd)return ao;Cd=1;let t=nt(),e=s=>(s=s%10,s===1?"st":s===2?"nd":s===3?"rd":"th");class r extends t{constructor(i={}){super(i);}up(){this.date.setDate(this.date.getDate()+1);}down(){this.date.setDate(this.date.getDate()-1);}setTo(i){this.date.setDate(parseInt(i.substr(-2)));}toString(){let i=this.date.getDate(),n=this.date.getDay();return this.token==="DD"?String(i).padStart(2,"0"):this.token==="Do"?i+e(i):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:i}}return ao=r,ao}var lo,xd;function Zy(){if(xd)return lo;xd=1;let t=nt();class e extends t{constructor(s={}){super(s);}up(){this.date.setHours(this.date.getHours()+1);}down(){this.date.setHours(this.date.getHours()-1);}setTo(s){this.date.setHours(parseInt(s.substr(-2)));}toString(){let s=this.date.getHours();return /h/.test(this.token)&&(s=s%12||12),this.token.length>1?String(s).padStart(2,"0"):s}}return lo=e,lo}var co,_d;function Qy(){if(_d)return co;_d=1;let t=nt();class e extends t{constructor(s={}){super(s);}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1);}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1);}setTo(s){this.date.setMilliseconds(parseInt(s.substr(-this.token.length)));}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}return co=e,co}var ho,wd;function ev(){if(wd)return ho;wd=1;let t=nt();class e extends t{constructor(s={}){super(s);}up(){this.date.setMinutes(this.date.getMinutes()+1);}down(){this.date.setMinutes(this.date.getMinutes()-1);}setTo(s){this.date.setMinutes(parseInt(s.substr(-2)));}toString(){let s=this.date.getMinutes();return this.token.length>1?String(s).padStart(2,"0"):s}}return ho=e,ho}var fo,Fd;function tv(){if(Fd)return fo;Fd=1;let t=nt();class e extends t{constructor(s={}){super(s);}up(){this.date.setMonth(this.date.getMonth()+1);}down(){this.date.setMonth(this.date.getMonth()-1);}setTo(s){s=parseInt(s.substr(-2))-1,this.date.setMonth(s<0?0:s);}toString(){let s=this.date.getMonth(),i=this.token.length;return i===2?String(s+1).padStart(2,"0"):i===3?this.locales.monthsShort[s]:i===4?this.locales.months[s]:String(s+1)}}return fo=e,fo}var po,Ed;function rv(){if(Ed)return po;Ed=1;let t=nt();class e extends t{constructor(s={}){super(s);}up(){this.date.setSeconds(this.date.getSeconds()+1);}down(){this.date.setSeconds(this.date.getSeconds()-1);}setTo(s){this.date.setSeconds(parseInt(s.substr(-2)));}toString(){let s=this.date.getSeconds();return this.token.length>1?String(s).padStart(2,"0"):s}}return po=e,po}var mo,Ad;function sv(){if(Ad)return mo;Ad=1;let t=nt();class e extends t{constructor(s={}){super(s);}up(){this.date.setFullYear(this.date.getFullYear()+1);}down(){this.date.setFullYear(this.date.getFullYear()-1);}setTo(s){this.date.setFullYear(s.substr(-4));}toString(){let s=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?s.substr(-2):s}}return mo=e,mo}var go,Od;function iv(){return Od||(Od=1,go={DatePart:nt(),Meridiem:zy(),Day:Xy(),Hours:Zy(),Milliseconds:Qy(),Minutes:ev(),Month:tv(),Seconds:rv(),Year:sv()}),go}var Do,Rd;function nv(){if(Rd)return Do;Rd=1;let t=Re(),e=gt(),{style:r,clear:s,figures:i}=Ve(),{erase:n,cursor:o}=Se(),{DatePart:u,Meridiem:a,Day:h,Hours:l,Milliseconds:c,Minutes:d,Month:f,Seconds:p,Year:m}=iv(),g=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,y={1:({token:F})=>F.replace(/\\(.)/g,"$1"),2:F=>new h(F),3:F=>new f(F),4:F=>new m(F),5:F=>new a(F),6:F=>new l(F),7:F=>new d(F),8:F=>new p(F),9:F=>new c(F)},v={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class _ extends e{constructor(E={}){super(E),this.msg=E.message,this.cursor=0,this.typed="",this.locales=Object.assign(v,E.locales),this._date=E.initial||new Date,this.errorMsg=E.error||"Please Enter A Valid Value",this.validator=E.validate||(()=>true),this.mask=E.mask||"YYYY-MM-DD HH:mm:ss",this.clear=s("",this.out.columns),this.render();}get value(){return this.date}get date(){return this._date}set date(E){E&&this._date.setTime(E.getTime());}set mask(E){let S;for(this.parts=[];S=g.exec(E);){let O=S.shift(),T=S.findIndex(te=>te!=null);this.parts.push(T in y?y[T]({token:S[T]||O,date:this.date,parts:this.parts,locales:this.locales}):S[T]||O);}let P=this.parts.reduce((O,T)=>(typeof T=="string"&&typeof O[O.length-1]=="string"?O[O.length-1]+=T:O.push(T),O),[]);this.parts.splice(0),this.parts.push(...P),this.reset();}moveCursor(E){this.typed="",this.cursor=E,this.fire();}reset(){this.moveCursor(this.parts.findIndex(E=>E instanceof u)),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.error=false,this.fire(),this.render(),this.out.write(`
182
182
  `),this.close();}async validate(){let E=await this.validator(this.value);typeof E=="string"&&(this.errorMsg=E,E=false),this.error=!E;}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
183
- `),this.close();}up(){this.typed="",this.parts[this.cursor].up(),this.render();}down(){this.typed="",this.parts[this.cursor].down(),this.render();}left(){let E=this.parts[this.cursor].prev();if(E==null)return this.bell();this.moveCursor(this.parts.indexOf(E)),this.render();}right(){let E=this.parts[this.cursor].next();if(E==null)return this.bell();this.moveCursor(this.parts.indexOf(E)),this.render();}next(){let E=this.parts[this.cursor].next();this.moveCursor(E?this.parts.indexOf(E):this.parts.findIndex(R=>R instanceof u)),this.render();}_(E){/\d/.test(E)&&(this.typed+=E,this.parts[this.cursor].setTo(this.typed),this.render());}render(){this.closed||(this.firstRender?this.out.write(o.hide):this.out.write(s(this.outputText,this.out.columns)),super.render(),this.outputText=[r.symbol(this.done,this.aborted),t.bold(this.msg),r.delimiter(false),this.parts.reduce((E,R,P)=>E.concat(P===this.cursor&&!this.done?t.cyan().underline(R.toString()):R),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
184
- `).reduce((E,R,P)=>E+`
185
- ${P?" ":i.pointerSmall} ${t.red().italic(R)}`,"")),this.out.write(n.line+o.to(0)+this.outputText));}}return po=v,po}var mo,Ad;function Ky(){if(Ad)return mo;Ad=1;let t=Se(),e=mt(),{cursor:r,erase:s}=Re(),{style:i,figures:n,clear:o,lines:u}=Ge(),a=/[0-9]/,h=d=>d!==void 0,l=(d,f)=>{let p=Math.pow(10,f);return Math.round(d*p)/p};class c extends e{constructor(f={}){super(f),this.transform=i.render(f.style),this.msg=f.message,this.initial=h(f.initial)?f.initial:"",this.float=!!f.float,this.round=f.round||2,this.inc=f.increment||1,this.min=h(f.min)?f.min:-1/0,this.max=h(f.max)?f.max:1/0,this.errorMsg=f.error||"Please Enter A Valid Value",this.validator=f.validate||(()=>true),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render();}set value(f){!f&&f!==0?(this.placeholder=true,this.rendered=t.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=false,this.rendered=this.transform.render(`${l(f,this.round)}`),this._value=l(f,this.round)),this.fire();}get value(){return this._value}parse(f){return this.float?parseFloat(f):parseInt(f)}valid(f){return f==="-"||f==="."&&this.float||a.test(f)}reset(){this.typed="",this.value="",this.fire(),this.render();}exit(){this.abort();}abort(){let f=this.value;this.value=f!==""?f:this.initial,this.done=this.aborted=true,this.error=false,this.fire(),this.render(),this.out.write(`
183
+ `),this.close();}up(){this.typed="",this.parts[this.cursor].up(),this.render();}down(){this.typed="",this.parts[this.cursor].down(),this.render();}left(){let E=this.parts[this.cursor].prev();if(E==null)return this.bell();this.moveCursor(this.parts.indexOf(E)),this.render();}right(){let E=this.parts[this.cursor].next();if(E==null)return this.bell();this.moveCursor(this.parts.indexOf(E)),this.render();}next(){let E=this.parts[this.cursor].next();this.moveCursor(E?this.parts.indexOf(E):this.parts.findIndex(S=>S instanceof u)),this.render();}_(E){/\d/.test(E)&&(this.typed+=E,this.parts[this.cursor].setTo(this.typed),this.render());}render(){this.closed||(this.firstRender?this.out.write(o.hide):this.out.write(s(this.outputText,this.out.columns)),super.render(),this.outputText=[r.symbol(this.done,this.aborted),t.bold(this.msg),r.delimiter(false),this.parts.reduce((E,S,P)=>E.concat(P===this.cursor&&!this.done?t.cyan().underline(S.toString()):S),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
184
+ `).reduce((E,S,P)=>E+`
185
+ ${P?" ":i.pointerSmall} ${t.red().italic(S)}`,"")),this.out.write(n.line+o.to(0)+this.outputText));}}return Do=_,Do}var bo,Sd;function ov(){if(Sd)return bo;Sd=1;let t=Re(),e=gt(),{cursor:r,erase:s}=Se(),{style:i,figures:n,clear:o,lines:u}=Ve(),a=/[0-9]/,h=d=>d!==void 0,l=(d,f)=>{let p=Math.pow(10,f);return Math.round(d*p)/p};class c extends e{constructor(f={}){super(f),this.transform=i.render(f.style),this.msg=f.message,this.initial=h(f.initial)?f.initial:"",this.float=!!f.float,this.round=f.round||2,this.inc=f.increment||1,this.min=h(f.min)?f.min:-1/0,this.max=h(f.max)?f.max:1/0,this.errorMsg=f.error||"Please Enter A Valid Value",this.validator=f.validate||(()=>true),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render();}set value(f){!f&&f!==0?(this.placeholder=true,this.rendered=t.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=false,this.rendered=this.transform.render(`${l(f,this.round)}`),this._value=l(f,this.round)),this.fire();}get value(){return this._value}parse(f){return this.float?parseFloat(f):parseInt(f)}valid(f){return f==="-"||f==="."&&this.float||a.test(f)}reset(){this.typed="",this.value="",this.fire(),this.render();}exit(){this.abort();}abort(){let f=this.value;this.value=f!==""?f:this.initial,this.done=this.aborted=true,this.error=false,this.fire(),this.render(),this.out.write(`
186
186
  `),this.close();}async validate(){let f=await this.validator(this.value);typeof f=="string"&&(this.errorMsg=f,f=false),this.error=!f;}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let f=this.value;this.value=f!==""?f:this.initial,this.done=true,this.aborted=false,this.error=false,this.fire(),this.render(),this.out.write(`
187
187
  `),this.close();}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render();}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render();}delete(){let f=this.value.toString();if(f.length===0)return this.bell();this.value=this.parse(f=f.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render();}next(){this.value=this.initial,this.fire(),this.render();}_(f,p){if(!this.valid(f))return this.bell();let m=Date.now();if(m-this.lastHit>1e3&&(this.typed=""),this.typed+=f,this.lastHit=m,this.color="cyan",f===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render();}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(r.down(u(this.outputError,this.out.columns)-1)+o(this.outputError,this.out.columns)),this.out.write(o(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[i.symbol(this.done,this.aborted),t.bold(this.msg),i.delimiter(this.done),!this.done||!this.done&&!this.placeholder?t[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
188
188
  `).reduce((f,p,m)=>f+`
189
- ${m?" ":n.pointerSmall} ${t.red().italic(p)}`,"")),this.out.write(s.line+r.to(0)+this.outputText+r.save+this.outputError+r.restore));}}return mo=c,mo}var go,Od;function Zd(){if(Od)return go;Od=1;let t=Se(),{cursor:e}=Re(),r=mt(),{clear:s,figures:i,style:n,wrap:o,entriesToDisplay:u}=Ge();class a extends r{constructor(l={}){super(l),this.msg=l.message,this.cursor=l.cursor||0,this.scrollIndex=l.cursor||0,this.hint=l.hint||"",this.warn=l.warn||"- This option is disabled -",this.minSelected=l.min,this.showMinError=false,this.maxChoices=l.max,this.instructions=l.instructions,this.optionsPerPage=l.optionsPerPage||10,this.value=l.choices.map((c,d)=>(typeof c=="string"&&(c={title:c,value:d}),{title:c&&(c.title||c.value||c),description:c&&c.description,value:c&&(c.value===void 0?d:c.value),selected:c&&c.selected,disabled:c&&c.disabled})),this.clear=s("",this.out.columns),l.overrideRender||this.render();}reset(){this.value.map(l=>!l.selected),this.cursor=0,this.fire(),this.render();}selected(){return this.value.filter(l=>l.selected)}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
189
+ ${m?" ":n.pointerSmall} ${t.red().italic(p)}`,"")),this.out.write(s.line+r.to(0)+this.outputText+r.save+this.outputError+r.restore));}}return bo=c,bo}var yo,Td;function tf(){if(Td)return yo;Td=1;let t=Re(),{cursor:e}=Se(),r=gt(),{clear:s,figures:i,style:n,wrap:o,entriesToDisplay:u}=Ve();class a extends r{constructor(l={}){super(l),this.msg=l.message,this.cursor=l.cursor||0,this.scrollIndex=l.cursor||0,this.hint=l.hint||"",this.warn=l.warn||"- This option is disabled -",this.minSelected=l.min,this.showMinError=false,this.maxChoices=l.max,this.instructions=l.instructions,this.optionsPerPage=l.optionsPerPage||10,this.value=l.choices.map((c,d)=>(typeof c=="string"&&(c={title:c,value:d}),{title:c&&(c.title||c.value||c),description:c&&c.description,value:c&&(c.value===void 0?d:c.value),selected:c&&c.selected,disabled:c&&c.disabled})),this.clear=s("",this.out.columns),l.overrideRender||this.render();}reset(){this.value.map(l=>!l.selected),this.cursor=0,this.fire(),this.render();}selected(){return this.value.filter(l=>l.selected)}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
190
190
  `),this.close();}submit(){let l=this.value.filter(c=>c.selected);this.minSelected&&l.length<this.minSelected?(this.showMinError=true,this.render()):(this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
191
191
  `),this.close());}first(){this.cursor=0,this.render();}last(){this.cursor=this.value.length-1,this.render();}next(){this.cursor=(this.cursor+1)%this.value.length,this.render();}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render();}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render();}left(){this.value[this.cursor].selected=false,this.render();}right(){if(this.value.filter(l=>l.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true,this.render();}handleSpaceToggle(){let l=this.value[this.cursor];if(l.selected)l.selected=false,this.render();else {if(l.disabled||this.value.filter(c=>c.selected).length>=this.maxChoices)return this.bell();l.selected=true,this.render();}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let l=!this.value[this.cursor].selected;this.value.filter(c=>!c.disabled).forEach(c=>c.selected=l),this.render();}_(l,c){if(l===" ")this.handleSpaceToggle();else if(l==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
192
192
  Instructions:
@@ -196,13 +196,13 @@ Instructions:
196
196
  `:"")+" enter/return: Complete answer":""}renderOption(l,c,d,f){let p=(c.selected?t.green(i.radioOn):i.radioOff)+" "+f+" ",m,g;return c.disabled?m=l===d?t.gray().underline(c.title):t.strikethrough().gray(c.title):(m=l===d?t.cyan().underline(c.title):c.title,l===d&&c.description&&(g=` - ${c.description}`,(p.length+m.length+g.length>=this.out.columns||c.description.split(/\r?\n/).length>1)&&(g=`
197
197
  `+o(c.description,{margin:p.length,width:this.out.columns})))),p+m+t.gray(g||"")}paginateOptions(l){if(l.length===0)return t.red("No matches for this query.");let{startIndex:c,endIndex:d}=u(this.cursor,l.length,this.optionsPerPage),f,p=[];for(let m=c;m<d;m++)m===c&&c>0?f=i.arrowUp:m===d-1&&d<l.length?f=i.arrowDown:f=" ",p.push(this.renderOption(this.cursor,l[m],m,f));return `
198
198
  `+p.join(`
199
- `)}renderOptions(l){return this.done?"":this.paginateOptions(l)}renderDoneOrInstructions(){if(this.done)return this.value.filter(c=>c.selected).map(c=>c.title).join(", ");let l=[t.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&l.push(t.yellow(this.warn)),l.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(e.hide),super.render();let l=[n.symbol(this.done,this.aborted),t.bold(this.msg),n.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(l+=t.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=false),l+=this.renderOptions(this.value),this.out.write(this.clear+l),this.clear=s(l,this.out.columns);}}return go=a,go}var Do,Sd;function zy(){if(Sd)return Do;Sd=1;let t=Se(),e=mt(),{erase:r,cursor:s}=Re(),{style:i,clear:n,figures:o,wrap:u,entriesToDisplay:a}=Ge(),h=(f,p)=>f[p]&&(f[p].value||f[p].title||f[p]),l=(f,p)=>f[p]&&(f[p].title||f[p].value||f[p]),c=(f,p)=>{let m=f.findIndex(g=>g.value===p||g.title===p);return m>-1?m:void 0};class d extends e{constructor(p={}){super(p),this.msg=p.message,this.suggest=p.suggest,this.choices=p.choices,this.initial=typeof p.initial=="number"?p.initial:c(p.choices,p.initial),this.select=this.initial||p.cursor||0,this.i18n={noMatches:p.noMatches||"no matches found"},this.fallback=p.fallback||this.initial,this.clearFirst=p.clearFirst||false,this.suggestions=[],this.input="",this.limit=p.limit||10,this.cursor=0,this.transform=i.render(p.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=n("",this.out.columns),this.complete(this.render),this.render();}set fallback(p){this._fb=Number.isSafeInteger(parseInt(p))?parseInt(p):p;}get fallback(){let p;return typeof this._fb=="number"?p=this.choices[this._fb]:typeof this._fb=="string"&&(p={title:this._fb}),p||this._fb||{title:this.i18n.noMatches}}moveSelect(p){this.select=p,this.suggestions.length>0?this.value=h(this.suggestions,p):this.value=this.fallback.value,this.fire();}async complete(p){let m=this.completing=this.suggest(this.input,this.choices),g=await m;if(this.completing!==m)return;this.suggestions=g.map((y,v,F)=>({title:l(F,v),value:h(F,v),description:y.description})),this.completing=false;let b=Math.max(g.length-1,0);this.moveSelect(Math.min(b,this.select)),p&&p();}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render();}),this.render();}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
199
+ `)}renderOptions(l){return this.done?"":this.paginateOptions(l)}renderDoneOrInstructions(){if(this.done)return this.value.filter(c=>c.selected).map(c=>c.title).join(", ");let l=[t.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&l.push(t.yellow(this.warn)),l.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(e.hide),super.render();let l=[n.symbol(this.done,this.aborted),t.bold(this.msg),n.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(l+=t.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=false),l+=this.renderOptions(this.value),this.out.write(this.clear+l),this.clear=s(l,this.out.columns);}}return yo=a,yo}var vo,Pd;function uv(){if(Pd)return vo;Pd=1;let t=Re(),e=gt(),{erase:r,cursor:s}=Se(),{style:i,clear:n,figures:o,wrap:u,entriesToDisplay:a}=Ve(),h=(f,p)=>f[p]&&(f[p].value||f[p].title||f[p]),l=(f,p)=>f[p]&&(f[p].title||f[p].value||f[p]),c=(f,p)=>{let m=f.findIndex(g=>g.value===p||g.title===p);return m>-1?m:void 0};class d extends e{constructor(p={}){super(p),this.msg=p.message,this.suggest=p.suggest,this.choices=p.choices,this.initial=typeof p.initial=="number"?p.initial:c(p.choices,p.initial),this.select=this.initial||p.cursor||0,this.i18n={noMatches:p.noMatches||"no matches found"},this.fallback=p.fallback||this.initial,this.clearFirst=p.clearFirst||false,this.suggestions=[],this.input="",this.limit=p.limit||10,this.cursor=0,this.transform=i.render(p.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=n("",this.out.columns),this.complete(this.render),this.render();}set fallback(p){this._fb=Number.isSafeInteger(parseInt(p))?parseInt(p):p;}get fallback(){let p;return typeof this._fb=="number"?p=this.choices[this._fb]:typeof this._fb=="string"&&(p={title:this._fb}),p||this._fb||{title:this.i18n.noMatches}}moveSelect(p){this.select=p,this.suggestions.length>0?this.value=h(this.suggestions,p):this.value=this.fallback.value,this.fire();}async complete(p){let m=this.completing=this.suggest(this.input,this.choices),g=await m;if(this.completing!==m)return;this.suggestions=g.map((v,_,F)=>({title:l(F,_),value:h(F,_),description:v.description})),this.completing=false;let y=Math.max(g.length-1,0);this.moveSelect(Math.min(y,this.select)),p&&p();}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render();}),this.render();}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
200
200
  `),this.close());}abort(){this.done=this.aborted=true,this.exited=false,this.fire(),this.render(),this.out.write(`
201
201
  `),this.close();}submit(){this.done=true,this.aborted=this.exited=false,this.fire(),this.render(),this.out.write(`
202
- `),this.close();}_(p,m){let g=this.input.slice(0,this.cursor),b=this.input.slice(this.cursor);this.input=`${g}${p}${b}`,this.cursor=g.length+1,this.complete(this.render),this.render();}delete(){if(this.cursor===0)return this.bell();let p=this.input.slice(0,this.cursor-1),m=this.input.slice(this.cursor);this.input=`${p}${m}`,this.complete(this.render),this.cursor=this.cursor-1,this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let p=this.input.slice(0,this.cursor),m=this.input.slice(this.cursor+1);this.input=`${p}${m}`,this.complete(this.render),this.render();}first(){this.moveSelect(0),this.render();}last(){this.moveSelect(this.suggestions.length-1),this.render();}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render();}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render();}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render();}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render();}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render();}renderOption(p,m,g,b){let y,v=g?o.arrowUp:b?o.arrowDown:" ",F=m?t.cyan().underline(p.title):p.title;return v=(m?t.cyan(o.pointer)+" ":" ")+v,p.description&&(y=` - ${p.description}`,(v.length+F.length+y.length>=this.out.columns||p.description.split(/\r?\n/).length>1)&&(y=`
203
- `+u(p.description,{margin:3,width:this.out.columns}))),v+" "+F+t.gray(y||"")}render(){if(this.closed)return;this.firstRender?this.out.write(s.hide):this.out.write(n(this.outputText,this.out.columns)),super.render();let{startIndex:p,endIndex:m}=a(this.select,this.choices.length,this.limit);if(this.outputText=[i.symbol(this.done,this.aborted,this.exited),t.bold(this.msg),i.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let g=this.suggestions.slice(p,m).map((b,y)=>this.renderOption(b,this.select===y+p,y===0&&p>0,y+p===m-1&&m<this.choices.length)).join(`
202
+ `),this.close();}_(p,m){let g=this.input.slice(0,this.cursor),y=this.input.slice(this.cursor);this.input=`${g}${p}${y}`,this.cursor=g.length+1,this.complete(this.render),this.render();}delete(){if(this.cursor===0)return this.bell();let p=this.input.slice(0,this.cursor-1),m=this.input.slice(this.cursor);this.input=`${p}${m}`,this.complete(this.render),this.cursor=this.cursor-1,this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let p=this.input.slice(0,this.cursor),m=this.input.slice(this.cursor+1);this.input=`${p}${m}`,this.complete(this.render),this.render();}first(){this.moveSelect(0),this.render();}last(){this.moveSelect(this.suggestions.length-1),this.render();}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render();}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render();}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render();}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render();}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render();}renderOption(p,m,g,y){let v,_=g?o.arrowUp:y?o.arrowDown:" ",F=m?t.cyan().underline(p.title):p.title;return _=(m?t.cyan(o.pointer)+" ":" ")+_,p.description&&(v=` - ${p.description}`,(_.length+F.length+v.length>=this.out.columns||p.description.split(/\r?\n/).length>1)&&(v=`
203
+ `+u(p.description,{margin:3,width:this.out.columns}))),_+" "+F+t.gray(v||"")}render(){if(this.closed)return;this.firstRender?this.out.write(s.hide):this.out.write(n(this.outputText,this.out.columns)),super.render();let{startIndex:p,endIndex:m}=a(this.select,this.choices.length,this.limit);if(this.outputText=[i.symbol(this.done,this.aborted,this.exited),t.bold(this.msg),i.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let g=this.suggestions.slice(p,m).map((y,v)=>this.renderOption(y,this.select===v+p,v===0&&p>0,v+p===m-1&&m<this.choices.length)).join(`
204
204
  `);this.outputText+=`
205
- `+(g||t.gray(this.fallback.title));}this.out.write(r.line+s.to(0)+this.outputText);}}return Do=d,Do}var bo,Rd;function Xy(){if(Rd)return bo;Rd=1;let t=Se(),{cursor:e}=Re(),r=Zd(),{clear:s,style:i,figures:n}=Ge();class o extends r{constructor(a={}){a.overrideRender=true,super(a),this.inputValue="",this.clear=s("",this.out.columns),this.filteredOptions=this.value,this.render();}last(){this.cursor=this.filteredOptions.length-1,this.render();}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render();}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render();}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render();}left(){this.filteredOptions[this.cursor].selected=false,this.render();}right(){if(this.value.filter(a=>a.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true,this.render();}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions());}updateFilteredOptions(){let a=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(l=>this.inputValue?!!(typeof l.title=="string"&&l.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof l.value=="string"&&l.value.toLowerCase().includes(this.inputValue.toLowerCase())):true);let h=this.filteredOptions.findIndex(l=>l===a);this.cursor=h<0?0:h,this.render();}handleSpaceToggle(){let a=this.filteredOptions[this.cursor];if(a.selected)a.selected=false,this.render();else {if(a.disabled||this.value.filter(h=>h.selected).length>=this.maxChoices)return this.bell();a.selected=true,this.render();}}handleInputChange(a){this.inputValue=this.inputValue+a,this.updateFilteredOptions();}_(a,h){a===" "?this.handleSpaceToggle():this.handleInputChange(a);}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
205
+ `+(g||t.gray(this.fallback.title));}this.out.write(r.line+s.to(0)+this.outputText);}}return vo=d,vo}var Co,$d;function av(){if($d)return Co;$d=1;let t=Re(),{cursor:e}=Se(),r=tf(),{clear:s,style:i,figures:n}=Ve();class o extends r{constructor(a={}){a.overrideRender=true,super(a),this.inputValue="",this.clear=s("",this.out.columns),this.filteredOptions=this.value,this.render();}last(){this.cursor=this.filteredOptions.length-1,this.render();}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render();}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render();}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render();}left(){this.filteredOptions[this.cursor].selected=false,this.render();}right(){if(this.value.filter(a=>a.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true,this.render();}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions());}updateFilteredOptions(){let a=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(l=>this.inputValue?!!(typeof l.title=="string"&&l.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof l.value=="string"&&l.value.toLowerCase().includes(this.inputValue.toLowerCase())):true);let h=this.filteredOptions.findIndex(l=>l===a);this.cursor=h<0?0:h,this.render();}handleSpaceToggle(){let a=this.filteredOptions[this.cursor];if(a.selected)a.selected=false,this.render();else {if(a.disabled||this.value.filter(h=>h.selected).length>=this.maxChoices)return this.bell();a.selected=true,this.render();}}handleInputChange(a){this.inputValue=this.inputValue+a,this.updateFilteredOptions();}_(a,h){a===" "?this.handleSpaceToggle():this.handleInputChange(a);}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
206
206
  Instructions:
207
207
  ${n.arrowUp}/${n.arrowDown}: Highlight option
208
208
  ${n.arrowLeft}/${n.arrowRight}/[space]: Toggle selection
@@ -210,30 +210,30 @@ Instructions:
210
210
  enter/return: Complete answer
211
211
  `:""}renderCurrentInput(){return `
212
212
  Filtered results for: ${this.inputValue?this.inputValue:t.gray("Enter something to filter")}
213
- `}renderOption(a,h,l,c){let d=(h.selected?t.green(n.radioOn):n.radioOff)+" "+c+" ",f;return h.disabled?f=a===l?t.gray().underline(h.title):t.strikethrough().gray(h.title):f=a===l?t.cyan().underline(h.title):h.title,d+f}renderDoneOrInstructions(){if(this.done)return this.value.filter(h=>h.selected).map(h=>h.title).join(", ");let a=[t.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&a.push(t.yellow(this.warn)),a.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(e.hide),super.render();let a=[i.symbol(this.done,this.aborted),t.bold(this.msg),i.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(a+=t.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=false),a+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+a),this.clear=s(a,this.out.columns);}}return bo=o,bo}var yo,Td;function Zy(){if(Td)return yo;Td=1;let t=Se(),e=mt(),{style:r,clear:s}=Ge(),{erase:i,cursor:n}=Re();class o extends e{constructor(a={}){super(a),this.msg=a.message,this.value=a.initial,this.initialValue=!!a.initial,this.yesMsg=a.yes||"yes",this.yesOption=a.yesOption||"(Y/n)",this.noMsg=a.no||"no",this.noOption=a.noOption||"(y/N)",this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
213
+ `}renderOption(a,h,l,c){let d=(h.selected?t.green(n.radioOn):n.radioOff)+" "+c+" ",f;return h.disabled?f=a===l?t.gray().underline(h.title):t.strikethrough().gray(h.title):f=a===l?t.cyan().underline(h.title):h.title,d+f}renderDoneOrInstructions(){if(this.done)return this.value.filter(h=>h.selected).map(h=>h.title).join(", ");let a=[t.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&a.push(t.yellow(this.warn)),a.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(e.hide),super.render();let a=[i.symbol(this.done,this.aborted),t.bold(this.msg),i.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(a+=t.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=false),a+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+a),this.clear=s(a,this.out.columns);}}return Co=o,Co}var xo,kd;function lv(){if(kd)return xo;kd=1;let t=Re(),e=gt(),{style:r,clear:s}=Ve(),{erase:i,cursor:n}=Se();class o extends e{constructor(a={}){super(a),this.msg=a.message,this.value=a.initial,this.initialValue=!!a.initial,this.yesMsg=a.yes||"yes",this.yesOption=a.yesOption||"(Y/n)",this.noMsg=a.no||"no",this.noOption=a.noOption||"(y/N)",this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
214
214
  `),this.close();}submit(){this.value=this.value||false,this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
215
- `),this.close();}_(a,h){return a.toLowerCase()==="y"?(this.value=true,this.submit()):a.toLowerCase()==="n"?(this.value=false,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(n.hide):this.out.write(s(this.outputText,this.out.columns)),super.render(),this.outputText=[r.symbol(this.done,this.aborted),t.bold(this.msg),r.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:t.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(i.line+n.to(0)+this.outputText));}}return yo=o,yo}var Co,Pd;function Qy(){return Pd||(Pd=1,Co={TextPrompt:By(),SelectPrompt:My(),TogglePrompt:Hy(),DatePrompt:Jy(),NumberPrompt:Ky(),MultiselectPrompt:Zd(),AutocompletePrompt:zy(),AutocompleteMultiselectPrompt:Xy(),ConfirmPrompt:Zy()}),Co}var $d;function eC(){return $d||($d=1,function(t){let e=t,r=Qy(),s=o=>o;function i(o,u,a={}){return new Promise((h,l)=>{let c=new r[o](u),d=a.onAbort||s,f=a.onSubmit||s,p=a.onExit||s;c.on("state",u.onState||s),c.on("submit",m=>h(f(m))),c.on("exit",m=>h(p(m))),c.on("abort",m=>l(d(m)));})}e.text=o=>i("TextPrompt",o),e.password=o=>(o.style="password",e.text(o)),e.invisible=o=>(o.style="invisible",e.text(o)),e.number=o=>i("NumberPrompt",o),e.date=o=>i("DatePrompt",o),e.confirm=o=>i("ConfirmPrompt",o),e.list=o=>{let u=o.separator||",";return i("TextPrompt",o,{onSubmit:a=>a.split(u).map(h=>h.trim())})},e.toggle=o=>i("TogglePrompt",o),e.select=o=>i("SelectPrompt",o),e.multiselect=o=>{o.choices=[].concat(o.choices||[]);let u=a=>a.filter(h=>h.selected).map(h=>h.value);return i("MultiselectPrompt",o,{onAbort:u,onSubmit:u})},e.autocompleteMultiselect=o=>{o.choices=[].concat(o.choices||[]);let u=a=>a.filter(h=>h.selected).map(h=>h.value);return i("AutocompleteMultiselectPrompt",o,{onAbort:u,onSubmit:u})};let n=(o,u)=>Promise.resolve(u.filter(a=>a.title.slice(0,o.length).toLowerCase()===o.toLowerCase()));e.autocomplete=o=>(o.suggest=o.suggest||n,o.choices=[].concat(o.choices||[]),i("AutocompletePrompt",o));}(Ln)),Ln}var _o,kd;function tC(){if(kd)return _o;kd=1;let t=eC(),e=["suggest","format","onState","validate","onRender","type"],r=()=>{};async function s(u=[],{onSubmit:a=r,onCancel:h=r}={}){let l={},c=s._override||{};u=[].concat(u);let d,f,p,m,g,b,y=async(v,F,E=false)=>{if(!(!E&&v.validate&&v.validate(F)!==true))return v.format?await v.format(F,l):F};for(f of u)if({name:m,type:g}=f,typeof g=="function"&&(g=await g(d,{...l},f),f.type=g),!!g){for(let v in f){if(e.includes(v))continue;let F=f[v];f[v]=typeof F=="function"?await F(d,{...l},b):F;}if(b=f,typeof f.message!="string")throw new Error("prompt message is required");if({name:m,type:g}=f,t[g]===void 0)throw new Error(`prompt type (${g}) is not defined`);if(c[f.name]!==void 0&&(d=await y(f,c[f.name]),d!==void 0)){l[m]=d;continue}try{d=s._injected?i(s._injected,f.initial):await t[g](f),l[m]=d=await y(f,d,!0),p=await a(f,d,l);}catch{p=!await h(f,l);}if(p)return l}return l}function i(u,a){let h=u.shift();if(h instanceof Error)throw h;return h===void 0?a:h}function n(u){s._injected=(s._injected||[]).concat(u);}function o(u){s._override=Object.assign({},u);}return _o=Object.assign(s,{prompt:s,prompts:t,inject:n,override:o}),_o}var vo,Id;function rC(){return Id||(Id=1,vo=tC()),vo}var sC=rC(),iC=So(sC);var tf=["npm","yarn","yarn@berry","pnpm","pnpm@6","bun","deno"],Oo={"bun.lock":"bun","bun.lockb":"bun","deno.lock":"deno","pnpm-lock.yaml":"pnpm","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"},rf={bun:"https://bun.sh",deno:"https://deno.com",pnpm:"https://pnpm.io/installation","pnpm@6":"https://pnpm.io/6.x/installation",yarn:"https://classic.yarnpkg.com/en/docs/install","yarn@berry":"https://yarnpkg.com/getting-started/install",npm:"https://docs.npmjs.com/cli/v8/configuring-npm/install"};async function hC(t={}){let{cwd:e,onUnknown:r}=t;for(let s of dC(e)){for(let n of Object.keys(Oo))if(await sf(vt__default.default.join(s,n))){let o=Oo[n],u=await Md(vt__default.default.join(s,"package.json"),r);return u||{name:o,agent:o}}let i=await Md(vt__default.default.join(s,"package.json"),r);if(i)return i}return null}function*dC(t=ke__default.default.cwd()){let e=vt__default.default.resolve(t),{root:r}=vt__default.default.parse(e);for(;e&&e!==r;)yield e,e=vt__default.default.dirname(e);}async function Md(t,e){return !t||!await sf(t)?null:fC(t,e)}function fC(t,e){try{let r=JSON.parse(Kd__default.default.readFileSync(t,"utf8")),s;if(typeof r.packageManager=="string"){let[i,n]=r.packageManager.replace(/^\^/,"").split("@"),o=n;return i==="yarn"&&Number.parseInt(n)>1?(s="yarn@berry",o="berry",{name:i,agent:s,version:o}):i==="pnpm"&&Number.parseInt(n)<7?(s="pnpm@6",{name:i,agent:s,version:o}):tf.includes(i)?(s=i,{name:i,agent:s,version:o}):e?.(r.packageManager)??null}}catch{}return null}async function sf(t){try{if((await zd__default.default.stat(t)).isFile())return !0}catch{}return false}var L="\x1B[",mr="\x1B]",Nt="\x07",as=";",nf=process.env.TERM_PROGRAM==="Apple_Terminal",B={};B.cursorTo=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");return typeof e!="number"?L+(t+1)+"G":L+(e+1)+";"+(t+1)+"H"};B.cursorMove=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");let r="";return t<0?r+=L+-t+"D":t>0&&(r+=L+t+"C"),e<0?r+=L+-e+"A":e>0&&(r+=L+e+"B"),r};B.cursorUp=(t=1)=>L+t+"A";B.cursorDown=(t=1)=>L+t+"B";B.cursorForward=(t=1)=>L+t+"C";B.cursorBackward=(t=1)=>L+t+"D";B.cursorLeft=L+"G";B.cursorSavePosition=nf?"\x1B7":L+"s";B.cursorRestorePosition=nf?"\x1B8":L+"u";B.cursorGetPosition=L+"6n";B.cursorNextLine=L+"E";B.cursorPrevLine=L+"F";B.cursorHide=L+"?25l";B.cursorShow=L+"?25h";B.eraseLines=t=>{let e="";for(let r=0;r<t;r++)e+=B.eraseLine+(r<t-1?B.cursorUp():"");return t&&(e+=B.cursorLeft),e};B.eraseEndLine=L+"K";B.eraseStartLine=L+"1K";B.eraseLine=L+"2K";B.eraseDown=L+"J";B.eraseUp=L+"1J";B.eraseScreen=L+"2J";B.scrollUp=L+"S";B.scrollDown=L+"T";B.clearScreen="\x1Bc";B.clearTerminal=process.platform==="win32"?`${B.eraseScreen}${L}0f`:`${B.eraseScreen}${L}3J${L}H`;B.beep=Nt;B.link=(t,e)=>[mr,"8",as,as,e,Nt,t,mr,"8",as,as,Nt].join("");B.image=(t,e={})=>{let r=`${mr}1337;File=inline=1`;return e.width&&(r+=`;width=${e.width}`),e.height&&(r+=`;height=${e.height}`),e.preserveAspectRatio===false&&(r+=";preserveAspectRatio=0"),r+":"+t.toString("base64")+Nt};B.iTerm={setCwd:(t=process.cwd())=>`${mr}50;CurrentDir=${t}${Nt}`,annotation:(t,e={})=>{let r=`${mr}1337;`,s=typeof e.x<"u",i=typeof e.y<"u";if((s||i)&&!(s&&i&&typeof e.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return t=t.replace(/\|/g,""),r+=e.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",e.length>0?r+=(s?[t,e.length,e.x,e.y]:[e.length,t]).join("|"):r+=t,r+Nt}};var xo,Hd;function of(){return Hd||(Hd=1,xo=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",s=e.indexOf(r+t),i=e.indexOf("--");return s!==-1&&(i===-1||s<i)}),xo}var Fo,Nd;function pC(){if(Nd)return Fo;Nd=1;let t=wy__default.default,e=mf__default.default,r=of(),{env:s}=process,i;r("no-color")||r("no-colors")||r("color=false")||r("color=never")?i=0:(r("color")||r("colors")||r("color=true")||r("color=always"))&&(i=1),"FORCE_COLOR"in s&&(s.FORCE_COLOR==="true"?i=1:s.FORCE_COLOR==="false"?i=0:i=s.FORCE_COLOR.length===0?1:Math.min(parseInt(s.FORCE_COLOR,10),3));function n(a){return a===0?false:{level:a,hasBasic:true,has256:a>=2,has16m:a>=3}}function o(a,h){if(i===0)return 0;if(r("color=16m")||r("color=full")||r("color=truecolor"))return 3;if(r("color=256"))return 2;if(a&&!h&&i===void 0)return 0;let l=i||0;if(s.TERM==="dumb")return l;if(process.platform==="win32"){let c=t.release().split(".");return Number(c[0])>=10&&Number(c[2])>=10586?Number(c[2])>=14931?3:2:1}if("CI"in s)return ["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(c=>c in s)||s.CI_NAME==="codeship"?1:l;if("TEAMCITY_VERSION"in s)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0;if(s.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in s){let c=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case "iTerm.app":return c>=3?3:2;case "Apple_Terminal":return 2}}return /-256(color)?$/i.test(s.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)||"COLORTERM"in s?1:l}function u(a){let h=o(a,a&&a.isTTY);return n(h)}return Fo={supportsColor:u,stdout:n(o(true,e.isatty(1))),stderr:n(o(true,e.isatty(2)))},Fo}var wo,qd;function mC(){if(qd)return wo;qd=1;let t=pC(),e=of();function r(i){if(/^\d{3,4}$/.test(i)){let o=/(\d{1,2})(\d{2})/.exec(i);return {major:0,minor:parseInt(o[1],10),patch:parseInt(o[2],10)}}let n=(i||"").split(".").map(o=>parseInt(o,10));return {major:n[0],minor:n[1],patch:n[2]}}function s(i){let{env:n}=process;if("FORCE_HYPERLINK"in n)return !(n.FORCE_HYPERLINK.length>0&&parseInt(n.FORCE_HYPERLINK,10)===0);if(e("no-hyperlink")||e("no-hyperlinks")||e("hyperlink=false")||e("hyperlink=never"))return false;if(e("hyperlink=true")||e("hyperlink=always"))return true;if(!t.supportsColor(i)||i&&!i.isTTY||process.platform==="win32")return false;if("NETLIFY"in n)return true;if("CI"in n||"TEAMCITY_VERSION"in n)return false;if("TERM_PROGRAM"in n){let o=r(n.TERM_PROGRAM_VERSION);switch(n.TERM_PROGRAM){case "iTerm.app":return o.major===3?o.minor>=1:o.major>3}}if("VTE_VERSION"in n){if(n.VTE_VERSION==="0.50.0")return false;let o=r(n.VTE_VERSION);return o.major>0||o.minor>=50}return false}return wo={supportsHyperlink:s,stdout:s(process.stdout),stderr:s(process.stderr)},wo}var gC=mC(),To=So(gC);function gr(t,e,{target:r="stdout",...s}={}){return To[r]?B.link(t,e):s.fallback===false?t:typeof s.fallback=="function"?s.fallback(t,e):`${t} (\u200B${e}\u200B)`}gr.isSupported=To.stdout;gr.stderr=(t,e,r={})=>gr(t,e,{target:"stderr",...r});gr.stderr.isSupported=To.stderr;var Ht=module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.cjs', document.baseURI).href))),DC=Object.create,uf=Object.defineProperty,bC=Object.getOwnPropertyDescriptor,yC=Object.getOwnPropertyNames,CC=Object.getPrototypeOf,_C=Object.prototype.hasOwnProperty,gt=(t=>typeof Ht<"u"?Ht:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof Ht<"u"?Ht:e)[r]}):t)(function(t){if(typeof Ht<"u")return Ht.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),be=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),vC=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of yC(e))!_C.call(t,i)&&i!==r&&uf(t,i,{get:()=>e[i],enumerable:!(s=bC(e,i))||s.enumerable});return t},xC=(t,e,r)=>(r=t!=null?DC(CC(t)):{},vC(uf(r,"default",{value:t,enumerable:true}),t)),FC=be((t,e)=>{e.exports=n,n.sync=o;var r=gt("fs");function s(u,a){var h=a.pathExt!==void 0?a.pathExt:process.env.PATHEXT;if(!h||(h=h.split(";"),h.indexOf("")!==-1))return true;for(var l=0;l<h.length;l++){var c=h[l].toLowerCase();if(c&&u.substr(-c.length).toLowerCase()===c)return true}return false}function i(u,a,h){return !u.isSymbolicLink()&&!u.isFile()?false:s(a,h)}function n(u,a,h){r.stat(u,function(l,c){h(l,l?false:i(c,u,a));});}function o(u,a){return i(r.statSync(u),u,a)}}),wC=be((t,e)=>{e.exports=s,s.sync=i;var r=gt("fs");function s(u,a,h){r.stat(u,function(l,c){h(l,l?false:n(c,a));});}function i(u,a){return n(r.statSync(u),a)}function n(u,a){return u.isFile()&&o(u,a)}function o(u,a){var h=u.mode,l=u.uid,c=u.gid,d=a.uid!==void 0?a.uid:process.getuid&&process.getuid(),f=a.gid!==void 0?a.gid:process.getgid&&process.getgid(),p=parseInt("100",8),m=parseInt("010",8),g=parseInt("001",8),b=p|m,y=h&g||h&m&&c===f||h&p&&l===d||h&b&&d===0;return y}}),EC=be((t,e)=>{gt("fs");var r;process.platform==="win32"||global.TESTING_WINDOWS?r=FC():r=wC(),e.exports=s,s.sync=i;function s(n,o,u){if(typeof o=="function"&&(u=o,o={}),!u){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(a,h){s(n,o||{},function(l,c){l?h(l):a(c);});})}r(n,o||{},function(a,h){a&&(a.code==="EACCES"||o&&o.ignoreErrors)&&(a=null,h=false),u(a,h);});}function i(n,o){try{return r.sync(n,o||{})}catch(u){if(o&&o.ignoreErrors||u.code==="EACCES")return false;throw u}}}),AC=be((t,e)=>{var r=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",s=gt("path"),i=r?";":":",n=EC(),o=l=>Object.assign(new Error(`not found: ${l}`),{code:"ENOENT"}),u=(l,c)=>{let d=c.colon||i,f=l.match(/\//)||r&&l.match(/\\/)?[""]:[...r?[process.cwd()]:[],...(c.path||process.env.PATH||"").split(d)],p=r?c.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",m=r?p.split(d):[""];return r&&l.indexOf(".")!==-1&&m[0]!==""&&m.unshift(""),{pathEnv:f,pathExt:m,pathExtExe:p}},a=(l,c,d)=>{typeof c=="function"&&(d=c,c={}),c||(c={});let{pathEnv:f,pathExt:p,pathExtExe:m}=u(l,c),g=[],b=v=>new Promise((F,E)=>{if(v===f.length)return c.all&&g.length?F(g):E(o(l));let R=f[v],P=/^".*"$/.test(R)?R.slice(1,-1):R,O=s.join(P,l),T=!P&&/^\.[\\\/]/.test(l)?l.slice(0,2)+O:O;F(y(T,v,0));}),y=(v,F,E)=>new Promise((R,P)=>{if(E===p.length)return R(b(F+1));let O=p[E];n(v+O,{pathExt:m},(T,te)=>{if(!T&&te)if(c.all)g.push(v+O);else return R(v+O);return R(y(v,F,E+1))});});return d?b(0).then(v=>d(null,v),d):b(0)},h=(l,c)=>{c=c||{};let{pathEnv:d,pathExt:f,pathExtExe:p}=u(l,c),m=[];for(let g=0;g<d.length;g++){let b=d[g],y=/^".*"$/.test(b)?b.slice(1,-1):b,v=s.join(y,l),F=!y&&/^\.[\\\/]/.test(l)?l.slice(0,2)+v:v;for(let E=0;E<f.length;E++){let R=F+f[E];try{if(n.sync(R,{pathExt:p}))if(c.all)m.push(R);else return R}catch{}}}if(c.all&&m.length)return m;if(c.nothrow)return null;throw o(l)};e.exports=a,a.sync=h;}),OC=be((t,e)=>{var r=(s={})=>{let i=s.env||process.env;return (s.platform||process.platform)!=="win32"?"PATH":Object.keys(i).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};e.exports=r,e.exports.default=r;}),SC=be((t,e)=>{var r=gt("path"),s=AC(),i=OC();function n(u,a){let h=u.options.env||process.env,l=process.cwd(),c=u.options.cwd!=null,d=c&&process.chdir!==void 0&&!process.chdir.disabled;if(d)try{process.chdir(u.options.cwd);}catch{}let f;try{f=s.sync(u.command,{path:h[i({env:h})],pathExt:a?r.delimiter:void 0});}catch{}finally{d&&process.chdir(l);}return f&&(f=r.resolve(c?u.options.cwd:"",f)),f}function o(u){return n(u)||n(u,true)}e.exports=o;}),RC=be((t,e)=>{var r=/([()\][%!^"`<>&|;, *?])/g;function s(n){return n=n.replace(r,"^$1"),n}function i(n,o){return n=`${n}`,n=n.replace(/(\\*)"/g,'$1$1\\"'),n=n.replace(/(\\*)$/,"$1$1"),n=`"${n}"`,n=n.replace(r,"^$1"),o&&(n=n.replace(r,"^$1")),n}e.exports.command=s,e.exports.argument=i;}),TC=be((t,e)=>{e.exports=/^#!(.*)/;}),PC=be((t,e)=>{var r=TC();e.exports=(s="")=>{let i=s.match(r);if(!i)return null;let[n,o]=i[0].replace(/#! ?/,"").split(" "),u=n.split("/").pop();return u==="env"?o:o?`${u} ${o}`:u};}),$C=be((t,e)=>{var r=gt("fs"),s=PC();function i(n){let o=Buffer.alloc(150),u;try{u=r.openSync(n,"r"),r.readSync(u,o,0,150,0),r.closeSync(u);}catch{}return s(o.toString())}e.exports=i;}),kC=be((t,e)=>{var r=gt("path"),s=SC(),i=RC(),n=$C(),o=process.platform==="win32",u=/\.(?:com|exe)$/i,a=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function h(d){d.file=s(d);let f=d.file&&n(d.file);return f?(d.args.unshift(d.file),d.command=f,s(d)):d.file}function l(d){if(!o)return d;let f=h(d),p=!u.test(f);if(d.options.forceShell||p){let m=a.test(f);d.command=r.normalize(d.command),d.command=i.command(d.command),d.args=d.args.map(b=>i.argument(b,m));let g=[d.command].concat(d.args).join(" ");d.args=["/d","/s","/c",`"${g}"`],d.command=process.env.comspec||"cmd.exe",d.options.windowsVerbatimArguments=true;}return d}function c(d,f,p){f&&!Array.isArray(f)&&(p=f,f=null),f=f?f.slice(0):[],p=Object.assign({},p);let m={command:d,args:f,options:p,file:void 0,original:{command:d,args:f}};return p.shell?m:l(m)}e.exports=c;}),IC=be((t,e)=>{var r=process.platform==="win32";function s(u,a){return Object.assign(new Error(`${a} ${u.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${a} ${u.command}`,path:u.command,spawnargs:u.args})}function i(u,a){if(!r)return;let h=u.emit;u.emit=function(l,c){if(l==="exit"){let d=n(c,a);if(d)return h.call(u,"error",d)}return h.apply(u,arguments)};}function n(u,a){return r&&u===1&&!a.file?s(a.original,"spawn"):null}function o(u,a){return r&&u===1&&!a.file?s(a.original,"spawnSync"):null}e.exports={hookChildProcess:i,verifyENOENT:n,verifyENOENTSync:o,notFoundError:s};}),BC=be((t,e)=>{var r=gt("child_process"),s=kC(),i=IC();function n(u,a,h){let l=s(u,a,h),c=r.spawn(l.command,l.args,l.options);return i.hookChildProcess(c,l),c}function o(u,a,h){let l=s(u,a,h),c=r.spawnSync(l.command,l.args,l.options);return c.error=c.error||i.verifyENOENTSync(c.status,l),c}e.exports=n,e.exports.spawn=n,e.exports.sync=o,e.exports._parse=s,e.exports._enoent=i;}),MC=/^path$/i,Ld={key:"PATH",value:""};function HC(t){for(let e in t){if(!Object.prototype.hasOwnProperty.call(t,e)||!MC.test(e))continue;let r=t[e];return r?{key:e,value:r}:Ld}return Ld}function NC(t,e){let r=e.value.split(vt.delimiter),s=t,i;do r.push(vt.resolve(s,"node_modules",".bin")),i=s,s=vt.dirname(s);while(s!==i);return {key:e.key,value:r.join(vt.delimiter)}}function qC(t,e){let r={...process.env,...e},s=NC(t,HC(r));return r[s.key]=s.value,r}var LC=t=>{let e=t.length,r=new stream.PassThrough,s=()=>{--e===0&&r.emit("end");};for(let i of t)i.pipe(r,{end:false}),i.on("end",s);return r},jC=xC(BC()),jd=class extends Error{result;output;get exitCode(){if(this.result.exitCode!==null)return this.result.exitCode}constructor(t,e){super(`Process exited with non-zero status (${t.exitCode})`),this.result=t,this.output=e;}},GC={timeout:void 0,persist:false},VC={windowsHide:true};function UC(t,e){return {command:vt.normalize(t),args:e??[]}}function WC(t){let e=new AbortController;for(let r of t){if(r.aborted)return e.abort(),r;let s=()=>{e.abort(r.reason);};r.addEventListener("abort",s,{signal:e.signal});}return e.signal}var YC=class{_process;_aborted=false;_options;_command;_args;_resolveClose;_processClosed;_thrownError;get process(){return this._process}get pid(){return this._process?.pid}get exitCode(){if(this._process&&this._process.exitCode!==null)return this._process.exitCode}constructor(t,e,r){this._options={...GC,...r},this._command=t,this._args=e??[],this._processClosed=new Promise(s=>{this._resolveClose=s;});}kill(t){return this._process?.kill(t)===true}get aborted(){return this._aborted}get killed(){return this._process?.killed===true}pipe(t,e,r){return JC(t,e,{...r,stdin:this})}async*[Symbol.asyncIterator](){let t=this._process;if(!t)return;let e=[];this._streamErr&&e.push(this._streamErr),this._streamOut&&e.push(this._streamOut);let r=LC(e),s=Jd__default.default.createInterface({input:r});for await(let i of s)yield i.toString();if(await this._processClosed,t.removeAllListeners(),this._thrownError)throw this._thrownError;if(this._options?.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new jd(this)}async _waitForOutput(){let t=this._process;if(!t)throw new Error("No process was started");let e="",r="";if(this._streamErr)for await(let i of this._streamErr)e+=i.toString();if(this._streamOut)for await(let i of this._streamOut)r+=i.toString();if(await this._processClosed,this._options?.stdin&&await this._options.stdin,t.removeAllListeners(),this._thrownError)throw this._thrownError;let s={stderr:e,stdout:r,exitCode:this.exitCode};if(this._options.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new jd(this,s);return s}then(t,e){return this._waitForOutput().then(t,e)}_streamOut;_streamErr;spawn(){let t=ke.cwd(),e=this._options,r={...VC,...e.nodeOptions},s=[];this._resetState(),e.timeout!==void 0&&s.push(AbortSignal.timeout(e.timeout)),e.signal!==void 0&&s.push(e.signal),e.persist===true&&(r.detached=true),s.length>0&&(r.signal=WC(s)),r.env=qC(t,r.env);let{command:i,args:n}=UC(this._command,this._args),o=(0, jC._parse)(i,n,r),u=child_process.spawn(o.command,o.args,o.options);if(u.stderr&&(this._streamErr=u.stderr),u.stdout&&(this._streamOut=u.stdout),this._process=u,u.once("error",this._onError),u.once("close",this._onClose),e.stdin!==void 0&&u.stdin&&e.stdin.process){let{stdout:a}=e.stdin.process;a&&a.pipe(u.stdin);}}_resetState(){this._aborted=false,this._processClosed=new Promise(t=>{this._resolveClose=t;}),this._thrownError=void 0;}_onError=t=>{if(t.name==="AbortError"&&(!(t.cause instanceof Error)||t.cause.name!=="TimeoutError")){this._aborted=true;return}this._thrownError=t;};_onClose=()=>{this._resolveClose&&this._resolveClose();}},af=(t,e,r)=>{let s=new YC(t,e,r);return s.spawn(),s},JC=af;var Oe={},Ct={},Gd;function KC(){if(Gd)return Ct;Gd=1,Object.defineProperty(Ct,"__esModule",{value:true}),Ct.sync=Ct.isexe=void 0;let t=Kd__default.default,e=zd__default.default,r=async(o,u={})=>{let{ignoreErrors:a=false}=u;try{return i(await(0,e.stat)(o),u)}catch(h){let l=h;if(a||l.code==="EACCES")return false;throw l}};Ct.isexe=r;let s=(o,u={})=>{let{ignoreErrors:a=false}=u;try{return i((0,t.statSync)(o),u)}catch(h){let l=h;if(a||l.code==="EACCES")return false;throw l}};Ct.sync=s;let i=(o,u)=>o.isFile()&&n(o,u),n=(o,u)=>{let a=u.uid??process.getuid?.(),h=u.groups??process.getgroups?.()??[],l=u.gid??process.getgid?.()??h[0];if(a===void 0||l===void 0)throw new Error("cannot get uid or gid");let c=new Set([l,...h]),d=o.mode,f=o.uid,p=o.gid,m=parseInt("100",8),g=parseInt("010",8),b=parseInt("001",8),y=m|g;return !!(d&b||d&g&&c.has(p)||d&m&&f===a||d&y&&a===0)};return Ct}var _t={},Vd;function zC(){if(Vd)return _t;Vd=1,Object.defineProperty(_t,"__esModule",{value:true}),_t.sync=_t.isexe=void 0;let t=Kd__default.default,e=zd__default.default,r=async(o,u={})=>{let{ignoreErrors:a=false}=u;try{return n(await(0,e.stat)(o),o,u)}catch(h){let l=h;if(a||l.code==="EACCES")return false;throw l}};_t.isexe=r;let s=(o,u={})=>{let{ignoreErrors:a=false}=u;try{return n((0,t.statSync)(o),o,u)}catch(h){let l=h;if(a||l.code==="EACCES")return false;throw l}};_t.sync=s;let i=(o,u)=>{let{pathExt:a=process.env.PATHEXT||""}=u,h=a.split(";");if(h.indexOf("")!==-1)return true;for(let l=0;l<h.length;l++){let c=h[l].toLowerCase(),d=o.substring(o.length-c.length).toLowerCase();if(c&&d===c)return true}return false},n=(o,u,a)=>o.isFile()&&i(u,a);return _t}var Eo={},Ud;function XC(){return Ud||(Ud=1,Object.defineProperty(Eo,"__esModule",{value:true})),Eo}var Wd;function ZC(){return Wd||(Wd=1,function(t){var e=Oe&&Oe.__createBinding||(Object.create?function(h,l,c,d){d===void 0&&(d=c);var f=Object.getOwnPropertyDescriptor(l,c);(!f||("get"in f?!l.__esModule:f.writable||f.configurable))&&(f={enumerable:true,get:function(){return l[c]}}),Object.defineProperty(h,d,f);}:function(h,l,c,d){d===void 0&&(d=c),h[d]=l[c];}),r=Oe&&Oe.__setModuleDefault||(Object.create?function(h,l){Object.defineProperty(h,"default",{enumerable:true,value:l});}:function(h,l){h.default=l;}),s=Oe&&Oe.__importStar||function(h){if(h&&h.__esModule)return h;var l={};if(h!=null)for(var c in h)c!=="default"&&Object.prototype.hasOwnProperty.call(h,c)&&e(l,h,c);return r(l,h),l},i=Oe&&Oe.__exportStar||function(h,l){for(var c in h)c!=="default"&&!Object.prototype.hasOwnProperty.call(l,c)&&e(l,h,c);};Object.defineProperty(t,"__esModule",{value:true}),t.sync=t.isexe=t.posix=t.win32=void 0;let n=s(KC());t.posix=n;let o=s(zC());t.win32=o,i(XC(),t);let a=(process.env._ISEXE_TEST_PLATFORM_||process.platform)==="win32"?o:n;t.isexe=a.isexe,t.sync=a.sync;}(Oe)),Oe}var Ao,Yd;function QC(){if(Yd)return Ao;Yd=1;let{isexe:t,sync:e}=ZC(),{join:r,delimiter:s,sep:i,posix:n}=vt__default.default,o=process.platform==="win32",u=new RegExp(`[${n.sep}${i===n.sep?"":i}]`.replace(/(\\)/g,"\\$1")),a=new RegExp(`^\\.${u.source}`),h=p=>Object.assign(new Error(`not found: ${p}`),{code:"ENOENT"}),l=(p,{path:m=process.env.PATH,pathExt:g=process.env.PATHEXT,delimiter:b=s})=>{let y=p.match(u)?[""]:[...o?[process.cwd()]:[],...(m||"").split(b)];if(o){let v=g||[".EXE",".CMD",".BAT",".COM"].join(b),F=v.split(b).flatMap(E=>[E,E.toLowerCase()]);return p.includes(".")&&F[0]!==""&&F.unshift(""),{pathEnv:y,pathExt:F,pathExtExe:v}}return {pathEnv:y,pathExt:[""]}},c=(p,m)=>{let g=/^".*"$/.test(p)?p.slice(1,-1):p;return (!g&&a.test(m)?m.slice(0,2):"")+r(g,m)},d=async(p,m={})=>{let{pathEnv:g,pathExt:b,pathExtExe:y}=l(p,m),v=[];for(let F of g){let E=c(F,p);for(let R of b){let P=E+R;if(await t(P,{pathExt:y,ignoreErrors:true})){if(!m.all)return P;v.push(P);}}}if(m.all&&v.length)return v;if(m.nothrow)return null;throw h(p)},f=(p,m={})=>{let{pathEnv:g,pathExt:b,pathExtExe:y}=l(p,m),v=[];for(let F of g){let E=c(F,p);for(let R of b){let P=E+R;if(e(P,{pathExt:y,ignoreErrors:true})){if(!m.all)return P;v.push(P);}}}if(m.all&&v.length)return v;if(m.nothrow)return null;throw h(p)};return Ao=d,d.sync=f,Ao}var e_=QC(),t_=So(e_);vt.join(wy__default.default.tmpdir(),"antfu-ni");function lf(t){return t_.sync(t,{nothrow:true})!==null}async function Po({autoInstall:t,programmatic:e,cwd:r}={}){let{name:s,agent:i,version:n}=await hC({cwd:r,onUnknown:o=>{e||console.warn("[ni] Unknown packageManager:",o);}})||{};if(s&&!lf(s)&&!e){if(!t){console.warn(`[ni] Detected ${s} but it doesn't seem to be installed.
216
- `),ke__default.default.env.CI&&ke__default.default.exit(1);let o=gr(s,rf[s]),{tryInstall:u}=await iC({name:"tryInstall",type:"confirm",message:`Would you like to globally install ${o}?`});u||ke__default.default.exit(1);}await af("npm",["i","-g",`${s}${n?`@${n}`:""}`],{nodeOptions:{stdio:"inherit",cwd:r},throwOnError:true});}return i}ke__default.default.env.NI_CONFIG_FILE;var s_=ke__default.default.platform==="win32"?ke__default.default.env.USERPROFILE:ke__default.default.env.HOME;vt__default.default.join(s_||"~/",".nirc");var o_=async t=>{let e=await Po({cwd:t});return e&&["npm","yarn","pnpm","bun"].includes(e)?e:"npm"},cf=t=>{let e=vt.join(t,"package.json");if(!Kd.existsSync(e))return "unknown";try{let r=JSON.parse(Kd.readFileSync(e,"utf-8")),s={...r.dependencies,...r.devDependencies};return s.next?"next":s.vite?"vite":s.webpack?"webpack":"unknown"}catch{return "unknown"}},u_=t=>{let e=Kd.existsSync(vt.join(t,"app")),r=Kd.existsSync(vt.join(t,"src","app")),s=Kd.existsSync(vt.join(t,"pages")),i=Kd.existsSync(vt.join(t,"src","pages"));return e||r?"app":s||i?"pages":"unknown"},a_=t=>{if(Kd.existsSync(vt.join(t,"pnpm-workspace.yaml"))||Kd.existsSync(vt.join(t,"lerna.json")))return true;let e=vt.join(t,"package.json");if(Kd.existsSync(e))try{if(JSON.parse(Kd.readFileSync(e,"utf-8")).workspaces)return !0}catch{return false}return false},l_=t=>{let e=[],r=vt.join(t,"pnpm-workspace.yaml");if(Kd.existsSync(r)){let o=Kd.readFileSync(r,"utf-8").split(`
217
- `),u=false;for(let a of o){if(a.match(/^packages:\s*$/)){u=true;continue}if(u){if(a.match(/^[a-zA-Z]/)||a.trim()===""){a.match(/^[a-zA-Z]/)&&(u=false);continue}let h=a.match(/^\s*-\s*['"]?([^'"#\n]+?)['"]?\s*$/);h&&e.push(h[1].trim());}}}let s=vt.join(t,"lerna.json");if(Kd.existsSync(s))try{let n=JSON.parse(Kd.readFileSync(s,"utf-8"));Array.isArray(n.packages)&&e.push(...n.packages);}catch{}let i=vt.join(t,"package.json");if(Kd.existsSync(i))try{let n=JSON.parse(Kd.readFileSync(i,"utf-8"));Array.isArray(n.workspaces)?e.push(...n.workspaces):n.workspaces?.packages&&e.push(...n.workspaces.packages);}catch{}return [...new Set(e)]},c_=(t,e)=>{let r=[],s=e.replace(/\/\*$/,""),i=vt.join(t,s);if(!Kd.existsSync(i))return r;try{let n=Kd.readdirSync(i,{withFileTypes:!0});for(let o of n)if(o.isDirectory()){let u=vt.join(i,o.name,"package.json");Kd.existsSync(u)&&r.push(vt.join(i,o.name));}}catch{return r}return r},h_=t=>{let e=vt.join(t,"package.json");if(!Kd.existsSync(e))return false;try{let r=JSON.parse(Kd.readFileSync(e,"utf-8")),s={...r.dependencies,...r.devDependencies};return !!(s.react||s["react-dom"])}catch{return false}},hf=t=>{let e=l_(t),r=[];for(let s of e){let i=c_(t,s);for(let n of i){let o=cf(n),u=h_(n);if(u||o!=="unknown"){let a=vt.join(n,"package.json"),h=vt.basename(n);try{h=JSON.parse(Kd.readFileSync(a,"utf-8")).name||h;}catch{}r.push({name:h,path:n,framework:o,hasReact:u});}}}return r},d_=t=>{if(!Kd.existsSync(t))return false;try{let e=Kd.readFileSync(t,"utf-8");return [/["'`][^"'`]*react-grab/,/react-grab[^"'`]*["'`]/,/<[^>]*react-grab/i,/import[^;]*react-grab/i,/require[^)]*react-grab/i,/from\s+[^;]*react-grab/i,/src[^>]*react-grab/i].some(s=>s.test(e))}catch{return false}},f_=t=>{let e=vt.join(t,"package.json");if(Kd.existsSync(e))try{let s=JSON.parse(Kd.readFileSync(e,"utf-8"));if({...s.dependencies,...s.devDependencies}["react-grab"])return !0}catch{}return [vt.join(t,"app","layout.tsx"),vt.join(t,"app","layout.jsx"),vt.join(t,"src","app","layout.tsx"),vt.join(t,"src","app","layout.jsx"),vt.join(t,"pages","_document.tsx"),vt.join(t,"pages","_document.jsx"),vt.join(t,"instrumentation-client.ts"),vt.join(t,"instrumentation-client.js"),vt.join(t,"src","instrumentation-client.ts"),vt.join(t,"src","instrumentation-client.js"),vt.join(t,"index.html"),vt.join(t,"public","index.html"),vt.join(t,"src","index.tsx"),vt.join(t,"src","index.ts"),vt.join(t,"src","main.tsx"),vt.join(t,"src","main.ts")].some(d_)},p_=["@react-grab/claude-code","@react-grab/cursor","@react-grab/opencode","@react-grab/codex","@react-grab/gemini","@react-grab/amp","@react-grab/ami","@react-grab/instant"],m_=t=>{let e=vt.join(t,"package.json");if(!Kd.existsSync(e))return null;try{let r=JSON.parse(Kd.readFileSync(e,"utf-8")),s={...r.dependencies,...r.devDependencies};return s["@remix-run/react"]||s.remix?"remix":s.astro?"astro":s["@sveltejs/kit"]?"sveltekit":s.gatsby?"gatsby":null}catch{return null}},g_=t=>{let e=vt.join(t,"package.json");if(!Kd.existsSync(e))return [];try{let r=JSON.parse(Kd.readFileSync(e,"utf-8")),s={...r.dependencies,...r.devDependencies};return p_.filter(i=>!!s[i]).map(i=>i.replace("@react-grab/",""))}catch{return []}};var Dr=async(t=process.cwd())=>{let e=cf(t);return {packageManager:await o_(t),framework:e,nextRouterType:e==="next"?u_(t):"unknown",isMonorepo:a_(t),projectRoot:t,hasReactGrab:f_(t),installedAgents:g_(t),unsupportedFramework:m_(t)}};var D_="\x1B[31m",b_="\x1B[32m",ls="\x1B[90m",xt="\x1B[0m",y_="\x1B[1m",C_=(t,e)=>{let r=t.split(`
215
+ `),this.close();}_(a,h){return a.toLowerCase()==="y"?(this.value=true,this.submit()):a.toLowerCase()==="n"?(this.value=false,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(n.hide):this.out.write(s(this.outputText,this.out.columns)),super.render(),this.outputText=[r.symbol(this.done,this.aborted),t.bold(this.msg),r.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:t.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(i.line+n.to(0)+this.outputText));}}return xo=o,xo}var _o,Id;function cv(){return Id||(Id=1,_o={TextPrompt:Ky(),SelectPrompt:Yy(),TogglePrompt:Jy(),DatePrompt:nv(),NumberPrompt:ov(),MultiselectPrompt:tf(),AutocompletePrompt:uv(),AutocompleteMultiselectPrompt:av(),ConfirmPrompt:lv()}),_o}var Md;function hv(){return Md||(Md=1,function(t){let e=t,r=cv(),s=o=>o;function i(o,u,a={}){return new Promise((h,l)=>{let c=new r[o](u),d=a.onAbort||s,f=a.onSubmit||s,p=a.onExit||s;c.on("state",u.onState||s),c.on("submit",m=>h(f(m))),c.on("exit",m=>h(p(m))),c.on("abort",m=>l(d(m)));})}e.text=o=>i("TextPrompt",o),e.password=o=>(o.style="password",e.text(o)),e.invisible=o=>(o.style="invisible",e.text(o)),e.number=o=>i("NumberPrompt",o),e.date=o=>i("DatePrompt",o),e.confirm=o=>i("ConfirmPrompt",o),e.list=o=>{let u=o.separator||",";return i("TextPrompt",o,{onSubmit:a=>a.split(u).map(h=>h.trim())})},e.toggle=o=>i("TogglePrompt",o),e.select=o=>i("SelectPrompt",o),e.multiselect=o=>{o.choices=[].concat(o.choices||[]);let u=a=>a.filter(h=>h.selected).map(h=>h.value);return i("MultiselectPrompt",o,{onAbort:u,onSubmit:u})},e.autocompleteMultiselect=o=>{o.choices=[].concat(o.choices||[]);let u=a=>a.filter(h=>h.selected).map(h=>h.value);return i("AutocompleteMultiselectPrompt",o,{onAbort:u,onSubmit:u})};let n=(o,u)=>Promise.resolve(u.filter(a=>a.title.slice(0,o.length).toLowerCase()===o.toLowerCase()));e.autocomplete=o=>(o.suggest=o.suggest||n,o.choices=[].concat(o.choices||[]),i("AutocompletePrompt",o));}(Vn)),Vn}var wo,Bd;function dv(){if(Bd)return wo;Bd=1;let t=hv(),e=["suggest","format","onState","validate","onRender","type"],r=()=>{};async function s(u=[],{onSubmit:a=r,onCancel:h=r}={}){let l={},c=s._override||{};u=[].concat(u);let d,f,p,m,g,y,v=async(_,F,E=false)=>{if(!(!E&&_.validate&&_.validate(F)!==true))return _.format?await _.format(F,l):F};for(f of u)if({name:m,type:g}=f,typeof g=="function"&&(g=await g(d,{...l},f),f.type=g),!!g){for(let _ in f){if(e.includes(_))continue;let F=f[_];f[_]=typeof F=="function"?await F(d,{...l},y):F;}if(y=f,typeof f.message!="string")throw new Error("prompt message is required");if({name:m,type:g}=f,t[g]===void 0)throw new Error(`prompt type (${g}) is not defined`);if(c[f.name]!==void 0&&(d=await v(f,c[f.name]),d!==void 0)){l[m]=d;continue}try{d=s._injected?i(s._injected,f.initial):await t[g](f),l[m]=d=await v(f,d,!0),p=await a(f,d,l);}catch{p=!await h(f,l);}if(p)return l}return l}function i(u,a){let h=u.shift();if(h instanceof Error)throw h;return h===void 0?a:h}function n(u){s._injected=(s._injected||[]).concat(u);}function o(u){s._override=Object.assign({},u);}return wo=Object.assign(s,{prompt:s,prompts:t,inject:n,override:o}),wo}var Fo,Hd;function fv(){return Hd||(Hd=1,Fo=dv()),Fo}var pv=fv(),mv=Po(pv);var nf=["npm","yarn","yarn@berry","pnpm","pnpm@6","bun","deno"],To={"bun.lock":"bun","bun.lockb":"bun","deno.lock":"deno","pnpm-lock.yaml":"pnpm","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"},of={bun:"https://bun.sh",deno:"https://deno.com",pnpm:"https://pnpm.io/installation","pnpm@6":"https://pnpm.io/6.x/installation",yarn:"https://classic.yarnpkg.com/en/docs/install","yarn@berry":"https://yarnpkg.com/getting-started/install",npm:"https://docs.npmjs.com/cli/v8/configuring-npm/install"};async function xv(t={}){let{cwd:e,onUnknown:r}=t;for(let s of _v(e)){for(let n of Object.keys(To))if(await uf(Ft__default.default.join(s,n))){let o=To[n],u=await qd(Ft__default.default.join(s,"package.json"),r);return u||{name:o,agent:o}}let i=await qd(Ft__default.default.join(s,"package.json"),r);if(i)return i}return null}function*_v(t=ke__default.default.cwd()){let e=Ft__default.default.resolve(t),{root:r}=Ft__default.default.parse(e);for(;e&&e!==r;)yield e,e=Ft__default.default.dirname(e);}async function qd(t,e){return !t||!await uf(t)?null:wv(t,e)}function wv(t,e){try{let r=JSON.parse(Zd__default.default.readFileSync(t,"utf8")),s;if(typeof r.packageManager=="string"){let[i,n]=r.packageManager.replace(/^\^/,"").split("@"),o=n;return i==="yarn"&&Number.parseInt(n)>1?(s="yarn@berry",o="berry",{name:i,agent:s,version:o}):i==="pnpm"&&Number.parseInt(n)<7?(s="pnpm@6",{name:i,agent:s,version:o}):nf.includes(i)?(s=i,{name:i,agent:s,version:o}):e?.(r.packageManager)??null}}catch{}return null}async function uf(t){try{if((await Qd__default.default.stat(t)).isFile())return !0}catch{}return false}var j="\x1B[",yr="\x1B]",Ut="\x07",hs=";",af=process.env.TERM_PROGRAM==="Apple_Terminal",B={};B.cursorTo=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");return typeof e!="number"?j+(t+1)+"G":j+(e+1)+";"+(t+1)+"H"};B.cursorMove=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");let r="";return t<0?r+=j+-t+"D":t>0&&(r+=j+t+"C"),e<0?r+=j+-e+"A":e>0&&(r+=j+e+"B"),r};B.cursorUp=(t=1)=>j+t+"A";B.cursorDown=(t=1)=>j+t+"B";B.cursorForward=(t=1)=>j+t+"C";B.cursorBackward=(t=1)=>j+t+"D";B.cursorLeft=j+"G";B.cursorSavePosition=af?"\x1B7":j+"s";B.cursorRestorePosition=af?"\x1B8":j+"u";B.cursorGetPosition=j+"6n";B.cursorNextLine=j+"E";B.cursorPrevLine=j+"F";B.cursorHide=j+"?25l";B.cursorShow=j+"?25h";B.eraseLines=t=>{let e="";for(let r=0;r<t;r++)e+=B.eraseLine+(r<t-1?B.cursorUp():"");return t&&(e+=B.cursorLeft),e};B.eraseEndLine=j+"K";B.eraseStartLine=j+"1K";B.eraseLine=j+"2K";B.eraseDown=j+"J";B.eraseUp=j+"1J";B.eraseScreen=j+"2J";B.scrollUp=j+"S";B.scrollDown=j+"T";B.clearScreen="\x1Bc";B.clearTerminal=process.platform==="win32"?`${B.eraseScreen}${j}0f`:`${B.eraseScreen}${j}3J${j}H`;B.beep=Ut;B.link=(t,e)=>[yr,"8",hs,hs,e,Ut,t,yr,"8",hs,hs,Ut].join("");B.image=(t,e={})=>{let r=`${yr}1337;File=inline=1`;return e.width&&(r+=`;width=${e.width}`),e.height&&(r+=`;height=${e.height}`),e.preserveAspectRatio===false&&(r+=";preserveAspectRatio=0"),r+":"+t.toString("base64")+Ut};B.iTerm={setCwd:(t=process.cwd())=>`${yr}50;CurrentDir=${t}${Ut}`,annotation:(t,e={})=>{let r=`${yr}1337;`,s=typeof e.x<"u",i=typeof e.y<"u";if((s||i)&&!(s&&i&&typeof e.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return t=t.replace(/\|/g,""),r+=e.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",e.length>0?r+=(s?[t,e.length,e.x,e.y]:[e.length,t]).join("|"):r+=t,r+Ut}};var Eo,Ld;function lf(){return Ld||(Ld=1,Eo=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",s=e.indexOf(r+t),i=e.indexOf("--");return s!==-1&&(i===-1||s<i)}),Eo}var Ao,jd;function Fv(){if(jd)return Ao;jd=1;let t=My__default.default,e=bf__default.default,r=lf(),{env:s}=process,i;r("no-color")||r("no-colors")||r("color=false")||r("color=never")?i=0:(r("color")||r("colors")||r("color=true")||r("color=always"))&&(i=1),"FORCE_COLOR"in s&&(s.FORCE_COLOR==="true"?i=1:s.FORCE_COLOR==="false"?i=0:i=s.FORCE_COLOR.length===0?1:Math.min(parseInt(s.FORCE_COLOR,10),3));function n(a){return a===0?false:{level:a,hasBasic:true,has256:a>=2,has16m:a>=3}}function o(a,h){if(i===0)return 0;if(r("color=16m")||r("color=full")||r("color=truecolor"))return 3;if(r("color=256"))return 2;if(a&&!h&&i===void 0)return 0;let l=i||0;if(s.TERM==="dumb")return l;if(process.platform==="win32"){let c=t.release().split(".");return Number(c[0])>=10&&Number(c[2])>=10586?Number(c[2])>=14931?3:2:1}if("CI"in s)return ["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(c=>c in s)||s.CI_NAME==="codeship"?1:l;if("TEAMCITY_VERSION"in s)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0;if(s.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in s){let c=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case "iTerm.app":return c>=3?3:2;case "Apple_Terminal":return 2}}return /-256(color)?$/i.test(s.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)||"COLORTERM"in s?1:l}function u(a){let h=o(a,a&&a.isTTY);return n(h)}return Ao={supportsColor:u,stdout:n(o(true,e.isatty(1))),stderr:n(o(true,e.isatty(2)))},Ao}var Oo,Gd;function Ev(){if(Gd)return Oo;Gd=1;let t=Fv(),e=lf();function r(i){if(/^\d{3,4}$/.test(i)){let o=/(\d{1,2})(\d{2})/.exec(i);return {major:0,minor:parseInt(o[1],10),patch:parseInt(o[2],10)}}let n=(i||"").split(".").map(o=>parseInt(o,10));return {major:n[0],minor:n[1],patch:n[2]}}function s(i){let{env:n}=process;if("FORCE_HYPERLINK"in n)return !(n.FORCE_HYPERLINK.length>0&&parseInt(n.FORCE_HYPERLINK,10)===0);if(e("no-hyperlink")||e("no-hyperlinks")||e("hyperlink=false")||e("hyperlink=never"))return false;if(e("hyperlink=true")||e("hyperlink=always"))return true;if(!t.supportsColor(i)||i&&!i.isTTY||process.platform==="win32")return false;if("NETLIFY"in n)return true;if("CI"in n||"TEAMCITY_VERSION"in n)return false;if("TERM_PROGRAM"in n){let o=r(n.TERM_PROGRAM_VERSION);switch(n.TERM_PROGRAM){case "iTerm.app":return o.major===3?o.minor>=1:o.major>3}}if("VTE_VERSION"in n){if(n.VTE_VERSION==="0.50.0")return false;let o=r(n.VTE_VERSION);return o.major>0||o.minor>=50}return false}return Oo={supportsHyperlink:s,stdout:s(process.stdout),stderr:s(process.stderr)},Oo}var Av=Ev(),ko=Po(Av);function vr(t,e,{target:r="stdout",...s}={}){return ko[r]?B.link(t,e):s.fallback===false?t:typeof s.fallback=="function"?s.fallback(t,e):`${t} (\u200B${e}\u200B)`}vr.isSupported=ko.stdout;vr.stderr=(t,e,r={})=>vr(t,e,{target:"stderr",...r});vr.stderr.isSupported=ko.stderr;var Vt=module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.cjs', document.baseURI).href))),Ov=Object.create,cf=Object.defineProperty,Rv=Object.getOwnPropertyDescriptor,Sv=Object.getOwnPropertyNames,Tv=Object.getPrototypeOf,Pv=Object.prototype.hasOwnProperty,Dt=(t=>typeof Vt<"u"?Vt:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof Vt<"u"?Vt:e)[r]}):t)(function(t){if(typeof Vt<"u")return Vt.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),ye=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),$v=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Sv(e))!Pv.call(t,i)&&i!==r&&cf(t,i,{get:()=>e[i],enumerable:!(s=Rv(e,i))||s.enumerable});return t},kv=(t,e,r)=>(r=t!=null?Ov(Tv(t)):{},$v(cf(r,"default",{value:t,enumerable:true}),t)),Iv=ye((t,e)=>{e.exports=n,n.sync=o;var r=Dt("fs");function s(u,a){var h=a.pathExt!==void 0?a.pathExt:process.env.PATHEXT;if(!h||(h=h.split(";"),h.indexOf("")!==-1))return true;for(var l=0;l<h.length;l++){var c=h[l].toLowerCase();if(c&&u.substr(-c.length).toLowerCase()===c)return true}return false}function i(u,a,h){return !u.isSymbolicLink()&&!u.isFile()?false:s(a,h)}function n(u,a,h){r.stat(u,function(l,c){h(l,l?false:i(c,u,a));});}function o(u,a){return i(r.statSync(u),u,a)}}),Mv=ye((t,e)=>{e.exports=s,s.sync=i;var r=Dt("fs");function s(u,a,h){r.stat(u,function(l,c){h(l,l?false:n(c,a));});}function i(u,a){return n(r.statSync(u),a)}function n(u,a){return u.isFile()&&o(u,a)}function o(u,a){var h=u.mode,l=u.uid,c=u.gid,d=a.uid!==void 0?a.uid:process.getuid&&process.getuid(),f=a.gid!==void 0?a.gid:process.getgid&&process.getgid(),p=parseInt("100",8),m=parseInt("010",8),g=parseInt("001",8),y=p|m,v=h&g||h&m&&c===f||h&p&&l===d||h&y&&d===0;return v}}),Bv=ye((t,e)=>{Dt("fs");var r;process.platform==="win32"||global.TESTING_WINDOWS?r=Iv():r=Mv(),e.exports=s,s.sync=i;function s(n,o,u){if(typeof o=="function"&&(u=o,o={}),!u){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(a,h){s(n,o||{},function(l,c){l?h(l):a(c);});})}r(n,o||{},function(a,h){a&&(a.code==="EACCES"||o&&o.ignoreErrors)&&(a=null,h=false),u(a,h);});}function i(n,o){try{return r.sync(n,o||{})}catch(u){if(o&&o.ignoreErrors||u.code==="EACCES")return false;throw u}}}),Hv=ye((t,e)=>{var r=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",s=Dt("path"),i=r?";":":",n=Bv(),o=l=>Object.assign(new Error(`not found: ${l}`),{code:"ENOENT"}),u=(l,c)=>{let d=c.colon||i,f=l.match(/\//)||r&&l.match(/\\/)?[""]:[...r?[process.cwd()]:[],...(c.path||process.env.PATH||"").split(d)],p=r?c.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",m=r?p.split(d):[""];return r&&l.indexOf(".")!==-1&&m[0]!==""&&m.unshift(""),{pathEnv:f,pathExt:m,pathExtExe:p}},a=(l,c,d)=>{typeof c=="function"&&(d=c,c={}),c||(c={});let{pathEnv:f,pathExt:p,pathExtExe:m}=u(l,c),g=[],y=_=>new Promise((F,E)=>{if(_===f.length)return c.all&&g.length?F(g):E(o(l));let S=f[_],P=/^".*"$/.test(S)?S.slice(1,-1):S,O=s.join(P,l),T=!P&&/^\.[\\\/]/.test(l)?l.slice(0,2)+O:O;F(v(T,_,0));}),v=(_,F,E)=>new Promise((S,P)=>{if(E===p.length)return S(y(F+1));let O=p[E];n(_+O,{pathExt:m},(T,te)=>{if(!T&&te)if(c.all)g.push(_+O);else return S(_+O);return S(v(_,F,E+1))});});return d?y(0).then(_=>d(null,_),d):y(0)},h=(l,c)=>{c=c||{};let{pathEnv:d,pathExt:f,pathExtExe:p}=u(l,c),m=[];for(let g=0;g<d.length;g++){let y=d[g],v=/^".*"$/.test(y)?y.slice(1,-1):y,_=s.join(v,l),F=!v&&/^\.[\\\/]/.test(l)?l.slice(0,2)+_:_;for(let E=0;E<f.length;E++){let S=F+f[E];try{if(n.sync(S,{pathExt:p}))if(c.all)m.push(S);else return S}catch{}}}if(c.all&&m.length)return m;if(c.nothrow)return null;throw o(l)};e.exports=a,a.sync=h;}),Nv=ye((t,e)=>{var r=(s={})=>{let i=s.env||process.env;return (s.platform||process.platform)!=="win32"?"PATH":Object.keys(i).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};e.exports=r,e.exports.default=r;}),qv=ye((t,e)=>{var r=Dt("path"),s=Hv(),i=Nv();function n(u,a){let h=u.options.env||process.env,l=process.cwd(),c=u.options.cwd!=null,d=c&&process.chdir!==void 0&&!process.chdir.disabled;if(d)try{process.chdir(u.options.cwd);}catch{}let f;try{f=s.sync(u.command,{path:h[i({env:h})],pathExt:a?r.delimiter:void 0});}catch{}finally{d&&process.chdir(l);}return f&&(f=r.resolve(c?u.options.cwd:"",f)),f}function o(u){return n(u)||n(u,true)}e.exports=o;}),Lv=ye((t,e)=>{var r=/([()\][%!^"`<>&|;, *?])/g;function s(n){return n=n.replace(r,"^$1"),n}function i(n,o){return n=`${n}`,n=n.replace(/(\\*)"/g,'$1$1\\"'),n=n.replace(/(\\*)$/,"$1$1"),n=`"${n}"`,n=n.replace(r,"^$1"),o&&(n=n.replace(r,"^$1")),n}e.exports.command=s,e.exports.argument=i;}),jv=ye((t,e)=>{e.exports=/^#!(.*)/;}),Gv=ye((t,e)=>{var r=jv();e.exports=(s="")=>{let i=s.match(r);if(!i)return null;let[n,o]=i[0].replace(/#! ?/,"").split(" "),u=n.split("/").pop();return u==="env"?o:o?`${u} ${o}`:u};}),Vv=ye((t,e)=>{var r=Dt("fs"),s=Gv();function i(n){let o=Buffer.alloc(150),u;try{u=r.openSync(n,"r"),r.readSync(u,o,0,150,0),r.closeSync(u);}catch{}return s(o.toString())}e.exports=i;}),Uv=ye((t,e)=>{var r=Dt("path"),s=qv(),i=Lv(),n=Vv(),o=process.platform==="win32",u=/\.(?:com|exe)$/i,a=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function h(d){d.file=s(d);let f=d.file&&n(d.file);return f?(d.args.unshift(d.file),d.command=f,s(d)):d.file}function l(d){if(!o)return d;let f=h(d),p=!u.test(f);if(d.options.forceShell||p){let m=a.test(f);d.command=r.normalize(d.command),d.command=i.command(d.command),d.args=d.args.map(y=>i.argument(y,m));let g=[d.command].concat(d.args).join(" ");d.args=["/d","/s","/c",`"${g}"`],d.command=process.env.comspec||"cmd.exe",d.options.windowsVerbatimArguments=true;}return d}function c(d,f,p){f&&!Array.isArray(f)&&(p=f,f=null),f=f?f.slice(0):[],p=Object.assign({},p);let m={command:d,args:f,options:p,file:void 0,original:{command:d,args:f}};return p.shell?m:l(m)}e.exports=c;}),Wv=ye((t,e)=>{var r=process.platform==="win32";function s(u,a){return Object.assign(new Error(`${a} ${u.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${a} ${u.command}`,path:u.command,spawnargs:u.args})}function i(u,a){if(!r)return;let h=u.emit;u.emit=function(l,c){if(l==="exit"){let d=n(c,a);if(d)return h.call(u,"error",d)}return h.apply(u,arguments)};}function n(u,a){return r&&u===1&&!a.file?s(a.original,"spawn"):null}function o(u,a){return r&&u===1&&!a.file?s(a.original,"spawnSync"):null}e.exports={hookChildProcess:i,verifyENOENT:n,verifyENOENTSync:o,notFoundError:s};}),Kv=ye((t,e)=>{var r=Dt("child_process"),s=Uv(),i=Wv();function n(u,a,h){let l=s(u,a,h),c=r.spawn(l.command,l.args,l.options);return i.hookChildProcess(c,l),c}function o(u,a,h){let l=s(u,a,h),c=r.spawnSync(l.command,l.args,l.options);return c.error=c.error||i.verifyENOENTSync(c.status,l),c}e.exports=n,e.exports.spawn=n,e.exports.sync=o,e.exports._parse=s,e.exports._enoent=i;}),Yv=/^path$/i,Vd={key:"PATH",value:""};function Jv(t){for(let e in t){if(!Object.prototype.hasOwnProperty.call(t,e)||!Yv.test(e))continue;let r=t[e];return r?{key:e,value:r}:Vd}return Vd}function zv(t,e){let r=e.value.split(Ft.delimiter),s=t,i;do r.push(Ft.resolve(s,"node_modules",".bin")),i=s,s=Ft.dirname(s);while(s!==i);return {key:e.key,value:r.join(Ft.delimiter)}}function Xv(t,e){let r={...process.env,...e},s=zv(t,Jv(r));return r[s.key]=s.value,r}var Zv=t=>{let e=t.length,r=new stream.PassThrough,s=()=>{--e===0&&r.emit("end");};for(let i of t)i.pipe(r,{end:false}),i.on("end",s);return r},Qv=kv(Kv()),Ud=class extends Error{result;output;get exitCode(){if(this.result.exitCode!==null)return this.result.exitCode}constructor(t,e){super(`Process exited with non-zero status (${t.exitCode})`),this.result=t,this.output=e;}},eC={timeout:void 0,persist:false},tC={windowsHide:true};function rC(t,e){return {command:Ft.normalize(t),args:e??[]}}function sC(t){let e=new AbortController;for(let r of t){if(r.aborted)return e.abort(),r;let s=()=>{e.abort(r.reason);};r.addEventListener("abort",s,{signal:e.signal});}return e.signal}var iC=class{_process;_aborted=false;_options;_command;_args;_resolveClose;_processClosed;_thrownError;get process(){return this._process}get pid(){return this._process?.pid}get exitCode(){if(this._process&&this._process.exitCode!==null)return this._process.exitCode}constructor(t,e,r){this._options={...eC,...r},this._command=t,this._args=e??[],this._processClosed=new Promise(s=>{this._resolveClose=s;});}kill(t){return this._process?.kill(t)===true}get aborted(){return this._aborted}get killed(){return this._process?.killed===true}pipe(t,e,r){return nC(t,e,{...r,stdin:this})}async*[Symbol.asyncIterator](){let t=this._process;if(!t)return;let e=[];this._streamErr&&e.push(this._streamErr),this._streamOut&&e.push(this._streamOut);let r=Zv(e),s=Xd__default.default.createInterface({input:r});for await(let i of s)yield i.toString();if(await this._processClosed,t.removeAllListeners(),this._thrownError)throw this._thrownError;if(this._options?.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new Ud(this)}async _waitForOutput(){let t=this._process;if(!t)throw new Error("No process was started");let e="",r="";if(this._streamErr)for await(let i of this._streamErr)e+=i.toString();if(this._streamOut)for await(let i of this._streamOut)r+=i.toString();if(await this._processClosed,this._options?.stdin&&await this._options.stdin,t.removeAllListeners(),this._thrownError)throw this._thrownError;let s={stderr:e,stdout:r,exitCode:this.exitCode};if(this._options.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new Ud(this,s);return s}then(t,e){return this._waitForOutput().then(t,e)}_streamOut;_streamErr;spawn(){let t=ke.cwd(),e=this._options,r={...tC,...e.nodeOptions},s=[];this._resetState(),e.timeout!==void 0&&s.push(AbortSignal.timeout(e.timeout)),e.signal!==void 0&&s.push(e.signal),e.persist===true&&(r.detached=true),s.length>0&&(r.signal=sC(s)),r.env=Xv(t,r.env);let{command:i,args:n}=rC(this._command,this._args),o=(0, Qv._parse)(i,n,r),u=child_process.spawn(o.command,o.args,o.options);if(u.stderr&&(this._streamErr=u.stderr),u.stdout&&(this._streamOut=u.stdout),this._process=u,u.once("error",this._onError),u.once("close",this._onClose),e.stdin!==void 0&&u.stdin&&e.stdin.process){let{stdout:a}=e.stdin.process;a&&a.pipe(u.stdin);}}_resetState(){this._aborted=false,this._processClosed=new Promise(t=>{this._resolveClose=t;}),this._thrownError=void 0;}_onError=t=>{if(t.name==="AbortError"&&(!(t.cause instanceof Error)||t.cause.name!=="TimeoutError")){this._aborted=true;return}this._thrownError=t;};_onClose=()=>{this._resolveClose&&this._resolveClose();}},hf=(t,e,r)=>{let s=new iC(t,e,r);return s.spawn(),s},nC=hf;var Oe={},_t={},Wd;function oC(){if(Wd)return _t;Wd=1,Object.defineProperty(_t,"__esModule",{value:true}),_t.sync=_t.isexe=void 0;let t=Zd__default.default,e=Qd__default.default,r=async(o,u={})=>{let{ignoreErrors:a=false}=u;try{return i(await(0,e.stat)(o),u)}catch(h){let l=h;if(a||l.code==="EACCES")return false;throw l}};_t.isexe=r;let s=(o,u={})=>{let{ignoreErrors:a=false}=u;try{return i((0,t.statSync)(o),u)}catch(h){let l=h;if(a||l.code==="EACCES")return false;throw l}};_t.sync=s;let i=(o,u)=>o.isFile()&&n(o,u),n=(o,u)=>{let a=u.uid??process.getuid?.(),h=u.groups??process.getgroups?.()??[],l=u.gid??process.getgid?.()??h[0];if(a===void 0||l===void 0)throw new Error("cannot get uid or gid");let c=new Set([l,...h]),d=o.mode,f=o.uid,p=o.gid,m=parseInt("100",8),g=parseInt("010",8),y=parseInt("001",8),v=m|g;return !!(d&y||d&g&&c.has(p)||d&m&&f===a||d&v&&a===0)};return _t}var wt={},Kd;function uC(){if(Kd)return wt;Kd=1,Object.defineProperty(wt,"__esModule",{value:true}),wt.sync=wt.isexe=void 0;let t=Zd__default.default,e=Qd__default.default,r=async(o,u={})=>{let{ignoreErrors:a=false}=u;try{return n(await(0,e.stat)(o),o,u)}catch(h){let l=h;if(a||l.code==="EACCES")return false;throw l}};wt.isexe=r;let s=(o,u={})=>{let{ignoreErrors:a=false}=u;try{return n((0,t.statSync)(o),o,u)}catch(h){let l=h;if(a||l.code==="EACCES")return false;throw l}};wt.sync=s;let i=(o,u)=>{let{pathExt:a=process.env.PATHEXT||""}=u,h=a.split(";");if(h.indexOf("")!==-1)return true;for(let l=0;l<h.length;l++){let c=h[l].toLowerCase(),d=o.substring(o.length-c.length).toLowerCase();if(c&&d===c)return true}return false},n=(o,u,a)=>o.isFile()&&i(u,a);return wt}var Ro={},Yd;function aC(){return Yd||(Yd=1,Object.defineProperty(Ro,"__esModule",{value:true})),Ro}var Jd;function lC(){return Jd||(Jd=1,function(t){var e=Oe&&Oe.__createBinding||(Object.create?function(h,l,c,d){d===void 0&&(d=c);var f=Object.getOwnPropertyDescriptor(l,c);(!f||("get"in f?!l.__esModule:f.writable||f.configurable))&&(f={enumerable:true,get:function(){return l[c]}}),Object.defineProperty(h,d,f);}:function(h,l,c,d){d===void 0&&(d=c),h[d]=l[c];}),r=Oe&&Oe.__setModuleDefault||(Object.create?function(h,l){Object.defineProperty(h,"default",{enumerable:true,value:l});}:function(h,l){h.default=l;}),s=Oe&&Oe.__importStar||function(h){if(h&&h.__esModule)return h;var l={};if(h!=null)for(var c in h)c!=="default"&&Object.prototype.hasOwnProperty.call(h,c)&&e(l,h,c);return r(l,h),l},i=Oe&&Oe.__exportStar||function(h,l){for(var c in h)c!=="default"&&!Object.prototype.hasOwnProperty.call(l,c)&&e(l,h,c);};Object.defineProperty(t,"__esModule",{value:true}),t.sync=t.isexe=t.posix=t.win32=void 0;let n=s(oC());t.posix=n;let o=s(uC());t.win32=o,i(aC(),t);let a=(process.env._ISEXE_TEST_PLATFORM_||process.platform)==="win32"?o:n;t.isexe=a.isexe,t.sync=a.sync;}(Oe)),Oe}var So,zd;function cC(){if(zd)return So;zd=1;let{isexe:t,sync:e}=lC(),{join:r,delimiter:s,sep:i,posix:n}=Ft__default.default,o=process.platform==="win32",u=new RegExp(`[${n.sep}${i===n.sep?"":i}]`.replace(/(\\)/g,"\\$1")),a=new RegExp(`^\\.${u.source}`),h=p=>Object.assign(new Error(`not found: ${p}`),{code:"ENOENT"}),l=(p,{path:m=process.env.PATH,pathExt:g=process.env.PATHEXT,delimiter:y=s})=>{let v=p.match(u)?[""]:[...o?[process.cwd()]:[],...(m||"").split(y)];if(o){let _=g||[".EXE",".CMD",".BAT",".COM"].join(y),F=_.split(y).flatMap(E=>[E,E.toLowerCase()]);return p.includes(".")&&F[0]!==""&&F.unshift(""),{pathEnv:v,pathExt:F,pathExtExe:_}}return {pathEnv:v,pathExt:[""]}},c=(p,m)=>{let g=/^".*"$/.test(p)?p.slice(1,-1):p;return (!g&&a.test(m)?m.slice(0,2):"")+r(g,m)},d=async(p,m={})=>{let{pathEnv:g,pathExt:y,pathExtExe:v}=l(p,m),_=[];for(let F of g){let E=c(F,p);for(let S of y){let P=E+S;if(await t(P,{pathExt:v,ignoreErrors:true})){if(!m.all)return P;_.push(P);}}}if(m.all&&_.length)return _;if(m.nothrow)return null;throw h(p)},f=(p,m={})=>{let{pathEnv:g,pathExt:y,pathExtExe:v}=l(p,m),_=[];for(let F of g){let E=c(F,p);for(let S of y){let P=E+S;if(e(P,{pathExt:v,ignoreErrors:true})){if(!m.all)return P;_.push(P);}}}if(m.all&&_.length)return _;if(m.nothrow)return null;throw h(p)};return So=d,d.sync=f,So}var hC=cC(),dC=Po(hC);Ft.join(My__default.default.tmpdir(),"antfu-ni");function df(t){return dC.sync(t,{nothrow:true})!==null}async function Io({autoInstall:t,programmatic:e,cwd:r}={}){let{name:s,agent:i,version:n}=await xv({cwd:r,onUnknown:o=>{e||console.warn("[ni] Unknown packageManager:",o);}})||{};if(s&&!df(s)&&!e){if(!t){console.warn(`[ni] Detected ${s} but it doesn't seem to be installed.
216
+ `),ke__default.default.env.CI&&ke__default.default.exit(1);let o=vr(s,of[s]),{tryInstall:u}=await mv({name:"tryInstall",type:"confirm",message:`Would you like to globally install ${o}?`});u||ke__default.default.exit(1);}await hf("npm",["i","-g",`${s}${n?`@${n}`:""}`],{nodeOptions:{stdio:"inherit",cwd:r},throwOnError:true});}return i}ke__default.default.env.NI_CONFIG_FILE;var pC=ke__default.default.platform==="win32"?ke__default.default.env.USERPROFILE:ke__default.default.env.HOME;Ft__default.default.join(pC||"~/",".nirc");var DC=async t=>{let e=await Io({cwd:t});return e&&["npm","yarn","pnpm","bun"].includes(e)?e:"npm"},ff=t=>{let e=Ft.join(t,"package.json");if(!Zd.existsSync(e))return "unknown";try{let r=JSON.parse(Zd.readFileSync(e,"utf-8")),s={...r.dependencies,...r.devDependencies};return s.next?"next":s.vite?"vite":s.webpack?"webpack":"unknown"}catch{return "unknown"}},bC=t=>{let e=Zd.existsSync(Ft.join(t,"app")),r=Zd.existsSync(Ft.join(t,"src","app")),s=Zd.existsSync(Ft.join(t,"pages")),i=Zd.existsSync(Ft.join(t,"src","pages"));return e||r?"app":s||i?"pages":"unknown"},yC=t=>{if(Zd.existsSync(Ft.join(t,"pnpm-workspace.yaml"))||Zd.existsSync(Ft.join(t,"lerna.json")))return true;let e=Ft.join(t,"package.json");if(Zd.existsSync(e))try{if(JSON.parse(Zd.readFileSync(e,"utf-8")).workspaces)return !0}catch{return false}return false},vC=t=>{let e=[],r=Ft.join(t,"pnpm-workspace.yaml");if(Zd.existsSync(r)){let o=Zd.readFileSync(r,"utf-8").split(`
217
+ `),u=false;for(let a of o){if(a.match(/^packages:\s*$/)){u=true;continue}if(u){if(a.match(/^[a-zA-Z]/)||a.trim()===""){a.match(/^[a-zA-Z]/)&&(u=false);continue}let h=a.match(/^\s*-\s*['"]?([^'"#\n]+?)['"]?\s*$/);h&&e.push(h[1].trim());}}}let s=Ft.join(t,"lerna.json");if(Zd.existsSync(s))try{let n=JSON.parse(Zd.readFileSync(s,"utf-8"));Array.isArray(n.packages)&&e.push(...n.packages);}catch{}let i=Ft.join(t,"package.json");if(Zd.existsSync(i))try{let n=JSON.parse(Zd.readFileSync(i,"utf-8"));Array.isArray(n.workspaces)?e.push(...n.workspaces):n.workspaces?.packages&&e.push(...n.workspaces.packages);}catch{}return [...new Set(e)]},CC=(t,e)=>{let r=[],s=e.replace(/\/\*$/,""),i=Ft.join(t,s);if(!Zd.existsSync(i))return r;try{let n=Zd.readdirSync(i,{withFileTypes:!0});for(let o of n)if(o.isDirectory()){let u=Ft.join(i,o.name,"package.json");Zd.existsSync(u)&&r.push(Ft.join(i,o.name));}}catch{return r}return r},xC=t=>{let e=Ft.join(t,"package.json");if(!Zd.existsSync(e))return false;try{let r=JSON.parse(Zd.readFileSync(e,"utf-8")),s={...r.dependencies,...r.devDependencies};return !!(s.react||s["react-dom"])}catch{return false}},pf=t=>{let e=vC(t),r=[];for(let s of e){let i=CC(t,s);for(let n of i){let o=ff(n),u=xC(n);if(u||o!=="unknown"){let a=Ft.join(n,"package.json"),h=Ft.basename(n);try{h=JSON.parse(Zd.readFileSync(a,"utf-8")).name||h;}catch{}r.push({name:h,path:n,framework:o,hasReact:u});}}}return r},_C=t=>{if(!Zd.existsSync(t))return false;try{let e=Zd.readFileSync(t,"utf-8");return [/["'`][^"'`]*react-grab/,/react-grab[^"'`]*["'`]/,/<[^>]*react-grab/i,/import[^;]*react-grab/i,/require[^)]*react-grab/i,/from\s+[^;]*react-grab/i,/src[^>]*react-grab/i].some(s=>s.test(e))}catch{return false}},wC=t=>{let e=Ft.join(t,"package.json");if(Zd.existsSync(e))try{let s=JSON.parse(Zd.readFileSync(e,"utf-8"));if({...s.dependencies,...s.devDependencies}["react-grab"])return !0}catch{}return [Ft.join(t,"app","layout.tsx"),Ft.join(t,"app","layout.jsx"),Ft.join(t,"src","app","layout.tsx"),Ft.join(t,"src","app","layout.jsx"),Ft.join(t,"pages","_document.tsx"),Ft.join(t,"pages","_document.jsx"),Ft.join(t,"instrumentation-client.ts"),Ft.join(t,"instrumentation-client.js"),Ft.join(t,"src","instrumentation-client.ts"),Ft.join(t,"src","instrumentation-client.js"),Ft.join(t,"index.html"),Ft.join(t,"public","index.html"),Ft.join(t,"src","index.tsx"),Ft.join(t,"src","index.ts"),Ft.join(t,"src","main.tsx"),Ft.join(t,"src","main.ts")].some(_C)},FC=["@react-grab/claude-code","@react-grab/cursor","@react-grab/opencode","@react-grab/codex","@react-grab/gemini","@react-grab/amp","@react-grab/ami","@react-grab/visual-edit"],EC=t=>{let e=Ft.join(t,"package.json");if(!Zd.existsSync(e))return null;try{let r=JSON.parse(Zd.readFileSync(e,"utf-8")),s={...r.dependencies,...r.devDependencies};return s["@remix-run/react"]||s.remix?"remix":s.astro?"astro":s["@sveltejs/kit"]?"sveltekit":s.gatsby?"gatsby":null}catch{return null}},AC=t=>{let e=Ft.join(t,"package.json");if(!Zd.existsSync(e))return [];try{let r=JSON.parse(Zd.readFileSync(e,"utf-8")),s={...r.dependencies,...r.devDependencies};return FC.filter(i=>!!s[i]).map(i=>i.replace("@react-grab/",""))}catch{return []}};var Et=async(t=process.cwd())=>{let e=ff(t);return {packageManager:await DC(t),framework:e,nextRouterType:e==="next"?bC(t):"unknown",isMonorepo:yC(t),projectRoot:t,hasReactGrab:wC(t),installedAgents:AC(t),unsupportedFramework:EC(t)}};var OC="\x1B[31m",RC="\x1B[32m",ds="\x1B[90m",At="\x1B[0m",SC="\x1B[1m",TC=(t,e)=>{let r=t.split(`
218
218
  `),s=e.split(`
219
- `),i=[];Math.max(r.length,s.length);let o=0,u=0;for(;o<r.length||u<s.length;){let a=r[o],h=s[u];if(a===h)i.push({type:"unchanged",content:a,lineNumber:u+1}),o++,u++;else if(a===void 0)i.push({type:"added",content:h,lineNumber:u+1}),u++;else if(h===void 0)i.push({type:"removed",content:a}),o++;else {let l=s.indexOf(a,u),c=r.indexOf(h,o);if(l!==-1&&(c===-1||l-u<c-o))for(;u<l;)i.push({type:"added",content:s[u],lineNumber:u+1}),u++;else if(c!==-1)for(;o<c;)i.push({type:"removed",content:r[o]}),o++;else i.push({type:"removed",content:a}),i.push({type:"added",content:h,lineNumber:u+1}),o++,u++;}}return i},__=(t,e=3)=>{let r=[],s=-1,i=false,n=t.map((o,u)=>o.type!=="unchanged"?u:-1).filter(o=>o!==-1);if(n.length===0)return `${ls}No changes${xt}`;for(let o of n){let u=Math.max(0,o-e),a=Math.min(t.length-1,o+e);u>s+1&&s!==-1&&r.push(`${ls} ...${xt}`);for(let h=Math.max(u,s+1);h<=a;h++){let l=t[h];l.type==="added"?(r.push(`${b_}+ ${l.content}${xt}`),i=true):l.type==="removed"?(r.push(`${D_}- ${l.content}${xt}`),i=true):r.push(`${ls} ${l.content}${xt}`),s=h;}}return i?r.join(`
220
- `):`${ls}No changes${xt}`},qt=(t,e,r)=>{console.log(`
221
- ${y_}File: ${t}${xt}`),console.log("\u2500".repeat(60));let s=C_(e,r);console.log(__(s)),console.log("\u2500".repeat(60));};var Lt=we(sr()),j={error:Lt.default.red,warn:Lt.default.yellow,info:Lt.default.cyan,success:Lt.default.green,dim:Lt.default.dim};var w={error(...t){console.log(j.error(t.join(" ")));},warn(...t){console.log(j.warn(t.join(" ")));},info(...t){console.log(j.info(t.join(" ")));},success(...t){console.log(j.success(t.join(" ")));},log(...t){console.log(t.join(" "));},break(){console.log("");}};var jt=t=>{w.break(),w.error("Something went wrong. Please check the error below for more details."),w.error("If the problem persists, please open an issue on GitHub."),w.error(""),t instanceof Error&&w.error(t.message),w.break(),process.exit(1);};var x_={npm:"npm install",yarn:"yarn add",pnpm:"pnpm add",bun:"bun add"},cs=(t,e,r,s=true)=>{if(t.length===0)return;let o=`${x_[e]}${s?" -D":""} ${t.join(" ")}`;console.log(`Running: ${o}
222
- `),child_process.execSync(o,{cwd:r,stdio:"inherit"});},hs=(t,e=true)=>{let r=[];return e&&r.push("react-grab"),t!=="none"&&r.push(`@react-grab/${t}`),r};var df=(t=0)=>e=>`\x1B[${e+t}m`,ff=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,pf=(t=0)=>(e,r,s)=>`\x1B[${38+t};2;${e};${r};${s}m`,J={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(J.modifier);var F_=Object.keys(J.color),w_=Object.keys(J.bgColor);[...F_,...w_];function E_(){let t=new Map;for(let[e,r]of Object.entries(J)){for(let[s,i]of Object.entries(r))J[s]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[s]=J[s],t.set(i[0],i[1]);Object.defineProperty(J,e,{value:r,enumerable:false});}return Object.defineProperty(J,"codes",{value:t,enumerable:false}),J.color.close="\x1B[39m",J.bgColor.close="\x1B[49m",J.color.ansi=df(),J.color.ansi256=ff(),J.color.ansi16m=pf(),J.bgColor.ansi=df(10),J.bgColor.ansi256=ff(10),J.bgColor.ansi16m=pf(10),Object.defineProperties(J,{rgbToAnsi256:{value(e,r,s){return e===r&&r===s?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(s/255*5)},enumerable:false},hexToRgb:{value(e){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return [0,0,0];let[s]=r;s.length===3&&(s=[...s].map(n=>n+n).join(""));let i=Number.parseInt(s,16);return [i>>16&255,i>>8&255,i&255]},enumerable:false},hexToAnsi256:{value:e=>J.rgbToAnsi256(...J.hexToRgb(e)),enumerable:false},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,s,i;if(e>=232)r=((e-232)*10+8)/255,s=r,i=r;else {e-=16;let u=e%36;r=Math.floor(e/36)/5,s=Math.floor(u/6)/5,i=u%6/5;}let n=Math.max(r,s,i)*2;if(n===0)return 30;let o=30+(Math.round(i)<<2|Math.round(s)<<1|Math.round(r));return n===2&&(o+=60),o},enumerable:false},rgbToAnsi:{value:(e,r,s)=>J.ansi256ToAnsi(J.rgbToAnsi256(e,r,s)),enumerable:false},hexToAnsi:{value:e=>J.ansi256ToAnsi(J.hexToAnsi256(e)),enumerable:false}}),J}var A_=E_(),Pe=A_;function ve(t,e=globalThis.Deno?globalThis.Deno.args:ke__default.default.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",s=e.indexOf(r+t),i=e.indexOf("--");return s!==-1&&(i===-1||s<i)}var{env:K}=ke__default.default,ds;ve("no-color")||ve("no-colors")||ve("color=false")||ve("color=never")?ds=0:(ve("color")||ve("colors")||ve("color=true")||ve("color=always"))&&(ds=1);function S_(){if("FORCE_COLOR"in K)return K.FORCE_COLOR==="true"?1:K.FORCE_COLOR==="false"?0:K.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(K.FORCE_COLOR,10),3)}function R_(t){return t===0?false:{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function T_(t,{streamIsTTY:e,sniffFlags:r=true}={}){let s=S_();s!==void 0&&(ds=s);let i=r?ds:s;if(i===0)return 0;if(r){if(ve("color=16m")||ve("color=full")||ve("color=truecolor"))return 3;if(ve("color=256"))return 2}if("TF_BUILD"in K&&"AGENT_NAME"in K)return 1;if(t&&!e&&i===void 0)return 0;let n=i||0;if(K.TERM==="dumb")return n;if(ke__default.default.platform==="win32"){let o=wy__default.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in K)return ["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in K)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in K)||K.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in K)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(K.TEAMCITY_VERSION)?1:0;if(K.COLORTERM==="truecolor"||K.TERM==="xterm-kitty"||K.TERM==="xterm-ghostty"||K.TERM==="wezterm")return 3;if("TERM_PROGRAM"in K){let o=Number.parseInt((K.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(K.TERM_PROGRAM){case "iTerm.app":return o>=3?3:2;case "Apple_Terminal":return 2}}return /-256(color)?$/i.test(K.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(K.TERM)||"COLORTERM"in K?1:n}function gf(t,e={}){let r=T_(t,{streamIsTTY:t&&t.isTTY,...e});return R_(r)}var P_={stdout:gf({isTTY:mf__default.default.isatty(1)}),stderr:gf({isTTY:mf__default.default.isatty(2)})},Df=P_;function bf(t,e,r){let s=t.indexOf(e);if(s===-1)return t;let i=e.length,n=0,o="";do o+=t.slice(n,s)+e+r,n=s+i,s=t.indexOf(e,n);while(s!==-1);return o+=t.slice(n),o}function yf(t,e,r,s){let i=0,n="";do{let o=t[s-1]==="\r";n+=t.slice(i,o?s-1:s)+e+(o?`\r
219
+ `),i=[];Math.max(r.length,s.length);let o=0,u=0;for(;o<r.length||u<s.length;){let a=r[o],h=s[u];if(a===h)i.push({type:"unchanged",content:a,lineNumber:u+1}),o++,u++;else if(a===void 0)i.push({type:"added",content:h,lineNumber:u+1}),u++;else if(h===void 0)i.push({type:"removed",content:a}),o++;else {let l=s.indexOf(a,u),c=r.indexOf(h,o);if(l!==-1&&(c===-1||l-u<c-o))for(;u<l;)i.push({type:"added",content:s[u],lineNumber:u+1}),u++;else if(c!==-1)for(;o<c;)i.push({type:"removed",content:r[o]}),o++;else i.push({type:"removed",content:a}),i.push({type:"added",content:h,lineNumber:u+1}),o++,u++;}}return i},PC=(t,e=3)=>{let r=[],s=-1,i=false,n=t.map((o,u)=>o.type!=="unchanged"?u:-1).filter(o=>o!==-1);if(n.length===0)return `${ds}No changes${At}`;for(let o of n){let u=Math.max(0,o-e),a=Math.min(t.length-1,o+e);u>s+1&&s!==-1&&r.push(`${ds} ...${At}`);for(let h=Math.max(u,s+1);h<=a;h++){let l=t[h];l.type==="added"?(r.push(`${RC}+ ${l.content}${At}`),i=true):l.type==="removed"?(r.push(`${OC}- ${l.content}${At}`),i=true):r.push(`${ds} ${l.content}${At}`),s=h;}}return i?r.join(`
220
+ `):`${ds}No changes${At}`},bt=(t,e,r)=>{console.log(`
221
+ ${SC}File: ${t}${At}`),console.log("\u2500".repeat(60));let s=TC(e,r);console.log(PC(s)),console.log("\u2500".repeat(60));};var Wt=be(Nt()),I={error:Wt.default.red,warn:Wt.default.yellow,info:Wt.default.cyan,success:Wt.default.green,dim:Wt.default.dim};var b={error(...t){console.log(I.error(t.join(" ")));},warn(...t){console.log(I.warn(t.join(" ")));},info(...t){console.log(I.info(t.join(" ")));},success(...t){console.log(I.success(t.join(" ")));},log(...t){console.log(t.join(" "));},break(){console.log("");}};var yt=t=>{b.break(),b.error("Something went wrong. Please check the error below for more details."),b.error("If the problem persists, please open an issue on GitHub."),b.error(""),t instanceof Error&&b.error(t.message),b.break(),process.exit(1);};var kC={npm:"npm install",yarn:"yarn add",pnpm:"pnpm add",bun:"bun add"},fs=(t,e,r,s=true)=>{if(t.length===0)return;let o=`${kC[e]}${s?" -D":""} ${t.join(" ")}`;console.log(`Running: ${o}
222
+ `),child_process.execSync(o,{cwd:r,stdio:"inherit"});},ps=(t,e=true)=>{let r=[];return e&&r.push("react-grab"),t!=="none"&&r.push(`@react-grab/${t}`),r};var mf=(t=0)=>e=>`\x1B[${e+t}m`,gf=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Df=(t=0)=>(e,r,s)=>`\x1B[${38+t};2;${e};${r};${s}m`,Y={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(Y.modifier);var IC=Object.keys(Y.color),MC=Object.keys(Y.bgColor);[...IC,...MC];function BC(){let t=new Map;for(let[e,r]of Object.entries(Y)){for(let[s,i]of Object.entries(r))Y[s]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[s]=Y[s],t.set(i[0],i[1]);Object.defineProperty(Y,e,{value:r,enumerable:false});}return Object.defineProperty(Y,"codes",{value:t,enumerable:false}),Y.color.close="\x1B[39m",Y.bgColor.close="\x1B[49m",Y.color.ansi=mf(),Y.color.ansi256=gf(),Y.color.ansi16m=Df(),Y.bgColor.ansi=mf(10),Y.bgColor.ansi256=gf(10),Y.bgColor.ansi16m=Df(10),Object.defineProperties(Y,{rgbToAnsi256:{value(e,r,s){return e===r&&r===s?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(s/255*5)},enumerable:false},hexToRgb:{value(e){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return [0,0,0];let[s]=r;s.length===3&&(s=[...s].map(n=>n+n).join(""));let i=Number.parseInt(s,16);return [i>>16&255,i>>8&255,i&255]},enumerable:false},hexToAnsi256:{value:e=>Y.rgbToAnsi256(...Y.hexToRgb(e)),enumerable:false},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,s,i;if(e>=232)r=((e-232)*10+8)/255,s=r,i=r;else {e-=16;let u=e%36;r=Math.floor(e/36)/5,s=Math.floor(u/6)/5,i=u%6/5;}let n=Math.max(r,s,i)*2;if(n===0)return 30;let o=30+(Math.round(i)<<2|Math.round(s)<<1|Math.round(r));return n===2&&(o+=60),o},enumerable:false},rgbToAnsi:{value:(e,r,s)=>Y.ansi256ToAnsi(Y.rgbToAnsi256(e,r,s)),enumerable:false},hexToAnsi:{value:e=>Y.ansi256ToAnsi(Y.hexToAnsi256(e)),enumerable:false}}),Y}var HC=BC(),Pe=HC;function _e(t,e=globalThis.Deno?globalThis.Deno.args:ke__default.default.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",s=e.indexOf(r+t),i=e.indexOf("--");return s!==-1&&(i===-1||s<i)}var{env:J}=ke__default.default,ms;_e("no-color")||_e("no-colors")||_e("color=false")||_e("color=never")?ms=0:(_e("color")||_e("colors")||_e("color=true")||_e("color=always"))&&(ms=1);function qC(){if("FORCE_COLOR"in J)return J.FORCE_COLOR==="true"?1:J.FORCE_COLOR==="false"?0:J.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(J.FORCE_COLOR,10),3)}function LC(t){return t===0?false:{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function jC(t,{streamIsTTY:e,sniffFlags:r=true}={}){let s=qC();s!==void 0&&(ms=s);let i=r?ms:s;if(i===0)return 0;if(r){if(_e("color=16m")||_e("color=full")||_e("color=truecolor"))return 3;if(_e("color=256"))return 2}if("TF_BUILD"in J&&"AGENT_NAME"in J)return 1;if(t&&!e&&i===void 0)return 0;let n=i||0;if(J.TERM==="dumb")return n;if(ke__default.default.platform==="win32"){let o=My__default.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in J)return ["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in J)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in J)||J.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in J)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(J.TEAMCITY_VERSION)?1:0;if(J.COLORTERM==="truecolor"||J.TERM==="xterm-kitty"||J.TERM==="xterm-ghostty"||J.TERM==="wezterm")return 3;if("TERM_PROGRAM"in J){let o=Number.parseInt((J.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(J.TERM_PROGRAM){case "iTerm.app":return o>=3?3:2;case "Apple_Terminal":return 2}}return /-256(color)?$/i.test(J.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(J.TERM)||"COLORTERM"in J?1:n}function yf(t,e={}){let r=jC(t,{streamIsTTY:t&&t.isTTY,...e});return LC(r)}var GC={stdout:yf({isTTY:bf__default.default.isatty(1)}),stderr:yf({isTTY:bf__default.default.isatty(2)})},vf=GC;function Cf(t,e,r){let s=t.indexOf(e);if(s===-1)return t;let i=e.length,n=0,o="";do o+=t.slice(n,s)+e+r,n=s+i,s=t.indexOf(e,n);while(s!==-1);return o+=t.slice(n),o}function xf(t,e,r,s){let i=0,n="";do{let o=t[s-1]==="\r";n+=t.slice(i,o?s-1:s)+e+(o?`\r
223
223
  `:`
224
224
  `)+r,i=s+1,s=t.indexOf(`
225
- `,i);}while(s!==-1);return n+=t.slice(i),n}var{stdout:Cf,stderr:_f}=Df,ko=Symbol("GENERATOR"),Gt=Symbol("STYLER"),br=Symbol("IS_EMPTY"),vf=["ansi","ansi","ansi256","ansi16m"],Vt=Object.create(null),$_=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Cf?Cf.level:0;t.level=e.level===void 0?r:e.level;};var k_=t=>{let e=(...r)=>r.join(" ");return $_(e,t),Object.setPrototypeOf(e,yr.prototype),e};function yr(t){return k_(t)}Object.setPrototypeOf(yr.prototype,Function.prototype);for(let[t,e]of Object.entries(Pe))Vt[t]={get(){let r=fs(this,Bo(e.open,e.close,this[Gt]),this[br]);return Object.defineProperty(this,t,{value:r}),r}};Vt.visible={get(){let t=fs(this,this[Gt],true);return Object.defineProperty(this,"visible",{value:t}),t}};var Io=(t,e,r,...s)=>t==="rgb"?e==="ansi16m"?Pe[r].ansi16m(...s):e==="ansi256"?Pe[r].ansi256(Pe.rgbToAnsi256(...s)):Pe[r].ansi(Pe.rgbToAnsi(...s)):t==="hex"?Io("rgb",e,r,...Pe.hexToRgb(...s)):Pe[r][t](...s),I_=["rgb","hex","ansi256"];for(let t of I_){Vt[t]={get(){let{level:r}=this;return function(...s){let i=Bo(Io(t,vf[r],"color",...s),Pe.color.close,this[Gt]);return fs(this,i,this[br])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);Vt[e]={get(){let{level:r}=this;return function(...s){let i=Bo(Io(t,vf[r],"bgColor",...s),Pe.bgColor.close,this[Gt]);return fs(this,i,this[br])}}};}var B_=Object.defineProperties(()=>{},{...Vt,level:{enumerable:true,get(){return this[ko].level},set(t){this[ko].level=t;}}}),Bo=(t,e,r)=>{let s,i;return r===void 0?(s=t,i=e):(s=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:s,closeAll:i,parent:r}},fs=(t,e,r)=>{let s=(...i)=>M_(s,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(s,B_),s[ko]=t,s[Gt]=e,s[br]=r,s},M_=(t,e)=>{if(t.level<=0||!e)return t[br]?"":e;let r=t[Gt];if(r===void 0)return e;let{openAll:s,closeAll:i}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=bf(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
226
- `);return n!==-1&&(e=yf(e,i,s,n)),s+e+i};Object.defineProperties(yr.prototype,Vt);var H_=yr();yr({level:_f?_f.level:0});var $e=H_;var N_=(t,e,r,s)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;let i=Object.getOwnPropertyDescriptor(t,r),n=Object.getOwnPropertyDescriptor(e,r);!q_(i,n)&&s||Object.defineProperty(t,r,n);},q_=function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},L_=(t,e)=>{let r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r);},j_=(t,e)=>`/* Wrapped ${t}*/
227
- ${e}`,G_=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),V_=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),U_=(t,e,r)=>{let s=r===""?"":`with ${r.trim()}() `,i=j_.bind(null,s,e.toString());Object.defineProperty(i,"name",V_);let{writable:n,enumerable:o,configurable:u}=G_;Object.defineProperty(t,"toString",{value:i,writable:n,enumerable:o,configurable:u});};function Mo(t,e,{ignoreNonConfigurable:r=false}={}){let{name:s}=t;for(let i of Reflect.ownKeys(e))N_(t,e,i,r);return L_(t,e),U_(t,e,s),t}var ps=new WeakMap,xf=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,s=0,i=t.displayName||t.name||"<anonymous>",n=function(...o){if(ps.set(n,++s),s===1)r=t.apply(this,o),t=void 0;else if(e.throw===true)throw new Error(`Function \`${i}\` can only be called once`);return r};return Mo(n,t),ps.set(n,s),n};xf.callCount=t=>{if(!ps.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return ps.get(t)};var Ff=xf;var Ft=[];Ft.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Ft.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Ft.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var ms=t=>!!t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function",Ho=Symbol.for("signal-exit emitter"),No=globalThis,W_=Object.defineProperty.bind(Object),qo=class{emitted={afterExit:false,exit:false};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(No[Ho])return No[Ho];W_(No,Ho,{value:this,writable:false,enumerable:false,configurable:false});}on(e,r){this.listeners[e].push(r);}removeListener(e,r){let s=this.listeners[e],i=s.indexOf(r);i!==-1&&(i===0&&s.length===1?s.length=0:s.splice(i,1));}emit(e,r,s){if(this.emitted[e])return false;this.emitted[e]=true;let i=false;for(let n of this.listeners[e])i=n(r,s)===true||i;return e==="exit"&&(i=this.emit("afterExit",r,s)||i),i}},gs=class{},Y_=t=>({onExit(e,r){return t.onExit(e,r)},load(){return t.load()},unload(){return t.unload()}}),Lo=class extends gs{onExit(){return ()=>{}}load(){}unload(){}},jo=class extends gs{#o=Go.platform==="win32"?"SIGINT":"SIGHUP";#r=new qo;#e;#i;#d;#t={};#n=false;constructor(e){super(),this.#e=e,this.#t={};for(let r of Ft)this.#t[r]=()=>{let s=this.#e.listeners(r),{count:i}=this.#r,n=e;if(typeof n.__signal_exit_emitter__=="object"&&typeof n.__signal_exit_emitter__.count=="number"&&(i+=n.__signal_exit_emitter__.count),s.length===i){this.unload();let o=this.#r.emit("exit",null,r),u=r==="SIGHUP"?this.#o:r;o||e.kill(e.pid,u);}};this.#d=e.reallyExit,this.#i=e.emit;}onExit(e,r){if(!ms(this.#e))return ()=>{};this.#n===false&&this.load();let s=r?.alwaysLast?"afterExit":"exit";return this.#r.on(s,e),()=>{this.#r.removeListener(s,e),this.#r.listeners.exit.length===0&&this.#r.listeners.afterExit.length===0&&this.unload();}}load(){if(!this.#n){this.#n=true,this.#r.count+=1;for(let e of Ft)try{let r=this.#t[e];r&&this.#e.on(e,r);}catch{}this.#e.emit=(e,...r)=>this.#f(e,...r),this.#e.reallyExit=e=>this.#s(e);}}unload(){this.#n&&(this.#n=false,Ft.forEach(e=>{let r=this.#t[e];if(!r)throw new Error("Listener not defined for signal: "+e);try{this.#e.removeListener(e,r);}catch{}}),this.#e.emit=this.#i,this.#e.reallyExit=this.#d,this.#r.count-=1);}#s(e){return ms(this.#e)?(this.#e.exitCode=e||0,this.#r.emit("exit",this.#e.exitCode,null),this.#d.call(this.#e,this.#e.exitCode)):0}#f(e,...r){let s=this.#i;if(e==="exit"&&ms(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let i=s.call(this.#e,e,...r);return this.#r.emit("exit",this.#e.exitCode,null),i}else return s.call(this.#e,e,...r)}},Go=globalThis.process,{onExit:wf}=Y_(ms(Go)?new jo(Go):new Lo);var Ef=ke__default.default.stderr.isTTY?ke__default.default.stderr:ke__default.default.stdout.isTTY?ke__default.default.stdout:void 0,J_=Ef?Ff(()=>{wf(()=>{Ef.write("\x1B[?25h");},{alwaysLast:true});}):()=>{},Af=J_;var bs=false,Ut={};Ut.show=(t=ke__default.default.stderr)=>{t.isTTY&&(bs=false,t.write("\x1B[?25h"));};Ut.hide=(t=ke__default.default.stderr)=>{t.isTTY&&(Af(),bs=true,t.write("\x1B[?25l"));};Ut.toggle=(t,e)=>{t!==void 0&&(bs=t),bs?Ut.show(e):Ut.hide(e);};var Vo=Ut;var vr=we(Uo());function Wo(){return ke__default.default.platform!=="win32"?ke__default.default.env.TERM!=="linux":!!ke__default.default.env.CI||!!ke__default.default.env.WT_SESSION||!!ke__default.default.env.TERMINUS_SUBLIME||ke__default.default.env.ConEmuTask==="{cmd::Cmder}"||ke__default.default.env.TERM_PROGRAM==="Terminus-Sublime"||ke__default.default.env.TERM_PROGRAM==="vscode"||ke__default.default.env.TERM==="xterm-256color"||ke__default.default.env.TERM==="alacritty"||ke__default.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var z_={info:$e.blue("\u2139"),success:$e.green("\u2714"),warning:$e.yellow("\u26A0"),error:$e.red("\u2716")},X_={info:$e.blue("i"),success:$e.green("\u221A"),warning:$e.yellow("\u203C"),error:$e.red("\xD7")},Z_=Wo()?z_:X_,Cr=Z_;function Yo({onlyFirst:t=false}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,t?void 0:"g")}var Q_=Yo();function _r(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(Q_,"")}function Pf(t){return t===161||t===164||t===167||t===168||t===170||t===173||t===174||t>=176&&t<=180||t>=182&&t<=186||t>=188&&t<=191||t===198||t===208||t===215||t===216||t>=222&&t<=225||t===230||t>=232&&t<=234||t===236||t===237||t===240||t===242||t===243||t>=247&&t<=250||t===252||t===254||t===257||t===273||t===275||t===283||t===294||t===295||t===299||t>=305&&t<=307||t===312||t>=319&&t<=322||t===324||t>=328&&t<=331||t===333||t===338||t===339||t===358||t===359||t===363||t===462||t===464||t===466||t===468||t===470||t===472||t===474||t===476||t===593||t===609||t===708||t===711||t>=713&&t<=715||t===717||t===720||t>=728&&t<=731||t===733||t===735||t>=768&&t<=879||t>=913&&t<=929||t>=931&&t<=937||t>=945&&t<=961||t>=963&&t<=969||t===1025||t>=1040&&t<=1103||t===1105||t===8208||t>=8211&&t<=8214||t===8216||t===8217||t===8220||t===8221||t>=8224&&t<=8226||t>=8228&&t<=8231||t===8240||t===8242||t===8243||t===8245||t===8251||t===8254||t===8308||t===8319||t>=8321&&t<=8324||t===8364||t===8451||t===8453||t===8457||t===8467||t===8470||t===8481||t===8482||t===8486||t===8491||t===8531||t===8532||t>=8539&&t<=8542||t>=8544&&t<=8555||t>=8560&&t<=8569||t===8585||t>=8592&&t<=8601||t===8632||t===8633||t===8658||t===8660||t===8679||t===8704||t===8706||t===8707||t===8711||t===8712||t===8715||t===8719||t===8721||t===8725||t===8730||t>=8733&&t<=8736||t===8739||t===8741||t>=8743&&t<=8748||t===8750||t>=8756&&t<=8759||t===8764||t===8765||t===8776||t===8780||t===8786||t===8800||t===8801||t>=8804&&t<=8807||t===8810||t===8811||t===8814||t===8815||t===8834||t===8835||t===8838||t===8839||t===8853||t===8857||t===8869||t===8895||t===8978||t>=9312&&t<=9449||t>=9451&&t<=9547||t>=9552&&t<=9587||t>=9600&&t<=9615||t>=9618&&t<=9621||t===9632||t===9633||t>=9635&&t<=9641||t===9650||t===9651||t===9654||t===9655||t===9660||t===9661||t===9664||t===9665||t>=9670&&t<=9672||t===9675||t>=9678&&t<=9681||t>=9698&&t<=9701||t===9711||t===9733||t===9734||t===9737||t===9742||t===9743||t===9756||t===9758||t===9792||t===9794||t===9824||t===9825||t>=9827&&t<=9829||t>=9831&&t<=9834||t===9836||t===9837||t===9839||t===9886||t===9887||t===9919||t>=9926&&t<=9933||t>=9935&&t<=9939||t>=9941&&t<=9953||t===9955||t===9960||t===9961||t>=9963&&t<=9969||t===9972||t>=9974&&t<=9977||t===9979||t===9980||t===9982||t===9983||t===10045||t>=10102&&t<=10111||t>=11094&&t<=11097||t>=12872&&t<=12879||t>=57344&&t<=63743||t>=65024&&t<=65039||t===65533||t>=127232&&t<=127242||t>=127248&&t<=127277||t>=127280&&t<=127337||t>=127344&&t<=127373||t===127375||t===127376||t>=127387&&t<=127404||t>=917760&&t<=917999||t>=983040&&t<=1048573||t>=1048576&&t<=1114109}function $f(t){return t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510}function kf(t){return t>=4352&&t<=4447||t===8986||t===8987||t===9001||t===9002||t>=9193&&t<=9196||t===9200||t===9203||t===9725||t===9726||t===9748||t===9749||t>=9776&&t<=9783||t>=9800&&t<=9811||t===9855||t>=9866&&t<=9871||t===9875||t===9889||t===9898||t===9899||t===9917||t===9918||t===9924||t===9925||t===9934||t===9940||t===9962||t===9970||t===9971||t===9973||t===9978||t===9981||t===9989||t===9994||t===9995||t===10024||t===10060||t===10062||t>=10067&&t<=10069||t===10071||t>=10133&&t<=10135||t===10160||t===10175||t===11035||t===11036||t===11088||t===11093||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12773||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=94176&&t<=94180||t>=94192&&t<=94198||t>=94208&&t<=101589||t>=101631&&t<=101662||t>=101760&&t<=101874||t>=110576&&t<=110579||t>=110581&&t<=110587||t===110589||t===110590||t>=110592&&t<=110882||t===110898||t>=110928&&t<=110930||t===110933||t>=110948&&t<=110951||t>=110960&&t<=111355||t>=119552&&t<=119638||t>=119648&&t<=119670||t===126980||t===127183||t===127374||t>=127377&&t<=127386||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t===127568||t===127569||t>=127584&&t<=127589||t>=127744&&t<=127776||t>=127789&&t<=127797||t>=127799&&t<=127868||t>=127870&&t<=127891||t>=127904&&t<=127946||t>=127951&&t<=127955||t>=127968&&t<=127984||t===127988||t>=127992&&t<=128062||t===128064||t>=128066&&t<=128252||t>=128255&&t<=128317||t>=128331&&t<=128334||t>=128336&&t<=128359||t===128378||t===128405||t===128406||t===128420||t>=128507&&t<=128591||t>=128640&&t<=128709||t===128716||t>=128720&&t<=128722||t>=128725&&t<=128728||t>=128732&&t<=128735||t===128747||t===128748||t>=128756&&t<=128764||t>=128992&&t<=129003||t===129008||t>=129292&&t<=129338||t>=129340&&t<=129349||t>=129351&&t<=129535||t>=129648&&t<=129660||t>=129664&&t<=129674||t>=129678&&t<=129734||t===129736||t>=129741&&t<=129756||t>=129759&&t<=129770||t>=129775&&t<=129784||t>=131072&&t<=196605||t>=196608&&t<=262141}function ev(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}function If(t,{ambiguousAsWide:e=false}={}){return ev(t),$f(t)||kf(t)||e&&Pf(t)?2:1}var Bf=()=>/[#*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;var tv=new Intl.Segmenter,rv=/^\p{Default_Ignorable_Code_Point}$/u;function Jo(t,e={}){if(typeof t!="string"||t.length===0)return 0;let{ambiguousIsNarrow:r=true,countAnsiEscapeCodes:s=false}=e;if(s||(t=_r(t)),t.length===0)return 0;let i=0,n={ambiguousAsWide:!r};for(let{segment:o}of tv.segment(t)){let u=o.codePointAt(0);if(!(u<=31||u>=127&&u<=159)&&!(u>=8203&&u<=8207||u===65279)&&!(u>=768&&u<=879||u>=6832&&u<=6911||u>=7616&&u<=7679||u>=8400&&u<=8447||u>=65056&&u<=65071)&&!(u>=55296&&u<=57343)&&!(u>=65024&&u<=65039)&&!rv.test(o)){if(Bf().test(o)){i+=2;continue}i+=If(u,n);}}return i}function Ko({stream:t=process.stdout}={}){return !!(t&&t.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}function zo(){let{env:t}=ke__default.default,{TERM:e,TERM_PROGRAM:r}=t;return ke__default.default.platform!=="win32"?e!=="linux":!!t.WT_SESSION||!!t.TERMINUS_SUBLIME||t.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||e==="xterm-256color"||e==="alacritty"||e==="rxvt-unicode"||e==="rxvt-unicode-256color"||t.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var sv=3,Xo=class{#o=0;start(){this.#o++,this.#o===1&&this.#r();}stop(){if(this.#o<=0)throw new Error("`stop` called more times than `start`");this.#o--,this.#o===0&&this.#e();}#r(){ke__default.default.platform==="win32"||!ke__default.default.stdin.isTTY||(ke__default.default.stdin.setRawMode(true),ke__default.default.stdin.on("data",this.#i),ke__default.default.stdin.resume());}#e(){ke__default.default.stdin.isTTY&&(ke__default.default.stdin.off("data",this.#i),ke__default.default.stdin.pause(),ke__default.default.stdin.setRawMode(false));}#i(e){e[0]===sv&&ke__default.default.emit("SIGINT");}},iv=new Xo,Zo=iv;we(Uo());var Qo=class{#o=0;#r=false;#e=0;#i=-1;#d=0;#t;#n;#s;#f;#m;#l;#c;#h;#g;#u;#a;color;constructor(e){typeof e=="string"&&(e={text:e}),this.#t={color:"cyan",stream:ke__default.default.stderr,discardStdin:true,hideCursor:true,...e},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#m=this.#t.interval,this.#s=this.#t.stream,this.#l=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:Ko({stream:this.#s}),this.#c=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:false,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,ke__default.default.env.NODE_ENV==="test"&&(this._stream=this.#s,this._isEnabled=this.#l,Object.defineProperty(this,"_linesToClear",{get(){return this.#o},set(r){this.#o=r;}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#i}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}));}get indent(){return this.#h}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw new Error("The `indent` option must be an integer from 0 and up");this.#h=e,this.#p();}get interval(){return this.#m??this.#n.interval??100}get spinner(){return this.#n}set spinner(e){if(this.#i=-1,this.#m=void 0,typeof e=="object"){if(e.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#n=e;}else if(!zo())this.#n=vr.default.line;else if(e===void 0)this.#n=vr.default.dots;else if(e!=="default"&&vr.default[e])this.#n=vr.default[e];else throw new Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#g}set text(e=""){this.#g=e,this.#p();}get prefixText(){return this.#u}set prefixText(e=""){this.#u=e,this.#p();}get suffixText(){return this.#a}set suffixText(e=""){this.#a=e,this.#p();}get isSpinning(){return this.#f!==void 0}#D(e=this.#u,r=" "){return typeof e=="string"&&e!==""?e+r:typeof e=="function"?e()+r:""}#b(e=this.#a,r=" "){return typeof e=="string"&&e!==""?r+e:typeof e=="function"?r+e():""}#p(){let e=this.#s.columns??80,r=this.#D(this.#u,"-"),s=this.#b(this.#a,"-"),i=" ".repeat(this.#h)+r+"--"+this.#g+"--"+s;this.#e=0;for(let n of _r(i).split(`
228
- `))this.#e+=Math.max(1,Math.ceil(Jo(n,{countAnsiEscapeCodes:true})/e));}get isEnabled(){return this.#l&&!this.#c}set isEnabled(e){if(typeof e!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#l=e;}get isSilent(){return this.#c}set isSilent(e){if(typeof e!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#c=e;}frame(){let e=Date.now();(this.#i===-1||e-this.#d>=this.interval)&&(this.#i=++this.#i%this.#n.frames.length,this.#d=e);let{frames:r}=this.#n,s=r[this.#i];this.color&&(s=$e[this.color](s));let i=typeof this.#u=="string"&&this.#u!==""?this.#u+" ":"",n=typeof this.text=="string"?" "+this.text:"",o=typeof this.#a=="string"&&this.#a!==""?" "+this.#a:"";return i+s+n+o}clear(){if(!this.#l||!this.#s.isTTY)return this;this.#s.cursorTo(0);for(let e=0;e<this.#o;e++)e>0&&this.#s.moveCursor(0,-1),this.#s.clearLine(1);return (this.#h||this.lastIndent!==this.#h)&&this.#s.cursorTo(this.#h),this.lastIndent=this.#h,this.#o=0,this}render(){return this.#c?this:(this.clear(),this.#s.write(this.frame()),this.#o=this.#e,this)}start(e){return e&&(this.text=e),this.#c?this:this.#l?this.isSpinning?this:(this.#t.hideCursor&&Vo.hide(this.#s),this.#t.discardStdin&&ke__default.default.stdin.isTTY&&(this.#r=true,Zo.start()),this.render(),this.#f=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#s.write(`- ${this.text}
229
- `),this)}stop(){return this.#l?(clearInterval(this.#f),this.#f=void 0,this.#i=0,this.clear(),this.#t.hideCursor&&Vo.show(this.#s),this.#t.discardStdin&&ke__default.default.stdin.isTTY&&this.#r&&(Zo.stop(),this.#r=false),this):this}succeed(e){return this.stopAndPersist({symbol:Cr.success,text:e})}fail(e){return this.stopAndPersist({symbol:Cr.error,text:e})}warn(e){return this.stopAndPersist({symbol:Cr.warning,text:e})}info(e){return this.stopAndPersist({symbol:Cr.info,text:e})}stopAndPersist(e={}){if(this.#c)return this;let r=e.prefixText??this.#u,s=this.#D(r," "),i=e.symbol??" ",n=e.text??this.text,u=typeof n=="string"?(i?" ":"")+n:"",a=e.suffixText??this.#a,h=this.#b(a," "),l=s+i+u+h+`
230
- `;return this.stop(),this.#s.write(l),this}};function eu(t){return new Qo(t)}var ue=(t,e)=>eu({text:t,isSilent:e?.silent,stream:process.stdout});var ov=`{process.env.NODE_ENV === "development" && (
225
+ `,i);}while(s!==-1);return n+=t.slice(i),n}var{stdout:_f,stderr:wf}=vf,Bo=Symbol("GENERATOR"),Kt=Symbol("STYLER"),Cr=Symbol("IS_EMPTY"),Ff=["ansi","ansi","ansi256","ansi16m"],Yt=Object.create(null),VC=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=_f?_f.level:0;t.level=e.level===void 0?r:e.level;};var UC=t=>{let e=(...r)=>r.join(" ");return VC(e,t),Object.setPrototypeOf(e,xr.prototype),e};function xr(t){return UC(t)}Object.setPrototypeOf(xr.prototype,Function.prototype);for(let[t,e]of Object.entries(Pe))Yt[t]={get(){let r=gs(this,No(e.open,e.close,this[Kt]),this[Cr]);return Object.defineProperty(this,t,{value:r}),r}};Yt.visible={get(){let t=gs(this,this[Kt],true);return Object.defineProperty(this,"visible",{value:t}),t}};var Ho=(t,e,r,...s)=>t==="rgb"?e==="ansi16m"?Pe[r].ansi16m(...s):e==="ansi256"?Pe[r].ansi256(Pe.rgbToAnsi256(...s)):Pe[r].ansi(Pe.rgbToAnsi(...s)):t==="hex"?Ho("rgb",e,r,...Pe.hexToRgb(...s)):Pe[r][t](...s),WC=["rgb","hex","ansi256"];for(let t of WC){Yt[t]={get(){let{level:r}=this;return function(...s){let i=No(Ho(t,Ff[r],"color",...s),Pe.color.close,this[Kt]);return gs(this,i,this[Cr])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);Yt[e]={get(){let{level:r}=this;return function(...s){let i=No(Ho(t,Ff[r],"bgColor",...s),Pe.bgColor.close,this[Kt]);return gs(this,i,this[Cr])}}};}var KC=Object.defineProperties(()=>{},{...Yt,level:{enumerable:true,get(){return this[Bo].level},set(t){this[Bo].level=t;}}}),No=(t,e,r)=>{let s,i;return r===void 0?(s=t,i=e):(s=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:s,closeAll:i,parent:r}},gs=(t,e,r)=>{let s=(...i)=>YC(s,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(s,KC),s[Bo]=t,s[Kt]=e,s[Cr]=r,s},YC=(t,e)=>{if(t.level<=0||!e)return t[Cr]?"":e;let r=t[Kt];if(r===void 0)return e;let{openAll:s,closeAll:i}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=Cf(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
226
+ `);return n!==-1&&(e=xf(e,i,s,n)),s+e+i};Object.defineProperties(xr.prototype,Yt);var JC=xr();xr({level:wf?wf.level:0});var $e=JC;var zC=(t,e,r,s)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;let i=Object.getOwnPropertyDescriptor(t,r),n=Object.getOwnPropertyDescriptor(e,r);!XC(i,n)&&s||Object.defineProperty(t,r,n);},XC=function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},ZC=(t,e)=>{let r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r);},QC=(t,e)=>`/* Wrapped ${t}*/
227
+ ${e}`,ex=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),tx=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),rx=(t,e,r)=>{let s=r===""?"":`with ${r.trim()}() `,i=QC.bind(null,s,e.toString());Object.defineProperty(i,"name",tx);let{writable:n,enumerable:o,configurable:u}=ex;Object.defineProperty(t,"toString",{value:i,writable:n,enumerable:o,configurable:u});};function qo(t,e,{ignoreNonConfigurable:r=false}={}){let{name:s}=t;for(let i of Reflect.ownKeys(e))zC(t,e,i,r);return ZC(t,e),rx(t,e,s),t}var Ds=new WeakMap,Ef=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,s=0,i=t.displayName||t.name||"<anonymous>",n=function(...o){if(Ds.set(n,++s),s===1)r=t.apply(this,o),t=void 0;else if(e.throw===true)throw new Error(`Function \`${i}\` can only be called once`);return r};return qo(n,t),Ds.set(n,s),n};Ef.callCount=t=>{if(!Ds.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return Ds.get(t)};var Af=Ef;var Ot=[];Ot.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Ot.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Ot.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var bs=t=>!!t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function",Lo=Symbol.for("signal-exit emitter"),jo=globalThis,sx=Object.defineProperty.bind(Object),Go=class{emitted={afterExit:false,exit:false};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(jo[Lo])return jo[Lo];sx(jo,Lo,{value:this,writable:false,enumerable:false,configurable:false});}on(e,r){this.listeners[e].push(r);}removeListener(e,r){let s=this.listeners[e],i=s.indexOf(r);i!==-1&&(i===0&&s.length===1?s.length=0:s.splice(i,1));}emit(e,r,s){if(this.emitted[e])return false;this.emitted[e]=true;let i=false;for(let n of this.listeners[e])i=n(r,s)===true||i;return e==="exit"&&(i=this.emit("afterExit",r,s)||i),i}},ys=class{},ix=t=>({onExit(e,r){return t.onExit(e,r)},load(){return t.load()},unload(){return t.unload()}}),Vo=class extends ys{onExit(){return ()=>{}}load(){}unload(){}},Uo=class extends ys{#o=Wo.platform==="win32"?"SIGINT":"SIGHUP";#r=new Go;#e;#i;#d;#t={};#n=false;constructor(e){super(),this.#e=e,this.#t={};for(let r of Ot)this.#t[r]=()=>{let s=this.#e.listeners(r),{count:i}=this.#r,n=e;if(typeof n.__signal_exit_emitter__=="object"&&typeof n.__signal_exit_emitter__.count=="number"&&(i+=n.__signal_exit_emitter__.count),s.length===i){this.unload();let o=this.#r.emit("exit",null,r),u=r==="SIGHUP"?this.#o:r;o||e.kill(e.pid,u);}};this.#d=e.reallyExit,this.#i=e.emit;}onExit(e,r){if(!bs(this.#e))return ()=>{};this.#n===false&&this.load();let s=r?.alwaysLast?"afterExit":"exit";return this.#r.on(s,e),()=>{this.#r.removeListener(s,e),this.#r.listeners.exit.length===0&&this.#r.listeners.afterExit.length===0&&this.unload();}}load(){if(!this.#n){this.#n=true,this.#r.count+=1;for(let e of Ot)try{let r=this.#t[e];r&&this.#e.on(e,r);}catch{}this.#e.emit=(e,...r)=>this.#f(e,...r),this.#e.reallyExit=e=>this.#s(e);}}unload(){this.#n&&(this.#n=false,Ot.forEach(e=>{let r=this.#t[e];if(!r)throw new Error("Listener not defined for signal: "+e);try{this.#e.removeListener(e,r);}catch{}}),this.#e.emit=this.#i,this.#e.reallyExit=this.#d,this.#r.count-=1);}#s(e){return bs(this.#e)?(this.#e.exitCode=e||0,this.#r.emit("exit",this.#e.exitCode,null),this.#d.call(this.#e,this.#e.exitCode)):0}#f(e,...r){let s=this.#i;if(e==="exit"&&bs(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let i=s.call(this.#e,e,...r);return this.#r.emit("exit",this.#e.exitCode,null),i}else return s.call(this.#e,e,...r)}},Wo=globalThis.process,{onExit:Of}=ix(bs(Wo)?new Uo(Wo):new Vo);var Rf=ke__default.default.stderr.isTTY?ke__default.default.stderr:ke__default.default.stdout.isTTY?ke__default.default.stdout:void 0,nx=Rf?Af(()=>{Of(()=>{Rf.write("\x1B[?25h");},{alwaysLast:true});}):()=>{},Sf=nx;var Cs=false,Jt={};Jt.show=(t=ke__default.default.stderr)=>{t.isTTY&&(Cs=false,t.write("\x1B[?25h"));};Jt.hide=(t=ke__default.default.stderr)=>{t.isTTY&&(Sf(),Cs=true,t.write("\x1B[?25l"));};Jt.toggle=(t,e)=>{t!==void 0&&(Cs=t),Cs?Jt.show(e):Jt.hide(e);};var Ko=Jt;var Fr=be(Yo());function Jo(){return ke__default.default.platform!=="win32"?ke__default.default.env.TERM!=="linux":!!ke__default.default.env.CI||!!ke__default.default.env.WT_SESSION||!!ke__default.default.env.TERMINUS_SUBLIME||ke__default.default.env.ConEmuTask==="{cmd::Cmder}"||ke__default.default.env.TERM_PROGRAM==="Terminus-Sublime"||ke__default.default.env.TERM_PROGRAM==="vscode"||ke__default.default.env.TERM==="xterm-256color"||ke__default.default.env.TERM==="alacritty"||ke__default.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var ux={info:$e.blue("\u2139"),success:$e.green("\u2714"),warning:$e.yellow("\u26A0"),error:$e.red("\u2716")},ax={info:$e.blue("i"),success:$e.green("\u221A"),warning:$e.yellow("\u203C"),error:$e.red("\xD7")},lx=Jo()?ux:ax,_r=lx;function zo({onlyFirst:t=false}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,t?void 0:"g")}var cx=zo();function wr(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(cx,"")}function If(t){return t===161||t===164||t===167||t===168||t===170||t===173||t===174||t>=176&&t<=180||t>=182&&t<=186||t>=188&&t<=191||t===198||t===208||t===215||t===216||t>=222&&t<=225||t===230||t>=232&&t<=234||t===236||t===237||t===240||t===242||t===243||t>=247&&t<=250||t===252||t===254||t===257||t===273||t===275||t===283||t===294||t===295||t===299||t>=305&&t<=307||t===312||t>=319&&t<=322||t===324||t>=328&&t<=331||t===333||t===338||t===339||t===358||t===359||t===363||t===462||t===464||t===466||t===468||t===470||t===472||t===474||t===476||t===593||t===609||t===708||t===711||t>=713&&t<=715||t===717||t===720||t>=728&&t<=731||t===733||t===735||t>=768&&t<=879||t>=913&&t<=929||t>=931&&t<=937||t>=945&&t<=961||t>=963&&t<=969||t===1025||t>=1040&&t<=1103||t===1105||t===8208||t>=8211&&t<=8214||t===8216||t===8217||t===8220||t===8221||t>=8224&&t<=8226||t>=8228&&t<=8231||t===8240||t===8242||t===8243||t===8245||t===8251||t===8254||t===8308||t===8319||t>=8321&&t<=8324||t===8364||t===8451||t===8453||t===8457||t===8467||t===8470||t===8481||t===8482||t===8486||t===8491||t===8531||t===8532||t>=8539&&t<=8542||t>=8544&&t<=8555||t>=8560&&t<=8569||t===8585||t>=8592&&t<=8601||t===8632||t===8633||t===8658||t===8660||t===8679||t===8704||t===8706||t===8707||t===8711||t===8712||t===8715||t===8719||t===8721||t===8725||t===8730||t>=8733&&t<=8736||t===8739||t===8741||t>=8743&&t<=8748||t===8750||t>=8756&&t<=8759||t===8764||t===8765||t===8776||t===8780||t===8786||t===8800||t===8801||t>=8804&&t<=8807||t===8810||t===8811||t===8814||t===8815||t===8834||t===8835||t===8838||t===8839||t===8853||t===8857||t===8869||t===8895||t===8978||t>=9312&&t<=9449||t>=9451&&t<=9547||t>=9552&&t<=9587||t>=9600&&t<=9615||t>=9618&&t<=9621||t===9632||t===9633||t>=9635&&t<=9641||t===9650||t===9651||t===9654||t===9655||t===9660||t===9661||t===9664||t===9665||t>=9670&&t<=9672||t===9675||t>=9678&&t<=9681||t>=9698&&t<=9701||t===9711||t===9733||t===9734||t===9737||t===9742||t===9743||t===9756||t===9758||t===9792||t===9794||t===9824||t===9825||t>=9827&&t<=9829||t>=9831&&t<=9834||t===9836||t===9837||t===9839||t===9886||t===9887||t===9919||t>=9926&&t<=9933||t>=9935&&t<=9939||t>=9941&&t<=9953||t===9955||t===9960||t===9961||t>=9963&&t<=9969||t===9972||t>=9974&&t<=9977||t===9979||t===9980||t===9982||t===9983||t===10045||t>=10102&&t<=10111||t>=11094&&t<=11097||t>=12872&&t<=12879||t>=57344&&t<=63743||t>=65024&&t<=65039||t===65533||t>=127232&&t<=127242||t>=127248&&t<=127277||t>=127280&&t<=127337||t>=127344&&t<=127373||t===127375||t===127376||t>=127387&&t<=127404||t>=917760&&t<=917999||t>=983040&&t<=1048573||t>=1048576&&t<=1114109}function Mf(t){return t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510}function Bf(t){return t>=4352&&t<=4447||t===8986||t===8987||t===9001||t===9002||t>=9193&&t<=9196||t===9200||t===9203||t===9725||t===9726||t===9748||t===9749||t>=9776&&t<=9783||t>=9800&&t<=9811||t===9855||t>=9866&&t<=9871||t===9875||t===9889||t===9898||t===9899||t===9917||t===9918||t===9924||t===9925||t===9934||t===9940||t===9962||t===9970||t===9971||t===9973||t===9978||t===9981||t===9989||t===9994||t===9995||t===10024||t===10060||t===10062||t>=10067&&t<=10069||t===10071||t>=10133&&t<=10135||t===10160||t===10175||t===11035||t===11036||t===11088||t===11093||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12773||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=94176&&t<=94180||t>=94192&&t<=94198||t>=94208&&t<=101589||t>=101631&&t<=101662||t>=101760&&t<=101874||t>=110576&&t<=110579||t>=110581&&t<=110587||t===110589||t===110590||t>=110592&&t<=110882||t===110898||t>=110928&&t<=110930||t===110933||t>=110948&&t<=110951||t>=110960&&t<=111355||t>=119552&&t<=119638||t>=119648&&t<=119670||t===126980||t===127183||t===127374||t>=127377&&t<=127386||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t===127568||t===127569||t>=127584&&t<=127589||t>=127744&&t<=127776||t>=127789&&t<=127797||t>=127799&&t<=127868||t>=127870&&t<=127891||t>=127904&&t<=127946||t>=127951&&t<=127955||t>=127968&&t<=127984||t===127988||t>=127992&&t<=128062||t===128064||t>=128066&&t<=128252||t>=128255&&t<=128317||t>=128331&&t<=128334||t>=128336&&t<=128359||t===128378||t===128405||t===128406||t===128420||t>=128507&&t<=128591||t>=128640&&t<=128709||t===128716||t>=128720&&t<=128722||t>=128725&&t<=128728||t>=128732&&t<=128735||t===128747||t===128748||t>=128756&&t<=128764||t>=128992&&t<=129003||t===129008||t>=129292&&t<=129338||t>=129340&&t<=129349||t>=129351&&t<=129535||t>=129648&&t<=129660||t>=129664&&t<=129674||t>=129678&&t<=129734||t===129736||t>=129741&&t<=129756||t>=129759&&t<=129770||t>=129775&&t<=129784||t>=131072&&t<=196605||t>=196608&&t<=262141}function hx(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}function Hf(t,{ambiguousAsWide:e=false}={}){return hx(t),Mf(t)||Bf(t)||e&&If(t)?2:1}var Nf=()=>/[#*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;var dx=new Intl.Segmenter,fx=/^\p{Default_Ignorable_Code_Point}$/u;function Xo(t,e={}){if(typeof t!="string"||t.length===0)return 0;let{ambiguousIsNarrow:r=true,countAnsiEscapeCodes:s=false}=e;if(s||(t=wr(t)),t.length===0)return 0;let i=0,n={ambiguousAsWide:!r};for(let{segment:o}of dx.segment(t)){let u=o.codePointAt(0);if(!(u<=31||u>=127&&u<=159)&&!(u>=8203&&u<=8207||u===65279)&&!(u>=768&&u<=879||u>=6832&&u<=6911||u>=7616&&u<=7679||u>=8400&&u<=8447||u>=65056&&u<=65071)&&!(u>=55296&&u<=57343)&&!(u>=65024&&u<=65039)&&!fx.test(o)){if(Nf().test(o)){i+=2;continue}i+=Hf(u,n);}}return i}function Zo({stream:t=process.stdout}={}){return !!(t&&t.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}function Qo(){let{env:t}=ke__default.default,{TERM:e,TERM_PROGRAM:r}=t;return ke__default.default.platform!=="win32"?e!=="linux":!!t.WT_SESSION||!!t.TERMINUS_SUBLIME||t.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||e==="xterm-256color"||e==="alacritty"||e==="rxvt-unicode"||e==="rxvt-unicode-256color"||t.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var px=3,eu=class{#o=0;start(){this.#o++,this.#o===1&&this.#r();}stop(){if(this.#o<=0)throw new Error("`stop` called more times than `start`");this.#o--,this.#o===0&&this.#e();}#r(){ke__default.default.platform==="win32"||!ke__default.default.stdin.isTTY||(ke__default.default.stdin.setRawMode(true),ke__default.default.stdin.on("data",this.#i),ke__default.default.stdin.resume());}#e(){ke__default.default.stdin.isTTY&&(ke__default.default.stdin.off("data",this.#i),ke__default.default.stdin.pause(),ke__default.default.stdin.setRawMode(false));}#i(e){e[0]===px&&ke__default.default.emit("SIGINT");}},mx=new eu,tu=mx;be(Yo());var ru=class{#o=0;#r=false;#e=0;#i=-1;#d=0;#t;#n;#s;#f;#m;#l;#c;#h;#g;#u;#a;color;constructor(e){typeof e=="string"&&(e={text:e}),this.#t={color:"cyan",stream:ke__default.default.stderr,discardStdin:true,hideCursor:true,...e},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#m=this.#t.interval,this.#s=this.#t.stream,this.#l=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:Zo({stream:this.#s}),this.#c=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:false,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,ke__default.default.env.NODE_ENV==="test"&&(this._stream=this.#s,this._isEnabled=this.#l,Object.defineProperty(this,"_linesToClear",{get(){return this.#o},set(r){this.#o=r;}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#i}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}));}get indent(){return this.#h}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw new Error("The `indent` option must be an integer from 0 and up");this.#h=e,this.#p();}get interval(){return this.#m??this.#n.interval??100}get spinner(){return this.#n}set spinner(e){if(this.#i=-1,this.#m=void 0,typeof e=="object"){if(e.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#n=e;}else if(!Qo())this.#n=Fr.default.line;else if(e===void 0)this.#n=Fr.default.dots;else if(e!=="default"&&Fr.default[e])this.#n=Fr.default[e];else throw new Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#g}set text(e=""){this.#g=e,this.#p();}get prefixText(){return this.#u}set prefixText(e=""){this.#u=e,this.#p();}get suffixText(){return this.#a}set suffixText(e=""){this.#a=e,this.#p();}get isSpinning(){return this.#f!==void 0}#D(e=this.#u,r=" "){return typeof e=="string"&&e!==""?e+r:typeof e=="function"?e()+r:""}#b(e=this.#a,r=" "){return typeof e=="string"&&e!==""?r+e:typeof e=="function"?r+e():""}#p(){let e=this.#s.columns??80,r=this.#D(this.#u,"-"),s=this.#b(this.#a,"-"),i=" ".repeat(this.#h)+r+"--"+this.#g+"--"+s;this.#e=0;for(let n of wr(i).split(`
228
+ `))this.#e+=Math.max(1,Math.ceil(Xo(n,{countAnsiEscapeCodes:true})/e));}get isEnabled(){return this.#l&&!this.#c}set isEnabled(e){if(typeof e!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#l=e;}get isSilent(){return this.#c}set isSilent(e){if(typeof e!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#c=e;}frame(){let e=Date.now();(this.#i===-1||e-this.#d>=this.interval)&&(this.#i=++this.#i%this.#n.frames.length,this.#d=e);let{frames:r}=this.#n,s=r[this.#i];this.color&&(s=$e[this.color](s));let i=typeof this.#u=="string"&&this.#u!==""?this.#u+" ":"",n=typeof this.text=="string"?" "+this.text:"",o=typeof this.#a=="string"&&this.#a!==""?" "+this.#a:"";return i+s+n+o}clear(){if(!this.#l||!this.#s.isTTY)return this;this.#s.cursorTo(0);for(let e=0;e<this.#o;e++)e>0&&this.#s.moveCursor(0,-1),this.#s.clearLine(1);return (this.#h||this.lastIndent!==this.#h)&&this.#s.cursorTo(this.#h),this.lastIndent=this.#h,this.#o=0,this}render(){return this.#c?this:(this.clear(),this.#s.write(this.frame()),this.#o=this.#e,this)}start(e){return e&&(this.text=e),this.#c?this:this.#l?this.isSpinning?this:(this.#t.hideCursor&&Ko.hide(this.#s),this.#t.discardStdin&&ke__default.default.stdin.isTTY&&(this.#r=true,tu.start()),this.render(),this.#f=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#s.write(`- ${this.text}
229
+ `),this)}stop(){return this.#l?(clearInterval(this.#f),this.#f=void 0,this.#i=0,this.clear(),this.#t.hideCursor&&Ko.show(this.#s),this.#t.discardStdin&&ke__default.default.stdin.isTTY&&this.#r&&(tu.stop(),this.#r=false),this):this}succeed(e){return this.stopAndPersist({symbol:_r.success,text:e})}fail(e){return this.stopAndPersist({symbol:_r.error,text:e})}warn(e){return this.stopAndPersist({symbol:_r.warning,text:e})}info(e){return this.stopAndPersist({symbol:_r.info,text:e})}stopAndPersist(e={}){if(this.#c)return this;let r=e.prefixText??this.#u,s=this.#D(r," "),i=e.symbol??" ",n=e.text??this.text,u=typeof n=="string"?(i?" ":"")+n:"",a=e.suffixText??this.#a,h=this.#b(a," "),l=s+i+u+h+`
230
+ `;return this.stop(),this.#s.write(l),this}};function su(t){return new ru(t)}var se=(t,e)=>su({text:t,isSilent:e?.silent,stream:process.stdout});var Dx=`{process.env.NODE_ENV === "development" && (
231
231
  <Script
232
232
  src="//unpkg.com/react-grab/dist/index.global.js"
233
233
  crossOrigin="anonymous"
234
234
  strategy="beforeInteractive"
235
235
  />
236
- )}`,Hf=t=>t==="none"?ov:`{process.env.NODE_ENV === "development" && (
236
+ )}`,Lf=t=>t==="none"?Dx:`{process.env.NODE_ENV === "development" && (
237
237
  <>
238
238
  <Script
239
239
  src="//unpkg.com/react-grab/dist/index.global.js"
@@ -244,13 +244,13 @@ ${e}`,G_=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),V_=Objec
244
244
  strategy="lazyOnload"
245
245
  />`}
246
246
  </>
247
- )}`,uv=`{process.env.NODE_ENV === "development" && (
247
+ )}`,bx=`{process.env.NODE_ENV === "development" && (
248
248
  <Script
249
249
  src="//unpkg.com/react-grab/dist/index.global.js"
250
250
  crossOrigin="anonymous"
251
251
  strategy="beforeInteractive"
252
252
  />
253
- )}`,Nf=t=>t==="none"?uv:`{process.env.NODE_ENV === "development" && (
253
+ )}`,jf=t=>t==="none"?bx:`{process.env.NODE_ENV === "development" && (
254
254
  <>
255
255
  <Script
256
256
  src="//unpkg.com/react-grab/dist/index.global.js"
@@ -261,34 +261,34 @@ ${e}`,G_=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),V_=Objec
261
261
  strategy="lazyOnload"
262
262
  />`}
263
263
  </>
264
- )}`,av=`<script type="module">
264
+ )}`,yx=`<script type="module">
265
265
  if (import.meta.env.DEV) {
266
266
  import("react-grab");
267
267
  }
268
- </script>`,qf=t=>t==="none"?av:`<script type="module">
268
+ </script>`,Gf=t=>t==="none"?yx:`<script type="module">
269
269
  if (import.meta.env.DEV) {
270
270
  import("react-grab");
271
271
  import("@react-grab/${t}/client");
272
272
  }
273
- </script>`,lv=`if (process.env.NODE_ENV === "development") {
273
+ </script>`,vx=`if (process.env.NODE_ENV === "development") {
274
274
  import("react-grab");
275
- }`,Lf=t=>t==="none"?lv:`if (process.env.NODE_ENV === "development") {
275
+ }`,Vf=t=>t==="none"?vx:`if (process.env.NODE_ENV === "development") {
276
276
  import("react-grab");
277
277
  import("@react-grab/${t}/client");
278
- }`,_s='import Script from "next/script";';var xr=t=>[/["'`][^"'`]*react-grab/,/react-grab[^"'`]*["'`]/,/<[^>]*react-grab/i,/import[^;]*react-grab/i,/require[^)]*react-grab/i,/from\s+[^;]*react-grab/i,/src[^>]*react-grab/i,/href[^>]*react-grab/i].some(r=>r.test(t)),dv=t=>{let e=[vt.join(t,"app","layout.tsx"),vt.join(t,"app","layout.jsx"),vt.join(t,"src","app","layout.tsx"),vt.join(t,"src","app","layout.jsx")];for(let r of e)if(Kd.existsSync(r))return r;return null},fv=t=>{let e=[vt.join(t,"instrumentation-client.ts"),vt.join(t,"instrumentation-client.js"),vt.join(t,"src","instrumentation-client.ts"),vt.join(t,"src","instrumentation-client.js")];for(let r of e)if(Kd.existsSync(r))return r;return null},Vf=t=>{let e=fv(t);if(!e)return false;let r=Kd.readFileSync(e,"utf-8");return xr(r)},pv=t=>{let e=[vt.join(t,"pages","_document.tsx"),vt.join(t,"pages","_document.jsx"),vt.join(t,"src","pages","_document.tsx"),vt.join(t,"src","pages","_document.jsx")];for(let r of e)if(Kd.existsSync(r))return r;return null},mv=t=>{let e=[vt.join(t,"index.html"),vt.join(t,"public","index.html")];for(let r of e)if(Kd.existsSync(r))return r;return null},gv=t=>{let e=[vt.join(t,"src","index.tsx"),vt.join(t,"src","index.jsx"),vt.join(t,"src","index.ts"),vt.join(t,"src","index.js"),vt.join(t,"src","main.tsx"),vt.join(t,"src","main.jsx"),vt.join(t,"src","main.ts"),vt.join(t,"src","main.js")];for(let r of e)if(Kd.existsSync(r))return r;return null},Uf=(t,e,r)=>{if(e==="none")return {success:true,filePath:r,message:"React Grab is already configured",noChanges:true};let s=`@react-grab/${e}`;if(t.includes(s))return {success:true,filePath:r,message:`Agent ${e} is already configured`,noChanges:true};let i=`<Script
278
+ }`,ws='import Script from "next/script";';var Xt=t=>[/["'`][^"'`]*react-grab/,/react-grab[^"'`]*["'`]/,/<[^>]*react-grab/i,/import[^;]*react-grab/i,/require[^)]*react-grab/i,/from\s+[^;]*react-grab/i,/src[^>]*react-grab/i,/href[^>]*react-grab/i].some(r=>r.test(t)),Kf=t=>{let e=[Ft.join(t,"app","layout.tsx"),Ft.join(t,"app","layout.jsx"),Ft.join(t,"src","app","layout.tsx"),Ft.join(t,"src","app","layout.jsx")];for(let r of e)if(Zd.existsSync(r))return r;return null},_x=t=>{let e=[Ft.join(t,"instrumentation-client.ts"),Ft.join(t,"instrumentation-client.js"),Ft.join(t,"src","instrumentation-client.ts"),Ft.join(t,"src","instrumentation-client.js")];for(let r of e)if(Zd.existsSync(r))return r;return null},Yf=t=>{let e=_x(t);if(!e)return false;let r=Zd.readFileSync(e,"utf-8");return Xt(r)},Jf=t=>{let e=[Ft.join(t,"pages","_document.tsx"),Ft.join(t,"pages","_document.jsx"),Ft.join(t,"src","pages","_document.tsx"),Ft.join(t,"src","pages","_document.jsx")];for(let r of e)if(Zd.existsSync(r))return r;return null},zf=t=>{let e=[Ft.join(t,"index.html"),Ft.join(t,"public","index.html")];for(let r of e)if(Zd.existsSync(r))return r;return null},Xf=t=>{let e=[Ft.join(t,"src","index.tsx"),Ft.join(t,"src","index.jsx"),Ft.join(t,"src","index.ts"),Ft.join(t,"src","index.js"),Ft.join(t,"src","main.tsx"),Ft.join(t,"src","main.jsx"),Ft.join(t,"src","main.ts"),Ft.join(t,"src","main.js")];for(let r of e)if(Zd.existsSync(r))return r;return null},Zf=(t,e,r)=>{if(e==="none")return {success:true,filePath:r,message:"React Grab is already configured",noChanges:true};let s=`@react-grab/${e}`;if(t.includes(s))return {success:true,filePath:r,message:`Agent ${e} is already configured`,noChanges:true};let i=`<Script
279
279
  src="//unpkg.com/${s}/dist/client.global.js"
280
280
  strategy="lazyOnload"
281
281
  />`,n=t.match(/<(?:Script|script|NextScript)[^>]*react-grab[^>]*\/?>/is);if(n){let o=t.replace(n[0],`${n[0]}
282
- ${i}`);return {success:true,filePath:r,message:`Add ${e} agent`,originalContent:t,newContent:o}}return {success:false,filePath:r,message:"Could not find React Grab script to add agent after"}},Dv=(t,e,r)=>{if(e==="none")return {success:true,filePath:r,message:"React Grab is already configured",noChanges:true};let s=`@react-grab/${e}`;if(t.includes(s))return {success:true,filePath:r,message:`Agent ${e} is already configured`,noChanges:true};let i=`import("${s}/client");`,n=t.match(/import\s*\(\s*["']react-grab["']\s*\);?/);if(n){let o=n[0],u=o.endsWith(";"),a=t.replace(o,`${u?o.slice(0,-1):o};
283
- ${i}`);return {success:true,filePath:r,message:`Add ${e} agent`,originalContent:t,newContent:a}}return {success:false,filePath:r,message:"Could not find React Grab import to add agent after"}},bv=(t,e,r)=>{if(e==="none")return {success:true,filePath:r,message:"React Grab is already configured",noChanges:true};let s=`@react-grab/${e}`;if(t.includes(s))return {success:true,filePath:r,message:`Agent ${e} is already configured`,noChanges:true};let i=`import("${s}/client");`,n=t.match(/import\s*\(\s*["']react-grab["']\s*\);?/);if(n){let o=n[0],u=o.endsWith(";"),a=t.replace(o,`${u?o.slice(0,-1):o};
284
- ${i}`);return {success:true,filePath:r,message:`Add ${e} agent`,originalContent:t,newContent:a}}return {success:false,filePath:r,message:"Could not find React Grab import to add agent after"}},yv=(t,e,r)=>{let s=dv(t);if(!s)return {success:false,filePath:"",message:"Could not find app/layout.tsx or app/layout.jsx"};let i=Kd.readFileSync(s,"utf-8"),n=i,o=xr(i),u=Vf(t);if(o&&r)return Uf(i,e,s);if(o||u)return {success:true,filePath:s,message:"React Grab is already installed"+(u?" in instrumentation-client":" in this file"),noChanges:true};if(!n.includes('import Script from "next/script"')){let l=n.match(/^import .+ from ['"].+['"];?\s*$/m);l?n=n.replace(l[0],`${l[0]}
285
- ${_s}`):n=`${_s}
282
+ ${i}`);return {success:true,filePath:r,message:`Add ${e} agent`,originalContent:t,newContent:o}}return {success:false,filePath:r,message:"Could not find React Grab script to add agent after"}},wx=(t,e,r)=>{if(e==="none")return {success:true,filePath:r,message:"React Grab is already configured",noChanges:true};let s=`@react-grab/${e}`;if(t.includes(s))return {success:true,filePath:r,message:`Agent ${e} is already configured`,noChanges:true};let i=`import("${s}/client");`,n=t.match(/import\s*\(\s*["']react-grab["']\s*\);?/);if(n){let o=n[0],u=o.endsWith(";"),a=t.replace(o,`${u?o.slice(0,-1):o};
283
+ ${i}`);return {success:true,filePath:r,message:`Add ${e} agent`,originalContent:t,newContent:a}}return {success:false,filePath:r,message:"Could not find React Grab import to add agent after"}},Fx=(t,e,r)=>{if(e==="none")return {success:true,filePath:r,message:"React Grab is already configured",noChanges:true};let s=`@react-grab/${e}`;if(t.includes(s))return {success:true,filePath:r,message:`Agent ${e} is already configured`,noChanges:true};let i=`import("${s}/client");`,n=t.match(/import\s*\(\s*["']react-grab["']\s*\);?/);if(n){let o=n[0],u=o.endsWith(";"),a=t.replace(o,`${u?o.slice(0,-1):o};
284
+ ${i}`);return {success:true,filePath:r,message:`Add ${e} agent`,originalContent:t,newContent:a}}return {success:false,filePath:r,message:"Could not find React Grab import to add agent after"}},Ex=(t,e,r)=>{let s=Kf(t);if(!s)return {success:false,filePath:"",message:"Could not find app/layout.tsx or app/layout.jsx"};let i=Zd.readFileSync(s,"utf-8"),n=i,o=Xt(i),u=Yf(t);if(o&&r)return Zf(i,e,s);if(o||u)return {success:true,filePath:s,message:"React Grab is already installed"+(u?" in instrumentation-client":" in this file"),noChanges:true};if(!n.includes('import Script from "next/script"')){let l=n.match(/^import .+ from ['"].+['"];?\s*$/m);l?n=n.replace(l[0],`${l[0]}
285
+ ${ws}`):n=`${ws}
286
286
 
287
- ${n}`;}let a=Hf(e),h=n.match(/<head[^>]*>/);if(h)n=n.replace(h[0],`${h[0]}
287
+ ${n}`;}let a=Lf(e),h=n.match(/<head[^>]*>/);if(h)n=n.replace(h[0],`${h[0]}
288
288
  ${a}`);else {let l=n.match(/<html[^>]*>/);l&&(n=n.replace(l[0],`${l[0]}
289
289
  <head>
290
290
  ${a}
291
- </head>`));}return {success:true,filePath:s,message:"Add React Grab"+(e!=="none"?` with ${e} agent`:""),originalContent:i,newContent:n}},Cv=(t,e,r)=>{let s=pv(t);if(!s)return {success:false,filePath:"",message:`Could not find pages/_document.tsx or pages/_document.jsx.
291
+ </head>`));}return {success:true,filePath:s,message:"Add React Grab"+(e!=="none"?` with ${e} agent`:""),originalContent:i,newContent:n}},Ax=(t,e,r)=>{let s=Jf(t);if(!s)return {success:false,filePath:"",message:`Could not find pages/_document.tsx or pages/_document.jsx.
292
292
 
293
293
  To set up React Grab with Pages Router, create pages/_document.tsx with:
294
294
 
@@ -309,13 +309,17 @@ To set up React Grab with Pages Router, create pages/_document.tsx with:
309
309
  </body>
310
310
  </Html>
311
311
  );
312
- }`};let i=Kd.readFileSync(s,"utf-8"),n=i,o=xr(i),u=Vf(t);if(o&&r)return Uf(i,e,s);if(o||u)return {success:true,filePath:s,message:"React Grab is already installed"+(u?" in instrumentation-client":" in this file"),noChanges:true};if(!n.includes('import Script from "next/script"')){let l=n.match(/^import .+ from ['"].+['"];?\s*$/m);l&&(n=n.replace(l[0],`${l[0]}
313
- ${_s}`));}let a=Nf(e),h=n.match(/<Head[^>]*>/);return h&&(n=n.replace(h[0],`${h[0]}
314
- ${a}`)),{success:true,filePath:s,message:"Add React Grab"+(e!=="none"?` with ${e} agent`:""),originalContent:i,newContent:n}},_v=(t,e,r)=>{let s=mv(t);if(!s)return {success:false,filePath:"",message:"Could not find index.html"};let i=Kd.readFileSync(s,"utf-8"),n=i,o=xr(i);if(o&&r)return Dv(i,e,s);if(o)return {success:true,filePath:s,message:"React Grab is already installed in this file",noChanges:true};let u=qf(e),a=n.match(/<head[^>]*>/i);return a&&(n=n.replace(a[0],`${a[0]}
315
- ${u}`)),{success:true,filePath:s,message:"Add React Grab"+(e!=="none"?` with ${e} agent`:""),originalContent:i,newContent:n}},vv=(t,e,r)=>{let s=gv(t);if(!s)return {success:false,filePath:"",message:"Could not find entry file (src/index.tsx, src/main.tsx, etc.)"};let i=Kd.readFileSync(s,"utf-8"),n=xr(i);if(n&&r)return bv(i,e,s);if(n)return {success:true,filePath:s,message:"React Grab is already installed in this file",noChanges:true};let u=`${Lf(e)}
312
+ }`};let i=Zd.readFileSync(s,"utf-8"),n=i,o=Xt(i),u=Yf(t);if(o&&r)return Zf(i,e,s);if(o||u)return {success:true,filePath:s,message:"React Grab is already installed"+(u?" in instrumentation-client":" in this file"),noChanges:true};if(!n.includes('import Script from "next/script"')){let l=n.match(/^import .+ from ['"].+['"];?\s*$/m);l&&(n=n.replace(l[0],`${l[0]}
313
+ ${ws}`));}let a=jf(e),h=n.match(/<Head[^>]*>/);return h&&(n=n.replace(h[0],`${h[0]}
314
+ ${a}`)),{success:true,filePath:s,message:"Add React Grab"+(e!=="none"?` with ${e} agent`:""),originalContent:i,newContent:n}},Ox=(t,e,r)=>{let s=zf(t);if(!s)return {success:false,filePath:"",message:"Could not find index.html"};let i=Zd.readFileSync(s,"utf-8"),n=i,o=Xt(i);if(o&&r)return wx(i,e,s);if(o)return {success:true,filePath:s,message:"React Grab is already installed in this file",noChanges:true};let u=Gf(e),a=n.match(/<head[^>]*>/i);return a&&(n=n.replace(a[0],`${a[0]}
315
+ ${u}`)),{success:true,filePath:s,message:"Add React Grab"+(e!=="none"?` with ${e} agent`:""),originalContent:i,newContent:n}},Rx=(t,e,r)=>{let s=Xf(t);if(!s)return {success:false,filePath:"",message:"Could not find entry file (src/index.tsx, src/main.tsx, etc.)"};let i=Zd.readFileSync(s,"utf-8"),n=Xt(i);if(n&&r)return Fx(i,e,s);if(n)return {success:true,filePath:s,message:"React Grab is already installed in this file",noChanges:true};let u=`${Vf(e)}
316
316
 
317
- ${i}`;return {success:true,filePath:s,message:"Add React Grab"+(e!=="none"?` with ${e} agent`:""),originalContent:i,newContent:u}},vs=(t,e,r,s,i=false)=>{switch(e){case "next":return r==="app"?yv(t,s,i):Cv(t,s,i);case "vite":return _v(t,s,i);case "webpack":return vv(t,s,i);default:return {success:false,filePath:"",message:`Unknown framework: ${e}. Please add React Grab manually.`}}},Wf=t=>{try{return Kd.accessSync(t,Kd.constants.W_OK),!0}catch{return false}},xs=t=>{if(t.success&&t.newContent&&t.filePath){if(!Wf(t.filePath))return {success:false,error:`Cannot write to ${t.filePath}. Check file permissions.`};try{return Kd.writeFileSync(t.filePath,t.newContent),{success:!0}}catch(e){return {success:false,error:`Failed to write to ${t.filePath}: ${e instanceof Error?e.message:"Unknown error"}`}}}return {success:true}};var jf={"claude-code":"npx @react-grab/claude-code@latest &&",cursor:"npx @react-grab/cursor@latest &&",opencode:"npx @react-grab/opencode@latest &&",codex:"npx @react-grab/codex@latest &&",gemini:"npx @react-grab/gemini@latest &&",amp:"npx @react-grab/amp@latest &&"},Fs=(t,e,r)=>{if(e==="none"||e==="ami"||e==="instant")return {success:true,filePath:"",message:e==="ami"||e==="instant"?`${e==="ami"?"Ami":"Instant"} does not require package.json modification`:"No agent selected, skipping package.json modification",noChanges:true};let s=vt.join(t,"package.json");if(!Kd.existsSync(s))return {success:false,filePath:"",message:"Could not find package.json"};let i=Kd.readFileSync(s,"utf-8"),n=jf[e];if(!n)return {success:false,filePath:s,message:`Unknown agent: ${e}`};if(i.includes(n))return {success:true,filePath:s,message:`Agent ${e} dev script is already configured`,noChanges:true};try{let o=JSON.parse(i);if(!o.scripts?.dev)return {success:!1,filePath:s,message:'No "dev" script found in package.json'};let u=o.scripts.dev;for(let h of r){let l=jf[h];if(l&&u.includes(l))return {success:!0,filePath:s,message:`Agent ${h} is already in dev script`,noChanges:!0}}o.scripts.dev=`${n} ${u}`;let a=JSON.stringify(o,null,2)+`
318
- `;return {success:!0,filePath:s,message:`Add ${e} server to dev script`,originalContent:i,newContent:a}}catch{return {success:false,filePath:s,message:"Failed to parse package.json"}}},ws=t=>{if(t.success&&t.newContent&&t.filePath){if(!Wf(t.filePath))return {success:false,error:`Cannot write to ${t.filePath}. Check file permissions.`};try{return Kd.writeFileSync(t.filePath,t.newContent),{success:!0}}catch(e){return {success:false,error:`Failed to write to ${t.filePath}: ${e instanceof Error?e.message:"Unknown error"}`}}}return {success:true}};var xv="0.0.85",Es={"claude-code":"Claude Code",cursor:"Cursor",opencode:"OpenCode",codex:"Codex",gemini:"Gemini",amp:"Amp",ami:"Ami",instant:"Instant"},Yf=new lt().name("add").description("add an agent integration").argument("[agent]","agent to add (claude-code, cursor, opencode, codex, gemini, amp, ami, instant)").option("-y, --yes","skip confirmation prompts",false).option("-c, --cwd <cwd>","working directory (defaults to current directory)",process.cwd()).action(async(t,e)=>{console.log(`${As.default.magenta("\u269B")} ${As.default.bold("React Grab")} ${As.default.gray(xv)}`),console.log();try{let r=e.cwd,s=e.yes,i=ue("Preflight checks.").start(),n=await Dr(r);n.hasReactGrab||(i.fail("React Grab is not installed."),w.break(),w.error(`Run ${j.info("react-grab init")} first to install React Grab.`),w.break(),process.exit(1)),i.succeed();let o=["claude-code","cursor","opencode","codex","gemini","amp","ami","instant"].filter(p=>!n.installedAgents.includes(p));o.length===0&&(w.break(),w.success("All agent integrations are already installed."),w.break(),process.exit(0));let u;if(t)["claude-code","cursor","opencode","codex","gemini","amp","ami","instant"].includes(t)||(w.break(),w.error(`Invalid agent: ${t}`),w.error("Available agents: claude-code, cursor, opencode, codex, gemini, amp, ami, instant"),w.break(),process.exit(1)),n.installedAgents.includes(t)&&(w.break(),w.warn(`${Es[t]} is already installed.`),w.break(),process.exit(0)),u=t;else if(s)w.break(),w.error("Please specify an agent to add."),w.error("Available agents: "+o.join(", ")),w.break(),process.exit(1);else {w.break();let{agent:p}=await(0,tu.default)({type:"select",name:"agent",message:`Which ${j.info("agent integration")} would you like to add?`,choices:o.map(m=>({title:Es[m],value:m}))});p||(w.break(),process.exit(1)),u=p;}ue(`Adding ${Es[u]}.`).start().succeed();let h=vs(n.projectRoot,n.framework,n.nextRouterType,u,!0),l=Fs(n.projectRoot,u,n.installedAgents);h.success||(w.break(),w.error(h.message),w.break(),process.exit(1));let c=!h.noChanges&&h.originalContent&&h.newContent,d=l.success&&!l.noChanges&&l.originalContent&&l.newContent;if((c||d)&&(w.break(),c&&qt(h.filePath,h.originalContent,h.newContent),d&&(c&&w.break(),qt(l.filePath,l.originalContent,l.newContent)),!s)){w.break();let{proceed:p}=await(0,tu.default)({type:"confirm",name:"proceed",message:"Apply these changes?",initial:!0});p||(w.break(),w.log("Changes cancelled."),w.break(),process.exit(0));}let f=hs(u,!1);if(f.length>0){let p=ue(`Installing ${f.join(", ")}.`).start();try{cs(f,n.packageManager,n.projectRoot),p.succeed();}catch(m){p.fail(),jt(m);}}if(c){let p=ue(`Applying changes to ${h.filePath}.`).start(),m=xs(h);m.success||(p.fail(),w.break(),w.error(m.error||"Failed to write file."),w.break(),process.exit(1)),p.succeed();}if(d){let p=ue(`Applying changes to ${l.filePath}.`).start(),m=ws(l);m.success||(p.fail(),w.break(),w.error(m.error||"Failed to write file."),w.break(),process.exit(1)),p.succeed();}w.break(),w.log(`${j.success("Success!")} ${Es[u]} has been added.`),w.log("Make sure to start the agent server before using it."),w.break();}catch(r){jt(r);}});var Ss=we(sr()),Rs=we(us());var Kf="0.0.85",Fv="https://react-grab.com/api/report-cli",Os="https://github.com/aidenybai/react-grab",Jf=async(t,e,r)=>{try{await fetch(Fv,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:t,version:Kf,config:e,error:r?{message:r.message,stack:r.stack}:void 0,timestamp:new Date().toISOString()})}).catch(()=>{});}catch{}},ru={next:"Next.js",vite:"Vite",webpack:"Webpack",unknown:"Unknown"},wv={npm:"npm",yarn:"Yarn",pnpm:"pnpm",bun:"Bun"},Ev={remix:"Remix",astro:"Astro",sveltekit:"SvelteKit",gatsby:"Gatsby"},zf=new lt().name("init").description("initialize React Grab in your project").option("-y, --yes","skip confirmation prompts",false).option("-f, --force","force overwrite existing config",false).option("-a, --agent <agent>","agent integration (claude-code, cursor, opencode, codex, gemini, amp, ami, instant)").option("--skip-install","skip package installation",false).option("-c, --cwd <cwd>","working directory (defaults to current directory)",process.cwd()).action(async t=>{console.log(`${Ss.default.magenta("\u269B")} ${Ss.default.bold("React Grab")} ${Ss.default.gray(Kf)}`),console.log();try{let e=t.cwd,r=t.yes,s=ue("Preflight checks.").start(),i=await Dr(e);i.hasReactGrab&&!t.force&&(s.succeed(),w.break(),w.warn("React Grab is already installed."),w.log(`Use ${j.info("--force")} to reconfigure, or ${j.info("react-grab add")} to add an agent.`),w.break(),process.exit(0)),s.succeed();let n=ue("Verifying framework.").start();if(i.unsupportedFramework){let b=Ev[i.unsupportedFramework];n.fail(`Found ${j.info(b)}.`),w.break(),w.log(`${b} is not yet supported by automatic setup.`),w.log(`Visit ${j.info(Os)} for manual setup.`),w.break(),process.exit(1);}if(i.framework==="unknown")if(i.isMonorepo&&!r){n.info("Verifying framework. Found monorepo.");let y=hf(i.projectRoot).filter(v=>v.hasReact||v.framework!=="unknown");if(y.length>0){w.break();let v=[...y].sort((P,O)=>P.framework==="unknown"&&O.framework!=="unknown"?1:P.framework!=="unknown"&&O.framework==="unknown"?-1:0),{selectedProject:F}=await(0,Rs.default)({type:"select",name:"selectedProject",message:"Select a project to install React Grab:",choices:v.map(P=>{let O=P.framework!=="unknown"?` ${j.dim(`(${ru[P.framework]})`)}`:"";return {title:`${P.name}${O}`,value:P.path}})});F||(w.break(),process.exit(1)),process.chdir(F);let E=await Dr(F);Object.assign(i,E),ue("Verifying framework.").start().succeed(`Verifying framework. Found ${j.info(ru[E.framework])}.`);}else n.fail("Could not detect a supported framework."),w.break(),w.log(`Visit ${j.info(Os)} for manual setup.`),w.break(),process.exit(1);}else n.fail("Could not detect a supported framework."),w.break(),w.log("React Grab supports Next.js, Vite, and Webpack projects."),w.log(`Visit ${j.info(Os)} for manual setup.`),w.break(),process.exit(1);else n.succeed(`Verifying framework. Found ${j.info(ru[i.framework])}.`);i.framework==="next"&&ue("Detecting router type.").start().succeed(`Detecting router type. Found ${j.info(i.nextRouterType==="app"?"App Router":"Pages Router")}.`),ue("Detecting package manager.").start().succeed(`Detecting package manager. Found ${j.info(wv[i.packageManager])}.`);let u=i.framework,a=i.packageManager,h=i.nextRouterType,l=t.agent||"none";if(!r&&!t.agent){w.break();let{agent:b}=await(0,Rs.default)({type:"select",name:"agent",message:`Would you like to add an ${j.info("agent integration")}?`,choices:[{title:"None",value:"none"},{title:"Claude Code",value:"claude-code"},{title:"Cursor",value:"cursor"},{title:"OpenCode",value:"opencode"},{title:"Codex",value:"codex"},{title:"Gemini",value:"gemini"},{title:"Amp",value:"amp"},{title:"Ami",value:"ami"},{title:"Instant",value:"instant"}]});b===void 0&&(w.break(),process.exit(1)),l=b;}let c=vs(i.projectRoot,u,h,l,!1),d=Fs(i.projectRoot,l,i.installedAgents);c.success||(w.break(),w.error(c.message),w.error(`Visit ${j.info(Os)} for manual setup.`),w.break(),process.exit(1));let f=!c.noChanges&&c.originalContent&&c.newContent,p=d.success&&!d.noChanges&&d.originalContent&&d.newContent;if((f||p)&&(w.break(),f&&qt(c.filePath,c.originalContent,c.newContent),p&&(f&&w.break(),qt(d.filePath,d.originalContent,d.newContent)),w.break(),w.warn("Auto-detection may not be 100% accurate."),w.warn("Please verify the changes before committing."),!r)){w.break();let{proceed:b}=await(0,Rs.default)({type:"confirm",name:"proceed",message:"Apply these changes?",initial:!0});b||(w.break(),w.log("Changes cancelled."),w.break(),process.exit(0));}let m=!i.hasReactGrab,g=l!=="none"&&!i.installedAgents.includes(l);if(!t.skipInstall&&(m||g)){let b=hs(l,m);if(b.length>0){let y=ue(`Installing ${b.join(", ")}.`).start();try{cs(b,a,i.projectRoot),y.succeed();}catch(v){y.fail(),jt(v);}}}if(f){let b=ue(`Applying changes to ${c.filePath}.`).start(),y=xs(c);y.success||(b.fail(),w.break(),w.error(y.error||"Failed to write file."),w.break(),process.exit(1)),b.succeed();}if(p){let b=ue(`Applying changes to ${d.filePath}.`).start(),y=ws(d);y.success||(b.fail(),w.break(),w.error(y.error||"Failed to write file."),w.break(),process.exit(1)),b.succeed();}w.break(),w.log(`${j.success("Success!")} React Grab has been installed.`),w.log("You may now start your development server."),w.break(),await Jf("completed",{framework:u,packageManager:a,router:h,agent:l!=="none"?l:void 0,isMonorepo:i.isMonorepo});}catch(e){jt(e),await Jf("error",void 0,e);}});var oi=we(sr()),ui=we(Pg()),ua=we(us());var aE="0.0.85",$g=2e3,kg='<script src="//unpkg.com/react-grab/dist/index.global.js"></script>',lE=t=>`<script src="//unpkg.com/${t}/dist/client.global.js"></script>`,Bg=async(t,e)=>new Promise(r=>{let s=http.createServer();s.listen(t,e,()=>{s.close(()=>r(t));}),s.on("error",()=>{r(Bg(t+1,e));});}),cE=t=>t.startsWith("http://")||t.startsWith("https://")?t:`http://${t}`,hE=async t=>{try{return (await fetch(t,{method:"HEAD",redirect:"follow"})).url}catch{return t}},Mg=new lt().name("start").alias("proxy").description("start a proxy server for a given URL").argument("[url]","target URL to proxy (e.g., localhost:3000)").option("-p, --port <port>","starting port for the proxy server",String($g)).option("--host <hostname>","hostname to bind the proxy server to","localhost").option("--provider <package>","provider package to run via npx (e.g., @react-grab/cursor)").action(async(t,e)=>{console.log(`${oi.default.magenta("\u269B")} ${oi.default.bold("React Grab")} ${oi.default.gray(aE)}`),console.log();let r=t,s=e.provider;if(!r){let{targetUrl:y}=await(0, ua.default)({type:"text",name:"targetUrl",message:"Enter the target URL to proxy:",initial:"localhost:3000"});if(y||(w.break(),process.exit(1)),r=y,!s){let{selectedProvider:v}=await(0, ua.default)({type:"select",name:"selectedProvider",message:`Select a ${j.info("provider")} to use:`,choices:[{title:"None",value:""},{title:"Claude Code",value:"@react-grab/claude-code"},{title:"Cursor",value:"@react-grab/cursor"},{title:"OpenCode",value:"@react-grab/opencode"},{title:"Codex",value:"@react-grab/codex"},{title:"Gemini",value:"@react-grab/gemini"},{title:"Amp",value:"@react-grab/amp"},{title:"Ami",value:"@react-grab/ami"}]});v===void 0&&(w.break(),process.exit(1)),s=v||void 0;}w.break();}let i=cE(r),n=await hE(i),o=parseInt(e.port,10),u=e.host||"localhost";(isNaN(o)||o<1||o>65535)&&(w.break(),w.error("Invalid port number. Please provide a port between 1 and 65535."),w.break(),process.exit(1));let a=await Bg(o,u),h=s?kg+lE(s):kg,l=y=>{let v=y.indexOf("</head>");if(v!==-1)return y.slice(0,v)+h+y.slice(v);let F=y.indexOf("</body>");return F!==-1?y.slice(0,F)+h+y.slice(F):y+h},c=(0, ui.createProxyMiddleware)({target:n,changeOrigin:true,followRedirects:false,ws:true,selfHandleResponse:true,cookieDomainRewrite:{"*":""},autoRewrite:true,preserveHeaderKeyCase:true,xfwd:true,on:{error:(y,v,F)=>{"writeHead"in F&&!F.headersSent&&(F.writeHead(503,{"Content-Type":"text/plain"}),F.end(`Proxy error: Unable to connect to ${n}`));},proxyReq:y=>{y.removeHeader("accept-encoding");},proxyRes:(0, ui.responseInterceptor)(async(y,v)=>{if(!(v.headers["content-type"]||"").includes("text/html"))return y;let R=y.toString("utf-8");return l(R)})}}),d=http.createServer((y,v)=>{c(y,v,F=>{F&&(w.error(`Request error: ${F}`),v.writeHead(500),v.end("Internal Server Error"));});});d.on("upgrade",c.upgrade);let f=ue("Starting.").start(),p=()=>{f.succeed(`Open in your browser: http://${u}:${a}`);let y=["npx react-grab@latest start",r];e.port!==String($g)&&y.push(`--port=${e.port}`),u!=="localhost"&&y.push(`--host=${u}`),s&&y.push(`--provider=${s}`),w.break(),w.log(j.dim(`$ ${y.join(" ")}`));},m=false,g=!s,b=()=>{m&&g&&p();};if(d.listen(a,u,()=>{m=true,b();}),s){let y=child_process.spawn("npx",[`${s}@latest`],{stdio:"ignore",shell:true,detached:false}),v=()=>{y.killed||y.kill();};process.on("exit",v),process.on("SIGINT",()=>{v(),process.exit(0);}),process.on("SIGTERM",()=>{v(),process.exit(0);}),y.on("error",F=>{f.fail(`Failed to start provider: ${F.message}`);}),y.on("spawn",()=>{g=true,b();}),y.on("close",F=>{F!==0&&F!==null&&w.error(`Provider exited with code ${F}`);});}d.on("error",y=>{w.break(),w.error(`Server error: ${y.message}`),w.break(),process.exit(1);});});var dE="0.0.85",fE="https://www.react-grab.com/api/version";process.on("SIGINT",()=>process.exit(0));process.on("SIGTERM",()=>process.exit(0));try{fetch(`${fE}?source=cli&t=${Date.now()}`).catch(()=>{});}catch{}var ai=new lt().name("react-grab").description("add React Grab to your project").version(dE,"-v, --version","display the version number");ai.addCommand(zf);ai.addCommand(Yf);ai.addCommand(Mg);ai.parse();
317
+ ${i}`;return {success:true,filePath:s,message:"Add React Grab"+(e!=="none"?` with ${e} agent`:""),originalContent:i,newContent:u}},Fs=(t,e,r,s,i=false)=>{switch(e){case "next":return r==="app"?Ex(t,s,i):Ax(t,s,i);case "vite":return Ox(t,s,i);case "webpack":return Rx(t,s,i);default:return {success:false,filePath:"",message:`Unknown framework: ${e}. Please add React Grab manually.`}}},Qf=t=>{try{return Zd.accessSync(t,Zd.constants.W_OK),!0}catch{return false}},Er=t=>{if(t.success&&t.newContent&&t.filePath){if(!Qf(t.filePath))return {success:false,error:`Cannot write to ${t.filePath}. Check file permissions.`};try{return Zd.writeFileSync(t.filePath,t.newContent),{success:!0}}catch(e){return {success:false,error:`Failed to write to ${t.filePath}: ${e instanceof Error?e.message:"Unknown error"}`}}}return {success:true}};var Uf={"claude-code":"npx @react-grab/claude-code@latest &&",cursor:"npx @react-grab/cursor@latest &&",opencode:"npx @react-grab/opencode@latest &&",codex:"npx @react-grab/codex@latest &&",gemini:"npx @react-grab/gemini@latest &&",amp:"npx @react-grab/amp@latest &&"},Es=(t,e,r)=>{if(e==="none"||e==="ami"||e==="visual-edit")return {success:true,filePath:"",message:e==="ami"||e==="visual-edit"?`${e==="ami"?"Ami":"Visual Edit"} does not require package.json modification`:"No agent selected, skipping package.json modification",noChanges:true};let s=Ft.join(t,"package.json");if(!Zd.existsSync(s))return {success:false,filePath:"",message:"Could not find package.json"};let i=Zd.readFileSync(s,"utf-8"),n=Uf[e];if(!n)return {success:false,filePath:s,message:`Unknown agent: ${e}`};if(i.includes(n))return {success:true,filePath:s,message:`Agent ${e} dev script is already configured`,noChanges:true};try{let o=JSON.parse(i);if(!o.scripts?.dev)return {success:!1,filePath:s,message:'No "dev" script found in package.json'};let u=o.scripts.dev;for(let h of r){let l=Uf[h];if(l&&u.includes(l))return {success:!0,filePath:s,message:`Agent ${h} is already in dev script`,noChanges:!0}}o.scripts.dev=`${n} ${u}`;let a=JSON.stringify(o,null,2)+`
318
+ `;return {success:!0,filePath:s,message:`Add ${e} server to dev script`,originalContent:i,newContent:a}}catch{return {success:false,filePath:s,message:"Failed to parse package.json"}}},As=t=>{if(t.success&&t.newContent&&t.filePath){if(!Qf(t.filePath))return {success:false,error:`Cannot write to ${t.filePath}. Check file permissions.`};try{return Zd.writeFileSync(t.filePath,t.newContent),{success:!0}}catch(e){return {success:false,error:`Failed to write to ${t.filePath}: ${e instanceof Error?e.message:"Unknown error"}`}}}return {success:true}},Sx=t=>{let e=[];if(t.activationKey){let r=[];t.activationKey.key&&r.push(`key: "${t.activationKey.key}"`),t.activationKey.metaKey&&r.push("metaKey: true"),t.activationKey.ctrlKey&&r.push("ctrlKey: true"),t.activationKey.shiftKey&&r.push("shiftKey: true"),t.activationKey.altKey&&r.push("altKey: true"),r.length>0&&e.push(`activationKey: { ${r.join(", ")} }`);}return t.activationMode&&e.push(`activationMode: "${t.activationMode}"`),t.keyHoldDuration!==void 0&&e.push(`keyHoldDuration: ${t.keyHoldDuration}`),t.allowActivationInsideInput!==void 0&&e.push(`allowActivationInsideInput: ${t.allowActivationInsideInput}`),t.maxContextLines!==void 0&&e.push(`maxContextLines: ${t.maxContextLines}`),`{ ${e.join(", ")} }`},ep=t=>{let e={};if(t.activationKey){let r={};t.activationKey.key&&(r.key=t.activationKey.key),t.activationKey.metaKey&&(r.metaKey=true),t.activationKey.ctrlKey&&(r.ctrlKey=true),t.activationKey.shiftKey&&(r.shiftKey=true),t.activationKey.altKey&&(r.altKey=true),Object.keys(r).length>0&&(e.activationKey=r);}return t.activationMode&&(e.activationMode=t.activationMode),t.keyHoldDuration!==void 0&&(e.keyHoldDuration=t.keyHoldDuration),t.allowActivationInsideInput!==void 0&&(e.allowActivationInsideInput=t.allowActivationInsideInput),t.maxContextLines!==void 0&&(e.maxContextLines=t.maxContextLines),JSON.stringify(e)},Tx=(t,e,r)=>{switch(e){case "next":return r==="app"?Kf(t):Jf(t);case "vite":return zf(t);case "webpack":return Xf(t);default:return null}},Px=(t,e,r)=>{let s=t.match(/(<Script[^>]*react-grab[^>]*)(\/?>)/is);if(!s)return {success:false,filePath:r,message:"Could not find React Grab Script tag"};let i=s[0],n=s[1],o=s[2],u=i.match(/data-options=\{JSON\.stringify\([^)]+\)\}/),a=`data-options={JSON.stringify(
319
+ ${Sx(e)}
320
+ )}`,h;u?h=i.replace(u[0],a):h=`${n}
321
+ ${a}
322
+ ${o}`;let l=t.replace(i,h);return {success:true,filePath:r,message:"Update React Grab options",originalContent:t,newContent:l}},$x=(t,e,r)=>{let s=t.match(/import\s*\(\s*["']react-grab["']\s*\)/);if(!s)return {success:false,filePath:r,message:"Could not find React Grab import"};let n=`import("react-grab").then((m) => m.init(${ep(e)}))`,o=t.replace(s[0],n);return {success:true,filePath:r,message:"Update React Grab options",originalContent:t,newContent:o}},kx=(t,e,r)=>{let s=t.match(/import\s*\(\s*["']react-grab["']\s*\)/);if(!s)return {success:false,filePath:r,message:"Could not find React Grab import"};let n=`import("react-grab").then((m) => m.init(${ep(e)}))`,o=t.replace(s[0],n);return {success:true,filePath:r,message:"Update React Grab options",originalContent:t,newContent:o}},tp=(t,e,r,s)=>{let i=Tx(t,e,r);if(!i)return {success:false,filePath:"",message:"Could not find file containing React Grab configuration"};let n=Zd.readFileSync(i,"utf-8");if(!Xt(n))return {success:false,filePath:i,message:"Could not find React Grab code in the file"};switch(e){case "next":return Px(n,s,i);case "vite":return $x(n,s,i);case "webpack":return kx(n,s,i);default:return {success:false,filePath:i,message:`Unknown framework: ${e}`}}},rp=t=>Er(t);var Ix="0.0.86",Os={"claude-code":"Claude Code",cursor:"Cursor",opencode:"OpenCode",codex:"Codex",gemini:"Gemini",amp:"Amp",ami:"Ami","visual-edit":"Visual Edit"},sp=new Be().name("add").description("add an agent integration").argument("[agent]","agent to add (claude-code, cursor, opencode, codex, gemini, amp, ami, visual-edit)").option("-y, --yes","skip confirmation prompts",false).option("-c, --cwd <cwd>","working directory (defaults to current directory)",process.cwd()).action(async(t,e)=>{console.log(`${Rs.default.magenta("\u273F")} ${Rs.default.bold("React Grab")} ${Rs.default.gray(Ix)}`),console.log();try{let r=e.cwd,s=e.yes,i=se("Preflight checks.").start(),n=await Et(r);n.hasReactGrab||(i.fail("React Grab is not installed."),b.break(),b.error(`Run ${I.info("react-grab init")} first to install React Grab.`),b.break(),process.exit(1)),i.succeed();let o=["claude-code","cursor","opencode","codex","gemini","amp","ami","visual-edit"].filter(p=>!n.installedAgents.includes(p));o.length===0&&(b.break(),b.success("All agent integrations are already installed."),b.break(),process.exit(0));let u;if(t)["claude-code","cursor","opencode","codex","gemini","amp","ami","instant"].includes(t)||(b.break(),b.error(`Invalid agent: ${t}`),b.error("Available agents: claude-code, cursor, opencode, codex, gemini, amp, ami, visual-edit"),b.break(),process.exit(1)),n.installedAgents.includes(t)&&(b.break(),b.warn(`${Os[t]} is already installed.`),b.break(),process.exit(0)),u=t;else if(s)b.break(),b.error("Please specify an agent to add."),b.error("Available agents: "+o.join(", ")),b.break(),process.exit(1);else {b.break();let{agent:p}=await(0,iu.default)({type:"select",name:"agent",message:`Which ${I.info("agent integration")} would you like to add?`,choices:o.map(m=>({title:Os[m],value:m}))});p||(b.break(),process.exit(1)),u=p;}se(`Adding ${Os[u]}.`).start().succeed();let h=Fs(n.projectRoot,n.framework,n.nextRouterType,u,!0),l=Es(n.projectRoot,u,n.installedAgents);h.success||(b.break(),b.error(h.message),b.break(),process.exit(1));let c=!h.noChanges&&h.originalContent&&h.newContent,d=l.success&&!l.noChanges&&l.originalContent&&l.newContent;if((c||d)&&(b.break(),c&&bt(h.filePath,h.originalContent,h.newContent),d&&(c&&b.break(),bt(l.filePath,l.originalContent,l.newContent)),!s)){b.break();let{proceed:p}=await(0,iu.default)({type:"confirm",name:"proceed",message:"Apply these changes?",initial:!0});p||(b.break(),b.log("Changes cancelled."),b.break(),process.exit(0));}let f=ps(u,!1);if(f.length>0){let p=se(`Installing ${f.join(", ")}.`).start();try{fs(f,n.packageManager,n.projectRoot),p.succeed();}catch(m){p.fail(),yt(m);}}if(c){let p=se(`Applying changes to ${h.filePath}.`).start(),m=Er(h);m.success||(p.fail(),b.break(),b.error(m.error||"Failed to write file."),b.break(),process.exit(1)),p.succeed();}if(d){let p=se(`Applying changes to ${l.filePath}.`).start(),m=As(l);m.success||(p.fail(),b.break(),b.error(m.error||"Failed to write file."),b.break(),process.exit(1)),p.succeed();}b.break(),b.log(`${I.success("Success!")} ${Os[u]} has been added.`),b.log("Make sure to start the agent server before using it."),b.break();}catch(r){yt(r);}});var Ts=be(Nt()),ot=be(br());var Mx="0.0.86",Ss={metaKey:process.platform==="darwin"?"\u2318 Command":"\u229E Windows",ctrlKey:"Ctrl",shiftKey:"Shift",altKey:process.platform==="darwin"?"\u2325 Option":"Alt"},Bx=t=>{if(!t)return "Default (Option/Alt)";let e=[];return t.metaKey&&e.push(process.platform==="darwin"?"\u2318":"Win"),t.ctrlKey&&e.push("Ctrl"),t.shiftKey&&e.push("Shift"),t.altKey&&e.push(process.platform==="darwin"?"\u2325":"Alt"),t.key&&e.push(t.key.toUpperCase()),e.length>0?e.join(" + "):"Default (Option/Alt)"},ip=new Be().name("configure").alias("config").description("configure React Grab options").option("-y, --yes","skip confirmation prompts",false).option("-c, --cwd <cwd>","working directory (defaults to current directory)",process.cwd()).action(async t=>{console.log(`${Ts.default.magenta("\u273F")} ${Ts.default.bold("React Grab")} ${Ts.default.gray(Mx)}`),console.log();try{let e=t.cwd,r=t.yes,s=se("Preflight checks.").start(),i=await Et(e);i.hasReactGrab||(s.fail("React Grab is not installed."),b.break(),b.error(`Run ${I.info("react-grab init")} first to install React Grab.`),b.break(),process.exit(1)),s.succeed(),r&&(b.break(),b.error("Configure command requires interactive mode."),b.error("Remove the --yes flag to use interactive prompts."),b.break(),process.exit(1)),b.break(),b.log(`Configure ${I.info("React Grab")} options:`),b.break();let n={},{wantActivationKey:o}=await(0,ot.default)({type:"confirm",name:"wantActivationKey",message:`Configure ${I.info("activation key")}?`,initial:!1});if(o===void 0&&(b.break(),process.exit(1)),o){let{key:d}=await(0,ot.default)({type:"text",name:"key",message:"Enter the activation key (e.g., g, k, space):",initial:""});d===void 0&&(b.break(),process.exit(1));let{modifiers:f}=await(0,ot.default)({type:"multiselect",name:"modifiers",message:"Select modifier keys (space to select, enter to confirm):",choices:[{title:Ss.metaKey,value:"metaKey"},{title:Ss.ctrlKey,value:"ctrlKey"},{title:Ss.shiftKey,value:"shiftKey"},{title:Ss.altKey,value:"altKey",selected:!0}],hint:"- Space to select, Enter to confirm"});f===void 0&&(b.break(),process.exit(1)),n.activationKey={...d&&{key:d.toLowerCase()},...f.includes("metaKey")&&{metaKey:!0},...f.includes("ctrlKey")&&{ctrlKey:!0},...f.includes("shiftKey")&&{shiftKey:!0},...f.includes("altKey")&&{altKey:!0}},b.log(` Activation key: ${I.info(Bx(n.activationKey))}`);}let{activationMode:u}=await(0,ot.default)({type:"select",name:"activationMode",message:`Select ${I.info("activation mode")}:`,choices:[{title:"Toggle (press to activate/deactivate)",value:"toggle"},{title:"Hold (hold key to keep active)",value:"hold"}],initial:0});if(u===void 0&&(b.break(),process.exit(1)),n.activationMode=u,u==="hold"){let{keyHoldDuration:d}=await(0,ot.default)({type:"number",name:"keyHoldDuration",message:`Enter ${I.info("key hold duration")} in milliseconds:`,initial:150,min:0,max:2e3});d===void 0&&(b.break(),process.exit(1)),n.keyHoldDuration=d;}let{allowActivationInsideInput:a}=await(0,ot.default)({type:"confirm",name:"allowActivationInsideInput",message:`Allow activation ${I.info("inside input fields")}?`,initial:!0});a===void 0&&(b.break(),process.exit(1)),n.allowActivationInsideInput=a;let{maxContextLines:h}=await(0,ot.default)({type:"number",name:"maxContextLines",message:`Enter ${I.info("max context lines")} to include:`,initial:3,min:0,max:50});h===void 0&&(b.break(),process.exit(1)),n.maxContextLines=h;let l=tp(i.projectRoot,i.framework,i.nextRouterType,n);if(l.success||(b.break(),b.error(l.message),b.break(),process.exit(1)),!l.noChanges&&l.originalContent&&l.newContent){b.break(),bt(l.filePath,l.originalContent,l.newContent),b.break();let{proceed:d}=await(0,ot.default)({type:"confirm",name:"proceed",message:"Apply these changes?",initial:!0});d||(b.break(),b.log("Changes cancelled."),b.break(),process.exit(0));let f=se(`Applying changes to ${l.filePath}.`).start(),p=rp(l);p.success||(f.fail(),b.break(),b.error(p.error||"Failed to write file."),b.break(),process.exit(1)),f.succeed();}else b.break(),b.log("No changes needed.");b.break(),b.log(`${I.success("Success!")} React Grab options have been configured.`),b.break();}catch(e){yt(e);}});var $s=be(Nt()),ks=be(br());var op="0.0.86",Hx="https://react-grab.com/api/report-cli",Ps="https://github.com/aidenybai/react-grab",np=async(t,e,r)=>{try{await fetch(Hx,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:t,version:op,config:e,error:r?{message:r.message,stack:r.stack}:void 0,timestamp:new Date().toISOString()})}).catch(()=>{});}catch{}},nu={next:"Next.js",vite:"Vite",webpack:"Webpack",unknown:"Unknown"},Nx={npm:"npm",yarn:"Yarn",pnpm:"pnpm",bun:"Bun"},qx={remix:"Remix",astro:"Astro",sveltekit:"SvelteKit",gatsby:"Gatsby"},up=new Be().name("init").description("initialize React Grab in your project").option("-y, --yes","skip confirmation prompts",false).option("-f, --force","force overwrite existing config",false).option("-a, --agent <agent>","agent integration (claude-code, cursor, opencode, codex, gemini, amp, ami, visual-edit)").option("--skip-install","skip package installation",false).option("-c, --cwd <cwd>","working directory (defaults to current directory)",process.cwd()).action(async t=>{console.log(`${$s.default.magenta("\u273F")} ${$s.default.bold("React Grab")} ${$s.default.gray(op)}`),console.log();try{let e=t.cwd,r=t.yes,s=se("Preflight checks.").start(),i=await Et(e);i.hasReactGrab&&!t.force&&(s.succeed(),b.break(),b.warn("React Grab is already installed."),b.log(`Use ${I.info("--force")} to reconfigure, or ${I.info("react-grab add")} to add an agent.`),b.break(),process.exit(0)),s.succeed();let n=se("Verifying framework.").start();if(i.unsupportedFramework){let y=qx[i.unsupportedFramework];n.fail(`Found ${I.info(y)}.`),b.break(),b.log(`${y} is not yet supported by automatic setup.`),b.log(`Visit ${I.info(Ps)} for manual setup.`),b.break(),process.exit(1);}if(i.framework==="unknown")if(i.isMonorepo&&!r){n.info("Verifying framework. Found monorepo.");let v=pf(i.projectRoot).filter(_=>_.hasReact||_.framework!=="unknown");if(v.length>0){b.break();let _=[...v].sort((P,O)=>P.framework==="unknown"&&O.framework!=="unknown"?1:P.framework!=="unknown"&&O.framework==="unknown"?-1:0),{selectedProject:F}=await(0,ks.default)({type:"select",name:"selectedProject",message:"Select a project to install React Grab:",choices:_.map(P=>{let O=P.framework!=="unknown"?` ${I.dim(`(${nu[P.framework]})`)}`:"";return {title:`${P.name}${O}`,value:P.path}})});F||(b.break(),process.exit(1)),process.chdir(F);let E=await Et(F);Object.assign(i,E),se("Verifying framework.").start().succeed(`Verifying framework. Found ${I.info(nu[E.framework])}.`);}else n.fail("Could not detect a supported framework."),b.break(),b.log(`Visit ${I.info(Ps)} for manual setup.`),b.break(),process.exit(1);}else n.fail("Could not detect a supported framework."),b.break(),b.log("React Grab supports Next.js, Vite, and Webpack projects."),b.log(`Visit ${I.info(Ps)} for manual setup.`),b.break(),process.exit(1);else n.succeed(`Verifying framework. Found ${I.info(nu[i.framework])}.`);i.framework==="next"&&se("Detecting router type.").start().succeed(`Detecting router type. Found ${I.info(i.nextRouterType==="app"?"App Router":"Pages Router")}.`),se("Detecting package manager.").start().succeed(`Detecting package manager. Found ${I.info(Nx[i.packageManager])}.`);let u=i.framework,a=i.packageManager,h=i.nextRouterType,l=t.agent||"none";if(!r&&!t.agent){b.break();let{agent:y}=await(0,ks.default)({type:"select",name:"agent",message:`Would you like to add an ${I.info("agent integration")}?`,choices:[{title:"None",value:"none"},{title:"Claude Code",value:"claude-code"},{title:"Cursor",value:"cursor"},{title:"OpenCode",value:"opencode"},{title:"Codex",value:"codex"},{title:"Gemini",value:"gemini"},{title:"Amp",value:"amp"},{title:"Ami",value:"ami"},{title:"Visual Edit",value:"visual-edit"}]});y===void 0&&(b.break(),process.exit(1)),l=y;}let c=Fs(i.projectRoot,u,h,l,!1),d=Es(i.projectRoot,l,i.installedAgents);c.success||(b.break(),b.error(c.message),b.error(`Visit ${I.info(Ps)} for manual setup.`),b.break(),process.exit(1));let f=!c.noChanges&&c.originalContent&&c.newContent,p=d.success&&!d.noChanges&&d.originalContent&&d.newContent;if((f||p)&&(b.break(),f&&bt(c.filePath,c.originalContent,c.newContent),p&&(f&&b.break(),bt(d.filePath,d.originalContent,d.newContent)),b.break(),b.warn("Auto-detection may not be 100% accurate."),b.warn("Please verify the changes before committing."),!r)){b.break();let{proceed:y}=await(0,ks.default)({type:"confirm",name:"proceed",message:"Apply these changes?",initial:!0});y||(b.break(),b.log("Changes cancelled."),b.break(),process.exit(0));}let m=!i.hasReactGrab,g=l!=="none"&&!i.installedAgents.includes(l);if(!t.skipInstall&&(m||g)){let y=ps(l,m);if(y.length>0){let v=se(`Installing ${y.join(", ")}.`).start();try{fs(y,a,i.projectRoot),v.succeed();}catch(_){v.fail(),yt(_);}}}if(f){let y=se(`Applying changes to ${c.filePath}.`).start(),v=Er(c);v.success||(y.fail(),b.break(),b.error(v.error||"Failed to write file."),b.break(),process.exit(1)),y.succeed();}if(p){let y=se(`Applying changes to ${d.filePath}.`).start(),v=As(d);v.success||(y.fail(),b.break(),b.error(v.error||"Failed to write file."),b.break(),process.exit(1)),y.succeed();}b.break(),b.log(`${I.success("Success!")} React Grab has been installed.`),b.log("You may now start your development server."),b.break(),await np("completed",{framework:u,packageManager:a,router:h,agent:l!=="none"?l:void 0,isMonorepo:i.isMonorepo});}catch(e){yt(e),await np("error",void 0,e);}});var ci=be(Nt()),hi=be(Gg()),ca=be(br());var xE="0.0.86",Vg=2e3,Ug='<script src="//unpkg.com/react-grab/dist/index.global.js"></script>',_E=t=>`<script src="//unpkg.com/${t}/dist/client.global.js"></script>`,Kg=async(t,e)=>new Promise(r=>{let s=http.createServer();s.listen(t,e,()=>{s.close(()=>r(t));}),s.on("error",()=>{r(Kg(t+1,e));});}),wE=t=>t.startsWith("http://")||t.startsWith("https://")?t:`http://${t}`,FE=async t=>{try{return (await fetch(t,{method:"HEAD",redirect:"follow"})).url}catch{return t}},Yg=new Be().name("start").alias("proxy").description("start a proxy server for a given URL").argument("[url]","target URL to proxy (e.g., localhost:3000)").option("-p, --port <port>","starting port for the proxy server",String(Vg)).option("--host <hostname>","hostname to bind the proxy server to","localhost").option("--provider <package>","provider package to run via npx (e.g., @react-grab/cursor)").action(async(t,e)=>{console.log(`${ci.default.magenta("\u273F")} ${ci.default.bold("React Grab")} ${ci.default.gray(xE)}`),console.log();let r=t,s=e.provider;if(!r){let{targetUrl:v}=await(0, ca.default)({type:"text",name:"targetUrl",message:"Enter the target URL to proxy:",initial:"localhost:3000"});if(v||(b.break(),process.exit(1)),r=v,!s){let{selectedProvider:_}=await(0, ca.default)({type:"select",name:"selectedProvider",message:`Select a ${I.info("provider")} to use:`,choices:[{title:"None",value:""},{title:"Claude Code",value:"@react-grab/claude-code"},{title:"Cursor",value:"@react-grab/cursor"},{title:"OpenCode",value:"@react-grab/opencode"},{title:"Codex",value:"@react-grab/codex"},{title:"Gemini",value:"@react-grab/gemini"},{title:"Amp",value:"@react-grab/amp"},{title:"Ami",value:"@react-grab/ami"}]});_===void 0&&(b.break(),process.exit(1)),s=_||void 0;}b.break();}let i=wE(r),n=await FE(i),o=parseInt(e.port,10),u=e.host||"localhost";(isNaN(o)||o<1||o>65535)&&(b.break(),b.error("Invalid port number. Please provide a port between 1 and 65535."),b.break(),process.exit(1));let a=await Kg(o,u),h=s?Ug+_E(s):Ug,l=v=>{let _=v.indexOf("</head>");if(_!==-1)return v.slice(0,_)+h+v.slice(_);let F=v.indexOf("</body>");return F!==-1?v.slice(0,F)+h+v.slice(F):v+h},c=(0, hi.createProxyMiddleware)({target:n,changeOrigin:true,followRedirects:false,ws:true,selfHandleResponse:true,cookieDomainRewrite:{"*":""},autoRewrite:true,preserveHeaderKeyCase:true,xfwd:true,on:{error:(v,_,F)=>{"writeHead"in F&&!F.headersSent&&(F.writeHead(503,{"Content-Type":"text/plain"}),F.end(`Proxy error: Unable to connect to ${n}`));},proxyReq:v=>{v.removeHeader("accept-encoding");},proxyRes:(0, hi.responseInterceptor)(async(v,_)=>{if(!(_.headers["content-type"]||"").includes("text/html"))return v;let S=v.toString("utf-8");return l(S)})}}),d=http.createServer((v,_)=>{c(v,_,F=>{F&&(b.error(`Request error: ${F}`),_.writeHead(500),_.end("Internal Server Error"));});});d.on("upgrade",c.upgrade);let f=se("Starting.").start(),p=()=>{f.succeed(`Open in your browser: http://${u}:${a}`);let v=["npx react-grab@latest start",r];e.port!==String(Vg)&&v.push(`--port=${e.port}`),u!=="localhost"&&v.push(`--host=${u}`),s&&v.push(`--provider=${s}`),b.break(),b.log(I.dim(`$ ${v.join(" ")}`));},m=false,g=!s,y=()=>{m&&g&&p();};if(d.listen(a,u,()=>{m=true,y();}),s){let v=child_process.spawn("npx",[`${s}@latest`],{stdio:"ignore",shell:true,detached:false}),_=()=>{v.killed||v.kill();};process.on("exit",_),process.on("SIGINT",()=>{_(),process.exit(0);}),process.on("SIGTERM",()=>{_(),process.exit(0);}),v.on("error",F=>{f.fail(`Failed to start provider: ${F.message}`);}),v.on("spawn",()=>{g=true,y();}),v.on("close",F=>{F!==0&&F!==null&&b.error(`Provider exited with code ${F}`);});}d.on("error",v=>{b.break(),b.error(`Server error: ${v.message}`),b.break(),process.exit(1);});});var EE="0.0.86",AE="https://www.react-grab.com/api/version";process.on("SIGINT",()=>process.exit(0));process.on("SIGTERM",()=>process.exit(0));try{fetch(`${AE}?source=cli&t=${Date.now()}`).catch(()=>{});}catch{}var Nr=new Be().name("react-grab").description("add React Grab to your project").version(EE,"-v, --version","display the version number");Nr.addCommand(up);Nr.addCommand(sp);Nr.addCommand(ip);Nr.addCommand(Yg);Nr.parse();
319
323
  /*! Bundled license information:
320
324
 
321
325
  http-proxy/lib/http-proxy/passes/web-outgoing.js: