UNPKG

testgenie-ai

Version:

AI-powered test generator with framework support, pattern detection, and React Testing Library integration

52 lines (51 loc) 1.76 MB
#!/usr/bin/env node import{createRequire as VDD}from"node:module";var HDD=Object.create;var{getPrototypeOf:WDD,defineProperty:V5,getOwnPropertyNames:EZ,getOwnPropertyDescriptor:zDD}=Object,RZ=Object.prototype.hasOwnProperty;var C0=(D,F,$)=>{$=D!=null?HDD(WDD(D)):{};let B=F||!D||!D.__esModule?V5($,"default",{value:D,enumerable:!0}):$;for(let J of EZ(D))if(!RZ.call(B,J))V5(B,J,{get:()=>D[J],enumerable:!0});return B},wZ=new WeakMap,qDD=(D)=>{var F=wZ.get(D),$;if(F)return F;if(F=V5({},"__esModule",{value:!0}),D&&typeof D==="object"||typeof D==="function")EZ(D).map((B)=>!RZ.call(F,B)&&V5(F,B,{get:()=>D[B],enumerable:!($=zDD(D,B))||$.enumerable}));return wZ.set(D,F),F},w=(D,F)=>()=>(F||D((F={exports:{}}).exports,F),F.exports);var Z1=(D,F)=>{for(var $ in F)V5(D,$,{get:F[$],enumerable:!0,configurable:!0,set:(B)=>F[$]=()=>B})};var m=(D,F)=>()=>(D&&(F=D(D=0)),F);var ZD=VDD(import.meta.url);var AZ=w((W_0,KDD)=>{KDD.exports={name:"dotenv",version:"16.5.0",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var fZ=w((z_0,l8)=>{var mQ=ZD("fs"),cQ=ZD("path"),CDD=ZD("os"),UDD=ZD("crypto"),ZDD=AZ(),OZ=ZDD.version,jDD=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function MDD(D){let F={},$=D.toString();$=$.replace(/\r\n?/mg,` `);let B;while((B=jDD.exec($))!=null){let J=B[1],Q=B[2]||"";Q=Q.trim();let X=Q[0];if(Q=Q.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),X==='"')Q=Q.replace(/\\n/g,` `),Q=Q.replace(/\\r/g,"\r");F[J]=Q}return F}function wDD(D){let F=IZ(D),$=X2.configDotenv({path:F});if(!$.parsed){let X=new Error(`MISSING_DATA: Cannot parse ${F} for an unknown reason`);throw X.code="MISSING_DATA",X}let B=NZ(D).split(","),J=B.length,Q;for(let X=0;X<J;X++)try{let Y=B[X].trim(),G=RDD($,Y);Q=X2.decrypt(G.ciphertext,G.key);break}catch(Y){if(X+1>=J)throw Y}return X2.parse(Q)}function EDD(D){console.log(`[dotenv@${OZ}][WARN] ${D}`)}function K5(D){console.log(`[dotenv@${OZ}][DEBUG] ${D}`)}function NZ(D){if(D&&D.DOTENV_KEY&&D.DOTENV_KEY.length>0)return D.DOTENV_KEY;if(process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0)return process.env.DOTENV_KEY;return""}function RDD(D,F){let $;try{$=new URL(F)}catch(Y){if(Y.code==="ERR_INVALID_URL"){let G=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw G.code="INVALID_DOTENV_KEY",G}throw Y}let B=$.password;if(!B){let Y=new Error("INVALID_DOTENV_KEY: Missing key part");throw Y.code="INVALID_DOTENV_KEY",Y}let J=$.searchParams.get("environment");if(!J){let Y=new Error("INVALID_DOTENV_KEY: Missing environment part");throw Y.code="INVALID_DOTENV_KEY",Y}let Q=`DOTENV_VAULT_${J.toUpperCase()}`,X=D.parsed[Q];if(!X){let Y=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${Q} in your .env.vault file.`);throw Y.code="NOT_FOUND_DOTENV_ENVIRONMENT",Y}return{ciphertext:X,key:B}}function IZ(D){let F=null;if(D&&D.path&&D.path.length>0)if(Array.isArray(D.path)){for(let $ of D.path)if(mQ.existsSync($))F=$.endsWith(".vault")?$:`${$}.vault`}else F=D.path.endsWith(".vault")?D.path:`${D.path}.vault`;else F=cQ.resolve(process.cwd(),".env.vault");if(mQ.existsSync(F))return F;return null}function LZ(D){return D[0]==="~"?cQ.join(CDD.homedir(),D.slice(1)):D}function ADD(D){if(Boolean(D&&D.debug))K5("Loading env from encrypted .env.vault");let $=X2._parseVault(D),B=process.env;if(D&&D.processEnv!=null)B=D.processEnv;return X2.populate(B,$,D),{parsed:$}}function LDD(D){let F=cQ.resolve(process.cwd(),".env"),$="utf8",B=Boolean(D&&D.debug);if(D&&D.encoding)$=D.encoding;else if(B)K5("No encoding is specified. UTF-8 is used by default");let J=[F];if(D&&D.path)if(!Array.isArray(D.path))J=[LZ(D.path)];else{J=[];for(let G of D.path)J.push(LZ(G))}let Q,X={};for(let G of J)try{let H=X2.parse(mQ.readFileSync(G,{encoding:$}));X2.populate(X,H,D)}catch(H){if(B)K5(`Failed to load ${G} ${H.message}`);Q=H}let Y=process.env;if(D&&D.processEnv!=null)Y=D.processEnv;if(X2.populate(Y,X,D),Q)return{parsed:X,error:Q};else return{parsed:X}}function ODD(D){if(NZ(D).length===0)return X2.configDotenv(D);let F=IZ(D);if(!F)return EDD(`You set DOTENV_KEY but you are missing a .env.vault file at ${F}. Did you forget to build it?`),X2.configDotenv(D);return X2._configVault(D)}function NDD(D,F){let $=Buffer.from(F.slice(-64),"hex"),B=Buffer.from(D,"base64"),J=B.subarray(0,12),Q=B.subarray(-16);B=B.subarray(12,-16);try{let X=UDD.createDecipheriv("aes-256-gcm",$,J);return X.setAuthTag(Q),`${X.update(B)}${X.final()}`}catch(X){let Y=X instanceof RangeError,G=X.message==="Invalid key length",H=X.message==="Unsupported state or unable to authenticate data";if(Y||G){let W=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw W.code="INVALID_DOTENV_KEY",W}else if(H){let W=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw W.code="DECRYPTION_FAILED",W}else throw X}}function IDD(D,F,$={}){let B=Boolean($&&$.debug),J=Boolean($&&$.override);if(typeof F!=="object"){let Q=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw Q.code="OBJECT_REQUIRED",Q}for(let Q of Object.keys(F))if(Object.prototype.hasOwnProperty.call(D,Q)){if(J===!0)D[Q]=F[Q];if(B)if(J===!0)K5(`"${Q}" is already defined and WAS overwritten`);else K5(`"${Q}" is already defined and was NOT overwritten`)}else D[Q]=F[Q]}var X2={configDotenv:LDD,_configVault:ADD,_parseVault:wDD,config:ODD,decrypt:NDD,parse:MDD,populate:IDD};z_0.configDotenv=X2.configDotenv;z_0._configVault=X2._configVault;z_0._parseVault=X2._parseVault;z_0.config=X2.config;z_0.decrypt=X2.decrypt;z_0.parse=X2.parse;z_0.populate=X2.populate;l8.exports=X2});function CY(D){if(D===null||typeof D!=="object")return!1;let F=Object.getPrototypeOf(D);if(F!==null&&F!==Object.prototype&&Object.getPrototypeOf(F)!==null)return!1;if(Symbol.iterator in D)return!1;if(Symbol.toStringTag in D)return Object.prototype.toString.call(D)==="[object Module]";return!0}function MY(D,F,$=".",B){if(!CY(F))return MY(D,{},$,B);let J=Object.assign({},F);for(let Q in D){if(Q==="__proto__"||Q==="constructor")continue;let X=D[Q];if(X===null||X===void 0)continue;if(B&&B(J,Q,X,$))continue;if(Array.isArray(X)&&Array.isArray(J[Q]))J[Q]=[...X,...J[Q]];else if(CY(X)&&CY(J[Q]))J[Q]=MY(X,J[Q],($?`${$}.`:"")+Q.toString(),B);else J[Q]=X}return J}function N0D(D){return(...F)=>F.reduce(($,B)=>MY($,B,"",D),{})}function f0D(D){return Object.prototype.toString.call(D)==="[object Object]"}function P0D(D){if(!f0D(D))return!1;if(!D.message&&!D.args)return!1;if(D.stack)return!1;return!0}class G2{options;_lastLog;_mockFn;constructor(D={}){let F=D.types||jY;this.options=I0D({...D,defaults:{...D.defaults},level:ZY(D.level,F),reporters:[...D.reporters||[]]},{types:jY,throttle:1000,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(let $ in F){let B={type:$,...this.options.defaults,...F[$]};this[$]=this._wrapLogFn(B),this[$].raw=this._wrapLogFn(B,!0)}if(this.options.mockFn)this.mockTypes();this._lastLog={}}get level(){return this.options.level}set level(D){this.options.level=ZY(D,this.options.types,this.options.level)}prompt(D,F){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(D,F)}create(D){let F=new G2({...this.options,...D});if(this._mockFn)F.mockTypes(this._mockFn);return F}withDefaults(D){return this.create({...this.options,defaults:{...this.options.defaults,...D}})}withTag(D){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+D:D})}addReporter(D){return this.options.reporters.push(D),this}removeReporter(D){if(D){let F=this.options.reporters.indexOf(D);if(F!==-1)return this.options.reporters.splice(F,1)}else this.options.reporters.splice(0);return this}setReporters(D){return this.options.reporters=Array.isArray(D)?D:[D],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(let D in this.options.types){if(!console["__"+D])console["__"+D]=console[D];console[D]=this[D].raw}}restoreConsole(){for(let D in this.options.types)if(console["__"+D])console[D]=console["__"+D],delete console["__"+D]}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(D,F){if(!D)return;if(!D.__write)D.__write=D.write;D.write=($)=>{this[F].raw(String($).trim())}}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(D){if(!D)return;if(D.__write)D.write=D.__write,delete D.__write}pauseLogs(){UY=!0}resumeLogs(){UY=!1;let D=uj.splice(0);for(let F of D)F[0]._logFn(F[1],F[2])}mockTypes(D){let F=D||this.options.mockFn;if(this._mockFn=F,typeof F!=="function")return;for(let $ in this.options.types)this[$]=F($,this.options.types[$])||this[$],this[$].raw=this[$]}_wrapLogFn(D,F){return(...$)=>{if(UY){uj.push([this,D,$,F]);return}return this._logFn(D,$,F)}}_logFn(D,F,$){if((D.level||0)>this.level)return!1;let B={date:new Date,args:[],...D,level:ZY(D.level,this.options.types)};if(!$&&F.length===1&&P0D(F[0]))Object.assign(B,F[0]);else B.args=[...F];if(B.message)B.args.unshift(B.message),delete B.message;if(B.additional){if(!Array.isArray(B.additional))B.additional=B.additional.split(` `);B.args.push(` `+B.additional.join(` `)),delete B.additional}B.type=typeof B.type==="string"?B.type.toLowerCase():"log",B.tag=typeof B.tag==="string"?B.tag:"";let J=(X=!1)=>{let Y=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&Y>0){let G=[...this._lastLog.object.args];if(Y>1)G.push(`(repeated ${Y} times)`);this._log({...this._lastLog.object,args:G}),this._lastLog.count=1}if(X)this._lastLog.object=B,this._log(B)};clearTimeout(this._lastLog.timeout);let Q=this._lastLog.time&&B.date?B.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=B.date,Q<this.options.throttle)try{let X=JSON.stringify([B.type,B.tag,B.args]),Y=this._lastLog.serialized===X;if(this._lastLog.serialized=X,Y){if(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin){this._lastLog.timeout=setTimeout(J,this.options.throttle);return}}}catch{}J(!0)}_log(D){for(let F of this.options.reporters)F.log(D,{options:this.options})}}function ZY(D,F={},$=3){if(D===void 0)return $;if(typeof D==="number")return D;if(F[D]&&F[D].level!==void 0)return F[D].level;return $}function vj(D={}){return new G2(D)}var U2,jY,I0D,UY=!1,uj;var wY=m(()=>{U2={silent:Number.NEGATIVE_INFINITY,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},jY={silent:{level:-1},fatal:{level:U2.fatal},error:{level:U2.error},warn:{level:U2.warn},log:{level:U2.log},info:{level:U2.info},success:{level:U2.success},fail:{level:U2.fail},ready:{level:U2.info},start:{level:U2.info},box:{level:U2.info},debug:{level:U2.debug},trace:{level:U2.trace},verbose:{level:U2.verbose}};I0D=N0D();uj=[];G2.prototype.add=G2.prototype.addReporter;G2.prototype.remove=G2.prototype.removeReporter;G2.prototype.clear=G2.prototype.removeReporter;G2.prototype.withScope=G2.prototype.withTag;G2.prototype.mock=G2.prototype.mockTypes;G2.prototype.pause=G2.prototype.pauseLogs;G2.prototype.resume=G2.prototype.resumeLogs});import{formatWithOptions as hj}from"node:util";import{sep as T0D}from"node:path";function RY(D,F){let $=process.cwd()+T0D;return D.split(` `).splice(F.split(` `).length).map((J)=>J.trim().replace("file://","").replace($,""))}function S0D(D,F){return(F.__write||F.write).call(F,D)}class nF{formatStack(D,F,$){let B=" ".repeat(($?.errorLevel||0)+1);return B+RY(D,F).join(` ${B}`)}formatError(D,F){let $=D.message??hj(F,D),B=D.stack?this.formatStack(D.stack,$,F):"",J=F?.errorLevel||0,Q=J>0?`${" ".repeat(J)}[cause]: `:"",X=D.cause?` `+this.formatError(D.cause,{...F,errorLevel:J+1}):"";return Q+$+` `+B+X}formatArgs(D,F){let $=D.map((B)=>{if(B&&typeof B.stack==="string")return this.formatError(B,F);return B});return hj(F,...$)}formatDate(D,F){return F.date?D.toLocaleTimeString():""}filterAndJoin(D){return D.filter(Boolean).join(" ")}formatLogObj(D,F){let $=this.formatArgs(D.args,F);if(D.type==="box")return` `+[EY(D.tag),D.title&&D.title,...$.split(` `)].filter(Boolean).map((B)=>" > "+B).join(` `)+` `;return this.filterAndJoin([EY(D.type),EY(D.tag),$])}log(D,F){let $=this.formatLogObj(D,{columns:F.options.stdout.columns||0,...F.options.formatOptions});return S0D($+` `,D.level<2?F.options.stderr||process.stderr:F.options.stdout||process.stdout)}}var EY=(D)=>D?`[${D}]`:"";var kj=()=>{};import*as aF from"node:tty";function cj(D,F,$,B,J=F.slice(0,Math.max(0,D))+B,Q=F.slice(Math.max(0,D+$.length)),X=Q.indexOf($)){return J+(X<0?Q:cj(X,Q,$,B))}function g0D(D,F,$,B,J){return D<0?$+F+B:$+cj(D,F,B,J)+B}function x0D(D,F,$=D,B=D.length+1){return(J)=>J||!(J===""||J===void 0)?g0D((""+J).indexOf(F,B),J,D,F,$):""}function oD(D,F,$){return x0D(`\x1B[${D}m`,`\x1B[${F}m`,$)}function m0D(D=y0D){return D?yj:Object.fromEntries(Object.keys(yj).map((F)=>[F,String]))}function c0D(D,F="reset"){return I2[D]||I2[F]}function I6(D){return D.replace(new RegExp(l0D,"g"),"")}function lj(D,F={}){let $={...F,style:{...i0D,...F.style}},B=D.split(` `),J=[],Q=c0D($.style.borderColor),X={...typeof $.style.borderStyle==="string"?gj[$.style.borderStyle]||gj.solid:$.style.borderStyle};if(Q)for(let K in X)X[K]=Q(X[K]);let Y=$.style.padding%2===0?$.style.padding:$.style.padding+1,G=B.length+Y,H=Math.max(...B.map((K)=>I6(K).length),$.title?I6($.title).length:0)+Y,W=H+Y,z=$.style.marginLeft>0?" ".repeat($.style.marginLeft):"";if($.style.marginTop>0)J.push("".repeat($.style.marginTop));if($.title){let K=Q?Q($.title):$.title,C=X.h.repeat(Math.floor((H-I6($.title).length)/2)),U=X.h.repeat(H-I6($.title).length-I6(C).length+Y);J.push(`${z}${X.tl}${C}${K}${U}${X.tr}`)}else J.push(`${z}${X.tl}${X.h.repeat(W)}${X.tr}`);let q=$.style.valign==="center"?Math.floor((G-B.length)/2):$.style.valign==="top"?G-B.length-Y:G-B.length;for(let K=0;K<G;K++)if(K<q||K>=q+B.length)J.push(`${z}${X.v}${" ".repeat(W)}${X.v}`);else{let C=B[K-q],U=" ".repeat(Y),Z=" ".repeat(H-I6(C).length);J.push(`${z}${X.v}${U}${C}${Z}${X.v}`)}if(J.push(`${z}${X.bl}${X.h.repeat(W)}${X.br}`),$.style.marginBottom>0)J.push("".repeat($.style.marginBottom));return J.join(` `)}var f6,xj,_0D,b0D,u0D,v0D,mj,h0D,k0D,y0D,yj,I2,l0D,gj,i0D;var ij=m(()=>{({env:f6={},argv:xj=[],platform:_0D=""}=typeof process==="undefined"?{}:process),b0D="NO_COLOR"in f6||xj.includes("--no-color"),u0D="FORCE_COLOR"in f6||xj.includes("--color"),v0D=_0D==="win32",mj=f6.TERM==="dumb",h0D=aF&&aF.isatty&&aF.isatty(1)&&f6.TERM&&!mj,k0D="CI"in f6&&(("GITHUB_ACTIONS"in f6)||("GITLAB_CI"in f6)||("CIRCLECI"in f6)),y0D=!b0D&&(u0D||v0D&&!mj||h0D||k0D);yj={reset:oD(0,0),bold:oD(1,22,"\x1B[22m\x1B[1m"),dim:oD(2,22,"\x1B[22m\x1B[2m"),italic:oD(3,23),underline:oD(4,24),inverse:oD(7,27),hidden:oD(8,28),strikethrough:oD(9,29),black:oD(30,39),red:oD(31,39),green:oD(32,39),yellow:oD(33,39),blue:oD(34,39),magenta:oD(35,39),cyan:oD(36,39),white:oD(37,39),gray:oD(90,39),bgBlack:oD(40,49),bgRed:oD(41,49),bgGreen:oD(42,49),bgYellow:oD(43,49),bgBlue:oD(44,49),bgMagenta:oD(45,49),bgCyan:oD(46,49),bgWhite:oD(47,49),blackBright:oD(90,39),redBright:oD(91,39),greenBright:oD(92,39),yellowBright:oD(93,39),blueBright:oD(94,39),magentaBright:oD(95,39),cyanBright:oD(96,39),whiteBright:oD(97,39),bgBlackBright:oD(100,49),bgRedBright:oD(101,49),bgGreenBright:oD(102,49),bgYellowBright:oD(103,49),bgBlueBright:oD(104,49),bgMagentaBright:oD(105,49),bgCyanBright:oD(106,49),bgWhiteBright:oD(107,49)};I2=m0D();l0D=[String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`,String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`].join("|");gj={solid:{tl:"┌",tr:"┐",bl:"└",br:"┘",h:"─",v:"│"},double:{tl:"╔",tr:"╗",bl:"╚",br:"╝",h:"═",v:"║"},doubleSingle:{tl:"╓",tr:"╖",bl:"╙",br:"╜",h:"─",v:"║"},doubleSingleRounded:{tl:"╭",tr:"╮",bl:"╰",br:"╯",h:"─",v:"║"},singleThick:{tl:"┏",tr:"┓",bl:"┗",br:"┛",h:"━",v:"┃"},singleDouble:{tl:"╒",tr:"╕",bl:"╘",br:"╛",h:"═",v:"│"},singleDoubleRounded:{tl:"╭",tr:"╮",bl:"╰",br:"╯",h:"═",v:"│"},rounded:{tl:"╭",tr:"╮",bl:"╰",br:"╯",h:"─",v:"│"}},i0D={borderColor:"white",borderStyle:"rounded",valign:"center",padding:2,marginLeft:1,marginTop:1,marginBottom:1}});var CM={};Z1(CM,{prompt:()=>KM,kCancel:()=>VM});import u1,{stdin as d0D,stdout as p0D}from"node:process";import dj from"node:readline";import{WriteStream as r0D}from"node:tty";function n0D(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}function a0D(){if(pj)return AY;pj=1;let D="\x1B",F=`${D}[`,$="\x07",B={to(X,Y){if(!Y)return`${F}${X+1}G`;return`${F}${Y+1};${X+1}H`},move(X,Y){let G="";if(X<0)G+=`${F}${-X}D`;else if(X>0)G+=`${F}${X}C`;if(Y<0)G+=`${F}${-Y}A`;else if(Y>0)G+=`${F}${Y}B`;return G},up:(X=1)=>`${F}${X}A`,down:(X=1)=>`${F}${X}B`,forward:(X=1)=>`${F}${X}C`,backward:(X=1)=>`${F}${X}D`,nextLine:(X=1)=>`${F}E`.repeat(X),prevLine:(X=1)=>`${F}F`.repeat(X),left:`${F}G`,hide:`${F}?25l`,show:`${F}?25h`,save:`${D}7`,restore:`${D}8`},J={up:(X=1)=>`${F}S`.repeat(X),down:(X=1)=>`${F}T`.repeat(X)},Q={screen:`${F}2J`,up:(X=1)=>`${F}1J`.repeat(X),down:(X=1)=>`${F}J`.repeat(X),line:`${F}2K`,lineEnd:`${F}K`,lineStart:`${F}1K`,lines(X){let Y="";for(let G=0;G<X;G++)Y+=this.line+(G<X-1?B.up():"");if(X)Y+=B.left;return Y}};return AY={cursor:B,scroll:J,erase:Q,beep:$},AY}function s0D(){if(rj)return sF.exports;rj=1;let D=process||{},F=D.argv||[],$=D.env||{},B=!(!!$.NO_COLOR||F.includes("--no-color"))&&(!!$.FORCE_COLOR||F.includes("--color")||D.platform==="win32"||(D.stdout||{}).isTTY&&$.TERM!=="dumb"||!!$.CI),J=(Y,G,H=Y)=>(W)=>{let z=""+W,q=z.indexOf(G,Y.length);return~q?Y+Q(z,G,H,q)+G:Y+z+G},Q=(Y,G,H,W)=>{let z="",q=0;do z+=Y.substring(q,W)+H,q=W+G.length,W=Y.indexOf(G,q);while(~W);return z+Y.substring(q)},X=(Y=B)=>{let G=Y?J:()=>String;return{isColorSupported:Y,reset:G("\x1B[0m","\x1B[0m"),bold:G("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:G("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:G("\x1B[3m","\x1B[23m"),underline:G("\x1B[4m","\x1B[24m"),inverse:G("\x1B[7m","\x1B[27m"),hidden:G("\x1B[8m","\x1B[28m"),strikethrough:G("\x1B[9m","\x1B[29m"),black:G("\x1B[30m","\x1B[39m"),red:G("\x1B[31m","\x1B[39m"),green:G("\x1B[32m","\x1B[39m"),yellow:G("\x1B[33m","\x1B[39m"),blue:G("\x1B[34m","\x1B[39m"),magenta:G("\x1B[35m","\x1B[39m"),cyan:G("\x1B[36m","\x1B[39m"),white:G("\x1B[37m","\x1B[39m"),gray:G("\x1B[90m","\x1B[39m"),bgBlack:G("\x1B[40m","\x1B[49m"),bgRed:G("\x1B[41m","\x1B[49m"),bgGreen:G("\x1B[42m","\x1B[49m"),bgYellow:G("\x1B[43m","\x1B[49m"),bgBlue:G("\x1B[44m","\x1B[49m"),bgMagenta:G("\x1B[45m","\x1B[49m"),bgCyan:G("\x1B[46m","\x1B[49m"),bgWhite:G("\x1B[47m","\x1B[49m"),blackBright:G("\x1B[90m","\x1B[39m"),redBright:G("\x1B[91m","\x1B[39m"),greenBright:G("\x1B[92m","\x1B[39m"),yellowBright:G("\x1B[93m","\x1B[39m"),blueBright:G("\x1B[94m","\x1B[39m"),magentaBright:G("\x1B[95m","\x1B[39m"),cyanBright:G("\x1B[96m","\x1B[39m"),whiteBright:G("\x1B[97m","\x1B[39m"),bgBlackBright:G("\x1B[100m","\x1B[49m"),bgRedBright:G("\x1B[101m","\x1B[49m"),bgGreenBright:G("\x1B[102m","\x1B[49m"),bgYellowBright:G("\x1B[103m","\x1B[49m"),bgBlueBright:G("\x1B[104m","\x1B[49m"),bgMagentaBright:G("\x1B[105m","\x1B[49m"),bgCyanBright:G("\x1B[106m","\x1B[49m"),bgWhiteBright:G("\x1B[107m","\x1B[49m")}};return sF.exports=X(),sF.exports.createColors=X,sF.exports}function o0D({onlyFirst:D=!1}={}){let F=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(F,D?void 0:"g")}function JM(D){if(typeof D!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(e0D,"")}function XM(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}function E5(D,F={}){if(typeof D!="string"||D.length===0||(F={ambiguousIsNarrow:!0,...F},D=JM(D),D.length===0))return 0;D=D.replace(B2D()," ");let $=F.ambiguousIsNarrow?1:2,B=0;for(let J of D){let Q=J.codePointAt(0);if(Q<=31||Q>=127&&Q<=159||Q>=768&&Q<=879)continue;switch(F2D.eastAsianWidth(J)){case"F":case"W":B+=2;break;case"A":B+=$;break;default:B+=1}}return B}function Q2D(){let D=new Map;for(let[F,$]of Object.entries(h0)){for(let[B,J]of Object.entries($))h0[B]={open:`\x1B[${J[0]}m`,close:`\x1B[${J[1]}m`},$[B]=h0[B],D.set(J[0],J[1]);Object.defineProperty(h0,F,{value:$,enumerable:!1})}return Object.defineProperty(h0,"codes",{value:D,enumerable:!1}),h0.color.close="\x1B[39m",h0.bgColor.close="\x1B[49m",h0.color.ansi=nj(),h0.color.ansi256=aj(),h0.color.ansi16m=sj(),h0.bgColor.ansi=nj(LY),h0.bgColor.ansi256=aj(LY),h0.bgColor.ansi16m=sj(LY),Object.defineProperties(h0,{rgbToAnsi256:{value:(F,$,B)=>F===$&&$===B?F<8?16:F>248?231:Math.round((F-8)/247*24)+232:16+36*Math.round(F/255*5)+6*Math.round($/255*5)+Math.round(B/255*5),enumerable:!1},hexToRgb:{value:(F)=>{let $=/[a-f\d]{6}|[a-f\d]{3}/i.exec(F.toString(16));if(!$)return[0,0,0];let[B]=$;B.length===3&&(B=[...B].map((Q)=>Q+Q).join(""));let J=Number.parseInt(B,16);return[J>>16&255,J>>8&255,J&255]},enumerable:!1},hexToAnsi256:{value:(F)=>h0.rgbToAnsi256(...h0.hexToRgb(F)),enumerable:!1},ansi256ToAnsi:{value:(F)=>{if(F<8)return 30+F;if(F<16)return 90+(F-8);let $,B,J;if(F>=232)$=((F-232)*10+8)/255,B=$,J=$;else{F-=16;let Y=F%36;$=Math.floor(F/36)/5,B=Math.floor(Y/6)/5,J=Y%6/5}let Q=Math.max($,B,J)*2;if(Q===0)return 30;let X=30+(Math.round(J)<<2|Math.round(B)<<1|Math.round($));return Q===2&&(X+=60),X},enumerable:!1},rgbToAnsi:{value:(F,$,B)=>h0.ansi256ToAnsi(h0.rgbToAnsi256(F,$,B)),enumerable:!1},hexToAnsi:{value:(F)=>h0.ansi256ToAnsi(h0.hexToAnsi256(F)),enumerable:!1}}),h0}function ej(D,F,$){return String(D).normalize().replace(/\r\n/g,` `).split(` `).map((B)=>q2D(B,F,$)).join(` `)}function HM(D,F){if(typeof D=="string")return oF.aliases.get(D)===F;for(let $ of D)if($!==void 0&&HM($,F))return!0;return!1}function K2D(D,F){if(D===F)return;let $=D.split(` `),B=F.split(` `),J=[];for(let Q=0;Q<Math.max($.length,B.length);Q++)$[Q]!==B[Q]&&J.push(Q);return J}function tF(D,F){let $=D;$.isTTY&&$.setRawMode(F)}class R5{constructor(D,F=!0){$1(this,"input"),$1(this,"output"),$1(this,"_abortSignal"),$1(this,"rl"),$1(this,"opts"),$1(this,"_render"),$1(this,"_track",!1),$1(this,"_prevFrame",""),$1(this,"_subscribers",new Map),$1(this,"_cursor",0),$1(this,"state","initial"),$1(this,"error",""),$1(this,"value");let{input:$=d0D,output:B=p0D,render:J,signal:Q,...X}=D;this.opts=X,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=J.bind(this),this._track=F,this._abortSignal=Q,this.input=$,this.output=B}unsubscribe(){this._subscribers.clear()}setSubscriber(D,F){let $=this._subscribers.get(D)??[];$.push(F),this._subscribers.set(D,$)}on(D,F){this.setSubscriber(D,{cb:F})}once(D,F){this.setSubscriber(D,{cb:F,once:!0})}emit(D,...F){let $=this._subscribers.get(D)??[],B=[];for(let J of $)J.cb(...F),J.once&&B.push(()=>$.splice($.indexOf(J),1));for(let J of B)J()}prompt(){return new Promise((D,F)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),D(DM);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let $=new r0D(0);$._write=(B,J,Q)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),Q()},this.input.pipe($),this.rl=dj.createInterface({input:this.input,output:$,tabSize:2,prompt:"",escapeCodeTimeout:50}),dj.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),tF(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(v1.cursor.show),this.output.off("resize",this.render),tF(this.input,!1),D(this.value)}),this.once("cancel",()=>{this.output.write(v1.cursor.show),this.output.off("resize",this.render),tF(this.input,!1),D(DM)})})}onKeypress(D,F){if(this.state==="error"&&(this.state="active"),F?.name&&(!this._track&&oF.aliases.has(F.name)&&this.emit("cursor",oF.aliases.get(F.name)),oF.actions.has(F.name)&&this.emit("cursor",F.name)),D&&(D.toLowerCase()==="y"||D.toLowerCase()==="n")&&this.emit("confirm",D.toLowerCase()==="y"),D==="\t"&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),D&&this.emit("key",D.toLowerCase()),F?.name==="return"){if(this.opts.validate){let $=this.opts.validate(this.value);$&&(this.error=$ instanceof Error?$.message:$,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}HM([D,F?.name,F?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(` `),tF(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let D=ej(this._prevFrame,process.stdout.columns,{hard:!0}).split(` `).length-1;this.output.write(v1.cursor.move(-999,D*-1))}render(){let D=ej(this._render(this)??"",process.stdout.columns,{hard:!0});if(D!==this._prevFrame){if(this.state==="initial")this.output.write(v1.cursor.hide);else{let F=K2D(this._prevFrame,D);if(this.restoreCursor(),F&&F?.length===1){let $=F[0];this.output.write(v1.cursor.move(0,$)),this.output.write(v1.erase.lines(1));let B=D.split(` `);this.output.write(B[$]),this._prevFrame=D,this.output.write(v1.cursor.move(0,B.length-$-1));return}if(F&&F?.length>1){let $=F[0];this.output.write(v1.cursor.move(0,$)),this.output.write(v1.erase.down());let B=D.split(` `).slice($);this.output.write(B.join(` `)),this._prevFrame=D;return}this.output.write(v1.erase.down())}this.output.write(D),this.state==="initial"&&(this.state="active"),this._prevFrame=D}}}function R2D(){return u1.platform!=="win32"?u1.env.TERM!=="linux":!!u1.env.CI||!!u1.env.WT_SESSION||!!u1.env.TERMINUS_SUBLIME||u1.env.ConEmuTask==="{cmd::Cmder}"||u1.env.TERM_PROGRAM==="Terminus-Sublime"||u1.env.TERM_PROGRAM==="vscode"||u1.env.TERM==="xterm-256color"||u1.env.TERM==="alacritty"||u1.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}async function KM(D,F={}){let $=(B)=>{if(typeof B!=="symbol"||B.toString()!=="Symbol(clack:cancel)")return B;switch(F.cancel){case"reject":{let J=new Error("Prompt cancelled.");if(J.name="ConsolaPromptCancelledError",Error.captureStackTrace)Error.captureStackTrace(J,KM);throw J}case"undefined":return;case"null":return null;case"symbol":return VM;default:case"default":return F.default??F.initial}};if(!F.type||F.type==="text")return await T2D({message:D,defaultValue:F.default,placeholder:F.placeholder,initialValue:F.initial}).then($);if(F.type==="confirm")return await S2D({message:D,initialValue:F.initial}).then($);if(F.type==="select")return await _2D({message:D,options:F.options.map((B)=>typeof B==="string"?{value:B,label:B}:B),initialValue:F.initial}).then($);if(F.type==="multiselect")return await b2D({message:D,options:F.options.map((B)=>typeof B==="string"?{value:B,label:B}:B),required:F.required,initialValues:F.initial}).then($);throw new Error(`Unknown prompt type: ${F.type}`)}var AY,pj,v1,sF,rj,t0D,CD,e0D,QM,D2D,F2D,$2D=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\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])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\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\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\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-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*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\u26A7\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-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\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[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},B2D,LY=10,nj=(D=0)=>(F)=>`\x1B[${F+D}m`,aj=(D=0)=>(F)=>`\x1B[${38+D};5;${F}m`,sj=(D=0)=>(F,$,B)=>`\x1B[${38+D};2;${F};${$};${B}m`,h0,J2D,X2D,Y2D,eF,G2D=39,PY="\x07",YM="[",H2D="]",GM="m",TY,tj=(D)=>`${eF.values().next().value}${YM}${D}${GM}`,oj=(D)=>`${eF.values().next().value}${TY}${D}${PY}`,W2D=(D)=>D.split(" ").map((F)=>E5(F)),OY=(D,F,$)=>{let B=[...F],J=!1,Q=!1,X=E5(JM(D[D.length-1]));for(let[Y,G]of B.entries()){let H=E5(G);if(X+H<=$?D[D.length-1]+=G:(D.push(G),X=0),eF.has(G)&&(J=!0,Q=B.slice(Y+1).join("").startsWith(TY)),J){Q?G===PY&&(J=!1,Q=!1):G===GM&&(J=!1);continue}X+=H,X===$&&Y<B.length-1&&(D.push(""),X=0)}!X&&D[D.length-1].length>0&&D.length>1&&(D[D.length-2]+=D.pop())},z2D=(D)=>{let F=D.split(" "),$=F.length;for(;$>0&&!(E5(F[$-1])>0);)$--;return $===F.length?D:F.slice(0,$).join(" ")+F.slice($).join("")},q2D=(D,F,$={})=>{if($.trim!==!1&&D.trim()==="")return"";let B="",J,Q,X=W2D(D),Y=[""];for(let[H,W]of D.split(" ").entries()){$.trim!==!1&&(Y[Y.length-1]=Y[Y.length-1].trimStart());let z=E5(Y[Y.length-1]);if(H!==0&&(z>=F&&($.wordWrap===!1||$.trim===!1)&&(Y.push(""),z=0),(z>0||$.trim===!1)&&(Y[Y.length-1]+=" ",z++)),$.hard&&X[H]>F){let q=F-z,K=1+Math.floor((X[H]-q-1)/F);Math.floor((X[H]-1)/F)<K&&Y.push(""),OY(Y,W,F);continue}if(z+X[H]>F&&z>0&&X[H]>0){if($.wordWrap===!1&&z<F){OY(Y,W,F);continue}Y.push("")}if(z+X[H]>F&&$.wordWrap===!1){OY(Y,W,F);continue}Y[Y.length-1]+=W}$.trim!==!1&&(Y=Y.map((H)=>z2D(H)));let G=[...Y.join(` `)];for(let[H,W]of G.entries()){if(B+=W,eF.has(W)){let{groups:q}=new RegExp(`(?:\\${YM}(?<code>\\d+)m|\\${TY}(?<uri>.*)${PY})`).exec(G.slice(H).join(""))||{groups:{}};if(q.code!==void 0){let K=Number.parseFloat(q.code);J=K===G2D?void 0:K}else q.uri!==void 0&&(Q=q.uri.length===0?void 0:q.uri)}let z=Y2D.codes.get(Number(J));G[H+1]===` `?(Q&&(B+=oj("")),J&&z&&(B+=tj(z))):W===` `&&(J&&z&&(B+=tj(J)),Q&&(B+=oj(Q)))}return B},V2D,oF,DM,C2D,U2D=(D,F,$)=>(F in D)?C2D(D,F,{enumerable:!0,configurable:!0,writable:!0,value:$}):D[F]=$,$1=(D,F,$)=>(U2D(D,typeof F!="symbol"?F+"":F,$),$),WM,Z2D,j2D=(D,F,$)=>(F in D)?Z2D(D,F,{enumerable:!0,configurable:!0,writable:!0,value:$}):D[F]=$,FM=(D,F,$)=>(j2D(D,typeof F!="symbol"?F+"":F,$),$),M2D,w2D,E2D=(D,F,$)=>(F in D)?w2D(D,F,{enumerable:!0,configurable:!0,writable:!0,value:$}):D[F]=$,$M=(D,F,$)=>(E2D(D,typeof F!="symbol"?F+"":F,$),$),zM,qM,A2D,h1=(D,F)=>A2D?D:F,L2D,O2D,N2D,I2D,I0,T9,NY,IY,f2D,BM,P2D,D$=(D)=>{switch(D){case"initial":case"active":return CD.cyan(L2D);case"cancel":return CD.red(O2D);case"error":return CD.yellow(N2D);case"submit":return CD.green(I2D)}},fY=(D)=>{let{cursor:F,options:$,style:B}=D,J=D.maxItems??Number.POSITIVE_INFINITY,Q=Math.max(process.stdout.rows-4,0),X=Math.min(Q,Math.max(J,5)),Y=0;F>=Y+X-3?Y=Math.max(Math.min(F-X+3,$.length-X),0):F<Y+2&&(Y=Math.max(F-2,0));let G=X<$.length&&Y>0,H=X<$.length&&Y+X<$.length;return $.slice(Y,Y+X).map((W,z,q)=>{let K=z===0&&G,C=z===q.length-1&&H;return K||C?CD.dim("..."):B(W,z+Y===F)})},T2D=(D)=>new qM({validate:D.validate,placeholder:D.placeholder,defaultValue:D.defaultValue,initialValue:D.initialValue,render(){let F=`${CD.gray(I0)} ${D$(this.state)} ${D.message} `,$=D.placeholder?CD.inverse(D.placeholder[0])+CD.dim(D.placeholder.slice(1)):CD.inverse(CD.hidden("_")),B=this.value?this.valueWithCursor:$;switch(this.state){case"error":return`${F.trim()} ${CD.yellow(I0)} ${B} ${CD.yellow(T9)} ${CD.yellow(this.error)} `;case"submit":return`${F}${CD.gray(I0)} ${CD.dim(this.value||D.placeholder)}`;case"cancel":return`${F}${CD.gray(I0)} ${CD.strikethrough(CD.dim(this.value??""))}${this.value?.trim()?` ${CD.gray(I0)}`:""}`;default:return`${F}${CD.cyan(I0)} ${B} ${CD.cyan(T9)} `}}}).prompt(),S2D=(D)=>{let F=D.active??"Yes",$=D.inactive??"No";return new WM({active:F,inactive:$,initialValue:D.initialValue??!0,render(){let B=`${CD.gray(I0)} ${D$(this.state)} ${D.message} `,J=this.value?F:$;switch(this.state){case"submit":return`${B}${CD.gray(I0)} ${CD.dim(J)}`;case"cancel":return`${B}${CD.gray(I0)} ${CD.strikethrough(CD.dim(J))} ${CD.gray(I0)}`;default:return`${B}${CD.cyan(I0)} ${this.value?`${CD.green(NY)} ${F}`:`${CD.dim(IY)} ${CD.dim(F)}`} ${CD.dim("/")} ${this.value?`${CD.dim(IY)} ${CD.dim($)}`:`${CD.green(NY)} ${$}`} ${CD.cyan(T9)} `}}}).prompt()},_2D=(D)=>{let F=($,B)=>{let J=$.label??String($.value);switch(B){case"selected":return`${CD.dim(J)}`;case"active":return`${CD.green(NY)} ${J} ${$.hint?CD.dim(`(${$.hint})`):""}`;case"cancelled":return`${CD.strikethrough(CD.dim(J))}`;default:return`${CD.dim(IY)} ${CD.dim(J)}`}};return new zM({options:D.options,initialValue:D.initialValue,render(){let $=`${CD.gray(I0)} ${D$(this.state)} ${D.message} `;switch(this.state){case"submit":return`${$}${CD.gray(I0)} ${F(this.options[this.cursor],"selected")}`;case"cancel":return`${$}${CD.gray(I0)} ${F(this.options[this.cursor],"cancelled")} ${CD.gray(I0)}`;default:return`${$}${CD.cyan(I0)} ${fY({cursor:this.cursor,options:this.options,maxItems:D.maxItems,style:(B,J)=>F(B,J?"active":"inactive")}).join(` ${CD.cyan(I0)} `)} ${CD.cyan(T9)} `}}}).prompt()},b2D=(D)=>{let F=($,B)=>{let J=$.label??String($.value);return B==="active"?`${CD.cyan(f2D)} ${J} ${$.hint?CD.dim(`(${$.hint})`):""}`:B==="selected"?`${CD.green(BM)} ${CD.dim(J)}`:B==="cancelled"?`${CD.strikethrough(CD.dim(J))}`:B==="active-selected"?`${CD.green(BM)} ${J} ${$.hint?CD.dim(`(${$.hint})`):""}`:B==="submitted"?`${CD.dim(J)}`:`${CD.dim(P2D)} ${CD.dim(J)}`};return new M2D({options:D.options,initialValues:D.initialValues,required:D.required??!0,cursorAt:D.cursorAt