@nice-move/cli 0.9.0 → 0.9.3

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.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{createRequire as e}from"module";var t,n,r,i,s={8995:(e,t,n)=>{const r=n(32081),i=n(19015),s=n(95350);function o(e,t,n){const o=i(e,t,n),a=r.spawn(o.command,o.args,o.options);return s.hookChildProcess(a,o),a}e.exports=o,e.exports.spawn=o,e.exports.sync=function(e,t,n){const o=i(e,t,n),a=r.spawnSync(o.command,o.args,o.options);return a.error=a.error||s.verifyENOENTSync(a.status,o),a},e.exports._parse=i,e.exports._enoent=s},95350:e=>{const t="win32"===process.platform;function n(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(e,r){return t&&1===e&&!r.file?n(r.original,"spawn"):null}e.exports={hookChildProcess:function(e,n){if(!t)return;const i=e.emit;e.emit=function(t,s){if("exit"===t){const t=r(s,n);if(t)return i.call(e,"error",t)}return i.apply(e,arguments)}},verifyENOENT:r,verifyENOENTSync:function(e,r){return t&&1===e&&!r.file?n(r.original,"spawnSync"):null},notFoundError:n}},19015:(e,t,n)=>{const r=n(71017),i=n(65358),s=n(16214),o=n(63106),a="win32"===process.platform,c=/\.(?:com|exe)$/i,l=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function u(e){if(!a)return e;const t=function(e){e.file=i(e);const t=e.file&&o(e.file);return t?(e.args.unshift(e.file),e.command=t,i(e)):e.file}(e),n=!c.test(t);if(e.options.forceShell||n){const n=l.test(t);e.command=r.normalize(e.command),e.command=s.command(e.command),e.args=e.args.map((e=>s.argument(e,n)));const i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}e.exports=function(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null);const r={command:e,args:t=t?t.slice(0):[],options:n=Object.assign({},n),file:void 0,original:{command:e,args:t}};return n.shell?r:u(r)}},16214:e=>{const t=/([()\][%!^"`<>&|;, *?])/g;e.exports.command=function(e){return e=e.replace(t,"^$1")},e.exports.argument=function(e,n){return e=(e=`"${e=(e=(e=`${e}`).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(t,"^$1"),n&&(e=e.replace(t,"^$1")),e}},63106:(e,t,n)=>{const r=n(57147),i=n(14256);e.exports=function(e){const t=Buffer.alloc(150);let n;try{n=r.openSync(e,"r"),r.readSync(n,t,0,150,0),r.closeSync(n)}catch(e){}return i(t.toString())}},65358:(e,t,n)=>{const r=n(71017),i=n(1468),s=n(26569);function o(e,t){const n=e.options.env||process.env,o=process.cwd(),a=null!=e.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch(e){}let l;try{l=i.sync(e.command,{path:n[s({env:n})],pathExt:t?r.delimiter:void 0})}catch(e){}finally{c&&process.chdir(o)}return l&&(l=r.resolve(a?e.options.cwd:"",l)),l}e.exports=function(e){return o(e)||o(e,!0)}},1468:(e,t,n)=>{const r="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,i=n(71017),s=r?";":":",o=n(5909),a=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),c=(e,t)=>{const n=t.colon||s,i=e.match(/\//)||r&&e.match(/\\/)?[""]:[...r?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],o=r?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=r?o.split(n):[""];return r&&-1!==e.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:o}},l=(e,t,n)=>{"function"==typeof t&&(n=t,t={}),t||(t={});const{pathEnv:r,pathExt:s,pathExtExe:l}=c(e,t),u=[],d=n=>new Promise(((s,o)=>{if(n===r.length)return t.all&&u.length?s(u):o(a(e));const c=r[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=i.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;s(h(f,n,0))})),h=(e,n,r)=>new Promise(((i,a)=>{if(r===s.length)return i(d(n+1));const c=s[r];o(e+c,{pathExt:l},((s,o)=>{if(!s&&o){if(!t.all)return i(e+c);u.push(e+c)}return i(h(e,n,r+1))}))}));return n?d(0).then((e=>n(null,e)),n):d(0)};e.exports=l,l.sync=(e,t)=>{t=t||{};const{pathEnv:n,pathExt:r,pathExtExe:s}=c(e,t),l=[];for(let a=0;a<n.length;a++){const c=n[a],u=/^".*"$/.test(c)?c.slice(1,-1):c,d=i.join(u,e),h=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<r.length;e++){const n=h+r[e];try{if(o.sync(n,{pathExt:s})){if(!t.all)return n;l.push(n)}}catch(e){}}}if(t.all&&l.length)return l;if(t.nothrow)return null;throw a(e)}},18797:(e,t,n)=>{var r=n(29928),i=function(){},s=function(e,t,n){if("function"==typeof t)return s(e,null,t);t||(t={}),n=r(n||i);var o=e._writableState,a=e._readableState,c=t.readable||!1!==t.readable&&e.readable,l=t.writable||!1!==t.writable&&e.writable,u=!1,d=function(){e.writable||h()},h=function(){l=!1,c||n.call(e)},f=function(){c=!1,l||n.call(e)},p=function(t){n.call(e,t?new Error("exited with error code: "+t):null)},m=function(t){n.call(e,t)},g=function(){process.nextTick(y)},y=function(){if(!u)return(!c||a&&a.ended&&!a.destroyed)&&(!l||o&&o.ended&&!o.destroyed)?void 0:n.call(e,new Error("premature close"))},b=function(){e.req.on("finish",h)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?l&&!o&&(e.on("end",d),e.on("close",d)):(e.on("complete",h),e.on("abort",g),e.req?b():e.on("request",b)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",p),e.on("end",f),e.on("finish",h),!1!==t.error&&e.on("error",m),e.on("close",g),function(){u=!0,e.removeListener("complete",h),e.removeListener("abort",g),e.removeListener("request",b),e.req&&e.req.removeListener("finish",h),e.removeListener("end",d),e.removeListener("close",d),e.removeListener("finish",h),e.removeListener("exit",p),e.removeListener("end",f),e.removeListener("error",m),e.removeListener("close",g)}};e.exports=s},23799:(e,t,n)=>{const r=n(71017),i=n(32081),s=n(8995),o=n(36178),a=n(9002),c=n(83937),l=n(97860),u=n(10407),{spawnedKill:d,spawnedCancel:h,setupTimeout:f,setExitHandler:p}=n(5454),{handleInput:m,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=n(53036),{mergePromise:v,getSpawnedPromise:w}=n(24578),{joinCommand:x,parseCommand:O}=n(82899),S=(e,t,n={})=>{const i=s._parse(e,t,n);return e=i.command,t=i.args,(n={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(n=i.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n}).env=(({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:i})=>{const s=t?{...process.env,...e}:e;return n?a.env({env:s,cwd:r,execPath:i}):s})(n),n.stdio=u(n),"win32"===process.platform&&"cmd"===r.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:n,parsed:i}},E=(e,t,n)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===n?void 0:"",j=(e,t,n)=>{const r=S(e,t,n),o=x(e,t);let a;try{a=i.spawn(r.file,r.args,r.options)}catch(e){const t=new i.ChildProcess,n=Promise.reject(l({error:e,stdout:"",stderr:"",all:"",command:o,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return v(t,n)}const u=w(a),b=f(a,r.options,u),O=p(a,r.options,b),j={isCanceled:!1};a.kill=d.bind(null,a.kill.bind(a)),a.cancel=h.bind(null,a,j);const C=c((async()=>{const[{error:e,exitCode:t,signal:n,timedOut:i},s,c,u]=await g(a,r.options,O),d=E(r.options,s),h=E(r.options,c),f=E(r.options,u);if(e||0!==t||null!==n){const s=l({error:e,exitCode:t,signal:n,stdout:d,stderr:h,all:f,command:o,parsed:r,timedOut:i,isCanceled:j.isCanceled,killed:a.killed});if(!r.options.reject)return s;throw s}return{command:o,exitCode:0,stdout:d,stderr:h,all:f,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return s._enoent.hookChildProcess(a,r.parsed),m(a,r.options.input),a.all=y(a,r.options),v(a,C)};e.exports=j,e.exports.sync=(e,t,n)=>{const r=S(e,t,n),s=x(e,t);let o;b(r.options);try{o=i.spawnSync(r.file,r.args,r.options)}catch(e){throw l({error:e,stdout:"",stderr:"",all:"",command:s,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}const a=E(r.options,o.stdout,o.error),c=E(r.options,o.stderr,o.error);if(o.error||0!==o.status||null!==o.signal){const e=l({stdout:a,stderr:c,error:o.error,signal:o.signal,exitCode:o.status,command:s,parsed:r,timedOut:o.error&&"ETIMEDOUT"===o.error.code,isCanceled:!1,killed:null!==o.signal});if(!r.options.reject)return e;throw e}return{command:s,exitCode:0,stdout:a,stderr:c,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},e.exports.command=(e,t)=>{const[n,...r]=O(e);return j(n,r,t)},e.exports.commandSync=(e,t)=>{const[n,...r]=O(e);return j.sync(n,r,t)},e.exports.node=(e,t,n={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(n=t,t=[]);const r=u.node(n),i=process.execArgv.filter((e=>!e.startsWith("--inspect"))),{nodePath:s=process.execPath,nodeOptions:o=i}=n;return j(s,[...o,e,...Array.isArray(t)?t:[]],{...n,stdin:void 0,stdout:void 0,stderr:void 0,stdio:r,shell:!1})}},82899:e=>{const t=/ +/g;e.exports={joinCommand:(e,t=[])=>Array.isArray(t)?[e,...t].join(" "):e,parseCommand:e=>{const n=[];for(const r of e.trim().split(t)){const e=n[n.length-1];e&&e.endsWith("\\")?n[n.length-1]=`${e.slice(0,-1)} ${r}`:n.push(r)}return n}}},97860:(e,t,n)=>{const{signalsByName:r}=n(83954);e.exports=({stdout:e,stderr:t,all:n,error:i,signal:s,exitCode:o,command:a,timedOut:c,isCanceled:l,killed:u,parsed:{options:{timeout:d}}})=>{o=null===o?void 0:o;const h=void 0===(s=null===s?void 0:s)?void 0:r[s].description,f=(({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:i,exitCode:s,isCanceled:o})=>e?`timed out after ${t} milliseconds`:o?"was canceled":void 0!==n?`failed with ${n}`:void 0!==r?`was killed with ${r} (${i})`:void 0!==s?`failed with exit code ${s}`:"failed")({timedOut:c,timeout:d,errorCode:i&&i.code,signal:s,signalDescription:h,exitCode:o,isCanceled:l}),p=`Command ${f}: ${a}`,m="[object Error]"===Object.prototype.toString.call(i),g=m?`${p}\n${i.message}`:p,y=[g,t,e].filter(Boolean).join("\n");return m?(i.originalMessage=i.message,i.message=y):i=new Error(y),i.shortMessage=g,i.command=a,i.exitCode=o,i.signal=s,i.signalDescription=h,i.stdout=e,i.stderr=t,void 0!==n&&(i.all=n),"bufferedData"in i&&delete i.bufferedData,i.failed=!0,i.timedOut=Boolean(c),i.isCanceled=l,i.killed=u&&!c,i}},5454:(e,t,n)=>{const r=n(22037),i=n(90260),s=(e,t,n,r)=>{if(!o(t,n,r))return;const i=c(n),s=setTimeout((()=>{e("SIGKILL")}),i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},n)=>a(e)&&!1!==t&&n,a=e=>e===r.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};e.exports={spawnedKill:(e,t="SIGTERM",n={})=>{const r=e(t);return s(e,t,n,r),r},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(0===t||void 0===t)return r;if(!Number.isFinite(t)||t<0)throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`);let i;const s=new Promise(((r,s)=>{i=setTimeout((()=>{((e,t,n)=>{e.kill(t),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,n,s)}),t)})),o=r.finally((()=>{clearTimeout(i)}));return Promise.race([s,o])},setExitHandler:async(e,{cleanup:t,detached:n},r)=>{if(!t||n)return r;const s=i((()=>{e.kill()}));return r.finally((()=>{s()}))}}},24578:e=>{const t=(async()=>{})().constructor.prototype,n=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(t,e)]));e.exports={mergePromise:(e,t)=>{for(const[r,i]of n){const n="function"==typeof t?(...e)=>Reflect.apply(i.value,t(),e):i.value.bind(t);Reflect.defineProperty(e,r,{...i,value:n})}return e},getSpawnedPromise:e=>new Promise(((t,n)=>{e.on("exit",((e,n)=>{t({exitCode:e,signal:n})})),e.on("error",(e=>{n(e)})),e.stdin&&e.stdin.on("error",(e=>{n(e)}))}))}},10407:e=>{const t=["stdin","stdout","stderr"],n=e=>{if(!e)return;const{stdio:n}=e;if(void 0===n)return t.map((t=>e[t]));if((e=>t.some((t=>void 0!==e[t])))(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${t.map((e=>`\`${e}\``)).join(", ")}`);if("string"==typeof n)return n;if(!Array.isArray(n))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof n}\``);const r=Math.max(n.length,t.length);return Array.from({length:r},((e,t)=>n[t]))};e.exports=n,e.exports.node=e=>{const t=n(e);return"ipc"===t?"ipc":void 0===t||"string"==typeof t?[t,t,t,"ipc"]:t.includes("ipc")?t:[...t,"ipc"]}},53036:(e,t,n)=>{const r=n(58607),i=n(22935),s=n(90873),o=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},a=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(e&&n)return t?i(e,{encoding:t,maxBuffer:r}):i.buffer(e,{maxBuffer:r})};e.exports={handleInput:(e,t)=>{void 0!==t&&void 0!==e.stdin&&(r(t)?t.pipe(e.stdin):e.stdin.end(t))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=s();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:n},{encoding:r,buffer:i,maxBuffer:s},c)=>{const l=a(e,{encoding:r,buffer:i,maxBuffer:s}),u=a(t,{encoding:r,buffer:i,maxBuffer:s}),d=a(n,{encoding:r,buffer:i,maxBuffer:2*s});try{return await Promise.all([c,l,u,d])}catch(r){return Promise.all([{error:r,signal:r.signal,timedOut:r.timedOut},o(e,l),o(t,u),o(n,d)])}},validateInputSync:({input:e})=>{if(r(e))throw new TypeError("The `input` option cannot be a stream in sync mode")}}},54337:(e,t,n)=>{const{PassThrough:r}=n(12781);e.exports=e=>{e={...e};const{array:t}=e;let{encoding:n}=e;const i="buffer"===n;let s=!1;t?s=!(n||i):n=n||"utf8",i&&(n=null);const o=new r({objectMode:s});n&&o.setEncoding(n);let a=0;const c=[];return o.on("data",(e=>{c.push(e),s?a=c.length:a+=e.length})),o.getBufferedValue=()=>t?c:i?Buffer.concat(c,a):c.join(""),o.getBufferedLength=()=>a,o}},22935:(e,t,n)=>{const{constants:r}=n(14300),i=n(3171),s=n(54337);class o extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function a(e,t){if(!e)return Promise.reject(new Error("Expected a stream"));t={maxBuffer:1/0,...t};const{maxBuffer:n}=t;let a;return await new Promise(((c,l)=>{const u=e=>{e&&a.getBufferedLength()<=r.MAX_LENGTH&&(e.bufferedData=a.getBufferedValue()),l(e)};a=i(e,s(t),(e=>{e?u(e):c()})),a.on("data",(()=>{a.getBufferedLength()>n&&u(new o)}))})),a.getBufferedValue()}e.exports=a,e.exports.default=a,e.exports.buffer=(e,t)=>a(e,{...t,encoding:"buffer"}),e.exports.array=(e,t)=>a(e,{...t,array:!0}),e.exports.MaxBufferError=o},55793:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SIGNALS=void 0;t.SIGNALS=[{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"}]},83954:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.signalsByNumber=t.signalsByName=void 0;var r=n(22037),i=n(49030),s=n(15260);const o=function(e,{name:t,number:n,description:r,supported:i,action:s,forced:o,standard:a}){return{...e,[t]:{name:t,number:n,description:r,supported:i,action:s,forced:o,standard:a}}},a=(0,i.getSignals)().reduce(o,{});t.signalsByName=a;const c=function(e,t){const n=l(e,t);if(void 0===n)return{};const{name:r,description:i,supported:s,action:o,forced:a,standard:c}=n;return{[e]:{name:r,number:e,description:i,supported:s,action:o,forced:a,standard:c}}},l=function(e,t){const n=t.find((({name:t})=>r.constants.signals[t]===e));return void 0!==n?n:t.find((t=>t.number===e))},u=function(){const e=(0,i.getSignals)(),t=s.SIGRTMAX+1,n=Array.from({length:t},((t,n)=>c(n,e)));return Object.assign({},...n)}();t.signalsByNumber=u},15260:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SIGRTMAX=t.getRealtimeSignals=void 0;t.getRealtimeSignals=function(){const e=i-r+1;return Array.from({length:e},n)};const n=function(e,t){return{name:`SIGRT${t+1}`,number:r+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},r=34,i=64;t.SIGRTMAX=i},49030:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSignals=void 0;var r=n(22037),i=n(55793),s=n(15260);t.getSignals=function(){const e=(0,s.getRealtimeSignals)();return[...i.SIGNALS,...e].map(o)};const o=function({name:e,number:t,description:n,action:i,forced:s=!1,standard:o}){const{signals:{[e]:a}}=r.constants,c=void 0!==a;return{name:e,number:c?a:t,description:n,supported:c,action:i,forced:s,standard:o}}},5019:(e,t,n)=>{var r=n(67549),i=n(54725);function s(e){if("string"!=typeof e)throw new TypeError("isAbsolute expects a string.");return i()?s.win32(e):s.posix(e)}e.exports=s,s.posix=function(e){return"/"===e.charAt(0)},s.win32=function(e){return!(!/[a-z]/i.test(e.charAt(0))||":"!==e.charAt(1)||"\\"!==e.charAt(2))||("\\\\"===e.slice(0,2)||!r(e))}},77918:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(23799)),s=r(n(71017)),o=r(n(5019)),a=process.cwd();t.default=function(e){void 0===e&&(e=a);var t=o.default(e)?e:s.default.join(a,e);try{return i.default.commandSync("git rev-parse --is-inside-work-tree",{cwd:t}),!0}catch(e){return!1}},e.exports=t.default},67549:(e,t,n)=>{var r=n(64e3);e.exports=function(e){if("string"!=typeof e)throw new TypeError("expected filepath to be a string");return!r(e)&&!/^([a-z]:)?[\\\/]/i.test(e)}},58607:e=>{const t=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;t.writable=e=>t(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,t.readable=e=>t(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,t.duplex=e=>t.writable(e)&&t.readable(e),t.transform=e=>t.duplex(e)&&"function"==typeof e._transform,e.exports=t},64e3:(e,t,n)=>{var r=n(72191)();e.exports=function(e){if("string"!=typeof e)throw new TypeError("expected a string");return r.test(e)}},54725:(e,t)=>{!function(n){t&&"object"==typeof t?e.exports=n():"function"==typeof define&&define.amd?define([],n):"undefined"!=typeof window?window.isWindows=n():"undefined"!=typeof global?global.isWindows=n():"undefined"!=typeof self?self.isWindows=n():this.isWindows=n()}((function(){return function(){return process&&("win32"===process.platform||/^(msys|cygwin)$/.test(process.env.OSTYPE))}}))},5909:(e,t,n)=>{var r;n(57147);function i(e,t,n){if("function"==typeof t&&(n=t,t={}),!n){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(n,r){i(e,t||{},(function(e,t){e?r(e):n(t)}))}))}r(e,t||{},(function(e,r){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,r=!1),n(e,r)}))}r="win32"===process.platform||global.TESTING_WINDOWS?n(90837):n(74703),e.exports=i,i.sync=function(e,t){try{return r.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},74703:(e,t,n)=>{e.exports=i,i.sync=function(e,t){return s(r.statSync(e),t)};var r=n(57147);function i(e,t,n){r.stat(e,(function(e,r){n(e,!e&&s(r,t))}))}function s(e,t){return e.isFile()&&function(e,t){var n=e.mode,r=e.uid,i=e.gid,s=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),o=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c;return n&l||n&c&&i===o||n&a&&r===s||n&u&&0===s}(e,t)}},90837:(e,t,n)=>{e.exports=s,s.sync=function(e,t){return i(r.statSync(e),e,t)};var r=n(57147);function i(e,t,n){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var n=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!n)return!0;if(-1!==(n=n.split(";")).indexOf(""))return!0;for(var r=0;r<n.length;r++){var i=n[r].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}(t,n)}function s(e,t,n){r.stat(e,(function(r,s){n(r,!r&&i(s,e,t))}))}},90873:(e,t,n)=>{const{PassThrough:r}=n(12781);e.exports=function(){var e=[],t=new r({objectMode:!0});return t.setMaxListeners(0),t.add=n,t.isEmpty=i,t.on("unpipe",s),Array.prototype.slice.call(arguments).forEach(n),t;function n(r){return Array.isArray(r)?(r.forEach(n),this):(e.push(r),r.once("end",s.bind(null,r)),r.once("error",t.emit.bind(t,"error")),r.pipe(t,{end:!1}),this)}function i(){return 0==e.length}function s(n){!(e=e.filter((function(e){return e!==n}))).length&&t.readable&&t.end()}}},9002:(e,t,n)=>{const r=n(71017),i=n(26569),s=e=>{let t;e={cwd:process.cwd(),path:process.env[i()],execPath:process.execPath,...e};let n=r.resolve(e.cwd);const s=[];for(;t!==n;)s.push(r.join(n,"node_modules/.bin")),t=n,n=r.resolve(n,"..");const o=r.resolve(e.cwd,e.execPath,"..");return s.push(o),s.concat(e.path).join(r.delimiter)};e.exports=s,e.exports.default=s,e.exports.env=t=>{const n={...(t={env:process.env,...t}).env},r=i({env:n});return t.path=n[r],n[r]=e.exports(t),n}},29928:(e,t,n)=>{var r=n(68892);function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function s(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}e.exports=r(i),e.exports.strict=r(s),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return s(this)},configurable:!0})}))},83937:(e,t,n)=>{const r=n(26587),i=new WeakMap,s=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let n,s=0;const o=e.displayName||e.name||"<anonymous>",a=function(...r){if(i.set(a,++s),1===s)n=e.apply(this,r),e=null;else if(!0===t.throw)throw new Error(`Function \`${o}\` can only be called once`);return n};return r(a,e),i.set(a,s),a};e.exports=s,e.exports.default=s,e.exports.callCount=e=>{if(!i.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return i.get(e)}},26587:e=>{const t=(e,t)=>{for(const n of Reflect.ownKeys(t))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e};e.exports=t,e.exports.default=t},26569:e=>{const t=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};e.exports=t,e.exports.default=t},3171:(e,t,n)=>{var r=n(29928),i=n(18797),s=n(57147),o=function(){},a=/^v?\.0/.test(process.version),c=function(e){return"function"==typeof e},l=function(e,t,n,l){l=r(l);var u=!1;e.on("close",(function(){u=!0})),i(e,{readable:t,writable:n},(function(e){if(e)return l(e);u=!0,l()}));var d=!1;return function(t){if(!u&&!d)return d=!0,function(e){return!!a&&!!s&&(e instanceof(s.ReadStream||o)||e instanceof(s.WriteStream||o))&&c(e.close)}(e)?e.close(o):function(e){return e.setHeader&&c(e.abort)}(e)?e.abort():c(e.destroy)?e.destroy():void l(t||new Error("stream was destroyed"))}},u=function(e){e()},d=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),n=c(t[t.length-1]||o)&&t.pop()||o;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var r=t.map((function(i,s){var o=s<t.length-1;return l(i,o,s>0,(function(t){e||(e=t),t&&r.forEach(u),o||(r.forEach(u),n(e))}))}));return t.reduce(d)}},14256:(e,t,n)=>{const r=n(83882);e.exports=(e="")=>{const t=e.match(r);if(!t)return null;const[n,i]=t[0].replace(/#! ?/,"").split(" "),s=n.split("/").pop();return"env"===s?i:i?`${s} ${i}`:s}},83882:e=>{e.exports=/^#!(.*)/},90260:(e,t,n)=>{var r=global.process;const i=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(i(r)){var s,o=n(39491),a=n(83261),c=/^win/i.test(r.platform),l=n(82361);"function"!=typeof l&&(l=l.EventEmitter),r.__signal_exit_emitter__?s=r.__signal_exit_emitter__:((s=r.__signal_exit_emitter__=new l).count=0,s.emitted={}),s.infinite||(s.setMaxListeners(1/0),s.infinite=!0),e.exports=function(e,t){if(!i(global.process))return function(){};o.equal(typeof e,"function","a callback must be provided for exit handler"),!1===f&&p();var n="exit";t&&t.alwaysLast&&(n="afterexit");return s.on(n,e),function(){s.removeListener(n,e),0===s.listeners("exit").length&&0===s.listeners("afterexit").length&&u()}};var u=function(){f&&i(global.process)&&(f=!1,a.forEach((function(e){try{r.removeListener(e,h[e])}catch(e){}})),r.emit=y,r.reallyExit=m,s.count-=1)};e.exports.unload=u;var d=function(e,t,n){s.emitted[e]||(s.emitted[e]=!0,s.emit(e,t,n))},h={};a.forEach((function(e){h[e]=function(){i(global.process)&&(r.listeners(e).length===s.count&&(u(),d("exit",null,e),d("afterexit",null,e),c&&"SIGHUP"===e&&(e="SIGINT"),r.kill(r.pid,e)))}})),e.exports.signals=function(){return a};var f=!1,p=function(){!f&&i(global.process)&&(f=!0,s.count+=1,a=a.filter((function(e){try{return r.on(e,h[e]),!0}catch(e){return!1}})),r.emit=b,r.reallyExit=g)};e.exports.load=p;var m=r.reallyExit,g=function(e){i(global.process)&&(r.exitCode=e||0,d("exit",r.exitCode,null),d("afterexit",r.exitCode,null),m.call(r,r.exitCode))},y=r.emit,b=function(e,t){if("exit"===e&&i(global.process)){void 0!==t&&(r.exitCode=t);var n=y.apply(this,arguments);return d("exit",r.exitCode,null),d("afterexit",r.exitCode,null),n}return y.apply(this,arguments)}}else e.exports=function(){return function(){}}},83261:e=>{e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")},36178:e=>{e.exports=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),n="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===n&&(e=e.slice(0,e.length-1)),e}},72191:e=>{e.exports=function(){return/^[\\\/]{2,}[^\\\/]+[\\\/]+[^\\\/]+/}},68892:e=>{e.exports=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),i=e[e.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach((function(e){r[e]=i[e]})),r}}},55105:(e,t,n)=>{const{PassThrough:r}=n(12781);e.exports=e=>{e={...e};const{array:t}=e;let{encoding:n}=e;const i="buffer"===n;let s=!1;t?s=!(n||i):n=n||"utf8",i&&(n=null);const o=new r({objectMode:s});n&&o.setEncoding(n);let a=0;const c=[];return o.on("data",(e=>{c.push(e),s?a=c.length:a+=e.length})),o.getBufferedValue=()=>t?c:i?Buffer.concat(c,a):c.join(""),o.getBufferedLength=()=>a,o}},10031:(e,t,n)=>{const{constants:r}=n(14300),i=n(12781),{promisify:s}=n(73837),o=n(55105),a=s(i.pipeline);class c extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:n}=t,i=o(t);return await new Promise(((t,s)=>{const o=e=>{e&&i.getBufferedLength()<=r.MAX_LENGTH&&(e.bufferedData=i.getBufferedValue()),s(e)};(async()=>{try{await a(e,i),t()}catch(e){o(e)}})(),i.on("data",(()=>{i.getBufferedLength()>n&&o(new c)}))})),i.getBufferedValue()}e.exports=l,e.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),e.exports.array=(e,t)=>l(e,{...t,array:!0}),e.exports.MaxBufferError=c},39491:t=>{t.exports=e(import.meta.url)("assert")},14300:t=>{t.exports=e(import.meta.url)("buffer")},32081:t=>{t.exports=e(import.meta.url)("child_process")},82361:t=>{t.exports=e(import.meta.url)("events")},57147:t=>{t.exports=e(import.meta.url)("fs")},22037:t=>{t.exports=e(import.meta.url)("os")},71017:t=>{t.exports=e(import.meta.url)("path")},12781:t=>{t.exports=e(import.meta.url)("stream")},76224:t=>{t.exports=e(import.meta.url)("tty")},73837:t=>{t.exports=e(import.meta.url)("util")}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return s[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=s,n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var i=Object.create(null);a.r(i);var s={};t=t||[null,n({}),n([]),n(n)];for(var o=2&r&&e;"object"==typeof o&&!~t.indexOf(o);o=n(o))Object.getOwnPropertyNames(o).forEach((t=>s[t]=()=>e[t]));return s.default=()=>e,a.d(i,s),i},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,n)=>(a.f[n](e,t),t)),[])),a.u=e=>e+".mjs",a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r={442:0},i=e=>{var t,n,{ids:i,modules:s,runtime:o}=e,c=0;for(t in s)a.o(s,t)&&(a.m[t]=s[t]);for(o&&o(a);c<i.length;c++)n=i[c],a.o(r,n)&&r[n]&&r[n][0](),r[i[c]]=0},a.f.j=(e,t)=>{var n=a.o(r,e)?r[e]:void 0;if(0!==n)if(n)t.push(n[1]);else{var s=import("./"+a.u(e)).then(i,(t=>{throw 0!==r[e]&&(r[e]=void 0),t}));s=Promise.race([s,new Promise((t=>n=r[e]=[t]))]),t.push(n[1]=s)}},(()=>{var t={};a.r(t),a.d(t,{builder:()=>Wn,command:()=>Fn,description:()=>Bn,gitSupport:()=>Un});var n={};a.r(n),a.d(n,{builder:()=>rr,command:()=>nr});var r=a(57147),i=a(39491);const s={right:function(e,t){e=e.trim();const n=l.stringWidth(e);if(n<t)return" ".repeat(t-n)+e;return e},center:function(e,t){e=e.trim();const n=l.stringWidth(e);if(n>=t)return e;return" ".repeat(t-n>>1)+e}};class o{constructor(e){var t;this.width=e.width,this.wrap=null===(t=e.wrap)||void 0===t||t,this.rows=[]}span(...e){this.div(...e).span=!0}resetOutput(){this.rows=[]}div(...e){if(0===e.length&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...e)&&"string"==typeof e[0])return this.applyLayoutDSL(e[0]);const t=e.map((e=>"string"==typeof e?this.colFromString(e):e));return this.rows.push(t),t}shouldApplyLayoutDSL(...e){return 1===e.length&&"string"==typeof e[0]&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){const t=e.split("\n").map((e=>e.split("\t")));let n=0;return t.forEach((e=>{e.length>1&&l.stringWidth(e[0])>n&&(n=Math.min(Math.floor(.5*this.width),l.stringWidth(e[0])))})),t.forEach((e=>{this.div(...e.map(((t,r)=>({text:t.trim(),padding:this.measurePadding(t),width:0===r&&e.length>1?n:void 0}))))})),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){const t=l.stripAnsi(e);return[0,t.match(/\s*$/)[0].length,0,t.match(/^\s*/)[0].length]}toString(){const e=[];return this.rows.forEach((t=>{this.rowToString(t,e)})),e.filter((e=>!e.hidden)).map((e=>e.text)).join("\n")}rowToString(e,t){return this.rasterize(e).forEach(((n,r)=>{let i="";n.forEach(((n,o)=>{const{width:a}=e[o],u=this.negatePadding(e[o]);let d=n;if(u>l.stringWidth(n)&&(d+=" ".repeat(u-l.stringWidth(n))),e[o].align&&"left"!==e[o].align&&this.wrap){d=(0,s[e[o].align])(d,u),l.stringWidth(d)<u&&(d+=" ".repeat((a||0)-l.stringWidth(d)-1))}const h=e[o].padding||[0,0,0,0];h[3]&&(i+=" ".repeat(h[3])),i+=c(e[o],d,"| "),i+=d,i+=c(e[o],d," |"),h[1]&&(i+=" ".repeat(h[1])),0===r&&t.length>0&&(i=this.renderInline(i,t[t.length-1]))})),t.push({text:i.replace(/ +$/,""),span:e.span})})),t}renderInline(e,t){const n=e.match(/^ */),r=n?n[0].length:0,i=t.text,s=l.stringWidth(i.trimRight());return t.span?this.wrap?r<s?e:(t.hidden=!0,i.trimRight()+" ".repeat(r-s)+e.trimLeft()):(t.hidden=!0,i+e):e}rasterize(e){const t=[],n=this.columnWidths(e);let r;return e.forEach(((e,i)=>{e.width=n[i],r=this.wrap?l.wrap(e.text,this.negatePadding(e),{hard:!0}).split("\n"):e.text.split("\n"),e.border&&(r.unshift("."+"-".repeat(this.negatePadding(e)+2)+"."),r.push("'"+"-".repeat(this.negatePadding(e)+2)+"'")),e.padding&&(r.unshift(...new Array(e.padding[0]||0).fill("")),r.push(...new Array(e.padding[2]||0).fill(""))),r.forEach(((e,n)=>{t[n]||t.push([]);const r=t[n];for(let e=0;e<i;e++)void 0===r[e]&&r.push("");r.push(e)}))})),t}negatePadding(e){let t=e.width||0;return e.padding&&(t-=(e.padding[3]||0)+(e.padding[1]||0)),e.border&&(t-=4),t}columnWidths(e){if(!this.wrap)return e.map((e=>e.width||l.stringWidth(e.text)));let t=e.length,n=this.width;const r=e.map((e=>{if(e.width)return t--,n-=e.width,e.width})),i=t?Math.floor(n/t):0;return r.map(((t,n)=>void 0===t?Math.max(i,function(e){const t=e.padding||[],n=1+(t[3]||0)+(t[1]||0);if(e.border)return n+4;return n}(e[n])):t))}}function c(e,t,n){return e.border?/[.']-+[.']/.test(t)?"":0!==t.trim().length?n:" ":""}let l;const u=new RegExp("\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function d(e){return e.replace(u,"")}function h(e,t){const[n,r]=e.match(u)||["",""];e=d(e);let i="";for(let n=0;n<e.length;n++)0!==n&&n%t==0&&(i+="\n"),i+=e.charAt(n);return n&&r&&(i=`${n}${i}${r}`),i}var f=a(71017);var p=a(73837);const m=e(import.meta.url)("url");function g(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),-1===e.indexOf("-")&&-1===e.indexOf("_"))return e;{let t="",n=!1;const r=e.match(/^-+/);for(let i=r?r[0].length:0;i<e.length;i++){let r=e.charAt(i);n&&(n=!1,r=r.toUpperCase()),0===i||"-"!==r&&"_"!==r?"-"!==r&&"_"!==r&&(t+=r):n=!0}return t}}function y(e,t){const n=e.toLowerCase();t=t||"-";let r="";for(let i=0;i<e.length;i++){const s=n.charAt(i),o=e.charAt(i);r+=s!==o&&i>0?`${t}${n.charAt(i)}`:o}return r}function b(e){return null!=e&&("number"==typeof e||(!!/^0x[0-9a-f]+$/i.test(e)||!/^0[^.]/.test(e)&&/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)))}var v;let w;!function(e){e.BOOLEAN="boolean",e.STRING="string",e.NUMBER="number",e.ARRAY="array"}(v||(v={}));function x(e){return void 0!==e?e+1:1}function O(e){return"__proto__"===e?"___proto___":e}const S=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12;if(process&&process.version){if(Number(process.version.match(/v([^.]+)/)[1])<S)throw Error(`yargs parser supports a minimum Node.js version of ${S}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`)}const E=process?process.env:{},j=new class{constructor(e){w=e}parse(e,t){const n=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},t),r=function(e){if(Array.isArray(e))return e.map((e=>"string"!=typeof e?e+"":e));e=e.trim();let t=0,n=null,r=null,i=null;const s=[];for(let o=0;o<e.length;o++)n=r,r=e.charAt(o)," "!==r||i?(r===i?i=null:"'"!==r&&'"'!==r||i||(i=r),s[t]||(s[t]=""),s[t]+=r):" "!==n&&t++;return s}(e),i="string"==typeof e,s=function(e){const t=[],n=Object.create(null);let r=!0;Object.keys(e).forEach((function(n){t.push([].concat(e[n],n))}));for(;r;){r=!1;for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++){if(t[e].filter((function(e){return-1!==t[n].indexOf(e)})).length){t[e]=t[e].concat(t[n]),t.splice(n,1),r=!0;break}}}return t.forEach((function(e){const t=(e=e.filter((function(e,t,n){return n.indexOf(e)===t}))).pop();void 0!==t&&"string"==typeof t&&(n[t]=e)})),n}(Object.assign(Object.create(null),n.alias)),o=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},n.configuration),a=Object.assign(Object.create(null),n.default),c=n.configObjects||[],l=n.envPrefix,u=o["populate--"],d=u?"--":"_",h=Object.create(null),f=Object.create(null),p=n.__||w.format,m={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:[]},S=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,E=new RegExp("^--"+o["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach((function(e){const t="object"==typeof e?e.key:e,n=Object.keys(e).map((function(e){return{boolean:"bools",string:"strings",number:"numbers"}[e]})).filter(Boolean).pop();n&&(m[n][t]=!0),m.arrays[t]=!0,m.keys.push(t)})),[].concat(n.boolean||[]).filter(Boolean).forEach((function(e){m.bools[e]=!0,m.keys.push(e)})),[].concat(n.string||[]).filter(Boolean).forEach((function(e){m.strings[e]=!0,m.keys.push(e)})),[].concat(n.number||[]).filter(Boolean).forEach((function(e){m.numbers[e]=!0,m.keys.push(e)})),[].concat(n.count||[]).filter(Boolean).forEach((function(e){m.counts[e]=!0,m.keys.push(e)})),[].concat(n.normalize||[]).filter(Boolean).forEach((function(e){m.normalize[e]=!0,m.keys.push(e)})),"object"==typeof n.narg&&Object.entries(n.narg).forEach((([e,t])=>{"number"==typeof t&&(m.nargs[e]=t,m.keys.push(e))})),"object"==typeof n.coerce&&Object.entries(n.coerce).forEach((([e,t])=>{"function"==typeof t&&(m.coercions[e]=t,m.keys.push(e))})),void 0!==n.config&&(Array.isArray(n.config)||"string"==typeof n.config?[].concat(n.config).filter(Boolean).forEach((function(e){m.configs[e]=!0})):"object"==typeof n.config&&Object.entries(n.config).forEach((([e,t])=>{"boolean"!=typeof t&&"function"!=typeof t||(m.configs[e]=t)}))),function(...e){e.forEach((function(e){Object.keys(e||{}).forEach((function(e){m.aliases[e]||(m.aliases[e]=[].concat(s[e]||[]),m.aliases[e].concat(e).forEach((function(t){if(/-/.test(t)&&o["camel-case-expansion"]){const n=g(t);n!==e&&-1===m.aliases[e].indexOf(n)&&(m.aliases[e].push(n),h[n]=!0)}})),m.aliases[e].concat(e).forEach((function(t){if(t.length>1&&/[A-Z]/.test(t)&&o["camel-case-expansion"]){const n=y(t,"-");n!==e&&-1===m.aliases[e].indexOf(n)&&(m.aliases[e].push(n),h[n]=!0)}})),m.aliases[e].forEach((function(t){m.aliases[t]=[e].concat(m.aliases[e].filter((function(e){return t!==e})))})))}))}))}(n.key,s,n.default,m.arrays),Object.keys(a).forEach((function(e){(m.aliases[e]||[]).forEach((function(t){a[t]=a[e]}))}));let j=null;Object.keys(m.counts).find((e=>B(e,m.arrays)?(j=Error(p("Invalid configuration: %s, opts.count excludes opts.array.",e)),!0):!!B(e,m.nargs)&&(j=Error(p("Invalid configuration: %s, opts.count excludes opts.narg.",e)),!0)));let C=[];const A=Object.assign(Object.create(null),{_:[]}),_={};for(let e=0;e<r.length;e++){const t=r[e],n=t.replace(/^-{3,}/,"---");let i,s,a,c,l,u;if("--"!==t&&W(t))k(t);else{if(n.match(/---+(=|$)/)){k(t);continue}if(t.match(/^--.+=/)||!o["short-option-groups"]&&t.match(/^-.+=/))c=t.match(/^--?([^=]+)=([\s\S]*)$/),null!==c&&Array.isArray(c)&&c.length>=3&&(B(c[1],m.arrays)?e=I(e,c[1],r,c[2]):!1!==B(c[1],m.nargs)?e=P(e,c[1],r,c[2]):$(c[1],c[2],!0));else if(t.match(E)&&o["boolean-negation"])c=t.match(E),null!==c&&Array.isArray(c)&&c.length>=2&&(s=c[1],$(s,!!B(s,m.arrays)&&[!1]));else if(t.match(/^--.+/)||!o["short-option-groups"]&&t.match(/^-[^-]+/))c=t.match(/^--?(.+)/),null!==c&&Array.isArray(c)&&c.length>=2&&(s=c[1],B(s,m.arrays)?e=I(e,s,r):!1!==B(s,m.nargs)?e=P(e,s,r):(l=r[e+1],void 0===l||l.match(/^-/)&&!l.match(S)||B(s,m.bools)||B(s,m.counts)?/^(true|false)$/.test(l)?($(s,l),e++):$(s,H(s)):($(s,l),e++)));else if(t.match(/^-.\..+=/))c=t.match(/^-([^=]+)=([\s\S]*)$/),null!==c&&Array.isArray(c)&&c.length>=3&&$(c[1],c[2]);else if(t.match(/^-.\..+/)&&!t.match(S))l=r[e+1],c=t.match(/^-(.\..+)/),null!==c&&Array.isArray(c)&&c.length>=2&&(s=c[1],void 0===l||l.match(/^-/)||B(s,m.bools)||B(s,m.counts)?$(s,H(s)):($(s,l),e++));else if(t.match(/^-[^-]+/)&&!t.match(S)){a=t.slice(1,-1).split(""),i=!1;for(let n=0;n<a.length;n++){if(l=t.slice(n+2),a[n+1]&&"="===a[n+1]){u=t.slice(n+3),s=a[n],B(s,m.arrays)?e=I(e,s,r,u):!1!==B(s,m.nargs)?e=P(e,s,r,u):$(s,u),i=!0;break}if("-"!==l){if(/[A-Za-z]/.test(a[n])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(l)&&!1===B(l,m.bools)){$(a[n],l),i=!0;break}if(a[n+1]&&a[n+1].match(/\W/)){$(a[n],l),i=!0;break}$(a[n],H(a[n]))}else $(a[n],l)}s=t.slice(-1)[0],i||"-"===s||(B(s,m.arrays)?e=I(e,s,r):!1!==B(s,m.nargs)?e=P(e,s,r):(l=r[e+1],void 0===l||/^(-|--)[^-]/.test(l)&&!l.match(S)||B(s,m.bools)||B(s,m.counts)?/^(true|false)$/.test(l)?($(s,l),e++):$(s,H(s)):($(s,l),e++)))}else if(t.match(/^-[0-9]$/)&&t.match(S)&&B(t.slice(1),m.bools))s=t.slice(1),$(s,H(s));else{if("--"===t){C=r.slice(e+1);break}if(o["halt-at-non-option"]){C=r.slice(e);break}k(t)}}}function k(e){const t=L("_",e);"string"!=typeof t&&"number"!=typeof t||A._.push(t)}function P(e,t,n,r){let i,s=B(t,m.nargs);if(s="number"!=typeof s||isNaN(s)?1:s,0===s)return z(r)||(j=Error(p("Argument unexpected for: %s",t))),$(t,H(t)),e;let a=z(r)?0:1;if(o["nargs-eats-options"])n.length-(e+1)+a<s&&(j=Error(p("Not enough arguments following: %s",t))),a=s;else{for(i=e+1;i<n.length&&(!n[i].match(/^-[^0-9]/)||n[i].match(S)||W(n[i]));i++)a++;a<s&&(j=Error(p("Not enough arguments following: %s",t)))}let c=Math.min(a,s);for(!z(r)&&c>0&&($(t,r),c--),i=e+1;i<c+e+1;i++)$(t,n[i]);return e+c}function I(e,t,n,r){let s=[],c=r||n[e+1];const l=B(t,m.nargs);if(B(t,m.bools)&&!/^(true|false)$/.test(c))s.push(!0);else if(z(c)||z(r)&&/^-/.test(c)&&!S.test(c)&&!W(c)){if(void 0!==a[t]){const e=a[t];s=Array.isArray(e)?e:[e]}}else{z(r)||s.push(T(t,r,!0));for(let r=e+1;r<n.length&&!(!o["greedy-arrays"]&&s.length>0||l&&"number"==typeof l&&s.length>=l)&&(c=n[r],!/^-/.test(c)||S.test(c)||W(c));r++)e=r,s.push(T(t,c,i))}return"number"==typeof l&&(l&&s.length<l||isNaN(l)&&0===s.length)&&(j=Error(p("Not enough arguments following: %s",t))),$(t,s),e}function $(e,t,n=i){if(/-/.test(e)&&o["camel-case-expansion"]){const t=e.split(".").map((function(e){return g(e)})).join(".");M(e,t)}const r=T(e,t,n),s=e.split(".");if(F(A,s,r),m.aliases[e]&&m.aliases[e].forEach((function(e){const t=e.split(".");F(A,t,r)})),s.length>1&&o["dot-notation"]&&(m.aliases[s[0]]||[]).forEach((function(t){let n=t.split(".");const i=[].concat(s);i.shift(),n=n.concat(i),(m.aliases[e]||[]).includes(n.join("."))||F(A,n,r)})),B(e,m.normalize)&&!B(e,m.arrays)){[e].concat(m.aliases[e]||[]).forEach((function(e){Object.defineProperty(_,e,{enumerable:!0,get:()=>t,set(e){t="string"==typeof e?w.normalize(e):e}})}))}}function M(e,t){m.aliases[e]&&m.aliases[e].length||(m.aliases[e]=[t],h[t]=!0),m.aliases[t]&&m.aliases[t].length||M(t,e)}function T(e,t,n){n&&(t=function(e){return"string"!=typeof e||"'"!==e[0]&&'"'!==e[0]||e[e.length-1]!==e[0]?e:e.substring(1,e.length-1)}(t)),(B(e,m.bools)||B(e,m.counts))&&"string"==typeof t&&(t="true"===t);let r=Array.isArray(t)?t.map((function(t){return L(e,t)})):L(e,t);return B(e,m.counts)&&(z(r)||"boolean"==typeof r)&&(r=x()),B(e,m.normalize)&&B(e,m.arrays)&&(r=Array.isArray(t)?t.map((e=>w.normalize(e))):w.normalize(t)),r}function L(e,t){if(!o["parse-positional-numbers"]&&"_"===e)return t;if(!B(e,m.strings)&&!B(e,m.bools)&&!Array.isArray(t)){(b(t)&&o["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${t}`)))||!z(t)&&B(e,m.numbers))&&(t=Number(t))}return t}function G(e,t){Object.keys(e).forEach((function(n){const r=e[n],i=t?t+"."+n:n;"object"==typeof r&&null!==r&&!Array.isArray(r)&&o["dot-notation"]?G(r,i):(!D(A,i.split("."))||B(i,m.arrays)&&o["combine-arrays"])&&$(i,r)}))}function N(e,t){if(void 0===l)return;const n="string"==typeof l?l:"",r=w.env();Object.keys(r).forEach((function(i){if(""===n||0===i.lastIndexOf(n,0)){const s=i.split("__").map((function(e,t){return 0===t&&(e=e.substring(n.length)),g(e)}));(t&&m.configs[s.join(".")]||!t)&&!D(e,s)&&$(s.join("."),r[i])}}))}function R(e,t,n,r=!1){Object.keys(n).forEach((function(i){D(e,i.split("."))||(F(e,i.split("."),n[i]),r&&(f[i]=!0),(t[i]||[]).forEach((function(t){D(e,t.split("."))||F(e,t.split("."),n[i])})))}))}function D(e,t){let n=e;o["dot-notation"]||(t=[t.join(".")]),t.slice(0,-1).forEach((function(e){n=n[e]||{}}));const r=t[t.length-1];return"object"==typeof n&&r in n}function F(e,t,n){let r=e;o["dot-notation"]||(t=[t.join(".")]),t.slice(0,-1).forEach((function(e){e=O(e),"object"==typeof r&&void 0===r[e]&&(r[e]={}),"object"!=typeof r[e]||Array.isArray(r[e])?(Array.isArray(r[e])?r[e].push({}):r[e]=[r[e],{}],r=r[e][r[e].length-1]):r=r[e]}));const i=O(t[t.length-1]),s=B(t.join("."),m.arrays),a=Array.isArray(n);let c=o["duplicate-arguments-array"];!c&&B(i,m.nargs)&&(c=!0,(!z(r[i])&&1===m.nargs[i]||Array.isArray(r[i])&&r[i].length===m.nargs[i])&&(r[i]=void 0)),n===x()?r[i]=x(r[i]):Array.isArray(r[i])?c&&s&&a?r[i]=o["flatten-duplicate-arrays"]?r[i].concat(n):(Array.isArray(r[i][0])?r[i]:[r[i]]).concat([n]):c||Boolean(s)!==Boolean(a)?r[i]=r[i].concat([n]):r[i]=n:void 0===r[i]&&s?r[i]=a?n:[n]:!c||void 0===r[i]||B(i,m.counts)||B(i,m.bools)?r[i]=n:r[i]=[r[i],n]}function B(e,t){const n=[].concat(m.aliases[e]||[],e),r=Object.keys(t),i=n.find((e=>r.includes(e)));return!!i&&t[i]}function U(e){const t=Object.keys(m);return[].concat(t.map((e=>m[e]))).some((function(t){return Array.isArray(t)?t.includes(e):t[e]}))}function W(e){return o["unknown-options-as-args"]&&function(e){if((e=e.replace(/^-{3,}/,"--")).match(S))return!1;if(function(e){if(e.match(S)||!e.match(/^-[^-]+/))return!1;let t,n=!0;const r=e.slice(1).split("");for(let i=0;i<r.length;i++){if(t=e.slice(i+2),!U(r[i])){n=!1;break}if(r[i+1]&&"="===r[i+1]||"-"===t||/[A-Za-z]/.test(r[i])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(t)||r[i+1]&&r[i+1].match(/\W/))break}return n}(e))return!1;return!function(e,...t){return[].concat(...t).some((function(t){const n=e.match(t);return n&&U(n[1])}))}(e,/^-+([^=]+?)=[\s\S]*$/,E,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}(e)}function H(e){return B(e,m.bools)||B(e,m.counts)||!(`${e}`in a)?(t=function(e){let t=v.BOOLEAN;return B(e,m.strings)?t=v.STRING:B(e,m.numbers)?t=v.NUMBER:B(e,m.bools)?t=v.BOOLEAN:B(e,m.arrays)&&(t=v.ARRAY),t}(e),{[v.BOOLEAN]:!0,[v.STRING]:"",[v.NUMBER]:void 0,[v.ARRAY]:[]}[t]):a[e];var t}function z(e){return void 0===e}return N(A,!0),N(A,!1),function(e){const t=Object.create(null);R(t,m.aliases,a),Object.keys(m.configs).forEach((function(n){const r=e[n]||t[n];if(r)try{let e=null;const t=w.resolve(w.cwd(),r),i=m.configs[n];if("function"==typeof i){try{e=i(t)}catch(t){e=t}if(e instanceof Error)return void(j=e)}else e=w.require(t);G(e)}catch(t){"PermissionDenied"===t.name?j=t:e[n]&&(j=Error(p("Invalid JSON config file: %s",r)))}}))}(A),void 0!==c&&c.forEach((function(e){G(e)})),R(A,m.aliases,a,!0),function(e){let t;const n=new Set;Object.keys(e).forEach((function(r){if(!n.has(r)&&(t=B(r,m.coercions),"function"==typeof t))try{const i=L(r,t(e[r]));[].concat(m.aliases[r]||[],r).forEach((t=>{n.add(t),e[t]=i}))}catch(e){j=e}}))}(A),o["set-placeholder-key"]&&function(e){m.keys.forEach((t=>{~t.indexOf(".")||void 0===e[t]&&(e[t]=void 0)}))}(A),Object.keys(m.counts).forEach((function(e){D(A,e.split("."))||$(e,0)})),u&&C.length&&(A[d]=[]),C.forEach((function(e){A[d].push(e)})),o["camel-case-expansion"]&&o["strip-dashed"]&&Object.keys(A).filter((e=>"--"!==e&&e.includes("-"))).forEach((e=>{delete A[e]})),o["strip-aliased"]&&[].concat(...Object.keys(s).map((e=>s[e]))).forEach((e=>{o["camel-case-expansion"]&&e.includes("-")&&delete A[e.split(".").map((e=>g(e))).join(".")],delete A[e]})),{aliases:Object.assign({},m.aliases),argv:Object.assign(_,A),configuration:o,defaulted:Object.assign({},f),error:j,newAliases:Object.assign({},h)}}}({cwd:process.cwd,env:()=>E,format:p.format,normalize:f.normalize,resolve:f.resolve,require:e=>{if("undefined"!=typeof require)return require(e);if(e.match(/\.json$/))return JSON.parse((0,r.readFileSync)(e,"utf8"));throw Error("only .json config files are supported in ESM")}}),C=function(e,t){return j.parse(e.slice(),t).argv};C.detailed=function(e,t){return j.parse(e.slice(),t)},C.camelCase=g,C.decamelize=y,C.looksLikeNumber=b;const A=C;function _(){return process.versions.electron&&!process.defaultApp?0:1}class k extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,k)}}const P={fs:{readFileSync:r.readFileSync,writeFile:r.writeFile},format:p.format,resolve:f.resolve,exists:e=>{try{return(0,r.statSync)(e).isFile()}catch(e){return!1}}};let I;class ${constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles="boolean"!=typeof e.updateFiles||e.updateFiles,this.locale=e.locale||"en",this.fallbackToLanguage="boolean"!=typeof e.fallbackToLanguage||e.fallbackToLanguage,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if("string"!=typeof arguments[0])return this._taggedLiteral(arguments[0],...arguments);const t=e.shift();let n=function(){};return"function"==typeof e[e.length-1]&&(n=e.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]=t,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),I.format.apply(I.format,[this.cache[this.locale][t]||t].concat(e))}__n(){const e=Array.prototype.slice.call(arguments),t=e.shift(),n=e.shift(),r=e.shift();let i=function(){};"function"==typeof e[e.length-1]&&(i=e.pop()),this.cache[this.locale]||this._readLocaleFile();let s=1===r?t:n;if(this.cache[this.locale][t]){s=this.cache[this.locale][t][1===r?"one":"other"]}!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]={one:t,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:i})):i();const o=[s];return~s.indexOf("%d")&&o.push(r),I.format.apply(I.format,o.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.cache[this.locale][t]=e[t])}_taggedLiteral(e,...t){let n="";return e.forEach((function(e,r){const i=t[r+1];n+=e,void 0!==i&&(n+="%s")})),this.__.apply(this,[n].concat([].slice.call(t,1)))}_enqueueWrite(e){this.writeQueue.push(e),1===this.writeQueue.length&&this._processWriteQueue()}_processWriteQueue(){const e=this,t=this.writeQueue[0],n=t.directory,r=t.locale,i=t.cb,s=this._resolveLocaleFile(n,r),o=JSON.stringify(this.cache[r],null,2);I.fs.writeFile(s,o,"utf-8",(function(t){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),i(t)}))}_readLocaleFile(){let e={};const t=this._resolveLocaleFile(this.directory,this.locale);try{I.fs.readFileSync&&(e=JSON.parse(I.fs.readFileSync(t,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+t),"ENOENT"!==n.code)throw n;e={}}this.cache[this.locale]=e}_resolveLocaleFile(e,t){let n=I.resolve(e,"./",t+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~t.lastIndexOf("_")){const r=I.resolve(e,"./",t.split("_")[0]+".json");this._fileExistsSync(r)&&(n=r)}return n}_fileExistsSync(e){return I.exists(e)}}const M=e=>function(e,t){I=t;const n=new $(e);return{__:n.__.bind(n),__n:n.__n.bind(n),setLocale:n.setLocale.bind(n),getLocale:n.getLocale.bind(n),updateLocale:n.updateLocale.bind(n),locale:n.locale}}(e,P),T="loading a directory of commands is not supported yet for ESM";let L;try{L=(0,m.fileURLToPath)(import.meta.url)}catch(e){L=process.cwd()}const G=L.substring(0,L.lastIndexOf("node_modules")),N={assert:{notStrictEqual:i.notStrictEqual,strictEqual:i.strictEqual},cliui:function(e){return function(e,t){return l=t,new o({width:(null==e?void 0:e.width)||("object"==typeof process&&process.stdout&&process.stdout.columns?process.stdout.columns:80),wrap:null==e?void 0:e.wrap})}(e,{stringWidth:e=>[...e].length,stripAnsi:d,wrap:h})},findUp:function(e,t){let n,i=(0,f.resolve)(".",e);for((0,r.statSync)(i).isDirectory()||(i=(0,f.dirname)(i));;){if(n=t(i,(0,r.readdirSync)(i)),n)return(0,f.resolve)(i,n);if(i=(0,f.dirname)(n=i),n===i)break}},getEnv:e=>process.env[e],inspect:p.inspect,getCallerFile:()=>{throw new k(T)},getProcessArgvBin:function(){return process.argv[_()]},mainFilename:G||process.cwd(),Parser:A,path:{basename:f.basename,dirname:f.dirname,extname:f.extname,relative:f.relative,resolve:f.resolve},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(e,t)=>process.emitWarning(e,t),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:void 0!==process.stdout.columns?process.stdout.columns:null},readFileSync:r.readFileSync,require:()=>{throw new k("require is not supported by ESM")},requireDirectory:()=>{throw new k(T)},stringWidth:e=>[...e].length,y18n:M({directory:(0,f.resolve)(L,"../../../locales"),updateFiles:!1})};function R(e,t,n,r){n.assert.notStrictEqual(e,t,r)}function D(e,t){t.assert.strictEqual(typeof e,"string")}function F(e){return Object.keys(e)}function B(e){return!!e&&!!e.then&&"function"==typeof e.then}function U(e){const t=e.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,r=t.shift();if(!r)throw new Error(`No command found in: ${e}`);const i={cmd:r.replace(n,""),demanded:[],optional:[]};return t.forEach(((e,r)=>{let s=!1;e=e.replace(/\s/g,""),/\.+[\]>]/.test(e)&&r===t.length-1&&(s=!0),/^\[/.test(e)?i.optional.push({cmd:e.replace(n,"").split("|"),variadic:s}):i.demanded.push({cmd:e.replace(n,"").split("|"),variadic:s})})),i}const W=["first","second","third","fourth","fifth","sixth"];function H(e,t,n){try{let r=0;const[i,s,o]="object"==typeof e?[{demanded:[],optional:[]},e,t]:[U(`cmd ${e}`),t,n],a=[].slice.call(s);for(;a.length&&void 0===a[a.length-1];)a.pop();const c=o||a.length;if(c<i.demanded.length)throw new k(`Not enough arguments provided. Expected ${i.demanded.length} but received ${a.length}.`);const l=i.demanded.length+i.optional.length;if(c>l)throw new k(`Too many arguments provided. Expected max ${l} but received ${c}.`);i.demanded.forEach((e=>{const t=z(a.shift());0===e.cmd.filter((e=>e===t||"*"===e)).length&&q(t,e.cmd,r),r+=1})),i.optional.forEach((e=>{if(0===a.length)return;const t=z(a.shift());0===e.cmd.filter((e=>e===t||"*"===e)).length&&q(t,e.cmd,r),r+=1}))}catch(e){console.warn(e.stack)}}function z(e){return Array.isArray(e)?"array":null===e?"null":typeof e}function q(e,t,n){throw new k(`Invalid ${W[n]||"manyith"} argument. Expected ${t.join(" or ")} but received ${e}.`)}class V{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,t,n=!0,r=!1){if(H("<array|function> [boolean] [boolean] [boolean]",[e,t,n],arguments.length),Array.isArray(e)){for(let r=0;r<e.length;r++){if("function"!=typeof e[r])throw Error("middleware must be a function");const i=e[r];i.applyBeforeValidation=t,i.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if("function"==typeof e){const i=e;i.applyBeforeValidation=t,i.global=n,i.mutates=r,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,t){const n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter((e=>{const r=[...n[t]||[],t];return!e.option||!r.includes(e.option)})),e.option=t,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){const e=this.frozens.pop();void 0!==e&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter((e=>e.global))}}function K(e,t,n,r){return n.reduce(((e,n)=>{if(n.applyBeforeValidation!==r)return e;if(n.mutates){if(n.applied)return e;n.applied=!0}if(B(e))return e.then((e=>Promise.all([e,n(e,t)]))).then((([e,t])=>Object.assign(e,t)));{const r=n(e,t);return B(r)?r.then((t=>Object.assign(e,t))):Object.assign(e,r)}}),e)}function Y(e,t,n=(e=>{throw e})){try{const n="function"==typeof e?e():e;return B(n)?n.then((e=>t(e))):t(n)}catch(e){return n(e)}}const X=/(^\*)|(^\$0)/;class J{constructor(e,t,n,r){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=r,this.usage=e,this.globalMiddleware=n,this.validation=t}addDirectory(e,t,n,r){"boolean"!=typeof(r=r||{}).recurse&&(r.recurse=!1),Array.isArray(r.extensions)||(r.extensions=["js"]);const i="function"==typeof r.visit?r.visit:e=>e;r.visit=(e,t,n)=>{const r=i(e,t,n);if(r){if(this.requireCache.has(t))return r;this.requireCache.add(t),this.addHandler(r)}return r},this.shim.requireDirectory({require:t,filename:n},e,r)}addHandler(e,t,n,r,i,s){let o=[];const a=function(e){return e?e.map((e=>(e.applyBeforeValidation=!1,e))):[]}(i);if(r=r||(()=>{}),Array.isArray(e))if(function(e){return e.every((e=>"string"==typeof e))}(e))[e,...o]=e;else for(const t of e)this.addHandler(t);else{if(function(e){return"object"==typeof e&&!Array.isArray(e)}(e)){let t=Array.isArray(e.command)||"string"==typeof e.command?e.command:this.moduleName(e);return e.aliases&&(t=[].concat(t).concat(e.aliases)),void this.addHandler(t,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated)}if(Q(n))return void this.addHandler([e].concat(o),t,n.builder,n.handler,n.middlewares,n.deprecated)}if("string"==typeof e){const i=U(e);o=o.map((e=>U(e).cmd));let c=!1;const l=[i.cmd].concat(o).filter((e=>!X.test(e)||(c=!0,!1)));0===l.length&&c&&l.push("$0"),c&&(i.cmd=l[0],o=l.slice(1),e=e.replace(X,i.cmd)),o.forEach((e=>{this.aliasMap[e]=i.cmd})),!1!==t&&this.usage.command(e,t,c,o,s),this.handlers[i.cmd]={original:e,description:t,handler:r,builder:n||{},middlewares:a,deprecated:s,demanded:i.demanded,optional:i.optional},c&&(this.defaultCommand=this.handlers[i.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,t,n,r,i,s){const o=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,a=t.getInternalMethods().getContext(),c=a.commands.slice(),l=!e;e&&(a.commands.push(e),a.fullCommands.push(o.original));const u=this.applyBuilderUpdateUsageAndParse(l,o,t,n.aliases,c,r,i,s);return B(u)?u.then((e=>this.applyMiddlewareAndGetResult(l,o,e.innerArgv,a,i,e.aliases,t))):this.applyMiddlewareAndGetResult(l,o,u.innerArgv,a,i,u.aliases,t)}applyBuilderUpdateUsageAndParse(e,t,n,r,i,s,o,a){const c=t.builder;let l=n;if(Z(c)){const u=c(n.getInternalMethods().reset(r),a);if(B(u))return u.then((r=>{var a;return l=(a=r)&&"function"==typeof a.getInternalMethods?r:n,this.parseAndUpdateUsage(e,t,l,i,s,o)}))}else(function(e){return"object"==typeof e})(c)&&(l=n.getInternalMethods().reset(r),Object.keys(t.builder).forEach((e=>{l.option(e,c[e])})));return this.parseAndUpdateUsage(e,t,l,i,s,o)}parseAndUpdateUsage(e,t,n,r,i,s){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(r,t),t.description);const o=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,i,s);return B(o)?o.then((e=>({aliases:n.parsed.aliases,innerArgv:e}))):{aliases:n.parsed.aliases,innerArgv:o}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&0===e.getInternalMethods().getUsageInstance().getUsage().length}usageFromParentCommandsCommandHandler(e,t){const n=X.test(t.original)?t.original.replace(X,"").trim():t.original,r=e.filter((e=>!X.test(e)));return r.push(n),`$0 ${r.join(" ")}`}handleValidationAndGetResult(e,t,n,r,i,s,o,a){if(!s.getInternalMethods().getHasOutput()){const t=s.getInternalMethods().runValidation(i,a,s.parsed.error,e);n=Y(n,(e=>(t(e),e)))}if(t.handler&&!s.getInternalMethods().getHasOutput()){s.getInternalMethods().setHasOutput();const r=!!s.getOptions().configuration["populate--"];s.getInternalMethods().postProcess(n,r,!1,!1),n=Y(n=K(n,s,o,!1),(e=>{const n=t.handler(e);return B(n)?n.then((()=>e)):e})),e||s.getInternalMethods().getUsageInstance().cacheHelpMessage(),B(n)&&!s.getInternalMethods().hasParseCallback()&&n.catch((e=>{try{s.getInternalMethods().getUsageInstance().fail(null,e)}catch(e){}}))}return e||(r.commands.pop(),r.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,t,n,r,i,s,o){let a={};if(i)return n;o.getInternalMethods().getHasOutput()||(a=this.populatePositionals(t,n,r,o));const c=this.globalMiddleware.getMiddleware().slice(0).concat(t.middlewares),l=K(n,o,c,!0);return B(l)?l.then((n=>this.handleValidationAndGetResult(e,t,n,r,s,o,c,a))):this.handleValidationAndGetResult(e,t,l,r,s,o,c,a)}populatePositionals(e,t,n,r){t._=t._.slice(n.commands.length);const i=e.demanded.slice(0),s=e.optional.slice(0),o={};for(this.validation.positionalCount(i.length,t._.length);i.length;){const e=i.shift();this.populatePositional(e,t,o)}for(;s.length;){const e=s.shift();this.populatePositional(e,t,o)}return t._=n.commands.concat(t._.map((e=>""+e))),this.postProcessPositionals(t,o,this.cmdToParseOptions(e.original),r),o}populatePositional(e,t,n){const r=e.cmd[0];e.variadic?n[r]=t._.splice(0).map(String):t._.length&&(n[r]=[String(t._.shift())])}cmdToParseOptions(e){const t={array:[],default:{},alias:{},demand:{}},n=U(e);return n.demanded.forEach((e=>{const[n,...r]=e.cmd;e.variadic&&(t.array.push(n),t.default[n]=[]),t.alias[n]=r,t.demand[n]=!0})),n.optional.forEach((e=>{const[n,...r]=e.cmd;e.variadic&&(t.array.push(n),t.default[n]=[]),t.alias[n]=r})),t}postProcessPositionals(e,t,n,r){const i=Object.assign({},r.getOptions());i.default=Object.assign(n.default,i.default);for(const e of Object.keys(n.alias))i.alias[e]=(i.alias[e]||[]).concat(n.alias[e]);i.array=i.array.concat(n.array),i.config={};const s=[];if(Object.keys(t).forEach((e=>{t[e].map((t=>{i.configuration["unknown-options-as-args"]&&(i.key[e]=!0),s.push(`--${e}`),s.push(t)}))})),!s.length)return;const o=Object.assign({},i.configuration,{"populate--":!1}),a=this.shim.Parser.detailed(s,Object.assign({},i,{configuration:o}));if(a.error)r.getInternalMethods().getUsageInstance().fail(a.error.message,a.error);else{const n=Object.keys(t);Object.keys(t).forEach((e=>{n.push(...a.aliases[e])})),Object.keys(a.argv).forEach((i=>{n.includes(i)&&(t[i]||(t[i]=a.argv[i]),!this.isInConfigs(r,i)&&!this.isDefaulted(r,i)&&Object.prototype.hasOwnProperty.call(e,i)&&Object.prototype.hasOwnProperty.call(a.argv,i)&&(Array.isArray(e[i])||Array.isArray(a.argv[i]))?e[i]=[].concat(e[i],a.argv[i]):e[i]=a.argv[i])}))}}isDefaulted(e,t){const{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,t)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(t))}isInConfigs(e,t){const{configObjects:n}=e.getOptions();return n.some((e=>Object.prototype.hasOwnProperty.call(e,t)))||n.some((e=>Object.prototype.hasOwnProperty.call(e,this.shim.Parser.camelCase(t))))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){const t=X.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(t,this.defaultCommand.description)}const t=this.defaultCommand.builder;if(Z(t))return t(e,!0);Q(t)||Object.keys(t).forEach((n=>{e.option(n,t[n])}))}moduleName(e){const t=function(e){if("undefined"==typeof require)return null;for(let t,n=0,r=Object.keys(require.cache);n<r.length;n++)if(t=require.cache[r[n]],t.exports===e)return t;return null}(e);if(!t)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(t.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:t,desc:n}){for(const r of[e,t,n]){if("string"==typeof r||!1===r)return r;R(r,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){const e=this.frozens.pop();R(e,void 0,this.shim),({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e)}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}}function Q(e){return"object"==typeof e&&!!e.builder&&"function"==typeof e.handler}function Z(e){return"function"==typeof e}function ee(e={},t=(()=>!0)){const n={};return F(e).forEach((r=>{t(r,e[r])&&(n[r]=e[r])})),n}function te(e){"undefined"!=typeof process&&[process.stdout,process.stderr].forEach((t=>{const n=t;n._handle&&n.isTTY&&"function"==typeof n._handle.setBlocking&&n._handle.setBlocking(e)}))}function ne(e){return"boolean"==typeof e}function re(e,t){const n=t.y18n.__,r={},i=[];r.failFn=function(e){i.push(e)};let s=null,o=null,a=!0;r.showHelpOnFail=function(t=!0,n){const[i,c]="string"==typeof t?[!0,t]:[t,n];return e.getInternalMethods().isGlobalContext()&&(o=c),s=c,a=i,r};let c=!1;r.fail=function(t,n){const l=e.getInternalMethods().getLoggerInstance();if(!i.length){if(e.getExitProcess()&&te(!0),!c){c=!0,a&&(e.showHelp("error"),l.error()),(t||n)&&l.error(t||n);const r=s||o;r&&((t||n)&&l.error(""),l.error(r))}if(n=n||new k(t),e.getExitProcess())return e.exit(1);if(e.getInternalMethods().hasParseCallback())return e.exit(1,n);throw n}for(let e=i.length-1;e>=0;--e){const s=i[e];if(ne(s)){if(n)throw n;if(t)throw Error(t)}else s(t,n,r)}};let l=[],u=!1;r.usage=(e,t)=>null===e?(u=!0,l=[],r):(u=!1,l.push([e,t||""]),r),r.getUsage=()=>l,r.getUsageDisabled=()=>u,r.getPositionalGroupName=()=>n("Positionals:");let d=[];r.example=(e,t)=>{d.push([e,t||""])};let h=[];r.command=function(e,t,n,r,i=!1){n&&(h=h.map((e=>(e[2]=!1,e)))),h.push([e,t||"",n,r,i])},r.getCommands=()=>h;let f={};r.describe=function(e,t){Array.isArray(e)?e.forEach((e=>{r.describe(e,t)})):"object"==typeof e?Object.keys(e).forEach((t=>{r.describe(t,e[t])})):f[e]=t},r.getDescriptions=()=>f;let p=[];r.epilog=e=>{p.push(e)};let m,g=!1;function y(){return g||(m=function(){const e=80;return t.process.stdColumns?Math.min(e,t.process.stdColumns):e}(),g=!0),m}r.wrap=e=>{g=!0,m=e};const b="__yargsString__:";function v(e,n,r){let i=0;return Array.isArray(e)||(e=Object.values(e).map((e=>[e]))),e.forEach((e=>{i=Math.max(t.stringWidth(r?`${r} ${oe(e[0])}`:oe(e[0]))+se(e[0]),i)})),n&&(i=Math.min(i,parseInt((.5*n).toString(),10))),i}let w;function x(t){return e.getOptions().hiddenOptions.indexOf(t)<0||e.parsed.argv[e.getOptions().showHiddenOpt]}function O(e,t){let r=`[${n("default:")} `;if(void 0===e&&!t)return null;if(t)r+=t;else switch(typeof e){case"string":r+=`"${e}"`;break;case"object":r+=JSON.stringify(e);break;default:r+=e}return`${r}]`}r.deferY18nLookup=e=>b+e,r.help=function(){if(w)return w;!function(){const t=e.getDemandedOptions(),n=e.getOptions();(Object.keys(n.alias)||[]).forEach((i=>{n.alias[i].forEach((s=>{f[s]&&r.describe(i,f[s]),s in t&&e.demandOption(i,t[s]),n.boolean.includes(s)&&e.boolean(i),n.count.includes(s)&&e.count(i),n.string.includes(s)&&e.string(i),n.normalize.includes(s)&&e.normalize(i),n.array.includes(s)&&e.array(i),n.number.includes(s)&&e.number(i)}))}))}();const i=e.customScriptName?e.$0:t.path.basename(e.$0),s=e.getDemandedOptions(),o=e.getDemandedCommands(),a=e.getDeprecatedOptions(),c=e.getGroups(),m=e.getOptions();let g=[];g=g.concat(Object.keys(f)),g=g.concat(Object.keys(s)),g=g.concat(Object.keys(o)),g=g.concat(Object.keys(m.default)),g=g.filter(x),g=Object.keys(g.reduce(((e,t)=>("_"!==t&&(e[t]=!0),e)),{}));const S=y(),E=t.cliui({width:S,wrap:!!S});if(!u)if(l.length)l.forEach((e=>{E.div({text:`${e[0].replace(/\$0/g,i)}`}),e[1]&&E.div({text:`${e[1]}`,padding:[1,0,0,0]})})),E.div();else if(h.length){let e=null;e=o._?`${i} <${n("command")}>\n`:`${i} [${n("command")}]\n`,E.div(`${e}`)}if(h.length>1||1===h.length&&!h[0][2]){E.div(n("Commands:"));const t=e.getInternalMethods().getContext(),r=t.commands.length?`${t.commands.join(" ")} `:"";!0===e.getInternalMethods().getParserConfiguration()["sort-commands"]&&(h=h.sort(((e,t)=>e[0].localeCompare(t[0]))));const s=i?`${i} `:"";h.forEach((e=>{const t=`${s}${r}${e[0].replace(/^\$0 ?/,"")}`;E.span({text:t,padding:[0,2,0,2],width:v(h,S,`${i}${r}`)+4},{text:e[1]});const o=[];e[2]&&o.push(`[${n("default")}]`),e[3]&&e[3].length&&o.push(`[${n("aliases:")} ${e[3].join(", ")}]`),e[4]&&("string"==typeof e[4]?o.push(`[${n("deprecated: %s",e[4])}]`):o.push(`[${n("deprecated")}]`)),o.length?E.div({text:o.join(" "),padding:[0,0,0,2],align:"right"}):E.div()})),E.div()}const j=(Object.keys(m.alias)||[]).concat(Object.keys(e.parsed.newAliases)||[]);g=g.filter((t=>!e.parsed.newAliases[t]&&j.every((e=>-1===(m.alias[e]||[]).indexOf(t)))));const C=n("Options:");c[C]||(c[C]=[]),function(e,t,n,r){let i=[],s=null;Object.keys(n).forEach((e=>{i=i.concat(n[e])})),e.forEach((e=>{s=[e].concat(t[e]),s.some((e=>-1!==i.indexOf(e)))||n[r].push(e)}))}(g,m.alias,c,C);const A=e=>/^--/.test(oe(e)),_=Object.keys(c).filter((e=>c[e].length>0)).map((e=>({groupName:e,normalizedKeys:c[e].filter(x).map((e=>{if(j.includes(e))return e;for(let t,n=0;void 0!==(t=j[n]);n++)if((m.alias[t]||[]).includes(e))return t;return e}))}))).filter((({normalizedKeys:e})=>e.length>0)).map((({groupName:e,normalizedKeys:t})=>{const n=t.reduce(((t,n)=>(t[n]=[n].concat(m.alias[n]||[]).map((t=>e===r.getPositionalGroupName()?t:(/^[0-9]$/.test(t)?m.boolean.includes(n)?"-":"--":t.length>1?"--":"-")+t)).sort(((e,t)=>A(e)===A(t)?0:A(e)?1:-1)).join(", "),t)),{});return{groupName:e,normalizedKeys:t,switches:n}}));if(_.filter((({groupName:e})=>e!==r.getPositionalGroupName())).some((({normalizedKeys:e,switches:t})=>!e.every((e=>A(t[e])))))&&_.filter((({groupName:e})=>e!==r.getPositionalGroupName())).forEach((({normalizedKeys:e,switches:t})=>{e.forEach((e=>{var n,r;A(t[e])&&(t[e]=(n=t[e],r="-x, ".length,ie(n)?{text:n.text,indentation:n.indentation+r}:{text:n,indentation:r}))}))})),_.forEach((({groupName:e,normalizedKeys:t,switches:i})=>{E.div(e),t.forEach((e=>{const t=i[e];let o=f[e]||"",c=null;o.includes(b)&&(o=n(o.substring(b.length))),m.boolean.includes(e)&&(c=`[${n("boolean")}]`),m.count.includes(e)&&(c=`[${n("count")}]`),m.string.includes(e)&&(c=`[${n("string")}]`),m.normalize.includes(e)&&(c=`[${n("string")}]`),m.array.includes(e)&&(c=`[${n("array")}]`),m.number.includes(e)&&(c=`[${n("number")}]`);const l=[e in a?(u=a[e],"string"==typeof u?`[${n("deprecated: %s",u)}]`:`[${n("deprecated")}]`):null,c,e in s?`[${n("required")}]`:null,m.choices&&m.choices[e]?`[${n("choices:")} ${r.stringifiedValues(m.choices[e])}]`:null,O(m.default[e],m.defaultDescription[e])].filter(Boolean).join(" ");var u;E.span({text:oe(t),padding:[0,2,0,2+se(t)],width:v(i,S)+4},o),l?E.div({text:l,padding:[0,0,0,2],align:"right"}):E.div()})),E.div()})),d.length&&(E.div(n("Examples:")),d.forEach((e=>{e[0]=e[0].replace(/\$0/g,i)})),d.forEach((e=>{""===e[1]?E.div({text:e[0],padding:[0,2,0,2]}):E.div({text:e[0],padding:[0,2,0,2],width:v(d,S)+4},{text:e[1]})})),E.div()),p.length>0){const e=p.map((e=>e.replace(/\$0/g,i))).join("\n");E.div(`${e}\n`)}return E.toString().replace(/\s*$/,"")},r.cacheHelpMessage=function(){w=this.help()},r.clearCachedHelpMessage=function(){w=void 0},r.hasCachedHelpMessage=function(){return!!w},r.showHelp=t=>{const n=e.getInternalMethods().getLoggerInstance();t||(t="error");("function"==typeof t?t:n[t])(r.help())},r.functionDescription=e=>["(",e.name?t.Parser.decamelize(e.name,"-"):n("generated-value"),")"].join(""),r.stringifiedValues=function(e,t){let n="";const r=t||", ",i=[].concat(e);return e&&i.length?(i.forEach((e=>{n.length&&(n+=r),n+=JSON.stringify(e)})),n):n};let S=null;r.version=e=>{S=e},r.showVersion=t=>{const n=e.getInternalMethods().getLoggerInstance();t||(t="error");("function"==typeof t?t:n[t])(S)},r.reset=function(e){return s=null,c=!1,l=[],u=!1,p=[],d=[],h=[],f=ee(f,(t=>!e[t])),r};const E=[];return r.freeze=function(){E.push({failMessage:s,failureOutput:c,usages:l,usageDisabled:u,epilogs:p,examples:d,commands:h,descriptions:f})},r.unfreeze=function(e=!1){const t=E.pop();t&&(e?(f={...t.descriptions,...f},h=[...t.commands,...h],l=[...t.usages,...l],d=[...t.examples,...d],p=[...t.epilogs,...p]):({failMessage:s,failureOutput:c,usages:l,usageDisabled:u,epilogs:p,examples:d,commands:h,descriptions:f}=t))},r}function ie(e){return"object"==typeof e}function se(e){return ie(e)?e.indentation:0}function oe(e){return ie(e)?e.text:e}class ae{constructor(e,t,n,r){var i,s,o;this.yargs=e,this.usage=t,this.command=n,this.shim=r,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=null!==(o=(null===(i=this.shim.getEnv("SHELL"))||void 0===i?void 0:i.includes("zsh"))||(null===(s=this.shim.getEnv("ZSH_NAME"))||void 0===s?void 0:s.includes("zsh")))&&void 0!==o&&o}defaultCompletion(e,t,n,r){const i=this.command.getCommandHandlers();for(let t=0,n=e.length;t<n;++t)if(i[e[t]]&&i[e[t]].builder){const n=i[e[t]].builder;if(Z(n)){this.indexAfterLastReset=t+1;const e=this.yargs.getInternalMethods().reset();return n(e,!0),e.argv}}const s=[];this.commandCompletions(s,e,n),this.optionCompletions(s,e,t,n),this.choicesFromOptionsCompletions(s,e,t,n),this.choicesFromPositionalsCompletions(s,e,t,n),r(null,s)}commandCompletions(e,t,n){const r=this.yargs.getInternalMethods().getContext().commands;n.match(/^-/)||r[r.length-1]===n||this.previousArgHasChoices(t)||this.usage.getCommands().forEach((n=>{const r=U(n[0]).cmd;if(-1===t.indexOf(r))if(this.zshShell){const t=n[1]||"";e.push(r.replace(/:/g,"\\:")+":"+t)}else e.push(r)}))}optionCompletions(e,t,n,r){if((r.match(/^-/)||""===r&&0===e.length)&&!this.previousArgHasChoices(t)){const n=this.yargs.getOptions(),i=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(n.key).forEach((s=>{const o=!!n.configuration["boolean-negation"]&&n.boolean.includes(s);i.includes(s)||n.hiddenOptions.includes(s)||this.argsContainKey(t,s,o)||(this.completeOptionKey(s,e,r),o&&n.default[s]&&this.completeOptionKey(`no-${s}`,e,r))}))}}choicesFromOptionsCompletions(e,t,n,r){if(this.previousArgHasChoices(t)){const n=this.getPreviousArgChoices(t);n&&n.length>0&&e.push(...n.map((e=>e.replace(/:/g,"\\:"))))}}choicesFromPositionalsCompletions(e,t,n,r){if(""===r&&e.length>0&&this.previousArgHasChoices(t))return;const i=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],s=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),o=i[n._.length-s-1];if(!o)return;const a=this.yargs.getOptions().choices[o]||[];for(const t of a)t.startsWith(r)&&e.push(t.replace(/:/g,"\\:"))}getPreviousArgChoices(e){if(e.length<1)return;let t=e[e.length-1],n="";if(!t.startsWith("-")&&e.length>1&&(n=t,t=e[e.length-2]),!t.startsWith("-"))return;const r=t.replace(/^-+/,""),i=this.yargs.getOptions(),s=[r,...this.yargs.getAliases()[r]||[]];let o;for(const e of s)if(Object.prototype.hasOwnProperty.call(i.key,e)&&Array.isArray(i.choices[e])){o=i.choices[e];break}return o?o.filter((e=>!n||e.startsWith(n))):void 0}previousArgHasChoices(e){const t=this.getPreviousArgChoices(e);return void 0!==t&&t.length>0}argsContainKey(e,t,n){const r=t=>-1!==e.indexOf((/^[^0-9]$/.test(t)?"-":"--")+t);if(r(t))return!0;if(n&&r(`no-${t}`))return!0;if(this.aliases)for(const e of this.aliases[t])if(r(e))return!0;return!1}completeOptionKey(e,t,n){const r=this.usage.getDescriptions(),i=!/^--/.test(n)&&(e=>/^[^0-9]$/.test(e))(e)?"-":"--";if(this.zshShell){const n=r[e]||"";t.push(i+`${e.replace(/:/g,"\\:")}:${n.replace("__yargsString__:","")}`)}else t.push(i+e)}customCompletion(e,t,n,r){if(R(this.customCompletionFunction,null,this.shim),this.customCompletionFunction.length<3){const e=this.customCompletionFunction(n,t);return B(e)?e.then((e=>{this.shim.process.nextTick((()=>{r(null,e)}))})).catch((e=>{this.shim.process.nextTick((()=>{r(e,void 0)}))})):r(null,e)}return function(e){return e.length>3}(this.customCompletionFunction)?this.customCompletionFunction(n,t,((i=r)=>this.defaultCompletion(e,t,n,i)),(e=>{r(null,e)})):this.customCompletionFunction(n,t,(e=>{r(null,e)}))}getCompletion(e,t){const n=e.length?e[e.length-1]:"",r=this.yargs.parse(e,!0),i=this.customCompletionFunction?r=>this.customCompletion(e,r,n,t):r=>this.defaultCompletion(e,r,n,t);return B(r)?r.then(i):i(r)}generateCompletionScript(e,t){let n=this.zshShell?'#compdef {{app_name}}\n###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc\n# or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local reply\n local si=$IFS\n IFS=$\'\n\' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "${words[@]}"))\n IFS=$si\n _describe \'values\' reply\n}\ncompdef _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n':'###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc\n# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local cur_word args type_list\n\n cur_word="${COMP_WORDS[COMP_CWORD]}"\n args=("${COMP_WORDS[@]}")\n\n # ask yargs to generate completions.\n type_list=$({{app_path}} --get-yargs-completions "${args[@]}")\n\n COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) )\n\n # if no match was found, fall back to filename completion\n if [ ${#COMPREPLY[@]} -eq 0 ]; then\n COMPREPLY=()\n fi\n\n return 0\n}\ncomplete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n';const r=this.shim.path.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),n=n.replace(/{{app_name}}/g,r),n=n.replace(/{{completion_command}}/g,t),n.replace(/{{app_path}}/g,e)}registerFunction(e){this.customCompletionFunction=e}setParsed(e){this.aliases=e.aliases}}function ce(e,t){if(0===e.length)return t.length;if(0===t.length)return e.length;const n=[];let r,i;for(r=0;r<=t.length;r++)n[r]=[r];for(i=0;i<=e.length;i++)n[0][i]=i;for(r=1;r<=t.length;r++)for(i=1;i<=e.length;i++)t.charAt(r-1)===e.charAt(i-1)?n[r][i]=n[r-1][i-1]:r>1&&i>1&&t.charAt(r-2)===e.charAt(i-1)&&t.charAt(r-1)===e.charAt(i-2)?n[r][i]=n[r-2][i-2]+1:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[t.length][e.length]}const le=["$0","--","_"];let ue,de=[];function he(e,t,n,r){ue=r;let i={};if(Object.prototype.hasOwnProperty.call(e,"extends")){if("string"!=typeof e.extends)return i;const r=/\.json|\..*rc$/.test(e.extends);let s=null;if(r)s=function(e,t){return ue.path.resolve(e,t)}(t,e.extends);else try{s=require.resolve(e.extends)}catch(t){return e}!function(e){if(de.indexOf(e)>-1)throw new k(`Circular extended configurations: '${e}'.`)}(s),de.push(s),i=r?JSON.parse(ue.readFileSync(s,"utf8")):require(e.extends),delete e.extends,i=he(i,ue.path.dirname(s),n,ue)}return de=[],n?fe(i,e):Object.assign({},i,e)}function fe(e,t){const n={};function r(e){return e&&"object"==typeof e&&!Array.isArray(e)}Object.assign(n,e);for(const i of Object.keys(t))r(t[i])&&r(n[i])?n[i]=fe(e[i],t[i]):n[i]=t[i];return n}var pe,me,ge,ye,be,ve,we,xe,Oe,Se,Ee,je,Ce,Ae,_e,ke,Pe,Ie,$e,Me,Te,Le,Ge,Ne,Re,De,Fe,Be,Ue,We,He,ze,qe,Ve,Ke=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},Ye=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};const Xe=Symbol("copyDoubleDash"),Je=Symbol("copyDoubleDash"),Qe=Symbol("deleteFromParserHintObject"),Ze=Symbol("emitWarning"),et=Symbol("freeze"),tt=Symbol("getDollarZero"),nt=Symbol("getParserConfiguration"),rt=Symbol("guessLocale"),it=Symbol("guessVersion"),st=Symbol("parsePositionalNumbers"),ot=Symbol("pkgUp"),at=Symbol("populateParserHintArray"),ct=Symbol("populateParserHintSingleValueDictionary"),lt=Symbol("populateParserHintArrayDictionary"),ut=Symbol("populateParserHintDictionary"),dt=Symbol("sanitizeKey"),ht=Symbol("setKey"),ft=Symbol("unfreeze"),pt=Symbol("validateAsync"),mt=Symbol("getCommandInstance"),gt=Symbol("getContext"),yt=Symbol("getHasOutput"),bt=Symbol("getLoggerInstance"),vt=Symbol("getParseContext"),wt=Symbol("getUsageInstance"),xt=Symbol("getValidationInstance"),Ot=Symbol("hasParseCallback"),St=Symbol("isGlobalContext"),Et=Symbol("postProcess"),jt=Symbol("rebase"),Ct=Symbol("reset"),At=Symbol("runYargsParserAndExecuteCommands"),_t=Symbol("runValidation"),kt=Symbol("setHasOutput"),Pt=Symbol("kTrackManuallySetKeys");class It{constructor(e=[],t,n,r){this.customScriptName=!1,this.parsed=!1,pe.set(this,void 0),me.set(this,void 0),ge.set(this,{commands:[],fullCommands:[]}),ye.set(this,null),be.set(this,null),ve.set(this,"show-hidden"),we.set(this,null),xe.set(this,!0),Oe.set(this,{}),Se.set(this,!0),Ee.set(this,[]),je.set(this,void 0),Ce.set(this,{}),Ae.set(this,!1),_e.set(this,null),ke.set(this,!0),Pe.set(this,void 0),Ie.set(this,""),$e.set(this,void 0),Me.set(this,void 0),Te.set(this,{}),Le.set(this,null),Ge.set(this,null),Ne.set(this,{}),Re.set(this,{}),De.set(this,void 0),Fe.set(this,!1),Be.set(this,void 0),Ue.set(this,!1),We.set(this,!1),He.set(this,!1),ze.set(this,void 0),qe.set(this,null),Ve.set(this,void 0),Ke(this,Be,r,"f"),Ke(this,De,e,"f"),Ke(this,me,t,"f"),Ke(this,Me,n,"f"),Ke(this,je,new V(this),"f"),this.$0=this[tt](),this[Ct](),Ke(this,pe,Ye(this,pe,"f"),"f"),Ke(this,ze,Ye(this,ze,"f"),"f"),Ke(this,Ve,Ye(this,Ve,"f"),"f"),Ke(this,$e,Ye(this,$e,"f"),"f"),Ye(this,$e,"f").showHiddenOpt=Ye(this,ve,"f"),Ke(this,Pe,this[Je](),"f")}addHelpOpt(e,t){return H("[string|boolean] [string]",[e,t],arguments.length),Ye(this,_e,"f")&&(this[Qe](Ye(this,_e,"f")),Ke(this,_e,null,"f")),!1===e&&void 0===t||(Ke(this,_e,"string"==typeof e?e:"help","f"),this.boolean(Ye(this,_e,"f")),this.describe(Ye(this,_e,"f"),t||Ye(this,ze,"f").deferY18nLookup("Show help"))),this}help(e,t){return this.addHelpOpt(e,t)}addShowHiddenOpt(e,t){if(H("[string|boolean] [string]",[e,t],arguments.length),!1===e&&void 0===t)return this;const n="string"==typeof e?e:Ye(this,ve,"f");return this.boolean(n),this.describe(n,t||Ye(this,ze,"f").deferY18nLookup("Show hidden options")),Ye(this,$e,"f").showHiddenOpt=n,this}showHidden(e,t){return this.addShowHiddenOpt(e,t)}alias(e,t){return H("<object|string|array> [string|array]",[e,t],arguments.length),this[lt](this.alias.bind(this),"alias",e,t),this}array(e){return H("<array|string>",[e],arguments.length),this[at]("array",e),this[Pt](e),this}boolean(e){return H("<array|string>",[e],arguments.length),this[at]("boolean",e),this[Pt](e),this}check(e,t){return H("<function> [boolean]",[e,t],arguments.length),this.middleware(((t,n)=>Y((()=>e(t,n.getOptions())),(n=>(n?("string"==typeof n||n instanceof Error)&&Ye(this,ze,"f").fail(n.toString(),n):Ye(this,ze,"f").fail(Ye(this,Be,"f").y18n.__("Argument check failed: %s",e.toString())),t)),(e=>(Ye(this,ze,"f").fail(e.message?e.message:e.toString(),e),t)))),!1,t),this}choices(e,t){return H("<object|string|array> [string|array]",[e,t],arguments.length),this[lt](this.choices.bind(this),"choices",e,t),this}coerce(e,t){if(H("<object|string|array> [function]",[e,t],arguments.length),Array.isArray(e)){if(!t)throw new k("coerce callback must be provided");for(const n of e)this.coerce(n,t);return this}if("object"==typeof e){for(const t of Object.keys(e))this.coerce(t,e[t]);return this}if(!t)throw new k("coerce callback must be provided");return Ye(this,$e,"f").key[e]=!0,Ye(this,je,"f").addCoerceMiddleware(((n,r)=>{let i;return Object.prototype.hasOwnProperty.call(n,e)?Y((()=>(i=r.getAliases(),t(n[e]))),(t=>{n[e]=t;const s=r.getInternalMethods().getParserConfiguration()["strip-aliased"];if(i[e]&&!0!==s)for(const r of i[e])n[r]=t;return n}),(e=>{throw new k(e.message)})):n}),e),this}conflicts(e,t){return H("<string|object> [string|array]",[e,t],arguments.length),Ye(this,Ve,"f").conflicts(e,t),this}config(e="config",t,n){return H("[object|string] [string|function] [function]",[e,t,n],arguments.length),"object"!=typeof e||Array.isArray(e)?("function"==typeof t&&(n=t,t=void 0),this.describe(e,t||Ye(this,ze,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach((e=>{Ye(this,$e,"f").config[e]=n||!0})),this):(e=he(e,Ye(this,me,"f"),this[nt]()["deep-merge-config"]||!1,Ye(this,Be,"f")),Ye(this,$e,"f").configObjects=(Ye(this,$e,"f").configObjects||[]).concat(e),this)}completion(e,t,n){return H("[string] [string|boolean|function] [function]",[e,t,n],arguments.length),"function"==typeof t&&(n=t,t=void 0),Ke(this,be,e||Ye(this,be,"f")||"completion","f"),t||!1===t||(t="generate completion script"),this.command(Ye(this,be,"f"),t),n&&Ye(this,ye,"f").registerFunction(n),this}command(e,t,n,r,i,s){return H("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,t,n,r,i,s],arguments.length),Ye(this,pe,"f").addHandler(e,t,n,r,i,s),this}commands(e,t,n,r,i,s){return this.command(e,t,n,r,i,s)}commandDir(e,t){H("<string> [object]",[e,t],arguments.length);const n=Ye(this,Me,"f")||Ye(this,Be,"f").require;return Ye(this,pe,"f").addDirectory(e,n,Ye(this,Be,"f").getCallerFile(),t),this}count(e){return H("<array|string>",[e],arguments.length),this[at]("count",e),this[Pt](e),this}default(e,t,n){return H("<object|string|array> [*] [string]",[e,t,n],arguments.length),n&&(D(e,Ye(this,Be,"f")),Ye(this,$e,"f").defaultDescription[e]=n),"function"==typeof t&&(D(e,Ye(this,Be,"f")),Ye(this,$e,"f").defaultDescription[e]||(Ye(this,$e,"f").defaultDescription[e]=Ye(this,ze,"f").functionDescription(t)),t=t.call()),this[ct](this.default.bind(this),"default",e,t),this}defaults(e,t,n){return this.default(e,t,n)}demandCommand(e=1,t,n,r){return H("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,t,n,r],arguments.length),"number"!=typeof t&&(n=t,t=1/0),this.global("_",!1),Ye(this,$e,"f").demandedCommands._={min:e,max:t,minMsg:n,maxMsg:r},this}demand(e,t,n){return Array.isArray(t)?(t.forEach((e=>{R(n,!0,Ye(this,Be,"f")),this.demandOption(e,n)})),t=1/0):"number"!=typeof t&&(n=t,t=1/0),"number"==typeof e?(R(n,!0,Ye(this,Be,"f")),this.demandCommand(e,t,n,n)):Array.isArray(e)?e.forEach((e=>{R(n,!0,Ye(this,Be,"f")),this.demandOption(e,n)})):"string"==typeof n?this.demandOption(e,n):!0!==n&&void 0!==n||this.demandOption(e),this}demandOption(e,t){return H("<object|string|array> [string]",[e,t],arguments.length),this[ct](this.demandOption.bind(this),"demandedOptions",e,t),this}deprecateOption(e,t){return H("<string> [string|boolean]",[e,t],arguments.length),Ye(this,$e,"f").deprecatedOptions[e]=t,this}describe(e,t){return H("<object|string|array> [string]",[e,t],arguments.length),this[ht](e,!0),Ye(this,ze,"f").describe(e,t),this}detectLocale(e){return H("<boolean>",[e],arguments.length),Ke(this,xe,e,"f"),this}env(e){return H("[string|boolean]",[e],arguments.length),!1===e?delete Ye(this,$e,"f").envPrefix:Ye(this,$e,"f").envPrefix=e||"",this}epilogue(e){return H("<string>",[e],arguments.length),Ye(this,ze,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,t){return H("<string|array> [string]",[e,t],arguments.length),Array.isArray(e)?e.forEach((e=>this.example(...e))):Ye(this,ze,"f").example(e,t),this}exit(e,t){Ke(this,Ae,!0,"f"),Ke(this,we,t,"f"),Ye(this,Se,"f")&&Ye(this,Be,"f").process.exit(e)}exitProcess(e=!0){return H("[boolean]",[e],arguments.length),Ke(this,Se,e,"f"),this}fail(e){if(H("<function|boolean>",[e],arguments.length),"boolean"==typeof e&&!1!==e)throw new k("Invalid first argument. Expected function or boolean 'false'");return Ye(this,ze,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,t){return H("<array> [function]",[e,t],arguments.length),t?Ye(this,ye,"f").getCompletion(e,t):new Promise(((t,n)=>{Ye(this,ye,"f").getCompletion(e,((e,r)=>{e?n(e):t(r)}))}))}getDemandedOptions(){return H([],0),Ye(this,$e,"f").demandedOptions}getDemandedCommands(){return H([],0),Ye(this,$e,"f").demandedCommands}getDeprecatedOptions(){return H([],0),Ye(this,$e,"f").deprecatedOptions}getDetectLocale(){return Ye(this,xe,"f")}getExitProcess(){return Ye(this,Se,"f")}getGroups(){return Object.assign({},Ye(this,Ce,"f"),Ye(this,Re,"f"))}getHelp(){if(Ke(this,Ae,!0,"f"),!Ye(this,ze,"f").hasCachedHelpMessage()){if(!this.parsed){const e=this[At](Ye(this,De,"f"),void 0,void 0,0,!0);if(B(e))return e.then((()=>Ye(this,ze,"f").help()))}const e=Ye(this,pe,"f").runDefaultBuilderOn(this);if(B(e))return e.then((()=>Ye(this,ze,"f").help()))}return Promise.resolve(Ye(this,ze,"f").help())}getOptions(){return Ye(this,$e,"f")}getStrict(){return Ye(this,Ue,"f")}getStrictCommands(){return Ye(this,We,"f")}getStrictOptions(){return Ye(this,He,"f")}global(e,t){return H("<string|array> [boolean]",[e,t],arguments.length),e=[].concat(e),!1!==t?Ye(this,$e,"f").local=Ye(this,$e,"f").local.filter((t=>-1===e.indexOf(t))):e.forEach((e=>{Ye(this,$e,"f").local.includes(e)||Ye(this,$e,"f").local.push(e)})),this}group(e,t){H("<string|array> <string>",[e,t],arguments.length);const n=Ye(this,Re,"f")[t]||Ye(this,Ce,"f")[t];Ye(this,Re,"f")[t]&&delete Ye(this,Re,"f")[t];const r={};return Ye(this,Ce,"f")[t]=(n||[]).concat(e).filter((e=>!r[e]&&(r[e]=!0))),this}hide(e){return H("<string>",[e],arguments.length),Ye(this,$e,"f").hiddenOptions.push(e),this}implies(e,t){return H("<string|object> [number|string|array]",[e,t],arguments.length),Ye(this,Ve,"f").implies(e,t),this}locale(e){return H("[string]",[e],arguments.length),void 0===e?(this[rt](),Ye(this,Be,"f").y18n.getLocale()):(Ke(this,xe,!1,"f"),Ye(this,Be,"f").y18n.setLocale(e),this)}middleware(e,t,n){return Ye(this,je,"f").addMiddleware(e,!!t,n)}nargs(e,t){return H("<string|object|array> [number]",[e,t],arguments.length),this[ct](this.nargs.bind(this),"narg",e,t),this}normalize(e){return H("<array|string>",[e],arguments.length),this[at]("normalize",e),this}number(e){return H("<array|string>",[e],arguments.length),this[at]("number",e),this[Pt](e),this}option(e,t){if(H("<string|object> [object]",[e,t],arguments.length),"object"==typeof e)Object.keys(e).forEach((t=>{this.options(t,e[t])}));else{"object"!=typeof t&&(t={}),this[Pt](e),!Ye(this,qe,"f")||"version"!==e&&"version"!==(null==t?void 0:t.alias)||this[Ze](['"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("\n"),void 0,"versionWarning"),Ye(this,$e,"f").key[e]=!0,t.alias&&this.alias(e,t.alias);const n=t.deprecate||t.deprecated;n&&this.deprecateOption(e,n);const r=t.demand||t.required||t.require;r&&this.demand(e,r),t.demandOption&&this.demandOption(e,"string"==typeof t.demandOption?t.demandOption:void 0),t.conflicts&&this.conflicts(e,t.conflicts),"default"in t&&this.default(e,t.default),void 0!==t.implies&&this.implies(e,t.implies),void 0!==t.nargs&&this.nargs(e,t.nargs),t.config&&this.config(e,t.configParser),t.normalize&&this.normalize(e),t.choices&&this.choices(e,t.choices),t.coerce&&this.coerce(e,t.coerce),t.group&&this.group(e,t.group),(t.boolean||"boolean"===t.type)&&(this.boolean(e),t.alias&&this.boolean(t.alias)),(t.array||"array"===t.type)&&(this.array(e),t.alias&&this.array(t.alias)),(t.number||"number"===t.type)&&(this.number(e),t.alias&&this.number(t.alias)),(t.string||"string"===t.type)&&(this.string(e),t.alias&&this.string(t.alias)),(t.count||"count"===t.type)&&this.count(e),"boolean"==typeof t.global&&this.global(e,t.global),t.defaultDescription&&(Ye(this,$e,"f").defaultDescription[e]=t.defaultDescription),t.skipValidation&&this.skipValidation(e);const i=t.describe||t.description||t.desc;this.describe(e,i),t.hidden&&this.hide(e),t.requiresArg&&this.requiresArg(e)}return this}options(e,t){return this.option(e,t)}parse(e,t,n){H("[string|array] [function|boolean|object] [function]",[e,t,n],arguments.length),this[et](),void 0===e&&(e=Ye(this,De,"f")),"object"==typeof t&&(Ke(this,Ge,t,"f"),t=n),"function"==typeof t&&(Ke(this,Le,t,"f"),t=!1),t||Ke(this,De,e,"f"),Ye(this,Le,"f")&&Ke(this,Se,!1,"f");const r=this[At](e,!!t),i=this.parsed;return Ye(this,ye,"f").setParsed(this.parsed),B(r)?r.then((e=>(Ye(this,Le,"f")&&Ye(this,Le,"f").call(this,Ye(this,we,"f"),e,Ye(this,Ie,"f")),e))).catch((e=>{throw Ye(this,Le,"f")&&Ye(this,Le,"f")(e,this.parsed.argv,Ye(this,Ie,"f")),e})).finally((()=>{this[ft](),this.parsed=i})):(Ye(this,Le,"f")&&Ye(this,Le,"f").call(this,Ye(this,we,"f"),r,Ye(this,Ie,"f")),this[ft](),this.parsed=i,r)}parseAsync(e,t,n){const r=this.parse(e,t,n);return B(r)?r:Promise.resolve(r)}parseSync(e,t,n){const r=this.parse(e,t,n);if(B(r))throw new k(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return r}parserConfiguration(e){return H("<object>",[e],arguments.length),Ke(this,Te,e,"f"),this}pkgConf(e,t){H("<string> [string]",[e,t],arguments.length);let n=null;const r=this[ot](t||Ye(this,me,"f"));return r[e]&&"object"==typeof r[e]&&(n=he(r[e],t||Ye(this,me,"f"),this[nt]()["deep-merge-config"]||!1,Ye(this,Be,"f")),Ye(this,$e,"f").configObjects=(Ye(this,$e,"f").configObjects||[]).concat(n)),this}positional(e,t){H("<string> <object>",[e,t],arguments.length);const n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];t=ee(t,((e,t)=>!("type"===e&&!["string","number","boolean"].includes(t))&&n.includes(e)));const r=Ye(this,ge,"f").fullCommands[Ye(this,ge,"f").fullCommands.length-1],i=r?Ye(this,pe,"f").cmdToParseOptions(r):{array:[],alias:{},default:{},demand:{}};return F(i).forEach((n=>{const r=i[n];Array.isArray(r)?-1!==r.indexOf(e)&&(t[n]=!0):r[e]&&!(n in t)&&(t[n]=r[e])})),this.group(e,Ye(this,ze,"f").getPositionalGroupName()),this.option(e,t)}recommendCommands(e=!0){return H("[boolean]",[e],arguments.length),Ke(this,Fe,e,"f"),this}required(e,t,n){return this.demand(e,t,n)}require(e,t,n){return this.demand(e,t,n)}requiresArg(e){return H("<array|string|object> [number]",[e],arguments.length),"string"==typeof e&&Ye(this,$e,"f").narg[e]||this[ct](this.requiresArg.bind(this),"narg",e,NaN),this}showCompletionScript(e,t){return H("[string] [string]",[e,t],arguments.length),e=e||this.$0,Ye(this,Pe,"f").log(Ye(this,ye,"f").generateCompletionScript(e,t||Ye(this,be,"f")||"completion")),this}showHelp(e){if(H("[string|function]",[e],arguments.length),Ke(this,Ae,!0,"f"),!Ye(this,ze,"f").hasCachedHelpMessage()){if(!this.parsed){const t=this[At](Ye(this,De,"f"),void 0,void 0,0,!0);if(B(t))return t.then((()=>{Ye(this,ze,"f").showHelp(e)})),this}const t=Ye(this,pe,"f").runDefaultBuilderOn(this);if(B(t))return t.then((()=>{Ye(this,ze,"f").showHelp(e)})),this}return Ye(this,ze,"f").showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,t){return H("[boolean|string] [string]",[e,t],arguments.length),Ye(this,ze,"f").showHelpOnFail(e,t),this}showVersion(e){return H("[string|function]",[e],arguments.length),Ye(this,ze,"f").showVersion(e),this}skipValidation(e){return H("<array|string>",[e],arguments.length),this[at]("skipValidation",e),this}strict(e){return H("[boolean]",[e],arguments.length),Ke(this,Ue,!1!==e,"f"),this}strictCommands(e){return H("[boolean]",[e],arguments.length),Ke(this,We,!1!==e,"f"),this}strictOptions(e){return H("[boolean]",[e],arguments.length),Ke(this,He,!1!==e,"f"),this}string(e){return H("<array|string>",[e],arguments.length),this[at]("string",e),this[Pt](e),this}terminalWidth(){return H([],0),Ye(this,Be,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return H("<object>",[e],arguments.length),Ke(this,xe,!1,"f"),Ye(this,Be,"f").y18n.updateLocale(e),this}usage(e,t,n,r){if(H("<string|null|undefined> [string|boolean] [function|object] [function]",[e,t,n,r],arguments.length),void 0!==t){if(R(e,null,Ye(this,Be,"f")),(e||"").match(/^\$0( |$)/))return this.command(e,t,n,r);throw new k(".usage() description must start with $0 if being used as alias for .command()")}return Ye(this,ze,"f").usage(e),this}version(e,t,n){const r="version";if(H("[boolean|string] [string] [string]",[e,t,n],arguments.length),Ye(this,qe,"f")&&(this[Qe](Ye(this,qe,"f")),Ye(this,ze,"f").version(void 0),Ke(this,qe,null,"f")),0===arguments.length)n=this[it](),e=r;else if(1===arguments.length){if(!1===e)return this;n=e,e=r}else 2===arguments.length&&(n=t,t=void 0);return Ke(this,qe,"string"==typeof e?e:r,"f"),t=t||Ye(this,ze,"f").deferY18nLookup("Show version number"),Ye(this,ze,"f").version(n||void 0),this.boolean(Ye(this,qe,"f")),this.describe(Ye(this,qe,"f"),t),this}wrap(e){return H("<number|null|undefined>",[e],arguments.length),Ye(this,ze,"f").wrap(e),this}[(pe=new WeakMap,me=new WeakMap,ge=new WeakMap,ye=new WeakMap,be=new WeakMap,ve=new WeakMap,we=new WeakMap,xe=new WeakMap,Oe=new WeakMap,Se=new WeakMap,Ee=new WeakMap,je=new WeakMap,Ce=new WeakMap,Ae=new WeakMap,_e=new WeakMap,ke=new WeakMap,Pe=new WeakMap,Ie=new WeakMap,$e=new WeakMap,Me=new WeakMap,Te=new WeakMap,Le=new WeakMap,Ge=new WeakMap,Ne=new WeakMap,Re=new WeakMap,De=new WeakMap,Fe=new WeakMap,Be=new WeakMap,Ue=new WeakMap,We=new WeakMap,He=new WeakMap,ze=new WeakMap,qe=new WeakMap,Ve=new WeakMap,Xe)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch(e){}return e}[Je](){return{log:(...e)=>{this[Ot]()||console.log(...e),Ke(this,Ae,!0,"f"),Ye(this,Ie,"f").length&&Ke(this,Ie,Ye(this,Ie,"f")+"\n","f"),Ke(this,Ie,Ye(this,Ie,"f")+e.join(" "),"f")},error:(...e)=>{this[Ot]()||console.error(...e),Ke(this,Ae,!0,"f"),Ye(this,Ie,"f").length&&Ke(this,Ie,Ye(this,Ie,"f")+"\n","f"),Ke(this,Ie,Ye(this,Ie,"f")+e.join(" "),"f")}}}[Qe](e){F(Ye(this,$e,"f")).forEach((t=>{if("configObjects"===t)return;const n=Ye(this,$e,"f")[t];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):"object"==typeof n&&delete n[e]})),delete Ye(this,ze,"f").getDescriptions()[e]}[Ze](e,t,n){Ye(this,Oe,"f")[n]||(Ye(this,Be,"f").process.emitWarning(e,t),Ye(this,Oe,"f")[n]=!0)}[et](){Ye(this,Ee,"f").push({options:Ye(this,$e,"f"),configObjects:Ye(this,$e,"f").configObjects.slice(0),exitProcess:Ye(this,Se,"f"),groups:Ye(this,Ce,"f"),strict:Ye(this,Ue,"f"),strictCommands:Ye(this,We,"f"),strictOptions:Ye(this,He,"f"),completionCommand:Ye(this,be,"f"),output:Ye(this,Ie,"f"),exitError:Ye(this,we,"f"),hasOutput:Ye(this,Ae,"f"),parsed:this.parsed,parseFn:Ye(this,Le,"f"),parseContext:Ye(this,Ge,"f")}),Ye(this,ze,"f").freeze(),Ye(this,Ve,"f").freeze(),Ye(this,pe,"f").freeze(),Ye(this,je,"f").freeze()}[tt](){let e,t="";return e=/\b(node|iojs|electron)(\.exe)?$/.test(Ye(this,Be,"f").process.argv()[0])?Ye(this,Be,"f").process.argv().slice(1,2):Ye(this,Be,"f").process.argv().slice(0,1),t=e.map((e=>{const t=this[jt](Ye(this,me,"f"),e);return e.match(/^(\/|([a-zA-Z]:)?\\)/)&&t.length<e.length?t:e})).join(" ").trim(),Ye(this,Be,"f").getEnv("_")&&Ye(this,Be,"f").getProcessArgvBin()===Ye(this,Be,"f").getEnv("_")&&(t=Ye(this,Be,"f").getEnv("_").replace(`${Ye(this,Be,"f").path.dirname(Ye(this,Be,"f").process.execPath())}/`,"")),t}[nt](){return Ye(this,Te,"f")}[rt](){if(!Ye(this,xe,"f"))return;const e=Ye(this,Be,"f").getEnv("LC_ALL")||Ye(this,Be,"f").getEnv("LC_MESSAGES")||Ye(this,Be,"f").getEnv("LANG")||Ye(this,Be,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[it](){return this[ot]().version||"unknown"}[st](e){const t=e["--"]?e["--"]:e._;for(let e,n=0;void 0!==(e=t[n]);n++)Ye(this,Be,"f").Parser.looksLikeNumber(e)&&Number.isSafeInteger(Math.floor(parseFloat(`${e}`)))&&(t[n]=Number(e));return e}[ot](e){const t=e||"*";if(Ye(this,Ne,"f")[t])return Ye(this,Ne,"f")[t];let n={};try{let t=e||Ye(this,Be,"f").mainFilename;!e&&Ye(this,Be,"f").path.extname(t)&&(t=Ye(this,Be,"f").path.dirname(t));const r=Ye(this,Be,"f").findUp(t,((e,t)=>t.includes("package.json")?"package.json":void 0));R(r,void 0,Ye(this,Be,"f")),n=JSON.parse(Ye(this,Be,"f").readFileSync(r,"utf8"))}catch(e){}return Ye(this,Ne,"f")[t]=n||{},Ye(this,Ne,"f")[t]}[at](e,t){(t=[].concat(t)).forEach((t=>{t=this[dt](t),Ye(this,$e,"f")[e].push(t)}))}[ct](e,t,n,r){this[ut](e,t,n,r,((e,t,n)=>{Ye(this,$e,"f")[e][t]=n}))}[lt](e,t,n,r){this[ut](e,t,n,r,((e,t,n)=>{Ye(this,$e,"f")[e][t]=(Ye(this,$e,"f")[e][t]||[]).concat(n)}))}[ut](e,t,n,r,i){if(Array.isArray(n))n.forEach((t=>{e(t,r)}));else if((e=>"object"==typeof e)(n))for(const t of F(n))e(t,n[t]);else i(t,this[dt](n),r)}[dt](e){return"__proto__"===e?"___proto___":e}[ht](e,t){return this[ct](this[ht].bind(this),"key",e,t),this}[ft](){var e,t,n,r,i,s,o,a,c,l,u,d;const h=Ye(this,Ee,"f").pop();let f;R(h,void 0,Ye(this,Be,"f")),e=this,t=this,n=this,r=this,i=this,s=this,o=this,a=this,c=this,l=this,u=this,d=this,({options:{set value(t){Ke(e,$e,t,"f")}}.value,configObjects:f,exitProcess:{set value(e){Ke(t,Se,e,"f")}}.value,groups:{set value(e){Ke(n,Ce,e,"f")}}.value,output:{set value(e){Ke(r,Ie,e,"f")}}.value,exitError:{set value(e){Ke(i,we,e,"f")}}.value,hasOutput:{set value(e){Ke(s,Ae,e,"f")}}.value,parsed:this.parsed,strict:{set value(e){Ke(o,Ue,e,"f")}}.value,strictCommands:{set value(e){Ke(a,We,e,"f")}}.value,strictOptions:{set value(e){Ke(c,He,e,"f")}}.value,completionCommand:{set value(e){Ke(l,be,e,"f")}}.value,parseFn:{set value(e){Ke(u,Le,e,"f")}}.value,parseContext:{set value(e){Ke(d,Ge,e,"f")}}.value}=h),Ye(this,$e,"f").configObjects=f,Ye(this,ze,"f").unfreeze(),Ye(this,Ve,"f").unfreeze(),Ye(this,pe,"f").unfreeze(),Ye(this,je,"f").unfreeze()}[pt](e,t){return Y(t,(t=>(e(t),t)))}getInternalMethods(){return{getCommandInstance:this[mt].bind(this),getContext:this[gt].bind(this),getHasOutput:this[yt].bind(this),getLoggerInstance:this[bt].bind(this),getParseContext:this[vt].bind(this),getParserConfiguration:this[nt].bind(this),getUsageInstance:this[wt].bind(this),getValidationInstance:this[xt].bind(this),hasParseCallback:this[Ot].bind(this),isGlobalContext:this[St].bind(this),postProcess:this[Et].bind(this),reset:this[Ct].bind(this),runValidation:this[_t].bind(this),runYargsParserAndExecuteCommands:this[At].bind(this),setHasOutput:this[kt].bind(this)}}[mt](){return Ye(this,pe,"f")}[gt](){return Ye(this,ge,"f")}[yt](){return Ye(this,Ae,"f")}[bt](){return Ye(this,Pe,"f")}[vt](){return Ye(this,Ge,"f")||{}}[wt](){return Ye(this,ze,"f")}[xt](){return Ye(this,Ve,"f")}[Ot](){return!!Ye(this,Le,"f")}[St](){return Ye(this,ke,"f")}[Et](e,t,n,r){if(n)return e;if(B(e))return e;t||(e=this[Xe](e));return(this[nt]()["parse-positional-numbers"]||void 0===this[nt]()["parse-positional-numbers"])&&(e=this[st](e)),r&&(e=K(e,this,Ye(this,je,"f").getMiddleware(),!1)),e}[Ct](e={}){Ke(this,$e,Ye(this,$e,"f")||{},"f");const t={};t.local=Ye(this,$e,"f").local||[],t.configObjects=Ye(this,$e,"f").configObjects||[];const n={};t.local.forEach((t=>{n[t]=!0,(e[t]||[]).forEach((e=>{n[e]=!0}))})),Object.assign(Ye(this,Re,"f"),Object.keys(Ye(this,Ce,"f")).reduce(((e,t)=>{const r=Ye(this,Ce,"f")[t].filter((e=>!(e in n)));return r.length>0&&(e[t]=r),e}),{})),Ke(this,Ce,{},"f");return["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"].forEach((e=>{t[e]=(Ye(this,$e,"f")[e]||[]).filter((e=>!n[e]))})),["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"].forEach((e=>{t[e]=ee(Ye(this,$e,"f")[e],(e=>!n[e]))})),t.envPrefix=Ye(this,$e,"f").envPrefix,Ke(this,$e,t,"f"),Ke(this,ze,Ye(this,ze,"f")?Ye(this,ze,"f").reset(n):re(this,Ye(this,Be,"f")),"f"),Ke(this,Ve,Ye(this,Ve,"f")?Ye(this,Ve,"f").reset(n):function(e,t,n){const r=n.y18n.__,i=n.y18n.__n,s={nonOptionCount:function(n){const r=e.getDemandedCommands(),s=n._.length+(n["--"]?n["--"].length:0)-e.getInternalMethods().getContext().commands.length;r._&&(s<r._.min||s>r._.max)&&(s<r._.min?void 0!==r._.minMsg?t.fail(r._.minMsg?r._.minMsg.replace(/\$0/g,s.toString()).replace(/\$1/,r._.min.toString()):null):t.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",s,s.toString(),r._.min.toString())):s>r._.max&&(void 0!==r._.maxMsg?t.fail(r._.maxMsg?r._.maxMsg.replace(/\$0/g,s.toString()).replace(/\$1/,r._.max.toString()):null):t.fail(i("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",s,s.toString(),r._.max.toString()))))},positionalCount:function(e,n){n<e&&t.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",n,n+"",e+""))},requiredArguments:function(e,n){let r=null;for(const t of Object.keys(n))Object.prototype.hasOwnProperty.call(e,t)&&void 0!==e[t]||(r=r||{},r[t]=n[t]);if(r){const e=[];for(const t of Object.keys(r)){const n=r[t];n&&e.indexOf(n)<0&&e.push(n)}const n=e.length?`\n${e.join("\n")}`:"";t.fail(i("Missing required argument: %s","Missing required arguments: %s",Object.keys(r).length,Object.keys(r).join(", ")+n))}},unknownArguments:function(n,r,o,a,c=!0){var l;const u=e.getInternalMethods().getCommandInstance().getCommands(),d=[],h=e.getInternalMethods().getContext();if(Object.keys(n).forEach((t=>{le.includes(t)||Object.prototype.hasOwnProperty.call(o,t)||Object.prototype.hasOwnProperty.call(e.getInternalMethods().getParseContext(),t)||s.isValidAndSomeAliasIsNotNew(t,r)||d.push(t)})),c&&(h.commands.length>0||u.length>0||a)&&n._.slice(h.commands.length).forEach((e=>{u.includes(""+e)||d.push(""+e)})),c){const t=(null===(l=e.getDemandedCommands()._)||void 0===l?void 0:l.max)||0,r=h.commands.length+t;r<n._.length&&n._.slice(r).forEach((e=>{e=String(e),h.commands.includes(e)||d.includes(e)||d.push(e)}))}d.length&&t.fail(i("Unknown argument: %s","Unknown arguments: %s",d.length,d.map((e=>e.trim()?e:`"${e}"`)).join(", ")))},unknownCommands:function(n){const r=e.getInternalMethods().getCommandInstance().getCommands(),s=[],o=e.getInternalMethods().getContext();return(o.commands.length>0||r.length>0)&&n._.slice(o.commands.length).forEach((e=>{r.includes(""+e)||s.push(""+e)})),s.length>0&&(t.fail(i("Unknown command: %s","Unknown commands: %s",s.length,s.join(", "))),!0)},isValidAndSomeAliasIsNotNew:function(t,n){if(!Object.prototype.hasOwnProperty.call(n,t))return!1;const r=e.parsed.newAliases;return[t,...n[t]].some((e=>!Object.prototype.hasOwnProperty.call(r,e)||!r[t]))},limitedChoices:function(n){const i=e.getOptions(),s={};if(!Object.keys(i.choices).length)return;Object.keys(n).forEach((e=>{-1===le.indexOf(e)&&Object.prototype.hasOwnProperty.call(i.choices,e)&&[].concat(n[e]).forEach((t=>{-1===i.choices[e].indexOf(t)&&void 0!==t&&(s[e]=(s[e]||[]).concat(t))}))}));const o=Object.keys(s);if(!o.length)return;let a=r("Invalid values:");o.forEach((e=>{a+=`\n ${r("Argument: %s, Given: %s, Choices: %s",e,t.stringifiedValues(s[e]),t.stringifiedValues(i.choices[e]))}`})),t.fail(a)}};let o={};function a(e,t){const n=Number(t);return"number"==typeof(t=isNaN(n)?t:n)?t=e._.length>=t:t.match(/^--no-.+/)?(t=t.match(/^--no-(.+)/)[1],t=!Object.prototype.hasOwnProperty.call(e,t)):t=Object.prototype.hasOwnProperty.call(e,t),t}s.implies=function(t,r){H("<string|object> [array|number|string]",[t,r],arguments.length),"object"==typeof t?Object.keys(t).forEach((e=>{s.implies(e,t[e])})):(e.global(t),o[t]||(o[t]=[]),Array.isArray(r)?r.forEach((e=>s.implies(t,e))):(R(r,void 0,n),o[t].push(r)))},s.getImplied=function(){return o},s.implications=function(e){const n=[];if(Object.keys(o).forEach((t=>{const r=t;(o[t]||[]).forEach((t=>{let i=r;const s=t;i=a(e,i),t=a(e,t),i&&!t&&n.push(` ${r} -> ${s}`)}))})),n.length){let e=`${r("Implications failed:")}\n`;n.forEach((t=>{e+=t})),t.fail(e)}};let c={};s.conflicts=function(t,n){H("<string|object> [array|string]",[t,n],arguments.length),"object"==typeof t?Object.keys(t).forEach((e=>{s.conflicts(e,t[e])})):(e.global(t),c[t]||(c[t]=[]),Array.isArray(n)?n.forEach((e=>s.conflicts(t,e))):c[t].push(n))},s.getConflicting=()=>c,s.conflicting=function(i){Object.keys(i).forEach((e=>{c[e]&&c[e].forEach((n=>{n&&void 0!==i[e]&&void 0!==i[n]&&t.fail(r("Arguments %s and %s are mutually exclusive",e,n))}))})),e.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(c).forEach((e=>{c[e].forEach((s=>{s&&void 0!==i[n.Parser.camelCase(e)]&&void 0!==i[n.Parser.camelCase(s)]&&t.fail(r("Arguments %s and %s are mutually exclusive",e,s))}))}))},s.recommendCommands=function(e,n){n=n.sort(((e,t)=>t.length-e.length));let i=null,s=1/0;for(let t,r=0;void 0!==(t=n[r]);r++){const n=ce(e,t);n<=3&&n<s&&(s=n,i=t)}i&&t.fail(r("Did you mean %s?",i))},s.reset=function(e){return o=ee(o,(t=>!e[t])),c=ee(c,(t=>!e[t])),s};const l=[];return s.freeze=function(){l.push({implied:o,conflicting:c})},s.unfreeze=function(){const e=l.pop();R(e,void 0,n),({implied:o,conflicting:c}=e)},s}(this,Ye(this,ze,"f"),Ye(this,Be,"f")),"f"),Ke(this,pe,Ye(this,pe,"f")?Ye(this,pe,"f").reset():function(e,t,n,r){return new J(e,t,n,r)}(Ye(this,ze,"f"),Ye(this,Ve,"f"),Ye(this,je,"f"),Ye(this,Be,"f")),"f"),Ye(this,ye,"f")||Ke(this,ye,function(e,t,n,r){return new ae(e,t,n,r)}(this,Ye(this,ze,"f"),Ye(this,pe,"f"),Ye(this,Be,"f")),"f"),Ye(this,je,"f").reset(),Ke(this,be,null,"f"),Ke(this,Ie,"","f"),Ke(this,we,null,"f"),Ke(this,Ae,!1,"f"),this.parsed=!1,this}[jt](e,t){return Ye(this,Be,"f").path.relative(e,t)}[At](e,t,n,r=0,i=!1){let s=!!n||i;e=e||Ye(this,De,"f"),Ye(this,$e,"f").__=Ye(this,Be,"f").y18n.__,Ye(this,$e,"f").configuration=this[nt]();const o=!!Ye(this,$e,"f").configuration["populate--"],a=Object.assign({},Ye(this,$e,"f").configuration,{"populate--":!0}),c=Ye(this,Be,"f").Parser.detailed(e,Object.assign({},Ye(this,$e,"f"),{configuration:{"parse-positional-numbers":!1,...a}})),l=Object.assign(c.argv,Ye(this,Ge,"f"));let u;const d=c.aliases;let h=!1,f=!1;Object.keys(l).forEach((e=>{e===Ye(this,_e,"f")&&l[e]?h=!0:e===Ye(this,qe,"f")&&l[e]&&(f=!0)})),l.$0=this.$0,this.parsed=c,0===r&&Ye(this,ze,"f").clearCachedHelpMessage();try{if(this[rt](),t)return this[Et](l,o,!!n,!1);if(Ye(this,_e,"f")){[Ye(this,_e,"f")].concat(d[Ye(this,_e,"f")]||[]).filter((e=>e.length>1)).includes(""+l._[l._.length-1])&&(l._.pop(),h=!0)}Ke(this,ke,!1,"f");const a=Ye(this,pe,"f").getCommands(),p=Ye(this,ye,"f").completionKey in l,m=h||p||i;if(l._.length){if(a.length){let e;for(let t,s=r||0;void 0!==l._[s];s++){if(t=String(l._[s]),a.includes(t)&&t!==Ye(this,be,"f")){const e=Ye(this,pe,"f").runCommand(t,this,c,s+1,i,h||f||i);return this[Et](e,o,!!n,!1)}if(!e&&t!==Ye(this,be,"f")){e=t;break}}!Ye(this,pe,"f").hasDefaultCommand()&&Ye(this,Fe,"f")&&e&&!m&&Ye(this,Ve,"f").recommendCommands(e,a)}Ye(this,be,"f")&&l._.includes(Ye(this,be,"f"))&&!p&&(Ye(this,Se,"f")&&te(!0),this.showCompletionScript(),this.exit(0))}if(Ye(this,pe,"f").hasDefaultCommand()&&!m){const e=Ye(this,pe,"f").runCommand(null,this,c,0,i,h||f||i);return this[Et](e,o,!!n,!1)}if(p){Ye(this,Se,"f")&&te(!0);const t=(e=[].concat(e)).slice(e.indexOf(`--${Ye(this,ye,"f").completionKey}`)+1);return Ye(this,ye,"f").getCompletion(t,((e,t)=>{if(e)throw new k(e.message);(t||[]).forEach((e=>{Ye(this,Pe,"f").log(e)})),this.exit(0)})),this[Et](l,!o,!!n,!1)}if(Ye(this,Ae,"f")||(h?(Ye(this,Se,"f")&&te(!0),s=!0,this.showHelp("log"),this.exit(0)):f&&(Ye(this,Se,"f")&&te(!0),s=!0,Ye(this,ze,"f").showVersion("log"),this.exit(0))),!s&&Ye(this,$e,"f").skipValidation.length>0&&(s=Object.keys(l).some((e=>Ye(this,$e,"f").skipValidation.indexOf(e)>=0&&!0===l[e]))),!s){if(c.error)throw new k(c.error.message);if(!p){const e=this[_t](d,{},c.error);n||(u=K(l,this,Ye(this,je,"f").getMiddleware(),!0)),u=this[pt](e,null!=u?u:l),B(u)&&!n&&(u=u.then((()=>K(l,this,Ye(this,je,"f").getMiddleware(),!1))))}}}catch(e){if(!(e instanceof k))throw e;Ye(this,ze,"f").fail(e.message,e)}return this[Et](null!=u?u:l,o,!!n,!0)}[_t](e,t,n,r){const i={...this.getDemandedOptions()};return s=>{if(n)throw new k(n.message);Ye(this,Ve,"f").nonOptionCount(s),Ye(this,Ve,"f").requiredArguments(s,i);let o=!1;Ye(this,We,"f")&&(o=Ye(this,Ve,"f").unknownCommands(s)),Ye(this,Ue,"f")&&!o?Ye(this,Ve,"f").unknownArguments(s,e,t,!!r):Ye(this,He,"f")&&Ye(this,Ve,"f").unknownArguments(s,e,{},!1,!1),Ye(this,Ve,"f").limitedChoices(s),Ye(this,Ve,"f").implications(s),Ye(this,Ve,"f").conflicting(s)}}[kt](){Ke(this,Ae,!0,"f")}[Pt](e){if("string"==typeof e)Ye(this,$e,"f").key[e]=!0;else for(const t of e)Ye(this,$e,"f").key[t]=!0}}const $t=(Mt=N,(e=[],t=Mt.process.cwd(),n)=>{const r=new It(e,t,n,Mt);return Object.defineProperty(r,"argv",{get:()=>r.parse(),enumerable:!0}),r.help(),r.version(),r});var Mt;const Tt=$t;function Lt(e,t){const n=e.startsWith(".")?(0,f.join)(t,e):e;return import(n)}function Gt(e,t){const{homepage:n,site:r=n,repository:i}=t,s=r&&r!==i,o=e.getInternalMethods(),a=(c=o.getCommandInstance().handlers,Object.keys(c).some((e=>e&&"$0"!==e)));var c;return 0===o.getUsageInstance().getUsage().length&&(a?e.usage("Usage: $0 <command>"):e.usage("Usage: $0")),a&&e.demandCommand(1,"Won't work without a command"),s&&e.epilogue(`Website: ${r}`),i&&e.epilogue(`Repository: ${i}`),e}const Nt=e(import.meta.url)("node:buffer"),Rt=e(import.meta.url)("node:path"),Dt=e(import.meta.url)("node:child_process"),Ft=e(import.meta.url)("node:process");var Bt=a(8995);const Ut=e(import.meta.url)("node:url");function Wt(e={}){const{env:t=process.env,platform:n=process.platform}=e;return"win32"!==n?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"}function Ht({env:e=Ft.env,...t}={}){const n=Wt({env:e={...e}});return t.path=e[n],e[n]=function(e={}){const{cwd:t=Ft.cwd(),path:n=Ft.env[Wt()],execPath:r=Ft.execPath}=e;let i;const s=t instanceof URL?Ut.fileURLToPath(t):t;let o=Rt.resolve(s);const a=[];for(;i!==o;)a.push(Rt.join(o,"node_modules/.bin")),i=o,o=Rt.resolve(o,"..");return a.push(Rt.resolve(s,r,"..")),[...a,n].join(Rt.delimiter)}(t),e}const zt=(e,t,n,r)=>{if("length"===n||"prototype"===n)return;if("arguments"===n||"caller"===n)return;const i=Object.getOwnPropertyDescriptor(e,n),s=Object.getOwnPropertyDescriptor(t,n);!qt(i,s)&&r||Object.defineProperty(e,n,s)},qt=function(e,t){return void 0===e||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},Vt=(e,t)=>`/* Wrapped ${e}*/\n${t}`,Kt=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Yt=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");function Xt(e,t,{ignoreNonConfigurable:n=!1}={}){const{name:r}=e;for(const r of Reflect.ownKeys(t))zt(e,t,r,n);return((e,t)=>{const n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)})(e,t),((e,t,n)=>{const r=""===n?"":`with ${n.trim()}() `,i=Vt.bind(null,r,t.toString());Object.defineProperty(i,"name",Yt),Object.defineProperty(e,"toString",{...Kt,value:i})})(e,t,r),e}const Jt=new WeakMap,Qt=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let n,r=0;const i=e.displayName||e.name||"<anonymous>",s=function(...o){if(Jt.set(s,++r),1===r)n=e.apply(this,o),e=null;else if(!0===t.throw)throw new Error(`Function \`${i}\` can only be called once`);return n};return Xt(s,e),Jt.set(s,r),s};Qt.callCount=e=>{if(!Jt.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Jt.get(e)};const Zt=Qt;var en=a(22037);const tn=function(e,t){return{name:`SIGRT${t+1}`,number:nn+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},nn=34,rn=64,sn=[{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"}],on=function(){const e=function(){const e=rn-nn+1;return Array.from({length:e},tn)}();return[...sn,...e].map(an)},an=function({name:e,number:t,description:n,action:r,forced:i=!1,standard:s}){const{signals:{[e]:o}}=en.constants,a=void 0!==o;return{name:e,number:a?o:t,description:n,supported:a,action:r,forced:i,standard:s}},cn=function(e,{name:t,number:n,description:r,supported:i,action:s,forced:o,standard:a}){return{...e,[t]:{name:t,number:n,description:r,supported:i,action:s,forced:o,standard:a}}},ln=on().reduce(cn,{}),un=function(e,t){const n=dn(e,t);if(void 0===n)return{};const{name:r,description:i,supported:s,action:o,forced:a,standard:c}=n;return{[e]:{name:r,number:e,description:i,supported:s,action:o,forced:a,standard:c}}},dn=function(e,t){const n=t.find((({name:t})=>en.constants.signals[t]===e));return void 0!==n?n:t.find((t=>t.number===e))},hn=(function(){const e=on(),t=rn+1,n=Array.from({length:t},((t,n)=>un(n,e)));Object.assign({},...n)}(),({stdout:e,stderr:t,all:n,error:r,signal:i,exitCode:s,command:o,escapedCommand:a,timedOut:c,isCanceled:l,killed:u,parsed:{options:{timeout:d}}})=>{s=null===s?void 0:s;const h=void 0===(i=null===i?void 0:i)?void 0:ln[i].description,f=(({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:i,exitCode:s,isCanceled:o})=>e?`timed out after ${t} milliseconds`:o?"was canceled":void 0!==n?`failed with ${n}`:void 0!==r?`was killed with ${r} (${i})`:void 0!==s?`failed with exit code ${s}`:"failed")({timedOut:c,timeout:d,errorCode:r&&r.code,signal:i,signalDescription:h,exitCode:s,isCanceled:l}),p=`Command ${f}: ${o}`,m="[object Error]"===Object.prototype.toString.call(r),g=m?`${p}\n${r.message}`:p,y=[g,t,e].filter(Boolean).join("\n");return m?(r.originalMessage=r.message,r.message=y):r=new Error(y),r.shortMessage=g,r.command=o,r.escapedCommand=a,r.exitCode=s,r.signal=i,r.signalDescription=h,r.stdout=e,r.stderr=t,void 0!==n&&(r.all=n),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=Boolean(c),r.isCanceled=l,r.killed=u&&!c,r}),fn=["stdin","stdout","stderr"],pn=e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return fn.map((t=>e[t]));if((e=>fn.some((t=>void 0!==e[t])))(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${fn.map((e=>`\`${e}\``)).join(", ")}`);if("string"==typeof t)return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);const n=Math.max(t.length,fn.length);return Array.from({length:n},((e,n)=>t[n]))},mn=e(import.meta.url)("node:os");var gn=a(90260);const yn=(e,t="SIGTERM",n={})=>{const r=e(t);return bn(e,t,n,r),r},bn=(e,t,n,r)=>{if(!vn(t,n,r))return;const i=xn(n),s=setTimeout((()=>{e("SIGKILL")}),i);s.unref&&s.unref()},vn=(e,{forceKillAfterTimeout:t},n)=>wn(e)&&!1!==t&&n,wn=e=>e===mn.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),xn=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},On=(e,t)=>{e.kill()&&(t.isCanceled=!0)},Sn=(e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(0===t||void 0===t)return r;let i;const s=new Promise(((r,s)=>{i=setTimeout((()=>{((e,t,n)=>{e.kill(t),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,n,s)}),t)})),o=r.finally((()=>{clearTimeout(i)}));return Promise.race([s,o])};function En(e){return null!==e&&"object"==typeof e&&"function"==typeof e.pipe}var jn=a(10031),Cn=a(90873);const An=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},_n=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(e&&n)return t?jn(e,{encoding:t,maxBuffer:r}):jn.buffer(e,{maxBuffer:r})},kn=(async()=>{})().constructor.prototype,Pn=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(kn,e)])),In=(e,t)=>{for(const[n,r]of Pn){const i="function"==typeof t?(...e)=>Reflect.apply(r.value,t(),e):r.value.bind(t);Reflect.defineProperty(e,n,{...r,value:i})}return e},$n=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],Mn=/^[\w.-]+$/,Tn=/"/g,Ln=(e,t)=>$n(e,t).map((e=>(e=>"string"!=typeof e||Mn.test(e)?e:`"${e.replace(Tn,'\\"')}"`)(e))).join(" "),Gn=(e,t,n={})=>{const r=Bt._parse(e,t,n);return e=r.command,t=r.args,(n={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(n=r.options).cwd||Ft.cwd(),execPath:Ft.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n}).env=(({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:i})=>{const s=t?{...Ft.env,...e}:e;return n?Ht({env:s,cwd:r,execPath:i}):s})(n),n.stdio=pn(n),"win32"===Ft.platform&&"cmd"===Rt.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:n,parsed:r}},Nn=(e,t,n)=>"string"==typeof t||Nt.Buffer.isBuffer(t)?e.stripFinalNewline?function(e){const t="string"==typeof e?"\n":"\n".charCodeAt(),n="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===n&&(e=e.slice(0,-1)),e}(t):t:void 0===n?void 0:"";function Rn(e,t,n){const r=Gn(e,t,n),i=((e,t)=>$n(e,t).join(" "))(e,t),s=Ln(e,t);let o;(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(r.options);try{o=Dt.spawn(r.file,r.args,r.options)}catch(e){const t=new Dt.ChildProcess,n=Promise.reject(hn({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return In(t,n)}const a=(e=>new Promise(((t,n)=>{e.on("exit",((e,n)=>{t({exitCode:e,signal:n})})),e.on("error",(e=>{n(e)})),e.stdin&&e.stdin.on("error",(e=>{n(e)}))})))(o),c=Sn(o,r.options,a),l=(async(e,{cleanup:t,detached:n},r)=>{if(!t||n)return r;const i=gn((()=>{e.kill()}));return r.finally((()=>{i()}))})(o,r.options,c),u={isCanceled:!1};o.kill=yn.bind(null,o.kill.bind(o)),o.cancel=On.bind(null,o,u);const d=Zt((async()=>{const[{error:e,exitCode:t,signal:n,timedOut:a},c,d,h]=await(async({stdout:e,stderr:t,all:n},{encoding:r,buffer:i,maxBuffer:s},o)=>{const a=_n(e,{encoding:r,buffer:i,maxBuffer:s}),c=_n(t,{encoding:r,buffer:i,maxBuffer:s}),l=_n(n,{encoding:r,buffer:i,maxBuffer:2*s});try{return await Promise.all([o,a,c,l])}catch(r){return Promise.all([{error:r,signal:r.signal,timedOut:r.timedOut},An(e,a),An(t,c),An(n,l)])}})(o,r.options,l),f=Nn(r.options,c),p=Nn(r.options,d),m=Nn(r.options,h);if(e||0!==t||null!==n){const c=hn({error:e,exitCode:t,signal:n,stdout:f,stderr:p,all:m,command:i,escapedCommand:s,parsed:r,timedOut:a,isCanceled:u.isCanceled||!!r.options.signal&&r.options.signal.aborted,killed:o.killed});if(!r.options.reject)return c;throw c}return{command:i,escapedCommand:s,exitCode:0,stdout:f,stderr:p,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return((e,t)=>{void 0!==t&&void 0!==e.stdin&&(En(t)?t.pipe(e.stdin):e.stdin.end(t))})(o,r.options.input),o.all=((e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=Cn();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n})(o,r.options),In(o,d)}var Dn=a(77918);const Fn="git",Bn="";async function Un(){try{const{stdout:e}=await Rn("git",["--version"]);return Boolean(e)}catch{return!1}}function Wn(e){e.command("hooks","Set .githooks as git.hooksPath",{},(()=>{Un().then((e=>{e&&Dn()&&Rn("git config core.hooksPath .githooks").then((()=>{console.log("Done: set .githooks")})).catch((e=>{process.exitCode=1,console.error("Error:",e.message)}))})).catch((()=>{}))})),e.demandCommand(1,"Typing `hooks`")}const Hn=e(import.meta.url)("module"),zn=process.cwd();const qn=(0,Hn.createRequire)(import.meta.url);function Vn(e,t=zn){return e.startsWith(".")?(0,f.resolve)(t,e):(0,f.isAbsolute)(e)?e:qn.resolve(e)}function Kn(e){try{return(0,r.statSync)(Vn(e)),!0}catch{return!1}}function Yn(e,t={}){const n=function(e){try{const t=(0,r.readFileSync)(Vn(e),"utf8");return JSON.parse(t)}catch{return{}}}("./package.json");if(e){const{[e]:r=t}=n;return r}return n}const Xn=e(import.meta.url)("fs/promises"),Jn={"body-leading-blank":[1,"always"],"body-max-line-length":[2,"always",100],"footer-leading-blank":[1,"always"],"footer-max-line-length":[2,"always",100],"header-max-length":[2,"always",100],"subject-case":[0],"subject-empty":[2,"never"],"subject-full-stop":[2,"never","."],"type-case":[2,"always","lower-case"],"type-empty":[2,"never"],"type-enum":[2,"always",["build","chore","ci","docs","feat","fix","perf","refactor","revert","style","test"]],"scope-case":[0],"body-case":[0],"header-case":[0]};function Qn(){return(0,Xn.readFile)((0,f.resolve)(process.cwd(),".git/COMMIT_EDITMSG"),"utf8")}function Zn(e){e.command("commit","Lint git commit message",{},(()=>{(async function(){const e=await Qn(),t=await Promise.all([a.e(402),a.e(824)]).then(a.t.bind(a,69402,19)).then((e=>e.default.default||e.default)),n=await Promise.all([a.e(640),a.e(824)]).then(a.t.bind(a,93794,19)).then((e=>e.default.default||e.default)),r=await t(e,Jn);return{result:r,output:await n({results:[r]})}})().then((({result:e,output:t})=>{e.valid?console.log("Pass."):(console.log("Fail:"),console.log(t),process.exitCode=1)})).catch((e=>{console.error(e),process.exitCode=1}))}))}function er({rustywind:e,garou:t,stylelint:n,eslint:r,prettier:i,typescript:s}){const o=process.stdin.isTTY?" --color":"";return function(e){const t=Object.entries(e).map((([e,t])=>[e,t.filter(Boolean)])).filter((([e,t])=>t.length));return t.length>0?Object.fromEntries(t):void 0}({"*.{{wx,tt,q,ax,jx,ks}ml,swan}":[e&&"rustywind --write"],"*.{vue,html,htm,md}":[e&&"rustywind --write",t&&"garou",i&&`prettier -w -u${o}`,n&&`stylelint --fix --custom-formatter=node_modules/stylelint-formatter-pretty${o}`,r&&`eslint --fix -f=pretty${o}`],"*.{ts,tsx,mts,cts}":[e&&"rustywind --write",t&&"garou",i&&`prettier -w -u${o}`,r&&`eslint --fix -f=pretty${o}`,s&&(()=>"tsc --noEmit")],"*.{js,jsx,mjs,cjs,wxs,qs}":[e&&"rustywind --write",t&&"garou",i&&`prettier -w -u${o}`,r&&`eslint --fix -f=pretty${o}`],"*.{c,sc,le,wx,q,tt,jx,ac}ss":[t&&"garou",i&&`prettier -w -u${o}`,n&&`stylelint --fix --custom-formatter=node_modules/stylelint-formatter-pretty${o}`],"{*.{json,jsonc,webmanifest,editorconfig,yml,yaml,toml},.{babel,npm}rc}":[i&&`prettier -w -u${o}`],"*.svg":[t&&"garou",i&&`prettier --parser html -w -u${o}`,i&&`prettier -w -u${o}`,n&&`stylelint --fix --custom-formatter=node_modules/stylelint-formatter-pretty${o}`],"yarn.lock":[t&&"garou"]})}async function tr(){const{default:e}=await Promise.all([a.e(640),a.e(841),a.e(824)]).then(a.bind(a,73750));return e({allowEmpty:!0,concurrent:!0,config:er(function(){const e=Yn("devDependencies");return{rustywind:"rustywind"in e,garou:"garou"in e,stylelint:"stylelint"in e,eslint:"eslint"in e,prettier:"prettier"in e,typescript:"typescript"in e}}()),cwd:process.cwd(),debug:!1,quiet:!1,relative:!1,shell:!1,stash:!0})}const nr="lint";function rr(e){Zn(e),function(e){e.command("staged","Lint and format git staged files",{},(()=>{tr().then((e=>{process.exitCode=e?0:1})).catch((()=>{process.exitCode=1}))}))}(e),e.demandCommand(1,"Typing `commit` or `staged`")}process.on("SIGINT",(()=>{})),new class{constructor(e,t){this.root=t;const{bin:n,homepage:i,name:s="cheetor",repository:{url:o=""}={},version:a}="string"==typeof e?JSON.parse((0,r.readFileSync)(new URL(e,t))):e;this.homepage=i,this.repository=o.includes("github.com")?o.replace(/\.git$/,""):"";const c=Tt(process.argv.slice(2)).strict().alias("help","h").alias("version","v").hide("help").version(a).hide("version").detectLocale(!1),l=function(e,t){if("string"==typeof e||!e)return t;const n=Object.keys(e);return 1===n.length&&n[0]}(n,s);l&&c.scriptName(l),this.cli=Promise.resolve(c)}config(e){return this.cli=this.cli.then(e),this}command(...e){return this.cli=this.cli.then((t=>t.command(...e))),this}commandFrom(e){return this.cli=this.cli.then((async t=>{const n=await Lt(e,this.root);return t.command(n)})),this}commandSafe(e){return this.cli=this.cli.then((t=>function(e,t){return Lt(e,t).catch((e=>{if("ERR_MODULE_NOT_FOUND"===e.code&&e.message.endsWith(` imported from ${(0,m.fileURLToPath)(import.meta.url)}`))return!1;throw e}))}(e,this.root).then((e=>e&&e.command?t.command(e):t)))),this}commandSmart(e){return this.cli=this.cli.then((async t=>{const n=e();return n&&n.command?t.command(n):t})),this}website(e){return this.site=e,this}middleware(...e){return this.cli=this.cli.then((t=>t.middleware(...e))),this}setup(e){return this.cli.then((e=>Gt(e,this))).then((t=>"function"==typeof e?e(t.parse()):t.parse()))}}("../package.json",import.meta.url).website("https://www.npmjs.com/org/nice-move").command(n).command(t).commandSmart((function(){if(Kn("svgo/package.json")&&Kn("svgo-config/package.json"))return{command:"svgo",describe:"Run `svgo` to optimize `*.svg`",handler({_:[e,t="./"]}){Rn("svgo",["-r","-q","--pretty","--indent","2","--config",(0,Hn.createRequire)(import.meta.url).resolve("svgo-config"),"-f",t]).then((()=>{console.log("Done: calling svgo")})).catch((e=>{process.exitCode=1,console.error("Error:",e.message)}))}}})).setup()})();
2
+ import{createRequire as t}from"module";var e,n,s,i,r={8995:(t,e,n)=>{const s=n(32081),i=n(19015),r=n(95350);function o(t,e,n){const o=i(t,e,n),a=s.spawn(o.command,o.args,o.options);return r.hookChildProcess(a,o),a}t.exports=o,t.exports.spawn=o,t.exports.sync=function(t,e,n){const o=i(t,e,n),a=s.spawnSync(o.command,o.args,o.options);return a.error=a.error||r.verifyENOENTSync(a.status,o),a},t.exports._parse=i,t.exports._enoent=r},95350:t=>{const e="win32"===process.platform;function n(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function s(t,s){return e&&1===t&&!s.file?n(s.original,"spawn"):null}t.exports={hookChildProcess:function(t,n){if(!e)return;const i=t.emit;t.emit=function(e,r){if("exit"===e){const e=s(r,n);if(e)return i.call(t,"error",e)}return i.apply(t,arguments)}},verifyENOENT:s,verifyENOENTSync:function(t,s){return e&&1===t&&!s.file?n(s.original,"spawnSync"):null},notFoundError:n}},19015:(t,e,n)=>{const s=n(71017),i=n(65358),r=n(16214),o=n(63106),a="win32"===process.platform,c=/\.(?:com|exe)$/i,l=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function h(t){if(!a)return t;const e=function(t){t.file=i(t);const e=t.file&&o(t.file);return e?(t.args.unshift(t.file),t.command=e,i(t)):t.file}(t),n=!c.test(e);if(t.options.forceShell||n){const n=l.test(e);t.command=s.normalize(t.command),t.command=r.command(t.command),t.args=t.args.map((t=>r.argument(t,n)));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}t.exports=function(t,e,n){e&&!Array.isArray(e)&&(n=e,e=null);const s={command:t,args:e=e?e.slice(0):[],options:n=Object.assign({},n),file:void 0,original:{command:t,args:e}};return n.shell?s:h(s)}},16214:t=>{const e=/([()\][%!^"`<>&|;, *?])/g;t.exports.command=function(t){return t=t.replace(e,"^$1")},t.exports.argument=function(t,n){return t=(t=`"${t=(t=(t=`${t}`).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(e,"^$1"),n&&(t=t.replace(e,"^$1")),t}},63106:(t,e,n)=>{const s=n(57147),i=n(14256);t.exports=function(t){const e=Buffer.alloc(150);let n;try{n=s.openSync(t,"r"),s.readSync(n,e,0,150,0),s.closeSync(n)}catch(t){}return i(e.toString())}},65358:(t,e,n)=>{const s=n(71017),i=n(1468),r=n(26569);function o(t,e){const n=t.options.env||process.env,o=process.cwd(),a=null!=t.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(t.options.cwd)}catch(t){}let l;try{l=i.sync(t.command,{path:n[r({env:n})],pathExt:e?s.delimiter:void 0})}catch(t){}finally{c&&process.chdir(o)}return l&&(l=s.resolve(a?t.options.cwd:"",l)),l}t.exports=function(t){return o(t)||o(t,!0)}},1468:(t,e,n)=>{const s="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,i=n(71017),r=s?";":":",o=n(5909),a=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),c=(t,e)=>{const n=e.colon||r,i=t.match(/\//)||s&&t.match(/\\/)?[""]:[...s?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(n)],o=s?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=s?o.split(n):[""];return s&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:o}},l=(t,e,n)=>{"function"==typeof e&&(n=e,e={}),e||(e={});const{pathEnv:s,pathExt:r,pathExtExe:l}=c(t,e),h=[],u=n=>new Promise(((r,o)=>{if(n===s.length)return e.all&&h.length?r(h):o(a(t));const c=s[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,u=i.join(l,t),f=!l&&/^\.[\\\/]/.test(t)?t.slice(0,2)+u:u;r(d(f,n,0))})),d=(t,n,s)=>new Promise(((i,a)=>{if(s===r.length)return i(u(n+1));const c=r[s];o(t+c,{pathExt:l},((r,o)=>{if(!r&&o){if(!e.all)return i(t+c);h.push(t+c)}return i(d(t,n,s+1))}))}));return n?u(0).then((t=>n(null,t)),n):u(0)};t.exports=l,l.sync=(t,e)=>{e=e||{};const{pathEnv:n,pathExt:s,pathExtExe:r}=c(t,e),l=[];for(let a=0;a<n.length;a++){const c=n[a],h=/^".*"$/.test(c)?c.slice(1,-1):c,u=i.join(h,t),d=!h&&/^\.[\\\/]/.test(t)?t.slice(0,2)+u:u;for(let t=0;t<s.length;t++){const n=d+s[t];try{if(o.sync(n,{pathExt:r})){if(!e.all)return n;l.push(n)}}catch(t){}}}if(e.all&&l.length)return l;if(e.nothrow)return null;throw a(t)}},23799:(t,e,n)=>{const s=n(71017),i=n(32081),r=n(8995),o=n(36178),a=n(9002),c=n(83937),l=n(97860),h=n(10407),{spawnedKill:u,spawnedCancel:d,setupTimeout:f,validateTimeout:p,setExitHandler:m}=n(5454),{handleInput:g,getSpawnedResult:y,makeAllStream:b,validateInputSync:v}=n(53036),{mergePromise:w,getSpawnedPromise:x}=n(24578),{joinCommand:O,parseCommand:E,getEscapedCommand:S}=n(82899),j=(t,e,n={})=>{const i=r._parse(t,e,n);return t=i.command,e=i.args,(n={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(n=i.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n}).env=(({env:t,extendEnv:e,preferLocal:n,localDir:s,execPath:i})=>{const r=e?{...process.env,...t}:t;return n?a.env({env:r,cwd:s,execPath:i}):r})(n),n.stdio=h(n),"win32"===process.platform&&"cmd"===s.basename(t,".exe")&&e.unshift("/q"),{file:t,args:e,options:n,parsed:i}},C=(t,e,n)=>"string"==typeof e||Buffer.isBuffer(e)?t.stripFinalNewline?o(e):e:void 0===n?void 0:"",_=(t,e,n)=>{const s=j(t,e,n),r=O(t,e),o=S(t,e);let a;p(s.options);try{a=i.spawn(s.file,s.args,s.options)}catch(t){const e=new i.ChildProcess,n=Promise.reject(l({error:t,stdout:"",stderr:"",all:"",command:r,escapedCommand:o,parsed:s,timedOut:!1,isCanceled:!1,killed:!1}));return w(e,n)}const h=x(a),v=f(a,s.options,h),E=m(a,s.options,v),_={isCanceled:!1};a.kill=u.bind(null,a.kill.bind(a)),a.cancel=d.bind(null,a,_);const A=c((async()=>{const[{error:t,exitCode:e,signal:n,timedOut:i},c,h,u]=await y(a,s.options,E),d=C(s.options,c),f=C(s.options,h),p=C(s.options,u);if(t||0!==e||null!==n){const c=l({error:t,exitCode:e,signal:n,stdout:d,stderr:f,all:p,command:r,escapedCommand:o,parsed:s,timedOut:i,isCanceled:_.isCanceled,killed:a.killed});if(!s.options.reject)return c;throw c}return{command:r,escapedCommand:o,exitCode:0,stdout:d,stderr:f,all:p,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return g(a,s.options.input),a.all=b(a,s.options),w(a,A)};t.exports=_,t.exports.sync=(t,e,n)=>{const s=j(t,e,n),r=O(t,e),o=S(t,e);let a;v(s.options);try{a=i.spawnSync(s.file,s.args,s.options)}catch(t){throw l({error:t,stdout:"",stderr:"",all:"",command:r,escapedCommand:o,parsed:s,timedOut:!1,isCanceled:!1,killed:!1})}const c=C(s.options,a.stdout,a.error),h=C(s.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const t=l({stdout:c,stderr:h,error:a.error,signal:a.signal,exitCode:a.status,command:r,escapedCommand:o,parsed:s,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!s.options.reject)return t;throw t}return{command:r,escapedCommand:o,exitCode:0,stdout:c,stderr:h,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},t.exports.command=(t,e)=>{const[n,...s]=E(t);return _(n,s,e)},t.exports.commandSync=(t,e)=>{const[n,...s]=E(t);return _.sync(n,s,e)},t.exports.node=(t,e,n={})=>{e&&!Array.isArray(e)&&"object"==typeof e&&(n=e,e=[]);const s=h.node(n),i=process.execArgv.filter((t=>!t.startsWith("--inspect"))),{nodePath:r=process.execPath,nodeOptions:o=i}=n;return _(r,[...o,t,...Array.isArray(e)?e:[]],{...n,stdin:void 0,stdout:void 0,stderr:void 0,stdio:s,shell:!1})}},82899:t=>{const e=(t,e=[])=>Array.isArray(e)?[t,...e]:[t],n=/^[\w.-]+$/,s=/"/g,i=/ +/g;t.exports={joinCommand:(t,n)=>e(t,n).join(" "),getEscapedCommand:(t,i)=>e(t,i).map((t=>(t=>"string"!=typeof t||n.test(t)?t:`"${t.replace(s,'\\"')}"`)(t))).join(" "),parseCommand:t=>{const e=[];for(const n of t.trim().split(i)){const t=e[e.length-1];t&&t.endsWith("\\")?e[e.length-1]=`${t.slice(0,-1)} ${n}`:e.push(n)}return e}}},97860:(t,e,n)=>{const{signalsByName:s}=n(83954);t.exports=({stdout:t,stderr:e,all:n,error:i,signal:r,exitCode:o,command:a,escapedCommand:c,timedOut:l,isCanceled:h,killed:u,parsed:{options:{timeout:d}}})=>{o=null===o?void 0:o;const f=void 0===(r=null===r?void 0:r)?void 0:s[r].description,p=(({timedOut:t,timeout:e,errorCode:n,signal:s,signalDescription:i,exitCode:r,isCanceled:o})=>t?`timed out after ${e} milliseconds`:o?"was canceled":void 0!==n?`failed with ${n}`:void 0!==s?`was killed with ${s} (${i})`:void 0!==r?`failed with exit code ${r}`:"failed")({timedOut:l,timeout:d,errorCode:i&&i.code,signal:r,signalDescription:f,exitCode:o,isCanceled:h}),m=`Command ${p}: ${a}`,g="[object Error]"===Object.prototype.toString.call(i),y=g?`${m}\n${i.message}`:m,b=[y,e,t].filter(Boolean).join("\n");return g?(i.originalMessage=i.message,i.message=b):i=new Error(b),i.shortMessage=y,i.command=a,i.escapedCommand=c,i.exitCode=o,i.signal=r,i.signalDescription=f,i.stdout=t,i.stderr=e,void 0!==n&&(i.all=n),"bufferedData"in i&&delete i.bufferedData,i.failed=!0,i.timedOut=Boolean(l),i.isCanceled=h,i.killed=u&&!l,i}},5454:(t,e,n)=>{const s=n(22037),i=n(90260),r=(t,e,n,s)=>{if(!o(e,n,s))return;const i=c(n),r=setTimeout((()=>{t("SIGKILL")}),i);r.unref&&r.unref()},o=(t,{forceKillAfterTimeout:e},n)=>a(t)&&!1!==e&&n,a=t=>t===s.constants.signals.SIGTERM||"string"==typeof t&&"SIGTERM"===t.toUpperCase(),c=({forceKillAfterTimeout:t=!0})=>{if(!0===t)return 5e3;if(!Number.isFinite(t)||t<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`);return t};t.exports={spawnedKill:(t,e="SIGTERM",n={})=>{const s=t(e);return r(t,e,n,s),s},spawnedCancel:(t,e)=>{t.kill()&&(e.isCanceled=!0)},setupTimeout:(t,{timeout:e,killSignal:n="SIGTERM"},s)=>{if(0===e||void 0===e)return s;let i;const r=new Promise(((s,r)=>{i=setTimeout((()=>{((t,e,n)=>{t.kill(e),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:e}))})(t,n,r)}),e)})),o=s.finally((()=>{clearTimeout(i)}));return Promise.race([r,o])},validateTimeout:({timeout:t})=>{if(void 0!==t&&(!Number.isFinite(t)||t<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`)},setExitHandler:async(t,{cleanup:e,detached:n},s)=>{if(!e||n)return s;const r=i((()=>{t.kill()}));return s.finally((()=>{r()}))}}},24578:t=>{const e=(async()=>{})().constructor.prototype,n=["then","catch","finally"].map((t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]));t.exports={mergePromise:(t,e)=>{for(const[s,i]of n){const n="function"==typeof e?(...t)=>Reflect.apply(i.value,e(),t):i.value.bind(e);Reflect.defineProperty(t,s,{...i,value:n})}return t},getSpawnedPromise:t=>new Promise(((e,n)=>{t.on("exit",((t,n)=>{e({exitCode:t,signal:n})})),t.on("error",(t=>{n(t)})),t.stdin&&t.stdin.on("error",(t=>{n(t)}))}))}},10407:t=>{const e=["stdin","stdout","stderr"],n=t=>{if(!t)return;const{stdio:n}=t;if(void 0===n)return e.map((e=>t[e]));if((t=>e.some((e=>void 0!==t[e])))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map((t=>`\`${t}\``)).join(", ")}`);if("string"==typeof n)return n;if(!Array.isArray(n))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof n}\``);const s=Math.max(n.length,e.length);return Array.from({length:s},((t,e)=>n[e]))};t.exports=n,t.exports.node=t=>{const e=n(t);return"ipc"===e?"ipc":void 0===e||"string"==typeof e?[e,e,e,"ipc"]:e.includes("ipc")?e:[...e,"ipc"]}},53036:(t,e,n)=>{const s=n(58607),i=n(29551),r=n(90873),o=async(t,e)=>{if(t){t.destroy();try{return await e}catch(t){return t.bufferedData}}},a=(t,{encoding:e,buffer:n,maxBuffer:s})=>{if(t&&n)return e?i(t,{encoding:e,maxBuffer:s}):i.buffer(t,{maxBuffer:s})};t.exports={handleInput:(t,e)=>{void 0!==e&&void 0!==t.stdin&&(s(e)?e.pipe(t.stdin):t.stdin.end(e))},makeAllStream:(t,{all:e})=>{if(!e||!t.stdout&&!t.stderr)return;const n=r();return t.stdout&&n.add(t.stdout),t.stderr&&n.add(t.stderr),n},getSpawnedResult:async({stdout:t,stderr:e,all:n},{encoding:s,buffer:i,maxBuffer:r},c)=>{const l=a(t,{encoding:s,buffer:i,maxBuffer:r}),h=a(e,{encoding:s,buffer:i,maxBuffer:r}),u=a(n,{encoding:s,buffer:i,maxBuffer:2*r});try{return await Promise.all([c,l,h,u])}catch(s){return Promise.all([{error:s,signal:s.signal,timedOut:s.timedOut},o(t,l),o(e,h),o(n,u)])}},validateInputSync:({input:t})=>{if(s(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}}},30361:(t,e,n)=>{const{PassThrough:s}=n(12781);t.exports=t=>{t={...t};const{array:e}=t;let{encoding:n}=t;const i="buffer"===n;let r=!1;e?r=!(n||i):n=n||"utf8",i&&(n=null);const o=new s({objectMode:r});n&&o.setEncoding(n);let a=0;const c=[];return o.on("data",(t=>{c.push(t),r?a=c.length:a+=t.length})),o.getBufferedValue=()=>e?c:i?Buffer.concat(c,a):c.join(""),o.getBufferedLength=()=>a,o}},29551:(t,e,n)=>{const{constants:s}=n(14300),i=n(12781),{promisify:r}=n(73837),o=n(30361),a=r(i.pipeline);class c extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,e){if(!t)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};const{maxBuffer:n}=e,i=o(e);return await new Promise(((e,r)=>{const o=t=>{t&&i.getBufferedLength()<=s.MAX_LENGTH&&(t.bufferedData=i.getBufferedValue()),r(t)};(async()=>{try{await a(t,i),e()}catch(t){o(t)}})(),i.on("data",(()=>{i.getBufferedLength()>n&&o(new c)}))})),i.getBufferedValue()}t.exports=l,t.exports.buffer=(t,e)=>l(t,{...e,encoding:"buffer"}),t.exports.array=(t,e)=>l(t,{...e,array:!0}),t.exports.MaxBufferError=c},55793:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SIGNALS=void 0;e.SIGNALS=[{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"}]},83954:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.signalsByNumber=e.signalsByName=void 0;var s=n(22037),i=n(49030),r=n(15260);const o=function(t,{name:e,number:n,description:s,supported:i,action:r,forced:o,standard:a}){return{...t,[e]:{name:e,number:n,description:s,supported:i,action:r,forced:o,standard:a}}},a=(0,i.getSignals)().reduce(o,{});e.signalsByName=a;const c=function(t,e){const n=l(t,e);if(void 0===n)return{};const{name:s,description:i,supported:r,action:o,forced:a,standard:c}=n;return{[t]:{name:s,number:t,description:i,supported:r,action:o,forced:a,standard:c}}},l=function(t,e){const n=e.find((({name:e})=>s.constants.signals[e]===t));return void 0!==n?n:e.find((e=>e.number===t))},h=function(){const t=(0,i.getSignals)(),e=r.SIGRTMAX+1,n=Array.from({length:e},((e,n)=>c(n,t)));return Object.assign({},...n)}();e.signalsByNumber=h},15260:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SIGRTMAX=e.getRealtimeSignals=void 0;e.getRealtimeSignals=function(){const t=i-s+1;return Array.from({length:t},n)};const n=function(t,e){return{name:`SIGRT${e+1}`,number:s+e,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},s=34,i=64;e.SIGRTMAX=i},49030:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSignals=void 0;var s=n(22037),i=n(55793),r=n(15260);e.getSignals=function(){const t=(0,r.getRealtimeSignals)();return[...i.SIGNALS,...t].map(o)};const o=function({name:t,number:e,description:n,action:i,forced:r=!1,standard:o}){const{signals:{[t]:a}}=s.constants,c=void 0!==a;return{name:t,number:c?a:e,description:n,supported:c,action:i,forced:r,standard:o}}},58607:t=>{const e=t=>null!==t&&"object"==typeof t&&"function"==typeof t.pipe;e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,t.exports=e},5909:(t,e,n)=>{var s;n(57147);function i(t,e,n){if("function"==typeof e&&(n=e,e={}),!n){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(n,s){i(t,e||{},(function(t,e){t?s(t):n(e)}))}))}s(t,e||{},(function(t,s){t&&("EACCES"===t.code||e&&e.ignoreErrors)&&(t=null,s=!1),n(t,s)}))}s="win32"===process.platform||global.TESTING_WINDOWS?n(90837):n(74703),t.exports=i,i.sync=function(t,e){try{return s.sync(t,e||{})}catch(t){if(e&&e.ignoreErrors||"EACCES"===t.code)return!1;throw t}}},74703:(t,e,n)=>{t.exports=i,i.sync=function(t,e){return r(s.statSync(t),e)};var s=n(57147);function i(t,e,n){s.stat(t,(function(t,s){n(t,!t&&r(s,e))}))}function r(t,e){return t.isFile()&&function(t,e){var n=t.mode,s=t.uid,i=t.gid,r=void 0!==e.uid?e.uid:process.getuid&&process.getuid(),o=void 0!==e.gid?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),h=a|c;return n&l||n&c&&i===o||n&a&&s===r||n&h&&0===r}(t,e)}},90837:(t,e,n)=>{t.exports=r,r.sync=function(t,e){return i(s.statSync(t),t,e)};var s=n(57147);function i(t,e,n){return!(!t.isSymbolicLink()&&!t.isFile())&&function(t,e){var n=void 0!==e.pathExt?e.pathExt:process.env.PATHEXT;if(!n)return!0;if(-1!==(n=n.split(";")).indexOf(""))return!0;for(var s=0;s<n.length;s++){var i=n[s].toLowerCase();if(i&&t.substr(-i.length).toLowerCase()===i)return!0}return!1}(e,n)}function r(t,e,n){s.stat(t,(function(s,r){n(s,!s&&i(r,t,e))}))}},90873:(t,e,n)=>{const{PassThrough:s}=n(12781);t.exports=function(){var t=[],e=new s({objectMode:!0});return e.setMaxListeners(0),e.add=n,e.isEmpty=i,e.on("unpipe",r),Array.prototype.slice.call(arguments).forEach(n),e;function n(s){return Array.isArray(s)?(s.forEach(n),this):(t.push(s),s.once("end",r.bind(null,s)),s.once("error",e.emit.bind(e,"error")),s.pipe(e,{end:!1}),this)}function i(){return 0==t.length}function r(n){!(t=t.filter((function(t){return t!==n}))).length&&e.readable&&e.end()}}},9002:(t,e,n)=>{const s=n(71017),i=n(26569),r=t=>{let e;t={cwd:process.cwd(),path:process.env[i()],execPath:process.execPath,...t};let n=s.resolve(t.cwd);const r=[];for(;e!==n;)r.push(s.join(n,"node_modules/.bin")),e=n,n=s.resolve(n,"..");const o=s.resolve(t.cwd,t.execPath,"..");return r.push(o),r.concat(t.path).join(s.delimiter)};t.exports=r,t.exports.default=r,t.exports.env=e=>{const n={...(e={env:process.env,...e}).env},s=i({env:n});return e.path=n[s],n[s]=t.exports(e),n}},83937:(t,e,n)=>{const s=n(26587),i=new WeakMap,r=(t,e={})=>{if("function"!=typeof t)throw new TypeError("Expected a function");let n,r=0;const o=t.displayName||t.name||"<anonymous>",a=function(...s){if(i.set(a,++r),1===r)n=t.apply(this,s),t=null;else if(!0===e.throw)throw new Error(`Function \`${o}\` can only be called once`);return n};return s(a,t),i.set(a,r),a};t.exports=r,t.exports.default=r,t.exports.callCount=t=>{if(!i.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return i.get(t)}},26587:t=>{const e=(t,e)=>{for(const n of Reflect.ownKeys(e))Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n));return t};t.exports=e,t.exports.default=e},26569:t=>{const e=(t={})=>{const e=t.env||process.env;return"win32"!==(t.platform||process.platform)?"PATH":Object.keys(e).reverse().find((t=>"PATH"===t.toUpperCase()))||"Path"};t.exports=e,t.exports.default=e},14256:(t,e,n)=>{const s=n(83882);t.exports=(t="")=>{const e=t.match(s);if(!e)return null;const[n,i]=e[0].replace(/#! ?/,"").split(" "),r=n.split("/").pop();return"env"===r?i:i?`${r} ${i}`:r}},83882:t=>{t.exports=/^#!(.*)/},90260:(t,e,n)=>{var s=global.process;const i=function(t){return t&&"object"==typeof t&&"function"==typeof t.removeListener&&"function"==typeof t.emit&&"function"==typeof t.reallyExit&&"function"==typeof t.listeners&&"function"==typeof t.kill&&"number"==typeof t.pid&&"function"==typeof t.on};if(i(s)){var r,o=n(39491),a=n(83261),c=/^win/i.test(s.platform),l=n(82361);"function"!=typeof l&&(l=l.EventEmitter),s.__signal_exit_emitter__?r=s.__signal_exit_emitter__:((r=s.__signal_exit_emitter__=new l).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),t.exports=function(t,e){if(!i(global.process))return function(){};o.equal(typeof t,"function","a callback must be provided for exit handler"),!1===f&&p();var n="exit";e&&e.alwaysLast&&(n="afterexit");return r.on(n,t),function(){r.removeListener(n,t),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&h()}};var h=function(){f&&i(global.process)&&(f=!1,a.forEach((function(t){try{s.removeListener(t,d[t])}catch(t){}})),s.emit=y,s.reallyExit=m,r.count-=1)};t.exports.unload=h;var u=function(t,e,n){r.emitted[t]||(r.emitted[t]=!0,r.emit(t,e,n))},d={};a.forEach((function(t){d[t]=function(){i(global.process)&&(s.listeners(t).length===r.count&&(h(),u("exit",null,t),u("afterexit",null,t),c&&"SIGHUP"===t&&(t="SIGINT"),s.kill(s.pid,t)))}})),t.exports.signals=function(){return a};var f=!1,p=function(){!f&&i(global.process)&&(f=!0,r.count+=1,a=a.filter((function(t){try{return s.on(t,d[t]),!0}catch(t){return!1}})),s.emit=b,s.reallyExit=g)};t.exports.load=p;var m=s.reallyExit,g=function(t){i(global.process)&&(s.exitCode=t||0,u("exit",s.exitCode,null),u("afterexit",s.exitCode,null),m.call(s,s.exitCode))},y=s.emit,b=function(t,e){if("exit"===t&&i(global.process)){void 0!==e&&(s.exitCode=e);var n=y.apply(this,arguments);return u("exit",s.exitCode,null),u("afterexit",s.exitCode,null),n}return y.apply(this,arguments)}}else t.exports=function(){return function(){}}},83261:t=>{t.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&t.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&t.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")},36178:t=>{t.exports=t=>{const e="string"==typeof t?"\n":"\n".charCodeAt(),n="string"==typeof t?"\r":"\r".charCodeAt();return t[t.length-1]===e&&(t=t.slice(0,t.length-1)),t[t.length-1]===n&&(t=t.slice(0,t.length-1)),t}},39491:e=>{e.exports=t(import.meta.url)("assert")},14300:e=>{e.exports=t(import.meta.url)("buffer")},32081:e=>{e.exports=t(import.meta.url)("child_process")},82361:e=>{e.exports=t(import.meta.url)("events")},57147:e=>{e.exports=t(import.meta.url)("fs")},22037:e=>{e.exports=t(import.meta.url)("os")},71017:e=>{e.exports=t(import.meta.url)("path")},12781:e=>{e.exports=t(import.meta.url)("stream")},76224:e=>{e.exports=t(import.meta.url)("tty")},73837:e=>{e.exports=t(import.meta.url)("util")}},o={};function a(t){var e=o[t];if(void 0!==e)return e.exports;var n=o[t]={id:t,loaded:!1,exports:{}};return r[t].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=r,n=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,a.t=function(t,s){if(1&s&&(t=this(t)),8&s)return t;if("object"==typeof t&&t){if(4&s&&t.__esModule)return t;if(16&s&&"function"==typeof t.then)return t}var i=Object.create(null);a.r(i);var r={};e=e||[null,n({}),n([]),n(n)];for(var o=2&s&&t;"object"==typeof o&&!~e.indexOf(o);o=n(o))Object.getOwnPropertyNames(o).forEach((e=>r[e]=()=>t[e]));return r.default=()=>t,a.d(i,r),i},a.d=(t,e)=>{for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},a.f={},a.e=t=>Promise.all(Object.keys(a.f).reduce(((e,n)=>(a.f[n](t,e),e)),[])),a.u=t=>t+".mjs",a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),s={442:0},i=t=>{var e,n,{ids:i,modules:r,runtime:o}=t,c=0;for(e in r)a.o(r,e)&&(a.m[e]=r[e]);for(o&&o(a);c<i.length;c++)n=i[c],a.o(s,n)&&s[n]&&s[n][0](),s[i[c]]=0},a.f.j=(t,e)=>{var n=a.o(s,t)?s[t]:void 0;if(0!==n)if(n)e.push(n[1]);else{var r=import("./"+a.u(t)).then(i,(e=>{throw 0!==s[t]&&(s[t]=void 0),e}));r=Promise.race([r,new Promise((e=>n=s[t]=[e]))]),e.push(n[1]=r)}},(()=>{var e={};a.r(e),a.d(e,{builder:()=>We,command:()=>Fe,description:()=>De});var n={};a.r(n),a.d(n,{builder:()=>en,command:()=>tn});var s=a(57147),i=a(39491);const r={right:function(t,e){t=t.trim();const n=l.stringWidth(t);if(n<e)return" ".repeat(e-n)+t;return t},center:function(t,e){t=t.trim();const n=l.stringWidth(t);if(n>=e)return t;return" ".repeat(e-n>>1)+t}};class o{constructor(t){var e;this.width=t.width,this.wrap=null===(e=t.wrap)||void 0===e||e,this.rows=[]}span(...t){this.div(...t).span=!0}resetOutput(){this.rows=[]}div(...t){if(0===t.length&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...t)&&"string"==typeof t[0])return this.applyLayoutDSL(t[0]);const e=t.map((t=>"string"==typeof t?this.colFromString(t):t));return this.rows.push(e),e}shouldApplyLayoutDSL(...t){return 1===t.length&&"string"==typeof t[0]&&/[\t\n]/.test(t[0])}applyLayoutDSL(t){const e=t.split("\n").map((t=>t.split("\t")));let n=0;return e.forEach((t=>{t.length>1&&l.stringWidth(t[0])>n&&(n=Math.min(Math.floor(.5*this.width),l.stringWidth(t[0])))})),e.forEach((t=>{this.div(...t.map(((e,s)=>({text:e.trim(),padding:this.measurePadding(e),width:0===s&&t.length>1?n:void 0}))))})),this.rows[this.rows.length-1]}colFromString(t){return{text:t,padding:this.measurePadding(t)}}measurePadding(t){const e=l.stripAnsi(t);return[0,e.match(/\s*$/)[0].length,0,e.match(/^\s*/)[0].length]}toString(){const t=[];return this.rows.forEach((e=>{this.rowToString(e,t)})),t.filter((t=>!t.hidden)).map((t=>t.text)).join("\n")}rowToString(t,e){return this.rasterize(t).forEach(((n,s)=>{let i="";n.forEach(((n,o)=>{const{width:a}=t[o],h=this.negatePadding(t[o]);let u=n;if(h>l.stringWidth(n)&&(u+=" ".repeat(h-l.stringWidth(n))),t[o].align&&"left"!==t[o].align&&this.wrap){u=(0,r[t[o].align])(u,h),l.stringWidth(u)<h&&(u+=" ".repeat((a||0)-l.stringWidth(u)-1))}const d=t[o].padding||[0,0,0,0];d[3]&&(i+=" ".repeat(d[3])),i+=c(t[o],u,"| "),i+=u,i+=c(t[o],u," |"),d[1]&&(i+=" ".repeat(d[1])),0===s&&e.length>0&&(i=this.renderInline(i,e[e.length-1]))})),e.push({text:i.replace(/ +$/,""),span:t.span})})),e}renderInline(t,e){const n=t.match(/^ */),s=n?n[0].length:0,i=e.text,r=l.stringWidth(i.trimRight());return e.span?this.wrap?s<r?t:(e.hidden=!0,i.trimRight()+" ".repeat(s-r)+t.trimLeft()):(e.hidden=!0,i+t):t}rasterize(t){const e=[],n=this.columnWidths(t);let s;return t.forEach(((t,i)=>{t.width=n[i],s=this.wrap?l.wrap(t.text,this.negatePadding(t),{hard:!0}).split("\n"):t.text.split("\n"),t.border&&(s.unshift("."+"-".repeat(this.negatePadding(t)+2)+"."),s.push("'"+"-".repeat(this.negatePadding(t)+2)+"'")),t.padding&&(s.unshift(...new Array(t.padding[0]||0).fill("")),s.push(...new Array(t.padding[2]||0).fill(""))),s.forEach(((t,n)=>{e[n]||e.push([]);const s=e[n];for(let t=0;t<i;t++)void 0===s[t]&&s.push("");s.push(t)}))})),e}negatePadding(t){let e=t.width||0;return t.padding&&(e-=(t.padding[3]||0)+(t.padding[1]||0)),t.border&&(e-=4),e}columnWidths(t){if(!this.wrap)return t.map((t=>t.width||l.stringWidth(t.text)));let e=t.length,n=this.width;const s=t.map((t=>{if(t.width)return e--,n-=t.width,t.width})),i=e?Math.floor(n/e):0;return s.map(((e,n)=>void 0===e?Math.max(i,function(t){const e=t.padding||[],n=1+(e[3]||0)+(e[1]||0);if(t.border)return n+4;return n}(t[n])):e))}}function c(t,e,n){return t.border?/[.']-+[.']/.test(e)?"":0!==e.trim().length?n:" ":""}let l;const h=new RegExp("\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function u(t){return t.replace(h,"")}function d(t,e){const[n,s]=t.match(h)||["",""];t=u(t);let i="";for(let n=0;n<t.length;n++)0!==n&&n%e==0&&(i+="\n"),i+=t.charAt(n);return n&&s&&(i=`${n}${i}${s}`),i}var f=a(71017);var p=a(73837);const m=t(import.meta.url)("url");function g(t){if(t!==t.toLowerCase()&&t!==t.toUpperCase()||(t=t.toLowerCase()),-1===t.indexOf("-")&&-1===t.indexOf("_"))return t;{let e="",n=!1;const s=t.match(/^-+/);for(let i=s?s[0].length:0;i<t.length;i++){let s=t.charAt(i);n&&(n=!1,s=s.toUpperCase()),0===i||"-"!==s&&"_"!==s?"-"!==s&&"_"!==s&&(e+=s):n=!0}return e}}function y(t,e){const n=t.toLowerCase();e=e||"-";let s="";for(let i=0;i<t.length;i++){const r=n.charAt(i),o=t.charAt(i);s+=r!==o&&i>0?`${e}${n.charAt(i)}`:o}return s}function b(t){return null!=t&&("number"==typeof t||(!!/^0x[0-9a-f]+$/i.test(t)||!/^0[^.]/.test(t)&&/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)))}var v;let w;!function(t){t.BOOLEAN="boolean",t.STRING="string",t.NUMBER="number",t.ARRAY="array"}(v||(v={}));function x(t){return void 0!==t?t+1:1}function O(t){return"__proto__"===t?"___proto___":t}const E=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12;if(process&&process.version){if(Number(process.version.match(/v([^.]+)/)[1])<E)throw Error(`yargs parser supports a minimum Node.js version of ${E}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`)}const S=process?process.env:{},j=new class{constructor(t){w=t}parse(t,e){const n=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},e),s=function(t){if(Array.isArray(t))return t.map((t=>"string"!=typeof t?t+"":t));t=t.trim();let e=0,n=null,s=null,i=null;const r=[];for(let o=0;o<t.length;o++)n=s,s=t.charAt(o)," "!==s||i?(s===i?i=null:"'"!==s&&'"'!==s||i||(i=s),r[e]||(r[e]=""),r[e]+=s):" "!==n&&e++;return r}(t),i="string"==typeof t,r=function(t){const e=[],n=Object.create(null);let s=!0;Object.keys(t).forEach((function(n){e.push([].concat(t[n],n))}));for(;s;){s=!1;for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++){if(e[t].filter((function(t){return-1!==e[n].indexOf(t)})).length){e[t]=e[t].concat(e[n]),e.splice(n,1),s=!0;break}}}return e.forEach((function(t){const e=(t=t.filter((function(t,e,n){return n.indexOf(t)===e}))).pop();void 0!==e&&"string"==typeof e&&(n[e]=t)})),n}(Object.assign(Object.create(null),n.alias)),o=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},n.configuration),a=Object.assign(Object.create(null),n.default),c=n.configObjects||[],l=n.envPrefix,h=o["populate--"],u=h?"--":"_",d=Object.create(null),f=Object.create(null),p=n.__||w.format,m={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:[]},E=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,S=new RegExp("^--"+o["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach((function(t){const e="object"==typeof t?t.key:t,n=Object.keys(t).map((function(t){return{boolean:"bools",string:"strings",number:"numbers"}[t]})).filter(Boolean).pop();n&&(m[n][e]=!0),m.arrays[e]=!0,m.keys.push(e)})),[].concat(n.boolean||[]).filter(Boolean).forEach((function(t){m.bools[t]=!0,m.keys.push(t)})),[].concat(n.string||[]).filter(Boolean).forEach((function(t){m.strings[t]=!0,m.keys.push(t)})),[].concat(n.number||[]).filter(Boolean).forEach((function(t){m.numbers[t]=!0,m.keys.push(t)})),[].concat(n.count||[]).filter(Boolean).forEach((function(t){m.counts[t]=!0,m.keys.push(t)})),[].concat(n.normalize||[]).filter(Boolean).forEach((function(t){m.normalize[t]=!0,m.keys.push(t)})),"object"==typeof n.narg&&Object.entries(n.narg).forEach((([t,e])=>{"number"==typeof e&&(m.nargs[t]=e,m.keys.push(t))})),"object"==typeof n.coerce&&Object.entries(n.coerce).forEach((([t,e])=>{"function"==typeof e&&(m.coercions[t]=e,m.keys.push(t))})),void 0!==n.config&&(Array.isArray(n.config)||"string"==typeof n.config?[].concat(n.config).filter(Boolean).forEach((function(t){m.configs[t]=!0})):"object"==typeof n.config&&Object.entries(n.config).forEach((([t,e])=>{"boolean"!=typeof e&&"function"!=typeof e||(m.configs[t]=e)}))),function(...t){t.forEach((function(t){Object.keys(t||{}).forEach((function(t){m.aliases[t]||(m.aliases[t]=[].concat(r[t]||[]),m.aliases[t].concat(t).forEach((function(e){if(/-/.test(e)&&o["camel-case-expansion"]){const n=g(e);n!==t&&-1===m.aliases[t].indexOf(n)&&(m.aliases[t].push(n),d[n]=!0)}})),m.aliases[t].concat(t).forEach((function(e){if(e.length>1&&/[A-Z]/.test(e)&&o["camel-case-expansion"]){const n=y(e,"-");n!==t&&-1===m.aliases[t].indexOf(n)&&(m.aliases[t].push(n),d[n]=!0)}})),m.aliases[t].forEach((function(e){m.aliases[e]=[t].concat(m.aliases[t].filter((function(t){return e!==t})))})))}))}))}(n.key,r,n.default,m.arrays),Object.keys(a).forEach((function(t){(m.aliases[t]||[]).forEach((function(e){a[e]=a[t]}))}));let j=null;Object.keys(m.counts).find((t=>W(t,m.arrays)?(j=Error(p("Invalid configuration: %s, opts.count excludes opts.array.",t)),!0):!!W(t,m.nargs)&&(j=Error(p("Invalid configuration: %s, opts.count excludes opts.narg.",t)),!0)));let C=[];const _=Object.assign(Object.create(null),{_:[]}),A={};for(let t=0;t<s.length;t++){const e=s[t],n=e.replace(/^-{3,}/,"---");let i,r,a,c,l,h;if("--"!==e&&B(e))k(e);else{if(n.match(/---+(=|$)/)){k(e);continue}if(e.match(/^--.+=/)||!o["short-option-groups"]&&e.match(/^-.+=/))c=e.match(/^--?([^=]+)=([\s\S]*)$/),null!==c&&Array.isArray(c)&&c.length>=3&&(W(c[1],m.arrays)?t=I(t,c[1],s,c[2]):!1!==W(c[1],m.nargs)?t=P(t,c[1],s,c[2]):$(c[1],c[2],!0));else if(e.match(S)&&o["boolean-negation"])c=e.match(S),null!==c&&Array.isArray(c)&&c.length>=2&&(r=c[1],$(r,!!W(r,m.arrays)&&[!1]));else if(e.match(/^--.+/)||!o["short-option-groups"]&&e.match(/^-[^-]+/))c=e.match(/^--?(.+)/),null!==c&&Array.isArray(c)&&c.length>=2&&(r=c[1],W(r,m.arrays)?t=I(t,r,s):!1!==W(r,m.nargs)?t=P(t,r,s):(l=s[t+1],void 0===l||l.match(/^-/)&&!l.match(E)||W(r,m.bools)||W(r,m.counts)?/^(true|false)$/.test(l)?($(r,l),t++):$(r,z(r)):($(r,l),t++)));else if(e.match(/^-.\..+=/))c=e.match(/^-([^=]+)=([\s\S]*)$/),null!==c&&Array.isArray(c)&&c.length>=3&&$(c[1],c[2]);else if(e.match(/^-.\..+/)&&!e.match(E))l=s[t+1],c=e.match(/^-(.\..+)/),null!==c&&Array.isArray(c)&&c.length>=2&&(r=c[1],void 0===l||l.match(/^-/)||W(r,m.bools)||W(r,m.counts)?$(r,z(r)):($(r,l),t++));else if(e.match(/^-[^-]+/)&&!e.match(E)){a=e.slice(1,-1).split(""),i=!1;for(let n=0;n<a.length;n++){if(l=e.slice(n+2),a[n+1]&&"="===a[n+1]){h=e.slice(n+3),r=a[n],W(r,m.arrays)?t=I(t,r,s,h):!1!==W(r,m.nargs)?t=P(t,r,s,h):$(r,h),i=!0;break}if("-"!==l){if(/[A-Za-z]/.test(a[n])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(l)&&!1===W(l,m.bools)){$(a[n],l),i=!0;break}if(a[n+1]&&a[n+1].match(/\W/)){$(a[n],l),i=!0;break}$(a[n],z(a[n]))}else $(a[n],l)}r=e.slice(-1)[0],i||"-"===r||(W(r,m.arrays)?t=I(t,r,s):!1!==W(r,m.nargs)?t=P(t,r,s):(l=s[t+1],void 0===l||/^(-|--)[^-]/.test(l)&&!l.match(E)||W(r,m.bools)||W(r,m.counts)?/^(true|false)$/.test(l)?($(r,l),t++):$(r,z(r)):($(r,l),t++)))}else if(e.match(/^-[0-9]$/)&&e.match(E)&&W(e.slice(1),m.bools))r=e.slice(1),$(r,z(r));else{if("--"===e){C=s.slice(t+1);break}if(o["halt-at-non-option"]){C=s.slice(t);break}k(e)}}}function k(t){const e=N("_",t);"string"!=typeof e&&"number"!=typeof e||_._.push(e)}function P(t,e,n,s){let i,r=W(e,m.nargs);if(r="number"!=typeof r||isNaN(r)?1:r,0===r)return H(s)||(j=Error(p("Argument unexpected for: %s",e))),$(e,z(e)),t;let a=H(s)?0:1;if(o["nargs-eats-options"])n.length-(t+1)+a<r&&(j=Error(p("Not enough arguments following: %s",e))),a=r;else{for(i=t+1;i<n.length&&(!n[i].match(/^-[^0-9]/)||n[i].match(E)||B(n[i]));i++)a++;a<r&&(j=Error(p("Not enough arguments following: %s",e)))}let c=Math.min(a,r);for(!H(s)&&c>0&&($(e,s),c--),i=t+1;i<c+t+1;i++)$(e,n[i]);return t+c}function I(t,e,n,s){let r=[],c=s||n[t+1];const l=W(e,m.nargs);if(W(e,m.bools)&&!/^(true|false)$/.test(c))r.push(!0);else if(H(c)||H(s)&&/^-/.test(c)&&!E.test(c)&&!B(c)){if(void 0!==a[e]){const t=a[e];r=Array.isArray(t)?t:[t]}}else{H(s)||r.push(T(e,s,!0));for(let s=t+1;s<n.length&&!(!o["greedy-arrays"]&&r.length>0||l&&"number"==typeof l&&r.length>=l)&&(c=n[s],!/^-/.test(c)||E.test(c)||B(c));s++)t=s,r.push(T(e,c,i))}return"number"==typeof l&&(l&&r.length<l||isNaN(l)&&0===r.length)&&(j=Error(p("Not enough arguments following: %s",e))),$(e,r),t}function $(t,e,n=i){if(/-/.test(t)&&o["camel-case-expansion"]){const e=t.split(".").map((function(t){return g(t)})).join(".");M(t,e)}const s=T(t,e,n),r=t.split(".");if(R(_,r,s),m.aliases[t]&&m.aliases[t].forEach((function(t){const e=t.split(".");R(_,e,s)})),r.length>1&&o["dot-notation"]&&(m.aliases[r[0]]||[]).forEach((function(e){let n=e.split(".");const i=[].concat(r);i.shift(),n=n.concat(i),(m.aliases[t]||[]).includes(n.join("."))||R(_,n,s)})),W(t,m.normalize)&&!W(t,m.arrays)){[t].concat(m.aliases[t]||[]).forEach((function(t){Object.defineProperty(A,t,{enumerable:!0,get:()=>e,set(t){e="string"==typeof t?w.normalize(t):t}})}))}}function M(t,e){m.aliases[t]&&m.aliases[t].length||(m.aliases[t]=[e],d[e]=!0),m.aliases[e]&&m.aliases[e].length||M(e,t)}function T(t,e,n){n&&(e=function(t){return"string"!=typeof t||"'"!==t[0]&&'"'!==t[0]||t[t.length-1]!==t[0]?t:t.substring(1,t.length-1)}(e)),(W(t,m.bools)||W(t,m.counts))&&"string"==typeof e&&(e="true"===e);let s=Array.isArray(e)?e.map((function(e){return N(t,e)})):N(t,e);return W(t,m.counts)&&(H(s)||"boolean"==typeof s)&&(s=x()),W(t,m.normalize)&&W(t,m.arrays)&&(s=Array.isArray(e)?e.map((t=>w.normalize(t))):w.normalize(e)),s}function N(t,e){if(!o["parse-positional-numbers"]&&"_"===t)return e;if(!W(t,m.strings)&&!W(t,m.bools)&&!Array.isArray(e)){(b(e)&&o["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${e}`)))||!H(e)&&W(t,m.numbers))&&(e=Number(e))}return e}function L(t,e){Object.keys(t).forEach((function(n){const s=t[n],i=e?e+"."+n:n;"object"==typeof s&&null!==s&&!Array.isArray(s)&&o["dot-notation"]?L(s,i):(!D(_,i.split("."))||W(i,m.arrays)&&o["combine-arrays"])&&$(i,s)}))}function G(t,e){if(void 0===l)return;const n="string"==typeof l?l:"",s=w.env();Object.keys(s).forEach((function(i){if(""===n||0===i.lastIndexOf(n,0)){const r=i.split("__").map((function(t,e){return 0===e&&(t=t.substring(n.length)),g(t)}));(e&&m.configs[r.join(".")]||!e)&&!D(t,r)&&$(r.join("."),s[i])}}))}function F(t,e,n,s=!1){Object.keys(n).forEach((function(i){D(t,i.split("."))||(R(t,i.split("."),n[i]),s&&(f[i]=!0),(e[i]||[]).forEach((function(e){D(t,e.split("."))||R(t,e.split("."),n[i])})))}))}function D(t,e){let n=t;o["dot-notation"]||(e=[e.join(".")]),e.slice(0,-1).forEach((function(t){n=n[t]||{}}));const s=e[e.length-1];return"object"==typeof n&&s in n}function R(t,e,n){let s=t;o["dot-notation"]||(e=[e.join(".")]),e.slice(0,-1).forEach((function(t){t=O(t),"object"==typeof s&&void 0===s[t]&&(s[t]={}),"object"!=typeof s[t]||Array.isArray(s[t])?(Array.isArray(s[t])?s[t].push({}):s[t]=[s[t],{}],s=s[t][s[t].length-1]):s=s[t]}));const i=O(e[e.length-1]),r=W(e.join("."),m.arrays),a=Array.isArray(n);let c=o["duplicate-arguments-array"];!c&&W(i,m.nargs)&&(c=!0,(!H(s[i])&&1===m.nargs[i]||Array.isArray(s[i])&&s[i].length===m.nargs[i])&&(s[i]=void 0)),n===x()?s[i]=x(s[i]):Array.isArray(s[i])?c&&r&&a?s[i]=o["flatten-duplicate-arrays"]?s[i].concat(n):(Array.isArray(s[i][0])?s[i]:[s[i]]).concat([n]):c||Boolean(r)!==Boolean(a)?s[i]=s[i].concat([n]):s[i]=n:void 0===s[i]&&r?s[i]=a?n:[n]:!c||void 0===s[i]||W(i,m.counts)||W(i,m.bools)?s[i]=n:s[i]=[s[i],n]}function W(t,e){const n=[].concat(m.aliases[t]||[],t),s=Object.keys(e),i=n.find((t=>s.includes(t)));return!!i&&e[i]}function U(t){const e=Object.keys(m);return[].concat(e.map((t=>m[t]))).some((function(e){return Array.isArray(e)?e.includes(t):e[t]}))}function B(t){return o["unknown-options-as-args"]&&function(t){if((t=t.replace(/^-{3,}/,"--")).match(E))return!1;if(function(t){if(t.match(E)||!t.match(/^-[^-]+/))return!1;let e,n=!0;const s=t.slice(1).split("");for(let i=0;i<s.length;i++){if(e=t.slice(i+2),!U(s[i])){n=!1;break}if(s[i+1]&&"="===s[i+1]||"-"===e||/[A-Za-z]/.test(s[i])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(e)||s[i+1]&&s[i+1].match(/\W/))break}return n}(t))return!1;return!function(t,...e){return[].concat(...e).some((function(e){const n=t.match(e);return n&&U(n[1])}))}(t,/^-+([^=]+?)=[\s\S]*$/,S,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}(t)}function z(t){return W(t,m.bools)||W(t,m.counts)||!(`${t}`in a)?(e=function(t){let e=v.BOOLEAN;return W(t,m.strings)?e=v.STRING:W(t,m.numbers)?e=v.NUMBER:W(t,m.bools)?e=v.BOOLEAN:W(t,m.arrays)&&(e=v.ARRAY),e}(t),{[v.BOOLEAN]:!0,[v.STRING]:"",[v.NUMBER]:void 0,[v.ARRAY]:[]}[e]):a[t];var e}function H(t){return void 0===t}return G(_,!0),G(_,!1),function(t){const e=Object.create(null);F(e,m.aliases,a),Object.keys(m.configs).forEach((function(n){const s=t[n]||e[n];if(s)try{let t=null;const e=w.resolve(w.cwd(),s),i=m.configs[n];if("function"==typeof i){try{t=i(e)}catch(e){t=e}if(t instanceof Error)return void(j=t)}else t=w.require(e);L(t)}catch(e){"PermissionDenied"===e.name?j=e:t[n]&&(j=Error(p("Invalid JSON config file: %s",s)))}}))}(_),void 0!==c&&c.forEach((function(t){L(t)})),F(_,m.aliases,a,!0),function(t){let e;const n=new Set;Object.keys(t).forEach((function(s){if(!n.has(s)&&(e=W(s,m.coercions),"function"==typeof e))try{const i=N(s,e(t[s]));[].concat(m.aliases[s]||[],s).forEach((e=>{n.add(e),t[e]=i}))}catch(t){j=t}}))}(_),o["set-placeholder-key"]&&function(t){m.keys.forEach((e=>{~e.indexOf(".")||void 0===t[e]&&(t[e]=void 0)}))}(_),Object.keys(m.counts).forEach((function(t){D(_,t.split("."))||$(t,0)})),h&&C.length&&(_[u]=[]),C.forEach((function(t){_[u].push(t)})),o["camel-case-expansion"]&&o["strip-dashed"]&&Object.keys(_).filter((t=>"--"!==t&&t.includes("-"))).forEach((t=>{delete _[t]})),o["strip-aliased"]&&[].concat(...Object.keys(r).map((t=>r[t]))).forEach((t=>{o["camel-case-expansion"]&&t.includes("-")&&delete _[t.split(".").map((t=>g(t))).join(".")],delete _[t]})),{aliases:Object.assign({},m.aliases),argv:Object.assign(A,_),configuration:o,defaulted:Object.assign({},f),error:j,newAliases:Object.assign({},d)}}}({cwd:process.cwd,env:()=>S,format:p.format,normalize:f.normalize,resolve:f.resolve,require:t=>{if("undefined"!=typeof require)return require(t);if(t.match(/\.json$/))return JSON.parse((0,s.readFileSync)(t,"utf8"));throw Error("only .json config files are supported in ESM")}}),C=function(t,e){return j.parse(t.slice(),e).argv};C.detailed=function(t,e){return j.parse(t.slice(),e)},C.camelCase=g,C.decamelize=y,C.looksLikeNumber=b;const _=C;function A(){return process.versions.electron&&!process.defaultApp?0:1}class k extends Error{constructor(t){super(t||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,k)}}const P={fs:{readFileSync:s.readFileSync,writeFile:s.writeFile},format:p.format,resolve:f.resolve,exists:t=>{try{return(0,s.statSync)(t).isFile()}catch(t){return!1}}};let I;class ${constructor(t){t=t||{},this.directory=t.directory||"./locales",this.updateFiles="boolean"!=typeof t.updateFiles||t.updateFiles,this.locale=t.locale||"en",this.fallbackToLanguage="boolean"!=typeof t.fallbackToLanguage||t.fallbackToLanguage,this.cache=Object.create(null),this.writeQueue=[]}__(...t){if("string"!=typeof arguments[0])return this._taggedLiteral(arguments[0],...arguments);const e=t.shift();let n=function(){};return"function"==typeof t[t.length-1]&&(n=t.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][e]&&this.updateFiles?(this.cache[this.locale][e]=e,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),I.format.apply(I.format,[this.cache[this.locale][e]||e].concat(t))}__n(){const t=Array.prototype.slice.call(arguments),e=t.shift(),n=t.shift(),s=t.shift();let i=function(){};"function"==typeof t[t.length-1]&&(i=t.pop()),this.cache[this.locale]||this._readLocaleFile();let r=1===s?e:n;if(this.cache[this.locale][e]){r=this.cache[this.locale][e][1===s?"one":"other"]}!this.cache[this.locale][e]&&this.updateFiles?(this.cache[this.locale][e]={one:e,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:i})):i();const o=[r];return~r.indexOf("%d")&&o.push(s),I.format.apply(I.format,o.concat(t))}setLocale(t){this.locale=t}getLocale(){return this.locale}updateLocale(t){this.cache[this.locale]||this._readLocaleFile();for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(this.cache[this.locale][e]=t[e])}_taggedLiteral(t,...e){let n="";return t.forEach((function(t,s){const i=e[s+1];n+=t,void 0!==i&&(n+="%s")})),this.__.apply(this,[n].concat([].slice.call(e,1)))}_enqueueWrite(t){this.writeQueue.push(t),1===this.writeQueue.length&&this._processWriteQueue()}_processWriteQueue(){const t=this,e=this.writeQueue[0],n=e.directory,s=e.locale,i=e.cb,r=this._resolveLocaleFile(n,s),o=JSON.stringify(this.cache[s],null,2);I.fs.writeFile(r,o,"utf-8",(function(e){t.writeQueue.shift(),t.writeQueue.length>0&&t._processWriteQueue(),i(e)}))}_readLocaleFile(){let t={};const e=this._resolveLocaleFile(this.directory,this.locale);try{I.fs.readFileSync&&(t=JSON.parse(I.fs.readFileSync(e,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+e),"ENOENT"!==n.code)throw n;t={}}this.cache[this.locale]=t}_resolveLocaleFile(t,e){let n=I.resolve(t,"./",e+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~e.lastIndexOf("_")){const s=I.resolve(t,"./",e.split("_")[0]+".json");this._fileExistsSync(s)&&(n=s)}return n}_fileExistsSync(t){return I.exists(t)}}const M=t=>function(t,e){I=e;const n=new $(t);return{__:n.__.bind(n),__n:n.__n.bind(n),setLocale:n.setLocale.bind(n),getLocale:n.getLocale.bind(n),updateLocale:n.updateLocale.bind(n),locale:n.locale}}(t,P),T="loading a directory of commands is not supported yet for ESM";let N;try{N=(0,m.fileURLToPath)(import.meta.url)}catch(t){N=process.cwd()}const L=N.substring(0,N.lastIndexOf("node_modules")),G={assert:{notStrictEqual:i.notStrictEqual,strictEqual:i.strictEqual},cliui:function(t){return function(t,e){return l=e,new o({width:(null==t?void 0:t.width)||("object"==typeof process&&process.stdout&&process.stdout.columns?process.stdout.columns:80),wrap:null==t?void 0:t.wrap})}(t,{stringWidth:t=>[...t].length,stripAnsi:u,wrap:d})},findUp:function(t,e){let n,i=(0,f.resolve)(".",t);for((0,s.statSync)(i).isDirectory()||(i=(0,f.dirname)(i));;){if(n=e(i,(0,s.readdirSync)(i)),n)return(0,f.resolve)(i,n);if(i=(0,f.dirname)(n=i),n===i)break}},getEnv:t=>process.env[t],inspect:p.inspect,getCallerFile:()=>{throw new k(T)},getProcessArgvBin:function(){return process.argv[A()]},mainFilename:L||process.cwd(),Parser:_,path:{basename:f.basename,dirname:f.dirname,extname:f.extname,relative:f.relative,resolve:f.resolve},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(t,e)=>process.emitWarning(t,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:void 0!==process.stdout.columns?process.stdout.columns:null},readFileSync:s.readFileSync,require:()=>{throw new k("require is not supported by ESM")},requireDirectory:()=>{throw new k(T)},stringWidth:t=>[...t].length,y18n:M({directory:(0,f.resolve)(N,"../../../locales"),updateFiles:!1})};function F(t,e,n,s){n.assert.notStrictEqual(t,e,s)}function D(t,e){e.assert.strictEqual(typeof t,"string")}function R(t){return Object.keys(t)}function W(t){return!!t&&!!t.then&&"function"==typeof t.then}function U(t){const e=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,s=e.shift();if(!s)throw new Error(`No command found in: ${t}`);const i={cmd:s.replace(n,""),demanded:[],optional:[]};return e.forEach(((t,s)=>{let r=!1;t=t.replace(/\s/g,""),/\.+[\]>]/.test(t)&&s===e.length-1&&(r=!0),/^\[/.test(t)?i.optional.push({cmd:t.replace(n,"").split("|"),variadic:r}):i.demanded.push({cmd:t.replace(n,"").split("|"),variadic:r})})),i}const B=["first","second","third","fourth","fifth","sixth"];function z(t,e,n){try{let s=0;const[i,r,o]="object"==typeof t?[{demanded:[],optional:[]},t,e]:[U(`cmd ${t}`),e,n],a=[].slice.call(r);for(;a.length&&void 0===a[a.length-1];)a.pop();const c=o||a.length;if(c<i.demanded.length)throw new k(`Not enough arguments provided. Expected ${i.demanded.length} but received ${a.length}.`);const l=i.demanded.length+i.optional.length;if(c>l)throw new k(`Too many arguments provided. Expected max ${l} but received ${c}.`);i.demanded.forEach((t=>{const e=H(a.shift());0===t.cmd.filter((t=>t===e||"*"===t)).length&&q(e,t.cmd,s),s+=1})),i.optional.forEach((t=>{if(0===a.length)return;const e=H(a.shift());0===t.cmd.filter((t=>t===e||"*"===t)).length&&q(e,t.cmd,s),s+=1}))}catch(t){console.warn(t.stack)}}function H(t){return Array.isArray(t)?"array":null===t?"null":typeof t}function q(t,e,n){throw new k(`Invalid ${B[n]||"manyith"} argument. Expected ${e.join(" or ")} but received ${t}.`)}class V{constructor(t){this.globalMiddleware=[],this.frozens=[],this.yargs=t}addMiddleware(t,e,n=!0,s=!1){if(z("<array|function> [boolean] [boolean] [boolean]",[t,e,n],arguments.length),Array.isArray(t)){for(let s=0;s<t.length;s++){if("function"!=typeof t[s])throw Error("middleware must be a function");const i=t[s];i.applyBeforeValidation=e,i.global=n}Array.prototype.push.apply(this.globalMiddleware,t)}else if("function"==typeof t){const i=t;i.applyBeforeValidation=e,i.global=n,i.mutates=s,this.globalMiddleware.push(t)}return this.yargs}addCoerceMiddleware(t,e){const n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter((t=>{const s=[...n[e]||[],e];return!t.option||!s.includes(t.option)})),t.option=e,this.addMiddleware(t,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){const t=this.frozens.pop();void 0!==t&&(this.globalMiddleware=t)}reset(){this.globalMiddleware=this.globalMiddleware.filter((t=>t.global))}}function K(t,e,n,s){return n.reduce(((t,n)=>{if(n.applyBeforeValidation!==s)return t;if(n.mutates){if(n.applied)return t;n.applied=!0}if(W(t))return t.then((t=>Promise.all([t,n(t,e)]))).then((([t,e])=>Object.assign(t,e)));{const s=n(t,e);return W(s)?s.then((e=>Object.assign(t,e))):Object.assign(t,s)}}),t)}function Y(t,e,n=(t=>{throw t})){try{const n="function"==typeof t?t():t;return W(n)?n.then((t=>e(t))):e(n)}catch(t){return n(t)}}const X=/(^\*)|(^\$0)/;class J{constructor(t,e,n,s){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=s,this.usage=t,this.globalMiddleware=n,this.validation=e}addDirectory(t,e,n,s){"boolean"!=typeof(s=s||{}).recurse&&(s.recurse=!1),Array.isArray(s.extensions)||(s.extensions=["js"]);const i="function"==typeof s.visit?s.visit:t=>t;s.visit=(t,e,n)=>{const s=i(t,e,n);if(s){if(this.requireCache.has(e))return s;this.requireCache.add(e),this.addHandler(s)}return s},this.shim.requireDirectory({require:e,filename:n},t,s)}addHandler(t,e,n,s,i,r){let o=[];const a=function(t){return t?t.map((t=>(t.applyBeforeValidation=!1,t))):[]}(i);if(s=s||(()=>{}),Array.isArray(t))if(function(t){return t.every((t=>"string"==typeof t))}(t))[t,...o]=t;else for(const e of t)this.addHandler(e);else{if(function(t){return"object"==typeof t&&!Array.isArray(t)}(t)){let e=Array.isArray(t.command)||"string"==typeof t.command?t.command:this.moduleName(t);return t.aliases&&(e=[].concat(e).concat(t.aliases)),void this.addHandler(e,this.extractDesc(t),t.builder,t.handler,t.middlewares,t.deprecated)}if(Q(n))return void this.addHandler([t].concat(o),e,n.builder,n.handler,n.middlewares,n.deprecated)}if("string"==typeof t){const i=U(t);o=o.map((t=>U(t).cmd));let c=!1;const l=[i.cmd].concat(o).filter((t=>!X.test(t)||(c=!0,!1)));0===l.length&&c&&l.push("$0"),c&&(i.cmd=l[0],o=l.slice(1),t=t.replace(X,i.cmd)),o.forEach((t=>{this.aliasMap[t]=i.cmd})),!1!==e&&this.usage.command(t,e,c,o,r),this.handlers[i.cmd]={original:t,description:e,handler:s,builder:n||{},middlewares:a,deprecated:r,demanded:i.demanded,optional:i.optional},c&&(this.defaultCommand=this.handlers[i.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(t,e,n,s,i,r){const o=this.handlers[t]||this.handlers[this.aliasMap[t]]||this.defaultCommand,a=e.getInternalMethods().getContext(),c=a.commands.slice(),l=!t;t&&(a.commands.push(t),a.fullCommands.push(o.original));const h=this.applyBuilderUpdateUsageAndParse(l,o,e,n.aliases,c,s,i,r);return W(h)?h.then((t=>this.applyMiddlewareAndGetResult(l,o,t.innerArgv,a,i,t.aliases,e))):this.applyMiddlewareAndGetResult(l,o,h.innerArgv,a,i,h.aliases,e)}applyBuilderUpdateUsageAndParse(t,e,n,s,i,r,o,a){const c=e.builder;let l=n;if(Z(c)){const h=c(n.getInternalMethods().reset(s),a);if(W(h))return h.then((s=>{var a;return l=(a=s)&&"function"==typeof a.getInternalMethods?s:n,this.parseAndUpdateUsage(t,e,l,i,r,o)}))}else(function(t){return"object"==typeof t})(c)&&(l=n.getInternalMethods().reset(s),Object.keys(e.builder).forEach((t=>{l.option(t,c[t])})));return this.parseAndUpdateUsage(t,e,l,i,r,o)}parseAndUpdateUsage(t,e,n,s,i,r){t&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(s,e),e.description);const o=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,i,r);return W(o)?o.then((t=>({aliases:n.parsed.aliases,innerArgv:t}))):{aliases:n.parsed.aliases,innerArgv:o}}shouldUpdateUsage(t){return!t.getInternalMethods().getUsageInstance().getUsageDisabled()&&0===t.getInternalMethods().getUsageInstance().getUsage().length}usageFromParentCommandsCommandHandler(t,e){const n=X.test(e.original)?e.original.replace(X,"").trim():e.original,s=t.filter((t=>!X.test(t)));return s.push(n),`$0 ${s.join(" ")}`}handleValidationAndGetResult(t,e,n,s,i,r,o,a){if(!r.getInternalMethods().getHasOutput()){const e=r.getInternalMethods().runValidation(i,a,r.parsed.error,t);n=Y(n,(t=>(e(t),t)))}if(e.handler&&!r.getInternalMethods().getHasOutput()){r.getInternalMethods().setHasOutput();const s=!!r.getOptions().configuration["populate--"];r.getInternalMethods().postProcess(n,s,!1,!1),n=Y(n=K(n,r,o,!1),(t=>{const n=e.handler(t);return W(n)?n.then((()=>t)):t})),t||r.getInternalMethods().getUsageInstance().cacheHelpMessage(),W(n)&&!r.getInternalMethods().hasParseCallback()&&n.catch((t=>{try{r.getInternalMethods().getUsageInstance().fail(null,t)}catch(t){}}))}return t||(s.commands.pop(),s.fullCommands.pop()),n}applyMiddlewareAndGetResult(t,e,n,s,i,r,o){let a={};if(i)return n;o.getInternalMethods().getHasOutput()||(a=this.populatePositionals(e,n,s,o));const c=this.globalMiddleware.getMiddleware().slice(0).concat(e.middlewares),l=K(n,o,c,!0);return W(l)?l.then((n=>this.handleValidationAndGetResult(t,e,n,s,r,o,c,a))):this.handleValidationAndGetResult(t,e,l,s,r,o,c,a)}populatePositionals(t,e,n,s){e._=e._.slice(n.commands.length);const i=t.demanded.slice(0),r=t.optional.slice(0),o={};for(this.validation.positionalCount(i.length,e._.length);i.length;){const t=i.shift();this.populatePositional(t,e,o)}for(;r.length;){const t=r.shift();this.populatePositional(t,e,o)}return e._=n.commands.concat(e._.map((t=>""+t))),this.postProcessPositionals(e,o,this.cmdToParseOptions(t.original),s),o}populatePositional(t,e,n){const s=t.cmd[0];t.variadic?n[s]=e._.splice(0).map(String):e._.length&&(n[s]=[String(e._.shift())])}cmdToParseOptions(t){const e={array:[],default:{},alias:{},demand:{}},n=U(t);return n.demanded.forEach((t=>{const[n,...s]=t.cmd;t.variadic&&(e.array.push(n),e.default[n]=[]),e.alias[n]=s,e.demand[n]=!0})),n.optional.forEach((t=>{const[n,...s]=t.cmd;t.variadic&&(e.array.push(n),e.default[n]=[]),e.alias[n]=s})),e}postProcessPositionals(t,e,n,s){const i=Object.assign({},s.getOptions());i.default=Object.assign(n.default,i.default);for(const t of Object.keys(n.alias))i.alias[t]=(i.alias[t]||[]).concat(n.alias[t]);i.array=i.array.concat(n.array),i.config={};const r=[];if(Object.keys(e).forEach((t=>{e[t].map((e=>{i.configuration["unknown-options-as-args"]&&(i.key[t]=!0),r.push(`--${t}`),r.push(e)}))})),!r.length)return;const o=Object.assign({},i.configuration,{"populate--":!1}),a=this.shim.Parser.detailed(r,Object.assign({},i,{configuration:o}));if(a.error)s.getInternalMethods().getUsageInstance().fail(a.error.message,a.error);else{const n=Object.keys(e);Object.keys(e).forEach((t=>{n.push(...a.aliases[t])})),Object.keys(a.argv).forEach((i=>{n.includes(i)&&(e[i]||(e[i]=a.argv[i]),!this.isInConfigs(s,i)&&!this.isDefaulted(s,i)&&Object.prototype.hasOwnProperty.call(t,i)&&Object.prototype.hasOwnProperty.call(a.argv,i)&&(Array.isArray(t[i])||Array.isArray(a.argv[i]))?t[i]=[].concat(t[i],a.argv[i]):t[i]=a.argv[i])}))}}isDefaulted(t,e){const{default:n}=t.getOptions();return Object.prototype.hasOwnProperty.call(n,e)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(e))}isInConfigs(t,e){const{configObjects:n}=t.getOptions();return n.some((t=>Object.prototype.hasOwnProperty.call(t,e)))||n.some((t=>Object.prototype.hasOwnProperty.call(t,this.shim.Parser.camelCase(e))))}runDefaultBuilderOn(t){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(t)){const e=X.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");t.getInternalMethods().getUsageInstance().usage(e,this.defaultCommand.description)}const e=this.defaultCommand.builder;if(Z(e))return e(t,!0);Q(e)||Object.keys(e).forEach((n=>{t.option(n,e[n])}))}moduleName(t){const e=function(t){if("undefined"==typeof require)return null;for(let e,n=0,s=Object.keys(require.cache);n<s.length;n++)if(e=require.cache[s[n]],e.exports===t)return e;return null}(t);if(!e)throw new Error(`No command name given for module: ${this.shim.inspect(t)}`);return this.commandFromFilename(e.filename)}commandFromFilename(t){return this.shim.path.basename(t,this.shim.path.extname(t))}extractDesc({describe:t,description:e,desc:n}){for(const s of[t,e,n]){if("string"==typeof s||!1===s)return s;F(s,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){const t=this.frozens.pop();F(t,void 0,this.shim),({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=t)}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}}function Q(t){return"object"==typeof t&&!!t.builder&&"function"==typeof t.handler}function Z(t){return"function"==typeof t}function tt(t={},e=(()=>!0)){const n={};return R(t).forEach((s=>{e(s,t[s])&&(n[s]=t[s])})),n}function et(t){"undefined"!=typeof process&&[process.stdout,process.stderr].forEach((e=>{const n=e;n._handle&&n.isTTY&&"function"==typeof n._handle.setBlocking&&n._handle.setBlocking(t)}))}function nt(t){return"boolean"==typeof t}function st(t,e){const n=e.y18n.__,s={},i=[];s.failFn=function(t){i.push(t)};let r=null,o=null,a=!0;s.showHelpOnFail=function(e=!0,n){const[i,c]="string"==typeof e?[!0,e]:[e,n];return t.getInternalMethods().isGlobalContext()&&(o=c),r=c,a=i,s};let c=!1;s.fail=function(e,n){const l=t.getInternalMethods().getLoggerInstance();if(!i.length){if(t.getExitProcess()&&et(!0),!c){c=!0,a&&(t.showHelp("error"),l.error()),(e||n)&&l.error(e||n);const s=r||o;s&&((e||n)&&l.error(""),l.error(s))}if(n=n||new k(e),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,n);throw n}for(let t=i.length-1;t>=0;--t){const r=i[t];if(nt(r)){if(n)throw n;if(e)throw Error(e)}else r(e,n,s)}};let l=[],h=!1;s.usage=(t,e)=>null===t?(h=!0,l=[],s):(h=!1,l.push([t,e||""]),s),s.getUsage=()=>l,s.getUsageDisabled=()=>h,s.getPositionalGroupName=()=>n("Positionals:");let u=[];s.example=(t,e)=>{u.push([t,e||""])};let d=[];s.command=function(t,e,n,s,i=!1){n&&(d=d.map((t=>(t[2]=!1,t)))),d.push([t,e||"",n,s,i])},s.getCommands=()=>d;let f={};s.describe=function(t,e){Array.isArray(t)?t.forEach((t=>{s.describe(t,e)})):"object"==typeof t?Object.keys(t).forEach((e=>{s.describe(e,t[e])})):f[t]=e},s.getDescriptions=()=>f;let p=[];s.epilog=t=>{p.push(t)};let m,g=!1;function y(){return g||(m=function(){const t=80;return e.process.stdColumns?Math.min(t,e.process.stdColumns):t}(),g=!0),m}s.wrap=t=>{g=!0,m=t};const b="__yargsString__:";function v(t,n,s){let i=0;return Array.isArray(t)||(t=Object.values(t).map((t=>[t]))),t.forEach((t=>{i=Math.max(e.stringWidth(s?`${s} ${ot(t[0])}`:ot(t[0]))+rt(t[0]),i)})),n&&(i=Math.min(i,parseInt((.5*n).toString(),10))),i}let w;function x(e){return t.getOptions().hiddenOptions.indexOf(e)<0||t.parsed.argv[t.getOptions().showHiddenOpt]}function O(t,e){let s=`[${n("default:")} `;if(void 0===t&&!e)return null;if(e)s+=e;else switch(typeof t){case"string":s+=`"${t}"`;break;case"object":s+=JSON.stringify(t);break;default:s+=t}return`${s}]`}s.deferY18nLookup=t=>b+t,s.help=function(){if(w)return w;!function(){const e=t.getDemandedOptions(),n=t.getOptions();(Object.keys(n.alias)||[]).forEach((i=>{n.alias[i].forEach((r=>{f[r]&&s.describe(i,f[r]),r in e&&t.demandOption(i,e[r]),n.boolean.includes(r)&&t.boolean(i),n.count.includes(r)&&t.count(i),n.string.includes(r)&&t.string(i),n.normalize.includes(r)&&t.normalize(i),n.array.includes(r)&&t.array(i),n.number.includes(r)&&t.number(i)}))}))}();const i=t.customScriptName?t.$0:e.path.basename(t.$0),r=t.getDemandedOptions(),o=t.getDemandedCommands(),a=t.getDeprecatedOptions(),c=t.getGroups(),m=t.getOptions();let g=[];g=g.concat(Object.keys(f)),g=g.concat(Object.keys(r)),g=g.concat(Object.keys(o)),g=g.concat(Object.keys(m.default)),g=g.filter(x),g=Object.keys(g.reduce(((t,e)=>("_"!==e&&(t[e]=!0),t)),{}));const E=y(),S=e.cliui({width:E,wrap:!!E});if(!h)if(l.length)l.forEach((t=>{S.div({text:`${t[0].replace(/\$0/g,i)}`}),t[1]&&S.div({text:`${t[1]}`,padding:[1,0,0,0]})})),S.div();else if(d.length){let t=null;t=o._?`${i} <${n("command")}>\n`:`${i} [${n("command")}]\n`,S.div(`${t}`)}if(d.length>1||1===d.length&&!d[0][2]){S.div(n("Commands:"));const e=t.getInternalMethods().getContext(),s=e.commands.length?`${e.commands.join(" ")} `:"";!0===t.getInternalMethods().getParserConfiguration()["sort-commands"]&&(d=d.sort(((t,e)=>t[0].localeCompare(e[0]))));const r=i?`${i} `:"";d.forEach((t=>{const e=`${r}${s}${t[0].replace(/^\$0 ?/,"")}`;S.span({text:e,padding:[0,2,0,2],width:v(d,E,`${i}${s}`)+4},{text:t[1]});const o=[];t[2]&&o.push(`[${n("default")}]`),t[3]&&t[3].length&&o.push(`[${n("aliases:")} ${t[3].join(", ")}]`),t[4]&&("string"==typeof t[4]?o.push(`[${n("deprecated: %s",t[4])}]`):o.push(`[${n("deprecated")}]`)),o.length?S.div({text:o.join(" "),padding:[0,0,0,2],align:"right"}):S.div()})),S.div()}const j=(Object.keys(m.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);g=g.filter((e=>!t.parsed.newAliases[e]&&j.every((t=>-1===(m.alias[t]||[]).indexOf(e)))));const C=n("Options:");c[C]||(c[C]=[]),function(t,e,n,s){let i=[],r=null;Object.keys(n).forEach((t=>{i=i.concat(n[t])})),t.forEach((t=>{r=[t].concat(e[t]),r.some((t=>-1!==i.indexOf(t)))||n[s].push(t)}))}(g,m.alias,c,C);const _=t=>/^--/.test(ot(t)),A=Object.keys(c).filter((t=>c[t].length>0)).map((t=>({groupName:t,normalizedKeys:c[t].filter(x).map((t=>{if(j.includes(t))return t;for(let e,n=0;void 0!==(e=j[n]);n++)if((m.alias[e]||[]).includes(t))return e;return t}))}))).filter((({normalizedKeys:t})=>t.length>0)).map((({groupName:t,normalizedKeys:e})=>{const n=e.reduce(((e,n)=>(e[n]=[n].concat(m.alias[n]||[]).map((e=>t===s.getPositionalGroupName()?e:(/^[0-9]$/.test(e)?m.boolean.includes(n)?"-":"--":e.length>1?"--":"-")+e)).sort(((t,e)=>_(t)===_(e)?0:_(t)?1:-1)).join(", "),e)),{});return{groupName:t,normalizedKeys:e,switches:n}}));if(A.filter((({groupName:t})=>t!==s.getPositionalGroupName())).some((({normalizedKeys:t,switches:e})=>!t.every((t=>_(e[t])))))&&A.filter((({groupName:t})=>t!==s.getPositionalGroupName())).forEach((({normalizedKeys:t,switches:e})=>{t.forEach((t=>{var n,s;_(e[t])&&(e[t]=(n=e[t],s="-x, ".length,it(n)?{text:n.text,indentation:n.indentation+s}:{text:n,indentation:s}))}))})),A.forEach((({groupName:t,normalizedKeys:e,switches:i})=>{S.div(t),e.forEach((t=>{const e=i[t];let o=f[t]||"",c=null;o.includes(b)&&(o=n(o.substring(b.length))),m.boolean.includes(t)&&(c=`[${n("boolean")}]`),m.count.includes(t)&&(c=`[${n("count")}]`),m.string.includes(t)&&(c=`[${n("string")}]`),m.normalize.includes(t)&&(c=`[${n("string")}]`),m.array.includes(t)&&(c=`[${n("array")}]`),m.number.includes(t)&&(c=`[${n("number")}]`);const l=[t in a?(h=a[t],"string"==typeof h?`[${n("deprecated: %s",h)}]`:`[${n("deprecated")}]`):null,c,t in r?`[${n("required")}]`:null,m.choices&&m.choices[t]?`[${n("choices:")} ${s.stringifiedValues(m.choices[t])}]`:null,O(m.default[t],m.defaultDescription[t])].filter(Boolean).join(" ");var h;S.span({text:ot(e),padding:[0,2,0,2+rt(e)],width:v(i,E)+4},o),l?S.div({text:l,padding:[0,0,0,2],align:"right"}):S.div()})),S.div()})),u.length&&(S.div(n("Examples:")),u.forEach((t=>{t[0]=t[0].replace(/\$0/g,i)})),u.forEach((t=>{""===t[1]?S.div({text:t[0],padding:[0,2,0,2]}):S.div({text:t[0],padding:[0,2,0,2],width:v(u,E)+4},{text:t[1]})})),S.div()),p.length>0){const t=p.map((t=>t.replace(/\$0/g,i))).join("\n");S.div(`${t}\n`)}return S.toString().replace(/\s*$/,"")},s.cacheHelpMessage=function(){w=this.help()},s.clearCachedHelpMessage=function(){w=void 0},s.hasCachedHelpMessage=function(){return!!w},s.showHelp=e=>{const n=t.getInternalMethods().getLoggerInstance();e||(e="error");("function"==typeof e?e:n[e])(s.help())},s.functionDescription=t=>["(",t.name?e.Parser.decamelize(t.name,"-"):n("generated-value"),")"].join(""),s.stringifiedValues=function(t,e){let n="";const s=e||", ",i=[].concat(t);return t&&i.length?(i.forEach((t=>{n.length&&(n+=s),n+=JSON.stringify(t)})),n):n};let E=null;s.version=t=>{E=t},s.showVersion=e=>{const n=t.getInternalMethods().getLoggerInstance();e||(e="error");("function"==typeof e?e:n[e])(E)},s.reset=function(t){return r=null,c=!1,l=[],h=!1,p=[],u=[],d=[],f=tt(f,(e=>!t[e])),s};const S=[];return s.freeze=function(){S.push({failMessage:r,failureOutput:c,usages:l,usageDisabled:h,epilogs:p,examples:u,commands:d,descriptions:f})},s.unfreeze=function(t=!1){const e=S.pop();e&&(t?(f={...e.descriptions,...f},d=[...e.commands,...d],l=[...e.usages,...l],u=[...e.examples,...u],p=[...e.epilogs,...p]):({failMessage:r,failureOutput:c,usages:l,usageDisabled:h,epilogs:p,examples:u,commands:d,descriptions:f}=e))},s}function it(t){return"object"==typeof t}function rt(t){return it(t)?t.indentation:0}function ot(t){return it(t)?t.text:t}class at{constructor(t,e,n,s){var i,r,o;this.yargs=t,this.usage=e,this.command=n,this.shim=s,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=null!==(o=(null===(i=this.shim.getEnv("SHELL"))||void 0===i?void 0:i.includes("zsh"))||(null===(r=this.shim.getEnv("ZSH_NAME"))||void 0===r?void 0:r.includes("zsh")))&&void 0!==o&&o}defaultCompletion(t,e,n,s){const i=this.command.getCommandHandlers();for(let e=0,n=t.length;e<n;++e)if(i[t[e]]&&i[t[e]].builder){const n=i[t[e]].builder;if(Z(n)){this.indexAfterLastReset=e+1;const t=this.yargs.getInternalMethods().reset();return n(t,!0),t.argv}}const r=[];this.commandCompletions(r,t,n),this.optionCompletions(r,t,e,n),this.choicesFromOptionsCompletions(r,t,e,n),this.choicesFromPositionalsCompletions(r,t,e,n),s(null,r)}commandCompletions(t,e,n){const s=this.yargs.getInternalMethods().getContext().commands;n.match(/^-/)||s[s.length-1]===n||this.previousArgHasChoices(e)||this.usage.getCommands().forEach((n=>{const s=U(n[0]).cmd;if(-1===e.indexOf(s))if(this.zshShell){const e=n[1]||"";t.push(s.replace(/:/g,"\\:")+":"+e)}else t.push(s)}))}optionCompletions(t,e,n,s){if((s.match(/^-/)||""===s&&0===t.length)&&!this.previousArgHasChoices(e)){const n=this.yargs.getOptions(),i=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(n.key).forEach((r=>{const o=!!n.configuration["boolean-negation"]&&n.boolean.includes(r);i.includes(r)||n.hiddenOptions.includes(r)||this.argsContainKey(e,r,o)||(this.completeOptionKey(r,t,s),o&&n.default[r]&&this.completeOptionKey(`no-${r}`,t,s))}))}}choicesFromOptionsCompletions(t,e,n,s){if(this.previousArgHasChoices(e)){const n=this.getPreviousArgChoices(e);n&&n.length>0&&t.push(...n.map((t=>t.replace(/:/g,"\\:"))))}}choicesFromPositionalsCompletions(t,e,n,s){if(""===s&&t.length>0&&this.previousArgHasChoices(e))return;const i=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],r=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),o=i[n._.length-r-1];if(!o)return;const a=this.yargs.getOptions().choices[o]||[];for(const e of a)e.startsWith(s)&&t.push(e.replace(/:/g,"\\:"))}getPreviousArgChoices(t){if(t.length<1)return;let e=t[t.length-1],n="";if(!e.startsWith("-")&&t.length>1&&(n=e,e=t[t.length-2]),!e.startsWith("-"))return;const s=e.replace(/^-+/,""),i=this.yargs.getOptions(),r=[s,...this.yargs.getAliases()[s]||[]];let o;for(const t of r)if(Object.prototype.hasOwnProperty.call(i.key,t)&&Array.isArray(i.choices[t])){o=i.choices[t];break}return o?o.filter((t=>!n||t.startsWith(n))):void 0}previousArgHasChoices(t){const e=this.getPreviousArgChoices(t);return void 0!==e&&e.length>0}argsContainKey(t,e,n){const s=e=>-1!==t.indexOf((/^[^0-9]$/.test(e)?"-":"--")+e);if(s(e))return!0;if(n&&s(`no-${e}`))return!0;if(this.aliases)for(const t of this.aliases[e])if(s(t))return!0;return!1}completeOptionKey(t,e,n){const s=this.usage.getDescriptions(),i=!/^--/.test(n)&&(t=>/^[^0-9]$/.test(t))(t)?"-":"--";if(this.zshShell){const n=s[t]||"";e.push(i+`${t.replace(/:/g,"\\:")}:${n.replace("__yargsString__:","")}`)}else e.push(i+t)}customCompletion(t,e,n,s){if(F(this.customCompletionFunction,null,this.shim),this.customCompletionFunction.length<3){const t=this.customCompletionFunction(n,e);return W(t)?t.then((t=>{this.shim.process.nextTick((()=>{s(null,t)}))})).catch((t=>{this.shim.process.nextTick((()=>{s(t,void 0)}))})):s(null,t)}return function(t){return t.length>3}(this.customCompletionFunction)?this.customCompletionFunction(n,e,((i=s)=>this.defaultCompletion(t,e,n,i)),(t=>{s(null,t)})):this.customCompletionFunction(n,e,(t=>{s(null,t)}))}getCompletion(t,e){const n=t.length?t[t.length-1]:"",s=this.yargs.parse(t,!0),i=this.customCompletionFunction?s=>this.customCompletion(t,s,n,e):s=>this.defaultCompletion(t,s,n,e);return W(s)?s.then(i):i(s)}generateCompletionScript(t,e){let n=this.zshShell?'#compdef {{app_name}}\n###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc\n# or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local reply\n local si=$IFS\n IFS=$\'\n\' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "${words[@]}"))\n IFS=$si\n _describe \'values\' reply\n}\ncompdef _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n':'###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc\n# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local cur_word args type_list\n\n cur_word="${COMP_WORDS[COMP_CWORD]}"\n args=("${COMP_WORDS[@]}")\n\n # ask yargs to generate completions.\n type_list=$({{app_path}} --get-yargs-completions "${args[@]}")\n\n COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) )\n\n # if no match was found, fall back to filename completion\n if [ ${#COMPREPLY[@]} -eq 0 ]; then\n COMPREPLY=()\n fi\n\n return 0\n}\ncomplete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n';const s=this.shim.path.basename(t);return t.match(/\.js$/)&&(t=`./${t}`),n=n.replace(/{{app_name}}/g,s),n=n.replace(/{{completion_command}}/g,e),n.replace(/{{app_path}}/g,t)}registerFunction(t){this.customCompletionFunction=t}setParsed(t){this.aliases=t.aliases}}function ct(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;const n=[];let s,i;for(s=0;s<=e.length;s++)n[s]=[s];for(i=0;i<=t.length;i++)n[0][i]=i;for(s=1;s<=e.length;s++)for(i=1;i<=t.length;i++)e.charAt(s-1)===t.charAt(i-1)?n[s][i]=n[s-1][i-1]:s>1&&i>1&&e.charAt(s-2)===t.charAt(i-1)&&e.charAt(s-1)===t.charAt(i-2)?n[s][i]=n[s-2][i-2]+1:n[s][i]=Math.min(n[s-1][i-1]+1,Math.min(n[s][i-1]+1,n[s-1][i]+1));return n[e.length][t.length]}const lt=["$0","--","_"];let ht,ut=[];function dt(t,e,n,s){ht=s;let i={};if(Object.prototype.hasOwnProperty.call(t,"extends")){if("string"!=typeof t.extends)return i;const s=/\.json|\..*rc$/.test(t.extends);let r=null;if(s)r=function(t,e){return ht.path.resolve(t,e)}(e,t.extends);else try{r=require.resolve(t.extends)}catch(e){return t}!function(t){if(ut.indexOf(t)>-1)throw new k(`Circular extended configurations: '${t}'.`)}(r),ut.push(r),i=s?JSON.parse(ht.readFileSync(r,"utf8")):require(t.extends),delete t.extends,i=dt(i,ht.path.dirname(r),n,ht)}return ut=[],n?ft(i,t):Object.assign({},i,t)}function ft(t,e){const n={};function s(t){return t&&"object"==typeof t&&!Array.isArray(t)}Object.assign(n,t);for(const i of Object.keys(e))s(e[i])&&s(n[i])?n[i]=ft(t[i],e[i]):n[i]=e[i];return n}var pt,mt,gt,yt,bt,vt,wt,xt,Ot,Et,St,jt,Ct,_t,At,kt,Pt,It,$t,Mt,Tt,Nt,Lt,Gt,Ft,Dt,Rt,Wt,Ut,Bt,zt,Ht,qt,Vt,Kt=function(t,e,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(t,n):i?i.value=n:e.set(t,n),n},Yt=function(t,e,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(t):s?s.value:e.get(t)};const Xt=Symbol("copyDoubleDash"),Jt=Symbol("copyDoubleDash"),Qt=Symbol("deleteFromParserHintObject"),Zt=Symbol("emitWarning"),te=Symbol("freeze"),ee=Symbol("getDollarZero"),ne=Symbol("getParserConfiguration"),se=Symbol("guessLocale"),ie=Symbol("guessVersion"),re=Symbol("parsePositionalNumbers"),oe=Symbol("pkgUp"),ae=Symbol("populateParserHintArray"),ce=Symbol("populateParserHintSingleValueDictionary"),le=Symbol("populateParserHintArrayDictionary"),he=Symbol("populateParserHintDictionary"),ue=Symbol("sanitizeKey"),de=Symbol("setKey"),fe=Symbol("unfreeze"),pe=Symbol("validateAsync"),me=Symbol("getCommandInstance"),ge=Symbol("getContext"),ye=Symbol("getHasOutput"),be=Symbol("getLoggerInstance"),ve=Symbol("getParseContext"),we=Symbol("getUsageInstance"),xe=Symbol("getValidationInstance"),Oe=Symbol("hasParseCallback"),Ee=Symbol("isGlobalContext"),Se=Symbol("postProcess"),je=Symbol("rebase"),Ce=Symbol("reset"),_e=Symbol("runYargsParserAndExecuteCommands"),Ae=Symbol("runValidation"),ke=Symbol("setHasOutput"),Pe=Symbol("kTrackManuallySetKeys");class Ie{constructor(t=[],e,n,s){this.customScriptName=!1,this.parsed=!1,pt.set(this,void 0),mt.set(this,void 0),gt.set(this,{commands:[],fullCommands:[]}),yt.set(this,null),bt.set(this,null),vt.set(this,"show-hidden"),wt.set(this,null),xt.set(this,!0),Ot.set(this,{}),Et.set(this,!0),St.set(this,[]),jt.set(this,void 0),Ct.set(this,{}),_t.set(this,!1),At.set(this,null),kt.set(this,!0),Pt.set(this,void 0),It.set(this,""),$t.set(this,void 0),Mt.set(this,void 0),Tt.set(this,{}),Nt.set(this,null),Lt.set(this,null),Gt.set(this,{}),Ft.set(this,{}),Dt.set(this,void 0),Rt.set(this,!1),Wt.set(this,void 0),Ut.set(this,!1),Bt.set(this,!1),zt.set(this,!1),Ht.set(this,void 0),qt.set(this,null),Vt.set(this,void 0),Kt(this,Wt,s,"f"),Kt(this,Dt,t,"f"),Kt(this,mt,e,"f"),Kt(this,Mt,n,"f"),Kt(this,jt,new V(this),"f"),this.$0=this[ee](),this[Ce](),Kt(this,pt,Yt(this,pt,"f"),"f"),Kt(this,Ht,Yt(this,Ht,"f"),"f"),Kt(this,Vt,Yt(this,Vt,"f"),"f"),Kt(this,$t,Yt(this,$t,"f"),"f"),Yt(this,$t,"f").showHiddenOpt=Yt(this,vt,"f"),Kt(this,Pt,this[Jt](),"f")}addHelpOpt(t,e){return z("[string|boolean] [string]",[t,e],arguments.length),Yt(this,At,"f")&&(this[Qt](Yt(this,At,"f")),Kt(this,At,null,"f")),!1===t&&void 0===e||(Kt(this,At,"string"==typeof t?t:"help","f"),this.boolean(Yt(this,At,"f")),this.describe(Yt(this,At,"f"),e||Yt(this,Ht,"f").deferY18nLookup("Show help"))),this}help(t,e){return this.addHelpOpt(t,e)}addShowHiddenOpt(t,e){if(z("[string|boolean] [string]",[t,e],arguments.length),!1===t&&void 0===e)return this;const n="string"==typeof t?t:Yt(this,vt,"f");return this.boolean(n),this.describe(n,e||Yt(this,Ht,"f").deferY18nLookup("Show hidden options")),Yt(this,$t,"f").showHiddenOpt=n,this}showHidden(t,e){return this.addShowHiddenOpt(t,e)}alias(t,e){return z("<object|string|array> [string|array]",[t,e],arguments.length),this[le](this.alias.bind(this),"alias",t,e),this}array(t){return z("<array|string>",[t],arguments.length),this[ae]("array",t),this[Pe](t),this}boolean(t){return z("<array|string>",[t],arguments.length),this[ae]("boolean",t),this[Pe](t),this}check(t,e){return z("<function> [boolean]",[t,e],arguments.length),this.middleware(((e,n)=>Y((()=>t(e,n.getOptions())),(n=>(n?("string"==typeof n||n instanceof Error)&&Yt(this,Ht,"f").fail(n.toString(),n):Yt(this,Ht,"f").fail(Yt(this,Wt,"f").y18n.__("Argument check failed: %s",t.toString())),e)),(t=>(Yt(this,Ht,"f").fail(t.message?t.message:t.toString(),t),e)))),!1,e),this}choices(t,e){return z("<object|string|array> [string|array]",[t,e],arguments.length),this[le](this.choices.bind(this),"choices",t,e),this}coerce(t,e){if(z("<object|string|array> [function]",[t,e],arguments.length),Array.isArray(t)){if(!e)throw new k("coerce callback must be provided");for(const n of t)this.coerce(n,e);return this}if("object"==typeof t){for(const e of Object.keys(t))this.coerce(e,t[e]);return this}if(!e)throw new k("coerce callback must be provided");return Yt(this,$t,"f").key[t]=!0,Yt(this,jt,"f").addCoerceMiddleware(((n,s)=>{let i;return Object.prototype.hasOwnProperty.call(n,t)?Y((()=>(i=s.getAliases(),e(n[t]))),(e=>{n[t]=e;const r=s.getInternalMethods().getParserConfiguration()["strip-aliased"];if(i[t]&&!0!==r)for(const s of i[t])n[s]=e;return n}),(t=>{throw new k(t.message)})):n}),t),this}conflicts(t,e){return z("<string|object> [string|array]",[t,e],arguments.length),Yt(this,Vt,"f").conflicts(t,e),this}config(t="config",e,n){return z("[object|string] [string|function] [function]",[t,e,n],arguments.length),"object"!=typeof t||Array.isArray(t)?("function"==typeof e&&(n=e,e=void 0),this.describe(t,e||Yt(this,Ht,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(t)?t:[t]).forEach((t=>{Yt(this,$t,"f").config[t]=n||!0})),this):(t=dt(t,Yt(this,mt,"f"),this[ne]()["deep-merge-config"]||!1,Yt(this,Wt,"f")),Yt(this,$t,"f").configObjects=(Yt(this,$t,"f").configObjects||[]).concat(t),this)}completion(t,e,n){return z("[string] [string|boolean|function] [function]",[t,e,n],arguments.length),"function"==typeof e&&(n=e,e=void 0),Kt(this,bt,t||Yt(this,bt,"f")||"completion","f"),e||!1===e||(e="generate completion script"),this.command(Yt(this,bt,"f"),e),n&&Yt(this,yt,"f").registerFunction(n),this}command(t,e,n,s,i,r){return z("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[t,e,n,s,i,r],arguments.length),Yt(this,pt,"f").addHandler(t,e,n,s,i,r),this}commands(t,e,n,s,i,r){return this.command(t,e,n,s,i,r)}commandDir(t,e){z("<string> [object]",[t,e],arguments.length);const n=Yt(this,Mt,"f")||Yt(this,Wt,"f").require;return Yt(this,pt,"f").addDirectory(t,n,Yt(this,Wt,"f").getCallerFile(),e),this}count(t){return z("<array|string>",[t],arguments.length),this[ae]("count",t),this[Pe](t),this}default(t,e,n){return z("<object|string|array> [*] [string]",[t,e,n],arguments.length),n&&(D(t,Yt(this,Wt,"f")),Yt(this,$t,"f").defaultDescription[t]=n),"function"==typeof e&&(D(t,Yt(this,Wt,"f")),Yt(this,$t,"f").defaultDescription[t]||(Yt(this,$t,"f").defaultDescription[t]=Yt(this,Ht,"f").functionDescription(e)),e=e.call()),this[ce](this.default.bind(this),"default",t,e),this}defaults(t,e,n){return this.default(t,e,n)}demandCommand(t=1,e,n,s){return z("[number] [number|string] [string|null|undefined] [string|null|undefined]",[t,e,n,s],arguments.length),"number"!=typeof e&&(n=e,e=1/0),this.global("_",!1),Yt(this,$t,"f").demandedCommands._={min:t,max:e,minMsg:n,maxMsg:s},this}demand(t,e,n){return Array.isArray(e)?(e.forEach((t=>{F(n,!0,Yt(this,Wt,"f")),this.demandOption(t,n)})),e=1/0):"number"!=typeof e&&(n=e,e=1/0),"number"==typeof t?(F(n,!0,Yt(this,Wt,"f")),this.demandCommand(t,e,n,n)):Array.isArray(t)?t.forEach((t=>{F(n,!0,Yt(this,Wt,"f")),this.demandOption(t,n)})):"string"==typeof n?this.demandOption(t,n):!0!==n&&void 0!==n||this.demandOption(t),this}demandOption(t,e){return z("<object|string|array> [string]",[t,e],arguments.length),this[ce](this.demandOption.bind(this),"demandedOptions",t,e),this}deprecateOption(t,e){return z("<string> [string|boolean]",[t,e],arguments.length),Yt(this,$t,"f").deprecatedOptions[t]=e,this}describe(t,e){return z("<object|string|array> [string]",[t,e],arguments.length),this[de](t,!0),Yt(this,Ht,"f").describe(t,e),this}detectLocale(t){return z("<boolean>",[t],arguments.length),Kt(this,xt,t,"f"),this}env(t){return z("[string|boolean]",[t],arguments.length),!1===t?delete Yt(this,$t,"f").envPrefix:Yt(this,$t,"f").envPrefix=t||"",this}epilogue(t){return z("<string>",[t],arguments.length),Yt(this,Ht,"f").epilog(t),this}epilog(t){return this.epilogue(t)}example(t,e){return z("<string|array> [string]",[t,e],arguments.length),Array.isArray(t)?t.forEach((t=>this.example(...t))):Yt(this,Ht,"f").example(t,e),this}exit(t,e){Kt(this,_t,!0,"f"),Kt(this,wt,e,"f"),Yt(this,Et,"f")&&Yt(this,Wt,"f").process.exit(t)}exitProcess(t=!0){return z("[boolean]",[t],arguments.length),Kt(this,Et,t,"f"),this}fail(t){if(z("<function|boolean>",[t],arguments.length),"boolean"==typeof t&&!1!==t)throw new k("Invalid first argument. Expected function or boolean 'false'");return Yt(this,Ht,"f").failFn(t),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(t,e){return z("<array> [function]",[t,e],arguments.length),e?Yt(this,yt,"f").getCompletion(t,e):new Promise(((e,n)=>{Yt(this,yt,"f").getCompletion(t,((t,s)=>{t?n(t):e(s)}))}))}getDemandedOptions(){return z([],0),Yt(this,$t,"f").demandedOptions}getDemandedCommands(){return z([],0),Yt(this,$t,"f").demandedCommands}getDeprecatedOptions(){return z([],0),Yt(this,$t,"f").deprecatedOptions}getDetectLocale(){return Yt(this,xt,"f")}getExitProcess(){return Yt(this,Et,"f")}getGroups(){return Object.assign({},Yt(this,Ct,"f"),Yt(this,Ft,"f"))}getHelp(){if(Kt(this,_t,!0,"f"),!Yt(this,Ht,"f").hasCachedHelpMessage()){if(!this.parsed){const t=this[_e](Yt(this,Dt,"f"),void 0,void 0,0,!0);if(W(t))return t.then((()=>Yt(this,Ht,"f").help()))}const t=Yt(this,pt,"f").runDefaultBuilderOn(this);if(W(t))return t.then((()=>Yt(this,Ht,"f").help()))}return Promise.resolve(Yt(this,Ht,"f").help())}getOptions(){return Yt(this,$t,"f")}getStrict(){return Yt(this,Ut,"f")}getStrictCommands(){return Yt(this,Bt,"f")}getStrictOptions(){return Yt(this,zt,"f")}global(t,e){return z("<string|array> [boolean]",[t,e],arguments.length),t=[].concat(t),!1!==e?Yt(this,$t,"f").local=Yt(this,$t,"f").local.filter((e=>-1===t.indexOf(e))):t.forEach((t=>{Yt(this,$t,"f").local.includes(t)||Yt(this,$t,"f").local.push(t)})),this}group(t,e){z("<string|array> <string>",[t,e],arguments.length);const n=Yt(this,Ft,"f")[e]||Yt(this,Ct,"f")[e];Yt(this,Ft,"f")[e]&&delete Yt(this,Ft,"f")[e];const s={};return Yt(this,Ct,"f")[e]=(n||[]).concat(t).filter((t=>!s[t]&&(s[t]=!0))),this}hide(t){return z("<string>",[t],arguments.length),Yt(this,$t,"f").hiddenOptions.push(t),this}implies(t,e){return z("<string|object> [number|string|array]",[t,e],arguments.length),Yt(this,Vt,"f").implies(t,e),this}locale(t){return z("[string]",[t],arguments.length),void 0===t?(this[se](),Yt(this,Wt,"f").y18n.getLocale()):(Kt(this,xt,!1,"f"),Yt(this,Wt,"f").y18n.setLocale(t),this)}middleware(t,e,n){return Yt(this,jt,"f").addMiddleware(t,!!e,n)}nargs(t,e){return z("<string|object|array> [number]",[t,e],arguments.length),this[ce](this.nargs.bind(this),"narg",t,e),this}normalize(t){return z("<array|string>",[t],arguments.length),this[ae]("normalize",t),this}number(t){return z("<array|string>",[t],arguments.length),this[ae]("number",t),this[Pe](t),this}option(t,e){if(z("<string|object> [object]",[t,e],arguments.length),"object"==typeof t)Object.keys(t).forEach((e=>{this.options(e,t[e])}));else{"object"!=typeof e&&(e={}),this[Pe](t),!Yt(this,qt,"f")||"version"!==t&&"version"!==(null==e?void 0:e.alias)||this[Zt](['"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("\n"),void 0,"versionWarning"),Yt(this,$t,"f").key[t]=!0,e.alias&&this.alias(t,e.alias);const n=e.deprecate||e.deprecated;n&&this.deprecateOption(t,n);const s=e.demand||e.required||e.require;s&&this.demand(t,s),e.demandOption&&this.demandOption(t,"string"==typeof e.demandOption?e.demandOption:void 0),e.conflicts&&this.conflicts(t,e.conflicts),"default"in e&&this.default(t,e.default),void 0!==e.implies&&this.implies(t,e.implies),void 0!==e.nargs&&this.nargs(t,e.nargs),e.config&&this.config(t,e.configParser),e.normalize&&this.normalize(t),e.choices&&this.choices(t,e.choices),e.coerce&&this.coerce(t,e.coerce),e.group&&this.group(t,e.group),(e.boolean||"boolean"===e.type)&&(this.boolean(t),e.alias&&this.boolean(e.alias)),(e.array||"array"===e.type)&&(this.array(t),e.alias&&this.array(e.alias)),(e.number||"number"===e.type)&&(this.number(t),e.alias&&this.number(e.alias)),(e.string||"string"===e.type)&&(this.string(t),e.alias&&this.string(e.alias)),(e.count||"count"===e.type)&&this.count(t),"boolean"==typeof e.global&&this.global(t,e.global),e.defaultDescription&&(Yt(this,$t,"f").defaultDescription[t]=e.defaultDescription),e.skipValidation&&this.skipValidation(t);const i=e.describe||e.description||e.desc;this.describe(t,i),e.hidden&&this.hide(t),e.requiresArg&&this.requiresArg(t)}return this}options(t,e){return this.option(t,e)}parse(t,e,n){z("[string|array] [function|boolean|object] [function]",[t,e,n],arguments.length),this[te](),void 0===t&&(t=Yt(this,Dt,"f")),"object"==typeof e&&(Kt(this,Lt,e,"f"),e=n),"function"==typeof e&&(Kt(this,Nt,e,"f"),e=!1),e||Kt(this,Dt,t,"f"),Yt(this,Nt,"f")&&Kt(this,Et,!1,"f");const s=this[_e](t,!!e),i=this.parsed;return Yt(this,yt,"f").setParsed(this.parsed),W(s)?s.then((t=>(Yt(this,Nt,"f")&&Yt(this,Nt,"f").call(this,Yt(this,wt,"f"),t,Yt(this,It,"f")),t))).catch((t=>{throw Yt(this,Nt,"f")&&Yt(this,Nt,"f")(t,this.parsed.argv,Yt(this,It,"f")),t})).finally((()=>{this[fe](),this.parsed=i})):(Yt(this,Nt,"f")&&Yt(this,Nt,"f").call(this,Yt(this,wt,"f"),s,Yt(this,It,"f")),this[fe](),this.parsed=i,s)}parseAsync(t,e,n){const s=this.parse(t,e,n);return W(s)?s:Promise.resolve(s)}parseSync(t,e,n){const s=this.parse(t,e,n);if(W(s))throw new k(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return s}parserConfiguration(t){return z("<object>",[t],arguments.length),Kt(this,Tt,t,"f"),this}pkgConf(t,e){z("<string> [string]",[t,e],arguments.length);let n=null;const s=this[oe](e||Yt(this,mt,"f"));return s[t]&&"object"==typeof s[t]&&(n=dt(s[t],e||Yt(this,mt,"f"),this[ne]()["deep-merge-config"]||!1,Yt(this,Wt,"f")),Yt(this,$t,"f").configObjects=(Yt(this,$t,"f").configObjects||[]).concat(n)),this}positional(t,e){z("<string> <object>",[t,e],arguments.length);const n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];e=tt(e,((t,e)=>!("type"===t&&!["string","number","boolean"].includes(e))&&n.includes(t)));const s=Yt(this,gt,"f").fullCommands[Yt(this,gt,"f").fullCommands.length-1],i=s?Yt(this,pt,"f").cmdToParseOptions(s):{array:[],alias:{},default:{},demand:{}};return R(i).forEach((n=>{const s=i[n];Array.isArray(s)?-1!==s.indexOf(t)&&(e[n]=!0):s[t]&&!(n in e)&&(e[n]=s[t])})),this.group(t,Yt(this,Ht,"f").getPositionalGroupName()),this.option(t,e)}recommendCommands(t=!0){return z("[boolean]",[t],arguments.length),Kt(this,Rt,t,"f"),this}required(t,e,n){return this.demand(t,e,n)}require(t,e,n){return this.demand(t,e,n)}requiresArg(t){return z("<array|string|object> [number]",[t],arguments.length),"string"==typeof t&&Yt(this,$t,"f").narg[t]||this[ce](this.requiresArg.bind(this),"narg",t,NaN),this}showCompletionScript(t,e){return z("[string] [string]",[t,e],arguments.length),t=t||this.$0,Yt(this,Pt,"f").log(Yt(this,yt,"f").generateCompletionScript(t,e||Yt(this,bt,"f")||"completion")),this}showHelp(t){if(z("[string|function]",[t],arguments.length),Kt(this,_t,!0,"f"),!Yt(this,Ht,"f").hasCachedHelpMessage()){if(!this.parsed){const e=this[_e](Yt(this,Dt,"f"),void 0,void 0,0,!0);if(W(e))return e.then((()=>{Yt(this,Ht,"f").showHelp(t)})),this}const e=Yt(this,pt,"f").runDefaultBuilderOn(this);if(W(e))return e.then((()=>{Yt(this,Ht,"f").showHelp(t)})),this}return Yt(this,Ht,"f").showHelp(t),this}scriptName(t){return this.customScriptName=!0,this.$0=t,this}showHelpOnFail(t,e){return z("[boolean|string] [string]",[t,e],arguments.length),Yt(this,Ht,"f").showHelpOnFail(t,e),this}showVersion(t){return z("[string|function]",[t],arguments.length),Yt(this,Ht,"f").showVersion(t),this}skipValidation(t){return z("<array|string>",[t],arguments.length),this[ae]("skipValidation",t),this}strict(t){return z("[boolean]",[t],arguments.length),Kt(this,Ut,!1!==t,"f"),this}strictCommands(t){return z("[boolean]",[t],arguments.length),Kt(this,Bt,!1!==t,"f"),this}strictOptions(t){return z("[boolean]",[t],arguments.length),Kt(this,zt,!1!==t,"f"),this}string(t){return z("<array|string>",[t],arguments.length),this[ae]("string",t),this[Pe](t),this}terminalWidth(){return z([],0),Yt(this,Wt,"f").process.stdColumns}updateLocale(t){return this.updateStrings(t)}updateStrings(t){return z("<object>",[t],arguments.length),Kt(this,xt,!1,"f"),Yt(this,Wt,"f").y18n.updateLocale(t),this}usage(t,e,n,s){if(z("<string|null|undefined> [string|boolean] [function|object] [function]",[t,e,n,s],arguments.length),void 0!==e){if(F(t,null,Yt(this,Wt,"f")),(t||"").match(/^\$0( |$)/))return this.command(t,e,n,s);throw new k(".usage() description must start with $0 if being used as alias for .command()")}return Yt(this,Ht,"f").usage(t),this}version(t,e,n){const s="version";if(z("[boolean|string] [string] [string]",[t,e,n],arguments.length),Yt(this,qt,"f")&&(this[Qt](Yt(this,qt,"f")),Yt(this,Ht,"f").version(void 0),Kt(this,qt,null,"f")),0===arguments.length)n=this[ie](),t=s;else if(1===arguments.length){if(!1===t)return this;n=t,t=s}else 2===arguments.length&&(n=e,e=void 0);return Kt(this,qt,"string"==typeof t?t:s,"f"),e=e||Yt(this,Ht,"f").deferY18nLookup("Show version number"),Yt(this,Ht,"f").version(n||void 0),this.boolean(Yt(this,qt,"f")),this.describe(Yt(this,qt,"f"),e),this}wrap(t){return z("<number|null|undefined>",[t],arguments.length),Yt(this,Ht,"f").wrap(t),this}[(pt=new WeakMap,mt=new WeakMap,gt=new WeakMap,yt=new WeakMap,bt=new WeakMap,vt=new WeakMap,wt=new WeakMap,xt=new WeakMap,Ot=new WeakMap,Et=new WeakMap,St=new WeakMap,jt=new WeakMap,Ct=new WeakMap,_t=new WeakMap,At=new WeakMap,kt=new WeakMap,Pt=new WeakMap,It=new WeakMap,$t=new WeakMap,Mt=new WeakMap,Tt=new WeakMap,Nt=new WeakMap,Lt=new WeakMap,Gt=new WeakMap,Ft=new WeakMap,Dt=new WeakMap,Rt=new WeakMap,Wt=new WeakMap,Ut=new WeakMap,Bt=new WeakMap,zt=new WeakMap,Ht=new WeakMap,qt=new WeakMap,Vt=new WeakMap,Xt)](t){if(!t._||!t["--"])return t;t._.push.apply(t._,t["--"]);try{delete t["--"]}catch(t){}return t}[Jt](){return{log:(...t)=>{this[Oe]()||console.log(...t),Kt(this,_t,!0,"f"),Yt(this,It,"f").length&&Kt(this,It,Yt(this,It,"f")+"\n","f"),Kt(this,It,Yt(this,It,"f")+t.join(" "),"f")},error:(...t)=>{this[Oe]()||console.error(...t),Kt(this,_t,!0,"f"),Yt(this,It,"f").length&&Kt(this,It,Yt(this,It,"f")+"\n","f"),Kt(this,It,Yt(this,It,"f")+t.join(" "),"f")}}}[Qt](t){R(Yt(this,$t,"f")).forEach((e=>{if("configObjects"===e)return;const n=Yt(this,$t,"f")[e];Array.isArray(n)?n.includes(t)&&n.splice(n.indexOf(t),1):"object"==typeof n&&delete n[t]})),delete Yt(this,Ht,"f").getDescriptions()[t]}[Zt](t,e,n){Yt(this,Ot,"f")[n]||(Yt(this,Wt,"f").process.emitWarning(t,e),Yt(this,Ot,"f")[n]=!0)}[te](){Yt(this,St,"f").push({options:Yt(this,$t,"f"),configObjects:Yt(this,$t,"f").configObjects.slice(0),exitProcess:Yt(this,Et,"f"),groups:Yt(this,Ct,"f"),strict:Yt(this,Ut,"f"),strictCommands:Yt(this,Bt,"f"),strictOptions:Yt(this,zt,"f"),completionCommand:Yt(this,bt,"f"),output:Yt(this,It,"f"),exitError:Yt(this,wt,"f"),hasOutput:Yt(this,_t,"f"),parsed:this.parsed,parseFn:Yt(this,Nt,"f"),parseContext:Yt(this,Lt,"f")}),Yt(this,Ht,"f").freeze(),Yt(this,Vt,"f").freeze(),Yt(this,pt,"f").freeze(),Yt(this,jt,"f").freeze()}[ee](){let t,e="";return t=/\b(node|iojs|electron)(\.exe)?$/.test(Yt(this,Wt,"f").process.argv()[0])?Yt(this,Wt,"f").process.argv().slice(1,2):Yt(this,Wt,"f").process.argv().slice(0,1),e=t.map((t=>{const e=this[je](Yt(this,mt,"f"),t);return t.match(/^(\/|([a-zA-Z]:)?\\)/)&&e.length<t.length?e:t})).join(" ").trim(),Yt(this,Wt,"f").getEnv("_")&&Yt(this,Wt,"f").getProcessArgvBin()===Yt(this,Wt,"f").getEnv("_")&&(e=Yt(this,Wt,"f").getEnv("_").replace(`${Yt(this,Wt,"f").path.dirname(Yt(this,Wt,"f").process.execPath())}/`,"")),e}[ne](){return Yt(this,Tt,"f")}[se](){if(!Yt(this,xt,"f"))return;const t=Yt(this,Wt,"f").getEnv("LC_ALL")||Yt(this,Wt,"f").getEnv("LC_MESSAGES")||Yt(this,Wt,"f").getEnv("LANG")||Yt(this,Wt,"f").getEnv("LANGUAGE")||"en_US";this.locale(t.replace(/[.:].*/,""))}[ie](){return this[oe]().version||"unknown"}[re](t){const e=t["--"]?t["--"]:t._;for(let t,n=0;void 0!==(t=e[n]);n++)Yt(this,Wt,"f").Parser.looksLikeNumber(t)&&Number.isSafeInteger(Math.floor(parseFloat(`${t}`)))&&(e[n]=Number(t));return t}[oe](t){const e=t||"*";if(Yt(this,Gt,"f")[e])return Yt(this,Gt,"f")[e];let n={};try{let e=t||Yt(this,Wt,"f").mainFilename;!t&&Yt(this,Wt,"f").path.extname(e)&&(e=Yt(this,Wt,"f").path.dirname(e));const s=Yt(this,Wt,"f").findUp(e,((t,e)=>e.includes("package.json")?"package.json":void 0));F(s,void 0,Yt(this,Wt,"f")),n=JSON.parse(Yt(this,Wt,"f").readFileSync(s,"utf8"))}catch(t){}return Yt(this,Gt,"f")[e]=n||{},Yt(this,Gt,"f")[e]}[ae](t,e){(e=[].concat(e)).forEach((e=>{e=this[ue](e),Yt(this,$t,"f")[t].push(e)}))}[ce](t,e,n,s){this[he](t,e,n,s,((t,e,n)=>{Yt(this,$t,"f")[t][e]=n}))}[le](t,e,n,s){this[he](t,e,n,s,((t,e,n)=>{Yt(this,$t,"f")[t][e]=(Yt(this,$t,"f")[t][e]||[]).concat(n)}))}[he](t,e,n,s,i){if(Array.isArray(n))n.forEach((e=>{t(e,s)}));else if((t=>"object"==typeof t)(n))for(const e of R(n))t(e,n[e]);else i(e,this[ue](n),s)}[ue](t){return"__proto__"===t?"___proto___":t}[de](t,e){return this[ce](this[de].bind(this),"key",t,e),this}[fe](){var t,e,n,s,i,r,o,a,c,l,h,u;const d=Yt(this,St,"f").pop();let f;F(d,void 0,Yt(this,Wt,"f")),t=this,e=this,n=this,s=this,i=this,r=this,o=this,a=this,c=this,l=this,h=this,u=this,({options:{set value(e){Kt(t,$t,e,"f")}}.value,configObjects:f,exitProcess:{set value(t){Kt(e,Et,t,"f")}}.value,groups:{set value(t){Kt(n,Ct,t,"f")}}.value,output:{set value(t){Kt(s,It,t,"f")}}.value,exitError:{set value(t){Kt(i,wt,t,"f")}}.value,hasOutput:{set value(t){Kt(r,_t,t,"f")}}.value,parsed:this.parsed,strict:{set value(t){Kt(o,Ut,t,"f")}}.value,strictCommands:{set value(t){Kt(a,Bt,t,"f")}}.value,strictOptions:{set value(t){Kt(c,zt,t,"f")}}.value,completionCommand:{set value(t){Kt(l,bt,t,"f")}}.value,parseFn:{set value(t){Kt(h,Nt,t,"f")}}.value,parseContext:{set value(t){Kt(u,Lt,t,"f")}}.value}=d),Yt(this,$t,"f").configObjects=f,Yt(this,Ht,"f").unfreeze(),Yt(this,Vt,"f").unfreeze(),Yt(this,pt,"f").unfreeze(),Yt(this,jt,"f").unfreeze()}[pe](t,e){return Y(e,(e=>(t(e),e)))}getInternalMethods(){return{getCommandInstance:this[me].bind(this),getContext:this[ge].bind(this),getHasOutput:this[ye].bind(this),getLoggerInstance:this[be].bind(this),getParseContext:this[ve].bind(this),getParserConfiguration:this[ne].bind(this),getUsageInstance:this[we].bind(this),getValidationInstance:this[xe].bind(this),hasParseCallback:this[Oe].bind(this),isGlobalContext:this[Ee].bind(this),postProcess:this[Se].bind(this),reset:this[Ce].bind(this),runValidation:this[Ae].bind(this),runYargsParserAndExecuteCommands:this[_e].bind(this),setHasOutput:this[ke].bind(this)}}[me](){return Yt(this,pt,"f")}[ge](){return Yt(this,gt,"f")}[ye](){return Yt(this,_t,"f")}[be](){return Yt(this,Pt,"f")}[ve](){return Yt(this,Lt,"f")||{}}[we](){return Yt(this,Ht,"f")}[xe](){return Yt(this,Vt,"f")}[Oe](){return!!Yt(this,Nt,"f")}[Ee](){return Yt(this,kt,"f")}[Se](t,e,n,s){if(n)return t;if(W(t))return t;e||(t=this[Xt](t));return(this[ne]()["parse-positional-numbers"]||void 0===this[ne]()["parse-positional-numbers"])&&(t=this[re](t)),s&&(t=K(t,this,Yt(this,jt,"f").getMiddleware(),!1)),t}[Ce](t={}){Kt(this,$t,Yt(this,$t,"f")||{},"f");const e={};e.local=Yt(this,$t,"f").local||[],e.configObjects=Yt(this,$t,"f").configObjects||[];const n={};e.local.forEach((e=>{n[e]=!0,(t[e]||[]).forEach((t=>{n[t]=!0}))})),Object.assign(Yt(this,Ft,"f"),Object.keys(Yt(this,Ct,"f")).reduce(((t,e)=>{const s=Yt(this,Ct,"f")[e].filter((t=>!(t in n)));return s.length>0&&(t[e]=s),t}),{})),Kt(this,Ct,{},"f");return["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"].forEach((t=>{e[t]=(Yt(this,$t,"f")[t]||[]).filter((t=>!n[t]))})),["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"].forEach((t=>{e[t]=tt(Yt(this,$t,"f")[t],(t=>!n[t]))})),e.envPrefix=Yt(this,$t,"f").envPrefix,Kt(this,$t,e,"f"),Kt(this,Ht,Yt(this,Ht,"f")?Yt(this,Ht,"f").reset(n):st(this,Yt(this,Wt,"f")),"f"),Kt(this,Vt,Yt(this,Vt,"f")?Yt(this,Vt,"f").reset(n):function(t,e,n){const s=n.y18n.__,i=n.y18n.__n,r={nonOptionCount:function(n){const s=t.getDemandedCommands(),r=n._.length+(n["--"]?n["--"].length:0)-t.getInternalMethods().getContext().commands.length;s._&&(r<s._.min||r>s._.max)&&(r<s._.min?void 0!==s._.minMsg?e.fail(s._.minMsg?s._.minMsg.replace(/\$0/g,r.toString()).replace(/\$1/,s._.min.toString()):null):e.fail(i("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(),s._.min.toString())):r>s._.max&&(void 0!==s._.maxMsg?e.fail(s._.maxMsg?s._.maxMsg.replace(/\$0/g,r.toString()).replace(/\$1/,s._.max.toString()):null):e.fail(i("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",r,r.toString(),s._.max.toString()))))},positionalCount:function(t,n){n<t&&e.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",n,n+"",t+""))},requiredArguments:function(t,n){let s=null;for(const e of Object.keys(n))Object.prototype.hasOwnProperty.call(t,e)&&void 0!==t[e]||(s=s||{},s[e]=n[e]);if(s){const t=[];for(const e of Object.keys(s)){const n=s[e];n&&t.indexOf(n)<0&&t.push(n)}const n=t.length?`\n${t.join("\n")}`:"";e.fail(i("Missing required argument: %s","Missing required arguments: %s",Object.keys(s).length,Object.keys(s).join(", ")+n))}},unknownArguments:function(n,s,o,a,c=!0){var l;const h=t.getInternalMethods().getCommandInstance().getCommands(),u=[],d=t.getInternalMethods().getContext();if(Object.keys(n).forEach((e=>{lt.includes(e)||Object.prototype.hasOwnProperty.call(o,e)||Object.prototype.hasOwnProperty.call(t.getInternalMethods().getParseContext(),e)||r.isValidAndSomeAliasIsNotNew(e,s)||u.push(e)})),c&&(d.commands.length>0||h.length>0||a)&&n._.slice(d.commands.length).forEach((t=>{h.includes(""+t)||u.push(""+t)})),c){const e=(null===(l=t.getDemandedCommands()._)||void 0===l?void 0:l.max)||0,s=d.commands.length+e;s<n._.length&&n._.slice(s).forEach((t=>{t=String(t),d.commands.includes(t)||u.includes(t)||u.push(t)}))}u.length&&e.fail(i("Unknown argument: %s","Unknown arguments: %s",u.length,u.map((t=>t.trim()?t:`"${t}"`)).join(", ")))},unknownCommands:function(n){const s=t.getInternalMethods().getCommandInstance().getCommands(),r=[],o=t.getInternalMethods().getContext();return(o.commands.length>0||s.length>0)&&n._.slice(o.commands.length).forEach((t=>{s.includes(""+t)||r.push(""+t)})),r.length>0&&(e.fail(i("Unknown command: %s","Unknown commands: %s",r.length,r.join(", "))),!0)},isValidAndSomeAliasIsNotNew:function(e,n){if(!Object.prototype.hasOwnProperty.call(n,e))return!1;const s=t.parsed.newAliases;return[e,...n[e]].some((t=>!Object.prototype.hasOwnProperty.call(s,t)||!s[e]))},limitedChoices:function(n){const i=t.getOptions(),r={};if(!Object.keys(i.choices).length)return;Object.keys(n).forEach((t=>{-1===lt.indexOf(t)&&Object.prototype.hasOwnProperty.call(i.choices,t)&&[].concat(n[t]).forEach((e=>{-1===i.choices[t].indexOf(e)&&void 0!==e&&(r[t]=(r[t]||[]).concat(e))}))}));const o=Object.keys(r);if(!o.length)return;let a=s("Invalid values:");o.forEach((t=>{a+=`\n ${s("Argument: %s, Given: %s, Choices: %s",t,e.stringifiedValues(r[t]),e.stringifiedValues(i.choices[t]))}`})),e.fail(a)}};let o={};function a(t,e){const n=Number(e);return"number"==typeof(e=isNaN(n)?e:n)?e=t._.length>=e:e.match(/^--no-.+/)?(e=e.match(/^--no-(.+)/)[1],e=!Object.prototype.hasOwnProperty.call(t,e)):e=Object.prototype.hasOwnProperty.call(t,e),e}r.implies=function(e,s){z("<string|object> [array|number|string]",[e,s],arguments.length),"object"==typeof e?Object.keys(e).forEach((t=>{r.implies(t,e[t])})):(t.global(e),o[e]||(o[e]=[]),Array.isArray(s)?s.forEach((t=>r.implies(e,t))):(F(s,void 0,n),o[e].push(s)))},r.getImplied=function(){return o},r.implications=function(t){const n=[];if(Object.keys(o).forEach((e=>{const s=e;(o[e]||[]).forEach((e=>{let i=s;const r=e;i=a(t,i),e=a(t,e),i&&!e&&n.push(` ${s} -> ${r}`)}))})),n.length){let t=`${s("Implications failed:")}\n`;n.forEach((e=>{t+=e})),e.fail(t)}};let c={};r.conflicts=function(e,n){z("<string|object> [array|string]",[e,n],arguments.length),"object"==typeof e?Object.keys(e).forEach((t=>{r.conflicts(t,e[t])})):(t.global(e),c[e]||(c[e]=[]),Array.isArray(n)?n.forEach((t=>r.conflicts(e,t))):c[e].push(n))},r.getConflicting=()=>c,r.conflicting=function(i){Object.keys(i).forEach((t=>{c[t]&&c[t].forEach((n=>{n&&void 0!==i[t]&&void 0!==i[n]&&e.fail(s("Arguments %s and %s are mutually exclusive",t,n))}))})),t.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(c).forEach((t=>{c[t].forEach((r=>{r&&void 0!==i[n.Parser.camelCase(t)]&&void 0!==i[n.Parser.camelCase(r)]&&e.fail(s("Arguments %s and %s are mutually exclusive",t,r))}))}))},r.recommendCommands=function(t,n){n=n.sort(((t,e)=>e.length-t.length));let i=null,r=1/0;for(let e,s=0;void 0!==(e=n[s]);s++){const n=ct(t,e);n<=3&&n<r&&(r=n,i=e)}i&&e.fail(s("Did you mean %s?",i))},r.reset=function(t){return o=tt(o,(e=>!t[e])),c=tt(c,(e=>!t[e])),r};const l=[];return r.freeze=function(){l.push({implied:o,conflicting:c})},r.unfreeze=function(){const t=l.pop();F(t,void 0,n),({implied:o,conflicting:c}=t)},r}(this,Yt(this,Ht,"f"),Yt(this,Wt,"f")),"f"),Kt(this,pt,Yt(this,pt,"f")?Yt(this,pt,"f").reset():function(t,e,n,s){return new J(t,e,n,s)}(Yt(this,Ht,"f"),Yt(this,Vt,"f"),Yt(this,jt,"f"),Yt(this,Wt,"f")),"f"),Yt(this,yt,"f")||Kt(this,yt,function(t,e,n,s){return new at(t,e,n,s)}(this,Yt(this,Ht,"f"),Yt(this,pt,"f"),Yt(this,Wt,"f")),"f"),Yt(this,jt,"f").reset(),Kt(this,bt,null,"f"),Kt(this,It,"","f"),Kt(this,wt,null,"f"),Kt(this,_t,!1,"f"),this.parsed=!1,this}[je](t,e){return Yt(this,Wt,"f").path.relative(t,e)}[_e](t,e,n,s=0,i=!1){let r=!!n||i;t=t||Yt(this,Dt,"f"),Yt(this,$t,"f").__=Yt(this,Wt,"f").y18n.__,Yt(this,$t,"f").configuration=this[ne]();const o=!!Yt(this,$t,"f").configuration["populate--"],a=Object.assign({},Yt(this,$t,"f").configuration,{"populate--":!0}),c=Yt(this,Wt,"f").Parser.detailed(t,Object.assign({},Yt(this,$t,"f"),{configuration:{"parse-positional-numbers":!1,...a}})),l=Object.assign(c.argv,Yt(this,Lt,"f"));let h;const u=c.aliases;let d=!1,f=!1;Object.keys(l).forEach((t=>{t===Yt(this,At,"f")&&l[t]?d=!0:t===Yt(this,qt,"f")&&l[t]&&(f=!0)})),l.$0=this.$0,this.parsed=c,0===s&&Yt(this,Ht,"f").clearCachedHelpMessage();try{if(this[se](),e)return this[Se](l,o,!!n,!1);if(Yt(this,At,"f")){[Yt(this,At,"f")].concat(u[Yt(this,At,"f")]||[]).filter((t=>t.length>1)).includes(""+l._[l._.length-1])&&(l._.pop(),d=!0)}Kt(this,kt,!1,"f");const a=Yt(this,pt,"f").getCommands(),p=Yt(this,yt,"f").completionKey in l,m=d||p||i;if(l._.length){if(a.length){let t;for(let e,r=s||0;void 0!==l._[r];r++){if(e=String(l._[r]),a.includes(e)&&e!==Yt(this,bt,"f")){const t=Yt(this,pt,"f").runCommand(e,this,c,r+1,i,d||f||i);return this[Se](t,o,!!n,!1)}if(!t&&e!==Yt(this,bt,"f")){t=e;break}}!Yt(this,pt,"f").hasDefaultCommand()&&Yt(this,Rt,"f")&&t&&!m&&Yt(this,Vt,"f").recommendCommands(t,a)}Yt(this,bt,"f")&&l._.includes(Yt(this,bt,"f"))&&!p&&(Yt(this,Et,"f")&&et(!0),this.showCompletionScript(),this.exit(0))}if(Yt(this,pt,"f").hasDefaultCommand()&&!m){const t=Yt(this,pt,"f").runCommand(null,this,c,0,i,d||f||i);return this[Se](t,o,!!n,!1)}if(p){Yt(this,Et,"f")&&et(!0);const e=(t=[].concat(t)).slice(t.indexOf(`--${Yt(this,yt,"f").completionKey}`)+1);return Yt(this,yt,"f").getCompletion(e,((t,e)=>{if(t)throw new k(t.message);(e||[]).forEach((t=>{Yt(this,Pt,"f").log(t)})),this.exit(0)})),this[Se](l,!o,!!n,!1)}if(Yt(this,_t,"f")||(d?(Yt(this,Et,"f")&&et(!0),r=!0,this.showHelp("log"),this.exit(0)):f&&(Yt(this,Et,"f")&&et(!0),r=!0,Yt(this,Ht,"f").showVersion("log"),this.exit(0))),!r&&Yt(this,$t,"f").skipValidation.length>0&&(r=Object.keys(l).some((t=>Yt(this,$t,"f").skipValidation.indexOf(t)>=0&&!0===l[t]))),!r){if(c.error)throw new k(c.error.message);if(!p){const t=this[Ae](u,{},c.error);n||(h=K(l,this,Yt(this,jt,"f").getMiddleware(),!0)),h=this[pe](t,null!=h?h:l),W(h)&&!n&&(h=h.then((()=>K(l,this,Yt(this,jt,"f").getMiddleware(),!1))))}}}catch(t){if(!(t instanceof k))throw t;Yt(this,Ht,"f").fail(t.message,t)}return this[Se](null!=h?h:l,o,!!n,!0)}[Ae](t,e,n,s){const i={...this.getDemandedOptions()};return r=>{if(n)throw new k(n.message);Yt(this,Vt,"f").nonOptionCount(r),Yt(this,Vt,"f").requiredArguments(r,i);let o=!1;Yt(this,Bt,"f")&&(o=Yt(this,Vt,"f").unknownCommands(r)),Yt(this,Ut,"f")&&!o?Yt(this,Vt,"f").unknownArguments(r,t,e,!!s):Yt(this,zt,"f")&&Yt(this,Vt,"f").unknownArguments(r,t,{},!1,!1),Yt(this,Vt,"f").limitedChoices(r),Yt(this,Vt,"f").implications(r),Yt(this,Vt,"f").conflicting(r)}}[ke](){Kt(this,_t,!0,"f")}[Pe](t){if("string"==typeof t)Yt(this,$t,"f").key[t]=!0;else for(const e of t)Yt(this,$t,"f").key[e]=!0}}const $e=(Me=G,(t=[],e=Me.process.cwd(),n)=>{const s=new Ie(t,e,n,Me);return Object.defineProperty(s,"argv",{get:()=>s.parse(),enumerable:!0}),s.help(),s.version(),s});var Me;const Te=$e;function Ne(t,e){const n=t.startsWith(".")?(0,f.join)(e,t):t;return import(n)}function Le(t,e){const{homepage:n,site:s=n,repository:i}=e,r=s&&s!==i,o=t.getInternalMethods(),a=(c=o.getCommandInstance().handlers,Object.keys(c).some((t=>t&&"$0"!==t)));var c;return 0===o.getUsageInstance().getUsage().length&&(a?t.usage("Usage: $0 <command>"):t.usage("Usage: $0")),a&&t.demandCommand(1,"Won't work without a command"),r&&t.epilogue(`Website: ${s}`),i&&t.epilogue(`Repository: ${i}`),t}var Ge=a(23799);const Fe="git",De="",Re=process.cwd();function We(t){t.command("hooks","Set .githooks as git.hooksPath",{},(()=>{try{(function(){try{return Boolean(Ge.sync("git",["--version"],{cwd:Re}).stdout)}catch{throw new Error("git is not installed")}})()&&function(){try{return"true"===Ge.sync("git",["rev-parse","--is-inside-work-tree"],{cwd:Re}).stdout}catch{throw new Error("not a git repository")}}()&&function(){try{Ge.sync("git",["config","core.hooksPath",".githooks"],{cwd:Re})}catch{throw new Error("setting hooks failed")}}(),console.log("Done: set .githooks")}catch(t){console.error("Fail:",t.message),process.exitCode=1}})),t.demandCommand(1,"Typing `hooks`")}const Ue=t(import.meta.url)("module"),Be=process.cwd();const ze=(0,Ue.createRequire)(import.meta.url);function He(t,e=Be){return t.startsWith(".")?(0,f.resolve)(e,t):(0,f.isAbsolute)(t)?t:ze.resolve(t)}function qe(t){try{return(0,s.statSync)(He(t)),!0}catch{return!1}}function Ve(t,e={}){const n=function(t){try{const e=(0,s.readFileSync)(He(t),"utf8");return JSON.parse(e)}catch{return{}}}("./package.json");if(t){const{[t]:s=e}=n;return s}return n}const Ke=t(import.meta.url)("fs/promises"),Ye={"body-leading-blank":[1,"always"],"body-max-line-length":[2,"always",100],"footer-leading-blank":[1,"always"],"footer-max-line-length":[2,"always",100],"header-max-length":[2,"always",100],"subject-case":[0],"subject-empty":[2,"never"],"subject-full-stop":[2,"never","."],"type-case":[2,"always","lower-case"],"type-empty":[2,"never"],"type-enum":[2,"always",["build","chore","ci","docs","feat","fix","perf","refactor","revert","style","test"]],"scope-case":[0],"body-case":[0],"header-case":[0]};function Xe(){return(0,Ke.readFile)((0,f.resolve)(process.cwd(),".git/COMMIT_EDITMSG"),"utf8")}function Je(t){t.command("commit","Lint git commit message",{},(()=>{(async function(){const t=await Xe(),e=await Promise.all([a.e(402),a.e(824)]).then(a.t.bind(a,69402,19)).then((t=>t.default.default||t.default)),n=await Promise.all([a.e(640),a.e(824)]).then(a.t.bind(a,93794,19)).then((t=>t.default.default||t.default)),s=await e(t,Ye);return{result:s,output:await n({results:[s]})}})().then((({result:t,output:e})=>{t.valid?console.log("Pass."):(console.log("Fail:"),console.log(e),process.exitCode=1)})).catch((t=>{console.error(t),process.exitCode=1}))}))}function Qe({rustywind:t,garou:e,stylelint:n,eslint:s,prettier:i,typescript:r}){const o=process.stdin.isTTY?" --color":"";return function(t){const e=Object.entries(t).map((([t,e])=>[t,e.filter(Boolean)])).filter((([t,e])=>e.length));return e.length>0?Object.fromEntries(e):void 0}({"*.{{wx,tt,q,ax,jx,ks}ml,swan}":[t&&"rustywind --write"],"*.{vue,html,htm,md}":[t&&"rustywind --write",e&&"garou",i&&`prettier -w -u${o}`,n&&`stylelint --fix --custom-formatter=node_modules/stylelint-formatter-pretty${o}`,s&&`eslint --fix -f=pretty${o}`],"*.{ts,tsx,mts,cts}":[t&&"rustywind --write",e&&"garou",i&&`prettier -w -u${o}`,s&&`eslint --fix -f=pretty${o}`,r&&(()=>"tsc --noEmit")],"*.{js,jsx,mjs,cjs,wxs,qs}":[t&&"rustywind --write",e&&"garou",i&&`prettier -w -u${o}`,s&&`eslint --fix -f=pretty${o}`],"*.{c,sc,le,wx,q,tt,jx,ac}ss":[e&&"garou",i&&`prettier -w -u${o}`,n&&`stylelint --fix --custom-formatter=node_modules/stylelint-formatter-pretty${o}`],"{*.{json,jsonc,webmanifest,editorconfig,yml,yaml,toml},.{babel,npm}rc}":[i&&`prettier -w -u${o}`],"*.svg":[e&&"garou",i&&`prettier --parser html -w -u${o}`,i&&`prettier -w -u${o}`,n&&`stylelint --fix --custom-formatter=node_modules/stylelint-formatter-pretty${o}`],"yarn.lock":[e&&"garou"]})}async function Ze(){const{default:t}=await Promise.all([a.e(640),a.e(841),a.e(824)]).then(a.bind(a,73750));return t({allowEmpty:!0,concurrent:!0,config:Qe(function(){const t=Ve("devDependencies");return{rustywind:"rustywind"in t,garou:"garou"in t,stylelint:"stylelint"in t,eslint:"eslint"in t,prettier:"prettier"in t,typescript:"typescript"in t}}()),cwd:process.cwd(),debug:!1,quiet:!1,relative:!1,shell:!1,stash:!0})}const tn="lint";function en(t){Je(t),function(t){t.command("staged","Lint and format git staged files",{},(()=>{Ze().then((t=>{process.exitCode=t?0:1})).catch((()=>{process.exitCode=1}))}))}(t),t.demandCommand(1,"Typing `commit` or `staged`")}process.on("SIGINT",(()=>{})),new class{constructor(t,e){this.root=e;const{bin:n,homepage:i,name:r="cheetor",repository:{url:o=""}={},version:a}="string"==typeof t?JSON.parse((0,s.readFileSync)(new URL(t,e))):t;this.homepage=i,this.repository=o.includes("github.com")?o.replace(/\.git$/,""):"";const c=Te(process.argv.slice(2)).strict().alias("help","h").alias("version","v").hide("help").version(a).hide("version").detectLocale(!1),l=function(t,e){if("string"==typeof t||!t)return e;const n=Object.keys(t);return 1===n.length&&n[0]}(n,r);l&&c.scriptName(l),this.cli=Promise.resolve(c)}config(t){return this.cli=this.cli.then(t),this}command(...t){return this.cli=this.cli.then((e=>e.command(...t))),this}commandFrom(t){return this.cli=this.cli.then((async e=>{const n=await Ne(t,this.root);return e.command(n)})),this}commandSafe(t){return this.cli=this.cli.then((e=>function(t,e){return Ne(t,e).catch((t=>{if("ERR_MODULE_NOT_FOUND"===t.code&&t.message.endsWith(` imported from ${(0,m.fileURLToPath)(import.meta.url)}`))return!1;throw t}))}(t,this.root).then((t=>t&&t.command?e.command(t):e)))),this}commandSmart(t){return this.cli=this.cli.then((async e=>{const n=t();return n&&n.command?e.command(n):e})),this}website(t){return this.site=t,this}middleware(...t){return this.cli=this.cli.then((e=>e.middleware(...t))),this}setup(t){return this.cli.then((t=>Le(t,this))).then((e=>"function"==typeof t?t(e.parse()):e.parse()))}}("../package.json",import.meta.url).website("https://www.npmjs.com/org/nice-move").command(n).command(e).commandSmart((function(){if(qe("svgo/package.json")&&qe("svgo-config/package.json"))return{command:"svgo",describe:"Run `svgo` to optimize `*.svg`",handler({_:[t,e="./"]}){const n=(0,Ue.createRequire)(import.meta.url);Ge("svgo",["-r","-q","--pretty","--indent","2","--config",n.resolve("svgo-config"),"-f",e]).then((()=>{console.log("Done: calling svgo")})).catch((t=>{process.exitCode=1,console.error("Error:",t.message)}))}}})).setup()})();