bunextupgrade 0.1.1 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1,68 +1,68 @@
1
1
  #!/usr/bin/env node
2
- import{createRequire as rZ}from"node:module";var dZ=Object.create;var{getPrototypeOf:lZ,defineProperty:K6,getOwnPropertyNames:nZ}=Object;var iZ=Object.prototype.hasOwnProperty;function tZ($){return this[$]}var oZ,aZ,Z$=($,J,X)=>{var Z=$!=null&&typeof $==="object";if(Z){var q=J?oZ??=new WeakMap:aZ??=new WeakMap,Y=q.get($);if(Y)return Y}X=$!=null?dZ(lZ($)):{};let Q=J||!$||!$.__esModule?K6(X,"default",{value:$,enumerable:!0}):X;for(let G of nZ($))if(!iZ.call(Q,G))K6(Q,G,{get:tZ.bind($,G),enumerable:!0});if(Z)q.set($,Q);return Q};var R0=($,J)=>()=>(J||$((J={exports:{}}).exports,J),J.exports);var V0=rZ(import.meta.url);var p6=R0((pW,m6)=>{m6.exports=u6;u6.sync=sQ;var g6=V0("fs");function rQ($,J){var X=J.pathExt!==void 0?J.pathExt:process.env.PATHEXT;if(!X)return!0;if(X=X.split(";"),X.indexOf("")!==-1)return!0;for(var Z=0;Z<X.length;Z++){var q=X[Z].toLowerCase();if(q&&$.substr(-q.length).toLowerCase()===q)return!0}return!1}function c6($,J,X){if(!$.isSymbolicLink()&&!$.isFile())return!1;return rQ(J,X)}function u6($,J,X){g6.stat($,function(Z,q){X(Z,Z?!1:c6(q,$,J))})}function sQ($,J){return c6(g6.statSync($),$,J)}});var t6=R0((dW,i6)=>{i6.exports=l6;l6.sync=eQ;var d6=V0("fs");function l6($,J,X){d6.stat($,function(Z,q){X(Z,Z?!1:n6(q,J))})}function eQ($,J){return n6(d6.statSync($),J)}function n6($,J){return $.isFile()&&$q($,J)}function $q($,J){var{mode:X,uid:Z,gid:q}=$,Y=J.uid!==void 0?J.uid:process.getuid&&process.getuid(),Q=J.gid!==void 0?J.gid:process.getgid&&process.getgid(),G=parseInt("100",8),H=parseInt("010",8),B=parseInt("001",8),U=G|H,K=X&B||X&H&&q===Q||X&G&&Z===Y||X&U&&Y===0;return K}});var a6=R0((nW,o6)=>{var lW=V0("fs"),b$;if(process.platform==="win32"||global.TESTING_WINDOWS)b$=p6();else b$=t6();o6.exports=K2;K2.sync=Jq;function K2($,J,X){if(typeof J==="function")X=J,J={};if(!X){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(Z,q){K2($,J||{},function(Y,Q){if(Y)q(Y);else Z(Q)})})}b$($,J||{},function(Z,q){if(Z){if(Z.code==="EACCES"||J&&J.ignoreErrors)Z=null,q=!1}X(Z,q)})}function Jq($,J){try{return b$.sync($,J||{})}catch(X){if(J&&J.ignoreErrors||X.code==="EACCES")return!1;else throw X}}});var Z8=R0((iW,X8)=>{var b1=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",r6=V0("path"),Xq=b1?";":":",s6=a6(),e6=($)=>Object.assign(Error(`not found: ${$}`),{code:"ENOENT"}),$8=($,J)=>{let X=J.colon||Xq,Z=$.match(/\//)||b1&&$.match(/\\/)?[""]:[...b1?[process.cwd()]:[],...(J.path||process.env.PATH||"").split(X)],q=b1?J.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",Y=b1?q.split(X):[""];if(b1){if($.indexOf(".")!==-1&&Y[0]!=="")Y.unshift("")}return{pathEnv:Z,pathExt:Y,pathExtExe:q}},J8=($,J,X)=>{if(typeof J==="function")X=J,J={};if(!J)J={};let{pathEnv:Z,pathExt:q,pathExtExe:Y}=$8($,J),Q=[],G=(B)=>new Promise((U,K)=>{if(B===Z.length)return J.all&&Q.length?U(Q):K(e6($));let W=Z[B],P=/^".*"$/.test(W)?W.slice(1,-1):W,R=r6.join(P,$),L=!P&&/^\.[\\\/]/.test($)?$.slice(0,2)+R:R;U(H(L,B,0))}),H=(B,U,K)=>new Promise((W,P)=>{if(K===q.length)return W(G(U+1));let R=q[K];s6(B+R,{pathExt:Y},(L,M)=>{if(!L&&M)if(J.all)Q.push(B+R);else return W(B+R);return W(H(B,U,K+1))})});return X?G(0).then((B)=>X(null,B),X):G(0)},Zq=($,J)=>{J=J||{};let{pathEnv:X,pathExt:Z,pathExtExe:q}=$8($,J),Y=[];for(let Q=0;Q<X.length;Q++){let G=X[Q],H=/^".*"$/.test(G)?G.slice(1,-1):G,B=r6.join(H,$),U=!H&&/^\.[\\\/]/.test($)?$.slice(0,2)+B:B;for(let K=0;K<Z.length;K++){let W=U+Z[K];try{if(s6.sync(W,{pathExt:q}))if(J.all)Y.push(W);else return W}catch(P){}}}if(J.all&&Y.length)return Y;if(J.nothrow)return null;throw e6($)};X8.exports=J8;J8.sync=Zq});var q8=R0((tW,U2)=>{var Q8=($={})=>{let J=$.env||process.env;if(($.platform||process.platform)!=="win32")return"PATH";return Object.keys(J).reverse().find((Z)=>Z.toUpperCase()==="PATH")||"Path"};U2.exports=Q8;U2.exports.default=Q8});var z8=R0((oW,H8)=>{var Y8=V0("path"),Qq=Z8(),qq=q8();function G8($,J){let X=$.options.env||process.env,Z=process.cwd(),q=$.options.cwd!=null,Y=q&&process.chdir!==void 0&&!process.chdir.disabled;if(Y)try{process.chdir($.options.cwd)}catch(G){}let Q;try{Q=Qq.sync($.command,{path:X[qq({env:X})],pathExt:J?Y8.delimiter:void 0})}catch(G){}finally{if(Y)process.chdir(Z)}if(Q)Q=Y8.resolve(q?$.options.cwd:"",Q);return Q}function Yq($){return G8($)||G8($,!0)}H8.exports=Yq});var B8=R0((zq,V2)=>{var W2=/([()\][%!^"`<>&|;, *?])/g;function Gq($){return $=$.replace(W2,"^$1"),$}function Hq($,J){if($=`${$}`,$=$.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),$=$.replace(/(?=(\\+?)?)\1$/,"$1$1"),$=`"${$}"`,$=$.replace(W2,"^$1"),J)$=$.replace(W2,"^$1");return $}zq.command=Gq;zq.argument=Hq});var U8=R0((aW,K8)=>{K8.exports=/^#!(.*)/});var V8=R0((rW,W8)=>{var Uq=U8();W8.exports=($="")=>{let J=$.match(Uq);if(!J)return null;let[X,Z]=J[0].replace(/#! ?/,"").split(" "),q=X.split("/").pop();if(q==="env")return Z;return Z?`${q} ${Z}`:q}});var _8=R0((sW,L8)=>{var L2=V0("fs"),Wq=V8();function Vq($){let X=Buffer.alloc(150),Z;try{Z=L2.openSync($,"r"),L2.readSync(Z,X,0,150,0),L2.closeSync(Z)}catch(q){}return Wq(X.toString())}L8.exports=Vq});var F8=R0((eW,P8)=>{var Lq=V0("path"),R8=z8(),T8=B8(),_q=_8(),Rq=process.platform==="win32",Tq=/\.(?:com|exe)$/i,Pq=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Fq($){$.file=R8($);let J=$.file&&_q($.file);if(J)return $.args.unshift($.file),$.command=J,R8($);return $.file}function Mq($){if(!Rq)return $;let J=Fq($),X=!Tq.test(J);if($.options.forceShell||X){let Z=Pq.test(J);$.command=Lq.normalize($.command),$.command=T8.command($.command),$.args=$.args.map((Y)=>T8.argument(Y,Z));let q=[$.command].concat($.args).join(" ");$.args=["/d","/s","/c",`"${q}"`],$.command=process.env.comspec||"cmd.exe",$.options.windowsVerbatimArguments=!0}return $}function Cq($,J,X){if(J&&!Array.isArray(J))X=J,J=null;J=J?J.slice(0):[],X=Object.assign({},X);let Z={command:$,args:J,options:X,file:void 0,original:{command:$,args:J}};return X.shell?Z:Mq(Z)}P8.exports=Cq});var x8=R0(($V,C8)=>{var _2=process.platform==="win32";function R2($,J){return Object.assign(Error(`${J} ${$.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${J} ${$.command}`,path:$.command,spawnargs:$.args})}function xq($,J){if(!_2)return;let X=$.emit;$.emit=function(Z,q){if(Z==="exit"){let Y=M8(q,J);if(Y)return X.call($,"error",Y)}return X.apply($,arguments)}}function M8($,J){if(_2&&$===1&&!J.file)return R2(J.original,"spawn");return null}function jq($,J){if(_2&&$===1&&!J.file)return R2(J.original,"spawnSync");return null}C8.exports={hookChildProcess:xq,verifyENOENT:M8,verifyENOENTSync:jq,notFoundError:R2}});var w8=R0((JV,y1)=>{var j8=V0("child_process"),T2=F8(),P2=x8();function I8($,J,X){let Z=T2($,J,X),q=j8.spawn(Z.command,Z.args,Z.options);return P2.hookChildProcess(q,Z),q}function Iq($,J,X){let Z=T2($,J,X),q=j8.spawnSync(Z.command,Z.args,Z.options);return q.error=q.error||P2.verifyENOENTSync(q.status,Z),q}y1.exports=I8;y1.exports.spawn=I8;y1.exports.sync=Iq;y1.exports._parse=T2;y1.exports._enoent=P2});var A3=R0((zx,MX)=>{var h3={to($,J){if(!J)return`\x1B[${$+1}G`;return`\x1B[${J+1};${$+1}H`},move($,J){let X="";if($<0)X+=`\x1B[${-$}D`;else if($>0)X+=`\x1B[${$}C`;if(J<0)X+=`\x1B[${-J}A`;else if(J>0)X+=`\x1B[${J}B`;return X},up:($=1)=>`\x1B[${$}A`,down:($=1)=>`\x1B[${$}B`,forward:($=1)=>`\x1B[${$}C`,backward:($=1)=>`\x1B[${$}D`,nextLine:($=1)=>"\x1B[E".repeat($),prevLine:($=1)=>"\x1B[F".repeat($),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},wB={up:($=1)=>"\x1B[S".repeat($),down:($=1)=>"\x1B[T".repeat($)},OB={screen:"\x1B[2J",up:($=1)=>"\x1B[1J".repeat($),down:($=1)=>"\x1B[J".repeat($),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines($){let J="";for(let X=0;X<$;X++)J+=this.line+(X<$-1?h3.up():"");if($)J+=h3.left;return J}};MX.exports={cursor:h3,scroll:wB,erase:OB,beep:"\x07"}});var D3=R0((Bx,N3)=>{var k4=process||{},CX=k4.argv||[],v4=k4.env||{},EB=!(!!v4.NO_COLOR||CX.includes("--no-color"))&&(!!v4.FORCE_COLOR||CX.includes("--color")||k4.platform==="win32"||(k4.stdout||{}).isTTY&&v4.TERM!=="dumb"||!!v4.CI),hB=($,J,X=$)=>(Z)=>{let q=""+Z,Y=q.indexOf(J,$.length);return~Y?$+AB(q,J,X,Y)+J:$+q+J},AB=($,J,X,Z)=>{let q="",Y=0;do q+=$.substring(Y,Z)+X,Y=Z+J.length,Z=$.indexOf(J,Y);while(~Z);return q+$.substring(Y)},xX=($=EB)=>{let J=$?hB:()=>String;return{isColorSupported:$,reset:J("\x1B[0m","\x1B[0m"),bold:J("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:J("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:J("\x1B[3m","\x1B[23m"),underline:J("\x1B[4m","\x1B[24m"),inverse:J("\x1B[7m","\x1B[27m"),hidden:J("\x1B[8m","\x1B[28m"),strikethrough:J("\x1B[9m","\x1B[29m"),black:J("\x1B[30m","\x1B[39m"),red:J("\x1B[31m","\x1B[39m"),green:J("\x1B[32m","\x1B[39m"),yellow:J("\x1B[33m","\x1B[39m"),blue:J("\x1B[34m","\x1B[39m"),magenta:J("\x1B[35m","\x1B[39m"),cyan:J("\x1B[36m","\x1B[39m"),white:J("\x1B[37m","\x1B[39m"),gray:J("\x1B[90m","\x1B[39m"),bgBlack:J("\x1B[40m","\x1B[49m"),bgRed:J("\x1B[41m","\x1B[49m"),bgGreen:J("\x1B[42m","\x1B[49m"),bgYellow:J("\x1B[43m","\x1B[49m"),bgBlue:J("\x1B[44m","\x1B[49m"),bgMagenta:J("\x1B[45m","\x1B[49m"),bgCyan:J("\x1B[46m","\x1B[49m"),bgWhite:J("\x1B[47m","\x1B[49m"),blackBright:J("\x1B[90m","\x1B[39m"),redBright:J("\x1B[91m","\x1B[39m"),greenBright:J("\x1B[92m","\x1B[39m"),yellowBright:J("\x1B[93m","\x1B[39m"),blueBright:J("\x1B[94m","\x1B[39m"),magentaBright:J("\x1B[95m","\x1B[39m"),cyanBright:J("\x1B[96m","\x1B[39m"),whiteBright:J("\x1B[97m","\x1B[39m"),bgBlackBright:J("\x1B[100m","\x1B[49m"),bgRedBright:J("\x1B[101m","\x1B[49m"),bgGreenBright:J("\x1B[102m","\x1B[49m"),bgYellowBright:J("\x1B[103m","\x1B[49m"),bgBlueBright:J("\x1B[104m","\x1B[49m"),bgMagentaBright:J("\x1B[105m","\x1B[49m"),bgCyanBright:J("\x1B[106m","\x1B[49m"),bgWhiteBright:J("\x1B[107m","\x1B[49m")}};N3.exports=xX();N3.exports.createColors=xX});function X0($){if(typeof $!=="object"||$===null)return!1;let J=Object.getPrototypeOf($);return(J===null||J===Object.prototype||Object.getPrototypeOf(J)===null)&&!(Symbol.toStringTag in $)&&!(Symbol.iterator in $)}import{fileURLToPath as sZ}from"node:url";var f1=($,J)=>{let X=X2(eZ($));if(typeof X!=="string")throw TypeError(`${J} must be a string or a file URL: ${X}.`);return X},eZ=($)=>J2($)?$.toString():$,J2=($)=>typeof $!=="string"&&$&&Object.getPrototypeOf($)===String.prototype,X2=($)=>$ instanceof URL?sZ($):$;var I$=($,J=[],X={})=>{let Z=f1($,"First argument"),[q,Y]=X0(J)?[[],J]:[J,X];if(!Array.isArray(q))throw TypeError(`Second argument must be either an array of arguments or an options object: ${q}`);if(q.some((H)=>typeof H==="object"&&H!==null))throw TypeError(`Second argument must be an array of strings: ${q}`);let Q=q.map(String),G=Q.find((H)=>H.includes("\x00"));if(G!==void 0)throw TypeError(`Arguments cannot contain null bytes ("\\0"): ${G}`);if(!X0(Y))throw TypeError(`Last argument must be an options object: ${Y}`);return[Z,Q,Y]};import{ChildProcess as YQ}from"node:child_process";import{StringDecoder as $Q}from"node:string_decoder";var{toString:U6}=Object.prototype,W6=($)=>U6.call($)==="[object ArrayBuffer]",z0=($)=>U6.call($)==="[object Uint8Array]",i0=($)=>new Uint8Array($.buffer,$.byteOffset,$.byteLength),JQ=new TextEncoder,V6=($)=>JQ.encode($),XQ=new TextDecoder,w$=($)=>XQ.decode($),L6=($,J)=>{return ZQ($,J).join("")},ZQ=($,J)=>{if(J==="utf8"&&$.every((Y)=>typeof Y==="string"))return $;let X=new $Q(J),Z=$.map((Y)=>typeof Y==="string"?V6(Y):Y).map((Y)=>X.write(Y)),q=X.end();return q===""?Z:[...Z,q]},Q$=($)=>{if($.length===1&&z0($[0]))return $[0];return Z2(QQ($))},QQ=($)=>$.map((J)=>typeof J==="string"?V6(J):J),Z2=($)=>{let J=new Uint8Array(qQ($)),X=0;for(let Z of $)J.set(Z,X),X+=Z.length;return J},qQ=($)=>{let J=0;for(let X of $)J+=X.length;return J};var P6=($)=>Array.isArray($)&&Array.isArray($.raw),F6=($,J)=>{let X=[];for(let[Y,Q]of $.entries())X=GQ({templates:$,expressions:J,tokens:X,index:Y,template:Q});if(X.length===0)throw TypeError("Template script must not be empty");let[Z,...q]=X;return[Z,q,{}]},GQ=({templates:$,expressions:J,tokens:X,index:Z,template:q})=>{if(q===void 0)throw TypeError(`Invalid backslash sequence: ${$.raw[Z]}`);let{nextTokens:Y,leadingWhitespaces:Q,trailingWhitespaces:G}=HQ(q,$.raw[Z]),H=R6(X,Y,Q);if(Z===J.length)return H;let B=J[Z],U=Array.isArray(B)?B.map((K)=>T6(K)):[T6(B)];return R6(H,U,G)},HQ=($,J)=>{if(J.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let X=[],Z=0,q=_6.has(J[0]);for(let Q=0,G=0;Q<$.length;Q+=1,G+=1){let H=J[G];if(_6.has(H)){if(Z!==Q)X.push($.slice(Z,Q));Z=Q+1}else if(H==="\\"){let B=J[G+1];if(B===`
3
- `)Q-=1,G+=1;else if(B==="u"&&J[G+2]==="{")G=J.indexOf("}",G+3);else G+=zQ[B]??1}}let Y=Z===$.length;if(!Y)X.push($.slice(Z));return{nextTokens:X,leadingWhitespaces:q,trailingWhitespaces:Y}},_6=new Set([" ","\t","\r",`
4
- `]),zQ={x:3,u:5},R6=($,J,X)=>X||$.length===0||J.length===0?[...$,...J]:[...$.slice(0,-1),`${$.at(-1)}${J[0]}`,...J.slice(1)],T6=($)=>{let J=typeof $;if(J==="string")return $;if(J==="number")return String($);if(X0($)&&(("stdout"in $)||("isMaxBuffer"in $)))return BQ($);if($ instanceof YQ||Object.prototype.toString.call($)==="[object Promise]")throw TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw TypeError(`Unexpected "${J}" in template expression`)},BQ=({stdout:$})=>{if(typeof $==="string")return $;if(z0($))return w$($);if($===void 0)throw TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`);throw TypeError(`Unexpected "${typeof $}" stdout in template expression`)};import{spawnSync as RH}from"node:child_process";import{debuglog as KQ}from"node:util";import Q2 from"node:process";var D0=($)=>O$.includes($),O$=[Q2.stdin,Q2.stdout,Q2.stderr],j0=["stdin","stdout","stderr"],E$=($)=>j0[$]??`stdio[${$}]`;var C6=($)=>{let J={...$};for(let X of G2)J[X]=q2($,X);return J},q2=($,J)=>{let X=Array.from({length:UQ($)+1}),Z=WQ($[J],X,J);return TQ(Z,J)},UQ=({stdio:$})=>Array.isArray($)?Math.max($.length,j0.length):j0.length,WQ=($,J,X)=>X0($)?VQ($,J,X):J.fill($),VQ=($,J,X)=>{for(let Z of Object.keys($).sort(LQ))for(let q of _Q(Z,X,J))J[q]=$[Z];return J},LQ=($,J)=>M6($)<M6(J)?1:-1,M6=($)=>{if($==="stdout"||$==="stderr")return 0;return $==="all"?2:1},_Q=($,J,X)=>{if($==="ipc")return[X.length-1];let Z=Y2($);if(Z===void 0||Z===0)throw TypeError(`"${J}.${$}" is invalid.
5
- It must be "${J}.stdout", "${J}.stderr", "${J}.all", "${J}.ipc", or "${J}.fd3", "${J}.fd4" (and so on).`);if(Z>=X.length)throw TypeError(`"${J}.${$}" is invalid: that file descriptor does not exist.
6
- Please set the "stdio" option to ensure that file descriptor exists.`);return Z==="all"?[1,2]:[Z]},Y2=($)=>{if($==="all")return $;if(j0.includes($))return j0.indexOf($);let J=RQ.exec($);if(J!==null)return Number(J[1])},RQ=/^fd(\d+)$/,TQ=($,J)=>$.map((X)=>X===void 0?FQ[J]:X),PQ=KQ("execa").enabled?"full":"none",FQ={lines:!1,buffer:!0,maxBuffer:1e8,verbose:PQ,stripFinalNewline:!0},G2=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],t0=($,J)=>J==="ipc"?$.at(-1):$[J];var v1=({verbose:$},J)=>H2($,J)!=="none",k1=({verbose:$},J)=>!["none","short"].includes(H2($,J)),x6=({verbose:$},J)=>{let X=H2($,J);return h$(X)?X:void 0},H2=($,J)=>J===void 0?MQ($):t0($,J),MQ=($)=>$.find((J)=>h$(J))??A$.findLast((J)=>$.includes(J)),h$=($)=>typeof $==="function",A$=["none","short","full"];import{inspect as pQ}from"node:util";import{platform as CQ}from"node:process";import{stripVTControlCharacters as xQ}from"node:util";var j6=($,J)=>{let X=[$,...J],Z=X.join(" "),q=X.map((Y)=>hQ(I6(Y))).join(" ");return{command:Z,escapedCommand:q}},q$=($)=>xQ($).split(`
7
- `).map((J)=>I6(J)).join(`
8
- `),I6=($)=>$.replaceAll(wQ,(J)=>jQ(J)),jQ=($)=>{let J=OQ[$];if(J!==void 0)return J;let X=$.codePointAt(0),Z=X.toString(16);return X<=EQ?`\\u${Z.padStart(4,"0")}`:`\\U${Z}`},IQ=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},wQ=IQ(),OQ={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},EQ=65535,hQ=($)=>{if(AQ.test($))return $;return CQ==="win32"?`"${$.replaceAll('"','""')}"`:`'${$.replaceAll("'","'\\''")}'`},AQ=/^[\w./-]+$/;import w6 from"node:process";function z2(){let{env:$}=w6,{TERM:J,TERM_PROGRAM:X}=$;if(w6.platform!=="win32")return J!=="linux";return Boolean($.WT_SESSION)||Boolean($.TERMINUS_SUBLIME)||$.ConEmuTask==="{cmd::Cmder}"||X==="Terminus-Sublime"||X==="vscode"||J==="xterm-256color"||J==="alacritty"||J==="rxvt-unicode"||J==="rxvt-unicode-256color"||$.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var O6={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},E6={tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},NQ={tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},DQ={...O6,...E6},SQ={...O6,...NQ},fQ=z2(),vQ=fQ?DQ:SQ,N$=vQ,SU=Object.entries(E6);import kQ from"node:tty";var bQ=kQ?.WriteStream?.prototype?.hasColors?.()??!1,c=($,J)=>{if(!bQ)return(q)=>q;let X=`\x1B[${$}m`,Z=`\x1B[${J}m`;return(q)=>{let Y=q+"",Q=Y.indexOf(Z);if(Q===-1)return X+Y+Z;let G=X,H=0,U=(J===22?Z:"")+X;while(Q!==-1)G+=Y.slice(H,Q)+U,H=Q+Z.length,Q=Y.indexOf(Z,H);return G+=Y.slice(H)+Z,G}},kU=c(0,0),h6=c(1,22),bU=c(2,22),yU=c(3,23),gU=c(4,24),cU=c(53,55),uU=c(7,27),mU=c(8,28),pU=c(9,29),dU=c(30,39),lU=c(31,39),nU=c(32,39),iU=c(33,39),tU=c(34,39),oU=c(35,39),aU=c(36,39),rU=c(37,39),D$=c(90,39),sU=c(40,49),eU=c(41,49),$W=c(42,49),JW=c(43,49),XW=c(44,49),ZW=c(45,49),QW=c(46,49),qW=c(47,49),YW=c(100,49),A6=c(91,39),GW=c(92,39),N6=c(93,39),HW=c(94,39),zW=c(95,39),BW=c(96,39),KW=c(97,39),UW=c(101,49),WW=c(102,49),VW=c(103,49),LW=c(104,49),_W=c(105,49),RW=c(106,49),TW=c(107,49);var f6=({type:$,message:J,timestamp:X,piped:Z,commandId:q,result:{failed:Y=!1}={},options:{reject:Q=!0}})=>{let G=yQ(X),H=gQ[$]({failed:Y,reject:Q,piped:Z}),B=cQ[$]({reject:Q});return`${D$(`[${G}]`)} ${D$(`[${q}]`)} ${B(H)} ${B(J)}`},yQ=($)=>`${S$($.getHours(),2)}:${S$($.getMinutes(),2)}:${S$($.getSeconds(),2)}.${S$($.getMilliseconds(),3)}`,S$=($,J)=>String($).padStart(J,"0"),D6=({failed:$,reject:J})=>{if(!$)return N$.tick;return J?N$.cross:N$.warning},gQ={command:({piped:$})=>$?"|":"$",output:()=>" ",ipc:()=>"*",error:D6,duration:D6},S6=($)=>$,cQ={command:()=>h6,output:()=>S6,ipc:()=>S6,error:({reject:$})=>$?A6:N6,duration:()=>D$};var v6=($,J,X)=>{let Z=x6(J,X);return $.map(({verboseLine:q,verboseObject:Y})=>uQ(q,Y,Z)).filter((q)=>q!==void 0).map((q)=>mQ(q)).join("")},uQ=($,J,X)=>{if(X===void 0)return $;let Z=X($,J);if(typeof Z==="string")return Z},mQ=($)=>$.endsWith(`
2
+ import{createRequire as sX}from"node:module";var lX=Object.create;var{getPrototypeOf:nX,defineProperty:W6,getOwnPropertyNames:iX}=Object;var oX=Object.prototype.hasOwnProperty;function tX($){return this[$]}var aX,rX,X$=($,J,Z)=>{var X=$!=null&&typeof $==="object";if(X){var q=J?aX??=new WeakMap:rX??=new WeakMap,Y=q.get($);if(Y)return Y}Z=$!=null?lX(nX($)):{};let Q=J||!$||!$.__esModule?W6(Z,"default",{value:$,enumerable:!0}):Z;for(let G of iX($))if(!oX.call(Q,G))W6(Q,G,{get:tX.bind($,G),enumerable:!0});if(X)q.set($,Q);return Q};var R0=($,J)=>()=>(J||$((J={exports:{}}).exports,J),J.exports);var V0=sX(import.meta.url);var l6=R0((nW,d6)=>{d6.exports=p6;p6.sync=eQ;var m6=V0("fs");function sQ($,J){var Z=J.pathExt!==void 0?J.pathExt:process.env.PATHEXT;if(!Z)return!0;if(Z=Z.split(";"),Z.indexOf("")!==-1)return!0;for(var X=0;X<Z.length;X++){var q=Z[X].toLowerCase();if(q&&$.substr(-q.length).toLowerCase()===q)return!0}return!1}function c6($,J,Z){if(!$.isSymbolicLink()&&!$.isFile())return!1;return sQ(J,Z)}function p6($,J,Z){m6.stat($,function(X,q){Z(X,X?!1:c6(q,$,J))})}function eQ($,J){return c6(m6.statSync($),$,J)}});var a6=R0((iW,t6)=>{t6.exports=i6;i6.sync=$q;var n6=V0("fs");function i6($,J,Z){n6.stat($,function(X,q){Z(X,X?!1:o6(q,J))})}function $q($,J){return o6(n6.statSync($),J)}function o6($,J){return $.isFile()&&Jq($,J)}function Jq($,J){var{mode:Z,uid:X,gid:q}=$,Y=J.uid!==void 0?J.uid:process.getuid&&process.getuid(),Q=J.gid!==void 0?J.gid:process.getgid&&process.getgid(),G=parseInt("100",8),H=parseInt("010",8),K=parseInt("001",8),U=G|H,B=Z&K||Z&H&&q===Q||Z&G&&X===Y||Z&U&&Y===0;return B}});var s6=R0((tW,r6)=>{var oW=V0("fs"),g$;if(process.platform==="win32"||global.TESTING_WINDOWS)g$=l6();else g$=a6();r6.exports=W2;W2.sync=Zq;function W2($,J,Z){if(typeof J==="function")Z=J,J={};if(!Z){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(X,q){W2($,J||{},function(Y,Q){if(Y)q(Y);else X(Q)})})}g$($,J||{},function(X,q){if(X){if(X.code==="EACCES"||J&&J.ignoreErrors)X=null,q=!1}Z(X,q)})}function Zq($,J){try{return g$.sync($,J||{})}catch(Z){if(J&&J.ignoreErrors||Z.code==="EACCES")return!1;else throw Z}}});var q7=R0((aW,Q7)=>{var y1=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",e6=V0("path"),Xq=y1?";":":",$7=s6(),J7=($)=>Object.assign(Error(`not found: ${$}`),{code:"ENOENT"}),Z7=($,J)=>{let Z=J.colon||Xq,X=$.match(/\//)||y1&&$.match(/\\/)?[""]:[...y1?[process.cwd()]:[],...(J.path||process.env.PATH||"").split(Z)],q=y1?J.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",Y=y1?q.split(Z):[""];if(y1){if($.indexOf(".")!==-1&&Y[0]!=="")Y.unshift("")}return{pathEnv:X,pathExt:Y,pathExtExe:q}},X7=($,J,Z)=>{if(typeof J==="function")Z=J,J={};if(!J)J={};let{pathEnv:X,pathExt:q,pathExtExe:Y}=Z7($,J),Q=[],G=(K)=>new Promise((U,B)=>{if(K===X.length)return J.all&&Q.length?U(Q):B(J7($));let W=X[K],M=/^".*"$/.test(W)?W.slice(1,-1):W,R=e6.join(M,$),L=!M&&/^\.[\\\/]/.test($)?$.slice(0,2)+R:R;U(H(L,K,0))}),H=(K,U,B)=>new Promise((W,M)=>{if(B===q.length)return W(G(U+1));let R=q[B];$7(K+R,{pathExt:Y},(L,I)=>{if(!L&&I)if(J.all)Q.push(K+R);else return W(K+R);return W(H(K,U,B+1))})});return Z?G(0).then((K)=>Z(null,K),Z):G(0)},Qq=($,J)=>{J=J||{};let{pathEnv:Z,pathExt:X,pathExtExe:q}=Z7($,J),Y=[];for(let Q=0;Q<Z.length;Q++){let G=Z[Q],H=/^".*"$/.test(G)?G.slice(1,-1):G,K=e6.join(H,$),U=!H&&/^\.[\\\/]/.test($)?$.slice(0,2)+K:K;for(let B=0;B<X.length;B++){let W=U+X[B];try{if($7.sync(W,{pathExt:q}))if(J.all)Y.push(W);else return W}catch(M){}}}if(J.all&&Y.length)return Y;if(J.nothrow)return null;throw J7($)};Q7.exports=X7;X7.sync=Qq});var G7=R0((rW,V2)=>{var Y7=($={})=>{let J=$.env||process.env;if(($.platform||process.platform)!=="win32")return"PATH";return Object.keys(J).reverse().find((X)=>X.toUpperCase()==="PATH")||"Path"};V2.exports=Y7;V2.exports.default=Y7});var B7=R0((sW,K7)=>{var H7=V0("path"),qq=q7(),Yq=G7();function z7($,J){let Z=$.options.env||process.env,X=process.cwd(),q=$.options.cwd!=null,Y=q&&process.chdir!==void 0&&!process.chdir.disabled;if(Y)try{process.chdir($.options.cwd)}catch(G){}let Q;try{Q=qq.sync($.command,{path:Z[Yq({env:Z})],pathExt:J?H7.delimiter:void 0})}catch(G){}finally{if(Y)process.chdir(X)}if(Q)Q=H7.resolve(q?$.options.cwd:"",Q);return Q}function Gq($){return z7($)||z7($,!0)}K7.exports=Gq});var U7=R0((Kq,_2)=>{var L2=/([()\][%!^"`<>&|;, *?])/g;function Hq($){return $=$.replace(L2,"^$1"),$}function zq($,J){if($=`${$}`,$=$.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),$=$.replace(/(?=(\\+?)?)\1$/,"$1$1"),$=`"${$}"`,$=$.replace(L2,"^$1"),J)$=$.replace(L2,"^$1");return $}Kq.command=Hq;Kq.argument=zq});var V7=R0((eW,W7)=>{W7.exports=/^#!(.*)/});var _7=R0(($V,L7)=>{var Wq=V7();L7.exports=($="")=>{let J=$.match(Wq);if(!J)return null;let[Z,X]=J[0].replace(/#! ?/,"").split(" "),q=Z.split("/").pop();if(q==="env")return X;return X?`${q} ${X}`:q}});var T7=R0((JV,R7)=>{var R2=V0("fs"),Vq=_7();function Lq($){let Z=Buffer.alloc(150),X;try{X=R2.openSync($,"r"),R2.readSync(X,Z,0,150,0),R2.closeSync(X)}catch(q){}return Vq(Z.toString())}R7.exports=Lq});var P7=R0((ZV,F7)=>{var _q=V0("path"),M7=B7(),C7=U7(),Rq=T7(),Tq=process.platform==="win32",Mq=/\.(?:com|exe)$/i,Cq=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Fq($){$.file=M7($);let J=$.file&&Rq($.file);if(J)return $.args.unshift($.file),$.command=J,M7($);return $.file}function Pq($){if(!Tq)return $;let J=Fq($),Z=!Mq.test(J);if($.options.forceShell||Z){let X=Cq.test(J);$.command=_q.normalize($.command),$.command=C7.command($.command),$.args=$.args.map((Y)=>C7.argument(Y,X));let q=[$.command].concat($.args).join(" ");$.args=["/d","/s","/c",`"${q}"`],$.command=process.env.comspec||"cmd.exe",$.options.windowsVerbatimArguments=!0}return $}function jq($,J,Z){if(J&&!Array.isArray(J))Z=J,J=null;J=J?J.slice(0):[],Z=Object.assign({},Z);let X={command:$,args:J,options:Z,file:void 0,original:{command:$,args:J}};return Z.shell?X:Pq(X)}F7.exports=jq});var I7=R0((XV,x7)=>{var T2=process.platform==="win32";function M2($,J){return Object.assign(Error(`${J} ${$.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${J} ${$.command}`,path:$.command,spawnargs:$.args})}function xq($,J){if(!T2)return;let Z=$.emit;$.emit=function(X,q){if(X==="exit"){let Y=j7(q,J);if(Y)return Z.call($,"error",Y)}return Z.apply($,arguments)}}function j7($,J){if(T2&&$===1&&!J.file)return M2(J.original,"spawn");return null}function Iq($,J){if(T2&&$===1&&!J.file)return M2(J.original,"spawnSync");return null}x7.exports={hookChildProcess:xq,verifyENOENT:j7,verifyENOENTSync:Iq,notFoundError:M2}});var E7=R0((QV,g1)=>{var w7=V0("child_process"),C2=P7(),F2=I7();function O7($,J,Z){let X=C2($,J,Z),q=w7.spawn(X.command,X.args,X.options);return F2.hookChildProcess(q,X),q}function wq($,J,Z){let X=C2($,J,Z),q=w7.spawnSync(X.command,X.args,X.options);return q.error=q.error||F2.verifyENOENTSync(q.status,X),q}g1.exports=O7;g1.exports.spawn=O7;g1.exports.sync=wq;g1.exports._parse=C2;g1.exports._enoent=F2});var D3=R0((Uj,jZ)=>{var N3={to($,J){if(!J)return`\x1B[${$+1}G`;return`\x1B[${J+1};${$+1}H`},move($,J){let Z="";if($<0)Z+=`\x1B[${-$}D`;else if($>0)Z+=`\x1B[${$}C`;if(J<0)Z+=`\x1B[${-J}A`;else if(J>0)Z+=`\x1B[${J}B`;return Z},up:($=1)=>`\x1B[${$}A`,down:($=1)=>`\x1B[${$}B`,forward:($=1)=>`\x1B[${$}C`,backward:($=1)=>`\x1B[${$}D`,nextLine:($=1)=>"\x1B[E".repeat($),prevLine:($=1)=>"\x1B[F".repeat($),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},OK={up:($=1)=>"\x1B[S".repeat($),down:($=1)=>"\x1B[T".repeat($)},EK={screen:"\x1B[2J",up:($=1)=>"\x1B[1J".repeat($),down:($=1)=>"\x1B[J".repeat($),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines($){let J="";for(let Z=0;Z<$;Z++)J+=this.line+(Z<$-1?N3.up():"");if($)J+=N3.left;return J}};jZ.exports={cursor:N3,scroll:OK,erase:EK,beep:"\x07"}});var v3=R0((Wj,S3)=>{var y4=process||{},xZ=y4.argv||[],b4=y4.env||{},AK=!(!!b4.NO_COLOR||xZ.includes("--no-color"))&&(!!b4.FORCE_COLOR||xZ.includes("--color")||y4.platform==="win32"||(y4.stdout||{}).isTTY&&b4.TERM!=="dumb"||!!b4.CI),hK=($,J,Z=$)=>(X)=>{let q=""+X,Y=q.indexOf(J,$.length);return~Y?$+NK(q,J,Z,Y)+J:$+q+J},NK=($,J,Z,X)=>{let q="",Y=0;do q+=$.substring(Y,X)+Z,Y=X+J.length,X=$.indexOf(J,Y);while(~X);return q+$.substring(Y)},IZ=($=AK)=>{let J=$?hK:()=>String;return{isColorSupported:$,reset:J("\x1B[0m","\x1B[0m"),bold:J("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:J("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:J("\x1B[3m","\x1B[23m"),underline:J("\x1B[4m","\x1B[24m"),inverse:J("\x1B[7m","\x1B[27m"),hidden:J("\x1B[8m","\x1B[28m"),strikethrough:J("\x1B[9m","\x1B[29m"),black:J("\x1B[30m","\x1B[39m"),red:J("\x1B[31m","\x1B[39m"),green:J("\x1B[32m","\x1B[39m"),yellow:J("\x1B[33m","\x1B[39m"),blue:J("\x1B[34m","\x1B[39m"),magenta:J("\x1B[35m","\x1B[39m"),cyan:J("\x1B[36m","\x1B[39m"),white:J("\x1B[37m","\x1B[39m"),gray:J("\x1B[90m","\x1B[39m"),bgBlack:J("\x1B[40m","\x1B[49m"),bgRed:J("\x1B[41m","\x1B[49m"),bgGreen:J("\x1B[42m","\x1B[49m"),bgYellow:J("\x1B[43m","\x1B[49m"),bgBlue:J("\x1B[44m","\x1B[49m"),bgMagenta:J("\x1B[45m","\x1B[49m"),bgCyan:J("\x1B[46m","\x1B[49m"),bgWhite:J("\x1B[47m","\x1B[49m"),blackBright:J("\x1B[90m","\x1B[39m"),redBright:J("\x1B[91m","\x1B[39m"),greenBright:J("\x1B[92m","\x1B[39m"),yellowBright:J("\x1B[93m","\x1B[39m"),blueBright:J("\x1B[94m","\x1B[39m"),magentaBright:J("\x1B[95m","\x1B[39m"),cyanBright:J("\x1B[96m","\x1B[39m"),whiteBright:J("\x1B[97m","\x1B[39m"),bgBlackBright:J("\x1B[100m","\x1B[49m"),bgRedBright:J("\x1B[101m","\x1B[49m"),bgGreenBright:J("\x1B[102m","\x1B[49m"),bgYellowBright:J("\x1B[103m","\x1B[49m"),bgBlueBright:J("\x1B[104m","\x1B[49m"),bgMagentaBright:J("\x1B[105m","\x1B[49m"),bgCyanBright:J("\x1B[106m","\x1B[49m"),bgWhiteBright:J("\x1B[107m","\x1B[49m")}};S3.exports=IZ();S3.exports.createColors=IZ});function Z0($){if(typeof $!=="object"||$===null)return!1;let J=Object.getPrototypeOf($);return(J===null||J===Object.prototype||Object.getPrototypeOf(J)===null)&&!(Symbol.toStringTag in $)&&!(Symbol.iterator in $)}import{fileURLToPath as eX}from"node:url";var f1=($,J)=>{let Z=Q2($Q($));if(typeof Z!=="string")throw TypeError(`${J} must be a string or a file URL: ${Z}.`);return Z},$Q=($)=>X2($)?$.toString():$,X2=($)=>typeof $!=="string"&&$&&Object.getPrototypeOf($)===String.prototype,Q2=($)=>$ instanceof URL?eX($):$;var O$=($,J=[],Z={})=>{let X=f1($,"First argument"),[q,Y]=Z0(J)?[[],J]:[J,Z];if(!Array.isArray(q))throw TypeError(`Second argument must be either an array of arguments or an options object: ${q}`);if(q.some((H)=>typeof H==="object"&&H!==null))throw TypeError(`Second argument must be an array of strings: ${q}`);let Q=q.map(String),G=Q.find((H)=>H.includes("\x00"));if(G!==void 0)throw TypeError(`Arguments cannot contain null bytes ("\\0"): ${G}`);if(!Z0(Y))throw TypeError(`Last argument must be an options object: ${Y}`);return[X,Q,Y]};import{ChildProcess as GQ}from"node:child_process";import{StringDecoder as JQ}from"node:string_decoder";var{toString:V6}=Object.prototype,L6=($)=>V6.call($)==="[object ArrayBuffer]",z0=($)=>V6.call($)==="[object Uint8Array]",t0=($)=>new Uint8Array($.buffer,$.byteOffset,$.byteLength),ZQ=new TextEncoder,_6=($)=>ZQ.encode($),XQ=new TextDecoder,E$=($)=>XQ.decode($),R6=($,J)=>{return QQ($,J).join("")},QQ=($,J)=>{if(J==="utf8"&&$.every((Y)=>typeof Y==="string"))return $;let Z=new JQ(J),X=$.map((Y)=>typeof Y==="string"?_6(Y):Y).map((Y)=>Z.write(Y)),q=Z.end();return q===""?X:[...X,q]},Q$=($)=>{if($.length===1&&z0($[0]))return $[0];return q2(qQ($))},qQ=($)=>$.map((J)=>typeof J==="string"?_6(J):J),q2=($)=>{let J=new Uint8Array(YQ($)),Z=0;for(let X of $)J.set(X,Z),Z+=X.length;return J},YQ=($)=>{let J=0;for(let Z of $)J+=Z.length;return J};var F6=($)=>Array.isArray($)&&Array.isArray($.raw),P6=($,J)=>{let Z=[];for(let[Y,Q]of $.entries())Z=HQ({templates:$,expressions:J,tokens:Z,index:Y,template:Q});if(Z.length===0)throw TypeError("Template script must not be empty");let[X,...q]=Z;return[X,q,{}]},HQ=({templates:$,expressions:J,tokens:Z,index:X,template:q})=>{if(q===void 0)throw TypeError(`Invalid backslash sequence: ${$.raw[X]}`);let{nextTokens:Y,leadingWhitespaces:Q,trailingWhitespaces:G}=zQ(q,$.raw[X]),H=M6(Z,Y,Q);if(X===J.length)return H;let K=J[X],U=Array.isArray(K)?K.map((B)=>C6(B)):[C6(K)];return M6(H,U,G)},zQ=($,J)=>{if(J.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let Z=[],X=0,q=T6.has(J[0]);for(let Q=0,G=0;Q<$.length;Q+=1,G+=1){let H=J[G];if(T6.has(H)){if(X!==Q)Z.push($.slice(X,Q));X=Q+1}else if(H==="\\"){let K=J[G+1];if(K===`
3
+ `)Q-=1,G+=1;else if(K==="u"&&J[G+2]==="{")G=J.indexOf("}",G+3);else G+=KQ[K]??1}}let Y=X===$.length;if(!Y)Z.push($.slice(X));return{nextTokens:Z,leadingWhitespaces:q,trailingWhitespaces:Y}},T6=new Set([" ","\t","\r",`
4
+ `]),KQ={x:3,u:5},M6=($,J,Z)=>Z||$.length===0||J.length===0?[...$,...J]:[...$.slice(0,-1),`${$.at(-1)}${J[0]}`,...J.slice(1)],C6=($)=>{let J=typeof $;if(J==="string")return $;if(J==="number")return String($);if(Z0($)&&(("stdout"in $)||("isMaxBuffer"in $)))return BQ($);if($ instanceof GQ||Object.prototype.toString.call($)==="[object Promise]")throw TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw TypeError(`Unexpected "${J}" in template expression`)},BQ=({stdout:$})=>{if(typeof $==="string")return $;if(z0($))return E$($);if($===void 0)throw TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`);throw TypeError(`Unexpected "${typeof $}" stdout in template expression`)};import{spawnSync as TH}from"node:child_process";import{debuglog as UQ}from"node:util";import Y2 from"node:process";var D0=($)=>A$.includes($),A$=[Y2.stdin,Y2.stdout,Y2.stderr],x0=["stdin","stdout","stderr"],h$=($)=>x0[$]??`stdio[${$}]`;var x6=($)=>{let J={...$};for(let Z of z2)J[Z]=G2($,Z);return J},G2=($,J)=>{let Z=Array.from({length:WQ($)+1}),X=VQ($[J],Z,J);return MQ(X,J)},WQ=({stdio:$})=>Array.isArray($)?Math.max($.length,x0.length):x0.length,VQ=($,J,Z)=>Z0($)?LQ($,J,Z):J.fill($),LQ=($,J,Z)=>{for(let X of Object.keys($).sort(_Q))for(let q of RQ(X,Z,J))J[q]=$[X];return J},_Q=($,J)=>j6($)<j6(J)?1:-1,j6=($)=>{if($==="stdout"||$==="stderr")return 0;return $==="all"?2:1},RQ=($,J,Z)=>{if($==="ipc")return[Z.length-1];let X=H2($);if(X===void 0||X===0)throw TypeError(`"${J}.${$}" is invalid.
5
+ It must be "${J}.stdout", "${J}.stderr", "${J}.all", "${J}.ipc", or "${J}.fd3", "${J}.fd4" (and so on).`);if(X>=Z.length)throw TypeError(`"${J}.${$}" is invalid: that file descriptor does not exist.
6
+ Please set the "stdio" option to ensure that file descriptor exists.`);return X==="all"?[1,2]:[X]},H2=($)=>{if($==="all")return $;if(x0.includes($))return x0.indexOf($);let J=TQ.exec($);if(J!==null)return Number(J[1])},TQ=/^fd(\d+)$/,MQ=($,J)=>$.map((Z)=>Z===void 0?FQ[J]:Z),CQ=UQ("execa").enabled?"full":"none",FQ={lines:!1,buffer:!0,maxBuffer:1e8,verbose:CQ,stripFinalNewline:!0},z2=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],a0=($,J)=>J==="ipc"?$.at(-1):$[J];var k1=({verbose:$},J)=>K2($,J)!=="none",b1=({verbose:$},J)=>!["none","short"].includes(K2($,J)),I6=({verbose:$},J)=>{let Z=K2($,J);return N$(Z)?Z:void 0},K2=($,J)=>J===void 0?PQ($):a0($,J),PQ=($)=>$.find((J)=>N$(J))??D$.findLast((J)=>$.includes(J)),N$=($)=>typeof $==="function",D$=["none","short","full"];import{inspect as dQ}from"node:util";import{platform as jQ}from"node:process";import{stripVTControlCharacters as xQ}from"node:util";var w6=($,J)=>{let Z=[$,...J],X=Z.join(" "),q=Z.map((Y)=>hQ(O6(Y))).join(" ");return{command:X,escapedCommand:q}},q$=($)=>xQ($).split(`
7
+ `).map((J)=>O6(J)).join(`
8
+ `),O6=($)=>$.replaceAll(OQ,(J)=>IQ(J)),IQ=($)=>{let J=EQ[$];if(J!==void 0)return J;let Z=$.codePointAt(0),X=Z.toString(16);return Z<=AQ?`\\u${X.padStart(4,"0")}`:`\\U${X}`},wQ=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},OQ=wQ(),EQ={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},AQ=65535,hQ=($)=>{if(NQ.test($))return $;return jQ==="win32"?`"${$.replaceAll('"','""')}"`:`'${$.replaceAll("'","'\\''")}'`},NQ=/^[\w./-]+$/;import E6 from"node:process";function B2(){let{env:$}=E6,{TERM:J,TERM_PROGRAM:Z}=$;if(E6.platform!=="win32")return J!=="linux";return Boolean($.WT_SESSION)||Boolean($.TERMINUS_SUBLIME)||$.ConEmuTask==="{cmd::Cmder}"||Z==="Terminus-Sublime"||Z==="vscode"||J==="xterm-256color"||J==="alacritty"||J==="rxvt-unicode"||J==="rxvt-unicode-256color"||$.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var A6={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},h6={tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},DQ={tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},SQ={...A6,...h6},vQ={...A6,...DQ},fQ=B2(),kQ=fQ?SQ:vQ,S$=kQ,kU=Object.entries(h6);import bQ from"node:tty";var yQ=bQ?.WriteStream?.prototype?.hasColors?.()??!1,m=($,J)=>{if(!yQ)return(q)=>q;let Z=`\x1B[${$}m`,X=`\x1B[${J}m`;return(q)=>{let Y=q+"",Q=Y.indexOf(X);if(Q===-1)return Z+Y+X;let G=Z,H=0,U=(J===22?X:"")+Z;while(Q!==-1)G+=Y.slice(H,Q)+U,H=Q+X.length,Q=Y.indexOf(X,H);return G+=Y.slice(H)+X,G}},gU=m(0,0),N6=m(1,22),uU=m(2,22),mU=m(3,23),cU=m(4,24),pU=m(53,55),dU=m(7,27),lU=m(8,28),nU=m(9,29),iU=m(30,39),oU=m(31,39),tU=m(32,39),aU=m(33,39),rU=m(34,39),sU=m(35,39),eU=m(36,39),$W=m(37,39),v$=m(90,39),JW=m(40,49),ZW=m(41,49),XW=m(42,49),QW=m(43,49),qW=m(44,49),YW=m(45,49),GW=m(46,49),HW=m(47,49),zW=m(100,49),D6=m(91,39),KW=m(92,39),S6=m(93,39),BW=m(94,39),UW=m(95,39),WW=m(96,39),VW=m(97,39),LW=m(101,49),_W=m(102,49),RW=m(103,49),TW=m(104,49),MW=m(105,49),CW=m(106,49),FW=m(107,49);var k6=({type:$,message:J,timestamp:Z,piped:X,commandId:q,result:{failed:Y=!1}={},options:{reject:Q=!0}})=>{let G=gQ(Z),H=uQ[$]({failed:Y,reject:Q,piped:X}),K=mQ[$]({reject:Q});return`${v$(`[${G}]`)} ${v$(`[${q}]`)} ${K(H)} ${K(J)}`},gQ=($)=>`${f$($.getHours(),2)}:${f$($.getMinutes(),2)}:${f$($.getSeconds(),2)}.${f$($.getMilliseconds(),3)}`,f$=($,J)=>String($).padStart(J,"0"),v6=({failed:$,reject:J})=>{if(!$)return S$.tick;return J?S$.cross:S$.warning},uQ={command:({piped:$})=>$?"|":"$",output:()=>" ",ipc:()=>"*",error:v6,duration:v6},f6=($)=>$,mQ={command:()=>N6,output:()=>f6,ipc:()=>f6,error:({reject:$})=>$?D6:S6,duration:()=>v$};var b6=($,J,Z)=>{let X=I6(J,Z);return $.map(({verboseLine:q,verboseObject:Y})=>cQ(q,Y,X)).filter((q)=>q!==void 0).map((q)=>pQ(q)).join("")},cQ=($,J,Z)=>{if(Z===void 0)return $;let X=Z($,J);if(typeof X==="string")return X},pQ=($)=>$.endsWith(`
9
9
  `)?$:`${$}
10
- `;var b0=({type:$,verboseMessage:J,fdNumber:X,verboseInfo:Z,result:q})=>{let Y=dQ({type:$,result:q,verboseInfo:Z}),Q=lQ(J,Y),G=v6(Q,Z,X);if(G!=="")console.warn(G.slice(0,-1))},dQ=({type:$,result:J,verboseInfo:{escapedCommand:X,commandId:Z,rawOptions:{piped:q=!1,...Y}}})=>({type:$,escapedCommand:X,commandId:`${Z}`,timestamp:new Date,piped:q,result:J,options:Y}),lQ=($,J)=>$.split(`
11
- `).map((X)=>nQ({...J,message:X})),nQ=($)=>{return{verboseLine:f6($),verboseObject:$}},f$=($)=>{let J=typeof $==="string"?$:pQ($);return q$(J).replaceAll("\t"," ".repeat(iQ))},iQ=2;var k6=($,J)=>{if(!v1(J))return;b0({type:"command",verboseMessage:$,verboseInfo:J})};var b6=($,J,X)=>{aQ($);let Z=tQ($);return{verbose:$,escapedCommand:J,commandId:Z,rawOptions:X}},tQ=($)=>v1({verbose:$})?oQ++:void 0,oQ=0n,aQ=($)=>{for(let J of $){if(J===!1)throw TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(J===!0)throw TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!A$.includes(J)&&!h$(J)){let X=A$.map((Z)=>`'${Z}'`).join(", ");throw TypeError(`The "verbose" option must not be ${J}. Allowed values are: ${X} or a function.`)}}};import{hrtime as y6}from"node:process";var v$=()=>y6.bigint(),B2=($)=>Number(y6.bigint()-$)/1e6;var k$=($,J,X)=>{let Z=v$(),{command:q,escapedCommand:Y}=j6($,J),Q=q2(X,"verbose"),G=b6(Q,Y,{...X});return k6(Y,G),{command:q,escapedCommand:Y,startTime:Z,verboseInfo:G}};var k7=Z$(w8(),1);import k9 from"node:path";import v7 from"node:process";import c$ from"node:process";import W1 from"node:path";function y$($={}){let{env:J=process.env,platform:X=process.platform}=$;if(X!=="win32")return"PATH";return Object.keys(J).reverse().find((Z)=>Z.toUpperCase()==="PATH")||"Path"}import{promisify as wq}from"node:util";import{execFile as Oq,execFileSync as qV}from"node:child_process";import O8 from"node:path";import{fileURLToPath as Eq}from"node:url";var HV=wq(Oq);function g$($){return $ instanceof URL?Eq($):$}function E8($){return{*[Symbol.iterator](){let J=O8.resolve(g$($)),X;while(X!==J)yield J,X=J,J=O8.resolve(J,"..")}}}var hq=({cwd:$=c$.cwd(),path:J=c$.env[y$()],preferLocal:X=!0,execPath:Z=c$.execPath,addExecPath:q=!0}={})=>{let Y=W1.resolve(g$($)),Q=[],G=J.split(W1.delimiter);if(X)Aq(Q,G,Y);if(q)Nq(Q,G,Z,Y);return J===""||J===W1.delimiter?`${Q.join(W1.delimiter)}${J}`:[...Q,J].join(W1.delimiter)},Aq=($,J,X)=>{for(let Z of E8(X)){let q=W1.join(Z,"node_modules/.bin");if(!J.includes(q))$.push(q)}},Nq=($,J,X,Z)=>{let q=W1.resolve(Z,g$(X),"..");if(!J.includes(q))$.push(q)},h8=({env:$=c$.env,...J}={})=>{$={...$};let X=y$({env:$});return J.path=$[X],$[X]=hq(J),$};import{setTimeout as nq}from"node:timers/promises";var A8=($,J,X)=>{let Z=X?m$:u$,q=$ instanceof y0?{}:{cause:$};return new Z(J,q)};class y0 extends Error{}var N8=($,J)=>{Object.defineProperty($.prototype,"name",{value:J,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,S8,{value:!0,writable:!1,enumerable:!1,configurable:!1})},D8=($)=>p$($)&&(S8 in $),S8=Symbol("isExecaError"),p$=($)=>Object.prototype.toString.call($)==="[object Error]";class u$ extends Error{}N8(u$,u$.name);class m$ extends Error{}N8(m$,m$.name);import{constants as Y$}from"node:os";import{constants as vq}from"node:os";var f8=()=>{let $=F2-v8+1;return Array.from({length:$},Dq)},Dq=($,J)=>({name:`SIGRT${J+1}`,number:v8+J,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),v8=34,F2=64;import{constants as Sq}from"node:os";var k8=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var M2=()=>{let $=f8();return[...k8,...$].map(fq)},fq=({name:$,number:J,description:X,action:Z,forced:q=!1,standard:Y})=>{let{signals:{[$]:Q}}=Sq,G=Q!==void 0;return{name:$,number:G?Q:J,description:X,supported:G,action:Z,forced:q,standard:Y}};var kq=()=>{let $=M2();return Object.fromEntries($.map(bq))},bq=({name:$,number:J,description:X,supported:Z,action:q,forced:Y,standard:Q})=>[$,{name:$,number:J,description:X,supported:Z,action:q,forced:Y,standard:Q}],b8=kq(),yq=()=>{let $=M2(),J=F2+1,X=Array.from({length:J},(Z,q)=>gq(q,$));return Object.assign({},...X)},gq=($,J)=>{let X=cq($,J);if(X===void 0)return{};let{name:Z,description:q,supported:Y,action:Q,forced:G,standard:H}=X;return{[$]:{name:Z,number:$,description:q,supported:Y,action:Q,forced:G,standard:H}}},cq=($,J)=>{let X=J.find(({name:Z})=>vq.signals[Z]===$);if(X!==void 0)return X;return J.find((Z)=>Z.number===$)},wV=yq();var g8=($)=>{if($===0)throw TypeError("Invalid option `killSignal`: 0 cannot be used.");return u8($,"option `killSignal`")},c8=($)=>$===0?$:u8($,"`subprocess.kill()`'s argument"),u8=($,J)=>{if(Number.isInteger($))return uq($,J);if(typeof $==="string")return pq($,J);throw TypeError(`Invalid ${J} ${String($)}: it must be a string or an integer.
12
- ${C2()}`)},uq=($,J)=>{if(y8.has($))return y8.get($);throw TypeError(`Invalid ${J} ${$}: this signal integer does not exist.
13
- ${C2()}`)},mq=()=>new Map(Object.entries(Y$.signals).reverse().map(([$,J])=>[J,$])),y8=mq(),pq=($,J)=>{if($ in Y$.signals)return $;if($.toUpperCase()in Y$.signals)throw TypeError(`Invalid ${J} '${$}': please rename it to '${$.toUpperCase()}'.`);throw TypeError(`Invalid ${J} '${$}': this signal name does not exist.
14
- ${C2()}`)},C2=()=>`Available signal names: ${dq()}.
15
- Available signal numbers: ${lq()}.`,dq=()=>Object.keys(Y$.signals).sort().map(($)=>`'${$}'`).join(", "),lq=()=>[...new Set(Object.values(Y$.signals).sort(($,J)=>$-J))].join(", "),d$=($)=>b8[$].description;var m8=($)=>{if($===!1)return $;if($===!0)return iq;if(!Number.isFinite($)||$<0)throw TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${$}\` (${typeof $})`);return $},iq=5000,p8=({kill:$,options:{forceKillAfterDelay:J,killSignal:X},onInternalError:Z,context:q,controller:Y},Q,G)=>{let{signal:H,error:B}=tq(Q,G,X);oq(B,Z);let U=$(H);return aq({kill:$,signal:H,forceKillAfterDelay:J,killSignal:X,killResult:U,context:q,controller:Y}),U},tq=($,J,X)=>{let[Z=X,q]=p$($)?[void 0,$]:[$,J];if(typeof Z!=="string"&&!Number.isInteger(Z))throw TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(Z)}`);if(q!==void 0&&!p$(q))throw TypeError(`The second argument is optional. If specified, it must be an error instance: ${q}`);return{signal:c8(Z),error:q}},oq=($,J)=>{if($!==void 0)J.reject($)},aq=async({kill:$,signal:J,forceKillAfterDelay:X,killSignal:Z,killResult:q,context:Y,controller:Q})=>{if(J===Z&&q)x2({kill:$,forceKillAfterDelay:X,context:Y,controllerSignal:Q.signal})},x2=async({kill:$,forceKillAfterDelay:J,context:X,controllerSignal:Z})=>{if(J===!1)return;try{if(await nq(J,void 0,{signal:Z}),$("SIGKILL"))X.isForcefullyTerminated??=!0}catch{}};import{once as rq}from"node:events";var l$=async($,J)=>{if(!$.aborted)await rq($,"abort",{signal:J})};var d8=({cancelSignal:$})=>{if($!==void 0&&Object.prototype.toString.call($)!=="[object AbortSignal]")throw Error(`The \`cancelSignal\` option must be an AbortSignal: ${String($)}`)},l8=({subprocess:$,cancelSignal:J,gracefulCancel:X,context:Z,controller:q})=>J===void 0||X?[]:[sq($,J,Z,q)],sq=async($,J,X,{signal:Z})=>{throw await l$(J,Z),X.terminationReason??="cancel",$.kill(),J.reason};import{scheduler as P9}from"node:timers/promises";import{promisify as _9}from"node:util";var g1=({methodName:$,isSubprocess:J,ipc:X,isConnected:Z})=>{eq($,J,X),j2($,J,Z)},eq=($,J,X)=>{if(!X)throw Error(`${S0($,J)} can only be used if the \`ipc\` option is \`true\`.`)},j2=($,J,X)=>{if(!X)throw Error(`${S0($,J)} cannot be used: the ${J1(J)} has already exited or disconnected.`)},n8=($)=>{throw Error(`${S0("getOneMessage",$)} could not complete: the ${J1($)} exited or disconnected.`)},i8=($)=>{throw Error(`${S0("sendMessage",$)} failed: the ${J1($)} is sending a message too, instead of listening to incoming messages.
10
+ `;var y0=({type:$,verboseMessage:J,fdNumber:Z,verboseInfo:X,result:q})=>{let Y=lQ({type:$,result:q,verboseInfo:X}),Q=nQ(J,Y),G=b6(Q,X,Z);if(G!=="")console.warn(G.slice(0,-1))},lQ=({type:$,result:J,verboseInfo:{escapedCommand:Z,commandId:X,rawOptions:{piped:q=!1,...Y}}})=>({type:$,escapedCommand:Z,commandId:`${X}`,timestamp:new Date,piped:q,result:J,options:Y}),nQ=($,J)=>$.split(`
11
+ `).map((Z)=>iQ({...J,message:Z})),iQ=($)=>{return{verboseLine:k6($),verboseObject:$}},k$=($)=>{let J=typeof $==="string"?$:dQ($);return q$(J).replaceAll("\t"," ".repeat(oQ))},oQ=2;var y6=($,J)=>{if(!k1(J))return;y0({type:"command",verboseMessage:$,verboseInfo:J})};var g6=($,J,Z)=>{rQ($);let X=tQ($);return{verbose:$,escapedCommand:J,commandId:X,rawOptions:Z}},tQ=($)=>k1({verbose:$})?aQ++:void 0,aQ=0n,rQ=($)=>{for(let J of $){if(J===!1)throw TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(J===!0)throw TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!D$.includes(J)&&!N$(J)){let Z=D$.map((X)=>`'${X}'`).join(", ");throw TypeError(`The "verbose" option must not be ${J}. Allowed values are: ${Z} or a function.`)}}};import{hrtime as u6}from"node:process";var b$=()=>u6.bigint(),U2=($)=>Number(u6.bigint()-$)/1e6;var y$=($,J,Z)=>{let X=b$(),{command:q,escapedCommand:Y}=w6($,J),Q=G2(Z,"verbose"),G=g6(Q,Y,{...Z});return y6(Y,G),{command:q,escapedCommand:Y,startTime:X,verboseInfo:G}};var y8=X$(E7(),1);import b9 from"node:path";import b8 from"node:process";import c$ from"node:process";import W1 from"node:path";function u$($={}){let{env:J=process.env,platform:Z=process.platform}=$;if(Z!=="win32")return"PATH";return Object.keys(J).reverse().find((X)=>X.toUpperCase()==="PATH")||"Path"}import{promisify as Oq}from"node:util";import{execFile as Eq,execFileSync as HV}from"node:child_process";import A7 from"node:path";import{fileURLToPath as Aq}from"node:url";var BV=Oq(Eq);function m$($){return $ instanceof URL?Aq($):$}function h7($){return{*[Symbol.iterator](){let J=A7.resolve(m$($)),Z;while(Z!==J)yield J,Z=J,J=A7.resolve(J,"..")}}}var hq=({cwd:$=c$.cwd(),path:J=c$.env[u$()],preferLocal:Z=!0,execPath:X=c$.execPath,addExecPath:q=!0}={})=>{let Y=W1.resolve(m$($)),Q=[],G=J.split(W1.delimiter);if(Z)Nq(Q,G,Y);if(q)Dq(Q,G,X,Y);return J===""||J===W1.delimiter?`${Q.join(W1.delimiter)}${J}`:[...Q,J].join(W1.delimiter)},Nq=($,J,Z)=>{for(let X of h7(Z)){let q=W1.join(X,"node_modules/.bin");if(!J.includes(q))$.push(q)}},Dq=($,J,Z,X)=>{let q=W1.resolve(X,m$(Z),"..");if(!J.includes(q))$.push(q)},N7=({env:$=c$.env,...J}={})=>{$={...$};let Z=u$({env:$});return J.path=$[Z],$[Z]=hq(J),$};import{setTimeout as iq}from"node:timers/promises";var D7=($,J,Z)=>{let X=Z?d$:p$,q=$ instanceof g0?{}:{cause:$};return new X(J,q)};class g0 extends Error{}var S7=($,J)=>{Object.defineProperty($.prototype,"name",{value:J,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,f7,{value:!0,writable:!1,enumerable:!1,configurable:!1})},v7=($)=>l$($)&&(f7 in $),f7=Symbol("isExecaError"),l$=($)=>Object.prototype.toString.call($)==="[object Error]";class p$ extends Error{}S7(p$,p$.name);class d$ extends Error{}S7(d$,d$.name);import{constants as Y$}from"node:os";import{constants as kq}from"node:os";var k7=()=>{let $=P2-b7+1;return Array.from({length:$},Sq)},Sq=($,J)=>({name:`SIGRT${J+1}`,number:b7+J,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),b7=34,P2=64;import{constants as vq}from"node:os";var y7=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var j2=()=>{let $=k7();return[...y7,...$].map(fq)},fq=({name:$,number:J,description:Z,action:X,forced:q=!1,standard:Y})=>{let{signals:{[$]:Q}}=vq,G=Q!==void 0;return{name:$,number:G?Q:J,description:Z,supported:G,action:X,forced:q,standard:Y}};var bq=()=>{let $=j2();return Object.fromEntries($.map(yq))},yq=({name:$,number:J,description:Z,supported:X,action:q,forced:Y,standard:Q})=>[$,{name:$,number:J,description:Z,supported:X,action:q,forced:Y,standard:Q}],g7=bq(),gq=()=>{let $=j2(),J=P2+1,Z=Array.from({length:J},(X,q)=>uq(q,$));return Object.assign({},...Z)},uq=($,J)=>{let Z=mq($,J);if(Z===void 0)return{};let{name:X,description:q,supported:Y,action:Q,forced:G,standard:H}=Z;return{[$]:{name:X,number:$,description:q,supported:Y,action:Q,forced:G,standard:H}}},mq=($,J)=>{let Z=J.find(({name:X})=>kq.signals[X]===$);if(Z!==void 0)return Z;return J.find((X)=>X.number===$)},AV=gq();var m7=($)=>{if($===0)throw TypeError("Invalid option `killSignal`: 0 cannot be used.");return p7($,"option `killSignal`")},c7=($)=>$===0?$:p7($,"`subprocess.kill()`'s argument"),p7=($,J)=>{if(Number.isInteger($))return cq($,J);if(typeof $==="string")return dq($,J);throw TypeError(`Invalid ${J} ${String($)}: it must be a string or an integer.
12
+ ${x2()}`)},cq=($,J)=>{if(u7.has($))return u7.get($);throw TypeError(`Invalid ${J} ${$}: this signal integer does not exist.
13
+ ${x2()}`)},pq=()=>new Map(Object.entries(Y$.signals).reverse().map(([$,J])=>[J,$])),u7=pq(),dq=($,J)=>{if($ in Y$.signals)return $;if($.toUpperCase()in Y$.signals)throw TypeError(`Invalid ${J} '${$}': please rename it to '${$.toUpperCase()}'.`);throw TypeError(`Invalid ${J} '${$}': this signal name does not exist.
14
+ ${x2()}`)},x2=()=>`Available signal names: ${lq()}.
15
+ Available signal numbers: ${nq()}.`,lq=()=>Object.keys(Y$.signals).sort().map(($)=>`'${$}'`).join(", "),nq=()=>[...new Set(Object.values(Y$.signals).sort(($,J)=>$-J))].join(", "),n$=($)=>g7[$].description;var d7=($)=>{if($===!1)return $;if($===!0)return oq;if(!Number.isFinite($)||$<0)throw TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${$}\` (${typeof $})`);return $},oq=5000,l7=({kill:$,options:{forceKillAfterDelay:J,killSignal:Z},onInternalError:X,context:q,controller:Y},Q,G)=>{let{signal:H,error:K}=tq(Q,G,Z);aq(K,X);let U=$(H);return rq({kill:$,signal:H,forceKillAfterDelay:J,killSignal:Z,killResult:U,context:q,controller:Y}),U},tq=($,J,Z)=>{let[X=Z,q]=l$($)?[void 0,$]:[$,J];if(typeof X!=="string"&&!Number.isInteger(X))throw TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(X)}`);if(q!==void 0&&!l$(q))throw TypeError(`The second argument is optional. If specified, it must be an error instance: ${q}`);return{signal:c7(X),error:q}},aq=($,J)=>{if($!==void 0)J.reject($)},rq=async({kill:$,signal:J,forceKillAfterDelay:Z,killSignal:X,killResult:q,context:Y,controller:Q})=>{if(J===X&&q)I2({kill:$,forceKillAfterDelay:Z,context:Y,controllerSignal:Q.signal})},I2=async({kill:$,forceKillAfterDelay:J,context:Z,controllerSignal:X})=>{if(J===!1)return;try{if(await iq(J,void 0,{signal:X}),$("SIGKILL"))Z.isForcefullyTerminated??=!0}catch{}};import{once as sq}from"node:events";var i$=async($,J)=>{if(!$.aborted)await sq($,"abort",{signal:J})};var n7=({cancelSignal:$})=>{if($!==void 0&&Object.prototype.toString.call($)!=="[object AbortSignal]")throw Error(`The \`cancelSignal\` option must be an AbortSignal: ${String($)}`)},i7=({subprocess:$,cancelSignal:J,gracefulCancel:Z,context:X,controller:q})=>J===void 0||Z?[]:[eq($,J,X,q)],eq=async($,J,Z,{signal:X})=>{throw await i$(J,X),Z.terminationReason??="cancel",$.kill(),J.reason};import{scheduler as C9}from"node:timers/promises";import{promisify as R9}from"node:util";var u1=({methodName:$,isSubprocess:J,ipc:Z,isConnected:X})=>{$9($,J,Z),w2($,J,X)},$9=($,J,Z)=>{if(!Z)throw Error(`${S0($,J)} can only be used if the \`ipc\` option is \`true\`.`)},w2=($,J,Z)=>{if(!Z)throw Error(`${S0($,J)} cannot be used: the ${Z1(J)} has already exited or disconnected.`)},o7=($)=>{throw Error(`${S0("getOneMessage",$)} could not complete: the ${Z1($)} exited or disconnected.`)},t7=($)=>{throw Error(`${S0("sendMessage",$)} failed: the ${Z1($)} is sending a message too, instead of listening to incoming messages.
16
16
  This can be fixed by both sending a message and listening to incoming messages at the same time:
17
17
 
18
18
  const [receivedMessage] = await Promise.all([
19
19
  ${S0("getOneMessage",$)},
20
20
  ${S0("sendMessage",$,"message, {strict: true}")},
21
- ]);`)},n$=($,J)=>Error(`${S0("sendMessage",J)} failed when sending an acknowledgment response to the ${J1(J)}.`,{cause:$}),t8=($)=>{throw Error(`${S0("sendMessage",$)} failed: the ${J1($)} is not listening to incoming messages.`)},o8=($)=>{throw Error(`${S0("sendMessage",$)} failed: the ${J1($)} exited without listening to incoming messages.`)},a8=()=>Error(`\`cancelSignal\` aborted: the ${J1(!0)} disconnected.`),r8=()=>{throw Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},s8=({error:$,methodName:J,isSubprocess:X})=>{if($.code==="EPIPE")throw Error(`${S0(J,X)} cannot be used: the ${J1(X)} is disconnecting.`,{cause:$})},e8=({error:$,methodName:J,isSubprocess:X,message:Z})=>{if($9($))throw Error(`${S0(J,X)}'s argument type is invalid: the message cannot be serialized: ${String(Z)}.`,{cause:$})},$9=({code:$,message:J})=>J9.has($)||X9.some((X)=>J.includes(X)),J9=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),X9=["could not be cloned","circular structure","call stack size exceeded"],S0=($,J,X="")=>$==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${Z9(J)}${$}(${X})`,Z9=($)=>$?"":"subprocess.",J1=($)=>$?"parent process":"subprocess",c1=($)=>{if($.connected)$.disconnect()};var g0=()=>{let $={},J=new Promise((X,Z)=>{Object.assign($,{resolve:X,reject:Z})});return Object.assign(J,$)};var t$=($,J="stdin")=>{let{options:Z,fileDescriptors:q}=c0.get($),Y=$7(q,J,!0),Q=$.stdio[Y];if(Q===null)throw TypeError(J7(Y,J,Z,!0));return Q},u1=($,J="stdout")=>{let{options:Z,fileDescriptors:q}=c0.get($),Y=$7(q,J,!1),Q=Y==="all"?$.all:$.stdio[Y];if(Q===null||Q===void 0)throw TypeError(J7(Y,J,Z,!1));return Q},c0=new WeakMap,$7=($,J,X)=>{let Z=Q9(J,X);return q9(Z,J,X,$),Z},Q9=($,J)=>{let X=Y2($);if(X!==void 0)return X;let{validOptions:Z,defaultValue:q}=J?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw TypeError(`"${G$(J)}" must not be "${$}".
22
- It must be ${Z} or "fd3", "fd4" (and so on).
23
- It is optional and defaults to "${q}".`)},q9=($,J,X,Z)=>{let q=Z[X7($)];if(q===void 0)throw TypeError(`"${G$(X)}" must not be ${J}. That file descriptor does not exist.
24
- Please set the "stdio" option to ensure that file descriptor exists.`);if(q.direction==="input"&&!X)throw TypeError(`"${G$(X)}" must not be ${J}. It must be a readable stream, not writable.`);if(q.direction!=="input"&&X)throw TypeError(`"${G$(X)}" must not be ${J}. It must be a writable stream, not readable.`)},J7=($,J,X,Z)=>{if($==="all"&&!X.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:q,optionValue:Y}=Y9($,X);return`The "${q}: ${i$(Y)}" option is incompatible with using "${G$(Z)}: ${i$(J)}".
25
- Please set this option with "pipe" instead.`},Y9=($,{stdin:J,stdout:X,stderr:Z,stdio:q})=>{let Y=X7($);if(Y===0&&J!==void 0)return{optionName:"stdin",optionValue:J};if(Y===1&&X!==void 0)return{optionName:"stdout",optionValue:X};if(Y===2&&Z!==void 0)return{optionName:"stderr",optionValue:Z};return{optionName:`stdio[${Y}]`,optionValue:q[Y]}},X7=($)=>$==="all"?1:$,G$=($)=>$?"to":"from",i$=($)=>{if(typeof $==="string")return`'${$}'`;return typeof $==="number"?`${$}`:"Stream"};import{once as U9}from"node:events";import{addAbortListener as G9}from"node:events";var V1=($,J,X)=>{let Z=$.getMaxListeners();if(Z===0||Z===Number.POSITIVE_INFINITY)return;$.setMaxListeners(Z+J),G9(X,()=>{$.setMaxListeners($.getMaxListeners()-J)})};import{EventEmitter as B9}from"node:events";import{once as H9}from"node:events";import{scheduler as z9}from"node:timers/promises";var o$=($,J)=>{if(J)I2($)},I2=($)=>{$.refCounted()},a$=($,J)=>{if(J)w2($)},w2=($)=>{$.unrefCounted()},Z7=($,J)=>{if(J)w2($),w2($)},Q7=($,J)=>{if(J)I2($),I2($)};var q7=async({anyProcess:$,channel:J,isSubprocess:X,ipcEmitter:Z},q)=>{if(H7(q)||B7(q))return;if(!r$.has($))r$.set($,[]);let Y=r$.get($);if(Y.push(q),Y.length>1)return;while(Y.length>0){await z7($,Z,q),await z9.yield();let Q=await G7({wrappedMessage:Y[0],anyProcess:$,channel:J,isSubprocess:X,ipcEmitter:Z});Y.shift(),Z.emit("message",Q),Z.emit("message:done")}},Y7=async({anyProcess:$,channel:J,isSubprocess:X,ipcEmitter:Z,boundOnMessage:q})=>{O2();let Y=r$.get($);while(Y?.length>0)await H9(Z,"message:done");$.removeListener("message",q),Q7(J,X),Z.connected=!1,Z.emit("disconnect")},r$=new WeakMap;var X1=($,J,X)=>{if(s$.has($))return s$.get($);let Z=new B9;return Z.connected=!0,s$.set($,Z),K9({ipcEmitter:Z,anyProcess:$,channel:J,isSubprocess:X}),Z},s$=new WeakMap,K9=({ipcEmitter:$,anyProcess:J,channel:X,isSubprocess:Z})=>{let q=q7.bind(void 0,{anyProcess:J,channel:X,isSubprocess:Z,ipcEmitter:$});J.on("message",q),J.once("disconnect",Y7.bind(void 0,{anyProcess:J,channel:X,isSubprocess:Z,ipcEmitter:$,boundOnMessage:q})),Z7(X,Z)},e$=($)=>{let J=s$.get($);return J===void 0?$.channel!==null:J.connected};var K7=({anyProcess:$,channel:J,isSubprocess:X,message:Z,strict:q})=>{if(!q)return Z;let Y=X1($,J,X),Q=X4($,Y);return{id:W9++,type:J4,message:Z,hasListeners:Q}},W9=0n,U7=($,J)=>{if(J?.type!==J4||J.hasListeners)return;for(let{id:X}of $)if(X!==void 0)$4[X].resolve({isDeadlock:!0,hasListeners:!1})},G7=async({wrappedMessage:$,anyProcess:J,channel:X,isSubprocess:Z,ipcEmitter:q})=>{if($?.type!==J4||!J.connected)return $;let{id:Y,message:Q}=$,G={id:Y,type:V7,message:X4(J,q)};try{await Z4({anyProcess:J,channel:X,isSubprocess:Z,ipc:!0},G)}catch(H){q.emit("strict:error",H)}return Q},H7=($)=>{if($?.type!==V7)return!1;let{id:J,message:X}=$;return $4[J]?.resolve({isDeadlock:!1,hasListeners:X}),!0},W7=async($,J,X)=>{if($?.type!==J4)return;let Z=g0();$4[$.id]=Z;let q=new AbortController;try{let{isDeadlock:Y,hasListeners:Q}=await Promise.race([Z,V9(J,X,q)]);if(Y)i8(X);if(!Q)t8(X)}finally{q.abort(),delete $4[$.id]}},$4={},V9=async($,J,{signal:X})=>{V1($,1,X),await U9($,"disconnect",{signal:X}),o8(J)},J4="execa:ipc:request",V7="execa:ipc:response";var L7=($,J,X)=>{if(!H$.has($))H$.set($,new Set);let Z=H$.get($),q=g0(),Y=X?J.id:void 0,Q={onMessageSent:q,id:Y};return Z.add(Q),{outgoingMessages:Z,outgoingMessage:Q}},_7=({outgoingMessages:$,outgoingMessage:J})=>{$.delete(J),J.onMessageSent.resolve()},z7=async($,J,X)=>{while(!X4($,J)&&H$.get($)?.size>0){let Z=[...H$.get($)];U7(Z,X),await Promise.all(Z.map(({onMessageSent:q})=>q))}},H$=new WeakMap,X4=($,J)=>J.listenerCount("message")>L9($),L9=($)=>c0.has($)&&!t0(c0.get($).options.buffer,"ipc")?1:0;var Z4=({anyProcess:$,channel:J,isSubprocess:X,ipc:Z},q,{strict:Y=!1}={})=>{return g1({methodName:"sendMessage",isSubprocess:X,ipc:Z,isConnected:$.connected}),R9({anyProcess:$,channel:J,methodName:"sendMessage",isSubprocess:X,message:q,strict:Y})},R9=async({anyProcess:$,channel:J,methodName:X,isSubprocess:Z,message:q,strict:Y})=>{let Q=K7({anyProcess:$,channel:J,isSubprocess:Z,message:q,strict:Y}),G=L7($,Q,Y);try{await h2({anyProcess:$,methodName:X,isSubprocess:Z,wrappedMessage:Q,message:q})}catch(H){throw c1($),H}finally{_7(G)}},h2=async({anyProcess:$,methodName:J,isSubprocess:X,wrappedMessage:Z,message:q})=>{let Y=T9($);try{await Promise.all([W7(Z,$,X),Y(Z)])}catch(Q){throw s8({error:Q,methodName:J,isSubprocess:X}),e8({error:Q,methodName:J,isSubprocess:X,message:q}),Q}},T9=($)=>{if(E2.has($))return E2.get($);let J=_9($.send.bind($));return E2.set($,J),J},E2=new WeakMap;var T7=($,J)=>{return j2("cancelSignal",!1,$.connected),h2({anyProcess:$,methodName:"cancelSignal",isSubprocess:!1,wrappedMessage:{type:F7,message:J},message:J})},P7=async({anyProcess:$,channel:J,isSubprocess:X,ipc:Z})=>{return await F9({anyProcess:$,channel:J,isSubprocess:X,ipc:Z}),A2.signal},F9=async({anyProcess:$,channel:J,isSubprocess:X,ipc:Z})=>{if(R7)return;if(R7=!0,!Z){r8();return}if(J===null){O2();return}X1($,J,X),await P9.yield()},R7=!1,B7=($)=>{if($?.type!==F7)return!1;return A2.abort($.message),!0},F7="execa:ipc:cancel",O2=()=>{A2.abort(a8())},A2=new AbortController;var M7=({gracefulCancel:$,cancelSignal:J,ipc:X,serialization:Z})=>{if(!$)return;if(J===void 0)throw Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!X)throw Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(Z==="json")throw Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")},C7=({subprocess:$,cancelSignal:J,gracefulCancel:X,forceKillAfterDelay:Z,context:q,controller:Y})=>X?[M9({subprocess:$,cancelSignal:J,forceKillAfterDelay:Z,context:q,controller:Y})]:[],M9=async({subprocess:$,cancelSignal:J,forceKillAfterDelay:X,context:Z,controller:{signal:q}})=>{await l$(J,q);let Y=C9(J);throw await T7($,Y),x2({kill:$.kill,forceKillAfterDelay:X,context:Z,controllerSignal:q}),Z.terminationReason??="gracefulCancel",J.reason},C9=({reason:$})=>{if(!($ instanceof DOMException))return $;let J=Error($.message);return Object.defineProperty(J,"stack",{value:$.stack,enumerable:!1,configurable:!0,writable:!0}),J};import{setTimeout as x9}from"node:timers/promises";var x7=({timeout:$})=>{if($!==void 0&&(!Number.isFinite($)||$<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${$}\` (${typeof $})`)},j7=($,J,X,Z)=>J===0||J===void 0?[]:[j9($,J,X,Z)],j9=async($,J,X,{signal:Z})=>{throw await x9(J,void 0,{signal:Z}),X.terminationReason??="timeout",$.kill(),new y0};import{execPath as I9,execArgv as w9}from"node:process";import I7 from"node:path";var w7=({options:$})=>{if($.node===!1)throw TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...$,node:!0}}},O7=($,J,{node:X=!1,nodePath:Z=I9,nodeOptions:q=w9.filter((H)=>!H.startsWith("--inspect")),cwd:Y,execPath:Q,...G})=>{if(Q!==void 0)throw TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');let H=f1(Z,'The "nodePath" option'),B=I7.resolve(Y,H),U={...G,nodePath:B,node:X,cwd:Y};if(!X)return[$,J,U];if(I7.basename($,".exe")==="node")throw TypeError('When the "node" option is true, the first argument does not need to be "node".');return[B,[...q,$,...J],{ipc:!0,...U,shell:!1}]};import{serialize as O9}from"node:v8";var E7=({ipcInput:$,ipc:J,serialization:X})=>{if($===void 0)return;if(!J)throw Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");A9[X]($)},E9=($)=>{try{O9($)}catch(J){throw Error("The `ipcInput` option is not serializable with a structured clone.",{cause:J})}},h9=($)=>{try{JSON.stringify($)}catch(J){throw Error("The `ipcInput` option is not serializable with JSON.",{cause:J})}},A9={advanced:E9,json:h9},h7=async($,J)=>{if(J===void 0)return;await $.sendMessage(J)};var N7=({encoding:$})=>{if(N2.has($))return;let J=D9($);if(J!==void 0)throw TypeError(`Invalid option \`encoding: ${Q4($)}\`.
26
- Please rename it to ${Q4(J)}.`);let X=[...N2].map((Z)=>Q4(Z)).join(", ");throw TypeError(`Invalid option \`encoding: ${Q4($)}\`.
27
- Please rename it to one of: ${X}.`)},N9=new Set(["utf8","utf16le"]),P0=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),N2=new Set([...N9,...P0]),D9=($)=>{if($===null)return"buffer";if(typeof $!=="string")return;let J=$.toLowerCase();if(J in A7)return A7[J];if(N2.has(J))return J},A7={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Q4=($)=>typeof $==="string"?`"${$}"`:String($);import{statSync as S9}from"node:fs";import f9 from"node:path";import v9 from"node:process";var D7=($=S7())=>{let J=f1($,'The "cwd" option');return f9.resolve(J)},S7=()=>{try{return v9.cwd()}catch($){throw $.message=`The current directory does not exist.
28
- ${$.message}`,$}},f7=($,J)=>{if(J===S7())return $;let X;try{X=S9(J)}catch(Z){return`The "cwd" option is invalid: ${J}.
29
- ${Z.message}
30
- ${$}`}if(!X.isDirectory())return`The "cwd" option is not a directory: ${J}.
31
- ${$}`;return $};var q4=($,J,X)=>{X.cwd=D7(X.cwd);let[Z,q,Y]=O7($,J,X),{command:Q,args:G,options:H}=k7.default._parse(Z,q,Y),B=C6(H),U=b9(B);if(x7(U),N7(U),E7(U),d8(U),M7(U),U.shell=X2(U.shell),U.env=y9(U),U.killSignal=g8(U.killSignal),U.forceKillAfterDelay=m8(U.forceKillAfterDelay),U.lines=U.lines.map((K,W)=>K&&!P0.has(U.encoding)&&U.buffer[W]),v7.platform==="win32"&&k9.basename(Q,".exe")==="cmd")G.unshift("/q");return{file:Q,commandArguments:G,options:U}},b9=({extendEnv:$=!0,preferLocal:J=!1,cwd:X,localDir:Z=X,encoding:q="utf8",reject:Y=!0,cleanup:Q=!0,all:G=!1,windowsHide:H=!0,killSignal:B="SIGTERM",forceKillAfterDelay:U=!0,gracefulCancel:K=!1,ipcInput:W,ipc:P=W!==void 0||K,serialization:R="advanced",...L})=>({...L,extendEnv:$,preferLocal:J,cwd:X,localDirectory:Z,encoding:q,reject:Y,cleanup:Q,all:G,windowsHide:H,killSignal:B,forceKillAfterDelay:U,gracefulCancel:K,ipcInput:W,ipc:P,serialization:R}),y9=({env:$,extendEnv:J,preferLocal:X,node:Z,localDirectory:q,nodePath:Y})=>{let Q=J?{...v7.env,...$}:$;if(X||Z)return h8({env:Q,cwd:q,execPath:Y,preferLocal:X,addExecPath:Z});return Q};var Y4=($,J,X)=>X.shell&&J.length>0?[[$,...J].join(" "),[],X]:[$,J,X];import{inspect as TY}from"node:util";function m1($){if(typeof $==="string")return g9($);if(!(ArrayBuffer.isView($)&&$.BYTES_PER_ELEMENT===1))throw Error("Input must be a string or a Uint8Array");return c9($)}var g9=($)=>$.at(-1)===b7?$.slice(0,$.at(-2)===y7?-2:-1):$,c9=($)=>$.at(-1)===u9?$.subarray(0,$.at(-2)===m9?-2:-1):$,b7=`
32
- `,u9=b7.codePointAt(0),y7="\r",m9=y7.codePointAt(0);import{on as VY}from"node:events";import{finished as LY}from"node:stream/promises";function f0($,{checkOpen:J=!0}={}){return $!==null&&typeof $==="object"&&($.writable||$.readable||!J||$.writable===void 0&&$.readable===void 0)&&typeof $.pipe==="function"}function D2($,{checkOpen:J=!0}={}){return f0($,{checkOpen:J})&&($.writable||!J)&&typeof $.write==="function"&&typeof $.end==="function"&&typeof $.writable==="boolean"&&typeof $.writableObjectMode==="boolean"&&typeof $.destroy==="function"&&typeof $.destroyed==="boolean"}function L1($,{checkOpen:J=!0}={}){return f0($,{checkOpen:J})&&($.readable||!J)&&typeof $.read==="function"&&typeof $.readable==="boolean"&&typeof $.readableObjectMode==="boolean"&&typeof $.destroy==="function"&&typeof $.destroyed==="boolean"}function S2($,J){return D2($,J)&&L1($,J)}var p9=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class g7{#J;#X;#$=!1;#Z=void 0;constructor($,J){this.#J=$,this.#X=J}next(){let $=()=>this.#q();return this.#Z=this.#Z?this.#Z.then($,$):$(),this.#Z}return($){let J=()=>this.#Q($);return this.#Z?this.#Z.then(J,J):J()}async#q(){if(this.#$)return{done:!0,value:void 0};let $;try{$=await this.#J.read()}catch(J){throw this.#Z=void 0,this.#$=!0,this.#J.releaseLock(),J}return $.done&&(this.#Z=void 0,this.#$=!0,this.#J.releaseLock()),$}async#Q($){if(this.#$)return{done:!0,value:$};if(this.#$=!0,!this.#X){let J=this.#J.cancel($);return this.#J.releaseLock(),await J,{done:!0,value:$}}return this.#J.releaseLock(),{done:!0,value:$}}}var f2=Symbol();function c7(){return this[f2].next()}Object.defineProperty(c7,"name",{value:"next"});function u7($){return this[f2].return($)}Object.defineProperty(u7,"name",{value:"return"});var d9=Object.create(p9,{next:{enumerable:!0,configurable:!0,writable:!0,value:c7},return:{enumerable:!0,configurable:!0,writable:!0,value:u7}});function v2({preventCancel:$=!1}={}){let J=this.getReader(),X=new g7(J,$),Z=Object.create(d9);return Z[f2]=X,Z}var m7=($)=>{if(L1($,{checkOpen:!1})&&z$.on!==void 0)return n9($);if(typeof $?.[Symbol.asyncIterator]==="function")return $;if(l9.call($)==="[object ReadableStream]")return v2.call($);throw TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:l9}=Object.prototype,n9=async function*($){let J=new AbortController,X={};i9($,J,X);try{for await(let[Z]of z$.on($,"data",{signal:J.signal}))yield Z}catch(Z){if(X.error!==void 0)throw X.error;else if(!J.signal.aborted)throw Z}finally{$.destroy()}},i9=async($,J,X)=>{try{await z$.finished($,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(Z){X.error=Z}finally{J.abort()}},z$={};var p1=async($,{init:J,convertChunk:X,getSize:Z,truncateChunk:q,addChunk:Y,getFinalChunk:Q,finalize:G},{maxBuffer:H=Number.POSITIVE_INFINITY}={})=>{let B=m7($),U=J();U.length=0;try{for await(let K of B){let W=o9(K),P=X[W](K,U);l7({convertedChunk:P,state:U,getSize:Z,truncateChunk:q,addChunk:Y,maxBuffer:H})}return t9({state:U,convertChunk:X,getSize:Z,truncateChunk:q,addChunk:Y,getFinalChunk:Q,maxBuffer:H}),G(U)}catch(K){let W=typeof K==="object"&&K!==null?K:Error(K);throw W.bufferedData=G(U),W}},t9=({state:$,getSize:J,truncateChunk:X,addChunk:Z,getFinalChunk:q,maxBuffer:Y})=>{let Q=q($);if(Q!==void 0)l7({convertedChunk:Q,state:$,getSize:J,truncateChunk:X,addChunk:Z,maxBuffer:Y})},l7=({convertedChunk:$,state:J,getSize:X,truncateChunk:Z,addChunk:q,maxBuffer:Y})=>{let Q=X($),G=J.length+Q;if(G<=Y){p7($,J,q,G);return}let H=Z($,Y-J.length);if(H!==void 0)p7(H,J,q,Y);throw new o0},p7=($,J,X,Z)=>{J.contents=X($,J,Z),J.length=Z},o9=($)=>{let J=typeof $;if(J==="string")return"string";if(J!=="object"||$===null)return"others";if(globalThis.Buffer?.isBuffer($))return"buffer";let X=d7.call($);if(X==="[object ArrayBuffer]")return"arrayBuffer";if(X==="[object DataView]")return"dataView";if(Number.isInteger($.byteLength)&&Number.isInteger($.byteOffset)&&d7.call($.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},{toString:d7}=Object.prototype;class o0 extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}var a0=($)=>$,B$=()=>{return},G4=({contents:$})=>$,H4=($)=>{throw Error(`Streams in object mode are not supported: ${String($)}`)},z4=($)=>$.length;async function B4($,J){return p1($,e9,J)}var a9=()=>({contents:[]}),r9=()=>1,s9=($,{contents:J})=>{return J.push($),J},e9={init:a9,convertChunk:{string:a0,buffer:a0,arrayBuffer:a0,dataView:a0,typedArray:a0,others:a0},getSize:r9,truncateChunk:B$,addChunk:s9,getFinalChunk:B$,finalize:G4};async function K4($,J){return p1($,HY,J)}var $Y=()=>({contents:new ArrayBuffer(0)}),JY=($)=>XY.encode($),XY=new TextEncoder,n7=($)=>new Uint8Array($),i7=($)=>new Uint8Array($.buffer,$.byteOffset,$.byteLength),ZY=($,J)=>$.slice(0,J),QY=($,{contents:J,length:X},Z)=>{let q=a7()?YY(J,Z):qY(J,Z);return new Uint8Array(q).set($,X),q},qY=($,J)=>{if(J<=$.byteLength)return $;let X=new ArrayBuffer(o7(J));return new Uint8Array(X).set(new Uint8Array($),0),X},YY=($,J)=>{if(J<=$.maxByteLength)return $.resize(J),$;let X=new ArrayBuffer(J,{maxByteLength:o7(J)});return new Uint8Array(X).set(new Uint8Array($),0),X},o7=($)=>t7**Math.ceil(Math.log($)/Math.log(t7)),t7=2,GY=({contents:$,length:J})=>a7()?$:$.slice(0,J),a7=()=>("resize"in ArrayBuffer.prototype),HY={init:$Y,convertChunk:{string:JY,buffer:n7,arrayBuffer:n7,dataView:i7,typedArray:i7,others:H4},getSize:z4,truncateChunk:ZY,addChunk:QY,getFinalChunk:B$,finalize:GY};async function W4($,J){return p1($,WY,J)}var zY=()=>({contents:"",textDecoder:new TextDecoder}),U4=($,{textDecoder:J})=>J.decode($,{stream:!0}),BY=($,{contents:J})=>J+$,KY=($,J)=>$.slice(0,J),UY=({textDecoder:$})=>{let J=$.decode();return J===""?void 0:J},WY={init:zY,convertChunk:{string:a0,buffer:U4,arrayBuffer:U4,dataView:U4,typedArray:U4,others:H4},getSize:z4,truncateChunk:KY,addChunk:BY,getFinalChunk:UY,finalize:G4};Object.assign(z$,{on:VY,finished:LY});var r7=({error:$,stream:J,readableObjectMode:X,lines:Z,encoding:q,fdNumber:Y})=>{if(!($ instanceof o0))throw $;if(Y==="all")return $;let Q=_Y(X,Z,q);throw $.maxBufferInfo={fdNumber:Y,unit:Q},J.destroy(),$},_Y=($,J,X)=>{if($)return"objects";if(J)return"lines";if(X==="buffer")return"bytes";return"characters"},s7=($,J,X)=>{if(J.length!==X)return;let Z=new o0;throw Z.maxBufferInfo={fdNumber:"ipc"},Z},e7=($,J)=>{let{streamName:X,threshold:Z,unit:q}=RY($,J);return`Command's ${X} was larger than ${Z} ${q}`},RY=($,J)=>{if($?.maxBufferInfo===void 0)return{streamName:"output",threshold:J[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:X,unit:Z}}=$;delete $.maxBufferInfo;let q=t0(J,X);if(X==="ipc")return{streamName:"IPC output",threshold:q,unit:"messages"};return{streamName:E$(X),threshold:q,unit:Z}},$5=($,J,X)=>$?.code==="ENOBUFS"&&J!==null&&J.some((Z)=>Z!==null&&Z.length>V4(X)),J5=($,J,X)=>{if(!J)return $;let Z=V4(X);return $.length>Z?$.slice(0,Z):$},V4=([,$])=>$;var Z5=({stdio:$,all:J,ipcOutput:X,originalError:Z,signal:q,signalDescription:Y,exitCode:Q,escapedCommand:G,timedOut:H,isCanceled:B,isGracefullyCanceled:U,isMaxBuffer:K,isForcefullyTerminated:W,forceKillAfterDelay:P,killSignal:R,maxBuffer:L,timeout:M,cwd:C})=>{let A=Z?.code,m=PY({originalError:Z,timedOut:H,timeout:M,isMaxBuffer:K,maxBuffer:L,errorCode:A,signal:q,signalDescription:Y,exitCode:Q,isCanceled:B,isGracefullyCanceled:U,isForcefullyTerminated:W,forceKillAfterDelay:P,killSignal:R}),j=MY(Z,C),l=j===void 0?"":`
33
- ${j}`,n=`${m}: ${G}${l}`,t=J===void 0?[$[2],$[1]]:[J],L0=[n,...t,...$.slice(3),X.map((p)=>CY(p)).join(`
34
- `)].map((p)=>q$(m1(xY(p)))).filter(Boolean).join(`
21
+ ]);`)},o$=($,J)=>Error(`${S0("sendMessage",J)} failed when sending an acknowledgment response to the ${Z1(J)}.`,{cause:$}),a7=($)=>{throw Error(`${S0("sendMessage",$)} failed: the ${Z1($)} is not listening to incoming messages.`)},r7=($)=>{throw Error(`${S0("sendMessage",$)} failed: the ${Z1($)} exited without listening to incoming messages.`)},s7=()=>Error(`\`cancelSignal\` aborted: the ${Z1(!0)} disconnected.`),e7=()=>{throw Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},$8=({error:$,methodName:J,isSubprocess:Z})=>{if($.code==="EPIPE")throw Error(`${S0(J,Z)} cannot be used: the ${Z1(Z)} is disconnecting.`,{cause:$})},J8=({error:$,methodName:J,isSubprocess:Z,message:X})=>{if(J9($))throw Error(`${S0(J,Z)}'s argument type is invalid: the message cannot be serialized: ${String(X)}.`,{cause:$})},J9=({code:$,message:J})=>Z9.has($)||X9.some((Z)=>J.includes(Z)),Z9=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),X9=["could not be cloned","circular structure","call stack size exceeded"],S0=($,J,Z="")=>$==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${Q9(J)}${$}(${Z})`,Q9=($)=>$?"":"subprocess.",Z1=($)=>$?"parent process":"subprocess",m1=($)=>{if($.connected)$.disconnect()};var u0=()=>{let $={},J=new Promise((Z,X)=>{Object.assign($,{resolve:Z,reject:X})});return Object.assign(J,$)};var a$=($,J="stdin")=>{let{options:X,fileDescriptors:q}=m0.get($),Y=Z8(q,J,!0),Q=$.stdio[Y];if(Q===null)throw TypeError(X8(Y,J,X,!0));return Q},c1=($,J="stdout")=>{let{options:X,fileDescriptors:q}=m0.get($),Y=Z8(q,J,!1),Q=Y==="all"?$.all:$.stdio[Y];if(Q===null||Q===void 0)throw TypeError(X8(Y,J,X,!1));return Q},m0=new WeakMap,Z8=($,J,Z)=>{let X=q9(J,Z);return Y9(X,J,Z,$),X},q9=($,J)=>{let Z=H2($);if(Z!==void 0)return Z;let{validOptions:X,defaultValue:q}=J?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw TypeError(`"${G$(J)}" must not be "${$}".
22
+ It must be ${X} or "fd3", "fd4" (and so on).
23
+ It is optional and defaults to "${q}".`)},Y9=($,J,Z,X)=>{let q=X[Q8($)];if(q===void 0)throw TypeError(`"${G$(Z)}" must not be ${J}. That file descriptor does not exist.
24
+ Please set the "stdio" option to ensure that file descriptor exists.`);if(q.direction==="input"&&!Z)throw TypeError(`"${G$(Z)}" must not be ${J}. It must be a readable stream, not writable.`);if(q.direction!=="input"&&Z)throw TypeError(`"${G$(Z)}" must not be ${J}. It must be a writable stream, not readable.`)},X8=($,J,Z,X)=>{if($==="all"&&!Z.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:q,optionValue:Y}=G9($,Z);return`The "${q}: ${t$(Y)}" option is incompatible with using "${G$(X)}: ${t$(J)}".
25
+ Please set this option with "pipe" instead.`},G9=($,{stdin:J,stdout:Z,stderr:X,stdio:q})=>{let Y=Q8($);if(Y===0&&J!==void 0)return{optionName:"stdin",optionValue:J};if(Y===1&&Z!==void 0)return{optionName:"stdout",optionValue:Z};if(Y===2&&X!==void 0)return{optionName:"stderr",optionValue:X};return{optionName:`stdio[${Y}]`,optionValue:q[Y]}},Q8=($)=>$==="all"?1:$,G$=($)=>$?"to":"from",t$=($)=>{if(typeof $==="string")return`'${$}'`;return typeof $==="number"?`${$}`:"Stream"};import{once as W9}from"node:events";import{addAbortListener as H9}from"node:events";var V1=($,J,Z)=>{let X=$.getMaxListeners();if(X===0||X===Number.POSITIVE_INFINITY)return;$.setMaxListeners(X+J),H9(Z,()=>{$.setMaxListeners($.getMaxListeners()-J)})};import{EventEmitter as B9}from"node:events";import{once as z9}from"node:events";import{scheduler as K9}from"node:timers/promises";var r$=($,J)=>{if(J)O2($)},O2=($)=>{$.refCounted()},s$=($,J)=>{if(J)E2($)},E2=($)=>{$.unrefCounted()},q8=($,J)=>{if(J)E2($),E2($)},Y8=($,J)=>{if(J)O2($),O2($)};var G8=async({anyProcess:$,channel:J,isSubprocess:Z,ipcEmitter:X},q)=>{if(K8(q)||U8(q))return;if(!e$.has($))e$.set($,[]);let Y=e$.get($);if(Y.push(q),Y.length>1)return;while(Y.length>0){await B8($,X,q),await K9.yield();let Q=await z8({wrappedMessage:Y[0],anyProcess:$,channel:J,isSubprocess:Z,ipcEmitter:X});Y.shift(),X.emit("message",Q),X.emit("message:done")}},H8=async({anyProcess:$,channel:J,isSubprocess:Z,ipcEmitter:X,boundOnMessage:q})=>{A2();let Y=e$.get($);while(Y?.length>0)await z9(X,"message:done");$.removeListener("message",q),Y8(J,Z),X.connected=!1,X.emit("disconnect")},e$=new WeakMap;var X1=($,J,Z)=>{if($4.has($))return $4.get($);let X=new B9;return X.connected=!0,$4.set($,X),U9({ipcEmitter:X,anyProcess:$,channel:J,isSubprocess:Z}),X},$4=new WeakMap,U9=({ipcEmitter:$,anyProcess:J,channel:Z,isSubprocess:X})=>{let q=G8.bind(void 0,{anyProcess:J,channel:Z,isSubprocess:X,ipcEmitter:$});J.on("message",q),J.once("disconnect",H8.bind(void 0,{anyProcess:J,channel:Z,isSubprocess:X,ipcEmitter:$,boundOnMessage:q})),q8(Z,X)},J4=($)=>{let J=$4.get($);return J===void 0?$.channel!==null:J.connected};var W8=({anyProcess:$,channel:J,isSubprocess:Z,message:X,strict:q})=>{if(!q)return X;let Y=X1($,J,Z),Q=Q4($,Y);return{id:V9++,type:X4,message:X,hasListeners:Q}},V9=0n,V8=($,J)=>{if(J?.type!==X4||J.hasListeners)return;for(let{id:Z}of $)if(Z!==void 0)Z4[Z].resolve({isDeadlock:!0,hasListeners:!1})},z8=async({wrappedMessage:$,anyProcess:J,channel:Z,isSubprocess:X,ipcEmitter:q})=>{if($?.type!==X4||!J.connected)return $;let{id:Y,message:Q}=$,G={id:Y,type:_8,message:Q4(J,q)};try{await q4({anyProcess:J,channel:Z,isSubprocess:X,ipc:!0},G)}catch(H){q.emit("strict:error",H)}return Q},K8=($)=>{if($?.type!==_8)return!1;let{id:J,message:Z}=$;return Z4[J]?.resolve({isDeadlock:!1,hasListeners:Z}),!0},L8=async($,J,Z)=>{if($?.type!==X4)return;let X=u0();Z4[$.id]=X;let q=new AbortController;try{let{isDeadlock:Y,hasListeners:Q}=await Promise.race([X,L9(J,Z,q)]);if(Y)t7(Z);if(!Q)a7(Z)}finally{q.abort(),delete Z4[$.id]}},Z4={},L9=async($,J,{signal:Z})=>{V1($,1,Z),await W9($,"disconnect",{signal:Z}),r7(J)},X4="execa:ipc:request",_8="execa:ipc:response";var R8=($,J,Z)=>{if(!H$.has($))H$.set($,new Set);let X=H$.get($),q=u0(),Y=Z?J.id:void 0,Q={onMessageSent:q,id:Y};return X.add(Q),{outgoingMessages:X,outgoingMessage:Q}},T8=({outgoingMessages:$,outgoingMessage:J})=>{$.delete(J),J.onMessageSent.resolve()},B8=async($,J,Z)=>{while(!Q4($,J)&&H$.get($)?.size>0){let X=[...H$.get($)];V8(X,Z),await Promise.all(X.map(({onMessageSent:q})=>q))}},H$=new WeakMap,Q4=($,J)=>J.listenerCount("message")>_9($),_9=($)=>m0.has($)&&!a0(m0.get($).options.buffer,"ipc")?1:0;var q4=({anyProcess:$,channel:J,isSubprocess:Z,ipc:X},q,{strict:Y=!1}={})=>{return u1({methodName:"sendMessage",isSubprocess:Z,ipc:X,isConnected:$.connected}),T9({anyProcess:$,channel:J,methodName:"sendMessage",isSubprocess:Z,message:q,strict:Y})},T9=async({anyProcess:$,channel:J,methodName:Z,isSubprocess:X,message:q,strict:Y})=>{let Q=W8({anyProcess:$,channel:J,isSubprocess:X,message:q,strict:Y}),G=R8($,Q,Y);try{await N2({anyProcess:$,methodName:Z,isSubprocess:X,wrappedMessage:Q,message:q})}catch(H){throw m1($),H}finally{T8(G)}},N2=async({anyProcess:$,methodName:J,isSubprocess:Z,wrappedMessage:X,message:q})=>{let Y=M9($);try{await Promise.all([L8(X,$,Z),Y(X)])}catch(Q){throw $8({error:Q,methodName:J,isSubprocess:Z}),J8({error:Q,methodName:J,isSubprocess:Z,message:q}),Q}},M9=($)=>{if(h2.has($))return h2.get($);let J=R9($.send.bind($));return h2.set($,J),J},h2=new WeakMap;var C8=($,J)=>{return w2("cancelSignal",!1,$.connected),N2({anyProcess:$,methodName:"cancelSignal",isSubprocess:!1,wrappedMessage:{type:P8,message:J},message:J})},F8=async({anyProcess:$,channel:J,isSubprocess:Z,ipc:X})=>{return await F9({anyProcess:$,channel:J,isSubprocess:Z,ipc:X}),D2.signal},F9=async({anyProcess:$,channel:J,isSubprocess:Z,ipc:X})=>{if(M8)return;if(M8=!0,!X){e7();return}if(J===null){A2();return}X1($,J,Z),await C9.yield()},M8=!1,U8=($)=>{if($?.type!==P8)return!1;return D2.abort($.message),!0},P8="execa:ipc:cancel",A2=()=>{D2.abort(s7())},D2=new AbortController;var j8=({gracefulCancel:$,cancelSignal:J,ipc:Z,serialization:X})=>{if(!$)return;if(J===void 0)throw Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!Z)throw Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(X==="json")throw Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")},x8=({subprocess:$,cancelSignal:J,gracefulCancel:Z,forceKillAfterDelay:X,context:q,controller:Y})=>Z?[P9({subprocess:$,cancelSignal:J,forceKillAfterDelay:X,context:q,controller:Y})]:[],P9=async({subprocess:$,cancelSignal:J,forceKillAfterDelay:Z,context:X,controller:{signal:q}})=>{await i$(J,q);let Y=j9(J);throw await C8($,Y),I2({kill:$.kill,forceKillAfterDelay:Z,context:X,controllerSignal:q}),X.terminationReason??="gracefulCancel",J.reason},j9=({reason:$})=>{if(!($ instanceof DOMException))return $;let J=Error($.message);return Object.defineProperty(J,"stack",{value:$.stack,enumerable:!1,configurable:!0,writable:!0}),J};import{setTimeout as x9}from"node:timers/promises";var I8=({timeout:$})=>{if($!==void 0&&(!Number.isFinite($)||$<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${$}\` (${typeof $})`)},w8=($,J,Z,X)=>J===0||J===void 0?[]:[I9($,J,Z,X)],I9=async($,J,Z,{signal:X})=>{throw await x9(J,void 0,{signal:X}),Z.terminationReason??="timeout",$.kill(),new g0};import{execPath as w9,execArgv as O9}from"node:process";import O8 from"node:path";var E8=({options:$})=>{if($.node===!1)throw TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...$,node:!0}}},A8=($,J,{node:Z=!1,nodePath:X=w9,nodeOptions:q=O9.filter((H)=>!H.startsWith("--inspect")),cwd:Y,execPath:Q,...G})=>{if(Q!==void 0)throw TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');let H=f1(X,'The "nodePath" option'),K=O8.resolve(Y,H),U={...G,nodePath:K,node:Z,cwd:Y};if(!Z)return[$,J,U];if(O8.basename($,".exe")==="node")throw TypeError('When the "node" option is true, the first argument does not need to be "node".');return[K,[...q,$,...J],{ipc:!0,...U,shell:!1}]};import{serialize as E9}from"node:v8";var h8=({ipcInput:$,ipc:J,serialization:Z})=>{if($===void 0)return;if(!J)throw Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");N9[Z]($)},A9=($)=>{try{E9($)}catch(J){throw Error("The `ipcInput` option is not serializable with a structured clone.",{cause:J})}},h9=($)=>{try{JSON.stringify($)}catch(J){throw Error("The `ipcInput` option is not serializable with JSON.",{cause:J})}},N9={advanced:A9,json:h9},N8=async($,J)=>{if(J===void 0)return;await $.sendMessage(J)};var S8=({encoding:$})=>{if(S2.has($))return;let J=S9($);if(J!==void 0)throw TypeError(`Invalid option \`encoding: ${Y4($)}\`.
26
+ Please rename it to ${Y4(J)}.`);let Z=[...S2].map((X)=>Y4(X)).join(", ");throw TypeError(`Invalid option \`encoding: ${Y4($)}\`.
27
+ Please rename it to one of: ${Z}.`)},D9=new Set(["utf8","utf16le"]),M0=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),S2=new Set([...D9,...M0]),S9=($)=>{if($===null)return"buffer";if(typeof $!=="string")return;let J=$.toLowerCase();if(J in D8)return D8[J];if(S2.has(J))return J},D8={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Y4=($)=>typeof $==="string"?`"${$}"`:String($);import{statSync as v9}from"node:fs";import f9 from"node:path";import k9 from"node:process";var v8=($=f8())=>{let J=f1($,'The "cwd" option');return f9.resolve(J)},f8=()=>{try{return k9.cwd()}catch($){throw $.message=`The current directory does not exist.
28
+ ${$.message}`,$}},k8=($,J)=>{if(J===f8())return $;let Z;try{Z=v9(J)}catch(X){return`The "cwd" option is invalid: ${J}.
29
+ ${X.message}
30
+ ${$}`}if(!Z.isDirectory())return`The "cwd" option is not a directory: ${J}.
31
+ ${$}`;return $};var G4=($,J,Z)=>{Z.cwd=v8(Z.cwd);let[X,q,Y]=A8($,J,Z),{command:Q,args:G,options:H}=y8.default._parse(X,q,Y),K=x6(H),U=y9(K);if(I8(U),S8(U),h8(U),n7(U),j8(U),U.shell=Q2(U.shell),U.env=g9(U),U.killSignal=m7(U.killSignal),U.forceKillAfterDelay=d7(U.forceKillAfterDelay),U.lines=U.lines.map((B,W)=>B&&!M0.has(U.encoding)&&U.buffer[W]),b8.platform==="win32"&&b9.basename(Q,".exe")==="cmd")G.unshift("/q");return{file:Q,commandArguments:G,options:U}},y9=({extendEnv:$=!0,preferLocal:J=!1,cwd:Z,localDir:X=Z,encoding:q="utf8",reject:Y=!0,cleanup:Q=!0,all:G=!1,windowsHide:H=!0,killSignal:K="SIGTERM",forceKillAfterDelay:U=!0,gracefulCancel:B=!1,ipcInput:W,ipc:M=W!==void 0||B,serialization:R="advanced",...L})=>({...L,extendEnv:$,preferLocal:J,cwd:Z,localDirectory:X,encoding:q,reject:Y,cleanup:Q,all:G,windowsHide:H,killSignal:K,forceKillAfterDelay:U,gracefulCancel:B,ipcInput:W,ipc:M,serialization:R}),g9=({env:$,extendEnv:J,preferLocal:Z,node:X,localDirectory:q,nodePath:Y})=>{let Q=J?{...b8.env,...$}:$;if(Z||X)return N7({env:Q,cwd:q,execPath:Y,preferLocal:Z,addExecPath:X});return Q};var H4=($,J,Z)=>Z.shell&&J.length>0?[[$,...J].join(" "),[],Z]:[$,J,Z];import{inspect as MY}from"node:util";function p1($){if(typeof $==="string")return u9($);if(!(ArrayBuffer.isView($)&&$.BYTES_PER_ELEMENT===1))throw Error("Input must be a string or a Uint8Array");return m9($)}var u9=($)=>$.at(-1)===g8?$.slice(0,$.at(-2)===u8?-2:-1):$,m9=($)=>$.at(-1)===c9?$.subarray(0,$.at(-2)===p9?-2:-1):$,g8=`
32
+ `,c9=g8.codePointAt(0),u8="\r",p9=u8.codePointAt(0);import{on as LY}from"node:events";import{finished as _Y}from"node:stream/promises";function v0($,{checkOpen:J=!0}={}){return $!==null&&typeof $==="object"&&($.writable||$.readable||!J||$.writable===void 0&&$.readable===void 0)&&typeof $.pipe==="function"}function v2($,{checkOpen:J=!0}={}){return v0($,{checkOpen:J})&&($.writable||!J)&&typeof $.write==="function"&&typeof $.end==="function"&&typeof $.writable==="boolean"&&typeof $.writableObjectMode==="boolean"&&typeof $.destroy==="function"&&typeof $.destroyed==="boolean"}function L1($,{checkOpen:J=!0}={}){return v0($,{checkOpen:J})&&($.readable||!J)&&typeof $.read==="function"&&typeof $.readable==="boolean"&&typeof $.readableObjectMode==="boolean"&&typeof $.destroy==="function"&&typeof $.destroyed==="boolean"}function f2($,J){return v2($,J)&&L1($,J)}var d9=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class m8{#J;#Z;#$=!1;#X=void 0;constructor($,J){this.#J=$,this.#Z=J}next(){let $=()=>this.#q();return this.#X=this.#X?this.#X.then($,$):$(),this.#X}return($){let J=()=>this.#Q($);return this.#X?this.#X.then(J,J):J()}async#q(){if(this.#$)return{done:!0,value:void 0};let $;try{$=await this.#J.read()}catch(J){throw this.#X=void 0,this.#$=!0,this.#J.releaseLock(),J}return $.done&&(this.#X=void 0,this.#$=!0,this.#J.releaseLock()),$}async#Q($){if(this.#$)return{done:!0,value:$};if(this.#$=!0,!this.#Z){let J=this.#J.cancel($);return this.#J.releaseLock(),await J,{done:!0,value:$}}return this.#J.releaseLock(),{done:!0,value:$}}}var k2=Symbol();function c8(){return this[k2].next()}Object.defineProperty(c8,"name",{value:"next"});function p8($){return this[k2].return($)}Object.defineProperty(p8,"name",{value:"return"});var l9=Object.create(d9,{next:{enumerable:!0,configurable:!0,writable:!0,value:c8},return:{enumerable:!0,configurable:!0,writable:!0,value:p8}});function b2({preventCancel:$=!1}={}){let J=this.getReader(),Z=new m8(J,$),X=Object.create(l9);return X[k2]=Z,X}var d8=($)=>{if(L1($,{checkOpen:!1})&&z$.on!==void 0)return i9($);if(typeof $?.[Symbol.asyncIterator]==="function")return $;if(n9.call($)==="[object ReadableStream]")return b2.call($);throw TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:n9}=Object.prototype,i9=async function*($){let J=new AbortController,Z={};o9($,J,Z);try{for await(let[X]of z$.on($,"data",{signal:J.signal}))yield X}catch(X){if(Z.error!==void 0)throw Z.error;else if(!J.signal.aborted)throw X}finally{$.destroy()}},o9=async($,J,Z)=>{try{await z$.finished($,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(X){Z.error=X}finally{J.abort()}},z$={};var d1=async($,{init:J,convertChunk:Z,getSize:X,truncateChunk:q,addChunk:Y,getFinalChunk:Q,finalize:G},{maxBuffer:H=Number.POSITIVE_INFINITY}={})=>{let K=d8($),U=J();U.length=0;try{for await(let B of K){let W=a9(B),M=Z[W](B,U);i8({convertedChunk:M,state:U,getSize:X,truncateChunk:q,addChunk:Y,maxBuffer:H})}return t9({state:U,convertChunk:Z,getSize:X,truncateChunk:q,addChunk:Y,getFinalChunk:Q,maxBuffer:H}),G(U)}catch(B){let W=typeof B==="object"&&B!==null?B:Error(B);throw W.bufferedData=G(U),W}},t9=({state:$,getSize:J,truncateChunk:Z,addChunk:X,getFinalChunk:q,maxBuffer:Y})=>{let Q=q($);if(Q!==void 0)i8({convertedChunk:Q,state:$,getSize:J,truncateChunk:Z,addChunk:X,maxBuffer:Y})},i8=({convertedChunk:$,state:J,getSize:Z,truncateChunk:X,addChunk:q,maxBuffer:Y})=>{let Q=Z($),G=J.length+Q;if(G<=Y){l8($,J,q,G);return}let H=X($,Y-J.length);if(H!==void 0)l8(H,J,q,Y);throw new r0},l8=($,J,Z,X)=>{J.contents=Z($,J,X),J.length=X},a9=($)=>{let J=typeof $;if(J==="string")return"string";if(J!=="object"||$===null)return"others";if(globalThis.Buffer?.isBuffer($))return"buffer";let Z=n8.call($);if(Z==="[object ArrayBuffer]")return"arrayBuffer";if(Z==="[object DataView]")return"dataView";if(Number.isInteger($.byteLength)&&Number.isInteger($.byteOffset)&&n8.call($.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},{toString:n8}=Object.prototype;class r0 extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}var s0=($)=>$,K$=()=>{return},z4=({contents:$})=>$,K4=($)=>{throw Error(`Streams in object mode are not supported: ${String($)}`)},B4=($)=>$.length;async function U4($,J){return d1($,$Y,J)}var r9=()=>({contents:[]}),s9=()=>1,e9=($,{contents:J})=>{return J.push($),J},$Y={init:r9,convertChunk:{string:s0,buffer:s0,arrayBuffer:s0,dataView:s0,typedArray:s0,others:s0},getSize:s9,truncateChunk:K$,addChunk:e9,getFinalChunk:K$,finalize:z4};async function W4($,J){return d1($,zY,J)}var JY=()=>({contents:new ArrayBuffer(0)}),ZY=($)=>XY.encode($),XY=new TextEncoder,o8=($)=>new Uint8Array($),t8=($)=>new Uint8Array($.buffer,$.byteOffset,$.byteLength),QY=($,J)=>$.slice(0,J),qY=($,{contents:J,length:Z},X)=>{let q=s8()?GY(J,X):YY(J,X);return new Uint8Array(q).set($,Z),q},YY=($,J)=>{if(J<=$.byteLength)return $;let Z=new ArrayBuffer(r8(J));return new Uint8Array(Z).set(new Uint8Array($),0),Z},GY=($,J)=>{if(J<=$.maxByteLength)return $.resize(J),$;let Z=new ArrayBuffer(J,{maxByteLength:r8(J)});return new Uint8Array(Z).set(new Uint8Array($),0),Z},r8=($)=>a8**Math.ceil(Math.log($)/Math.log(a8)),a8=2,HY=({contents:$,length:J})=>s8()?$:$.slice(0,J),s8=()=>("resize"in ArrayBuffer.prototype),zY={init:JY,convertChunk:{string:ZY,buffer:o8,arrayBuffer:o8,dataView:t8,typedArray:t8,others:K4},getSize:B4,truncateChunk:QY,addChunk:qY,getFinalChunk:K$,finalize:HY};async function L4($,J){return d1($,VY,J)}var KY=()=>({contents:"",textDecoder:new TextDecoder}),V4=($,{textDecoder:J})=>J.decode($,{stream:!0}),BY=($,{contents:J})=>J+$,UY=($,J)=>$.slice(0,J),WY=({textDecoder:$})=>{let J=$.decode();return J===""?void 0:J},VY={init:KY,convertChunk:{string:s0,buffer:V4,arrayBuffer:V4,dataView:V4,typedArray:V4,others:K4},getSize:B4,truncateChunk:UY,addChunk:BY,getFinalChunk:WY,finalize:z4};Object.assign(z$,{on:LY,finished:_Y});var e8=({error:$,stream:J,readableObjectMode:Z,lines:X,encoding:q,fdNumber:Y})=>{if(!($ instanceof r0))throw $;if(Y==="all")return $;let Q=RY(Z,X,q);throw $.maxBufferInfo={fdNumber:Y,unit:Q},J.destroy(),$},RY=($,J,Z)=>{if($)return"objects";if(J)return"lines";if(Z==="buffer")return"bytes";return"characters"},$5=($,J,Z)=>{if(J.length!==Z)return;let X=new r0;throw X.maxBufferInfo={fdNumber:"ipc"},X},J5=($,J)=>{let{streamName:Z,threshold:X,unit:q}=TY($,J);return`Command's ${Z} was larger than ${X} ${q}`},TY=($,J)=>{if($?.maxBufferInfo===void 0)return{streamName:"output",threshold:J[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:Z,unit:X}}=$;delete $.maxBufferInfo;let q=a0(J,Z);if(Z==="ipc")return{streamName:"IPC output",threshold:q,unit:"messages"};return{streamName:h$(Z),threshold:q,unit:X}},Z5=($,J,Z)=>$?.code==="ENOBUFS"&&J!==null&&J.some((X)=>X!==null&&X.length>_4(Z)),X5=($,J,Z)=>{if(!J)return $;let X=_4(Z);return $.length>X?$.slice(0,X):$},_4=([,$])=>$;var q5=({stdio:$,all:J,ipcOutput:Z,originalError:X,signal:q,signalDescription:Y,exitCode:Q,escapedCommand:G,timedOut:H,isCanceled:K,isGracefullyCanceled:U,isMaxBuffer:B,isForcefullyTerminated:W,forceKillAfterDelay:M,killSignal:R,maxBuffer:L,timeout:I,cwd:x})=>{let F=X?.code,v=CY({originalError:X,timedOut:H,timeout:I,isMaxBuffer:B,maxBuffer:L,errorCode:F,signal:q,signalDescription:Y,exitCode:Q,isCanceled:K,isGracefullyCanceled:U,isForcefullyTerminated:W,forceKillAfterDelay:M,killSignal:R}),j=PY(X,x),l=j===void 0?"":`
33
+ ${j}`,n=`${v}: ${G}${l}`,o=J===void 0?[$[2],$[1]]:[J],L0=[n,...o,...$.slice(3),Z.map((p)=>jY(p)).join(`
34
+ `)].map((p)=>q$(p1(xY(p)))).filter(Boolean).join(`
35
35
 
36
- `);return{originalMessage:j,shortMessage:n,message:L0}},PY=({originalError:$,timedOut:J,timeout:X,isMaxBuffer:Z,maxBuffer:q,errorCode:Y,signal:Q,signalDescription:G,exitCode:H,isCanceled:B,isGracefullyCanceled:U,isForcefullyTerminated:K,forceKillAfterDelay:W,killSignal:P})=>{let R=FY(K,W);if(J)return`Command timed out after ${X} milliseconds${R}`;if(U){if(Q===void 0)return`Command was gracefully canceled with exit code ${H}`;return K?`Command was gracefully canceled${R}`:`Command was gracefully canceled with ${Q} (${G})`}if(B)return`Command was canceled${R}`;if(Z)return`${e7($,q)}${R}`;if(Y!==void 0)return`Command failed with ${Y}${R}`;if(K)return`Command was killed with ${P} (${d$(P)})${R}`;if(Q!==void 0)return`Command was killed with ${Q} (${G})`;if(H!==void 0)return`Command failed with exit code ${H}`;return"Command failed"},FY=($,J)=>$?` and was forcefully terminated after ${J} milliseconds`:"",MY=($,J)=>{if($ instanceof y0)return;let X=D8($)?$.originalMessage:String($?.message??$),Z=q$(f7(X,J));return Z===""?void 0:Z},CY=($)=>typeof $==="string"?$:TY($),xY=($)=>Array.isArray($)?$.map((J)=>m1(X5(J))).filter(Boolean).join(`
37
- `):X5($),X5=($)=>{if(typeof $==="string")return $;if(z0($))return w$($);return""};var L4=({command:$,escapedCommand:J,stdio:X,all:Z,ipcOutput:q,options:{cwd:Y},startTime:Q})=>Q5({command:$,escapedCommand:J,cwd:Y,durationMs:B2(Q),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:X[1],stderr:X[2],all:Z,stdio:X,ipcOutput:q,pipedFrom:[]}),d1=({error:$,command:J,escapedCommand:X,fileDescriptors:Z,options:q,startTime:Y,isSync:Q})=>K$({error:$,command:J,escapedCommand:X,startTime:Y,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:Z.length}),ipcOutput:[],options:q,isSync:Q}),K$=({error:$,command:J,escapedCommand:X,startTime:Z,timedOut:q,isCanceled:Y,isGracefullyCanceled:Q,isMaxBuffer:G,isForcefullyTerminated:H,exitCode:B,signal:U,stdio:K,all:W,ipcOutput:P,options:{timeoutDuration:R,timeout:L=R,forceKillAfterDelay:M,killSignal:C,cwd:A,maxBuffer:m},isSync:j})=>{let{exitCode:l,signal:n,signalDescription:t}=IY(B,U),{originalMessage:L0,shortMessage:p,message:l0}=Z5({stdio:K,all:W,ipcOutput:P,originalError:$,signal:n,signalDescription:t,exitCode:l,escapedCommand:X,timedOut:q,isCanceled:Y,isGracefullyCanceled:Q,isMaxBuffer:G,isForcefullyTerminated:H,forceKillAfterDelay:M,killSignal:C,maxBuffer:m,timeout:L,cwd:A}),O=A8($,l0,j);return Object.assign(O,jY({error:O,command:J,escapedCommand:X,startTime:Z,timedOut:q,isCanceled:Y,isGracefullyCanceled:Q,isMaxBuffer:G,isForcefullyTerminated:H,exitCode:l,signal:n,signalDescription:t,stdio:K,all:W,ipcOutput:P,cwd:A,originalMessage:L0,shortMessage:p})),O},jY=({error:$,command:J,escapedCommand:X,startTime:Z,timedOut:q,isCanceled:Y,isGracefullyCanceled:Q,isMaxBuffer:G,isForcefullyTerminated:H,exitCode:B,signal:U,signalDescription:K,stdio:W,all:P,ipcOutput:R,cwd:L,originalMessage:M,shortMessage:C})=>Q5({shortMessage:C,originalMessage:M,command:J,escapedCommand:X,cwd:L,durationMs:B2(Z),failed:!0,timedOut:q,isCanceled:Y,isGracefullyCanceled:Q,isTerminated:U!==void 0,isMaxBuffer:G,isForcefullyTerminated:H,exitCode:B,signal:U,signalDescription:K,code:$.cause?.code,stdout:W[1],stderr:W[2],all:P,stdio:W,ipcOutput:R,pipedFrom:[]}),Q5=($)=>Object.fromEntries(Object.entries($).filter(([,J])=>J!==void 0)),IY=($,J)=>{let X=$===null?void 0:$,Z=J===null?void 0:J,q=Z===void 0?void 0:d$(J);return{exitCode:X,signal:Z,signalDescription:q}};var q5=($)=>Number.isFinite($)?$:0;function wY($){return{days:Math.trunc($/86400000),hours:Math.trunc($/3600000%24),minutes:Math.trunc($/60000%60),seconds:Math.trunc($/1000%60),milliseconds:Math.trunc($%1000),microseconds:Math.trunc(q5($*1000)%1000),nanoseconds:Math.trunc(q5($*1e6)%1000)}}function OY($){return{days:$/86400000n,hours:$/3600000n%24n,minutes:$/60000n%60n,seconds:$/1000n%60n,milliseconds:$%1000n,microseconds:0n,nanoseconds:0n}}function k2($){switch(typeof $){case"number":{if(Number.isFinite($))return wY($);break}case"bigint":return OY($)}throw TypeError("Expected a finite number or bigint")}var EY=($)=>$===0||$===0n,hY=($,J)=>J===1||J===1n?$:`${$}s`,AY=0.0000001,NY=24n*60n*60n*1000n;function b2($,J){let X=typeof $==="bigint";if(!X&&!Number.isFinite($))throw TypeError("Expected a finite number or bigint");J={...J};let Z=$<0?"-":"";if($=$<0?-$:$,J.colonNotation)J.compact=!1,J.formatSubMilliseconds=!1,J.separateMilliseconds=!1,J.verbose=!1;if(J.compact)J.unitCount=1,J.secondsDecimalDigits=0,J.millisecondsDecimalDigits=0;let q=[],Y=(U,K)=>{let W=Math.floor(U*10**K+AY);return(Math.round(W)/10**K).toFixed(K)},Q=(U,K,W,P)=>{if((q.length===0||!J.colonNotation)&&EY(U)&&!(J.colonNotation&&W==="m"))return;if(P??=String(U),J.colonNotation){let R=P.includes(".")?P.split(".")[0].length:P.length,L=q.length>0?2:1;P="0".repeat(Math.max(0,L-R))+P}else P+=J.verbose?" "+hY(K,U):W;q.push(P)},G=k2($),H=BigInt(G.days);if(J.hideYearAndDays)Q(BigInt(H)*24n+BigInt(G.hours),"hour","h");else{if(J.hideYear)Q(H,"day","d");else Q(H/365n,"year","y"),Q(H%365n,"day","d");Q(Number(G.hours),"hour","h")}if(Q(Number(G.minutes),"minute","m"),!J.hideSeconds)if(J.separateMilliseconds||J.formatSubMilliseconds||!J.colonNotation&&$<1000&&!J.subSecondsAsDecimals){let U=Number(G.seconds),K=Number(G.milliseconds),W=Number(G.microseconds),P=Number(G.nanoseconds);if(Q(U,"second","s"),J.formatSubMilliseconds)Q(K,"millisecond","ms"),Q(W,"microsecond","µs"),Q(P,"nanosecond","ns");else{let R=K+W/1000+P/1e6,L=typeof J.millisecondsDecimalDigits==="number"?J.millisecondsDecimalDigits:0,M=R>=1?Math.round(R):Math.ceil(R),C=L?R.toFixed(L):M;Q(Number.parseFloat(C),"millisecond","ms",C)}}else{let U=(X?Number($%NY):$)/1000%60,K=typeof J.secondsDecimalDigits==="number"?J.secondsDecimalDigits:1,W=Y(U,K),P=J.keepDecimalsOnWholeSeconds?W:W.replace(/\.0+$/,"");Q(Number.parseFloat(P),"second","s",P)}if(q.length===0)return Z+"0"+(J.verbose?" milliseconds":"ms");let B=J.colonNotation?":":" ";if(typeof J.unitCount==="number")q=q.slice(0,Math.max(J.unitCount,1));return Z+q.join(B)}var Y5=($,J)=>{if($.failed)b0({type:"error",verboseMessage:$.shortMessage,verboseInfo:J,result:$})};var G5=($,J)=>{if(!v1(J))return;Y5($,J),DY($,J)},DY=($,J)=>{let X=`(done in ${b2($.durationMs)})`;b0({type:"duration",verboseMessage:X,verboseInfo:J,result:$})};var l1=($,J,{reject:X})=>{if(G5($,J),$.failed&&X)throw $;return $};import{readFileSync as f5}from"node:fs";var B5=($,J)=>{if(_1($))return"asyncGenerator";if(W5($))return"generator";if(_4($))return"fileUrl";if(bY($))return"filePath";if(cY($))return"webStream";if(f0($,{checkOpen:!1}))return"native";if(z0($))return"uint8Array";if(uY($))return"asyncIterable";if(mY($))return"iterable";if(c2($))return K5({transform:$},J);if(kY($))return SY($,J);return"native"},SY=($,J)=>{if(S2($.transform,{checkOpen:!1}))return fY($,J);if(c2($.transform))return K5($,J);return vY($,J)},fY=($,J)=>{return U5($,J,"Duplex stream"),"duplex"},K5=($,J)=>{return U5($,J,"web TransformStream"),"webTransform"},U5=({final:$,binary:J,objectMode:X},Z,q)=>{H5($,`${Z}.final`,q),H5(J,`${Z}.binary`,q),y2(X,`${Z}.objectMode`)},H5=($,J,X)=>{if($!==void 0)throw TypeError(`The \`${J}\` option can only be defined when using a generator, not a ${X}.`)},vY=({transform:$,final:J,binary:X,objectMode:Z},q)=>{if($!==void 0&&!z5($))throw TypeError(`The \`${q}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(S2(J,{checkOpen:!1}))throw TypeError(`The \`${q}.final\` option must not be a Duplex stream.`);if(c2(J))throw TypeError(`The \`${q}.final\` option must not be a web TransformStream.`);if(J!==void 0&&!z5(J))throw TypeError(`The \`${q}.final\` option must be a generator.`);return y2(X,`${q}.binary`),y2(Z,`${q}.objectMode`),_1($)||_1(J)?"asyncGenerator":"generator"},y2=($,J)=>{if($!==void 0&&typeof $!=="boolean")throw TypeError(`The \`${J}\` option must use a boolean.`)},z5=($)=>_1($)||W5($),_1=($)=>Object.prototype.toString.call($)==="[object AsyncGeneratorFunction]",W5=($)=>Object.prototype.toString.call($)==="[object GeneratorFunction]",kY=($)=>X0($)&&($.transform!==void 0||$.final!==void 0),_4=($)=>Object.prototype.toString.call($)==="[object URL]",V5=($)=>_4($)&&$.protocol!=="file:",bY=($)=>X0($)&&Object.keys($).length>0&&Object.keys($).every((J)=>yY.has(J))&&g2($.file),yY=new Set(["file","append"]),g2=($)=>typeof $==="string",L5=($,J)=>$==="native"&&typeof J==="string"&&!gY.has(J),gY=new Set(["ipc","ignore","inherit","overlapped","pipe"]),_5=($)=>Object.prototype.toString.call($)==="[object ReadableStream]",R4=($)=>Object.prototype.toString.call($)==="[object WritableStream]",cY=($)=>_5($)||R4($),c2=($)=>_5($?.readable)&&R4($?.writable),uY=($)=>R5($)&&typeof $[Symbol.asyncIterator]==="function",mY=($)=>R5($)&&typeof $[Symbol.iterator]==="function",R5=($)=>typeof $==="object"&&$!==null,I0=new Set(["generator","asyncGenerator","duplex","webTransform"]),T4=new Set(["fileUrl","filePath","fileNumber"]),u2=new Set(["fileUrl","filePath"]),T5=new Set([...u2,"webStream","nodeStream"]),P5=new Set(["webTransform","duplex"]),Z1={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"};var m2=($,J,X,Z)=>Z==="output"?pY($,J,X):dY($,J,X),pY=($,J,X)=>{let Z=J!==0&&X[J-1].value.readableObjectMode;return{writableObjectMode:Z,readableObjectMode:$??Z}},dY=($,J,X)=>{let Z=J===0?$===!0:X[J-1].value.readableObjectMode,q=J!==X.length-1&&($??Z);return{writableObjectMode:Z,readableObjectMode:q}},F5=($,J)=>{let X=$.findLast(({type:Z})=>I0.has(Z));if(X===void 0)return!1;return J==="input"?X.value.writableObjectMode:X.value.readableObjectMode};var M5=($,J,X,Z)=>[...$.filter(({type:q})=>!I0.has(q)),...lY($,J,X,Z)],lY=($,J,X,{encoding:Z})=>{let q=$.filter(({type:Q})=>I0.has(Q)),Y=Array.from({length:q.length});for(let[Q,G]of Object.entries(q))Y[Q]=nY({stdioItem:G,index:Number(Q),newTransforms:Y,optionName:J,direction:X,encoding:Z});return aY(Y,X)},nY=({stdioItem:$,stdioItem:{type:J},index:X,newTransforms:Z,optionName:q,direction:Y,encoding:Q})=>{if(J==="duplex")return iY({stdioItem:$,optionName:q});if(J==="webTransform")return tY({stdioItem:$,index:X,newTransforms:Z,direction:Y});return oY({stdioItem:$,index:X,newTransforms:Z,direction:Y,encoding:Q})},iY=({stdioItem:$,stdioItem:{value:{transform:J,transform:{writableObjectMode:X,readableObjectMode:Z},objectMode:q=Z}},optionName:Y})=>{if(q&&!Z)throw TypeError(`The \`${Y}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!q&&Z)throw TypeError(`The \`${Y}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...$,value:{transform:J,writableObjectMode:X,readableObjectMode:Z}}},tY=({stdioItem:$,stdioItem:{value:J},index:X,newTransforms:Z,direction:q})=>{let{transform:Y,objectMode:Q}=X0(J)?J:{transform:J},{writableObjectMode:G,readableObjectMode:H}=m2(Q,X,Z,q);return{...$,value:{transform:Y,writableObjectMode:G,readableObjectMode:H}}},oY=({stdioItem:$,stdioItem:{value:J},index:X,newTransforms:Z,direction:q,encoding:Y})=>{let{transform:Q,final:G,binary:H=!1,preserveNewlines:B=!1,objectMode:U}=X0(J)?J:{transform:J},K=H||P0.has(Y),{writableObjectMode:W,readableObjectMode:P}=m2(U,X,Z,q);return{...$,value:{transform:Q,final:G,binary:K,preserveNewlines:B,writableObjectMode:W,readableObjectMode:P}}},aY=($,J)=>J==="input"?$.reverse():$;import p2 from"node:process";var C5=($,J,X)=>{let Z=$.map((q)=>rY(q,J));if(Z.includes("input")&&Z.includes("output"))throw TypeError(`The \`${X}\` option must not be an array of both readable and writable values.`);return Z.find(Boolean)??$G},rY=({type:$,value:J},X)=>sY[X]??x5[$](J),sY=["input","output","output"],n1=()=>{return},d2=()=>"input",x5={generator:n1,asyncGenerator:n1,fileUrl:n1,filePath:n1,iterable:d2,asyncIterable:d2,uint8Array:d2,webStream:($)=>R4($)?"output":"input",nodeStream($){if(!L1($,{checkOpen:!1}))return"output";return D2($,{checkOpen:!1})?void 0:"input"},webTransform:n1,duplex:n1,native($){let J=eY($);if(J!==void 0)return J;if(f0($,{checkOpen:!1}))return x5.nodeStream($)}},eY=($)=>{if([0,p2.stdin].includes($))return"input";if([1,2,p2.stdout,p2.stderr].includes($))return"output"},$G="output";var j5=($,J)=>J&&!$.includes("ipc")?[...$,"ipc"]:$;var I5=({stdio:$,ipc:J,buffer:X,...Z},q,Y)=>{let Q=JG($,Z).map((G,H)=>w5(G,H));return Y?ZG(Q,X,q):j5(Q,J)},JG=($,J)=>{if($===void 0)return j0.map((Z)=>J[Z]);if(XG(J))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${j0.map((Z)=>`\`${Z}\``).join(", ")}`);if(typeof $==="string")return[$,$,$];if(!Array.isArray($))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof $}\``);let X=Math.max($.length,j0.length);return Array.from({length:X},(Z,q)=>$[q])},XG=($)=>j0.some((J)=>$[J]!==void 0),w5=($,J)=>{if(Array.isArray($))return $.map((X)=>w5(X,J));if($===null||$===void 0)return J>=j0.length?"ignore":"pipe";return $},ZG=($,J,X)=>$.map((Z,q)=>!J[q]&&q!==0&&!k1(X,q)&&QG(Z)?"ignore":Z),QG=($)=>$==="pipe"||Array.isArray($)&&$.every((J)=>J==="pipe");import{readFileSync as qG}from"node:fs";import YG from"node:tty";var E5=({stdioItem:$,stdioItem:{type:J},isStdioArray:X,fdNumber:Z,direction:q,isSync:Y})=>{if(!X||J!=="native")return $;return Y?GG({stdioItem:$,fdNumber:Z,direction:q}):BG({stdioItem:$,fdNumber:Z})},GG=({stdioItem:$,stdioItem:{value:J,optionName:X},fdNumber:Z,direction:q})=>{let Y=HG({value:J,optionName:X,fdNumber:Z,direction:q});if(Y!==void 0)return Y;if(f0(J,{checkOpen:!1}))throw TypeError(`The \`${X}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return $},HG=({value:$,optionName:J,fdNumber:X,direction:Z})=>{let q=zG($,X);if(q===void 0)return;if(Z==="output")return{type:"fileNumber",value:q,optionName:J};if(YG.isatty(q))throw TypeError(`The \`${J}: ${i$($)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:i0(qG(q)),optionName:J}},zG=($,J)=>{if($==="inherit")return J;if(typeof $==="number")return $;let X=O$.indexOf($);if(X!==-1)return X},BG=({stdioItem:$,stdioItem:{value:J,optionName:X},fdNumber:Z})=>{if(J==="inherit")return{type:"nodeStream",value:O5(Z,J,X),optionName:X};if(typeof J==="number")return{type:"nodeStream",value:O5(J,J,X),optionName:X};if(f0(J,{checkOpen:!1}))return{type:"nodeStream",value:J,optionName:X};return $},O5=($,J,X)=>{let Z=O$[$];if(Z===void 0)throw TypeError(`The \`${X}: ${J}\` option is invalid: no such standard stream.`);return Z};var h5=({input:$,inputFile:J},X)=>X===0?[...KG($),...WG(J)]:[],KG=($)=>$===void 0?[]:[{type:UG($),value:$,optionName:"input"}],UG=($)=>{if(L1($,{checkOpen:!1}))return"nodeStream";if(typeof $==="string")return"string";if(z0($))return"uint8Array";throw Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},WG=($)=>$===void 0?[]:[{...VG($),optionName:"inputFile"}],VG=($)=>{if(_4($))return{type:"fileUrl",value:$};if(g2($))return{type:"filePath",value:{file:$}};throw Error("The `inputFile` option must be a file path string or a file URL.")};var A5=($)=>$.filter((J,X)=>$.every((Z,q)=>J.value!==Z.value||X>=q||J.type==="generator"||J.type==="asyncGenerator")),N5=({stdioItem:{type:$,value:J,optionName:X},direction:Z,fileDescriptors:q,isSync:Y})=>{let Q=LG(q,$);if(Q.length===0)return;if(Y){_G({otherStdioItems:Q,type:$,value:J,optionName:X,direction:Z});return}if(T5.has($))return D5({otherStdioItems:Q,type:$,value:J,optionName:X,direction:Z});if(P5.has($))TG({otherStdioItems:Q,type:$,value:J,optionName:X})},LG=($,J)=>$.flatMap(({direction:X,stdioItems:Z})=>Z.filter((q)=>q.type===J).map((q)=>({...q,direction:X}))),_G=({otherStdioItems:$,type:J,value:X,optionName:Z,direction:q})=>{if(u2.has(J))D5({otherStdioItems:$,type:J,value:X,optionName:Z,direction:q})},D5=({otherStdioItems:$,type:J,value:X,optionName:Z,direction:q})=>{let Y=$.filter((G)=>RG(G,X));if(Y.length===0)return;let Q=Y.find((G)=>G.direction!==q);return S5(Q,Z,J),q==="output"?Y[0].stream:void 0},RG=({type:$,value:J},X)=>{if($==="filePath")return J.file===X.file;if($==="fileUrl")return J.href===X.href;return J===X},TG=({otherStdioItems:$,type:J,value:X,optionName:Z})=>{let q=$.find(({value:{transform:Y}})=>Y===X.transform);S5(q,Z,J)},S5=($,J,X)=>{if($!==void 0)throw TypeError(`The \`${$.optionName}\` and \`${J}\` options must not target ${Z1[X]} that is the same.`)};var P4=($,J,X,Z)=>{let Y=I5(J,X,Z).map((G,H)=>PG({stdioOption:G,fdNumber:H,options:J,isSync:Z})),Q=OG({initialFileDescriptors:Y,addProperties:$,options:J,isSync:Z});return J.stdio=Q.map(({stdioItems:G})=>AG(G)),Q},PG=({stdioOption:$,fdNumber:J,options:X,isSync:Z})=>{let q=E$(J),{stdioItems:Y,isStdioArray:Q}=FG({stdioOption:$,fdNumber:J,options:X,optionName:q}),G=C5(Y,J,q),H=Y.map((K)=>E5({stdioItem:K,isStdioArray:Q,fdNumber:J,direction:G,isSync:Z})),B=M5(H,q,G,X),U=F5(B,G);return wG(B,U),{direction:G,objectMode:U,stdioItems:B}},FG=({stdioOption:$,fdNumber:J,options:X,optionName:Z})=>{let Y=[...(Array.isArray($)?$:[$]).map((H)=>MG(H,Z)),...h5(X,J)],Q=A5(Y),G=Q.length>1;return CG(Q,G,Z),jG(Q),{stdioItems:Q,isStdioArray:G}},MG=($,J)=>({type:B5($,J),value:$,optionName:J}),CG=($,J,X)=>{if($.length===0)throw TypeError(`The \`${X}\` option must not be an empty array.`);if(!J)return;for(let{value:Z,optionName:q}of $)if(xG.has(Z))throw Error(`The \`${q}\` option must not include \`${Z}\`.`)},xG=new Set(["ignore","ipc"]),jG=($)=>{for(let J of $)IG(J)},IG=({type:$,value:J,optionName:X})=>{if(V5(J))throw TypeError(`The \`${X}: URL\` option must use the \`file:\` scheme.
38
- For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(L5($,J))throw TypeError(`The \`${X}: { file: '...' }\` option must be used instead of \`${X}: '...'\`.`)},wG=($,J)=>{if(!J)return;let X=$.find(({type:Z})=>T4.has(Z));if(X!==void 0)throw TypeError(`The \`${X.optionName}\` option cannot use both files and transforms in objectMode.`)},OG=({initialFileDescriptors:$,addProperties:J,options:X,isSync:Z})=>{let q=[];try{for(let Y of $)q.push(EG({fileDescriptor:Y,fileDescriptors:q,addProperties:J,options:X,isSync:Z}));return q}catch(Y){throw l2(q),Y}},EG=({fileDescriptor:{direction:$,objectMode:J,stdioItems:X},fileDescriptors:Z,addProperties:q,options:Y,isSync:Q})=>{let G=X.map((H)=>hG({stdioItem:H,addProperties:q,direction:$,options:Y,fileDescriptors:Z,isSync:Q}));return{direction:$,objectMode:J,stdioItems:G}},hG=({stdioItem:$,addProperties:J,direction:X,options:Z,fileDescriptors:q,isSync:Y})=>{let Q=N5({stdioItem:$,direction:X,fileDescriptors:q,isSync:Y});if(Q!==void 0)return{...$,stream:Q};return{...$,...J[X][$.type]($,Z)}},l2=($)=>{for(let{stdioItems:J}of $)for(let{stream:X}of J)if(X!==void 0&&!D0(X))X.destroy()},AG=($)=>{if($.length>1)return $.some(({value:Z})=>Z==="overlapped")?"overlapped":"pipe";let[{type:J,value:X}]=$;return J==="native"?X:"pipe"};var k5=($,J)=>P4(DG,$,J,!0),u0=({type:$,optionName:J})=>{b5(J,Z1[$])},NG=({optionName:$,value:J})=>{if(J==="ipc"||J==="overlapped")b5($,`"${J}"`);return{}},b5=($,J)=>{throw TypeError(`The \`${$}\` option cannot be ${J} with synchronous methods.`)},v5={generator(){},asyncGenerator:u0,webStream:u0,nodeStream:u0,webTransform:u0,duplex:u0,asyncIterable:u0,native:NG},DG={input:{...v5,fileUrl:({value:$})=>({contents:[i0(f5($))]}),filePath:({value:{file:$}})=>({contents:[i0(f5($))]}),fileNumber:u0,iterable:({value:$})=>({contents:[...$]}),string:({value:$})=>({contents:[$]}),uint8Array:({value:$})=>({contents:[$]})},output:{...v5,fileUrl:({value:$})=>({path:$}),filePath:({value:{file:$,append:J}})=>({path:$,append:J}),fileNumber:({value:$})=>({path:$}),iterable:u0,string:u0,uint8Array:u0}};var r0=($,{stripFinalNewline:J},X)=>n2(J,X)&&$!==void 0&&!Array.isArray($)?m1($):$,n2=($,J)=>J==="all"?$[1]||$[2]:$[J];import{Transform as eG,getDefaultHighWaterMark as t5}from"node:stream";var F4=($,J,X,Z)=>$||X?void 0:g5(J,Z),t2=($,J,X)=>X?$.flatMap((Z)=>y5(Z,J)):y5($,J),y5=($,J)=>{let{transform:X,final:Z}=g5(J,{});return[...X($),...Z()]},g5=($,J)=>{return J.previousChunks="",{transform:SG.bind(void 0,J,$),final:vG.bind(void 0,J)}},SG=function*($,J,X){if(typeof X!=="string"){yield X;return}let{previousChunks:Z}=$,q=-1;for(let Y=0;Y<X.length;Y+=1)if(X[Y]===`
39
- `){let Q=fG(X,Y,J,$),G=X.slice(q+1,Y+1-Q);if(Z.length>0)G=i2(Z,G),Z="";yield G,q=Y}if(q!==X.length-1)Z=i2(Z,X.slice(q+1));$.previousChunks=Z},fG=($,J,X,Z)=>{if(X)return 0;return Z.isWindowsNewline=J!==0&&$[J-1]==="\r",Z.isWindowsNewline?2:1},vG=function*({previousChunks:$}){if($.length>0)yield $},c5=({binary:$,preserveNewlines:J,readableObjectMode:X,state:Z})=>$||J||X?void 0:{transform:kG.bind(void 0,Z)},kG=function*({isWindowsNewline:$=!1},J){let{unixNewline:X,windowsNewline:Z,LF:q,concatBytes:Y}=typeof J==="string"?bG:gG;if(J.at(-1)===q){yield J;return}yield Y(J,$?Z:X)},i2=($,J)=>`${$}${J}`,bG={windowsNewline:`\r
36
+ `);return{originalMessage:j,shortMessage:n,message:L0}},CY=({originalError:$,timedOut:J,timeout:Z,isMaxBuffer:X,maxBuffer:q,errorCode:Y,signal:Q,signalDescription:G,exitCode:H,isCanceled:K,isGracefullyCanceled:U,isForcefullyTerminated:B,forceKillAfterDelay:W,killSignal:M})=>{let R=FY(B,W);if(J)return`Command timed out after ${Z} milliseconds${R}`;if(U){if(Q===void 0)return`Command was gracefully canceled with exit code ${H}`;return B?`Command was gracefully canceled${R}`:`Command was gracefully canceled with ${Q} (${G})`}if(K)return`Command was canceled${R}`;if(X)return`${J5($,q)}${R}`;if(Y!==void 0)return`Command failed with ${Y}${R}`;if(B)return`Command was killed with ${M} (${n$(M)})${R}`;if(Q!==void 0)return`Command was killed with ${Q} (${G})`;if(H!==void 0)return`Command failed with exit code ${H}`;return"Command failed"},FY=($,J)=>$?` and was forcefully terminated after ${J} milliseconds`:"",PY=($,J)=>{if($ instanceof g0)return;let Z=v7($)?$.originalMessage:String($?.message??$),X=q$(k8(Z,J));return X===""?void 0:X},jY=($)=>typeof $==="string"?$:MY($),xY=($)=>Array.isArray($)?$.map((J)=>p1(Q5(J))).filter(Boolean).join(`
37
+ `):Q5($),Q5=($)=>{if(typeof $==="string")return $;if(z0($))return E$($);return""};var R4=({command:$,escapedCommand:J,stdio:Z,all:X,ipcOutput:q,options:{cwd:Y},startTime:Q})=>Y5({command:$,escapedCommand:J,cwd:Y,durationMs:U2(Q),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:Z[1],stderr:Z[2],all:X,stdio:Z,ipcOutput:q,pipedFrom:[]}),l1=({error:$,command:J,escapedCommand:Z,fileDescriptors:X,options:q,startTime:Y,isSync:Q})=>B$({error:$,command:J,escapedCommand:Z,startTime:Y,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:X.length}),ipcOutput:[],options:q,isSync:Q}),B$=({error:$,command:J,escapedCommand:Z,startTime:X,timedOut:q,isCanceled:Y,isGracefullyCanceled:Q,isMaxBuffer:G,isForcefullyTerminated:H,exitCode:K,signal:U,stdio:B,all:W,ipcOutput:M,options:{timeoutDuration:R,timeout:L=R,forceKillAfterDelay:I,killSignal:x,cwd:F,maxBuffer:v},isSync:j})=>{let{exitCode:l,signal:n,signalDescription:o}=wY(K,U),{originalMessage:L0,shortMessage:p,message:i0}=q5({stdio:B,all:W,ipcOutput:M,originalError:$,signal:n,signalDescription:o,exitCode:l,escapedCommand:Z,timedOut:q,isCanceled:Y,isGracefullyCanceled:Q,isMaxBuffer:G,isForcefullyTerminated:H,forceKillAfterDelay:I,killSignal:x,maxBuffer:v,timeout:L,cwd:F}),E=D7($,i0,j);return Object.assign(E,IY({error:E,command:J,escapedCommand:Z,startTime:X,timedOut:q,isCanceled:Y,isGracefullyCanceled:Q,isMaxBuffer:G,isForcefullyTerminated:H,exitCode:l,signal:n,signalDescription:o,stdio:B,all:W,ipcOutput:M,cwd:F,originalMessage:L0,shortMessage:p})),E},IY=({error:$,command:J,escapedCommand:Z,startTime:X,timedOut:q,isCanceled:Y,isGracefullyCanceled:Q,isMaxBuffer:G,isForcefullyTerminated:H,exitCode:K,signal:U,signalDescription:B,stdio:W,all:M,ipcOutput:R,cwd:L,originalMessage:I,shortMessage:x})=>Y5({shortMessage:x,originalMessage:I,command:J,escapedCommand:Z,cwd:L,durationMs:U2(X),failed:!0,timedOut:q,isCanceled:Y,isGracefullyCanceled:Q,isTerminated:U!==void 0,isMaxBuffer:G,isForcefullyTerminated:H,exitCode:K,signal:U,signalDescription:B,code:$.cause?.code,stdout:W[1],stderr:W[2],all:M,stdio:W,ipcOutput:R,pipedFrom:[]}),Y5=($)=>Object.fromEntries(Object.entries($).filter(([,J])=>J!==void 0)),wY=($,J)=>{let Z=$===null?void 0:$,X=J===null?void 0:J,q=X===void 0?void 0:n$(J);return{exitCode:Z,signal:X,signalDescription:q}};var G5=($)=>Number.isFinite($)?$:0;function OY($){return{days:Math.trunc($/86400000),hours:Math.trunc($/3600000%24),minutes:Math.trunc($/60000%60),seconds:Math.trunc($/1000%60),milliseconds:Math.trunc($%1000),microseconds:Math.trunc(G5($*1000)%1000),nanoseconds:Math.trunc(G5($*1e6)%1000)}}function EY($){return{days:$/86400000n,hours:$/3600000n%24n,minutes:$/60000n%60n,seconds:$/1000n%60n,milliseconds:$%1000n,microseconds:0n,nanoseconds:0n}}function y2($){switch(typeof $){case"number":{if(Number.isFinite($))return OY($);break}case"bigint":return EY($)}throw TypeError("Expected a finite number or bigint")}var AY=($)=>$===0||$===0n,hY=($,J)=>J===1||J===1n?$:`${$}s`,NY=0.0000001,DY=24n*60n*60n*1000n;function g2($,J){let Z=typeof $==="bigint";if(!Z&&!Number.isFinite($))throw TypeError("Expected a finite number or bigint");J={...J};let X=$<0?"-":"";if($=$<0?-$:$,J.colonNotation)J.compact=!1,J.formatSubMilliseconds=!1,J.separateMilliseconds=!1,J.verbose=!1;if(J.compact)J.unitCount=1,J.secondsDecimalDigits=0,J.millisecondsDecimalDigits=0;let q=[],Y=(U,B)=>{let W=Math.floor(U*10**B+NY);return(Math.round(W)/10**B).toFixed(B)},Q=(U,B,W,M)=>{if((q.length===0||!J.colonNotation)&&AY(U)&&!(J.colonNotation&&W==="m"))return;if(M??=String(U),J.colonNotation){let R=M.includes(".")?M.split(".")[0].length:M.length,L=q.length>0?2:1;M="0".repeat(Math.max(0,L-R))+M}else M+=J.verbose?" "+hY(B,U):W;q.push(M)},G=y2($),H=BigInt(G.days);if(J.hideYearAndDays)Q(BigInt(H)*24n+BigInt(G.hours),"hour","h");else{if(J.hideYear)Q(H,"day","d");else Q(H/365n,"year","y"),Q(H%365n,"day","d");Q(Number(G.hours),"hour","h")}if(Q(Number(G.minutes),"minute","m"),!J.hideSeconds)if(J.separateMilliseconds||J.formatSubMilliseconds||!J.colonNotation&&$<1000&&!J.subSecondsAsDecimals){let U=Number(G.seconds),B=Number(G.milliseconds),W=Number(G.microseconds),M=Number(G.nanoseconds);if(Q(U,"second","s"),J.formatSubMilliseconds)Q(B,"millisecond","ms"),Q(W,"microsecond","µs"),Q(M,"nanosecond","ns");else{let R=B+W/1000+M/1e6,L=typeof J.millisecondsDecimalDigits==="number"?J.millisecondsDecimalDigits:0,I=R>=1?Math.round(R):Math.ceil(R),x=L?R.toFixed(L):I;Q(Number.parseFloat(x),"millisecond","ms",x)}}else{let U=(Z?Number($%DY):$)/1000%60,B=typeof J.secondsDecimalDigits==="number"?J.secondsDecimalDigits:1,W=Y(U,B),M=J.keepDecimalsOnWholeSeconds?W:W.replace(/\.0+$/,"");Q(Number.parseFloat(M),"second","s",M)}if(q.length===0)return X+"0"+(J.verbose?" milliseconds":"ms");let K=J.colonNotation?":":" ";if(typeof J.unitCount==="number")q=q.slice(0,Math.max(J.unitCount,1));return X+q.join(K)}var H5=($,J)=>{if($.failed)y0({type:"error",verboseMessage:$.shortMessage,verboseInfo:J,result:$})};var z5=($,J)=>{if(!k1(J))return;H5($,J),SY($,J)},SY=($,J)=>{let Z=`(done in ${g2($.durationMs)})`;y0({type:"duration",verboseMessage:Z,verboseInfo:J,result:$})};var n1=($,J,{reject:Z})=>{if(z5($,J),$.failed&&Z)throw $;return $};import{readFileSync as k5}from"node:fs";var U5=($,J)=>{if(_1($))return"asyncGenerator";if(L5($))return"generator";if(T4($))return"fileUrl";if(yY($))return"filePath";if(mY($))return"webStream";if(v0($,{checkOpen:!1}))return"native";if(z0($))return"uint8Array";if(cY($))return"asyncIterable";if(pY($))return"iterable";if(c2($))return W5({transform:$},J);if(bY($))return vY($,J);return"native"},vY=($,J)=>{if(f2($.transform,{checkOpen:!1}))return fY($,J);if(c2($.transform))return W5($,J);return kY($,J)},fY=($,J)=>{return V5($,J,"Duplex stream"),"duplex"},W5=($,J)=>{return V5($,J,"web TransformStream"),"webTransform"},V5=({final:$,binary:J,objectMode:Z},X,q)=>{K5($,`${X}.final`,q),K5(J,`${X}.binary`,q),u2(Z,`${X}.objectMode`)},K5=($,J,Z)=>{if($!==void 0)throw TypeError(`The \`${J}\` option can only be defined when using a generator, not a ${Z}.`)},kY=({transform:$,final:J,binary:Z,objectMode:X},q)=>{if($!==void 0&&!B5($))throw TypeError(`The \`${q}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(f2(J,{checkOpen:!1}))throw TypeError(`The \`${q}.final\` option must not be a Duplex stream.`);if(c2(J))throw TypeError(`The \`${q}.final\` option must not be a web TransformStream.`);if(J!==void 0&&!B5(J))throw TypeError(`The \`${q}.final\` option must be a generator.`);return u2(Z,`${q}.binary`),u2(X,`${q}.objectMode`),_1($)||_1(J)?"asyncGenerator":"generator"},u2=($,J)=>{if($!==void 0&&typeof $!=="boolean")throw TypeError(`The \`${J}\` option must use a boolean.`)},B5=($)=>_1($)||L5($),_1=($)=>Object.prototype.toString.call($)==="[object AsyncGeneratorFunction]",L5=($)=>Object.prototype.toString.call($)==="[object GeneratorFunction]",bY=($)=>Z0($)&&($.transform!==void 0||$.final!==void 0),T4=($)=>Object.prototype.toString.call($)==="[object URL]",_5=($)=>T4($)&&$.protocol!=="file:",yY=($)=>Z0($)&&Object.keys($).length>0&&Object.keys($).every((J)=>gY.has(J))&&m2($.file),gY=new Set(["file","append"]),m2=($)=>typeof $==="string",R5=($,J)=>$==="native"&&typeof J==="string"&&!uY.has(J),uY=new Set(["ipc","ignore","inherit","overlapped","pipe"]),T5=($)=>Object.prototype.toString.call($)==="[object ReadableStream]",M4=($)=>Object.prototype.toString.call($)==="[object WritableStream]",mY=($)=>T5($)||M4($),c2=($)=>T5($?.readable)&&M4($?.writable),cY=($)=>M5($)&&typeof $[Symbol.asyncIterator]==="function",pY=($)=>M5($)&&typeof $[Symbol.iterator]==="function",M5=($)=>typeof $==="object"&&$!==null,I0=new Set(["generator","asyncGenerator","duplex","webTransform"]),C4=new Set(["fileUrl","filePath","fileNumber"]),p2=new Set(["fileUrl","filePath"]),C5=new Set([...p2,"webStream","nodeStream"]),F5=new Set(["webTransform","duplex"]),Q1={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"};var d2=($,J,Z,X)=>X==="output"?dY($,J,Z):lY($,J,Z),dY=($,J,Z)=>{let X=J!==0&&Z[J-1].value.readableObjectMode;return{writableObjectMode:X,readableObjectMode:$??X}},lY=($,J,Z)=>{let X=J===0?$===!0:Z[J-1].value.readableObjectMode,q=J!==Z.length-1&&($??X);return{writableObjectMode:X,readableObjectMode:q}},P5=($,J)=>{let Z=$.findLast(({type:X})=>I0.has(X));if(Z===void 0)return!1;return J==="input"?Z.value.writableObjectMode:Z.value.readableObjectMode};var j5=($,J,Z,X)=>[...$.filter(({type:q})=>!I0.has(q)),...nY($,J,Z,X)],nY=($,J,Z,{encoding:X})=>{let q=$.filter(({type:Q})=>I0.has(Q)),Y=Array.from({length:q.length});for(let[Q,G]of Object.entries(q))Y[Q]=iY({stdioItem:G,index:Number(Q),newTransforms:Y,optionName:J,direction:Z,encoding:X});return rY(Y,Z)},iY=({stdioItem:$,stdioItem:{type:J},index:Z,newTransforms:X,optionName:q,direction:Y,encoding:Q})=>{if(J==="duplex")return oY({stdioItem:$,optionName:q});if(J==="webTransform")return tY({stdioItem:$,index:Z,newTransforms:X,direction:Y});return aY({stdioItem:$,index:Z,newTransforms:X,direction:Y,encoding:Q})},oY=({stdioItem:$,stdioItem:{value:{transform:J,transform:{writableObjectMode:Z,readableObjectMode:X},objectMode:q=X}},optionName:Y})=>{if(q&&!X)throw TypeError(`The \`${Y}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!q&&X)throw TypeError(`The \`${Y}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...$,value:{transform:J,writableObjectMode:Z,readableObjectMode:X}}},tY=({stdioItem:$,stdioItem:{value:J},index:Z,newTransforms:X,direction:q})=>{let{transform:Y,objectMode:Q}=Z0(J)?J:{transform:J},{writableObjectMode:G,readableObjectMode:H}=d2(Q,Z,X,q);return{...$,value:{transform:Y,writableObjectMode:G,readableObjectMode:H}}},aY=({stdioItem:$,stdioItem:{value:J},index:Z,newTransforms:X,direction:q,encoding:Y})=>{let{transform:Q,final:G,binary:H=!1,preserveNewlines:K=!1,objectMode:U}=Z0(J)?J:{transform:J},B=H||M0.has(Y),{writableObjectMode:W,readableObjectMode:M}=d2(U,Z,X,q);return{...$,value:{transform:Q,final:G,binary:B,preserveNewlines:K,writableObjectMode:W,readableObjectMode:M}}},rY=($,J)=>J==="input"?$.reverse():$;import l2 from"node:process";var x5=($,J,Z)=>{let X=$.map((q)=>sY(q,J));if(X.includes("input")&&X.includes("output"))throw TypeError(`The \`${Z}\` option must not be an array of both readable and writable values.`);return X.find(Boolean)??JG},sY=({type:$,value:J},Z)=>eY[Z]??I5[$](J),eY=["input","output","output"],i1=()=>{return},n2=()=>"input",I5={generator:i1,asyncGenerator:i1,fileUrl:i1,filePath:i1,iterable:n2,asyncIterable:n2,uint8Array:n2,webStream:($)=>M4($)?"output":"input",nodeStream($){if(!L1($,{checkOpen:!1}))return"output";return v2($,{checkOpen:!1})?void 0:"input"},webTransform:i1,duplex:i1,native($){let J=$G($);if(J!==void 0)return J;if(v0($,{checkOpen:!1}))return I5.nodeStream($)}},$G=($)=>{if([0,l2.stdin].includes($))return"input";if([1,2,l2.stdout,l2.stderr].includes($))return"output"},JG="output";var w5=($,J)=>J&&!$.includes("ipc")?[...$,"ipc"]:$;var O5=({stdio:$,ipc:J,buffer:Z,...X},q,Y)=>{let Q=ZG($,X).map((G,H)=>E5(G,H));return Y?QG(Q,Z,q):w5(Q,J)},ZG=($,J)=>{if($===void 0)return x0.map((X)=>J[X]);if(XG(J))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${x0.map((X)=>`\`${X}\``).join(", ")}`);if(typeof $==="string")return[$,$,$];if(!Array.isArray($))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof $}\``);let Z=Math.max($.length,x0.length);return Array.from({length:Z},(X,q)=>$[q])},XG=($)=>x0.some((J)=>$[J]!==void 0),E5=($,J)=>{if(Array.isArray($))return $.map((Z)=>E5(Z,J));if($===null||$===void 0)return J>=x0.length?"ignore":"pipe";return $},QG=($,J,Z)=>$.map((X,q)=>!J[q]&&q!==0&&!b1(Z,q)&&qG(X)?"ignore":X),qG=($)=>$==="pipe"||Array.isArray($)&&$.every((J)=>J==="pipe");import{readFileSync as YG}from"node:fs";import GG from"node:tty";var h5=({stdioItem:$,stdioItem:{type:J},isStdioArray:Z,fdNumber:X,direction:q,isSync:Y})=>{if(!Z||J!=="native")return $;return Y?HG({stdioItem:$,fdNumber:X,direction:q}):BG({stdioItem:$,fdNumber:X})},HG=({stdioItem:$,stdioItem:{value:J,optionName:Z},fdNumber:X,direction:q})=>{let Y=zG({value:J,optionName:Z,fdNumber:X,direction:q});if(Y!==void 0)return Y;if(v0(J,{checkOpen:!1}))throw TypeError(`The \`${Z}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return $},zG=({value:$,optionName:J,fdNumber:Z,direction:X})=>{let q=KG($,Z);if(q===void 0)return;if(X==="output")return{type:"fileNumber",value:q,optionName:J};if(GG.isatty(q))throw TypeError(`The \`${J}: ${t$($)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:t0(YG(q)),optionName:J}},KG=($,J)=>{if($==="inherit")return J;if(typeof $==="number")return $;let Z=A$.indexOf($);if(Z!==-1)return Z},BG=({stdioItem:$,stdioItem:{value:J,optionName:Z},fdNumber:X})=>{if(J==="inherit")return{type:"nodeStream",value:A5(X,J,Z),optionName:Z};if(typeof J==="number")return{type:"nodeStream",value:A5(J,J,Z),optionName:Z};if(v0(J,{checkOpen:!1}))return{type:"nodeStream",value:J,optionName:Z};return $},A5=($,J,Z)=>{let X=A$[$];if(X===void 0)throw TypeError(`The \`${Z}: ${J}\` option is invalid: no such standard stream.`);return X};var N5=({input:$,inputFile:J},Z)=>Z===0?[...UG($),...VG(J)]:[],UG=($)=>$===void 0?[]:[{type:WG($),value:$,optionName:"input"}],WG=($)=>{if(L1($,{checkOpen:!1}))return"nodeStream";if(typeof $==="string")return"string";if(z0($))return"uint8Array";throw Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},VG=($)=>$===void 0?[]:[{...LG($),optionName:"inputFile"}],LG=($)=>{if(T4($))return{type:"fileUrl",value:$};if(m2($))return{type:"filePath",value:{file:$}};throw Error("The `inputFile` option must be a file path string or a file URL.")};var D5=($)=>$.filter((J,Z)=>$.every((X,q)=>J.value!==X.value||Z>=q||J.type==="generator"||J.type==="asyncGenerator")),S5=({stdioItem:{type:$,value:J,optionName:Z},direction:X,fileDescriptors:q,isSync:Y})=>{let Q=_G(q,$);if(Q.length===0)return;if(Y){RG({otherStdioItems:Q,type:$,value:J,optionName:Z,direction:X});return}if(C5.has($))return v5({otherStdioItems:Q,type:$,value:J,optionName:Z,direction:X});if(F5.has($))MG({otherStdioItems:Q,type:$,value:J,optionName:Z})},_G=($,J)=>$.flatMap(({direction:Z,stdioItems:X})=>X.filter((q)=>q.type===J).map((q)=>({...q,direction:Z}))),RG=({otherStdioItems:$,type:J,value:Z,optionName:X,direction:q})=>{if(p2.has(J))v5({otherStdioItems:$,type:J,value:Z,optionName:X,direction:q})},v5=({otherStdioItems:$,type:J,value:Z,optionName:X,direction:q})=>{let Y=$.filter((G)=>TG(G,Z));if(Y.length===0)return;let Q=Y.find((G)=>G.direction!==q);return f5(Q,X,J),q==="output"?Y[0].stream:void 0},TG=({type:$,value:J},Z)=>{if($==="filePath")return J.file===Z.file;if($==="fileUrl")return J.href===Z.href;return J===Z},MG=({otherStdioItems:$,type:J,value:Z,optionName:X})=>{let q=$.find(({value:{transform:Y}})=>Y===Z.transform);f5(q,X,J)},f5=($,J,Z)=>{if($!==void 0)throw TypeError(`The \`${$.optionName}\` and \`${J}\` options must not target ${Q1[Z]} that is the same.`)};var F4=($,J,Z,X)=>{let Y=O5(J,Z,X).map((G,H)=>CG({stdioOption:G,fdNumber:H,options:J,isSync:X})),Q=EG({initialFileDescriptors:Y,addProperties:$,options:J,isSync:X});return J.stdio=Q.map(({stdioItems:G})=>NG(G)),Q},CG=({stdioOption:$,fdNumber:J,options:Z,isSync:X})=>{let q=h$(J),{stdioItems:Y,isStdioArray:Q}=FG({stdioOption:$,fdNumber:J,options:Z,optionName:q}),G=x5(Y,J,q),H=Y.map((B)=>h5({stdioItem:B,isStdioArray:Q,fdNumber:J,direction:G,isSync:X})),K=j5(H,q,G,Z),U=P5(K,G);return OG(K,U),{direction:G,objectMode:U,stdioItems:K}},FG=({stdioOption:$,fdNumber:J,options:Z,optionName:X})=>{let Y=[...(Array.isArray($)?$:[$]).map((H)=>PG(H,X)),...N5(Z,J)],Q=D5(Y),G=Q.length>1;return jG(Q,G,X),IG(Q),{stdioItems:Q,isStdioArray:G}},PG=($,J)=>({type:U5($,J),value:$,optionName:J}),jG=($,J,Z)=>{if($.length===0)throw TypeError(`The \`${Z}\` option must not be an empty array.`);if(!J)return;for(let{value:X,optionName:q}of $)if(xG.has(X))throw Error(`The \`${q}\` option must not include \`${X}\`.`)},xG=new Set(["ignore","ipc"]),IG=($)=>{for(let J of $)wG(J)},wG=({type:$,value:J,optionName:Z})=>{if(_5(J))throw TypeError(`The \`${Z}: URL\` option must use the \`file:\` scheme.
38
+ For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(R5($,J))throw TypeError(`The \`${Z}: { file: '...' }\` option must be used instead of \`${Z}: '...'\`.`)},OG=($,J)=>{if(!J)return;let Z=$.find(({type:X})=>C4.has(X));if(Z!==void 0)throw TypeError(`The \`${Z.optionName}\` option cannot use both files and transforms in objectMode.`)},EG=({initialFileDescriptors:$,addProperties:J,options:Z,isSync:X})=>{let q=[];try{for(let Y of $)q.push(AG({fileDescriptor:Y,fileDescriptors:q,addProperties:J,options:Z,isSync:X}));return q}catch(Y){throw i2(q),Y}},AG=({fileDescriptor:{direction:$,objectMode:J,stdioItems:Z},fileDescriptors:X,addProperties:q,options:Y,isSync:Q})=>{let G=Z.map((H)=>hG({stdioItem:H,addProperties:q,direction:$,options:Y,fileDescriptors:X,isSync:Q}));return{direction:$,objectMode:J,stdioItems:G}},hG=({stdioItem:$,addProperties:J,direction:Z,options:X,fileDescriptors:q,isSync:Y})=>{let Q=S5({stdioItem:$,direction:Z,fileDescriptors:q,isSync:Y});if(Q!==void 0)return{...$,stream:Q};return{...$,...J[Z][$.type]($,X)}},i2=($)=>{for(let{stdioItems:J}of $)for(let{stream:Z}of J)if(Z!==void 0&&!D0(Z))Z.destroy()},NG=($)=>{if($.length>1)return $.some(({value:X})=>X==="overlapped")?"overlapped":"pipe";let[{type:J,value:Z}]=$;return J==="native"?Z:"pipe"};var y5=($,J)=>F4(SG,$,J,!0),c0=({type:$,optionName:J})=>{g5(J,Q1[$])},DG=({optionName:$,value:J})=>{if(J==="ipc"||J==="overlapped")g5($,`"${J}"`);return{}},g5=($,J)=>{throw TypeError(`The \`${$}\` option cannot be ${J} with synchronous methods.`)},b5={generator(){},asyncGenerator:c0,webStream:c0,nodeStream:c0,webTransform:c0,duplex:c0,asyncIterable:c0,native:DG},SG={input:{...b5,fileUrl:({value:$})=>({contents:[t0(k5($))]}),filePath:({value:{file:$}})=>({contents:[t0(k5($))]}),fileNumber:c0,iterable:({value:$})=>({contents:[...$]}),string:({value:$})=>({contents:[$]}),uint8Array:({value:$})=>({contents:[$]})},output:{...b5,fileUrl:({value:$})=>({path:$}),filePath:({value:{file:$,append:J}})=>({path:$,append:J}),fileNumber:({value:$})=>({path:$}),iterable:c0,string:c0,uint8Array:c0}};var e0=($,{stripFinalNewline:J},Z)=>o2(J,Z)&&$!==void 0&&!Array.isArray($)?p1($):$,o2=($,J)=>J==="all"?$[1]||$[2]:$[J];import{Transform as $H,getDefaultHighWaterMark as a5}from"node:stream";var P4=($,J,Z,X)=>$||Z?void 0:m5(J,X),a2=($,J,Z)=>Z?$.flatMap((X)=>u5(X,J)):u5($,J),u5=($,J)=>{let{transform:Z,final:X}=m5(J,{});return[...Z($),...X()]},m5=($,J)=>{return J.previousChunks="",{transform:vG.bind(void 0,J,$),final:kG.bind(void 0,J)}},vG=function*($,J,Z){if(typeof Z!=="string"){yield Z;return}let{previousChunks:X}=$,q=-1;for(let Y=0;Y<Z.length;Y+=1)if(Z[Y]===`
39
+ `){let Q=fG(Z,Y,J,$),G=Z.slice(q+1,Y+1-Q);if(X.length>0)G=t2(X,G),X="";yield G,q=Y}if(q!==Z.length-1)X=t2(X,Z.slice(q+1));$.previousChunks=X},fG=($,J,Z,X)=>{if(Z)return 0;return X.isWindowsNewline=J!==0&&$[J-1]==="\r",X.isWindowsNewline?2:1},kG=function*({previousChunks:$}){if($.length>0)yield $},c5=({binary:$,preserveNewlines:J,readableObjectMode:Z,state:X})=>$||J||Z?void 0:{transform:bG.bind(void 0,X)},bG=function*({isWindowsNewline:$=!1},J){let{unixNewline:Z,windowsNewline:X,LF:q,concatBytes:Y}=typeof J==="string"?yG:uG;if(J.at(-1)===q){yield J;return}yield Y(J,$?X:Z)},t2=($,J)=>`${$}${J}`,yG={windowsNewline:`\r
40
40
  `,unixNewline:`
41
41
  `,LF:`
42
- `,concatBytes:i2},yG=($,J)=>{let X=new Uint8Array($.length+J.length);return X.set($,0),X.set(J,$.length),X},gG={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:yG};import{Buffer as cG}from"node:buffer";var u5=($,J)=>$?void 0:uG.bind(void 0,J),uG=function*($,J){if(typeof J!=="string"&&!z0(J)&&!cG.isBuffer(J))throw TypeError(`The \`${$}\` option's transform must use "objectMode: true" to receive as input: ${typeof J}.`);yield J},m5=($,J)=>$?mG.bind(void 0,J):pG.bind(void 0,J),mG=function*($,J){p5($,J),yield J},pG=function*($,J){if(p5($,J),typeof J!=="string"&&!z0(J))throw TypeError(`The \`${$}\` option's function must yield a string or an Uint8Array, not ${typeof J}.`);yield J},p5=($,J)=>{if(J===null||J===void 0)throw TypeError(`The \`${$}\` option's function must not call \`yield ${J}\`.
42
+ `,concatBytes:t2},gG=($,J)=>{let Z=new Uint8Array($.length+J.length);return Z.set($,0),Z.set(J,$.length),Z},uG={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:gG};import{Buffer as mG}from"node:buffer";var p5=($,J)=>$?void 0:cG.bind(void 0,J),cG=function*($,J){if(typeof J!=="string"&&!z0(J)&&!mG.isBuffer(J))throw TypeError(`The \`${$}\` option's transform must use "objectMode: true" to receive as input: ${typeof J}.`);yield J},d5=($,J)=>$?pG.bind(void 0,J):dG.bind(void 0,J),pG=function*($,J){l5($,J),yield J},dG=function*($,J){if(l5($,J),typeof J!=="string"&&!z0(J))throw TypeError(`The \`${$}\` option's function must yield a string or an Uint8Array, not ${typeof J}.`);yield J},l5=($,J)=>{if(J===null||J===void 0)throw TypeError(`The \`${$}\` option's function must not call \`yield ${J}\`.
43
43
  Instead, \`yield\` should either be called with a value, or not be called at all. For example:
44
- if (condition) { yield value; }`)};import{Buffer as dG}from"node:buffer";import{StringDecoder as lG}from"node:string_decoder";var M4=($,J,X)=>{if(X)return;if($)return{transform:nG.bind(void 0,new TextEncoder)};let Z=new lG(J);return{transform:iG.bind(void 0,Z),final:tG.bind(void 0,Z)}},nG=function*($,J){if(dG.isBuffer(J))yield i0(J);else if(typeof J==="string")yield $.encode(J);else yield J},iG=function*($,J){yield z0(J)?$.write(J):J},tG=function*($){let J=$.end();if(J!=="")yield J};import{callbackify as d5}from"node:util";var o2=d5(async($,J,X,Z)=>{J.currentIterable=$(...X);try{for await(let q of J.currentIterable)Z.push(q)}finally{delete J.currentIterable}}),C4=async function*($,J,X){if(X===J.length){yield $;return}let{transform:Z=aG}=J[X];for await(let q of Z($))yield*C4(q,J,X+1)},l5=async function*($){for(let[J,{final:X}]of Object.entries($))yield*oG(X,Number(J),$)},oG=async function*($,J,X){if($===void 0)return;for await(let Z of $())yield*C4(Z,X,J+1)},n5=d5(async({currentIterable:$},J)=>{if($!==void 0){await(J?$.throw(J):$.return());return}if(J)throw J}),aG=function*($){yield $};var a2=($,J,X,Z)=>{try{for(let q of $(...J))X.push(q);Z()}catch(q){Z(q)}},i5=($,J)=>[...J.flatMap((X)=>[...R1(X,$,0)]),...U$($)],R1=function*($,J,X){if(X===J.length){yield $;return}let{transform:Z=sG}=J[X];for(let q of Z($))yield*R1(q,J,X+1)},U$=function*($){for(let[J,{final:X}]of Object.entries($))yield*rG(X,Number(J),$)},rG=function*($,J,X){if($===void 0)return;for(let Z of $())yield*R1(Z,X,J+1)},sG=function*($){yield $};var r2=({value:$,value:{transform:J,final:X,writableObjectMode:Z,readableObjectMode:q},optionName:Y},{encoding:Q})=>{let G={},H=o5($,Q,Y),B=_1(J),U=_1(X),K=B?o2.bind(void 0,C4,G):a2.bind(void 0,R1),W=B||U?o2.bind(void 0,l5,G):a2.bind(void 0,U$),P=B||U?n5.bind(void 0,G):void 0;return{stream:new eG({writableObjectMode:Z,writableHighWaterMark:t5(Z),readableObjectMode:q,readableHighWaterMark:t5(q),transform(L,M,C){K([L,H,0],this,C)},flush(L){W([H],this,L)},destroy:P})}},x4=($,J,X,Z)=>{let q=J.filter(({type:Q})=>Q==="generator"),Y=Z?q.reverse():q;for(let{value:Q,optionName:G}of Y){let H=o5(Q,X,G);$=i5(H,$)}return $},o5=({transform:$,final:J,binary:X,writableObjectMode:Z,readableObjectMode:q,preserveNewlines:Y},Q,G)=>{let H={};return[{transform:u5(Z,G)},M4(X,Q,Z),F4(X,Y,Z,H),{transform:$,final:J},{transform:m5(q,G)},c5({binary:X,preserveNewlines:Y,readableObjectMode:q,state:H})].filter(Boolean)};var a5=($,J)=>{for(let X of $H($))JH($,X,J)},$H=($)=>new Set(Object.entries($).filter(([,{direction:J}])=>J==="input").map(([J])=>Number(J))),JH=($,J,X)=>{let{stdioItems:Z}=$[J],q=Z.filter(({contents:G})=>G!==void 0);if(q.length===0)return;if(J!==0){let[{type:G,optionName:H}]=q;throw TypeError(`Only the \`stdin\` option, not \`${H}\`, can be ${Z1[G]} with synchronous methods.`)}let Q=q.map(({contents:G})=>G).map((G)=>XH(G,Z));X.input=Q$(Q)},XH=($,J)=>{let X=x4($,J,"utf8",!0);return ZH(X),Q$(X)},ZH=($)=>{let J=$.find((X)=>typeof X!=="string"&&!z0(X));if(J!==void 0)throw TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${J}.`)};import{writeFileSync as GH,appendFileSync as HH}from"node:fs";var j4=({stdioItems:$,encoding:J,verboseInfo:X,fdNumber:Z})=>Z!=="all"&&k1(X,Z)&&!P0.has(J)&&QH(Z)&&($.some(({type:q,value:Y})=>q==="native"&&qH.has(Y))||$.every(({type:q})=>I0.has(q))),QH=($)=>$===1||$===2,qH=new Set(["pipe","overlapped"]),r5=async($,J,X,Z)=>{for await(let q of $)if(!YH(J))e5(q,X,Z)},s5=($,J,X)=>{for(let Z of $)e5(Z,J,X)},YH=($)=>$._readableState.pipes.length>0,e5=($,J,X)=>{let Z=f$($);b0({type:"output",verboseMessage:Z,fdNumber:J,verboseInfo:X})};var $J=({fileDescriptors:$,syncResult:{output:J},options:X,isMaxBuffer:Z,verboseInfo:q})=>{if(J===null)return{output:Array.from({length:3})};let Y={},Q=new Set([]);return{output:J.map((H,B)=>zH({result:H,fileDescriptors:$,fdNumber:B,state:Y,outputFiles:Q,isMaxBuffer:Z,verboseInfo:q},X)),...Y}},zH=({result:$,fileDescriptors:J,fdNumber:X,state:Z,outputFiles:q,isMaxBuffer:Y,verboseInfo:Q},{buffer:G,encoding:H,lines:B,stripFinalNewline:U,maxBuffer:K})=>{if($===null)return;let W=J5($,Y,K),P=i0(W),{stdioItems:R,objectMode:L}=J[X],M=BH([P],R,H,Z),{serializedResult:C,finalResult:A=C}=KH({chunks:M,objectMode:L,encoding:H,lines:B,stripFinalNewline:U,fdNumber:X});UH({serializedResult:C,fdNumber:X,state:Z,verboseInfo:Q,encoding:H,stdioItems:R,objectMode:L});let m=G[X]?A:void 0;try{if(Z.error===void 0)WH(C,R,q);return m}catch(j){return Z.error=j,m}},BH=($,J,X,Z)=>{try{return x4($,J,X,!1)}catch(q){return Z.error=q,$}},KH=({chunks:$,objectMode:J,encoding:X,lines:Z,stripFinalNewline:q,fdNumber:Y})=>{if(J)return{serializedResult:$};if(X==="buffer")return{serializedResult:Q$($)};let Q=L6($,X);if(Z[Y])return{serializedResult:Q,finalResult:t2(Q,!q[Y],J)};return{serializedResult:Q}},UH=({serializedResult:$,fdNumber:J,state:X,verboseInfo:Z,encoding:q,stdioItems:Y,objectMode:Q})=>{if(!j4({stdioItems:Y,encoding:q,verboseInfo:Z,fdNumber:J}))return;let G=t2($,!1,Q);try{s5(G,J,Z)}catch(H){X.error??=H}},WH=($,J,X)=>{for(let{path:Z,append:q}of J.filter(({type:Y})=>T4.has(Y))){let Y=typeof Z==="string"?Z:Z.toString();if(q||X.has(Y))HH(Z,$);else X.add(Y),GH(Z,$)}};var JJ=([,$,J],X)=>{if(!X.all)return;if($===void 0)return J;if(J===void 0)return $;if(Array.isArray($))return Array.isArray(J)?[...$,...J]:[...$,r0(J,X,"all")];if(Array.isArray(J))return[r0($,X,"all"),...J];if(z0($)&&z0(J))return Z2([$,J]);return`${$}${J}`};import{once as s2}from"node:events";var XJ=async($,J)=>{let[X,Z]=await VH($);return J.isForcefullyTerminated??=!1,[X,Z]},VH=async($)=>{let[J,X]=await Promise.allSettled([s2($,"spawn"),s2($,"exit")]);if(J.status==="rejected")return[];return X.status==="rejected"?ZJ($):X.value},ZJ=async($)=>{try{return await s2($,"exit")}catch{return ZJ($)}},QJ=async($)=>{let[J,X]=await $;if(!LH(J,X)&&e2(J,X))throw new y0;return[J,X]},LH=($,J)=>$===void 0&&J===void 0,e2=($,J)=>$!==0||J!==null;var qJ=({error:$,status:J,signal:X,output:Z},{maxBuffer:q})=>{let Y=_H($,J,X),Q=Y?.code==="ETIMEDOUT",G=$5(Y,Z,q);return{resultError:Y,exitCode:J,signal:X,timedOut:Q,isMaxBuffer:G}},_H=($,J,X)=>{if($!==void 0)return $;return e2(J,X)?new y0:void 0};var YJ=($,J,X)=>{let{file:Z,commandArguments:q,command:Y,escapedCommand:Q,startTime:G,verboseInfo:H,options:B,fileDescriptors:U}=TH($,J,X),K=MH({file:Z,commandArguments:q,options:B,command:Y,escapedCommand:Q,verboseInfo:H,fileDescriptors:U,startTime:G});return l1(K,H,B)},TH=($,J,X)=>{let{command:Z,escapedCommand:q,startTime:Y,verboseInfo:Q}=k$($,J,X),G=PH(X),{file:H,commandArguments:B,options:U}=q4($,J,G);FH(U);let K=k5(U,Q);return{file:H,commandArguments:B,command:Z,escapedCommand:q,startTime:Y,verboseInfo:Q,options:U,fileDescriptors:K}},PH=($)=>$.node&&!$.ipc?{...$,ipc:!1}:$,FH=({ipc:$,ipcInput:J,detached:X,cancelSignal:Z})=>{if(J)I4("ipcInput");if($)I4("ipc: true");if(X)I4("detached: true");if(Z)I4("cancelSignal")},I4=($)=>{throw TypeError(`The "${$}" option cannot be used with synchronous methods.`)},MH=({file:$,commandArguments:J,options:X,command:Z,escapedCommand:q,verboseInfo:Y,fileDescriptors:Q,startTime:G})=>{let H=CH({file:$,commandArguments:J,options:X,command:Z,escapedCommand:q,fileDescriptors:Q,startTime:G});if(H.failed)return H;let{resultError:B,exitCode:U,signal:K,timedOut:W,isMaxBuffer:P}=qJ(H,X),{output:R,error:L=B}=$J({fileDescriptors:Q,syncResult:H,options:X,isMaxBuffer:P,verboseInfo:Y}),M=R.map((A,m)=>r0(A,X,m)),C=r0(JJ(R,X),X,"all");return jH({error:L,exitCode:U,signal:K,timedOut:W,isMaxBuffer:P,stdio:M,all:C,options:X,command:Z,escapedCommand:q,startTime:G})},CH=({file:$,commandArguments:J,options:X,command:Z,escapedCommand:q,fileDescriptors:Y,startTime:Q})=>{try{a5(Y,X);let G=xH(X);return RH(...Y4($,J,G))}catch(G){return d1({error:G,command:Z,escapedCommand:q,fileDescriptors:Y,options:X,startTime:Q,isSync:!0})}},xH=({encoding:$,maxBuffer:J,...X})=>({...X,encoding:"buffer",maxBuffer:V4(J)}),jH=({error:$,exitCode:J,signal:X,timedOut:Z,isMaxBuffer:q,stdio:Y,all:Q,options:G,command:H,escapedCommand:B,startTime:U})=>$===void 0?L4({command:H,escapedCommand:B,stdio:Y,all:Q,ipcOutput:[],options:G,startTime:U}):K$({error:$,command:H,escapedCommand:B,timedOut:Z,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:q,isForcefullyTerminated:!1,exitCode:J,signal:X,stdio:Y,all:Q,ipcOutput:[],options:G,startTime:U,isSync:!0});import{setMaxListeners as KB}from"node:events";import{spawn as UB}from"node:child_process";import KJ from"node:process";import{once as $3,on as IH}from"node:events";var GJ=({anyProcess:$,channel:J,isSubprocess:X,ipc:Z},{reference:q=!0,filter:Y}={})=>{return g1({methodName:"getOneMessage",isSubprocess:X,ipc:Z,isConnected:e$($)}),wH({anyProcess:$,channel:J,isSubprocess:X,filter:Y,reference:q})},wH=async({anyProcess:$,channel:J,isSubprocess:X,filter:Z,reference:q})=>{o$(J,q);let Y=X1($,J,X),Q=new AbortController;try{return await Promise.race([OH(Y,Z,Q),EH(Y,X,Q),hH(Y,X,Q)])}catch(G){throw c1($),G}finally{Q.abort(),a$(J,q)}},OH=async($,J,{signal:X})=>{if(J===void 0){let[Z]=await $3($,"message",{signal:X});return Z}for await(let[Z]of IH($,"message",{signal:X}))if(J(Z))return Z},EH=async($,J,{signal:X})=>{await $3($,"disconnect",{signal:X}),n8(J)},hH=async($,J,{signal:X})=>{let[Z]=await $3($,"strict:error",{signal:X});throw n$(Z,J)};import{once as zJ,on as AH}from"node:events";var BJ=({anyProcess:$,channel:J,isSubprocess:X,ipc:Z},{reference:q=!0}={})=>J3({anyProcess:$,channel:J,isSubprocess:X,ipc:Z,shouldAwait:!X,reference:q}),J3=({anyProcess:$,channel:J,isSubprocess:X,ipc:Z,shouldAwait:q,reference:Y})=>{g1({methodName:"getEachMessage",isSubprocess:X,ipc:Z,isConnected:e$($)}),o$(J,Y);let Q=X1($,J,X),G=new AbortController,H={};return NH($,Q,G),DH({ipcEmitter:Q,isSubprocess:X,controller:G,state:H}),SH({anyProcess:$,channel:J,ipcEmitter:Q,isSubprocess:X,shouldAwait:q,controller:G,state:H,reference:Y})},NH=async($,J,X)=>{try{await zJ(J,"disconnect",{signal:X.signal}),X.abort()}catch{}},DH=async({ipcEmitter:$,isSubprocess:J,controller:X,state:Z})=>{try{let[q]=await zJ($,"strict:error",{signal:X.signal});Z.error=n$(q,J),X.abort()}catch{}},SH=async function*({anyProcess:$,channel:J,ipcEmitter:X,isSubprocess:Z,shouldAwait:q,controller:Y,state:Q,reference:G}){try{for await(let[H]of AH(X,"message",{signal:Y.signal}))HJ(Q),yield H}catch{HJ(Q)}finally{if(Y.abort(),a$(J,G),!Z)c1($);if(q)await $}},HJ=({error:$})=>{if($)throw $};var UJ=($,{ipc:J})=>{Object.assign($,VJ($,!1,J))},WJ=()=>{let $=KJ,J=!0,X=KJ.channel!==void 0;return{...VJ($,!0,X),getCancelSignal:P7.bind(void 0,{anyProcess:$,channel:$.channel,isSubprocess:!0,ipc:X})}},VJ=($,J,X)=>({sendMessage:Z4.bind(void 0,{anyProcess:$,channel:$.channel,isSubprocess:J,ipc:X}),getOneMessage:GJ.bind(void 0,{anyProcess:$,channel:$.channel,isSubprocess:J,ipc:X}),getEachMessage:BJ.bind(void 0,{anyProcess:$,channel:$.channel,isSubprocess:J,ipc:X})});import{ChildProcess as fH}from"node:child_process";import{PassThrough as vH,Readable as kH,Writable as bH,Duplex as yH}from"node:stream";var LJ=({error:$,command:J,escapedCommand:X,fileDescriptors:Z,options:q,startTime:Y,verboseInfo:Q})=>{l2(Z);let G=new fH;gH(G,Z),Object.assign(G,{readable:cH,writable:uH,duplex:mH});let H=d1({error:$,command:J,escapedCommand:X,fileDescriptors:Z,options:q,startTime:Y,isSync:!1}),B=pH(H,Q,q);return{subprocess:G,promise:B}},gH=($,J)=>{let X=W$(),Z=W$(),q=W$(),Y=Array.from({length:J.length-3},W$),Q=W$(),G=[X,Z,q,...Y];Object.assign($,{stdin:X,stdout:Z,stderr:q,all:Q,stdio:G})},W$=()=>{let $=new vH;return $.end(),$},cH=()=>new kH({read(){}}),uH=()=>new bH({write(){}}),mH=()=>new yH({read(){},write(){}}),pH=async($,J,X)=>l1($,J,X);import{createReadStream as _J,createWriteStream as RJ}from"node:fs";import{Buffer as dH}from"node:buffer";import{Readable as V$,Writable as lH,Duplex as nH}from"node:stream";var PJ=($,J)=>P4(iH,$,J,!1),L$=({type:$,optionName:J})=>{throw TypeError(`The \`${J}\` option cannot be ${Z1[$]}.`)},TJ={fileNumber:L$,generator:r2,asyncGenerator:r2,nodeStream:({value:$})=>({stream:$}),webTransform({value:{transform:$,writableObjectMode:J,readableObjectMode:X}}){let Z=J||X;return{stream:nH.fromWeb($,{objectMode:Z})}},duplex:({value:{transform:$}})=>({stream:$}),native(){}},iH={input:{...TJ,fileUrl:({value:$})=>({stream:_J($)}),filePath:({value:{file:$}})=>({stream:_J($)}),webStream:({value:$})=>({stream:V$.fromWeb($)}),iterable:({value:$})=>({stream:V$.from($)}),asyncIterable:({value:$})=>({stream:V$.from($)}),string:({value:$})=>({stream:V$.from($)}),uint8Array:({value:$})=>({stream:V$.from(dH.from($))})},output:{...TJ,fileUrl:({value:$})=>({stream:RJ($)}),filePath:({value:{file:$,append:J}})=>({stream:RJ($,J?{flags:"a"}:{})}),webStream:({value:$})=>({stream:lH.fromWeb($)}),iterable:L$,asyncIterable:L$,string:L$,uint8Array:L$}};import{on as tH,once as FJ}from"node:events";import{PassThrough as oH,getDefaultHighWaterMark as aH}from"node:stream";import{finished as xJ}from"node:stream/promises";function T1($){if(!Array.isArray($))throw TypeError(`Expected an array, got \`${typeof $}\`.`);for(let q of $)X3(q);let J=$.some(({readableObjectMode:q})=>q),X=rH($,J),Z=new jJ({objectMode:J,writableHighWaterMark:X,readableHighWaterMark:X});for(let q of $)Z.add(q);return Z}var rH=($,J)=>{if($.length===0)return aH(J);let X=$.filter(({readableObjectMode:Z})=>Z===J).map(({readableHighWaterMark:Z})=>Z);return Math.max(...X)};class jJ extends oH{#J=new Set([]);#X=new Set([]);#$=new Set([]);#Z;#q=Symbol("unpipe");#Q=new WeakMap;add($){if(X3($),this.#J.has($))return;this.#J.add($),this.#Z??=sH(this,this.#J,this.#q);let J=Jz({passThroughStream:this,stream:$,streams:this.#J,ended:this.#X,aborted:this.#$,onFinished:this.#Z,unpipeEvent:this.#q});this.#Q.set($,J),$.pipe(this,{end:!1})}async remove($){if(X3($),!this.#J.has($))return!1;let J=this.#Q.get($);if(J===void 0)return!1;return this.#Q.delete($),$.unpipe(this),await J,!0}}var sH=async($,J,X)=>{w4($,MJ);let Z=new AbortController;try{await Promise.race([eH($,Z),$z($,J,X,Z)])}finally{Z.abort(),w4($,-MJ)}},eH=async($,{signal:J})=>{try{await xJ($,{signal:J,cleanup:!0})}catch(X){throw IJ($,X),X}},$z=async($,J,X,{signal:Z})=>{for await(let[q]of tH($,"unpipe",{signal:Z}))if(J.has(q))q.emit(X)},X3=($)=>{if(typeof $?.pipe!=="function")throw TypeError(`Expected a readable stream, got: \`${typeof $}\`.`)},Jz=async({passThroughStream:$,stream:J,streams:X,ended:Z,aborted:q,onFinished:Y,unpipeEvent:Q})=>{w4($,CJ);let G=new AbortController;try{await Promise.race([Xz(Y,J,G),Zz({passThroughStream:$,stream:J,streams:X,ended:Z,aborted:q,controller:G}),Qz({stream:J,streams:X,ended:Z,aborted:q,unpipeEvent:Q,controller:G})])}finally{G.abort(),w4($,-CJ)}if(X.size>0&&X.size===Z.size+q.size)if(Z.size===0&&q.size>0)Z3($);else qz($)},Xz=async($,J,{signal:X})=>{try{if(await $,!X.aborted)Z3(J)}catch(Z){if(!X.aborted)IJ(J,Z)}},Zz=async({passThroughStream:$,stream:J,streams:X,ended:Z,aborted:q,controller:{signal:Y}})=>{try{if(await xJ(J,{signal:Y,cleanup:!0,readable:!0,writable:!1}),X.has(J))Z.add(J)}catch(Q){if(Y.aborted||!X.has(J))return;if(wJ(Q))q.add(J);else OJ($,Q)}},Qz=async({stream:$,streams:J,ended:X,aborted:Z,unpipeEvent:q,controller:{signal:Y}})=>{if(await FJ($,q,{signal:Y}),!$.readable)return FJ(Y,"abort",{signal:Y});J.delete($),X.delete($),Z.delete($)},qz=($)=>{if($.writable)$.end()},IJ=($,J)=>{if(wJ(J))Z3($);else OJ($,J)},wJ=($)=>$?.code==="ERR_STREAM_PREMATURE_CLOSE",Z3=($)=>{if($.readable||$.writable)$.destroy()},OJ=($,J)=>{if(!$.destroyed)$.once("error",Yz),$.destroy(J)},Yz=()=>{},w4=($,J)=>{let X=$.getMaxListeners();if(X!==0&&X!==Number.POSITIVE_INFINITY)$.setMaxListeners(X+J)},MJ=2,CJ=1;import{finished as EJ}from"node:stream/promises";var i1=($,J)=>{$.pipe(J),Gz($,J),Hz($,J)},Gz=async($,J)=>{if(D0($)||D0(J))return;try{await EJ($,{cleanup:!0,readable:!0,writable:!1})}catch{}Q3(J)},Q3=($)=>{if($.writable)$.end()},Hz=async($,J)=>{if(D0($)||D0(J))return;try{await EJ(J,{cleanup:!0,readable:!1,writable:!0})}catch{}q3($)},q3=($)=>{if($.readable)$.destroy()};var hJ=($,J,X)=>{let Z=new Map;for(let[q,{stdioItems:Y,direction:Q}]of Object.entries(J)){for(let{stream:G}of Y.filter(({type:H})=>I0.has(H)))zz($,G,Q,q);for(let{stream:G}of Y.filter(({type:H})=>!I0.has(H)))Kz({subprocess:$,stream:G,direction:Q,fdNumber:q,pipeGroups:Z,controller:X})}for(let[q,Y]of Z.entries()){let Q=Y.length===1?Y[0]:T1(Y);i1(Q,q)}},zz=($,J,X,Z)=>{if(X==="output")i1($.stdio[Z],J);else i1(J,$.stdio[Z]);let q=Bz[Z];if(q!==void 0)$[q]=J;$.stdio[Z]=J},Bz=["stdin","stdout","stderr"],Kz=({subprocess:$,stream:J,direction:X,fdNumber:Z,pipeGroups:q,controller:Y})=>{if(J===void 0)return;Uz(J,Y);let[Q,G]=X==="output"?[J,$.stdio[Z]]:[$.stdio[Z],J],H=q.get(Q)??[];q.set(Q,[...H,G])},Uz=($,{signal:J})=>{if(D0($))V1($,Wz,J)},Wz=2;import{addAbortListener as _z}from"node:events";var P1=[];P1.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")P1.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")P1.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var O4=($)=>!!$&&typeof $==="object"&&typeof $.removeListener==="function"&&typeof $.emit==="function"&&typeof $.reallyExit==="function"&&typeof $.listeners==="function"&&typeof $.kill==="function"&&typeof $.pid==="number"&&typeof $.on==="function",Y3=Symbol.for("signal-exit emitter"),G3=globalThis,Vz=Object.defineProperty.bind(Object);class AJ{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(G3[Y3])return G3[Y3];Vz(G3,Y3,{value:this,writable:!1,enumerable:!1,configurable:!1})}on($,J){this.listeners[$].push(J)}removeListener($,J){let X=this.listeners[$],Z=X.indexOf(J);if(Z===-1)return;if(Z===0&&X.length===1)X.length=0;else X.splice(Z,1)}emit($,J,X){if(this.emitted[$])return!1;this.emitted[$]=!0;let Z=!1;for(let q of this.listeners[$])Z=q(J,X)===!0||Z;if($==="exit")Z=this.emit("afterExit",J,X)||Z;return Z}}class z3{}var Lz=($)=>{return{onExit(J,X){return $.onExit(J,X)},load(){return $.load()},unload(){return $.unload()}}};class NJ extends z3{onExit(){return()=>{}}load(){}unload(){}}class DJ extends z3{#J=H3.platform==="win32"?"SIGINT":"SIGHUP";#X=new AJ;#$;#Z;#q;#Q={};#Y=!1;constructor($){super();this.#$=$,this.#Q={};for(let J of P1)this.#Q[J]=()=>{let X=this.#$.listeners(J),{count:Z}=this.#X,q=$;if(typeof q.__signal_exit_emitter__==="object"&&typeof q.__signal_exit_emitter__.count==="number")Z+=q.__signal_exit_emitter__.count;if(X.length===Z){this.unload();let Y=this.#X.emit("exit",null,J),Q=J==="SIGHUP"?this.#J:J;if(!Y)$.kill($.pid,Q)}};this.#q=$.reallyExit,this.#Z=$.emit}onExit($,J){if(!O4(this.#$))return()=>{};if(this.#Y===!1)this.load();let X=J?.alwaysLast?"afterExit":"exit";return this.#X.on(X,$),()=>{if(this.#X.removeListener(X,$),this.#X.listeners.exit.length===0&&this.#X.listeners.afterExit.length===0)this.unload()}}load(){if(this.#Y)return;this.#Y=!0,this.#X.count+=1;for(let $ of P1)try{let J=this.#Q[$];if(J)this.#$.on($,J)}catch(J){}this.#$.emit=($,...J)=>{return this.#H($,...J)},this.#$.reallyExit=($)=>{return this.#G($)}}unload(){if(!this.#Y)return;this.#Y=!1,P1.forEach(($)=>{let J=this.#Q[$];if(!J)throw Error("Listener not defined for signal: "+$);try{this.#$.removeListener($,J)}catch(X){}}),this.#$.emit=this.#Z,this.#$.reallyExit=this.#q,this.#X.count-=1}#G($){if(!O4(this.#$))return 0;return this.#$.exitCode=$||0,this.#X.emit("exit",this.#$.exitCode,null),this.#q.call(this.#$,this.#$.exitCode)}#H($,...J){let X=this.#Z;if($==="exit"&&O4(this.#$)){if(typeof J[0]==="number")this.#$.exitCode=J[0];let Z=X.call(this.#$,$,...J);return this.#X.emit("exit",this.#$.exitCode,null),Z}else return X.call(this.#$,$,...J)}}var H3=globalThis.process,{onExit:SJ,load:zF,unload:BF}=Lz(O4(H3)?new DJ(H3):new NJ);var fJ=($,{cleanup:J,detached:X},{signal:Z})=>{if(!J||X)return;let q=SJ(()=>{$.kill()});_z(Z,()=>{q()})};var kJ=({source:$,sourcePromise:J,boundOptions:X,createNested:Z},...q)=>{let Y=v$(),{destination:Q,destinationStream:G,destinationError:H,from:B,unpipeSignal:U}=Rz(X,Z,q),{sourceStream:K,sourceError:W}=Pz($,B),{options:P,fileDescriptors:R}=c0.get($);return{sourcePromise:J,sourceStream:K,sourceOptions:P,sourceError:W,destination:Q,destinationStream:G,destinationError:H,unpipeSignal:U,fileDescriptors:R,startTime:Y}},Rz=($,J,X)=>{try{let{destination:Z,pipeOptions:{from:q,to:Y,unpipeSignal:Q}={}}=Tz($,J,...X),G=t$(Z,Y);return{destination:Z,destinationStream:G,from:q,unpipeSignal:Q}}catch(Z){return{destinationError:Z}}},Tz=($,J,X,...Z)=>{if(Array.isArray(X))return{destination:J(vJ,$)(X,...Z),pipeOptions:$};if(typeof X==="string"||X instanceof URL||J2(X)){if(Object.keys($).length>0)throw TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[q,Y,Q]=I$(X,...Z);return{destination:J(vJ)(q,Y,Q),pipeOptions:Q}}if(c0.has(X)){if(Object.keys($).length>0)throw TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:X,pipeOptions:Z[0]}}throw TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${X}`)},vJ=({options:$})=>({options:{...$,stdin:"pipe",piped:!0}}),Pz=($,J)=>{try{return{sourceStream:u1($,J)}}catch(X){return{sourceError:X}}};var yJ=({sourceStream:$,sourceError:J,destinationStream:X,destinationError:Z,fileDescriptors:q,sourceOptions:Y,startTime:Q})=>{let G=Fz({sourceStream:$,sourceError:J,destinationStream:X,destinationError:Z});if(G!==void 0)throw B3({error:G,fileDescriptors:q,sourceOptions:Y,startTime:Q})},Fz=({sourceStream:$,sourceError:J,destinationStream:X,destinationError:Z})=>{if(J!==void 0&&Z!==void 0)return Z;if(Z!==void 0)return q3($),Z;if(J!==void 0)return Q3(X),J},B3=({error:$,fileDescriptors:J,sourceOptions:X,startTime:Z})=>d1({error:$,command:bJ,escapedCommand:bJ,fileDescriptors:J,options:X,startTime:Z,isSync:!1}),bJ="source.pipe(destination)";var gJ=async($)=>{let[{status:J,reason:X,value:Z=X},{status:q,reason:Y,value:Q=Y}]=await $;if(!Q.pipedFrom.includes(Z))Q.pipedFrom.push(Z);if(q==="rejected")throw Q;if(J==="rejected")throw Z;return Q};import{finished as Mz}from"node:stream/promises";var cJ=($,J,X)=>{let Z=E4.has(J)?xz($,J):Cz($,J);return V1($,Iz,X.signal),V1(J,wz,X.signal),jz(J),Z},Cz=($,J)=>{let X=T1([$]);return i1(X,J),E4.set(J,X),X},xz=($,J)=>{let X=E4.get(J);return X.add($),X},jz=async($)=>{try{await Mz($,{cleanup:!0,readable:!1,writable:!0})}catch{}E4.delete($)},E4=new WeakMap,Iz=2,wz=1;import{aborted as Oz}from"node:util";var uJ=($,J)=>$===void 0?[]:[Ez($,J)],Ez=async($,{sourceStream:J,mergedStream:X,fileDescriptors:Z,sourceOptions:q,startTime:Y})=>{await Oz($,J),await X.remove(J);let Q=Error("Pipe canceled by `unpipeSignal` option.");throw B3({error:Q,fileDescriptors:Z,sourceOptions:q,startTime:Y})};var h4=($,...J)=>{if(X0(J[0]))return h4.bind(void 0,{...$,boundOptions:{...$.boundOptions,...J[0]}});let{destination:X,...Z}=kJ($,...J),q=hz({...Z,destination:X});return q.pipe=h4.bind(void 0,{...$,source:X,sourcePromise:q,boundOptions:{}}),q},hz=async({sourcePromise:$,sourceStream:J,sourceOptions:X,sourceError:Z,destination:q,destinationStream:Y,destinationError:Q,unpipeSignal:G,fileDescriptors:H,startTime:B})=>{let U=Az($,q);yJ({sourceStream:J,sourceError:Z,destinationStream:Y,destinationError:Q,fileDescriptors:H,sourceOptions:X,startTime:B});let K=new AbortController;try{let W=cJ(J,Y,K);return await Promise.race([gJ(U),...uJ(G,{sourceStream:J,mergedStream:W,sourceOptions:X,fileDescriptors:H,startTime:B})])}finally{K.abort()}},Az=($,J)=>Promise.allSettled([$,J]);import{setImmediate as bz}from"node:timers/promises";import{on as Nz}from"node:events";import{getDefaultHighWaterMark as Dz}from"node:stream";var A4=({subprocessStdout:$,subprocess:J,binary:X,shouldEncode:Z,encoding:q,preserveNewlines:Y})=>{let Q=new AbortController;return Sz(J,Q),pJ({stream:$,controller:Q,binary:X,shouldEncode:!$.readableObjectMode&&Z,encoding:q,shouldSplit:!$.readableObjectMode,preserveNewlines:Y})},Sz=async($,J)=>{try{await $}catch{}finally{J.abort()}},K3=({stream:$,onStreamEnd:J,lines:X,encoding:Z,stripFinalNewline:q,allMixed:Y})=>{let Q=new AbortController;fz(J,Q,$);let G=$.readableObjectMode&&!Y;return pJ({stream:$,controller:Q,binary:Z==="buffer",shouldEncode:!G,encoding:Z,shouldSplit:!G&&X,preserveNewlines:!q})},fz=async($,J,X)=>{try{await $}catch{X.destroy()}finally{J.abort()}},pJ=({stream:$,controller:J,binary:X,shouldEncode:Z,encoding:q,shouldSplit:Y,preserveNewlines:Q})=>{let G=Nz($,"data",{signal:J.signal,highWaterMark:mJ,highWatermark:mJ});return vz({onStdoutChunk:G,controller:J,binary:X,shouldEncode:Z,encoding:q,shouldSplit:Y,preserveNewlines:Q})},U3=Dz(!0),mJ=U3,vz=async function*({onStdoutChunk:$,controller:J,binary:X,shouldEncode:Z,encoding:q,shouldSplit:Y,preserveNewlines:Q}){let G=kz({binary:X,shouldEncode:Z,encoding:q,shouldSplit:Y,preserveNewlines:Q});try{for await(let[H]of $)yield*R1(H,G,0)}catch(H){if(!J.signal.aborted)throw H}finally{yield*U$(G)}},kz=({binary:$,shouldEncode:J,encoding:X,shouldSplit:Z,preserveNewlines:q})=>[M4($,X,!J),F4($,q,!Z,{})].filter(Boolean);var dJ=async({stream:$,onStreamEnd:J,fdNumber:X,encoding:Z,buffer:q,maxBuffer:Y,lines:Q,allMixed:G,stripFinalNewline:H,verboseInfo:B,streamInfo:U})=>{let K=yz({stream:$,onStreamEnd:J,fdNumber:X,encoding:Z,allMixed:G,verboseInfo:B,streamInfo:U});if(!q){await Promise.all([gz($),K]);return}let W=n2(H,X),P=K3({stream:$,onStreamEnd:J,lines:Q,encoding:Z,stripFinalNewline:W,allMixed:G}),[R]=await Promise.all([cz({stream:$,iterable:P,fdNumber:X,encoding:Z,maxBuffer:Y,lines:Q}),K]);return R},yz=async({stream:$,onStreamEnd:J,fdNumber:X,encoding:Z,allMixed:q,verboseInfo:Y,streamInfo:{fileDescriptors:Q}})=>{if(!j4({stdioItems:Q[X]?.stdioItems,encoding:Z,verboseInfo:Y,fdNumber:X}))return;let G=K3({stream:$,onStreamEnd:J,lines:!0,encoding:Z,stripFinalNewline:!0,allMixed:q});await r5(G,$,X,Y)},gz=async($)=>{if(await bz(),$.readableFlowing===null)$.resume()},cz=async({stream:$,stream:{readableObjectMode:J},iterable:X,fdNumber:Z,encoding:q,maxBuffer:Y,lines:Q})=>{try{if(J||Q)return await B4(X,{maxBuffer:Y});if(q==="buffer")return new Uint8Array(await K4(X,{maxBuffer:Y}));return await W4(X,{maxBuffer:Y})}catch(G){return lJ(r7({error:G,stream:$,readableObjectMode:J,lines:Q,encoding:q,fdNumber:Z}))}},W3=async($)=>{try{return await $}catch(J){return lJ(J)}},lJ=({bufferedData:$})=>W6($)?new Uint8Array($):$;import{finished as uz}from"node:stream/promises";var _$=async($,J,X,{isSameDirection:Z,stopOnExit:q=!1}={})=>{let Y=mz($,X),Q=new AbortController;try{await Promise.race([...q?[X.exitPromise]:[],uz($,{cleanup:!0,signal:Q.signal})])}catch(G){if(!Y.stdinCleanedUp)lz(G,J,X,Z)}finally{Q.abort()}},mz=($,{originalStreams:[J],subprocess:X})=>{let Z={stdinCleanedUp:!1};if($===J)pz($,X,Z);return Z},pz=($,J,X)=>{let{_destroy:Z}=$;$._destroy=(...q)=>{dz(J,X),Z.call($,...q)}},dz=({exitCode:$,signalCode:J},X)=>{if($!==null||J!==null)X.stdinCleanedUp=!0},lz=($,J,X,Z)=>{if(!nz($,J,X,Z))throw $},nz=($,J,X,Z=!0)=>{if(X.propagating)return nJ($)||N4($);return X.propagating=!0,V3(X,J)===Z?nJ($):N4($)},V3=({fileDescriptors:$},J)=>J!=="all"&&$[J].direction==="input",N4=($)=>$?.code==="ERR_STREAM_PREMATURE_CLOSE",nJ=($)=>$?.code==="EPIPE";var iJ=({subprocess:$,encoding:J,buffer:X,maxBuffer:Z,lines:q,stripFinalNewline:Y,verboseInfo:Q,streamInfo:G})=>$.stdio.map((H,B)=>L3({stream:H,fdNumber:B,encoding:J,buffer:X[B],maxBuffer:Z[B],lines:q[B],allMixed:!1,stripFinalNewline:Y,verboseInfo:Q,streamInfo:G})),L3=async({stream:$,fdNumber:J,encoding:X,buffer:Z,maxBuffer:q,lines:Y,allMixed:Q,stripFinalNewline:G,verboseInfo:H,streamInfo:B})=>{if(!$)return;let U=_$($,J,B);if(V3(B,J)){await U;return}let[K]=await Promise.all([dJ({stream:$,onStreamEnd:U,fdNumber:J,encoding:X,buffer:Z,maxBuffer:q,lines:Y,allMixed:Q,stripFinalNewline:G,verboseInfo:H,streamInfo:B}),U]);return K};var tJ=({stdout:$,stderr:J},{all:X})=>X&&($||J)?T1([$,J].filter(Boolean)):void 0,oJ=({subprocess:$,encoding:J,buffer:X,maxBuffer:Z,lines:q,stripFinalNewline:Y,verboseInfo:Q,streamInfo:G})=>L3({...iz($,X),fdNumber:"all",encoding:J,maxBuffer:Z[1]+Z[2],lines:q[1]||q[2],allMixed:tz($),stripFinalNewline:Y,verboseInfo:Q,streamInfo:G}),iz=({stdout:$,stderr:J,all:X},[,Z,q])=>{let Y=Z||q;if(!Y)return{stream:X,buffer:Y};if(!Z)return{stream:J,buffer:Y};if(!q)return{stream:$,buffer:Y};return{stream:X,buffer:Y}},tz=({all:$,stdout:J,stderr:X})=>$&&J&&X&&J.readableObjectMode!==X.readableObjectMode;import{once as oz}from"node:events";var aJ=($)=>k1($,"ipc"),rJ=($,J)=>{let X=f$($);b0({type:"ipc",verboseMessage:X,fdNumber:"ipc",verboseInfo:J})};var sJ=async({subprocess:$,buffer:J,maxBuffer:X,ipc:Z,ipcOutput:q,verboseInfo:Y})=>{if(!Z)return q;let Q=aJ(Y),G=t0(J,"ipc"),H=t0(X,"ipc");for await(let B of J3({anyProcess:$,channel:$.channel,isSubprocess:!1,ipc:Z,shouldAwait:!1,reference:!0})){if(G)s7($,q,H),q.push(B);if(Q)rJ(B,Y)}return q},eJ=async($,J)=>{return await Promise.allSettled([$]),J};var $X=async({subprocess:$,options:{encoding:J,buffer:X,maxBuffer:Z,lines:q,timeoutDuration:Y,cancelSignal:Q,gracefulCancel:G,forceKillAfterDelay:H,stripFinalNewline:B,ipc:U,ipcInput:K},context:W,verboseInfo:P,fileDescriptors:R,originalStreams:L,onInternalError:M,controller:C})=>{let A=XJ($,W),m={originalStreams:L,fileDescriptors:R,subprocess:$,exitPromise:A,propagating:!1},j=iJ({subprocess:$,encoding:J,buffer:X,maxBuffer:Z,lines:q,stripFinalNewline:B,verboseInfo:P,streamInfo:m}),l=oJ({subprocess:$,encoding:J,buffer:X,maxBuffer:Z,lines:q,stripFinalNewline:B,verboseInfo:P,streamInfo:m}),n=[],t=sJ({subprocess:$,buffer:X,maxBuffer:Z,ipc:U,ipcOutput:n,verboseInfo:P}),L0=az(L,$,m),p=rz(R,m);try{return await Promise.race([Promise.all([{},QJ(A),Promise.all(j),l,t,h7($,K),...L0,...p]),M,sz($,C),...j7($,Y,W,C),...l8({subprocess:$,cancelSignal:Q,gracefulCancel:G,context:W,controller:C}),...C7({subprocess:$,cancelSignal:Q,gracefulCancel:G,forceKillAfterDelay:H,context:W,controller:C})])}catch(l0){return W.terminationReason??="other",Promise.all([{error:l0},A,Promise.all(j.map((O)=>W3(O))),W3(l),eJ(t,n),Promise.allSettled(L0),Promise.allSettled(p)])}},az=($,J,X)=>$.map((Z,q)=>Z===J.stdio[q]?void 0:_$(Z,q,X)),rz=($,J)=>$.flatMap(({stdioItems:X},Z)=>X.filter(({value:q,stream:Y=q})=>f0(Y,{checkOpen:!1})&&!D0(Y)).map(({type:q,value:Y,stream:Q=Y})=>_$(Q,Z,J,{isSameDirection:I0.has(q),stopOnExit:q==="native"}))),sz=async($,{signal:J})=>{let[X]=await oz($,"error",{signal:J});throw X};var JX=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),R$=($,J,X)=>{let Z=$[X];if(!Z.has(J))Z.set(J,[]);let q=Z.get(J),Y=g0();return q.push(Y),{resolve:Y.resolve.bind(Y),promises:q}},t1=async({resolve:$,promises:J},X)=>{$();let[Z]=await Promise.race([Promise.allSettled([!0,X]),Promise.all([!1,...J])]);return!Z};import{Readable as ez}from"node:stream";import{callbackify as $B}from"node:util";import{finished as XX}from"node:stream/promises";var _3=async($)=>{if($===void 0)return;try{await R3($)}catch{}},ZX=async($)=>{if($===void 0)return;try{await T3($)}catch{}},R3=async($)=>{await XX($,{cleanup:!0,readable:!1,writable:!0})},T3=async($)=>{await XX($,{cleanup:!0,readable:!0,writable:!1})},D4=async($,J)=>{if(await $,J)throw J},S4=($,J,X)=>{if(X&&!N4(X))$.destroy(X);else if(J)$.destroy()};var QX=({subprocess:$,concurrentStreams:J,encoding:X},{from:Z,binary:q=!0,preserveNewlines:Y=!0}={})=>{let Q=q||P0.has(X),{subprocessStdout:G,waitReadableDestroy:H}=P3($,Z,J),{readableEncoding:B,readableObjectMode:U,readableHighWaterMark:K}=F3(G,Q),{read:W,onStdoutDataDone:P}=M3({subprocessStdout:G,subprocess:$,binary:Q,encoding:X,preserveNewlines:Y}),R=new ez({read:W,destroy:$B(x3.bind(void 0,{subprocessStdout:G,subprocess:$,waitReadableDestroy:H})),highWaterMark:K,objectMode:U,encoding:B});return C3({subprocessStdout:G,onStdoutDataDone:P,readable:R,subprocess:$}),R},P3=($,J,X)=>{let Z=u1($,J),q=R$(X,Z,"readableDestroy");return{subprocessStdout:Z,waitReadableDestroy:q}},F3=({readableEncoding:$,readableObjectMode:J,readableHighWaterMark:X},Z)=>Z?{readableEncoding:$,readableObjectMode:J,readableHighWaterMark:X}:{readableEncoding:$,readableObjectMode:!0,readableHighWaterMark:U3},M3=({subprocessStdout:$,subprocess:J,binary:X,encoding:Z,preserveNewlines:q})=>{let Y=g0(),Q=A4({subprocessStdout:$,subprocess:J,binary:X,shouldEncode:!X,encoding:Z,preserveNewlines:q});return{read(){JB(this,Q,Y)},onStdoutDataDone:Y}},JB=async($,J,X)=>{try{let{value:Z,done:q}=await J.next();if(q)X.resolve();else $.push(Z)}catch{}},C3=async({subprocessStdout:$,onStdoutDataDone:J,readable:X,subprocess:Z,subprocessStdin:q})=>{try{if(await T3($),await Z,await _3(q),await J,X.readable)X.push(null)}catch(Y){await _3(q),qX(X,Y)}},x3=async({subprocessStdout:$,subprocess:J,waitReadableDestroy:X},Z)=>{if(await t1(X,J))qX($,Z),await D4(J,Z)},qX=($,J)=>{S4($,$.readable,J)};import{Writable as XB}from"node:stream";import{callbackify as YX}from"node:util";var GX=({subprocess:$,concurrentStreams:J},{to:X}={})=>{let{subprocessStdin:Z,waitWritableFinal:q,waitWritableDestroy:Y}=j3($,X,J),Q=new XB({...I3(Z,$,q),destroy:YX(O3.bind(void 0,{subprocessStdin:Z,subprocess:$,waitWritableFinal:q,waitWritableDestroy:Y})),highWaterMark:Z.writableHighWaterMark,objectMode:Z.writableObjectMode});return w3(Z,Q),Q},j3=($,J,X)=>{let Z=t$($,J),q=R$(X,Z,"writableFinal"),Y=R$(X,Z,"writableDestroy");return{subprocessStdin:Z,waitWritableFinal:q,waitWritableDestroy:Y}},I3=($,J,X)=>({write:ZB.bind(void 0,$),final:YX(QB.bind(void 0,$,J,X))}),ZB=($,J,X,Z)=>{if($.write(J,X))Z();else $.once("drain",Z)},QB=async($,J,X)=>{if(await t1(X,J)){if($.writable)$.end();await J}},w3=async($,J,X)=>{try{if(await R3($),J.writable)J.end()}catch(Z){await ZX(X),HX(J,Z)}},O3=async({subprocessStdin:$,subprocess:J,waitWritableFinal:X,waitWritableDestroy:Z},q)=>{if(await t1(X,J),await t1(Z,J))HX($,q),await D4(J,q)},HX=($,J)=>{S4($,$.writable,J)};import{Duplex as qB}from"node:stream";import{callbackify as YB}from"node:util";var zX=({subprocess:$,concurrentStreams:J,encoding:X},{from:Z,to:q,binary:Y=!0,preserveNewlines:Q=!0}={})=>{let G=Y||P0.has(X),{subprocessStdout:H,waitReadableDestroy:B}=P3($,Z,J),{subprocessStdin:U,waitWritableFinal:K,waitWritableDestroy:W}=j3($,q,J),{readableEncoding:P,readableObjectMode:R,readableHighWaterMark:L}=F3(H,G),{read:M,onStdoutDataDone:C}=M3({subprocessStdout:H,subprocess:$,binary:G,encoding:X,preserveNewlines:Q}),A=new qB({read:M,...I3(U,$,K),destroy:YB(GB.bind(void 0,{subprocessStdout:H,subprocessStdin:U,subprocess:$,waitReadableDestroy:B,waitWritableFinal:K,waitWritableDestroy:W})),readableHighWaterMark:L,writableHighWaterMark:U.writableHighWaterMark,readableObjectMode:R,writableObjectMode:U.writableObjectMode,encoding:P});return C3({subprocessStdout:H,onStdoutDataDone:C,readable:A,subprocess:$,subprocessStdin:U}),w3(U,A,H),A},GB=async({subprocessStdout:$,subprocessStdin:J,subprocess:X,waitReadableDestroy:Z,waitWritableFinal:q,waitWritableDestroy:Y},Q)=>{await Promise.all([x3({subprocessStdout:$,subprocess:X,waitReadableDestroy:Z},Q),O3({subprocessStdin:J,subprocess:X,waitWritableFinal:q,waitWritableDestroy:Y},Q)])};var E3=($,J,{from:X,binary:Z=!1,preserveNewlines:q=!1}={})=>{let Y=Z||P0.has(J),Q=u1($,X),G=A4({subprocessStdout:Q,subprocess:$,binary:Y,shouldEncode:!0,encoding:J,preserveNewlines:q});return HB(G,Q,$)},HB=async function*($,J,X){try{yield*$}finally{if(J.readable)J.destroy();await X}};var BX=($,{encoding:J})=>{let X=JX();$.readable=QX.bind(void 0,{subprocess:$,concurrentStreams:X,encoding:J}),$.writable=GX.bind(void 0,{subprocess:$,concurrentStreams:X}),$.duplex=zX.bind(void 0,{subprocess:$,concurrentStreams:X,encoding:J}),$.iterable=E3.bind(void 0,$,J),$[Symbol.asyncIterator]=E3.bind(void 0,$,J,{})};var KX=($,J)=>{for(let[X,Z]of BB){let q=Z.value.bind(J);Reflect.defineProperty($,X,{...Z,value:q})}},zB=(async()=>{})().constructor.prototype,BB=["then","catch","finally"].map(($)=>[$,Reflect.getOwnPropertyDescriptor(zB,$)]);var UX=($,J,X,Z)=>{let{file:q,commandArguments:Y,command:Q,escapedCommand:G,startTime:H,verboseInfo:B,options:U,fileDescriptors:K}=WB($,J,X),{subprocess:W,promise:P}=LB({file:q,commandArguments:Y,options:U,startTime:H,verboseInfo:B,command:Q,escapedCommand:G,fileDescriptors:K});return W.pipe=h4.bind(void 0,{source:W,sourcePromise:P,boundOptions:{},createNested:Z}),KX(W,P),c0.set(W,{options:U,fileDescriptors:K}),W},WB=($,J,X)=>{let{command:Z,escapedCommand:q,startTime:Y,verboseInfo:Q}=k$($,J,X),{file:G,commandArguments:H,options:B}=q4($,J,X),U=VB(B),K=PJ(U,Q);return{file:G,commandArguments:H,command:Z,escapedCommand:q,startTime:Y,verboseInfo:Q,options:U,fileDescriptors:K}},VB=({timeout:$,signal:J,...X})=>{if(J!==void 0)throw TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...X,timeoutDuration:$}},LB=({file:$,commandArguments:J,options:X,startTime:Z,verboseInfo:q,command:Y,escapedCommand:Q,fileDescriptors:G})=>{let H;try{H=UB(...Y4($,J,X))}catch(R){return LJ({error:R,command:Y,escapedCommand:Q,fileDescriptors:G,options:X,startTime:Z,verboseInfo:q})}let B=new AbortController;KB(Number.POSITIVE_INFINITY,B.signal);let U=[...H.stdio];hJ(H,G,B),fJ(H,X,B);let K={},W=g0();H.kill=p8.bind(void 0,{kill:H.kill.bind(H),options:X,onInternalError:W,context:K,controller:B}),H.all=tJ(H,X),BX(H,X),UJ(H,X);let P=_B({subprocess:H,options:X,startTime:Z,verboseInfo:q,fileDescriptors:G,originalStreams:U,command:Y,escapedCommand:Q,context:K,onInternalError:W,controller:B});return{subprocess:H,promise:P}},_B=async({subprocess:$,options:J,startTime:X,verboseInfo:Z,fileDescriptors:q,originalStreams:Y,command:Q,escapedCommand:G,context:H,onInternalError:B,controller:U})=>{let[K,[W,P],R,L,M]=await $X({subprocess:$,options:J,context:H,verboseInfo:Z,fileDescriptors:q,originalStreams:Y,onInternalError:B,controller:U});U.abort(),B.resolve();let C=R.map((j,l)=>r0(j,J,l)),A=r0(L,J,"all"),m=RB({errorInfo:K,exitCode:W,signal:P,stdio:C,all:A,ipcOutput:M,context:H,options:J,command:Q,escapedCommand:G,startTime:X});return l1(m,Z,J)},RB=({errorInfo:$,exitCode:J,signal:X,stdio:Z,all:q,ipcOutput:Y,context:Q,options:G,command:H,escapedCommand:B,startTime:U})=>("error"in $)?K$({error:$.error,command:H,escapedCommand:B,timedOut:Q.terminationReason==="timeout",isCanceled:Q.terminationReason==="cancel"||Q.terminationReason==="gracefulCancel",isGracefullyCanceled:Q.terminationReason==="gracefulCancel",isMaxBuffer:$.error instanceof o0,isForcefullyTerminated:Q.isForcefullyTerminated,exitCode:J,signal:X,stdio:Z,all:q,ipcOutput:Y,options:G,startTime:U,isSync:!1}):L4({command:H,escapedCommand:B,stdio:Z,all:q,ipcOutput:Y,options:G,startTime:U});var f4=($,J)=>{let X=Object.fromEntries(Object.entries(J).map(([Z,q])=>[Z,TB(Z,$[Z],q)]));return{...$,...X}},TB=($,J,X)=>{if(PB.has($)&&X0(J)&&X0(X))return{...J,...X};return X},PB=new Set(["env",...G2]);var Q1=($,J,X,Z)=>{let q=(Q,G,H)=>Q1(Q,G,X,H),Y=(...Q)=>FB({mapArguments:$,deepOptions:X,boundOptions:J,setBoundExeca:Z,createNested:q},...Q);if(Z!==void 0)Z(Y,q,J);return Y},FB=({mapArguments:$,deepOptions:J={},boundOptions:X={},setBoundExeca:Z,createNested:q},Y,...Q)=>{if(X0(Y))return q($,f4(X,Y),Z);let{file:G,commandArguments:H,options:B,isSync:U}=MB({mapArguments:$,firstArgument:Y,nextArguments:Q,deepOptions:J,boundOptions:X});return U?YJ(G,H,B):UX(G,H,B,q)},MB=({mapArguments:$,firstArgument:J,nextArguments:X,deepOptions:Z,boundOptions:q})=>{let Y=P6(J)?F6(J,X):[J,...X],[Q,G,H]=I$(...Y),B=f4(f4(Z,q),H),{file:U=Q,commandArguments:K=G,options:W=B,isSync:P=!1}=$({file:Q,commandArguments:G,options:B});return{file:U,commandArguments:K,options:W,isSync:P}};var WX=({file:$,commandArguments:J})=>LX($,J),VX=({file:$,commandArguments:J})=>({...LX($,J),isSync:!0}),LX=($,J)=>{if(J.length>0)throw TypeError(`The command and its arguments must be passed as a single string: ${$} ${J}.`);let[X,...Z]=CB($);return{file:X,commandArguments:Z}},CB=($)=>{if(typeof $!=="string")throw TypeError(`The command must be a string: ${String($)}.`);let J=$.trim();if(J==="")return[];let X=[];for(let Z of J.split(xB)){let q=X.at(-1);if(q&&q.endsWith("\\"))X[X.length-1]=`${q.slice(0,-1)} ${Z}`;else X.push(Z)}return X},xB=/ +/g;var _X=($,J,X)=>{$.sync=J(jB,X),$.s=$.sync},RX=({options:$})=>TX($),jB=({options:$})=>({...TX($),isSync:!0}),TX=($)=>({options:{...IB($),...$}}),IB=({input:$,inputFile:J,stdio:X})=>$===void 0&&J===void 0&&X===void 0?{stdin:"inherit"}:{},PX={preferLocal:!0};var FX=Q1(()=>({})),eC=Q1(()=>({isSync:!0})),$x=Q1(WX),Jx=Q1(VX),Xx=Q1(w7),Zx=Q1(RX,{},PX,_X),{sendMessage:Qx,getOneMessage:qx,getEachMessage:Yx,getCancelSignal:Gx}=WJ();var T$=Z$(A3(),1);import{stdin as NB,stdout as DB}from"node:process";import*as q1 from"node:readline";function SB({onlyFirst:$=!1}={}){let J=["[\\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(J,$?void 0:"g")}var Ux=SB();function OX($){return $&&$.__esModule&&Object.prototype.hasOwnProperty.call($,"default")?$.default:$}var EX={exports:{}};(function($){var J={};$.exports=J,J.eastAsianWidth=function(Z){var q=Z.charCodeAt(0),Y=Z.length==2?Z.charCodeAt(1):0,Q=q;return 55296<=q&&q<=56319&&56320<=Y&&Y<=57343&&(q&=1023,Y&=1023,Q=q<<10|Y,Q+=65536),Q==12288||65281<=Q&&Q<=65376||65504<=Q&&Q<=65510?"F":Q==8361||65377<=Q&&Q<=65470||65474<=Q&&Q<=65479||65482<=Q&&Q<=65487||65490<=Q&&Q<=65495||65498<=Q&&Q<=65500||65512<=Q&&Q<=65518?"H":4352<=Q&&Q<=4447||4515<=Q&&Q<=4519||4602<=Q&&Q<=4607||9001<=Q&&Q<=9002||11904<=Q&&Q<=11929||11931<=Q&&Q<=12019||12032<=Q&&Q<=12245||12272<=Q&&Q<=12283||12289<=Q&&Q<=12350||12353<=Q&&Q<=12438||12441<=Q&&Q<=12543||12549<=Q&&Q<=12589||12593<=Q&&Q<=12686||12688<=Q&&Q<=12730||12736<=Q&&Q<=12771||12784<=Q&&Q<=12830||12832<=Q&&Q<=12871||12880<=Q&&Q<=13054||13056<=Q&&Q<=19903||19968<=Q&&Q<=42124||42128<=Q&&Q<=42182||43360<=Q&&Q<=43388||44032<=Q&&Q<=55203||55216<=Q&&Q<=55238||55243<=Q&&Q<=55291||63744<=Q&&Q<=64255||65040<=Q&&Q<=65049||65072<=Q&&Q<=65106||65108<=Q&&Q<=65126||65128<=Q&&Q<=65131||110592<=Q&&Q<=110593||127488<=Q&&Q<=127490||127504<=Q&&Q<=127546||127552<=Q&&Q<=127560||127568<=Q&&Q<=127569||131072<=Q&&Q<=194367||177984<=Q&&Q<=196605||196608<=Q&&Q<=262141?"W":32<=Q&&Q<=126||162<=Q&&Q<=163||165<=Q&&Q<=166||Q==172||Q==175||10214<=Q&&Q<=10221||10629<=Q&&Q<=10630?"Na":Q==161||Q==164||167<=Q&&Q<=168||Q==170||173<=Q&&Q<=174||176<=Q&&Q<=180||182<=Q&&Q<=186||188<=Q&&Q<=191||Q==198||Q==208||215<=Q&&Q<=216||222<=Q&&Q<=225||Q==230||232<=Q&&Q<=234||236<=Q&&Q<=237||Q==240||242<=Q&&Q<=243||247<=Q&&Q<=250||Q==252||Q==254||Q==257||Q==273||Q==275||Q==283||294<=Q&&Q<=295||Q==299||305<=Q&&Q<=307||Q==312||319<=Q&&Q<=322||Q==324||328<=Q&&Q<=331||Q==333||338<=Q&&Q<=339||358<=Q&&Q<=359||Q==363||Q==462||Q==464||Q==466||Q==468||Q==470||Q==472||Q==474||Q==476||Q==593||Q==609||Q==708||Q==711||713<=Q&&Q<=715||Q==717||Q==720||728<=Q&&Q<=731||Q==733||Q==735||768<=Q&&Q<=879||913<=Q&&Q<=929||931<=Q&&Q<=937||945<=Q&&Q<=961||963<=Q&&Q<=969||Q==1025||1040<=Q&&Q<=1103||Q==1105||Q==8208||8211<=Q&&Q<=8214||8216<=Q&&Q<=8217||8220<=Q&&Q<=8221||8224<=Q&&Q<=8226||8228<=Q&&Q<=8231||Q==8240||8242<=Q&&Q<=8243||Q==8245||Q==8251||Q==8254||Q==8308||Q==8319||8321<=Q&&Q<=8324||Q==8364||Q==8451||Q==8453||Q==8457||Q==8467||Q==8470||8481<=Q&&Q<=8482||Q==8486||Q==8491||8531<=Q&&Q<=8532||8539<=Q&&Q<=8542||8544<=Q&&Q<=8555||8560<=Q&&Q<=8569||Q==8585||8592<=Q&&Q<=8601||8632<=Q&&Q<=8633||Q==8658||Q==8660||Q==8679||Q==8704||8706<=Q&&Q<=8707||8711<=Q&&Q<=8712||Q==8715||Q==8719||Q==8721||Q==8725||Q==8730||8733<=Q&&Q<=8736||Q==8739||Q==8741||8743<=Q&&Q<=8748||Q==8750||8756<=Q&&Q<=8759||8764<=Q&&Q<=8765||Q==8776||Q==8780||Q==8786||8800<=Q&&Q<=8801||8804<=Q&&Q<=8807||8810<=Q&&Q<=8811||8814<=Q&&Q<=8815||8834<=Q&&Q<=8835||8838<=Q&&Q<=8839||Q==8853||Q==8857||Q==8869||Q==8895||Q==8978||9312<=Q&&Q<=9449||9451<=Q&&Q<=9547||9552<=Q&&Q<=9587||9600<=Q&&Q<=9615||9618<=Q&&Q<=9621||9632<=Q&&Q<=9633||9635<=Q&&Q<=9641||9650<=Q&&Q<=9651||9654<=Q&&Q<=9655||9660<=Q&&Q<=9661||9664<=Q&&Q<=9665||9670<=Q&&Q<=9672||Q==9675||9678<=Q&&Q<=9681||9698<=Q&&Q<=9701||Q==9711||9733<=Q&&Q<=9734||Q==9737||9742<=Q&&Q<=9743||9748<=Q&&Q<=9749||Q==9756||Q==9758||Q==9792||Q==9794||9824<=Q&&Q<=9825||9827<=Q&&Q<=9829||9831<=Q&&Q<=9834||9836<=Q&&Q<=9837||Q==9839||9886<=Q&&Q<=9887||9918<=Q&&Q<=9919||9924<=Q&&Q<=9933||9935<=Q&&Q<=9953||Q==9955||9960<=Q&&Q<=9983||Q==10045||Q==10071||10102<=Q&&Q<=10111||11093<=Q&&Q<=11097||12872<=Q&&Q<=12879||57344<=Q&&Q<=63743||65024<=Q&&Q<=65039||Q==65533||127232<=Q&&Q<=127242||127248<=Q&&Q<=127277||127280<=Q&&Q<=127337||127344<=Q&&Q<=127386||917760<=Q&&Q<=917999||983040<=Q&&Q<=1048573||1048576<=Q&&Q<=1114109?"A":"N"},J.characterLength=function(Z){var q=this.eastAsianWidth(Z);return q=="F"||q=="W"||q=="A"?2:1};function X(Z){return Z.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}J.length=function(Z){for(var q=X(Z),Y=0,Q=0;Q<q.length;Q++)Y=Y+this.characterLength(q[Q]);return Y},J.slice=function(Z,q,Y){textLen=J.length(Z),q=q||0,Y=Y||1,q<0&&(q=textLen+q),Y<0&&(Y=textLen+Y);for(var Q="",G=0,H=X(Z),B=0;B<H.length;B++){var U=H[B],K=J.length(U);if(G>=q-(K==2?1:0))if(G+K<=Y)Q+=U;else break;G+=K}return Q}})(EX);var fB=EX.exports,Wx=OX(fB),vB=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},Vx=OX(vB);var S3=10,jX=($=0)=>(J)=>`\x1B[${J+$}m`,IX=($=0)=>(J)=>`\x1B[${38+$};5;${J}m`,wX=($=0)=>(J,X,Z)=>`\x1B[${38+$};2;${J};${X};${Z}m`,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(e.modifier);var kB=Object.keys(e.color),bB=Object.keys(e.bgColor);[...kB,...bB];function yB(){let $=new Map;for(let[J,X]of Object.entries(e)){for(let[Z,q]of Object.entries(X))e[Z]={open:`\x1B[${q[0]}m`,close:`\x1B[${q[1]}m`},X[Z]=e[Z],$.set(q[0],q[1]);Object.defineProperty(e,J,{value:X,enumerable:!1})}return Object.defineProperty(e,"codes",{value:$,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=jX(),e.color.ansi256=IX(),e.color.ansi16m=wX(),e.bgColor.ansi=jX(S3),e.bgColor.ansi256=IX(S3),e.bgColor.ansi16m=wX(S3),Object.defineProperties(e,{rgbToAnsi256:{value:(J,X,Z)=>J===X&&X===Z?J<8?16:J>248?231:Math.round((J-8)/247*24)+232:16+36*Math.round(J/255*5)+6*Math.round(X/255*5)+Math.round(Z/255*5),enumerable:!1},hexToRgb:{value:(J)=>{let X=/[a-f\d]{6}|[a-f\d]{3}/i.exec(J.toString(16));if(!X)return[0,0,0];let[Z]=X;Z.length===3&&(Z=[...Z].map((Y)=>Y+Y).join(""));let q=Number.parseInt(Z,16);return[q>>16&255,q>>8&255,q&255]},enumerable:!1},hexToAnsi256:{value:(J)=>e.rgbToAnsi256(...e.hexToRgb(J)),enumerable:!1},ansi256ToAnsi:{value:(J)=>{if(J<8)return 30+J;if(J<16)return 90+(J-8);let X,Z,q;if(J>=232)X=((J-232)*10+8)/255,Z=X,q=X;else{J-=16;let G=J%36;X=Math.floor(J/36)/5,Z=Math.floor(G/6)/5,q=G%6/5}let Y=Math.max(X,Z,q)*2;if(Y===0)return 30;let Q=30+(Math.round(q)<<2|Math.round(Z)<<1|Math.round(X));return Y===2&&(Q+=60),Q},enumerable:!1},rgbToAnsi:{value:(J,X,Z)=>e.ansi256ToAnsi(e.rgbToAnsi256(J,X,Z)),enumerable:!1},hexToAnsi:{value:(J)=>e.ansi256ToAnsi(e.hexToAnsi256(J)),enumerable:!1}}),e}var Lx=yB();var gB="]";var _x=`${gB}8;;`;var cB=["up","down","left","right","space","enter","cancel"],uB={actions:new Set(cB),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]])};function hX($,J){if(typeof $=="string")return uB.aliases.get($)===J;for(let X of $)if(X!==void 0&&hX(X,J))return!0;return!1}var mB=globalThis.process.platform.startsWith("win"),Rx=Symbol("clack:cancel");function AX({input:$=NB,output:J=DB,overwrite:X=!0,hideCursor:Z=!0}={}){let q=q1.createInterface({input:$,output:J,prompt:"",tabSize:1});q1.emitKeypressEvents($,q),$.isTTY&&$.setRawMode(!0);let Y=(Q,{name:G,sequence:H})=>{let B=String(Q);if(hX([B,G,H],"cancel")){Z&&J.write(T$.cursor.show),process.exit(0);return}if(!X)return;q1.moveCursor(J,G==="return"?0:-1,G==="return"?-1:0,()=>{q1.clearLine(J,1,()=>{$.once("keypress",Y)})})};return Z&&J.write(T$.cursor.hide),$.once("keypress",Y),()=>{$.off("keypress",Y),Z&&J.write(T$.cursor.show),$.isTTY&&!mB&&$.setRawMode(!1),q.terminal=!1,q.close()}}var pB;pB=new WeakMap;var K0=Z$(D3(),1),b4=Z$(A3(),1);import v0 from"node:process";function lB(){return v0.platform!=="win32"?v0.env.TERM!=="linux":!!v0.env.CI||!!v0.env.WT_SESSION||!!v0.env.TERMINUS_SUBLIME||v0.env.ConEmuTask==="{cmd::Cmder}"||v0.env.TERM_PROGRAM==="Terminus-Sublime"||v0.env.TERM_PROGRAM==="vscode"||v0.env.TERM==="xterm-256color"||v0.env.TERM==="alacritty"||v0.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var f3=lB(),Z0=($,J)=>f3?$:J,hx=Z0("◆","*"),nB=Z0("■","x"),iB=Z0("▲","x"),NX=Z0("◇","o"),tB=Z0("┌","T"),o1=Z0("│","|"),oB=Z0("└","—"),Ax=Z0("●",">"),Nx=Z0("○"," "),Dx=Z0("◻","[•]"),Sx=Z0("◼","[+]"),fx=Z0("◻","[ ]"),vx=Z0("▪","•"),kx=Z0("─","-"),bx=Z0("╮","+"),yx=Z0("├","+"),gx=Z0("╯","+"),aB=Z0("●","•"),rB=Z0("◆","*"),sB=Z0("▲","!"),eB=Z0("■","x");var DX=($="")=>{process.stdout.write(`${K0.default.gray(tB)} ${$}
45
- `)},SX=($="")=>{process.stdout.write(`${K0.default.gray(o1)}
46
- ${K0.default.gray(oB)} ${$}
44
+ if (condition) { yield value; }`)};import{Buffer as lG}from"node:buffer";import{StringDecoder as nG}from"node:string_decoder";var j4=($,J,Z)=>{if(Z)return;if($)return{transform:iG.bind(void 0,new TextEncoder)};let X=new nG(J);return{transform:oG.bind(void 0,X),final:tG.bind(void 0,X)}},iG=function*($,J){if(lG.isBuffer(J))yield t0(J);else if(typeof J==="string")yield $.encode(J);else yield J},oG=function*($,J){yield z0(J)?$.write(J):J},tG=function*($){let J=$.end();if(J!=="")yield J};import{callbackify as n5}from"node:util";var r2=n5(async($,J,Z,X)=>{J.currentIterable=$(...Z);try{for await(let q of J.currentIterable)X.push(q)}finally{delete J.currentIterable}}),x4=async function*($,J,Z){if(Z===J.length){yield $;return}let{transform:X=rG}=J[Z];for await(let q of X($))yield*x4(q,J,Z+1)},i5=async function*($){for(let[J,{final:Z}]of Object.entries($))yield*aG(Z,Number(J),$)},aG=async function*($,J,Z){if($===void 0)return;for await(let X of $())yield*x4(X,Z,J+1)},o5=n5(async({currentIterable:$},J)=>{if($!==void 0){await(J?$.throw(J):$.return());return}if(J)throw J}),rG=function*($){yield $};var s2=($,J,Z,X)=>{try{for(let q of $(...J))Z.push(q);X()}catch(q){X(q)}},t5=($,J)=>[...J.flatMap((Z)=>[...R1(Z,$,0)]),...U$($)],R1=function*($,J,Z){if(Z===J.length){yield $;return}let{transform:X=eG}=J[Z];for(let q of X($))yield*R1(q,J,Z+1)},U$=function*($){for(let[J,{final:Z}]of Object.entries($))yield*sG(Z,Number(J),$)},sG=function*($,J,Z){if($===void 0)return;for(let X of $())yield*R1(X,Z,J+1)},eG=function*($){yield $};var e2=({value:$,value:{transform:J,final:Z,writableObjectMode:X,readableObjectMode:q},optionName:Y},{encoding:Q})=>{let G={},H=r5($,Q,Y),K=_1(J),U=_1(Z),B=K?r2.bind(void 0,x4,G):s2.bind(void 0,R1),W=K||U?r2.bind(void 0,i5,G):s2.bind(void 0,U$),M=K||U?o5.bind(void 0,G):void 0;return{stream:new $H({writableObjectMode:X,writableHighWaterMark:a5(X),readableObjectMode:q,readableHighWaterMark:a5(q),transform(L,I,x){B([L,H,0],this,x)},flush(L){W([H],this,L)},destroy:M})}},I4=($,J,Z,X)=>{let q=J.filter(({type:Q})=>Q==="generator"),Y=X?q.reverse():q;for(let{value:Q,optionName:G}of Y){let H=r5(Q,Z,G);$=t5(H,$)}return $},r5=({transform:$,final:J,binary:Z,writableObjectMode:X,readableObjectMode:q,preserveNewlines:Y},Q,G)=>{let H={};return[{transform:p5(X,G)},j4(Z,Q,X),P4(Z,Y,X,H),{transform:$,final:J},{transform:d5(q,G)},c5({binary:Z,preserveNewlines:Y,readableObjectMode:q,state:H})].filter(Boolean)};var s5=($,J)=>{for(let Z of JH($))ZH($,Z,J)},JH=($)=>new Set(Object.entries($).filter(([,{direction:J}])=>J==="input").map(([J])=>Number(J))),ZH=($,J,Z)=>{let{stdioItems:X}=$[J],q=X.filter(({contents:G})=>G!==void 0);if(q.length===0)return;if(J!==0){let[{type:G,optionName:H}]=q;throw TypeError(`Only the \`stdin\` option, not \`${H}\`, can be ${Q1[G]} with synchronous methods.`)}let Q=q.map(({contents:G})=>G).map((G)=>XH(G,X));Z.input=Q$(Q)},XH=($,J)=>{let Z=I4($,J,"utf8",!0);return QH(Z),Q$(Z)},QH=($)=>{let J=$.find((Z)=>typeof Z!=="string"&&!z0(Z));if(J!==void 0)throw TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${J}.`)};import{writeFileSync as HH,appendFileSync as zH}from"node:fs";var w4=({stdioItems:$,encoding:J,verboseInfo:Z,fdNumber:X})=>X!=="all"&&b1(Z,X)&&!M0.has(J)&&qH(X)&&($.some(({type:q,value:Y})=>q==="native"&&YH.has(Y))||$.every(({type:q})=>I0.has(q))),qH=($)=>$===1||$===2,YH=new Set(["pipe","overlapped"]),e5=async($,J,Z,X)=>{for await(let q of $)if(!GH(J))JJ(q,Z,X)},$J=($,J,Z)=>{for(let X of $)JJ(X,J,Z)},GH=($)=>$._readableState.pipes.length>0,JJ=($,J,Z)=>{let X=k$($);y0({type:"output",verboseMessage:X,fdNumber:J,verboseInfo:Z})};var ZJ=({fileDescriptors:$,syncResult:{output:J},options:Z,isMaxBuffer:X,verboseInfo:q})=>{if(J===null)return{output:Array.from({length:3})};let Y={},Q=new Set([]);return{output:J.map((H,K)=>KH({result:H,fileDescriptors:$,fdNumber:K,state:Y,outputFiles:Q,isMaxBuffer:X,verboseInfo:q},Z)),...Y}},KH=({result:$,fileDescriptors:J,fdNumber:Z,state:X,outputFiles:q,isMaxBuffer:Y,verboseInfo:Q},{buffer:G,encoding:H,lines:K,stripFinalNewline:U,maxBuffer:B})=>{if($===null)return;let W=X5($,Y,B),M=t0(W),{stdioItems:R,objectMode:L}=J[Z],I=BH([M],R,H,X),{serializedResult:x,finalResult:F=x}=UH({chunks:I,objectMode:L,encoding:H,lines:K,stripFinalNewline:U,fdNumber:Z});WH({serializedResult:x,fdNumber:Z,state:X,verboseInfo:Q,encoding:H,stdioItems:R,objectMode:L});let v=G[Z]?F:void 0;try{if(X.error===void 0)VH(x,R,q);return v}catch(j){return X.error=j,v}},BH=($,J,Z,X)=>{try{return I4($,J,Z,!1)}catch(q){return X.error=q,$}},UH=({chunks:$,objectMode:J,encoding:Z,lines:X,stripFinalNewline:q,fdNumber:Y})=>{if(J)return{serializedResult:$};if(Z==="buffer")return{serializedResult:Q$($)};let Q=R6($,Z);if(X[Y])return{serializedResult:Q,finalResult:a2(Q,!q[Y],J)};return{serializedResult:Q}},WH=({serializedResult:$,fdNumber:J,state:Z,verboseInfo:X,encoding:q,stdioItems:Y,objectMode:Q})=>{if(!w4({stdioItems:Y,encoding:q,verboseInfo:X,fdNumber:J}))return;let G=a2($,!1,Q);try{$J(G,J,X)}catch(H){Z.error??=H}},VH=($,J,Z)=>{for(let{path:X,append:q}of J.filter(({type:Y})=>C4.has(Y))){let Y=typeof X==="string"?X:X.toString();if(q||Z.has(Y))zH(X,$);else Z.add(Y),HH(X,$)}};var XJ=([,$,J],Z)=>{if(!Z.all)return;if($===void 0)return J;if(J===void 0)return $;if(Array.isArray($))return Array.isArray(J)?[...$,...J]:[...$,e0(J,Z,"all")];if(Array.isArray(J))return[e0($,Z,"all"),...J];if(z0($)&&z0(J))return q2([$,J]);return`${$}${J}`};import{once as $3}from"node:events";var QJ=async($,J)=>{let[Z,X]=await LH($);return J.isForcefullyTerminated??=!1,[Z,X]},LH=async($)=>{let[J,Z]=await Promise.allSettled([$3($,"spawn"),$3($,"exit")]);if(J.status==="rejected")return[];return Z.status==="rejected"?qJ($):Z.value},qJ=async($)=>{try{return await $3($,"exit")}catch{return qJ($)}},YJ=async($)=>{let[J,Z]=await $;if(!_H(J,Z)&&J3(J,Z))throw new g0;return[J,Z]},_H=($,J)=>$===void 0&&J===void 0,J3=($,J)=>$!==0||J!==null;var GJ=({error:$,status:J,signal:Z,output:X},{maxBuffer:q})=>{let Y=RH($,J,Z),Q=Y?.code==="ETIMEDOUT",G=Z5(Y,X,q);return{resultError:Y,exitCode:J,signal:Z,timedOut:Q,isMaxBuffer:G}},RH=($,J,Z)=>{if($!==void 0)return $;return J3(J,Z)?new g0:void 0};var HJ=($,J,Z)=>{let{file:X,commandArguments:q,command:Y,escapedCommand:Q,startTime:G,verboseInfo:H,options:K,fileDescriptors:U}=MH($,J,Z),B=PH({file:X,commandArguments:q,options:K,command:Y,escapedCommand:Q,verboseInfo:H,fileDescriptors:U,startTime:G});return n1(B,H,K)},MH=($,J,Z)=>{let{command:X,escapedCommand:q,startTime:Y,verboseInfo:Q}=y$($,J,Z),G=CH(Z),{file:H,commandArguments:K,options:U}=G4($,J,G);FH(U);let B=y5(U,Q);return{file:H,commandArguments:K,command:X,escapedCommand:q,startTime:Y,verboseInfo:Q,options:U,fileDescriptors:B}},CH=($)=>$.node&&!$.ipc?{...$,ipc:!1}:$,FH=({ipc:$,ipcInput:J,detached:Z,cancelSignal:X})=>{if(J)O4("ipcInput");if($)O4("ipc: true");if(Z)O4("detached: true");if(X)O4("cancelSignal")},O4=($)=>{throw TypeError(`The "${$}" option cannot be used with synchronous methods.`)},PH=({file:$,commandArguments:J,options:Z,command:X,escapedCommand:q,verboseInfo:Y,fileDescriptors:Q,startTime:G})=>{let H=jH({file:$,commandArguments:J,options:Z,command:X,escapedCommand:q,fileDescriptors:Q,startTime:G});if(H.failed)return H;let{resultError:K,exitCode:U,signal:B,timedOut:W,isMaxBuffer:M}=GJ(H,Z),{output:R,error:L=K}=ZJ({fileDescriptors:Q,syncResult:H,options:Z,isMaxBuffer:M,verboseInfo:Y}),I=R.map((F,v)=>e0(F,Z,v)),x=e0(XJ(R,Z),Z,"all");return IH({error:L,exitCode:U,signal:B,timedOut:W,isMaxBuffer:M,stdio:I,all:x,options:Z,command:X,escapedCommand:q,startTime:G})},jH=({file:$,commandArguments:J,options:Z,command:X,escapedCommand:q,fileDescriptors:Y,startTime:Q})=>{try{s5(Y,Z);let G=xH(Z);return TH(...H4($,J,G))}catch(G){return l1({error:G,command:X,escapedCommand:q,fileDescriptors:Y,options:Z,startTime:Q,isSync:!0})}},xH=({encoding:$,maxBuffer:J,...Z})=>({...Z,encoding:"buffer",maxBuffer:_4(J)}),IH=({error:$,exitCode:J,signal:Z,timedOut:X,isMaxBuffer:q,stdio:Y,all:Q,options:G,command:H,escapedCommand:K,startTime:U})=>$===void 0?R4({command:H,escapedCommand:K,stdio:Y,all:Q,ipcOutput:[],options:G,startTime:U}):B$({error:$,command:H,escapedCommand:K,timedOut:X,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:q,isForcefullyTerminated:!1,exitCode:J,signal:Z,stdio:Y,all:Q,ipcOutput:[],options:G,startTime:U,isSync:!0});import{setMaxListeners as UK}from"node:events";import{spawn as WK}from"node:child_process";import WJ from"node:process";import{once as Z3,on as wH}from"node:events";var zJ=({anyProcess:$,channel:J,isSubprocess:Z,ipc:X},{reference:q=!0,filter:Y}={})=>{return u1({methodName:"getOneMessage",isSubprocess:Z,ipc:X,isConnected:J4($)}),OH({anyProcess:$,channel:J,isSubprocess:Z,filter:Y,reference:q})},OH=async({anyProcess:$,channel:J,isSubprocess:Z,filter:X,reference:q})=>{r$(J,q);let Y=X1($,J,Z),Q=new AbortController;try{return await Promise.race([EH(Y,X,Q),AH(Y,Z,Q),hH(Y,Z,Q)])}catch(G){throw m1($),G}finally{Q.abort(),s$(J,q)}},EH=async($,J,{signal:Z})=>{if(J===void 0){let[X]=await Z3($,"message",{signal:Z});return X}for await(let[X]of wH($,"message",{signal:Z}))if(J(X))return X},AH=async($,J,{signal:Z})=>{await Z3($,"disconnect",{signal:Z}),o7(J)},hH=async($,J,{signal:Z})=>{let[X]=await Z3($,"strict:error",{signal:Z});throw o$(X,J)};import{once as BJ,on as NH}from"node:events";var UJ=({anyProcess:$,channel:J,isSubprocess:Z,ipc:X},{reference:q=!0}={})=>X3({anyProcess:$,channel:J,isSubprocess:Z,ipc:X,shouldAwait:!Z,reference:q}),X3=({anyProcess:$,channel:J,isSubprocess:Z,ipc:X,shouldAwait:q,reference:Y})=>{u1({methodName:"getEachMessage",isSubprocess:Z,ipc:X,isConnected:J4($)}),r$(J,Y);let Q=X1($,J,Z),G=new AbortController,H={};return DH($,Q,G),SH({ipcEmitter:Q,isSubprocess:Z,controller:G,state:H}),vH({anyProcess:$,channel:J,ipcEmitter:Q,isSubprocess:Z,shouldAwait:q,controller:G,state:H,reference:Y})},DH=async($,J,Z)=>{try{await BJ(J,"disconnect",{signal:Z.signal}),Z.abort()}catch{}},SH=async({ipcEmitter:$,isSubprocess:J,controller:Z,state:X})=>{try{let[q]=await BJ($,"strict:error",{signal:Z.signal});X.error=o$(q,J),Z.abort()}catch{}},vH=async function*({anyProcess:$,channel:J,ipcEmitter:Z,isSubprocess:X,shouldAwait:q,controller:Y,state:Q,reference:G}){try{for await(let[H]of NH(Z,"message",{signal:Y.signal}))KJ(Q),yield H}catch{KJ(Q)}finally{if(Y.abort(),s$(J,G),!X)m1($);if(q)await $}},KJ=({error:$})=>{if($)throw $};var VJ=($,{ipc:J})=>{Object.assign($,_J($,!1,J))},LJ=()=>{let $=WJ,J=!0,Z=WJ.channel!==void 0;return{..._J($,!0,Z),getCancelSignal:F8.bind(void 0,{anyProcess:$,channel:$.channel,isSubprocess:!0,ipc:Z})}},_J=($,J,Z)=>({sendMessage:q4.bind(void 0,{anyProcess:$,channel:$.channel,isSubprocess:J,ipc:Z}),getOneMessage:zJ.bind(void 0,{anyProcess:$,channel:$.channel,isSubprocess:J,ipc:Z}),getEachMessage:UJ.bind(void 0,{anyProcess:$,channel:$.channel,isSubprocess:J,ipc:Z})});import{ChildProcess as fH}from"node:child_process";import{PassThrough as kH,Readable as bH,Writable as yH,Duplex as gH}from"node:stream";var RJ=({error:$,command:J,escapedCommand:Z,fileDescriptors:X,options:q,startTime:Y,verboseInfo:Q})=>{i2(X);let G=new fH;uH(G,X),Object.assign(G,{readable:mH,writable:cH,duplex:pH});let H=l1({error:$,command:J,escapedCommand:Z,fileDescriptors:X,options:q,startTime:Y,isSync:!1}),K=dH(H,Q,q);return{subprocess:G,promise:K}},uH=($,J)=>{let Z=W$(),X=W$(),q=W$(),Y=Array.from({length:J.length-3},W$),Q=W$(),G=[Z,X,q,...Y];Object.assign($,{stdin:Z,stdout:X,stderr:q,all:Q,stdio:G})},W$=()=>{let $=new kH;return $.end(),$},mH=()=>new bH({read(){}}),cH=()=>new yH({write(){}}),pH=()=>new gH({read(){},write(){}}),dH=async($,J,Z)=>n1($,J,Z);import{createReadStream as TJ,createWriteStream as MJ}from"node:fs";import{Buffer as lH}from"node:buffer";import{Readable as V$,Writable as nH,Duplex as iH}from"node:stream";var FJ=($,J)=>F4(oH,$,J,!1),L$=({type:$,optionName:J})=>{throw TypeError(`The \`${J}\` option cannot be ${Q1[$]}.`)},CJ={fileNumber:L$,generator:e2,asyncGenerator:e2,nodeStream:({value:$})=>({stream:$}),webTransform({value:{transform:$,writableObjectMode:J,readableObjectMode:Z}}){let X=J||Z;return{stream:iH.fromWeb($,{objectMode:X})}},duplex:({value:{transform:$}})=>({stream:$}),native(){}},oH={input:{...CJ,fileUrl:({value:$})=>({stream:TJ($)}),filePath:({value:{file:$}})=>({stream:TJ($)}),webStream:({value:$})=>({stream:V$.fromWeb($)}),iterable:({value:$})=>({stream:V$.from($)}),asyncIterable:({value:$})=>({stream:V$.from($)}),string:({value:$})=>({stream:V$.from($)}),uint8Array:({value:$})=>({stream:V$.from(lH.from($))})},output:{...CJ,fileUrl:({value:$})=>({stream:MJ($)}),filePath:({value:{file:$,append:J}})=>({stream:MJ($,J?{flags:"a"}:{})}),webStream:({value:$})=>({stream:nH.fromWeb($)}),iterable:L$,asyncIterable:L$,string:L$,uint8Array:L$}};import{on as tH,once as PJ}from"node:events";import{PassThrough as aH,getDefaultHighWaterMark as rH}from"node:stream";import{finished as IJ}from"node:stream/promises";function T1($){if(!Array.isArray($))throw TypeError(`Expected an array, got \`${typeof $}\`.`);for(let q of $)Q3(q);let J=$.some(({readableObjectMode:q})=>q),Z=sH($,J),X=new wJ({objectMode:J,writableHighWaterMark:Z,readableHighWaterMark:Z});for(let q of $)X.add(q);return X}var sH=($,J)=>{if($.length===0)return rH(J);let Z=$.filter(({readableObjectMode:X})=>X===J).map(({readableHighWaterMark:X})=>X);return Math.max(...Z)};class wJ extends aH{#J=new Set([]);#Z=new Set([]);#$=new Set([]);#X;#q=Symbol("unpipe");#Q=new WeakMap;add($){if(Q3($),this.#J.has($))return;this.#J.add($),this.#X??=eH(this,this.#J,this.#q);let J=Zz({passThroughStream:this,stream:$,streams:this.#J,ended:this.#Z,aborted:this.#$,onFinished:this.#X,unpipeEvent:this.#q});this.#Q.set($,J),$.pipe(this,{end:!1})}async remove($){if(Q3($),!this.#J.has($))return!1;let J=this.#Q.get($);if(J===void 0)return!1;return this.#Q.delete($),$.unpipe(this),await J,!0}}var eH=async($,J,Z)=>{E4($,jJ);let X=new AbortController;try{await Promise.race([$z($,X),Jz($,J,Z,X)])}finally{X.abort(),E4($,-jJ)}},$z=async($,{signal:J})=>{try{await IJ($,{signal:J,cleanup:!0})}catch(Z){throw OJ($,Z),Z}},Jz=async($,J,Z,{signal:X})=>{for await(let[q]of tH($,"unpipe",{signal:X}))if(J.has(q))q.emit(Z)},Q3=($)=>{if(typeof $?.pipe!=="function")throw TypeError(`Expected a readable stream, got: \`${typeof $}\`.`)},Zz=async({passThroughStream:$,stream:J,streams:Z,ended:X,aborted:q,onFinished:Y,unpipeEvent:Q})=>{E4($,xJ);let G=new AbortController;try{await Promise.race([Xz(Y,J,G),Qz({passThroughStream:$,stream:J,streams:Z,ended:X,aborted:q,controller:G}),qz({stream:J,streams:Z,ended:X,aborted:q,unpipeEvent:Q,controller:G})])}finally{G.abort(),E4($,-xJ)}if(Z.size>0&&Z.size===X.size+q.size)if(X.size===0&&q.size>0)q3($);else Yz($)},Xz=async($,J,{signal:Z})=>{try{if(await $,!Z.aborted)q3(J)}catch(X){if(!Z.aborted)OJ(J,X)}},Qz=async({passThroughStream:$,stream:J,streams:Z,ended:X,aborted:q,controller:{signal:Y}})=>{try{if(await IJ(J,{signal:Y,cleanup:!0,readable:!0,writable:!1}),Z.has(J))X.add(J)}catch(Q){if(Y.aborted||!Z.has(J))return;if(EJ(Q))q.add(J);else AJ($,Q)}},qz=async({stream:$,streams:J,ended:Z,aborted:X,unpipeEvent:q,controller:{signal:Y}})=>{if(await PJ($,q,{signal:Y}),!$.readable)return PJ(Y,"abort",{signal:Y});J.delete($),Z.delete($),X.delete($)},Yz=($)=>{if($.writable)$.end()},OJ=($,J)=>{if(EJ(J))q3($);else AJ($,J)},EJ=($)=>$?.code==="ERR_STREAM_PREMATURE_CLOSE",q3=($)=>{if($.readable||$.writable)$.destroy()},AJ=($,J)=>{if(!$.destroyed)$.once("error",Gz),$.destroy(J)},Gz=()=>{},E4=($,J)=>{let Z=$.getMaxListeners();if(Z!==0&&Z!==Number.POSITIVE_INFINITY)$.setMaxListeners(Z+J)},jJ=2,xJ=1;import{finished as hJ}from"node:stream/promises";var o1=($,J)=>{$.pipe(J),Hz($,J),zz($,J)},Hz=async($,J)=>{if(D0($)||D0(J))return;try{await hJ($,{cleanup:!0,readable:!0,writable:!1})}catch{}Y3(J)},Y3=($)=>{if($.writable)$.end()},zz=async($,J)=>{if(D0($)||D0(J))return;try{await hJ(J,{cleanup:!0,readable:!1,writable:!0})}catch{}G3($)},G3=($)=>{if($.readable)$.destroy()};var NJ=($,J,Z)=>{let X=new Map;for(let[q,{stdioItems:Y,direction:Q}]of Object.entries(J)){for(let{stream:G}of Y.filter(({type:H})=>I0.has(H)))Kz($,G,Q,q);for(let{stream:G}of Y.filter(({type:H})=>!I0.has(H)))Uz({subprocess:$,stream:G,direction:Q,fdNumber:q,pipeGroups:X,controller:Z})}for(let[q,Y]of X.entries()){let Q=Y.length===1?Y[0]:T1(Y);o1(Q,q)}},Kz=($,J,Z,X)=>{if(Z==="output")o1($.stdio[X],J);else o1(J,$.stdio[X]);let q=Bz[X];if(q!==void 0)$[q]=J;$.stdio[X]=J},Bz=["stdin","stdout","stderr"],Uz=({subprocess:$,stream:J,direction:Z,fdNumber:X,pipeGroups:q,controller:Y})=>{if(J===void 0)return;Wz(J,Y);let[Q,G]=Z==="output"?[J,$.stdio[X]]:[$.stdio[X],J],H=q.get(Q)??[];q.set(Q,[...H,G])},Wz=($,{signal:J})=>{if(D0($))V1($,Vz,J)},Vz=2;import{addAbortListener as Rz}from"node:events";var M1=[];M1.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")M1.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")M1.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var A4=($)=>!!$&&typeof $==="object"&&typeof $.removeListener==="function"&&typeof $.emit==="function"&&typeof $.reallyExit==="function"&&typeof $.listeners==="function"&&typeof $.kill==="function"&&typeof $.pid==="number"&&typeof $.on==="function",H3=Symbol.for("signal-exit emitter"),z3=globalThis,Lz=Object.defineProperty.bind(Object);class DJ{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(z3[H3])return z3[H3];Lz(z3,H3,{value:this,writable:!1,enumerable:!1,configurable:!1})}on($,J){this.listeners[$].push(J)}removeListener($,J){let Z=this.listeners[$],X=Z.indexOf(J);if(X===-1)return;if(X===0&&Z.length===1)Z.length=0;else Z.splice(X,1)}emit($,J,Z){if(this.emitted[$])return!1;this.emitted[$]=!0;let X=!1;for(let q of this.listeners[$])X=q(J,Z)===!0||X;if($==="exit")X=this.emit("afterExit",J,Z)||X;return X}}class B3{}var _z=($)=>{return{onExit(J,Z){return $.onExit(J,Z)},load(){return $.load()},unload(){return $.unload()}}};class SJ extends B3{onExit(){return()=>{}}load(){}unload(){}}class vJ extends B3{#J=K3.platform==="win32"?"SIGINT":"SIGHUP";#Z=new DJ;#$;#X;#q;#Q={};#Y=!1;constructor($){super();this.#$=$,this.#Q={};for(let J of M1)this.#Q[J]=()=>{let Z=this.#$.listeners(J),{count:X}=this.#Z,q=$;if(typeof q.__signal_exit_emitter__==="object"&&typeof q.__signal_exit_emitter__.count==="number")X+=q.__signal_exit_emitter__.count;if(Z.length===X){this.unload();let Y=this.#Z.emit("exit",null,J),Q=J==="SIGHUP"?this.#J:J;if(!Y)$.kill($.pid,Q)}};this.#q=$.reallyExit,this.#X=$.emit}onExit($,J){if(!A4(this.#$))return()=>{};if(this.#Y===!1)this.load();let Z=J?.alwaysLast?"afterExit":"exit";return this.#Z.on(Z,$),()=>{if(this.#Z.removeListener(Z,$),this.#Z.listeners.exit.length===0&&this.#Z.listeners.afterExit.length===0)this.unload()}}load(){if(this.#Y)return;this.#Y=!0,this.#Z.count+=1;for(let $ of M1)try{let J=this.#Q[$];if(J)this.#$.on($,J)}catch(J){}this.#$.emit=($,...J)=>{return this.#H($,...J)},this.#$.reallyExit=($)=>{return this.#G($)}}unload(){if(!this.#Y)return;this.#Y=!1,M1.forEach(($)=>{let J=this.#Q[$];if(!J)throw Error("Listener not defined for signal: "+$);try{this.#$.removeListener($,J)}catch(Z){}}),this.#$.emit=this.#X,this.#$.reallyExit=this.#q,this.#Z.count-=1}#G($){if(!A4(this.#$))return 0;return this.#$.exitCode=$||0,this.#Z.emit("exit",this.#$.exitCode,null),this.#q.call(this.#$,this.#$.exitCode)}#H($,...J){let Z=this.#X;if($==="exit"&&A4(this.#$)){if(typeof J[0]==="number")this.#$.exitCode=J[0];let X=Z.call(this.#$,$,...J);return this.#Z.emit("exit",this.#$.exitCode,null),X}else return Z.call(this.#$,$,...J)}}var K3=globalThis.process,{onExit:fJ,load:UC,unload:WC}=_z(A4(K3)?new vJ(K3):new SJ);var kJ=($,{cleanup:J,detached:Z},{signal:X})=>{if(!J||Z)return;let q=fJ(()=>{$.kill()});Rz(X,()=>{q()})};var yJ=({source:$,sourcePromise:J,boundOptions:Z,createNested:X},...q)=>{let Y=b$(),{destination:Q,destinationStream:G,destinationError:H,from:K,unpipeSignal:U}=Tz(Z,X,q),{sourceStream:B,sourceError:W}=Cz($,K),{options:M,fileDescriptors:R}=m0.get($);return{sourcePromise:J,sourceStream:B,sourceOptions:M,sourceError:W,destination:Q,destinationStream:G,destinationError:H,unpipeSignal:U,fileDescriptors:R,startTime:Y}},Tz=($,J,Z)=>{try{let{destination:X,pipeOptions:{from:q,to:Y,unpipeSignal:Q}={}}=Mz($,J,...Z),G=a$(X,Y);return{destination:X,destinationStream:G,from:q,unpipeSignal:Q}}catch(X){return{destinationError:X}}},Mz=($,J,Z,...X)=>{if(Array.isArray(Z))return{destination:J(bJ,$)(Z,...X),pipeOptions:$};if(typeof Z==="string"||Z instanceof URL||X2(Z)){if(Object.keys($).length>0)throw TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[q,Y,Q]=O$(Z,...X);return{destination:J(bJ)(q,Y,Q),pipeOptions:Q}}if(m0.has(Z)){if(Object.keys($).length>0)throw TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:Z,pipeOptions:X[0]}}throw TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${Z}`)},bJ=({options:$})=>({options:{...$,stdin:"pipe",piped:!0}}),Cz=($,J)=>{try{return{sourceStream:c1($,J)}}catch(Z){return{sourceError:Z}}};var uJ=({sourceStream:$,sourceError:J,destinationStream:Z,destinationError:X,fileDescriptors:q,sourceOptions:Y,startTime:Q})=>{let G=Fz({sourceStream:$,sourceError:J,destinationStream:Z,destinationError:X});if(G!==void 0)throw U3({error:G,fileDescriptors:q,sourceOptions:Y,startTime:Q})},Fz=({sourceStream:$,sourceError:J,destinationStream:Z,destinationError:X})=>{if(J!==void 0&&X!==void 0)return X;if(X!==void 0)return G3($),X;if(J!==void 0)return Y3(Z),J},U3=({error:$,fileDescriptors:J,sourceOptions:Z,startTime:X})=>l1({error:$,command:gJ,escapedCommand:gJ,fileDescriptors:J,options:Z,startTime:X,isSync:!1}),gJ="source.pipe(destination)";var mJ=async($)=>{let[{status:J,reason:Z,value:X=Z},{status:q,reason:Y,value:Q=Y}]=await $;if(!Q.pipedFrom.includes(X))Q.pipedFrom.push(X);if(q==="rejected")throw Q;if(J==="rejected")throw X;return Q};import{finished as Pz}from"node:stream/promises";var cJ=($,J,Z)=>{let X=h4.has(J)?xz($,J):jz($,J);return V1($,wz,Z.signal),V1(J,Oz,Z.signal),Iz(J),X},jz=($,J)=>{let Z=T1([$]);return o1(Z,J),h4.set(J,Z),Z},xz=($,J)=>{let Z=h4.get(J);return Z.add($),Z},Iz=async($)=>{try{await Pz($,{cleanup:!0,readable:!1,writable:!0})}catch{}h4.delete($)},h4=new WeakMap,wz=2,Oz=1;import{aborted as Ez}from"node:util";var pJ=($,J)=>$===void 0?[]:[Az($,J)],Az=async($,{sourceStream:J,mergedStream:Z,fileDescriptors:X,sourceOptions:q,startTime:Y})=>{await Ez($,J),await Z.remove(J);let Q=Error("Pipe canceled by `unpipeSignal` option.");throw U3({error:Q,fileDescriptors:X,sourceOptions:q,startTime:Y})};var N4=($,...J)=>{if(Z0(J[0]))return N4.bind(void 0,{...$,boundOptions:{...$.boundOptions,...J[0]}});let{destination:Z,...X}=yJ($,...J),q=hz({...X,destination:Z});return q.pipe=N4.bind(void 0,{...$,source:Z,sourcePromise:q,boundOptions:{}}),q},hz=async({sourcePromise:$,sourceStream:J,sourceOptions:Z,sourceError:X,destination:q,destinationStream:Y,destinationError:Q,unpipeSignal:G,fileDescriptors:H,startTime:K})=>{let U=Nz($,q);uJ({sourceStream:J,sourceError:X,destinationStream:Y,destinationError:Q,fileDescriptors:H,sourceOptions:Z,startTime:K});let B=new AbortController;try{let W=cJ(J,Y,B);return await Promise.race([mJ(U),...pJ(G,{sourceStream:J,mergedStream:W,sourceOptions:Z,fileDescriptors:H,startTime:K})])}finally{B.abort()}},Nz=($,J)=>Promise.allSettled([$,J]);import{setImmediate as yz}from"node:timers/promises";import{on as Dz}from"node:events";import{getDefaultHighWaterMark as Sz}from"node:stream";var D4=({subprocessStdout:$,subprocess:J,binary:Z,shouldEncode:X,encoding:q,preserveNewlines:Y})=>{let Q=new AbortController;return vz(J,Q),lJ({stream:$,controller:Q,binary:Z,shouldEncode:!$.readableObjectMode&&X,encoding:q,shouldSplit:!$.readableObjectMode,preserveNewlines:Y})},vz=async($,J)=>{try{await $}catch{}finally{J.abort()}},W3=({stream:$,onStreamEnd:J,lines:Z,encoding:X,stripFinalNewline:q,allMixed:Y})=>{let Q=new AbortController;fz(J,Q,$);let G=$.readableObjectMode&&!Y;return lJ({stream:$,controller:Q,binary:X==="buffer",shouldEncode:!G,encoding:X,shouldSplit:!G&&Z,preserveNewlines:!q})},fz=async($,J,Z)=>{try{await $}catch{Z.destroy()}finally{J.abort()}},lJ=({stream:$,controller:J,binary:Z,shouldEncode:X,encoding:q,shouldSplit:Y,preserveNewlines:Q})=>{let G=Dz($,"data",{signal:J.signal,highWaterMark:dJ,highWatermark:dJ});return kz({onStdoutChunk:G,controller:J,binary:Z,shouldEncode:X,encoding:q,shouldSplit:Y,preserveNewlines:Q})},V3=Sz(!0),dJ=V3,kz=async function*({onStdoutChunk:$,controller:J,binary:Z,shouldEncode:X,encoding:q,shouldSplit:Y,preserveNewlines:Q}){let G=bz({binary:Z,shouldEncode:X,encoding:q,shouldSplit:Y,preserveNewlines:Q});try{for await(let[H]of $)yield*R1(H,G,0)}catch(H){if(!J.signal.aborted)throw H}finally{yield*U$(G)}},bz=({binary:$,shouldEncode:J,encoding:Z,shouldSplit:X,preserveNewlines:q})=>[j4($,Z,!J),P4($,q,!X,{})].filter(Boolean);var nJ=async({stream:$,onStreamEnd:J,fdNumber:Z,encoding:X,buffer:q,maxBuffer:Y,lines:Q,allMixed:G,stripFinalNewline:H,verboseInfo:K,streamInfo:U})=>{let B=gz({stream:$,onStreamEnd:J,fdNumber:Z,encoding:X,allMixed:G,verboseInfo:K,streamInfo:U});if(!q){await Promise.all([uz($),B]);return}let W=o2(H,Z),M=W3({stream:$,onStreamEnd:J,lines:Q,encoding:X,stripFinalNewline:W,allMixed:G}),[R]=await Promise.all([mz({stream:$,iterable:M,fdNumber:Z,encoding:X,maxBuffer:Y,lines:Q}),B]);return R},gz=async({stream:$,onStreamEnd:J,fdNumber:Z,encoding:X,allMixed:q,verboseInfo:Y,streamInfo:{fileDescriptors:Q}})=>{if(!w4({stdioItems:Q[Z]?.stdioItems,encoding:X,verboseInfo:Y,fdNumber:Z}))return;let G=W3({stream:$,onStreamEnd:J,lines:!0,encoding:X,stripFinalNewline:!0,allMixed:q});await e5(G,$,Z,Y)},uz=async($)=>{if(await yz(),$.readableFlowing===null)$.resume()},mz=async({stream:$,stream:{readableObjectMode:J},iterable:Z,fdNumber:X,encoding:q,maxBuffer:Y,lines:Q})=>{try{if(J||Q)return await U4(Z,{maxBuffer:Y});if(q==="buffer")return new Uint8Array(await W4(Z,{maxBuffer:Y}));return await L4(Z,{maxBuffer:Y})}catch(G){return iJ(e8({error:G,stream:$,readableObjectMode:J,lines:Q,encoding:q,fdNumber:X}))}},L3=async($)=>{try{return await $}catch(J){return iJ(J)}},iJ=({bufferedData:$})=>L6($)?new Uint8Array($):$;import{finished as cz}from"node:stream/promises";var _$=async($,J,Z,{isSameDirection:X,stopOnExit:q=!1}={})=>{let Y=pz($,Z),Q=new AbortController;try{await Promise.race([...q?[Z.exitPromise]:[],cz($,{cleanup:!0,signal:Q.signal})])}catch(G){if(!Y.stdinCleanedUp)nz(G,J,Z,X)}finally{Q.abort()}},pz=($,{originalStreams:[J],subprocess:Z})=>{let X={stdinCleanedUp:!1};if($===J)dz($,Z,X);return X},dz=($,J,Z)=>{let{_destroy:X}=$;$._destroy=(...q)=>{lz(J,Z),X.call($,...q)}},lz=({exitCode:$,signalCode:J},Z)=>{if($!==null||J!==null)Z.stdinCleanedUp=!0},nz=($,J,Z,X)=>{if(!iz($,J,Z,X))throw $},iz=($,J,Z,X=!0)=>{if(Z.propagating)return oJ($)||S4($);return Z.propagating=!0,_3(Z,J)===X?oJ($):S4($)},_3=({fileDescriptors:$},J)=>J!=="all"&&$[J].direction==="input",S4=($)=>$?.code==="ERR_STREAM_PREMATURE_CLOSE",oJ=($)=>$?.code==="EPIPE";var tJ=({subprocess:$,encoding:J,buffer:Z,maxBuffer:X,lines:q,stripFinalNewline:Y,verboseInfo:Q,streamInfo:G})=>$.stdio.map((H,K)=>R3({stream:H,fdNumber:K,encoding:J,buffer:Z[K],maxBuffer:X[K],lines:q[K],allMixed:!1,stripFinalNewline:Y,verboseInfo:Q,streamInfo:G})),R3=async({stream:$,fdNumber:J,encoding:Z,buffer:X,maxBuffer:q,lines:Y,allMixed:Q,stripFinalNewline:G,verboseInfo:H,streamInfo:K})=>{if(!$)return;let U=_$($,J,K);if(_3(K,J)){await U;return}let[B]=await Promise.all([nJ({stream:$,onStreamEnd:U,fdNumber:J,encoding:Z,buffer:X,maxBuffer:q,lines:Y,allMixed:Q,stripFinalNewline:G,verboseInfo:H,streamInfo:K}),U]);return B};var aJ=({stdout:$,stderr:J},{all:Z})=>Z&&($||J)?T1([$,J].filter(Boolean)):void 0,rJ=({subprocess:$,encoding:J,buffer:Z,maxBuffer:X,lines:q,stripFinalNewline:Y,verboseInfo:Q,streamInfo:G})=>R3({...oz($,Z),fdNumber:"all",encoding:J,maxBuffer:X[1]+X[2],lines:q[1]||q[2],allMixed:tz($),stripFinalNewline:Y,verboseInfo:Q,streamInfo:G}),oz=({stdout:$,stderr:J,all:Z},[,X,q])=>{let Y=X||q;if(!Y)return{stream:Z,buffer:Y};if(!X)return{stream:J,buffer:Y};if(!q)return{stream:$,buffer:Y};return{stream:Z,buffer:Y}},tz=({all:$,stdout:J,stderr:Z})=>$&&J&&Z&&J.readableObjectMode!==Z.readableObjectMode;import{once as az}from"node:events";var sJ=($)=>b1($,"ipc"),eJ=($,J)=>{let Z=k$($);y0({type:"ipc",verboseMessage:Z,fdNumber:"ipc",verboseInfo:J})};var $Z=async({subprocess:$,buffer:J,maxBuffer:Z,ipc:X,ipcOutput:q,verboseInfo:Y})=>{if(!X)return q;let Q=sJ(Y),G=a0(J,"ipc"),H=a0(Z,"ipc");for await(let K of X3({anyProcess:$,channel:$.channel,isSubprocess:!1,ipc:X,shouldAwait:!1,reference:!0})){if(G)$5($,q,H),q.push(K);if(Q)eJ(K,Y)}return q},JZ=async($,J)=>{return await Promise.allSettled([$]),J};var ZZ=async({subprocess:$,options:{encoding:J,buffer:Z,maxBuffer:X,lines:q,timeoutDuration:Y,cancelSignal:Q,gracefulCancel:G,forceKillAfterDelay:H,stripFinalNewline:K,ipc:U,ipcInput:B},context:W,verboseInfo:M,fileDescriptors:R,originalStreams:L,onInternalError:I,controller:x})=>{let F=QJ($,W),v={originalStreams:L,fileDescriptors:R,subprocess:$,exitPromise:F,propagating:!1},j=tJ({subprocess:$,encoding:J,buffer:Z,maxBuffer:X,lines:q,stripFinalNewline:K,verboseInfo:M,streamInfo:v}),l=rJ({subprocess:$,encoding:J,buffer:Z,maxBuffer:X,lines:q,stripFinalNewline:K,verboseInfo:M,streamInfo:v}),n=[],o=$Z({subprocess:$,buffer:Z,maxBuffer:X,ipc:U,ipcOutput:n,verboseInfo:M}),L0=rz(L,$,v),p=sz(R,v);try{return await Promise.race([Promise.all([{},YJ(F),Promise.all(j),l,o,N8($,B),...L0,...p]),I,ez($,x),...w8($,Y,W,x),...i7({subprocess:$,cancelSignal:Q,gracefulCancel:G,context:W,controller:x}),...x8({subprocess:$,cancelSignal:Q,gracefulCancel:G,forceKillAfterDelay:H,context:W,controller:x})])}catch(i0){return W.terminationReason??="other",Promise.all([{error:i0},F,Promise.all(j.map((E)=>L3(E))),L3(l),JZ(o,n),Promise.allSettled(L0),Promise.allSettled(p)])}},rz=($,J,Z)=>$.map((X,q)=>X===J.stdio[q]?void 0:_$(X,q,Z)),sz=($,J)=>$.flatMap(({stdioItems:Z},X)=>Z.filter(({value:q,stream:Y=q})=>v0(Y,{checkOpen:!1})&&!D0(Y)).map(({type:q,value:Y,stream:Q=Y})=>_$(Q,X,J,{isSameDirection:I0.has(q),stopOnExit:q==="native"}))),ez=async($,{signal:J})=>{let[Z]=await az($,"error",{signal:J});throw Z};var XZ=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),R$=($,J,Z)=>{let X=$[Z];if(!X.has(J))X.set(J,[]);let q=X.get(J),Y=u0();return q.push(Y),{resolve:Y.resolve.bind(Y),promises:q}},t1=async({resolve:$,promises:J},Z)=>{$();let[X]=await Promise.race([Promise.allSettled([!0,Z]),Promise.all([!1,...J])]);return!X};import{Readable as $K}from"node:stream";import{callbackify as JK}from"node:util";import{finished as QZ}from"node:stream/promises";var T3=async($)=>{if($===void 0)return;try{await M3($)}catch{}},qZ=async($)=>{if($===void 0)return;try{await C3($)}catch{}},M3=async($)=>{await QZ($,{cleanup:!0,readable:!1,writable:!0})},C3=async($)=>{await QZ($,{cleanup:!0,readable:!0,writable:!1})},v4=async($,J)=>{if(await $,J)throw J},f4=($,J,Z)=>{if(Z&&!S4(Z))$.destroy(Z);else if(J)$.destroy()};var YZ=({subprocess:$,concurrentStreams:J,encoding:Z},{from:X,binary:q=!0,preserveNewlines:Y=!0}={})=>{let Q=q||M0.has(Z),{subprocessStdout:G,waitReadableDestroy:H}=F3($,X,J),{readableEncoding:K,readableObjectMode:U,readableHighWaterMark:B}=P3(G,Q),{read:W,onStdoutDataDone:M}=j3({subprocessStdout:G,subprocess:$,binary:Q,encoding:Z,preserveNewlines:Y}),R=new $K({read:W,destroy:JK(I3.bind(void 0,{subprocessStdout:G,subprocess:$,waitReadableDestroy:H})),highWaterMark:B,objectMode:U,encoding:K});return x3({subprocessStdout:G,onStdoutDataDone:M,readable:R,subprocess:$}),R},F3=($,J,Z)=>{let X=c1($,J),q=R$(Z,X,"readableDestroy");return{subprocessStdout:X,waitReadableDestroy:q}},P3=({readableEncoding:$,readableObjectMode:J,readableHighWaterMark:Z},X)=>X?{readableEncoding:$,readableObjectMode:J,readableHighWaterMark:Z}:{readableEncoding:$,readableObjectMode:!0,readableHighWaterMark:V3},j3=({subprocessStdout:$,subprocess:J,binary:Z,encoding:X,preserveNewlines:q})=>{let Y=u0(),Q=D4({subprocessStdout:$,subprocess:J,binary:Z,shouldEncode:!Z,encoding:X,preserveNewlines:q});return{read(){ZK(this,Q,Y)},onStdoutDataDone:Y}},ZK=async($,J,Z)=>{try{let{value:X,done:q}=await J.next();if(q)Z.resolve();else $.push(X)}catch{}},x3=async({subprocessStdout:$,onStdoutDataDone:J,readable:Z,subprocess:X,subprocessStdin:q})=>{try{if(await C3($),await X,await T3(q),await J,Z.readable)Z.push(null)}catch(Y){await T3(q),GZ(Z,Y)}},I3=async({subprocessStdout:$,subprocess:J,waitReadableDestroy:Z},X)=>{if(await t1(Z,J))GZ($,X),await v4(J,X)},GZ=($,J)=>{f4($,$.readable,J)};import{Writable as XK}from"node:stream";import{callbackify as HZ}from"node:util";var zZ=({subprocess:$,concurrentStreams:J},{to:Z}={})=>{let{subprocessStdin:X,waitWritableFinal:q,waitWritableDestroy:Y}=w3($,Z,J),Q=new XK({...O3(X,$,q),destroy:HZ(A3.bind(void 0,{subprocessStdin:X,subprocess:$,waitWritableFinal:q,waitWritableDestroy:Y})),highWaterMark:X.writableHighWaterMark,objectMode:X.writableObjectMode});return E3(X,Q),Q},w3=($,J,Z)=>{let X=a$($,J),q=R$(Z,X,"writableFinal"),Y=R$(Z,X,"writableDestroy");return{subprocessStdin:X,waitWritableFinal:q,waitWritableDestroy:Y}},O3=($,J,Z)=>({write:QK.bind(void 0,$),final:HZ(qK.bind(void 0,$,J,Z))}),QK=($,J,Z,X)=>{if($.write(J,Z))X();else $.once("drain",X)},qK=async($,J,Z)=>{if(await t1(Z,J)){if($.writable)$.end();await J}},E3=async($,J,Z)=>{try{if(await M3($),J.writable)J.end()}catch(X){await qZ(Z),KZ(J,X)}},A3=async({subprocessStdin:$,subprocess:J,waitWritableFinal:Z,waitWritableDestroy:X},q)=>{if(await t1(Z,J),await t1(X,J))KZ($,q),await v4(J,q)},KZ=($,J)=>{f4($,$.writable,J)};import{Duplex as YK}from"node:stream";import{callbackify as GK}from"node:util";var BZ=({subprocess:$,concurrentStreams:J,encoding:Z},{from:X,to:q,binary:Y=!0,preserveNewlines:Q=!0}={})=>{let G=Y||M0.has(Z),{subprocessStdout:H,waitReadableDestroy:K}=F3($,X,J),{subprocessStdin:U,waitWritableFinal:B,waitWritableDestroy:W}=w3($,q,J),{readableEncoding:M,readableObjectMode:R,readableHighWaterMark:L}=P3(H,G),{read:I,onStdoutDataDone:x}=j3({subprocessStdout:H,subprocess:$,binary:G,encoding:Z,preserveNewlines:Q}),F=new YK({read:I,...O3(U,$,B),destroy:GK(HK.bind(void 0,{subprocessStdout:H,subprocessStdin:U,subprocess:$,waitReadableDestroy:K,waitWritableFinal:B,waitWritableDestroy:W})),readableHighWaterMark:L,writableHighWaterMark:U.writableHighWaterMark,readableObjectMode:R,writableObjectMode:U.writableObjectMode,encoding:M});return x3({subprocessStdout:H,onStdoutDataDone:x,readable:F,subprocess:$,subprocessStdin:U}),E3(U,F,H),F},HK=async({subprocessStdout:$,subprocessStdin:J,subprocess:Z,waitReadableDestroy:X,waitWritableFinal:q,waitWritableDestroy:Y},Q)=>{await Promise.all([I3({subprocessStdout:$,subprocess:Z,waitReadableDestroy:X},Q),A3({subprocessStdin:J,subprocess:Z,waitWritableFinal:q,waitWritableDestroy:Y},Q)])};var h3=($,J,{from:Z,binary:X=!1,preserveNewlines:q=!1}={})=>{let Y=X||M0.has(J),Q=c1($,Z),G=D4({subprocessStdout:Q,subprocess:$,binary:Y,shouldEncode:!0,encoding:J,preserveNewlines:q});return zK(G,Q,$)},zK=async function*($,J,Z){try{yield*$}finally{if(J.readable)J.destroy();await Z}};var UZ=($,{encoding:J})=>{let Z=XZ();$.readable=YZ.bind(void 0,{subprocess:$,concurrentStreams:Z,encoding:J}),$.writable=zZ.bind(void 0,{subprocess:$,concurrentStreams:Z}),$.duplex=BZ.bind(void 0,{subprocess:$,concurrentStreams:Z,encoding:J}),$.iterable=h3.bind(void 0,$,J),$[Symbol.asyncIterator]=h3.bind(void 0,$,J,{})};var WZ=($,J)=>{for(let[Z,X]of BK){let q=X.value.bind(J);Reflect.defineProperty($,Z,{...X,value:q})}},KK=(async()=>{})().constructor.prototype,BK=["then","catch","finally"].map(($)=>[$,Reflect.getOwnPropertyDescriptor(KK,$)]);var VZ=($,J,Z,X)=>{let{file:q,commandArguments:Y,command:Q,escapedCommand:G,startTime:H,verboseInfo:K,options:U,fileDescriptors:B}=VK($,J,Z),{subprocess:W,promise:M}=_K({file:q,commandArguments:Y,options:U,startTime:H,verboseInfo:K,command:Q,escapedCommand:G,fileDescriptors:B});return W.pipe=N4.bind(void 0,{source:W,sourcePromise:M,boundOptions:{},createNested:X}),WZ(W,M),m0.set(W,{options:U,fileDescriptors:B}),W},VK=($,J,Z)=>{let{command:X,escapedCommand:q,startTime:Y,verboseInfo:Q}=y$($,J,Z),{file:G,commandArguments:H,options:K}=G4($,J,Z),U=LK(K),B=FJ(U,Q);return{file:G,commandArguments:H,command:X,escapedCommand:q,startTime:Y,verboseInfo:Q,options:U,fileDescriptors:B}},LK=({timeout:$,signal:J,...Z})=>{if(J!==void 0)throw TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...Z,timeoutDuration:$}},_K=({file:$,commandArguments:J,options:Z,startTime:X,verboseInfo:q,command:Y,escapedCommand:Q,fileDescriptors:G})=>{let H;try{H=WK(...H4($,J,Z))}catch(R){return RJ({error:R,command:Y,escapedCommand:Q,fileDescriptors:G,options:Z,startTime:X,verboseInfo:q})}let K=new AbortController;UK(Number.POSITIVE_INFINITY,K.signal);let U=[...H.stdio];NJ(H,G,K),kJ(H,Z,K);let B={},W=u0();H.kill=l7.bind(void 0,{kill:H.kill.bind(H),options:Z,onInternalError:W,context:B,controller:K}),H.all=aJ(H,Z),UZ(H,Z),VJ(H,Z);let M=RK({subprocess:H,options:Z,startTime:X,verboseInfo:q,fileDescriptors:G,originalStreams:U,command:Y,escapedCommand:Q,context:B,onInternalError:W,controller:K});return{subprocess:H,promise:M}},RK=async({subprocess:$,options:J,startTime:Z,verboseInfo:X,fileDescriptors:q,originalStreams:Y,command:Q,escapedCommand:G,context:H,onInternalError:K,controller:U})=>{let[B,[W,M],R,L,I]=await ZZ({subprocess:$,options:J,context:H,verboseInfo:X,fileDescriptors:q,originalStreams:Y,onInternalError:K,controller:U});U.abort(),K.resolve();let x=R.map((j,l)=>e0(j,J,l)),F=e0(L,J,"all"),v=TK({errorInfo:B,exitCode:W,signal:M,stdio:x,all:F,ipcOutput:I,context:H,options:J,command:Q,escapedCommand:G,startTime:Z});return n1(v,X,J)},TK=({errorInfo:$,exitCode:J,signal:Z,stdio:X,all:q,ipcOutput:Y,context:Q,options:G,command:H,escapedCommand:K,startTime:U})=>("error"in $)?B$({error:$.error,command:H,escapedCommand:K,timedOut:Q.terminationReason==="timeout",isCanceled:Q.terminationReason==="cancel"||Q.terminationReason==="gracefulCancel",isGracefullyCanceled:Q.terminationReason==="gracefulCancel",isMaxBuffer:$.error instanceof r0,isForcefullyTerminated:Q.isForcefullyTerminated,exitCode:J,signal:Z,stdio:X,all:q,ipcOutput:Y,options:G,startTime:U,isSync:!1}):R4({command:H,escapedCommand:K,stdio:X,all:q,ipcOutput:Y,options:G,startTime:U});var k4=($,J)=>{let Z=Object.fromEntries(Object.entries(J).map(([X,q])=>[X,MK(X,$[X],q)]));return{...$,...Z}},MK=($,J,Z)=>{if(CK.has($)&&Z0(J)&&Z0(Z))return{...J,...Z};return Z},CK=new Set(["env",...z2]);var q1=($,J,Z,X)=>{let q=(Q,G,H)=>q1(Q,G,Z,H),Y=(...Q)=>FK({mapArguments:$,deepOptions:Z,boundOptions:J,setBoundExeca:X,createNested:q},...Q);if(X!==void 0)X(Y,q,J);return Y},FK=({mapArguments:$,deepOptions:J={},boundOptions:Z={},setBoundExeca:X,createNested:q},Y,...Q)=>{if(Z0(Y))return q($,k4(Z,Y),X);let{file:G,commandArguments:H,options:K,isSync:U}=PK({mapArguments:$,firstArgument:Y,nextArguments:Q,deepOptions:J,boundOptions:Z});return U?HJ(G,H,K):VZ(G,H,K,q)},PK=({mapArguments:$,firstArgument:J,nextArguments:Z,deepOptions:X,boundOptions:q})=>{let Y=F6(J)?P6(J,Z):[J,...Z],[Q,G,H]=O$(...Y),K=k4(k4(X,q),H),{file:U=Q,commandArguments:B=G,options:W=K,isSync:M=!1}=$({file:Q,commandArguments:G,options:K});return{file:U,commandArguments:B,options:W,isSync:M}};var LZ=({file:$,commandArguments:J})=>RZ($,J),_Z=({file:$,commandArguments:J})=>({...RZ($,J),isSync:!0}),RZ=($,J)=>{if(J.length>0)throw TypeError(`The command and its arguments must be passed as a single string: ${$} ${J}.`);let[Z,...X]=jK($);return{file:Z,commandArguments:X}},jK=($)=>{if(typeof $!=="string")throw TypeError(`The command must be a string: ${String($)}.`);let J=$.trim();if(J==="")return[];let Z=[];for(let X of J.split(xK)){let q=Z.at(-1);if(q&&q.endsWith("\\"))Z[Z.length-1]=`${q.slice(0,-1)} ${X}`;else Z.push(X)}return Z},xK=/ +/g;var TZ=($,J,Z)=>{$.sync=J(IK,Z),$.s=$.sync},MZ=({options:$})=>CZ($),IK=({options:$})=>({...CZ($),isSync:!0}),CZ=($)=>({options:{...wK($),...$}}),wK=({input:$,inputFile:J,stdio:Z})=>$===void 0&&J===void 0&&Z===void 0?{stdin:"inherit"}:{},FZ={preferLocal:!0};var PZ=q1(()=>({})),Zj=q1(()=>({isSync:!0})),Xj=q1(LZ),Qj=q1(_Z),qj=q1(E8),Yj=q1(MZ,{},FZ,TZ),{sendMessage:Gj,getOneMessage:Hj,getEachMessage:zj,getCancelSignal:Kj}=LJ();var T$=X$(D3(),1);import{stdin as DK,stdout as SK}from"node:process";import*as Y1 from"node:readline";function vK({onlyFirst:$=!1}={}){let J=["[\\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(J,$?void 0:"g")}var Lj=vK();function AZ($){return $&&$.__esModule&&Object.prototype.hasOwnProperty.call($,"default")?$.default:$}var hZ={exports:{}};(function($){var J={};$.exports=J,J.eastAsianWidth=function(X){var q=X.charCodeAt(0),Y=X.length==2?X.charCodeAt(1):0,Q=q;return 55296<=q&&q<=56319&&56320<=Y&&Y<=57343&&(q&=1023,Y&=1023,Q=q<<10|Y,Q+=65536),Q==12288||65281<=Q&&Q<=65376||65504<=Q&&Q<=65510?"F":Q==8361||65377<=Q&&Q<=65470||65474<=Q&&Q<=65479||65482<=Q&&Q<=65487||65490<=Q&&Q<=65495||65498<=Q&&Q<=65500||65512<=Q&&Q<=65518?"H":4352<=Q&&Q<=4447||4515<=Q&&Q<=4519||4602<=Q&&Q<=4607||9001<=Q&&Q<=9002||11904<=Q&&Q<=11929||11931<=Q&&Q<=12019||12032<=Q&&Q<=12245||12272<=Q&&Q<=12283||12289<=Q&&Q<=12350||12353<=Q&&Q<=12438||12441<=Q&&Q<=12543||12549<=Q&&Q<=12589||12593<=Q&&Q<=12686||12688<=Q&&Q<=12730||12736<=Q&&Q<=12771||12784<=Q&&Q<=12830||12832<=Q&&Q<=12871||12880<=Q&&Q<=13054||13056<=Q&&Q<=19903||19968<=Q&&Q<=42124||42128<=Q&&Q<=42182||43360<=Q&&Q<=43388||44032<=Q&&Q<=55203||55216<=Q&&Q<=55238||55243<=Q&&Q<=55291||63744<=Q&&Q<=64255||65040<=Q&&Q<=65049||65072<=Q&&Q<=65106||65108<=Q&&Q<=65126||65128<=Q&&Q<=65131||110592<=Q&&Q<=110593||127488<=Q&&Q<=127490||127504<=Q&&Q<=127546||127552<=Q&&Q<=127560||127568<=Q&&Q<=127569||131072<=Q&&Q<=194367||177984<=Q&&Q<=196605||196608<=Q&&Q<=262141?"W":32<=Q&&Q<=126||162<=Q&&Q<=163||165<=Q&&Q<=166||Q==172||Q==175||10214<=Q&&Q<=10221||10629<=Q&&Q<=10630?"Na":Q==161||Q==164||167<=Q&&Q<=168||Q==170||173<=Q&&Q<=174||176<=Q&&Q<=180||182<=Q&&Q<=186||188<=Q&&Q<=191||Q==198||Q==208||215<=Q&&Q<=216||222<=Q&&Q<=225||Q==230||232<=Q&&Q<=234||236<=Q&&Q<=237||Q==240||242<=Q&&Q<=243||247<=Q&&Q<=250||Q==252||Q==254||Q==257||Q==273||Q==275||Q==283||294<=Q&&Q<=295||Q==299||305<=Q&&Q<=307||Q==312||319<=Q&&Q<=322||Q==324||328<=Q&&Q<=331||Q==333||338<=Q&&Q<=339||358<=Q&&Q<=359||Q==363||Q==462||Q==464||Q==466||Q==468||Q==470||Q==472||Q==474||Q==476||Q==593||Q==609||Q==708||Q==711||713<=Q&&Q<=715||Q==717||Q==720||728<=Q&&Q<=731||Q==733||Q==735||768<=Q&&Q<=879||913<=Q&&Q<=929||931<=Q&&Q<=937||945<=Q&&Q<=961||963<=Q&&Q<=969||Q==1025||1040<=Q&&Q<=1103||Q==1105||Q==8208||8211<=Q&&Q<=8214||8216<=Q&&Q<=8217||8220<=Q&&Q<=8221||8224<=Q&&Q<=8226||8228<=Q&&Q<=8231||Q==8240||8242<=Q&&Q<=8243||Q==8245||Q==8251||Q==8254||Q==8308||Q==8319||8321<=Q&&Q<=8324||Q==8364||Q==8451||Q==8453||Q==8457||Q==8467||Q==8470||8481<=Q&&Q<=8482||Q==8486||Q==8491||8531<=Q&&Q<=8532||8539<=Q&&Q<=8542||8544<=Q&&Q<=8555||8560<=Q&&Q<=8569||Q==8585||8592<=Q&&Q<=8601||8632<=Q&&Q<=8633||Q==8658||Q==8660||Q==8679||Q==8704||8706<=Q&&Q<=8707||8711<=Q&&Q<=8712||Q==8715||Q==8719||Q==8721||Q==8725||Q==8730||8733<=Q&&Q<=8736||Q==8739||Q==8741||8743<=Q&&Q<=8748||Q==8750||8756<=Q&&Q<=8759||8764<=Q&&Q<=8765||Q==8776||Q==8780||Q==8786||8800<=Q&&Q<=8801||8804<=Q&&Q<=8807||8810<=Q&&Q<=8811||8814<=Q&&Q<=8815||8834<=Q&&Q<=8835||8838<=Q&&Q<=8839||Q==8853||Q==8857||Q==8869||Q==8895||Q==8978||9312<=Q&&Q<=9449||9451<=Q&&Q<=9547||9552<=Q&&Q<=9587||9600<=Q&&Q<=9615||9618<=Q&&Q<=9621||9632<=Q&&Q<=9633||9635<=Q&&Q<=9641||9650<=Q&&Q<=9651||9654<=Q&&Q<=9655||9660<=Q&&Q<=9661||9664<=Q&&Q<=9665||9670<=Q&&Q<=9672||Q==9675||9678<=Q&&Q<=9681||9698<=Q&&Q<=9701||Q==9711||9733<=Q&&Q<=9734||Q==9737||9742<=Q&&Q<=9743||9748<=Q&&Q<=9749||Q==9756||Q==9758||Q==9792||Q==9794||9824<=Q&&Q<=9825||9827<=Q&&Q<=9829||9831<=Q&&Q<=9834||9836<=Q&&Q<=9837||Q==9839||9886<=Q&&Q<=9887||9918<=Q&&Q<=9919||9924<=Q&&Q<=9933||9935<=Q&&Q<=9953||Q==9955||9960<=Q&&Q<=9983||Q==10045||Q==10071||10102<=Q&&Q<=10111||11093<=Q&&Q<=11097||12872<=Q&&Q<=12879||57344<=Q&&Q<=63743||65024<=Q&&Q<=65039||Q==65533||127232<=Q&&Q<=127242||127248<=Q&&Q<=127277||127280<=Q&&Q<=127337||127344<=Q&&Q<=127386||917760<=Q&&Q<=917999||983040<=Q&&Q<=1048573||1048576<=Q&&Q<=1114109?"A":"N"},J.characterLength=function(X){var q=this.eastAsianWidth(X);return q=="F"||q=="W"||q=="A"?2:1};function Z(X){return X.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}J.length=function(X){for(var q=Z(X),Y=0,Q=0;Q<q.length;Q++)Y=Y+this.characterLength(q[Q]);return Y},J.slice=function(X,q,Y){textLen=J.length(X),q=q||0,Y=Y||1,q<0&&(q=textLen+q),Y<0&&(Y=textLen+Y);for(var Q="",G=0,H=Z(X),K=0;K<H.length;K++){var U=H[K],B=J.length(U);if(G>=q-(B==2?1:0))if(G+B<=Y)Q+=U;else break;G+=B}return Q}})(hZ);var fK=hZ.exports,_j=AZ(fK),kK=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},Rj=AZ(kK);var f3=10,wZ=($=0)=>(J)=>`\x1B[${J+$}m`,OZ=($=0)=>(J)=>`\x1B[${38+$};5;${J}m`,EZ=($=0)=>(J,Z,X)=>`\x1B[${38+$};2;${J};${Z};${X}m`,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(e.modifier);var bK=Object.keys(e.color),yK=Object.keys(e.bgColor);[...bK,...yK];function gK(){let $=new Map;for(let[J,Z]of Object.entries(e)){for(let[X,q]of Object.entries(Z))e[X]={open:`\x1B[${q[0]}m`,close:`\x1B[${q[1]}m`},Z[X]=e[X],$.set(q[0],q[1]);Object.defineProperty(e,J,{value:Z,enumerable:!1})}return Object.defineProperty(e,"codes",{value:$,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=wZ(),e.color.ansi256=OZ(),e.color.ansi16m=EZ(),e.bgColor.ansi=wZ(f3),e.bgColor.ansi256=OZ(f3),e.bgColor.ansi16m=EZ(f3),Object.defineProperties(e,{rgbToAnsi256:{value:(J,Z,X)=>J===Z&&Z===X?J<8?16:J>248?231:Math.round((J-8)/247*24)+232:16+36*Math.round(J/255*5)+6*Math.round(Z/255*5)+Math.round(X/255*5),enumerable:!1},hexToRgb:{value:(J)=>{let Z=/[a-f\d]{6}|[a-f\d]{3}/i.exec(J.toString(16));if(!Z)return[0,0,0];let[X]=Z;X.length===3&&(X=[...X].map((Y)=>Y+Y).join(""));let q=Number.parseInt(X,16);return[q>>16&255,q>>8&255,q&255]},enumerable:!1},hexToAnsi256:{value:(J)=>e.rgbToAnsi256(...e.hexToRgb(J)),enumerable:!1},ansi256ToAnsi:{value:(J)=>{if(J<8)return 30+J;if(J<16)return 90+(J-8);let Z,X,q;if(J>=232)Z=((J-232)*10+8)/255,X=Z,q=Z;else{J-=16;let G=J%36;Z=Math.floor(J/36)/5,X=Math.floor(G/6)/5,q=G%6/5}let Y=Math.max(Z,X,q)*2;if(Y===0)return 30;let Q=30+(Math.round(q)<<2|Math.round(X)<<1|Math.round(Z));return Y===2&&(Q+=60),Q},enumerable:!1},rgbToAnsi:{value:(J,Z,X)=>e.ansi256ToAnsi(e.rgbToAnsi256(J,Z,X)),enumerable:!1},hexToAnsi:{value:(J)=>e.ansi256ToAnsi(e.hexToAnsi256(J)),enumerable:!1}}),e}var Tj=gK();var uK="]";var Mj=`${uK}8;;`;var mK=["up","down","left","right","space","enter","cancel"],cK={actions:new Set(mK),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]])};function NZ($,J){if(typeof $=="string")return cK.aliases.get($)===J;for(let Z of $)if(Z!==void 0&&NZ(Z,J))return!0;return!1}var pK=globalThis.process.platform.startsWith("win"),Cj=Symbol("clack:cancel");function DZ({input:$=DK,output:J=SK,overwrite:Z=!0,hideCursor:X=!0}={}){let q=Y1.createInterface({input:$,output:J,prompt:"",tabSize:1});Y1.emitKeypressEvents($,q),$.isTTY&&$.setRawMode(!0);let Y=(Q,{name:G,sequence:H})=>{let K=String(Q);if(NZ([K,G,H],"cancel")){X&&J.write(T$.cursor.show),process.exit(0);return}if(!Z)return;Y1.moveCursor(J,G==="return"?0:-1,G==="return"?-1:0,()=>{Y1.clearLine(J,1,()=>{$.once("keypress",Y)})})};return X&&J.write(T$.cursor.hide),$.once("keypress",Y),()=>{$.off("keypress",Y),X&&J.write(T$.cursor.show),$.isTTY&&!pK&&$.setRawMode(!1),q.terminal=!1,q.close()}}var dK;dK=new WeakMap;var B0=X$(v3(),1),g4=X$(D3(),1);import f0 from"node:process";function nK(){return f0.platform!=="win32"?f0.env.TERM!=="linux":!!f0.env.CI||!!f0.env.WT_SESSION||!!f0.env.TERMINUS_SUBLIME||f0.env.ConEmuTask==="{cmd::Cmder}"||f0.env.TERM_PROGRAM==="Terminus-Sublime"||f0.env.TERM_PROGRAM==="vscode"||f0.env.TERM==="xterm-256color"||f0.env.TERM==="alacritty"||f0.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var k3=nK(),X0=($,J)=>k3?$:J,Dj=X0("◆","*"),iK=X0("■","x"),oK=X0("▲","x"),SZ=X0("◇","o"),tK=X0("┌","T"),a1=X0("│","|"),aK=X0("└","—"),Sj=X0("●",">"),vj=X0("○"," "),fj=X0("◻","[•]"),kj=X0("◼","[+]"),bj=X0("◻","[ ]"),yj=X0("▪","•"),gj=X0("─","-"),uj=X0("╮","+"),mj=X0("├","+"),cj=X0("╯","+"),rK=X0("●","•"),sK=X0("◆","*"),eK=X0("▲","!"),$B=X0("■","x");var vZ=($="")=>{process.stdout.write(`${B0.default.gray(tK)} ${$}
45
+ `)},fZ=($="")=>{process.stdout.write(`${B0.default.gray(a1)}
46
+ ${B0.default.gray(aK)} ${$}
47
47
 
48
- `)},m0={message:($="",{symbol:J=K0.default.gray(o1)}={})=>{let X=[`${K0.default.gray(o1)}`];if($){let[Z,...q]=$.split(`
49
- `);X.push(`${J} ${Z}`,...q.map((Y)=>`${K0.default.gray(o1)} ${Y}`))}process.stdout.write(`${X.join(`
48
+ `)},p0={message:($="",{symbol:J=B0.default.gray(a1)}={})=>{let Z=[`${B0.default.gray(a1)}`];if($){let[X,...q]=$.split(`
49
+ `);Z.push(`${J} ${X}`,...q.map((Y)=>`${B0.default.gray(a1)} ${Y}`))}process.stdout.write(`${Z.join(`
50
50
  `)}
51
- `)},info:($)=>{m0.message($,{symbol:K0.default.blue(aB)})},success:($)=>{m0.message($,{symbol:K0.default.green(rB)})},step:($)=>{m0.message($,{symbol:K0.default.green(NX)})},warn:($)=>{m0.message($,{symbol:K0.default.yellow(sB)})},warning:($)=>{m0.warn($)},error:($)=>{m0.message($,{symbol:K0.default.red(eB)})}},cx=`${K0.default.gray(o1)} `;var fX=({indicator:$="dots"}={})=>{let J=f3?["◒","◐","◓","◑"]:["•","o","O","0"],X=f3?80:120,Z=process.env.CI==="true",q,Y,Q=!1,G="",H,B=performance.now(),U=(j)=>{let l=j>1?"Something went wrong":"Canceled";Q&&m(l,j)},K=()=>U(2),W=()=>U(1),P=()=>{process.on("uncaughtExceptionMonitor",K),process.on("unhandledRejection",K),process.on("SIGINT",W),process.on("SIGTERM",W),process.on("exit",U)},R=()=>{process.removeListener("uncaughtExceptionMonitor",K),process.removeListener("unhandledRejection",K),process.removeListener("SIGINT",W),process.removeListener("SIGTERM",W),process.removeListener("exit",U)},L=()=>{if(H===void 0)return;Z&&process.stdout.write(`
51
+ `)},info:($)=>{p0.message($,{symbol:B0.default.blue(rK)})},success:($)=>{p0.message($,{symbol:B0.default.green(sK)})},step:($)=>{p0.message($,{symbol:B0.default.green(SZ)})},warn:($)=>{p0.message($,{symbol:B0.default.yellow(eK)})},warning:($)=>{p0.warn($)},error:($)=>{p0.message($,{symbol:B0.default.red($B)})}},pj=`${B0.default.gray(a1)} `;var kZ=({indicator:$="dots"}={})=>{let J=k3?["◒","◐","◓","◑"]:["•","o","O","0"],Z=k3?80:120,X=process.env.CI==="true",q,Y,Q=!1,G="",H,K=performance.now(),U=(j)=>{let l=j>1?"Something went wrong":"Canceled";Q&&v(l,j)},B=()=>U(2),W=()=>U(1),M=()=>{process.on("uncaughtExceptionMonitor",B),process.on("unhandledRejection",B),process.on("SIGINT",W),process.on("SIGTERM",W),process.on("exit",U)},R=()=>{process.removeListener("uncaughtExceptionMonitor",B),process.removeListener("unhandledRejection",B),process.removeListener("SIGINT",W),process.removeListener("SIGTERM",W),process.removeListener("exit",U)},L=()=>{if(H===void 0)return;X&&process.stdout.write(`
52
52
  `);let j=H.split(`
53
- `);process.stdout.write(b4.cursor.move(-999,j.length-1)),process.stdout.write(b4.erase.down(j.length))},M=(j)=>j.replace(/\.+$/,""),C=(j)=>{let l=(performance.now()-j)/1000,n=Math.floor(l/60),t=Math.floor(l%60);return n>0?`[${n}m ${t}s]`:`[${t}s]`},A=(j="")=>{Q=!0,q=AX(),G=M(j),B=performance.now(),process.stdout.write(`${K0.default.gray(o1)}
54
- `);let l=0,n=0;P(),Y=setInterval(()=>{if(Z&&G===H)return;L(),H=G;let t=K0.default.magenta(J[l]);if(Z)process.stdout.write(`${t} ${G}...`);else if($==="timer")process.stdout.write(`${t} ${G} ${C(B)}`);else{let L0=".".repeat(Math.floor(n)).slice(0,3);process.stdout.write(`${t} ${G}${L0}`)}l=l+1<J.length?l+1:0,n=n<J.length?n+0.125:0},X)},m=(j="",l=0)=>{Q=!1,clearInterval(Y),L();let n=l===0?K0.default.green(NX):l===1?K0.default.red(nB):K0.default.red(iB);G=M(j??G),$==="timer"?process.stdout.write(`${n} ${G} ${C(B)}
53
+ `);process.stdout.write(g4.cursor.move(-999,j.length-1)),process.stdout.write(g4.erase.down(j.length))},I=(j)=>j.replace(/\.+$/,""),x=(j)=>{let l=(performance.now()-j)/1000,n=Math.floor(l/60),o=Math.floor(l%60);return n>0?`[${n}m ${o}s]`:`[${o}s]`},F=(j="")=>{Q=!0,q=DZ(),G=I(j),K=performance.now(),process.stdout.write(`${B0.default.gray(a1)}
54
+ `);let l=0,n=0;M(),Y=setInterval(()=>{if(X&&G===H)return;L(),H=G;let o=B0.default.magenta(J[l]);if(X)process.stdout.write(`${o} ${G}...`);else if($==="timer")process.stdout.write(`${o} ${G} ${x(K)}`);else{let L0=".".repeat(Math.floor(n)).slice(0,3);process.stdout.write(`${o} ${G}${L0}`)}l=l+1<J.length?l+1:0,n=n<J.length?n+0.125:0},Z)},v=(j="",l=0)=>{Q=!1,clearInterval(Y),L();let n=l===0?B0.default.green(SZ):l===1?B0.default.red(iK):B0.default.red(oK);G=I(j??G),$==="timer"?process.stdout.write(`${n} ${G} ${x(K)}
55
55
  `):process.stdout.write(`${n} ${G}
56
- `),R(),q()};return{start:A,stop:m,message:(j="")=>{G=M(j??G)}}};var s4=Z$(D3(),1);import{notStrictEqual as CK,strictEqual as xK}from"assert";var JK={right:QK,center:qK};class kX{constructor($){var J;this.width=$.width,this.wrap=(J=$.wrap)!==null&&J!==void 0?J:!0,this.rows=[]}span(...$){let J=this.div(...$);J.span=!0}resetOutput(){this.rows=[]}div(...$){if($.length===0)this.div("");if(this.wrap&&this.shouldApplyLayoutDSL(...$)&&typeof $[0]==="string")return this.applyLayoutDSL($[0]);let J=$.map((X)=>{if(typeof X==="string")return this.colFromString(X);return X});return this.rows.push(J),J}shouldApplyLayoutDSL(...$){return $.length===1&&typeof $[0]==="string"&&/[\t\n]/.test($[0])}applyLayoutDSL($){let J=$.split(`
57
- `).map((Z)=>Z.split("\t")),X=0;return J.forEach((Z)=>{if(Z.length>1&&F0.stringWidth(Z[0])>X)X=Math.min(Math.floor(this.width*0.5),F0.stringWidth(Z[0]))}),J.forEach((Z)=>{this.div(...Z.map((q,Y)=>{return{text:q.trim(),padding:this.measurePadding(q),width:Y===0&&Z.length>1?X:void 0}}))}),this.rows[this.rows.length-1]}colFromString($){return{text:$,padding:this.measurePadding($)}}measurePadding($){let J=F0.stripAnsi($);return[0,J.match(/\s*$/)[0].length,0,J.match(/^\s*/)[0].length]}toString(){let $=[];return this.rows.forEach((J)=>{this.rowToString(J,$)}),$.filter((J)=>!J.hidden).map((J)=>J.text).join(`
58
- `)}rowToString($,J){return this.rasterize($).forEach((X,Z)=>{let q="";X.forEach((Y,Q)=>{let{width:G}=$[Q],H=this.negatePadding($[Q]),B=Y;if(H>F0.stringWidth(Y))B+=" ".repeat(H-F0.stringWidth(Y));if($[Q].align&&$[Q].align!=="left"&&this.wrap){let K=JK[$[Q].align];if(B=K(B,H),F0.stringWidth(B)<H)B+=" ".repeat((G||0)-F0.stringWidth(B)-1)}let U=$[Q].padding||[0,0,0,0];if(U[3])q+=" ".repeat(U[3]);if(q+=vX($[Q],B,"| "),q+=B,q+=vX($[Q],B," |"),U[1])q+=" ".repeat(U[1]);if(Z===0&&J.length>0)q=this.renderInline(q,J[J.length-1])}),J.push({text:q.replace(/ +$/,""),span:$.span})}),J}renderInline($,J){let X=$.match(/^ */),Z=X?X[0].length:0,q=J.text,Y=F0.stringWidth(q.trimRight());if(!J.span)return $;if(!this.wrap)return J.hidden=!0,q+$;if(Z<Y)return $;return J.hidden=!0,q.trimRight()+" ".repeat(Z-Y)+$.trimLeft()}rasterize($){let J=[],X=this.columnWidths($),Z;return $.forEach((q,Y)=>{if(q.width=X[Y],this.wrap)Z=F0.wrap(q.text,this.negatePadding(q),{hard:!0}).split(`
59
- `);else Z=q.text.split(`
60
- `);if(q.border)Z.unshift("."+"-".repeat(this.negatePadding(q)+2)+"."),Z.push("'"+"-".repeat(this.negatePadding(q)+2)+"'");if(q.padding)Z.unshift(...Array(q.padding[0]||0).fill("")),Z.push(...Array(q.padding[2]||0).fill(""));Z.forEach((Q,G)=>{if(!J[G])J.push([]);let H=J[G];for(let B=0;B<Y;B++)if(H[B]===void 0)H.push("");H.push(Q)})}),J}negatePadding($){let J=$.width||0;if($.padding)J-=($.padding[3]||0)+($.padding[1]||0);if($.border)J-=4;return J}columnWidths($){if(!this.wrap)return $.map((Y)=>{return Y.width||F0.stringWidth(Y.text)});let J=$.length,X=this.width,Z=$.map((Y)=>{if(Y.width)return J--,X-=Y.width,Y.width;return}),q=J?Math.floor(X/J):0;return Z.map((Y,Q)=>{if(Y===void 0)return Math.max(q,XK($[Q]));return Y})}}function vX($,J,X){if($.border){if(/[.']-+[.']/.test(J))return"";if(J.trim().length!==0)return X;return" "}return""}function XK($){let J=$.padding||[],X=1+(J[3]||0)+(J[1]||0);if($.border)return X+4;return X}function ZK(){if(typeof process==="object"&&process.stdout&&process.stdout.columns)return process.stdout.columns;return 80}function QK($,J){$=$.trim();let X=F0.stringWidth($);if(X<J)return" ".repeat(J-X)+$;return $}function qK($,J){$=$.trim();let X=F0.stringWidth($);if(X>=J)return $;return" ".repeat(J-X>>1)+$}var F0;function bX($,J){return F0=J,new kX({width:($===null||$===void 0?void 0:$.width)||ZK(),wrap:$===null||$===void 0?void 0:$.wrap})}var yX=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function v3($){return $.replace(yX,"")}function gX($,J){let[X,Z]=$.match(yX)||["",""];$=v3($);let q="";for(let Y=0;Y<$.length;Y++){if(Y!==0&&Y%J===0)q+=`
61
- `;q+=$.charAt(Y)}if(X&&Z)q=`${X}${q}${Z}`;return q}function k3($){return bX($,{stringWidth:(J)=>{return[...J].length},stripAnsi:v3,wrap:gX})}import{dirname as cX,resolve as uX}from"path";import{readdirSync as YK,statSync as GK}from"fs";function b3($,J){let X=uX(".",$),Z;if(!GK(X).isDirectory())X=cX(X);while(!0){if(Z=J(X,YK(X)),Z)return uX(X,Z);if(X=cX(Z=X),Z===X)break}}import{inspect as jK}from"util";import{readFileSync as IK}from"fs";import{fileURLToPath as wK}from"url";import{format as BK}from"util";import{normalize as KK,resolve as UK}from"path";function F1($){if(!($!==$.toLowerCase()&&$!==$.toUpperCase()))$=$.toLowerCase();if($.indexOf("-")===-1&&$.indexOf("_")===-1)return $;else{let X="",Z=!1,q=$.match(/^-+/);for(let Y=q?q[0].length:0;Y<$.length;Y++){let Q=$.charAt(Y);if(Z)Z=!1,Q=Q.toUpperCase();if(Y!==0&&(Q==="-"||Q==="_"))Z=!0;else if(Q!=="-"&&Q!=="_")X+=Q}return X}}function y4($,J){let X=$.toLowerCase();J=J||"-";let Z="";for(let q=0;q<$.length;q++){let Y=X.charAt(q),Q=$.charAt(q);if(Y!==Q&&q>0)Z+=`${J}${X.charAt(q)}`;else Z+=Q}return Z}function g4($){if($===null||$===void 0)return!1;if(typeof $==="number")return!0;if(/^0x[0-9a-f]+$/i.test($))return!0;if(/^0[^.]/.test($))return!1;return/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test($)}function mX($){if(Array.isArray($))return $.map((Q)=>typeof Q!=="string"?Q+"":Q);$=$.trim();let J=0,X=null,Z=null,q=null,Y=[];for(let Q=0;Q<$.length;Q++){if(X=Z,Z=$.charAt(Q),Z===" "&&!q){if(X!==" ")J++;continue}if(Z===q)q=null;else if((Z==="'"||Z==='"')&&!q)q=Z;if(!Y[J])Y[J]="";Y[J]+=Z}return Y}var w0;(function($){$.BOOLEAN="boolean",$.STRING="string",$.NUMBER="number",$.ARRAY="array"})(w0||(w0={}));var s0;class g3{constructor($){s0=$}parse($,J){let X=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},J),Z=mX($),q=typeof $==="string",Y=HK(Object.assign(Object.create(null),X.alias)),Q=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},X.configuration),G=Object.assign(Object.create(null),X.default),H=X.configObjects||[],B=X.envPrefix,U=Q["populate--"],K=U?"--":"_",W=Object.create(null),P=Object.create(null),R=X.__||s0.format,L={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},M=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,C=new RegExp("^--"+Q["negation-prefix"]+"(.+)");if([].concat(X.array||[]).filter(Boolean).forEach(function(V){let T=typeof V==="object"?V.key:V,x=Object.keys(V).map(function(F){return{boolean:"bools",string:"strings",number:"numbers"}[F]}).filter(Boolean).pop();if(x)L[x][T]=!0;L.arrays[T]=!0,L.keys.push(T)}),[].concat(X.boolean||[]).filter(Boolean).forEach(function(V){L.bools[V]=!0,L.keys.push(V)}),[].concat(X.string||[]).filter(Boolean).forEach(function(V){L.strings[V]=!0,L.keys.push(V)}),[].concat(X.number||[]).filter(Boolean).forEach(function(V){L.numbers[V]=!0,L.keys.push(V)}),[].concat(X.count||[]).filter(Boolean).forEach(function(V){L.counts[V]=!0,L.keys.push(V)}),[].concat(X.normalize||[]).filter(Boolean).forEach(function(V){L.normalize[V]=!0,L.keys.push(V)}),typeof X.narg==="object")Object.entries(X.narg).forEach(([V,T])=>{if(typeof T==="number")L.nargs[V]=T,L.keys.push(V)});if(typeof X.coerce==="object")Object.entries(X.coerce).forEach(([V,T])=>{if(typeof T==="function")L.coercions[V]=T,L.keys.push(V)});if(typeof X.config<"u"){if(Array.isArray(X.config)||typeof X.config==="string")[].concat(X.config).filter(Boolean).forEach(function(V){L.configs[V]=!0});else if(typeof X.config==="object")Object.entries(X.config).forEach(([V,T])=>{if(typeof T==="boolean"||typeof T==="function")L.configs[V]=T})}X$(X.key,Y,X.default,L.arrays),Object.keys(G).forEach(function(V){(L.aliases[V]||[]).forEach(function(T){G[T]=G[V]})});let A=null;$2();let m=[],j=Object.assign(Object.create(null),{_:[]}),l={};for(let V=0;V<Z.length;V++){let T=Z[V],x=T.replace(/^-{3,}/,"---"),F,_,N,w,f,B0;if(T!=="--"&&/^-/.test(T)&&o(T))n(T);else if(x.match(/^---+(=|$)/)){n(T);continue}else if(T.match(/^--.+=/)||!Q["short-option-groups"]&&T.match(/^-.+=/)){if(w=T.match(/^--?([^=]+)=([\s\S]*)$/),w!==null&&Array.isArray(w)&&w.length>=3)if(v(w[1],L.arrays))V=L0(V,w[1],Z,w[2]);else if(v(w[1],L.nargs)!==!1)V=t(V,w[1],Z,w[2]);else p(w[1],w[2],!0)}else if(T.match(C)&&Q["boolean-negation"]){if(w=T.match(C),w!==null&&Array.isArray(w)&&w.length>=2)_=w[1],p(_,v(_,L.arrays)?[!1]:!1)}else if(T.match(/^--.+/)||!Q["short-option-groups"]&&T.match(/^-[^-]+/)){if(w=T.match(/^--?(.+)/),w!==null&&Array.isArray(w)&&w.length>=2)if(_=w[1],v(_,L.arrays))V=L0(V,_,Z);else if(v(_,L.nargs)!==!1)V=t(V,_,Z);else if(f=Z[V+1],f!==void 0&&(!f.match(/^-/)||f.match(M))&&!v(_,L.bools)&&!v(_,L.counts))p(_,f),V++;else if(/^(true|false)$/.test(f))p(_,f),V++;else p(_,u(_))}else if(T.match(/^-.\..+=/)){if(w=T.match(/^-([^=]+)=([\s\S]*)$/),w!==null&&Array.isArray(w)&&w.length>=3)p(w[1],w[2])}else if(T.match(/^-.\..+/)&&!T.match(M)){if(f=Z[V+1],w=T.match(/^-(.\..+)/),w!==null&&Array.isArray(w)&&w.length>=2)if(_=w[1],f!==void 0&&!f.match(/^-/)&&!v(_,L.bools)&&!v(_,L.counts))p(_,f),V++;else p(_,u(_))}else if(T.match(/^-[^-]+/)&&!T.match(M)){N=T.slice(1,-1).split(""),F=!1;for(let _0=0;_0<N.length;_0++){if(f=T.slice(_0+2),N[_0+1]&&N[_0+1]==="="){if(B0=T.slice(_0+3),_=N[_0],v(_,L.arrays))V=L0(V,_,Z,B0);else if(v(_,L.nargs)!==!1)V=t(V,_,Z,B0);else p(_,B0);F=!0;break}if(f==="-"){p(N[_0],f);continue}if(/[A-Za-z]/.test(N[_0])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(f)&&v(f,L.bools)===!1){p(N[_0],f),F=!0;break}if(N[_0+1]&&N[_0+1].match(/\W/)){p(N[_0],f),F=!0;break}else p(N[_0],u(N[_0]))}if(_=T.slice(-1)[0],!F&&_!=="-")if(v(_,L.arrays))V=L0(V,_,Z);else if(v(_,L.nargs)!==!1)V=t(V,_,Z);else if(f=Z[V+1],f!==void 0&&(!/^(-|--)[^-]/.test(f)||f.match(M))&&!v(_,L.bools)&&!v(_,L.counts))p(_,f),V++;else if(/^(true|false)$/.test(f))p(_,f),V++;else p(_,u(_))}else if(T.match(/^-[0-9]$/)&&T.match(M)&&v(T.slice(1),L.bools))_=T.slice(1),p(_,u(_));else if(T==="--"){m=Z.slice(V+1);break}else if(Q["halt-at-non-option"]){m=Z.slice(V);break}else n(T)}if(q0(j,!0),q0(j,!1),D(j),i(),$1(j,L.aliases,G,!0),d(j),Q["set-placeholder-key"])Y0(j);if(Object.keys(L.counts).forEach(function(V){if(!a(j,V.split(".")))p(V,0)}),U&&m.length)j[K]=[];if(m.forEach(function(V){j[K].push(V)}),Q["camel-case-expansion"]&&Q["strip-dashed"])Object.keys(j).filter((V)=>V!=="--"&&V.includes("-")).forEach((V)=>{delete j[V]});if(Q["strip-aliased"])[].concat(...Object.keys(Y).map((V)=>Y[V])).forEach((V)=>{if(Q["camel-case-expansion"]&&V.includes("-"))delete j[V.split(".").map((T)=>F1(T)).join(".")];delete j[V]});function n(V){let T=I("_",V);if(typeof T==="string"||typeof T==="number")j._.push(T)}function t(V,T,x,F){let _,N=v(T,L.nargs);if(N=typeof N!=="number"||isNaN(N)?1:N,N===0){if(!H0(F))A=Error(R("Argument unexpected for: %s",T));return p(T,u(T)),V}let w=H0(F)?0:1;if(Q["nargs-eats-options"]){if(x.length-(V+1)+w<N)A=Error(R("Not enough arguments following: %s",T));w=N}else{for(_=V+1;_<x.length;_++)if(!x[_].match(/^-[^0-9]/)||x[_].match(M)||o(x[_]))w++;else break;if(w<N)A=Error(R("Not enough arguments following: %s",T))}let f=Math.min(w,N);if(!H0(F)&&f>0)p(T,F),f--;for(_=V+1;_<f+V+1;_++)p(T,x[_]);return V+f}function L0(V,T,x,F){let _=[],N=F||x[V+1],w=v(T,L.nargs);if(v(T,L.bools)&&!/^(true|false)$/.test(N))_.push(!0);else if(H0(N)||H0(F)&&/^-/.test(N)&&!M.test(N)&&!o(N)){if(G[T]!==void 0){let f=G[T];_=Array.isArray(f)?f:[f]}}else{if(!H0(F))_.push(O(T,F,!0));for(let f=V+1;f<x.length;f++){if(!Q["greedy-arrays"]&&_.length>0||w&&typeof w==="number"&&_.length>=w)break;if(N=x[f],/^-/.test(N)&&!M.test(N)&&!o(N))break;V=f,_.push(O(T,N,q))}}if(typeof w==="number"&&(w&&_.length<w||isNaN(w)&&_.length===0))A=Error(R("Not enough arguments following: %s",T));return p(T,_),V}function p(V,T,x=q){if(/-/.test(V)&&Q["camel-case-expansion"]){let N=V.split(".").map(function(w){return F1(w)}).join(".");l0(V,N)}let F=O(V,T,x),_=V.split(".");if(n0(j,_,F),L.aliases[V])L.aliases[V].forEach(function(N){let w=N.split(".");n0(j,w,F)});if(_.length>1&&Q["dot-notation"])(L.aliases[_[0]]||[]).forEach(function(N){let w=N.split("."),f=[].concat(_);if(f.shift(),w=w.concat(f),!(L.aliases[V]||[]).includes(w.join(".")))n0(j,w,F)});if(v(V,L.normalize)&&!v(V,L.arrays))[V].concat(L.aliases[V]||[]).forEach(function(w){Object.defineProperty(l,w,{enumerable:!0,get(){return T},set(f){T=typeof f==="string"?s0.normalize(f):f}})})}function l0(V,T){if(!(L.aliases[V]&&L.aliases[V].length))L.aliases[V]=[T],W[T]=!0;if(!(L.aliases[T]&&L.aliases[T].length))l0(T,V)}function O(V,T,x){if(x)T=zK(T);if(v(V,L.bools)||v(V,L.counts)){if(typeof T==="string")T=T==="true"}let F=Array.isArray(T)?T.map(function(_){return I(V,_)}):I(V,T);if(v(V,L.counts)&&(H0(F)||typeof F==="boolean"))F=y3();if(v(V,L.normalize)&&v(V,L.arrays))if(Array.isArray(T))F=T.map((_)=>{return s0.normalize(_)});else F=s0.normalize(T);return F}function I(V,T){if(!Q["parse-positional-numbers"]&&V==="_")return T;if(!v(V,L.strings)&&!v(V,L.bools)&&!Array.isArray(T)){if(g4(T)&&Q["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${T}`)))||!H0(T)&&v(V,L.numbers))T=Number(T)}return T}function D(V){let T=Object.create(null);$1(T,L.aliases,G),Object.keys(L.configs).forEach(function(x){let F=V[x]||T[x];if(F)try{let _=null,N=s0.resolve(s0.cwd(),F),w=L.configs[x];if(typeof w==="function"){try{_=w(N)}catch(f){_=f}if(_ instanceof Error){A=_;return}}else _=s0.require(N);y(_)}catch(_){if(_.name==="PermissionDenied")A=_;else if(V[x])A=Error(R("Invalid JSON config file: %s",F))}})}function y(V,T){Object.keys(V).forEach(function(x){let F=V[x],_=T?T+"."+x:x;if(typeof F==="object"&&F!==null&&!Array.isArray(F)&&Q["dot-notation"])y(F,_);else if(!a(j,_.split("."))||v(_,L.arrays)&&Q["combine-arrays"])p(_,F)})}function i(){if(typeof H<"u")H.forEach(function(V){y(V)})}function q0(V,T){if(typeof B>"u")return;let x=typeof B==="string"?B:"",F=s0.env();Object.keys(F).forEach(function(_){if(x===""||_.lastIndexOf(x,0)===0){let N=_.split("__").map(function(w,f){if(f===0)w=w.substring(x.length);return F1(w)});if((T&&L.configs[N.join(".")]||!T)&&!a(V,N))p(N.join("."),F[_])}})}function d(V){let T,x=new Set;Object.keys(V).forEach(function(F){if(!x.has(F)){if(T=v(F,L.coercions),typeof T==="function")try{let _=I(F,T(V[F]));[].concat(L.aliases[F]||[],F).forEach((N)=>{x.add(N),V[N]=_})}catch(_){A=_}}})}function Y0(V){return L.keys.forEach((T)=>{if(~T.indexOf("."))return;if(typeof V[T]>"u")V[T]=void 0}),V}function $1(V,T,x,F=!1){Object.keys(x).forEach(function(_){if(!a(V,_.split("."))){if(n0(V,_.split("."),x[_]),F)P[_]=!0;(T[_]||[]).forEach(function(N){if(a(V,N.split(".")))return;n0(V,N.split("."),x[_])})}})}function a(V,T){let x=V;if(!Q["dot-notation"])T=[T.join(".")];T.slice(0,-1).forEach(function(_){x=x[_]||{}});let F=T[T.length-1];if(typeof x!=="object")return!1;else return F in x}function n0(V,T,x){let F=V;if(!Q["dot-notation"])T=[T.join(".")];T.slice(0,-1).forEach(function(B0){if(B0=pX(B0),typeof F==="object"&&F[B0]===void 0)F[B0]={};if(typeof F[B0]!=="object"||Array.isArray(F[B0])){if(Array.isArray(F[B0]))F[B0].push({});else F[B0]=[F[B0],{}];F=F[B0][F[B0].length-1]}else F=F[B0]});let _=pX(T[T.length-1]),N=v(T.join("."),L.arrays),w=Array.isArray(x),f=Q["duplicate-arguments-array"];if(!f&&v(_,L.nargs)){if(f=!0,!H0(F[_])&&L.nargs[_]===1||Array.isArray(F[_])&&F[_].length===L.nargs[_])F[_]=void 0}if(x===y3())F[_]=y3(F[_]);else if(Array.isArray(F[_]))if(f&&N&&w)F[_]=Q["flatten-duplicate-arrays"]?F[_].concat(x):(Array.isArray(F[_][0])?F[_]:[F[_]]).concat([x]);else if(!f&&Boolean(N)===Boolean(w))F[_]=x;else F[_]=F[_].concat([x]);else if(F[_]===void 0&&N)F[_]=w?x:[x];else if(f&&!(F[_]===void 0||v(_,L.counts)||v(_,L.bools)))F[_]=[F[_],x];else F[_]=x}function X$(...V){V.forEach(function(T){Object.keys(T||{}).forEach(function(x){if(L.aliases[x])return;L.aliases[x]=[].concat(Y[x]||[]),L.aliases[x].concat(x).forEach(function(F){if(/-/.test(F)&&Q["camel-case-expansion"]){let _=F1(F);if(_!==x&&L.aliases[x].indexOf(_)===-1)L.aliases[x].push(_),W[_]=!0}}),L.aliases[x].concat(x).forEach(function(F){if(F.length>1&&/[A-Z]/.test(F)&&Q["camel-case-expansion"]){let _=y4(F,"-");if(_!==x&&L.aliases[x].indexOf(_)===-1)L.aliases[x].push(_),W[_]=!0}}),L.aliases[x].forEach(function(F){L.aliases[F]=[x].concat(L.aliases[x].filter(function(_){return F!==_}))})})})}function v(V,T){let x=[].concat(L.aliases[V]||[],V),F=Object.keys(T),_=x.find((N)=>F.includes(N));return _?T[_]:!1}function S1(V){let T=Object.keys(L);return[].concat(T.map((F)=>L[F])).some(function(F){return Array.isArray(F)?F.includes(V):F[V]})}function B6(V,...T){return[].concat(...T).some(function(F){let _=V.match(F);return _&&S1(_[1])})}function k(V){if(V.match(M)||!V.match(/^-[^-]+/))return!1;let T=!0,x,F=V.slice(1).split("");for(let _=0;_<F.length;_++){if(x=V.slice(_+2),!S1(F[_])){T=!1;break}if(F[_+1]&&F[_+1]==="="||x==="-"||/[A-Za-z]/.test(F[_])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(x)||F[_+1]&&F[_+1].match(/\W/))break}return T}function o(V){return Q["unknown-options-as-args"]&&G0(V)}function G0(V){if(V=V.replace(/^-{3,}/,"--"),V.match(M))return!1;if(k(V))return!1;return!B6(V,/^-+([^=]+?)=[\s\S]*$/,C,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function u(V){if(!v(V,L.bools)&&!v(V,L.counts)&&`${V}`in G)return G[V];else return W0(J0(V))}function W0(V){return{[w0.BOOLEAN]:!0,[w0.STRING]:"",[w0.NUMBER]:void 0,[w0.ARRAY]:[]}[V]}function J0(V){let T=w0.BOOLEAN;if(v(V,L.strings))T=w0.STRING;else if(v(V,L.numbers))T=w0.NUMBER;else if(v(V,L.bools))T=w0.BOOLEAN;else if(v(V,L.arrays))T=w0.ARRAY;return T}function H0(V){return V===void 0}function $2(){Object.keys(L.counts).find((V)=>{if(v(V,L.arrays))return A=Error(R("Invalid configuration: %s, opts.count excludes opts.array.",V)),!0;else if(v(V,L.nargs))return A=Error(R("Invalid configuration: %s, opts.count excludes opts.narg.",V)),!0;return!1})}return{aliases:Object.assign({},L.aliases),argv:Object.assign(l,j),configuration:Q,defaulted:Object.assign({},P),error:A,newAliases:Object.assign({},W)}}}function HK($){let J=[],X=Object.create(null),Z=!0;Object.keys($).forEach(function(q){J.push([].concat($[q],q))});while(Z){Z=!1;for(let q=0;q<J.length;q++)for(let Y=q+1;Y<J.length;Y++)if(J[q].filter(function(G){return J[Y].indexOf(G)!==-1}).length){J[q]=J[q].concat(J[Y]),J.splice(Y,1),Z=!0;break}}return J.forEach(function(q){q=q.filter(function(Q,G,H){return H.indexOf(Q)===G});let Y=q.pop();if(Y!==void 0&&typeof Y==="string")X[Y]=q}),X}function y3($){return $!==void 0?$+1:1}function pX($){if($==="__proto__")return"___proto___";return $}function zK($){return typeof $==="string"&&($[0]==="'"||$[0]==='"')&&$[$.length-1]===$[0]?$.substring(1,$.length-1):$}var c3,u3,m3,dX=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,lX=(u3=(c3=process===null||process===void 0?void 0:process.versions)===null||c3===void 0?void 0:c3.node)!==null&&u3!==void 0?u3:(m3=process===null||process===void 0?void 0:process.version)===null||m3===void 0?void 0:m3.slice(1);if(lX){if(Number(lX.match(/^([^.]+)/)[1])<dX)throw Error(`yargs parser supports a minimum Node.js version of ${dX}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`)}var WK=process?process.env:{},nX=new g3({cwd:process.cwd,env:()=>{return WK},format:BK,normalize:KK,resolve:UK,require:($)=>{return V0($)}}),P$=function(J,X){return nX.parse(J.slice(),X).argv};P$.detailed=function($,J){return nX.parse($.slice(),J)};P$.camelCase=F1;P$.decamelize=y4;P$.looksLikeNumber=g4;var p3=P$;import{basename as OK,dirname as EK,extname as hK,relative as AK,resolve as eX}from"path";function iX(){if(VK())return 0;return 1}function VK(){return LK()&&!process.defaultApp}function LK(){return!!process.versions.electron}function d3($){return $.slice(iX()+1)}function tX(){return process.argv[iX()]}class r extends Error{constructor($){super($||"yargs error");if(this.name="YError",Error.captureStackTrace)Error.captureStackTrace(this,r)}}import{readFileSync as _K,statSync as RK,writeFile as TK}from"fs";import{format as PK}from"util";import{resolve as FK}from"path";var oX={fs:{readFileSync:_K,writeFile:TK},format:PK,resolve:FK,exists:($)=>{try{return RK($).isFile()}catch(J){return!1}}};var k0;class aX{constructor($){$=$||{},this.directory=$.directory||"./locales",this.updateFiles=typeof $.updateFiles==="boolean"?$.updateFiles:!0,this.locale=$.locale||"en",this.fallbackToLanguage=typeof $.fallbackToLanguage==="boolean"?$.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...$){if(typeof arguments[0]!=="string")return this._taggedLiteral(arguments[0],...arguments);let J=$.shift(),X=function(){};if(typeof $[$.length-1]==="function")X=$.pop();if(X=X||function(){},!this.cache[this.locale])this._readLocaleFile();if(!this.cache[this.locale][J]&&this.updateFiles)this.cache[this.locale][J]=J,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:X});else X();return k0.format.apply(k0.format,[this.cache[this.locale][J]||J].concat($))}__n(){let $=Array.prototype.slice.call(arguments),J=$.shift(),X=$.shift(),Z=$.shift(),q=function(){};if(typeof $[$.length-1]==="function")q=$.pop();if(!this.cache[this.locale])this._readLocaleFile();let Y=Z===1?J:X;if(this.cache[this.locale][J])Y=this.cache[this.locale][J][Z===1?"one":"other"];if(!this.cache[this.locale][J]&&this.updateFiles)this.cache[this.locale][J]={one:J,other:X},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:q});else q();let Q=[Y];if(~Y.indexOf("%d"))Q.push(Z);return k0.format.apply(k0.format,Q.concat($))}setLocale($){this.locale=$}getLocale(){return this.locale}updateLocale($){if(!this.cache[this.locale])this._readLocaleFile();for(let J in $)if(Object.prototype.hasOwnProperty.call($,J))this.cache[this.locale][J]=$[J]}_taggedLiteral($,...J){let X="";return $.forEach(function(Z,q){let Y=J[q+1];if(X+=Z,typeof Y<"u")X+="%s"}),this.__.apply(this,[X].concat([].slice.call(J,1)))}_enqueueWrite($){if(this.writeQueue.push($),this.writeQueue.length===1)this._processWriteQueue()}_processWriteQueue(){let $=this,J=this.writeQueue[0],X=J.directory,Z=J.locale,q=J.cb,Y=this._resolveLocaleFile(X,Z),Q=JSON.stringify(this.cache[Z],null,2);k0.fs.writeFile(Y,Q,"utf-8",function(G){if($.writeQueue.shift(),$.writeQueue.length>0)$._processWriteQueue();q(G)})}_readLocaleFile(){let $={},J=this._resolveLocaleFile(this.directory,this.locale);try{if(k0.fs.readFileSync)$=JSON.parse(k0.fs.readFileSync(J,"utf-8"))}catch(X){if(X instanceof SyntaxError)X.message="syntax error in "+J;if(X.code==="ENOENT")$={};else throw X}this.cache[this.locale]=$}_resolveLocaleFile($,J){let X=k0.resolve($,"./",J+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(X)&&~J.lastIndexOf("_")){let Z=k0.resolve($,"./",J.split("_")[0]+".json");if(this._fileExistsSync(Z))X=Z}return X}_fileExistsSync($){return k0.exists($)}}function rX($,J){k0=J;let X=new aX($);return{__:X.__.bind(X),__n:X.__n.bind(X),setLocale:X.setLocale.bind(X),getLocale:X.getLocale.bind(X),updateLocale:X.updateLocale.bind(X),locale:X.locale}}var MK=($)=>{return rX($,oX)},sX=MK;var NK="require is not supported by ESM",$Z="loading a directory of commands is not supported yet for ESM",F$;try{F$=wK(import.meta.url)}catch($){F$=process.cwd()}var DK=F$.substring(0,F$.lastIndexOf("node_modules")),l3={assert:{notStrictEqual:CK,strictEqual:xK},cliui:k3,findUp:b3,getEnv:($)=>{return process.env[$]},inspect:jK,getCallerFile:()=>{throw new r($Z)},getProcessArgvBin:tX,mainFilename:DK||process.cwd(),Parser:p3,path:{basename:OK,dirname:EK,extname:hK,relative:AK,resolve:eX},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:($,J)=>process.emitWarning($,J),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:IK,require:()=>{throw new r(NK)},requireDirectory:()=>{throw new r($Z)},stringWidth:($)=>{return[...$].length},y18n:sX({directory:eX(F$,"../../../locales"),updateFiles:!1})};function T0($,J,X,Z){X.assert.notStrictEqual($,J,Z)}function n3($,J){J.assert.strictEqual(typeof $,"string")}function a1($){return Object.keys($)}function s($){return!!$&&!!$.then&&typeof $.then==="function"}function Y1($){let X=$.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),Z=/\.*[\][<>]/g,q=X.shift();if(!q)throw Error(`No command found in: ${$}`);let Y={cmd:q.replace(Z,""),demanded:[],optional:[]};return X.forEach((Q,G)=>{let H=!1;if(Q=Q.replace(/\s/g,""),/\.+[\]>]/.test(Q)&&G===X.length-1)H=!0;if(/^\[/.test(Q))Y.optional.push({cmd:Q.replace(Z,"").split("|"),variadic:H});else Y.demanded.push({cmd:Q.replace(Z,"").split("|"),variadic:H})}),Y}var SK=["first","second","third","fourth","fifth","sixth"];function E($,J,X){function Z(){return typeof $==="object"?[{demanded:[],optional:[]},$,J]:[Y1(`cmd ${$}`),J,X]}try{let q=0,[Y,Q,G]=Z(),H=[].slice.call(Q);while(H.length&&H[H.length-1]===void 0)H.pop();let B=G||H.length;if(B<Y.demanded.length)throw new r(`Not enough arguments provided. Expected ${Y.demanded.length} but received ${H.length}.`);let U=Y.demanded.length+Y.optional.length;if(B>U)throw new r(`Too many arguments provided. Expected max ${U} but received ${B}.`);Y.demanded.forEach((K)=>{let W=H.shift(),P=JZ(W);if(K.cmd.filter((L)=>L===P||L==="*").length===0)XZ(P,K.cmd,q);q+=1}),Y.optional.forEach((K)=>{if(H.length===0)return;let W=H.shift(),P=JZ(W);if(K.cmd.filter((L)=>L===P||L==="*").length===0)XZ(P,K.cmd,q);q+=1})}catch(q){console.warn(q.stack)}}function JZ($){if(Array.isArray($))return"array";else if($===null)return"null";return typeof $}function XZ($,J,X){throw new r(`Invalid ${SK[X]||"manyith"} argument. Expected ${J.join(" or ")} but received ${$}.`)}class i3{constructor($){this.globalMiddleware=[],this.frozens=[],this.yargs=$}addMiddleware($,J,X=!0,Z=!1){if(E("<array|function> [boolean] [boolean] [boolean]",[$,J,X],arguments.length),Array.isArray($)){for(let q=0;q<$.length;q++){if(typeof $[q]!=="function")throw Error("middleware must be a function");let Y=$[q];Y.applyBeforeValidation=J,Y.global=X}Array.prototype.push.apply(this.globalMiddleware,$)}else if(typeof $==="function"){let q=$;q.applyBeforeValidation=J,q.global=X,q.mutates=Z,this.globalMiddleware.push($)}return this.yargs}addCoerceMiddleware($,J){let X=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter((Z)=>{let q=[...X[J]||[],J];if(!Z.option)return!0;else return!q.includes(Z.option)}),$.option=J,this.addMiddleware($,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let $=this.frozens.pop();if($!==void 0)this.globalMiddleware=$}reset(){this.globalMiddleware=this.globalMiddleware.filter(($)=>$.global)}}function ZZ($){if(!$)return[];return $.map((J)=>{return J.applyBeforeValidation=!1,J})}function M1($,J,X,Z){return X.reduce((q,Y)=>{if(Y.applyBeforeValidation!==Z)return q;if(Y.mutates){if(Y.applied)return q;Y.applied=!0}if(s(q))return q.then((Q)=>Promise.all([Q,Y(Q,J)])).then(([Q,G])=>Object.assign(Q,G));else{let Q=Y(q,J);return s(Q)?Q.then((G)=>Object.assign(q,G)):Object.assign(q,Q)}},$)}function C1($,J,X=(Z)=>{throw Z}){try{let Z=fK($)?$():$;return s(Z)?Z.then((q)=>J(q)):J(Z)}catch(Z){return X(Z)}}function fK($){return typeof $==="function"}function t3($){for(let J=0,X=Object.keys(V0.cache),Z;J<X.length;J++)if(Z=V0.cache[X[J]],Z.exports===$)return Z;return null}var r1=/(^\*)|(^\$0)/;class qZ{constructor($,J,X,Z){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=Z,this.usage=$,this.globalMiddleware=X,this.validation=J}addDirectory($,J,X,Z){if(Z=Z||{},typeof Z.recurse!=="boolean")Z.recurse=!1;if(!Array.isArray(Z.extensions))Z.extensions=["js"];let q=typeof Z.visit==="function"?Z.visit:(Y)=>Y;Z.visit=(Y,Q,G)=>{let H=q(Y,Q,G);if(H){if(this.requireCache.has(Q))return H;else this.requireCache.add(Q);this.addHandler(H)}return H},this.shim.requireDirectory({require:J,filename:X},$,Z)}addHandler($,J,X,Z,q,Y){let Q=[],G=ZZ(q);if(Z=Z||(()=>{}),Array.isArray($))if(vK($))[$,...Q]=$;else for(let H of $)this.addHandler(H);else if(bK($)){let H=Array.isArray($.command)||typeof $.command==="string"?$.command:this.moduleName($);if($.aliases)H=[].concat(H).concat($.aliases);this.addHandler(H,this.extractDesc($),$.builder,$.handler,$.middlewares,$.deprecated);return}else if(QZ(X)){this.addHandler([$].concat(Q),J,X.builder,X.handler,X.middlewares,X.deprecated);return}if(typeof $==="string"){let H=Y1($);Q=Q.map((K)=>Y1(K).cmd);let B=!1,U=[H.cmd].concat(Q).filter((K)=>{if(r1.test(K))return B=!0,!1;return!0});if(U.length===0&&B)U.push("$0");if(B)H.cmd=U[0],Q=U.slice(1),$=$.replace(r1,H.cmd);if(Q.forEach((K)=>{this.aliasMap[K]=H.cmd}),J!==!1)this.usage.command($,J,B,Q,Y);if(this.handlers[H.cmd]={original:$,description:J,handler:Z,builder:X||{},middlewares:G,deprecated:Y,demanded:H.demanded,optional:H.optional},B)this.defaultCommand=this.handlers[H.cmd]}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand($,J,X,Z,q,Y){let Q=this.handlers[$]||this.handlers[this.aliasMap[$]]||this.defaultCommand,G=J.getInternalMethods().getContext(),H=G.commands.slice(),B=!$;if($)G.commands.push($),G.fullCommands.push(Q.original);let U=this.applyBuilderUpdateUsageAndParse(B,Q,J,X.aliases,H,Z,q,Y);return s(U)?U.then((K)=>this.applyMiddlewareAndGetResult(B,Q,K.innerArgv,G,q,K.aliases,J)):this.applyMiddlewareAndGetResult(B,Q,U.innerArgv,G,q,U.aliases,J)}applyBuilderUpdateUsageAndParse($,J,X,Z,q,Y,Q,G){let H=J.builder,B=X;if(c4(H)){X.getInternalMethods().getUsageInstance().freeze();let U=H(X.getInternalMethods().reset(Z),G);if(s(U))return U.then((K)=>{return B=GZ(K)?K:X,this.parseAndUpdateUsage($,J,B,q,Y,Q)})}else if(kK(H))X.getInternalMethods().getUsageInstance().freeze(),B=X.getInternalMethods().reset(Z),Object.keys(J.builder).forEach((U)=>{B.option(U,H[U])});return this.parseAndUpdateUsage($,J,B,q,Y,Q)}parseAndUpdateUsage($,J,X,Z,q,Y){if($)X.getInternalMethods().getUsageInstance().unfreeze(!0);if(this.shouldUpdateUsage(X))X.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(Z,J),J.description);let Q=X.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,q,Y);return s(Q)?Q.then((G)=>({aliases:X.parsed.aliases,innerArgv:G})):{aliases:X.parsed.aliases,innerArgv:Q}}shouldUpdateUsage($){return!$.getInternalMethods().getUsageInstance().getUsageDisabled()&&$.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler($,J){let X=r1.test(J.original)?J.original.replace(r1,"").trim():J.original,Z=$.filter((q)=>{return!r1.test(q)});return Z.push(X),`$0 ${Z.join(" ")}`}handleValidationAndGetResult($,J,X,Z,q,Y,Q,G){if(!Y.getInternalMethods().getHasOutput()){let H=Y.getInternalMethods().runValidation(q,G,Y.parsed.error,$);X=C1(X,(B)=>{return H(B),B})}if(J.handler&&!Y.getInternalMethods().getHasOutput()){Y.getInternalMethods().setHasOutput();let H=!!Y.getOptions().configuration["populate--"];if(Y.getInternalMethods().postProcess(X,H,!1,!1),X=M1(X,Y,Q,!1),X=C1(X,(B)=>{let U=J.handler(B);return s(U)?U.then(()=>B):B}),!$)Y.getInternalMethods().getUsageInstance().cacheHelpMessage();if(s(X)&&!Y.getInternalMethods().hasParseCallback())X.catch((B)=>{try{Y.getInternalMethods().getUsageInstance().fail(null,B)}catch(U){}})}if(!$)Z.commands.pop(),Z.fullCommands.pop();return X}applyMiddlewareAndGetResult($,J,X,Z,q,Y,Q){let G={};if(q)return X;if(!Q.getInternalMethods().getHasOutput())G=this.populatePositionals(J,X,Z,Q);let H=this.globalMiddleware.getMiddleware().slice(0).concat(J.middlewares),B=M1(X,Q,H,!0);return s(B)?B.then((U)=>this.handleValidationAndGetResult($,J,U,Z,Y,Q,H,G)):this.handleValidationAndGetResult($,J,B,Z,Y,Q,H,G)}populatePositionals($,J,X,Z){J._=J._.slice(X.commands.length);let q=$.demanded.slice(0),Y=$.optional.slice(0),Q={};this.validation.positionalCount(q.length,J._.length);while(q.length){let G=q.shift();this.populatePositional(G,J,Q)}while(Y.length){let G=Y.shift();this.populatePositional(G,J,Q)}return J._=X.commands.concat(J._.map((G)=>""+G)),this.postProcessPositionals(J,Q,this.cmdToParseOptions($.original),Z),Q}populatePositional($,J,X){let Z=$.cmd[0];if($.variadic)X[Z]=J._.splice(0).map(String);else if(J._.length)X[Z]=[String(J._.shift())]}cmdToParseOptions($){let J={array:[],default:{},alias:{},demand:{}},X=Y1($);return X.demanded.forEach((Z)=>{let[q,...Y]=Z.cmd;if(Z.variadic)J.array.push(q),J.default[q]=[];J.alias[q]=Y,J.demand[q]=!0}),X.optional.forEach((Z)=>{let[q,...Y]=Z.cmd;if(Z.variadic)J.array.push(q),J.default[q]=[];J.alias[q]=Y}),J}postProcessPositionals($,J,X,Z){let q=Object.assign({},Z.getOptions());q.default=Object.assign(X.default,q.default);for(let H of Object.keys(X.alias))q.alias[H]=(q.alias[H]||[]).concat(X.alias[H]);q.array=q.array.concat(X.array),q.config={};let Y=[];if(Object.keys(J).forEach((H)=>{J[H].map((B)=>{if(q.configuration["unknown-options-as-args"])q.key[H]=!0;Y.push(`--${H}`),Y.push(B)})}),!Y.length)return;let Q=Object.assign({},q.configuration,{"populate--":!1}),G=this.shim.Parser.detailed(Y,Object.assign({},q,{configuration:Q}));if(G.error)Z.getInternalMethods().getUsageInstance().fail(G.error.message,G.error);else{let H=Object.keys(J);Object.keys(J).forEach((B)=>{H.push(...G.aliases[B])}),Object.keys(G.argv).forEach((B)=>{if(H.includes(B)){if(!J[B])J[B]=G.argv[B];if(!this.isInConfigs(Z,B)&&!this.isDefaulted(Z,B)&&Object.prototype.hasOwnProperty.call($,B)&&Object.prototype.hasOwnProperty.call(G.argv,B)&&(Array.isArray($[B])||Array.isArray(G.argv[B])))$[B]=[].concat($[B],G.argv[B]);else $[B]=G.argv[B]}})}}isDefaulted($,J){let{default:X}=$.getOptions();return Object.prototype.hasOwnProperty.call(X,J)||Object.prototype.hasOwnProperty.call(X,this.shim.Parser.camelCase(J))}isInConfigs($,J){let{configObjects:X}=$.getOptions();return X.some((Z)=>Object.prototype.hasOwnProperty.call(Z,J))||X.some((Z)=>Object.prototype.hasOwnProperty.call(Z,this.shim.Parser.camelCase(J)))}runDefaultBuilderOn($){if(!this.defaultCommand)return;if(this.shouldUpdateUsage($)){let X=r1.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");$.getInternalMethods().getUsageInstance().usage(X,this.defaultCommand.description)}let J=this.defaultCommand.builder;if(c4(J))return J($,!0);else if(!QZ(J))Object.keys(J).forEach((X)=>{$.option(X,J[X])});return}moduleName($){let J=t3($);if(!J)throw Error(`No command name given for module: ${this.shim.inspect($)}`);return this.commandFromFilename(J.filename)}commandFromFilename($){return this.shim.path.basename($,this.shim.path.extname($))}extractDesc({describe:$,description:J,desc:X}){for(let Z of[$,J,X]){if(typeof Z==="string"||Z===!1)return Z;T0(Z,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let $=this.frozens.pop();T0($,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=$}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}}function YZ($,J,X,Z){return new qZ($,J,X,Z)}function QZ($){return typeof $==="object"&&!!$.builder&&typeof $.handler==="function"}function vK($){return $.every((J)=>typeof J==="string")}function c4($){return typeof $==="function"}function kK($){return typeof $==="object"}function bK($){return typeof $==="object"&&!Array.isArray($)}function G1($={},J=()=>!0){let X={};return a1($).forEach((Z)=>{if(J(Z,$[Z]))X[Z]=$[Z]}),X}function H1($){if(typeof process>"u")return;[process.stdout,process.stderr].forEach((J)=>{let X=J;if(X._handle&&X.isTTY&&typeof X._handle.setBlocking==="function")X._handle.setBlocking($)})}function yK($){return typeof $==="boolean"}function zZ($,J){let X=J.y18n.__,Z={},q=[];Z.failFn=function(I){q.push(I)};let Y=null,Q=null,G=!0;Z.showHelpOnFail=function(I=!0,D){let[y,i]=typeof I==="string"?[!0,I]:[I,D];if($.getInternalMethods().isGlobalContext())Q=i;return Y=i,G=y,Z};let H=!1;Z.fail=function(I,D){let y=$.getInternalMethods().getLoggerInstance();if(q.length)for(let i=q.length-1;i>=0;--i){let q0=q[i];if(yK(q0)){if(D)throw D;else if(I)throw Error(I)}else q0(I,D,Z)}else{if($.getExitProcess())H1(!0);if(!H){if(H=!0,G)$.showHelp("error"),y.error();if(I||D)y.error(I||D);let i=Y||Q;if(i){if(I||D)y.error("");y.error(i)}}if(D=D||new r(I),$.getExitProcess())return $.exit(1);else if($.getInternalMethods().hasParseCallback())return $.exit(1,D);else throw D}};let B=[],U=!1;Z.usage=(O,I)=>{if(O===null)return U=!0,B=[],Z;return U=!1,B.push([O,I||""]),Z},Z.getUsage=()=>{return B},Z.getUsageDisabled=()=>{return U},Z.getPositionalGroupName=()=>{return X("Positionals:")};let K=[];Z.example=(O,I)=>{K.push([O,I||""])};let W=[];Z.command=function(I,D,y,i,q0=!1){if(y)W=W.map((d)=>{return d[2]=!1,d});W.push([I,D||"",y,i,q0])},Z.getCommands=()=>W;let P={};Z.describe=function(I,D){if(Array.isArray(I))I.forEach((y)=>{Z.describe(y,D)});else if(typeof I==="object")Object.keys(I).forEach((y)=>{Z.describe(y,I[y])});else P[I]=D},Z.getDescriptions=()=>P;let R=[];Z.epilog=(O)=>{R.push(O)};let L=!1,M;Z.wrap=(O)=>{L=!0,M=O},Z.getWrap=()=>{if(J.getEnv("YARGS_DISABLE_WRAP"))return null;if(!L)M=L0(),L=!0;return M};let C="__yargsString__:";Z.deferY18nLookup=(O)=>C+O,Z.help=function(){if(j)return j;m();let I=$.customScriptName?$.$0:J.path.basename($.$0),D=$.getDemandedOptions(),y=$.getDemandedCommands(),i=$.getDeprecatedOptions(),q0=$.getGroups(),d=$.getOptions(),Y0=[];Y0=Y0.concat(Object.keys(P)),Y0=Y0.concat(Object.keys(D)),Y0=Y0.concat(Object.keys(y)),Y0=Y0.concat(Object.keys(d.default)),Y0=Y0.filter(n),Y0=Object.keys(Y0.reduce((k,o)=>{if(o!=="_")k[o]=!0;return k},{}));let $1=Z.getWrap(),a=J.cliui({width:$1,wrap:!!$1});if(!U){if(B.length)B.forEach((k)=>{if(a.div({text:`${k[0].replace(/\$0/g,I)}`}),k[1])a.div({text:`${k[1]}`,padding:[1,0,0,0]})}),a.div();else if(W.length){let k=null;if(y._)k=`${I} <${X("command")}>
62
- `;else k=`${I} [${X("command")}]
63
- `;a.div(`${k}`)}}if(W.length>1||W.length===1&&!W[0][2]){a.div(X("Commands:"));let k=$.getInternalMethods().getContext(),o=k.commands.length?`${k.commands.join(" ")} `:"";if($.getInternalMethods().getParserConfiguration()["sort-commands"]===!0)W=W.sort((u,W0)=>u[0].localeCompare(W0[0]));let G0=I?`${I} `:"";W.forEach((u)=>{let W0=`${G0}${o}${u[0].replace(/^\$0 ?/,"")}`;a.span({text:W0,padding:[0,2,0,2],width:A(W,$1,`${I}${o}`)+4},{text:u[1]});let J0=[];if(u[2])J0.push(`[${X("default")}]`);if(u[3]&&u[3].length)J0.push(`[${X("aliases:")} ${u[3].join(", ")}]`);if(u[4])if(typeof u[4]==="string")J0.push(`[${X("deprecated: %s",u[4])}]`);else J0.push(`[${X("deprecated")}]`);if(J0.length)a.div({text:J0.join(" "),padding:[0,0,0,2],align:"right"});else a.div()}),a.div()}let n0=(Object.keys(d.alias)||[]).concat(Object.keys($.parsed.newAliases)||[]);Y0=Y0.filter((k)=>!$.parsed.newAliases[k]&&n0.every((o)=>(d.alias[o]||[]).indexOf(k)===-1));let X$=X("Options:");if(!q0[X$])q0[X$]=[];l(Y0,d.alias,q0,X$);let v=(k)=>/^--/.test(u4(k)),S1=Object.keys(q0).filter((k)=>q0[k].length>0).map((k)=>{let o=q0[k].filter(n).map((G0)=>{if(n0.includes(G0))return G0;for(let u=0,W0;(W0=n0[u])!==void 0;u++)if((d.alias[W0]||[]).includes(G0))return W0;return G0});return{groupName:k,normalizedKeys:o}}).filter(({normalizedKeys:k})=>k.length>0).map(({groupName:k,normalizedKeys:o})=>{let G0=o.reduce((u,W0)=>{return u[W0]=[W0].concat(d.alias[W0]||[]).map((J0)=>{if(k===Z.getPositionalGroupName())return J0;else return(/^[0-9]$/.test(J0)?d.boolean.includes(W0)?"-":"--":J0.length>1?"--":"-")+J0}).sort((J0,H0)=>v(J0)===v(H0)?0:v(J0)?1:-1).join(", "),u},{});return{groupName:k,normalizedKeys:o,switches:G0}});if(S1.filter(({groupName:k})=>k!==Z.getPositionalGroupName()).some(({normalizedKeys:k,switches:o})=>!k.every((G0)=>v(o[G0]))))S1.filter(({groupName:k})=>k!==Z.getPositionalGroupName()).forEach(({normalizedKeys:k,switches:o})=>{k.forEach((G0)=>{if(v(o[G0]))o[G0]=gK(o[G0],4)})});if(S1.forEach(({groupName:k,normalizedKeys:o,switches:G0})=>{a.div(k),o.forEach((u)=>{let W0=G0[u],J0=P[u]||"",H0=null;if(J0.includes(C))J0=X(J0.substring(C.length));if(d.boolean.includes(u))H0=`[${X("boolean")}]`;if(d.count.includes(u))H0=`[${X("count")}]`;if(d.string.includes(u))H0=`[${X("string")}]`;if(d.normalize.includes(u))H0=`[${X("string")}]`;if(d.array.includes(u))H0=`[${X("array")}]`;if(d.number.includes(u))H0=`[${X("number")}]`;let $2=(x)=>typeof x==="string"?`[${X("deprecated: %s",x)}]`:`[${X("deprecated")}]`,V=[u in i?$2(i[u]):null,H0,u in D?`[${X("required")}]`:null,d.choices&&d.choices[u]?`[${X("choices:")} ${Z.stringifiedValues(d.choices[u])}]`:null,t(d.default[u],d.defaultDescription[u])].filter(Boolean).join(" ");a.span({text:u4(W0),padding:[0,2,0,2+HZ(W0)],width:A(G0,$1)+4},J0);let T=$.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;if(V&&!T)a.div({text:V,padding:[0,0,0,2],align:"right"});else a.div()}),a.div()}),K.length)a.div(X("Examples:")),K.forEach((k)=>{k[0]=k[0].replace(/\$0/g,I)}),K.forEach((k)=>{if(k[1]==="")a.div({text:k[0],padding:[0,2,0,2]});else a.div({text:k[0],padding:[0,2,0,2],width:A(K,$1)+4},{text:k[1]})}),a.div();if(R.length>0){let k=R.map((o)=>o.replace(/\$0/g,I)).join(`
64
- `);a.div(`${k}
65
- `)}return a.toString().replace(/\s*$/,"")};function A(O,I,D){let y=0;if(!Array.isArray(O))O=Object.values(O).map((i)=>[i]);if(O.forEach((i)=>{y=Math.max(J.stringWidth(D?`${D} ${u4(i[0])}`:u4(i[0]))+HZ(i[0]),y)}),I)y=Math.min(y,parseInt((I*0.5).toString(),10));return y}function m(){let O=$.getDemandedOptions(),I=$.getOptions();(Object.keys(I.alias)||[]).forEach((D)=>{I.alias[D].forEach((y)=>{if(P[y])Z.describe(D,P[y]);if(y in O)$.demandOption(D,O[y]);if(I.boolean.includes(y))$.boolean(D);if(I.count.includes(y))$.count(D);if(I.string.includes(y))$.string(D);if(I.normalize.includes(y))$.normalize(D);if(I.array.includes(y))$.array(D);if(I.number.includes(y))$.number(D)})})}let j;Z.cacheHelpMessage=function(){j=this.help()},Z.clearCachedHelpMessage=function(){j=void 0},Z.hasCachedHelpMessage=function(){return!!j};function l(O,I,D,y){let i=[],q0=null;return Object.keys(D).forEach((d)=>{i=i.concat(D[d])}),O.forEach((d)=>{if(q0=[d].concat(I[d]),!q0.some((Y0)=>i.indexOf(Y0)!==-1))D[y].push(d)}),i}function n(O){return $.getOptions().hiddenOptions.indexOf(O)<0||$.parsed.argv[$.getOptions().showHiddenOpt]}Z.showHelp=(O)=>{let I=$.getInternalMethods().getLoggerInstance();if(!O)O="error";(typeof O==="function"?O:I[O])(Z.help())},Z.functionDescription=(O)=>{return["(",O.name?J.Parser.decamelize(O.name,"-"):X("generated-value"),")"].join("")},Z.stringifiedValues=function(I,D){let y="",i=D||", ",q0=[].concat(I);if(!I||!q0.length)return y;return q0.forEach((d)=>{if(y.length)y+=i;y+=JSON.stringify(d)}),y};function t(O,I){let D=`[${X("default:")} `;if(O===void 0&&!I)return null;if(I)D+=I;else switch(typeof O){case"string":D+=`"${O}"`;break;case"object":D+=JSON.stringify(O);break;default:D+=O}return`${D}]`}function L0(){if(J.process.stdColumns)return Math.min(80,J.process.stdColumns);else return 80}let p=null;Z.version=(O)=>{p=O},Z.showVersion=(O)=>{let I=$.getInternalMethods().getLoggerInstance();if(!O)O="error";(typeof O==="function"?O:I[O])(p)},Z.reset=function(I){return Y=null,H=!1,B=[],U=!1,R=[],K=[],W=[],P=G1(P,(D)=>!I[D]),Z};let l0=[];return Z.freeze=function(){l0.push({failMessage:Y,failureOutput:H,usages:B,usageDisabled:U,epilogs:R,examples:K,commands:W,descriptions:P})},Z.unfreeze=function(I=!1){let D=l0.pop();if(!D)return;if(I)P={...D.descriptions,...P},W=[...D.commands,...W],B=[...D.usages,...B],K=[...D.examples,...K],R=[...D.epilogs,...R];else({failMessage:Y,failureOutput:H,usages:B,usageDisabled:U,epilogs:R,examples:K,commands:W,descriptions:P}=D)},Z}function o3($){return typeof $==="object"}function gK($,J){return o3($)?{text:$.text,indentation:$.indentation+J}:{text:$,indentation:J}}function HZ($){return o3($)?$.indentation:0}function u4($){return o3($)?$.text:$}var BZ=`###-begin-{{app_name}}-completions-###
56
+ `),R(),q()};return{start:F,stop:v,message:(j="")=>{G=I(j??G)}}};var $2=X$(v3(),1);import{notStrictEqual as jB,strictEqual as xB}from"assert";var ZB={right:qB,center:YB};class yZ{constructor($){var J;this.width=$.width,this.wrap=(J=$.wrap)!==null&&J!==void 0?J:!0,this.rows=[]}span(...$){let J=this.div(...$);J.span=!0}resetOutput(){this.rows=[]}div(...$){if($.length===0)this.div("");if(this.wrap&&this.shouldApplyLayoutDSL(...$)&&typeof $[0]==="string")return this.applyLayoutDSL($[0]);let J=$.map((Z)=>{if(typeof Z==="string")return this.colFromString(Z);return Z});return this.rows.push(J),J}shouldApplyLayoutDSL(...$){return $.length===1&&typeof $[0]==="string"&&/[\t\n]/.test($[0])}applyLayoutDSL($){let J=$.split(`
57
+ `).map((X)=>X.split("\t")),Z=0;return J.forEach((X)=>{if(X.length>1&&C0.stringWidth(X[0])>Z)Z=Math.min(Math.floor(this.width*0.5),C0.stringWidth(X[0]))}),J.forEach((X)=>{this.div(...X.map((q,Y)=>{return{text:q.trim(),padding:this.measurePadding(q),width:Y===0&&X.length>1?Z:void 0}}))}),this.rows[this.rows.length-1]}colFromString($){return{text:$,padding:this.measurePadding($)}}measurePadding($){let J=C0.stripAnsi($);return[0,J.match(/\s*$/)[0].length,0,J.match(/^\s*/)[0].length]}toString(){let $=[];return this.rows.forEach((J)=>{this.rowToString(J,$)}),$.filter((J)=>!J.hidden).map((J)=>J.text).join(`
58
+ `)}rowToString($,J){return this.rasterize($).forEach((Z,X)=>{let q="";Z.forEach((Y,Q)=>{let{width:G}=$[Q],H=this.negatePadding($[Q]),K=Y;if(H>C0.stringWidth(Y))K+=" ".repeat(H-C0.stringWidth(Y));if($[Q].align&&$[Q].align!=="left"&&this.wrap){let B=ZB[$[Q].align];if(K=B(K,H),C0.stringWidth(K)<H)K+=" ".repeat((G||0)-C0.stringWidth(K)-1)}let U=$[Q].padding||[0,0,0,0];if(U[3])q+=" ".repeat(U[3]);if(q+=bZ($[Q],K,"| "),q+=K,q+=bZ($[Q],K," |"),U[1])q+=" ".repeat(U[1]);if(X===0&&J.length>0)q=this.renderInline(q,J[J.length-1])}),J.push({text:q.replace(/ +$/,""),span:$.span})}),J}renderInline($,J){let Z=$.match(/^ */),X=Z?Z[0].length:0,q=J.text,Y=C0.stringWidth(q.trimRight());if(!J.span)return $;if(!this.wrap)return J.hidden=!0,q+$;if(X<Y)return $;return J.hidden=!0,q.trimRight()+" ".repeat(X-Y)+$.trimLeft()}rasterize($){let J=[],Z=this.columnWidths($),X;return $.forEach((q,Y)=>{if(q.width=Z[Y],this.wrap)X=C0.wrap(q.text,this.negatePadding(q),{hard:!0}).split(`
59
+ `);else X=q.text.split(`
60
+ `);if(q.border)X.unshift("."+"-".repeat(this.negatePadding(q)+2)+"."),X.push("'"+"-".repeat(this.negatePadding(q)+2)+"'");if(q.padding)X.unshift(...Array(q.padding[0]||0).fill("")),X.push(...Array(q.padding[2]||0).fill(""));X.forEach((Q,G)=>{if(!J[G])J.push([]);let H=J[G];for(let K=0;K<Y;K++)if(H[K]===void 0)H.push("");H.push(Q)})}),J}negatePadding($){let J=$.width||0;if($.padding)J-=($.padding[3]||0)+($.padding[1]||0);if($.border)J-=4;return J}columnWidths($){if(!this.wrap)return $.map((Y)=>{return Y.width||C0.stringWidth(Y.text)});let J=$.length,Z=this.width,X=$.map((Y)=>{if(Y.width)return J--,Z-=Y.width,Y.width;return}),q=J?Math.floor(Z/J):0;return X.map((Y,Q)=>{if(Y===void 0)return Math.max(q,XB($[Q]));return Y})}}function bZ($,J,Z){if($.border){if(/[.']-+[.']/.test(J))return"";if(J.trim().length!==0)return Z;return" "}return""}function XB($){let J=$.padding||[],Z=1+(J[3]||0)+(J[1]||0);if($.border)return Z+4;return Z}function QB(){if(typeof process==="object"&&process.stdout&&process.stdout.columns)return process.stdout.columns;return 80}function qB($,J){$=$.trim();let Z=C0.stringWidth($);if(Z<J)return" ".repeat(J-Z)+$;return $}function YB($,J){$=$.trim();let Z=C0.stringWidth($);if(Z>=J)return $;return" ".repeat(J-Z>>1)+$}var C0;function gZ($,J){return C0=J,new yZ({width:($===null||$===void 0?void 0:$.width)||QB(),wrap:$===null||$===void 0?void 0:$.wrap})}var uZ=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function b3($){return $.replace(uZ,"")}function mZ($,J){let[Z,X]=$.match(uZ)||["",""];$=b3($);let q="";for(let Y=0;Y<$.length;Y++){if(Y!==0&&Y%J===0)q+=`
61
+ `;q+=$.charAt(Y)}if(Z&&X)q=`${Z}${q}${X}`;return q}function y3($){return gZ($,{stringWidth:(J)=>{return[...J].length},stripAnsi:b3,wrap:mZ})}import{dirname as cZ,resolve as pZ}from"path";import{readdirSync as GB,statSync as HB}from"fs";function g3($,J){let Z=pZ(".",$),X;if(!HB(Z).isDirectory())Z=cZ(Z);while(!0){if(X=J(Z,GB(Z)),X)return pZ(Z,X);if(Z=cZ(X=Z),X===Z)break}}import{inspect as IB}from"util";import{readFileSync as wB}from"fs";import{fileURLToPath as OB}from"url";import{format as BB}from"util";import{normalize as UB,resolve as WB}from"path";function C1($){if(!($!==$.toLowerCase()&&$!==$.toUpperCase()))$=$.toLowerCase();if($.indexOf("-")===-1&&$.indexOf("_")===-1)return $;else{let Z="",X=!1,q=$.match(/^-+/);for(let Y=q?q[0].length:0;Y<$.length;Y++){let Q=$.charAt(Y);if(X)X=!1,Q=Q.toUpperCase();if(Y!==0&&(Q==="-"||Q==="_"))X=!0;else if(Q!=="-"&&Q!=="_")Z+=Q}return Z}}function u4($,J){let Z=$.toLowerCase();J=J||"-";let X="";for(let q=0;q<$.length;q++){let Y=Z.charAt(q),Q=$.charAt(q);if(Y!==Q&&q>0)X+=`${J}${Z.charAt(q)}`;else X+=Q}return X}function m4($){if($===null||$===void 0)return!1;if(typeof $==="number")return!0;if(/^0x[0-9a-f]+$/i.test($))return!0;if(/^0[^.]/.test($))return!1;return/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test($)}function dZ($){if(Array.isArray($))return $.map((Q)=>typeof Q!=="string"?Q+"":Q);$=$.trim();let J=0,Z=null,X=null,q=null,Y=[];for(let Q=0;Q<$.length;Q++){if(Z=X,X=$.charAt(Q),X===" "&&!q){if(Z!==" ")J++;continue}if(X===q)q=null;else if((X==="'"||X==='"')&&!q)q=X;if(!Y[J])Y[J]="";Y[J]+=X}return Y}var w0;(function($){$.BOOLEAN="boolean",$.STRING="string",$.NUMBER="number",$.ARRAY="array"})(w0||(w0={}));var $1;class m3{constructor($){$1=$}parse($,J){let Z=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},J),X=dZ($),q=typeof $==="string",Y=zB(Object.assign(Object.create(null),Z.alias)),Q=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},Z.configuration),G=Object.assign(Object.create(null),Z.default),H=Z.configObjects||[],K=Z.envPrefix,U=Q["populate--"],B=U?"--":"_",W=Object.create(null),M=Object.create(null),R=Z.__||$1.format,L={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},I=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,x=new RegExp("^--"+Q["negation-prefix"]+"(.+)");if([].concat(Z.array||[]).filter(Boolean).forEach(function(V){let T=typeof V==="object"?V.key:V,P=Object.keys(V).map(function(C){return{boolean:"bools",string:"strings",number:"numbers"}[C]}).filter(Boolean).pop();if(P)L[P][T]=!0;L.arrays[T]=!0,L.keys.push(T)}),[].concat(Z.boolean||[]).filter(Boolean).forEach(function(V){L.bools[V]=!0,L.keys.push(V)}),[].concat(Z.string||[]).filter(Boolean).forEach(function(V){L.strings[V]=!0,L.keys.push(V)}),[].concat(Z.number||[]).filter(Boolean).forEach(function(V){L.numbers[V]=!0,L.keys.push(V)}),[].concat(Z.count||[]).filter(Boolean).forEach(function(V){L.counts[V]=!0,L.keys.push(V)}),[].concat(Z.normalize||[]).filter(Boolean).forEach(function(V){L.normalize[V]=!0,L.keys.push(V)}),typeof Z.narg==="object")Object.entries(Z.narg).forEach(([V,T])=>{if(typeof T==="number")L.nargs[V]=T,L.keys.push(V)});if(typeof Z.coerce==="object")Object.entries(Z.coerce).forEach(([V,T])=>{if(typeof T==="function")L.coercions[V]=T,L.keys.push(V)});if(typeof Z.config<"u"){if(Array.isArray(Z.config)||typeof Z.config==="string")[].concat(Z.config).filter(Boolean).forEach(function(V){L.configs[V]=!0});else if(typeof Z.config==="object")Object.entries(Z.config).forEach(([V,T])=>{if(typeof T==="boolean"||typeof T==="function")L.configs[V]=T})}Z$(Z.key,Y,Z.default,L.arrays),Object.keys(G).forEach(function(V){(L.aliases[V]||[]).forEach(function(T){G[T]=G[V]})});let F=null;Z2();let v=[],j=Object.assign(Object.create(null),{_:[]}),l={};for(let V=0;V<X.length;V++){let T=X[V],P=T.replace(/^-{3,}/,"---"),C,_,N,O,f,K0;if(T!=="--"&&/^-/.test(T)&&t(T))n(T);else if(P.match(/^---+(=|$)/)){n(T);continue}else if(T.match(/^--.+=/)||!Q["short-option-groups"]&&T.match(/^-.+=/)){if(O=T.match(/^--?([^=]+)=([\s\S]*)$/),O!==null&&Array.isArray(O)&&O.length>=3)if(k(O[1],L.arrays))V=L0(V,O[1],X,O[2]);else if(k(O[1],L.nargs)!==!1)V=o(V,O[1],X,O[2]);else p(O[1],O[2],!0)}else if(T.match(x)&&Q["boolean-negation"]){if(O=T.match(x),O!==null&&Array.isArray(O)&&O.length>=2)_=O[1],p(_,k(_,L.arrays)?[!1]:!1)}else if(T.match(/^--.+/)||!Q["short-option-groups"]&&T.match(/^-[^-]+/)){if(O=T.match(/^--?(.+)/),O!==null&&Array.isArray(O)&&O.length>=2)if(_=O[1],k(_,L.arrays))V=L0(V,_,X);else if(k(_,L.nargs)!==!1)V=o(V,_,X);else if(f=X[V+1],f!==void 0&&(!f.match(/^-/)||f.match(I))&&!k(_,L.bools)&&!k(_,L.counts))p(_,f),V++;else if(/^(true|false)$/.test(f))p(_,f),V++;else p(_,c(_))}else if(T.match(/^-.\..+=/)){if(O=T.match(/^-([^=]+)=([\s\S]*)$/),O!==null&&Array.isArray(O)&&O.length>=3)p(O[1],O[2])}else if(T.match(/^-.\..+/)&&!T.match(I)){if(f=X[V+1],O=T.match(/^-(.\..+)/),O!==null&&Array.isArray(O)&&O.length>=2)if(_=O[1],f!==void 0&&!f.match(/^-/)&&!k(_,L.bools)&&!k(_,L.counts))p(_,f),V++;else p(_,c(_))}else if(T.match(/^-[^-]+/)&&!T.match(I)){N=T.slice(1,-1).split(""),C=!1;for(let _0=0;_0<N.length;_0++){if(f=T.slice(_0+2),N[_0+1]&&N[_0+1]==="="){if(K0=T.slice(_0+3),_=N[_0],k(_,L.arrays))V=L0(V,_,X,K0);else if(k(_,L.nargs)!==!1)V=o(V,_,X,K0);else p(_,K0);C=!0;break}if(f==="-"){p(N[_0],f);continue}if(/[A-Za-z]/.test(N[_0])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(f)&&k(f,L.bools)===!1){p(N[_0],f),C=!0;break}if(N[_0+1]&&N[_0+1].match(/\W/)){p(N[_0],f),C=!0;break}else p(N[_0],c(N[_0]))}if(_=T.slice(-1)[0],!C&&_!=="-")if(k(_,L.arrays))V=L0(V,_,X);else if(k(_,L.nargs)!==!1)V=o(V,_,X);else if(f=X[V+1],f!==void 0&&(!/^(-|--)[^-]/.test(f)||f.match(I))&&!k(_,L.bools)&&!k(_,L.counts))p(_,f),V++;else if(/^(true|false)$/.test(f))p(_,f),V++;else p(_,c(_))}else if(T.match(/^-[0-9]$/)&&T.match(I)&&k(T.slice(1),L.bools))_=T.slice(1),p(_,c(_));else if(T==="--"){v=X.slice(V+1);break}else if(Q["halt-at-non-option"]){v=X.slice(V);break}else n(T)}if(q0(j,!0),q0(j,!1),D(j),i(),J1(j,L.aliases,G,!0),d(j),Q["set-placeholder-key"])Y0(j);if(Object.keys(L.counts).forEach(function(V){if(!a(j,V.split(".")))p(V,0)}),U&&v.length)j[B]=[];if(v.forEach(function(V){j[B].push(V)}),Q["camel-case-expansion"]&&Q["strip-dashed"])Object.keys(j).filter((V)=>V!=="--"&&V.includes("-")).forEach((V)=>{delete j[V]});if(Q["strip-aliased"])[].concat(...Object.keys(Y).map((V)=>Y[V])).forEach((V)=>{if(Q["camel-case-expansion"]&&V.includes("-"))delete j[V.split(".").map((T)=>C1(T)).join(".")];delete j[V]});function n(V){let T=w("_",V);if(typeof T==="string"||typeof T==="number")j._.push(T)}function o(V,T,P,C){let _,N=k(T,L.nargs);if(N=typeof N!=="number"||isNaN(N)?1:N,N===0){if(!H0(C))F=Error(R("Argument unexpected for: %s",T));return p(T,c(T)),V}let O=H0(C)?0:1;if(Q["nargs-eats-options"]){if(P.length-(V+1)+O<N)F=Error(R("Not enough arguments following: %s",T));O=N}else{for(_=V+1;_<P.length;_++)if(!P[_].match(/^-[^0-9]/)||P[_].match(I)||t(P[_]))O++;else break;if(O<N)F=Error(R("Not enough arguments following: %s",T))}let f=Math.min(O,N);if(!H0(C)&&f>0)p(T,C),f--;for(_=V+1;_<f+V+1;_++)p(T,P[_]);return V+f}function L0(V,T,P,C){let _=[],N=C||P[V+1],O=k(T,L.nargs);if(k(T,L.bools)&&!/^(true|false)$/.test(N))_.push(!0);else if(H0(N)||H0(C)&&/^-/.test(N)&&!I.test(N)&&!t(N)){if(G[T]!==void 0){let f=G[T];_=Array.isArray(f)?f:[f]}}else{if(!H0(C))_.push(E(T,C,!0));for(let f=V+1;f<P.length;f++){if(!Q["greedy-arrays"]&&_.length>0||O&&typeof O==="number"&&_.length>=O)break;if(N=P[f],/^-/.test(N)&&!I.test(N)&&!t(N))break;V=f,_.push(E(T,N,q))}}if(typeof O==="number"&&(O&&_.length<O||isNaN(O)&&_.length===0))F=Error(R("Not enough arguments following: %s",T));return p(T,_),V}function p(V,T,P=q){if(/-/.test(V)&&Q["camel-case-expansion"]){let N=V.split(".").map(function(O){return C1(O)}).join(".");i0(V,N)}let C=E(V,T,P),_=V.split(".");if(o0(j,_,C),L.aliases[V])L.aliases[V].forEach(function(N){let O=N.split(".");o0(j,O,C)});if(_.length>1&&Q["dot-notation"])(L.aliases[_[0]]||[]).forEach(function(N){let O=N.split("."),f=[].concat(_);if(f.shift(),O=O.concat(f),!(L.aliases[V]||[]).includes(O.join(".")))o0(j,O,C)});if(k(V,L.normalize)&&!k(V,L.arrays))[V].concat(L.aliases[V]||[]).forEach(function(O){Object.defineProperty(l,O,{enumerable:!0,get(){return T},set(f){T=typeof f==="string"?$1.normalize(f):f}})})}function i0(V,T){if(!(L.aliases[V]&&L.aliases[V].length))L.aliases[V]=[T],W[T]=!0;if(!(L.aliases[T]&&L.aliases[T].length))i0(T,V)}function E(V,T,P){if(P)T=KB(T);if(k(V,L.bools)||k(V,L.counts)){if(typeof T==="string")T=T==="true"}let C=Array.isArray(T)?T.map(function(_){return w(V,_)}):w(V,T);if(k(V,L.counts)&&(H0(C)||typeof C==="boolean"))C=u3();if(k(V,L.normalize)&&k(V,L.arrays))if(Array.isArray(T))C=T.map((_)=>{return $1.normalize(_)});else C=$1.normalize(T);return C}function w(V,T){if(!Q["parse-positional-numbers"]&&V==="_")return T;if(!k(V,L.strings)&&!k(V,L.bools)&&!Array.isArray(T)){if(m4(T)&&Q["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${T}`)))||!H0(T)&&k(V,L.numbers))T=Number(T)}return T}function D(V){let T=Object.create(null);J1(T,L.aliases,G),Object.keys(L.configs).forEach(function(P){let C=V[P]||T[P];if(C)try{let _=null,N=$1.resolve($1.cwd(),C),O=L.configs[P];if(typeof O==="function"){try{_=O(N)}catch(f){_=f}if(_ instanceof Error){F=_;return}}else _=$1.require(N);g(_)}catch(_){if(_.name==="PermissionDenied")F=_;else if(V[P])F=Error(R("Invalid JSON config file: %s",C))}})}function g(V,T){Object.keys(V).forEach(function(P){let C=V[P],_=T?T+"."+P:P;if(typeof C==="object"&&C!==null&&!Array.isArray(C)&&Q["dot-notation"])g(C,_);else if(!a(j,_.split("."))||k(_,L.arrays)&&Q["combine-arrays"])p(_,C)})}function i(){if(typeof H<"u")H.forEach(function(V){g(V)})}function q0(V,T){if(typeof K>"u")return;let P=typeof K==="string"?K:"",C=$1.env();Object.keys(C).forEach(function(_){if(P===""||_.lastIndexOf(P,0)===0){let N=_.split("__").map(function(O,f){if(f===0)O=O.substring(P.length);return C1(O)});if((T&&L.configs[N.join(".")]||!T)&&!a(V,N))p(N.join("."),C[_])}})}function d(V){let T,P=new Set;Object.keys(V).forEach(function(C){if(!P.has(C)){if(T=k(C,L.coercions),typeof T==="function")try{let _=w(C,T(V[C]));[].concat(L.aliases[C]||[],C).forEach((N)=>{P.add(N),V[N]=_})}catch(_){F=_}}})}function Y0(V){return L.keys.forEach((T)=>{if(~T.indexOf("."))return;if(typeof V[T]>"u")V[T]=void 0}),V}function J1(V,T,P,C=!1){Object.keys(P).forEach(function(_){if(!a(V,_.split("."))){if(o0(V,_.split("."),P[_]),C)M[_]=!0;(T[_]||[]).forEach(function(N){if(a(V,N.split(".")))return;o0(V,N.split("."),P[_])})}})}function a(V,T){let P=V;if(!Q["dot-notation"])T=[T.join(".")];T.slice(0,-1).forEach(function(_){P=P[_]||{}});let C=T[T.length-1];if(typeof P!=="object")return!1;else return C in P}function o0(V,T,P){let C=V;if(!Q["dot-notation"])T=[T.join(".")];T.slice(0,-1).forEach(function(K0){if(K0=lZ(K0),typeof C==="object"&&C[K0]===void 0)C[K0]={};if(typeof C[K0]!=="object"||Array.isArray(C[K0])){if(Array.isArray(C[K0]))C[K0].push({});else C[K0]=[C[K0],{}];C=C[K0][C[K0].length-1]}else C=C[K0]});let _=lZ(T[T.length-1]),N=k(T.join("."),L.arrays),O=Array.isArray(P),f=Q["duplicate-arguments-array"];if(!f&&k(_,L.nargs)){if(f=!0,!H0(C[_])&&L.nargs[_]===1||Array.isArray(C[_])&&C[_].length===L.nargs[_])C[_]=void 0}if(P===u3())C[_]=u3(C[_]);else if(Array.isArray(C[_]))if(f&&N&&O)C[_]=Q["flatten-duplicate-arrays"]?C[_].concat(P):(Array.isArray(C[_][0])?C[_]:[C[_]]).concat([P]);else if(!f&&Boolean(N)===Boolean(O))C[_]=P;else C[_]=C[_].concat([P]);else if(C[_]===void 0&&N)C[_]=O?P:[P];else if(f&&!(C[_]===void 0||k(_,L.counts)||k(_,L.bools)))C[_]=[C[_],P];else C[_]=P}function Z$(...V){V.forEach(function(T){Object.keys(T||{}).forEach(function(P){if(L.aliases[P])return;L.aliases[P]=[].concat(Y[P]||[]),L.aliases[P].concat(P).forEach(function(C){if(/-/.test(C)&&Q["camel-case-expansion"]){let _=C1(C);if(_!==P&&L.aliases[P].indexOf(_)===-1)L.aliases[P].push(_),W[_]=!0}}),L.aliases[P].concat(P).forEach(function(C){if(C.length>1&&/[A-Z]/.test(C)&&Q["camel-case-expansion"]){let _=u4(C,"-");if(_!==P&&L.aliases[P].indexOf(_)===-1)L.aliases[P].push(_),W[_]=!0}}),L.aliases[P].forEach(function(C){L.aliases[C]=[P].concat(L.aliases[P].filter(function(_){return C!==_}))})})})}function k(V,T){let P=[].concat(L.aliases[V]||[],V),C=Object.keys(T),_=P.find((N)=>C.includes(N));return _?T[_]:!1}function v1(V){let T=Object.keys(L);return[].concat(T.map((C)=>L[C])).some(function(C){return Array.isArray(C)?C.includes(V):C[V]})}function U6(V,...T){return[].concat(...T).some(function(C){let _=V.match(C);return _&&v1(_[1])})}function b(V){if(V.match(I)||!V.match(/^-[^-]+/))return!1;let T=!0,P,C=V.slice(1).split("");for(let _=0;_<C.length;_++){if(P=V.slice(_+2),!v1(C[_])){T=!1;break}if(C[_+1]&&C[_+1]==="="||P==="-"||/[A-Za-z]/.test(C[_])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(P)||C[_+1]&&C[_+1].match(/\W/))break}return T}function t(V){return Q["unknown-options-as-args"]&&G0(V)}function G0(V){if(V=V.replace(/^-{3,}/,"--"),V.match(I))return!1;if(b(V))return!1;return!U6(V,/^-+([^=]+?)=[\s\S]*$/,x,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function c(V){if(!k(V,L.bools)&&!k(V,L.counts)&&`${V}`in G)return G[V];else return W0(J0(V))}function W0(V){return{[w0.BOOLEAN]:!0,[w0.STRING]:"",[w0.NUMBER]:void 0,[w0.ARRAY]:[]}[V]}function J0(V){let T=w0.BOOLEAN;if(k(V,L.strings))T=w0.STRING;else if(k(V,L.numbers))T=w0.NUMBER;else if(k(V,L.bools))T=w0.BOOLEAN;else if(k(V,L.arrays))T=w0.ARRAY;return T}function H0(V){return V===void 0}function Z2(){Object.keys(L.counts).find((V)=>{if(k(V,L.arrays))return F=Error(R("Invalid configuration: %s, opts.count excludes opts.array.",V)),!0;else if(k(V,L.nargs))return F=Error(R("Invalid configuration: %s, opts.count excludes opts.narg.",V)),!0;return!1})}return{aliases:Object.assign({},L.aliases),argv:Object.assign(l,j),configuration:Q,defaulted:Object.assign({},M),error:F,newAliases:Object.assign({},W)}}}function zB($){let J=[],Z=Object.create(null),X=!0;Object.keys($).forEach(function(q){J.push([].concat($[q],q))});while(X){X=!1;for(let q=0;q<J.length;q++)for(let Y=q+1;Y<J.length;Y++)if(J[q].filter(function(G){return J[Y].indexOf(G)!==-1}).length){J[q]=J[q].concat(J[Y]),J.splice(Y,1),X=!0;break}}return J.forEach(function(q){q=q.filter(function(Q,G,H){return H.indexOf(Q)===G});let Y=q.pop();if(Y!==void 0&&typeof Y==="string")Z[Y]=q}),Z}function u3($){return $!==void 0?$+1:1}function lZ($){if($==="__proto__")return"___proto___";return $}function KB($){return typeof $==="string"&&($[0]==="'"||$[0]==='"')&&$[$.length-1]===$[0]?$.substring(1,$.length-1):$}var c3,p3,d3,nZ=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,iZ=(p3=(c3=process===null||process===void 0?void 0:process.versions)===null||c3===void 0?void 0:c3.node)!==null&&p3!==void 0?p3:(d3=process===null||process===void 0?void 0:process.version)===null||d3===void 0?void 0:d3.slice(1);if(iZ){if(Number(iZ.match(/^([^.]+)/)[1])<nZ)throw Error(`yargs parser supports a minimum Node.js version of ${nZ}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`)}var VB=process?process.env:{},oZ=new m3({cwd:process.cwd,env:()=>{return VB},format:BB,normalize:UB,resolve:WB,require:($)=>{return V0($)}}),M$=function(J,Z){return oZ.parse(J.slice(),Z).argv};M$.detailed=function($,J){return oZ.parse($.slice(),J)};M$.camelCase=C1;M$.decamelize=u4;M$.looksLikeNumber=m4;var l3=M$;import{basename as EB,dirname as AB,extname as hB,relative as NB,resolve as JX}from"path";function tZ(){if(LB())return 0;return 1}function LB(){return _B()&&!process.defaultApp}function _B(){return!!process.versions.electron}function n3($){return $.slice(tZ()+1)}function aZ(){return process.argv[tZ()]}class r extends Error{constructor($){super($||"yargs error");if(this.name="YError",Error.captureStackTrace)Error.captureStackTrace(this,r)}}import{readFileSync as RB,statSync as TB,writeFile as MB}from"fs";import{format as CB}from"util";import{resolve as FB}from"path";var rZ={fs:{readFileSync:RB,writeFile:MB},format:CB,resolve:FB,exists:($)=>{try{return TB($).isFile()}catch(J){return!1}}};var k0;class sZ{constructor($){$=$||{},this.directory=$.directory||"./locales",this.updateFiles=typeof $.updateFiles==="boolean"?$.updateFiles:!0,this.locale=$.locale||"en",this.fallbackToLanguage=typeof $.fallbackToLanguage==="boolean"?$.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...$){if(typeof arguments[0]!=="string")return this._taggedLiteral(arguments[0],...arguments);let J=$.shift(),Z=function(){};if(typeof $[$.length-1]==="function")Z=$.pop();if(Z=Z||function(){},!this.cache[this.locale])this._readLocaleFile();if(!this.cache[this.locale][J]&&this.updateFiles)this.cache[this.locale][J]=J,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:Z});else Z();return k0.format.apply(k0.format,[this.cache[this.locale][J]||J].concat($))}__n(){let $=Array.prototype.slice.call(arguments),J=$.shift(),Z=$.shift(),X=$.shift(),q=function(){};if(typeof $[$.length-1]==="function")q=$.pop();if(!this.cache[this.locale])this._readLocaleFile();let Y=X===1?J:Z;if(this.cache[this.locale][J])Y=this.cache[this.locale][J][X===1?"one":"other"];if(!this.cache[this.locale][J]&&this.updateFiles)this.cache[this.locale][J]={one:J,other:Z},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:q});else q();let Q=[Y];if(~Y.indexOf("%d"))Q.push(X);return k0.format.apply(k0.format,Q.concat($))}setLocale($){this.locale=$}getLocale(){return this.locale}updateLocale($){if(!this.cache[this.locale])this._readLocaleFile();for(let J in $)if(Object.prototype.hasOwnProperty.call($,J))this.cache[this.locale][J]=$[J]}_taggedLiteral($,...J){let Z="";return $.forEach(function(X,q){let Y=J[q+1];if(Z+=X,typeof Y<"u")Z+="%s"}),this.__.apply(this,[Z].concat([].slice.call(J,1)))}_enqueueWrite($){if(this.writeQueue.push($),this.writeQueue.length===1)this._processWriteQueue()}_processWriteQueue(){let $=this,J=this.writeQueue[0],Z=J.directory,X=J.locale,q=J.cb,Y=this._resolveLocaleFile(Z,X),Q=JSON.stringify(this.cache[X],null,2);k0.fs.writeFile(Y,Q,"utf-8",function(G){if($.writeQueue.shift(),$.writeQueue.length>0)$._processWriteQueue();q(G)})}_readLocaleFile(){let $={},J=this._resolveLocaleFile(this.directory,this.locale);try{if(k0.fs.readFileSync)$=JSON.parse(k0.fs.readFileSync(J,"utf-8"))}catch(Z){if(Z instanceof SyntaxError)Z.message="syntax error in "+J;if(Z.code==="ENOENT")$={};else throw Z}this.cache[this.locale]=$}_resolveLocaleFile($,J){let Z=k0.resolve($,"./",J+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(Z)&&~J.lastIndexOf("_")){let X=k0.resolve($,"./",J.split("_")[0]+".json");if(this._fileExistsSync(X))Z=X}return Z}_fileExistsSync($){return k0.exists($)}}function eZ($,J){k0=J;let Z=new sZ($);return{__:Z.__.bind(Z),__n:Z.__n.bind(Z),setLocale:Z.setLocale.bind(Z),getLocale:Z.getLocale.bind(Z),updateLocale:Z.updateLocale.bind(Z),locale:Z.locale}}var PB=($)=>{return eZ($,rZ)},$X=PB;var DB="require is not supported by ESM",ZX="loading a directory of commands is not supported yet for ESM",C$;try{C$=OB(import.meta.url)}catch($){C$=process.cwd()}var SB=C$.substring(0,C$.lastIndexOf("node_modules")),i3={assert:{notStrictEqual:jB,strictEqual:xB},cliui:y3,findUp:g3,getEnv:($)=>{return process.env[$]},inspect:IB,getCallerFile:()=>{throw new r(ZX)},getProcessArgvBin:aZ,mainFilename:SB||process.cwd(),Parser:l3,path:{basename:EB,dirname:AB,extname:hB,relative:NB,resolve:JX},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:($,J)=>process.emitWarning($,J),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:wB,require:()=>{throw new r(DB)},requireDirectory:()=>{throw new r(ZX)},stringWidth:($)=>{return[...$].length},y18n:$X({directory:JX(C$,"../../../locales"),updateFiles:!1})};function T0($,J,Z,X){Z.assert.notStrictEqual($,J,X)}function o3($,J){J.assert.strictEqual(typeof $,"string")}function r1($){return Object.keys($)}function s($){return!!$&&!!$.then&&typeof $.then==="function"}function G1($){let Z=$.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),X=/\.*[\][<>]/g,q=Z.shift();if(!q)throw Error(`No command found in: ${$}`);let Y={cmd:q.replace(X,""),demanded:[],optional:[]};return Z.forEach((Q,G)=>{let H=!1;if(Q=Q.replace(/\s/g,""),/\.+[\]>]/.test(Q)&&G===Z.length-1)H=!0;if(/^\[/.test(Q))Y.optional.push({cmd:Q.replace(X,"").split("|"),variadic:H});else Y.demanded.push({cmd:Q.replace(X,"").split("|"),variadic:H})}),Y}var vB=["first","second","third","fourth","fifth","sixth"];function A($,J,Z){function X(){return typeof $==="object"?[{demanded:[],optional:[]},$,J]:[G1(`cmd ${$}`),J,Z]}try{let q=0,[Y,Q,G]=X(),H=[].slice.call(Q);while(H.length&&H[H.length-1]===void 0)H.pop();let K=G||H.length;if(K<Y.demanded.length)throw new r(`Not enough arguments provided. Expected ${Y.demanded.length} but received ${H.length}.`);let U=Y.demanded.length+Y.optional.length;if(K>U)throw new r(`Too many arguments provided. Expected max ${U} but received ${K}.`);Y.demanded.forEach((B)=>{let W=H.shift(),M=XX(W);if(B.cmd.filter((L)=>L===M||L==="*").length===0)QX(M,B.cmd,q);q+=1}),Y.optional.forEach((B)=>{if(H.length===0)return;let W=H.shift(),M=XX(W);if(B.cmd.filter((L)=>L===M||L==="*").length===0)QX(M,B.cmd,q);q+=1})}catch(q){console.warn(q.stack)}}function XX($){if(Array.isArray($))return"array";else if($===null)return"null";return typeof $}function QX($,J,Z){throw new r(`Invalid ${vB[Z]||"manyith"} argument. Expected ${J.join(" or ")} but received ${$}.`)}class t3{constructor($){this.globalMiddleware=[],this.frozens=[],this.yargs=$}addMiddleware($,J,Z=!0,X=!1){if(A("<array|function> [boolean] [boolean] [boolean]",[$,J,Z],arguments.length),Array.isArray($)){for(let q=0;q<$.length;q++){if(typeof $[q]!=="function")throw Error("middleware must be a function");let Y=$[q];Y.applyBeforeValidation=J,Y.global=Z}Array.prototype.push.apply(this.globalMiddleware,$)}else if(typeof $==="function"){let q=$;q.applyBeforeValidation=J,q.global=Z,q.mutates=X,this.globalMiddleware.push($)}return this.yargs}addCoerceMiddleware($,J){let Z=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter((X)=>{let q=[...Z[J]||[],J];if(!X.option)return!0;else return!q.includes(X.option)}),$.option=J,this.addMiddleware($,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let $=this.frozens.pop();if($!==void 0)this.globalMiddleware=$}reset(){this.globalMiddleware=this.globalMiddleware.filter(($)=>$.global)}}function qX($){if(!$)return[];return $.map((J)=>{return J.applyBeforeValidation=!1,J})}function F1($,J,Z,X){return Z.reduce((q,Y)=>{if(Y.applyBeforeValidation!==X)return q;if(Y.mutates){if(Y.applied)return q;Y.applied=!0}if(s(q))return q.then((Q)=>Promise.all([Q,Y(Q,J)])).then(([Q,G])=>Object.assign(Q,G));else{let Q=Y(q,J);return s(Q)?Q.then((G)=>Object.assign(q,G)):Object.assign(q,Q)}},$)}function P1($,J,Z=(X)=>{throw X}){try{let X=fB($)?$():$;return s(X)?X.then((q)=>J(q)):J(X)}catch(X){return Z(X)}}function fB($){return typeof $==="function"}function a3($){for(let J=0,Z=Object.keys(V0.cache),X;J<Z.length;J++)if(X=V0.cache[Z[J]],X.exports===$)return X;return null}var s1=/(^\*)|(^\$0)/;class GX{constructor($,J,Z,X){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=X,this.usage=$,this.globalMiddleware=Z,this.validation=J}addDirectory($,J,Z,X){if(X=X||{},typeof X.recurse!=="boolean")X.recurse=!1;if(!Array.isArray(X.extensions))X.extensions=["js"];let q=typeof X.visit==="function"?X.visit:(Y)=>Y;X.visit=(Y,Q,G)=>{let H=q(Y,Q,G);if(H){if(this.requireCache.has(Q))return H;else this.requireCache.add(Q);this.addHandler(H)}return H},this.shim.requireDirectory({require:J,filename:Z},$,X)}addHandler($,J,Z,X,q,Y){let Q=[],G=qX(q);if(X=X||(()=>{}),Array.isArray($))if(kB($))[$,...Q]=$;else for(let H of $)this.addHandler(H);else if(yB($)){let H=Array.isArray($.command)||typeof $.command==="string"?$.command:this.moduleName($);if($.aliases)H=[].concat(H).concat($.aliases);this.addHandler(H,this.extractDesc($),$.builder,$.handler,$.middlewares,$.deprecated);return}else if(YX(Z)){this.addHandler([$].concat(Q),J,Z.builder,Z.handler,Z.middlewares,Z.deprecated);return}if(typeof $==="string"){let H=G1($);Q=Q.map((B)=>G1(B).cmd);let K=!1,U=[H.cmd].concat(Q).filter((B)=>{if(s1.test(B))return K=!0,!1;return!0});if(U.length===0&&K)U.push("$0");if(K)H.cmd=U[0],Q=U.slice(1),$=$.replace(s1,H.cmd);if(Q.forEach((B)=>{this.aliasMap[B]=H.cmd}),J!==!1)this.usage.command($,J,K,Q,Y);if(this.handlers[H.cmd]={original:$,description:J,handler:X,builder:Z||{},middlewares:G,deprecated:Y,demanded:H.demanded,optional:H.optional},K)this.defaultCommand=this.handlers[H.cmd]}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand($,J,Z,X,q,Y){let Q=this.handlers[$]||this.handlers[this.aliasMap[$]]||this.defaultCommand,G=J.getInternalMethods().getContext(),H=G.commands.slice(),K=!$;if($)G.commands.push($),G.fullCommands.push(Q.original);let U=this.applyBuilderUpdateUsageAndParse(K,Q,J,Z.aliases,H,X,q,Y);return s(U)?U.then((B)=>this.applyMiddlewareAndGetResult(K,Q,B.innerArgv,G,q,B.aliases,J)):this.applyMiddlewareAndGetResult(K,Q,U.innerArgv,G,q,U.aliases,J)}applyBuilderUpdateUsageAndParse($,J,Z,X,q,Y,Q,G){let H=J.builder,K=Z;if(c4(H)){Z.getInternalMethods().getUsageInstance().freeze();let U=H(Z.getInternalMethods().reset(X),G);if(s(U))return U.then((B)=>{return K=zX(B)?B:Z,this.parseAndUpdateUsage($,J,K,q,Y,Q)})}else if(bB(H))Z.getInternalMethods().getUsageInstance().freeze(),K=Z.getInternalMethods().reset(X),Object.keys(J.builder).forEach((U)=>{K.option(U,H[U])});return this.parseAndUpdateUsage($,J,K,q,Y,Q)}parseAndUpdateUsage($,J,Z,X,q,Y){if($)Z.getInternalMethods().getUsageInstance().unfreeze(!0);if(this.shouldUpdateUsage(Z))Z.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(X,J),J.description);let Q=Z.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,q,Y);return s(Q)?Q.then((G)=>({aliases:Z.parsed.aliases,innerArgv:G})):{aliases:Z.parsed.aliases,innerArgv:Q}}shouldUpdateUsage($){return!$.getInternalMethods().getUsageInstance().getUsageDisabled()&&$.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler($,J){let Z=s1.test(J.original)?J.original.replace(s1,"").trim():J.original,X=$.filter((q)=>{return!s1.test(q)});return X.push(Z),`$0 ${X.join(" ")}`}handleValidationAndGetResult($,J,Z,X,q,Y,Q,G){if(!Y.getInternalMethods().getHasOutput()){let H=Y.getInternalMethods().runValidation(q,G,Y.parsed.error,$);Z=P1(Z,(K)=>{return H(K),K})}if(J.handler&&!Y.getInternalMethods().getHasOutput()){Y.getInternalMethods().setHasOutput();let H=!!Y.getOptions().configuration["populate--"];if(Y.getInternalMethods().postProcess(Z,H,!1,!1),Z=F1(Z,Y,Q,!1),Z=P1(Z,(K)=>{let U=J.handler(K);return s(U)?U.then(()=>K):K}),!$)Y.getInternalMethods().getUsageInstance().cacheHelpMessage();if(s(Z)&&!Y.getInternalMethods().hasParseCallback())Z.catch((K)=>{try{Y.getInternalMethods().getUsageInstance().fail(null,K)}catch(U){}})}if(!$)X.commands.pop(),X.fullCommands.pop();return Z}applyMiddlewareAndGetResult($,J,Z,X,q,Y,Q){let G={};if(q)return Z;if(!Q.getInternalMethods().getHasOutput())G=this.populatePositionals(J,Z,X,Q);let H=this.globalMiddleware.getMiddleware().slice(0).concat(J.middlewares),K=F1(Z,Q,H,!0);return s(K)?K.then((U)=>this.handleValidationAndGetResult($,J,U,X,Y,Q,H,G)):this.handleValidationAndGetResult($,J,K,X,Y,Q,H,G)}populatePositionals($,J,Z,X){J._=J._.slice(Z.commands.length);let q=$.demanded.slice(0),Y=$.optional.slice(0),Q={};this.validation.positionalCount(q.length,J._.length);while(q.length){let G=q.shift();this.populatePositional(G,J,Q)}while(Y.length){let G=Y.shift();this.populatePositional(G,J,Q)}return J._=Z.commands.concat(J._.map((G)=>""+G)),this.postProcessPositionals(J,Q,this.cmdToParseOptions($.original),X),Q}populatePositional($,J,Z){let X=$.cmd[0];if($.variadic)Z[X]=J._.splice(0).map(String);else if(J._.length)Z[X]=[String(J._.shift())]}cmdToParseOptions($){let J={array:[],default:{},alias:{},demand:{}},Z=G1($);return Z.demanded.forEach((X)=>{let[q,...Y]=X.cmd;if(X.variadic)J.array.push(q),J.default[q]=[];J.alias[q]=Y,J.demand[q]=!0}),Z.optional.forEach((X)=>{let[q,...Y]=X.cmd;if(X.variadic)J.array.push(q),J.default[q]=[];J.alias[q]=Y}),J}postProcessPositionals($,J,Z,X){let q=Object.assign({},X.getOptions());q.default=Object.assign(Z.default,q.default);for(let H of Object.keys(Z.alias))q.alias[H]=(q.alias[H]||[]).concat(Z.alias[H]);q.array=q.array.concat(Z.array),q.config={};let Y=[];if(Object.keys(J).forEach((H)=>{J[H].map((K)=>{if(q.configuration["unknown-options-as-args"])q.key[H]=!0;Y.push(`--${H}`),Y.push(K)})}),!Y.length)return;let Q=Object.assign({},q.configuration,{"populate--":!1}),G=this.shim.Parser.detailed(Y,Object.assign({},q,{configuration:Q}));if(G.error)X.getInternalMethods().getUsageInstance().fail(G.error.message,G.error);else{let H=Object.keys(J);Object.keys(J).forEach((K)=>{H.push(...G.aliases[K])}),Object.keys(G.argv).forEach((K)=>{if(H.includes(K)){if(!J[K])J[K]=G.argv[K];if(!this.isInConfigs(X,K)&&!this.isDefaulted(X,K)&&Object.prototype.hasOwnProperty.call($,K)&&Object.prototype.hasOwnProperty.call(G.argv,K)&&(Array.isArray($[K])||Array.isArray(G.argv[K])))$[K]=[].concat($[K],G.argv[K]);else $[K]=G.argv[K]}})}}isDefaulted($,J){let{default:Z}=$.getOptions();return Object.prototype.hasOwnProperty.call(Z,J)||Object.prototype.hasOwnProperty.call(Z,this.shim.Parser.camelCase(J))}isInConfigs($,J){let{configObjects:Z}=$.getOptions();return Z.some((X)=>Object.prototype.hasOwnProperty.call(X,J))||Z.some((X)=>Object.prototype.hasOwnProperty.call(X,this.shim.Parser.camelCase(J)))}runDefaultBuilderOn($){if(!this.defaultCommand)return;if(this.shouldUpdateUsage($)){let Z=s1.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");$.getInternalMethods().getUsageInstance().usage(Z,this.defaultCommand.description)}let J=this.defaultCommand.builder;if(c4(J))return J($,!0);else if(!YX(J))Object.keys(J).forEach((Z)=>{$.option(Z,J[Z])});return}moduleName($){let J=a3($);if(!J)throw Error(`No command name given for module: ${this.shim.inspect($)}`);return this.commandFromFilename(J.filename)}commandFromFilename($){return this.shim.path.basename($,this.shim.path.extname($))}extractDesc({describe:$,description:J,desc:Z}){for(let X of[$,J,Z]){if(typeof X==="string"||X===!1)return X;T0(X,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let $=this.frozens.pop();T0($,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=$}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}}function HX($,J,Z,X){return new GX($,J,Z,X)}function YX($){return typeof $==="object"&&!!$.builder&&typeof $.handler==="function"}function kB($){return $.every((J)=>typeof J==="string")}function c4($){return typeof $==="function"}function bB($){return typeof $==="object"}function yB($){return typeof $==="object"&&!Array.isArray($)}function H1($={},J=()=>!0){let Z={};return r1($).forEach((X)=>{if(J(X,$[X]))Z[X]=$[X]}),Z}function z1($){if(typeof process>"u")return;[process.stdout,process.stderr].forEach((J)=>{let Z=J;if(Z._handle&&Z.isTTY&&typeof Z._handle.setBlocking==="function")Z._handle.setBlocking($)})}function gB($){return typeof $==="boolean"}function BX($,J){let Z=J.y18n.__,X={},q=[];X.failFn=function(w){q.push(w)};let Y=null,Q=null,G=!0;X.showHelpOnFail=function(w=!0,D){let[g,i]=typeof w==="string"?[!0,w]:[w,D];if($.getInternalMethods().isGlobalContext())Q=i;return Y=i,G=g,X};let H=!1;X.fail=function(w,D){let g=$.getInternalMethods().getLoggerInstance();if(q.length)for(let i=q.length-1;i>=0;--i){let q0=q[i];if(gB(q0)){if(D)throw D;else if(w)throw Error(w)}else q0(w,D,X)}else{if($.getExitProcess())z1(!0);if(!H){if(H=!0,G)$.showHelp("error"),g.error();if(w||D)g.error(w||D);let i=Y||Q;if(i){if(w||D)g.error("");g.error(i)}}if(D=D||new r(w),$.getExitProcess())return $.exit(1);else if($.getInternalMethods().hasParseCallback())return $.exit(1,D);else throw D}};let K=[],U=!1;X.usage=(E,w)=>{if(E===null)return U=!0,K=[],X;return U=!1,K.push([E,w||""]),X},X.getUsage=()=>{return K},X.getUsageDisabled=()=>{return U},X.getPositionalGroupName=()=>{return Z("Positionals:")};let B=[];X.example=(E,w)=>{B.push([E,w||""])};let W=[];X.command=function(w,D,g,i,q0=!1){if(g)W=W.map((d)=>{return d[2]=!1,d});W.push([w,D||"",g,i,q0])},X.getCommands=()=>W;let M={};X.describe=function(w,D){if(Array.isArray(w))w.forEach((g)=>{X.describe(g,D)});else if(typeof w==="object")Object.keys(w).forEach((g)=>{X.describe(g,w[g])});else M[w]=D},X.getDescriptions=()=>M;let R=[];X.epilog=(E)=>{R.push(E)};let L=!1,I;X.wrap=(E)=>{L=!0,I=E},X.getWrap=()=>{if(J.getEnv("YARGS_DISABLE_WRAP"))return null;if(!L)I=L0(),L=!0;return I};let x="__yargsString__:";X.deferY18nLookup=(E)=>x+E,X.help=function(){if(j)return j;v();let w=$.customScriptName?$.$0:J.path.basename($.$0),D=$.getDemandedOptions(),g=$.getDemandedCommands(),i=$.getDeprecatedOptions(),q0=$.getGroups(),d=$.getOptions(),Y0=[];Y0=Y0.concat(Object.keys(M)),Y0=Y0.concat(Object.keys(D)),Y0=Y0.concat(Object.keys(g)),Y0=Y0.concat(Object.keys(d.default)),Y0=Y0.filter(n),Y0=Object.keys(Y0.reduce((b,t)=>{if(t!=="_")b[t]=!0;return b},{}));let J1=X.getWrap(),a=J.cliui({width:J1,wrap:!!J1});if(!U){if(K.length)K.forEach((b)=>{if(a.div({text:`${b[0].replace(/\$0/g,w)}`}),b[1])a.div({text:`${b[1]}`,padding:[1,0,0,0]})}),a.div();else if(W.length){let b=null;if(g._)b=`${w} <${Z("command")}>
62
+ `;else b=`${w} [${Z("command")}]
63
+ `;a.div(`${b}`)}}if(W.length>1||W.length===1&&!W[0][2]){a.div(Z("Commands:"));let b=$.getInternalMethods().getContext(),t=b.commands.length?`${b.commands.join(" ")} `:"";if($.getInternalMethods().getParserConfiguration()["sort-commands"]===!0)W=W.sort((c,W0)=>c[0].localeCompare(W0[0]));let G0=w?`${w} `:"";W.forEach((c)=>{let W0=`${G0}${t}${c[0].replace(/^\$0 ?/,"")}`;a.span({text:W0,padding:[0,2,0,2],width:F(W,J1,`${w}${t}`)+4},{text:c[1]});let J0=[];if(c[2])J0.push(`[${Z("default")}]`);if(c[3]&&c[3].length)J0.push(`[${Z("aliases:")} ${c[3].join(", ")}]`);if(c[4])if(typeof c[4]==="string")J0.push(`[${Z("deprecated: %s",c[4])}]`);else J0.push(`[${Z("deprecated")}]`);if(J0.length)a.div({text:J0.join(" "),padding:[0,0,0,2],align:"right"});else a.div()}),a.div()}let o0=(Object.keys(d.alias)||[]).concat(Object.keys($.parsed.newAliases)||[]);Y0=Y0.filter((b)=>!$.parsed.newAliases[b]&&o0.every((t)=>(d.alias[t]||[]).indexOf(b)===-1));let Z$=Z("Options:");if(!q0[Z$])q0[Z$]=[];l(Y0,d.alias,q0,Z$);let k=(b)=>/^--/.test(p4(b)),v1=Object.keys(q0).filter((b)=>q0[b].length>0).map((b)=>{let t=q0[b].filter(n).map((G0)=>{if(o0.includes(G0))return G0;for(let c=0,W0;(W0=o0[c])!==void 0;c++)if((d.alias[W0]||[]).includes(G0))return W0;return G0});return{groupName:b,normalizedKeys:t}}).filter(({normalizedKeys:b})=>b.length>0).map(({groupName:b,normalizedKeys:t})=>{let G0=t.reduce((c,W0)=>{return c[W0]=[W0].concat(d.alias[W0]||[]).map((J0)=>{if(b===X.getPositionalGroupName())return J0;else return(/^[0-9]$/.test(J0)?d.boolean.includes(W0)?"-":"--":J0.length>1?"--":"-")+J0}).sort((J0,H0)=>k(J0)===k(H0)?0:k(J0)?1:-1).join(", "),c},{});return{groupName:b,normalizedKeys:t,switches:G0}});if(v1.filter(({groupName:b})=>b!==X.getPositionalGroupName()).some(({normalizedKeys:b,switches:t})=>!b.every((G0)=>k(t[G0]))))v1.filter(({groupName:b})=>b!==X.getPositionalGroupName()).forEach(({normalizedKeys:b,switches:t})=>{b.forEach((G0)=>{if(k(t[G0]))t[G0]=uB(t[G0],4)})});if(v1.forEach(({groupName:b,normalizedKeys:t,switches:G0})=>{a.div(b),t.forEach((c)=>{let W0=G0[c],J0=M[c]||"",H0=null;if(J0.includes(x))J0=Z(J0.substring(x.length));if(d.boolean.includes(c))H0=`[${Z("boolean")}]`;if(d.count.includes(c))H0=`[${Z("count")}]`;if(d.string.includes(c))H0=`[${Z("string")}]`;if(d.normalize.includes(c))H0=`[${Z("string")}]`;if(d.array.includes(c))H0=`[${Z("array")}]`;if(d.number.includes(c))H0=`[${Z("number")}]`;let Z2=(P)=>typeof P==="string"?`[${Z("deprecated: %s",P)}]`:`[${Z("deprecated")}]`,V=[c in i?Z2(i[c]):null,H0,c in D?`[${Z("required")}]`:null,d.choices&&d.choices[c]?`[${Z("choices:")} ${X.stringifiedValues(d.choices[c])}]`:null,o(d.default[c],d.defaultDescription[c])].filter(Boolean).join(" ");a.span({text:p4(W0),padding:[0,2,0,2+KX(W0)],width:F(G0,J1)+4},J0);let T=$.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;if(V&&!T)a.div({text:V,padding:[0,0,0,2],align:"right"});else a.div()}),a.div()}),B.length)a.div(Z("Examples:")),B.forEach((b)=>{b[0]=b[0].replace(/\$0/g,w)}),B.forEach((b)=>{if(b[1]==="")a.div({text:b[0],padding:[0,2,0,2]});else a.div({text:b[0],padding:[0,2,0,2],width:F(B,J1)+4},{text:b[1]})}),a.div();if(R.length>0){let b=R.map((t)=>t.replace(/\$0/g,w)).join(`
64
+ `);a.div(`${b}
65
+ `)}return a.toString().replace(/\s*$/,"")};function F(E,w,D){let g=0;if(!Array.isArray(E))E=Object.values(E).map((i)=>[i]);if(E.forEach((i)=>{g=Math.max(J.stringWidth(D?`${D} ${p4(i[0])}`:p4(i[0]))+KX(i[0]),g)}),w)g=Math.min(g,parseInt((w*0.5).toString(),10));return g}function v(){let E=$.getDemandedOptions(),w=$.getOptions();(Object.keys(w.alias)||[]).forEach((D)=>{w.alias[D].forEach((g)=>{if(M[g])X.describe(D,M[g]);if(g in E)$.demandOption(D,E[g]);if(w.boolean.includes(g))$.boolean(D);if(w.count.includes(g))$.count(D);if(w.string.includes(g))$.string(D);if(w.normalize.includes(g))$.normalize(D);if(w.array.includes(g))$.array(D);if(w.number.includes(g))$.number(D)})})}let j;X.cacheHelpMessage=function(){j=this.help()},X.clearCachedHelpMessage=function(){j=void 0},X.hasCachedHelpMessage=function(){return!!j};function l(E,w,D,g){let i=[],q0=null;return Object.keys(D).forEach((d)=>{i=i.concat(D[d])}),E.forEach((d)=>{if(q0=[d].concat(w[d]),!q0.some((Y0)=>i.indexOf(Y0)!==-1))D[g].push(d)}),i}function n(E){return $.getOptions().hiddenOptions.indexOf(E)<0||$.parsed.argv[$.getOptions().showHiddenOpt]}X.showHelp=(E)=>{let w=$.getInternalMethods().getLoggerInstance();if(!E)E="error";(typeof E==="function"?E:w[E])(X.help())},X.functionDescription=(E)=>{return["(",E.name?J.Parser.decamelize(E.name,"-"):Z("generated-value"),")"].join("")},X.stringifiedValues=function(w,D){let g="",i=D||", ",q0=[].concat(w);if(!w||!q0.length)return g;return q0.forEach((d)=>{if(g.length)g+=i;g+=JSON.stringify(d)}),g};function o(E,w){let D=`[${Z("default:")} `;if(E===void 0&&!w)return null;if(w)D+=w;else switch(typeof E){case"string":D+=`"${E}"`;break;case"object":D+=JSON.stringify(E);break;default:D+=E}return`${D}]`}function L0(){if(J.process.stdColumns)return Math.min(80,J.process.stdColumns);else return 80}let p=null;X.version=(E)=>{p=E},X.showVersion=(E)=>{let w=$.getInternalMethods().getLoggerInstance();if(!E)E="error";(typeof E==="function"?E:w[E])(p)},X.reset=function(w){return Y=null,H=!1,K=[],U=!1,R=[],B=[],W=[],M=H1(M,(D)=>!w[D]),X};let i0=[];return X.freeze=function(){i0.push({failMessage:Y,failureOutput:H,usages:K,usageDisabled:U,epilogs:R,examples:B,commands:W,descriptions:M})},X.unfreeze=function(w=!1){let D=i0.pop();if(!D)return;if(w)M={...D.descriptions,...M},W=[...D.commands,...W],K=[...D.usages,...K],B=[...D.examples,...B],R=[...D.epilogs,...R];else({failMessage:Y,failureOutput:H,usages:K,usageDisabled:U,epilogs:R,examples:B,commands:W,descriptions:M}=D)},X}function r3($){return typeof $==="object"}function uB($,J){return r3($)?{text:$.text,indentation:$.indentation+J}:{text:$,indentation:J}}function KX($){return r3($)?$.indentation:0}function p4($){return r3($)?$.text:$}var UX=`###-begin-{{app_name}}-completions-###
66
66
  #
67
67
  # yargs command completion script
68
68
  #
@@ -90,7 +90,7 @@ _{{app_name}}_yargs_completions()
90
90
  }
91
91
  complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}
92
92
  ###-end-{{app_name}}-completions-###
93
- `,KZ=`#compdef {{app_name}}
93
+ `,WX=`#compdef {{app_name}}
94
94
  ###-begin-{{app_name}}-completions-###
95
95
  #
96
96
  # yargs command completion script
@@ -109,13 +109,13 @@ _{{app_name}}_yargs_completions()
109
109
  }
110
110
  compdef _{{app_name}}_yargs_completions {{app_name}}
111
111
  ###-end-{{app_name}}-completions-###
112
- `;class UZ{constructor($,J,X,Z){var q,Y,Q;this.yargs=$,this.usage=J,this.command=X,this.shim=Z,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(Q=((q=this.shim.getEnv("SHELL"))===null||q===void 0?void 0:q.includes("zsh"))||((Y=this.shim.getEnv("ZSH_NAME"))===null||Y===void 0?void 0:Y.includes("zsh")))!==null&&Q!==void 0?Q:!1}defaultCompletion($,J,X,Z){let q=this.command.getCommandHandlers();for(let Q=0,G=$.length;Q<G;++Q)if(q[$[Q]]&&q[$[Q]].builder){let H=q[$[Q]].builder;if(c4(H)){this.indexAfterLastReset=Q+1;let B=this.yargs.getInternalMethods().reset();return H(B,!0),B.argv}}let Y=[];this.commandCompletions(Y,$,X),this.optionCompletions(Y,$,J,X),this.choicesFromOptionsCompletions(Y,$,J,X),this.choicesFromPositionalsCompletions(Y,$,J,X),Z(null,Y)}commandCompletions($,J,X){let Z=this.yargs.getInternalMethods().getContext().commands;if(!X.match(/^-/)&&Z[Z.length-1]!==X&&!this.previousArgHasChoices(J))this.usage.getCommands().forEach((q)=>{let Y=Y1(q[0]).cmd;if(J.indexOf(Y)===-1)if(!this.zshShell)$.push(Y);else{let Q=q[1]||"";$.push(Y.replace(/:/g,"\\:")+":"+Q)}})}optionCompletions($,J,X,Z){if((Z.match(/^-/)||Z===""&&$.length===0)&&!this.previousArgHasChoices(J)){let q=this.yargs.getOptions(),Y=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(q.key).forEach((Q)=>{let G=!!q.configuration["boolean-negation"]&&q.boolean.includes(Q);if(!Y.includes(Q)&&!q.hiddenOptions.includes(Q)&&!this.argsContainKey(J,Q,G))this.completeOptionKey(Q,$,Z,G&&!!q.default[Q])})}}choicesFromOptionsCompletions($,J,X,Z){if(this.previousArgHasChoices(J)){let q=this.getPreviousArgChoices(J);if(q&&q.length>0)$.push(...q.map((Y)=>Y.replace(/:/g,"\\:")))}}choicesFromPositionalsCompletions($,J,X,Z){if(Z===""&&$.length>0&&this.previousArgHasChoices(J))return;let q=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],Y=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),Q=q[X._.length-Y-1];if(!Q)return;let G=this.yargs.getOptions().choices[Q]||[];for(let H of G)if(H.startsWith(Z))$.push(H.replace(/:/g,"\\:"))}getPreviousArgChoices($){if($.length<1)return;let J=$[$.length-1],X="";if(!J.startsWith("-")&&$.length>1)X=J,J=$[$.length-2];if(!J.startsWith("-"))return;let Z=J.replace(/^-+/,""),q=this.yargs.getOptions(),Y=[Z,...this.yargs.getAliases()[Z]||[]],Q;for(let G of Y)if(Object.prototype.hasOwnProperty.call(q.key,G)&&Array.isArray(q.choices[G])){Q=q.choices[G];break}if(Q)return Q.filter((G)=>!X||G.startsWith(X))}previousArgHasChoices($){let J=this.getPreviousArgChoices($);return J!==void 0&&J.length>0}argsContainKey($,J,X){let Z=(q)=>$.indexOf((/^[^0-9]$/.test(q)?"-":"--")+q)!==-1;if(Z(J))return!0;if(X&&Z(`no-${J}`))return!0;if(this.aliases){for(let q of this.aliases[J])if(Z(q))return!0}return!1}completeOptionKey($,J,X,Z){var q,Y,Q,G;let H=$;if(this.zshShell){let W=this.usage.getDescriptions(),P=(Y=(q=this===null||this===void 0?void 0:this.aliases)===null||q===void 0?void 0:q[$])===null||Y===void 0?void 0:Y.find((M)=>{let C=W[M];return typeof C==="string"&&C.length>0}),R=P?W[P]:void 0,L=(G=(Q=W[$])!==null&&Q!==void 0?Q:R)!==null&&G!==void 0?G:"";H=`${$.replace(/:/g,"\\:")}:${L.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}let B=(W)=>/^--/.test(W),U=(W)=>/^[^0-9]$/.test(W),K=!B(X)&&U($)?"-":"--";if(J.push(K+H),Z)J.push(K+"no-"+H)}customCompletion($,J,X,Z){if(T0(this.customCompletionFunction,null,this.shim),uK(this.customCompletionFunction)){let q=this.customCompletionFunction(X,J);if(s(q))return q.then((Y)=>{this.shim.process.nextTick(()=>{Z(null,Y)})}).catch((Y)=>{this.shim.process.nextTick(()=>{Z(Y,void 0)})});return Z(null,q)}else if(mK(this.customCompletionFunction))return this.customCompletionFunction(X,J,(q=Z)=>this.defaultCompletion($,J,X,q),(q)=>{Z(null,q)});else return this.customCompletionFunction(X,J,(q)=>{Z(null,q)})}getCompletion($,J){let X=$.length?$[$.length-1]:"",Z=this.yargs.parse($,!0),q=this.customCompletionFunction?(Y)=>this.customCompletion($,Y,X,J):(Y)=>this.defaultCompletion($,Y,X,J);return s(Z)?Z.then(q):q(Z)}generateCompletionScript($,J){let X=this.zshShell?KZ:BZ,Z=this.shim.path.basename($);if($.match(/\.js$/))$=`./${$}`;return X=X.replace(/{{app_name}}/g,Z),X=X.replace(/{{completion_command}}/g,J),X.replace(/{{app_path}}/g,$)}registerFunction($){this.customCompletionFunction=$}setParsed($){this.aliases=$.aliases}}function WZ($,J,X,Z){return new UZ($,J,X,Z)}function uK($){return $.length<3}function mK($){return $.length>3}function VZ($,J){if($.length===0)return J.length;if(J.length===0)return $.length;let X=[],Z;for(Z=0;Z<=J.length;Z++)X[Z]=[Z];let q;for(q=0;q<=$.length;q++)X[0][q]=q;for(Z=1;Z<=J.length;Z++)for(q=1;q<=$.length;q++)if(J.charAt(Z-1)===$.charAt(q-1))X[Z][q]=X[Z-1][q-1];else if(Z>1&&q>1&&J.charAt(Z-2)===$.charAt(q-1)&&J.charAt(Z-1)===$.charAt(q-2))X[Z][q]=X[Z-2][q-2]+1;else X[Z][q]=Math.min(X[Z-1][q-1]+1,Math.min(X[Z][q-1]+1,X[Z-1][q]+1));return X[J.length][$.length]}var LZ=["$0","--","_"];function _Z($,J,X){let Z=X.y18n.__,q=X.y18n.__n,Y={};Y.nonOptionCount=function(K){let W=$.getDemandedCommands(),R=K._.length+(K["--"]?K["--"].length:0)-$.getInternalMethods().getContext().commands.length;if(W._&&(R<W._.min||R>W._.max)){if(R<W._.min)if(W._.minMsg!==void 0)J.fail(W._.minMsg?W._.minMsg.replace(/\$0/g,R.toString()).replace(/\$1/,W._.min.toString()):null);else J.fail(q("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",R,R.toString(),W._.min.toString()));else if(R>W._.max)if(W._.maxMsg!==void 0)J.fail(W._.maxMsg?W._.maxMsg.replace(/\$0/g,R.toString()).replace(/\$1/,W._.max.toString()):null);else J.fail(q("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",R,R.toString(),W._.max.toString()))}},Y.positionalCount=function(K,W){if(W<K)J.fail(q("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",W,W+"",K+""))},Y.requiredArguments=function(K,W){let P=null;for(let R of Object.keys(W))if(!Object.prototype.hasOwnProperty.call(K,R)||typeof K[R]>"u")P=P||{},P[R]=W[R];if(P){let R=[];for(let M of Object.keys(P)){let C=P[M];if(C&&R.indexOf(C)<0)R.push(C)}let L=R.length?`
112
+ `;class VX{constructor($,J,Z,X){var q,Y,Q;this.yargs=$,this.usage=J,this.command=Z,this.shim=X,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(Q=((q=this.shim.getEnv("SHELL"))===null||q===void 0?void 0:q.includes("zsh"))||((Y=this.shim.getEnv("ZSH_NAME"))===null||Y===void 0?void 0:Y.includes("zsh")))!==null&&Q!==void 0?Q:!1}defaultCompletion($,J,Z,X){let q=this.command.getCommandHandlers();for(let Q=0,G=$.length;Q<G;++Q)if(q[$[Q]]&&q[$[Q]].builder){let H=q[$[Q]].builder;if(c4(H)){this.indexAfterLastReset=Q+1;let K=this.yargs.getInternalMethods().reset();return H(K,!0),K.argv}}let Y=[];this.commandCompletions(Y,$,Z),this.optionCompletions(Y,$,J,Z),this.choicesFromOptionsCompletions(Y,$,J,Z),this.choicesFromPositionalsCompletions(Y,$,J,Z),X(null,Y)}commandCompletions($,J,Z){let X=this.yargs.getInternalMethods().getContext().commands;if(!Z.match(/^-/)&&X[X.length-1]!==Z&&!this.previousArgHasChoices(J))this.usage.getCommands().forEach((q)=>{let Y=G1(q[0]).cmd;if(J.indexOf(Y)===-1)if(!this.zshShell)$.push(Y);else{let Q=q[1]||"";$.push(Y.replace(/:/g,"\\:")+":"+Q)}})}optionCompletions($,J,Z,X){if((X.match(/^-/)||X===""&&$.length===0)&&!this.previousArgHasChoices(J)){let q=this.yargs.getOptions(),Y=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(q.key).forEach((Q)=>{let G=!!q.configuration["boolean-negation"]&&q.boolean.includes(Q);if(!Y.includes(Q)&&!q.hiddenOptions.includes(Q)&&!this.argsContainKey(J,Q,G))this.completeOptionKey(Q,$,X,G&&!!q.default[Q])})}}choicesFromOptionsCompletions($,J,Z,X){if(this.previousArgHasChoices(J)){let q=this.getPreviousArgChoices(J);if(q&&q.length>0)$.push(...q.map((Y)=>Y.replace(/:/g,"\\:")))}}choicesFromPositionalsCompletions($,J,Z,X){if(X===""&&$.length>0&&this.previousArgHasChoices(J))return;let q=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],Y=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),Q=q[Z._.length-Y-1];if(!Q)return;let G=this.yargs.getOptions().choices[Q]||[];for(let H of G)if(H.startsWith(X))$.push(H.replace(/:/g,"\\:"))}getPreviousArgChoices($){if($.length<1)return;let J=$[$.length-1],Z="";if(!J.startsWith("-")&&$.length>1)Z=J,J=$[$.length-2];if(!J.startsWith("-"))return;let X=J.replace(/^-+/,""),q=this.yargs.getOptions(),Y=[X,...this.yargs.getAliases()[X]||[]],Q;for(let G of Y)if(Object.prototype.hasOwnProperty.call(q.key,G)&&Array.isArray(q.choices[G])){Q=q.choices[G];break}if(Q)return Q.filter((G)=>!Z||G.startsWith(Z))}previousArgHasChoices($){let J=this.getPreviousArgChoices($);return J!==void 0&&J.length>0}argsContainKey($,J,Z){let X=(q)=>$.indexOf((/^[^0-9]$/.test(q)?"-":"--")+q)!==-1;if(X(J))return!0;if(Z&&X(`no-${J}`))return!0;if(this.aliases){for(let q of this.aliases[J])if(X(q))return!0}return!1}completeOptionKey($,J,Z,X){var q,Y,Q,G;let H=$;if(this.zshShell){let W=this.usage.getDescriptions(),M=(Y=(q=this===null||this===void 0?void 0:this.aliases)===null||q===void 0?void 0:q[$])===null||Y===void 0?void 0:Y.find((I)=>{let x=W[I];return typeof x==="string"&&x.length>0}),R=M?W[M]:void 0,L=(G=(Q=W[$])!==null&&Q!==void 0?Q:R)!==null&&G!==void 0?G:"";H=`${$.replace(/:/g,"\\:")}:${L.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}let K=(W)=>/^--/.test(W),U=(W)=>/^[^0-9]$/.test(W),B=!K(Z)&&U($)?"-":"--";if(J.push(B+H),X)J.push(B+"no-"+H)}customCompletion($,J,Z,X){if(T0(this.customCompletionFunction,null,this.shim),cB(this.customCompletionFunction)){let q=this.customCompletionFunction(Z,J);if(s(q))return q.then((Y)=>{this.shim.process.nextTick(()=>{X(null,Y)})}).catch((Y)=>{this.shim.process.nextTick(()=>{X(Y,void 0)})});return X(null,q)}else if(pB(this.customCompletionFunction))return this.customCompletionFunction(Z,J,(q=X)=>this.defaultCompletion($,J,Z,q),(q)=>{X(null,q)});else return this.customCompletionFunction(Z,J,(q)=>{X(null,q)})}getCompletion($,J){let Z=$.length?$[$.length-1]:"",X=this.yargs.parse($,!0),q=this.customCompletionFunction?(Y)=>this.customCompletion($,Y,Z,J):(Y)=>this.defaultCompletion($,Y,Z,J);return s(X)?X.then(q):q(X)}generateCompletionScript($,J){let Z=this.zshShell?WX:UX,X=this.shim.path.basename($);if($.match(/\.js$/))$=`./${$}`;return Z=Z.replace(/{{app_name}}/g,X),Z=Z.replace(/{{completion_command}}/g,J),Z.replace(/{{app_path}}/g,$)}registerFunction($){this.customCompletionFunction=$}setParsed($){this.aliases=$.aliases}}function LX($,J,Z,X){return new VX($,J,Z,X)}function cB($){return $.length<3}function pB($){return $.length>3}function _X($,J){if($.length===0)return J.length;if(J.length===0)return $.length;let Z=[],X;for(X=0;X<=J.length;X++)Z[X]=[X];let q;for(q=0;q<=$.length;q++)Z[0][q]=q;for(X=1;X<=J.length;X++)for(q=1;q<=$.length;q++)if(J.charAt(X-1)===$.charAt(q-1))Z[X][q]=Z[X-1][q-1];else if(X>1&&q>1&&J.charAt(X-2)===$.charAt(q-1)&&J.charAt(X-1)===$.charAt(q-2))Z[X][q]=Z[X-2][q-2]+1;else Z[X][q]=Math.min(Z[X-1][q-1]+1,Math.min(Z[X][q-1]+1,Z[X-1][q]+1));return Z[J.length][$.length]}var RX=["$0","--","_"];function TX($,J,Z){let X=Z.y18n.__,q=Z.y18n.__n,Y={};Y.nonOptionCount=function(B){let W=$.getDemandedCommands(),R=B._.length+(B["--"]?B["--"].length:0)-$.getInternalMethods().getContext().commands.length;if(W._&&(R<W._.min||R>W._.max)){if(R<W._.min)if(W._.minMsg!==void 0)J.fail(W._.minMsg?W._.minMsg.replace(/\$0/g,R.toString()).replace(/\$1/,W._.min.toString()):null);else J.fail(q("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",R,R.toString(),W._.min.toString()));else if(R>W._.max)if(W._.maxMsg!==void 0)J.fail(W._.maxMsg?W._.maxMsg.replace(/\$0/g,R.toString()).replace(/\$1/,W._.max.toString()):null);else J.fail(q("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",R,R.toString(),W._.max.toString()))}},Y.positionalCount=function(B,W){if(W<B)J.fail(q("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",W,W+"",B+""))},Y.requiredArguments=function(B,W){let M=null;for(let R of Object.keys(W))if(!Object.prototype.hasOwnProperty.call(B,R)||typeof B[R]>"u")M=M||{},M[R]=W[R];if(M){let R=[];for(let I of Object.keys(M)){let x=M[I];if(x&&R.indexOf(x)<0)R.push(x)}let L=R.length?`
113
113
  ${R.join(`
114
- `)}`:"";J.fail(q("Missing required argument: %s","Missing required arguments: %s",Object.keys(P).length,Object.keys(P).join(", ")+L))}},Y.unknownArguments=function(K,W,P,R,L=!0){var M;let C=$.getInternalMethods().getCommandInstance().getCommands(),A=[],m=$.getInternalMethods().getContext();if(Object.keys(K).forEach((j)=>{if(!LZ.includes(j)&&!Object.prototype.hasOwnProperty.call(P,j)&&!Object.prototype.hasOwnProperty.call($.getInternalMethods().getParseContext(),j)&&!Y.isValidAndSomeAliasIsNotNew(j,W))A.push(j)}),L&&(m.commands.length>0||C.length>0||R))K._.slice(m.commands.length).forEach((j)=>{if(!C.includes(""+j))A.push(""+j)});if(L){let l=((M=$.getDemandedCommands()._)===null||M===void 0?void 0:M.max)||0,n=m.commands.length+l;if(n<K._.length)K._.slice(n).forEach((t)=>{if(t=String(t),!m.commands.includes(t)&&!A.includes(t))A.push(t)})}if(A.length)J.fail(q("Unknown argument: %s","Unknown arguments: %s",A.length,A.map((j)=>j.trim()?j:`"${j}"`).join(", ")))},Y.unknownCommands=function(K){let W=$.getInternalMethods().getCommandInstance().getCommands(),P=[],R=$.getInternalMethods().getContext();if(R.commands.length>0||W.length>0)K._.slice(R.commands.length).forEach((L)=>{if(!W.includes(""+L))P.push(""+L)});if(P.length>0)return J.fail(q("Unknown command: %s","Unknown commands: %s",P.length,P.join(", "))),!0;else return!1},Y.isValidAndSomeAliasIsNotNew=function(K,W){if(!Object.prototype.hasOwnProperty.call(W,K))return!1;let P=$.parsed.newAliases;return[K,...W[K]].some((R)=>!Object.prototype.hasOwnProperty.call(P,R)||!P[K])},Y.limitedChoices=function(K){let W=$.getOptions(),P={};if(!Object.keys(W.choices).length)return;Object.keys(K).forEach((M)=>{if(LZ.indexOf(M)===-1&&Object.prototype.hasOwnProperty.call(W.choices,M))[].concat(K[M]).forEach((C)=>{if(W.choices[M].indexOf(C)===-1&&C!==void 0)P[M]=(P[M]||[]).concat(C)})});let R=Object.keys(P);if(!R.length)return;let L=Z("Invalid values:");R.forEach((M)=>{L+=`
115
- ${Z("Argument: %s, Given: %s, Choices: %s",M,J.stringifiedValues(P[M]),J.stringifiedValues(W.choices[M]))}`}),J.fail(L)};let Q={};Y.implies=function(K,W){if(E("<string|object> [array|number|string]",[K,W],arguments.length),typeof K==="object")Object.keys(K).forEach((P)=>{Y.implies(P,K[P])});else{if($.global(K),!Q[K])Q[K]=[];if(Array.isArray(W))W.forEach((P)=>Y.implies(K,P));else T0(W,void 0,X),Q[K].push(W)}},Y.getImplied=function(){return Q};function G(U,K){let W=Number(K);if(K=isNaN(W)?K:W,typeof K==="number")K=U._.length>=K;else if(K.match(/^--no-.+/))K=K.match(/^--no-(.+)/)[1],K=!Object.prototype.hasOwnProperty.call(U,K);else K=Object.prototype.hasOwnProperty.call(U,K);return K}Y.implications=function(K){let W=[];if(Object.keys(Q).forEach((P)=>{let R=P;(Q[P]||[]).forEach((L)=>{let M=R,C=L;if(M=G(K,M),L=G(K,L),M&&!L)W.push(` ${R} -> ${C}`)})}),W.length){let P=`${Z("Implications failed:")}
116
- `;W.forEach((R)=>{P+=R}),J.fail(P)}};let H={};Y.conflicts=function(K,W){if(E("<string|object> [array|string]",[K,W],arguments.length),typeof K==="object")Object.keys(K).forEach((P)=>{Y.conflicts(P,K[P])});else{if($.global(K),!H[K])H[K]=[];if(Array.isArray(W))W.forEach((P)=>Y.conflicts(K,P));else H[K].push(W)}},Y.getConflicting=()=>H,Y.conflicting=function(K){if(Object.keys(K).forEach((W)=>{if(H[W])H[W].forEach((P)=>{if(P&&K[W]!==void 0&&K[P]!==void 0)J.fail(Z("Arguments %s and %s are mutually exclusive",W,P))})}),$.getInternalMethods().getParserConfiguration()["strip-dashed"])Object.keys(H).forEach((W)=>{H[W].forEach((P)=>{if(P&&K[X.Parser.camelCase(W)]!==void 0&&K[X.Parser.camelCase(P)]!==void 0)J.fail(Z("Arguments %s and %s are mutually exclusive",W,P))})})},Y.recommendCommands=function(K,W){W=W.sort((M,C)=>C.length-M.length);let R=null,L=1/0;for(let M=0,C;(C=W[M])!==void 0;M++){let A=VZ(K,C);if(A<=3&&A<L)L=A,R=C}if(R)J.fail(Z("Did you mean %s?",R))},Y.reset=function(K){return Q=G1(Q,(W)=>!K[W]),H=G1(H,(W)=>!K[W]),Y};let B=[];return Y.freeze=function(){B.push({implied:Q,conflicting:H})},Y.unfreeze=function(){let K=B.pop();T0(K,void 0,X),{implied:Q,conflicting:H}=K},Y}var a3=[],M$;function C$($,J,X,Z){M$=Z;let q={};if(Object.prototype.hasOwnProperty.call($,"extends")){if(typeof $.extends!=="string")return q;let Y=/\.json|\..*rc$/.test($.extends),Q=null;if(!Y)try{Q=V0.resolve($.extends)}catch(G){return $}else Q=dK(J,$.extends);pK(Q),a3.push(Q),q=Y?JSON.parse(M$.readFileSync(Q,"utf8")):V0($.extends),delete $.extends,q=C$(q,M$.path.dirname(Q),X,M$)}return a3=[],X?RZ(q,$):Object.assign({},q,$)}function pK($){if(a3.indexOf($)>-1)throw new r(`Circular extended configurations: '${$}'.`)}function dK($,J){return M$.path.resolve($,J)}function RZ($,J){let X={};function Z(q){return q&&typeof q==="object"&&!Array.isArray(q)}Object.assign(X,$);for(let q of Object.keys(J))if(Z(J[q])&&Z(X[q]))X[q]=RZ($[q],J[q]);else X[q]=J[q];return X}var h=function($,J,X,Z,q){if(Z==="m")throw TypeError("Private method is not writable");if(Z==="a"&&!q)throw TypeError("Private accessor was defined without a setter");if(typeof J==="function"?$!==J||!q:!J.has($))throw TypeError("Cannot write private member to an object whose class did not declare it");return Z==="a"?q.call($,X):q?q.value=X:J.set($,X),X},z=function($,J,X,Z){if(X==="a"&&!Z)throw TypeError("Private accessor was defined without a getter");if(typeof J==="function"?$!==J||!Z:!J.has($))throw TypeError("Cannot read private member from an object whose class did not declare it");return X==="m"?Z:X==="a"?Z.call($):Z?Z.value:J.get($)},Q0,x1,x$,O0,M0,m4,z1,j1,p4,E0,d4,h0,p0,C0,A0,l4,s1,U0,S,n4,i4,x0,I1,e1,w1,B1,t4,b,O1,E1,h1,g,o4,d0,$0;function bZ($){return(J=[],X=$.process.cwd(),Z)=>{let q=new yZ(J,X,Z,$);return Object.defineProperty(q,"argv",{get:()=>{return q.parse()},enumerable:!0}),q.help(),q.version(),q}}var TZ=Symbol("copyDoubleDash"),PZ=Symbol("copyDoubleDash"),r3=Symbol("deleteFromParserHintObject"),FZ=Symbol("emitWarning"),MZ=Symbol("freeze"),CZ=Symbol("getDollarZero"),A1=Symbol("getParserConfiguration"),xZ=Symbol("getUsageConfiguration"),s3=Symbol("guessLocale"),jZ=Symbol("guessVersion"),IZ=Symbol("parsePositionalNumbers"),e3=Symbol("pkgUp"),K1=Symbol("populateParserHintArray"),$$=Symbol("populateParserHintSingleValueDictionary"),$6=Symbol("populateParserHintArrayDictionary"),J6=Symbol("populateParserHintDictionary"),X6=Symbol("sanitizeKey"),Z6=Symbol("setKey"),Q6=Symbol("unfreeze"),wZ=Symbol("validateAsync"),OZ=Symbol("getCommandInstance"),EZ=Symbol("getContext"),hZ=Symbol("getHasOutput"),AZ=Symbol("getLoggerInstance"),NZ=Symbol("getParseContext"),DZ=Symbol("getUsageInstance"),SZ=Symbol("getValidationInstance"),a4=Symbol("hasParseCallback"),fZ=Symbol("isGlobalContext"),N1=Symbol("postProcess"),vZ=Symbol("rebase"),q6=Symbol("reset"),j$=Symbol("runYargsParserAndExecuteCommands"),Y6=Symbol("runValidation"),kZ=Symbol("setHasOutput"),D1=Symbol("kTrackManuallySetKeys");class yZ{constructor($=[],J,X,Z){this.customScriptName=!1,this.parsed=!1,Q0.set(this,void 0),x1.set(this,void 0),x$.set(this,{commands:[],fullCommands:[]}),O0.set(this,null),M0.set(this,null),m4.set(this,"show-hidden"),z1.set(this,null),j1.set(this,!0),p4.set(this,{}),E0.set(this,!0),d4.set(this,[]),h0.set(this,void 0),p0.set(this,{}),C0.set(this,!1),A0.set(this,null),l4.set(this,!0),s1.set(this,void 0),U0.set(this,""),S.set(this,void 0),n4.set(this,void 0),i4.set(this,{}),x0.set(this,null),I1.set(this,null),e1.set(this,{}),w1.set(this,{}),B1.set(this,void 0),t4.set(this,!1),b.set(this,void 0),O1.set(this,!1),E1.set(this,!1),h1.set(this,!1),g.set(this,void 0),o4.set(this,{}),d0.set(this,null),$0.set(this,void 0),h(this,b,Z,"f"),h(this,B1,$,"f"),h(this,x1,J,"f"),h(this,n4,X,"f"),h(this,h0,new i3(this),"f"),this.$0=this[CZ](),this[q6](),h(this,Q0,z(this,Q0,"f"),"f"),h(this,g,z(this,g,"f"),"f"),h(this,$0,z(this,$0,"f"),"f"),h(this,S,z(this,S,"f"),"f"),z(this,S,"f").showHiddenOpt=z(this,m4,"f"),h(this,s1,this[PZ](),"f")}addHelpOpt($,J){if(E("[string|boolean] [string]",[$,J],arguments.length),z(this,A0,"f"))this[r3](z(this,A0,"f")),h(this,A0,null,"f");if($===!1&&J===void 0)return this;return h(this,A0,typeof $==="string"?$:"help","f"),this.boolean(z(this,A0,"f")),this.describe(z(this,A0,"f"),J||z(this,g,"f").deferY18nLookup("Show help")),this}help($,J){return this.addHelpOpt($,J)}addShowHiddenOpt($,J){if(E("[string|boolean] [string]",[$,J],arguments.length),$===!1&&J===void 0)return this;let X=typeof $==="string"?$:z(this,m4,"f");return this.boolean(X),this.describe(X,J||z(this,g,"f").deferY18nLookup("Show hidden options")),z(this,S,"f").showHiddenOpt=X,this}showHidden($,J){return this.addShowHiddenOpt($,J)}alias($,J){return E("<object|string|array> [string|array]",[$,J],arguments.length),this[$6](this.alias.bind(this),"alias",$,J),this}array($){return E("<array|string>",[$],arguments.length),this[K1]("array",$),this[D1]($),this}boolean($){return E("<array|string>",[$],arguments.length),this[K1]("boolean",$),this[D1]($),this}check($,J){return E("<function> [boolean]",[$,J],arguments.length),this.middleware((X,Z)=>{return C1(()=>{return $(X,Z.getOptions())},(q)=>{if(!q)z(this,g,"f").fail(z(this,b,"f").y18n.__("Argument check failed: %s",$.toString()));else if(typeof q==="string"||q instanceof Error)z(this,g,"f").fail(q.toString(),q);return X},(q)=>{return z(this,g,"f").fail(q.message?q.message:q.toString(),q),X})},!1,J),this}choices($,J){return E("<object|string|array> [string|array]",[$,J],arguments.length),this[$6](this.choices.bind(this),"choices",$,J),this}coerce($,J){if(E("<object|string|array> [function]",[$,J],arguments.length),Array.isArray($)){if(!J)throw new r("coerce callback must be provided");for(let X of $)this.coerce(X,J);return this}else if(typeof $==="object"){for(let X of Object.keys($))this.coerce(X,$[X]);return this}if(!J)throw new r("coerce callback must be provided");return z(this,S,"f").key[$]=!0,z(this,h0,"f").addCoerceMiddleware((X,Z)=>{let q;if(!Object.prototype.hasOwnProperty.call(X,$))return X;return C1(()=>{return q=Z.getAliases(),J(X[$])},(Q)=>{X[$]=Q;let G=Z.getInternalMethods().getParserConfiguration()["strip-aliased"];if(q[$]&&G!==!0)for(let H of q[$])X[H]=Q;return X},(Q)=>{throw new r(Q.message)})},$),this}conflicts($,J){return E("<string|object> [string|array]",[$,J],arguments.length),z(this,$0,"f").conflicts($,J),this}config($="config",J,X){if(E("[object|string] [string|function] [function]",[$,J,X],arguments.length),typeof $==="object"&&!Array.isArray($))return $=C$($,z(this,x1,"f"),this[A1]()["deep-merge-config"]||!1,z(this,b,"f")),z(this,S,"f").configObjects=(z(this,S,"f").configObjects||[]).concat($),this;if(typeof J==="function")X=J,J=void 0;return this.describe($,J||z(this,g,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray($)?$:[$]).forEach((Z)=>{z(this,S,"f").config[Z]=X||!0}),this}completion($,J,X){if(E("[string] [string|boolean|function] [function]",[$,J,X],arguments.length),typeof J==="function")X=J,J=void 0;if(h(this,M0,$||z(this,M0,"f")||"completion","f"),!J&&J!==!1)J="generate completion script";if(this.command(z(this,M0,"f"),J),X)z(this,O0,"f").registerFunction(X);return this}command($,J,X,Z,q,Y){return E("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[$,J,X,Z,q,Y],arguments.length),z(this,Q0,"f").addHandler($,J,X,Z,q,Y),this}commands($,J,X,Z,q,Y){return this.command($,J,X,Z,q,Y)}commandDir($,J){E("<string> [object]",[$,J],arguments.length);let X=z(this,n4,"f")||z(this,b,"f").require;return z(this,Q0,"f").addDirectory($,X,z(this,b,"f").getCallerFile(),J),this}count($){return E("<array|string>",[$],arguments.length),this[K1]("count",$),this[D1]($),this}default($,J,X){if(E("<object|string|array> [*] [string]",[$,J,X],arguments.length),X)n3($,z(this,b,"f")),z(this,S,"f").defaultDescription[$]=X;if(typeof J==="function"){if(n3($,z(this,b,"f")),!z(this,S,"f").defaultDescription[$])z(this,S,"f").defaultDescription[$]=z(this,g,"f").functionDescription(J);J=J.call()}return this[$$](this.default.bind(this),"default",$,J),this}defaults($,J,X){return this.default($,J,X)}demandCommand($=1,J,X,Z){if(E("[number] [number|string] [string|null|undefined] [string|null|undefined]",[$,J,X,Z],arguments.length),typeof J!=="number")X=J,J=1/0;return this.global("_",!1),z(this,S,"f").demandedCommands._={min:$,max:J,minMsg:X,maxMsg:Z},this}demand($,J,X){if(Array.isArray(J))J.forEach((Z)=>{T0(X,!0,z(this,b,"f")),this.demandOption(Z,X)}),J=1/0;else if(typeof J!=="number")X=J,J=1/0;if(typeof $==="number")T0(X,!0,z(this,b,"f")),this.demandCommand($,J,X,X);else if(Array.isArray($))$.forEach((Z)=>{T0(X,!0,z(this,b,"f")),this.demandOption(Z,X)});else if(typeof X==="string")this.demandOption($,X);else if(X===!0||typeof X>"u")this.demandOption($);return this}demandOption($,J){return E("<object|string|array> [string]",[$,J],arguments.length),this[$$](this.demandOption.bind(this),"demandedOptions",$,J),this}deprecateOption($,J){return E("<string> [string|boolean]",[$,J],arguments.length),z(this,S,"f").deprecatedOptions[$]=J,this}describe($,J){return E("<object|string|array> [string]",[$,J],arguments.length),this[Z6]($,!0),z(this,g,"f").describe($,J),this}detectLocale($){return E("<boolean>",[$],arguments.length),h(this,j1,$,"f"),this}env($){if(E("[string|boolean]",[$],arguments.length),$===!1)delete z(this,S,"f").envPrefix;else z(this,S,"f").envPrefix=$||"";return this}epilogue($){return E("<string>",[$],arguments.length),z(this,g,"f").epilog($),this}epilog($){return this.epilogue($)}example($,J){if(E("<string|array> [string]",[$,J],arguments.length),Array.isArray($))$.forEach((X)=>this.example(...X));else z(this,g,"f").example($,J);return this}exit($,J){if(h(this,C0,!0,"f"),h(this,z1,J,"f"),z(this,E0,"f"))z(this,b,"f").process.exit($)}exitProcess($=!0){return E("[boolean]",[$],arguments.length),h(this,E0,$,"f"),this}fail($){if(E("<function|boolean>",[$],arguments.length),typeof $==="boolean"&&$!==!1)throw new r("Invalid first argument. Expected function or boolean 'false'");return z(this,g,"f").failFn($),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion($,J){if(E("<array> [function]",[$,J],arguments.length),!J)return new Promise((X,Z)=>{z(this,O0,"f").getCompletion($,(q,Y)=>{if(q)Z(q);else X(Y)})});else return z(this,O0,"f").getCompletion($,J)}getDemandedOptions(){return E([],0),z(this,S,"f").demandedOptions}getDemandedCommands(){return E([],0),z(this,S,"f").demandedCommands}getDeprecatedOptions(){return E([],0),z(this,S,"f").deprecatedOptions}getDetectLocale(){return z(this,j1,"f")}getExitProcess(){return z(this,E0,"f")}getGroups(){return Object.assign({},z(this,p0,"f"),z(this,w1,"f"))}getHelp(){if(h(this,C0,!0,"f"),!z(this,g,"f").hasCachedHelpMessage()){if(!this.parsed){let J=this[j$](z(this,B1,"f"),void 0,void 0,0,!0);if(s(J))return J.then(()=>{return z(this,g,"f").help()})}let $=z(this,Q0,"f").runDefaultBuilderOn(this);if(s($))return $.then(()=>{return z(this,g,"f").help()})}return Promise.resolve(z(this,g,"f").help())}getOptions(){return z(this,S,"f")}getStrict(){return z(this,O1,"f")}getStrictCommands(){return z(this,E1,"f")}getStrictOptions(){return z(this,h1,"f")}global($,J){if(E("<string|array> [boolean]",[$,J],arguments.length),$=[].concat($),J!==!1)z(this,S,"f").local=z(this,S,"f").local.filter((X)=>$.indexOf(X)===-1);else $.forEach((X)=>{if(!z(this,S,"f").local.includes(X))z(this,S,"f").local.push(X)});return this}group($,J){E("<string|array> <string>",[$,J],arguments.length);let X=z(this,w1,"f")[J]||z(this,p0,"f")[J];if(z(this,w1,"f")[J])delete z(this,w1,"f")[J];let Z={};return z(this,p0,"f")[J]=(X||[]).concat($).filter((q)=>{if(Z[q])return!1;return Z[q]=!0}),this}hide($){return E("<string>",[$],arguments.length),z(this,S,"f").hiddenOptions.push($),this}implies($,J){return E("<string|object> [number|string|array]",[$,J],arguments.length),z(this,$0,"f").implies($,J),this}locale($){if(E("[string]",[$],arguments.length),$===void 0)return this[s3](),z(this,b,"f").y18n.getLocale();return h(this,j1,!1,"f"),z(this,b,"f").y18n.setLocale($),this}middleware($,J,X){return z(this,h0,"f").addMiddleware($,!!J,X)}nargs($,J){return E("<string|object|array> [number]",[$,J],arguments.length),this[$$](this.nargs.bind(this),"narg",$,J),this}normalize($){return E("<array|string>",[$],arguments.length),this[K1]("normalize",$),this}number($){return E("<array|string>",[$],arguments.length),this[K1]("number",$),this[D1]($),this}option($,J){if(E("<string|object> [object]",[$,J],arguments.length),typeof $==="object")Object.keys($).forEach((X)=>{this.options(X,$[X])});else{if(typeof J!=="object")J={};if(this[D1]($),z(this,d0,"f")&&($==="version"||(J===null||J===void 0?void 0:J.alias)==="version"))this[FZ](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
117
- `),void 0,"versionWarning");if(z(this,S,"f").key[$]=!0,J.alias)this.alias($,J.alias);let X=J.deprecate||J.deprecated;if(X)this.deprecateOption($,X);let Z=J.demand||J.required||J.require;if(Z)this.demand($,Z);if(J.demandOption)this.demandOption($,typeof J.demandOption==="string"?J.demandOption:void 0);if(J.conflicts)this.conflicts($,J.conflicts);if("default"in J)this.default($,J.default);if(J.implies!==void 0)this.implies($,J.implies);if(J.nargs!==void 0)this.nargs($,J.nargs);if(J.config)this.config($,J.configParser);if(J.normalize)this.normalize($);if(J.choices)this.choices($,J.choices);if(J.coerce)this.coerce($,J.coerce);if(J.group)this.group($,J.group);if(J.boolean||J.type==="boolean"){if(this.boolean($),J.alias)this.boolean(J.alias)}if(J.array||J.type==="array"){if(this.array($),J.alias)this.array(J.alias)}if(J.number||J.type==="number"){if(this.number($),J.alias)this.number(J.alias)}if(J.string||J.type==="string"){if(this.string($),J.alias)this.string(J.alias)}if(J.count||J.type==="count")this.count($);if(typeof J.global==="boolean")this.global($,J.global);if(J.defaultDescription)z(this,S,"f").defaultDescription[$]=J.defaultDescription;if(J.skipValidation)this.skipValidation($);let q=J.describe||J.description||J.desc,Y=z(this,g,"f").getDescriptions();if(!Object.prototype.hasOwnProperty.call(Y,$)||typeof q==="string")this.describe($,q);if(J.hidden)this.hide($);if(J.requiresArg)this.requiresArg($)}return this}options($,J){return this.option($,J)}parse($,J,X){if(E("[string|array] [function|boolean|object] [function]",[$,J,X],arguments.length),this[MZ](),typeof $>"u")$=z(this,B1,"f");if(typeof J==="object")h(this,I1,J,"f"),J=X;if(typeof J==="function")h(this,x0,J,"f"),J=!1;if(!J)h(this,B1,$,"f");if(z(this,x0,"f"))h(this,E0,!1,"f");let Z=this[j$]($,!!J),q=this.parsed;if(z(this,O0,"f").setParsed(this.parsed),s(Z))return Z.then((Y)=>{if(z(this,x0,"f"))z(this,x0,"f").call(this,z(this,z1,"f"),Y,z(this,U0,"f"));return Y}).catch((Y)=>{if(z(this,x0,"f"))z(this,x0,"f")(Y,this.parsed.argv,z(this,U0,"f"));throw Y}).finally(()=>{this[Q6](),this.parsed=q});else{if(z(this,x0,"f"))z(this,x0,"f").call(this,z(this,z1,"f"),Z,z(this,U0,"f"));this[Q6](),this.parsed=q}return Z}parseAsync($,J,X){let Z=this.parse($,J,X);return!s(Z)?Promise.resolve(Z):Z}parseSync($,J,X){let Z=this.parse($,J,X);if(s(Z))throw new r(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return Z}parserConfiguration($){return E("<object>",[$],arguments.length),h(this,i4,$,"f"),this}pkgConf($,J){E("<string> [string]",[$,J],arguments.length);let X=null,Z=this[e3](J||z(this,x1,"f"));if(Z[$]&&typeof Z[$]==="object")X=C$(Z[$],J||z(this,x1,"f"),this[A1]()["deep-merge-config"]||!1,z(this,b,"f")),z(this,S,"f").configObjects=(z(this,S,"f").configObjects||[]).concat(X);return this}positional($,J){E("<string> <object>",[$,J],arguments.length);let X=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];J=G1(J,(Y,Q)=>{if(Y==="type"&&!["string","number","boolean"].includes(Q))return!1;return X.includes(Y)});let Z=z(this,x$,"f").fullCommands[z(this,x$,"f").fullCommands.length-1],q=Z?z(this,Q0,"f").cmdToParseOptions(Z):{array:[],alias:{},default:{},demand:{}};return a1(q).forEach((Y)=>{let Q=q[Y];if(Array.isArray(Q)){if(Q.indexOf($)!==-1)J[Y]=!0}else if(Q[$]&&!(Y in J))J[Y]=Q[$]}),this.group($,z(this,g,"f").getPositionalGroupName()),this.option($,J)}recommendCommands($=!0){return E("[boolean]",[$],arguments.length),h(this,t4,$,"f"),this}required($,J,X){return this.demand($,J,X)}require($,J,X){return this.demand($,J,X)}requiresArg($){if(E("<array|string|object> [number]",[$],arguments.length),typeof $==="string"&&z(this,S,"f").narg[$])return this;else this[$$](this.requiresArg.bind(this),"narg",$,NaN);return this}showCompletionScript($,J){return E("[string] [string]",[$,J],arguments.length),$=$||this.$0,z(this,s1,"f").log(z(this,O0,"f").generateCompletionScript($,J||z(this,M0,"f")||"completion")),this}showHelp($){if(E("[string|function]",[$],arguments.length),h(this,C0,!0,"f"),!z(this,g,"f").hasCachedHelpMessage()){if(!this.parsed){let X=this[j$](z(this,B1,"f"),void 0,void 0,0,!0);if(s(X))return X.then(()=>{z(this,g,"f").showHelp($)}),this}let J=z(this,Q0,"f").runDefaultBuilderOn(this);if(s(J))return J.then(()=>{z(this,g,"f").showHelp($)}),this}return z(this,g,"f").showHelp($),this}scriptName($){return this.customScriptName=!0,this.$0=$,this}showHelpOnFail($,J){return E("[boolean|string] [string]",[$,J],arguments.length),z(this,g,"f").showHelpOnFail($,J),this}showVersion($){return E("[string|function]",[$],arguments.length),z(this,g,"f").showVersion($),this}skipValidation($){return E("<array|string>",[$],arguments.length),this[K1]("skipValidation",$),this}strict($){return E("[boolean]",[$],arguments.length),h(this,O1,$!==!1,"f"),this}strictCommands($){return E("[boolean]",[$],arguments.length),h(this,E1,$!==!1,"f"),this}strictOptions($){return E("[boolean]",[$],arguments.length),h(this,h1,$!==!1,"f"),this}string($){return E("<array|string>",[$],arguments.length),this[K1]("string",$),this[D1]($),this}terminalWidth(){return E([],0),z(this,b,"f").process.stdColumns}updateLocale($){return this.updateStrings($)}updateStrings($){return E("<object>",[$],arguments.length),h(this,j1,!1,"f"),z(this,b,"f").y18n.updateLocale($),this}usage($,J,X,Z){if(E("<string|null|undefined> [string|boolean] [function|object] [function]",[$,J,X,Z],arguments.length),J!==void 0)if(T0($,null,z(this,b,"f")),($||"").match(/^\$0( |$)/))return this.command($,J,X,Z);else throw new r(".usage() description must start with $0 if being used as alias for .command()");else return z(this,g,"f").usage($),this}usageConfiguration($){return E("<object>",[$],arguments.length),h(this,o4,$,"f"),this}version($,J,X){if(E("[boolean|string] [string] [string]",[$,J,X],arguments.length),z(this,d0,"f"))this[r3](z(this,d0,"f")),z(this,g,"f").version(void 0),h(this,d0,null,"f");if(arguments.length===0)X=this[jZ](),$="version";else if(arguments.length===1){if($===!1)return this;X=$,$="version"}else if(arguments.length===2)X=J,J=void 0;return h(this,d0,typeof $==="string"?$:"version","f"),J=J||z(this,g,"f").deferY18nLookup("Show version number"),z(this,g,"f").version(X||void 0),this.boolean(z(this,d0,"f")),this.describe(z(this,d0,"f"),J),this}wrap($){return E("<number|null|undefined>",[$],arguments.length),z(this,g,"f").wrap($),this}[(Q0=new WeakMap,x1=new WeakMap,x$=new WeakMap,O0=new WeakMap,M0=new WeakMap,m4=new WeakMap,z1=new WeakMap,j1=new WeakMap,p4=new WeakMap,E0=new WeakMap,d4=new WeakMap,h0=new WeakMap,p0=new WeakMap,C0=new WeakMap,A0=new WeakMap,l4=new WeakMap,s1=new WeakMap,U0=new WeakMap,S=new WeakMap,n4=new WeakMap,i4=new WeakMap,x0=new WeakMap,I1=new WeakMap,e1=new WeakMap,w1=new WeakMap,B1=new WeakMap,t4=new WeakMap,b=new WeakMap,O1=new WeakMap,E1=new WeakMap,h1=new WeakMap,g=new WeakMap,o4=new WeakMap,d0=new WeakMap,$0=new WeakMap,TZ)]($){if(!$._||!$["--"])return $;$._.push.apply($._,$["--"]);try{delete $["--"]}catch(J){}return $}[PZ](){return{log:(...$)=>{if(!this[a4]())console.log(...$);if(h(this,C0,!0,"f"),z(this,U0,"f").length)h(this,U0,z(this,U0,"f")+`
118
- `,"f");h(this,U0,z(this,U0,"f")+$.join(" "),"f")},error:(...$)=>{if(!this[a4]())console.error(...$);if(h(this,C0,!0,"f"),z(this,U0,"f").length)h(this,U0,z(this,U0,"f")+`
119
- `,"f");h(this,U0,z(this,U0,"f")+$.join(" "),"f")}}}[r3]($){a1(z(this,S,"f")).forEach((J)=>{if(((Z)=>Z==="configObjects")(J))return;let X=z(this,S,"f")[J];if(Array.isArray(X)){if(X.includes($))X.splice(X.indexOf($),1)}else if(typeof X==="object")delete X[$]}),delete z(this,g,"f").getDescriptions()[$]}[FZ]($,J,X){if(!z(this,p4,"f")[X])z(this,b,"f").process.emitWarning($,J),z(this,p4,"f")[X]=!0}[MZ](){z(this,d4,"f").push({options:z(this,S,"f"),configObjects:z(this,S,"f").configObjects.slice(0),exitProcess:z(this,E0,"f"),groups:z(this,p0,"f"),strict:z(this,O1,"f"),strictCommands:z(this,E1,"f"),strictOptions:z(this,h1,"f"),completionCommand:z(this,M0,"f"),output:z(this,U0,"f"),exitError:z(this,z1,"f"),hasOutput:z(this,C0,"f"),parsed:this.parsed,parseFn:z(this,x0,"f"),parseContext:z(this,I1,"f")}),z(this,g,"f").freeze(),z(this,$0,"f").freeze(),z(this,Q0,"f").freeze(),z(this,h0,"f").freeze()}[CZ](){let $="",J;if(/\b(node|iojs|electron)(\.exe)?$/.test(z(this,b,"f").process.argv()[0]))J=z(this,b,"f").process.argv().slice(1,2);else J=z(this,b,"f").process.argv().slice(0,1);if($=J.map((X)=>{let Z=this[vZ](z(this,x1,"f"),X);return X.match(/^(\/|([a-zA-Z]:)?\\)/)&&Z.length<X.length?Z:X}).join(" ").trim(),z(this,b,"f").getEnv("_")&&z(this,b,"f").getProcessArgvBin()===z(this,b,"f").getEnv("_"))$=z(this,b,"f").getEnv("_").replace(`${z(this,b,"f").path.dirname(z(this,b,"f").process.execPath())}/`,"");return $}[A1](){return z(this,i4,"f")}[xZ](){return z(this,o4,"f")}[s3](){if(!z(this,j1,"f"))return;let $=z(this,b,"f").getEnv("LC_ALL")||z(this,b,"f").getEnv("LC_MESSAGES")||z(this,b,"f").getEnv("LANG")||z(this,b,"f").getEnv("LANGUAGE")||"en_US";this.locale($.replace(/[.:].*/,""))}[jZ](){return this[e3]().version||"unknown"}[IZ]($){let J=$["--"]?$["--"]:$._;for(let X=0,Z;(Z=J[X])!==void 0;X++)if(z(this,b,"f").Parser.looksLikeNumber(Z)&&Number.isSafeInteger(Math.floor(parseFloat(`${Z}`))))J[X]=Number(Z);return $}[e3]($){let J=$||"*";if(z(this,e1,"f")[J])return z(this,e1,"f")[J];let X={};try{let Z=$||z(this,b,"f").mainFilename;if(!$&&z(this,b,"f").path.extname(Z))Z=z(this,b,"f").path.dirname(Z);let q=z(this,b,"f").findUp(Z,(Y,Q)=>{if(Q.includes("package.json"))return"package.json";else return});T0(q,void 0,z(this,b,"f")),X=JSON.parse(z(this,b,"f").readFileSync(q,"utf8"))}catch(Z){}return z(this,e1,"f")[J]=X||{},z(this,e1,"f")[J]}[K1]($,J){J=[].concat(J),J.forEach((X)=>{X=this[X6](X),z(this,S,"f")[$].push(X)})}[$$]($,J,X,Z){this[J6]($,J,X,Z,(q,Y,Q)=>{z(this,S,"f")[q][Y]=Q})}[$6]($,J,X,Z){this[J6]($,J,X,Z,(q,Y,Q)=>{z(this,S,"f")[q][Y]=(z(this,S,"f")[q][Y]||[]).concat(Q)})}[J6]($,J,X,Z,q){if(Array.isArray(X))X.forEach((Y)=>{$(Y,Z)});else if(((Y)=>typeof Y==="object")(X))for(let Y of a1(X))$(Y,X[Y]);else q(J,this[X6](X),Z)}[X6]($){if($==="__proto__")return"___proto___";return $}[Z6]($,J){return this[$$](this[Z6].bind(this),"key",$,J),this}[Q6](){var $,J,X,Z,q,Y,Q,G,H,B,U,K;let W=z(this,d4,"f").pop();T0(W,void 0,z(this,b,"f"));let P;$=this,J=this,X=this,Z=this,q=this,Y=this,Q=this,G=this,H=this,B=this,U=this,K=this,{options:{set value(R){h($,S,R,"f")}}.value,configObjects:P,exitProcess:{set value(R){h(J,E0,R,"f")}}.value,groups:{set value(R){h(X,p0,R,"f")}}.value,output:{set value(R){h(Z,U0,R,"f")}}.value,exitError:{set value(R){h(q,z1,R,"f")}}.value,hasOutput:{set value(R){h(Y,C0,R,"f")}}.value,parsed:this.parsed,strict:{set value(R){h(Q,O1,R,"f")}}.value,strictCommands:{set value(R){h(G,E1,R,"f")}}.value,strictOptions:{set value(R){h(H,h1,R,"f")}}.value,completionCommand:{set value(R){h(B,M0,R,"f")}}.value,parseFn:{set value(R){h(U,x0,R,"f")}}.value,parseContext:{set value(R){h(K,I1,R,"f")}}.value}=W,z(this,S,"f").configObjects=P,z(this,g,"f").unfreeze(),z(this,$0,"f").unfreeze(),z(this,Q0,"f").unfreeze(),z(this,h0,"f").unfreeze()}[wZ]($,J){return C1(J,(X)=>{return $(X),X})}getInternalMethods(){return{getCommandInstance:this[OZ].bind(this),getContext:this[EZ].bind(this),getHasOutput:this[hZ].bind(this),getLoggerInstance:this[AZ].bind(this),getParseContext:this[NZ].bind(this),getParserConfiguration:this[A1].bind(this),getUsageConfiguration:this[xZ].bind(this),getUsageInstance:this[DZ].bind(this),getValidationInstance:this[SZ].bind(this),hasParseCallback:this[a4].bind(this),isGlobalContext:this[fZ].bind(this),postProcess:this[N1].bind(this),reset:this[q6].bind(this),runValidation:this[Y6].bind(this),runYargsParserAndExecuteCommands:this[j$].bind(this),setHasOutput:this[kZ].bind(this)}}[OZ](){return z(this,Q0,"f")}[EZ](){return z(this,x$,"f")}[hZ](){return z(this,C0,"f")}[AZ](){return z(this,s1,"f")}[NZ](){return z(this,I1,"f")||{}}[DZ](){return z(this,g,"f")}[SZ](){return z(this,$0,"f")}[a4](){return!!z(this,x0,"f")}[fZ](){return z(this,l4,"f")}[N1]($,J,X,Z){if(X)return $;if(s($))return $;if(!J)$=this[TZ]($);if(this[A1]()["parse-positional-numbers"]||this[A1]()["parse-positional-numbers"]===void 0)$=this[IZ]($);if(Z)$=M1($,this,z(this,h0,"f").getMiddleware(),!1);return $}[q6]($={}){h(this,S,z(this,S,"f")||{},"f");let J={};J.local=z(this,S,"f").local||[],J.configObjects=z(this,S,"f").configObjects||[];let X={};J.local.forEach((Y)=>{X[Y]=!0,($[Y]||[]).forEach((Q)=>{X[Q]=!0})}),Object.assign(z(this,w1,"f"),Object.keys(z(this,p0,"f")).reduce((Y,Q)=>{let G=z(this,p0,"f")[Q].filter((H)=>!(H in X));if(G.length>0)Y[Q]=G;return Y},{})),h(this,p0,{},"f");let Z=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],q=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];if(Z.forEach((Y)=>{J[Y]=(z(this,S,"f")[Y]||[]).filter((Q)=>!X[Q])}),q.forEach((Y)=>{J[Y]=G1(z(this,S,"f")[Y],(Q)=>!X[Q])}),J.envPrefix=z(this,S,"f").envPrefix,h(this,S,J,"f"),h(this,g,z(this,g,"f")?z(this,g,"f").reset(X):zZ(this,z(this,b,"f")),"f"),h(this,$0,z(this,$0,"f")?z(this,$0,"f").reset(X):_Z(this,z(this,g,"f"),z(this,b,"f")),"f"),h(this,Q0,z(this,Q0,"f")?z(this,Q0,"f").reset():YZ(z(this,g,"f"),z(this,$0,"f"),z(this,h0,"f"),z(this,b,"f")),"f"),!z(this,O0,"f"))h(this,O0,WZ(this,z(this,g,"f"),z(this,Q0,"f"),z(this,b,"f")),"f");return z(this,h0,"f").reset(),h(this,M0,null,"f"),h(this,U0,"","f"),h(this,z1,null,"f"),h(this,C0,!1,"f"),this.parsed=!1,this}[vZ]($,J){return z(this,b,"f").path.relative($,J)}[j$]($,J,X,Z=0,q=!1){let Y=!!X||q;$=$||z(this,B1,"f"),z(this,S,"f").__=z(this,b,"f").y18n.__,z(this,S,"f").configuration=this[A1]();let Q=!!z(this,S,"f").configuration["populate--"],G=Object.assign({},z(this,S,"f").configuration,{"populate--":!0}),H=z(this,b,"f").Parser.detailed($,Object.assign({},z(this,S,"f"),{configuration:{"parse-positional-numbers":!1,...G}})),B=Object.assign(H.argv,z(this,I1,"f")),U=void 0,K=H.aliases,W=!1,P=!1;if(Object.keys(B).forEach((R)=>{if(R===z(this,A0,"f")&&B[R])W=!0;else if(R===z(this,d0,"f")&&B[R])P=!0}),B.$0=this.$0,this.parsed=H,Z===0)z(this,g,"f").clearCachedHelpMessage();try{if(this[s3](),J)return this[N1](B,Q,!!X,!1);if(z(this,A0,"f")){if([z(this,A0,"f")].concat(K[z(this,A0,"f")]||[]).filter((A)=>A.length>1).includes(""+B._[B._.length-1]))B._.pop(),W=!0}h(this,l4,!1,"f");let R=z(this,Q0,"f").getCommands(),L=z(this,O0,"f").completionKey in B,M=W||L||q;if(B._.length){if(R.length){let C;for(let A=Z||0,m;B._[A]!==void 0;A++)if(m=String(B._[A]),R.includes(m)&&m!==z(this,M0,"f")){let j=z(this,Q0,"f").runCommand(m,this,H,A+1,q,W||P||q);return this[N1](j,Q,!!X,!1)}else if(!C&&m!==z(this,M0,"f")){C=m;break}if(!z(this,Q0,"f").hasDefaultCommand()&&z(this,t4,"f")&&C&&!M)z(this,$0,"f").recommendCommands(C,R)}if(z(this,M0,"f")&&B._.includes(z(this,M0,"f"))&&!L){if(z(this,E0,"f"))H1(!0);this.showCompletionScript(),this.exit(0)}}if(z(this,Q0,"f").hasDefaultCommand()&&!M){let C=z(this,Q0,"f").runCommand(null,this,H,0,q,W||P||q);return this[N1](C,Q,!!X,!1)}if(L){if(z(this,E0,"f"))H1(!0);$=[].concat($);let C=$.slice($.indexOf(`--${z(this,O0,"f").completionKey}`)+1);return z(this,O0,"f").getCompletion(C,(A,m)=>{if(A)throw new r(A.message);(m||[]).forEach((j)=>{z(this,s1,"f").log(j)}),this.exit(0)}),this[N1](B,!Q,!!X,!1)}if(!z(this,C0,"f")){if(W){if(z(this,E0,"f"))H1(!0);Y=!0,this.showHelp("log"),this.exit(0)}else if(P){if(z(this,E0,"f"))H1(!0);Y=!0,z(this,g,"f").showVersion("log"),this.exit(0)}}if(!Y&&z(this,S,"f").skipValidation.length>0)Y=Object.keys(B).some((C)=>z(this,S,"f").skipValidation.indexOf(C)>=0&&B[C]===!0);if(!Y){if(H.error)throw new r(H.error.message);if(!L){let C=this[Y6](K,{},H.error);if(!X)U=M1(B,this,z(this,h0,"f").getMiddleware(),!0);if(U=this[wZ](C,U!==null&&U!==void 0?U:B),s(U)&&!X)U=U.then(()=>{return M1(B,this,z(this,h0,"f").getMiddleware(),!1)})}}}catch(R){if(R instanceof r)z(this,g,"f").fail(R.message,R);else throw R}return this[N1](U!==null&&U!==void 0?U:B,Q,!!X,!0)}[Y6]($,J,X,Z){let q={...this.getDemandedOptions()};return(Y)=>{if(X)throw new r(X.message);z(this,$0,"f").nonOptionCount(Y),z(this,$0,"f").requiredArguments(Y,q);let Q=!1;if(z(this,E1,"f"))Q=z(this,$0,"f").unknownCommands(Y);if(z(this,O1,"f")&&!Q)z(this,$0,"f").unknownArguments(Y,$,J,!!Z);else if(z(this,h1,"f"))z(this,$0,"f").unknownArguments(Y,$,{},!1,!1);z(this,$0,"f").limitedChoices(Y),z(this,$0,"f").implications(Y),z(this,$0,"f").conflicting(Y)}}[kZ](){h(this,C0,!0,"f")}[D1]($){if(typeof $==="string")z(this,S,"f").key[$]=!0;else for(let J of $)z(this,S,"f").key[J]=!0}}function GZ($){return!!$&&typeof $.getInternalMethods==="function"}var lK=bZ(l3),gZ=lK;import{existsSync as e0,readFileSync as G6,rmSync as J$,writeFileSync as nK,readdirSync as mZ,copyFileSync as e4,mkdirSync as H6}from"fs";import{resolve as U1,dirname as z6,join as N0}from"path";import{fileURLToPath as iK}from"url";var cZ=gZ(d3(process.argv)).option("h",{alias:"help",type:"boolean"}).option("v",{alias:"version",type:"boolean"}).parseSync(),tK="https://github.com/ardzero/bunext.git",r4=".bunext-upgrade-temp",oK=["create-bunext","packages",".github/workflows","src/app/(index)/docs","src/components/docs"],aK=[".git","public","src/lib/data/siteData.ts"],rK=["android-chrome-192x192.png","android-chrome-512x512.png","site.webmanifest"],sK="favicon.svg",eK="ogImage.jpg";function $U(){try{let $=iK(import.meta.url),J=z6($),X=N0(J,"../package.json");return JSON.parse(G6(X,"utf-8")).version}catch{return"0.1.0"}}function JU($){for(let J of aK){let X=U1($,J);if(!e0(X))return{ok:!1,missing:J}}return{ok:!0}}function uZ($){let J=$.indexOf("export const siteData");if(J===-1)return null;let X=$.indexOf("= {",J);if(X===-1)return null;let Z=1,q=X+3;while(q<$.length&&Z>0){let Y=$[q];if(Y==="{")Z++;else if(Y==="}")Z--;q++}if(Z!==0)return null;return $.slice(J,$.indexOf(";",q)+1)}function XU($){let J=$.match(/favicon:\s*['"]([^'"]+)['"]/);return J?J[1]:null}function ZU($){let J=$.match(/ogImage:\s*\{\s*src:\s*['"]([^'"]+)['"]/);return J?J[1]:null}function pZ($,J,X=!1){let Z=mZ($,{withFileTypes:!0});for(let q of Z){if(X&&q.name===".git")continue;let Y=N0($,q.name),Q=N0(J,q.name);if(q.isDirectory())H6(Q,{recursive:!0}),pZ(Y,Q,!1);else H6(z6(Q),{recursive:!0}),e4(Y,Q)}}async function QU(){if(cZ.v)console.log($U()),process.exit(0);if(cZ.h)console.log("Usage: bunextupgrade"),console.log(" Upgrade an existing Bunext project to the latest template."),console.log(" Run from the project root. Preserves .git, public assets, and siteData."),process.exit(0);let $=process.cwd(),J=JU($);if(!J.ok)m0.error(`This isn't a valid Bunext project (missing: ${J.missing}).`),process.exit(1);console.clear(),DX(s4.default.bgCyan(s4.default.black(" bunextupgrade ")));let X=fX();X.start("Cloning latest Bunext template");try{await FX("git",["clone","--depth","1",tK,r4],{cwd:$}),X.stop("Template cloned")}catch(M){X.stop("Failed to clone");let C=M instanceof Error?M.message:String(M);m0.error(C.includes("already exists")?`Directory "${r4}" already exists. Remove it and try again.`:C),process.exit(1)}let Z=U1($,r4);X.start("Cleaning template");let q=U1(Z,".git");if(e0(q))J$(q,{recursive:!0,force:!0});for(let M of oK){let C=U1(Z,M);if(e0(C))J$(C,{recursive:!0,force:!0})}X.stop("Template cleaned");let Y=U1($,"public"),Q=U1(Z,"public"),G=U1($,"src/lib/data/siteData.ts"),H=U1(Z,"src/lib/data/siteData.ts"),B=G6(G,"utf-8"),U=XU(B),K=ZU(B);X.start("Preserving your public assets and site data");for(let M of rK){let C=N0(Y,M),A=N0(Q,M);if(e0(C))H6(z6(A),{recursive:!0}),e4(C,A)}let W=U?N0(Y,U.replace(/^\//,"")):null;if(W&&e0(W)){if(e4(W,N0(Q,U.replace(/^\//,""))),U!=="/favicon.svg"){let M=N0(Q,sK);if(e0(M))J$(M,{force:!0})}}let P=K?N0(Y,K.replace(/^\//,"")):null;if(P&&e0(P)){if(e4(P,N0(Q,K.replace(/^\//,""))),K!=="/ogImage.jpg"){let M=N0(Q,eK);if(e0(M))J$(M,{force:!0})}}let R=uZ(B);if(R&&e0(H)){let M=G6(H,"utf-8"),C=uZ(M);if(C){let A=M.replace(C,R);nK(H,A)}}X.stop("Preserved public assets and site data"),X.start("Replacing project with upgraded files");let L=mZ($,{withFileTypes:!0});for(let M of L){if(M.name===".git"||M.name===r4)continue;let C=N0($,M.name);J$(C,{recursive:!0,force:!0})}pZ(Z,$,!1),J$(Z,{recursive:!0,force:!0}),X.stop("Upgrade complete"),SX(s4.default.green("Project upgraded successfully."))}QU().catch(($)=>{m0.error($ instanceof Error?$.message:String($)),process.exit(1)});
114
+ `)}`:"";J.fail(q("Missing required argument: %s","Missing required arguments: %s",Object.keys(M).length,Object.keys(M).join(", ")+L))}},Y.unknownArguments=function(B,W,M,R,L=!0){var I;let x=$.getInternalMethods().getCommandInstance().getCommands(),F=[],v=$.getInternalMethods().getContext();if(Object.keys(B).forEach((j)=>{if(!RX.includes(j)&&!Object.prototype.hasOwnProperty.call(M,j)&&!Object.prototype.hasOwnProperty.call($.getInternalMethods().getParseContext(),j)&&!Y.isValidAndSomeAliasIsNotNew(j,W))F.push(j)}),L&&(v.commands.length>0||x.length>0||R))B._.slice(v.commands.length).forEach((j)=>{if(!x.includes(""+j))F.push(""+j)});if(L){let l=((I=$.getDemandedCommands()._)===null||I===void 0?void 0:I.max)||0,n=v.commands.length+l;if(n<B._.length)B._.slice(n).forEach((o)=>{if(o=String(o),!v.commands.includes(o)&&!F.includes(o))F.push(o)})}if(F.length)J.fail(q("Unknown argument: %s","Unknown arguments: %s",F.length,F.map((j)=>j.trim()?j:`"${j}"`).join(", ")))},Y.unknownCommands=function(B){let W=$.getInternalMethods().getCommandInstance().getCommands(),M=[],R=$.getInternalMethods().getContext();if(R.commands.length>0||W.length>0)B._.slice(R.commands.length).forEach((L)=>{if(!W.includes(""+L))M.push(""+L)});if(M.length>0)return J.fail(q("Unknown command: %s","Unknown commands: %s",M.length,M.join(", "))),!0;else return!1},Y.isValidAndSomeAliasIsNotNew=function(B,W){if(!Object.prototype.hasOwnProperty.call(W,B))return!1;let M=$.parsed.newAliases;return[B,...W[B]].some((R)=>!Object.prototype.hasOwnProperty.call(M,R)||!M[B])},Y.limitedChoices=function(B){let W=$.getOptions(),M={};if(!Object.keys(W.choices).length)return;Object.keys(B).forEach((I)=>{if(RX.indexOf(I)===-1&&Object.prototype.hasOwnProperty.call(W.choices,I))[].concat(B[I]).forEach((x)=>{if(W.choices[I].indexOf(x)===-1&&x!==void 0)M[I]=(M[I]||[]).concat(x)})});let R=Object.keys(M);if(!R.length)return;let L=X("Invalid values:");R.forEach((I)=>{L+=`
115
+ ${X("Argument: %s, Given: %s, Choices: %s",I,J.stringifiedValues(M[I]),J.stringifiedValues(W.choices[I]))}`}),J.fail(L)};let Q={};Y.implies=function(B,W){if(A("<string|object> [array|number|string]",[B,W],arguments.length),typeof B==="object")Object.keys(B).forEach((M)=>{Y.implies(M,B[M])});else{if($.global(B),!Q[B])Q[B]=[];if(Array.isArray(W))W.forEach((M)=>Y.implies(B,M));else T0(W,void 0,Z),Q[B].push(W)}},Y.getImplied=function(){return Q};function G(U,B){let W=Number(B);if(B=isNaN(W)?B:W,typeof B==="number")B=U._.length>=B;else if(B.match(/^--no-.+/))B=B.match(/^--no-(.+)/)[1],B=!Object.prototype.hasOwnProperty.call(U,B);else B=Object.prototype.hasOwnProperty.call(U,B);return B}Y.implications=function(B){let W=[];if(Object.keys(Q).forEach((M)=>{let R=M;(Q[M]||[]).forEach((L)=>{let I=R,x=L;if(I=G(B,I),L=G(B,L),I&&!L)W.push(` ${R} -> ${x}`)})}),W.length){let M=`${X("Implications failed:")}
116
+ `;W.forEach((R)=>{M+=R}),J.fail(M)}};let H={};Y.conflicts=function(B,W){if(A("<string|object> [array|string]",[B,W],arguments.length),typeof B==="object")Object.keys(B).forEach((M)=>{Y.conflicts(M,B[M])});else{if($.global(B),!H[B])H[B]=[];if(Array.isArray(W))W.forEach((M)=>Y.conflicts(B,M));else H[B].push(W)}},Y.getConflicting=()=>H,Y.conflicting=function(B){if(Object.keys(B).forEach((W)=>{if(H[W])H[W].forEach((M)=>{if(M&&B[W]!==void 0&&B[M]!==void 0)J.fail(X("Arguments %s and %s are mutually exclusive",W,M))})}),$.getInternalMethods().getParserConfiguration()["strip-dashed"])Object.keys(H).forEach((W)=>{H[W].forEach((M)=>{if(M&&B[Z.Parser.camelCase(W)]!==void 0&&B[Z.Parser.camelCase(M)]!==void 0)J.fail(X("Arguments %s and %s are mutually exclusive",W,M))})})},Y.recommendCommands=function(B,W){W=W.sort((I,x)=>x.length-I.length);let R=null,L=1/0;for(let I=0,x;(x=W[I])!==void 0;I++){let F=_X(B,x);if(F<=3&&F<L)L=F,R=x}if(R)J.fail(X("Did you mean %s?",R))},Y.reset=function(B){return Q=H1(Q,(W)=>!B[W]),H=H1(H,(W)=>!B[W]),Y};let K=[];return Y.freeze=function(){K.push({implied:Q,conflicting:H})},Y.unfreeze=function(){let B=K.pop();T0(B,void 0,Z),{implied:Q,conflicting:H}=B},Y}var s3=[],F$;function P$($,J,Z,X){F$=X;let q={};if(Object.prototype.hasOwnProperty.call($,"extends")){if(typeof $.extends!=="string")return q;let Y=/\.json|\..*rc$/.test($.extends),Q=null;if(!Y)try{Q=V0.resolve($.extends)}catch(G){return $}else Q=lB(J,$.extends);dB(Q),s3.push(Q),q=Y?JSON.parse(F$.readFileSync(Q,"utf8")):V0($.extends),delete $.extends,q=P$(q,F$.path.dirname(Q),Z,F$)}return s3=[],Z?MX(q,$):Object.assign({},q,$)}function dB($){if(s3.indexOf($)>-1)throw new r(`Circular extended configurations: '${$}'.`)}function lB($,J){return F$.path.resolve($,J)}function MX($,J){let Z={};function X(q){return q&&typeof q==="object"&&!Array.isArray(q)}Object.assign(Z,$);for(let q of Object.keys(J))if(X(J[q])&&X(Z[q]))Z[q]=MX($[q],J[q]);else Z[q]=J[q];return Z}var h=function($,J,Z,X,q){if(X==="m")throw TypeError("Private method is not writable");if(X==="a"&&!q)throw TypeError("Private accessor was defined without a setter");if(typeof J==="function"?$!==J||!q:!J.has($))throw TypeError("Cannot write private member to an object whose class did not declare it");return X==="a"?q.call($,Z):q?q.value=Z:J.set($,Z),Z},z=function($,J,Z,X){if(Z==="a"&&!X)throw TypeError("Private accessor was defined without a getter");if(typeof J==="function"?$!==J||!X:!J.has($))throw TypeError("Cannot read private member from an object whose class did not declare it");return Z==="m"?X:Z==="a"?X.call($):X?X.value:J.get($)},Q0,j1,j$,O0,F0,d4,K1,x1,l4,E0,n4,A0,d0,P0,h0,i4,e1,U0,S,o4,t4,j0,I1,$$,w1,B1,a4,y,O1,E1,A1,u,r4,l0,$0;function gX($){return(J=[],Z=$.process.cwd(),X)=>{let q=new uX(J,Z,X,$);return Object.defineProperty(q,"argv",{get:()=>{return q.parse()},enumerable:!0}),q.help(),q.version(),q}}var CX=Symbol("copyDoubleDash"),FX=Symbol("copyDoubleDash"),e3=Symbol("deleteFromParserHintObject"),PX=Symbol("emitWarning"),jX=Symbol("freeze"),xX=Symbol("getDollarZero"),h1=Symbol("getParserConfiguration"),IX=Symbol("getUsageConfiguration"),$6=Symbol("guessLocale"),wX=Symbol("guessVersion"),OX=Symbol("parsePositionalNumbers"),J6=Symbol("pkgUp"),U1=Symbol("populateParserHintArray"),J$=Symbol("populateParserHintSingleValueDictionary"),Z6=Symbol("populateParserHintArrayDictionary"),X6=Symbol("populateParserHintDictionary"),Q6=Symbol("sanitizeKey"),q6=Symbol("setKey"),Y6=Symbol("unfreeze"),EX=Symbol("validateAsync"),AX=Symbol("getCommandInstance"),hX=Symbol("getContext"),NX=Symbol("getHasOutput"),DX=Symbol("getLoggerInstance"),SX=Symbol("getParseContext"),vX=Symbol("getUsageInstance"),fX=Symbol("getValidationInstance"),s4=Symbol("hasParseCallback"),kX=Symbol("isGlobalContext"),N1=Symbol("postProcess"),bX=Symbol("rebase"),G6=Symbol("reset"),x$=Symbol("runYargsParserAndExecuteCommands"),H6=Symbol("runValidation"),yX=Symbol("setHasOutput"),D1=Symbol("kTrackManuallySetKeys");class uX{constructor($=[],J,Z,X){this.customScriptName=!1,this.parsed=!1,Q0.set(this,void 0),j1.set(this,void 0),j$.set(this,{commands:[],fullCommands:[]}),O0.set(this,null),F0.set(this,null),d4.set(this,"show-hidden"),K1.set(this,null),x1.set(this,!0),l4.set(this,{}),E0.set(this,!0),n4.set(this,[]),A0.set(this,void 0),d0.set(this,{}),P0.set(this,!1),h0.set(this,null),i4.set(this,!0),e1.set(this,void 0),U0.set(this,""),S.set(this,void 0),o4.set(this,void 0),t4.set(this,{}),j0.set(this,null),I1.set(this,null),$$.set(this,{}),w1.set(this,{}),B1.set(this,void 0),a4.set(this,!1),y.set(this,void 0),O1.set(this,!1),E1.set(this,!1),A1.set(this,!1),u.set(this,void 0),r4.set(this,{}),l0.set(this,null),$0.set(this,void 0),h(this,y,X,"f"),h(this,B1,$,"f"),h(this,j1,J,"f"),h(this,o4,Z,"f"),h(this,A0,new t3(this),"f"),this.$0=this[xX](),this[G6](),h(this,Q0,z(this,Q0,"f"),"f"),h(this,u,z(this,u,"f"),"f"),h(this,$0,z(this,$0,"f"),"f"),h(this,S,z(this,S,"f"),"f"),z(this,S,"f").showHiddenOpt=z(this,d4,"f"),h(this,e1,this[FX](),"f")}addHelpOpt($,J){if(A("[string|boolean] [string]",[$,J],arguments.length),z(this,h0,"f"))this[e3](z(this,h0,"f")),h(this,h0,null,"f");if($===!1&&J===void 0)return this;return h(this,h0,typeof $==="string"?$:"help","f"),this.boolean(z(this,h0,"f")),this.describe(z(this,h0,"f"),J||z(this,u,"f").deferY18nLookup("Show help")),this}help($,J){return this.addHelpOpt($,J)}addShowHiddenOpt($,J){if(A("[string|boolean] [string]",[$,J],arguments.length),$===!1&&J===void 0)return this;let Z=typeof $==="string"?$:z(this,d4,"f");return this.boolean(Z),this.describe(Z,J||z(this,u,"f").deferY18nLookup("Show hidden options")),z(this,S,"f").showHiddenOpt=Z,this}showHidden($,J){return this.addShowHiddenOpt($,J)}alias($,J){return A("<object|string|array> [string|array]",[$,J],arguments.length),this[Z6](this.alias.bind(this),"alias",$,J),this}array($){return A("<array|string>",[$],arguments.length),this[U1]("array",$),this[D1]($),this}boolean($){return A("<array|string>",[$],arguments.length),this[U1]("boolean",$),this[D1]($),this}check($,J){return A("<function> [boolean]",[$,J],arguments.length),this.middleware((Z,X)=>{return P1(()=>{return $(Z,X.getOptions())},(q)=>{if(!q)z(this,u,"f").fail(z(this,y,"f").y18n.__("Argument check failed: %s",$.toString()));else if(typeof q==="string"||q instanceof Error)z(this,u,"f").fail(q.toString(),q);return Z},(q)=>{return z(this,u,"f").fail(q.message?q.message:q.toString(),q),Z})},!1,J),this}choices($,J){return A("<object|string|array> [string|array]",[$,J],arguments.length),this[Z6](this.choices.bind(this),"choices",$,J),this}coerce($,J){if(A("<object|string|array> [function]",[$,J],arguments.length),Array.isArray($)){if(!J)throw new r("coerce callback must be provided");for(let Z of $)this.coerce(Z,J);return this}else if(typeof $==="object"){for(let Z of Object.keys($))this.coerce(Z,$[Z]);return this}if(!J)throw new r("coerce callback must be provided");return z(this,S,"f").key[$]=!0,z(this,A0,"f").addCoerceMiddleware((Z,X)=>{let q;if(!Object.prototype.hasOwnProperty.call(Z,$))return Z;return P1(()=>{return q=X.getAliases(),J(Z[$])},(Q)=>{Z[$]=Q;let G=X.getInternalMethods().getParserConfiguration()["strip-aliased"];if(q[$]&&G!==!0)for(let H of q[$])Z[H]=Q;return Z},(Q)=>{throw new r(Q.message)})},$),this}conflicts($,J){return A("<string|object> [string|array]",[$,J],arguments.length),z(this,$0,"f").conflicts($,J),this}config($="config",J,Z){if(A("[object|string] [string|function] [function]",[$,J,Z],arguments.length),typeof $==="object"&&!Array.isArray($))return $=P$($,z(this,j1,"f"),this[h1]()["deep-merge-config"]||!1,z(this,y,"f")),z(this,S,"f").configObjects=(z(this,S,"f").configObjects||[]).concat($),this;if(typeof J==="function")Z=J,J=void 0;return this.describe($,J||z(this,u,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray($)?$:[$]).forEach((X)=>{z(this,S,"f").config[X]=Z||!0}),this}completion($,J,Z){if(A("[string] [string|boolean|function] [function]",[$,J,Z],arguments.length),typeof J==="function")Z=J,J=void 0;if(h(this,F0,$||z(this,F0,"f")||"completion","f"),!J&&J!==!1)J="generate completion script";if(this.command(z(this,F0,"f"),J),Z)z(this,O0,"f").registerFunction(Z);return this}command($,J,Z,X,q,Y){return A("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[$,J,Z,X,q,Y],arguments.length),z(this,Q0,"f").addHandler($,J,Z,X,q,Y),this}commands($,J,Z,X,q,Y){return this.command($,J,Z,X,q,Y)}commandDir($,J){A("<string> [object]",[$,J],arguments.length);let Z=z(this,o4,"f")||z(this,y,"f").require;return z(this,Q0,"f").addDirectory($,Z,z(this,y,"f").getCallerFile(),J),this}count($){return A("<array|string>",[$],arguments.length),this[U1]("count",$),this[D1]($),this}default($,J,Z){if(A("<object|string|array> [*] [string]",[$,J,Z],arguments.length),Z)o3($,z(this,y,"f")),z(this,S,"f").defaultDescription[$]=Z;if(typeof J==="function"){if(o3($,z(this,y,"f")),!z(this,S,"f").defaultDescription[$])z(this,S,"f").defaultDescription[$]=z(this,u,"f").functionDescription(J);J=J.call()}return this[J$](this.default.bind(this),"default",$,J),this}defaults($,J,Z){return this.default($,J,Z)}demandCommand($=1,J,Z,X){if(A("[number] [number|string] [string|null|undefined] [string|null|undefined]",[$,J,Z,X],arguments.length),typeof J!=="number")Z=J,J=1/0;return this.global("_",!1),z(this,S,"f").demandedCommands._={min:$,max:J,minMsg:Z,maxMsg:X},this}demand($,J,Z){if(Array.isArray(J))J.forEach((X)=>{T0(Z,!0,z(this,y,"f")),this.demandOption(X,Z)}),J=1/0;else if(typeof J!=="number")Z=J,J=1/0;if(typeof $==="number")T0(Z,!0,z(this,y,"f")),this.demandCommand($,J,Z,Z);else if(Array.isArray($))$.forEach((X)=>{T0(Z,!0,z(this,y,"f")),this.demandOption(X,Z)});else if(typeof Z==="string")this.demandOption($,Z);else if(Z===!0||typeof Z>"u")this.demandOption($);return this}demandOption($,J){return A("<object|string|array> [string]",[$,J],arguments.length),this[J$](this.demandOption.bind(this),"demandedOptions",$,J),this}deprecateOption($,J){return A("<string> [string|boolean]",[$,J],arguments.length),z(this,S,"f").deprecatedOptions[$]=J,this}describe($,J){return A("<object|string|array> [string]",[$,J],arguments.length),this[q6]($,!0),z(this,u,"f").describe($,J),this}detectLocale($){return A("<boolean>",[$],arguments.length),h(this,x1,$,"f"),this}env($){if(A("[string|boolean]",[$],arguments.length),$===!1)delete z(this,S,"f").envPrefix;else z(this,S,"f").envPrefix=$||"";return this}epilogue($){return A("<string>",[$],arguments.length),z(this,u,"f").epilog($),this}epilog($){return this.epilogue($)}example($,J){if(A("<string|array> [string]",[$,J],arguments.length),Array.isArray($))$.forEach((Z)=>this.example(...Z));else z(this,u,"f").example($,J);return this}exit($,J){if(h(this,P0,!0,"f"),h(this,K1,J,"f"),z(this,E0,"f"))z(this,y,"f").process.exit($)}exitProcess($=!0){return A("[boolean]",[$],arguments.length),h(this,E0,$,"f"),this}fail($){if(A("<function|boolean>",[$],arguments.length),typeof $==="boolean"&&$!==!1)throw new r("Invalid first argument. Expected function or boolean 'false'");return z(this,u,"f").failFn($),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion($,J){if(A("<array> [function]",[$,J],arguments.length),!J)return new Promise((Z,X)=>{z(this,O0,"f").getCompletion($,(q,Y)=>{if(q)X(q);else Z(Y)})});else return z(this,O0,"f").getCompletion($,J)}getDemandedOptions(){return A([],0),z(this,S,"f").demandedOptions}getDemandedCommands(){return A([],0),z(this,S,"f").demandedCommands}getDeprecatedOptions(){return A([],0),z(this,S,"f").deprecatedOptions}getDetectLocale(){return z(this,x1,"f")}getExitProcess(){return z(this,E0,"f")}getGroups(){return Object.assign({},z(this,d0,"f"),z(this,w1,"f"))}getHelp(){if(h(this,P0,!0,"f"),!z(this,u,"f").hasCachedHelpMessage()){if(!this.parsed){let J=this[x$](z(this,B1,"f"),void 0,void 0,0,!0);if(s(J))return J.then(()=>{return z(this,u,"f").help()})}let $=z(this,Q0,"f").runDefaultBuilderOn(this);if(s($))return $.then(()=>{return z(this,u,"f").help()})}return Promise.resolve(z(this,u,"f").help())}getOptions(){return z(this,S,"f")}getStrict(){return z(this,O1,"f")}getStrictCommands(){return z(this,E1,"f")}getStrictOptions(){return z(this,A1,"f")}global($,J){if(A("<string|array> [boolean]",[$,J],arguments.length),$=[].concat($),J!==!1)z(this,S,"f").local=z(this,S,"f").local.filter((Z)=>$.indexOf(Z)===-1);else $.forEach((Z)=>{if(!z(this,S,"f").local.includes(Z))z(this,S,"f").local.push(Z)});return this}group($,J){A("<string|array> <string>",[$,J],arguments.length);let Z=z(this,w1,"f")[J]||z(this,d0,"f")[J];if(z(this,w1,"f")[J])delete z(this,w1,"f")[J];let X={};return z(this,d0,"f")[J]=(Z||[]).concat($).filter((q)=>{if(X[q])return!1;return X[q]=!0}),this}hide($){return A("<string>",[$],arguments.length),z(this,S,"f").hiddenOptions.push($),this}implies($,J){return A("<string|object> [number|string|array]",[$,J],arguments.length),z(this,$0,"f").implies($,J),this}locale($){if(A("[string]",[$],arguments.length),$===void 0)return this[$6](),z(this,y,"f").y18n.getLocale();return h(this,x1,!1,"f"),z(this,y,"f").y18n.setLocale($),this}middleware($,J,Z){return z(this,A0,"f").addMiddleware($,!!J,Z)}nargs($,J){return A("<string|object|array> [number]",[$,J],arguments.length),this[J$](this.nargs.bind(this),"narg",$,J),this}normalize($){return A("<array|string>",[$],arguments.length),this[U1]("normalize",$),this}number($){return A("<array|string>",[$],arguments.length),this[U1]("number",$),this[D1]($),this}option($,J){if(A("<string|object> [object]",[$,J],arguments.length),typeof $==="object")Object.keys($).forEach((Z)=>{this.options(Z,$[Z])});else{if(typeof J!=="object")J={};if(this[D1]($),z(this,l0,"f")&&($==="version"||(J===null||J===void 0?void 0:J.alias)==="version"))this[PX](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
117
+ `),void 0,"versionWarning");if(z(this,S,"f").key[$]=!0,J.alias)this.alias($,J.alias);let Z=J.deprecate||J.deprecated;if(Z)this.deprecateOption($,Z);let X=J.demand||J.required||J.require;if(X)this.demand($,X);if(J.demandOption)this.demandOption($,typeof J.demandOption==="string"?J.demandOption:void 0);if(J.conflicts)this.conflicts($,J.conflicts);if("default"in J)this.default($,J.default);if(J.implies!==void 0)this.implies($,J.implies);if(J.nargs!==void 0)this.nargs($,J.nargs);if(J.config)this.config($,J.configParser);if(J.normalize)this.normalize($);if(J.choices)this.choices($,J.choices);if(J.coerce)this.coerce($,J.coerce);if(J.group)this.group($,J.group);if(J.boolean||J.type==="boolean"){if(this.boolean($),J.alias)this.boolean(J.alias)}if(J.array||J.type==="array"){if(this.array($),J.alias)this.array(J.alias)}if(J.number||J.type==="number"){if(this.number($),J.alias)this.number(J.alias)}if(J.string||J.type==="string"){if(this.string($),J.alias)this.string(J.alias)}if(J.count||J.type==="count")this.count($);if(typeof J.global==="boolean")this.global($,J.global);if(J.defaultDescription)z(this,S,"f").defaultDescription[$]=J.defaultDescription;if(J.skipValidation)this.skipValidation($);let q=J.describe||J.description||J.desc,Y=z(this,u,"f").getDescriptions();if(!Object.prototype.hasOwnProperty.call(Y,$)||typeof q==="string")this.describe($,q);if(J.hidden)this.hide($);if(J.requiresArg)this.requiresArg($)}return this}options($,J){return this.option($,J)}parse($,J,Z){if(A("[string|array] [function|boolean|object] [function]",[$,J,Z],arguments.length),this[jX](),typeof $>"u")$=z(this,B1,"f");if(typeof J==="object")h(this,I1,J,"f"),J=Z;if(typeof J==="function")h(this,j0,J,"f"),J=!1;if(!J)h(this,B1,$,"f");if(z(this,j0,"f"))h(this,E0,!1,"f");let X=this[x$]($,!!J),q=this.parsed;if(z(this,O0,"f").setParsed(this.parsed),s(X))return X.then((Y)=>{if(z(this,j0,"f"))z(this,j0,"f").call(this,z(this,K1,"f"),Y,z(this,U0,"f"));return Y}).catch((Y)=>{if(z(this,j0,"f"))z(this,j0,"f")(Y,this.parsed.argv,z(this,U0,"f"));throw Y}).finally(()=>{this[Y6](),this.parsed=q});else{if(z(this,j0,"f"))z(this,j0,"f").call(this,z(this,K1,"f"),X,z(this,U0,"f"));this[Y6](),this.parsed=q}return X}parseAsync($,J,Z){let X=this.parse($,J,Z);return!s(X)?Promise.resolve(X):X}parseSync($,J,Z){let X=this.parse($,J,Z);if(s(X))throw new r(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return X}parserConfiguration($){return A("<object>",[$],arguments.length),h(this,t4,$,"f"),this}pkgConf($,J){A("<string> [string]",[$,J],arguments.length);let Z=null,X=this[J6](J||z(this,j1,"f"));if(X[$]&&typeof X[$]==="object")Z=P$(X[$],J||z(this,j1,"f"),this[h1]()["deep-merge-config"]||!1,z(this,y,"f")),z(this,S,"f").configObjects=(z(this,S,"f").configObjects||[]).concat(Z);return this}positional($,J){A("<string> <object>",[$,J],arguments.length);let Z=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];J=H1(J,(Y,Q)=>{if(Y==="type"&&!["string","number","boolean"].includes(Q))return!1;return Z.includes(Y)});let X=z(this,j$,"f").fullCommands[z(this,j$,"f").fullCommands.length-1],q=X?z(this,Q0,"f").cmdToParseOptions(X):{array:[],alias:{},default:{},demand:{}};return r1(q).forEach((Y)=>{let Q=q[Y];if(Array.isArray(Q)){if(Q.indexOf($)!==-1)J[Y]=!0}else if(Q[$]&&!(Y in J))J[Y]=Q[$]}),this.group($,z(this,u,"f").getPositionalGroupName()),this.option($,J)}recommendCommands($=!0){return A("[boolean]",[$],arguments.length),h(this,a4,$,"f"),this}required($,J,Z){return this.demand($,J,Z)}require($,J,Z){return this.demand($,J,Z)}requiresArg($){if(A("<array|string|object> [number]",[$],arguments.length),typeof $==="string"&&z(this,S,"f").narg[$])return this;else this[J$](this.requiresArg.bind(this),"narg",$,NaN);return this}showCompletionScript($,J){return A("[string] [string]",[$,J],arguments.length),$=$||this.$0,z(this,e1,"f").log(z(this,O0,"f").generateCompletionScript($,J||z(this,F0,"f")||"completion")),this}showHelp($){if(A("[string|function]",[$],arguments.length),h(this,P0,!0,"f"),!z(this,u,"f").hasCachedHelpMessage()){if(!this.parsed){let Z=this[x$](z(this,B1,"f"),void 0,void 0,0,!0);if(s(Z))return Z.then(()=>{z(this,u,"f").showHelp($)}),this}let J=z(this,Q0,"f").runDefaultBuilderOn(this);if(s(J))return J.then(()=>{z(this,u,"f").showHelp($)}),this}return z(this,u,"f").showHelp($),this}scriptName($){return this.customScriptName=!0,this.$0=$,this}showHelpOnFail($,J){return A("[boolean|string] [string]",[$,J],arguments.length),z(this,u,"f").showHelpOnFail($,J),this}showVersion($){return A("[string|function]",[$],arguments.length),z(this,u,"f").showVersion($),this}skipValidation($){return A("<array|string>",[$],arguments.length),this[U1]("skipValidation",$),this}strict($){return A("[boolean]",[$],arguments.length),h(this,O1,$!==!1,"f"),this}strictCommands($){return A("[boolean]",[$],arguments.length),h(this,E1,$!==!1,"f"),this}strictOptions($){return A("[boolean]",[$],arguments.length),h(this,A1,$!==!1,"f"),this}string($){return A("<array|string>",[$],arguments.length),this[U1]("string",$),this[D1]($),this}terminalWidth(){return A([],0),z(this,y,"f").process.stdColumns}updateLocale($){return this.updateStrings($)}updateStrings($){return A("<object>",[$],arguments.length),h(this,x1,!1,"f"),z(this,y,"f").y18n.updateLocale($),this}usage($,J,Z,X){if(A("<string|null|undefined> [string|boolean] [function|object] [function]",[$,J,Z,X],arguments.length),J!==void 0)if(T0($,null,z(this,y,"f")),($||"").match(/^\$0( |$)/))return this.command($,J,Z,X);else throw new r(".usage() description must start with $0 if being used as alias for .command()");else return z(this,u,"f").usage($),this}usageConfiguration($){return A("<object>",[$],arguments.length),h(this,r4,$,"f"),this}version($,J,Z){if(A("[boolean|string] [string] [string]",[$,J,Z],arguments.length),z(this,l0,"f"))this[e3](z(this,l0,"f")),z(this,u,"f").version(void 0),h(this,l0,null,"f");if(arguments.length===0)Z=this[wX](),$="version";else if(arguments.length===1){if($===!1)return this;Z=$,$="version"}else if(arguments.length===2)Z=J,J=void 0;return h(this,l0,typeof $==="string"?$:"version","f"),J=J||z(this,u,"f").deferY18nLookup("Show version number"),z(this,u,"f").version(Z||void 0),this.boolean(z(this,l0,"f")),this.describe(z(this,l0,"f"),J),this}wrap($){return A("<number|null|undefined>",[$],arguments.length),z(this,u,"f").wrap($),this}[(Q0=new WeakMap,j1=new WeakMap,j$=new WeakMap,O0=new WeakMap,F0=new WeakMap,d4=new WeakMap,K1=new WeakMap,x1=new WeakMap,l4=new WeakMap,E0=new WeakMap,n4=new WeakMap,A0=new WeakMap,d0=new WeakMap,P0=new WeakMap,h0=new WeakMap,i4=new WeakMap,e1=new WeakMap,U0=new WeakMap,S=new WeakMap,o4=new WeakMap,t4=new WeakMap,j0=new WeakMap,I1=new WeakMap,$$=new WeakMap,w1=new WeakMap,B1=new WeakMap,a4=new WeakMap,y=new WeakMap,O1=new WeakMap,E1=new WeakMap,A1=new WeakMap,u=new WeakMap,r4=new WeakMap,l0=new WeakMap,$0=new WeakMap,CX)]($){if(!$._||!$["--"])return $;$._.push.apply($._,$["--"]);try{delete $["--"]}catch(J){}return $}[FX](){return{log:(...$)=>{if(!this[s4]())console.log(...$);if(h(this,P0,!0,"f"),z(this,U0,"f").length)h(this,U0,z(this,U0,"f")+`
118
+ `,"f");h(this,U0,z(this,U0,"f")+$.join(" "),"f")},error:(...$)=>{if(!this[s4]())console.error(...$);if(h(this,P0,!0,"f"),z(this,U0,"f").length)h(this,U0,z(this,U0,"f")+`
119
+ `,"f");h(this,U0,z(this,U0,"f")+$.join(" "),"f")}}}[e3]($){r1(z(this,S,"f")).forEach((J)=>{if(((X)=>X==="configObjects")(J))return;let Z=z(this,S,"f")[J];if(Array.isArray(Z)){if(Z.includes($))Z.splice(Z.indexOf($),1)}else if(typeof Z==="object")delete Z[$]}),delete z(this,u,"f").getDescriptions()[$]}[PX]($,J,Z){if(!z(this,l4,"f")[Z])z(this,y,"f").process.emitWarning($,J),z(this,l4,"f")[Z]=!0}[jX](){z(this,n4,"f").push({options:z(this,S,"f"),configObjects:z(this,S,"f").configObjects.slice(0),exitProcess:z(this,E0,"f"),groups:z(this,d0,"f"),strict:z(this,O1,"f"),strictCommands:z(this,E1,"f"),strictOptions:z(this,A1,"f"),completionCommand:z(this,F0,"f"),output:z(this,U0,"f"),exitError:z(this,K1,"f"),hasOutput:z(this,P0,"f"),parsed:this.parsed,parseFn:z(this,j0,"f"),parseContext:z(this,I1,"f")}),z(this,u,"f").freeze(),z(this,$0,"f").freeze(),z(this,Q0,"f").freeze(),z(this,A0,"f").freeze()}[xX](){let $="",J;if(/\b(node|iojs|electron)(\.exe)?$/.test(z(this,y,"f").process.argv()[0]))J=z(this,y,"f").process.argv().slice(1,2);else J=z(this,y,"f").process.argv().slice(0,1);if($=J.map((Z)=>{let X=this[bX](z(this,j1,"f"),Z);return Z.match(/^(\/|([a-zA-Z]:)?\\)/)&&X.length<Z.length?X:Z}).join(" ").trim(),z(this,y,"f").getEnv("_")&&z(this,y,"f").getProcessArgvBin()===z(this,y,"f").getEnv("_"))$=z(this,y,"f").getEnv("_").replace(`${z(this,y,"f").path.dirname(z(this,y,"f").process.execPath())}/`,"");return $}[h1](){return z(this,t4,"f")}[IX](){return z(this,r4,"f")}[$6](){if(!z(this,x1,"f"))return;let $=z(this,y,"f").getEnv("LC_ALL")||z(this,y,"f").getEnv("LC_MESSAGES")||z(this,y,"f").getEnv("LANG")||z(this,y,"f").getEnv("LANGUAGE")||"en_US";this.locale($.replace(/[.:].*/,""))}[wX](){return this[J6]().version||"unknown"}[OX]($){let J=$["--"]?$["--"]:$._;for(let Z=0,X;(X=J[Z])!==void 0;Z++)if(z(this,y,"f").Parser.looksLikeNumber(X)&&Number.isSafeInteger(Math.floor(parseFloat(`${X}`))))J[Z]=Number(X);return $}[J6]($){let J=$||"*";if(z(this,$$,"f")[J])return z(this,$$,"f")[J];let Z={};try{let X=$||z(this,y,"f").mainFilename;if(!$&&z(this,y,"f").path.extname(X))X=z(this,y,"f").path.dirname(X);let q=z(this,y,"f").findUp(X,(Y,Q)=>{if(Q.includes("package.json"))return"package.json";else return});T0(q,void 0,z(this,y,"f")),Z=JSON.parse(z(this,y,"f").readFileSync(q,"utf8"))}catch(X){}return z(this,$$,"f")[J]=Z||{},z(this,$$,"f")[J]}[U1]($,J){J=[].concat(J),J.forEach((Z)=>{Z=this[Q6](Z),z(this,S,"f")[$].push(Z)})}[J$]($,J,Z,X){this[X6]($,J,Z,X,(q,Y,Q)=>{z(this,S,"f")[q][Y]=Q})}[Z6]($,J,Z,X){this[X6]($,J,Z,X,(q,Y,Q)=>{z(this,S,"f")[q][Y]=(z(this,S,"f")[q][Y]||[]).concat(Q)})}[X6]($,J,Z,X,q){if(Array.isArray(Z))Z.forEach((Y)=>{$(Y,X)});else if(((Y)=>typeof Y==="object")(Z))for(let Y of r1(Z))$(Y,Z[Y]);else q(J,this[Q6](Z),X)}[Q6]($){if($==="__proto__")return"___proto___";return $}[q6]($,J){return this[J$](this[q6].bind(this),"key",$,J),this}[Y6](){var $,J,Z,X,q,Y,Q,G,H,K,U,B;let W=z(this,n4,"f").pop();T0(W,void 0,z(this,y,"f"));let M;$=this,J=this,Z=this,X=this,q=this,Y=this,Q=this,G=this,H=this,K=this,U=this,B=this,{options:{set value(R){h($,S,R,"f")}}.value,configObjects:M,exitProcess:{set value(R){h(J,E0,R,"f")}}.value,groups:{set value(R){h(Z,d0,R,"f")}}.value,output:{set value(R){h(X,U0,R,"f")}}.value,exitError:{set value(R){h(q,K1,R,"f")}}.value,hasOutput:{set value(R){h(Y,P0,R,"f")}}.value,parsed:this.parsed,strict:{set value(R){h(Q,O1,R,"f")}}.value,strictCommands:{set value(R){h(G,E1,R,"f")}}.value,strictOptions:{set value(R){h(H,A1,R,"f")}}.value,completionCommand:{set value(R){h(K,F0,R,"f")}}.value,parseFn:{set value(R){h(U,j0,R,"f")}}.value,parseContext:{set value(R){h(B,I1,R,"f")}}.value}=W,z(this,S,"f").configObjects=M,z(this,u,"f").unfreeze(),z(this,$0,"f").unfreeze(),z(this,Q0,"f").unfreeze(),z(this,A0,"f").unfreeze()}[EX]($,J){return P1(J,(Z)=>{return $(Z),Z})}getInternalMethods(){return{getCommandInstance:this[AX].bind(this),getContext:this[hX].bind(this),getHasOutput:this[NX].bind(this),getLoggerInstance:this[DX].bind(this),getParseContext:this[SX].bind(this),getParserConfiguration:this[h1].bind(this),getUsageConfiguration:this[IX].bind(this),getUsageInstance:this[vX].bind(this),getValidationInstance:this[fX].bind(this),hasParseCallback:this[s4].bind(this),isGlobalContext:this[kX].bind(this),postProcess:this[N1].bind(this),reset:this[G6].bind(this),runValidation:this[H6].bind(this),runYargsParserAndExecuteCommands:this[x$].bind(this),setHasOutput:this[yX].bind(this)}}[AX](){return z(this,Q0,"f")}[hX](){return z(this,j$,"f")}[NX](){return z(this,P0,"f")}[DX](){return z(this,e1,"f")}[SX](){return z(this,I1,"f")||{}}[vX](){return z(this,u,"f")}[fX](){return z(this,$0,"f")}[s4](){return!!z(this,j0,"f")}[kX](){return z(this,i4,"f")}[N1]($,J,Z,X){if(Z)return $;if(s($))return $;if(!J)$=this[CX]($);if(this[h1]()["parse-positional-numbers"]||this[h1]()["parse-positional-numbers"]===void 0)$=this[OX]($);if(X)$=F1($,this,z(this,A0,"f").getMiddleware(),!1);return $}[G6]($={}){h(this,S,z(this,S,"f")||{},"f");let J={};J.local=z(this,S,"f").local||[],J.configObjects=z(this,S,"f").configObjects||[];let Z={};J.local.forEach((Y)=>{Z[Y]=!0,($[Y]||[]).forEach((Q)=>{Z[Q]=!0})}),Object.assign(z(this,w1,"f"),Object.keys(z(this,d0,"f")).reduce((Y,Q)=>{let G=z(this,d0,"f")[Q].filter((H)=>!(H in Z));if(G.length>0)Y[Q]=G;return Y},{})),h(this,d0,{},"f");let X=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],q=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];if(X.forEach((Y)=>{J[Y]=(z(this,S,"f")[Y]||[]).filter((Q)=>!Z[Q])}),q.forEach((Y)=>{J[Y]=H1(z(this,S,"f")[Y],(Q)=>!Z[Q])}),J.envPrefix=z(this,S,"f").envPrefix,h(this,S,J,"f"),h(this,u,z(this,u,"f")?z(this,u,"f").reset(Z):BX(this,z(this,y,"f")),"f"),h(this,$0,z(this,$0,"f")?z(this,$0,"f").reset(Z):TX(this,z(this,u,"f"),z(this,y,"f")),"f"),h(this,Q0,z(this,Q0,"f")?z(this,Q0,"f").reset():HX(z(this,u,"f"),z(this,$0,"f"),z(this,A0,"f"),z(this,y,"f")),"f"),!z(this,O0,"f"))h(this,O0,LX(this,z(this,u,"f"),z(this,Q0,"f"),z(this,y,"f")),"f");return z(this,A0,"f").reset(),h(this,F0,null,"f"),h(this,U0,"","f"),h(this,K1,null,"f"),h(this,P0,!1,"f"),this.parsed=!1,this}[bX]($,J){return z(this,y,"f").path.relative($,J)}[x$]($,J,Z,X=0,q=!1){let Y=!!Z||q;$=$||z(this,B1,"f"),z(this,S,"f").__=z(this,y,"f").y18n.__,z(this,S,"f").configuration=this[h1]();let Q=!!z(this,S,"f").configuration["populate--"],G=Object.assign({},z(this,S,"f").configuration,{"populate--":!0}),H=z(this,y,"f").Parser.detailed($,Object.assign({},z(this,S,"f"),{configuration:{"parse-positional-numbers":!1,...G}})),K=Object.assign(H.argv,z(this,I1,"f")),U=void 0,B=H.aliases,W=!1,M=!1;if(Object.keys(K).forEach((R)=>{if(R===z(this,h0,"f")&&K[R])W=!0;else if(R===z(this,l0,"f")&&K[R])M=!0}),K.$0=this.$0,this.parsed=H,X===0)z(this,u,"f").clearCachedHelpMessage();try{if(this[$6](),J)return this[N1](K,Q,!!Z,!1);if(z(this,h0,"f")){if([z(this,h0,"f")].concat(B[z(this,h0,"f")]||[]).filter((F)=>F.length>1).includes(""+K._[K._.length-1]))K._.pop(),W=!0}h(this,i4,!1,"f");let R=z(this,Q0,"f").getCommands(),L=z(this,O0,"f").completionKey in K,I=W||L||q;if(K._.length){if(R.length){let x;for(let F=X||0,v;K._[F]!==void 0;F++)if(v=String(K._[F]),R.includes(v)&&v!==z(this,F0,"f")){let j=z(this,Q0,"f").runCommand(v,this,H,F+1,q,W||M||q);return this[N1](j,Q,!!Z,!1)}else if(!x&&v!==z(this,F0,"f")){x=v;break}if(!z(this,Q0,"f").hasDefaultCommand()&&z(this,a4,"f")&&x&&!I)z(this,$0,"f").recommendCommands(x,R)}if(z(this,F0,"f")&&K._.includes(z(this,F0,"f"))&&!L){if(z(this,E0,"f"))z1(!0);this.showCompletionScript(),this.exit(0)}}if(z(this,Q0,"f").hasDefaultCommand()&&!I){let x=z(this,Q0,"f").runCommand(null,this,H,0,q,W||M||q);return this[N1](x,Q,!!Z,!1)}if(L){if(z(this,E0,"f"))z1(!0);$=[].concat($);let x=$.slice($.indexOf(`--${z(this,O0,"f").completionKey}`)+1);return z(this,O0,"f").getCompletion(x,(F,v)=>{if(F)throw new r(F.message);(v||[]).forEach((j)=>{z(this,e1,"f").log(j)}),this.exit(0)}),this[N1](K,!Q,!!Z,!1)}if(!z(this,P0,"f")){if(W){if(z(this,E0,"f"))z1(!0);Y=!0,this.showHelp("log"),this.exit(0)}else if(M){if(z(this,E0,"f"))z1(!0);Y=!0,z(this,u,"f").showVersion("log"),this.exit(0)}}if(!Y&&z(this,S,"f").skipValidation.length>0)Y=Object.keys(K).some((x)=>z(this,S,"f").skipValidation.indexOf(x)>=0&&K[x]===!0);if(!Y){if(H.error)throw new r(H.error.message);if(!L){let x=this[H6](B,{},H.error);if(!Z)U=F1(K,this,z(this,A0,"f").getMiddleware(),!0);if(U=this[EX](x,U!==null&&U!==void 0?U:K),s(U)&&!Z)U=U.then(()=>{return F1(K,this,z(this,A0,"f").getMiddleware(),!1)})}}}catch(R){if(R instanceof r)z(this,u,"f").fail(R.message,R);else throw R}return this[N1](U!==null&&U!==void 0?U:K,Q,!!Z,!0)}[H6]($,J,Z,X){let q={...this.getDemandedOptions()};return(Y)=>{if(Z)throw new r(Z.message);z(this,$0,"f").nonOptionCount(Y),z(this,$0,"f").requiredArguments(Y,q);let Q=!1;if(z(this,E1,"f"))Q=z(this,$0,"f").unknownCommands(Y);if(z(this,O1,"f")&&!Q)z(this,$0,"f").unknownArguments(Y,$,J,!!X);else if(z(this,A1,"f"))z(this,$0,"f").unknownArguments(Y,$,{},!1,!1);z(this,$0,"f").limitedChoices(Y),z(this,$0,"f").implications(Y),z(this,$0,"f").conflicting(Y)}}[yX](){h(this,P0,!0,"f")}[D1]($){if(typeof $==="string")z(this,S,"f").key[$]=!0;else for(let J of $)z(this,S,"f").key[J]=!0}}function zX($){return!!$&&typeof $.getInternalMethods==="function"}var nB=gX(i3),mX=nB;import{existsSync as n0,readFileSync as I$,rmSync as S1,writeFileSync as dX,readdirSync as z6,copyFileSync as J2,mkdirSync as w$}from"fs";import{resolve as b0,dirname as B6,join as N0}from"path";import{fileURLToPath as iB}from"url";var cX=mX(n3(process.argv)).option("h",{alias:"help",type:"boolean"}).option("v",{alias:"version",type:"boolean"}).parseSync(),oB="https://github.com/ardzero/bunext.git",tB="https://github.com/ardzero/",e4=".bunext-upgrade-temp",aB=["create-bunext","packages",".github/workflows","src/app/(index)/docs","src/components/docs"],rB=[".git","public","src/lib/data/siteData.ts"];var sB="loading-dots",eB="favicon.svg",$U="ogImage.jpg";function JU(){try{let $=iB(import.meta.url),J=B6($),Z=N0(J,"../package.json");return JSON.parse(I$(Z,"utf-8")).version}catch{return"0.1.0"}}function ZU($){return $.toLowerCase().replace(/[\s_]+/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"")||"my-app"}function XU($,J){let Z=ZU(J),X=`${tB}${Z}`,q=b0($,"project_readme.md"),Y=b0($,"README.md");if(!n0(q))return;let Q=I$(q,"utf-8");Q=Q.replace(/\?\{project-name\}/g,J).replace(/\?\{repo-link\}/g,X),dX(Y,Q),S1(q,{force:!0})}function QU($){for(let J of rB){let Z=b0($,J);if(!n0(Z))return{ok:!1,missing:J}}return{ok:!0}}function pX($){let J=$.indexOf("export const siteData");if(J===-1)return null;let Z=$.indexOf("{",J);if(Z===-1)return null;let X=1,q=Z+1;while(q<$.length&&X>0){let G=$[q];if(G==="{")X++;else if(G==="}")X--;q++}if(X!==0)return null;let Y=$.indexOf(";",q),Q=Y===-1?q:Y+1;return{block:$.slice(J,Q),start:J,end:Q}}function qU($){let J=$.match(/favicon:\s*['"]([^'"]+)['"]/);return J?J[1]:null}function YU($){let J=$.match(/ogImage:\s*\{\s*src:\s*['"]([^'"]+)['"]/);return J?J[1]:null}function K6($,J,Z=!1){let X=z6($,{withFileTypes:!0});for(let q of X){if(Z&&q.name===".git")continue;let Y=N0($,q.name),Q=N0(J,q.name);if(q.isDirectory())w$(Q,{recursive:!0}),K6(Y,Q,!1);else w$(B6(Q),{recursive:!0}),J2(Y,Q)}}async function GU(){if(cX.v)console.log(JU()),process.exit(0);if(cX.h)console.log("Usage: bunextupgrade"),console.log(" Upgrade an existing Bunext project to the latest template."),console.log(" Run from the project root. Preserves .git, public assets, and siteData."),process.exit(0);let $=process.cwd(),J=QU($);if(!J.ok)p0.error(`This isn't a valid Bunext project (missing: ${J.missing}).`),process.exit(1);console.clear(),vZ($2.default.bgCyan($2.default.black(" bunextupgrade ")));let Z=kZ();Z.start("Cloning latest Bunext template");try{await PZ("git",["clone","--depth","1",oB,e4],{cwd:$}),Z.stop("Template cloned")}catch(F){Z.stop("Failed to clone");let v=F instanceof Error?F.message:String(F);p0.error(v.includes("already exists")?`Directory "${e4}" already exists. Remove it and try again.`:v),process.exit(1)}let X=b0($,e4);Z.start("Cleaning template");let q=b0(X,".git");if(n0(q))S1(q,{recursive:!0,force:!0});for(let F of aB){let v=b0(X,F);if(n0(v))S1(v,{recursive:!0,force:!0})}let Y="my-app";try{let F=b0($,"package.json");if(n0(F)){let v=JSON.parse(I$(F,"utf-8"));if(typeof v.name==="string")Y=v.name}}catch{}XU(X,Y),Z.stop("Template cleaned");let Q=b0($,"public"),G=b0(X,"public"),H=b0($,"src/lib/data/siteData.ts"),K=b0(X,"src/lib/data/siteData.ts"),U=I$(H,"utf-8"),B=qU(U),W=YU(U);Z.start("Preserving your public assets and site data"),w$(G,{recursive:!0});let M=z6(Q,{withFileTypes:!0});for(let F of M){if(F.name.startsWith(sB))continue;let v=N0(Q,F.name),j=N0(G,F.name);if(F.isDirectory())w$(j,{recursive:!0}),K6(v,j,!1);else w$(B6(j),{recursive:!0}),J2(v,j)}let R=B?N0(Q,B.replace(/^\//,"")):null;if(R&&n0(R)){if(J2(R,N0(G,B.replace(/^\//,""))),B!=="/favicon.svg"){let F=N0(G,eB);if(n0(F))S1(F,{force:!0})}}let L=W?N0(Q,W.replace(/^\//,"")):null;if(L&&n0(L)){if(J2(L,N0(G,W.replace(/^\//,""))),W!=="/ogImage.jpg"){let F=N0(G,$U);if(n0(F))S1(F,{force:!0})}}let I=pX(U);if(I&&n0(K)){let F=I$(K,"utf-8"),v=pX(F);if(v){let j=F.slice(0,v.start)+I.block+F.slice(v.end);dX(K,j)}}Z.stop("Preserved public assets and site data"),Z.start("Replacing project with upgraded files");let x=z6($,{withFileTypes:!0});for(let F of x){if(F.name===".git"||F.name===e4)continue;let v=N0($,F.name);S1(v,{recursive:!0,force:!0})}K6(X,$,!1),S1(X,{recursive:!0,force:!0}),Z.stop("Upgrade complete"),fZ($2.default.green("Project upgraded successfully."))}GU().catch(($)=>{p0.error($ instanceof Error?$.message:String($)),process.exit(1)});
120
120
 
121
- //# debugId=66F2709CDBF6312564756E2164756E21
121
+ //# debugId=1FB7FEC674BEF82D64756E2164756E21