@point-hub/papi 0.1.0 → 0.1.2
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/lib/index.d.ts +28 -0
- package/lib/index.js +5 -5
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { ExpressCli } from '@point-hub/express-cli';
|
|
4
4
|
import { Express } from 'express';
|
|
5
5
|
import { Server as HttpServer } from 'http';
|
|
6
|
+
import { SortDirection } from 'mongodb';
|
|
6
7
|
|
|
7
8
|
export declare class ConsoleKernel {
|
|
8
9
|
private command;
|
|
@@ -15,6 +16,32 @@ export declare class ConsoleKernel {
|
|
|
15
16
|
*/
|
|
16
17
|
register(): Promise<void>;
|
|
17
18
|
}
|
|
19
|
+
export interface IFieldsObject {
|
|
20
|
+
[key: string]: number;
|
|
21
|
+
}
|
|
22
|
+
export interface ISortObject {
|
|
23
|
+
[key: string]: SortDirection;
|
|
24
|
+
}
|
|
25
|
+
declare function page(page?: string | number): number;
|
|
26
|
+
declare function limit(pageSize?: string | number): number;
|
|
27
|
+
declare function skip(currentPage: string | number, pageSize: string | number): number;
|
|
28
|
+
declare function filter(filter: never): never;
|
|
29
|
+
declare function fields(fields?: string, excludeFields?: string[]): IFieldsObject;
|
|
30
|
+
declare function convertStringToArray(fields: string): string[];
|
|
31
|
+
declare function convertArrayToObject(array: string[]): IFieldsObject;
|
|
32
|
+
declare function filterExludeFields(obj: IFieldsObject, excludeFields: string[]): IFieldsObject;
|
|
33
|
+
declare function sort(fields: string): ISortObject;
|
|
34
|
+
declare const _default: {
|
|
35
|
+
page: typeof page;
|
|
36
|
+
limit: typeof limit;
|
|
37
|
+
skip: typeof skip;
|
|
38
|
+
sort: typeof sort;
|
|
39
|
+
fields: typeof fields;
|
|
40
|
+
filter: typeof filter;
|
|
41
|
+
filterExludeFields: typeof filterExludeFields;
|
|
42
|
+
convertStringToArray: typeof convertStringToArray;
|
|
43
|
+
convertArrayToObject: typeof convertArrayToObject;
|
|
44
|
+
};
|
|
18
45
|
declare class Server {
|
|
19
46
|
app: Express;
|
|
20
47
|
server: HttpServer | null;
|
|
@@ -30,6 +57,7 @@ export declare const stubDir: string;
|
|
|
30
57
|
|
|
31
58
|
export {
|
|
32
59
|
Server as BaseServer,
|
|
60
|
+
_default as Querystring,
|
|
33
61
|
};
|
|
34
62
|
|
|
35
63
|
export {};
|
package/lib/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var hU=Object.create;var{defineProperty:Z6,getPrototypeOf:vU,getOwnPropertyNames:xU}=Object;var yU=Object.prototype.hasOwnProperty;var u0=(U,Z,J)=>{J=U!=null?hU(vU(U)):{};const Q=Z||!U||!U.__esModule?Z6(J,"default",{value:U,enumerable:!0}):J;for(let K of xU(U))if(!yU.call(Q,K))Z6(Q,K,{get:()=>U[K],enumerable:!0});return Q};var E=(U,Z)=>()=>(Z||U((Z={exports:{}}).exports,Z),Z.exports);var M0=(U)=>{return import.meta.require(U)};var R1=E((pQ,J6)=>{var A0=function(U,{argv:Z=process.argv.slice(2),permissive:J=!1,stopAtPositional:Q=!1}={}){if(!U)throw new v("argument specification object is required","ARG_CONFIG_NO_SPEC");const K={_:[]},X={},z={};for(let D of Object.keys(U)){if(!D)throw new v("argument key cannot be an empty string","ARG_CONFIG_EMPTY_KEY");if(D[0]!=="-")throw new v(`argument key must start with '-' but found: '${D}'`,"ARG_CONFIG_NONOPT_KEY");if(D.length===1)throw new v(`argument key must have a name; singular '-' keys are not allowed: ${D}`,"ARG_CONFIG_NONAME_KEY");if(typeof U[D]==="string"){X[D]=U[D];continue}let G=U[D],Y=!1;if(Array.isArray(G)&&G.length===1&&typeof G[0]==="function"){const[M]=G;G=(T,N,F=[])=>{return F.push(M(T,N,F[F.length-1])),F},Y=M===Boolean||M[M1]===!0}else if(typeof G==="function")Y=G===Boolean||G[M1]===!0;else throw new v(`type missing or not a function or valid array type: ${D}`,"ARG_CONFIG_VAD_TYPE");if(D[1]!=="-"&&D.length>2)throw new v(`short argument keys (with a single hyphen) must have only one character: ${D}`,"ARG_CONFIG_SHORTOPT_TOOLONG");z[D]=[G,Y]}for(let D=0,G=Z.length;D<G;D++){const Y=Z[D];if(Q&&K._.length>0){K._=K._.concat(Z.slice(D));break}if(Y==="--"){K._=K._.concat(Z.slice(D+1));break}if(Y.length>1&&Y[0]==="-"){const M=Y[1]==="-"||Y.length===2?[Y]:Y.slice(1).split("").map((T)=>`-${T}`);for(let T=0;T<M.length;T++){const N=M[T],[F,H]=N[1]==="-"?N.split(/=(.*)/,2):[N,void 0];let V=F;while(V in X)V=X[V];if(!(V in z))if(J){K._.push(N);continue}else throw new v(`unknown or unexpected option: ${F}`,"ARG_UNKNOWN_OPTION");const[B,R]=z[V];if(!R&&T+1<M.length)throw new v(`option requires argument (but was followed by another short argument): ${F}`,"ARG_MISSING_REQUIRED_SHORTARG");if(R)K[V]=B(!0,V,K[V]);else if(H===void 0){if(Z.length<D+2||Z[D+1].length>1&&Z[D+1][0]==="-"&&!(Z[D+1].match(/^-?\d*(\.(?=\d))?\d*$/)&&(B===Number||typeof BigInt!=="undefined"&&B===BigInt))){const W=F===V?"":` (alias for ${V})`;throw new v(`option requires argument: ${F}${W}`,"ARG_MISSING_REQUIRED_LONGARG")}K[V]=B(Z[D+1],V,K[V]),++D}else K[V]=B(H,V,K[V])}}else K._.push(Y)}return K},M1=Symbol("arg flag");class v extends Error{constructor(U,Z){super(U);this.name="ArgError",this.code=Z,Object.setPrototypeOf(this,v.prototype)}}A0.flag=(U)=>{return U[M1]=!0,U};A0.COUNT=A0.flag((U,Z,J)=>(J||0)+1);A0.ArgError=v;J6.exports=A0});var c0=E((CK,W6)=>{var W1=[],R6=0,_=(U,Z)=>{if(R6>=Z)W1.push(U)};_.WARN=1;_.INFO=2;_.DEBUG=3;_.reset=()=>{W1=[]};_.setDebugLevel=(U)=>{R6=U};_.warn=(U)=>_(U,_.WARN);_.info=(U)=>_(U,_.INFO);_.debug=(U)=>_(U,_.DEBUG);_.debugMessages=()=>W1;W6.exports=_});var N6=E((_K,$6)=>{$6.exports=({onlyFirst:U=!1}={})=>{const Z=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(Z,U?void 0:"g")}});var T6=E((wK,O6)=>{var rU=N6();O6.exports=(U)=>typeof U==="string"?U.replace(rU(),""):U});var S6=E((fK,$1)=>{var I6=(U)=>{if(Number.isNaN(U))return!1;if(U>=4352&&(U<=4447||U===9001||U===9002||11904<=U&&U<=12871&&U!==12351||12880<=U&&U<=19903||19968<=U&&U<=42182||43360<=U&&U<=43388||44032<=U&&U<=55203||63744<=U&&U<=64255||65040<=U&&U<=65049||65072<=U&&U<=65131||65281<=U&&U<=65376||65504<=U&&U<=65510||110592<=U&&U<=110593||127488<=U&&U<=127569||131072<=U&&U<=262141))return!0;return!1};$1.exports=I6;$1.exports.default=I6});var A6=E((kK,L6)=>{L6.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var P6=E((bK,N1)=>{var oU=T6(),tU=S6(),eU=A6(),q6=(U)=>{if(typeof U!=="string"||U.length===0)return 0;if(U=oU(U),U.length===0)return 0;U=U.replace(eU()," ");let Z=0;for(let J=0;J<U.length;J++){const Q=U.codePointAt(J);if(Q<=31||Q>=127&&Q<=159)continue;if(Q>=768&&Q<=879)continue;if(Q>65535)J++;Z+=tU(Q)?2:1}return Z};N1.exports=q6;N1.exports.default=q6});var O1=E((hK,w6)=>{var p0=function(U){return U?/\u001b\[((?:\d*;){0,5}\d*)m/g:/\u001b\[(?:\d*;){0,5}\d*m/g},m=function(U){let Z=p0();return(""+U).replace(Z,"").split("\n").reduce(function(K,X){return j6(X)>K?j6(X):K},0)},q0=function(U,Z){return Array(Z+1).join(U)},UZ=function(U,Z,J,Q){let K=m(U);if(Z+1>=K){let X=Z-K;switch(Q){case"right":{U=q0(J,X)+U;break}case"center":{let z=Math.ceil(X/2),D=X-z;U=q0(J,D)+U+q0(J,z);break}default:{U=U+q0(J,X);break}}}return U},P0=function(U,Z,J){Z="\x1B["+Z+"m",J="\x1B["+J+"m",W0[Z]={set:U,to:!0},W0[J]={set:U,to:!1},W0[U]={on:Z,off:J}},C6=function(U,Z){let J=Z[1]?parseInt(Z[1].split(";")[0]):0;if(J>=30&&J<=39||J>=90&&J<=97){U.lastForegroundAdded=Z[0];return}if(J>=40&&J<=49||J>=100&&J<=107){U.lastBackgroundAdded=Z[0];return}if(J===0){for(let K in U)if(Object.prototype.hasOwnProperty.call(U,K))delete U[K];return}let Q=W0[Z[0]];if(Q)U[Q.set]=Q.to},ZZ=function(U){let Z=p0(!0),J=Z.exec(U),Q={};while(J!==null)C6(Q,J),J=Z.exec(U);return Q},_6=function(U,Z){let{lastBackgroundAdded:J,lastForegroundAdded:Q}=U;if(delete U.lastBackgroundAdded,delete U.lastForegroundAdded,Object.keys(U).forEach(function(K){if(U[K])Z+=W0[K].off}),J&&J!="\x1B[49m")Z+="\x1B[49m";if(Q&&Q!="\x1B[39m")Z+="\x1B[39m";return Z},JZ=function(U,Z){let{lastBackgroundAdded:J,lastForegroundAdded:Q}=U;if(delete U.lastBackgroundAdded,delete U.lastForegroundAdded,Object.keys(U).forEach(function(K){if(U[K])Z=W0[K].on+Z}),J&&J!="\x1B[49m")Z=J+Z;if(Q&&Q!="\x1B[39m")Z=Q+Z;return Z},QZ=function(U,Z){if(U.length===m(U))return U.substr(0,Z);while(m(U)>Z)U=U.slice(0,-1);return U},KZ=function(U,Z){let J=p0(!0),Q=U.split(p0()),K=0,X=0,z="",D,G={};while(X<Z){D=J.exec(U);let Y=Q[K];if(K++,X+m(Y)>Z)Y=QZ(Y,Z-X);if(z+=Y,X+=m(Y),X<Z){if(!D)break;z+=D[0],C6(G,D)}}return _6(G,z)},XZ=function(U,Z,J){if(J=J||"\u2026",m(U)<=Z)return U;return Z-=m(J),KZ(U,Z)+J},zZ=function(){return{chars:{top:"\u2500","top-mid":"\u252C","top-left":"\u250C","top-right":"\u2510",bottom:"\u2500","bottom-mid":"\u2534","bottom-left":"\u2514","bottom-right":"\u2518",left:"\u2502","left-mid":"\u251C",mid:"\u2500","mid-mid":"\u253C",right:"\u2502","right-mid":"\u2524",middle:"\u2502"},truncate:"\u2026",colWidths:[],rowHeights:[],colAligns:[],rowAligns:[],style:{"padding-left":1,"padding-right":1,head:["red"],border:["grey"],compact:!1},head:[]}},YZ=function(U,Z){U=U||{},Z=Z||zZ();let J=Object.assign({},Z,U);return J.chars=Object.assign({},Z.chars,U.chars),J.style=Object.assign({},Z.style,U.style),J},DZ=function(U,Z){let J=[],Q=Z.split(/(\s+)/g),K=[],X=0,z;for(let D=0;D<Q.length;D+=2){let G=Q[D],Y=X+m(G);if(X>0&&z)Y+=z.length;if(Y>U){if(X!==0)J.push(K.join(""));K=[G],X=m(G)}else K.push(z||"",G),X=Y;z=Q[D+1]}if(X)J.push(K.join(""));return J},GZ=function(U,Z){let J=[],Q="";function K(z,D){if(Q.length&&D)Q+=D;Q+=z;while(Q.length>U)J.push(Q.slice(0,U)),Q=Q.slice(U)}let X=Z.split(/(\s+)/g);for(let z=0;z<X.length;z+=2)K(X[z],z&&X[z-1]);if(Q.length)J.push(Q);return J},EZ=function(U,Z,J=!0){let Q=[];Z=Z.split("\n");const K=J?DZ:GZ;for(let X=0;X<Z.length;X++)Q.push.apply(Q,K(U,Z[X]));return Q},FZ=function(U){let Z={},J=[];for(let Q=0;Q<U.length;Q++){let K=JZ(Z,U[Q]);Z=ZZ(K);let X=Object.assign({},Z);J.push(_6(X,K))}return J},HZ=function(U,Z){return["\x1B]","8",";",";",U||Z,"\x07",Z,"\x1B]","8",";",";","\x07"].join("")},j6=P6(),W0={};P0("bold",1,22);P0("italics",3,23);P0("underline",4,24);P0("inverse",7,27);P0("strikethrough",9,29);w6.exports={strlen:m,repeat:q0,pad:UZ,truncate:XZ,mergeOptions:YZ,wordWrap:EZ,colorizeLines:FZ,hyperlink:HZ}});var h6=E((vK,b6)=>{var k6={};b6.exports=k6;var f6={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(f6).forEach(function(U){var Z=f6[U],J=k6[U]=[];J.open="\x1B["+Z[0]+"m",J.close="\x1B["+Z[1]+"m"})});var x6=E((xK,v6)=>{v6.exports=function(U,Z){Z=Z||process.argv;var J=Z.indexOf("--"),Q=/^-{1,2}/.test(U)?"":"--",K=Z.indexOf(Q+U);return K!==-1&&(J===-1?!0:K<J)}});var g6=E((yK,y6)=>{var BZ=function(U){if(U===0)return!1;return{level:U,hasBasic:!0,has256:U>=2,has16m:U>=3}},MZ=function(U){if($0===!1)return 0;if(x("color=16m")||x("color=full")||x("color=truecolor"))return 3;if(x("color=256"))return 2;if(U&&!U.isTTY&&$0!==!0)return 0;var Z=$0?1:0;if(process.platform==="win32"){var J=VZ.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(J[0])>=10&&Number(J[2])>=10586)return Number(J[2])>=14931?3:2;return 1}if("CI"in w){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(K){return K in w})||w.CI_NAME==="codeship")return 1;return Z}if("TEAMCITY_VERSION"in w)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(w.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in w){var Q=parseInt((w.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(w.TERM_PROGRAM){case"iTerm.app":return Q>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(w.TERM))return 2;if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(w.TERM))return 1;if("COLORTERM"in w)return 1;if(w.TERM==="dumb")return Z;return Z},T1=function(U){var Z=MZ(U);return BZ(Z)},VZ=import.meta.require("os"),x=x6(),w=process.env,$0=void 0;if(x("no-color")||x("no-colors")||x("color=false"))$0=!1;else if(x("color")||x("colors")||x("color=true")||x("color=always"))$0=!0;if("FORCE_COLOR"in w)$0=w.FORCE_COLOR.length===0||parseInt(w.FORCE_COLOR,10)!==0;y6.exports={supportsColor:T1,stdout:T1(process.stdout),stderr:T1(process.stderr)}});var u6=E((gK,m6)=>{m6.exports=function U(Z,J){var Q="";Z=Z||"Run the trap, drop the bass",Z=Z.split("");var K={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return Z.forEach(function(X){X=X.toLowerCase();var z=K[X]||[" "],D=Math.floor(Math.random()*z.length);if(typeof K[X]!=="undefined")Q+=K[X][D];else Q+=X}),Q}});var c6=E((mK,d6)=>{d6.exports=function U(Z,J){Z=Z||" he is here ";var Q={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},K=[].concat(Q.up,Q.down,Q.mid);function X(G){var Y=Math.floor(Math.random()*G);return Y}function z(G){var Y=!1;return K.filter(function(M){Y=M===G}),Y}function D(G,Y){var M="",T,N;Y=Y||{},Y.up=typeof Y.up!=="undefined"?Y.up:!0,Y.mid=typeof Y.mid!=="undefined"?Y.mid:!0,Y.down=typeof Y.down!=="undefined"?Y.down:!0,Y.size=typeof Y.size!=="undefined"?Y.size:"maxi",G=G.split("");for(N in G){if(z(N))continue;switch(M=M+G[N],T={up:0,down:0,mid:0},Y.size){case"mini":T.up=X(8),T.mid=X(2),T.down=X(8);break;case"maxi":T.up=X(16)+3,T.mid=X(4)+1,T.down=X(64)+3;break;default:T.up=X(8)+1,T.mid=X(6)/2,T.down=X(8)+1;break}var F=["up","mid","down"];for(var H in F){var V=F[H];for(var B=0;B<=T[V];B++)if(Y[V])M=M+Q[V][X(Q[V].length)]}}return M}return D(Z,J)}});var n6=E((uK,p6)=>{p6.exports=function(U){return function(Z,J,Q){if(Z===" ")return Z;switch(J%3){case 0:return U.red(Z);case 1:return U.white(Z);case 2:return U.blue(Z)}}}});var i6=E((dK,a6)=>{a6.exports=function(U){return function(Z,J,Q){return J%2===0?Z:U.inverse(Z)}}});var s6=E((cK,l6)=>{l6.exports=function(U){var Z=["red","yellow","green","blue","magenta"];return function(J,Q,K){if(J===" ")return J;else return U[Z[Q++%Z.length]](J)}}});var o6=E((pK,r6)=>{r6.exports=function(U){var Z=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(J,Q,K){return J===" "?J:U[Z[Math.round(Math.random()*(Z.length-2))]](J)}}});var Q9=E((aK,J9)=>{var U9=function(U){var Z=function J(){return TZ.apply(J,arguments)};return Z._styles=U,Z.__proto__=OZ,Z},TZ=function(){var U=Array.prototype.slice.call(arguments),Z=U.map(function(z){if(z!=null&&z.constructor===String)return z;else return RZ.inspect(z)}).join(" ");if(!O.enabled||!Z)return Z;var J=Z.indexOf("\n")!=-1,Q=this._styles,K=Q.length;while(K--){var X=F0[Q[K]];if(Z=X.open+Z.replace(X.closeRe,X.open)+X.close,J)Z=Z.replace(WZ,function(z){return X.close+z+X.open})}return Z},IZ=function(){var U={};return Object.keys(Z9).forEach(function(Z){U[Z]={get:function(){return U9([Z])}}}),U},O={};J9.exports=O;O.themes={};var RZ=import.meta.require("util"),F0=O.styles=h6(),e6=Object.defineProperties,WZ=new RegExp(/[\r\n]+/g);O.supportsColor=g6().supportsColor;if(typeof O.enabled==="undefined")O.enabled=O.supportsColor()!==!1;O.enable=function(){O.enabled=!0};O.disable=function(){O.enabled=!1};O.stripColors=O.strip=function(U){return(""+U).replace(/\x1B\[\d+m/g,"")};var nK=O.stylize=function U(Z,J){if(!O.enabled)return Z+"";var Q=F0[J];if(!Q&&J in O)return O[J](Z);return Q.open+Z+Q.close},$Z=/[|\\{}()[\]^$+*?.]/g,NZ=function(U){if(typeof U!=="string")throw new TypeError("Expected a string");return U.replace($Z,"\\$&")},Z9=function(){var U={};return F0.grey=F0.gray,Object.keys(F0).forEach(function(Z){F0[Z].closeRe=new RegExp(NZ(F0[Z].close),"g"),U[Z]={get:function(){return U9(this._styles.concat(Z))}}}),U}(),OZ=e6(function U(){},Z9);O.setTheme=function(U){if(typeof U==="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller\'s) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + \'/../themes/generic-logging.js\'); The new syntax looks like colors.setTheme(require(__dirname + \'/../themes/generic-logging.js\'));");return}for(var Z in U)(function(J){O[J]=function(Q){if(typeof U[J]==="object"){var K=Q;for(var X in U[J])K=O[U[J][X]](K);return K}return O[U[J]](Q)}})(Z)};var SZ=function U(Z,J){var Q=J.split("");return Q=Q.map(Z),Q.join("")};O.trap=u6();O.zalgo=c6();O.maps={};O.maps.america=n6()(O);O.maps.zebra=i6()(O);O.maps.rainbow=s6()(O);O.maps.random=o6()(O);for(t6 in O.maps)(function(U){O[U]=function(Z){return SZ(O.maps[U],Z)}})(t6);var t6;e6(O,IZ())});var X9=E((iK,K9)=>{var LZ=Q9();K9.exports=LZ});var G9=E((lK,i0)=>{var z9=function(...U){return U.filter((Z)=>Z!==void 0&&Z!==null).shift()},I1=function(U,Z,J,Q){let K=J.split("-");if(K.length>1)K[1]=K[1].charAt(0).toUpperCase()+K[1].substr(1),K=K.join(""),Q[K]=z9(U[K],U[J],Z[K],Z[J]);else Q[J]=z9(U[J],Z[J])},qZ=function(U,Z,J){let Q=U[Z];for(let K=1;K<J;K++)Q+=1+U[Z+K];return Q},Y9=function(U,Z){return U+Z+1},{info:AZ,debug:D9}=c0(),h=O1();class j0{constructor(U){this.setOptions(U),this.x=null,this.y=null}setOptions(U){if(["boolean","number","string"].indexOf(typeof U)!==-1)U={content:""+U};U=U||{},this.options=U;let Z=U.content;if(["boolean","number","string"].indexOf(typeof Z)!==-1)this.content=String(Z);else if(!Z)this.content=this.options.href||"";else throw new Error("Content needs to be a primitive, got: "+typeof Z);if(this.colSpan=U.colSpan||1,this.rowSpan=U.rowSpan||1,this.options.href)Object.defineProperty(this,"href",{get(){return this.options.href}})}mergeTableOptions(U,Z){this.cells=Z;let J=this.options.chars||{},Q=U.chars,K=this.chars={};PZ.forEach(function(D){I1(J,Q,D,K)}),this.truncate=this.options.truncate||U.truncate;let X=this.options.style=this.options.style||{},z=U.style;I1(X,z,"padding-left",this),I1(X,z,"padding-right",this),this.head=X.head||z.head,this.border=X.border||z.border,this.fixedWidth=U.colWidths[this.x],this.lines=this.computeLines(U),this.desiredWidth=h.strlen(this.content)+this.paddingLeft+this.paddingRight,this.desiredHeight=this.lines.length}computeLines(U){const Z=U.wordWrap||U.textWrap,{wordWrap:J=Z}=this.options;if(this.fixedWidth&&J){if(this.fixedWidth-=this.paddingLeft+this.paddingRight,this.colSpan){let X=1;while(X<this.colSpan)this.fixedWidth+=U.colWidths[this.x+X],X++}const{wrapOnWordBoundary:Q=!0}=U,{wrapOnWordBoundary:K=Q}=this.options;return this.wrapLines(h.wordWrap(this.fixedWidth,this.content,K))}return this.wrapLines(this.content.split("\n"))}wrapLines(U){const Z=h.colorizeLines(U);if(this.href)return Z.map((J)=>h.hyperlink(this.href,J));return Z}init(U){let Z=this.x,J=this.y;this.widths=U.colWidths.slice(Z,Z+this.colSpan),this.heights=U.rowHeights.slice(J,J+this.rowSpan),this.width=this.widths.reduce(Y9,-1),this.height=this.heights.reduce(Y9,-1),this.hAlign=this.options.hAlign||U.colAligns[Z],this.vAlign=this.options.vAlign||U.rowAligns[J],this.drawRight=Z+this.colSpan==U.colWidths.length}draw(U,Z){if(U=="top")return this.drawTop(this.drawRight);if(U=="bottom")return this.drawBottom(this.drawRight);let J=h.truncate(this.content,10,this.truncate);if(!U)AZ(`${this.y}-${this.x}: ${this.rowSpan-U}x${this.colSpan} Cell ${J}`);let Q=Math.max(this.height-this.lines.length,0),K;switch(this.vAlign){case"center":K=Math.ceil(Q/2);break;case"bottom":K=Q;break;default:K=0}if(U<K||U>=K+this.lines.length)return this.drawEmpty(this.drawRight,Z);let X=this.lines.length>this.height&&U+1>=this.height;return this.drawLine(U-K,this.drawRight,X,Z)}drawTop(U){let Z=[];if(this.cells)this.widths.forEach(function(J,Q){Z.push(this._topLeftChar(Q)),Z.push(h.repeat(this.chars[this.y==0?"top":"mid"],J))},this);else Z.push(this._topLeftChar(0)),Z.push(h.repeat(this.chars[this.y==0?"top":"mid"],this.width));if(U)Z.push(this.chars[this.y==0?"topRight":"rightMid"]);return this.wrapWithStyleColors("border",Z.join(""))}_topLeftChar(U){let Z=this.x+U,J;if(this.y==0)J=Z==0?"topLeft":U==0?"topMid":"top";else if(Z==0)J="leftMid";else if(J=U==0?"midMid":"bottomMid",this.cells){if(this.cells[this.y-1][Z]instanceof j0.ColSpanCell)J=U==0?"topMid":"mid";if(U==0){let K=1;while(this.cells[this.y][Z-K]instanceof j0.ColSpanCell)K++;if(this.cells[this.y][Z-K]instanceof j0.RowSpanCell)J="leftMid"}}return this.chars[J]}wrapWithStyleColors(U,Z){if(this[U]&&this[U].length)try{let J=X9();for(let Q=this[U].length-1;Q>=0;Q--)J=J[this[U][Q]];return J(Z)}catch(J){return Z}else return Z}drawLine(U,Z,J,Q){let K=this.chars[this.x==0?"left":"middle"];if(this.x&&Q&&this.cells){let T=this.cells[this.y+Q][this.x-1];while(T instanceof n0)T=this.cells[T.y][T.x-1];if(!(T instanceof a0))K=this.chars.rightMid}let X=h.repeat(" ",this.paddingLeft),z=Z?this.chars.right:"",D=h.repeat(" ",this.paddingRight),G=this.lines[U],Y=this.width-(this.paddingLeft+this.paddingRight);if(J)G+=this.truncate||"\u2026";let M=h.truncate(G,Y,this.truncate);return M=h.pad(M,Y," ",this.hAlign),M=X+M+D,this.stylizeLine(K,M,z)}stylizeLine(U,Z,J){if(U=this.wrapWithStyleColors("border",U),J=this.wrapWithStyleColors("border",J),this.y===0)Z=this.wrapWithStyleColors("head",Z);return U+Z+J}drawBottom(U){let Z=this.chars[this.x==0?"bottomLeft":"bottomMid"],J=h.repeat(this.chars.bottom,this.width),Q=U?this.chars.bottomRight:"";return this.wrapWithStyleColors("border",Z+J+Q)}drawEmpty(U,Z){let J=this.chars[this.x==0?"left":"middle"];if(this.x&&Z&&this.cells){let X=this.cells[this.y+Z][this.x-1];while(X instanceof n0)X=this.cells[X.y][X.x-1];if(!(X instanceof a0))J=this.chars.rightMid}let Q=U?this.chars.right:"",K=h.repeat(" ",this.width);return this.stylizeLine(J,K,Q)}}class n0{constructor(){}draw(U){if(typeof U==="number")D9(`${this.y}-${this.x}: 1x1 ColSpanCell`);return""}init(){}mergeTableOptions(){}}class a0{constructor(U){this.originalCell=U}init(U){let Z=this.y,J=this.originalCell.y;this.cellOffset=Z-J,this.offset=qZ(U.rowHeights,J,this.cellOffset)}draw(U){if(U=="top")return this.originalCell.draw(this.offset,this.cellOffset);if(U=="bottom")return this.originalCell.draw("bottom");return D9(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`),this.originalCell.draw(this.offset+1+U)}mergeTableOptions(){}}var PZ=["top","top-mid","top-left","top-right","bottom","bottom-mid","bottom-left","bottom-right","left","left-mid","mid","mid-mid","right","right-mid","middle"];i0.exports=j0;i0.exports.ColSpanCell=n0;i0.exports.RowSpanCell=a0});var H9=E((sK,F9)=>{var E9=function(U,Z,J,Q){return function(K,X){let z=[],D=[],G={};X.forEach(function(Y){Y.forEach(function(M){if((M[U]||1)>1)D.push(M);else z[M[J]]=Math.max(z[M[J]]||0,M[Z]||0,Q)})}),K.forEach(function(Y,M){if(typeof Y==="number")z[M]=Y});for(let Y=D.length-1;Y>=0;Y--){let M=D[Y],T=M[U],N=M[J],F=z[N],H=typeof K[N]==="number"?0:1;if(typeof F==="number"){for(let V=1;V<T;V++)if(F+=1+z[N+V],typeof K[N+V]!=="number")H++}else if(F=Z==="desiredWidth"?M.desiredWidth-1:1,!G[N]||G[N]<F)G[N]=F;if(M[Z]>F){let V=0;while(H>0&&M[Z]>F){if(typeof K[N+V]!=="number"){let B=Math.round((M[Z]-F)/H);F+=B,z[N+V]+=B,H--}V++}}}Object.assign(K,z,G);for(let Y=0;Y<K.length;Y++)K[Y]=Math.max(Q,K[Y]||0)}},{warn:jZ,debug:CZ}=c0(),S1=G9(),{ColSpanCell:_Z,RowSpanCell:wZ}=S1;(function(){function U(F,H){if(F[H]>0)return U(F,H+1);return H}function Z(F){let H={};F.forEach(function(V,B){let R=0;V.forEach(function(W){W.y=B,W.x=B?U(H,R):R;const C=W.rowSpan||1,f=W.colSpan||1;if(C>1)for(let L0=0;L0<f;L0++)H[W.x+L0]=C;R=W.x+f}),Object.keys(H).forEach((W)=>{if(H[W]--,H[W]<1)delete H[W]})})}function J(F){let H=0;return F.forEach(function(V){V.forEach(function(B){H=Math.max(H,B.x+(B.colSpan||1))})}),H}function Q(F){return F.length}function K(F,H){let V=F.y,B=F.y-1+(F.rowSpan||1),R=H.y,W=H.y-1+(H.rowSpan||1),C=!(V>W||R>B),f=F.x,L0=F.x-1+(F.colSpan||1),fU=H.x,kU=H.x-1+(H.colSpan||1),bU=!(f>kU||fU>L0);return C&&bU}function X(F,H,V){let B=Math.min(F.length-1,V),R={x:H,y:V};for(let W=0;W<=B;W++){let C=F[W];for(let f=0;f<C.length;f++)if(K(R,C[f]))return!0}return!1}function z(F,H,V,B){for(let R=V;R<B;R++)if(X(F,R,H))return!1;return!0}function D(F){F.forEach(function(H,V){H.forEach(function(B){for(let R=1;R<B.rowSpan;R++){let W=new wZ(B);W.x=B.x,W.y=B.y+R,W.colSpan=B.colSpan,Y(W,F[V+R])}})})}function G(F){for(let H=F.length-1;H>=0;H--){let V=F[H];for(let B=0;B<V.length;B++){let R=V[B];for(let W=1;W<R.colSpan;W++){let C=new _Z;C.x=R.x+W,C.y=R.y,V.splice(B+1,0,C)}}}}function Y(F,H){let V=0;while(V<H.length&&H[V].x<F.x)V++;H.splice(V,0,F)}function M(F){let H=Q(F),V=J(F);CZ(`Max rows: ${H}; Max cols: ${V}`);for(let B=0;B<H;B++)for(let R=0;R<V;R++)if(!X(F,R,B)){let W={x:R,y:B,colSpan:1,rowSpan:1};R++;while(R<V&&!X(F,R,B))W.colSpan++,R++;let C=B+1;while(C<H&&z(F,C,W.x,W.x+W.colSpan))W.rowSpan++,C++;let f=new S1(W);f.x=W.x,f.y=W.y,jZ(`Missing cell at ${f.y}-${f.x}.`),Y(f,F[B])}}function T(F){return F.map(function(H){if(!Array.isArray(H)){let V=Object.keys(H)[0];if(H=H[V],Array.isArray(H))H=H.slice(),H.unshift(V);else H=[V,H]}return H.map(function(V){return new S1(V)})})}function N(F){let H=T(F);return Z(H),M(H),D(H),G(H),H}F9.exports={makeTableLayout:N,layoutTable:Z,addRowSpanCells:D,maxWidth:J,fillInTable:M,computeWidths:E9("colSpan","desiredWidth","x",1),computeHeights:E9("rowSpan","desiredHeight","y",1)}})()});var B9=E((rK,V9)=>{var A1=function(U,Z,J){let Q=[];U.forEach(function(X){Q.push(X.draw(Z))});let K=Q.join("");if(K.length)J.push(K)},l=c0(),fZ=O1(),L1=H9();class q1 extends Array{constructor(U){super();const Z=fZ.mergeOptions(U);if(Object.defineProperty(this,"options",{value:Z,enumerable:Z.debug}),Z.debug){switch(typeof Z.debug){case"boolean":l.setDebugLevel(l.WARN);break;case"number":l.setDebugLevel(Z.debug);break;case"string":l.setDebugLevel(parseInt(Z.debug,10));break;default:l.setDebugLevel(l.WARN),l.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof Z.debug}`)}Object.defineProperty(this,"messages",{get(){return l.debugMessages()}})}}toString(){let U=this,Z=this.options.head&&this.options.head.length;if(Z){if(U=[this.options.head],this.length)U.push.apply(U,this)}else this.options.style.head=[];let J=L1.makeTableLayout(U);J.forEach(function(K){K.forEach(function(X){X.mergeTableOptions(this.options,J)},this)},this),L1.computeWidths(this.options.colWidths,J),L1.computeHeights(this.options.rowHeights,J),J.forEach(function(K){K.forEach(function(X){X.init(this.options)},this)},this);let Q=[];for(let K=0;K<J.length;K++){let X=J[K],z=this.options.rowHeights[K];if(K===0||!this.options.style.compact||K==1&&Z)A1(X,"top",Q);for(let D=0;D<z;D++)A1(X,D,Q);if(K+1==J.length)A1(X,"bottom",Q)}return Q.join("\n")}get width(){return this.toString().split("\n")[0].length}}q1.reset=()=>l.reset();V9.exports=q1});var A=E((QX,W9)=>{var R9=function(U,Z){let J=0,Q,K="",X="";for(;J<U.length;J++)if(Q=U[J],K+=Q.open,X+=Q.close,Z.includes(Q.close))Z=Z.replace(Q.rgx,Q.close+Q.open);return K+Z+X},yZ=function(U,Z){let J={has:U,keys:Z};return J.reset=I.reset.bind(J),J.bold=I.bold.bind(J),J.dim=I.dim.bind(J),J.italic=I.italic.bind(J),J.underline=I.underline.bind(J),J.inverse=I.inverse.bind(J),J.hidden=I.hidden.bind(J),J.strikethrough=I.strikethrough.bind(J),J.black=I.black.bind(J),J.red=I.red.bind(J),J.green=I.green.bind(J),J.yellow=I.yellow.bind(J),J.blue=I.blue.bind(J),J.magenta=I.magenta.bind(J),J.cyan=I.cyan.bind(J),J.white=I.white.bind(J),J.gray=I.gray.bind(J),J.grey=I.grey.bind(J),J.bgBlack=I.bgBlack.bind(J),J.bgRed=I.bgRed.bind(J),J.bgGreen=I.bgGreen.bind(J),J.bgYellow=I.bgYellow.bind(J),J.bgBlue=I.bgBlue.bind(J),J.bgMagenta=I.bgMagenta.bind(J),J.bgCyan=I.bgCyan.bind(J),J.bgWhite=I.bgWhite.bind(J),J},L=function(U,Z){let J={open:`\x1B[${U}m`,close:`\x1B[${Z}m`,rgx:new RegExp(`\\x1b\\[${Z}m`,"g")};return function(Q){if(this!==void 0&&this.has!==void 0)return this.has.includes(U)||(this.has.push(U),this.keys.push(J)),Q===void 0?this:I.enabled?R9(this.keys,Q+""):Q+"";return Q===void 0?yZ([U],[J]):I.enabled?R9([J],Q+""):Q+""}},{FORCE_COLOR:hZ,NODE_DISABLE_COLORS:vZ,TERM:xZ}=process.env,I={enabled:!vZ&&xZ!=="dumb"&&hZ!=="0",reset:L(0,0),bold:L(1,22),dim:L(2,22),italic:L(3,23),underline:L(4,24),inverse:L(7,27),hidden:L(8,28),strikethrough:L(9,29),black:L(30,39),red:L(31,39),green:L(32,39),yellow:L(33,39),blue:L(34,39),magenta:L(35,39),cyan:L(36,39),white:L(37,39),gray:L(90,39),grey:L(90,39),bgBlack:L(40,49),bgRed:L(41,49),bgGreen:L(42,49),bgYellow:L(43,49),bgBlue:L(44,49),bgMagenta:L(45,49),bgCyan:L(46,49),bgWhite:L(47,49)};W9.exports=I});var N9=E((KX,$9)=>{$9.exports=(U,Z)=>{if(U.meta&&U.name!=="escape")return;if(U.ctrl){if(U.name==="a")return"first";if(U.name==="c")return"abort";if(U.name==="d")return"abort";if(U.name==="e")return"last";if(U.name==="g")return"reset"}if(Z){if(U.name==="j")return"down";if(U.name==="k")return"up"}if(U.name==="return")return"submit";if(U.name==="enter")return"submit";if(U.name==="backspace")return"delete";if(U.name==="delete")return"deleteForward";if(U.name==="abort")return"abort";if(U.name==="escape")return"exit";if(U.name==="tab")return"next";if(U.name==="pagedown")return"nextPage";if(U.name==="pageup")return"prevPage";if(U.name==="home")return"home";if(U.name==="end")return"end";if(U.name==="up")return"up";if(U.name==="down")return"down";if(U.name==="right")return"right";if(U.name==="left")return"left";return!1}});var l0=E((XX,O9)=>{O9.exports=(U)=>{const Z=["[\\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("|"),J=new RegExp(Z,"g");return typeof U==="string"?U.replace(J,""):U}});var P=E((zX,T9)=>{var q=`${"\x1B"}[`,j1={to(U,Z){if(!Z)return`${q}${U+1}G`;return`${q}${Z+1};${U+1}H`},move(U,Z){let J="";if(U<0)J+=`${q}${-U}D`;else if(U>0)J+=`${q}${U}C`;if(Z<0)J+=`${q}${-Z}A`;else if(Z>0)J+=`${q}${Z}B`;return J},up:(U=1)=>`${q}${U}A`,down:(U=1)=>`${q}${U}B`,forward:(U=1)=>`${q}${U}C`,backward:(U=1)=>`${q}${U}D`,nextLine:(U=1)=>`${q}E`.repeat(U),prevLine:(U=1)=>`${q}F`.repeat(U),left:`${q}G`,hide:`${q}?25l`,show:`${q}?25h`,save:`${"\x1B"}7`,restore:`${"\x1B"}8`},gZ={up:(U=1)=>`${q}S`.repeat(U),down:(U=1)=>`${q}T`.repeat(U)},mZ={screen:`${q}2J`,up:(U=1)=>`${q}1J`.repeat(U),down:(U=1)=>`${q}J`.repeat(U),line:`${q}2K`,lineEnd:`${q}K`,lineStart:`${q}1K`,lines(U){let Z="";for(let J=0;J<U;J++)Z+=this.line+(J<U-1?j1.up():"");if(U)Z+=j1.left;return Z}};T9.exports={cursor:j1,scroll:gZ,erase:mZ,beep:"\x07"}});var q9=E((YX,A9)=>{var uZ=function(U,Z){var J=typeof Symbol!=="undefined"&&U[Symbol.iterator]||U["@@iterator"];if(!J){if(Array.isArray(U)||(J=dZ(U))||Z&&U&&typeof U.length==="number"){if(J)U=J;var Q=0,K=function G(){};return{s:K,n:function G(){if(Q>=U.length)return{done:!0};return{done:!1,value:U[Q++]}},e:function G(Y){throw Y},f:K}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var X=!0,z=!1,D;return{s:function G(){J=J.call(U)},n:function G(){var Y=J.next();return X=Y.done,Y},e:function G(Y){z=!0,D=Y},f:function G(){try{if(!X&&J.return!=null)J.return()}finally{if(z)throw D}}}},dZ=function(U,Z){if(!U)return;if(typeof U==="string")return I9(U,Z);var J=Object.prototype.toString.call(U).slice(8,-1);if(J==="Object"&&U.constructor)J=U.constructor.name;if(J==="Map"||J==="Set")return Array.from(U);if(J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J))return I9(U,Z)},I9=function(U,Z){if(Z==null||Z>U.length)Z=U.length;for(var J=0,Q=new Array(Z);J<Z;J++)Q[J]=U[J];return Q},cZ=l0(),L9=P(),S9=L9.erase,pZ=L9.cursor,nZ=(U)=>[...cZ(U)].length;A9.exports=function(U,Z){if(!Z)return S9.line+pZ.to(0);let J=0;const Q=U.split(/\r?\n/);var K=uZ(Q),X;try{for(K.s();!(X=K.n()).done;){let z=X.value;J+=1+Math.floor(Math.max(nZ(z)-1,0)/Z)}}catch(z){K.e(z)}finally{K.f()}return S9.lines(J)}});var C1=E((DX,P9)=>{var C0={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},aZ={arrowUp:C0.arrowUp,arrowDown:C0.arrowDown,arrowLeft:C0.arrowLeft,arrowRight:C0.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},iZ=process.platform==="win32"?aZ:C0;P9.exports=iZ});var C9=E((GX,j9)=>{var N0=A(),H0=C1(),_1=Object.freeze({password:{scale:1,render:(U)=>"*".repeat(U.length)},emoji:{scale:2,render:(U)=>"\uD83D\uDE03".repeat(U.length)},invisible:{scale:0,render:(U)=>""},default:{scale:1,render:(U)=>`${U}`}}),lZ=(U)=>_1[U]||_1.default,_0=Object.freeze({aborted:N0.red(H0.cross),done:N0.green(H0.tick),exited:N0.yellow(H0.cross),default:N0.cyan("?")}),sZ=(U,Z,J)=>Z?_0.aborted:J?_0.exited:U?_0.done:_0.default,rZ=(U)=>N0.gray(U?H0.ellipsis:H0.pointerSmall),oZ=(U,Z)=>N0.gray(U?Z?H0.pointerSmall:"+":H0.line);j9.exports={styles:_1,render:lZ,symbols:_0,symbol:sZ,delimiter:rZ,item:oZ}});var w9=E((EX,_9)=>{var tZ=l0();_9.exports=function(U,Z){let J=String(tZ(U)||"").split(/\r?\n/);if(!Z)return J.length;return J.map((Q)=>Math.ceil(Q.length/Z)).reduce((Q,K)=>Q+K)}});var k9=E((FX,f9)=>{f9.exports=(U,Z={})=>{const J=Number.isSafeInteger(parseInt(Z.margin))?new Array(parseInt(Z.margin)).fill(" ").join(""):Z.margin||"",Q=Z.width;return(U||"").split(/\r?\n/g).map((K)=>K.split(/\s+/g).reduce((X,z)=>{if(z.length+J.length>=Q||X[X.length-1].length+z.length+1<Q)X[X.length-1]+=` ${z}`;else X.push(`${J}${z}`);return X},[J]).join("\n")).join("\n")}});var h9=E((HX,b9)=>{b9.exports=(U,Z,J)=>{J=J||Z;let Q=Math.min(Z-J,U-Math.floor(J/2));if(Q<0)Q=0;let K=Math.min(Q+J,Z);return{startIndex:Q,endIndex:K}}});var y=E((VX,v9)=>{v9.exports={action:N9(),clear:q9(),style:C9(),strip:l0(),figures:C1(),lines:w9(),wrap:k9(),entriesToDisplay:h9()}});var o=E((BX,m9)=>{var x9=import.meta.require("readline"),eZ=y(),U5=eZ.action,Z5=import.meta.require("events"),y9=P(),J5=y9.beep,Q5=y9.cursor,K5=A();class g9 extends Z5{constructor(U={}){super();this.firstRender=!0,this.in=U.stdin||process.stdin,this.out=U.stdout||process.stdout,this.onRender=(U.onRender||(()=>{return})).bind(this);const Z=x9.createInterface({input:this.in,escapeCodeTimeout:50});if(x9.emitKeypressEvents(this.in,Z),this.in.isTTY)this.in.setRawMode(!0);const J=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,Q=(K,X)=>{let z=U5(X,J);if(z===!1)this._&&this._(K,X);else if(typeof this[z]==="function")this[z](X);else this.bell()};this.close=()=>{if(this.out.write(Q5.show),this.in.removeListener("keypress",Q),this.in.isTTY)this.in.setRawMode(!1);Z.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",Q)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(J5)}render(){if(this.onRender(K5),this.firstRender)this.firstRender=!1}}m9.exports=g9});var a9=E((MX,n9)=>{var u9=function(U,Z,J,Q,K,X,z){try{var D=U[X](z),G=D.value}catch(Y){J(Y);return}if(D.done)Z(G);else Promise.resolve(G).then(Q,K)},d9=function(U){return function(){var Z=this,J=arguments;return new Promise(function(Q,K){var X=U.apply(Z,J);function z(G){u9(X,Q,K,z,D,"next",G)}function D(G){u9(X,Q,K,z,D,"throw",G)}z(void 0)})}},s0=A(),X5=o(),c9=P(),z5=c9.erase,w0=c9.cursor,r0=y(),w1=r0.style,f1=r0.clear,Y5=r0.lines,D5=r0.figures;class p9 extends X5{constructor(U={}){super(U);this.transform=w1.render(U.style),this.scale=this.transform.scale,this.msg=U.message,this.initial=U.initial||"",this.validator=U.validate||(()=>!0),this.value="",this.errorMsg=U.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=f1("",this.out.columns),this.render()}set value(U){if(!U&&this.initial)this.placeholder=!0,this.rendered=s0.gray(this.transform.render(this.initial));else this.placeholder=!1,this.rendered=this.transform.render(U);this._value=U,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var U=this;return d9(function*(){let Z=yield U.validator(U.value);if(typeof Z==="string")U.errorMsg=Z,Z=!1;U.error=!Z})()}submit(){var U=this;return d9(function*(){if(U.value=U.value||U.initial,U.cursorOffset=0,U.cursor=U.rendered.length,yield U.validate(),U.error){U.red=!0,U.fire(),U.render();return}U.done=!0,U.aborted=!1,U.fire(),U.render(),U.out.write("\n"),U.close()})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(U){if(this.placeholder)return;this.cursor=this.cursor+U,this.cursorOffset+=U}_(U,Z){let J=this.value.slice(0,this.cursor),Q=this.value.slice(this.cursor);this.value=`${J}${U}${Q}`,this.red=!1,this.cursor=this.placeholder?0:J.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let U=this.value.slice(0,this.cursor-1),Z=this.value.slice(this.cursor);if(this.value=`${U}${Z}`,this.red=!1,this.isCursorAtStart())this.cursorOffset=0;else this.cursorOffset++,this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let U=this.value.slice(0,this.cursor),Z=this.value.slice(this.cursor+1);if(this.value=`${U}${Z}`,this.red=!1,this.isCursorAtEnd())this.cursorOffset=0;else 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(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(w0.down(Y5(this.outputError,this.out.columns)-1)+f1(this.outputError,this.out.columns));this.out.write(f1(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[w1.symbol(this.done,this.aborted),s0.bold(this.msg),w1.delimiter(this.done),this.red?s0.red(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split("\n").reduce((U,Z,J)=>U+`\n${J?" ":D5.pointerSmall} ${s0.red().italic(Z)}`,"");this.out.write(z5.line+w0.to(0)+this.outputText+w0.save+this.outputError+w0.restore+w0.move(this.cursorOffset,0))}}n9.exports=p9});var o9=E((RX,r9)=>{var t=A(),G5=o(),f0=y(),i9=f0.style,l9=f0.clear,o0=f0.figures,E5=f0.wrap,F5=f0.entriesToDisplay,H5=P(),V5=H5.cursor;class s9 extends G5{constructor(U={}){super(U);this.msg=U.message,this.hint=U.hint||"- Use arrow-keys. Return to submit.",this.warn=U.warn||"- This option is disabled",this.cursor=U.initial||0,this.choices=U.choices.map((Z,J)=>{if(typeof Z==="string")Z={title:Z,value:J};return{title:Z&&(Z.title||Z.value||Z),value:Z&&(Z.value===void 0?J:Z.value),description:Z&&Z.description,selected:Z&&Z.selected,disabled:Z&&Z.disabled}}),this.optionsPerPage=U.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=l9("",this.out.columns),this.render()}moveCursor(U){this.cursor=U,this.value=this.choices[U].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){if(!this.selection.disabled)this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close();else this.bell()}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){if(this.cursor===0)this.moveCursor(this.choices.length-1);else this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)this.moveCursor(0);else this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(U,Z){if(U===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(V5.hide);else this.out.write(l9(this.outputText,this.out.columns));super.render();let U=F5(this.cursor,this.choices.length,this.optionsPerPage),Z=U.startIndex,J=U.endIndex;if(this.outputText=[i9.symbol(this.done,this.aborted),t.bold(this.msg),i9.delimiter(!1),this.done?this.selection.title:this.selection.disabled?t.yellow(this.warn):t.gray(this.hint)].join(" "),!this.done){this.outputText+="\n";for(let Q=Z;Q<J;Q++){let K,X,z="",D=this.choices[Q];if(Q===Z&&Z>0)X=o0.arrowUp;else if(Q===J-1&&J<this.choices.length)X=o0.arrowDown;else X=" ";if(D.disabled)K=this.cursor===Q?t.gray().underline(D.title):t.strikethrough().gray(D.title),X=(this.cursor===Q?t.bold().gray(o0.pointer)+" ":" ")+X;else if(K=this.cursor===Q?t.cyan().underline(D.title):D.title,X=(this.cursor===Q?t.cyan(o0.pointer)+" ":" ")+X,D.description&&this.cursor===Q){if(z=` - ${D.description}`,X.length+K.length+z.length>=this.out.columns||D.description.split(/\r?\n/).length>1)z="\n"+E5(D.description,{margin:3,width:this.out.columns})}this.outputText+=`${X} ${K}${t.gray(z)}\n`}}this.out.write(this.outputText)}}r9.exports=s9});var K8=E((WX,Q8)=>{var t0=A(),B5=o(),U8=y(),t9=U8.style,M5=U8.clear,Z8=P(),e9=Z8.cursor,R5=Z8.erase;class J8 extends B5{constructor(U={}){super(U);this.msg=U.message,this.value=!!U.initial,this.active=U.active||"on",this.inactive=U.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=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,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()}_(U,Z){if(U===" ")this.value=!this.value;else if(U==="1")this.value=!0;else if(U==="0")this.value=!1;else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(e9.hide);else this.out.write(M5(this.outputText,this.out.columns));super.render(),this.outputText=[t9.symbol(this.done,this.aborted),t0.bold(this.msg),t9.delimiter(this.done),this.value?this.inactive:t0.cyan().underline(this.inactive),t0.gray("/"),this.value?t0.cyan().underline(this.active):this.active].join(" "),this.out.write(R5.line+e9.to(0)+this.outputText)}}Q8.exports=J8});var u=E(($X,X8)=>{class e0{constructor({token:U,date:Z,parts:J,locales:Q}){this.token=U,this.date=Z||new Date,this.parts=J||[this],this.locales=Q||{}}up(){}down(){}next(){const U=this.parts.indexOf(this);return this.parts.find((Z,J)=>J>U&&Z instanceof e0)}setTo(U){}prev(){let U=[].concat(this.parts).reverse();const Z=U.indexOf(this);return U.find((J,Q)=>Q>Z&&J instanceof e0)}toString(){return String(this.date)}}X8.exports=e0});var D8=E((NX,Y8)=>{var W5=u();class z8 extends W5{constructor(U={}){super(U)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let U=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?U.toUpperCase():U}}Y8.exports=z8});var F8=E((OX,E8)=>{var $5=u(),N5=(U)=>{return U=U%10,U===1?"st":U===2?"nd":U===3?"rd":"th"};class G8 extends $5{constructor(U={}){super(U)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(U){this.date.setDate(parseInt(U.substr(-2)))}toString(){let U=this.date.getDate(),Z=this.date.getDay();return this.token==="DD"?String(U).padStart(2,"0"):this.token==="Do"?U+N5(U):this.token==="d"?Z+1:this.token==="ddd"?this.locales.weekdaysShort[Z]:this.token==="dddd"?this.locales.weekdays[Z]:U}}E8.exports=G8});var B8=E((TX,V8)=>{var O5=u();class H8 extends O5{constructor(U={}){super(U)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(U){this.date.setHours(parseInt(U.substr(-2)))}toString(){let U=this.date.getHours();if(/h/.test(this.token))U=U%12||12;return this.token.length>1?String(U).padStart(2,"0"):U}}V8.exports=H8});var W8=E((IX,R8)=>{var T5=u();class M8 extends T5{constructor(U={}){super(U)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(U){this.date.setMilliseconds(parseInt(U.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}R8.exports=M8});var O8=E((SX,N8)=>{var I5=u();class $8 extends I5{constructor(U={}){super(U)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(U){this.date.setMinutes(parseInt(U.substr(-2)))}toString(){let U=this.date.getMinutes();return this.token.length>1?String(U).padStart(2,"0"):U}}N8.exports=$8});var S8=E((LX,I8)=>{var S5=u();class T8 extends S5{constructor(U={}){super(U)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(U){U=parseInt(U.substr(-2))-1,this.date.setMonth(U<0?0:U)}toString(){let U=this.date.getMonth(),Z=this.token.length;return Z===2?String(U+1).padStart(2,"0"):Z===3?this.locales.monthsShort[U]:Z===4?this.locales.months[U]:String(U+1)}}I8.exports=T8});var q8=E((AX,A8)=>{var L5=u();class L8 extends L5{constructor(U={}){super(U)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(U){this.date.setSeconds(parseInt(U.substr(-2)))}toString(){let U=this.date.getSeconds();return this.token.length>1?String(U).padStart(2,"0"):U}}A8.exports=L8});var C8=E((qX,j8)=>{var A5=u();class P8 extends A5{constructor(U={}){super(U)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(U){this.date.setFullYear(U.substr(-4))}toString(){let U=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?U.substr(-2):U}}j8.exports=P8});var w8=E((PX,_8)=>{_8.exports={DatePart:u(),Meridiem:D8(),Day:F8(),Hours:B8(),Milliseconds:W8(),Minutes:O8(),Month:S8(),Seconds:q8(),Year:C8()}});var d8=E((jX,u8)=>{var f8=function(U,Z,J,Q,K,X,z){try{var D=U[X](z),G=D.value}catch(Y){J(Y);return}if(D.done)Z(G);else Promise.resolve(G).then(Q,K)},k8=function(U){return function(){var Z=this,J=arguments;return new Promise(function(Q,K){var X=U.apply(Z,J);function z(G){f8(X,Q,K,z,D,"next",G)}function D(G){f8(X,Q,K,z,D,"throw",G)}z(void 0)})}},k1=A(),q5=o(),b1=y(),b8=b1.style,h8=b1.clear,P5=b1.figures,g8=P(),j5=g8.erase,v8=g8.cursor,e=w8(),x8=e.DatePart,C5=e.Meridiem,_5=e.Day,w5=e.Hours,f5=e.Milliseconds,k5=e.Minutes,b5=e.Month,h5=e.Seconds,v5=e.Year,x5=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,y8={1:({token:U})=>U.replace(/\\(.)/g,"$1"),2:(U)=>new _5(U),3:(U)=>new b5(U),4:(U)=>new v5(U),5:(U)=>new C5(U),6:(U)=>new w5(U),7:(U)=>new k5(U),8:(U)=>new h5(U),9:(U)=>new f5(U)},y5={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 m8 extends q5{constructor(U={}){super(U);this.msg=U.message,this.cursor=0,this.typed="",this.locales=Object.assign(y5,U.locales),this._date=U.initial||new Date,this.errorMsg=U.error||"Please Enter A Valid Value",this.validator=U.validate||(()=>!0),this.mask=U.mask||"YYYY-MM-DD HH:mm:ss",this.clear=h8("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(U){if(U)this._date.setTime(U.getTime())}set mask(U){let Z;this.parts=[];while(Z=x5.exec(U)){let Q=Z.shift(),K=Z.findIndex((X)=>X!=null);this.parts.push(K in y8?y8[K]({token:Z[K]||Q,date:this.date,parts:this.parts,locales:this.locales}):Z[K]||Q)}let J=this.parts.reduce((Q,K)=>{if(typeof K==="string"&&typeof Q[Q.length-1]==="string")Q[Q.length-1]+=K;else Q.push(K);return Q},[]);this.parts.splice(0),this.parts.push(...J),this.reset()}moveCursor(U){this.typed="",this.cursor=U,this.fire()}reset(){this.moveCursor(this.parts.findIndex((U)=>U instanceof x8)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var U=this;return k8(function*(){let Z=yield U.validator(U.value);if(typeof Z==="string")U.errorMsg=Z,Z=!1;U.error=!Z})()}submit(){var U=this;return k8(function*(){if(yield U.validate(),U.error){U.color="red",U.fire(),U.render();return}U.done=!0,U.aborted=!1,U.fire(),U.render(),U.out.write("\n"),U.close()})()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let U=this.parts[this.cursor].prev();if(U==null)return this.bell();this.moveCursor(this.parts.indexOf(U)),this.render()}right(){let U=this.parts[this.cursor].next();if(U==null)return this.bell();this.moveCursor(this.parts.indexOf(U)),this.render()}next(){let U=this.parts[this.cursor].next();this.moveCursor(U?this.parts.indexOf(U):this.parts.findIndex((Z)=>Z instanceof x8)),this.render()}_(U){if(/\d/.test(U))this.typed+=U,this.parts[this.cursor].setTo(this.typed),this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(v8.hide);else this.out.write(h8(this.outputText,this.out.columns));if(super.render(),this.outputText=[b8.symbol(this.done,this.aborted),k1.bold(this.msg),b8.delimiter(!1),this.parts.reduce((U,Z,J)=>U.concat(J===this.cursor&&!this.done?k1.cyan().underline(Z.toString()):Z),[]).join("")].join(" "),this.error)this.outputText+=this.errorMsg.split("\n").reduce((U,Z,J)=>U+`\n${J?" ":P5.pointerSmall} ${k1.red().italic(Z)}`,"");this.out.write(j5.line+v8.to(0)+this.outputText)}}u8.exports=m8});var r8=E((CX,s8)=>{var c8=function(U,Z,J,Q,K,X,z){try{var D=U[X](z),G=D.value}catch(Y){J(Y);return}if(D.done)Z(G);else Promise.resolve(G).then(Q,K)},p8=function(U){return function(){var Z=this,J=arguments;return new Promise(function(Q,K){var X=U.apply(Z,J);function z(G){c8(X,Q,K,z,D,"next",G)}function D(G){c8(X,Q,K,z,D,"throw",G)}z(void 0)})}},U1=A(),g5=o(),i8=P(),Z1=i8.cursor,m5=i8.erase,J1=y(),h1=J1.style,u5=J1.figures,n8=J1.clear,d5=J1.lines,c5=/[0-9]/,v1=(U)=>U!==void 0,a8=(U,Z)=>{let J=Math.pow(10,Z);return Math.round(U*J)/J};class l8 extends g5{constructor(U={}){super(U);this.transform=h1.render(U.style),this.msg=U.message,this.initial=v1(U.initial)?U.initial:"",this.float=!!U.float,this.round=U.round||2,this.inc=U.increment||1,this.min=v1(U.min)?U.min:(-Infinity),this.max=v1(U.max)?U.max:Infinity,this.errorMsg=U.error||"Please Enter A Valid Value",this.validator=U.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(U){if(!U&&U!==0)this.placeholder=!0,this.rendered=U1.gray(this.transform.render(`${this.initial}`)),this._value="";else this.placeholder=!1,this.rendered=this.transform.render(`${a8(U,this.round)}`),this._value=a8(U,this.round);this.fire()}get value(){return this._value}parse(U){return this.float?parseFloat(U):parseInt(U)}valid(U){return U==="-"||U==="."&&this.float||c5.test(U)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let U=this.value;this.value=U!==""?U:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var U=this;return p8(function*(){let Z=yield U.validator(U.value);if(typeof Z==="string")U.errorMsg=Z,Z=!1;U.error=!Z})()}submit(){var U=this;return p8(function*(){if(yield U.validate(),U.error){U.color="red",U.fire(),U.render();return}let Z=U.value;U.value=Z!==""?Z:U.initial,U.done=!0,U.aborted=!1,U.error=!1,U.fire(),U.render(),U.out.write("\n"),U.close()})()}up(){if(this.typed="",this.value==="")this.value=this.min-this.inc;if(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;if(this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let U=this.value.toString();if(U.length===0)return this.bell();if(this.value=this.parse(U=U.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()}_(U,Z){if(!this.valid(U))return this.bell();const J=Date.now();if(J-this.lastHit>1000)this.typed="";if(this.typed+=U,this.lastHit=J,this.color="cyan",U===".")return this.fire();if(this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire(),this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(Z1.down(d5(this.outputError,this.out.columns)-1)+n8(this.outputError,this.out.columns));this.out.write(n8(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[h1.symbol(this.done,this.aborted),U1.bold(this.msg),h1.delimiter(this.done),!this.done||!this.done&&!this.placeholder?U1[this.color]().underline(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split("\n").reduce((U,Z,J)=>U+`\n${J?" ":u5.pointerSmall} ${U1.red().italic(Z)}`,"");this.out.write(m5.line+Z1.to(0)+this.outputText+Z1.save+this.outputError+Z1.restore)}}s8.exports=l8});var x1=E((_X,U7)=>{var d=A(),p5=P(),n5=p5.cursor,a5=o(),k0=y(),o8=k0.clear,X0=k0.figures,t8=k0.style,i5=k0.wrap,l5=k0.entriesToDisplay;class e8 extends a5{constructor(U={}){super(U);if(this.msg=U.message,this.cursor=U.cursor||0,this.scrollIndex=U.cursor||0,this.hint=U.hint||"",this.warn=U.warn||"- This option is disabled -",this.minSelected=U.min,this.showMinError=!1,this.maxChoices=U.max,this.instructions=U.instructions,this.optionsPerPage=U.optionsPerPage||10,this.value=U.choices.map((Z,J)=>{if(typeof Z==="string")Z={title:Z,value:J};return{title:Z&&(Z.title||Z.value||Z),description:Z&&Z.description,value:Z&&(Z.value===void 0?J:Z.value),selected:Z&&Z.selected,disabled:Z&&Z.disabled}}),this.clear=o8("",this.out.columns),!U.overrideRender)this.render()}reset(){this.value.map((U)=>!U.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((U)=>U.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){const U=this.value.filter((Z)=>Z.selected);if(this.minSelected&&U.length<this.minSelected)this.showMinError=!0,this.render();else this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),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(){if(this.cursor===0)this.cursor=this.value.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.value.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((U)=>U.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const U=this.value[this.cursor];if(U.selected)U.selected=!1,this.render();else if(U.disabled||this.value.filter((Z)=>Z.selected).length>=this.maxChoices)return this.bell();else U.selected=!0,this.render()}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();const U=!this.value[this.cursor].selected;this.value.filter((Z)=>!Z.disabled).forEach((Z)=>Z.selected=U),this.render()}_(U,Z){if(U===" ")this.handleSpaceToggle();else if(U==="a")this.toggleAll();else return this.bell()}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return"\nInstructions:\n"+` ${X0.arrowUp}/${X0.arrowDown}: Highlight option\n`+` ${X0.arrowLeft}/${X0.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===void 0?" a: Toggle all\n":"")+" enter/return: Complete answer"}return""}renderOption(U,Z,J,Q){const K=(Z.selected?d.green(X0.radioOn):X0.radioOff)+" "+Q+" ";let X,z;if(Z.disabled)X=U===J?d.gray().underline(Z.title):d.strikethrough().gray(Z.title);else if(X=U===J?d.cyan().underline(Z.title):Z.title,U===J&&Z.description){if(z=` - ${Z.description}`,K.length+X.length+z.length>=this.out.columns||Z.description.split(/\r?\n/).length>1)z="\n"+i5(Z.description,{margin:K.length,width:this.out.columns})}return K+X+d.gray(z||"")}paginateOptions(U){if(U.length===0)return d.red("No matches for this query.");let Z=l5(this.cursor,U.length,this.optionsPerPage),J=Z.startIndex,Q=Z.endIndex,K,X=[];for(let z=J;z<Q;z++){if(z===J&&J>0)K=X0.arrowUp;else if(z===Q-1&&Q<U.length)K=X0.arrowDown;else K=" ";X.push(this.renderOption(this.cursor,U[z],z,K))}return"\n"+X.join("\n")}renderOptions(U){if(!this.done)return this.paginateOptions(U);return""}renderDoneOrInstructions(){if(this.done)return this.value.filter((Z)=>Z.selected).map((Z)=>Z.title).join(", ");const U=[d.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled)U.push(d.yellow(this.warn));return U.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(n5.hide);super.render();let U=[t8.symbol(this.done,this.aborted),d.bold(this.msg),t8.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)U+=d.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;U+=this.renderOptions(this.value),this.out.write(this.clear+U),this.clear=o8(U,this.out.columns)}}U7.exports=e8});var D7=E((wX,Y7)=>{var Z7=function(U,Z,J,Q,K,X,z){try{var D=U[X](z),G=D.value}catch(Y){J(Y);return}if(D.done)Z(G);else Promise.resolve(G).then(Q,K)},s5=function(U){return function(){var Z=this,J=arguments;return new Promise(function(Q,K){var X=U.apply(Z,J);function z(G){Z7(X,Q,K,z,D,"next",G)}function D(G){Z7(X,Q,K,z,D,"throw",G)}z(void 0)})}},b0=A(),r5=o(),X7=P(),o5=X7.erase,J7=X7.cursor,h0=y(),y1=h0.style,Q7=h0.clear,g1=h0.figures,t5=h0.wrap,e5=h0.entriesToDisplay,K7=(U,Z)=>U[Z]&&(U[Z].value||U[Z].title||U[Z]),UJ=(U,Z)=>U[Z]&&(U[Z].title||U[Z].value||U[Z]),ZJ=(U,Z)=>{const J=U.findIndex((Q)=>Q.value===Z||Q.title===Z);return J>-1?J:void 0};class z7 extends r5{constructor(U={}){super(U);this.msg=U.message,this.suggest=U.suggest,this.choices=U.choices,this.initial=typeof U.initial==="number"?U.initial:ZJ(U.choices,U.initial),this.select=this.initial||U.cursor||0,this.i18n={noMatches:U.noMatches||"no matches found"},this.fallback=U.fallback||this.initial,this.clearFirst=U.clearFirst||!1,this.suggestions=[],this.input="",this.limit=U.limit||10,this.cursor=0,this.transform=y1.render(U.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=Q7("",this.out.columns),this.complete(this.render),this.render()}set fallback(U){this._fb=Number.isSafeInteger(parseInt(U))?parseInt(U):U}get fallback(){let U;if(typeof this._fb==="number")U=this.choices[this._fb];else if(typeof this._fb==="string")U={title:this._fb};return U||this._fb||{title:this.i18n.noMatches}}moveSelect(U){if(this.select=U,this.suggestions.length>0)this.value=K7(this.suggestions,U);else this.value=this.fallback.value;this.fire()}complete(U){var Z=this;return s5(function*(){const J=Z.completing=Z.suggest(Z.input,Z.choices),Q=yield J;if(Z.completing!==J)return;Z.suggestions=Q.map((X,z,D)=>({title:UJ(D,z),value:K7(D,z),description:X.description})),Z.completing=!1;const K=Math.max(Q.length-1,0);Z.moveSelect(Math.min(K,Z.select)),U&&U()})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){if(this.clearFirst&&this.input.length>0)this.reset();else this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(U,Z){let J=this.input.slice(0,this.cursor),Q=this.input.slice(this.cursor);this.input=`${J}${U}${Q}`,this.cursor=J.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let U=this.input.slice(0,this.cursor-1),Z=this.input.slice(this.cursor);this.input=`${U}${Z}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let U=this.input.slice(0,this.cursor),Z=this.input.slice(this.cursor+1);this.input=`${U}${Z}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){if(this.select===0)this.moveSelect(this.suggestions.length-1);else this.moveSelect(this.select-1);this.render()}down(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else 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(U,Z,J,Q){let K,X=J?g1.arrowUp:Q?g1.arrowDown:" ",z=Z?b0.cyan().underline(U.title):U.title;if(X=(Z?b0.cyan(g1.pointer)+" ":" ")+X,U.description){if(K=` - ${U.description}`,X.length+z.length+K.length>=this.out.columns||U.description.split(/\r?\n/).length>1)K="\n"+t5(U.description,{margin:3,width:this.out.columns})}return X+" "+z+b0.gray(K||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(J7.hide);else this.out.write(Q7(this.outputText,this.out.columns));super.render();let U=e5(this.select,this.choices.length,this.limit),Z=U.startIndex,J=U.endIndex;if(this.outputText=[y1.symbol(this.done,this.aborted,this.exited),b0.bold(this.msg),y1.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const Q=this.suggestions.slice(Z,J).map((K,X)=>this.renderOption(K,this.select===X+Z,X===0&&Z>0,X+Z===J-1&&J<this.choices.length)).join("\n");this.outputText+="\n"+(Q||b0.gray(this.fallback.title))}this.out.write(o5.line+J7.to(0)+this.outputText)}}Y7.exports=z7});var V7=E((fX,H7)=>{var U0=A(),JJ=P(),QJ=JJ.cursor,KJ=x1(),m1=y(),G7=m1.clear,E7=m1.style,O0=m1.figures;class F7 extends KJ{constructor(U={}){U.overrideRender=!0;super(U);this.inputValue="",this.clear=G7("",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(){if(this.cursor===0)this.cursor=this.filteredOptions.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.filteredOptions.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((U)=>U.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){if(this.inputValue.length)this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions()}updateFilteredOptions(){const U=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((J)=>{if(this.inputValue){if(typeof J.title==="string"){if(J.title.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}if(typeof J.value==="string"){if(J.value.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}return!1}return!0});const Z=this.filteredOptions.findIndex((J)=>J===U);this.cursor=Z<0?0:Z,this.render()}handleSpaceToggle(){const U=this.filteredOptions[this.cursor];if(U.selected)U.selected=!1,this.render();else if(U.disabled||this.value.filter((Z)=>Z.selected).length>=this.maxChoices)return this.bell();else U.selected=!0,this.render()}handleInputChange(U){this.inputValue=this.inputValue+U,this.updateFilteredOptions()}_(U,Z){if(U===" ")this.handleSpaceToggle();else this.handleInputChange(U)}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return`
|
|
2
|
+
var mU=Object.create;var{defineProperty:Z6,getPrototypeOf:uU,getOwnPropertyNames:dU}=Object;var cU=Object.prototype.hasOwnProperty;var u0=(U,Z,J)=>{J=U!=null?mU(uU(U)):{};const Q=Z||!U||!U.__esModule?Z6(J,"default",{value:U,enumerable:!0}):J;for(let K of dU(U))if(!cU.call(Q,K))Z6(Q,K,{get:()=>U[K],enumerable:!0});return Q};var E=(U,Z)=>()=>(Z||U((Z={exports:{}}).exports,Z),Z.exports);var F0=(U)=>{return import.meta.require(U)};var R1=E((UK,J6)=>{var A0=function(U,{argv:Z=process.argv.slice(2),permissive:J=!1,stopAtPositional:Q=!1}={}){if(!U)throw new v("argument specification object is required","ARG_CONFIG_NO_SPEC");const K={_:[]},X={},Y={};for(let z of Object.keys(U)){if(!z)throw new v("argument key cannot be an empty string","ARG_CONFIG_EMPTY_KEY");if(z[0]!=="-")throw new v(`argument key must start with '-' but found: '${z}'`,"ARG_CONFIG_NONOPT_KEY");if(z.length===1)throw new v(`argument key must have a name; singular '-' keys are not allowed: ${z}`,"ARG_CONFIG_NONAME_KEY");if(typeof U[z]==="string"){X[z]=U[z];continue}let G=U[z],D=!1;if(Array.isArray(G)&&G.length===1&&typeof G[0]==="function"){const[F]=G;G=(I,N,H=[])=>{return H.push(F(I,N,H[H.length-1])),H},D=F===Boolean||F[F1]===!0}else if(typeof G==="function")D=G===Boolean||G[F1]===!0;else throw new v(`type missing or not a function or valid array type: ${z}`,"ARG_CONFIG_VAD_TYPE");if(z[1]!=="-"&&z.length>2)throw new v(`short argument keys (with a single hyphen) must have only one character: ${z}`,"ARG_CONFIG_SHORTOPT_TOOLONG");Y[z]=[G,D]}for(let z=0,G=Z.length;z<G;z++){const D=Z[z];if(Q&&K._.length>0){K._=K._.concat(Z.slice(z));break}if(D==="--"){K._=K._.concat(Z.slice(z+1));break}if(D.length>1&&D[0]==="-"){const F=D[1]==="-"||D.length===2?[D]:D.slice(1).split("").map((I)=>`-${I}`);for(let I=0;I<F.length;I++){const N=F[I],[H,V]=N[1]==="-"?N.split(/=(.*)/,2):[N,void 0];let B=H;while(B in X)B=X[B];if(!(B in Y))if(J){K._.push(N);continue}else throw new v(`unknown or unexpected option: ${H}`,"ARG_UNKNOWN_OPTION");const[M,R]=Y[B];if(!R&&I+1<F.length)throw new v(`option requires argument (but was followed by another short argument): ${H}`,"ARG_MISSING_REQUIRED_SHORTARG");if(R)K[B]=M(!0,B,K[B]);else if(V===void 0){if(Z.length<z+2||Z[z+1].length>1&&Z[z+1][0]==="-"&&!(Z[z+1].match(/^-?\d*(\.(?=\d))?\d*$/)&&(M===Number||typeof BigInt!=="undefined"&&M===BigInt))){const W=H===B?"":` (alias for ${B})`;throw new v(`option requires argument: ${H}${W}`,"ARG_MISSING_REQUIRED_LONGARG")}K[B]=M(Z[z+1],B,K[B]),++z}else K[B]=M(V,B,K[B])}}else K._.push(D)}return K},F1=Symbol("arg flag");class v extends Error{constructor(U,Z){super(U);this.name="ArgError",this.code=Z,Object.setPrototypeOf(this,v.prototype)}}A0.flag=(U)=>{return U[F1]=!0,U};A0.COUNT=A0.flag((U,Z,J)=>(J||0)+1);A0.ArgError=v;J6.exports=A0});var c0=E((gK,W6)=>{var W1=[],R6=0,_=(U,Z)=>{if(R6>=Z)W1.push(U)};_.WARN=1;_.INFO=2;_.DEBUG=3;_.reset=()=>{W1=[]};_.setDebugLevel=(U)=>{R6=U};_.warn=(U)=>_(U,_.WARN);_.info=(U)=>_(U,_.INFO);_.debug=(U)=>_(U,_.DEBUG);_.debugMessages=()=>W1;W6.exports=_});var N6=E((mK,$6)=>{$6.exports=({onlyFirst:U=!1}={})=>{const Z=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(Z,U?void 0:"g")}});var I6=E((uK,O6)=>{var ZZ=N6();O6.exports=(U)=>typeof U==="string"?U.replace(ZZ(),""):U});var L6=E((dK,$1)=>{var T6=(U)=>{if(Number.isNaN(U))return!1;if(U>=4352&&(U<=4447||U===9001||U===9002||11904<=U&&U<=12871&&U!==12351||12880<=U&&U<=19903||19968<=U&&U<=42182||43360<=U&&U<=43388||44032<=U&&U<=55203||63744<=U&&U<=64255||65040<=U&&U<=65049||65072<=U&&U<=65131||65281<=U&&U<=65376||65504<=U&&U<=65510||110592<=U&&U<=110593||127488<=U&&U<=127569||131072<=U&&U<=262141))return!0;return!1};$1.exports=T6;$1.exports.default=T6});var A6=E((cK,S6)=>{S6.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var P6=E((pK,N1)=>{var JZ=I6(),QZ=L6(),KZ=A6(),q6=(U)=>{if(typeof U!=="string"||U.length===0)return 0;if(U=JZ(U),U.length===0)return 0;U=U.replace(KZ()," ");let Z=0;for(let J=0;J<U.length;J++){const Q=U.codePointAt(J);if(Q<=31||Q>=127&&Q<=159)continue;if(Q>=768&&Q<=879)continue;if(Q>65535)J++;Z+=QZ(Q)?2:1}return Z};N1.exports=q6;N1.exports.default=q6});var O1=E((nK,w6)=>{var p0=function(U){return U?/\u001b\[((?:\d*;){0,5}\d*)m/g:/\u001b\[(?:\d*;){0,5}\d*m/g},m=function(U){let Z=p0();return(""+U).replace(Z,"").split("\n").reduce(function(K,X){return j6(X)>K?j6(X):K},0)},q0=function(U,Z){return Array(Z+1).join(U)},XZ=function(U,Z,J,Q){let K=m(U);if(Z+1>=K){let X=Z-K;switch(Q){case"right":{U=q0(J,X)+U;break}case"center":{let Y=Math.ceil(X/2),z=X-Y;U=q0(J,z)+U+q0(J,Y);break}default:{U=U+q0(J,X);break}}}return U},P0=function(U,Z,J){Z="\x1B["+Z+"m",J="\x1B["+J+"m",W0[Z]={set:U,to:!0},W0[J]={set:U,to:!1},W0[U]={on:Z,off:J}},C6=function(U,Z){let J=Z[1]?parseInt(Z[1].split(";")[0]):0;if(J>=30&&J<=39||J>=90&&J<=97){U.lastForegroundAdded=Z[0];return}if(J>=40&&J<=49||J>=100&&J<=107){U.lastBackgroundAdded=Z[0];return}if(J===0){for(let K in U)if(Object.prototype.hasOwnProperty.call(U,K))delete U[K];return}let Q=W0[Z[0]];if(Q)U[Q.set]=Q.to},YZ=function(U){let Z=p0(!0),J=Z.exec(U),Q={};while(J!==null)C6(Q,J),J=Z.exec(U);return Q},_6=function(U,Z){let{lastBackgroundAdded:J,lastForegroundAdded:Q}=U;if(delete U.lastBackgroundAdded,delete U.lastForegroundAdded,Object.keys(U).forEach(function(K){if(U[K])Z+=W0[K].off}),J&&J!="\x1B[49m")Z+="\x1B[49m";if(Q&&Q!="\x1B[39m")Z+="\x1B[39m";return Z},DZ=function(U,Z){let{lastBackgroundAdded:J,lastForegroundAdded:Q}=U;if(delete U.lastBackgroundAdded,delete U.lastForegroundAdded,Object.keys(U).forEach(function(K){if(U[K])Z=W0[K].on+Z}),J&&J!="\x1B[49m")Z=J+Z;if(Q&&Q!="\x1B[39m")Z=Q+Z;return Z},zZ=function(U,Z){if(U.length===m(U))return U.substr(0,Z);while(m(U)>Z)U=U.slice(0,-1);return U},GZ=function(U,Z){let J=p0(!0),Q=U.split(p0()),K=0,X=0,Y="",z,G={};while(X<Z){z=J.exec(U);let D=Q[K];if(K++,X+m(D)>Z)D=zZ(D,Z-X);if(Y+=D,X+=m(D),X<Z){if(!z)break;Y+=z[0],C6(G,z)}}return _6(G,Y)},EZ=function(U,Z,J){if(J=J||"\u2026",m(U)<=Z)return U;return Z-=m(J),GZ(U,Z)+J},HZ=function(){return{chars:{top:"\u2500","top-mid":"\u252C","top-left":"\u250C","top-right":"\u2510",bottom:"\u2500","bottom-mid":"\u2534","bottom-left":"\u2514","bottom-right":"\u2518",left:"\u2502","left-mid":"\u251C",mid:"\u2500","mid-mid":"\u253C",right:"\u2502","right-mid":"\u2524",middle:"\u2502"},truncate:"\u2026",colWidths:[],rowHeights:[],colAligns:[],rowAligns:[],style:{"padding-left":1,"padding-right":1,head:["red"],border:["grey"],compact:!1},head:[]}},VZ=function(U,Z){U=U||{},Z=Z||HZ();let J=Object.assign({},Z,U);return J.chars=Object.assign({},Z.chars,U.chars),J.style=Object.assign({},Z.style,U.style),J},BZ=function(U,Z){let J=[],Q=Z.split(/(\s+)/g),K=[],X=0,Y;for(let z=0;z<Q.length;z+=2){let G=Q[z],D=X+m(G);if(X>0&&Y)D+=Y.length;if(D>U){if(X!==0)J.push(K.join(""));K=[G],X=m(G)}else K.push(Y||"",G),X=D;Y=Q[z+1]}if(X)J.push(K.join(""));return J},MZ=function(U,Z){let J=[],Q="";function K(Y,z){if(Q.length&&z)Q+=z;Q+=Y;while(Q.length>U)J.push(Q.slice(0,U)),Q=Q.slice(U)}let X=Z.split(/(\s+)/g);for(let Y=0;Y<X.length;Y+=2)K(X[Y],Y&&X[Y-1]);if(Q.length)J.push(Q);return J},FZ=function(U,Z,J=!0){let Q=[];Z=Z.split("\n");const K=J?BZ:MZ;for(let X=0;X<Z.length;X++)Q.push.apply(Q,K(U,Z[X]));return Q},RZ=function(U){let Z={},J=[];for(let Q=0;Q<U.length;Q++){let K=DZ(Z,U[Q]);Z=YZ(K);let X=Object.assign({},Z);J.push(_6(X,K))}return J},WZ=function(U,Z){return["\x1B]","8",";",";",U||Z,"\x07",Z,"\x1B]","8",";",";","\x07"].join("")},j6=P6(),W0={};P0("bold",1,22);P0("italics",3,23);P0("underline",4,24);P0("inverse",7,27);P0("strikethrough",9,29);w6.exports={strlen:m,repeat:q0,pad:XZ,truncate:EZ,mergeOptions:VZ,wordWrap:FZ,colorizeLines:RZ,hyperlink:WZ}});var h6=E((aK,b6)=>{var k6={};b6.exports=k6;var f6={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(f6).forEach(function(U){var Z=f6[U],J=k6[U]=[];J.open="\x1B["+Z[0]+"m",J.close="\x1B["+Z[1]+"m"})});var x6=E((lK,v6)=>{v6.exports=function(U,Z){Z=Z||process.argv;var J=Z.indexOf("--"),Q=/^-{1,2}/.test(U)?"":"--",K=Z.indexOf(Q+U);return K!==-1&&(J===-1?!0:K<J)}});var g6=E((iK,y6)=>{var NZ=function(U){if(U===0)return!1;return{level:U,hasBasic:!0,has256:U>=2,has16m:U>=3}},OZ=function(U){if($0===!1)return 0;if(x("color=16m")||x("color=full")||x("color=truecolor"))return 3;if(x("color=256"))return 2;if(U&&!U.isTTY&&$0!==!0)return 0;var Z=$0?1:0;if(process.platform==="win32"){var J=$Z.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(J[0])>=10&&Number(J[2])>=10586)return Number(J[2])>=14931?3:2;return 1}if("CI"in w){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(K){return K in w})||w.CI_NAME==="codeship")return 1;return Z}if("TEAMCITY_VERSION"in w)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(w.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in w){var Q=parseInt((w.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(w.TERM_PROGRAM){case"iTerm.app":return Q>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(w.TERM))return 2;if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(w.TERM))return 1;if("COLORTERM"in w)return 1;if(w.TERM==="dumb")return Z;return Z},I1=function(U){var Z=OZ(U);return NZ(Z)},$Z=import.meta.require("os"),x=x6(),w=process.env,$0=void 0;if(x("no-color")||x("no-colors")||x("color=false"))$0=!1;else if(x("color")||x("colors")||x("color=true")||x("color=always"))$0=!0;if("FORCE_COLOR"in w)$0=w.FORCE_COLOR.length===0||parseInt(w.FORCE_COLOR,10)!==0;y6.exports={supportsColor:I1,stdout:I1(process.stdout),stderr:I1(process.stderr)}});var u6=E((sK,m6)=>{m6.exports=function U(Z,J){var Q="";Z=Z||"Run the trap, drop the bass",Z=Z.split("");var K={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return Z.forEach(function(X){X=X.toLowerCase();var Y=K[X]||[" "],z=Math.floor(Math.random()*Y.length);if(typeof K[X]!=="undefined")Q+=K[X][z];else Q+=X}),Q}});var c6=E((rK,d6)=>{d6.exports=function U(Z,J){Z=Z||" he is here ";var Q={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},K=[].concat(Q.up,Q.down,Q.mid);function X(G){var D=Math.floor(Math.random()*G);return D}function Y(G){var D=!1;return K.filter(function(F){D=F===G}),D}function z(G,D){var F="",I,N;D=D||{},D.up=typeof D.up!=="undefined"?D.up:!0,D.mid=typeof D.mid!=="undefined"?D.mid:!0,D.down=typeof D.down!=="undefined"?D.down:!0,D.size=typeof D.size!=="undefined"?D.size:"maxi",G=G.split("");for(N in G){if(Y(N))continue;switch(F=F+G[N],I={up:0,down:0,mid:0},D.size){case"mini":I.up=X(8),I.mid=X(2),I.down=X(8);break;case"maxi":I.up=X(16)+3,I.mid=X(4)+1,I.down=X(64)+3;break;default:I.up=X(8)+1,I.mid=X(6)/2,I.down=X(8)+1;break}var H=["up","mid","down"];for(var V in H){var B=H[V];for(var M=0;M<=I[B];M++)if(D[B])F=F+Q[B][X(Q[B].length)]}}return F}return z(Z,J)}});var n6=E((oK,p6)=>{p6.exports=function(U){return function(Z,J,Q){if(Z===" ")return Z;switch(J%3){case 0:return U.red(Z);case 1:return U.white(Z);case 2:return U.blue(Z)}}}});var l6=E((tK,a6)=>{a6.exports=function(U){return function(Z,J,Q){return J%2===0?Z:U.inverse(Z)}}});var s6=E((eK,i6)=>{i6.exports=function(U){var Z=["red","yellow","green","blue","magenta"];return function(J,Q,K){if(J===" ")return J;else return U[Z[Q++%Z.length]](J)}}});var o6=E((UX,r6)=>{r6.exports=function(U){var Z=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(J,Q,K){return J===" "?J:U[Z[Math.round(Math.random()*(Z.length-2))]](J)}}});var Q9=E((JX,J9)=>{var U9=function(U){var Z=function J(){return qZ.apply(J,arguments)};return Z._styles=U,Z.__proto__=AZ,Z},qZ=function(){var U=Array.prototype.slice.call(arguments),Z=U.map(function(Y){if(Y!=null&&Y.constructor===String)return Y;else return IZ.inspect(Y)}).join(" ");if(!O.enabled||!Z)return Z;var J=Z.indexOf("\n")!=-1,Q=this._styles,K=Q.length;while(K--){var X=H0[Q[K]];if(Z=X.open+Z.replace(X.closeRe,X.open)+X.close,J)Z=Z.replace(TZ,function(Y){return X.close+Y+X.open})}return Z},PZ=function(){var U={};return Object.keys(Z9).forEach(function(Z){U[Z]={get:function(){return U9([Z])}}}),U},O={};J9.exports=O;O.themes={};var IZ=import.meta.require("util"),H0=O.styles=h6(),e6=Object.defineProperties,TZ=new RegExp(/[\r\n]+/g);O.supportsColor=g6().supportsColor;if(typeof O.enabled==="undefined")O.enabled=O.supportsColor()!==!1;O.enable=function(){O.enabled=!0};O.disable=function(){O.enabled=!1};O.stripColors=O.strip=function(U){return(""+U).replace(/\x1B\[\d+m/g,"")};var ZX=O.stylize=function U(Z,J){if(!O.enabled)return Z+"";var Q=H0[J];if(!Q&&J in O)return O[J](Z);return Q.open+Z+Q.close},LZ=/[|\\{}()[\]^$+*?.]/g,SZ=function(U){if(typeof U!=="string")throw new TypeError("Expected a string");return U.replace(LZ,"\\$&")},Z9=function(){var U={};return H0.grey=H0.gray,Object.keys(H0).forEach(function(Z){H0[Z].closeRe=new RegExp(SZ(H0[Z].close),"g"),U[Z]={get:function(){return U9(this._styles.concat(Z))}}}),U}(),AZ=e6(function U(){},Z9);O.setTheme=function(U){if(typeof U==="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller\'s) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + \'/../themes/generic-logging.js\'); The new syntax looks like colors.setTheme(require(__dirname + \'/../themes/generic-logging.js\'));");return}for(var Z in U)(function(J){O[J]=function(Q){if(typeof U[J]==="object"){var K=Q;for(var X in U[J])K=O[U[J][X]](K);return K}return O[U[J]](Q)}})(Z)};var jZ=function U(Z,J){var Q=J.split("");return Q=Q.map(Z),Q.join("")};O.trap=u6();O.zalgo=c6();O.maps={};O.maps.america=n6()(O);O.maps.zebra=l6()(O);O.maps.rainbow=s6()(O);O.maps.random=o6()(O);for(t6 in O.maps)(function(U){O[U]=function(Z){return jZ(O.maps[U],Z)}})(t6);var t6;e6(O,PZ())});var X9=E((QX,K9)=>{var CZ=Q9();K9.exports=CZ});var G9=E((KX,l0)=>{var Y9=function(...U){return U.filter((Z)=>Z!==void 0&&Z!==null).shift()},T1=function(U,Z,J,Q){let K=J.split("-");if(K.length>1)K[1]=K[1].charAt(0).toUpperCase()+K[1].substr(1),K=K.join(""),Q[K]=Y9(U[K],U[J],Z[K],Z[J]);else Q[J]=Y9(U[J],Z[J])},wZ=function(U,Z,J){let Q=U[Z];for(let K=1;K<J;K++)Q+=1+U[Z+K];return Q},D9=function(U,Z){return U+Z+1},{info:_Z,debug:z9}=c0(),h=O1();class j0{constructor(U){this.setOptions(U),this.x=null,this.y=null}setOptions(U){if(["boolean","number","string"].indexOf(typeof U)!==-1)U={content:""+U};U=U||{},this.options=U;let Z=U.content;if(["boolean","number","string"].indexOf(typeof Z)!==-1)this.content=String(Z);else if(!Z)this.content=this.options.href||"";else throw new Error("Content needs to be a primitive, got: "+typeof Z);if(this.colSpan=U.colSpan||1,this.rowSpan=U.rowSpan||1,this.options.href)Object.defineProperty(this,"href",{get(){return this.options.href}})}mergeTableOptions(U,Z){this.cells=Z;let J=this.options.chars||{},Q=U.chars,K=this.chars={};fZ.forEach(function(z){T1(J,Q,z,K)}),this.truncate=this.options.truncate||U.truncate;let X=this.options.style=this.options.style||{},Y=U.style;T1(X,Y,"padding-left",this),T1(X,Y,"padding-right",this),this.head=X.head||Y.head,this.border=X.border||Y.border,this.fixedWidth=U.colWidths[this.x],this.lines=this.computeLines(U),this.desiredWidth=h.strlen(this.content)+this.paddingLeft+this.paddingRight,this.desiredHeight=this.lines.length}computeLines(U){const Z=U.wordWrap||U.textWrap,{wordWrap:J=Z}=this.options;if(this.fixedWidth&&J){if(this.fixedWidth-=this.paddingLeft+this.paddingRight,this.colSpan){let X=1;while(X<this.colSpan)this.fixedWidth+=U.colWidths[this.x+X],X++}const{wrapOnWordBoundary:Q=!0}=U,{wrapOnWordBoundary:K=Q}=this.options;return this.wrapLines(h.wordWrap(this.fixedWidth,this.content,K))}return this.wrapLines(this.content.split("\n"))}wrapLines(U){const Z=h.colorizeLines(U);if(this.href)return Z.map((J)=>h.hyperlink(this.href,J));return Z}init(U){let Z=this.x,J=this.y;this.widths=U.colWidths.slice(Z,Z+this.colSpan),this.heights=U.rowHeights.slice(J,J+this.rowSpan),this.width=this.widths.reduce(D9,-1),this.height=this.heights.reduce(D9,-1),this.hAlign=this.options.hAlign||U.colAligns[Z],this.vAlign=this.options.vAlign||U.rowAligns[J],this.drawRight=Z+this.colSpan==U.colWidths.length}draw(U,Z){if(U=="top")return this.drawTop(this.drawRight);if(U=="bottom")return this.drawBottom(this.drawRight);let J=h.truncate(this.content,10,this.truncate);if(!U)_Z(`${this.y}-${this.x}: ${this.rowSpan-U}x${this.colSpan} Cell ${J}`);let Q=Math.max(this.height-this.lines.length,0),K;switch(this.vAlign){case"center":K=Math.ceil(Q/2);break;case"bottom":K=Q;break;default:K=0}if(U<K||U>=K+this.lines.length)return this.drawEmpty(this.drawRight,Z);let X=this.lines.length>this.height&&U+1>=this.height;return this.drawLine(U-K,this.drawRight,X,Z)}drawTop(U){let Z=[];if(this.cells)this.widths.forEach(function(J,Q){Z.push(this._topLeftChar(Q)),Z.push(h.repeat(this.chars[this.y==0?"top":"mid"],J))},this);else Z.push(this._topLeftChar(0)),Z.push(h.repeat(this.chars[this.y==0?"top":"mid"],this.width));if(U)Z.push(this.chars[this.y==0?"topRight":"rightMid"]);return this.wrapWithStyleColors("border",Z.join(""))}_topLeftChar(U){let Z=this.x+U,J;if(this.y==0)J=Z==0?"topLeft":U==0?"topMid":"top";else if(Z==0)J="leftMid";else if(J=U==0?"midMid":"bottomMid",this.cells){if(this.cells[this.y-1][Z]instanceof j0.ColSpanCell)J=U==0?"topMid":"mid";if(U==0){let K=1;while(this.cells[this.y][Z-K]instanceof j0.ColSpanCell)K++;if(this.cells[this.y][Z-K]instanceof j0.RowSpanCell)J="leftMid"}}return this.chars[J]}wrapWithStyleColors(U,Z){if(this[U]&&this[U].length)try{let J=X9();for(let Q=this[U].length-1;Q>=0;Q--)J=J[this[U][Q]];return J(Z)}catch(J){return Z}else return Z}drawLine(U,Z,J,Q){let K=this.chars[this.x==0?"left":"middle"];if(this.x&&Q&&this.cells){let I=this.cells[this.y+Q][this.x-1];while(I instanceof n0)I=this.cells[I.y][I.x-1];if(!(I instanceof a0))K=this.chars.rightMid}let X=h.repeat(" ",this.paddingLeft),Y=Z?this.chars.right:"",z=h.repeat(" ",this.paddingRight),G=this.lines[U],D=this.width-(this.paddingLeft+this.paddingRight);if(J)G+=this.truncate||"\u2026";let F=h.truncate(G,D,this.truncate);return F=h.pad(F,D," ",this.hAlign),F=X+F+z,this.stylizeLine(K,F,Y)}stylizeLine(U,Z,J){if(U=this.wrapWithStyleColors("border",U),J=this.wrapWithStyleColors("border",J),this.y===0)Z=this.wrapWithStyleColors("head",Z);return U+Z+J}drawBottom(U){let Z=this.chars[this.x==0?"bottomLeft":"bottomMid"],J=h.repeat(this.chars.bottom,this.width),Q=U?this.chars.bottomRight:"";return this.wrapWithStyleColors("border",Z+J+Q)}drawEmpty(U,Z){let J=this.chars[this.x==0?"left":"middle"];if(this.x&&Z&&this.cells){let X=this.cells[this.y+Z][this.x-1];while(X instanceof n0)X=this.cells[X.y][X.x-1];if(!(X instanceof a0))J=this.chars.rightMid}let Q=U?this.chars.right:"",K=h.repeat(" ",this.width);return this.stylizeLine(J,K,Q)}}class n0{constructor(){}draw(U){if(typeof U==="number")z9(`${this.y}-${this.x}: 1x1 ColSpanCell`);return""}init(){}mergeTableOptions(){}}class a0{constructor(U){this.originalCell=U}init(U){let Z=this.y,J=this.originalCell.y;this.cellOffset=Z-J,this.offset=wZ(U.rowHeights,J,this.cellOffset)}draw(U){if(U=="top")return this.originalCell.draw(this.offset,this.cellOffset);if(U=="bottom")return this.originalCell.draw("bottom");return z9(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`),this.originalCell.draw(this.offset+1+U)}mergeTableOptions(){}}var fZ=["top","top-mid","top-left","top-right","bottom","bottom-mid","bottom-left","bottom-right","left","left-mid","mid","mid-mid","right","right-mid","middle"];l0.exports=j0;l0.exports.ColSpanCell=n0;l0.exports.RowSpanCell=a0});var V9=E((XX,H9)=>{var E9=function(U,Z,J,Q){return function(K,X){let Y=[],z=[],G={};X.forEach(function(D){D.forEach(function(F){if((F[U]||1)>1)z.push(F);else Y[F[J]]=Math.max(Y[F[J]]||0,F[Z]||0,Q)})}),K.forEach(function(D,F){if(typeof D==="number")Y[F]=D});for(let D=z.length-1;D>=0;D--){let F=z[D],I=F[U],N=F[J],H=Y[N],V=typeof K[N]==="number"?0:1;if(typeof H==="number"){for(let B=1;B<I;B++)if(H+=1+Y[N+B],typeof K[N+B]!=="number")V++}else if(H=Z==="desiredWidth"?F.desiredWidth-1:1,!G[N]||G[N]<H)G[N]=H;if(F[Z]>H){let B=0;while(V>0&&F[Z]>H){if(typeof K[N+B]!=="number"){let M=Math.round((F[Z]-H)/V);H+=M,Y[N+B]+=M,V--}B++}}}Object.assign(K,Y,G);for(let D=0;D<K.length;D++)K[D]=Math.max(Q,K[D]||0)}},{warn:kZ,debug:bZ}=c0(),L1=G9(),{ColSpanCell:hZ,RowSpanCell:vZ}=L1;(function(){function U(H,V){if(H[V]>0)return U(H,V+1);return V}function Z(H){let V={};H.forEach(function(B,M){let R=0;B.forEach(function(W){W.y=M,W.x=M?U(V,R):R;const C=W.rowSpan||1,f=W.colSpan||1;if(C>1)for(let S0=0;S0<f;S0++)V[W.x+S0]=C;R=W.x+f}),Object.keys(V).forEach((W)=>{if(V[W]--,V[W]<1)delete V[W]})})}function J(H){let V=0;return H.forEach(function(B){B.forEach(function(M){V=Math.max(V,M.x+(M.colSpan||1))})}),V}function Q(H){return H.length}function K(H,V){let B=H.y,M=H.y-1+(H.rowSpan||1),R=V.y,W=V.y-1+(V.rowSpan||1),C=!(B>W||R>M),f=H.x,S0=H.x-1+(H.colSpan||1),xU=V.x,yU=V.x-1+(V.colSpan||1),gU=!(f>yU||xU>S0);return C&&gU}function X(H,V,B){let M=Math.min(H.length-1,B),R={x:V,y:B};for(let W=0;W<=M;W++){let C=H[W];for(let f=0;f<C.length;f++)if(K(R,C[f]))return!0}return!1}function Y(H,V,B,M){for(let R=B;R<M;R++)if(X(H,R,V))return!1;return!0}function z(H){H.forEach(function(V,B){V.forEach(function(M){for(let R=1;R<M.rowSpan;R++){let W=new vZ(M);W.x=M.x,W.y=M.y+R,W.colSpan=M.colSpan,D(W,H[B+R])}})})}function G(H){for(let V=H.length-1;V>=0;V--){let B=H[V];for(let M=0;M<B.length;M++){let R=B[M];for(let W=1;W<R.colSpan;W++){let C=new hZ;C.x=R.x+W,C.y=R.y,B.splice(M+1,0,C)}}}}function D(H,V){let B=0;while(B<V.length&&V[B].x<H.x)B++;V.splice(B,0,H)}function F(H){let V=Q(H),B=J(H);bZ(`Max rows: ${V}; Max cols: ${B}`);for(let M=0;M<V;M++)for(let R=0;R<B;R++)if(!X(H,R,M)){let W={x:R,y:M,colSpan:1,rowSpan:1};R++;while(R<B&&!X(H,R,M))W.colSpan++,R++;let C=M+1;while(C<V&&Y(H,C,W.x,W.x+W.colSpan))W.rowSpan++,C++;let f=new L1(W);f.x=W.x,f.y=W.y,kZ(`Missing cell at ${f.y}-${f.x}.`),D(f,H[M])}}function I(H){return H.map(function(V){if(!Array.isArray(V)){let B=Object.keys(V)[0];if(V=V[B],Array.isArray(V))V=V.slice(),V.unshift(B);else V=[B,V]}return V.map(function(B){return new L1(B)})})}function N(H){let V=I(H);return Z(V),F(V),z(V),G(V),V}H9.exports={makeTableLayout:N,layoutTable:Z,addRowSpanCells:z,maxWidth:J,fillInTable:F,computeWidths:E9("colSpan","desiredWidth","x",1),computeHeights:E9("rowSpan","desiredHeight","y",1)}})()});var M9=E((YX,B9)=>{var A1=function(U,Z,J){let Q=[];U.forEach(function(X){Q.push(X.draw(Z))});let K=Q.join("");if(K.length)J.push(K)},i=c0(),xZ=O1(),S1=V9();class q1 extends Array{constructor(U){super();const Z=xZ.mergeOptions(U);if(Object.defineProperty(this,"options",{value:Z,enumerable:Z.debug}),Z.debug){switch(typeof Z.debug){case"boolean":i.setDebugLevel(i.WARN);break;case"number":i.setDebugLevel(Z.debug);break;case"string":i.setDebugLevel(parseInt(Z.debug,10));break;default:i.setDebugLevel(i.WARN),i.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof Z.debug}`)}Object.defineProperty(this,"messages",{get(){return i.debugMessages()}})}}toString(){let U=this,Z=this.options.head&&this.options.head.length;if(Z){if(U=[this.options.head],this.length)U.push.apply(U,this)}else this.options.style.head=[];let J=S1.makeTableLayout(U);J.forEach(function(K){K.forEach(function(X){X.mergeTableOptions(this.options,J)},this)},this),S1.computeWidths(this.options.colWidths,J),S1.computeHeights(this.options.rowHeights,J),J.forEach(function(K){K.forEach(function(X){X.init(this.options)},this)},this);let Q=[];for(let K=0;K<J.length;K++){let X=J[K],Y=this.options.rowHeights[K];if(K===0||!this.options.style.compact||K==1&&Z)A1(X,"top",Q);for(let z=0;z<Y;z++)A1(X,z,Q);if(K+1==J.length)A1(X,"bottom",Q)}return Q.join("\n")}get width(){return this.toString().split("\n")[0].length}}q1.reset=()=>i.reset();B9.exports=q1});var A=E((BX,W9)=>{var R9=function(U,Z){let J=0,Q,K="",X="";for(;J<U.length;J++)if(Q=U[J],K+=Q.open,X+=Q.close,Z.includes(Q.close))Z=Z.replace(Q.rgx,Q.close+Q.open);return K+Z+X},cZ=function(U,Z){let J={has:U,keys:Z};return J.reset=T.reset.bind(J),J.bold=T.bold.bind(J),J.dim=T.dim.bind(J),J.italic=T.italic.bind(J),J.underline=T.underline.bind(J),J.inverse=T.inverse.bind(J),J.hidden=T.hidden.bind(J),J.strikethrough=T.strikethrough.bind(J),J.black=T.black.bind(J),J.red=T.red.bind(J),J.green=T.green.bind(J),J.yellow=T.yellow.bind(J),J.blue=T.blue.bind(J),J.magenta=T.magenta.bind(J),J.cyan=T.cyan.bind(J),J.white=T.white.bind(J),J.gray=T.gray.bind(J),J.grey=T.grey.bind(J),J.bgBlack=T.bgBlack.bind(J),J.bgRed=T.bgRed.bind(J),J.bgGreen=T.bgGreen.bind(J),J.bgYellow=T.bgYellow.bind(J),J.bgBlue=T.bgBlue.bind(J),J.bgMagenta=T.bgMagenta.bind(J),J.bgCyan=T.bgCyan.bind(J),J.bgWhite=T.bgWhite.bind(J),J},S=function(U,Z){let J={open:`\x1B[${U}m`,close:`\x1B[${Z}m`,rgx:new RegExp(`\\x1b\\[${Z}m`,"g")};return function(Q){if(this!==void 0&&this.has!==void 0)return this.has.includes(U)||(this.has.push(U),this.keys.push(J)),Q===void 0?this:T.enabled?R9(this.keys,Q+""):Q+"";return Q===void 0?cZ([U],[J]):T.enabled?R9([J],Q+""):Q+""}},{FORCE_COLOR:mZ,NODE_DISABLE_COLORS:uZ,TERM:dZ}=process.env,T={enabled:!uZ&&dZ!=="dumb"&&mZ!=="0",reset:S(0,0),bold:S(1,22),dim:S(2,22),italic:S(3,23),underline:S(4,24),inverse:S(7,27),hidden:S(8,28),strikethrough:S(9,29),black:S(30,39),red:S(31,39),green:S(32,39),yellow:S(33,39),blue:S(34,39),magenta:S(35,39),cyan:S(36,39),white:S(37,39),gray:S(90,39),grey:S(90,39),bgBlack:S(40,49),bgRed:S(41,49),bgGreen:S(42,49),bgYellow:S(43,49),bgBlue:S(44,49),bgMagenta:S(45,49),bgCyan:S(46,49),bgWhite:S(47,49)};W9.exports=T});var N9=E((MX,$9)=>{$9.exports=(U,Z)=>{if(U.meta&&U.name!=="escape")return;if(U.ctrl){if(U.name==="a")return"first";if(U.name==="c")return"abort";if(U.name==="d")return"abort";if(U.name==="e")return"last";if(U.name==="g")return"reset"}if(Z){if(U.name==="j")return"down";if(U.name==="k")return"up"}if(U.name==="return")return"submit";if(U.name==="enter")return"submit";if(U.name==="backspace")return"delete";if(U.name==="delete")return"deleteForward";if(U.name==="abort")return"abort";if(U.name==="escape")return"exit";if(U.name==="tab")return"next";if(U.name==="pagedown")return"nextPage";if(U.name==="pageup")return"prevPage";if(U.name==="home")return"home";if(U.name==="end")return"end";if(U.name==="up")return"up";if(U.name==="down")return"down";if(U.name==="right")return"right";if(U.name==="left")return"left";return!1}});var i0=E((FX,O9)=>{O9.exports=(U)=>{const Z=["[\\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("|"),J=new RegExp(Z,"g");return typeof U==="string"?U.replace(J,""):U}});var P=E((RX,I9)=>{var q=`${"\x1B"}[`,j1={to(U,Z){if(!Z)return`${q}${U+1}G`;return`${q}${Z+1};${U+1}H`},move(U,Z){let J="";if(U<0)J+=`${q}${-U}D`;else if(U>0)J+=`${q}${U}C`;if(Z<0)J+=`${q}${-Z}A`;else if(Z>0)J+=`${q}${Z}B`;return J},up:(U=1)=>`${q}${U}A`,down:(U=1)=>`${q}${U}B`,forward:(U=1)=>`${q}${U}C`,backward:(U=1)=>`${q}${U}D`,nextLine:(U=1)=>`${q}E`.repeat(U),prevLine:(U=1)=>`${q}F`.repeat(U),left:`${q}G`,hide:`${q}?25l`,show:`${q}?25h`,save:`${"\x1B"}7`,restore:`${"\x1B"}8`},pZ={up:(U=1)=>`${q}S`.repeat(U),down:(U=1)=>`${q}T`.repeat(U)},nZ={screen:`${q}2J`,up:(U=1)=>`${q}1J`.repeat(U),down:(U=1)=>`${q}J`.repeat(U),line:`${q}2K`,lineEnd:`${q}K`,lineStart:`${q}1K`,lines(U){let Z="";for(let J=0;J<U;J++)Z+=this.line+(J<U-1?j1.up():"");if(U)Z+=j1.left;return Z}};I9.exports={cursor:j1,scroll:pZ,erase:nZ,beep:"\x07"}});var q9=E((WX,A9)=>{var aZ=function(U,Z){var J=typeof Symbol!=="undefined"&&U[Symbol.iterator]||U["@@iterator"];if(!J){if(Array.isArray(U)||(J=lZ(U))||Z&&U&&typeof U.length==="number"){if(J)U=J;var Q=0,K=function G(){};return{s:K,n:function G(){if(Q>=U.length)return{done:!0};return{done:!1,value:U[Q++]}},e:function G(D){throw D},f:K}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var X=!0,Y=!1,z;return{s:function G(){J=J.call(U)},n:function G(){var D=J.next();return X=D.done,D},e:function G(D){Y=!0,z=D},f:function G(){try{if(!X&&J.return!=null)J.return()}finally{if(Y)throw z}}}},lZ=function(U,Z){if(!U)return;if(typeof U==="string")return T9(U,Z);var J=Object.prototype.toString.call(U).slice(8,-1);if(J==="Object"&&U.constructor)J=U.constructor.name;if(J==="Map"||J==="Set")return Array.from(U);if(J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J))return T9(U,Z)},T9=function(U,Z){if(Z==null||Z>U.length)Z=U.length;for(var J=0,Q=new Array(Z);J<Z;J++)Q[J]=U[J];return Q},iZ=i0(),S9=P(),L9=S9.erase,sZ=S9.cursor,rZ=(U)=>[...iZ(U)].length;A9.exports=function(U,Z){if(!Z)return L9.line+sZ.to(0);let J=0;const Q=U.split(/\r?\n/);var K=aZ(Q),X;try{for(K.s();!(X=K.n()).done;){let Y=X.value;J+=1+Math.floor(Math.max(rZ(Y)-1,0)/Z)}}catch(Y){K.e(Y)}finally{K.f()}return L9.lines(J)}});var C1=E(($X,P9)=>{var C0={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},oZ={arrowUp:C0.arrowUp,arrowDown:C0.arrowDown,arrowLeft:C0.arrowLeft,arrowRight:C0.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},tZ=process.platform==="win32"?oZ:C0;P9.exports=tZ});var C9=E((NX,j9)=>{var N0=A(),V0=C1(),_1=Object.freeze({password:{scale:1,render:(U)=>"*".repeat(U.length)},emoji:{scale:2,render:(U)=>"\uD83D\uDE03".repeat(U.length)},invisible:{scale:0,render:(U)=>""},default:{scale:1,render:(U)=>`${U}`}}),eZ=(U)=>_1[U]||_1.default,_0=Object.freeze({aborted:N0.red(V0.cross),done:N0.green(V0.tick),exited:N0.yellow(V0.cross),default:N0.cyan("?")}),U5=(U,Z,J)=>Z?_0.aborted:J?_0.exited:U?_0.done:_0.default,Z5=(U)=>N0.gray(U?V0.ellipsis:V0.pointerSmall),J5=(U,Z)=>N0.gray(U?Z?V0.pointerSmall:"+":V0.line);j9.exports={styles:_1,render:eZ,symbols:_0,symbol:U5,delimiter:Z5,item:J5}});var w9=E((OX,_9)=>{var Q5=i0();_9.exports=function(U,Z){let J=String(Q5(U)||"").split(/\r?\n/);if(!Z)return J.length;return J.map((Q)=>Math.ceil(Q.length/Z)).reduce((Q,K)=>Q+K)}});var k9=E((IX,f9)=>{f9.exports=(U,Z={})=>{const J=Number.isSafeInteger(parseInt(Z.margin))?new Array(parseInt(Z.margin)).fill(" ").join(""):Z.margin||"",Q=Z.width;return(U||"").split(/\r?\n/g).map((K)=>K.split(/\s+/g).reduce((X,Y)=>{if(Y.length+J.length>=Q||X[X.length-1].length+Y.length+1<Q)X[X.length-1]+=` ${Y}`;else X.push(`${J}${Y}`);return X},[J]).join("\n")).join("\n")}});var h9=E((TX,b9)=>{b9.exports=(U,Z,J)=>{J=J||Z;let Q=Math.min(Z-J,U-Math.floor(J/2));if(Q<0)Q=0;let K=Math.min(Q+J,Z);return{startIndex:Q,endIndex:K}}});var y=E((LX,v9)=>{v9.exports={action:N9(),clear:q9(),style:C9(),strip:i0(),figures:C1(),lines:w9(),wrap:k9(),entriesToDisplay:h9()}});var o=E((SX,m9)=>{var x9=import.meta.require("readline"),K5=y(),X5=K5.action,Y5=import.meta.require("events"),y9=P(),D5=y9.beep,z5=y9.cursor,G5=A();class g9 extends Y5{constructor(U={}){super();this.firstRender=!0,this.in=U.stdin||process.stdin,this.out=U.stdout||process.stdout,this.onRender=(U.onRender||(()=>{return})).bind(this);const Z=x9.createInterface({input:this.in,escapeCodeTimeout:50});if(x9.emitKeypressEvents(this.in,Z),this.in.isTTY)this.in.setRawMode(!0);const J=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,Q=(K,X)=>{let Y=X5(X,J);if(Y===!1)this._&&this._(K,X);else if(typeof this[Y]==="function")this[Y](X);else this.bell()};this.close=()=>{if(this.out.write(z5.show),this.in.removeListener("keypress",Q),this.in.isTTY)this.in.setRawMode(!1);Z.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",Q)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(D5)}render(){if(this.onRender(G5),this.firstRender)this.firstRender=!1}}m9.exports=g9});var a9=E((AX,n9)=>{var u9=function(U,Z,J,Q,K,X,Y){try{var z=U[X](Y),G=z.value}catch(D){J(D);return}if(z.done)Z(G);else Promise.resolve(G).then(Q,K)},d9=function(U){return function(){var Z=this,J=arguments;return new Promise(function(Q,K){var X=U.apply(Z,J);function Y(G){u9(X,Q,K,Y,z,"next",G)}function z(G){u9(X,Q,K,Y,z,"throw",G)}Y(void 0)})}},s0=A(),E5=o(),c9=P(),H5=c9.erase,w0=c9.cursor,r0=y(),w1=r0.style,f1=r0.clear,V5=r0.lines,B5=r0.figures;class p9 extends E5{constructor(U={}){super(U);this.transform=w1.render(U.style),this.scale=this.transform.scale,this.msg=U.message,this.initial=U.initial||"",this.validator=U.validate||(()=>!0),this.value="",this.errorMsg=U.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=f1("",this.out.columns),this.render()}set value(U){if(!U&&this.initial)this.placeholder=!0,this.rendered=s0.gray(this.transform.render(this.initial));else this.placeholder=!1,this.rendered=this.transform.render(U);this._value=U,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var U=this;return d9(function*(){let Z=yield U.validator(U.value);if(typeof Z==="string")U.errorMsg=Z,Z=!1;U.error=!Z})()}submit(){var U=this;return d9(function*(){if(U.value=U.value||U.initial,U.cursorOffset=0,U.cursor=U.rendered.length,yield U.validate(),U.error){U.red=!0,U.fire(),U.render();return}U.done=!0,U.aborted=!1,U.fire(),U.render(),U.out.write("\n"),U.close()})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(U){if(this.placeholder)return;this.cursor=this.cursor+U,this.cursorOffset+=U}_(U,Z){let J=this.value.slice(0,this.cursor),Q=this.value.slice(this.cursor);this.value=`${J}${U}${Q}`,this.red=!1,this.cursor=this.placeholder?0:J.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let U=this.value.slice(0,this.cursor-1),Z=this.value.slice(this.cursor);if(this.value=`${U}${Z}`,this.red=!1,this.isCursorAtStart())this.cursorOffset=0;else this.cursorOffset++,this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let U=this.value.slice(0,this.cursor),Z=this.value.slice(this.cursor+1);if(this.value=`${U}${Z}`,this.red=!1,this.isCursorAtEnd())this.cursorOffset=0;else 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(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(w0.down(V5(this.outputError,this.out.columns)-1)+f1(this.outputError,this.out.columns));this.out.write(f1(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[w1.symbol(this.done,this.aborted),s0.bold(this.msg),w1.delimiter(this.done),this.red?s0.red(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split("\n").reduce((U,Z,J)=>U+`\n${J?" ":B5.pointerSmall} ${s0.red().italic(Z)}`,"");this.out.write(H5.line+w0.to(0)+this.outputText+w0.save+this.outputError+w0.restore+w0.move(this.cursorOffset,0))}}n9.exports=p9});var o9=E((qX,r9)=>{var t=A(),M5=o(),f0=y(),l9=f0.style,i9=f0.clear,o0=f0.figures,F5=f0.wrap,R5=f0.entriesToDisplay,W5=P(),$5=W5.cursor;class s9 extends M5{constructor(U={}){super(U);this.msg=U.message,this.hint=U.hint||"- Use arrow-keys. Return to submit.",this.warn=U.warn||"- This option is disabled",this.cursor=U.initial||0,this.choices=U.choices.map((Z,J)=>{if(typeof Z==="string")Z={title:Z,value:J};return{title:Z&&(Z.title||Z.value||Z),value:Z&&(Z.value===void 0?J:Z.value),description:Z&&Z.description,selected:Z&&Z.selected,disabled:Z&&Z.disabled}}),this.optionsPerPage=U.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=i9("",this.out.columns),this.render()}moveCursor(U){this.cursor=U,this.value=this.choices[U].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){if(!this.selection.disabled)this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close();else this.bell()}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){if(this.cursor===0)this.moveCursor(this.choices.length-1);else this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)this.moveCursor(0);else this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(U,Z){if(U===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write($5.hide);else this.out.write(i9(this.outputText,this.out.columns));super.render();let U=R5(this.cursor,this.choices.length,this.optionsPerPage),Z=U.startIndex,J=U.endIndex;if(this.outputText=[l9.symbol(this.done,this.aborted),t.bold(this.msg),l9.delimiter(!1),this.done?this.selection.title:this.selection.disabled?t.yellow(this.warn):t.gray(this.hint)].join(" "),!this.done){this.outputText+="\n";for(let Q=Z;Q<J;Q++){let K,X,Y="",z=this.choices[Q];if(Q===Z&&Z>0)X=o0.arrowUp;else if(Q===J-1&&J<this.choices.length)X=o0.arrowDown;else X=" ";if(z.disabled)K=this.cursor===Q?t.gray().underline(z.title):t.strikethrough().gray(z.title),X=(this.cursor===Q?t.bold().gray(o0.pointer)+" ":" ")+X;else if(K=this.cursor===Q?t.cyan().underline(z.title):z.title,X=(this.cursor===Q?t.cyan(o0.pointer)+" ":" ")+X,z.description&&this.cursor===Q){if(Y=` - ${z.description}`,X.length+K.length+Y.length>=this.out.columns||z.description.split(/\r?\n/).length>1)Y="\n"+F5(z.description,{margin:3,width:this.out.columns})}this.outputText+=`${X} ${K}${t.gray(Y)}\n`}}this.out.write(this.outputText)}}r9.exports=s9});var K8=E((PX,Q8)=>{var t0=A(),N5=o(),U8=y(),t9=U8.style,O5=U8.clear,Z8=P(),e9=Z8.cursor,I5=Z8.erase;class J8 extends N5{constructor(U={}){super(U);this.msg=U.message,this.value=!!U.initial,this.active=U.active||"on",this.inactive=U.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=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,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()}_(U,Z){if(U===" ")this.value=!this.value;else if(U==="1")this.value=!0;else if(U==="0")this.value=!1;else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(e9.hide);else this.out.write(O5(this.outputText,this.out.columns));super.render(),this.outputText=[t9.symbol(this.done,this.aborted),t0.bold(this.msg),t9.delimiter(this.done),this.value?this.inactive:t0.cyan().underline(this.inactive),t0.gray("/"),this.value?t0.cyan().underline(this.active):this.active].join(" "),this.out.write(I5.line+e9.to(0)+this.outputText)}}Q8.exports=J8});var u=E((jX,X8)=>{class e0{constructor({token:U,date:Z,parts:J,locales:Q}){this.token=U,this.date=Z||new Date,this.parts=J||[this],this.locales=Q||{}}up(){}down(){}next(){const U=this.parts.indexOf(this);return this.parts.find((Z,J)=>J>U&&Z instanceof e0)}setTo(U){}prev(){let U=[].concat(this.parts).reverse();const Z=U.indexOf(this);return U.find((J,Q)=>Q>Z&&J instanceof e0)}toString(){return String(this.date)}}X8.exports=e0});var z8=E((CX,D8)=>{var T5=u();class Y8 extends T5{constructor(U={}){super(U)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let U=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?U.toUpperCase():U}}D8.exports=Y8});var H8=E((_X,E8)=>{var L5=u(),S5=(U)=>{return U=U%10,U===1?"st":U===2?"nd":U===3?"rd":"th"};class G8 extends L5{constructor(U={}){super(U)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(U){this.date.setDate(parseInt(U.substr(-2)))}toString(){let U=this.date.getDate(),Z=this.date.getDay();return this.token==="DD"?String(U).padStart(2,"0"):this.token==="Do"?U+S5(U):this.token==="d"?Z+1:this.token==="ddd"?this.locales.weekdaysShort[Z]:this.token==="dddd"?this.locales.weekdays[Z]:U}}E8.exports=G8});var M8=E((wX,B8)=>{var A5=u();class V8 extends A5{constructor(U={}){super(U)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(U){this.date.setHours(parseInt(U.substr(-2)))}toString(){let U=this.date.getHours();if(/h/.test(this.token))U=U%12||12;return this.token.length>1?String(U).padStart(2,"0"):U}}B8.exports=V8});var W8=E((fX,R8)=>{var q5=u();class F8 extends q5{constructor(U={}){super(U)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(U){this.date.setMilliseconds(parseInt(U.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}R8.exports=F8});var O8=E((kX,N8)=>{var P5=u();class $8 extends P5{constructor(U={}){super(U)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(U){this.date.setMinutes(parseInt(U.substr(-2)))}toString(){let U=this.date.getMinutes();return this.token.length>1?String(U).padStart(2,"0"):U}}N8.exports=$8});var L8=E((bX,T8)=>{var j5=u();class I8 extends j5{constructor(U={}){super(U)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(U){U=parseInt(U.substr(-2))-1,this.date.setMonth(U<0?0:U)}toString(){let U=this.date.getMonth(),Z=this.token.length;return Z===2?String(U+1).padStart(2,"0"):Z===3?this.locales.monthsShort[U]:Z===4?this.locales.months[U]:String(U+1)}}T8.exports=I8});var q8=E((hX,A8)=>{var C5=u();class S8 extends C5{constructor(U={}){super(U)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(U){this.date.setSeconds(parseInt(U.substr(-2)))}toString(){let U=this.date.getSeconds();return this.token.length>1?String(U).padStart(2,"0"):U}}A8.exports=S8});var C8=E((vX,j8)=>{var _5=u();class P8 extends _5{constructor(U={}){super(U)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(U){this.date.setFullYear(U.substr(-4))}toString(){let U=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?U.substr(-2):U}}j8.exports=P8});var w8=E((xX,_8)=>{_8.exports={DatePart:u(),Meridiem:z8(),Day:H8(),Hours:M8(),Milliseconds:W8(),Minutes:O8(),Month:L8(),Seconds:q8(),Year:C8()}});var d8=E((yX,u8)=>{var f8=function(U,Z,J,Q,K,X,Y){try{var z=U[X](Y),G=z.value}catch(D){J(D);return}if(z.done)Z(G);else Promise.resolve(G).then(Q,K)},k8=function(U){return function(){var Z=this,J=arguments;return new Promise(function(Q,K){var X=U.apply(Z,J);function Y(G){f8(X,Q,K,Y,z,"next",G)}function z(G){f8(X,Q,K,Y,z,"throw",G)}Y(void 0)})}},k1=A(),w5=o(),b1=y(),b8=b1.style,h8=b1.clear,f5=b1.figures,g8=P(),k5=g8.erase,v8=g8.cursor,e=w8(),x8=e.DatePart,b5=e.Meridiem,h5=e.Day,v5=e.Hours,x5=e.Milliseconds,y5=e.Minutes,g5=e.Month,m5=e.Seconds,u5=e.Year,d5=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,y8={1:({token:U})=>U.replace(/\\(.)/g,"$1"),2:(U)=>new h5(U),3:(U)=>new g5(U),4:(U)=>new u5(U),5:(U)=>new b5(U),6:(U)=>new v5(U),7:(U)=>new y5(U),8:(U)=>new m5(U),9:(U)=>new x5(U)},c5={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 m8 extends w5{constructor(U={}){super(U);this.msg=U.message,this.cursor=0,this.typed="",this.locales=Object.assign(c5,U.locales),this._date=U.initial||new Date,this.errorMsg=U.error||"Please Enter A Valid Value",this.validator=U.validate||(()=>!0),this.mask=U.mask||"YYYY-MM-DD HH:mm:ss",this.clear=h8("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(U){if(U)this._date.setTime(U.getTime())}set mask(U){let Z;this.parts=[];while(Z=d5.exec(U)){let Q=Z.shift(),K=Z.findIndex((X)=>X!=null);this.parts.push(K in y8?y8[K]({token:Z[K]||Q,date:this.date,parts:this.parts,locales:this.locales}):Z[K]||Q)}let J=this.parts.reduce((Q,K)=>{if(typeof K==="string"&&typeof Q[Q.length-1]==="string")Q[Q.length-1]+=K;else Q.push(K);return Q},[]);this.parts.splice(0),this.parts.push(...J),this.reset()}moveCursor(U){this.typed="",this.cursor=U,this.fire()}reset(){this.moveCursor(this.parts.findIndex((U)=>U instanceof x8)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var U=this;return k8(function*(){let Z=yield U.validator(U.value);if(typeof Z==="string")U.errorMsg=Z,Z=!1;U.error=!Z})()}submit(){var U=this;return k8(function*(){if(yield U.validate(),U.error){U.color="red",U.fire(),U.render();return}U.done=!0,U.aborted=!1,U.fire(),U.render(),U.out.write("\n"),U.close()})()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let U=this.parts[this.cursor].prev();if(U==null)return this.bell();this.moveCursor(this.parts.indexOf(U)),this.render()}right(){let U=this.parts[this.cursor].next();if(U==null)return this.bell();this.moveCursor(this.parts.indexOf(U)),this.render()}next(){let U=this.parts[this.cursor].next();this.moveCursor(U?this.parts.indexOf(U):this.parts.findIndex((Z)=>Z instanceof x8)),this.render()}_(U){if(/\d/.test(U))this.typed+=U,this.parts[this.cursor].setTo(this.typed),this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(v8.hide);else this.out.write(h8(this.outputText,this.out.columns));if(super.render(),this.outputText=[b8.symbol(this.done,this.aborted),k1.bold(this.msg),b8.delimiter(!1),this.parts.reduce((U,Z,J)=>U.concat(J===this.cursor&&!this.done?k1.cyan().underline(Z.toString()):Z),[]).join("")].join(" "),this.error)this.outputText+=this.errorMsg.split("\n").reduce((U,Z,J)=>U+`\n${J?" ":f5.pointerSmall} ${k1.red().italic(Z)}`,"");this.out.write(k5.line+v8.to(0)+this.outputText)}}u8.exports=m8});var r8=E((gX,s8)=>{var c8=function(U,Z,J,Q,K,X,Y){try{var z=U[X](Y),G=z.value}catch(D){J(D);return}if(z.done)Z(G);else Promise.resolve(G).then(Q,K)},p8=function(U){return function(){var Z=this,J=arguments;return new Promise(function(Q,K){var X=U.apply(Z,J);function Y(G){c8(X,Q,K,Y,z,"next",G)}function z(G){c8(X,Q,K,Y,z,"throw",G)}Y(void 0)})}},U1=A(),p5=o(),l8=P(),Z1=l8.cursor,n5=l8.erase,J1=y(),h1=J1.style,a5=J1.figures,n8=J1.clear,l5=J1.lines,i5=/[0-9]/,v1=(U)=>U!==void 0,a8=(U,Z)=>{let J=Math.pow(10,Z);return Math.round(U*J)/J};class i8 extends p5{constructor(U={}){super(U);this.transform=h1.render(U.style),this.msg=U.message,this.initial=v1(U.initial)?U.initial:"",this.float=!!U.float,this.round=U.round||2,this.inc=U.increment||1,this.min=v1(U.min)?U.min:(-Infinity),this.max=v1(U.max)?U.max:Infinity,this.errorMsg=U.error||"Please Enter A Valid Value",this.validator=U.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(U){if(!U&&U!==0)this.placeholder=!0,this.rendered=U1.gray(this.transform.render(`${this.initial}`)),this._value="";else this.placeholder=!1,this.rendered=this.transform.render(`${a8(U,this.round)}`),this._value=a8(U,this.round);this.fire()}get value(){return this._value}parse(U){return this.float?parseFloat(U):parseInt(U)}valid(U){return U==="-"||U==="."&&this.float||i5.test(U)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let U=this.value;this.value=U!==""?U:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var U=this;return p8(function*(){let Z=yield U.validator(U.value);if(typeof Z==="string")U.errorMsg=Z,Z=!1;U.error=!Z})()}submit(){var U=this;return p8(function*(){if(yield U.validate(),U.error){U.color="red",U.fire(),U.render();return}let Z=U.value;U.value=Z!==""?Z:U.initial,U.done=!0,U.aborted=!1,U.error=!1,U.fire(),U.render(),U.out.write("\n"),U.close()})()}up(){if(this.typed="",this.value==="")this.value=this.min-this.inc;if(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;if(this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let U=this.value.toString();if(U.length===0)return this.bell();if(this.value=this.parse(U=U.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()}_(U,Z){if(!this.valid(U))return this.bell();const J=Date.now();if(J-this.lastHit>1000)this.typed="";if(this.typed+=U,this.lastHit=J,this.color="cyan",U===".")return this.fire();if(this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire(),this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(Z1.down(l5(this.outputError,this.out.columns)-1)+n8(this.outputError,this.out.columns));this.out.write(n8(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[h1.symbol(this.done,this.aborted),U1.bold(this.msg),h1.delimiter(this.done),!this.done||!this.done&&!this.placeholder?U1[this.color]().underline(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split("\n").reduce((U,Z,J)=>U+`\n${J?" ":a5.pointerSmall} ${U1.red().italic(Z)}`,"");this.out.write(n5.line+Z1.to(0)+this.outputText+Z1.save+this.outputError+Z1.restore)}}s8.exports=i8});var x1=E((mX,U7)=>{var d=A(),s5=P(),r5=s5.cursor,o5=o(),k0=y(),o8=k0.clear,X0=k0.figures,t8=k0.style,t5=k0.wrap,e5=k0.entriesToDisplay;class e8 extends o5{constructor(U={}){super(U);if(this.msg=U.message,this.cursor=U.cursor||0,this.scrollIndex=U.cursor||0,this.hint=U.hint||"",this.warn=U.warn||"- This option is disabled -",this.minSelected=U.min,this.showMinError=!1,this.maxChoices=U.max,this.instructions=U.instructions,this.optionsPerPage=U.optionsPerPage||10,this.value=U.choices.map((Z,J)=>{if(typeof Z==="string")Z={title:Z,value:J};return{title:Z&&(Z.title||Z.value||Z),description:Z&&Z.description,value:Z&&(Z.value===void 0?J:Z.value),selected:Z&&Z.selected,disabled:Z&&Z.disabled}}),this.clear=o8("",this.out.columns),!U.overrideRender)this.render()}reset(){this.value.map((U)=>!U.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((U)=>U.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){const U=this.value.filter((Z)=>Z.selected);if(this.minSelected&&U.length<this.minSelected)this.showMinError=!0,this.render();else this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),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(){if(this.cursor===0)this.cursor=this.value.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.value.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((U)=>U.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const U=this.value[this.cursor];if(U.selected)U.selected=!1,this.render();else if(U.disabled||this.value.filter((Z)=>Z.selected).length>=this.maxChoices)return this.bell();else U.selected=!0,this.render()}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();const U=!this.value[this.cursor].selected;this.value.filter((Z)=>!Z.disabled).forEach((Z)=>Z.selected=U),this.render()}_(U,Z){if(U===" ")this.handleSpaceToggle();else if(U==="a")this.toggleAll();else return this.bell()}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return"\nInstructions:\n"+` ${X0.arrowUp}/${X0.arrowDown}: Highlight option\n`+` ${X0.arrowLeft}/${X0.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===void 0?" a: Toggle all\n":"")+" enter/return: Complete answer"}return""}renderOption(U,Z,J,Q){const K=(Z.selected?d.green(X0.radioOn):X0.radioOff)+" "+Q+" ";let X,Y;if(Z.disabled)X=U===J?d.gray().underline(Z.title):d.strikethrough().gray(Z.title);else if(X=U===J?d.cyan().underline(Z.title):Z.title,U===J&&Z.description){if(Y=` - ${Z.description}`,K.length+X.length+Y.length>=this.out.columns||Z.description.split(/\r?\n/).length>1)Y="\n"+t5(Z.description,{margin:K.length,width:this.out.columns})}return K+X+d.gray(Y||"")}paginateOptions(U){if(U.length===0)return d.red("No matches for this query.");let Z=e5(this.cursor,U.length,this.optionsPerPage),J=Z.startIndex,Q=Z.endIndex,K,X=[];for(let Y=J;Y<Q;Y++){if(Y===J&&J>0)K=X0.arrowUp;else if(Y===Q-1&&Q<U.length)K=X0.arrowDown;else K=" ";X.push(this.renderOption(this.cursor,U[Y],Y,K))}return"\n"+X.join("\n")}renderOptions(U){if(!this.done)return this.paginateOptions(U);return""}renderDoneOrInstructions(){if(this.done)return this.value.filter((Z)=>Z.selected).map((Z)=>Z.title).join(", ");const U=[d.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled)U.push(d.yellow(this.warn));return U.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(r5.hide);super.render();let U=[t8.symbol(this.done,this.aborted),d.bold(this.msg),t8.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)U+=d.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;U+=this.renderOptions(this.value),this.out.write(this.clear+U),this.clear=o8(U,this.out.columns)}}U7.exports=e8});var z7=E((uX,D7)=>{var Z7=function(U,Z,J,Q,K,X,Y){try{var z=U[X](Y),G=z.value}catch(D){J(D);return}if(z.done)Z(G);else Promise.resolve(G).then(Q,K)},UJ=function(U){return function(){var Z=this,J=arguments;return new Promise(function(Q,K){var X=U.apply(Z,J);function Y(G){Z7(X,Q,K,Y,z,"next",G)}function z(G){Z7(X,Q,K,Y,z,"throw",G)}Y(void 0)})}},b0=A(),ZJ=o(),X7=P(),JJ=X7.erase,J7=X7.cursor,h0=y(),y1=h0.style,Q7=h0.clear,g1=h0.figures,QJ=h0.wrap,KJ=h0.entriesToDisplay,K7=(U,Z)=>U[Z]&&(U[Z].value||U[Z].title||U[Z]),XJ=(U,Z)=>U[Z]&&(U[Z].title||U[Z].value||U[Z]),YJ=(U,Z)=>{const J=U.findIndex((Q)=>Q.value===Z||Q.title===Z);return J>-1?J:void 0};class Y7 extends ZJ{constructor(U={}){super(U);this.msg=U.message,this.suggest=U.suggest,this.choices=U.choices,this.initial=typeof U.initial==="number"?U.initial:YJ(U.choices,U.initial),this.select=this.initial||U.cursor||0,this.i18n={noMatches:U.noMatches||"no matches found"},this.fallback=U.fallback||this.initial,this.clearFirst=U.clearFirst||!1,this.suggestions=[],this.input="",this.limit=U.limit||10,this.cursor=0,this.transform=y1.render(U.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=Q7("",this.out.columns),this.complete(this.render),this.render()}set fallback(U){this._fb=Number.isSafeInteger(parseInt(U))?parseInt(U):U}get fallback(){let U;if(typeof this._fb==="number")U=this.choices[this._fb];else if(typeof this._fb==="string")U={title:this._fb};return U||this._fb||{title:this.i18n.noMatches}}moveSelect(U){if(this.select=U,this.suggestions.length>0)this.value=K7(this.suggestions,U);else this.value=this.fallback.value;this.fire()}complete(U){var Z=this;return UJ(function*(){const J=Z.completing=Z.suggest(Z.input,Z.choices),Q=yield J;if(Z.completing!==J)return;Z.suggestions=Q.map((X,Y,z)=>({title:XJ(z,Y),value:K7(z,Y),description:X.description})),Z.completing=!1;const K=Math.max(Q.length-1,0);Z.moveSelect(Math.min(K,Z.select)),U&&U()})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){if(this.clearFirst&&this.input.length>0)this.reset();else this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(U,Z){let J=this.input.slice(0,this.cursor),Q=this.input.slice(this.cursor);this.input=`${J}${U}${Q}`,this.cursor=J.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let U=this.input.slice(0,this.cursor-1),Z=this.input.slice(this.cursor);this.input=`${U}${Z}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let U=this.input.slice(0,this.cursor),Z=this.input.slice(this.cursor+1);this.input=`${U}${Z}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){if(this.select===0)this.moveSelect(this.suggestions.length-1);else this.moveSelect(this.select-1);this.render()}down(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else 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(U,Z,J,Q){let K,X=J?g1.arrowUp:Q?g1.arrowDown:" ",Y=Z?b0.cyan().underline(U.title):U.title;if(X=(Z?b0.cyan(g1.pointer)+" ":" ")+X,U.description){if(K=` - ${U.description}`,X.length+Y.length+K.length>=this.out.columns||U.description.split(/\r?\n/).length>1)K="\n"+QJ(U.description,{margin:3,width:this.out.columns})}return X+" "+Y+b0.gray(K||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(J7.hide);else this.out.write(Q7(this.outputText,this.out.columns));super.render();let U=KJ(this.select,this.choices.length,this.limit),Z=U.startIndex,J=U.endIndex;if(this.outputText=[y1.symbol(this.done,this.aborted,this.exited),b0.bold(this.msg),y1.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const Q=this.suggestions.slice(Z,J).map((K,X)=>this.renderOption(K,this.select===X+Z,X===0&&Z>0,X+Z===J-1&&J<this.choices.length)).join("\n");this.outputText+="\n"+(Q||b0.gray(this.fallback.title))}this.out.write(JJ.line+J7.to(0)+this.outputText)}}D7.exports=Y7});var B7=E((dX,V7)=>{var U0=A(),DJ=P(),zJ=DJ.cursor,GJ=x1(),m1=y(),G7=m1.clear,E7=m1.style,O0=m1.figures;class H7 extends GJ{constructor(U={}){U.overrideRender=!0;super(U);this.inputValue="",this.clear=G7("",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(){if(this.cursor===0)this.cursor=this.filteredOptions.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.filteredOptions.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((U)=>U.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){if(this.inputValue.length)this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions()}updateFilteredOptions(){const U=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((J)=>{if(this.inputValue){if(typeof J.title==="string"){if(J.title.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}if(typeof J.value==="string"){if(J.value.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}return!1}return!0});const Z=this.filteredOptions.findIndex((J)=>J===U);this.cursor=Z<0?0:Z,this.render()}handleSpaceToggle(){const U=this.filteredOptions[this.cursor];if(U.selected)U.selected=!1,this.render();else if(U.disabled||this.value.filter((Z)=>Z.selected).length>=this.maxChoices)return this.bell();else U.selected=!0,this.render()}handleInputChange(U){this.inputValue=this.inputValue+U,this.updateFilteredOptions()}_(U,Z){if(U===" ")this.handleSpaceToggle();else this.handleInputChange(U)}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return`
|
|
3
3
|
Instructions:
|
|
4
4
|
${O0.arrowUp}/${O0.arrowDown}: Highlight option
|
|
5
5
|
${O0.arrowLeft}/${O0.arrowRight}/[space]: Toggle selection
|
|
6
6
|
[a,b,c]/delete: Filter choices
|
|
7
7
|
enter/return: Complete answer
|
|
8
8
|
`}return""}renderCurrentInput(){return`
|
|
9
|
-
Filtered results for: ${this.inputValue?this.inputValue:U0.gray("Enter something to filter")}\n`}renderOption(U,Z,J){let Q;if(Z.disabled)Q=U===J?U0.gray().underline(Z.title):U0.strikethrough().gray(Z.title);else Q=U===J?U0.cyan().underline(Z.title):Z.title;return(Z.selected?U0.green(O0.radioOn):O0.radioOff)+" "+Q}renderDoneOrInstructions(){if(this.done)return this.value.filter((Z)=>Z.selected).map((Z)=>Z.title).join(", ");const U=[U0.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled)U.push(U0.yellow(this.warn));return U.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(QJ.hide);super.render();let U=[E7.symbol(this.done,this.aborted),U0.bold(this.msg),E7.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)U+=U0.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;U+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+U),this.clear=G7(U,this.out.columns)}}H7.exports=F7});var T7=E((kX,O7)=>{var B7=A(),XJ=o(),W7=y(),M7=W7.style,zJ=W7.clear,$7=P(),YJ=$7.erase,R7=$7.cursor;class N7 extends XJ{constructor(U={}){super(U);this.msg=U.message,this.value=U.initial,this.initialValue=!!U.initial,this.yesMsg=U.yes||"yes",this.yesOption=U.yesOption||"(Y/n)",this.noMsg=U.no||"no",this.noOption=U.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(U,Z){if(U.toLowerCase()==="y")return this.value=!0,this.submit();if(U.toLowerCase()==="n")return this.value=!1,this.submit();return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(R7.hide);else this.out.write(zJ(this.outputText,this.out.columns));super.render(),this.outputText=[M7.symbol(this.done,this.aborted),B7.bold(this.msg),M7.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:B7.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(YJ.line+R7.to(0)+this.outputText)}}O7.exports=N7});var S7=E((bX,I7)=>{I7.exports={TextPrompt:a9(),SelectPrompt:o9(),TogglePrompt:K8(),DatePrompt:d8(),NumberPrompt:r8(),MultiselectPrompt:x1(),AutocompletePrompt:D7(),AutocompleteMultiselectPrompt:V7(),ConfirmPrompt:T7()}});var A7=E((L7)=>{var c=function(U,Z,J={}){return new Promise((Q,K)=>{const X=new DJ[U](Z),z=J.onAbort||Q1,D=J.onSubmit||Q1,G=J.onExit||Q1;X.on("state",Z.onState||Q1),X.on("submit",(Y)=>Q(D(Y))),X.on("exit",(Y)=>Q(G(Y))),X.on("abort",(Y)=>K(z(Y)))})},k=L7,DJ=S7(),Q1=(U)=>U;k.text=(U)=>c("TextPrompt",U);k.password=(U)=>{return U.style="password",k.text(U)};k.invisible=(U)=>{return U.style="invisible",k.text(U)};k.number=(U)=>c("NumberPrompt",U);k.date=(U)=>c("DatePrompt",U);k.confirm=(U)=>c("ConfirmPrompt",U);k.list=(U)=>{const Z=U.separator||",";return c("TextPrompt",U,{onSubmit:(J)=>J.split(Z).map((Q)=>Q.trim())})};k.toggle=(U)=>c("TogglePrompt",U);k.select=(U)=>c("SelectPrompt",U);k.multiselect=(U)=>{U.choices=[].concat(U.choices||[]);const Z=(J)=>J.filter((Q)=>Q.selected).map((Q)=>Q.value);return c("MultiselectPrompt",U,{onAbort:Z,onSubmit:Z})};k.autocompleteMultiselect=(U)=>{U.choices=[].concat(U.choices||[]);const Z=(J)=>J.filter((Q)=>Q.selected).map((Q)=>Q.value);return c("AutocompleteMultiselectPrompt",U,{onAbort:Z,onSubmit:Z})};var GJ=(U,Z)=>Promise.resolve(Z.filter((J)=>J.title.slice(0,U.length).toLowerCase()===U.toLowerCase()));k.autocomplete=(U)=>{return U.suggest=U.suggest||GJ,U.choices=[].concat(U.choices||[]),c("AutocompletePrompt",U)}});var k7=E((vX,f7)=>{var q7=function(U,Z){var J=Object.keys(U);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(U);if(Z)Q=Q.filter(function(K){return Object.getOwnPropertyDescriptor(U,K).enumerable});J.push.apply(J,Q)}return J},P7=function(U){for(var Z=1;Z<arguments.length;Z++){var J=arguments[Z]!=null?arguments[Z]:{};if(Z%2)q7(Object(J),!0).forEach(function(Q){EJ(U,Q,J[Q])});else if(Object.getOwnPropertyDescriptors)Object.defineProperties(U,Object.getOwnPropertyDescriptors(J));else q7(Object(J)).forEach(function(Q){Object.defineProperty(U,Q,Object.getOwnPropertyDescriptor(J,Q))})}return U},EJ=function(U,Z,J){if(Z in U)Object.defineProperty(U,Z,{value:J,enumerable:!0,configurable:!0,writable:!0});else U[Z]=J;return U},FJ=function(U,Z){var J=typeof Symbol!=="undefined"&&U[Symbol.iterator]||U["@@iterator"];if(!J){if(Array.isArray(U)||(J=HJ(U))||Z&&U&&typeof U.length==="number"){if(J)U=J;var Q=0,K=function G(){};return{s:K,n:function G(){if(Q>=U.length)return{done:!0};return{done:!1,value:U[Q++]}},e:function G(Y){throw Y},f:K}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var X=!0,z=!1,D;return{s:function G(){J=J.call(U)},n:function G(){var Y=J.next();return X=Y.done,Y},e:function G(Y){z=!0,D=Y},f:function G(){try{if(!X&&J.return!=null)J.return()}finally{if(z)throw D}}}},HJ=function(U,Z){if(!U)return;if(typeof U==="string")return j7(U,Z);var J=Object.prototype.toString.call(U).slice(8,-1);if(J==="Object"&&U.constructor)J=U.constructor.name;if(J==="Map"||J==="Set")return Array.from(U);if(J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J))return j7(U,Z)},j7=function(U,Z){if(Z==null||Z>U.length)Z=U.length;for(var J=0,Q=new Array(Z);J<Z;J++)Q[J]=U[J];return Q},C7=function(U,Z,J,Q,K,X,z){try{var D=U[X](z),G=D.value}catch(Y){J(Y);return}if(D.done)Z(G);else Promise.resolve(G).then(Q,K)},_7=function(U){return function(){var Z=this,J=arguments;return new Promise(function(Q,K){var X=U.apply(Z,J);function z(G){C7(X,Q,K,z,D,"next",G)}function D(G){C7(X,Q,K,z,D,"throw",G)}z(void 0)})}},z0=function(){return d1.apply(this,arguments)},d1=function(){return d1=_7(function*(U=[],{onSubmit:Z=w7,onCancel:J=w7}={}){const Q={},K=z0._override||{};U=[].concat(U);let X,z,D,G,Y,M;const T=function(){var B=_7(function*(R,W,C=!1){if(!C&&R.validate&&R.validate(W)!==!0)return;return R.format?yield R.format(W,Q):W});return function R(W,C){return B.apply(this,arguments)}}();var N=FJ(U),F;try{for(N.s();!(F=N.n()).done;){z=F.value;var H=z;if(G=H.name,Y=H.type,typeof Y==="function")Y=yield Y(X,P7({},Q),z),z.type=Y;if(!Y)continue;for(let B in z){if(VJ.includes(B))continue;let R=z[B];z[B]=typeof R==="function"?yield R(X,P7({},Q),M):R}if(M=z,typeof z.message!=="string")throw new Error("prompt message is required");var V=z;if(G=V.name,Y=V.type,u1[Y]===void 0)throw new Error(`prompt type (${Y}) is not defined`);if(K[z.name]!==void 0){if(X=yield T(z,K[z.name]),X!==void 0){Q[G]=X;continue}}try{X=z0._injected?BJ(z0._injected,z.initial):yield u1[Y](z),Q[G]=X=yield T(z,X,!0),D=yield Z(z,X,Q)}catch(B){D=!(yield J(z,Q))}if(D)return Q}}catch(B){N.e(B)}finally{N.f()}return Q}),d1.apply(this,arguments)},BJ=function(U,Z){const J=U.shift();if(J instanceof Error)throw J;return J===void 0?Z:J},MJ=function(U){z0._injected=(z0._injected||[]).concat(U)},RJ=function(U){z0._override=Object.assign({},U)},u1=A7(),VJ=["suggest","format","onState","validate","onRender","type"],w7=()=>{};f7.exports=Object.assign(z0,{prompt:z0,prompts:u1,inject:MJ,override:RJ})});var h7=E((xX,b7)=>{b7.exports=(U,Z)=>{if(U.meta&&U.name!=="escape")return;if(U.ctrl){if(U.name==="a")return"first";if(U.name==="c")return"abort";if(U.name==="d")return"abort";if(U.name==="e")return"last";if(U.name==="g")return"reset"}if(Z){if(U.name==="j")return"down";if(U.name==="k")return"up"}if(U.name==="return")return"submit";if(U.name==="enter")return"submit";if(U.name==="backspace")return"delete";if(U.name==="delete")return"deleteForward";if(U.name==="abort")return"abort";if(U.name==="escape")return"exit";if(U.name==="tab")return"next";if(U.name==="pagedown")return"nextPage";if(U.name==="pageup")return"prevPage";if(U.name==="home")return"home";if(U.name==="end")return"end";if(U.name==="up")return"up";if(U.name==="down")return"down";if(U.name==="right")return"right";if(U.name==="left")return"left";return!1}});var K1=E((yX,v7)=>{v7.exports=(U)=>{const Z=["[\\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("|"),J=new RegExp(Z,"g");return typeof U==="string"?U.replace(J,""):U}});var g7=E((gX,y7)=>{var WJ=K1(),{erase:x7,cursor:$J}=P(),NJ=(U)=>[...WJ(U)].length;y7.exports=function(U,Z){if(!Z)return x7.line+$J.to(0);let J=0;const Q=U.split(/\r?\n/);for(let K of Q)J+=1+Math.floor(Math.max(NJ(K)-1,0)/Z);return x7.lines(J)}});var c1=E((mX,m7)=>{var v0={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},OJ={arrowUp:v0.arrowUp,arrowDown:v0.arrowDown,arrowLeft:v0.arrowLeft,arrowRight:v0.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},TJ=process.platform==="win32"?OJ:v0;m7.exports=TJ});var d7=E((uX,u7)=>{var T0=A(),V0=c1(),p1=Object.freeze({password:{scale:1,render:(U)=>"*".repeat(U.length)},emoji:{scale:2,render:(U)=>"\uD83D\uDE03".repeat(U.length)},invisible:{scale:0,render:(U)=>""},default:{scale:1,render:(U)=>`${U}`}}),IJ=(U)=>p1[U]||p1.default,x0=Object.freeze({aborted:T0.red(V0.cross),done:T0.green(V0.tick),exited:T0.yellow(V0.cross),default:T0.cyan("?")}),SJ=(U,Z,J)=>Z?x0.aborted:J?x0.exited:U?x0.done:x0.default,LJ=(U)=>T0.gray(U?V0.ellipsis:V0.pointerSmall),AJ=(U,Z)=>T0.gray(U?Z?V0.pointerSmall:"+":V0.line);u7.exports={styles:p1,render:IJ,symbols:x0,symbol:SJ,delimiter:LJ,item:AJ}});var p7=E((dX,c7)=>{var qJ=K1();c7.exports=function(U,Z){let J=String(qJ(U)||"").split(/\r?\n/);if(!Z)return J.length;return J.map((Q)=>Math.ceil(Q.length/Z)).reduce((Q,K)=>Q+K)}});var a7=E((cX,n7)=>{n7.exports=(U,Z={})=>{const J=Number.isSafeInteger(parseInt(Z.margin))?new Array(parseInt(Z.margin)).fill(" ").join(""):Z.margin||"",Q=Z.width;return(U||"").split(/\r?\n/g).map((K)=>K.split(/\s+/g).reduce((X,z)=>{if(z.length+J.length>=Q||X[X.length-1].length+z.length+1<Q)X[X.length-1]+=` ${z}`;else X.push(`${J}${z}`);return X},[J]).join("\n")).join("\n")}});var l7=E((pX,i7)=>{i7.exports=(U,Z,J)=>{J=J||Z;let Q=Math.min(Z-J,U-Math.floor(J/2));if(Q<0)Q=0;let K=Math.min(Q+J,Z);return{startIndex:Q,endIndex:K}}});var g=E((nX,s7)=>{s7.exports={action:h7(),clear:g7(),style:d7(),strip:K1(),figures:c1(),lines:p7(),wrap:a7(),entriesToDisplay:l7()}});var Z0=E((aX,t7)=>{var r7=import.meta.require("readline"),{action:PJ}=g(),jJ=import.meta.require("events"),{beep:CJ,cursor:_J}=P(),wJ=A();class o7 extends jJ{constructor(U={}){super();this.firstRender=!0,this.in=U.stdin||process.stdin,this.out=U.stdout||process.stdout,this.onRender=(U.onRender||(()=>{return})).bind(this);const Z=r7.createInterface({input:this.in,escapeCodeTimeout:50});if(r7.emitKeypressEvents(this.in,Z),this.in.isTTY)this.in.setRawMode(!0);const J=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,Q=(K,X)=>{let z=PJ(X,J);if(z===!1)this._&&this._(K,X);else if(typeof this[z]==="function")this[z](X);else this.bell()};this.close=()=>{if(this.out.write(_J.show),this.in.removeListener("keypress",Q),this.in.isTTY)this.in.setRawMode(!1);Z.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",Q)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(CJ)}render(){if(this.onRender(wJ),this.firstRender)this.firstRender=!1}}t7.exports=o7});var Z4=E((iX,U4)=>{var X1=A(),fJ=Z0(),{erase:kJ,cursor:y0}=P(),{style:n1,clear:a1,lines:bJ,figures:hJ}=g();class e7 extends fJ{constructor(U={}){super(U);this.transform=n1.render(U.style),this.scale=this.transform.scale,this.msg=U.message,this.initial=U.initial||"",this.validator=U.validate||(()=>!0),this.value="",this.errorMsg=U.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=a1("",this.out.columns),this.render()}set value(U){if(!U&&this.initial)this.placeholder=!0,this.rendered=X1.gray(this.transform.render(this.initial));else this.placeholder=!1,this.rendered=this.transform.render(U);this._value=U,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let U=await this.validator(this.value);if(typeof U==="string")this.errorMsg=U,U=!1;this.error=!U}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=!0,this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(U){if(this.placeholder)return;this.cursor=this.cursor+U,this.cursorOffset+=U}_(U,Z){let J=this.value.slice(0,this.cursor),Q=this.value.slice(this.cursor);this.value=`${J}${U}${Q}`,this.red=!1,this.cursor=this.placeholder?0:J.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let U=this.value.slice(0,this.cursor-1),Z=this.value.slice(this.cursor);if(this.value=`${U}${Z}`,this.red=!1,this.isCursorAtStart())this.cursorOffset=0;else this.cursorOffset++,this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let U=this.value.slice(0,this.cursor),Z=this.value.slice(this.cursor+1);if(this.value=`${U}${Z}`,this.red=!1,this.isCursorAtEnd())this.cursorOffset=0;else 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(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(y0.down(bJ(this.outputError,this.out.columns)-1)+a1(this.outputError,this.out.columns));this.out.write(a1(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[n1.symbol(this.done,this.aborted),X1.bold(this.msg),n1.delimiter(this.done),this.red?X1.red(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split("\n").reduce((U,Z,J)=>U+`\n${J?" ":hJ.pointerSmall} ${X1.red().italic(Z)}`,"");this.out.write(kJ.line+y0.to(0)+this.outputText+y0.save+this.outputError+y0.restore+y0.move(this.cursorOffset,0))}}U4.exports=e7});var z4=E((lX,X4)=>{var J0=A(),vJ=Z0(),{style:J4,clear:Q4,figures:z1,wrap:xJ,entriesToDisplay:yJ}=g(),{cursor:gJ}=P();class K4 extends vJ{constructor(U={}){super(U);this.msg=U.message,this.hint=U.hint||"- Use arrow-keys. Return to submit.",this.warn=U.warn||"- This option is disabled",this.cursor=U.initial||0,this.choices=U.choices.map((Z,J)=>{if(typeof Z==="string")Z={title:Z,value:J};return{title:Z&&(Z.title||Z.value||Z),value:Z&&(Z.value===void 0?J:Z.value),description:Z&&Z.description,selected:Z&&Z.selected,disabled:Z&&Z.disabled}}),this.optionsPerPage=U.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=Q4("",this.out.columns),this.render()}moveCursor(U){this.cursor=U,this.value=this.choices[U].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){if(!this.selection.disabled)this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close();else this.bell()}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){if(this.cursor===0)this.moveCursor(this.choices.length-1);else this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)this.moveCursor(0);else this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(U,Z){if(U===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(gJ.hide);else this.out.write(Q4(this.outputText,this.out.columns));super.render();let{startIndex:U,endIndex:Z}=yJ(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[J4.symbol(this.done,this.aborted),J0.bold(this.msg),J4.delimiter(!1),this.done?this.selection.title:this.selection.disabled?J0.yellow(this.warn):J0.gray(this.hint)].join(" "),!this.done){this.outputText+="\n";for(let J=U;J<Z;J++){let Q,K,X="",z=this.choices[J];if(J===U&&U>0)K=z1.arrowUp;else if(J===Z-1&&Z<this.choices.length)K=z1.arrowDown;else K=" ";if(z.disabled)Q=this.cursor===J?J0.gray().underline(z.title):J0.strikethrough().gray(z.title),K=(this.cursor===J?J0.bold().gray(z1.pointer)+" ":" ")+K;else if(Q=this.cursor===J?J0.cyan().underline(z.title):z.title,K=(this.cursor===J?J0.cyan(z1.pointer)+" ":" ")+K,z.description&&this.cursor===J){if(X=` - ${z.description}`,K.length+Q.length+X.length>=this.out.columns||z.description.split(/\r?\n/).length>1)X="\n"+xJ(z.description,{margin:3,width:this.out.columns})}this.outputText+=`${K} ${Q}${J0.gray(X)}\n`}}this.out.write(this.outputText)}}X4.exports=K4});var F4=E((sX,E4)=>{var Y1=A(),mJ=Z0(),{style:Y4,clear:uJ}=g(),{cursor:D4,erase:dJ}=P();class G4 extends mJ{constructor(U={}){super(U);this.msg=U.message,this.value=!!U.initial,this.active=U.active||"on",this.inactive=U.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=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,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()}_(U,Z){if(U===" ")this.value=!this.value;else if(U==="1")this.value=!0;else if(U==="0")this.value=!1;else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(D4.hide);else this.out.write(uJ(this.outputText,this.out.columns));super.render(),this.outputText=[Y4.symbol(this.done,this.aborted),Y1.bold(this.msg),Y4.delimiter(this.done),this.value?this.inactive:Y1.cyan().underline(this.inactive),Y1.gray("/"),this.value?Y1.cyan().underline(this.active):this.active].join(" "),this.out.write(dJ.line+D4.to(0)+this.outputText)}}E4.exports=G4});var p=E((rX,H4)=>{class D1{constructor({token:U,date:Z,parts:J,locales:Q}){this.token=U,this.date=Z||new Date,this.parts=J||[this],this.locales=Q||{}}up(){}down(){}next(){const U=this.parts.indexOf(this);return this.parts.find((Z,J)=>J>U&&Z instanceof D1)}setTo(U){}prev(){let U=[].concat(this.parts).reverse();const Z=U.indexOf(this);return U.find((J,Q)=>Q>Z&&J instanceof D1)}toString(){return String(this.date)}}H4.exports=D1});var M4=E((oX,B4)=>{var cJ=p();class V4 extends cJ{constructor(U={}){super(U)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let U=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?U.toUpperCase():U}}B4.exports=V4});var $4=E((tX,W4)=>{var pJ=p(),nJ=(U)=>{return U=U%10,U===1?"st":U===2?"nd":U===3?"rd":"th"};class R4 extends pJ{constructor(U={}){super(U)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(U){this.date.setDate(parseInt(U.substr(-2)))}toString(){let U=this.date.getDate(),Z=this.date.getDay();return this.token==="DD"?String(U).padStart(2,"0"):this.token==="Do"?U+nJ(U):this.token==="d"?Z+1:this.token==="ddd"?this.locales.weekdaysShort[Z]:this.token==="dddd"?this.locales.weekdays[Z]:U}}W4.exports=R4});var T4=E((eX,O4)=>{var aJ=p();class N4 extends aJ{constructor(U={}){super(U)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(U){this.date.setHours(parseInt(U.substr(-2)))}toString(){let U=this.date.getHours();if(/h/.test(this.token))U=U%12||12;return this.token.length>1?String(U).padStart(2,"0"):U}}O4.exports=N4});var L4=E((Uz,S4)=>{var iJ=p();class I4 extends iJ{constructor(U={}){super(U)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(U){this.date.setMilliseconds(parseInt(U.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}S4.exports=I4});var P4=E((Zz,q4)=>{var lJ=p();class A4 extends lJ{constructor(U={}){super(U)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(U){this.date.setMinutes(parseInt(U.substr(-2)))}toString(){let U=this.date.getMinutes();return this.token.length>1?String(U).padStart(2,"0"):U}}q4.exports=A4});var _4=E((Jz,C4)=>{var sJ=p();class j4 extends sJ{constructor(U={}){super(U)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(U){U=parseInt(U.substr(-2))-1,this.date.setMonth(U<0?0:U)}toString(){let U=this.date.getMonth(),Z=this.token.length;return Z===2?String(U+1).padStart(2,"0"):Z===3?this.locales.monthsShort[U]:Z===4?this.locales.months[U]:String(U+1)}}C4.exports=j4});var k4=E((Qz,f4)=>{var rJ=p();class w4 extends rJ{constructor(U={}){super(U)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(U){this.date.setSeconds(parseInt(U.substr(-2)))}toString(){let U=this.date.getSeconds();return this.token.length>1?String(U).padStart(2,"0"):U}}f4.exports=w4});var v4=E((Kz,h4)=>{var oJ=p();class b4 extends oJ{constructor(U={}){super(U)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(U){this.date.setFullYear(U.substr(-4))}toString(){let U=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?U.substr(-2):U}}h4.exports=b4});var y4=E((Xz,x4)=>{x4.exports={DatePart:p(),Meridiem:M4(),Day:$4(),Hours:T4(),Milliseconds:L4(),Minutes:P4(),Month:_4(),Seconds:k4(),Year:v4()}});var a4=E((zz,n4)=>{var i1=A(),tJ=Z0(),{style:g4,clear:m4,figures:eJ}=g(),{erase:UQ,cursor:u4}=P(),{DatePart:d4,Meridiem:ZQ,Day:JQ,Hours:QQ,Milliseconds:KQ,Minutes:XQ,Month:zQ,Seconds:YQ,Year:DQ}=y4(),GQ=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,c4={1:({token:U})=>U.replace(/\\(.)/g,"$1"),2:(U)=>new JQ(U),3:(U)=>new zQ(U),4:(U)=>new DQ(U),5:(U)=>new ZQ(U),6:(U)=>new QQ(U),7:(U)=>new XQ(U),8:(U)=>new YQ(U),9:(U)=>new KQ(U)},EQ={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 p4 extends tJ{constructor(U={}){super(U);this.msg=U.message,this.cursor=0,this.typed="",this.locales=Object.assign(EQ,U.locales),this._date=U.initial||new Date,this.errorMsg=U.error||"Please Enter A Valid Value",this.validator=U.validate||(()=>!0),this.mask=U.mask||"YYYY-MM-DD HH:mm:ss",this.clear=m4("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(U){if(U)this._date.setTime(U.getTime())}set mask(U){let Z;this.parts=[];while(Z=GQ.exec(U)){let Q=Z.shift(),K=Z.findIndex((X)=>X!=null);this.parts.push(K in c4?c4[K]({token:Z[K]||Q,date:this.date,parts:this.parts,locales:this.locales}):Z[K]||Q)}let J=this.parts.reduce((Q,K)=>{if(typeof K==="string"&&typeof Q[Q.length-1]==="string")Q[Q.length-1]+=K;else Q.push(K);return Q},[]);this.parts.splice(0),this.parts.push(...J),this.reset()}moveCursor(U){this.typed="",this.cursor=U,this.fire()}reset(){this.moveCursor(this.parts.findIndex((U)=>U instanceof d4)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let U=await this.validator(this.value);if(typeof U==="string")this.errorMsg=U,U=!1;this.error=!U}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let U=this.parts[this.cursor].prev();if(U==null)return this.bell();this.moveCursor(this.parts.indexOf(U)),this.render()}right(){let U=this.parts[this.cursor].next();if(U==null)return this.bell();this.moveCursor(this.parts.indexOf(U)),this.render()}next(){let U=this.parts[this.cursor].next();this.moveCursor(U?this.parts.indexOf(U):this.parts.findIndex((Z)=>Z instanceof d4)),this.render()}_(U){if(/\d/.test(U))this.typed+=U,this.parts[this.cursor].setTo(this.typed),this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(u4.hide);else this.out.write(m4(this.outputText,this.out.columns));if(super.render(),this.outputText=[g4.symbol(this.done,this.aborted),i1.bold(this.msg),g4.delimiter(!1),this.parts.reduce((U,Z,J)=>U.concat(J===this.cursor&&!this.done?i1.cyan().underline(Z.toString()):Z),[]).join("")].join(" "),this.error)this.outputText+=this.errorMsg.split("\n").reduce((U,Z,J)=>U+`\n${J?" ":eJ.pointerSmall} ${i1.red().italic(Z)}`,"");this.out.write(UQ.line+u4.to(0)+this.outputText)}}n4.exports=p4});var o4=E((Yz,r4)=>{var G1=A(),FQ=Z0(),{cursor:E1,erase:HQ}=P(),{style:l1,figures:VQ,clear:i4,lines:BQ}=g(),MQ=/[0-9]/,s1=(U)=>U!==void 0,l4=(U,Z)=>{let J=Math.pow(10,Z);return Math.round(U*J)/J};class s4 extends FQ{constructor(U={}){super(U);this.transform=l1.render(U.style),this.msg=U.message,this.initial=s1(U.initial)?U.initial:"",this.float=!!U.float,this.round=U.round||2,this.inc=U.increment||1,this.min=s1(U.min)?U.min:(-Infinity),this.max=s1(U.max)?U.max:Infinity,this.errorMsg=U.error||"Please Enter A Valid Value",this.validator=U.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(U){if(!U&&U!==0)this.placeholder=!0,this.rendered=G1.gray(this.transform.render(`${this.initial}`)),this._value="";else this.placeholder=!1,this.rendered=this.transform.render(`${l4(U,this.round)}`),this._value=l4(U,this.round);this.fire()}get value(){return this._value}parse(U){return this.float?parseFloat(U):parseInt(U)}valid(U){return U==="-"||U==="."&&this.float||MQ.test(U)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let U=this.value;this.value=U!==""?U:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let U=await this.validator(this.value);if(typeof U==="string")this.errorMsg=U,U=!1;this.error=!U}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let U=this.value;this.value=U!==""?U:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}up(){if(this.typed="",this.value==="")this.value=this.min-this.inc;if(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;if(this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let U=this.value.toString();if(U.length===0)return this.bell();if(this.value=this.parse(U=U.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()}_(U,Z){if(!this.valid(U))return this.bell();const J=Date.now();if(J-this.lastHit>1000)this.typed="";if(this.typed+=U,this.lastHit=J,this.color="cyan",U===".")return this.fire();if(this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire(),this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(E1.down(BQ(this.outputError,this.out.columns)-1)+i4(this.outputError,this.out.columns));this.out.write(i4(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[l1.symbol(this.done,this.aborted),G1.bold(this.msg),l1.delimiter(this.done),!this.done||!this.done&&!this.placeholder?G1[this.color]().underline(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split("\n").reduce((U,Z,J)=>U+`\n${J?" ":VQ.pointerSmall} ${G1.red().italic(Z)}`,"");this.out.write(HQ.line+E1.to(0)+this.outputText+E1.save+this.outputError+E1.restore)}}r4.exports=s4});var r1=E((Dz,ZU)=>{var n=A(),{cursor:RQ}=P(),WQ=Z0(),{clear:t4,figures:Y0,style:e4,wrap:$Q,entriesToDisplay:NQ}=g();class UU extends WQ{constructor(U={}){super(U);if(this.msg=U.message,this.cursor=U.cursor||0,this.scrollIndex=U.cursor||0,this.hint=U.hint||"",this.warn=U.warn||"- This option is disabled -",this.minSelected=U.min,this.showMinError=!1,this.maxChoices=U.max,this.instructions=U.instructions,this.optionsPerPage=U.optionsPerPage||10,this.value=U.choices.map((Z,J)=>{if(typeof Z==="string")Z={title:Z,value:J};return{title:Z&&(Z.title||Z.value||Z),description:Z&&Z.description,value:Z&&(Z.value===void 0?J:Z.value),selected:Z&&Z.selected,disabled:Z&&Z.disabled}}),this.clear=t4("",this.out.columns),!U.overrideRender)this.render()}reset(){this.value.map((U)=>!U.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((U)=>U.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){const U=this.value.filter((Z)=>Z.selected);if(this.minSelected&&U.length<this.minSelected)this.showMinError=!0,this.render();else this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),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(){if(this.cursor===0)this.cursor=this.value.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.value.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((U)=>U.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const U=this.value[this.cursor];if(U.selected)U.selected=!1,this.render();else if(U.disabled||this.value.filter((Z)=>Z.selected).length>=this.maxChoices)return this.bell();else U.selected=!0,this.render()}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();const U=!this.value[this.cursor].selected;this.value.filter((Z)=>!Z.disabled).forEach((Z)=>Z.selected=U),this.render()}_(U,Z){if(U===" ")this.handleSpaceToggle();else if(U==="a")this.toggleAll();else return this.bell()}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return"\nInstructions:\n"+` ${Y0.arrowUp}/${Y0.arrowDown}: Highlight option\n`+` ${Y0.arrowLeft}/${Y0.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===void 0?" a: Toggle all\n":"")+" enter/return: Complete answer"}return""}renderOption(U,Z,J,Q){const K=(Z.selected?n.green(Y0.radioOn):Y0.radioOff)+" "+Q+" ";let X,z;if(Z.disabled)X=U===J?n.gray().underline(Z.title):n.strikethrough().gray(Z.title);else if(X=U===J?n.cyan().underline(Z.title):Z.title,U===J&&Z.description){if(z=` - ${Z.description}`,K.length+X.length+z.length>=this.out.columns||Z.description.split(/\r?\n/).length>1)z="\n"+$Q(Z.description,{margin:K.length,width:this.out.columns})}return K+X+n.gray(z||"")}paginateOptions(U){if(U.length===0)return n.red("No matches for this query.");let{startIndex:Z,endIndex:J}=NQ(this.cursor,U.length,this.optionsPerPage),Q,K=[];for(let X=Z;X<J;X++){if(X===Z&&Z>0)Q=Y0.arrowUp;else if(X===J-1&&J<U.length)Q=Y0.arrowDown;else Q=" ";K.push(this.renderOption(this.cursor,U[X],X,Q))}return"\n"+K.join("\n")}renderOptions(U){if(!this.done)return this.paginateOptions(U);return""}renderDoneOrInstructions(){if(this.done)return this.value.filter((Z)=>Z.selected).map((Z)=>Z.title).join(", ");const U=[n.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled)U.push(n.yellow(this.warn));return U.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(RQ.hide);super.render();let U=[e4.symbol(this.done,this.aborted),n.bold(this.msg),e4.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)U+=n.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;U+=this.renderOptions(this.value),this.out.write(this.clear+U),this.clear=t4(U,this.out.columns)}}ZU.exports=UU});var YU=E((Gz,zU)=>{var g0=A(),OQ=Z0(),{erase:TQ,cursor:JU}=P(),{style:o1,clear:QU,figures:t1,wrap:IQ,entriesToDisplay:SQ}=g(),KU=(U,Z)=>U[Z]&&(U[Z].value||U[Z].title||U[Z]),LQ=(U,Z)=>U[Z]&&(U[Z].title||U[Z].value||U[Z]),AQ=(U,Z)=>{const J=U.findIndex((Q)=>Q.value===Z||Q.title===Z);return J>-1?J:void 0};class XU extends OQ{constructor(U={}){super(U);this.msg=U.message,this.suggest=U.suggest,this.choices=U.choices,this.initial=typeof U.initial==="number"?U.initial:AQ(U.choices,U.initial),this.select=this.initial||U.cursor||0,this.i18n={noMatches:U.noMatches||"no matches found"},this.fallback=U.fallback||this.initial,this.clearFirst=U.clearFirst||!1,this.suggestions=[],this.input="",this.limit=U.limit||10,this.cursor=0,this.transform=o1.render(U.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=QU("",this.out.columns),this.complete(this.render),this.render()}set fallback(U){this._fb=Number.isSafeInteger(parseInt(U))?parseInt(U):U}get fallback(){let U;if(typeof this._fb==="number")U=this.choices[this._fb];else if(typeof this._fb==="string")U={title:this._fb};return U||this._fb||{title:this.i18n.noMatches}}moveSelect(U){if(this.select=U,this.suggestions.length>0)this.value=KU(this.suggestions,U);else this.value=this.fallback.value;this.fire()}async complete(U){const Z=this.completing=this.suggest(this.input,this.choices),J=await Z;if(this.completing!==Z)return;this.suggestions=J.map((K,X,z)=>({title:LQ(z,X),value:KU(z,X),description:K.description})),this.completing=!1;const Q=Math.max(J.length-1,0);this.moveSelect(Math.min(Q,this.select)),U&&U()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){if(this.clearFirst&&this.input.length>0)this.reset();else this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(U,Z){let J=this.input.slice(0,this.cursor),Q=this.input.slice(this.cursor);this.input=`${J}${U}${Q}`,this.cursor=J.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let U=this.input.slice(0,this.cursor-1),Z=this.input.slice(this.cursor);this.input=`${U}${Z}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let U=this.input.slice(0,this.cursor),Z=this.input.slice(this.cursor+1);this.input=`${U}${Z}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){if(this.select===0)this.moveSelect(this.suggestions.length-1);else this.moveSelect(this.select-1);this.render()}down(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else 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(U,Z,J,Q){let K,X=J?t1.arrowUp:Q?t1.arrowDown:" ",z=Z?g0.cyan().underline(U.title):U.title;if(X=(Z?g0.cyan(t1.pointer)+" ":" ")+X,U.description){if(K=` - ${U.description}`,X.length+z.length+K.length>=this.out.columns||U.description.split(/\r?\n/).length>1)K="\n"+IQ(U.description,{margin:3,width:this.out.columns})}return X+" "+z+g0.gray(K||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(JU.hide);else this.out.write(QU(this.outputText,this.out.columns));super.render();let{startIndex:U,endIndex:Z}=SQ(this.select,this.choices.length,this.limit);if(this.outputText=[o1.symbol(this.done,this.aborted,this.exited),g0.bold(this.msg),o1.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const J=this.suggestions.slice(U,Z).map((Q,K)=>this.renderOption(Q,this.select===K+U,K===0&&U>0,K+U===Z-1&&Z<this.choices.length)).join("\n");this.outputText+="\n"+(J||g0.gray(this.fallback.title))}this.out.write(TQ.line+JU.to(0)+this.outputText)}}zU.exports=XU});var HU=E((Ez,FU)=>{var Q0=A(),{cursor:qQ}=P(),PQ=r1(),{clear:DU,style:GU,figures:I0}=g();class EU extends PQ{constructor(U={}){U.overrideRender=!0;super(U);this.inputValue="",this.clear=DU("",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(){if(this.cursor===0)this.cursor=this.filteredOptions.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.filteredOptions.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((U)=>U.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){if(this.inputValue.length)this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions()}updateFilteredOptions(){const U=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((J)=>{if(this.inputValue){if(typeof J.title==="string"){if(J.title.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}if(typeof J.value==="string"){if(J.value.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}return!1}return!0});const Z=this.filteredOptions.findIndex((J)=>J===U);this.cursor=Z<0?0:Z,this.render()}handleSpaceToggle(){const U=this.filteredOptions[this.cursor];if(U.selected)U.selected=!1,this.render();else if(U.disabled||this.value.filter((Z)=>Z.selected).length>=this.maxChoices)return this.bell();else U.selected=!0,this.render()}handleInputChange(U){this.inputValue=this.inputValue+U,this.updateFilteredOptions()}_(U,Z){if(U===" ")this.handleSpaceToggle();else this.handleInputChange(U)}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return`
|
|
9
|
+
Filtered results for: ${this.inputValue?this.inputValue:U0.gray("Enter something to filter")}\n`}renderOption(U,Z,J){let Q;if(Z.disabled)Q=U===J?U0.gray().underline(Z.title):U0.strikethrough().gray(Z.title);else Q=U===J?U0.cyan().underline(Z.title):Z.title;return(Z.selected?U0.green(O0.radioOn):O0.radioOff)+" "+Q}renderDoneOrInstructions(){if(this.done)return this.value.filter((Z)=>Z.selected).map((Z)=>Z.title).join(", ");const U=[U0.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled)U.push(U0.yellow(this.warn));return U.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(zJ.hide);super.render();let U=[E7.symbol(this.done,this.aborted),U0.bold(this.msg),E7.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)U+=U0.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;U+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+U),this.clear=G7(U,this.out.columns)}}V7.exports=H7});var I7=E((cX,O7)=>{var M7=A(),EJ=o(),W7=y(),F7=W7.style,HJ=W7.clear,$7=P(),VJ=$7.erase,R7=$7.cursor;class N7 extends EJ{constructor(U={}){super(U);this.msg=U.message,this.value=U.initial,this.initialValue=!!U.initial,this.yesMsg=U.yes||"yes",this.yesOption=U.yesOption||"(Y/n)",this.noMsg=U.no||"no",this.noOption=U.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(U,Z){if(U.toLowerCase()==="y")return this.value=!0,this.submit();if(U.toLowerCase()==="n")return this.value=!1,this.submit();return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(R7.hide);else this.out.write(HJ(this.outputText,this.out.columns));super.render(),this.outputText=[F7.symbol(this.done,this.aborted),M7.bold(this.msg),F7.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:M7.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(VJ.line+R7.to(0)+this.outputText)}}O7.exports=N7});var L7=E((pX,T7)=>{T7.exports={TextPrompt:a9(),SelectPrompt:o9(),TogglePrompt:K8(),DatePrompt:d8(),NumberPrompt:r8(),MultiselectPrompt:x1(),AutocompletePrompt:z7(),AutocompleteMultiselectPrompt:B7(),ConfirmPrompt:I7()}});var A7=E((S7)=>{var c=function(U,Z,J={}){return new Promise((Q,K)=>{const X=new BJ[U](Z),Y=J.onAbort||Q1,z=J.onSubmit||Q1,G=J.onExit||Q1;X.on("state",Z.onState||Q1),X.on("submit",(D)=>Q(z(D))),X.on("exit",(D)=>Q(G(D))),X.on("abort",(D)=>K(Y(D)))})},k=S7,BJ=L7(),Q1=(U)=>U;k.text=(U)=>c("TextPrompt",U);k.password=(U)=>{return U.style="password",k.text(U)};k.invisible=(U)=>{return U.style="invisible",k.text(U)};k.number=(U)=>c("NumberPrompt",U);k.date=(U)=>c("DatePrompt",U);k.confirm=(U)=>c("ConfirmPrompt",U);k.list=(U)=>{const Z=U.separator||",";return c("TextPrompt",U,{onSubmit:(J)=>J.split(Z).map((Q)=>Q.trim())})};k.toggle=(U)=>c("TogglePrompt",U);k.select=(U)=>c("SelectPrompt",U);k.multiselect=(U)=>{U.choices=[].concat(U.choices||[]);const Z=(J)=>J.filter((Q)=>Q.selected).map((Q)=>Q.value);return c("MultiselectPrompt",U,{onAbort:Z,onSubmit:Z})};k.autocompleteMultiselect=(U)=>{U.choices=[].concat(U.choices||[]);const Z=(J)=>J.filter((Q)=>Q.selected).map((Q)=>Q.value);return c("AutocompleteMultiselectPrompt",U,{onAbort:Z,onSubmit:Z})};var MJ=(U,Z)=>Promise.resolve(Z.filter((J)=>J.title.slice(0,U.length).toLowerCase()===U.toLowerCase()));k.autocomplete=(U)=>{return U.suggest=U.suggest||MJ,U.choices=[].concat(U.choices||[]),c("AutocompletePrompt",U)}});var k7=E((aX,f7)=>{var q7=function(U,Z){var J=Object.keys(U);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(U);if(Z)Q=Q.filter(function(K){return Object.getOwnPropertyDescriptor(U,K).enumerable});J.push.apply(J,Q)}return J},P7=function(U){for(var Z=1;Z<arguments.length;Z++){var J=arguments[Z]!=null?arguments[Z]:{};if(Z%2)q7(Object(J),!0).forEach(function(Q){FJ(U,Q,J[Q])});else if(Object.getOwnPropertyDescriptors)Object.defineProperties(U,Object.getOwnPropertyDescriptors(J));else q7(Object(J)).forEach(function(Q){Object.defineProperty(U,Q,Object.getOwnPropertyDescriptor(J,Q))})}return U},FJ=function(U,Z,J){if(Z in U)Object.defineProperty(U,Z,{value:J,enumerable:!0,configurable:!0,writable:!0});else U[Z]=J;return U},RJ=function(U,Z){var J=typeof Symbol!=="undefined"&&U[Symbol.iterator]||U["@@iterator"];if(!J){if(Array.isArray(U)||(J=WJ(U))||Z&&U&&typeof U.length==="number"){if(J)U=J;var Q=0,K=function G(){};return{s:K,n:function G(){if(Q>=U.length)return{done:!0};return{done:!1,value:U[Q++]}},e:function G(D){throw D},f:K}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var X=!0,Y=!1,z;return{s:function G(){J=J.call(U)},n:function G(){var D=J.next();return X=D.done,D},e:function G(D){Y=!0,z=D},f:function G(){try{if(!X&&J.return!=null)J.return()}finally{if(Y)throw z}}}},WJ=function(U,Z){if(!U)return;if(typeof U==="string")return j7(U,Z);var J=Object.prototype.toString.call(U).slice(8,-1);if(J==="Object"&&U.constructor)J=U.constructor.name;if(J==="Map"||J==="Set")return Array.from(U);if(J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J))return j7(U,Z)},j7=function(U,Z){if(Z==null||Z>U.length)Z=U.length;for(var J=0,Q=new Array(Z);J<Z;J++)Q[J]=U[J];return Q},C7=function(U,Z,J,Q,K,X,Y){try{var z=U[X](Y),G=z.value}catch(D){J(D);return}if(z.done)Z(G);else Promise.resolve(G).then(Q,K)},_7=function(U){return function(){var Z=this,J=arguments;return new Promise(function(Q,K){var X=U.apply(Z,J);function Y(G){C7(X,Q,K,Y,z,"next",G)}function z(G){C7(X,Q,K,Y,z,"throw",G)}Y(void 0)})}},Y0=function(){return d1.apply(this,arguments)},d1=function(){return d1=_7(function*(U=[],{onSubmit:Z=w7,onCancel:J=w7}={}){const Q={},K=Y0._override||{};U=[].concat(U);let X,Y,z,G,D,F;const I=function(){var M=_7(function*(R,W,C=!1){if(!C&&R.validate&&R.validate(W)!==!0)return;return R.format?yield R.format(W,Q):W});return function R(W,C){return M.apply(this,arguments)}}();var N=RJ(U),H;try{for(N.s();!(H=N.n()).done;){Y=H.value;var V=Y;if(G=V.name,D=V.type,typeof D==="function")D=yield D(X,P7({},Q),Y),Y.type=D;if(!D)continue;for(let M in Y){if($J.includes(M))continue;let R=Y[M];Y[M]=typeof R==="function"?yield R(X,P7({},Q),F):R}if(F=Y,typeof Y.message!=="string")throw new Error("prompt message is required");var B=Y;if(G=B.name,D=B.type,u1[D]===void 0)throw new Error(`prompt type (${D}) is not defined`);if(K[Y.name]!==void 0){if(X=yield I(Y,K[Y.name]),X!==void 0){Q[G]=X;continue}}try{X=Y0._injected?NJ(Y0._injected,Y.initial):yield u1[D](Y),Q[G]=X=yield I(Y,X,!0),z=yield Z(Y,X,Q)}catch(M){z=!(yield J(Y,Q))}if(z)return Q}}catch(M){N.e(M)}finally{N.f()}return Q}),d1.apply(this,arguments)},NJ=function(U,Z){const J=U.shift();if(J instanceof Error)throw J;return J===void 0?Z:J},OJ=function(U){Y0._injected=(Y0._injected||[]).concat(U)},IJ=function(U){Y0._override=Object.assign({},U)},u1=A7(),$J=["suggest","format","onState","validate","onRender","type"],w7=()=>{};f7.exports=Object.assign(Y0,{prompt:Y0,prompts:u1,inject:OJ,override:IJ})});var h7=E((lX,b7)=>{b7.exports=(U,Z)=>{if(U.meta&&U.name!=="escape")return;if(U.ctrl){if(U.name==="a")return"first";if(U.name==="c")return"abort";if(U.name==="d")return"abort";if(U.name==="e")return"last";if(U.name==="g")return"reset"}if(Z){if(U.name==="j")return"down";if(U.name==="k")return"up"}if(U.name==="return")return"submit";if(U.name==="enter")return"submit";if(U.name==="backspace")return"delete";if(U.name==="delete")return"deleteForward";if(U.name==="abort")return"abort";if(U.name==="escape")return"exit";if(U.name==="tab")return"next";if(U.name==="pagedown")return"nextPage";if(U.name==="pageup")return"prevPage";if(U.name==="home")return"home";if(U.name==="end")return"end";if(U.name==="up")return"up";if(U.name==="down")return"down";if(U.name==="right")return"right";if(U.name==="left")return"left";return!1}});var K1=E((iX,v7)=>{v7.exports=(U)=>{const Z=["[\\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("|"),J=new RegExp(Z,"g");return typeof U==="string"?U.replace(J,""):U}});var g7=E((sX,y7)=>{var TJ=K1(),{erase:x7,cursor:LJ}=P(),SJ=(U)=>[...TJ(U)].length;y7.exports=function(U,Z){if(!Z)return x7.line+LJ.to(0);let J=0;const Q=U.split(/\r?\n/);for(let K of Q)J+=1+Math.floor(Math.max(SJ(K)-1,0)/Z);return x7.lines(J)}});var c1=E((rX,m7)=>{var v0={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},AJ={arrowUp:v0.arrowUp,arrowDown:v0.arrowDown,arrowLeft:v0.arrowLeft,arrowRight:v0.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},qJ=process.platform==="win32"?AJ:v0;m7.exports=qJ});var d7=E((oX,u7)=>{var I0=A(),B0=c1(),p1=Object.freeze({password:{scale:1,render:(U)=>"*".repeat(U.length)},emoji:{scale:2,render:(U)=>"\uD83D\uDE03".repeat(U.length)},invisible:{scale:0,render:(U)=>""},default:{scale:1,render:(U)=>`${U}`}}),PJ=(U)=>p1[U]||p1.default,x0=Object.freeze({aborted:I0.red(B0.cross),done:I0.green(B0.tick),exited:I0.yellow(B0.cross),default:I0.cyan("?")}),jJ=(U,Z,J)=>Z?x0.aborted:J?x0.exited:U?x0.done:x0.default,CJ=(U)=>I0.gray(U?B0.ellipsis:B0.pointerSmall),_J=(U,Z)=>I0.gray(U?Z?B0.pointerSmall:"+":B0.line);u7.exports={styles:p1,render:PJ,symbols:x0,symbol:jJ,delimiter:CJ,item:_J}});var p7=E((tX,c7)=>{var wJ=K1();c7.exports=function(U,Z){let J=String(wJ(U)||"").split(/\r?\n/);if(!Z)return J.length;return J.map((Q)=>Math.ceil(Q.length/Z)).reduce((Q,K)=>Q+K)}});var a7=E((eX,n7)=>{n7.exports=(U,Z={})=>{const J=Number.isSafeInteger(parseInt(Z.margin))?new Array(parseInt(Z.margin)).fill(" ").join(""):Z.margin||"",Q=Z.width;return(U||"").split(/\r?\n/g).map((K)=>K.split(/\s+/g).reduce((X,Y)=>{if(Y.length+J.length>=Q||X[X.length-1].length+Y.length+1<Q)X[X.length-1]+=` ${Y}`;else X.push(`${J}${Y}`);return X},[J]).join("\n")).join("\n")}});var i7=E((UY,l7)=>{l7.exports=(U,Z,J)=>{J=J||Z;let Q=Math.min(Z-J,U-Math.floor(J/2));if(Q<0)Q=0;let K=Math.min(Q+J,Z);return{startIndex:Q,endIndex:K}}});var g=E((ZY,s7)=>{s7.exports={action:h7(),clear:g7(),style:d7(),strip:K1(),figures:c1(),lines:p7(),wrap:a7(),entriesToDisplay:i7()}});var Z0=E((JY,t7)=>{var r7=import.meta.require("readline"),{action:fJ}=g(),kJ=import.meta.require("events"),{beep:bJ,cursor:hJ}=P(),vJ=A();class o7 extends kJ{constructor(U={}){super();this.firstRender=!0,this.in=U.stdin||process.stdin,this.out=U.stdout||process.stdout,this.onRender=(U.onRender||(()=>{return})).bind(this);const Z=r7.createInterface({input:this.in,escapeCodeTimeout:50});if(r7.emitKeypressEvents(this.in,Z),this.in.isTTY)this.in.setRawMode(!0);const J=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,Q=(K,X)=>{let Y=fJ(X,J);if(Y===!1)this._&&this._(K,X);else if(typeof this[Y]==="function")this[Y](X);else this.bell()};this.close=()=>{if(this.out.write(hJ.show),this.in.removeListener("keypress",Q),this.in.isTTY)this.in.setRawMode(!1);Z.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",Q)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(bJ)}render(){if(this.onRender(vJ),this.firstRender)this.firstRender=!1}}t7.exports=o7});var Z4=E((QY,U4)=>{var X1=A(),xJ=Z0(),{erase:yJ,cursor:y0}=P(),{style:n1,clear:a1,lines:gJ,figures:mJ}=g();class e7 extends xJ{constructor(U={}){super(U);this.transform=n1.render(U.style),this.scale=this.transform.scale,this.msg=U.message,this.initial=U.initial||"",this.validator=U.validate||(()=>!0),this.value="",this.errorMsg=U.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=a1("",this.out.columns),this.render()}set value(U){if(!U&&this.initial)this.placeholder=!0,this.rendered=X1.gray(this.transform.render(this.initial));else this.placeholder=!1,this.rendered=this.transform.render(U);this._value=U,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let U=await this.validator(this.value);if(typeof U==="string")this.errorMsg=U,U=!1;this.error=!U}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=!0,this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(U){if(this.placeholder)return;this.cursor=this.cursor+U,this.cursorOffset+=U}_(U,Z){let J=this.value.slice(0,this.cursor),Q=this.value.slice(this.cursor);this.value=`${J}${U}${Q}`,this.red=!1,this.cursor=this.placeholder?0:J.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let U=this.value.slice(0,this.cursor-1),Z=this.value.slice(this.cursor);if(this.value=`${U}${Z}`,this.red=!1,this.isCursorAtStart())this.cursorOffset=0;else this.cursorOffset++,this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let U=this.value.slice(0,this.cursor),Z=this.value.slice(this.cursor+1);if(this.value=`${U}${Z}`,this.red=!1,this.isCursorAtEnd())this.cursorOffset=0;else 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(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(y0.down(gJ(this.outputError,this.out.columns)-1)+a1(this.outputError,this.out.columns));this.out.write(a1(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[n1.symbol(this.done,this.aborted),X1.bold(this.msg),n1.delimiter(this.done),this.red?X1.red(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split("\n").reduce((U,Z,J)=>U+`\n${J?" ":mJ.pointerSmall} ${X1.red().italic(Z)}`,"");this.out.write(yJ.line+y0.to(0)+this.outputText+y0.save+this.outputError+y0.restore+y0.move(this.cursorOffset,0))}}U4.exports=e7});var Y4=E((KY,X4)=>{var J0=A(),uJ=Z0(),{style:J4,clear:Q4,figures:Y1,wrap:dJ,entriesToDisplay:cJ}=g(),{cursor:pJ}=P();class K4 extends uJ{constructor(U={}){super(U);this.msg=U.message,this.hint=U.hint||"- Use arrow-keys. Return to submit.",this.warn=U.warn||"- This option is disabled",this.cursor=U.initial||0,this.choices=U.choices.map((Z,J)=>{if(typeof Z==="string")Z={title:Z,value:J};return{title:Z&&(Z.title||Z.value||Z),value:Z&&(Z.value===void 0?J:Z.value),description:Z&&Z.description,selected:Z&&Z.selected,disabled:Z&&Z.disabled}}),this.optionsPerPage=U.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=Q4("",this.out.columns),this.render()}moveCursor(U){this.cursor=U,this.value=this.choices[U].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){if(!this.selection.disabled)this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close();else this.bell()}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){if(this.cursor===0)this.moveCursor(this.choices.length-1);else this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)this.moveCursor(0);else this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(U,Z){if(U===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(pJ.hide);else this.out.write(Q4(this.outputText,this.out.columns));super.render();let{startIndex:U,endIndex:Z}=cJ(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[J4.symbol(this.done,this.aborted),J0.bold(this.msg),J4.delimiter(!1),this.done?this.selection.title:this.selection.disabled?J0.yellow(this.warn):J0.gray(this.hint)].join(" "),!this.done){this.outputText+="\n";for(let J=U;J<Z;J++){let Q,K,X="",Y=this.choices[J];if(J===U&&U>0)K=Y1.arrowUp;else if(J===Z-1&&Z<this.choices.length)K=Y1.arrowDown;else K=" ";if(Y.disabled)Q=this.cursor===J?J0.gray().underline(Y.title):J0.strikethrough().gray(Y.title),K=(this.cursor===J?J0.bold().gray(Y1.pointer)+" ":" ")+K;else if(Q=this.cursor===J?J0.cyan().underline(Y.title):Y.title,K=(this.cursor===J?J0.cyan(Y1.pointer)+" ":" ")+K,Y.description&&this.cursor===J){if(X=` - ${Y.description}`,K.length+Q.length+X.length>=this.out.columns||Y.description.split(/\r?\n/).length>1)X="\n"+dJ(Y.description,{margin:3,width:this.out.columns})}this.outputText+=`${K} ${Q}${J0.gray(X)}\n`}}this.out.write(this.outputText)}}X4.exports=K4});var H4=E((XY,E4)=>{var D1=A(),nJ=Z0(),{style:D4,clear:aJ}=g(),{cursor:z4,erase:lJ}=P();class G4 extends nJ{constructor(U={}){super(U);this.msg=U.message,this.value=!!U.initial,this.active=U.active||"on",this.inactive=U.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=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,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()}_(U,Z){if(U===" ")this.value=!this.value;else if(U==="1")this.value=!0;else if(U==="0")this.value=!1;else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(z4.hide);else this.out.write(aJ(this.outputText,this.out.columns));super.render(),this.outputText=[D4.symbol(this.done,this.aborted),D1.bold(this.msg),D4.delimiter(this.done),this.value?this.inactive:D1.cyan().underline(this.inactive),D1.gray("/"),this.value?D1.cyan().underline(this.active):this.active].join(" "),this.out.write(lJ.line+z4.to(0)+this.outputText)}}E4.exports=G4});var p=E((YY,V4)=>{class z1{constructor({token:U,date:Z,parts:J,locales:Q}){this.token=U,this.date=Z||new Date,this.parts=J||[this],this.locales=Q||{}}up(){}down(){}next(){const U=this.parts.indexOf(this);return this.parts.find((Z,J)=>J>U&&Z instanceof z1)}setTo(U){}prev(){let U=[].concat(this.parts).reverse();const Z=U.indexOf(this);return U.find((J,Q)=>Q>Z&&J instanceof z1)}toString(){return String(this.date)}}V4.exports=z1});var F4=E((DY,M4)=>{var iJ=p();class B4 extends iJ{constructor(U={}){super(U)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let U=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?U.toUpperCase():U}}M4.exports=B4});var $4=E((zY,W4)=>{var sJ=p(),rJ=(U)=>{return U=U%10,U===1?"st":U===2?"nd":U===3?"rd":"th"};class R4 extends sJ{constructor(U={}){super(U)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(U){this.date.setDate(parseInt(U.substr(-2)))}toString(){let U=this.date.getDate(),Z=this.date.getDay();return this.token==="DD"?String(U).padStart(2,"0"):this.token==="Do"?U+rJ(U):this.token==="d"?Z+1:this.token==="ddd"?this.locales.weekdaysShort[Z]:this.token==="dddd"?this.locales.weekdays[Z]:U}}W4.exports=R4});var I4=E((GY,O4)=>{var oJ=p();class N4 extends oJ{constructor(U={}){super(U)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(U){this.date.setHours(parseInt(U.substr(-2)))}toString(){let U=this.date.getHours();if(/h/.test(this.token))U=U%12||12;return this.token.length>1?String(U).padStart(2,"0"):U}}O4.exports=N4});var S4=E((EY,L4)=>{var tJ=p();class T4 extends tJ{constructor(U={}){super(U)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(U){this.date.setMilliseconds(parseInt(U.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}L4.exports=T4});var P4=E((HY,q4)=>{var eJ=p();class A4 extends eJ{constructor(U={}){super(U)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(U){this.date.setMinutes(parseInt(U.substr(-2)))}toString(){let U=this.date.getMinutes();return this.token.length>1?String(U).padStart(2,"0"):U}}q4.exports=A4});var _4=E((VY,C4)=>{var UQ=p();class j4 extends UQ{constructor(U={}){super(U)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(U){U=parseInt(U.substr(-2))-1,this.date.setMonth(U<0?0:U)}toString(){let U=this.date.getMonth(),Z=this.token.length;return Z===2?String(U+1).padStart(2,"0"):Z===3?this.locales.monthsShort[U]:Z===4?this.locales.months[U]:String(U+1)}}C4.exports=j4});var k4=E((BY,f4)=>{var ZQ=p();class w4 extends ZQ{constructor(U={}){super(U)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(U){this.date.setSeconds(parseInt(U.substr(-2)))}toString(){let U=this.date.getSeconds();return this.token.length>1?String(U).padStart(2,"0"):U}}f4.exports=w4});var v4=E((MY,h4)=>{var JQ=p();class b4 extends JQ{constructor(U={}){super(U)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(U){this.date.setFullYear(U.substr(-4))}toString(){let U=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?U.substr(-2):U}}h4.exports=b4});var y4=E((FY,x4)=>{x4.exports={DatePart:p(),Meridiem:F4(),Day:$4(),Hours:I4(),Milliseconds:S4(),Minutes:P4(),Month:_4(),Seconds:k4(),Year:v4()}});var a4=E((RY,n4)=>{var l1=A(),QQ=Z0(),{style:g4,clear:m4,figures:KQ}=g(),{erase:XQ,cursor:u4}=P(),{DatePart:d4,Meridiem:YQ,Day:DQ,Hours:zQ,Milliseconds:GQ,Minutes:EQ,Month:HQ,Seconds:VQ,Year:BQ}=y4(),MQ=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,c4={1:({token:U})=>U.replace(/\\(.)/g,"$1"),2:(U)=>new DQ(U),3:(U)=>new HQ(U),4:(U)=>new BQ(U),5:(U)=>new YQ(U),6:(U)=>new zQ(U),7:(U)=>new EQ(U),8:(U)=>new VQ(U),9:(U)=>new GQ(U)},FQ={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 p4 extends QQ{constructor(U={}){super(U);this.msg=U.message,this.cursor=0,this.typed="",this.locales=Object.assign(FQ,U.locales),this._date=U.initial||new Date,this.errorMsg=U.error||"Please Enter A Valid Value",this.validator=U.validate||(()=>!0),this.mask=U.mask||"YYYY-MM-DD HH:mm:ss",this.clear=m4("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(U){if(U)this._date.setTime(U.getTime())}set mask(U){let Z;this.parts=[];while(Z=MQ.exec(U)){let Q=Z.shift(),K=Z.findIndex((X)=>X!=null);this.parts.push(K in c4?c4[K]({token:Z[K]||Q,date:this.date,parts:this.parts,locales:this.locales}):Z[K]||Q)}let J=this.parts.reduce((Q,K)=>{if(typeof K==="string"&&typeof Q[Q.length-1]==="string")Q[Q.length-1]+=K;else Q.push(K);return Q},[]);this.parts.splice(0),this.parts.push(...J),this.reset()}moveCursor(U){this.typed="",this.cursor=U,this.fire()}reset(){this.moveCursor(this.parts.findIndex((U)=>U instanceof d4)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let U=await this.validator(this.value);if(typeof U==="string")this.errorMsg=U,U=!1;this.error=!U}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let U=this.parts[this.cursor].prev();if(U==null)return this.bell();this.moveCursor(this.parts.indexOf(U)),this.render()}right(){let U=this.parts[this.cursor].next();if(U==null)return this.bell();this.moveCursor(this.parts.indexOf(U)),this.render()}next(){let U=this.parts[this.cursor].next();this.moveCursor(U?this.parts.indexOf(U):this.parts.findIndex((Z)=>Z instanceof d4)),this.render()}_(U){if(/\d/.test(U))this.typed+=U,this.parts[this.cursor].setTo(this.typed),this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(u4.hide);else this.out.write(m4(this.outputText,this.out.columns));if(super.render(),this.outputText=[g4.symbol(this.done,this.aborted),l1.bold(this.msg),g4.delimiter(!1),this.parts.reduce((U,Z,J)=>U.concat(J===this.cursor&&!this.done?l1.cyan().underline(Z.toString()):Z),[]).join("")].join(" "),this.error)this.outputText+=this.errorMsg.split("\n").reduce((U,Z,J)=>U+`\n${J?" ":KQ.pointerSmall} ${l1.red().italic(Z)}`,"");this.out.write(XQ.line+u4.to(0)+this.outputText)}}n4.exports=p4});var o4=E((WY,r4)=>{var G1=A(),RQ=Z0(),{cursor:E1,erase:WQ}=P(),{style:i1,figures:$Q,clear:l4,lines:NQ}=g(),OQ=/[0-9]/,s1=(U)=>U!==void 0,i4=(U,Z)=>{let J=Math.pow(10,Z);return Math.round(U*J)/J};class s4 extends RQ{constructor(U={}){super(U);this.transform=i1.render(U.style),this.msg=U.message,this.initial=s1(U.initial)?U.initial:"",this.float=!!U.float,this.round=U.round||2,this.inc=U.increment||1,this.min=s1(U.min)?U.min:(-Infinity),this.max=s1(U.max)?U.max:Infinity,this.errorMsg=U.error||"Please Enter A Valid Value",this.validator=U.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(U){if(!U&&U!==0)this.placeholder=!0,this.rendered=G1.gray(this.transform.render(`${this.initial}`)),this._value="";else this.placeholder=!1,this.rendered=this.transform.render(`${i4(U,this.round)}`),this._value=i4(U,this.round);this.fire()}get value(){return this._value}parse(U){return this.float?parseFloat(U):parseInt(U)}valid(U){return U==="-"||U==="."&&this.float||OQ.test(U)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let U=this.value;this.value=U!==""?U:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let U=await this.validator(this.value);if(typeof U==="string")this.errorMsg=U,U=!1;this.error=!U}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let U=this.value;this.value=U!==""?U:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}up(){if(this.typed="",this.value==="")this.value=this.min-this.inc;if(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;if(this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let U=this.value.toString();if(U.length===0)return this.bell();if(this.value=this.parse(U=U.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()}_(U,Z){if(!this.valid(U))return this.bell();const J=Date.now();if(J-this.lastHit>1000)this.typed="";if(this.typed+=U,this.lastHit=J,this.color="cyan",U===".")return this.fire();if(this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire(),this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(E1.down(NQ(this.outputError,this.out.columns)-1)+l4(this.outputError,this.out.columns));this.out.write(l4(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[i1.symbol(this.done,this.aborted),G1.bold(this.msg),i1.delimiter(this.done),!this.done||!this.done&&!this.placeholder?G1[this.color]().underline(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split("\n").reduce((U,Z,J)=>U+`\n${J?" ":$Q.pointerSmall} ${G1.red().italic(Z)}`,"");this.out.write(WQ.line+E1.to(0)+this.outputText+E1.save+this.outputError+E1.restore)}}r4.exports=s4});var r1=E(($Y,ZU)=>{var n=A(),{cursor:IQ}=P(),TQ=Z0(),{clear:t4,figures:D0,style:e4,wrap:LQ,entriesToDisplay:SQ}=g();class UU extends TQ{constructor(U={}){super(U);if(this.msg=U.message,this.cursor=U.cursor||0,this.scrollIndex=U.cursor||0,this.hint=U.hint||"",this.warn=U.warn||"- This option is disabled -",this.minSelected=U.min,this.showMinError=!1,this.maxChoices=U.max,this.instructions=U.instructions,this.optionsPerPage=U.optionsPerPage||10,this.value=U.choices.map((Z,J)=>{if(typeof Z==="string")Z={title:Z,value:J};return{title:Z&&(Z.title||Z.value||Z),description:Z&&Z.description,value:Z&&(Z.value===void 0?J:Z.value),selected:Z&&Z.selected,disabled:Z&&Z.disabled}}),this.clear=t4("",this.out.columns),!U.overrideRender)this.render()}reset(){this.value.map((U)=>!U.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((U)=>U.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){const U=this.value.filter((Z)=>Z.selected);if(this.minSelected&&U.length<this.minSelected)this.showMinError=!0,this.render();else this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),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(){if(this.cursor===0)this.cursor=this.value.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.value.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((U)=>U.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const U=this.value[this.cursor];if(U.selected)U.selected=!1,this.render();else if(U.disabled||this.value.filter((Z)=>Z.selected).length>=this.maxChoices)return this.bell();else U.selected=!0,this.render()}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();const U=!this.value[this.cursor].selected;this.value.filter((Z)=>!Z.disabled).forEach((Z)=>Z.selected=U),this.render()}_(U,Z){if(U===" ")this.handleSpaceToggle();else if(U==="a")this.toggleAll();else return this.bell()}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return"\nInstructions:\n"+` ${D0.arrowUp}/${D0.arrowDown}: Highlight option\n`+` ${D0.arrowLeft}/${D0.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===void 0?" a: Toggle all\n":"")+" enter/return: Complete answer"}return""}renderOption(U,Z,J,Q){const K=(Z.selected?n.green(D0.radioOn):D0.radioOff)+" "+Q+" ";let X,Y;if(Z.disabled)X=U===J?n.gray().underline(Z.title):n.strikethrough().gray(Z.title);else if(X=U===J?n.cyan().underline(Z.title):Z.title,U===J&&Z.description){if(Y=` - ${Z.description}`,K.length+X.length+Y.length>=this.out.columns||Z.description.split(/\r?\n/).length>1)Y="\n"+LQ(Z.description,{margin:K.length,width:this.out.columns})}return K+X+n.gray(Y||"")}paginateOptions(U){if(U.length===0)return n.red("No matches for this query.");let{startIndex:Z,endIndex:J}=SQ(this.cursor,U.length,this.optionsPerPage),Q,K=[];for(let X=Z;X<J;X++){if(X===Z&&Z>0)Q=D0.arrowUp;else if(X===J-1&&J<U.length)Q=D0.arrowDown;else Q=" ";K.push(this.renderOption(this.cursor,U[X],X,Q))}return"\n"+K.join("\n")}renderOptions(U){if(!this.done)return this.paginateOptions(U);return""}renderDoneOrInstructions(){if(this.done)return this.value.filter((Z)=>Z.selected).map((Z)=>Z.title).join(", ");const U=[n.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled)U.push(n.yellow(this.warn));return U.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(IQ.hide);super.render();let U=[e4.symbol(this.done,this.aborted),n.bold(this.msg),e4.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)U+=n.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;U+=this.renderOptions(this.value),this.out.write(this.clear+U),this.clear=t4(U,this.out.columns)}}ZU.exports=UU});var DU=E((NY,YU)=>{var g0=A(),AQ=Z0(),{erase:qQ,cursor:JU}=P(),{style:o1,clear:QU,figures:t1,wrap:PQ,entriesToDisplay:jQ}=g(),KU=(U,Z)=>U[Z]&&(U[Z].value||U[Z].title||U[Z]),CQ=(U,Z)=>U[Z]&&(U[Z].title||U[Z].value||U[Z]),_Q=(U,Z)=>{const J=U.findIndex((Q)=>Q.value===Z||Q.title===Z);return J>-1?J:void 0};class XU extends AQ{constructor(U={}){super(U);this.msg=U.message,this.suggest=U.suggest,this.choices=U.choices,this.initial=typeof U.initial==="number"?U.initial:_Q(U.choices,U.initial),this.select=this.initial||U.cursor||0,this.i18n={noMatches:U.noMatches||"no matches found"},this.fallback=U.fallback||this.initial,this.clearFirst=U.clearFirst||!1,this.suggestions=[],this.input="",this.limit=U.limit||10,this.cursor=0,this.transform=o1.render(U.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=QU("",this.out.columns),this.complete(this.render),this.render()}set fallback(U){this._fb=Number.isSafeInteger(parseInt(U))?parseInt(U):U}get fallback(){let U;if(typeof this._fb==="number")U=this.choices[this._fb];else if(typeof this._fb==="string")U={title:this._fb};return U||this._fb||{title:this.i18n.noMatches}}moveSelect(U){if(this.select=U,this.suggestions.length>0)this.value=KU(this.suggestions,U);else this.value=this.fallback.value;this.fire()}async complete(U){const Z=this.completing=this.suggest(this.input,this.choices),J=await Z;if(this.completing!==Z)return;this.suggestions=J.map((K,X,Y)=>({title:CQ(Y,X),value:KU(Y,X),description:K.description})),this.completing=!1;const Q=Math.max(J.length-1,0);this.moveSelect(Math.min(Q,this.select)),U&&U()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){if(this.clearFirst&&this.input.length>0)this.reset();else this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(U,Z){let J=this.input.slice(0,this.cursor),Q=this.input.slice(this.cursor);this.input=`${J}${U}${Q}`,this.cursor=J.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let U=this.input.slice(0,this.cursor-1),Z=this.input.slice(this.cursor);this.input=`${U}${Z}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let U=this.input.slice(0,this.cursor),Z=this.input.slice(this.cursor+1);this.input=`${U}${Z}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){if(this.select===0)this.moveSelect(this.suggestions.length-1);else this.moveSelect(this.select-1);this.render()}down(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else 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(U,Z,J,Q){let K,X=J?t1.arrowUp:Q?t1.arrowDown:" ",Y=Z?g0.cyan().underline(U.title):U.title;if(X=(Z?g0.cyan(t1.pointer)+" ":" ")+X,U.description){if(K=` - ${U.description}`,X.length+Y.length+K.length>=this.out.columns||U.description.split(/\r?\n/).length>1)K="\n"+PQ(U.description,{margin:3,width:this.out.columns})}return X+" "+Y+g0.gray(K||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(JU.hide);else this.out.write(QU(this.outputText,this.out.columns));super.render();let{startIndex:U,endIndex:Z}=jQ(this.select,this.choices.length,this.limit);if(this.outputText=[o1.symbol(this.done,this.aborted,this.exited),g0.bold(this.msg),o1.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const J=this.suggestions.slice(U,Z).map((Q,K)=>this.renderOption(Q,this.select===K+U,K===0&&U>0,K+U===Z-1&&Z<this.choices.length)).join("\n");this.outputText+="\n"+(J||g0.gray(this.fallback.title))}this.out.write(qQ.line+JU.to(0)+this.outputText)}}YU.exports=XU});var VU=E((OY,HU)=>{var Q0=A(),{cursor:wQ}=P(),fQ=r1(),{clear:zU,style:GU,figures:T0}=g();class EU extends fQ{constructor(U={}){U.overrideRender=!0;super(U);this.inputValue="",this.clear=zU("",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(){if(this.cursor===0)this.cursor=this.filteredOptions.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.filteredOptions.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((U)=>U.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){if(this.inputValue.length)this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions()}updateFilteredOptions(){const U=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((J)=>{if(this.inputValue){if(typeof J.title==="string"){if(J.title.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}if(typeof J.value==="string"){if(J.value.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}return!1}return!0});const Z=this.filteredOptions.findIndex((J)=>J===U);this.cursor=Z<0?0:Z,this.render()}handleSpaceToggle(){const U=this.filteredOptions[this.cursor];if(U.selected)U.selected=!1,this.render();else if(U.disabled||this.value.filter((Z)=>Z.selected).length>=this.maxChoices)return this.bell();else U.selected=!0,this.render()}handleInputChange(U){this.inputValue=this.inputValue+U,this.updateFilteredOptions()}_(U,Z){if(U===" ")this.handleSpaceToggle();else this.handleInputChange(U)}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return`
|
|
10
10
|
Instructions:
|
|
11
|
-
${
|
|
12
|
-
${
|
|
11
|
+
${T0.arrowUp}/${T0.arrowDown}: Highlight option
|
|
12
|
+
${T0.arrowLeft}/${T0.arrowRight}/[space]: Toggle selection
|
|
13
13
|
[a,b,c]/delete: Filter choices
|
|
14
14
|
enter/return: Complete answer
|
|
15
15
|
`}return""}renderCurrentInput(){return`
|
|
16
|
-
Filtered results for: ${this.inputValue?this.inputValue:Q0.gray("Enter something to filter")}\n`}renderOption(U,Z,J){let Q;if(Z.disabled)Q=U===J?Q0.gray().underline(Z.title):Q0.strikethrough().gray(Z.title);else Q=U===J?Q0.cyan().underline(Z.title):Z.title;return(Z.selected?Q0.green(I0.radioOn):I0.radioOff)+" "+Q}renderDoneOrInstructions(){if(this.done)return this.value.filter((Z)=>Z.selected).map((Z)=>Z.title).join(", ");const U=[Q0.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled)U.push(Q0.yellow(this.warn));return U.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(qQ.hide);super.render();let U=[GU.symbol(this.done,this.aborted),Q0.bold(this.msg),GU.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)U+=Q0.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;U+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+U),this.clear=DU(U,this.out.columns)}}FU.exports=EU});var $U=E((Fz,WU)=>{var VU=A(),jQ=Z0(),{style:BU,clear:CQ}=g(),{erase:_Q,cursor:MU}=P();class RU extends jQ{constructor(U={}){super(U);this.msg=U.message,this.value=U.initial,this.initialValue=!!U.initial,this.yesMsg=U.yes||"yes",this.yesOption=U.yesOption||"(Y/n)",this.noMsg=U.no||"no",this.noOption=U.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(U,Z){if(U.toLowerCase()==="y")return this.value=!0,this.submit();if(U.toLowerCase()==="n")return this.value=!1,this.submit();return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(MU.hide);else this.out.write(CQ(this.outputText,this.out.columns));super.render(),this.outputText=[BU.symbol(this.done,this.aborted),VU.bold(this.msg),BU.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:VU.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(_Q.line+MU.to(0)+this.outputText)}}WU.exports=RU});var OU=E((Hz,NU)=>{NU.exports={TextPrompt:Z4(),SelectPrompt:z4(),TogglePrompt:F4(),DatePrompt:a4(),NumberPrompt:o4(),MultiselectPrompt:r1(),AutocompletePrompt:YU(),AutocompleteMultiselectPrompt:HU(),ConfirmPrompt:$U()}});var IU=E((TU)=>{var a=function(U,Z,J={}){return new Promise((Q,K)=>{const X=new wQ[U](Z),z=J.onAbort||F1,D=J.onSubmit||F1,G=J.onExit||F1;X.on("state",Z.onState||F1),X.on("submit",(Y)=>Q(D(Y))),X.on("exit",(Y)=>Q(G(Y))),X.on("abort",(Y)=>K(z(Y)))})},b=TU,wQ=OU(),F1=(U)=>U;b.text=(U)=>a("TextPrompt",U);b.password=(U)=>{return U.style="password",b.text(U)};b.invisible=(U)=>{return U.style="invisible",b.text(U)};b.number=(U)=>a("NumberPrompt",U);b.date=(U)=>a("DatePrompt",U);b.confirm=(U)=>a("ConfirmPrompt",U);b.list=(U)=>{const Z=U.separator||",";return a("TextPrompt",U,{onSubmit:(J)=>J.split(Z).map((Q)=>Q.trim())})};b.toggle=(U)=>a("TogglePrompt",U);b.select=(U)=>a("SelectPrompt",U);b.multiselect=(U)=>{U.choices=[].concat(U.choices||[]);const Z=(J)=>J.filter((Q)=>Q.selected).map((Q)=>Q.value);return a("MultiselectPrompt",U,{onAbort:Z,onSubmit:Z})};b.autocompleteMultiselect=(U)=>{U.choices=[].concat(U.choices||[]);const Z=(J)=>J.filter((Q)=>Q.selected).map((Q)=>Q.value);return a("AutocompleteMultiselectPrompt",U,{onAbort:Z,onSubmit:Z})};var fQ=(U,Z)=>Promise.resolve(Z.filter((J)=>J.title.slice(0,U.length).toLowerCase()===U.toLowerCase()));b.autocomplete=(U)=>{return U.suggest=U.suggest||fQ,U.choices=[].concat(U.choices||[]),a("AutocompletePrompt",U)}});var AU=E((Bz,LU)=>{async function D0(U=[],{onSubmit:Z=SU,onCancel:J=SU}={}){const Q={},K=D0._override||{};U=[].concat(U);let X,z,D,G,Y,M;const T=async(N,F,H=!1)=>{if(!H&&N.validate&&N.validate(F)!==!0)return;return N.format?await N.format(F,Q):F};for(z of U){if({name:G,type:Y}=z,typeof Y==="function")Y=await Y(X,{...Q},z),z.type=Y;if(!Y)continue;for(let N in z){if(kQ.includes(N))continue;let F=z[N];z[N]=typeof F==="function"?await F(X,{...Q},M):F}if(M=z,typeof z.message!=="string")throw new Error("prompt message is required");if({name:G,type:Y}=z,e1[Y]===void 0)throw new Error(`prompt type (${Y}) is not defined`);if(K[z.name]!==void 0){if(X=await T(z,K[z.name]),X!==void 0){Q[G]=X;continue}}try{X=D0._injected?bQ(D0._injected,z.initial):await e1[Y](z),Q[G]=X=await T(z,X,!0),D=await Z(z,X,Q)}catch(N){D=!await J(z,Q)}if(D)return Q}return Q}var bQ=function(U,Z){const J=U.shift();if(J instanceof Error)throw J;return J===void 0?Z:J},hQ=function(U){D0._injected=(D0._injected||[]).concat(U)},vQ=function(U){D0._override=Object.assign({},U)},e1=IU(),kQ=["suggest","format","onState","validate","onRender","type"],SU=()=>{};LU.exports=Object.assign(D0,{prompt:D0,prompts:e1,inject:hQ,override:vQ})});var PU=E((Mz,qU)=>{var xQ=function(U){U=(Array.isArray(U)?U:U.split(".")).map(Number);let Z=0,J=process.versions.node.split(".").map(Number);for(;Z<U.length;Z++){if(J[Z]>U[Z])return!1;if(U[Z]>J[Z])return!0}return!1};qU.exports=xQ("8.6.0")?k7():AU()});import{createRequire as Tz} from"module";var gU=u0(R1(),1);class R0{constructor(U){var Z;this.opts={},this.args={},this.name=U.name,this.alias=(Z=U.alias)!==null&&Z!==void 0?Z:[],this.description=U.description,this.summary=U.summary,this.arguments=U.arguments,this.options=U.options}}import*as d0 from"tty";var{env:K0={},argv:K6=[],platform:mU=""}=typeof process==="undefined"?{}:process,uU="NO_COLOR"in K0||K6.includes("--no-color"),dU="FORCE_COLOR"in K0||K6.includes("--color"),cU=mU==="win32",X6=K0.TERM==="dumb",pU=d0&&d0.isatty&&d0.isatty(1)&&K0.TERM&&!X6,nU="CI"in K0&&(("GITHUB_ACTIONS"in K0)||("GITLAB_CI"in K0)||("CIRCLECI"in K0)),aU=!uU&&(dU||cU&&!X6||pU||nU),z6=(U,Z,J,Q,K=Z.substring(0,U)+Q,X=Z.substring(U+J.length),z=X.indexOf(J))=>K+(z<0?X:z6(z,X,J,Q)),iU=(U,Z,J,Q,K)=>U<0?J+Z+Q:J+z6(U,Z,Q,K)+Q,lU=(U,Z,J=U,Q=U.length+1)=>(K)=>K||!(K===""||K===void 0)?iU((""+K).indexOf(Z,Q),K,U,Z,J):"",$=(U,Z,J)=>lU(`\x1B[${U}m`,`\x1B[${Z}m`,J),Q6={reset:$(0,0),bold:$(1,22,"\x1B[22m\x1B[1m"),dim:$(2,22,"\x1B[22m\x1B[2m"),italic:$(3,23),underline:$(4,24),inverse:$(7,27),hidden:$(8,28),strikethrough:$(9,29),black:$(30,39),red:$(31,39),green:$(32,39),yellow:$(33,39),blue:$(34,39),magenta:$(35,39),cyan:$(36,39),white:$(37,39),gray:$(90,39),bgBlack:$(40,49),bgRed:$(41,49),bgGreen:$(42,49),bgYellow:$(43,49),bgBlue:$(44,49),bgMagenta:$(45,49),bgCyan:$(46,49),bgWhite:$(47,49),blackBright:$(90,39),redBright:$(91,39),greenBright:$(92,39),yellowBright:$(93,39),blueBright:$(94,39),magentaBright:$(95,39),cyanBright:$(96,39),whiteBright:$(97,39),bgBlackBright:$(100,49),bgRedBright:$(101,49),bgGreenBright:$(102,49),bgYellowBright:$(103,49),bgBlueBright:$(104,49),bgMagentaBright:$(105,49),bgCyanBright:$(106,49),bgWhiteBright:$(107,49)},sU=({useColor:U=aU}={})=>U?Q6:Object.keys(Q6).reduce((Z,J)=>({...Z,[J]:String}),{}),{reset:iQ,bold:lQ,dim:sQ,italic:rQ,underline:oQ,inverse:tQ,hidden:eQ,strikethrough:UK,black:ZK,red:Y6,green:D6,yellow:G6,blue:E6,magenta:JK,cyan:QK,white:KK,gray:F6,bgBlack:XK,bgRed:H6,bgGreen:V6,bgYellow:B6,bgBlue:M6,bgMagenta:zK,bgCyan:YK,bgWhite:DK,blackBright:GK,redBright:EK,greenBright:FK,yellowBright:HK,blueBright:VK,magentaBright:BK,cyanBright:MK,whiteBright:RK,bgBlackBright:WK,bgRedBright:$K,bgGreenBright:NK,bgYellowBright:OK,bgBlueBright:TK,bgMagentaBright:IK,bgCyanBright:SK,bgWhiteBright:LK}=sU();class S{static red(U){return Y6(U)}static green(U){return D6(U)}static blue(U){return E6(U)}static gray(U){return F6(U)}static yellow(U){return G6(U)}static bgRed(U){return H6(U)}static bgGreen(U){return V6(U)}static bgBlue(U){return M6(U)}static bgYellow(U){return B6(U)}}var M9=u0(B9(),1);class P1 extends M9.default{constructor(U){super(U)}static termsWidth(...U){return Math.max(...U)}}class s extends P1{constructor(U=30){super({colWidths:[U,process.stdout.columns-U],wordWrap:!0,chars:{top:"","top-mid":"","top-left":"","top-right":"",bottom:"","bottom-mid":"","bottom-left":"","bottom-right":"",left:"","left-mid":"",mid:"","mid-mid":"",right:"","right-mid":"",middle:""}})}}class r{static rootHelp(U,Z){this.outputRoot+=S.yellow("USAGE"),this.outputRoot+=this.br(),this.outputRoot+=` ${U.name} [options] <command>`,this.outputRoot+=this.br(),this.outputRoot+=this.br(),this.outputRoot+=S.yellow("COMMANDS"),this.outputRoot+=this.br();const J=s.termsWidth(r.commandTermLength(U.getCommands()),r.optionTermLength(Z)),Q=new s(J+this.separatorLength+Math.round(J/2));U.getCommands().forEach((X)=>{Q.push([S.green(X.name),S.gray(X.summary)])}),this.outputRoot+=Q.toString(),this.outputRoot+=this.br();const K=new s(J+this.separatorLength+Math.round(J/2));this.outputRoot+=this.br(),this.outputRoot+=S.yellow("OPTIONS"),this.outputRoot+=this.br(),Z.forEach((X)=>{let z=S.green(X.flag);if(X.type==="boolean"&&X.shorthand)z+=`, ${S.green(X.shorthand)}`;if(X.type==="boolean")K.push([z,S.gray(X.description)])}),this.outputRoot+=K.toString(),this.outputRoot+=this.br(),console.log(this.outputRoot)}static commandHelp(U,Z){if(this.output+=S.yellow("USAGE"),this.output+=this.br(),this.output+=` ${U.name} ${Z.name}`,Z.options.length)this.output+=" [options]";Z.arguments.forEach((X)=>{this.output+=` <${X.name}>`}),this.output+=this.br(),this.output+=this.br(),this.output+=S.yellow("ARGUMENTS"),this.output+=this.br();const J=s.termsWidth(r.argumentTermLength(Z.arguments),r.optionTermLength(Z.options)),Q=new s(J+this.separatorLength+Math.round(J/2));Z.arguments.forEach((X)=>{Q.push([S.green(X.name),S.gray(X.description)])}),this.output+=Q.toString(),this.output+=this.br(),this.output+=this.br(),this.output+=S.yellow("OPTIONS"),this.output+=this.br();const K=new s(J+this.separatorLength+Math.round(J/2));if(Z.options.forEach((X)=>{let z=S.green(X.flag);if(X.type==="boolean"&&X.shorthand)z+=`, ${S.green(X.shorthand)}`;if(X.type==="boolean")K.push([z,S.gray(X.description)])}),this.output+=K.toString(),this.output+=this.br(),Z.alias.length)this.output+=this.br(),this.output+=S.yellow("ALIAS"),this.output+=this.br(),this.output+=` ${S.green(Z.alias.join(","))}`;console.log(this.output)}static br(U=1){let Z="";for(let J=0;J<U;J++)Z+="\n";return Z}static commandTermLength(U){return U.reduce((Z,J)=>{return Math.max(Z,J.name.length)},0)}static optionTermLength(U){return U.reduce((Z,J)=>{return Math.max(Z,J.flag.length)},0)}static argumentTermLength(U){return U.reduce((Z,J)=>{return Math.max(Z,J.name.length)},0)}}r.separatorLength=10;r.outputRoot="";r.output="";var bZ=u0(R1(),1);var yQ=u0(PU(),1);import kz from"fs";import hz from"path";import yz from"fs";import mz from"path";import cz from"fs";var U6=(U)=>U[0].toUpperCase()+U.slice(1);var m0=(U)=>{return U.replace(/(?:^\w|[A-Z]|\b\w)/g,function(Z,J){return J===0?Z.toLowerCase():Z.toUpperCase()}).replace(/[^0-9a-zA-Z]/g,"")};var B0=(U)=>U6(m0(U));var j=(U)=>U.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase();import S0 from"fs";import CU from"path";class H1 extends R0{constructor(){super({name:"make:command",description:"Make a new console command",summary:"Make a new console command",arguments:[{name:"name",description:"Name of console command"}],options:[]})}async handle(){if(S0.existsSync(`${process.cwd()}/src/console/commands/${j(this.args.name)}`)){console.error(S.red("Command directory is exists"));return}S0.mkdirSync(`${process.cwd()}/src/console/commands/${j(this.args.name)}`,{recursive:!0});const U=S0.readFileSync(CU.resolve(E0,"./command/index.command.ts")).toString().replace("[name]",j(this.args.name)).replace("NewCommand",`${B0(this.args.name)}Command`);S0.writeFileSync(`${process.cwd()}/src/console/commands/${j(this.args.name)}/index.command.ts`,U);const Z=S0.readFileSync(CU.resolve(E0,"./command/index.spec.ts")).toString().replace(/NewCommand/g,`${B0(this.args.name)}Command`).replace(/newCommand/g,`${m0(this.args.name)}Command`);S0.writeFileSync(`${process.cwd()}/src/console/commands/${j(this.args.name)}/index.spec.ts`,Z),console.info(`src/console/commands/${j(this.args.name)}/index.command.ts`,"has been created"),console.info(`src/console/commands/${j(this.args.name)}/index.spec.ts`,"has been created")}}import i from"fs";import V1 from"path";class B1 extends R0{constructor(){super({name:"make:middleware",description:"Make a new middleware",summary:"Make a new middleware",arguments:[{name:"name",description:"Name of middleware"}],options:[{type:"boolean",flag:"--configurable",shorthand:"-c",description:"Export a function which accepts an options"}]})}async handle(){if(i.existsSync(`${process.cwd()}/src/middleware/${j(this.args.name)}`)){console.error(S.red("Middleware directory is exists"));return}if(i.mkdirSync(`${process.cwd()}/src/middleware/${j(this.args.name)}`,{recursive:!0}),this.opts["--configurable"])this.copyConfigureableMiddleware();else this.copyMiddleware()}copyMiddleware(){const U=i.readFileSync(V1.resolve(E0,"./middleware/new.middleware.ts")).toString().replace("NewMiddleware",`${B0(this.args.name)}Middleware`);i.writeFileSync(`${process.cwd()}/src/middleware/${j(this.args.name)}/index.middleware.ts`,U);const Z=i.readFileSync(V1.resolve(E0,"./middleware/new.spec.ts")).toString().replace("new.middleware.ts","index.middleware.ts");i.writeFileSync(`${process.cwd()}/src/middleware/${j(this.args.name)}/index.spec.ts`,Z),console.info(`src/middleware/${j(this.args.name)}/index.middleware.ts`,"has been created"),console.info(`src/middleware/${j(this.args.name)}/index.spec.ts`,"has been created")}copyConfigureableMiddleware(){const U=i.readFileSync(V1.resolve(E0,"./middleware/configurable.middleware.ts")).toString().replace("NewMiddleware",`${B0(this.args.name)}Middleware`);i.writeFileSync(`${process.cwd()}/src/middleware/${j(this.args.name)}/index.middleware.ts`,U);const Z=i.readFileSync(V1.resolve(E0,"./middleware/configurable.spec.ts")).toString().replace("configurable.middleware.ts","index.middleware.ts");i.writeFileSync(`${process.cwd()}/src/middleware/${j(this.args.name)}/index.spec.ts`,Z),console.info(`src/middleware/${j(this.args.name)}/index.middleware.ts`,"has been created"),console.info(`src/middleware/${j(this.args.name)}/index.spec.ts`,"has been created")}}class _U{command;constructor(U){this.command=U}async register(){this.command.register(new H1),this.command.register(new B1)}}class wU{app;server=null;constructor(U){this.app=U}listen(U,Z){return new Promise((J,Q)=>{if(Z)this.server=this.app.listen(U,Z).once("listening",J).once("error",Q);else this.server=this.app.listen(U).once("listening",J).once("error",Q)})}async start(U,Z){await this.listen(U,Z)}stop(){this.server?.close(),this.server=null}get host(){const U=this.server?.address();if(U?.address==="0.0.0.0"||U?.address==="::")return"localhost";else return U?.address}get port(){return this.server?.address()?.port}get url(){return`http://${this.host}${this.port!==80?`:${this.port}`:""}`}}var E0=import.meta.path.replace("/index.ts","/../stub").replace("/index.js","/../stub");export{E0 as stubDir,_U as ConsoleKernel,wU as BaseServer};
|
|
16
|
+
Filtered results for: ${this.inputValue?this.inputValue:Q0.gray("Enter something to filter")}\n`}renderOption(U,Z,J){let Q;if(Z.disabled)Q=U===J?Q0.gray().underline(Z.title):Q0.strikethrough().gray(Z.title);else Q=U===J?Q0.cyan().underline(Z.title):Z.title;return(Z.selected?Q0.green(T0.radioOn):T0.radioOff)+" "+Q}renderDoneOrInstructions(){if(this.done)return this.value.filter((Z)=>Z.selected).map((Z)=>Z.title).join(", ");const U=[Q0.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled)U.push(Q0.yellow(this.warn));return U.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(wQ.hide);super.render();let U=[GU.symbol(this.done,this.aborted),Q0.bold(this.msg),GU.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)U+=Q0.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;U+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+U),this.clear=zU(U,this.out.columns)}}HU.exports=EU});var $U=E((IY,WU)=>{var BU=A(),kQ=Z0(),{style:MU,clear:bQ}=g(),{erase:hQ,cursor:FU}=P();class RU extends kQ{constructor(U={}){super(U);this.msg=U.message,this.value=U.initial,this.initialValue=!!U.initial,this.yesMsg=U.yes||"yes",this.yesOption=U.yesOption||"(Y/n)",this.noMsg=U.no||"no",this.noOption=U.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(U,Z){if(U.toLowerCase()==="y")return this.value=!0,this.submit();if(U.toLowerCase()==="n")return this.value=!1,this.submit();return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(FU.hide);else this.out.write(bQ(this.outputText,this.out.columns));super.render(),this.outputText=[MU.symbol(this.done,this.aborted),BU.bold(this.msg),MU.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:BU.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(hQ.line+FU.to(0)+this.outputText)}}WU.exports=RU});var OU=E((TY,NU)=>{NU.exports={TextPrompt:Z4(),SelectPrompt:Y4(),TogglePrompt:H4(),DatePrompt:a4(),NumberPrompt:o4(),MultiselectPrompt:r1(),AutocompletePrompt:DU(),AutocompleteMultiselectPrompt:VU(),ConfirmPrompt:$U()}});var TU=E((IU)=>{var a=function(U,Z,J={}){return new Promise((Q,K)=>{const X=new vQ[U](Z),Y=J.onAbort||H1,z=J.onSubmit||H1,G=J.onExit||H1;X.on("state",Z.onState||H1),X.on("submit",(D)=>Q(z(D))),X.on("exit",(D)=>Q(G(D))),X.on("abort",(D)=>K(Y(D)))})},b=IU,vQ=OU(),H1=(U)=>U;b.text=(U)=>a("TextPrompt",U);b.password=(U)=>{return U.style="password",b.text(U)};b.invisible=(U)=>{return U.style="invisible",b.text(U)};b.number=(U)=>a("NumberPrompt",U);b.date=(U)=>a("DatePrompt",U);b.confirm=(U)=>a("ConfirmPrompt",U);b.list=(U)=>{const Z=U.separator||",";return a("TextPrompt",U,{onSubmit:(J)=>J.split(Z).map((Q)=>Q.trim())})};b.toggle=(U)=>a("TogglePrompt",U);b.select=(U)=>a("SelectPrompt",U);b.multiselect=(U)=>{U.choices=[].concat(U.choices||[]);const Z=(J)=>J.filter((Q)=>Q.selected).map((Q)=>Q.value);return a("MultiselectPrompt",U,{onAbort:Z,onSubmit:Z})};b.autocompleteMultiselect=(U)=>{U.choices=[].concat(U.choices||[]);const Z=(J)=>J.filter((Q)=>Q.selected).map((Q)=>Q.value);return a("AutocompleteMultiselectPrompt",U,{onAbort:Z,onSubmit:Z})};var xQ=(U,Z)=>Promise.resolve(Z.filter((J)=>J.title.slice(0,U.length).toLowerCase()===U.toLowerCase()));b.autocomplete=(U)=>{return U.suggest=U.suggest||xQ,U.choices=[].concat(U.choices||[]),a("AutocompletePrompt",U)}});var AU=E((SY,SU)=>{async function z0(U=[],{onSubmit:Z=LU,onCancel:J=LU}={}){const Q={},K=z0._override||{};U=[].concat(U);let X,Y,z,G,D,F;const I=async(N,H,V=!1)=>{if(!V&&N.validate&&N.validate(H)!==!0)return;return N.format?await N.format(H,Q):H};for(Y of U){if({name:G,type:D}=Y,typeof D==="function")D=await D(X,{...Q},Y),Y.type=D;if(!D)continue;for(let N in Y){if(yQ.includes(N))continue;let H=Y[N];Y[N]=typeof H==="function"?await H(X,{...Q},F):H}if(F=Y,typeof Y.message!=="string")throw new Error("prompt message is required");if({name:G,type:D}=Y,e1[D]===void 0)throw new Error(`prompt type (${D}) is not defined`);if(K[Y.name]!==void 0){if(X=await I(Y,K[Y.name]),X!==void 0){Q[G]=X;continue}}try{X=z0._injected?gQ(z0._injected,Y.initial):await e1[D](Y),Q[G]=X=await I(Y,X,!0),z=await Z(Y,X,Q)}catch(N){z=!await J(Y,Q)}if(z)return Q}return Q}var gQ=function(U,Z){const J=U.shift();if(J instanceof Error)throw J;return J===void 0?Z:J},mQ=function(U){z0._injected=(z0._injected||[]).concat(U)},uQ=function(U){z0._override=Object.assign({},U)},e1=TU(),yQ=["suggest","format","onState","validate","onRender","type"],LU=()=>{};SU.exports=Object.assign(z0,{prompt:z0,prompts:e1,inject:mQ,override:uQ})});var PU=E((AY,qU)=>{var dQ=function(U){U=(Array.isArray(U)?U:U.split(".")).map(Number);let Z=0,J=process.versions.node.split(".").map(Number);for(;Z<U.length;Z++){if(J[Z]>U[Z])return!1;if(U[Z]>J[Z])return!0}return!1};qU.exports=dQ("8.6.0")?k7():AU()});import{createRequire as wY} from"module";var pU=u0(R1(),1);class R0{constructor(U){var Z;this.opts={},this.args={},this.name=U.name,this.alias=(Z=U.alias)!==null&&Z!==void 0?Z:[],this.description=U.description,this.summary=U.summary,this.arguments=U.arguments,this.options=U.options}}import*as d0 from"tty";var{env:K0={},argv:K6=[],platform:nU=""}=typeof process==="undefined"?{}:process,aU="NO_COLOR"in K0||K6.includes("--no-color"),lU="FORCE_COLOR"in K0||K6.includes("--color"),iU=nU==="win32",X6=K0.TERM==="dumb",sU=d0&&d0.isatty&&d0.isatty(1)&&K0.TERM&&!X6,rU="CI"in K0&&(("GITHUB_ACTIONS"in K0)||("GITLAB_CI"in K0)||("CIRCLECI"in K0)),oU=!aU&&(lU||iU&&!X6||sU||rU),Y6=(U,Z,J,Q,K=Z.substring(0,U)+Q,X=Z.substring(U+J.length),Y=X.indexOf(J))=>K+(Y<0?X:Y6(Y,X,J,Q)),tU=(U,Z,J,Q,K)=>U<0?J+Z+Q:J+Y6(U,Z,Q,K)+Q,eU=(U,Z,J=U,Q=U.length+1)=>(K)=>K||!(K===""||K===void 0)?tU((""+K).indexOf(Z,Q),K,U,Z,J):"",$=(U,Z,J)=>eU(`\x1B[${U}m`,`\x1B[${Z}m`,J),Q6={reset:$(0,0),bold:$(1,22,"\x1B[22m\x1B[1m"),dim:$(2,22,"\x1B[22m\x1B[2m"),italic:$(3,23),underline:$(4,24),inverse:$(7,27),hidden:$(8,28),strikethrough:$(9,29),black:$(30,39),red:$(31,39),green:$(32,39),yellow:$(33,39),blue:$(34,39),magenta:$(35,39),cyan:$(36,39),white:$(37,39),gray:$(90,39),bgBlack:$(40,49),bgRed:$(41,49),bgGreen:$(42,49),bgYellow:$(43,49),bgBlue:$(44,49),bgMagenta:$(45,49),bgCyan:$(46,49),bgWhite:$(47,49),blackBright:$(90,39),redBright:$(91,39),greenBright:$(92,39),yellowBright:$(93,39),blueBright:$(94,39),magentaBright:$(95,39),cyanBright:$(96,39),whiteBright:$(97,39),bgBlackBright:$(100,49),bgRedBright:$(101,49),bgGreenBright:$(102,49),bgYellowBright:$(103,49),bgBlueBright:$(104,49),bgMagentaBright:$(105,49),bgCyanBright:$(106,49),bgWhiteBright:$(107,49)},UZ=({useColor:U=oU}={})=>U?Q6:Object.keys(Q6).reduce((Z,J)=>({...Z,[J]:String}),{}),{reset:QK,bold:KK,dim:XK,italic:YK,underline:DK,inverse:zK,hidden:GK,strikethrough:EK,black:HK,red:D6,green:z6,yellow:G6,blue:E6,magenta:VK,cyan:BK,white:MK,gray:H6,bgBlack:FK,bgRed:V6,bgGreen:B6,bgYellow:M6,bgBlue:F6,bgMagenta:RK,bgCyan:WK,bgWhite:$K,blackBright:NK,redBright:OK,greenBright:IK,yellowBright:TK,blueBright:LK,magentaBright:SK,cyanBright:AK,whiteBright:qK,bgBlackBright:PK,bgRedBright:jK,bgGreenBright:CK,bgYellowBright:_K,bgBlueBright:wK,bgMagentaBright:fK,bgCyanBright:kK,bgWhiteBright:bK}=UZ();class L{static red(U){return D6(U)}static green(U){return z6(U)}static blue(U){return E6(U)}static gray(U){return H6(U)}static yellow(U){return G6(U)}static bgRed(U){return V6(U)}static bgGreen(U){return B6(U)}static bgBlue(U){return F6(U)}static bgYellow(U){return M6(U)}}var F9=u0(M9(),1);class P1 extends F9.default{constructor(U){super(U)}static termsWidth(...U){return Math.max(...U)}}class s extends P1{constructor(U=30){super({colWidths:[U,process.stdout.columns-U],wordWrap:!0,chars:{top:"","top-mid":"","top-left":"","top-right":"",bottom:"","bottom-mid":"","bottom-left":"","bottom-right":"",left:"","left-mid":"",mid:"","mid-mid":"",right:"","right-mid":"",middle:""}})}}class r{static rootHelp(U,Z){this.outputRoot+=L.yellow("USAGE"),this.outputRoot+=this.br(),this.outputRoot+=` ${U.name} [options] <command>`,this.outputRoot+=this.br(),this.outputRoot+=this.br(),this.outputRoot+=L.yellow("COMMANDS"),this.outputRoot+=this.br();const J=s.termsWidth(r.commandTermLength(U.getCommands()),r.optionTermLength(Z)),Q=new s(J+this.separatorLength+Math.round(J/2));U.getCommands().forEach((X)=>{Q.push([L.green(X.name),L.gray(X.summary)])}),this.outputRoot+=Q.toString(),this.outputRoot+=this.br();const K=new s(J+this.separatorLength+Math.round(J/2));this.outputRoot+=this.br(),this.outputRoot+=L.yellow("OPTIONS"),this.outputRoot+=this.br(),Z.forEach((X)=>{let Y=L.green(X.flag);if(X.type==="boolean"&&X.shorthand)Y+=`, ${L.green(X.shorthand)}`;if(X.type==="boolean")K.push([Y,L.gray(X.description)])}),this.outputRoot+=K.toString(),this.outputRoot+=this.br(),console.log(this.outputRoot)}static commandHelp(U,Z){if(this.output+=L.yellow("USAGE"),this.output+=this.br(),this.output+=` ${U.name} ${Z.name}`,Z.options.length)this.output+=" [options]";Z.arguments.forEach((X)=>{this.output+=` <${X.name}>`}),this.output+=this.br(),this.output+=this.br(),this.output+=L.yellow("ARGUMENTS"),this.output+=this.br();const J=s.termsWidth(r.argumentTermLength(Z.arguments),r.optionTermLength(Z.options)),Q=new s(J+this.separatorLength+Math.round(J/2));Z.arguments.forEach((X)=>{Q.push([L.green(X.name),L.gray(X.description)])}),this.output+=Q.toString(),this.output+=this.br(),this.output+=this.br(),this.output+=L.yellow("OPTIONS"),this.output+=this.br();const K=new s(J+this.separatorLength+Math.round(J/2));if(Z.options.forEach((X)=>{let Y=L.green(X.flag);if(X.type==="boolean"&&X.shorthand)Y+=`, ${L.green(X.shorthand)}`;if(X.type==="boolean")K.push([Y,L.gray(X.description)])}),this.output+=K.toString(),this.output+=this.br(),Z.alias.length)this.output+=this.br(),this.output+=L.yellow("ALIAS"),this.output+=this.br(),this.output+=` ${L.green(Z.alias.join(","))}`;console.log(this.output)}static br(U=1){let Z="";for(let J=0;J<U;J++)Z+="\n";return Z}static commandTermLength(U){return U.reduce((Z,J)=>{return Math.max(Z,J.name.length)},0)}static optionTermLength(U){return U.reduce((Z,J)=>{return Math.max(Z,J.flag.length)},0)}static argumentTermLength(U){return U.reduce((Z,J)=>{return Math.max(Z,J.name.length)},0)}}r.separatorLength=10;r.outputRoot="";r.output="";var gZ=u0(R1(),1);var cQ=u0(PU(),1);import cY from"fs";import nY from"path";import iY from"fs";import rY from"path";import eY from"fs";var U6=(U)=>U[0].toUpperCase()+U.slice(1);var m0=(U)=>{return U.replace(/(?:^\w|[A-Z]|\b\w)/g,function(Z,J){return J===0?Z.toLowerCase():Z.toUpperCase()}).replace(/[^0-9a-zA-Z]/g,"")};var M0=(U)=>U6(m0(U));var j=(U)=>U.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase();import L0 from"fs";import CU from"path";class V1 extends R0{constructor(){super({name:"make:command",description:"Make a new console command",summary:"Make a new console command",arguments:[{name:"name",description:"Name of console command"}],options:[]})}async handle(){if(L0.existsSync(`${process.cwd()}/src/console/commands/${j(this.args.name)}`)){console.error(L.red("Command directory is exists"));return}L0.mkdirSync(`${process.cwd()}/src/console/commands/${j(this.args.name)}`,{recursive:!0});const U=L0.readFileSync(CU.resolve(E0,"./command/index.command.ts")).toString().replace("[name]",j(this.args.name)).replace("NewCommand",`${M0(this.args.name)}Command`);L0.writeFileSync(`${process.cwd()}/src/console/commands/${j(this.args.name)}/index.command.ts`,U);const Z=L0.readFileSync(CU.resolve(E0,"./command/index.spec.ts")).toString().replace(/NewCommand/g,`${M0(this.args.name)}Command`).replace(/newCommand/g,`${m0(this.args.name)}Command`);L0.writeFileSync(`${process.cwd()}/src/console/commands/${j(this.args.name)}/index.spec.ts`,Z),console.info(`src/console/commands/${j(this.args.name)}/index.command.ts`,"has been created"),console.info(`src/console/commands/${j(this.args.name)}/index.spec.ts`,"has been created")}}import l from"fs";import B1 from"path";class M1 extends R0{constructor(){super({name:"make:middleware",description:"Make a new middleware",summary:"Make a new middleware",arguments:[{name:"name",description:"Name of middleware"}],options:[{type:"boolean",flag:"--configurable",shorthand:"-c",description:"Export a function which accepts an options"}]})}async handle(){if(l.existsSync(`${process.cwd()}/src/middleware/${j(this.args.name)}`)){console.error(L.red("Middleware directory is exists"));return}if(l.mkdirSync(`${process.cwd()}/src/middleware/${j(this.args.name)}`,{recursive:!0}),this.opts["--configurable"])this.copyConfigureableMiddleware();else this.copyMiddleware()}copyMiddleware(){const U=l.readFileSync(B1.resolve(E0,"./middleware/new.middleware.ts")).toString().replace("NewMiddleware",`${M0(this.args.name)}Middleware`);l.writeFileSync(`${process.cwd()}/src/middleware/${j(this.args.name)}/index.middleware.ts`,U);const Z=l.readFileSync(B1.resolve(E0,"./middleware/new.spec.ts")).toString().replace("new.middleware.ts","index.middleware.ts");l.writeFileSync(`${process.cwd()}/src/middleware/${j(this.args.name)}/index.spec.ts`,Z),console.info(`src/middleware/${j(this.args.name)}/index.middleware.ts`,"has been created"),console.info(`src/middleware/${j(this.args.name)}/index.spec.ts`,"has been created")}copyConfigureableMiddleware(){const U=l.readFileSync(B1.resolve(E0,"./middleware/configurable.middleware.ts")).toString().replace("NewMiddleware",`${M0(this.args.name)}Middleware`);l.writeFileSync(`${process.cwd()}/src/middleware/${j(this.args.name)}/index.middleware.ts`,U);const Z=l.readFileSync(B1.resolve(E0,"./middleware/configurable.spec.ts")).toString().replace("configurable.middleware.ts","index.middleware.ts");l.writeFileSync(`${process.cwd()}/src/middleware/${j(this.args.name)}/index.spec.ts`,Z),console.info(`src/middleware/${j(this.args.name)}/index.middleware.ts`,"has been created"),console.info(`src/middleware/${j(this.args.name)}/index.spec.ts`,"has been created")}}class _U{command;constructor(U){this.command=U}async register(){this.command.register(new V1),this.command.register(new M1)}}function wU(U=1){if(typeof U==="string")return parseInt(U);return U}function fU(U=10){if(typeof U==="string")return parseInt(U);return U}function iQ(U,Z){return(wU(U)-1)*fU(Z)}function sQ(U){return U}function rQ(U="",Z=[]){const J=bU(kU(U));return hU(J,Z)}function kU(U){return U.split(" ").join().split(",").filter((Z)=>Z)}function bU(U){const Z={};for(let J=0;J<U.length;J++)Z[`${U[J].trim()}`]=1;return Z}function hU(U,Z){for(let J=0;J<Z.length;J++)U[`${Z[J]}`]=0;return U}function oQ(U){const Z={};if(U)U.split(",").forEach(function(J){if(J.charAt(0)==="-")J=J.substring(1),Z[J.trim()]=-1;else Z[J.trim()]=1});return Z}var tQ={page:wU,limit:fU,skip:iQ,sort:oQ,fields:rQ,filter:sQ,filterExludeFields:hU,convertStringToArray:kU,convertArrayToObject:bU};class vU{app;server=null;constructor(U){this.app=U}listen(U,Z){return new Promise((J,Q)=>{if(Z)this.server=this.app.listen(U,Z).once("listening",J).once("error",Q);else this.server=this.app.listen(U).once("listening",J).once("error",Q)})}async start(U,Z){await this.listen(U,Z)}stop(){this.server?.close(),this.server=null}get host(){const U=this.server?.address();if(U?.address==="0.0.0.0"||U?.address==="::")return"localhost";else return U?.address}get port(){return this.server?.address()?.port}get url(){return`http://${this.host}${this.port!==80?`:${this.port}`:""}`}}var E0=import.meta.path.replace("/index.ts","/../stub").replace("/index.js","/../stub");export{E0 as stubDir,tQ as Querystring,_U as ConsoleKernel,vU as BaseServer};
|