@nice-move/init 0.8.16 → 0.8.18

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +58 -2
  2. package/package.json +7 -7
package/dist/cli.mjs CHANGED
@@ -1,2 +1,58 @@
1
- #!/usr/bin/env node
2
- import{createRequire as e}from"module";var t={2701:(e,t,r)=>{e=r.nmd(e);const n=(e,t)=>(...r)=>`\x1b[${e(...r)+t}m`,i=(e,t)=>(...r)=>{const n=e(...r);return`\x1b[${38+t};5;${n}m`},s=(e,t)=>(...r)=>{const n=e(...r);return`\x1b[${38+t};2;${n[0]};${n[1]};${n[2]}m`},o=e=>e,a=(e,t,r)=>[e,t,r],u=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{const n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})};let l;const c=(e,t,n,i)=>{void 0===l&&(l=r(9307));const s=i?10:0,o={};for(const[r,i]of Object.entries(l)){const a="ansi16"===r?"ansi":r;r===t?o[a]=e(n,s):"object"==typeof i&&(o[a]=e(i[t],s))}return o};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(const[r,n]of Object.entries(t)){for(const[r,i]of Object.entries(n))t[r]={open:`\x1b[${i[0]}m`,close:`\x1b[${i[1]}m`},n[r]=t[r],e.set(i[0],i[1]);Object.defineProperty(t,r,{value:n,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1b[39m",t.bgColor.close="\x1b[49m",u(t.color,"ansi",(()=>c(n,"ansi16",o,!1))),u(t.color,"ansi256",(()=>c(i,"ansi256",o,!1))),u(t.color,"ansi16m",(()=>c(s,"rgb",a,!1))),u(t.bgColor,"ansi",(()=>c(n,"ansi16",o,!0))),u(t.bgColor,"ansi256",(()=>c(i,"ansi256",o,!0))),u(t.bgColor,"ansi16m",(()=>c(s,"rgb",a,!0))),t}})},1813:e=>{e.exports=function(){return/^\s*([^<(]*?)\s*([<(]([^>)]*?)[>)])?\s*([<(]([^>)]*?)[>)])*\s*$/}},1364:(e,t,r)=>{const n=r(3027);e.exports=(e,t)=>new n(e,t)},3027:(e,t,r)=>{const n=r(6928),i=r(8611),s=r(5692),o=r(7124),a=r(3480),u=r(3106),{URL:l}=r(7016),c=r(5495),h=["gzip","deflate","br"];e.exports=class{constructor(e,t="GET"){return this.url="string"==typeof e?new l(e):e,this.method=t,this.data=null,this.sendDataAs=null,this.reqHeaders={},this.streamEnabled=!1,this.compressionEnabled=!1,this.timeoutTime=null,this.coreOptions={},this.maxRedirects=0,this.resOptions={maxBuffer:5e7},this}followRedirects(e){return this.maxRedirects=e,this}query(e,t){return"object"==typeof e?Object.keys(e).forEach((t=>{this.url.searchParams.append(t,e[t])})):this.url.searchParams.append(e,t),this}path(e){return this.url.pathname=n.join(this.url.pathname,e),this}body(e,t){return this.sendDataAs="object"!=typeof e||t||Buffer.isBuffer(e)?t?t.toLowerCase():"buffer":"json",this.data="form"===this.sendDataAs?a.stringify(e):"json"===this.sendDataAs?JSON.stringify(e):e,this}header(e,t){return"object"==typeof e?Object.keys(e).forEach((t=>{this.reqHeaders[t.toLowerCase()]=e[t]})):this.reqHeaders[e.toLowerCase()]=t,this}timeout(e){return this.timeoutTime=e,this}option(e,t){return this.coreOptions[e]=t,this}stream(){return this.streamEnabled=!0,this}compress(){return this.compressionEnabled=!0,this.reqHeaders["accept-encoding"]||(this.reqHeaders["accept-encoding"]=h.join(", ")),this}send(){return new Promise(((e,t)=>{this.data&&(this.reqHeaders.hasOwnProperty("content-type")||("json"===this.sendDataAs?this.reqHeaders["content-type"]="application/json":"form"===this.sendDataAs&&(this.reqHeaders["content-type"]="application/x-www-form-urlencoded")),this.reqHeaders.hasOwnProperty("content-length")||(this.reqHeaders["content-length"]=Buffer.byteLength(this.data)));const r=Object.assign({protocol:this.url.protocol,host:this.url.hostname.replace("[","").replace("]",""),port:this.url.port,path:this.url.pathname+(null===this.url.search?"":this.url.search),method:this.method,headers:this.reqHeaders,maxRedirects:this.maxRedirects},this.coreOptions);let n;const a=(e=>{let t,r;if(this.maxRedirects<=0?(t=i.request,r=s.request):(t=o.http.request,r=o.https.request),"http:"===e)return t;if("https:"===e)return r;throw new Error("Bad URL protocol: "+e)})(this.url.protocol);n=a(r,(r=>{let n,i=r;this.compressionEnabled&&("gzip"===r.headers["content-encoding"]?i=r.pipe(u.createGunzip()):"deflate"===r.headers["content-encoding"]?i=r.pipe(u.createInflate()):"br"===r.headers["content-encoding"]&&(i=r.pipe(u.createBrotliDecompress()))),this.streamEnabled?e(i):(n=new c(r,this.resOptions),i.on("error",(e=>{t(e)})),i.on("aborted",(()=>{t(new Error("Server aborted request"))})),i.on("data",(e=>{n._addChunk(e),null!==this.resOptions.maxBuffer&&n.body.length>this.resOptions.maxBuffer&&(i.destroy(),t("Received a response which was longer than acceptable when buffering. ("+this.body.length+" bytes)"))})),i.on("end",(()=>{e(n)})))})),this.timeoutTime&&n.setTimeout(this.timeoutTime,(()=>{n.abort(),this.streamEnabled||t(new Error("Timeout reached"))})),n.on("error",(e=>{t(e)})),this.data&&n.write(this.data),n.end()}))}}},5495:e=>{e.exports=class{constructor(e,t){this.coreRes=e,this.resOptions=t,this.body=Buffer.alloc(0),this.headers=e.headers,this.statusCode=e.statusCode}_addChunk(e){this.body=Buffer.concat([this.body,e])}async json(){return 204===this.statusCode?null:JSON.parse(this.body)}async text(){return this.body.toString()}}},6181:(e,t,r)=>{const n=r(2701),{stdout:i,stderr:s}=r(5421),{stringReplaceAll:o,stringEncaseCRLFWithFirstIndex:a}=r(2597),{isArray:u}=Array,l=["ansi","ansi","ansi256","ansi16m"],c=Object.create(null);class h{constructor(e){return d(e)}}const d=e=>{const t={};return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const r=i?i.level:0;e.level=void 0===t.level?r:t.level})(t,e),t.template=(...e)=>w(t.template,...e),Object.setPrototypeOf(t,p.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=h,t.template};function p(e){return d(e)}for(const[e,t]of Object.entries(n))c[e]={get(){const r=b(this,g(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};c.visible={get(){const e=b(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const f=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of f)c[e]={get(){const{level:t}=this;return function(...r){const i=g(n.color[l[t]][e](...r),n.color.close,this._styler);return b(this,i,this._isEmpty)}}};for(const e of f)c["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...r){const i=g(n.bgColor[l[t]][e](...r),n.bgColor.close,this._styler);return b(this,i,this._isEmpty)}}};const m=Object.defineProperties((()=>{}),{...c,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),g=(e,t,r)=>{let n,i;return void 0===r?(n=e,i=t):(n=r.openAll+e,i=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:i,parent:r}},b=(e,t,r)=>{const n=(...e)=>u(e[0])&&u(e[0].raw)?y(n,w(n,...e)):y(n,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(n,m),n._generator=e,n._styler=t,n._isEmpty=r,n},y=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(void 0===r)return t;const{openAll:n,closeAll:i}=r;if(-1!==t.indexOf("\x1b"))for(;void 0!==r;)t=o(t,r.close,r.open),r=r.parent;const s=t.indexOf("\n");return-1!==s&&(t=a(t,i,n,s)),n+t+i};let D;const w=(e,...t)=>{const[n]=t;if(!u(n)||!u(n.raw))return t.join(" ");const i=t.slice(1),s=[n.raw[0]];for(let e=1;e<n.length;e++)s.push(String(i[e-1]).replace(/[{}\\]/g,"\\$&"),String(n.raw[e]));return void 0===D&&(D=r(826)),D(e,s.join(""))};Object.defineProperties(p.prototype,c);const v=p();v.supportsColor=i,v.stderr=p({level:s?s.level:0}),v.stderr.supportsColor=s,e.exports=v},826:e=>{const t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,r=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,n=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,i=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,s=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1b"],["a","\x07"]]);function o(e){const t="u"===e[0],r="{"===e[1];return t&&!r&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):s.get(e)||e}function a(e,t){const r=[],s=t.trim().split(/\s*,\s*/g);let a;for(const t of s){const s=Number(t);if(Number.isNaN(s)){if(!(a=t.match(n)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);r.push(a[2].replace(i,((e,t,r)=>t?o(t):r)))}else r.push(s)}return r}function u(e){r.lastIndex=0;const t=[];let n;for(;null!==(n=r.exec(e));){const e=n[1];if(n[2]){const r=a(e,n[2]);t.push([e].concat(r))}else t.push([e])}return t}function l(e,t){const r={};for(const e of t)for(const t of e.styles)r[t[0]]=e.inverse?null:t.slice(1);let n=e;for(const[e,t]of Object.entries(r))if(Array.isArray(t)){if(!(e in n))throw new Error(`Unknown Chalk style: ${e}`);n=t.length>0?n[e](...t):n[e]}return n}e.exports=(e,r)=>{const n=[],i=[];let s=[];if(r.replace(t,((t,r,a,c,h,d)=>{if(r)s.push(o(r));else if(c){const t=s.join("");s=[],i.push(0===n.length?t:l(e,n)(t)),n.push({inverse:a,styles:u(c)})}else if(h){if(0===n.length)throw new Error("Found extraneous } in Chalk template literal");i.push(l(e,n)(s.join(""))),s=[],n.pop()}else s.push(d)})),i.push(s.join("")),n.length>0){const e=`Chalk template literal is missing ${n.length} closing bracket${1===n.length?"":"s"} (\`}\`)`;throw new Error(e)}return i.join("")}},2597:e=>{e.exports={stringReplaceAll:(e,t,r)=>{let n=e.indexOf(t);if(-1===n)return e;const i=t.length;let s=0,o="";do{o+=e.substr(s,n-s)+t+r,s=n+i,n=e.indexOf(t,s)}while(-1!==n);return o+=e.substr(s),o},stringEncaseCRLFWithFirstIndex:(e,t,r,n)=>{let i=0,s="";do{const o="\r"===e[n-1];s+=e.substr(i,(o?n-1:n)-i)+t+(o?"\r\n":"\n")+r,i=n+1,n=e.indexOf("\n",i)}while(-1!==n);return s+=e.substr(i),s}}},1473:(e,t,r)=>{const n=Object.assign({},r(7256)),i=Object.keys(n);Object.defineProperty(n,"random",{get(){const e=Math.floor(Math.random()*i.length),t=i[e];return n[t]}}),e.exports=n},8138:(e,t,r)=>{const n=r(9878),i={};for(const e of Object.keys(n))i[n[e]]=e;const s={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=s;for(const e of Object.keys(s)){if(!("channels"in s[e]))throw new Error("missing channels property: "+e);if(!("labels"in s[e]))throw new Error("missing channel labels property: "+e);if(s[e].labels.length!==s[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=s[e];delete s[e].channels,delete s[e].labels,Object.defineProperty(s[e],"channels",{value:t}),Object.defineProperty(s[e],"labels",{value:r})}s.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),s=Math.max(t,r,n),o=s-i;let a,u;s===i?a=0:t===s?a=(r-n)/o:r===s?a=2+(n-t)/o:n===s&&(a=4+(t-r)/o),a=Math.min(60*a,360),a<0&&(a+=360);const l=(i+s)/2;return u=s===i?0:l<=.5?o/(s+i):o/(2-s-i),[a,100*u,100*l]},s.rgb.hsv=function(e){let t,r,n,i,s;const o=e[0]/255,a=e[1]/255,u=e[2]/255,l=Math.max(o,a,u),c=l-Math.min(o,a,u),h=function(e){return(l-e)/6/c+.5};return 0===c?(i=0,s=0):(s=c/l,t=h(o),r=h(a),n=h(u),o===l?i=n-r:a===l?i=1/3+t-n:u===l&&(i=2/3+r-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*s,100*l]},s.rgb.hwb=function(e){const t=e[0],r=e[1];let n=e[2];const i=s.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[i,100*o,100*n]},s.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(1-t,1-r,1-n);return[100*((1-t-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*i]},s.rgb.keyword=function(e){const t=i[e];if(t)return t;let r,s=1/0;for(const t of Object.keys(n)){const i=(a=n[t],((o=e)[0]-a[0])**2+(o[1]-a[1])**2+(o[2]-a[2])**2);i<s&&(s=i,r=t)}var o,a;return r},s.keyword.rgb=function(e){return n[e]},s.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;return t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,[100*(.4124*t+.3576*r+.1805*n),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},s.rgb.lab=function(e){const t=s.rgb.xyz(e);let r=t[0],n=t[1],i=t[2];return r/=95.047,n/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,[116*n-16,500*(r-n),200*(n-i)]},s.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let i,s,o;if(0===r)return o=255*n,[o,o,o];i=n<.5?n*(1+r):n+r-n*r;const a=2*n-i,u=[0,0,0];for(let e=0;e<3;e++)s=t+1/3*-(e-1),s<0&&s++,s>1&&s--,o=6*s<1?a+6*(i-a)*s:2*s<1?i:3*s<2?a+(i-a)*(2/3-s)*6:a,u[e]=255*o;return u},s.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,i=r;const s=Math.max(n,.01);return n*=2,r*=n<=1?n:2-n,i*=s<=1?s:2-s,[t,100*(0===n?2*i/(s+i):2*r/(n+r)),(n+r)/2*100]},s.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const i=Math.floor(t)%6,s=t-Math.floor(t),o=255*n*(1-r),a=255*n*(1-r*s),u=255*n*(1-r*(1-s));switch(n*=255,i){case 0:return[n,u,o];case 1:return[a,n,o];case 2:return[o,n,u];case 3:return[o,a,n];case 4:return[u,o,n];case 5:return[n,o,a]}},s.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,i=Math.max(n,.01);let s,o;o=(2-r)*n;const a=(2-r)*i;return s=r*i,s/=a<=1?a:2-a,s=s||0,o/=2,[t,100*s,100*o]},s.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const i=r+n;let s;i>1&&(r/=i,n/=i);const o=Math.floor(6*t),a=1-n;s=6*t-o,1&o&&(s=1-s);const u=r+s*(a-r);let l,c,h;switch(o){default:case 6:case 0:l=a,c=u,h=r;break;case 1:l=u,c=a,h=r;break;case 2:l=r,c=a,h=u;break;case 3:l=r,c=u,h=a;break;case 4:l=u,c=r,h=a;break;case 5:l=a,c=r,h=u}return[255*l,255*c,255*h]},s.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]},s.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let i,s,o;return i=3.2406*t+-1.5372*r+-.4986*n,s=-.9689*t+1.8758*r+.0415*n,o=.0557*t+-.204*r+1.057*n,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[255*i,255*s,255*o]},s.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];return t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,[116*r-16,500*(t-r),200*(r-n)]},s.lab.xyz=function(e){let t,r,n;r=(e[0]+16)/116,t=e[1]/500+r,n=r-e[2]/200;const i=r**3,s=t**3,o=n**3;return r=i>.008856?i:(r-16/116)/7.787,t=s>.008856?s:(t-16/116)/7.787,n=o>.008856?o:(n-16/116)/7.787,t*=95.047,r*=100,n*=108.883,[t,r,n]},s.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let i;return i=360*Math.atan2(n,r)/2/Math.PI,i<0&&(i+=360),[t,Math.sqrt(r*r+n*n),i]},s.lch.lab=function(e){const t=e[0],r=e[1],n=e[2]/360*2*Math.PI;return[t,r*Math.cos(n),r*Math.sin(n)]},s.rgb.ansi16=function(e,t=null){const[r,n,i]=e;let o=null===t?s.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),0===o)return 30;let a=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return 2===o&&(a+=60),a},s.hsv.ansi16=function(e){return s.rgb.ansi16(s.hsv.rgb(e),e[2])},s.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},s.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},s.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;return e-=16,[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},s.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},s.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=r.split("").map((e=>e+e)).join(""));const n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},s.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.max(Math.max(t,r),n),s=Math.min(Math.min(t,r),n),o=i-s;let a,u;return a=o<1?s/(1-o):0,u=o<=0?0:i===t?(r-n)/o%6:i===r?2+(n-t)/o:4+(t-r)/o,u/=6,u%=1,[360*u,100*o,100*a]},s.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let i=0;return n<1&&(i=(r-.5*n)/(1-n)),[e[0],100*n,100*i]},s.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},s.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];const i=[0,0,0],s=t%1*6,o=s%1,a=1-o;let u=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return u=(1-r)*n,[255*(r*i[0]+u),255*(r*i[1]+u),255*(r*i[2]+u)]},s.hcg.hsv=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);let n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},s.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},s.hcg.hwb=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},s.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,n=r-t;let i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},s.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},s.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},s.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},s.gray.hsl=function(e){return[0,0,e[0]]},s.gray.hsv=s.gray.hsl,s.gray.hwb=function(e){return[0,100,e[0]]},s.gray.cmyk=function(e){return[0,0,0,e[0]]},s.gray.lab=function(e){return[e[0],0,0]},s.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},s.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},9307:(e,t,r)=>{const n=r(8138),i=r(5214),s={};Object.keys(n).forEach((e=>{s[e]={},Object.defineProperty(s[e],"channels",{value:n[e].channels}),Object.defineProperty(s[e],"labels",{value:n[e].labels});const t=i(e);Object.keys(t).forEach((r=>{const n=t[r];s[e][r]=function(e){const t=function(...t){const r=t[0];if(null==r)return r;r.length>1&&(t=r);const n=e(t);if("object"==typeof n)for(let e=n.length,t=0;t<e;t++)n[t]=Math.round(n[t]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(n),s[e][r].raw=function(e){const t=function(...t){const r=t[0];return null==r?r:(r.length>1&&(t=r),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)}))})),e.exports=s},5214:(e,t,r)=>{const n=r(8138);function i(e,t){return function(r){return t(e(r))}}function s(e,t){const r=[t[e].parent,e];let s=n[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)r.unshift(t[o].parent),s=i(n[t[o].parent][o],s),o=t[o].parent;return s.conversion=r,s}e.exports=function(e){const t=function(e){const t=function(){const e={},t=Object.keys(n);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}(),r=[e];for(t[e].distance=0;r.length;){const e=r.pop(),i=Object.keys(n[e]);for(let n=i.length,s=0;s<n;s++){const n=i[s],o=t[n];-1===o.distance&&(o.distance=t[e].distance+1,o.parent=e,r.unshift(n))}}return t}(e),r={},i=Object.keys(t);for(let e=i.length,n=0;n<e;n++){const e=i[n];null!==t[e].parent&&(r[e]=s(e,t))}return r}},9878:e=>{e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},6507:(e,t,r)=>{const n=r(5317),i=r(8388),s=r(442);function o(e,t,r){const o=i(e,t,r),a=n.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,r){const o=i(e,t,r),a=n.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},442:e=>{const t="win32"===process.platform;function r(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 n(e,n){return t&&1===e&&!n.file?r(n.original,"spawn"):null}e.exports={hookChildProcess:function(e,r){if(!t)return;const i=e.emit;e.emit=function(t,s){if("exit"===t){const t=n(s,r);if(t)return i.call(e,"error",t)}return i.apply(e,arguments)}},verifyENOENT:n,verifyENOENTSync:function(e,n){return t&&1===e&&!n.file?r(n.original,"spawnSync"):null},notFoundError:r}},8388:(e,t,r)=>{const n=r(6928),i=r(3803),s=r(2077),o=r(1880),a="win32"===process.platform,u=/\.(?:com|exe)$/i,l=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;e.exports=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const c={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?c:function(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),r=!u.test(t);if(e.options.forceShell||r){const r=l.test(t);e.command=n.normalize(e.command),e.command=s.command(e.command),e.args=e.args.map((e=>s.argument(e,r)));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}(c)}},2077:e=>{const t=/([()\][%!^"`<>&|;, *?])/g;e.exports.command=function(e){return e.replace(t,"^$1")},e.exports.argument=function(e,r){return e=(e=`"${e=(e=(e=`${e}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(t,"^$1"),r&&(e=e.replace(t,"^$1")),e}},1880:(e,t,r)=>{const n=r(9896),i=r(600);e.exports=function(e){const t=Buffer.alloc(150);let r;try{r=n.openSync(e,"r"),n.readSync(r,t,0,150,0),n.closeSync(r)}catch(e){}return i(t.toString())}},3803:(e,t,r)=>{const n=r(6928),i=r(1905),s=r(9695);function o(e,t){const r=e.options.env||process.env,o=process.cwd(),a=null!=e.options.cwd,u=a&&void 0!==process.chdir&&!process.chdir.disabled;if(u)try{process.chdir(e.options.cwd)}catch(e){}let l;try{l=i.sync(e.command,{path:r[s({env:r})],pathExt:t?n.delimiter:void 0})}catch(e){}finally{u&&process.chdir(o)}return l&&(l=n.resolve(a?e.options.cwd:"",l)),l}e.exports=function(e){return o(e)||o(e,!0)}},3298:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))})),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(9565)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},9565:(e,t,r)=>{e.exports=function(e){function t(e){let r,i,s,o=null;function a(...e){if(!a.enabled)return;const n=a,i=Number(new Date),s=i-(r||i);n.diff=s,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";o++;const s=t.formatters[i];if("function"==typeof s){const t=e[o];r=s.call(n,t),e.splice(o,1),o--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,s=t.enabled(e)),s),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function i(e,t){let r=0,n=0,i=-1,s=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(i=n,s=r,n++):(r++,n++);else{if(-1===i)return!1;n=i+1,s++,r=s}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names,...t.skips.map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").trim().replace(" ",",").split(",").filter(Boolean);for(const e of r)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const r of t.skips)if(i(e,r))return!1;for(const r of t.names)if(i(e,r))return!0;return!1},t.humanize=r(3866),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},8770:(e,t,r)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=r(3298):e.exports=r(2728)},2728:(e,t,r)=>{const n=r(2018),i=r(9023);t.init=function(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(...e){return process.stderr.write(i.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(r){const{namespace:n,useColors:i}=this;if(i){const t=this.color,i="\x1b[3"+(t<8?t:"8;5;"+t),s=` ${i};1m${n} \x1b[0m`;r[0]=s+r[0].split("\n").join("\n"+s),r.push(i+"m+"+e.exports.humanize(this.diff)+"\x1b[0m")}else r[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+n+" "+r[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=r(1754);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),e.exports=r(9565)(t);const{formatters:s}=e.exports;s.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},s.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}},7131:(e,t,r)=>{var n;e.exports=function(){if(!n){try{n=r(8770)("follow-redirects")}catch(e){}"function"!=typeof n&&(n=function(){})}n.apply(null,arguments)}},7124:(e,t,r)=>{var n,i,s,o=r(7016),a=o.URL,u=r(8611),l=r(5692),c=r(2203).Writable,h=r(2613),d=r(7131);n="undefined"!=typeof process,i="undefined"!=typeof window&&"undefined"!=typeof document,s=I(Error.captureStackTrace),n||!i&&s||console.warn("The follow-redirects package should be excluded from browser builds.");var p=!1;try{h(new a(""))}catch(e){p="ERR_INVALID_URL"===e.code}var f=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],m=["abort","aborted","connect","error","socket","timeout"],g=Object.create(null);m.forEach((function(e){g[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}}));var b=T("ERR_INVALID_URL","Invalid URL",TypeError),y=T("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),D=T("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",y),w=T("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),v=T("ERR_STREAM_WRITE_AFTER_END","write after end"),E=c.prototype.destroy||S;function F(e,t){c.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(e){try{r._processResponse(e)}catch(e){r.emit("error",e instanceof y?e:new y({cause:e}))}},this._performRequest()}function C(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(n){var i=n+":",s=r[i]=e[n],o=t[n]=Object.create(s);Object.defineProperties(o,{request:{value:function(e,n,s){return a&&e instanceof a?e=_(e):k(e)?e=_(x(e)):(s=n,n=O(e),e={protocol:i}),I(n)&&(s=n,n=null),(n=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,n)).nativeProtocols=r,k(n.host)||k(n.hostname)||(n.hostname="::1"),h.equal(n.protocol,i,"protocol mismatch"),d("options",n),new F(n,s)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var n=o.request(e,t,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),t}function S(){}function x(e){var t;if(p)t=new a(e);else if(!k((t=O(o.parse(e))).protocol))throw new b({input:e});return t}function O(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new b({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new b({input:e.href||e});return e}function _(e,t){var r=t||{};for(var n of f)r[n]=e[n];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),""!==r.port&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function A(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return null==r?void 0:String(r).trim()}function T(e,t,r){function n(r){I(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,r||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function M(e,t){for(var r of m)e.removeListener(r,g[r]);e.on("error",S),e.destroy(t)}function k(e){return"string"==typeof e||e instanceof String}function I(e){return"function"==typeof e}F.prototype=Object.create(c.prototype),F.prototype.abort=function(){M(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},F.prototype.destroy=function(e){return M(this._currentRequest,e),E.call(this,e),this},F.prototype.write=function(e,t,r){if(this._ending)throw new v;if(!(k(e)||"object"==typeof(n=e)&&"length"in n))throw new TypeError("data should be a string, Buffer or Uint8Array");var n;I(t)&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new w),this.abort()):r&&r()},F.prototype.end=function(e,t,r){if(I(e)?(r=e,e=t=null):I(t)&&(r=t,t=null),e){var n=this,i=this._currentRequest;this.write(e,t,(function(){n._ended=!0,i.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},F.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},F.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},F.prototype.setTimeout=function(e,t){var r=this;function n(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),s()}),e),n(t)}function s(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",s),r.removeListener("error",s),r.removeListener("response",s),r.removeListener("close",s),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",n),this.on("abort",s),this.on("error",s),this.on("response",s),this.on("close",s),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){F.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(F.prototype,e,{get:function(){return this._currentRequest[e]}})})),F.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},F.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var i of(n._redirectable=this,m))n.on(i,g[i]);if(this._currentUrl=/^\//.test(this._options.path)?o.format(this._options):this._options.path,this._isRedirect){var s=0,a=this,u=this._requestBodyBuffers;!function e(t){if(n===a._currentRequest)if(t)a.emit("error",t);else if(s<u.length){var r=u[s++];n.finished||n.write(r.data,r.encoding,e)}else a._ended&&n.end()}()}},F.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r,n=e.headers.location;if(!n||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(M(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new D;var i=this._options.beforeRedirect;i&&(r=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],A(/^content-/i,this._options.headers));var u,l,c=A(/^host$/i,this._options.headers),f=x(this._currentUrl),m=c||f.host,g=/^\w+:/.test(n)?this._currentUrl:o.format(Object.assign(f,{host:m})),b=(u=n,l=g,p?new a(u,l):x(o.resolve(l,u)));if(d("redirecting to",b.href),this._isRedirect=!0,_(b,this._options),(b.protocol!==f.protocol&&"https:"!==b.protocol||b.host!==m&&!function(e,t){h(k(e)&&k(t));var r=e.length-t.length-1;return r>0&&"."===e[r]&&e.endsWith(t)}(b.host,m))&&A(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),I(i)){var y={headers:e.headers,statusCode:t},w={url:g,method:s,headers:r};i(this._options,y,w),this._sanitizeOptions(this._options)}this._performRequest()},e.exports=C({http:u,https:l}),e.exports.wrap=C},1796:(e,t,r)=>{const n=r(627),i=r(6928),s=r(8006).mkdirsSync,o=r(9467).utimesMillisSync,a=r(5838);function u(e,t,r,s){const o=(s.dereference?n.statSync:n.lstatSync)(t);if(o.isDirectory())return function(e,t,r,i,s){return t?h(r,i,s):function(e,t,r,i){return n.mkdirSync(r),h(t,r,i),c(r,e)}(e.mode,r,i,s)}(o,e,t,r,s);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return function(e,t,r,i,s){return t?function(e,t,r,i){if(i.overwrite)return n.unlinkSync(r),l(e,t,r,i);if(i.errorOnExist)throw new Error(`'${r}' already exists`)}(e,r,i,s):l(e,r,i,s)}(o,e,t,r,s);if(o.isSymbolicLink())return function(e,t,r,s){let o=n.readlinkSync(t);if(s.dereference&&(o=i.resolve(process.cwd(),o)),e){let e;try{e=n.readlinkSync(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return n.symlinkSync(o,r);throw e}if(s.dereference&&(e=i.resolve(process.cwd(),e)),a.isSrcSubdir(o,e))throw new Error(`Cannot copy '${o}' to a subdirectory of itself, '${e}'.`);if(a.isSrcSubdir(e,o))throw new Error(`Cannot overwrite '${e}' with '${o}'.`);return function(e,t){return n.unlinkSync(t),n.symlinkSync(e,t)}(o,r)}return n.symlinkSync(o,r)}(e,t,r,s);if(o.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(o.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}function l(e,t,r,i){return n.copyFileSync(t,r),i.preserveTimestamps&&function(e,t,r){(function(e){return!(128&e)})(e)&&function(e,t){c(e,128|t)}(r,e),function(e,t){const r=n.statSync(e);o(t,r.atime,r.mtime)}(t,r)}(e.mode,t,r),c(r,e.mode)}function c(e,t){return n.chmodSync(e,t)}function h(e,t,r){const i=n.opendirSync(e);try{let n;for(;null!==(n=i.readSync());)d(n.name,e,t,r)}finally{i.closeSync()}}function d(e,t,r,n){const s=i.join(t,e),o=i.join(r,e);if(n.filter&&!n.filter(s,o))return;const{destStat:l}=a.checkPathsSync(s,o,"copy",n);return u(l,s,o,n)}e.exports=function(e,t,r){"function"==typeof r&&(r={filter:r}),(r=r||{}).clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0002");const{srcStat:o,destStat:l}=a.checkPathsSync(e,t,"copy",r);if(a.checkParentPathsSync(e,o,t,"copy"),r.filter&&!r.filter(e,t))return;const c=i.dirname(t);return n.existsSync(c)||s(c),u(l,e,t,r)}},4370:(e,t,r)=>{const n=r(6289),i=r(6928),{mkdirs:s}=r(8006),{pathExists:o}=r(3640),{utimesMillis:a}=r(9467),u=r(5838);async function l(e,t,r){return!r.filter||r.filter(e,t)}async function c(e,t,r,s){const o=s.dereference?n.stat:n.lstat,a=await o(t);if(a.isDirectory())return async function(e,t,r,s,o){t||await n.mkdir(s);const a=[];for await(const e of await n.opendir(r)){const t=i.join(r,e.name),n=i.join(s,e.name);a.push(l(t,n,o).then((e=>{if(e)return u.checkPaths(t,n,"copy",o).then((({destStat:e})=>c(e,t,n,o)))})))}await Promise.all(a),t||await n.chmod(s,e.mode)}(a,e,t,r,s);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return async function(e,t,r,i,s){if(!t)return h(e,r,i,s);if(s.overwrite)return await n.unlink(i),h(e,r,i,s);if(s.errorOnExist)throw new Error(`'${i}' already exists`)}(a,e,t,r,s);if(a.isSymbolicLink())return async function(e,t,r,s){let o=await n.readlink(t);if(s.dereference&&(o=i.resolve(process.cwd(),o)),!e)return n.symlink(o,r);let a=null;try{a=await n.readlink(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return n.symlink(o,r);throw e}if(s.dereference&&(a=i.resolve(process.cwd(),a)),u.isSrcSubdir(o,a))throw new Error(`Cannot copy '${o}' to a subdirectory of itself, '${a}'.`);if(u.isSrcSubdir(a,o))throw new Error(`Cannot overwrite '${a}' with '${o}'.`);return await n.unlink(r),n.symlink(o,r)}(e,t,r,s);if(a.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(a.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}async function h(e,t,r,i){if(await n.copyFile(t,r),i.preserveTimestamps){128&e.mode||await function(e,t){return n.chmod(e,128|t)}(r,e.mode);const i=await n.stat(t);await a(r,i.atime,i.mtime)}return n.chmod(r,e.mode)}e.exports=async function(e,t,r={}){"function"==typeof r&&(r={filter:r}),r.clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0001");const{srcStat:n,destStat:a}=await u.checkPaths(e,t,"copy",r);if(await u.checkParentPaths(e,n,t,"copy"),!await l(e,t,r))return;const h=i.dirname(t);await o(h)||await s(h),await c(a,e,t,r)}},7751:(e,t,r)=>{const n=r(4635).fromPromise;e.exports={copy:n(r(4370)),copySync:r(1796)}},1199:(e,t,r)=>{const n=r(4635).fromPromise,i=r(6289),s=r(6928),o=r(8006),a=r(9630),u=n((async function(e){let t;try{t=await i.readdir(e)}catch{return o.mkdirs(e)}return Promise.all(t.map((t=>a.remove(s.join(e,t)))))}));function l(e){let t;try{t=i.readdirSync(e)}catch{return o.mkdirsSync(e)}t.forEach((t=>{t=s.join(e,t),a.removeSync(t)}))}e.exports={emptyDirSync:l,emptydirSync:l,emptyDir:u,emptydir:u}},1872:(e,t,r)=>{const n=r(4635).fromPromise,i=r(6928),s=r(6289),o=r(8006);e.exports={createFile:n((async function(e){let t;try{t=await s.stat(e)}catch{}if(t&&t.isFile())return;const r=i.dirname(e);let n=null;try{n=await s.stat(r)}catch(t){if("ENOENT"===t.code)return await o.mkdirs(r),void await s.writeFile(e,"");throw t}n.isDirectory()?await s.writeFile(e,""):await s.readdir(r)})),createFileSync:function(e){let t;try{t=s.statSync(e)}catch{}if(t&&t.isFile())return;const r=i.dirname(e);try{s.statSync(r).isDirectory()||s.readdirSync(r)}catch(e){if(!e||"ENOENT"!==e.code)throw e;o.mkdirsSync(r)}s.writeFileSync(e,"")}}},4144:(e,t,r)=>{const{createFile:n,createFileSync:i}=r(1872),{createLink:s,createLinkSync:o}=r(130),{createSymlink:a,createSymlinkSync:u}=r(3211);e.exports={createFile:n,createFileSync:i,ensureFile:n,ensureFileSync:i,createLink:s,createLinkSync:o,ensureLink:s,ensureLinkSync:o,createSymlink:a,createSymlinkSync:u,ensureSymlink:a,ensureSymlinkSync:u}},130:(e,t,r)=>{const n=r(4635).fromPromise,i=r(6928),s=r(6289),o=r(8006),{pathExists:a}=r(3640),{areIdentical:u}=r(5838);e.exports={createLink:n((async function(e,t){let r,n;try{r=await s.lstat(t)}catch{}try{n=await s.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}if(r&&u(n,r))return;const l=i.dirname(t);await a(l)||await o.mkdirs(l),await s.link(e,t)})),createLinkSync:function(e,t){let r;try{r=s.lstatSync(t)}catch{}try{const t=s.lstatSync(e);if(r&&u(t,r))return}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const n=i.dirname(t);return s.existsSync(n)||o.mkdirsSync(n),s.linkSync(e,t)}}},2974:(e,t,r)=>{const n=r(6928),i=r(6289),{pathExists:s}=r(3640),o=r(4635).fromPromise;e.exports={symlinkPaths:o((async function(e,t){if(n.isAbsolute(e)){try{await i.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:e,toDst:e}}const r=n.dirname(t),o=n.join(r,e);if(await s(o))return{toCwd:o,toDst:e};try{await i.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:e,toDst:n.relative(r,e)}})),symlinkPathsSync:function(e,t){if(n.isAbsolute(e)){if(!i.existsSync(e))throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}const r=n.dirname(t),s=n.join(r,e);if(i.existsSync(s))return{toCwd:s,toDst:e};if(!i.existsSync(e))throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:n.relative(r,e)}}}},360:(e,t,r)=>{const n=r(6289),i=r(4635).fromPromise;e.exports={symlinkType:i((async function(e,t){if(t)return t;let r;try{r=await n.lstat(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"})),symlinkTypeSync:function(e,t){if(t)return t;let r;try{r=n.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}}},3211:(e,t,r)=>{const n=r(4635).fromPromise,i=r(6928),s=r(6289),{mkdirs:o,mkdirsSync:a}=r(8006),{symlinkPaths:u,symlinkPathsSync:l}=r(2974),{symlinkType:c,symlinkTypeSync:h}=r(360),{pathExists:d}=r(3640),{areIdentical:p}=r(5838);e.exports={createSymlink:n((async function(e,t,r){let n;try{n=await s.lstat(t)}catch{}if(n&&n.isSymbolicLink()){const[r,n]=await Promise.all([s.stat(e),s.stat(t)]);if(p(r,n))return}const a=await u(e,t);e=a.toDst;const l=await c(a.toCwd,r),h=i.dirname(t);return await d(h)||await o(h),s.symlink(e,t,l)})),createSymlinkSync:function(e,t,r){let n;try{n=s.lstatSync(t)}catch{}if(n&&n.isSymbolicLink()){const r=s.statSync(e),n=s.statSync(t);if(p(r,n))return}const o=l(e,t);e=o.toDst,r=h(o.toCwd,r);const u=i.dirname(t);return s.existsSync(u)||a(u),s.symlinkSync(e,t,r)}}},6289:(e,t,r)=>{const n=r(4635).fromCallback,i=r(627),s=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter((e=>"function"==typeof i[e]));Object.assign(t,i),s.forEach((e=>{t[e]=n(i[e])})),t.exists=function(e,t){return"function"==typeof t?i.exists(e,t):new Promise((t=>i.exists(e,t)))},t.read=function(e,t,r,n,s,o){return"function"==typeof o?i.read(e,t,r,n,s,o):new Promise(((o,a)=>{i.read(e,t,r,n,s,((e,t,r)=>{if(e)return a(e);o({bytesRead:t,buffer:r})}))}))},t.write=function(e,t,...r){return"function"==typeof r[r.length-1]?i.write(e,t,...r):new Promise(((n,s)=>{i.write(e,t,...r,((e,t,r)=>{if(e)return s(e);n({bytesWritten:t,buffer:r})}))}))},t.readv=function(e,t,...r){return"function"==typeof r[r.length-1]?i.readv(e,t,...r):new Promise(((n,s)=>{i.readv(e,t,...r,((e,t,r)=>{if(e)return s(e);n({bytesRead:t,buffers:r})}))}))},t.writev=function(e,t,...r){return"function"==typeof r[r.length-1]?i.writev(e,t,...r):new Promise(((n,s)=>{i.writev(e,t,...r,((e,t,r)=>{if(e)return s(e);n({bytesWritten:t,buffers:r})}))}))},"function"==typeof i.realpath.native?t.realpath.native=n(i.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")},8981:(e,t,r)=>{e.exports={...r(6289),...r(7751),...r(1199),...r(4144),...r(6704),...r(8006),...r(5783),...r(1376),...r(3640),...r(9630)}},6704:(e,t,r)=>{const n=r(4635).fromPromise,i=r(7590);i.outputJson=n(r(5338)),i.outputJsonSync=r(5740),i.outputJSON=i.outputJson,i.outputJSONSync=i.outputJsonSync,i.writeJSON=i.writeJson,i.writeJSONSync=i.writeJsonSync,i.readJSON=i.readJson,i.readJSONSync=i.readJsonSync,e.exports=i},7590:(e,t,r)=>{const n=r(8843);e.exports={readJson:n.readFile,readJsonSync:n.readFileSync,writeJson:n.writeFile,writeJsonSync:n.writeFileSync}},5740:(e,t,r)=>{const{stringify:n}=r(374),{outputFileSync:i}=r(1376);e.exports=function(e,t,r){const s=n(t,r);i(e,s,r)}},5338:(e,t,r)=>{const{stringify:n}=r(374),{outputFile:i}=r(1376);e.exports=async function(e,t,r={}){const s=n(t,r);await i(e,s,r)}},8006:(e,t,r)=>{const n=r(4635).fromPromise,{makeDir:i,makeDirSync:s}=r(7908),o=n(i);e.exports={mkdirs:o,mkdirsSync:s,mkdirp:o,mkdirpSync:s,ensureDir:o,ensureDirSync:s}},7908:(e,t,r)=>{const n=r(6289),{checkPath:i}=r(1319),s=e=>"number"==typeof e?e:{mode:511,...e}.mode;e.exports.makeDir=async(e,t)=>(i(e),n.mkdir(e,{mode:s(t),recursive:!0})),e.exports.makeDirSync=(e,t)=>(i(e),n.mkdirSync(e,{mode:s(t),recursive:!0}))},1319:(e,t,r)=>{const n=r(6928);e.exports.checkPath=function(e){if("win32"===process.platform&&/[<>:"|?*]/.test(e.replace(n.parse(e).root,""))){const t=new Error(`Path contains invalid characters: ${e}`);throw t.code="EINVAL",t}}},5783:(e,t,r)=>{const n=r(4635).fromPromise;e.exports={move:n(r(2690)),moveSync:r(4164)}},4164:(e,t,r)=>{const n=r(627),i=r(6928),s=r(7751).copySync,o=r(9630).removeSync,a=r(8006).mkdirpSync,u=r(5838);function l(e,t,r){try{n.renameSync(e,t)}catch(n){if("EXDEV"!==n.code)throw n;return function(e,t,r){return s(e,t,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),o(e)}(e,t,r)}}e.exports=function(e,t,r){const s=(r=r||{}).overwrite||r.clobber||!1,{srcStat:c,isChangingCase:h=!1}=u.checkPathsSync(e,t,"move",r);return u.checkParentPathsSync(e,c,t,"move"),function(e){const t=i.dirname(e);return i.parse(t).root===t}(t)||a(i.dirname(t)),function(e,t,r,i){if(i)return l(e,t,r);if(r)return o(t),l(e,t,r);if(n.existsSync(t))throw new Error("dest already exists.");return l(e,t,r)}(e,t,s,h)}},2690:(e,t,r)=>{const n=r(6289),i=r(6928),{copy:s}=r(7751),{remove:o}=r(9630),{mkdirp:a}=r(8006),{pathExists:u}=r(3640),l=r(5838);e.exports=async function(e,t,r={}){const c=r.overwrite||r.clobber||!1,{srcStat:h,isChangingCase:d=!1}=await l.checkPaths(e,t,"move",r);await l.checkParentPaths(e,h,t,"move");const p=i.dirname(t);return i.parse(p).root!==p&&await a(p),async function(e,t,r,i){if(!i)if(r)await o(t);else if(await u(t))throw new Error("dest already exists.");try{await n.rename(e,t)}catch(n){if("EXDEV"!==n.code)throw n;await async function(e,t,r){const n={overwrite:r,errorOnExist:!0,preserveTimestamps:!0};return await s(e,t,n),o(e)}(e,t,r)}}(e,t,c,d)}},1376:(e,t,r)=>{const n=r(4635).fromPromise,i=r(6289),s=r(6928),o=r(8006),a=r(3640).pathExists;e.exports={outputFile:n((async function(e,t,r="utf-8"){const n=s.dirname(e);return await a(n)||await o.mkdirs(n),i.writeFile(e,t,r)})),outputFileSync:function(e,...t){const r=s.dirname(e);i.existsSync(r)||o.mkdirsSync(r),i.writeFileSync(e,...t)}}},3640:(e,t,r)=>{const n=r(4635).fromPromise,i=r(6289);e.exports={pathExists:n((function(e){return i.access(e).then((()=>!0)).catch((()=>!1))})),pathExistsSync:i.existsSync}},9630:(e,t,r)=>{const n=r(627),i=r(4635).fromCallback;e.exports={remove:i((function(e,t){n.rm(e,{recursive:!0,force:!0},t)})),removeSync:function(e){n.rmSync(e,{recursive:!0,force:!0})}}},5838:(e,t,r)=>{const n=r(6289),i=r(6928),s=r(4635).fromPromise;function o(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function a(e,t){const r=i.resolve(e).split(i.sep).filter((e=>e)),n=i.resolve(t).split(i.sep).filter((e=>e));return r.every(((e,t)=>n[t]===e))}function u(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}e.exports={checkPaths:s((async function(e,t,r,s){const{srcStat:l,destStat:c}=await function(e,t,r){const i=r.dereference?e=>n.stat(e,{bigint:!0}):e=>n.lstat(e,{bigint:!0});return Promise.all([i(e),i(t).catch((e=>{if("ENOENT"===e.code)return null;throw e}))]).then((([e,t])=>({srcStat:e,destStat:t})))}(e,t,s);if(c){if(o(l,c)){const n=i.basename(e),s=i.basename(t);if("move"===r&&n!==s&&n.toLowerCase()===s.toLowerCase())return{srcStat:l,destStat:c,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(l.isDirectory()&&!c.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!l.isDirectory()&&c.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(l.isDirectory()&&a(e,t))throw new Error(u(e,t,r));return{srcStat:l,destStat:c}})),checkPathsSync:function(e,t,r,s){const{srcStat:l,destStat:c}=function(e,t,r){let i;const s=r.dereference?e=>n.statSync(e,{bigint:!0}):e=>n.lstatSync(e,{bigint:!0}),o=s(e);try{i=s(t)}catch(e){if("ENOENT"===e.code)return{srcStat:o,destStat:null};throw e}return{srcStat:o,destStat:i}}(e,t,s);if(c){if(o(l,c)){const n=i.basename(e),s=i.basename(t);if("move"===r&&n!==s&&n.toLowerCase()===s.toLowerCase())return{srcStat:l,destStat:c,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(l.isDirectory()&&!c.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!l.isDirectory()&&c.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(l.isDirectory()&&a(e,t))throw new Error(u(e,t,r));return{srcStat:l,destStat:c}},checkParentPaths:s((async function e(t,r,s,a){const l=i.resolve(i.dirname(t)),c=i.resolve(i.dirname(s));if(c===l||c===i.parse(c).root)return;let h;try{h=await n.stat(c,{bigint:!0})}catch(e){if("ENOENT"===e.code)return;throw e}if(o(r,h))throw new Error(u(t,s,a));return e(t,r,c,a)})),checkParentPathsSync:function e(t,r,s,a){const l=i.resolve(i.dirname(t)),c=i.resolve(i.dirname(s));if(c===l||c===i.parse(c).root)return;let h;try{h=n.statSync(c,{bigint:!0})}catch(e){if("ENOENT"===e.code)return;throw e}if(o(r,h))throw new Error(u(t,s,a));return e(t,r,c,a)},isSrcSubdir:a,areIdentical:o}},9467:(e,t,r)=>{const n=r(6289),i=r(4635).fromPromise;e.exports={utimesMillis:i((async function(e,t,r){const i=await n.open(e,"r+");let s=null;try{await n.futimes(i,t,r)}finally{try{await n.close(i)}catch(e){s=e}}if(s)throw s})),utimesMillisSync:function(e,t,r){const i=n.openSync(e,"r+");return n.futimesSync(i,t,r),n.closeSync(i)}}},8359:e=>{e.exports=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var r={__proto__:t(e)};else r=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})),r};var t=Object.getPrototypeOf||function(e){return e.__proto__}},627:(e,t,r)=>{var n,i,s=r(9896),o=r(8254),a=r(111),u=r(8359),l=r(9023);function c(e,t){Object.defineProperty(e,n,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(n=Symbol.for("graceful-fs.queue"),i=Symbol.for("graceful-fs.previous")):(n="___graceful-fs.queue",i="___graceful-fs.previous");var h,d=function(){};if(l.debuglog?d=l.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(d=function(){var e=l.format.apply(l,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!s[n]){var p=global[n]||[];c(s,p),s.close=function(e){function t(t,r){return e.call(s,t,(function(e){e||g(),"function"==typeof r&&r.apply(this,arguments)}))}return Object.defineProperty(t,i,{value:e}),t}(s.close),s.closeSync=function(e){function t(t){e.apply(s,arguments),g()}return Object.defineProperty(t,i,{value:e}),t}(s.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){d(s[n]),r(2613).equal(s[n].length,0)}))}function f(e){o(e),e.gracefulify=f,e.createReadStream=function(t,r){return new e.ReadStream(t,r)},e.createWriteStream=function(t,r){return new e.WriteStream(t,r)};var t=e.readFile;e.readFile=function(e,r,n){return"function"==typeof r&&(n=r,r=null),function e(r,n,i,s){return t(r,n,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof i&&i.apply(this,arguments):m([e,[r,n,i],t,s||Date.now(),Date.now()])}))}(e,r,n)};var r=e.writeFile;e.writeFile=function(e,t,n,i){return"function"==typeof n&&(i=n,n=null),function e(t,n,i,s,o){return r(t,n,i,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof s&&s.apply(this,arguments):m([e,[t,n,i,s],r,o||Date.now(),Date.now()])}))}(e,t,n,i)};var n=e.appendFile;n&&(e.appendFile=function(e,t,r,i){return"function"==typeof r&&(i=r,r=null),function e(t,r,i,s,o){return n(t,r,i,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof s&&s.apply(this,arguments):m([e,[t,r,i,s],n,o||Date.now(),Date.now()])}))}(e,t,r,i)});var i=e.copyFile;i&&(e.copyFile=function(e,t,r,n){return"function"==typeof r&&(n=r,r=0),function e(t,r,n,s,o){return i(t,r,n,(function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?"function"==typeof s&&s.apply(this,arguments):m([e,[t,r,n,s],i,o||Date.now(),Date.now()])}))}(e,t,r,n)});var s=e.readdir;e.readdir=function(e,t,r){"function"==typeof t&&(r=t,t=null);var n=u.test(process.version)?function(e,t,r,n){return s(e,i(e,t,r,n))}:function(e,t,r,n){return s(e,t,i(e,t,r,n))};return n(e,t,r);function i(e,t,r,i){return function(s,o){!s||"EMFILE"!==s.code&&"ENFILE"!==s.code?(o&&o.sort&&o.sort(),"function"==typeof r&&r.call(this,s,o)):m([n,[e,t,r],s,i||Date.now(),Date.now()])}}};var u=/^v[0-5]\./;if("v0.8"===process.version.substr(0,4)){var l=a(e);g=l.ReadStream,b=l.WriteStream}var c=e.ReadStream;c&&(g.prototype=Object.create(c.prototype),g.prototype.open=function(){var e=this;D(e.path,e.flags,e.mode,(function(t,r){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r),e.read())}))});var h=e.WriteStream;h&&(b.prototype=Object.create(h.prototype),b.prototype.open=function(){var e=this;D(e.path,e.flags,e.mode,(function(t,r){t?(e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return g},set:function(e){g=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return b},set:function(e){b=e},enumerable:!0,configurable:!0});var d=g;Object.defineProperty(e,"FileReadStream",{get:function(){return d},set:function(e){d=e},enumerable:!0,configurable:!0});var p=b;function g(e,t){return this instanceof g?(c.apply(this,arguments),this):g.apply(Object.create(g.prototype),arguments)}function b(e,t){return this instanceof b?(h.apply(this,arguments),this):b.apply(Object.create(b.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return p},set:function(e){p=e},enumerable:!0,configurable:!0});var y=e.open;function D(e,t,r,n){return"function"==typeof r&&(n=r,r=null),function e(t,r,n,i,s){return y(t,r,n,(function(o,a){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?"function"==typeof i&&i.apply(this,arguments):m([e,[t,r,n,i],o,s||Date.now(),Date.now()])}))}(e,t,r,n)}return e.open=D,e}function m(e){d("ENQUEUE",e[0].name,e[1]),s[n].push(e),b()}function g(){for(var e=Date.now(),t=0;t<s[n].length;++t)s[n][t].length>2&&(s[n][t][3]=e,s[n][t][4]=e);b()}function b(){if(clearTimeout(h),h=void 0,0!==s[n].length){var e=s[n].shift(),t=e[0],r=e[1],i=e[2],o=e[3],a=e[4];if(void 0===o)d("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-o>=6e4){d("TIMEOUT",t.name,r);var u=r.pop();"function"==typeof u&&u.call(null,i)}else{var l=Date.now()-a,c=Math.max(a-o,1);l>=Math.min(1.2*c,100)?(d("RETRY",t.name,r),t.apply(null,r.concat([o]))):s[n].push(e)}void 0===h&&(h=setTimeout(b,0))}}global[n]||c(global,s[n]),e.exports=f(u(s)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!s.__patched&&(e.exports=f(s),s.__patched=!0)},111:(e,t,r)=>{var n=r(2203).Stream;e.exports=function(e){return{ReadStream:function t(r,i){if(!(this instanceof t))return new t(r,i);n.call(this);var s=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,i=i||{};for(var o=Object.keys(i),a=0,u=o.length;a<u;a++){var l=o[a];this[l]=i[l]}if(this.encoding&&this.setEncoding(this.encoding),void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}null===this.fd?e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return s.emit("error",e),void(s.readable=!1);s.fd=t,s.emit("open",t),s._read()})):process.nextTick((function(){s._read()}))},WriteStream:function t(r,i){if(!(this instanceof t))return new t(r,i);n.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var s=Object.keys(i),o=0,a=s.length;o<a;o++){var u=s[o];this[u]=i[u]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}}},8254:(e,t,r)=>{var n=r(9140),i=process.cwd,s=null,o=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return s||(s=i.call(process)),s};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var a=process.chdir;process.chdir=function(e){s=null,a.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,a)}e.exports=function(e){function t(t){return t?function(r,n,i){return t.call(e,r,n,(function(e){l(e)&&(e=null),i&&i.apply(this,arguments)}))}:t}function r(t){return t?function(r,n){try{return t.call(e,r,n)}catch(e){if(!l(e))throw e}}:t}function i(t){return t?function(r,n,i,s){return t.call(e,r,n,i,(function(e){l(e)&&(e=null),s&&s.apply(this,arguments)}))}:t}function s(t){return t?function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!l(e))throw e}}:t}function a(t){return t?function(r,n,i){function s(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof n&&(i=n,n=null),n?t.call(e,r,n,s):t.call(e,r,s)}:t}function u(t){return t?function(r,n){var i=n?t.call(e,r,n):t.call(e,r);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}:t}function l(e){return!e||"ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code)}var c;n.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,r,i){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,(function(t,n){t?i&&i(t):e.fchmod(n,r,(function(t){e.close(n,(function(e){i&&i(t||e)}))}))}))},e.lchmodSync=function(t,r){var i,s=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r),o=!0;try{i=e.fchmodSync(s,r),o=!1}finally{if(o)try{e.closeSync(s)}catch(e){}else e.closeSync(s)}return i}}(e),e.lutimes||function(e){n.hasOwnProperty("O_SYMLINK")&&e.futimes?(e.lutimes=function(t,r,i,s){e.open(t,n.O_SYMLINK,(function(t,n){t?s&&s(t):e.futimes(n,r,i,(function(t){e.close(n,(function(e){s&&s(t||e)}))}))}))},e.lutimesSync=function(t,r,i){var s,o=e.openSync(t,n.O_SYMLINK),a=!0;try{s=e.futimesSync(o,r,i),a=!1}finally{if(a)try{e.closeSync(o)}catch(e){}else e.closeSync(o)}return s}):e.futimes&&(e.lutimes=function(e,t,r,n){n&&process.nextTick(n)},e.lutimesSync=function(){})}(e),e.chown=i(e.chown),e.fchown=i(e.fchown),e.lchown=i(e.lchown),e.chmod=t(e.chmod),e.fchmod=t(e.fchmod),e.lchmod=t(e.lchmod),e.chownSync=s(e.chownSync),e.fchownSync=s(e.fchownSync),e.lchownSync=s(e.lchownSync),e.chmodSync=r(e.chmodSync),e.fchmodSync=r(e.fchmodSync),e.lchmodSync=r(e.lchmodSync),e.stat=a(e.stat),e.fstat=a(e.fstat),e.lstat=a(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,r){r&&process.nextTick(r)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(e,t,r,n){n&&process.nextTick(n)},e.lchownSync=function(){}),"win32"===o&&(e.rename="function"!=typeof e.rename?e.rename:function(t){function r(r,n,i){var s=Date.now(),o=0;t(r,n,(function a(u){if(u&&("EACCES"===u.code||"EPERM"===u.code||"EBUSY"===u.code)&&Date.now()-s<6e4)return setTimeout((function(){e.stat(n,(function(e,s){e&&"ENOENT"===e.code?t(r,n,a):i(u)}))}),o),void(o<100&&(o+=10));i&&i(u)}))}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.rename)),e.read="function"!=typeof e.read?e.read:function(t){function r(r,n,i,s,o,a){var u;if(a&&"function"==typeof a){var l=0;u=function(c,h,d){if(c&&"EAGAIN"===c.code&&l<10)return l++,t.call(e,r,n,i,s,o,u);a.apply(this,arguments)}}return t.call(e,r,n,i,s,o,u)}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.read),e.readSync="function"!=typeof e.readSync?e.readSync:(c=e.readSync,function(t,r,n,i,s){for(var o=0;;)try{return c.call(e,t,r,n,i,s)}catch(e){if("EAGAIN"===e.code&&o<10){o++;continue}throw e}})}},4891:e=>{e.exports=(e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return-1!==n&&(-1===i||n<i)}},910:e=>{e.exports=(e,t=process.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return-1!==n&&(-1===i||n<i)}},4140:e=>{e.exports=e=>{if("object"!=typeof e||null===e)throw new TypeError("Expected an object");const t={};for(const[r,n]of Object.entries(e))t[n]=r;for(const r of Object.getOwnPropertySymbols(e))t[e[r]]=r;return t}},9344:(e,t,r)=>{var n;function i(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(r,n){i(e,t||{},(function(e,t){e?n(e):r(t)}))}))}n(e,t||{},(function(e,n){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}r(9896),n="win32"===process.platform||global.TESTING_WINDOWS?r(8541):r(709),e.exports=i,i.sync=function(e,t){try{return n.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},709:(e,t,r)=>{e.exports=i,i.sync=function(e,t){return s(n.statSync(e),t)};var n=r(9896);function i(e,t,r){n.stat(e,(function(e,n){r(e,!e&&s(n,t))}))}function s(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=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),u=parseInt("010",8);return r&parseInt("001",8)||r&u&&i===o||r&a&&n===s||r&(a|u)&&0===s}(e,t)}},8541:(e,t,r)=>{e.exports=s,s.sync=function(e,t){return i(n.statSync(e),e,t)};var n=r(9896);function i(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}(t,r)}function s(e,t,r){n.stat(e,(function(n,s){r(n,!n&&i(s,e,t))}))}},8843:(e,t,r)=>{let n;try{n=r(627)}catch(e){n=r(9896)}const i=r(4635),{stringify:s,stripBom:o}=r(374),a={readFile:i.fromPromise((async function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||n,s=!("throws"in t)||t.throws;let a,u=await i.fromCallback(r.readFile)(e,t);u=o(u);try{a=JSON.parse(u,t?t.reviver:null)}catch(t){if(s)throw t.message=`${e}: ${t.message}`,t;return null}return a})),readFileSync:function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||n,i=!("throws"in t)||t.throws;try{let n=r.readFileSync(e,t);return n=o(n),JSON.parse(n,t.reviver)}catch(t){if(i)throw t.message=`${e}: ${t.message}`,t;return null}},writeFile:i.fromPromise((async function(e,t,r={}){const o=r.fs||n,a=s(t,r);await i.fromCallback(o.writeFile)(e,a,r)})),writeFileSync:function(e,t,r={}){const i=r.fs||n,o=s(t,r);return i.writeFileSync(e,o,r)}};e.exports=a},374:e=>{e.exports={stringify:function(e,{EOL:t="\n",finalEOL:r=!0,replacer:n=null,spaces:i}={}){const s=r?t:"";return JSON.stringify(e,n,i).replace(/\n/g,t)+s},stripBom:function(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}}},8888:e=>{const{FORCE_COLOR:t,NODE_DISABLE_COLORS:r,TERM:n}=process.env,i={enabled:!r&&"dumb"!==n&&"0"!==t,reset:o(0,0),bold:o(1,22),dim:o(2,22),italic:o(3,23),underline:o(4,24),inverse:o(7,27),hidden:o(8,28),strikethrough:o(9,29),black:o(30,39),red:o(31,39),green:o(32,39),yellow:o(33,39),blue:o(34,39),magenta:o(35,39),cyan:o(36,39),white:o(37,39),gray:o(90,39),grey:o(90,39),bgBlack:o(40,49),bgRed:o(41,49),bgGreen:o(42,49),bgYellow:o(43,49),bgBlue:o(44,49),bgMagenta:o(45,49),bgCyan:o(46,49),bgWhite:o(47,49)};function s(e,t){let r,n=0,i="",s="";for(;n<e.length;n++)r=e[n],i+=r.open,s+=r.close,t.includes(r.close)&&(t=t.replace(r.rgx,r.close+r.open));return i+t+s}function o(e,t){let r={open:`\x1b[${e}m`,close:`\x1b[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(t){return void 0!==this&&void 0!==this.has?(this.has.includes(e)||(this.has.push(e),this.keys.push(r)),void 0===t?this:i.enabled?s(this.keys,t+""):t+""):void 0===t?function(e,t){let r={has:e,keys:t};return r.reset=i.reset.bind(r),r.bold=i.bold.bind(r),r.dim=i.dim.bind(r),r.italic=i.italic.bind(r),r.underline=i.underline.bind(r),r.inverse=i.inverse.bind(r),r.hidden=i.hidden.bind(r),r.strikethrough=i.strikethrough.bind(r),r.black=i.black.bind(r),r.red=i.red.bind(r),r.green=i.green.bind(r),r.yellow=i.yellow.bind(r),r.blue=i.blue.bind(r),r.magenta=i.magenta.bind(r),r.cyan=i.cyan.bind(r),r.white=i.white.bind(r),r.gray=i.gray.bind(r),r.grey=i.grey.bind(r),r.bgBlack=i.bgBlack.bind(r),r.bgRed=i.bgRed.bind(r),r.bgGreen=i.bgGreen.bind(r),r.bgYellow=i.bgYellow.bind(r),r.bgBlue=i.bgBlue.bind(r),r.bgMagenta=i.bgMagenta.bind(r),r.bgCyan=i.bgCyan.bind(r),r.bgWhite=i.bgWhite.bind(r),r}([e],[r]):i.enabled?s([r],t+""):t+""}}e.exports=i},323:(e,t,r)=>{const n=r(4140),i=r(8360),s=n(i);t.from=e=>{if("number"!=typeof e)throw new TypeError("Expected a number");return i[e]},t.to=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");if(s[e])return Number(s[e])},t.all=new Proxy(s,{get(e,t){const r=e[t];if(r)return Number(r)}})},3866:e=>{var t=1e3,r=60*t,n=60*r,i=24*n,s=7*i;function o(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}e.exports=function(e,a){a=a||{};var u,l,c=typeof e;if("string"===c&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(o){var a=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return a*s;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(e);if("number"===c&&isFinite(e))return a.long?(u=e,(l=Math.abs(u))>=i?o(u,l,i,"day"):l>=n?o(u,l,n,"hour"):l>=r?o(u,l,r,"minute"):l>=t?o(u,l,t,"second"):u+" ms"):function(e){var s=Math.abs(e);return s>=i?Math.round(e/i)+"d":s>=n?Math.round(e/n)+"h":s>=r?Math.round(e/r)+"m":s>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},1416:(e,t,r)=>{var n=r(1813);e.exports=function(e){if("string"!=typeof e)throw new TypeError("expected author to be a string");if(!e||!/\w/.test(e))return{};var t=[].concat.apply([],n().exec(e)),r={};t[1]&&(r.name=t[1]);for(var i=2;i<t.length;i++){var s=t[i];i%2==0&&s&&t[i+1]&&("<"===s.charAt(0)?(r.email=t[i+1],i++):"("===s.charAt(0)&&(r.url=t[i+1],i++))}return r}},9695: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},8459:e=>{class t{constructor({token:e,date:t,parts:r,locales:n}){this.token=e,this.date=t||new Date,this.parts=r||[this],this.locales=n||{}}up(){}down(){}next(){const e=this.parts.indexOf(this);return this.parts.find(((r,n)=>n>e&&r instanceof t))}setTo(e){}prev(){let e=[].concat(this.parts).reverse();const r=e.indexOf(this);return e.find(((e,n)=>n>r&&e instanceof t))}toString(){return String(this.date)}}e.exports=t},5882:(e,t,r)=>{const n=r(8459);e.exports=class extends n{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),t=this.date.getDay();return"DD"===this.token?String(e).padStart(2,"0"):"Do"===this.token?e+(r=e,1==(r%=10)?"st":2===r?"nd":3===r?"rd":"th"):"d"===this.token?t+1:"ddd"===this.token?this.locales.weekdaysShort[t]:"dddd"===this.token?this.locales.weekdays[t]:e;var r}}},2583:(e,t,r)=>{const n=r(8459);e.exports=class extends n{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}}},9180:(e,t,r)=>{e.exports={DatePart:r(8459),Meridiem:r(4356),Day:r(5882),Hours:r(2583),Milliseconds:r(1516),Minutes:r(3317),Month:r(5058),Seconds:r(249),Year:r(5599)}},4356:(e,t,r)=>{const n=r(8459);e.exports=class extends n{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}}},1516:(e,t,r)=>{const n=r(8459);e.exports=class extends n{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}},3317:(e,t,r)=>{const n=r(8459);e.exports=class extends n{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}}},5058:(e,t,r)=>{const n=r(8459);e.exports=class extends n{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),t=this.token.length;return 2===t?String(e+1).padStart(2,"0"):3===t?this.locales.monthsShort[e]:4===t?this.locales.months[e]:String(e+1)}}},249:(e,t,r)=>{const n=r(8459);e.exports=class extends n{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}}},5599:(e,t,r)=>{const n=r(8459);e.exports=class extends n{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return 2===this.token.length?e.substr(-2):e}}},9111:(e,t,r)=>{function n(e,t,r,n,i,s,o){try{var a=e[s](o),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(n,i)}const i=r(8888),s=r(7261),o=r(4347),a=o.erase,u=o.cursor,l=r(8482),c=l.style,h=l.clear,d=l.figures,p=l.wrap,f=l.entriesToDisplay,m=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]),g=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]);e.exports=class extends s{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial="number"==typeof e.initial?e.initial:((e,t)=>{const r=e.findIndex((e=>e.value===t||e.title===t));return r>-1?r:void 0})(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=c.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=h("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return"number"==typeof this._fb?e=this.choices[this._fb]:"string"==typeof this._fb&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=m(this.suggestions,e):this.value=this.fallback.value,this.fire()}complete(e){var t,r=this;return(t=function*(){const t=r.completing=r.suggest(r.input,r.choices),n=yield t;if(r.completing!==t)return;r.suggestions=n.map(((e,t,r)=>({title:g(r,t),value:m(r,t),description:e.description}))),r.completing=!1;const i=Math.max(n.length-1,0);r.moveSelect(Math.min(i,r.select)),e&&e()},function(){var e=this,r=arguments;return new Promise((function(i,s){var o=t.apply(e,r);function a(e){n(o,i,s,a,u,"next",e)}function u(e){n(o,i,s,a,u,"throw",e)}a(void 0)}))})()}reset(){this.input="",this.complete((()=>{this.moveSelect(void 0!==this.initial?this.initial:0),this.render()})),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(e,t){let r=this.input.slice(0,this.cursor),n=this.input.slice(this.cursor);this.input=`${r}${e}${n}`,this.cursor=r.length+1,this.complete(this.render),this.render()}delete(){if(0===this.cursor)return this.bell();let e=this.input.slice(0,this.cursor-1),t=this.input.slice(this.cursor);this.input=`${e}${t}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),t=this.input.slice(this.cursor+1);this.input=`${e}${t}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){0===this.select?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,t,r,n){let s,o=r?d.arrowUp:n?d.arrowDown:" ",a=t?i.cyan().underline(e.title):e.title;return o=(t?i.cyan(d.pointer)+" ":" ")+o,e.description&&(s=` - ${e.description}`,(o.length+a.length+s.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(s="\n"+p(e.description,{margin:3,width:this.out.columns}))),o+" "+a+i.gray(s||"")}render(){if(this.closed)return;this.firstRender?this.out.write(u.hide):this.out.write(h(this.outputText,this.out.columns)),super.render();let e=f(this.select,this.choices.length,this.limit),t=e.startIndex,r=e.endIndex;if(this.outputText=[c.symbol(this.done,this.aborted,this.exited),i.bold(this.msg),c.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const e=this.suggestions.slice(t,r).map(((e,n)=>this.renderOption(e,this.select===n+t,0===n&&t>0,n+t===r-1&&r<this.choices.length))).join("\n");this.outputText+="\n"+(e||i.gray(this.fallback.title))}this.out.write(a.line+u.to(0)+this.outputText)}}},5518:(e,t,r)=>{const n=r(8888),i=r(4347).cursor,s=r(538),o=r(8482),a=o.clear,u=o.style,l=o.figures;e.exports=class extends s{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=a("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){0===this.cursor?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){const e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((e=>!this.inputValue||!("string"!=typeof e.title||!e.title.toLowerCase().includes(this.inputValue.toLowerCase()))||!("string"!=typeof e.value||!e.value.toLowerCase().includes(this.inputValue.toLowerCase()))));const t=this.filteredOptions.findIndex((t=>t===e));this.cursor=t<0?0:t,this.render()}handleSpaceToggle(){const e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,t){" "===e?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`\nInstructions:\n ${l.arrowUp}/${l.arrowDown}: Highlight option\n ${l.arrowLeft}/${l.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`:""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:n.gray("Enter something to filter")}\n`}renderOption(e,t,r){let i;return i=t.disabled?e===r?n.gray().underline(t.title):n.strikethrough().gray(t.title):e===r?n.cyan().underline(t.title):t.title,(t.selected?n.green(l.radioOn):l.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done)return this.value.filter((e=>e.selected)).map((e=>e.title)).join(", ");const e=[n.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(n.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(i.hide),super.render();let e=[u.symbol(this.done,this.aborted),n.bold(this.msg),u.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=n.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=a(e,this.out.columns)}}},539:(e,t,r)=>{const n=r(8888),i=r(7261),s=r(8482),o=s.style,a=s.clear,u=r(4347),l=u.erase,c=u.cursor;e.exports=class extends i{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(e,t){return"y"===e.toLowerCase()?(this.value=!0,this.submit()):"n"===e.toLowerCase()?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(c.hide):this.out.write(a(this.outputText,this.out.columns)),super.render(),this.outputText=[o.symbol(this.done,this.aborted),n.bold(this.msg),o.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:n.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(l.line+c.to(0)+this.outputText))}}},7191:(e,t,r)=>{function n(e,t,r,n,i,s,o){try{var a=e[s](o),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(i,s){var o=e.apply(t,r);function a(e){n(o,i,s,a,u,"next",e)}function u(e){n(o,i,s,a,u,"throw",e)}a(void 0)}))}}const s=r(8888),o=r(7261),a=r(8482),u=a.style,l=a.clear,c=a.figures,h=r(4347),d=h.erase,p=h.cursor,f=r(9180),m=f.DatePart,g=f.Meridiem,b=f.Day,y=f.Hours,D=f.Milliseconds,w=f.Minutes,v=f.Month,E=f.Seconds,F=f.Year,C=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,S={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new b(e),3:e=>new v(e),4:e=>new F(e),5:e=>new g(e),6:e=>new y(e),7:e=>new w(e),8:e=>new E(e),9:e=>new D(e)},x={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};e.exports=class extends o{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(x,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=l("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let t;for(this.parts=[];t=C.exec(e);){let e=t.shift(),r=t.findIndex((e=>null!=e));this.parts.push(r in S?S[r]({token:t[r]||e,date:this.date,parts:this.parts,locales:this.locales}):t[r]||e)}let r=this.parts.reduce(((e,t)=>("string"==typeof t&&"string"==typeof e[e.length-1]?e[e.length-1]+=t:e.push(t),e)),[]);this.parts.splice(0),this.parts.push(...r),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex((e=>e instanceof m))),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var e=this;return i((function*(){let t=yield e.validator(e.value);"string"==typeof t&&(e.errorMsg=t,t=!1),e.error=!t}))()}submit(){var e=this;return i((function*(){if(yield e.validate(),e.error)return e.color="red",e.fire(),void e.render();e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write("\n"),e.close()}))()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(null==e)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(null==e)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex((e=>e instanceof m))),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(p.hide):this.out.write(l(this.outputText,this.out.columns)),super.render(),this.outputText=[u.symbol(this.done,this.aborted),s.bold(this.msg),u.delimiter(!1),this.parts.reduce(((e,t,r)=>e.concat(r!==this.cursor||this.done?t:s.cyan().underline(t.toString()))),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split("\n").reduce(((e,t,r)=>e+`\n${r?" ":c.pointerSmall} ${s.red().italic(t)}`),"")),this.out.write(d.line+p.to(0)+this.outputText))}}},271:(e,t,r)=>{e.exports={TextPrompt:r(3392),SelectPrompt:r(4003),TogglePrompt:r(5807),DatePrompt:r(7191),NumberPrompt:r(1270),MultiselectPrompt:r(538),AutocompletePrompt:r(9111),AutocompleteMultiselectPrompt:r(5518),ConfirmPrompt:r(539)}},538:(e,t,r)=>{const n=r(8888),i=r(4347).cursor,s=r(7261),o=r(8482),a=o.clear,u=o.figures,l=o.style,c=o.wrap,h=o.entriesToDisplay;e.exports=class extends s{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map(((e,t)=>("string"==typeof e&&(e={title:e,value:t}),{title:e&&(e.title||e.value||e),description:e&&e.description,value:e&&(void 0===e.value?t:e.value),selected:e&&e.selected,disabled:e&&e.disabled}))),this.clear=a("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map((e=>!e.selected)),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((e=>e.selected))}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){const e=this.value.filter((e=>e.selected));this.minSelected&&e.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){0===this.cursor?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const e=this.value[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}toggleAll(){if(void 0!==this.maxChoices||this.value[this.cursor].disabled)return this.bell();const e=!this.value[this.cursor].selected;this.value.filter((e=>!e.disabled)).forEach((t=>t.selected=e)),this.render()}_(e,t){if(" "===e)this.handleSpaceToggle();else{if("a"!==e)return this.bell();this.toggleAll()}}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`\nInstructions:\n ${u.arrowUp}/${u.arrowDown}: Highlight option\n ${u.arrowLeft}/${u.arrowRight}/[space]: Toggle selection\n`+(void 0===this.maxChoices?" a: Toggle all\n":"")+" enter/return: Complete answer":""}renderOption(e,t,r,i){const s=(t.selected?n.green(u.radioOn):u.radioOff)+" "+i+" ";let o,a;return t.disabled?o=e===r?n.gray().underline(t.title):n.strikethrough().gray(t.title):(o=e===r?n.cyan().underline(t.title):t.title,e===r&&t.description&&(a=` - ${t.description}`,(s.length+o.length+a.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(a="\n"+c(t.description,{margin:s.length,width:this.out.columns})))),s+o+n.gray(a||"")}paginateOptions(e){if(0===e.length)return n.red("No matches for this query.");let t,r=h(this.cursor,e.length,this.optionsPerPage),i=r.startIndex,s=r.endIndex,o=[];for(let r=i;r<s;r++)t=r===i&&i>0?u.arrowUp:r===s-1&&s<e.length?u.arrowDown:" ",o.push(this.renderOption(this.cursor,e[r],r,t));return"\n"+o.join("\n")}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter((e=>e.selected)).map((e=>e.title)).join(", ");const e=[n.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(n.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(i.hide),super.render();let e=[l.symbol(this.done,this.aborted),n.bold(this.msg),l.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=n.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=a(e,this.out.columns)}}},1270:(e,t,r)=>{function n(e,t,r,n,i,s,o){try{var a=e[s](o),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(i,s){var o=e.apply(t,r);function a(e){n(o,i,s,a,u,"next",e)}function u(e){n(o,i,s,a,u,"throw",e)}a(void 0)}))}}const s=r(8888),o=r(7261),a=r(4347),u=a.cursor,l=a.erase,c=r(8482),h=c.style,d=c.figures,p=c.clear,f=c.lines,m=/[0-9]/,g=e=>void 0!==e,b=(e,t)=>{let r=Math.pow(10,t);return Math.round(e*r)/r};e.exports=class extends o{constructor(e={}){super(e),this.transform=h.render(e.style),this.msg=e.message,this.initial=g(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=g(e.min)?e.min:-1/0,this.max=g(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){e||0===e?(this.placeholder=!1,this.rendered=this.transform.render(`${b(e,this.round)}`),this._value=b(e,this.round)):(this.placeholder=!0,this.rendered=s.gray(this.transform.render(`${this.initial}`)),this._value=""),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return"-"===e||"."===e&&this.float||m.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=""!==e?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var e=this;return i((function*(){let t=yield e.validator(e.value);"string"==typeof t&&(e.errorMsg=t,t=!1),e.error=!t}))()}submit(){var e=this;return i((function*(){if(yield e.validate(),e.error)return e.color="red",e.fire(),void e.render();let t=e.value;e.value=""!==t?t:e.initial,e.done=!0,e.aborted=!1,e.error=!1,e.fire(),e.render(),e.out.write("\n"),e.close()}))()}up(){if(this.typed="",""===this.value&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",""===this.value&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(0===e.length)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",""!==this.value&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,t){if(!this.valid(e))return this.bell();const r=Date.now();if(r-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=r,this.color="cyan","."===e)return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(u.down(f(this.outputError,this.out.columns)-1)+p(this.outputError,this.out.columns)),this.out.write(p(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[h.symbol(this.done,this.aborted),s.bold(this.msg),h.delimiter(this.done),this.done&&(this.done||this.placeholder)?this.rendered:s[this.color]().underline(this.rendered)].join(" "),this.error&&(this.outputError+=this.errorMsg.split("\n").reduce(((e,t,r)=>e+`\n${r?" ":d.pointerSmall} ${s.red().italic(t)}`),"")),this.out.write(l.line+u.to(0)+this.outputText+u.save+this.outputError+u.restore))}}},7261:(e,t,r)=>{const n=r(3785),i=r(8482).action,s=r(4434),o=r(4347),a=o.beep,u=o.cursor,l=r(8888);e.exports=class extends s{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);const t=n.createInterface({input:this.in,escapeCodeTimeout:50});n.emitKeypressEvents(this.in,t),this.in.isTTY&&this.in.setRawMode(!0);const r=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,s=(e,t)=>{let n=i(t,r);!1===n?this._&&this._(e,t):"function"==typeof this[n]?this[n](t):this.bell()};this.close=()=>{this.out.write(u.show),this.in.removeListener("keypress",s),this.in.isTTY&&this.in.setRawMode(!1),t.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",s)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(a)}render(){this.onRender(l),this.firstRender&&(this.firstRender=!1)}}},4003:(e,t,r)=>{const n=r(8888),i=r(7261),s=r(8482),o=s.style,a=s.clear,u=s.figures,l=s.wrap,c=s.entriesToDisplay,h=r(4347).cursor;e.exports=class extends i{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map(((e,t)=>("string"==typeof e&&(e={title:e,value:t}),{title:e&&(e.title||e.value||e),value:e&&(void 0===e.value?t:e.value),description:e&&e.description,selected:e&&e.selected,disabled:e&&e.disabled}))),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=a("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){0===this.cursor?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,t){if(" "===e)return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(h.hide):this.out.write(a(this.outputText,this.out.columns)),super.render();let e=c(this.cursor,this.choices.length,this.optionsPerPage),t=e.startIndex,r=e.endIndex;if(this.outputText=[o.symbol(this.done,this.aborted),n.bold(this.msg),o.delimiter(!1),this.done?this.selection.title:this.selection.disabled?n.yellow(this.warn):n.gray(this.hint)].join(" "),!this.done){this.outputText+="\n";for(let e=t;e<r;e++){let i,s,o="",a=this.choices[e];s=e===t&&t>0?u.arrowUp:e===r-1&&r<this.choices.length?u.arrowDown:" ",a.disabled?(i=this.cursor===e?n.gray().underline(a.title):n.strikethrough().gray(a.title),s=(this.cursor===e?n.bold().gray(u.pointer)+" ":" ")+s):(i=this.cursor===e?n.cyan().underline(a.title):a.title,s=(this.cursor===e?n.cyan(u.pointer)+" ":" ")+s,a.description&&this.cursor===e&&(o=` - ${a.description}`,(s.length+i.length+o.length>=this.out.columns||a.description.split(/\r?\n/).length>1)&&(o="\n"+l(a.description,{margin:3,width:this.out.columns})))),this.outputText+=`${s} ${i}${n.gray(o)}\n`}}this.out.write(this.outputText)}}},3392:(e,t,r)=>{function n(e,t,r,n,i,s,o){try{var a=e[s](o),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(i,s){var o=e.apply(t,r);function a(e){n(o,i,s,a,u,"next",e)}function u(e){n(o,i,s,a,u,"throw",e)}a(void 0)}))}}const s=r(8888),o=r(7261),a=r(4347),u=a.erase,l=a.cursor,c=r(8482),h=c.style,d=c.clear,p=c.lines,f=c.figures;e.exports=class extends o{constructor(e={}){super(e),this.transform=h.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=d("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=s.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var e=this;return i((function*(){let t=yield e.validator(e.value);"string"==typeof t&&(e.errorMsg=t,t=!1),e.error=!t}))()}submit(){var e=this;return i((function*(){if(e.value=e.value||e.initial,e.cursorOffset=0,e.cursor=e.rendered.length,yield e.validate(),e.error)return e.red=!0,e.fire(),void e.render();e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write("\n"),e.close()}))()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,t){let r=this.value.slice(0,this.cursor),n=this.value.slice(this.cursor);this.value=`${r}${e}${n}`,this.red=!1,this.cursor=this.placeholder?0:r.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),t=this.value.slice(this.cursor);this.value=`${e}${t}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),t=this.value.slice(this.cursor+1);this.value=`${e}${t}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return 0===this.cursor||this.placeholder&&1===this.cursor}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(l.down(p(this.outputError,this.out.columns)-1)+d(this.outputError,this.out.columns)),this.out.write(d(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[h.symbol(this.done,this.aborted),s.bold(this.msg),h.delimiter(this.done),this.red?s.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split("\n").reduce(((e,t,r)=>e+`\n${r?" ":f.pointerSmall} ${s.red().italic(t)}`),"")),this.out.write(u.line+l.to(0)+this.outputText+l.save+this.outputError+l.restore+l.move(this.cursorOffset,0)))}}},5807:(e,t,r)=>{const n=r(8888),i=r(7261),s=r(8482),o=s.style,a=s.clear,u=r(4347),l=u.cursor,c=u.erase;e.exports=class extends i{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}deactivate(){if(!1===this.value)return this.bell();this.value=!1,this.render()}activate(){if(!0===this.value)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,t){if(" "===e)this.value=!this.value;else if("1"===e)this.value=!0;else{if("0"!==e)return this.bell();this.value=!1}this.render()}render(){this.closed||(this.firstRender?this.out.write(l.hide):this.out.write(a(this.outputText,this.out.columns)),super.render(),this.outputText=[o.symbol(this.done,this.aborted),n.bold(this.msg),o.delimiter(this.done),this.value?this.inactive:n.cyan().underline(this.inactive),n.gray("/"),this.value?n.cyan().underline(this.active):this.active].join(" "),this.out.write(c.line+l.to(0)+this.outputText))}}},2481:(e,t,r)=>{function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t,r,n,i,s,o){try{var a=e[s](o),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(n,i)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var s=e.apply(t,r);function o(e){a(s,n,i,o,u,"next",e)}function u(e){a(s,n,i,o,u,"throw",e)}o(void 0)}))}}const l=r(3682),c=["suggest","format","onState","validate","onRender","type"],h=()=>{};function d(){return p.apply(this,arguments)}function p(){return p=u((function*(e=[],{onSubmit:t=h,onCancel:r=h}={}){const n={},s=d._override||{};let a,p,m,g,b,y;e=[].concat(e);const D=function(){var e=u((function*(e,t,r=!1){if(r||!e.validate||!0===e.validate(t))return e.format?yield e.format(t,n):t}));return function(t,r){return e.apply(this,arguments)}}();var w,v=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,s=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw s}}}}(e);try{for(v.s();!(w=v.n()).done;){p=w.value;var E=p;if(g=E.name,b=E.type,"function"==typeof b&&(b=yield b(a,i({},n),p),p.type=b),b){for(let e in p){if(c.includes(e))continue;let t=p[e];p[e]="function"==typeof t?yield t(a,i({},n),y):t}if(y=p,"string"!=typeof p.message)throw new Error("prompt message is required");var F=p;if(g=F.name,b=F.type,void 0===l[b])throw new Error(`prompt type (${b}) is not defined`);if(void 0===s[p.name]||(a=yield D(p,s[p.name]),void 0===a)){try{a=d._injected?f(d._injected,p.initial):yield l[b](p),n[g]=a=yield D(p,a,!0),m=yield t(p,a,n)}catch(e){m=!(yield r(p,n))}if(m)return n}else n[g]=a}}}catch(e){v.e(e)}finally{v.f()}return n})),p.apply(this,arguments)}function f(e,t){const r=e.shift();if(r instanceof Error)throw r;return void 0===r?t:r}e.exports=Object.assign(d,{prompt:d,prompts:l,inject:function(e){d._injected=(d._injected||[]).concat(e)},override:function(e){d._override=Object.assign({},e)}})},3682:(e,t,r)=>{const n=t,i=r(271),s=e=>e;function o(e,t,r={}){return new Promise(((n,o)=>{const a=new i[e](t),u=r.onAbort||s,l=r.onSubmit||s,c=r.onExit||s;a.on("state",t.onState||s),a.on("submit",(e=>n(l(e)))),a.on("exit",(e=>n(c(e)))),a.on("abort",(e=>o(u(e))))}))}n.text=e=>o("TextPrompt",e),n.password=e=>(e.style="password",n.text(e)),n.invisible=e=>(e.style="invisible",n.text(e)),n.number=e=>o("NumberPrompt",e),n.date=e=>o("DatePrompt",e),n.confirm=e=>o("ConfirmPrompt",e),n.list=e=>{const t=e.separator||",";return o("TextPrompt",e,{onSubmit:e=>e.split(t).map((e=>e.trim()))})},n.toggle=e=>o("TogglePrompt",e),n.select=e=>o("SelectPrompt",e),n.multiselect=e=>{e.choices=[].concat(e.choices||[]);const t=e=>e.filter((e=>e.selected)).map((e=>e.value));return o("MultiselectPrompt",e,{onAbort:t,onSubmit:t})},n.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);const t=e=>e.filter((e=>e.selected)).map((e=>e.value));return o("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};const a=(e,t)=>Promise.resolve(t.filter((t=>t.title.slice(0,e.length).toLowerCase()===e.toLowerCase())));n.autocomplete=e=>(e.suggest=e.suggest||a,e.choices=[].concat(e.choices||[]),o("AutocompletePrompt",e))},8386:e=>{e.exports=(e,t)=>{if(!e.meta||"escape"===e.name){if(e.ctrl){if("a"===e.name)return"first";if("c"===e.name)return"abort";if("d"===e.name)return"abort";if("e"===e.name)return"last";if("g"===e.name)return"reset"}if(t){if("j"===e.name)return"down";if("k"===e.name)return"up"}return"return"===e.name||"enter"===e.name?"submit":"backspace"===e.name?"delete":"delete"===e.name?"deleteForward":"abort"===e.name?"abort":"escape"===e.name?"exit":"tab"===e.name?"next":"pagedown"===e.name?"nextPage":"pageup"===e.name?"prevPage":"home"===e.name?"home":"end"===e.name?"end":"up"===e.name?"up":"down"===e.name?"down":"right"===e.name?"right":"left"===e.name&&"left"}}},6203:(e,t,r)=>{function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const i=r(9440),s=r(4347),o=s.erase,a=s.cursor;e.exports=function(e,t){if(!t)return o.line+a.to(0);let r=0;var s,u=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var i=0,s=function(){};return{s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw o}}}}(e.split(/\r?\n/));try{for(u.s();!(s=u.n()).done;){let e=s.value;r+=1+Math.floor(Math.max([...i(e)].length-1,0)/t)}}catch(e){u.e(e)}finally{u.f()}return o.lines(r)}},4409:e=>{e.exports=(e,t,r)=>{r=r||t;let n=Math.min(t-r,e-Math.floor(r/2));return n<0&&(n=0),{startIndex:n,endIndex:Math.min(n+r,t)}}},6135:e=>{const t={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25c9",radioOff:"\u25ef",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203a",line:"\u2500",pointer:"\u276f"},r={arrowUp:t.arrowUp,arrowDown:t.arrowDown,arrowLeft:t.arrowLeft,arrowRight:t.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221a",cross:"\xd7",ellipsis:"...",pointerSmall:"\xbb",line:"\u2500",pointer:">"},n="win32"===process.platform?r:t;e.exports=n},8482:(e,t,r)=>{e.exports={action:r(8386),clear:r(6203),style:r(6187),strip:r(9440),figures:r(6135),lines:r(6905),wrap:r(3424),entriesToDisplay:r(4409)}},6905:(e,t,r)=>{const n=r(9440);e.exports=function(e,t){let r=String(n(e)||"").split(/\r?\n/);return t?r.map((e=>Math.ceil(e.length/t))).reduce(((e,t)=>e+t)):r.length}},9440:e=>{e.exports=e=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),r=new RegExp(t,"g");return"string"==typeof e?e.replace(r,""):e}},6187:(e,t,r)=>{const n=r(8888),i=r(6135),s=Object.freeze({password:{scale:1,render:e=>"*".repeat(e.length)},emoji:{scale:2,render:e=>"\u{1f603}".repeat(e.length)},invisible:{scale:0,render:e=>""},default:{scale:1,render:e=>`${e}`}}),o=Object.freeze({aborted:n.red(i.cross),done:n.green(i.tick),exited:n.yellow(i.cross),default:n.cyan("?")});e.exports={styles:s,render:e=>s[e]||s.default,symbols:o,symbol:(e,t,r)=>t?o.aborted:r?o.exited:e?o.done:o.default,delimiter:e=>n.gray(e?i.ellipsis:i.pointerSmall),item:(e,t)=>n.gray(e?t?i.pointerSmall:"+":i.line)}},3424:e=>{e.exports=(e,t={})=>{const r=Number.isSafeInteger(parseInt(t.margin))?new Array(parseInt(t.margin)).fill(" ").join(""):t.margin||"",n=t.width;return(e||"").split(/\r?\n/g).map((e=>e.split(/\s+/g).reduce(((e,t)=>(t.length+r.length>=n||e[e.length-1].length+t.length+1<n?e[e.length-1]+=` ${t}`:e.push(`${r}${t}`),e)),[r]).join("\n"))).join("\n")}},5600:(e,t,r)=>{e.exports=function(e){e=(Array.isArray(e)?e:e.split(".")).map(Number);let t=0,r=process.versions.node.split(".").map(Number);for(;t<e.length;t++){if(r[t]>e[t])return!1;if(e[t]>r[t])return!0}return!1}("8.6.0")?r(2481):r(8332)},4264:e=>{class t{constructor({token:e,date:t,parts:r,locales:n}){this.token=e,this.date=t||new Date,this.parts=r||[this],this.locales=n||{}}up(){}down(){}next(){const e=this.parts.indexOf(this);return this.parts.find(((r,n)=>n>e&&r instanceof t))}setTo(e){}prev(){let e=[].concat(this.parts).reverse();const r=e.indexOf(this);return e.find(((e,n)=>n>r&&e instanceof t))}toString(){return String(this.date)}}e.exports=t},8171:(e,t,r)=>{const n=r(4264);e.exports=class extends n{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),t=this.date.getDay();return"DD"===this.token?String(e).padStart(2,"0"):"Do"===this.token?e+(r=e,1==(r%=10)?"st":2===r?"nd":3===r?"rd":"th"):"d"===this.token?t+1:"ddd"===this.token?this.locales.weekdaysShort[t]:"dddd"===this.token?this.locales.weekdays[t]:e;var r}}},9518:(e,t,r)=>{const n=r(4264);e.exports=class extends n{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}}},1693:(e,t,r)=>{e.exports={DatePart:r(4264),Meridiem:r(6551),Day:r(8171),Hours:r(9518),Milliseconds:r(1271),Minutes:r(136),Month:r(2103),Seconds:r(6272),Year:r(2968)}},6551:(e,t,r)=>{const n=r(4264);e.exports=class extends n{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}}},1271:(e,t,r)=>{const n=r(4264);e.exports=class extends n{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}},136:(e,t,r)=>{const n=r(4264);e.exports=class extends n{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}}},2103:(e,t,r)=>{const n=r(4264);e.exports=class extends n{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),t=this.token.length;return 2===t?String(e+1).padStart(2,"0"):3===t?this.locales.monthsShort[e]:4===t?this.locales.months[e]:String(e+1)}}},6272:(e,t,r)=>{const n=r(4264);e.exports=class extends n{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}}},2968:(e,t,r)=>{const n=r(4264);e.exports=class extends n{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return 2===this.token.length?e.substr(-2):e}}},8590:(e,t,r)=>{const n=r(8888),i=r(8544),{erase:s,cursor:o}=r(4347),{style:a,clear:u,figures:l,wrap:c,entriesToDisplay:h}=r(7933),d=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]),p=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]);e.exports=class extends i{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial="number"==typeof e.initial?e.initial:((e,t)=>{const r=e.findIndex((e=>e.value===t||e.title===t));return r>-1?r:void 0})(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=a.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=u("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return"number"==typeof this._fb?e=this.choices[this._fb]:"string"==typeof this._fb&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=d(this.suggestions,e):this.value=this.fallback.value,this.fire()}async complete(e){const t=this.completing=this.suggest(this.input,this.choices),r=await t;if(this.completing!==t)return;this.suggestions=r.map(((e,t,r)=>({title:p(r,t),value:d(r,t),description:e.description}))),this.completing=!1;const n=Math.max(r.length-1,0);this.moveSelect(Math.min(n,this.select)),e&&e()}reset(){this.input="",this.complete((()=>{this.moveSelect(void 0!==this.initial?this.initial:0),this.render()})),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(e,t){let r=this.input.slice(0,this.cursor),n=this.input.slice(this.cursor);this.input=`${r}${e}${n}`,this.cursor=r.length+1,this.complete(this.render),this.render()}delete(){if(0===this.cursor)return this.bell();let e=this.input.slice(0,this.cursor-1),t=this.input.slice(this.cursor);this.input=`${e}${t}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),t=this.input.slice(this.cursor+1);this.input=`${e}${t}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){0===this.select?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,t,r,i){let s,o=r?l.arrowUp:i?l.arrowDown:" ",a=t?n.cyan().underline(e.title):e.title;return o=(t?n.cyan(l.pointer)+" ":" ")+o,e.description&&(s=` - ${e.description}`,(o.length+a.length+s.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(s="\n"+c(e.description,{margin:3,width:this.out.columns}))),o+" "+a+n.gray(s||"")}render(){if(this.closed)return;this.firstRender?this.out.write(o.hide):this.out.write(u(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:t}=h(this.select,this.choices.length,this.limit);if(this.outputText=[a.symbol(this.done,this.aborted,this.exited),n.bold(this.msg),a.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const r=this.suggestions.slice(e,t).map(((r,n)=>this.renderOption(r,this.select===n+e,0===n&&e>0,n+e===t-1&&t<this.choices.length))).join("\n");this.outputText+="\n"+(r||n.gray(this.fallback.title))}this.out.write(s.line+o.to(0)+this.outputText)}}},4349:(e,t,r)=>{const n=r(8888),{cursor:i}=r(4347),s=r(3725),{clear:o,style:a,figures:u}=r(7933);e.exports=class extends s{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=o("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){0===this.cursor?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){const e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((e=>!this.inputValue||!("string"!=typeof e.title||!e.title.toLowerCase().includes(this.inputValue.toLowerCase()))||!("string"!=typeof e.value||!e.value.toLowerCase().includes(this.inputValue.toLowerCase()))));const t=this.filteredOptions.findIndex((t=>t===e));this.cursor=t<0?0:t,this.render()}handleSpaceToggle(){const e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,t){" "===e?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`\nInstructions:\n ${u.arrowUp}/${u.arrowDown}: Highlight option\n ${u.arrowLeft}/${u.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`:""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:n.gray("Enter something to filter")}\n`}renderOption(e,t,r){let i;return i=t.disabled?e===r?n.gray().underline(t.title):n.strikethrough().gray(t.title):e===r?n.cyan().underline(t.title):t.title,(t.selected?n.green(u.radioOn):u.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done)return this.value.filter((e=>e.selected)).map((e=>e.title)).join(", ");const e=[n.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(n.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(i.hide),super.render();let e=[a.symbol(this.done,this.aborted),n.bold(this.msg),a.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=n.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=o(e,this.out.columns)}}},3756:(e,t,r)=>{const n=r(8888),i=r(8544),{style:s,clear:o}=r(7933),{erase:a,cursor:u}=r(4347);e.exports=class extends i{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(e,t){return"y"===e.toLowerCase()?(this.value=!0,this.submit()):"n"===e.toLowerCase()?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(u.hide):this.out.write(o(this.outputText,this.out.columns)),super.render(),this.outputText=[s.symbol(this.done,this.aborted),n.bold(this.msg),s.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:n.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(a.line+u.to(0)+this.outputText))}}},8626:(e,t,r)=>{const n=r(8888),i=r(8544),{style:s,clear:o,figures:a}=r(7933),{erase:u,cursor:l}=r(4347),{DatePart:c,Meridiem:h,Day:d,Hours:p,Milliseconds:f,Minutes:m,Month:g,Seconds:b,Year:y}=r(1693),D=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,w={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new d(e),3:e=>new g(e),4:e=>new y(e),5:e=>new h(e),6:e=>new p(e),7:e=>new m(e),8:e=>new b(e),9:e=>new f(e)},v={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};e.exports=class extends i{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(v,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=o("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let t;for(this.parts=[];t=D.exec(e);){let e=t.shift(),r=t.findIndex((e=>null!=e));this.parts.push(r in w?w[r]({token:t[r]||e,date:this.date,parts:this.parts,locales:this.locales}):t[r]||e)}let r=this.parts.reduce(((e,t)=>("string"==typeof t&&"string"==typeof e[e.length-1]?e[e.length-1]+=t:e.push(t),e)),[]);this.parts.splice(0),this.parts.push(...r),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex((e=>e instanceof c))),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let e=await this.validator(this.value);"string"==typeof e&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(await this.validate(),this.error)return this.color="red",this.fire(),void this.render();this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(null==e)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(null==e)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex((e=>e instanceof c))),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(l.hide):this.out.write(o(this.outputText,this.out.columns)),super.render(),this.outputText=[s.symbol(this.done,this.aborted),n.bold(this.msg),s.delimiter(!1),this.parts.reduce(((e,t,r)=>e.concat(r!==this.cursor||this.done?t:n.cyan().underline(t.toString()))),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split("\n").reduce(((e,t,r)=>e+`\n${r?" ":a.pointerSmall} ${n.red().italic(t)}`),"")),this.out.write(u.line+l.to(0)+this.outputText))}}},5864:(e,t,r)=>{e.exports={TextPrompt:r(1433),SelectPrompt:r(406),TogglePrompt:r(1582),DatePrompt:r(8626),NumberPrompt:r(9927),MultiselectPrompt:r(3725),AutocompletePrompt:r(8590),AutocompleteMultiselectPrompt:r(4349),ConfirmPrompt:r(3756)}},3725:(e,t,r)=>{const n=r(8888),{cursor:i}=r(4347),s=r(8544),{clear:o,figures:a,style:u,wrap:l,entriesToDisplay:c}=r(7933);e.exports=class extends s{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map(((e,t)=>("string"==typeof e&&(e={title:e,value:t}),{title:e&&(e.title||e.value||e),description:e&&e.description,value:e&&(void 0===e.value?t:e.value),selected:e&&e.selected,disabled:e&&e.disabled}))),this.clear=o("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map((e=>!e.selected)),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((e=>e.selected))}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){const e=this.value.filter((e=>e.selected));this.minSelected&&e.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){0===this.cursor?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const e=this.value[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}toggleAll(){if(void 0!==this.maxChoices||this.value[this.cursor].disabled)return this.bell();const e=!this.value[this.cursor].selected;this.value.filter((e=>!e.disabled)).forEach((t=>t.selected=e)),this.render()}_(e,t){if(" "===e)this.handleSpaceToggle();else{if("a"!==e)return this.bell();this.toggleAll()}}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`\nInstructions:\n ${a.arrowUp}/${a.arrowDown}: Highlight option\n ${a.arrowLeft}/${a.arrowRight}/[space]: Toggle selection\n`+(void 0===this.maxChoices?" a: Toggle all\n":"")+" enter/return: Complete answer":""}renderOption(e,t,r,i){const s=(t.selected?n.green(a.radioOn):a.radioOff)+" "+i+" ";let o,u;return t.disabled?o=e===r?n.gray().underline(t.title):n.strikethrough().gray(t.title):(o=e===r?n.cyan().underline(t.title):t.title,e===r&&t.description&&(u=` - ${t.description}`,(s.length+o.length+u.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(u="\n"+l(t.description,{margin:s.length,width:this.out.columns})))),s+o+n.gray(u||"")}paginateOptions(e){if(0===e.length)return n.red("No matches for this query.");let t,{startIndex:r,endIndex:i}=c(this.cursor,e.length,this.optionsPerPage),s=[];for(let n=r;n<i;n++)t=n===r&&r>0?a.arrowUp:n===i-1&&i<e.length?a.arrowDown:" ",s.push(this.renderOption(this.cursor,e[n],n,t));return"\n"+s.join("\n")}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter((e=>e.selected)).map((e=>e.title)).join(", ");const e=[n.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(n.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(i.hide),super.render();let e=[u.symbol(this.done,this.aborted),n.bold(this.msg),u.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=n.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=o(e,this.out.columns)}}},9927:(e,t,r)=>{const n=r(8888),i=r(8544),{cursor:s,erase:o}=r(4347),{style:a,figures:u,clear:l,lines:c}=r(7933),h=/[0-9]/,d=e=>void 0!==e,p=(e,t)=>{let r=Math.pow(10,t);return Math.round(e*r)/r};e.exports=class extends i{constructor(e={}){super(e),this.transform=a.render(e.style),this.msg=e.message,this.initial=d(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=d(e.min)?e.min:-1/0,this.max=d(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){e||0===e?(this.placeholder=!1,this.rendered=this.transform.render(`${p(e,this.round)}`),this._value=p(e,this.round)):(this.placeholder=!0,this.rendered=n.gray(this.transform.render(`${this.initial}`)),this._value=""),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return"-"===e||"."===e&&this.float||h.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=""!==e?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let e=await this.validator(this.value);"string"==typeof e&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(await this.validate(),this.error)return this.color="red",this.fire(),void this.render();let e=this.value;this.value=""!==e?e:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}up(){if(this.typed="",""===this.value&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",""===this.value&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(0===e.length)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",""!==this.value&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,t){if(!this.valid(e))return this.bell();const r=Date.now();if(r-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=r,this.color="cyan","."===e)return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(s.down(c(this.outputError,this.out.columns)-1)+l(this.outputError,this.out.columns)),this.out.write(l(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[a.symbol(this.done,this.aborted),n.bold(this.msg),a.delimiter(this.done),this.done&&(this.done||this.placeholder)?this.rendered:n[this.color]().underline(this.rendered)].join(" "),this.error&&(this.outputError+=this.errorMsg.split("\n").reduce(((e,t,r)=>e+`\n${r?" ":u.pointerSmall} ${n.red().italic(t)}`),"")),this.out.write(o.line+s.to(0)+this.outputText+s.save+this.outputError+s.restore))}}},8544:(e,t,r)=>{const n=r(3785),{action:i}=r(7933),s=r(4434),{beep:o,cursor:a}=r(4347),u=r(8888);e.exports=class extends s{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);const t=n.createInterface({input:this.in,escapeCodeTimeout:50});n.emitKeypressEvents(this.in,t),this.in.isTTY&&this.in.setRawMode(!0);const r=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,s=(e,t)=>{let n=i(t,r);!1===n?this._&&this._(e,t):"function"==typeof this[n]?this[n](t):this.bell()};this.close=()=>{this.out.write(a.show),this.in.removeListener("keypress",s),this.in.isTTY&&this.in.setRawMode(!1),t.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",s)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(o)}render(){this.onRender(u),this.firstRender&&(this.firstRender=!1)}}},406:(e,t,r)=>{const n=r(8888),i=r(8544),{style:s,clear:o,figures:a,wrap:u,entriesToDisplay:l}=r(7933),{cursor:c}=r(4347);e.exports=class extends i{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map(((e,t)=>("string"==typeof e&&(e={title:e,value:t}),{title:e&&(e.title||e.value||e),value:e&&(void 0===e.value?t:e.value),description:e&&e.description,selected:e&&e.selected,disabled:e&&e.disabled}))),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=o("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){0===this.cursor?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,t){if(" "===e)return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(c.hide):this.out.write(o(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:t}=l(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[s.symbol(this.done,this.aborted),n.bold(this.msg),s.delimiter(!1),this.done?this.selection.title:this.selection.disabled?n.yellow(this.warn):n.gray(this.hint)].join(" "),!this.done){this.outputText+="\n";for(let r=e;r<t;r++){let i,s,o="",l=this.choices[r];s=r===e&&e>0?a.arrowUp:r===t-1&&t<this.choices.length?a.arrowDown:" ",l.disabled?(i=this.cursor===r?n.gray().underline(l.title):n.strikethrough().gray(l.title),s=(this.cursor===r?n.bold().gray(a.pointer)+" ":" ")+s):(i=this.cursor===r?n.cyan().underline(l.title):l.title,s=(this.cursor===r?n.cyan(a.pointer)+" ":" ")+s,l.description&&this.cursor===r&&(o=` - ${l.description}`,(s.length+i.length+o.length>=this.out.columns||l.description.split(/\r?\n/).length>1)&&(o="\n"+u(l.description,{margin:3,width:this.out.columns})))),this.outputText+=`${s} ${i}${n.gray(o)}\n`}}this.out.write(this.outputText)}}},1433:(e,t,r)=>{const n=r(8888),i=r(8544),{erase:s,cursor:o}=r(4347),{style:a,clear:u,lines:l,figures:c}=r(7933);e.exports=class extends i{constructor(e={}){super(e),this.transform=a.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=u("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=n.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let e=await this.validator(this.value);"string"==typeof e&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error)return this.red=!0,this.fire(),void this.render();this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,t){let r=this.value.slice(0,this.cursor),n=this.value.slice(this.cursor);this.value=`${r}${e}${n}`,this.red=!1,this.cursor=this.placeholder?0:r.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),t=this.value.slice(this.cursor);this.value=`${e}${t}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),t=this.value.slice(this.cursor+1);this.value=`${e}${t}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return 0===this.cursor||this.placeholder&&1===this.cursor}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(o.down(l(this.outputError,this.out.columns)-1)+u(this.outputError,this.out.columns)),this.out.write(u(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[a.symbol(this.done,this.aborted),n.bold(this.msg),a.delimiter(this.done),this.red?n.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split("\n").reduce(((e,t,r)=>e+`\n${r?" ":c.pointerSmall} ${n.red().italic(t)}`),"")),this.out.write(s.line+o.to(0)+this.outputText+o.save+this.outputError+o.restore+o.move(this.cursorOffset,0)))}}},1582:(e,t,r)=>{const n=r(8888),i=r(8544),{style:s,clear:o}=r(7933),{cursor:a,erase:u}=r(4347);e.exports=class extends i{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}deactivate(){if(!1===this.value)return this.bell();this.value=!1,this.render()}activate(){if(!0===this.value)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,t){if(" "===e)this.value=!this.value;else if("1"===e)this.value=!0;else{if("0"!==e)return this.bell();this.value=!1}this.render()}render(){this.closed||(this.firstRender?this.out.write(a.hide):this.out.write(o(this.outputText,this.out.columns)),super.render(),this.outputText=[s.symbol(this.done,this.aborted),n.bold(this.msg),s.delimiter(this.done),this.value?this.inactive:n.cyan().underline(this.inactive),n.gray("/"),this.value?n.cyan().underline(this.active):this.active].join(" "),this.out.write(u.line+a.to(0)+this.outputText))}}},8332:(e,t,r)=>{const n=r(3683),i=["suggest","format","onState","validate","onRender","type"],s=()=>{};async function o(e=[],{onSubmit:t=s,onCancel:r=s}={}){const u={},l=o._override||{};let c,h,d,p,f,m;e=[].concat(e);const g=async(e,t,r=!1)=>{if(r||!e.validate||!0===e.validate(t))return e.format?await e.format(t,u):t};for(h of e)if(({name:p,type:f}=h),"function"==typeof f&&(f=await f(c,{...u},h),h.type=f),f){for(let e in h){if(i.includes(e))continue;let t=h[e];h[e]="function"==typeof t?await t(c,{...u},m):t}if(m=h,"string"!=typeof h.message)throw new Error("prompt message is required");if(({name:p,type:f}=h),void 0===n[f])throw new Error(`prompt type (${f}) is not defined`);if(void 0===l[h.name]||(c=await g(h,l[h.name]),void 0===c)){try{c=o._injected?a(o._injected,h.initial):await n[f](h),u[p]=c=await g(h,c,!0),d=await t(h,c,u)}catch(e){d=!await r(h,u)}if(d)return u}else u[p]=c}return u}function a(e,t){const r=e.shift();if(r instanceof Error)throw r;return void 0===r?t:r}e.exports=Object.assign(o,{prompt:o,prompts:n,inject:function(e){o._injected=(o._injected||[]).concat(e)},override:function(e){o._override=Object.assign({},e)}})},3683:(e,t,r)=>{const n=t,i=r(5864),s=e=>e;function o(e,t,r={}){return new Promise(((n,o)=>{const a=new i[e](t),u=r.onAbort||s,l=r.onSubmit||s,c=r.onExit||s;a.on("state",t.onState||s),a.on("submit",(e=>n(l(e)))),a.on("exit",(e=>n(c(e)))),a.on("abort",(e=>o(u(e))))}))}n.text=e=>o("TextPrompt",e),n.password=e=>(e.style="password",n.text(e)),n.invisible=e=>(e.style="invisible",n.text(e)),n.number=e=>o("NumberPrompt",e),n.date=e=>o("DatePrompt",e),n.confirm=e=>o("ConfirmPrompt",e),n.list=e=>{const t=e.separator||",";return o("TextPrompt",e,{onSubmit:e=>e.split(t).map((e=>e.trim()))})},n.toggle=e=>o("TogglePrompt",e),n.select=e=>o("SelectPrompt",e),n.multiselect=e=>{e.choices=[].concat(e.choices||[]);const t=e=>e.filter((e=>e.selected)).map((e=>e.value));return o("MultiselectPrompt",e,{onAbort:t,onSubmit:t})},n.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);const t=e=>e.filter((e=>e.selected)).map((e=>e.value));return o("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};const a=(e,t)=>Promise.resolve(t.filter((t=>t.title.slice(0,e.length).toLowerCase()===e.toLowerCase())));n.autocomplete=e=>(e.suggest=e.suggest||a,e.choices=[].concat(e.choices||[]),o("AutocompletePrompt",e))},1787:e=>{e.exports=(e,t)=>{if(!e.meta||"escape"===e.name){if(e.ctrl){if("a"===e.name)return"first";if("c"===e.name)return"abort";if("d"===e.name)return"abort";if("e"===e.name)return"last";if("g"===e.name)return"reset"}if(t){if("j"===e.name)return"down";if("k"===e.name)return"up"}return"return"===e.name||"enter"===e.name?"submit":"backspace"===e.name?"delete":"delete"===e.name?"deleteForward":"abort"===e.name?"abort":"escape"===e.name?"exit":"tab"===e.name?"next":"pagedown"===e.name?"nextPage":"pageup"===e.name?"prevPage":"home"===e.name?"home":"end"===e.name?"end":"up"===e.name?"up":"down"===e.name?"down":"right"===e.name?"right":"left"===e.name&&"left"}}},7676:(e,t,r)=>{const n=r(7135),{erase:i,cursor:s}=r(4347);e.exports=function(e,t){if(!t)return i.line+s.to(0);let r=0;const o=e.split(/\r?\n/);for(let e of o)r+=1+Math.floor(Math.max([...n(e)].length-1,0)/t);return i.lines(r)}},4640:e=>{e.exports=(e,t,r)=>{r=r||t;let n=Math.min(t-r,e-Math.floor(r/2));return n<0&&(n=0),{startIndex:n,endIndex:Math.min(n+r,t)}}},3248:e=>{const t={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25c9",radioOff:"\u25ef",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203a",line:"\u2500",pointer:"\u276f"},r={arrowUp:t.arrowUp,arrowDown:t.arrowDown,arrowLeft:t.arrowLeft,arrowRight:t.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221a",cross:"\xd7",ellipsis:"...",pointerSmall:"\xbb",line:"\u2500",pointer:">"},n="win32"===process.platform?r:t;e.exports=n},7933:(e,t,r)=>{e.exports={action:r(1787),clear:r(7676),style:r(7456),strip:r(7135),figures:r(3248),lines:r(334),wrap:r(1485),entriesToDisplay:r(4640)}},334:(e,t,r)=>{const n=r(7135);e.exports=function(e,t){let r=String(n(e)||"").split(/\r?\n/);return t?r.map((e=>Math.ceil(e.length/t))).reduce(((e,t)=>e+t)):r.length}},7135:e=>{e.exports=e=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),r=new RegExp(t,"g");return"string"==typeof e?e.replace(r,""):e}},7456:(e,t,r)=>{const n=r(8888),i=r(3248),s=Object.freeze({password:{scale:1,render:e=>"*".repeat(e.length)},emoji:{scale:2,render:e=>"\u{1f603}".repeat(e.length)},invisible:{scale:0,render:e=>""},default:{scale:1,render:e=>`${e}`}}),o=Object.freeze({aborted:n.red(i.cross),done:n.green(i.tick),exited:n.yellow(i.cross),default:n.cyan("?")});e.exports={styles:s,render:e=>s[e]||s.default,symbols:o,symbol:(e,t,r)=>t?o.aborted:r?o.exited:e?o.done:o.default,delimiter:e=>n.gray(e?i.ellipsis:i.pointerSmall),item:(e,t)=>n.gray(e?t?i.pointerSmall:"+":i.line)}},1485:e=>{e.exports=(e,t={})=>{const r=Number.isSafeInteger(parseInt(t.margin))?new Array(parseInt(t.margin)).fill(" ").join(""):t.margin||"",n=t.width;return(e||"").split(/\r?\n/g).map((e=>e.split(/\s+/g).reduce(((e,t)=>(t.length+r.length>=n||e[e.length-1].length+t.length+1<n?e[e.length-1]+=` ${t}`:e.push(`${r}${t}`),e)),[r]).join("\n"))).join("\n")}},600:(e,t,r)=>{const n=r(7257);e.exports=(e="")=>{const t=e.match(n);if(!t)return null;const[r,i]=t[0].replace(/#! ?/,"").split(" "),s=r.split("/").pop();return"env"===s?i:i?`${s} ${i}`:s}},7257:e=>{e.exports=/^#!(.*)/},4347:e=>{const t="\x1b[",r={to:(e,r)=>r?`${t}${r+1};${e+1}H`:`${t}${e+1}G`,move(e,r){let n="";return e<0?n+=`${t}${-e}D`:e>0&&(n+=`${t}${e}C`),r<0?n+=`${t}${-r}A`:r>0&&(n+=`${t}${r}B`),n},up:(e=1)=>`${t}${e}A`,down:(e=1)=>`${t}${e}B`,forward:(e=1)=>`${t}${e}C`,backward:(e=1)=>`${t}${e}D`,nextLine:(e=1)=>`${t}E`.repeat(e),prevLine:(e=1)=>`${t}F`.repeat(e),left:`${t}G`,hide:`${t}?25l`,show:`${t}?25h`,save:"\x1b7",restore:"\x1b8"},n={up:(e=1)=>`${t}S`.repeat(e),down:(e=1)=>`${t}T`.repeat(e)},i={screen:`${t}2J`,up:(e=1)=>`${t}1J`.repeat(e),down:(e=1)=>`${t}J`.repeat(e),line:`${t}2K`,lineEnd:`${t}K`,lineStart:`${t}1K`,lines(e){let t="";for(let n=0;n<e;n++)t+=this.line+(n<e-1?r.up():"");return e&&(t+=r.left),t}};e.exports={cursor:r,scroll:n,erase:i,beep:"\x07"}},3396:e=>{e.exports=function(e){if("object"!=typeof e)throw new Error("expected an author to be an object");var t={name:["",""],email:["<",">"],url:["(",")"]},r="";for(var n in e.url&&(e.url=function(e){return e.replace(/\/$/,"")}(e.url)),t)e[n]&&(r+=t[n][0]+e[n]+t[n][1]+" ");return r.trim()}},1754:(e,t,r)=>{const n=r(857),i=r(4891),s=process.env;let o;function a(e){const t=function(e){if(!1===o)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(e&&!e.isTTY&&!0!==o)return 0;const t=o?1:0;if("win32"===process.platform){const e=n.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in s)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in s))||"codeship"===s.CI_NAME?1:t;if("TEAMCITY_VERSION"in s)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0;if("truecolor"===s.COLORTERM)return 3;if("TERM_PROGRAM"in s){const e=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(s.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)||"COLORTERM"in s?1:(s.TERM,t)}(e);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(t)}i("no-color")||i("no-colors")||i("color=false")?o=!1:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(o=!0),"FORCE_COLOR"in s&&(o=0===s.FORCE_COLOR.length||0!==parseInt(s.FORCE_COLOR,10)),e.exports={supportsColor:a,stdout:a(process.stdout),stderr:a(process.stderr)}},5421:(e,t,r)=>{const n=r(857),i=r(2018),s=r(910),{env:o}=process;let a;function u(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function l(e,t){if(0===a)return 0;if(s("color=16m")||s("color=full")||s("color=truecolor"))return 3;if(s("color=256"))return 2;if(e&&!t&&void 0===a)return 0;const r=a||0;if("dumb"===o.TERM)return r;if("win32"===process.platform){const e=n.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in o)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in o))||"codeship"===o.CI_NAME?1:r;if("TEAMCITY_VERSION"in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0;if("truecolor"===o.COLORTERM)return 3;if("TERM_PROGRAM"in o){const e=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||"COLORTERM"in o?1:r}s("no-color")||s("no-colors")||s("color=false")||s("color=never")?a=0:(s("color")||s("colors")||s("color=true")||s("color=always"))&&(a=1),"FORCE_COLOR"in o&&(a="true"===o.FORCE_COLOR?1:"false"===o.FORCE_COLOR?0:0===o.FORCE_COLOR.length?1:Math.min(parseInt(o.FORCE_COLOR,10),3)),e.exports={supportsColor:function(e){return u(l(e,e&&e.isTTY))},stdout:u(l(!0,i.isatty(1))),stderr:u(l(!0,i.isatty(2)))}},4635:(e,t)=>{t.fromCallback=function(e){return Object.defineProperty((function(...t){if("function"!=typeof t[t.length-1])return new Promise(((r,n)=>{t.push(((e,t)=>null!=e?n(e):r(t))),e.apply(this,t)}));e.apply(this,t)}),"name",{value:e.name})},t.fromPromise=function(e){return Object.defineProperty((function(...t){const r=t[t.length-1];if("function"!=typeof r)return e.apply(this,t);t.pop(),e.apply(this,t).then((e=>r(null,e)),r)}),"name",{value:e.name})}},5982:(e,t,r)=>{const{builtinModules:n}=r(3339);var i=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),s=["node_modules","favicon.ico"],o=function(e,t){var r={validForNewPackages:0===t.length&&0===e.length,validForOldPackages:0===t.length,warnings:e,errors:t};return r.warnings.length||delete r.warnings,r.errors.length||delete r.errors,r};e.exports=function(e){var t=[],r=[];if(null===e)return r.push("name cannot be null"),o(t,r);if(void 0===e)return r.push("name cannot be undefined"),o(t,r);if("string"!=typeof e)return r.push("name must be a string"),o(t,r);if(e.length||r.push("name length must be greater than zero"),e.match(/^\./)&&r.push("name cannot start with a period"),e.match(/^_/)&&r.push("name cannot start with an underscore"),e.trim()!==e&&r.push("name cannot contain leading or trailing spaces"),s.forEach((function(t){e.toLowerCase()===t&&r.push(t+" is a blacklisted name")})),n.includes(e.toLowerCase())&&t.push(e+" is a core module name"),e.length>214&&t.push("name can no longer contain more than 214 characters"),e.toLowerCase()!==e&&t.push("name can no longer contain capital letters"),/[~'!()*]/.test(e.split("/").slice(-1)[0])&&t.push('name can no longer contain special characters ("~\'!()*")'),encodeURIComponent(e)!==e){var a=e.match(i);if(a){var u=a[1],l=a[2];if(encodeURIComponent(u)===u&&encodeURIComponent(l)===l)return o(t,r)}r.push("name can only contain URL-friendly characters")}return o(t,r)}},1905:(e,t,r)=>{const n="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,i=r(6928),s=n?";":":",o=r(9344),a=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),u=(e,t)=>{const r=t.colon||s,i=e.match(/\//)||n&&e.match(/\\/)?[""]:[...n?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=n?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=n?o.split(r):[""];return n&&-1!==e.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:o}},l=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});const{pathEnv:n,pathExt:s,pathExtExe:l}=u(e,t),c=[],h=r=>new Promise(((s,o)=>{if(r===n.length)return t.all&&c.length?s(c):o(a(e));const u=n[r],l=/^".*"$/.test(u)?u.slice(1,-1):u,h=i.join(l,e),p=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+h:h;s(d(p,r,0))})),d=(e,r,n)=>new Promise(((i,a)=>{if(n===s.length)return i(h(r+1));const u=s[n];o(e+u,{pathExt:l},((s,o)=>{if(!s&&o){if(!t.all)return i(e+u);c.push(e+u)}return i(d(e,r,n+1))}))}));return r?h(0).then((e=>r(null,e)),r):h(0)};e.exports=l,l.sync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:n,pathExtExe:s}=u(e,t),l=[];for(let a=0;a<r.length;a++){const u=r[a],c=/^".*"$/.test(u)?u.slice(1,-1):u,h=i.join(c,e),d=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+h:h;for(let e=0;e<n.length;e++){const r=d+n[e];try{if(o.sync(r,{pathExt:s})){if(!t.all)return r;l.push(r)}}catch(e){}}}if(t.all&&l.length)return l;if(t.nothrow)return null;throw a(e)}},2613:t=>{t.exports=e(import.meta.url)("assert")},5317:t=>{t.exports=e(import.meta.url)("child_process")},9140:t=>{t.exports=e(import.meta.url)("constants")},4434:t=>{t.exports=e(import.meta.url)("events")},9896:t=>{t.exports=e(import.meta.url)("fs")},8611:t=>{t.exports=e(import.meta.url)("http")},5692:t=>{t.exports=e(import.meta.url)("https")},3339:t=>{t.exports=e(import.meta.url)("module")},8995:t=>{t.exports=e(import.meta.url)("node:module")},6760:t=>{t.exports=e(import.meta.url)("node:path")},3136:t=>{t.exports=e(import.meta.url)("node:url")},857:t=>{t.exports=e(import.meta.url)("os")},6928:t=>{t.exports=e(import.meta.url)("path")},3480:t=>{t.exports=e(import.meta.url)("querystring")},3785:t=>{t.exports=e(import.meta.url)("readline")},2203:t=>{t.exports=e(import.meta.url)("stream")},2018:t=>{t.exports=e(import.meta.url)("tty")},7016:t=>{t.exports=e(import.meta.url)("url")},9023:t=>{t.exports=e(import.meta.url)("util")},3106:t=>{t.exports=e(import.meta.url)("zlib")},1732:(e,t,r)=>{const n=r(8981),{resolver:i}=r(8623),{Creator:s}=r(5304),{readFile:o,readJson:a,outputFile:u,outputJson:l}=n,c={spaces:2,replacer:null};function h(e){return o(e,{encoding:"utf8"})}function d(e,t){return u(e,t,{encoding:"utf8"})}function p(e,t,{pretty:r=!1}={}){return l(e,t,r?c:void 0)}const f=s({read:h,write:d}),m=s({read:a,write:p}),g=s({read:h,write:p}),b=s({read:a,write:d});e.exports={Creator:s,Json:m,JsonToText:b,Text:f,TextToJson:g,resolver:i,fs:n}},5304:(e,t,r)=>{const{resolver:n,Base:i,logger:s}=r(8623);e.exports={Creator:function({read:e,write:t}){return class extends i{constructor(e){super(),e&&(this.root=e)}config(e){return void 0!==e&&(this.option=e),this}source(t,r=this.root){if(!t)throw new Error("path cannot be empty");return this.action=this.action.then((()=>{this.source=n(t,r)})).then((()=>e(this.source))),this}output(e,r=this.root){return this.action=this.action.then((i=>{const s=n(void 0===e?this.source:e,r);if(!s)throw new Error("path cannot be empty");return this.source=s,t(s,i,this.option).then((()=>i))})),this}logger(...e){if(0===e.length)throw new Error("message cannot be empty");return this.action=this.action.then((t=>(s.okay(...e),t)),(t=>{throw s.fail(...e),t})),this}}}}},8623:(e,t,r)=>{const{createRequire:n}=r(8995),{isAbsolute:i,resolve:s}=r(6760),{fileURLToPath:o}=r(3136),{green:a,red:u}=r(6181),l=n(`${process.cwd()}/`);function c(e){return e.startsWith("file:")?o(e):e}const h=new class{okay(...e){console.log(a("\u2714"),...e)}fail(...e){console.log(u("\u2718"),...e)}};e.exports={logger:h,resolver:function(e,t=process.cwd()){if(e.startsWith("~"))return l.resolve(e.replace(/^~/,""));const r=c(e);if(i(r))return r;const n=c(t);return s(n,r)},Base:class{constructor(){this.action=Promise.resolve()}onDone(e=e=>e){return this.action=this.action.then((e=>(this.temp=e,e))).then(e),this}onFail(e=()=>this.temp){return this.action=this.action.then((e=>(this.temp=e,e))).catch(e),this}then(e){return this.action.then(e)}catch(e){return this.action.catch(e)}finally(e){return this.action.finally(e)}}}},7256:e=>{e.exports=JSON.parse('{"dots":{"interval":80,"frames":["\u280b","\u2819","\u2839","\u2838","\u283c","\u2834","\u2826","\u2827","\u2807","\u280f"]},"dots2":{"interval":80,"frames":["\u28fe","\u28fd","\u28fb","\u28bf","\u287f","\u28df","\u28ef","\u28f7"]},"dots3":{"interval":80,"frames":["\u280b","\u2819","\u281a","\u281e","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},"dots4":{"interval":80,"frames":["\u2804","\u2806","\u2807","\u280b","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280b","\u2807","\u2806"]},"dots5":{"interval":80,"frames":["\u280b","\u2819","\u281a","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280b"]},"dots6":{"interval":80,"frames":["\u2801","\u2809","\u2819","\u281a","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281a","\u2819","\u2809","\u2801"]},"dots7":{"interval":80,"frames":["\u2808","\u2809","\u280b","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280b","\u2809","\u2808"]},"dots8":{"interval":80,"frames":["\u2801","\u2801","\u2809","\u2819","\u281a","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280b","\u2809","\u2808","\u2808"]},"dots9":{"interval":80,"frames":["\u28b9","\u28ba","\u28bc","\u28f8","\u28c7","\u2867","\u2857","\u284f"]},"dots10":{"interval":80,"frames":["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},"dots11":{"interval":100,"frames":["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},"dots12":{"interval":80,"frames":["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280d\u2800","\u288b\u2800","\u284b\u2800","\u280d\u2801","\u288b\u2801","\u284b\u2801","\u280d\u2809","\u280b\u2809","\u280b\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280d\u2850","\u288b\u2820","\u284b\u2880","\u280d\u2841","\u288b\u2801","\u284b\u2801","\u280d\u2809","\u280b\u2809","\u280b\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},"dots13":{"interval":80,"frames":["\u28fc","\u28f9","\u28bb","\u283f","\u285f","\u28cf","\u28e7","\u28f6"]},"dots8Bit":{"interval":80,"frames":["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280a","\u280b","\u280c","\u280d","\u280e","\u280f","\u2848","\u2849","\u284a","\u284b","\u284c","\u284d","\u284e","\u284f","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281a","\u281b","\u281c","\u281d","\u281e","\u281f","\u2858","\u2859","\u285a","\u285b","\u285c","\u285d","\u285e","\u285f","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282a","\u282b","\u282c","\u282d","\u282e","\u282f","\u2868","\u2869","\u286a","\u286b","\u286c","\u286d","\u286e","\u286f","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283a","\u283b","\u283c","\u283d","\u283e","\u283f","\u2878","\u2879","\u287a","\u287b","\u287c","\u287d","\u287e","\u287f","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28c0","\u28c1","\u28c2","\u28c3","\u28c4","\u28c5","\u28c6","\u28c7","\u2888","\u2889","\u288a","\u288b","\u288c","\u288d","\u288e","\u288f","\u28c8","\u28c9","\u28ca","\u28cb","\u28cc","\u28cd","\u28ce","\u28cf","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28d0","\u28d1","\u28d2","\u28d3","\u28d4","\u28d5","\u28d6","\u28d7","\u2898","\u2899","\u289a","\u289b","\u289c","\u289d","\u289e","\u289f","\u28d8","\u28d9","\u28da","\u28db","\u28dc","\u28dd","\u28de","\u28df","\u28a0","\u28a1","\u28a2","\u28a3","\u28a4","\u28a5","\u28a6","\u28a7","\u28e0","\u28e1","\u28e2","\u28e3","\u28e4","\u28e5","\u28e6","\u28e7","\u28a8","\u28a9","\u28aa","\u28ab","\u28ac","\u28ad","\u28ae","\u28af","\u28e8","\u28e9","\u28ea","\u28eb","\u28ec","\u28ed","\u28ee","\u28ef","\u28b0","\u28b1","\u28b2","\u28b3","\u28b4","\u28b5","\u28b6","\u28b7","\u28f0","\u28f1","\u28f2","\u28f3","\u28f4","\u28f5","\u28f6","\u28f7","\u28b8","\u28b9","\u28ba","\u28bb","\u28bc","\u28bd","\u28be","\u28bf","\u28f8","\u28f9","\u28fa","\u28fb","\u28fc","\u28fd","\u28fe","\u28ff"]},"sand":{"interval":80,"frames":["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28c0","\u28c1","\u28c2","\u28c4","\u28cc","\u28d4","\u28e4","\u28e5","\u28e6","\u28ee","\u28f6","\u28f7","\u28ff","\u287f","\u283f","\u289f","\u281f","\u285b","\u281b","\u282b","\u288b","\u280b","\u280d","\u2849","\u2809","\u2811","\u2821","\u2881"]},"line":{"interval":130,"frames":["-","\\\\","|","/"]},"line2":{"interval":100,"frames":["\u2802","-","\u2013","\u2014","\u2013","-"]},"pipe":{"interval":100,"frames":["\u2524","\u2518","\u2534","\u2514","\u251c","\u250c","\u252c","\u2510"]},"simpleDots":{"interval":400,"frames":[". ",".. ","..."," "]},"simpleDotsScrolling":{"interval":200,"frames":[". ",".. ","..."," .."," ."," "]},"star":{"interval":70,"frames":["\u2736","\u2738","\u2739","\u273a","\u2739","\u2737"]},"star2":{"interval":80,"frames":["+","x","*"]},"flip":{"interval":70,"frames":["_","_","_","-","`","`","\'","\xb4","-","_","_","_"]},"hamburger":{"interval":100,"frames":["\u2631","\u2632","\u2634"]},"growVertical":{"interval":120,"frames":["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},"growHorizontal":{"interval":120,"frames":["\u258f","\u258e","\u258d","\u258c","\u258b","\u258a","\u2589","\u258a","\u258b","\u258c","\u258d","\u258e"]},"balloon":{"interval":140,"frames":[" ",".","o","O","@","*"," "]},"balloon2":{"interval":120,"frames":[".","o","O","\xb0","O","o","."]},"noise":{"interval":100,"frames":["\u2593","\u2592","\u2591"]},"bounce":{"interval":120,"frames":["\u2801","\u2802","\u2804","\u2802"]},"boxBounce":{"interval":120,"frames":["\u2596","\u2598","\u259d","\u2597"]},"boxBounce2":{"interval":100,"frames":["\u258c","\u2580","\u2590","\u2584"]},"triangle":{"interval":50,"frames":["\u25e2","\u25e3","\u25e4","\u25e5"]},"binary":{"interval":80,"frames":["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},"arc":{"interval":100,"frames":["\u25dc","\u25e0","\u25dd","\u25de","\u25e1","\u25df"]},"circle":{"interval":120,"frames":["\u25e1","\u2299","\u25e0"]},"squareCorners":{"interval":180,"frames":["\u25f0","\u25f3","\u25f2","\u25f1"]},"circleQuarters":{"interval":120,"frames":["\u25f4","\u25f7","\u25f6","\u25f5"]},"circleHalves":{"interval":50,"frames":["\u25d0","\u25d3","\u25d1","\u25d2"]},"squish":{"interval":100,"frames":["\u256b","\u256a"]},"toggle":{"interval":250,"frames":["\u22b6","\u22b7"]},"toggle2":{"interval":80,"frames":["\u25ab","\u25aa"]},"toggle3":{"interval":120,"frames":["\u25a1","\u25a0"]},"toggle4":{"interval":100,"frames":["\u25a0","\u25a1","\u25aa","\u25ab"]},"toggle5":{"interval":100,"frames":["\u25ae","\u25af"]},"toggle6":{"interval":300,"frames":["\u101d","\u1040"]},"toggle7":{"interval":80,"frames":["\u29be","\u29bf"]},"toggle8":{"interval":100,"frames":["\u25cd","\u25cc"]},"toggle9":{"interval":100,"frames":["\u25c9","\u25ce"]},"toggle10":{"interval":100,"frames":["\u3282","\u3280","\u3281"]},"toggle11":{"interval":50,"frames":["\u29c7","\u29c6"]},"toggle12":{"interval":120,"frames":["\u2617","\u2616"]},"toggle13":{"interval":80,"frames":["=","*","-"]},"arrow":{"interval":100,"frames":["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},"arrow2":{"interval":80,"frames":["\u2b06\ufe0f ","\u2197\ufe0f ","\u27a1\ufe0f ","\u2198\ufe0f ","\u2b07\ufe0f ","\u2199\ufe0f ","\u2b05\ufe0f ","\u2196\ufe0f "]},"arrow3":{"interval":120,"frames":["\u25b9\u25b9\u25b9\u25b9\u25b9","\u25b8\u25b9\u25b9\u25b9\u25b9","\u25b9\u25b8\u25b9\u25b9\u25b9","\u25b9\u25b9\u25b8\u25b9\u25b9","\u25b9\u25b9\u25b9\u25b8\u25b9","\u25b9\u25b9\u25b9\u25b9\u25b8"]},"bouncingBar":{"interval":80,"frames":["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},"bouncingBall":{"interval":80,"frames":["( \u25cf )","( \u25cf )","( \u25cf )","( \u25cf )","( \u25cf)","( \u25cf )","( \u25cf )","( \u25cf )","( \u25cf )","(\u25cf )"]},"smiley":{"interval":200,"frames":["\u{1f604} ","\u{1f61d} "]},"monkey":{"interval":300,"frames":["\u{1f648} ","\u{1f648} ","\u{1f649} ","\u{1f64a} "]},"hearts":{"interval":100,"frames":["\u{1f49b} ","\u{1f499} ","\u{1f49c} ","\u{1f49a} ","\u2764\ufe0f "]},"clock":{"interval":100,"frames":["\u{1f55b} ","\u{1f550} ","\u{1f551} ","\u{1f552} ","\u{1f553} ","\u{1f554} ","\u{1f555} ","\u{1f556} ","\u{1f557} ","\u{1f558} ","\u{1f559} ","\u{1f55a} "]},"earth":{"interval":180,"frames":["\u{1f30d} ","\u{1f30e} ","\u{1f30f} "]},"material":{"interval":17,"frames":["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},"moon":{"interval":80,"frames":["\u{1f311} ","\u{1f312} ","\u{1f313} ","\u{1f314} ","\u{1f315} ","\u{1f316} ","\u{1f317} ","\u{1f318} "]},"runner":{"interval":140,"frames":["\u{1f6b6} ","\u{1f3c3} "]},"pong":{"interval":80,"frames":["\u2590\u2802 \u258c","\u2590\u2808 \u258c","\u2590 \u2802 \u258c","\u2590 \u2820 \u258c","\u2590 \u2840 \u258c","\u2590 \u2820 \u258c","\u2590 \u2802 \u258c","\u2590 \u2808 \u258c","\u2590 \u2802 \u258c","\u2590 \u2820 \u258c","\u2590 \u2840 \u258c","\u2590 \u2820 \u258c","\u2590 \u2802 \u258c","\u2590 \u2808 \u258c","\u2590 \u2802\u258c","\u2590 \u2820\u258c","\u2590 \u2840\u258c","\u2590 \u2820 \u258c","\u2590 \u2802 \u258c","\u2590 \u2808 \u258c","\u2590 \u2802 \u258c","\u2590 \u2820 \u258c","\u2590 \u2840 \u258c","\u2590 \u2820 \u258c","\u2590 \u2802 \u258c","\u2590 \u2808 \u258c","\u2590 \u2802 \u258c","\u2590 \u2820 \u258c","\u2590 \u2840 \u258c","\u2590\u2820 \u258c"]},"shark":{"interval":120,"frames":["\u2590|\\\\____________\u258c","\u2590_|\\\\___________\u258c","\u2590__|\\\\__________\u258c","\u2590___|\\\\_________\u258c","\u2590____|\\\\________\u258c","\u2590_____|\\\\_______\u258c","\u2590______|\\\\______\u258c","\u2590_______|\\\\_____\u258c","\u2590________|\\\\____\u258c","\u2590_________|\\\\___\u258c","\u2590__________|\\\\__\u258c","\u2590___________|\\\\_\u258c","\u2590____________|\\\\\u258c","\u2590____________/|\u258c","\u2590___________/|_\u258c","\u2590__________/|__\u258c","\u2590_________/|___\u258c","\u2590________/|____\u258c","\u2590_______/|_____\u258c","\u2590______/|______\u258c","\u2590_____/|_______\u258c","\u2590____/|________\u258c","\u2590___/|_________\u258c","\u2590__/|__________\u258c","\u2590_/|___________\u258c","\u2590/|____________\u258c"]},"dqpb":{"interval":100,"frames":["d","q","p","b"]},"weather":{"interval":100,"frames":["\u2600\ufe0f ","\u2600\ufe0f ","\u2600\ufe0f ","\u{1f324} ","\u26c5\ufe0f ","\u{1f325} ","\u2601\ufe0f ","\u{1f327} ","\u{1f328} ","\u{1f327} ","\u{1f328} ","\u{1f327} ","\u{1f328} ","\u26c8 ","\u{1f328} ","\u{1f327} ","\u{1f328} ","\u2601\ufe0f ","\u{1f325} ","\u26c5\ufe0f ","\u{1f324} ","\u2600\ufe0f ","\u2600\ufe0f "]},"christmas":{"interval":400,"frames":["\u{1f332}","\u{1f384}"]},"grenade":{"interval":80,"frames":["\u060c ","\u2032 "," \xb4 "," \u203e "," \u2e0c"," \u2e0a"," |"," \u204e"," \u2055"," \u0df4 "," \u2053"," "," "," "]},"point":{"interval":125,"frames":["\u2219\u2219\u2219","\u25cf\u2219\u2219","\u2219\u25cf\u2219","\u2219\u2219\u25cf","\u2219\u2219\u2219"]},"layer":{"interval":150,"frames":["-","=","\u2261"]},"betaWave":{"interval":80,"frames":["\u03c1\u03b2\u03b2\u03b2\u03b2\u03b2\u03b2","\u03b2\u03c1\u03b2\u03b2\u03b2\u03b2\u03b2","\u03b2\u03b2\u03c1\u03b2\u03b2\u03b2\u03b2","\u03b2\u03b2\u03b2\u03c1\u03b2\u03b2\u03b2","\u03b2\u03b2\u03b2\u03b2\u03c1\u03b2\u03b2","\u03b2\u03b2\u03b2\u03b2\u03b2\u03c1\u03b2","\u03b2\u03b2\u03b2\u03b2\u03b2\u03b2\u03c1"]},"fingerDance":{"interval":160,"frames":["\u{1f918} ","\u{1f91f} ","\u{1f596} ","\u270b ","\u{1f91a} ","\u{1f446} "]},"fistBump":{"interval":80,"frames":["\u{1f91c}\u3000\u3000\u3000\u3000\u{1f91b} ","\u{1f91c}\u3000\u3000\u3000\u3000\u{1f91b} ","\u{1f91c}\u3000\u3000\u3000\u3000\u{1f91b} ","\u3000\u{1f91c}\u3000\u3000\u{1f91b}\u3000 ","\u3000\u3000\u{1f91c}\u{1f91b}\u3000\u3000 ","\u3000\u{1f91c}\u2728\u{1f91b}\u3000\u3000 ","\u{1f91c}\u3000\u2728\u3000\u{1f91b}\u3000 "]},"soccerHeader":{"interval":80,"frames":[" \u{1f9d1}\u26bd\ufe0f \u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f \u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f \u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f \u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f \u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f \u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f\u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f \u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f \u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f \u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f \u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f \u{1f9d1} "]},"mindblown":{"interval":160,"frames":["\u{1f610} ","\u{1f610} ","\u{1f62e} ","\u{1f62e} ","\u{1f626} ","\u{1f626} ","\u{1f627} ","\u{1f627} ","\u{1f92f} ","\u{1f4a5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},"speaker":{"interval":160,"frames":["\u{1f508} ","\u{1f509} ","\u{1f50a} ","\u{1f509} "]},"orangePulse":{"interval":100,"frames":["\u{1f538} ","\u{1f536} ","\u{1f7e0} ","\u{1f7e0} ","\u{1f536} "]},"bluePulse":{"interval":100,"frames":["\u{1f539} ","\u{1f537} ","\u{1f535} ","\u{1f535} ","\u{1f537} "]},"orangeBluePulse":{"interval":100,"frames":["\u{1f538} ","\u{1f536} ","\u{1f7e0} ","\u{1f7e0} ","\u{1f536} ","\u{1f539} ","\u{1f537} ","\u{1f535} ","\u{1f535} ","\u{1f537} "]},"timeTravel":{"interval":100,"frames":["\u{1f55b} ","\u{1f55a} ","\u{1f559} ","\u{1f558} ","\u{1f557} ","\u{1f556} ","\u{1f555} ","\u{1f554} ","\u{1f553} ","\u{1f552} ","\u{1f551} ","\u{1f550} "]},"aesthetic":{"interval":80,"frames":["\u25b0\u25b1\u25b1\u25b1\u25b1\u25b1\u25b1","\u25b0\u25b0\u25b1\u25b1\u25b1\u25b1\u25b1","\u25b0\u25b0\u25b0\u25b1\u25b1\u25b1\u25b1","\u25b0\u25b0\u25b0\u25b0\u25b1\u25b1\u25b1","\u25b0\u25b0\u25b0\u25b0\u25b0\u25b1\u25b1","\u25b0\u25b0\u25b0\u25b0\u25b0\u25b0\u25b1","\u25b0\u25b0\u25b0\u25b0\u25b0\u25b0\u25b0","\u25b0\u25b1\u25b1\u25b1\u25b1\u25b1\u25b1"]},"dwarfFortress":{"interval":80,"frames":[" \u2588\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 ","\u263a\u2588\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 ","\u263a\u2588\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 ","\u263a\u2593\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 ","\u263a\u2593\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 ","\u263a\u2592\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 ","\u263a\u2592\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 ","\u263a\u2591\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 ","\u263a\u2591\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 ","\u263a \u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2593\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2593\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2592\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2592\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2591\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2591\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a \u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2593\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2593\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2592\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2592\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2591\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2591\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a \u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2593\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2593\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2592\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2592\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2591\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2591\u2588\u2588\xa3\xa3\xa3 "," \u263a \u2588\u2588\xa3\xa3\xa3 "," \u263a\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2593\u2588\xa3\xa3\xa3 "," \u263a\u2593\u2588\xa3\xa3\xa3 "," \u263a\u2592\u2588\xa3\xa3\xa3 "," \u263a\u2592\u2588\xa3\xa3\xa3 "," \u263a\u2591\u2588\xa3\xa3\xa3 "," \u263a\u2591\u2588\xa3\xa3\xa3 "," \u263a \u2588\xa3\xa3\xa3 "," \u263a\u2588\xa3\xa3\xa3 "," \u263a\u2588\xa3\xa3\xa3 "," \u263a\u2593\xa3\xa3\xa3 "," \u263a\u2593\xa3\xa3\xa3 "," \u263a\u2592\xa3\xa3\xa3 "," \u263a\u2592\xa3\xa3\xa3 "," \u263a\u2591\xa3\xa3\xa3 "," \u263a\u2591\xa3\xa3\xa3 "," \u263a \xa3\xa3\xa3 "," \u263a\xa3\xa3\xa3 "," \u263a\xa3\xa3\xa3 "," \u263a\u2593\xa3\xa3 "," \u263a\u2593\xa3\xa3 "," \u263a\u2592\xa3\xa3 "," \u263a\u2592\xa3\xa3 "," \u263a\u2591\xa3\xa3 "," \u263a\u2591\xa3\xa3 "," \u263a \xa3\xa3 "," \u263a\xa3\xa3 "," \u263a\xa3\xa3 "," \u263a\u2593\xa3 "," \u263a\u2593\xa3 "," \u263a\u2592\xa3 "," \u263a\u2592\xa3 "," \u263a\u2591\xa3 "," \u263a\u2591\xa3 "," \u263a \xa3 "," \u263a\xa3 "," \u263a\xa3 "," \u263a\u2593 "," \u263a\u2593 "," \u263a\u2592 "," \u263a\u2592 "," \u263a\u2591 "," \u263a\u2591 "," \u263a "," \u263a &"," \u263a \u263c&"," \u263a \u263c &"," \u263a\u263c &"," \u263a\u263c & "," \u203c & "," \u263a & "," \u203c & "," \u263a & "," \u203c & "," \u263a & ","\u203c & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xa3 "," & \u2591\xa3 "," & \u2592\xa3 "," & \u2593\xa3 "," & \xa3\xa3 "," & \u2591\xa3\xa3 "," & \u2592\xa3\xa3 ","& \u2593\xa3\xa3 ","& \xa3\xa3\xa3 "," \u2591\xa3\xa3\xa3 "," \u2592\xa3\xa3\xa3 "," \u2593\xa3\xa3\xa3 "," \u2588\xa3\xa3\xa3 "," \u2591\u2588\xa3\xa3\xa3 "," \u2592\u2588\xa3\xa3\xa3 "," \u2593\u2588\xa3\xa3\xa3 "," \u2588\u2588\xa3\xa3\xa3 "," \u2591\u2588\u2588\xa3\xa3\xa3 "," \u2592\u2588\u2588\xa3\xa3\xa3 "," \u2593\u2588\u2588\xa3\xa3\xa3 "," \u2588\u2588\u2588\xa3\xa3\xa3 "," \u2591\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2592\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2593\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2591\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2592\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2593\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "]}}')},8360:e=>{e.exports=JSON.parse('{"4":"zh_CHS","1025":"ar_SA","1026":"bg_BG","1027":"ca_ES","1028":"zh_TW","1029":"cs_CZ","1030":"da_DK","1031":"de_DE","1032":"el_GR","1033":"en_US","1034":"es_ES","1035":"fi_FI","1036":"fr_FR","1037":"he_IL","1038":"hu_HU","1039":"is_IS","1040":"it_IT","1041":"ja_JP","1042":"ko_KR","1043":"nl_NL","1044":"nb_NO","1045":"pl_PL","1046":"pt_BR","1047":"rm_CH","1048":"ro_RO","1049":"ru_RU","1050":"hr_HR","1051":"sk_SK","1052":"sq_AL","1053":"sv_SE","1054":"th_TH","1055":"tr_TR","1056":"ur_PK","1057":"id_ID","1058":"uk_UA","1059":"be_BY","1060":"sl_SI","1061":"et_EE","1062":"lv_LV","1063":"lt_LT","1064":"tg_TJ","1065":"fa_IR","1066":"vi_VN","1067":"hy_AM","1069":"eu_ES","1070":"wen_DE","1071":"mk_MK","1074":"tn_ZA","1076":"xh_ZA","1077":"zu_ZA","1078":"af_ZA","1079":"ka_GE","1080":"fo_FO","1081":"hi_IN","1082":"mt_MT","1083":"se_NO","1086":"ms_MY","1087":"kk_KZ","1088":"ky_KG","1089":"sw_KE","1090":"tk_TM","1092":"tt_RU","1093":"bn_IN","1094":"pa_IN","1095":"gu_IN","1096":"or_IN","1097":"ta_IN","1098":"te_IN","1099":"kn_IN","1100":"ml_IN","1101":"as_IN","1102":"mr_IN","1103":"sa_IN","1104":"mn_MN","1105":"bo_CN","1106":"cy_GB","1107":"kh_KH","1108":"lo_LA","1109":"my_MM","1110":"gl_ES","1111":"kok_IN","1114":"syr_SY","1115":"si_LK","1118":"am_ET","1121":"ne_NP","1122":"fy_NL","1123":"ps_AF","1124":"fil_PH","1125":"div_MV","1128":"ha_NG","1130":"yo_NG","1131":"quz_BO","1132":"ns_ZA","1133":"ba_RU","1134":"lb_LU","1135":"kl_GL","1144":"ii_CN","1146":"arn_CL","1148":"moh_CA","1150":"br_FR","1152":"ug_CN","1153":"mi_NZ","1154":"oc_FR","1155":"co_FR","1156":"gsw_FR","1157":"sah_RU","1158":"qut_GT","1159":"rw_RW","1160":"wo_SN","1164":"gbz_AF","2049":"ar_IQ","2052":"zh_CN","2055":"de_CH","2057":"en_GB","2058":"es_MX","2060":"fr_BE","2064":"it_CH","2067":"nl_BE","2068":"nn_NO","2070":"pt_PT","2077":"sv_FI","2080":"ur_IN","2092":"az_AZ","2094":"dsb_DE","2107":"se_SE","2108":"ga_IE","2110":"ms_BN","2115":"uz_UZ","2128":"mn_CN","2129":"bo_BT","2141":"iu_CA","2143":"tmz_DZ","2155":"quz_EC","3073":"ar_EG","3076":"zh_HK","3079":"de_AT","3081":"en_AU","3082":"es_ES","3084":"fr_CA","3098":"sr_SP","3131":"se_FI","3179":"quz_PE","4097":"ar_LY","4100":"zh_SG","4103":"de_LU","4105":"en_CA","4106":"es_GT","4108":"fr_CH","4122":"hr_BA","4155":"smj_NO","5121":"ar_DZ","5124":"zh_MO","5127":"de_LI","5129":"en_NZ","5130":"es_CR","5132":"fr_LU","5179":"smj_SE","6145":"ar_MA","6153":"en_IE","6154":"es_PA","6156":"fr_MC","6203":"sma_NO","7169":"ar_TN","7177":"en_ZA","7178":"es_DO","7194":"sr_BA","7227":"sma_SE","8193":"ar_OM","8201":"en_JA","8202":"es_VE","8218":"bs_BA","8251":"sms_FI","9217":"ar_YE","9225":"en_CB","9226":"es_CO","9275":"smn_FI","10241":"ar_SY","10249":"en_BZ","10250":"es_PE","11265":"ar_JO","11273":"en_TT","11274":"es_AR","12289":"ar_LB","12297":"en_ZW","12298":"es_EC","13313":"ar_KW","13321":"en_PH","13322":"es_CL","14337":"ar_AE","14346":"es_UR","15361":"ar_BH","15370":"es_PY","16385":"ar_QA","16394":"es_BO","17417":"en_MY","17418":"es_SV","18441":"en_IN","18442":"es_HN","19466":"es_NI","20490":"es_PR","21514":"es_US","31748":"zh_CHT"}')}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var s=r[e]={id:e,loaded:!1,exports:{}};return t[e](s,s.exports,n),s.loaded=!0,s.exports}n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var i=n(9896),s=n(2613);const o={right:function(e,t){e=e.trim();const r=l.stringWidth(e);return r<t?" ".repeat(t-r)+e:e},center:function(e,t){e=e.trim();const r=l.stringWidth(e);return r>=t?e:" ".repeat(t-r>>1)+e}};class a{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 r=0;return t.forEach((e=>{e.length>1&&l.stringWidth(e[0])>r&&(r=Math.min(Math.floor(.5*this.width),l.stringWidth(e[0])))})),t.forEach((e=>{this.div(...e.map(((t,n)=>({text:t.trim(),padding:this.measurePadding(t),width:0===n&&e.length>1?r: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(((r,n)=>{let i="";r.forEach(((r,s)=>{const{width:a}=e[s],c=this.negatePadding(e[s]);let h=r;c>l.stringWidth(r)&&(h+=" ".repeat(c-l.stringWidth(r))),e[s].align&&"left"!==e[s].align&&this.wrap&&(h=(0,o[e[s].align])(h,c),l.stringWidth(h)<c&&(h+=" ".repeat((a||0)-l.stringWidth(h)-1)));const d=e[s].padding||[0,0,0,0];d[3]&&(i+=" ".repeat(d[3])),i+=u(e[s],h,"| "),i+=h,i+=u(e[s],h," |"),d[1]&&(i+=" ".repeat(d[1])),0===n&&t.length>0&&(i=this.renderInline(i,t[t.length-1]))})),t.push({text:i.replace(/ +$/,""),span:e.span})})),t}renderInline(e,t){const r=e.match(/^ */),n=r?r[0].length:0,i=t.text,s=l.stringWidth(i.trimRight());return t.span?this.wrap?n<s?e:(t.hidden=!0,i.trimRight()+" ".repeat(n-s)+e.trimLeft()):(t.hidden=!0,i+e):e}rasterize(e){const t=[],r=this.columnWidths(e);let n;return e.forEach(((e,i)=>{e.width=r[i],n=this.wrap?l.wrap(e.text,this.negatePadding(e),{hard:!0}).split("\n"):e.text.split("\n"),e.border&&(n.unshift("."+"-".repeat(this.negatePadding(e)+2)+"."),n.push("'"+"-".repeat(this.negatePadding(e)+2)+"'")),e.padding&&(n.unshift(...new Array(e.padding[0]||0).fill("")),n.push(...new Array(e.padding[2]||0).fill(""))),n.forEach(((e,r)=>{t[r]||t.push([]);const n=t[r];for(let e=0;e<i;e++)void 0===n[e]&&n.push("");n.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,r=this.width;const n=e.map((e=>{if(e.width)return t--,r-=e.width,e.width})),i=t?Math.floor(r/t):0;return n.map(((t,r)=>void 0===t?Math.max(i,function(e){const t=e.padding||[],r=1+(t[3]||0)+(t[1]||0);return e.border?r+4:r}(e[r])):t))}}function u(e,t,r){return e.border?/[.']-+[.']/.test(t)?"":0!==t.trim().length?r:" ":""}let l;const c=new RegExp("\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function h(e){return e.replace(c,"")}function d(e,t){const[r,n]=e.match(c)||["",""];e=h(e);let i="";for(let r=0;r<e.length;r++)0!==r&&r%t==0&&(i+="\n"),i+=e.charAt(r);return r&&n&&(i=`${r}${i}${n}`),i}var p,f,m=n(6928),g=n(9023),b=n(7016);function y(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),-1===e.indexOf("-")&&-1===e.indexOf("_"))return e;{let t="",r=!1;const n=e.match(/^-+/);for(let i=n?n[0].length:0;i<e.length;i++){let n=e.charAt(i);r&&(r=!1,n=n.toUpperCase()),0===i||"-"!==n&&"_"!==n?"-"!==n&&"_"!==n&&(t+=n):r=!0}return t}}function D(e,t){const r=e.toLowerCase();t=t||"-";let n="";for(let i=0;i<e.length;i++){const s=r.charAt(i),o=e.charAt(i);n+=s!==o&&i>0?`${t}${r.charAt(i)}`:o}return n}function w(e){return null!=e&&("number"==typeof e||!!/^0x[0-9a-f]+$/i.test(e)||!/^0[^.]/.test(e)&&/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e))}let v;function E(e){return void 0!==e?e+1:1}function F(e){return"__proto__"===e?"___proto___":e}var C,S,x;(f=p||(p={})).BOOLEAN="boolean",f.STRING="string",f.NUMBER="number",f.ARRAY="array";const O=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,_=null!==(S=null===(C=null===process||void 0===process?void 0:process.versions)||void 0===C?void 0:C.node)&&void 0!==S?S:null===(x=null===process||void 0===process?void 0:process.version)||void 0===x?void 0:x.slice(1);if(_&&Number(_.match(/^([^.]+)/)[1])<O)throw Error(`yargs parser supports a minimum Node.js version of ${O}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);const A=process?process.env:{},T=new class{constructor(e){v=e}parse(e,t){const r=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),n=function(e){if(Array.isArray(e))return e.map((e=>"string"!=typeof e?e+"":e));e=e.trim();let t=0,r=null,n=null,i=null;const s=[];for(let o=0;o<e.length;o++)r=n,n=e.charAt(o)," "!==n||i?(n===i?i=null:"'"!==n&&'"'!==n||i||(i=n),s[t]||(s[t]=""),s[t]+=n):" "!==r&&t++;return s}(e),i="string"==typeof e,s=function(e){const t=[],r=Object.create(null);let n=!0;for(Object.keys(e).forEach((function(r){t.push([].concat(e[r],r))}));n;){n=!1;for(let e=0;e<t.length;e++)for(let r=e+1;r<t.length;r++)if(t[e].filter((function(e){return-1!==t[r].indexOf(e)})).length){t[e]=t[e].concat(t[r]),t.splice(r,1),n=!0;break}}return t.forEach((function(e){const t=(e=e.filter((function(e,t,r){return r.indexOf(e)===t}))).pop();void 0!==t&&"string"==typeof t&&(r[t]=e)})),r}(Object.assign(Object.create(null),r.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},r.configuration),a=Object.assign(Object.create(null),r.default),u=r.configObjects||[],l=r.envPrefix,c=o["populate--"],h=c?"--":"_",d=Object.create(null),f=Object.create(null),m=r.__||v.format,g={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:[]},b=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,C=new RegExp("^--"+o["negation-prefix"]+"(.+)");[].concat(r.array||[]).filter(Boolean).forEach((function(e){const t="object"==typeof e?e.key:e,r=Object.keys(e).map((function(e){return{boolean:"bools",string:"strings",number:"numbers"}[e]})).filter(Boolean).pop();r&&(g[r][t]=!0),g.arrays[t]=!0,g.keys.push(t)})),[].concat(r.boolean||[]).filter(Boolean).forEach((function(e){g.bools[e]=!0,g.keys.push(e)})),[].concat(r.string||[]).filter(Boolean).forEach((function(e){g.strings[e]=!0,g.keys.push(e)})),[].concat(r.number||[]).filter(Boolean).forEach((function(e){g.numbers[e]=!0,g.keys.push(e)})),[].concat(r.count||[]).filter(Boolean).forEach((function(e){g.counts[e]=!0,g.keys.push(e)})),[].concat(r.normalize||[]).filter(Boolean).forEach((function(e){g.normalize[e]=!0,g.keys.push(e)})),"object"==typeof r.narg&&Object.entries(r.narg).forEach((([e,t])=>{"number"==typeof t&&(g.nargs[e]=t,g.keys.push(e))})),"object"==typeof r.coerce&&Object.entries(r.coerce).forEach((([e,t])=>{"function"==typeof t&&(g.coercions[e]=t,g.keys.push(e))})),void 0!==r.config&&(Array.isArray(r.config)||"string"==typeof r.config?[].concat(r.config).filter(Boolean).forEach((function(e){g.configs[e]=!0})):"object"==typeof r.config&&Object.entries(r.config).forEach((([e,t])=>{"boolean"!=typeof t&&"function"!=typeof t||(g.configs[e]=t)}))),function(...e){e.forEach((function(e){Object.keys(e||{}).forEach((function(e){g.aliases[e]||(g.aliases[e]=[].concat(s[e]||[]),g.aliases[e].concat(e).forEach((function(t){if(/-/.test(t)&&o["camel-case-expansion"]){const r=y(t);r!==e&&-1===g.aliases[e].indexOf(r)&&(g.aliases[e].push(r),d[r]=!0)}})),g.aliases[e].concat(e).forEach((function(t){if(t.length>1&&/[A-Z]/.test(t)&&o["camel-case-expansion"]){const r=D(t,"-");r!==e&&-1===g.aliases[e].indexOf(r)&&(g.aliases[e].push(r),d[r]=!0)}})),g.aliases[e].forEach((function(t){g.aliases[t]=[e].concat(g.aliases[e].filter((function(e){return t!==e})))})))}))}))}(r.key,s,r.default,g.arrays),Object.keys(a).forEach((function(e){(g.aliases[e]||[]).forEach((function(t){a[t]=a[e]}))}));let S=null;Object.keys(g.counts).find((e=>U(e,g.arrays)?(S=Error(m("Invalid configuration: %s, opts.count excludes opts.array.",e)),!0):!!U(e,g.nargs)&&(S=Error(m("Invalid configuration: %s, opts.count excludes opts.narg.",e)),!0)));let x=[];const O=Object.assign(Object.create(null),{_:[]}),_={};for(let e=0;e<n.length;e++){const t=n[e],r=t.replace(/^-{3,}/,"---");let i,s,a,u,l,c;if("--"!==t&&/^-/.test(t)&&H(t))A(t);else{if(r.match(/^---+(=|$)/)){A(t);continue}if(t.match(/^--.+=/)||!o["short-option-groups"]&&t.match(/^-.+=/))u=t.match(/^--?([^=]+)=([\s\S]*)$/),null!==u&&Array.isArray(u)&&u.length>=3&&(U(u[1],g.arrays)?e=M(e,u[1],n,u[2]):!1!==U(u[1],g.nargs)?e=T(e,u[1],n,u[2]):k(u[1],u[2],!0));else if(t.match(C)&&o["boolean-negation"])u=t.match(C),null!==u&&Array.isArray(u)&&u.length>=2&&(s=u[1],k(s,!!U(s,g.arrays)&&[!1]));else if(t.match(/^--.+/)||!o["short-option-groups"]&&t.match(/^-[^-]+/))u=t.match(/^--?(.+)/),null!==u&&Array.isArray(u)&&u.length>=2&&(s=u[1],U(s,g.arrays)?e=M(e,s,n):!1!==U(s,g.nargs)?e=T(e,s,n):(l=n[e+1],void 0===l||l.match(/^-/)&&!l.match(b)||U(s,g.bools)||U(s,g.counts)?/^(true|false)$/.test(l)?(k(s,l),e++):k(s,G(s)):(k(s,l),e++)));else if(t.match(/^-.\..+=/))u=t.match(/^-([^=]+)=([\s\S]*)$/),null!==u&&Array.isArray(u)&&u.length>=3&&k(u[1],u[2]);else if(t.match(/^-.\..+/)&&!t.match(b))l=n[e+1],u=t.match(/^-(.\..+)/),null!==u&&Array.isArray(u)&&u.length>=2&&(s=u[1],void 0===l||l.match(/^-/)||U(s,g.bools)||U(s,g.counts)?k(s,G(s)):(k(s,l),e++));else if(t.match(/^-[^-]+/)&&!t.match(b)){a=t.slice(1,-1).split(""),i=!1;for(let r=0;r<a.length;r++){if(l=t.slice(r+2),a[r+1]&&"="===a[r+1]){c=t.slice(r+3),s=a[r],U(s,g.arrays)?e=M(e,s,n,c):!1!==U(s,g.nargs)?e=T(e,s,n,c):k(s,c),i=!0;break}if("-"!==l){if(/[A-Za-z]/.test(a[r])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(l)&&!1===U(l,g.bools)){k(a[r],l),i=!0;break}if(a[r+1]&&a[r+1].match(/\W/)){k(a[r],l),i=!0;break}k(a[r],G(a[r]))}else k(a[r],l)}s=t.slice(-1)[0],i||"-"===s||(U(s,g.arrays)?e=M(e,s,n):!1!==U(s,g.nargs)?e=T(e,s,n):(l=n[e+1],void 0===l||/^(-|--)[^-]/.test(l)&&!l.match(b)||U(s,g.bools)||U(s,g.counts)?/^(true|false)$/.test(l)?(k(s,l),e++):k(s,G(s)):(k(s,l),e++)))}else if(t.match(/^-[0-9]$/)&&t.match(b)&&U(t.slice(1),g.bools))s=t.slice(1),k(s,G(s));else{if("--"===t){x=n.slice(e+1);break}if(o["halt-at-non-option"]){x=n.slice(e);break}A(t)}}}function A(e){const t=B("_",e);"string"!=typeof t&&"number"!=typeof t||O._.push(t)}function T(e,t,r,n){let i,s=U(t,g.nargs);if(s="number"!=typeof s||isNaN(s)?1:s,0===s)return z(n)||(S=Error(m("Argument unexpected for: %s",t))),k(t,G(t)),e;let a=z(n)?0:1;if(o["nargs-eats-options"])r.length-(e+1)+a<s&&(S=Error(m("Not enough arguments following: %s",t))),a=s;else{for(i=e+1;i<r.length&&(!r[i].match(/^-[^0-9]/)||r[i].match(b)||H(r[i]));i++)a++;a<s&&(S=Error(m("Not enough arguments following: %s",t)))}let u=Math.min(a,s);for(!z(n)&&u>0&&(k(t,n),u--),i=e+1;i<u+e+1;i++)k(t,r[i]);return e+u}function M(e,t,r,n){let s=[],u=n||r[e+1];const l=U(t,g.nargs);if(U(t,g.bools)&&!/^(true|false)$/.test(u))s.push(!0);else if(z(u)||z(n)&&/^-/.test(u)&&!b.test(u)&&!H(u)){if(void 0!==a[t]){const e=a[t];s=Array.isArray(e)?e:[e]}}else{z(n)||s.push(j(t,n,!0));for(let n=e+1;n<r.length&&!(!o["greedy-arrays"]&&s.length>0||l&&"number"==typeof l&&s.length>=l)&&(u=r[n],!/^-/.test(u)||b.test(u)||H(u));n++)e=n,s.push(j(t,u,i))}return"number"==typeof l&&(l&&s.length<l||isNaN(l)&&0===s.length)&&(S=Error(m("Not enough arguments following: %s",t))),k(t,s),e}function k(e,t,r=i){if(/-/.test(e)&&o["camel-case-expansion"]){const t=e.split(".").map((function(e){return y(e)})).join(".");I(e,t)}const n=j(e,t,r),s=e.split(".");L(O,s,n),g.aliases[e]&&g.aliases[e].forEach((function(e){const t=e.split(".");L(O,t,n)})),s.length>1&&o["dot-notation"]&&(g.aliases[s[0]]||[]).forEach((function(t){let r=t.split(".");const i=[].concat(s);i.shift(),r=r.concat(i),(g.aliases[e]||[]).includes(r.join("."))||L(O,r,n)})),U(e,g.normalize)&&!U(e,g.arrays)&&[e].concat(g.aliases[e]||[]).forEach((function(e){Object.defineProperty(_,e,{enumerable:!0,get:()=>t,set(e){t="string"==typeof e?v.normalize(e):e}})}))}function I(e,t){g.aliases[e]&&g.aliases[e].length||(g.aliases[e]=[t],d[t]=!0),g.aliases[t]&&g.aliases[t].length||I(t,e)}function j(e,t,r){r&&(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)),(U(e,g.bools)||U(e,g.counts))&&"string"==typeof t&&(t="true"===t);let n=Array.isArray(t)?t.map((function(t){return B(e,t)})):B(e,t);return U(e,g.counts)&&(z(n)||"boolean"==typeof n)&&(n=E()),U(e,g.normalize)&&U(e,g.arrays)&&(n=Array.isArray(t)?t.map((e=>v.normalize(e))):v.normalize(t)),n}function B(e,t){return o["parse-positional-numbers"]||"_"!==e?(U(e,g.strings)||U(e,g.bools)||Array.isArray(t)||(w(t)&&o["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${t}`)))||!z(t)&&U(e,g.numbers))&&(t=Number(t)),t):t}function P(e,t){Object.keys(e).forEach((function(r){const n=e[r],i=t?t+"."+r:r;"object"==typeof n&&null!==n&&!Array.isArray(n)&&o["dot-notation"]?P(n,i):(!N(O,i.split("."))||U(i,g.arrays)&&o["combine-arrays"])&&k(i,n)}))}function R(e,t){if(void 0===l)return;const r="string"==typeof l?l:"",n=v.env();Object.keys(n).forEach((function(i){if(""===r||0===i.lastIndexOf(r,0)){const s=i.split("__").map((function(e,t){return 0===t&&(e=e.substring(r.length)),y(e)}));(t&&g.configs[s.join(".")]||!t)&&!N(e,s)&&k(s.join("."),n[i])}}))}function $(e,t,r,n=!1){Object.keys(r).forEach((function(i){N(e,i.split("."))||(L(e,i.split("."),r[i]),n&&(f[i]=!0),(t[i]||[]).forEach((function(t){N(e,t.split("."))||L(e,t.split("."),r[i])})))}))}function N(e,t){let r=e;o["dot-notation"]||(t=[t.join(".")]),t.slice(0,-1).forEach((function(e){r=r[e]||{}}));const n=t[t.length-1];return"object"==typeof r&&n in r}function L(e,t,r){let n=e;o["dot-notation"]||(t=[t.join(".")]),t.slice(0,-1).forEach((function(e){e=F(e),"object"==typeof n&&void 0===n[e]&&(n[e]={}),"object"!=typeof n[e]||Array.isArray(n[e])?(Array.isArray(n[e])?n[e].push({}):n[e]=[n[e],{}],n=n[e][n[e].length-1]):n=n[e]}));const i=F(t[t.length-1]),s=U(t.join("."),g.arrays),a=Array.isArray(r);let u=o["duplicate-arguments-array"];!u&&U(i,g.nargs)&&(u=!0,(!z(n[i])&&1===g.nargs[i]||Array.isArray(n[i])&&n[i].length===g.nargs[i])&&(n[i]=void 0)),r===E()?n[i]=E(n[i]):Array.isArray(n[i])?u&&s&&a?n[i]=o["flatten-duplicate-arrays"]?n[i].concat(r):(Array.isArray(n[i][0])?n[i]:[n[i]]).concat([r]):u||Boolean(s)!==Boolean(a)?n[i]=n[i].concat([r]):n[i]=r:void 0===n[i]&&s?n[i]=a?r:[r]:!u||void 0===n[i]||U(i,g.counts)||U(i,g.bools)?n[i]=r:n[i]=[n[i],r]}function U(e,t){const r=[].concat(g.aliases[e]||[],e),n=Object.keys(t),i=r.find((e=>n.includes(e)));return!!i&&t[i]}function W(e){const t=Object.keys(g);return[].concat(t.map((e=>g[e]))).some((function(t){return Array.isArray(t)?t.includes(e):t[e]}))}function H(e){return o["unknown-options-as-args"]&&function(e){return!(e=e.replace(/^-{3,}/,"--")).match(b)&&(!function(e){if(e.match(b)||!e.match(/^-[^-]+/))return!1;let t,r=!0;const n=e.slice(1).split("");for(let i=0;i<n.length;i++){if(t=e.slice(i+2),!W(n[i])){r=!1;break}if(n[i+1]&&"="===n[i+1]||"-"===t||/[A-Za-z]/.test(n[i])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(t)||n[i+1]&&n[i+1].match(/\W/))break}return r}(e)&&!function(e,...t){return[].concat(...t).some((function(t){const r=e.match(t);return r&&W(r[1])}))}(e,/^-+([^=]+?)=[\s\S]*$/,C,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/))}(e)}function G(e){return U(e,g.bools)||U(e,g.counts)||!(`${e}`in a)?(t=function(e){let t=p.BOOLEAN;return U(e,g.strings)?t=p.STRING:U(e,g.numbers)?t=p.NUMBER:U(e,g.bools)?t=p.BOOLEAN:U(e,g.arrays)&&(t=p.ARRAY),t}(e),{[p.BOOLEAN]:!0,[p.STRING]:"",[p.NUMBER]:void 0,[p.ARRAY]:[]}[t]):a[e];var t}function z(e){return void 0===e}return R(O,!0),R(O,!1),function(e){const t=Object.create(null);$(t,g.aliases,a),Object.keys(g.configs).forEach((function(r){const n=e[r]||t[r];if(n)try{let e=null;const t=v.resolve(v.cwd(),n),i=g.configs[r];if("function"==typeof i){try{e=i(t)}catch(t){e=t}if(e instanceof Error)return void(S=e)}else e=v.require(t);P(e)}catch(t){"PermissionDenied"===t.name?S=t:e[r]&&(S=Error(m("Invalid JSON config file: %s",n)))}}))}(O),void 0!==u&&u.forEach((function(e){P(e)})),$(O,g.aliases,a,!0),function(e){let t;const r=new Set;Object.keys(e).forEach((function(n){if(!r.has(n)&&(t=U(n,g.coercions),"function"==typeof t))try{const i=B(n,t(e[n]));[].concat(g.aliases[n]||[],n).forEach((t=>{r.add(t),e[t]=i}))}catch(e){S=e}}))}(O),o["set-placeholder-key"]&&function(e){g.keys.forEach((t=>{~t.indexOf(".")||void 0===e[t]&&(e[t]=void 0)}))}(O),Object.keys(g.counts).forEach((function(e){N(O,e.split("."))||k(e,0)})),c&&x.length&&(O[h]=[]),x.forEach((function(e){O[h].push(e)})),o["camel-case-expansion"]&&o["strip-dashed"]&&Object.keys(O).filter((e=>"--"!==e&&e.includes("-"))).forEach((e=>{delete O[e]})),o["strip-aliased"]&&[].concat(...Object.keys(s).map((e=>s[e]))).forEach((e=>{o["camel-case-expansion"]&&e.includes("-")&&delete O[e.split(".").map((e=>y(e))).join(".")],delete O[e]})),{aliases:Object.assign({},g.aliases),argv:Object.assign(_,O),configuration:o,defaulted:Object.assign({},f),error:S,newAliases:Object.assign({},d)}}}({cwd:process.cwd,env:()=>A,format:g.format,normalize:m.normalize,resolve:m.resolve,require:e=>{if("undefined"!=typeof require)return require(e);if(e.match(/\.json$/))return JSON.parse((0,i.readFileSync)(e,"utf8"));throw Error("only .json config files are supported in ESM")}}),M=function(e,t){return T.parse(e.slice(),t).argv};M.detailed=function(e,t){return T.parse(e.slice(),t)},M.camelCase=y,M.decamelize=D,M.looksLikeNumber=w;const k=M;class I extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,I)}}const j={fs:{readFileSync:i.readFileSync,writeFile:i.writeFile},format:g.format,resolve:m.resolve,exists:e=>{try{return(0,i.statSync)(e).isFile()}catch(e){return!1}}};let B;class P{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 r=function(){};return"function"==typeof e[e.length-1]&&(r=e.pop()),r=r||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:r})):r(),B.format.apply(B.format,[this.cache[this.locale][t]||t].concat(e))}__n(){const e=Array.prototype.slice.call(arguments),t=e.shift(),r=e.shift(),n=e.shift();let i=function(){};"function"==typeof e[e.length-1]&&(i=e.pop()),this.cache[this.locale]||this._readLocaleFile();let s=1===n?t:r;this.cache[this.locale][t]&&(s=this.cache[this.locale][t][1===n?"one":"other"]),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]={one:t,other:r},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:i})):i();const o=[s];return~s.indexOf("%d")&&o.push(n),B.format.apply(B.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 r="";return e.forEach((function(e,n){const i=t[n+1];r+=e,void 0!==i&&(r+="%s")})),this.__.apply(this,[r].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],r=t.directory,n=t.locale,i=t.cb,s=this._resolveLocaleFile(r,n),o=JSON.stringify(this.cache[n],null,2);B.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{B.fs.readFileSync&&(e=JSON.parse(B.fs.readFileSync(t,"utf-8")))}catch(r){if(r instanceof SyntaxError&&(r.message="syntax error in "+t),"ENOENT"!==r.code)throw r;e={}}this.cache[this.locale]=e}_resolveLocaleFile(e,t){let r=B.resolve(e,"./",t+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(r)&&~t.lastIndexOf("_")){const n=B.resolve(e,"./",t.split("_")[0]+".json");this._fileExistsSync(n)&&(r=n)}return r}_fileExistsSync(e){return B.exists(e)}}const R="loading a directory of commands is not supported yet for ESM";let $;try{$=(0,b.fileURLToPath)(import.meta.url)}catch(e){$=process.cwd()}const N=$.substring(0,$.lastIndexOf("node_modules")),L={assert:{notStrictEqual:s.notStrictEqual,strictEqual:s.strictEqual},cliui:function(e){return function(e,t){return l=t,new a({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:h,wrap:d})},findUp:function(e,t){let r,n=(0,m.resolve)(".",e);for((0,i.statSync)(n).isDirectory()||(n=(0,m.dirname)(n));;){if(r=t(n,(0,i.readdirSync)(n)),r)return(0,m.resolve)(n,r);if(n=(0,m.dirname)(r=n),r===n)break}},getEnv:e=>process.env[e],inspect:g.inspect,getCallerFile:()=>{throw new I(R)},getProcessArgvBin:function(){return process.argv[process.versions.electron&&!process.defaultApp?0:1]},mainFilename:N||process.cwd(),Parser:k,path:{basename:m.basename,dirname:m.dirname,extname:m.extname,relative:m.relative,resolve:m.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:i.readFileSync,require:()=>{throw new I("require is not supported by ESM")},requireDirectory:()=>{throw new I(R)},stringWidth:e=>[...e].length,y18n:(U={directory:(0,m.resolve)($,"../../../locales"),updateFiles:!1},function(e){B=j;const t=new P(e);return{__:t.__.bind(t),__n:t.__n.bind(t),setLocale:t.setLocale.bind(t),getLocale:t.getLocale.bind(t),updateLocale:t.updateLocale.bind(t),locale:t.locale}}(U))};var U;function W(e,t,r,n){r.assert.notStrictEqual(e,t,n)}function H(e,t){t.assert.strictEqual(typeof e,"string")}function G(e){return Object.keys(e)}function z(e){return!!e&&!!e.then&&"function"==typeof e.then}function V(e){const t=e.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),r=/\.*[\][<>]/g,n=t.shift();if(!n)throw new Error(`No command found in: ${e}`);const i={cmd:n.replace(r,""),demanded:[],optional:[]};return t.forEach(((e,n)=>{let s=!1;e=e.replace(/\s/g,""),/\.+[\]>]/.test(e)&&n===t.length-1&&(s=!0),/^\[/.test(e)?i.optional.push({cmd:e.replace(r,"").split("|"),variadic:s}):i.demanded.push({cmd:e.replace(r,"").split("|"),variadic:s})})),i}const q=["first","second","third","fourth","fifth","sixth"];function Y(e,t,r){try{let n=0;const[i,s,o]="object"==typeof e?[{demanded:[],optional:[]},e,t]:[V(`cmd ${e}`),t,r],a=[].slice.call(s);for(;a.length&&void 0===a[a.length-1];)a.pop();const u=o||a.length;if(u<i.demanded.length)throw new I(`Not enough arguments provided. Expected ${i.demanded.length} but received ${a.length}.`);const l=i.demanded.length+i.optional.length;if(u>l)throw new I(`Too many arguments provided. Expected max ${l} but received ${u}.`);i.demanded.forEach((e=>{const t=K(a.shift());0===e.cmd.filter((e=>e===t||"*"===e)).length&&J(t,e.cmd,n),n+=1})),i.optional.forEach((e=>{if(0===a.length)return;const t=K(a.shift());0===e.cmd.filter((e=>e===t||"*"===e)).length&&J(t,e.cmd,n),n+=1}))}catch(e){console.warn(e.stack)}}function K(e){return Array.isArray(e)?"array":null===e?"null":typeof e}function J(e,t,r){throw new I(`Invalid ${q[r]||"manyith"} argument. Expected ${t.join(" or ")} but received ${e}.`)}class Z{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,t,r=!0,n=!1){if(Y("<array|function> [boolean] [boolean] [boolean]",[e,t,r],arguments.length),Array.isArray(e)){for(let n=0;n<e.length;n++){if("function"!=typeof e[n])throw Error("middleware must be a function");const i=e[n];i.applyBeforeValidation=t,i.global=r}Array.prototype.push.apply(this.globalMiddleware,e)}else if("function"==typeof e){const i=e;i.applyBeforeValidation=t,i.global=r,i.mutates=n,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,t){const r=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter((e=>{const n=[...r[t]||[],t];return!e.option||!n.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 Q(e,t,r,n){return r.reduce(((e,r)=>{if(r.applyBeforeValidation!==n)return e;if(r.mutates){if(r.applied)return e;r.applied=!0}if(z(e))return e.then((e=>Promise.all([e,r(e,t)]))).then((([e,t])=>Object.assign(e,t)));{const n=r(e,t);return z(n)?n.then((t=>Object.assign(e,t))):Object.assign(e,n)}}),e)}function X(e,t,r=e=>{throw e}){try{const r="function"==typeof e?e():e;return z(r)?r.then((e=>t(e))):t(r)}catch(e){return r(e)}}const ee=/(^\*)|(^\$0)/;class te{constructor(e,t,r,n){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=n,this.usage=e,this.globalMiddleware=r,this.validation=t}addDirectory(e,t,r,n){"boolean"!=typeof(n=n||{}).recurse&&(n.recurse=!1),Array.isArray(n.extensions)||(n.extensions=["js"]);const i="function"==typeof n.visit?n.visit:e=>e;n.visit=(e,t,r)=>{const n=i(e,t,r);if(n){if(this.requireCache.has(t))return n;this.requireCache.add(t),this.addHandler(n)}return n},this.shim.requireDirectory({require:t,filename:r},e,n)}addHandler(e,t,r,n,i,s){let o=[];const a=function(e){return e?e.map((e=>(e.applyBeforeValidation=!1,e))):[]}(i);if(n=n||(()=>{}),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(re(r))return void this.addHandler([e].concat(o),t,r.builder,r.handler,r.middlewares,r.deprecated)}if("string"==typeof e){const i=V(e);o=o.map((e=>V(e).cmd));let u=!1;const l=[i.cmd].concat(o).filter((e=>!ee.test(e)||(u=!0,!1)));0===l.length&&u&&l.push("$0"),u&&(i.cmd=l[0],o=l.slice(1),e=e.replace(ee,i.cmd)),o.forEach((e=>{this.aliasMap[e]=i.cmd})),!1!==t&&this.usage.command(e,t,u,o,s),this.handlers[i.cmd]={original:e,description:t,handler:n,builder:r||{},middlewares:a,deprecated:s,demanded:i.demanded,optional:i.optional},u&&(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,r,n,i,s){const o=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,a=t.getInternalMethods().getContext(),u=a.commands.slice(),l=!e;e&&(a.commands.push(e),a.fullCommands.push(o.original));const c=this.applyBuilderUpdateUsageAndParse(l,o,t,r.aliases,u,n,i,s);return z(c)?c.then((e=>this.applyMiddlewareAndGetResult(l,o,e.innerArgv,a,i,e.aliases,t))):this.applyMiddlewareAndGetResult(l,o,c.innerArgv,a,i,c.aliases,t)}applyBuilderUpdateUsageAndParse(e,t,r,n,i,s,o,a){const u=t.builder;let l=r;if(ne(u)){r.getInternalMethods().getUsageInstance().freeze();const c=u(r.getInternalMethods().reset(n),a);if(z(c))return c.then((n=>{var a;return l=(a=n)&&"function"==typeof a.getInternalMethods?n:r,this.parseAndUpdateUsage(e,t,l,i,s,o)}))}else(function(e){return"object"==typeof e})(u)&&(r.getInternalMethods().getUsageInstance().freeze(),l=r.getInternalMethods().reset(n),Object.keys(t.builder).forEach((e=>{l.option(e,u[e])})));return this.parseAndUpdateUsage(e,t,l,i,s,o)}parseAndUpdateUsage(e,t,r,n,i,s){e&&r.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(r)&&r.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(n,t),t.description);const o=r.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,i,s);return z(o)?o.then((e=>({aliases:r.parsed.aliases,innerArgv:e}))):{aliases:r.parsed.aliases,innerArgv:o}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&0===e.getInternalMethods().getUsageInstance().getUsage().length}usageFromParentCommandsCommandHandler(e,t){const r=ee.test(t.original)?t.original.replace(ee,"").trim():t.original,n=e.filter((e=>!ee.test(e)));return n.push(r),`$0 ${n.join(" ")}`}handleValidationAndGetResult(e,t,r,n,i,s,o,a){if(!s.getInternalMethods().getHasOutput()){const t=s.getInternalMethods().runValidation(i,a,s.parsed.error,e);r=X(r,(e=>(t(e),e)))}if(t.handler&&!s.getInternalMethods().getHasOutput()){s.getInternalMethods().setHasOutput();const n=!!s.getOptions().configuration["populate--"];s.getInternalMethods().postProcess(r,n,!1,!1),r=X(r=Q(r,s,o,!1),(e=>{const r=t.handler(e);return z(r)?r.then((()=>e)):e})),e||s.getInternalMethods().getUsageInstance().cacheHelpMessage(),z(r)&&!s.getInternalMethods().hasParseCallback()&&r.catch((e=>{try{s.getInternalMethods().getUsageInstance().fail(null,e)}catch(e){}}))}return e||(n.commands.pop(),n.fullCommands.pop()),r}applyMiddlewareAndGetResult(e,t,r,n,i,s,o){let a={};if(i)return r;o.getInternalMethods().getHasOutput()||(a=this.populatePositionals(t,r,n,o));const u=this.globalMiddleware.getMiddleware().slice(0).concat(t.middlewares),l=Q(r,o,u,!0);return z(l)?l.then((r=>this.handleValidationAndGetResult(e,t,r,n,s,o,u,a))):this.handleValidationAndGetResult(e,t,l,n,s,o,u,a)}populatePositionals(e,t,r,n){t._=t._.slice(r.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._=r.commands.concat(t._.map((e=>""+e))),this.postProcessPositionals(t,o,this.cmdToParseOptions(e.original),n),o}populatePositional(e,t,r){const n=e.cmd[0];e.variadic?r[n]=t._.splice(0).map(String):t._.length&&(r[n]=[String(t._.shift())])}cmdToParseOptions(e){const t={array:[],default:{},alias:{},demand:{}},r=V(e);return r.demanded.forEach((e=>{const[r,...n]=e.cmd;e.variadic&&(t.array.push(r),t.default[r]=[]),t.alias[r]=n,t.demand[r]=!0})),r.optional.forEach((e=>{const[r,...n]=e.cmd;e.variadic&&(t.array.push(r),t.default[r]=[]),t.alias[r]=n})),t}postProcessPositionals(e,t,r,n){const i=Object.assign({},n.getOptions());i.default=Object.assign(r.default,i.default);for(const e of Object.keys(r.alias))i.alias[e]=(i.alias[e]||[]).concat(r.alias[e]);i.array=i.array.concat(r.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)n.getInternalMethods().getUsageInstance().fail(a.error.message,a.error);else{const r=Object.keys(t);Object.keys(t).forEach((e=>{r.push(...a.aliases[e])})),Object.keys(a.argv).forEach((i=>{r.includes(i)&&(t[i]||(t[i]=a.argv[i]),!this.isInConfigs(n,i)&&!this.isDefaulted(n,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:r}=e.getOptions();return Object.prototype.hasOwnProperty.call(r,t)||Object.prototype.hasOwnProperty.call(r,this.shim.Parser.camelCase(t))}isInConfigs(e,t){const{configObjects:r}=e.getOptions();return r.some((e=>Object.prototype.hasOwnProperty.call(e,t)))||r.some((e=>Object.prototype.hasOwnProperty.call(e,this.shim.Parser.camelCase(t))))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){const t=ee.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(ne(t))return t(e,!0);re(t)||Object.keys(t).forEach((r=>{e.option(r,t[r])}))}moduleName(e){const t=function(e){if("undefined"==typeof require)return null;for(let t,r=0,n=Object.keys(require.cache);r<n.length;r++)if(t=require.cache[n[r]],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:r}){for(const n of[e,t,r]){if("string"==typeof n||!1===n)return n;W(n,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){const e=this.frozens.pop();W(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 re(e){return"object"==typeof e&&!!e.builder&&"function"==typeof e.handler}function ne(e){return"function"==typeof e}function ie(e={},t=()=>!0){const r={};return G(e).forEach((n=>{t(n,e[n])&&(r[n]=e[n])})),r}function se(e){"undefined"!=typeof process&&[process.stdout,process.stderr].forEach((t=>{const r=t;r._handle&&r.isTTY&&"function"==typeof r._handle.setBlocking&&r._handle.setBlocking(e)}))}function oe(e){return"boolean"==typeof e}function ae(e){return"object"==typeof e}function ue(e){return ae(e)?e.indentation:0}function le(e){return ae(e)?e.text:e}class ce{constructor(e,t,r,n){var i,s,o;this.yargs=e,this.usage=t,this.command=r,this.shim=n,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,r,n){const i=this.command.getCommandHandlers();for(let t=0,r=e.length;t<r;++t)if(i[e[t]]&&i[e[t]].builder){const r=i[e[t]].builder;if(ne(r)){this.indexAfterLastReset=t+1;const e=this.yargs.getInternalMethods().reset();return r(e,!0),e.argv}}const s=[];this.commandCompletions(s,e,r),this.optionCompletions(s,e,t,r),this.choicesFromOptionsCompletions(s,e,t,r),this.choicesFromPositionalsCompletions(s,e,t,r),n(null,s)}commandCompletions(e,t,r){const n=this.yargs.getInternalMethods().getContext().commands;r.match(/^-/)||n[n.length-1]===r||this.previousArgHasChoices(t)||this.usage.getCommands().forEach((r=>{const n=V(r[0]).cmd;if(-1===t.indexOf(n))if(this.zshShell){const t=r[1]||"";e.push(n.replace(/:/g,"\\:")+":"+t)}else e.push(n)}))}optionCompletions(e,t,r,n){if((n.match(/^-/)||""===n&&0===e.length)&&!this.previousArgHasChoices(t)){const r=this.yargs.getOptions(),i=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(r.key).forEach((s=>{const o=!!r.configuration["boolean-negation"]&&r.boolean.includes(s);i.includes(s)||r.hiddenOptions.includes(s)||this.argsContainKey(t,s,o)||this.completeOptionKey(s,e,n,o&&!!r.default[s])}))}}choicesFromOptionsCompletions(e,t,r,n){if(this.previousArgHasChoices(t)){const r=this.getPreviousArgChoices(t);r&&r.length>0&&e.push(...r.map((e=>e.replace(/:/g,"\\:"))))}}choicesFromPositionalsCompletions(e,t,r,n){if(""===n&&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[r._.length-s-1];if(!o)return;const a=this.yargs.getOptions().choices[o]||[];for(const t of a)t.startsWith(n)&&e.push(t.replace(/:/g,"\\:"))}getPreviousArgChoices(e){if(e.length<1)return;let t=e[e.length-1],r="";if(!t.startsWith("-")&&e.length>1&&(r=t,t=e[e.length-2]),!t.startsWith("-"))return;const n=t.replace(/^-+/,""),i=this.yargs.getOptions(),s=[n,...this.yargs.getAliases()[n]||[]];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=>!r||e.startsWith(r))):void 0}previousArgHasChoices(e){const t=this.getPreviousArgChoices(e);return void 0!==t&&t.length>0}argsContainKey(e,t,r){const n=t=>-1!==e.indexOf((/^[^0-9]$/.test(t)?"-":"--")+t);if(n(t))return!0;if(r&&n(`no-${t}`))return!0;if(this.aliases)for(const e of this.aliases[t])if(n(e))return!0;return!1}completeOptionKey(e,t,r,n){var i,s,o,a;let u=e;if(this.zshShell){const t=this.usage.getDescriptions(),r=null===(s=null===(i=null==this?void 0:this.aliases)||void 0===i?void 0:i[e])||void 0===s?void 0:s.find((e=>{const r=t[e];return"string"==typeof r&&r.length>0})),n=r?t[r]:void 0,l=null!==(a=null!==(o=t[e])&&void 0!==o?o:n)&&void 0!==a?a:"";u=`${e.replace(/:/g,"\\:")}:${l.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}const l=!/^--/.test(r)&&/^[^0-9]$/.test(e)?"-":"--";t.push(l+u),n&&t.push(l+"no-"+u)}customCompletion(e,t,r,n){if(W(this.customCompletionFunction,null,this.shim),this.customCompletionFunction.length<3){const e=this.customCompletionFunction(r,t);return z(e)?e.then((e=>{this.shim.process.nextTick((()=>{n(null,e)}))})).catch((e=>{this.shim.process.nextTick((()=>{n(e,void 0)}))})):n(null,e)}return this.customCompletionFunction.length>3?this.customCompletionFunction(r,t,((i=n)=>this.defaultCompletion(e,t,r,i)),(e=>{n(null,e)})):this.customCompletionFunction(r,t,(e=>{n(null,e)}))}getCompletion(e,t){const r=e.length?e[e.length-1]:"",n=this.yargs.parse(e,!0),i=this.customCompletionFunction?n=>this.customCompletion(e,n,r,t):n=>this.defaultCompletion(e,n,r,t);return z(n)?n.then(i):i(n)}generateCompletionScript(e,t){let r=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 n=this.shim.path.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),r=r.replace(/{{app_name}}/g,n),r=r.replace(/{{completion_command}}/g,t),r.replace(/{{app_path}}/g,e)}registerFunction(e){this.customCompletionFunction=e}setParsed(e){this.aliases=e.aliases}}function he(e,t){if(0===e.length)return t.length;if(0===t.length)return e.length;const r=[];let n,i;for(n=0;n<=t.length;n++)r[n]=[n];for(i=0;i<=e.length;i++)r[0][i]=i;for(n=1;n<=t.length;n++)for(i=1;i<=e.length;i++)t.charAt(n-1)===e.charAt(i-1)?r[n][i]=r[n-1][i-1]:n>1&&i>1&&t.charAt(n-2)===e.charAt(i-1)&&t.charAt(n-1)===e.charAt(i-2)?r[n][i]=r[n-2][i-2]+1:r[n][i]=Math.min(r[n-1][i-1]+1,Math.min(r[n][i-1]+1,r[n-1][i]+1));return r[t.length][e.length]}const de=["$0","--","_"];let pe,fe=[];function me(e,t,r,n){pe=n;let i={};if(Object.prototype.hasOwnProperty.call(e,"extends")){if("string"!=typeof e.extends)return i;const n=/\.json|\..*rc$/.test(e.extends);let s=null;if(n)s=function(e,t){return pe.path.resolve(e,t)}(t,e.extends);else try{s=require.resolve(e.extends)}catch(t){return e}!function(e){if(fe.indexOf(e)>-1)throw new I(`Circular extended configurations: '${e}'.`)}(s),fe.push(s),i=n?JSON.parse(pe.readFileSync(s,"utf8")):require(e.extends),delete e.extends,i=me(i,pe.path.dirname(s),r,pe)}return fe=[],r?ge(i,e):Object.assign({},i,e)}function ge(e,t){const r={};function n(e){return e&&"object"==typeof e&&!Array.isArray(e)}Object.assign(r,e);for(const i of Object.keys(t))n(t[i])&&n(r[i])?r[i]=ge(e[i],t[i]):r[i]=t[i];return r}var be,ye,De,we,ve,Ee,Fe,Ce,Se,xe,Oe,_e,Ae,Te,Me,ke,Ie,je,Be,Pe,Re,$e,Ne,Le,Ue,We,He,Ge,ze,Ve,qe,Ye,Ke,Je,Ze,Qe=function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!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"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},Xe=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};const et=Symbol("copyDoubleDash"),tt=Symbol("copyDoubleDash"),rt=Symbol("deleteFromParserHintObject"),nt=Symbol("emitWarning"),it=Symbol("freeze"),st=Symbol("getDollarZero"),ot=Symbol("getParserConfiguration"),at=Symbol("getUsageConfiguration"),ut=Symbol("guessLocale"),lt=Symbol("guessVersion"),ct=Symbol("parsePositionalNumbers"),ht=Symbol("pkgUp"),dt=Symbol("populateParserHintArray"),pt=Symbol("populateParserHintSingleValueDictionary"),ft=Symbol("populateParserHintArrayDictionary"),mt=Symbol("populateParserHintDictionary"),gt=Symbol("sanitizeKey"),bt=Symbol("setKey"),yt=Symbol("unfreeze"),Dt=Symbol("validateAsync"),wt=Symbol("getCommandInstance"),vt=Symbol("getContext"),Et=Symbol("getHasOutput"),Ft=Symbol("getLoggerInstance"),Ct=Symbol("getParseContext"),St=Symbol("getUsageInstance"),xt=Symbol("getValidationInstance"),Ot=Symbol("hasParseCallback"),_t=Symbol("isGlobalContext"),At=Symbol("postProcess"),Tt=Symbol("rebase"),Mt=Symbol("reset"),kt=Symbol("runYargsParserAndExecuteCommands"),It=Symbol("runValidation"),jt=Symbol("setHasOutput"),Bt=Symbol("kTrackManuallySetKeys");class Pt{constructor(e=[],t,r,n){this.customScriptName=!1,this.parsed=!1,be.set(this,void 0),ye.set(this,void 0),De.set(this,{commands:[],fullCommands:[]}),we.set(this,null),ve.set(this,null),Ee.set(this,"show-hidden"),Fe.set(this,null),Ce.set(this,!0),Se.set(this,{}),xe.set(this,!0),Oe.set(this,[]),_e.set(this,void 0),Ae.set(this,{}),Te.set(this,!1),Me.set(this,null),ke.set(this,!0),Ie.set(this,void 0),je.set(this,""),Be.set(this,void 0),Pe.set(this,void 0),Re.set(this,{}),$e.set(this,null),Ne.set(this,null),Le.set(this,{}),Ue.set(this,{}),We.set(this,void 0),He.set(this,!1),Ge.set(this,void 0),ze.set(this,!1),Ve.set(this,!1),qe.set(this,!1),Ye.set(this,void 0),Ke.set(this,{}),Je.set(this,null),Ze.set(this,void 0),Qe(this,Ge,n,"f"),Qe(this,We,e,"f"),Qe(this,ye,t,"f"),Qe(this,Pe,r,"f"),Qe(this,_e,new Z(this),"f"),this.$0=this[st](),this[Mt](),Qe(this,be,Xe(this,be,"f"),"f"),Qe(this,Ye,Xe(this,Ye,"f"),"f"),Qe(this,Ze,Xe(this,Ze,"f"),"f"),Qe(this,Be,Xe(this,Be,"f"),"f"),Xe(this,Be,"f").showHiddenOpt=Xe(this,Ee,"f"),Qe(this,Ie,this[tt](),"f")}addHelpOpt(e,t){return Y("[string|boolean] [string]",[e,t],arguments.length),Xe(this,Me,"f")&&(this[rt](Xe(this,Me,"f")),Qe(this,Me,null,"f")),!1===e&&void 0===t||(Qe(this,Me,"string"==typeof e?e:"help","f"),this.boolean(Xe(this,Me,"f")),this.describe(Xe(this,Me,"f"),t||Xe(this,Ye,"f").deferY18nLookup("Show help"))),this}help(e,t){return this.addHelpOpt(e,t)}addShowHiddenOpt(e,t){if(Y("[string|boolean] [string]",[e,t],arguments.length),!1===e&&void 0===t)return this;const r="string"==typeof e?e:Xe(this,Ee,"f");return this.boolean(r),this.describe(r,t||Xe(this,Ye,"f").deferY18nLookup("Show hidden options")),Xe(this,Be,"f").showHiddenOpt=r,this}showHidden(e,t){return this.addShowHiddenOpt(e,t)}alias(e,t){return Y("<object|string|array> [string|array]",[e,t],arguments.length),this[ft](this.alias.bind(this),"alias",e,t),this}array(e){return Y("<array|string>",[e],arguments.length),this[dt]("array",e),this[Bt](e),this}boolean(e){return Y("<array|string>",[e],arguments.length),this[dt]("boolean",e),this[Bt](e),this}check(e,t){return Y("<function> [boolean]",[e,t],arguments.length),this.middleware(((t,r)=>X((()=>e(t,r.getOptions())),(r=>(r?("string"==typeof r||r instanceof Error)&&Xe(this,Ye,"f").fail(r.toString(),r):Xe(this,Ye,"f").fail(Xe(this,Ge,"f").y18n.__("Argument check failed: %s",e.toString())),t)),(e=>(Xe(this,Ye,"f").fail(e.message?e.message:e.toString(),e),t)))),!1,t),this}choices(e,t){return Y("<object|string|array> [string|array]",[e,t],arguments.length),this[ft](this.choices.bind(this),"choices",e,t),this}coerce(e,t){if(Y("<object|string|array> [function]",[e,t],arguments.length),Array.isArray(e)){if(!t)throw new I("coerce callback must be provided");for(const r of e)this.coerce(r,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 I("coerce callback must be provided");return Xe(this,Be,"f").key[e]=!0,Xe(this,_e,"f").addCoerceMiddleware(((r,n)=>{let i;return Object.prototype.hasOwnProperty.call(r,e)?X((()=>(i=n.getAliases(),t(r[e]))),(t=>{r[e]=t;const s=n.getInternalMethods().getParserConfiguration()["strip-aliased"];if(i[e]&&!0!==s)for(const n of i[e])r[n]=t;return r}),(e=>{throw new I(e.message)})):r}),e),this}conflicts(e,t){return Y("<string|object> [string|array]",[e,t],arguments.length),Xe(this,Ze,"f").conflicts(e,t),this}config(e="config",t,r){return Y("[object|string] [string|function] [function]",[e,t,r],arguments.length),"object"!=typeof e||Array.isArray(e)?("function"==typeof t&&(r=t,t=void 0),this.describe(e,t||Xe(this,Ye,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach((e=>{Xe(this,Be,"f").config[e]=r||!0})),this):(e=me(e,Xe(this,ye,"f"),this[ot]()["deep-merge-config"]||!1,Xe(this,Ge,"f")),Xe(this,Be,"f").configObjects=(Xe(this,Be,"f").configObjects||[]).concat(e),this)}completion(e,t,r){return Y("[string] [string|boolean|function] [function]",[e,t,r],arguments.length),"function"==typeof t&&(r=t,t=void 0),Qe(this,ve,e||Xe(this,ve,"f")||"completion","f"),t||!1===t||(t="generate completion script"),this.command(Xe(this,ve,"f"),t),r&&Xe(this,we,"f").registerFunction(r),this}command(e,t,r,n,i,s){return Y("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,t,r,n,i,s],arguments.length),Xe(this,be,"f").addHandler(e,t,r,n,i,s),this}commands(e,t,r,n,i,s){return this.command(e,t,r,n,i,s)}commandDir(e,t){Y("<string> [object]",[e,t],arguments.length);const r=Xe(this,Pe,"f")||Xe(this,Ge,"f").require;return Xe(this,be,"f").addDirectory(e,r,Xe(this,Ge,"f").getCallerFile(),t),this}count(e){return Y("<array|string>",[e],arguments.length),this[dt]("count",e),this[Bt](e),this}default(e,t,r){return Y("<object|string|array> [*] [string]",[e,t,r],arguments.length),r&&(H(e,Xe(this,Ge,"f")),Xe(this,Be,"f").defaultDescription[e]=r),"function"==typeof t&&(H(e,Xe(this,Ge,"f")),Xe(this,Be,"f").defaultDescription[e]||(Xe(this,Be,"f").defaultDescription[e]=Xe(this,Ye,"f").functionDescription(t)),t=t.call()),this[pt](this.default.bind(this),"default",e,t),this}defaults(e,t,r){return this.default(e,t,r)}demandCommand(e=1,t,r,n){return Y("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,t,r,n],arguments.length),"number"!=typeof t&&(r=t,t=1/0),this.global("_",!1),Xe(this,Be,"f").demandedCommands._={min:e,max:t,minMsg:r,maxMsg:n},this}demand(e,t,r){return Array.isArray(t)?(t.forEach((e=>{W(r,!0,Xe(this,Ge,"f")),this.demandOption(e,r)})),t=1/0):"number"!=typeof t&&(r=t,t=1/0),"number"==typeof e?(W(r,!0,Xe(this,Ge,"f")),this.demandCommand(e,t,r,r)):Array.isArray(e)?e.forEach((e=>{W(r,!0,Xe(this,Ge,"f")),this.demandOption(e,r)})):"string"==typeof r?this.demandOption(e,r):!0!==r&&void 0!==r||this.demandOption(e),this}demandOption(e,t){return Y("<object|string|array> [string]",[e,t],arguments.length),this[pt](this.demandOption.bind(this),"demandedOptions",e,t),this}deprecateOption(e,t){return Y("<string> [string|boolean]",[e,t],arguments.length),Xe(this,Be,"f").deprecatedOptions[e]=t,this}describe(e,t){return Y("<object|string|array> [string]",[e,t],arguments.length),this[bt](e,!0),Xe(this,Ye,"f").describe(e,t),this}detectLocale(e){return Y("<boolean>",[e],arguments.length),Qe(this,Ce,e,"f"),this}env(e){return Y("[string|boolean]",[e],arguments.length),!1===e?delete Xe(this,Be,"f").envPrefix:Xe(this,Be,"f").envPrefix=e||"",this}epilogue(e){return Y("<string>",[e],arguments.length),Xe(this,Ye,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,t){return Y("<string|array> [string]",[e,t],arguments.length),Array.isArray(e)?e.forEach((e=>this.example(...e))):Xe(this,Ye,"f").example(e,t),this}exit(e,t){Qe(this,Te,!0,"f"),Qe(this,Fe,t,"f"),Xe(this,xe,"f")&&Xe(this,Ge,"f").process.exit(e)}exitProcess(e=!0){return Y("[boolean]",[e],arguments.length),Qe(this,xe,e,"f"),this}fail(e){if(Y("<function|boolean>",[e],arguments.length),"boolean"==typeof e&&!1!==e)throw new I("Invalid first argument. Expected function or boolean 'false'");return Xe(this,Ye,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,t){return Y("<array> [function]",[e,t],arguments.length),t?Xe(this,we,"f").getCompletion(e,t):new Promise(((t,r)=>{Xe(this,we,"f").getCompletion(e,((e,n)=>{e?r(e):t(n)}))}))}getDemandedOptions(){return Y([],0),Xe(this,Be,"f").demandedOptions}getDemandedCommands(){return Y([],0),Xe(this,Be,"f").demandedCommands}getDeprecatedOptions(){return Y([],0),Xe(this,Be,"f").deprecatedOptions}getDetectLocale(){return Xe(this,Ce,"f")}getExitProcess(){return Xe(this,xe,"f")}getGroups(){return Object.assign({},Xe(this,Ae,"f"),Xe(this,Ue,"f"))}getHelp(){if(Qe(this,Te,!0,"f"),!Xe(this,Ye,"f").hasCachedHelpMessage()){if(!this.parsed){const e=this[kt](Xe(this,We,"f"),void 0,void 0,0,!0);if(z(e))return e.then((()=>Xe(this,Ye,"f").help()))}const e=Xe(this,be,"f").runDefaultBuilderOn(this);if(z(e))return e.then((()=>Xe(this,Ye,"f").help()))}return Promise.resolve(Xe(this,Ye,"f").help())}getOptions(){return Xe(this,Be,"f")}getStrict(){return Xe(this,ze,"f")}getStrictCommands(){return Xe(this,Ve,"f")}getStrictOptions(){return Xe(this,qe,"f")}global(e,t){return Y("<string|array> [boolean]",[e,t],arguments.length),e=[].concat(e),!1!==t?Xe(this,Be,"f").local=Xe(this,Be,"f").local.filter((t=>-1===e.indexOf(t))):e.forEach((e=>{Xe(this,Be,"f").local.includes(e)||Xe(this,Be,"f").local.push(e)})),this}group(e,t){Y("<string|array> <string>",[e,t],arguments.length);const r=Xe(this,Ue,"f")[t]||Xe(this,Ae,"f")[t];Xe(this,Ue,"f")[t]&&delete Xe(this,Ue,"f")[t];const n={};return Xe(this,Ae,"f")[t]=(r||[]).concat(e).filter((e=>!n[e]&&(n[e]=!0))),this}hide(e){return Y("<string>",[e],arguments.length),Xe(this,Be,"f").hiddenOptions.push(e),this}implies(e,t){return Y("<string|object> [number|string|array]",[e,t],arguments.length),Xe(this,Ze,"f").implies(e,t),this}locale(e){return Y("[string]",[e],arguments.length),void 0===e?(this[ut](),Xe(this,Ge,"f").y18n.getLocale()):(Qe(this,Ce,!1,"f"),Xe(this,Ge,"f").y18n.setLocale(e),this)}middleware(e,t,r){return Xe(this,_e,"f").addMiddleware(e,!!t,r)}nargs(e,t){return Y("<string|object|array> [number]",[e,t],arguments.length),this[pt](this.nargs.bind(this),"narg",e,t),this}normalize(e){return Y("<array|string>",[e],arguments.length),this[dt]("normalize",e),this}number(e){return Y("<array|string>",[e],arguments.length),this[dt]("number",e),this[Bt](e),this}option(e,t){if(Y("<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[Bt](e),!Xe(this,Je,"f")||"version"!==e&&"version"!==(null==t?void 0:t.alias)||this[nt](['"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"),Xe(this,Be,"f").key[e]=!0,t.alias&&this.alias(e,t.alias);const r=t.deprecate||t.deprecated;r&&this.deprecateOption(e,r);const n=t.demand||t.required||t.require;n&&this.demand(e,n),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&&(Xe(this,Be,"f").defaultDescription[e]=t.defaultDescription),t.skipValidation&&this.skipValidation(e);const i=t.describe||t.description||t.desc,s=Xe(this,Ye,"f").getDescriptions();Object.prototype.hasOwnProperty.call(s,e)&&"string"!=typeof i||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,r){Y("[string|array] [function|boolean|object] [function]",[e,t,r],arguments.length),this[it](),void 0===e&&(e=Xe(this,We,"f")),"object"==typeof t&&(Qe(this,Ne,t,"f"),t=r),"function"==typeof t&&(Qe(this,$e,t,"f"),t=!1),t||Qe(this,We,e,"f"),Xe(this,$e,"f")&&Qe(this,xe,!1,"f");const n=this[kt](e,!!t),i=this.parsed;return Xe(this,we,"f").setParsed(this.parsed),z(n)?n.then((e=>(Xe(this,$e,"f")&&Xe(this,$e,"f").call(this,Xe(this,Fe,"f"),e,Xe(this,je,"f")),e))).catch((e=>{throw Xe(this,$e,"f")&&Xe(this,$e,"f")(e,this.parsed.argv,Xe(this,je,"f")),e})).finally((()=>{this[yt](),this.parsed=i})):(Xe(this,$e,"f")&&Xe(this,$e,"f").call(this,Xe(this,Fe,"f"),n,Xe(this,je,"f")),this[yt](),this.parsed=i,n)}parseAsync(e,t,r){const n=this.parse(e,t,r);return z(n)?n:Promise.resolve(n)}parseSync(e,t,r){const n=this.parse(e,t,r);if(z(n))throw new I(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return n}parserConfiguration(e){return Y("<object>",[e],arguments.length),Qe(this,Re,e,"f"),this}pkgConf(e,t){Y("<string> [string]",[e,t],arguments.length);let r=null;const n=this[ht](t||Xe(this,ye,"f"));return n[e]&&"object"==typeof n[e]&&(r=me(n[e],t||Xe(this,ye,"f"),this[ot]()["deep-merge-config"]||!1,Xe(this,Ge,"f")),Xe(this,Be,"f").configObjects=(Xe(this,Be,"f").configObjects||[]).concat(r)),this}positional(e,t){Y("<string> <object>",[e,t],arguments.length);const r=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];t=ie(t,((e,t)=>!("type"===e&&!["string","number","boolean"].includes(t))&&r.includes(e)));const n=Xe(this,De,"f").fullCommands[Xe(this,De,"f").fullCommands.length-1],i=n?Xe(this,be,"f").cmdToParseOptions(n):{array:[],alias:{},default:{},demand:{}};return G(i).forEach((r=>{const n=i[r];Array.isArray(n)?-1!==n.indexOf(e)&&(t[r]=!0):n[e]&&!(r in t)&&(t[r]=n[e])})),this.group(e,Xe(this,Ye,"f").getPositionalGroupName()),this.option(e,t)}recommendCommands(e=!0){return Y("[boolean]",[e],arguments.length),Qe(this,He,e,"f"),this}required(e,t,r){return this.demand(e,t,r)}require(e,t,r){return this.demand(e,t,r)}requiresArg(e){return Y("<array|string|object> [number]",[e],arguments.length),"string"==typeof e&&Xe(this,Be,"f").narg[e]||this[pt](this.requiresArg.bind(this),"narg",e,NaN),this}showCompletionScript(e,t){return Y("[string] [string]",[e,t],arguments.length),e=e||this.$0,Xe(this,Ie,"f").log(Xe(this,we,"f").generateCompletionScript(e,t||Xe(this,ve,"f")||"completion")),this}showHelp(e){if(Y("[string|function]",[e],arguments.length),Qe(this,Te,!0,"f"),!Xe(this,Ye,"f").hasCachedHelpMessage()){if(!this.parsed){const t=this[kt](Xe(this,We,"f"),void 0,void 0,0,!0);if(z(t))return t.then((()=>{Xe(this,Ye,"f").showHelp(e)})),this}const t=Xe(this,be,"f").runDefaultBuilderOn(this);if(z(t))return t.then((()=>{Xe(this,Ye,"f").showHelp(e)})),this}return Xe(this,Ye,"f").showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,t){return Y("[boolean|string] [string]",[e,t],arguments.length),Xe(this,Ye,"f").showHelpOnFail(e,t),this}showVersion(e){return Y("[string|function]",[e],arguments.length),Xe(this,Ye,"f").showVersion(e),this}skipValidation(e){return Y("<array|string>",[e],arguments.length),this[dt]("skipValidation",e),this}strict(e){return Y("[boolean]",[e],arguments.length),Qe(this,ze,!1!==e,"f"),this}strictCommands(e){return Y("[boolean]",[e],arguments.length),Qe(this,Ve,!1!==e,"f"),this}strictOptions(e){return Y("[boolean]",[e],arguments.length),Qe(this,qe,!1!==e,"f"),this}string(e){return Y("<array|string>",[e],arguments.length),this[dt]("string",e),this[Bt](e),this}terminalWidth(){return Y([],0),Xe(this,Ge,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return Y("<object>",[e],arguments.length),Qe(this,Ce,!1,"f"),Xe(this,Ge,"f").y18n.updateLocale(e),this}usage(e,t,r,n){if(Y("<string|null|undefined> [string|boolean] [function|object] [function]",[e,t,r,n],arguments.length),void 0!==t){if(W(e,null,Xe(this,Ge,"f")),(e||"").match(/^\$0( |$)/))return this.command(e,t,r,n);throw new I(".usage() description must start with $0 if being used as alias for .command()")}return Xe(this,Ye,"f").usage(e),this}usageConfiguration(e){return Y("<object>",[e],arguments.length),Qe(this,Ke,e,"f"),this}version(e,t,r){const n="version";if(Y("[boolean|string] [string] [string]",[e,t,r],arguments.length),Xe(this,Je,"f")&&(this[rt](Xe(this,Je,"f")),Xe(this,Ye,"f").version(void 0),Qe(this,Je,null,"f")),0===arguments.length)r=this[lt](),e=n;else if(1===arguments.length){if(!1===e)return this;r=e,e=n}else 2===arguments.length&&(r=t,t=void 0);return Qe(this,Je,"string"==typeof e?e:n,"f"),t=t||Xe(this,Ye,"f").deferY18nLookup("Show version number"),Xe(this,Ye,"f").version(r||void 0),this.boolean(Xe(this,Je,"f")),this.describe(Xe(this,Je,"f"),t),this}wrap(e){return Y("<number|null|undefined>",[e],arguments.length),Xe(this,Ye,"f").wrap(e),this}[(be=new WeakMap,ye=new WeakMap,De=new WeakMap,we=new WeakMap,ve=new WeakMap,Ee=new WeakMap,Fe=new WeakMap,Ce=new WeakMap,Se=new WeakMap,xe=new WeakMap,Oe=new WeakMap,_e=new WeakMap,Ae=new WeakMap,Te=new WeakMap,Me=new WeakMap,ke=new WeakMap,Ie=new WeakMap,je=new WeakMap,Be=new WeakMap,Pe=new WeakMap,Re=new WeakMap,$e=new WeakMap,Ne=new WeakMap,Le=new WeakMap,Ue=new WeakMap,We=new WeakMap,He=new WeakMap,Ge=new WeakMap,ze=new WeakMap,Ve=new WeakMap,qe=new WeakMap,Ye=new WeakMap,Ke=new WeakMap,Je=new WeakMap,Ze=new WeakMap,et)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch(e){}return e}[tt](){return{log:(...e)=>{this[Ot]()||console.log(...e),Qe(this,Te,!0,"f"),Xe(this,je,"f").length&&Qe(this,je,Xe(this,je,"f")+"\n","f"),Qe(this,je,Xe(this,je,"f")+e.join(" "),"f")},error:(...e)=>{this[Ot]()||console.error(...e),Qe(this,Te,!0,"f"),Xe(this,je,"f").length&&Qe(this,je,Xe(this,je,"f")+"\n","f"),Qe(this,je,Xe(this,je,"f")+e.join(" "),"f")}}}[rt](e){G(Xe(this,Be,"f")).forEach((t=>{if("configObjects"===t)return;const r=Xe(this,Be,"f")[t];Array.isArray(r)?r.includes(e)&&r.splice(r.indexOf(e),1):"object"==typeof r&&delete r[e]})),delete Xe(this,Ye,"f").getDescriptions()[e]}[nt](e,t,r){Xe(this,Se,"f")[r]||(Xe(this,Ge,"f").process.emitWarning(e,t),Xe(this,Se,"f")[r]=!0)}[it](){Xe(this,Oe,"f").push({options:Xe(this,Be,"f"),configObjects:Xe(this,Be,"f").configObjects.slice(0),exitProcess:Xe(this,xe,"f"),groups:Xe(this,Ae,"f"),strict:Xe(this,ze,"f"),strictCommands:Xe(this,Ve,"f"),strictOptions:Xe(this,qe,"f"),completionCommand:Xe(this,ve,"f"),output:Xe(this,je,"f"),exitError:Xe(this,Fe,"f"),hasOutput:Xe(this,Te,"f"),parsed:this.parsed,parseFn:Xe(this,$e,"f"),parseContext:Xe(this,Ne,"f")}),Xe(this,Ye,"f").freeze(),Xe(this,Ze,"f").freeze(),Xe(this,be,"f").freeze(),Xe(this,_e,"f").freeze()}[st](){let e,t="";return e=/\b(node|iojs|electron)(\.exe)?$/.test(Xe(this,Ge,"f").process.argv()[0])?Xe(this,Ge,"f").process.argv().slice(1,2):Xe(this,Ge,"f").process.argv().slice(0,1),t=e.map((e=>{const t=this[Tt](Xe(this,ye,"f"),e);return e.match(/^(\/|([a-zA-Z]:)?\\)/)&&t.length<e.length?t:e})).join(" ").trim(),Xe(this,Ge,"f").getEnv("_")&&Xe(this,Ge,"f").getProcessArgvBin()===Xe(this,Ge,"f").getEnv("_")&&(t=Xe(this,Ge,"f").getEnv("_").replace(`${Xe(this,Ge,"f").path.dirname(Xe(this,Ge,"f").process.execPath())}/`,"")),t}[ot](){return Xe(this,Re,"f")}[at](){return Xe(this,Ke,"f")}[ut](){if(!Xe(this,Ce,"f"))return;const e=Xe(this,Ge,"f").getEnv("LC_ALL")||Xe(this,Ge,"f").getEnv("LC_MESSAGES")||Xe(this,Ge,"f").getEnv("LANG")||Xe(this,Ge,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[lt](){return this[ht]().version||"unknown"}[ct](e){const t=e["--"]?e["--"]:e._;for(let e,r=0;void 0!==(e=t[r]);r++)Xe(this,Ge,"f").Parser.looksLikeNumber(e)&&Number.isSafeInteger(Math.floor(parseFloat(`${e}`)))&&(t[r]=Number(e));return e}[ht](e){const t=e||"*";if(Xe(this,Le,"f")[t])return Xe(this,Le,"f")[t];let r={};try{let t=e||Xe(this,Ge,"f").mainFilename;!e&&Xe(this,Ge,"f").path.extname(t)&&(t=Xe(this,Ge,"f").path.dirname(t));const n=Xe(this,Ge,"f").findUp(t,((e,t)=>t.includes("package.json")?"package.json":void 0));W(n,void 0,Xe(this,Ge,"f")),r=JSON.parse(Xe(this,Ge,"f").readFileSync(n,"utf8"))}catch(e){}return Xe(this,Le,"f")[t]=r||{},Xe(this,Le,"f")[t]}[dt](e,t){(t=[].concat(t)).forEach((t=>{t=this[gt](t),Xe(this,Be,"f")[e].push(t)}))}[pt](e,t,r,n){this[mt](e,t,r,n,((e,t,r)=>{Xe(this,Be,"f")[e][t]=r}))}[ft](e,t,r,n){this[mt](e,t,r,n,((e,t,r)=>{Xe(this,Be,"f")[e][t]=(Xe(this,Be,"f")[e][t]||[]).concat(r)}))}[mt](e,t,r,n,i){if(Array.isArray(r))r.forEach((t=>{e(t,n)}));else if((e=>"object"==typeof e)(r))for(const t of G(r))e(t,r[t]);else i(t,this[gt](r),n)}[gt](e){return"__proto__"===e?"___proto___":e}[bt](e,t){return this[pt](this[bt].bind(this),"key",e,t),this}[yt](){var e,t,r,n,i,s,o,a,u,l,c,h;const d=Xe(this,Oe,"f").pop();let p;W(d,void 0,Xe(this,Ge,"f")),e=this,t=this,r=this,n=this,i=this,s=this,o=this,a=this,u=this,l=this,c=this,h=this,({options:{set value(t){Qe(e,Be,t,"f")}}.value,configObjects:p,exitProcess:{set value(e){Qe(t,xe,e,"f")}}.value,groups:{set value(e){Qe(r,Ae,e,"f")}}.value,output:{set value(e){Qe(n,je,e,"f")}}.value,exitError:{set value(e){Qe(i,Fe,e,"f")}}.value,hasOutput:{set value(e){Qe(s,Te,e,"f")}}.value,parsed:this.parsed,strict:{set value(e){Qe(o,ze,e,"f")}}.value,strictCommands:{set value(e){Qe(a,Ve,e,"f")}}.value,strictOptions:{set value(e){Qe(u,qe,e,"f")}}.value,completionCommand:{set value(e){Qe(l,ve,e,"f")}}.value,parseFn:{set value(e){Qe(c,$e,e,"f")}}.value,parseContext:{set value(e){Qe(h,Ne,e,"f")}}.value}=d),Xe(this,Be,"f").configObjects=p,Xe(this,Ye,"f").unfreeze(),Xe(this,Ze,"f").unfreeze(),Xe(this,be,"f").unfreeze(),Xe(this,_e,"f").unfreeze()}[Dt](e,t){return X(t,(t=>(e(t),t)))}getInternalMethods(){return{getCommandInstance:this[wt].bind(this),getContext:this[vt].bind(this),getHasOutput:this[Et].bind(this),getLoggerInstance:this[Ft].bind(this),getParseContext:this[Ct].bind(this),getParserConfiguration:this[ot].bind(this),getUsageConfiguration:this[at].bind(this),getUsageInstance:this[St].bind(this),getValidationInstance:this[xt].bind(this),hasParseCallback:this[Ot].bind(this),isGlobalContext:this[_t].bind(this),postProcess:this[At].bind(this),reset:this[Mt].bind(this),runValidation:this[It].bind(this),runYargsParserAndExecuteCommands:this[kt].bind(this),setHasOutput:this[jt].bind(this)}}[wt](){return Xe(this,be,"f")}[vt](){return Xe(this,De,"f")}[Et](){return Xe(this,Te,"f")}[Ft](){return Xe(this,Ie,"f")}[Ct](){return Xe(this,Ne,"f")||{}}[St](){return Xe(this,Ye,"f")}[xt](){return Xe(this,Ze,"f")}[Ot](){return!!Xe(this,$e,"f")}[_t](){return Xe(this,ke,"f")}[At](e,t,r,n){return r||z(e)||(t||(e=this[et](e)),(this[ot]()["parse-positional-numbers"]||void 0===this[ot]()["parse-positional-numbers"])&&(e=this[ct](e)),n&&(e=Q(e,this,Xe(this,_e,"f").getMiddleware(),!1))),e}[Mt](e={}){Qe(this,Be,Xe(this,Be,"f")||{},"f");const t={};t.local=Xe(this,Be,"f").local||[],t.configObjects=Xe(this,Be,"f").configObjects||[];const r={};var n,i,s,o;return t.local.forEach((t=>{r[t]=!0,(e[t]||[]).forEach((e=>{r[e]=!0}))})),Object.assign(Xe(this,Ue,"f"),Object.keys(Xe(this,Ae,"f")).reduce(((e,t)=>{const n=Xe(this,Ae,"f")[t].filter((e=>!(e in r)));return n.length>0&&(e[t]=n),e}),{})),Qe(this,Ae,{},"f"),["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"].forEach((e=>{t[e]=(Xe(this,Be,"f")[e]||[]).filter((e=>!r[e]))})),["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"].forEach((e=>{t[e]=ie(Xe(this,Be,"f")[e],(e=>!r[e]))})),t.envPrefix=Xe(this,Be,"f").envPrefix,Qe(this,Be,t,"f"),Qe(this,Ye,Xe(this,Ye,"f")?Xe(this,Ye,"f").reset(r):function(e,t){const r=t.y18n.__,n={},i=[];n.failFn=function(e){i.push(e)};let s=null,o=null,a=!0;n.showHelpOnFail=function(t=!0,r){const[i,u]="string"==typeof t?[!0,t]:[t,r];return e.getInternalMethods().isGlobalContext()&&(o=u),s=u,a=i,n};let u=!1;n.fail=function(t,r){const l=e.getInternalMethods().getLoggerInstance();if(!i.length){if(e.getExitProcess()&&se(!0),!u){u=!0,a&&(e.showHelp("error"),l.error()),(t||r)&&l.error(t||r);const n=s||o;n&&((t||r)&&l.error(""),l.error(n))}if(r=r||new I(t),e.getExitProcess())return e.exit(1);if(e.getInternalMethods().hasParseCallback())return e.exit(1,r);throw r}for(let e=i.length-1;e>=0;--e){const s=i[e];if(oe(s)){if(r)throw r;if(t)throw Error(t)}else s(t,r,n)}};let l=[],c=!1;n.usage=(e,t)=>null===e?(c=!0,l=[],n):(c=!1,l.push([e,t||""]),n),n.getUsage=()=>l,n.getUsageDisabled=()=>c,n.getPositionalGroupName=()=>r("Positionals:");let h=[];n.example=(e,t)=>{h.push([e,t||""])};let d=[];n.command=function(e,t,r,n,i=!1){r&&(d=d.map((e=>(e[2]=!1,e)))),d.push([e,t||"",r,n,i])},n.getCommands=()=>d;let p={};n.describe=function(e,t){Array.isArray(e)?e.forEach((e=>{n.describe(e,t)})):"object"==typeof e?Object.keys(e).forEach((t=>{n.describe(t,e[t])})):p[e]=t},n.getDescriptions=()=>p;let f=[];n.epilog=e=>{f.push(e)};let m,g=!1;n.wrap=e=>{g=!0,m=e},n.getWrap=()=>t.getEnv("YARGS_DISABLE_WRAP")?null:(g||(m=t.process.stdColumns?Math.min(80,t.process.stdColumns):80,g=!0),m);const b="__yargsString__:";function y(e,r,n){let i=0;return Array.isArray(e)||(e=Object.values(e).map((e=>[e]))),e.forEach((e=>{i=Math.max(t.stringWidth(n?`${n} ${le(e[0])}`:le(e[0]))+ue(e[0]),i)})),r&&(i=Math.min(i,parseInt((.5*r).toString(),10))),i}let D;function w(t){return e.getOptions().hiddenOptions.indexOf(t)<0||e.parsed.argv[e.getOptions().showHiddenOpt]}function v(e,t){let n=`[${r("default:")} `;if(void 0===e&&!t)return null;if(t)n+=t;else switch(typeof e){case"string":n+=`"${e}"`;break;case"object":n+=JSON.stringify(e);break;default:n+=e}return`${n}]`}n.deferY18nLookup=e=>b+e,n.help=function(){if(D)return D;!function(){const t=e.getDemandedOptions(),r=e.getOptions();(Object.keys(r.alias)||[]).forEach((i=>{r.alias[i].forEach((s=>{p[s]&&n.describe(i,p[s]),s in t&&e.demandOption(i,t[s]),r.boolean.includes(s)&&e.boolean(i),r.count.includes(s)&&e.count(i),r.string.includes(s)&&e.string(i),r.normalize.includes(s)&&e.normalize(i),r.array.includes(s)&&e.array(i),r.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(),u=e.getGroups(),m=e.getOptions();let g=[];g=g.concat(Object.keys(p)),g=g.concat(Object.keys(s)),g=g.concat(Object.keys(o)),g=g.concat(Object.keys(m.default)),g=g.filter(w),g=Object.keys(g.reduce(((e,t)=>("_"!==t&&(e[t]=!0),e)),{}));const E=n.getWrap(),F=t.cliui({width:E,wrap:!!E});if(!c)if(l.length)l.forEach((e=>{F.div({text:`${e[0].replace(/\$0/g,i)}`}),e[1]&&F.div({text:`${e[1]}`,padding:[1,0,0,0]})})),F.div();else if(d.length){let e=null;e=o._?`${i} <${r("command")}>\n`:`${i} [${r("command")}]\n`,F.div(`${e}`)}if(d.length>1||1===d.length&&!d[0][2]){F.div(r("Commands:"));const t=e.getInternalMethods().getContext(),n=t.commands.length?`${t.commands.join(" ")} `:"";!0===e.getInternalMethods().getParserConfiguration()["sort-commands"]&&(d=d.sort(((e,t)=>e[0].localeCompare(t[0]))));const s=i?`${i} `:"";d.forEach((e=>{const t=`${s}${n}${e[0].replace(/^\$0 ?/,"")}`;F.span({text:t,padding:[0,2,0,2],width:y(d,E,`${i}${n}`)+4},{text:e[1]});const o=[];e[2]&&o.push(`[${r("default")}]`),e[3]&&e[3].length&&o.push(`[${r("aliases:")} ${e[3].join(", ")}]`),e[4]&&("string"==typeof e[4]?o.push(`[${r("deprecated: %s",e[4])}]`):o.push(`[${r("deprecated")}]`)),o.length?F.div({text:o.join(" "),padding:[0,0,0,2],align:"right"}):F.div()})),F.div()}const C=(Object.keys(m.alias)||[]).concat(Object.keys(e.parsed.newAliases)||[]);g=g.filter((t=>!e.parsed.newAliases[t]&&C.every((e=>-1===(m.alias[e]||[]).indexOf(t)))));const S=r("Options:");u[S]||(u[S]=[]),function(e,t,r,n){let i=[],s=null;Object.keys(r).forEach((e=>{i=i.concat(r[e])})),e.forEach((e=>{s=[e].concat(t[e]),s.some((e=>-1!==i.indexOf(e)))||r[n].push(e)}))}(g,m.alias,u,S);const x=e=>/^--/.test(le(e)),O=Object.keys(u).filter((e=>u[e].length>0)).map((e=>({groupName:e,normalizedKeys:u[e].filter(w).map((e=>{if(C.includes(e))return e;for(let t,r=0;void 0!==(t=C[r]);r++)if((m.alias[t]||[]).includes(e))return t;return e}))}))).filter((({normalizedKeys:e})=>e.length>0)).map((({groupName:e,normalizedKeys:t})=>{const r=t.reduce(((t,r)=>(t[r]=[r].concat(m.alias[r]||[]).map((t=>e===n.getPositionalGroupName()?t:(/^[0-9]$/.test(t)?m.boolean.includes(r)?"-":"--":t.length>1?"--":"-")+t)).sort(((e,t)=>x(e)===x(t)?0:x(e)?1:-1)).join(", "),t)),{});return{groupName:e,normalizedKeys:t,switches:r}}));if(O.filter((({groupName:e})=>e!==n.getPositionalGroupName())).some((({normalizedKeys:e,switches:t})=>!e.every((e=>x(t[e])))))&&O.filter((({groupName:e})=>e!==n.getPositionalGroupName())).forEach((({normalizedKeys:e,switches:t})=>{e.forEach((e=>{var r;x(t[e])&&(t[e]=ae(r=t[e])?{text:r.text,indentation:r.indentation+4}:{text:r,indentation:4})}))})),O.forEach((({groupName:t,normalizedKeys:i,switches:o})=>{F.div(t),i.forEach((t=>{const i=o[t];let u=p[t]||"",l=null;u.includes(b)&&(u=r(u.substring(16))),m.boolean.includes(t)&&(l=`[${r("boolean")}]`),m.count.includes(t)&&(l=`[${r("count")}]`),m.string.includes(t)&&(l=`[${r("string")}]`),m.normalize.includes(t)&&(l=`[${r("string")}]`),m.array.includes(t)&&(l=`[${r("array")}]`),m.number.includes(t)&&(l=`[${r("number")}]`);const c=[t in a?(h=a[t],"string"==typeof h?`[${r("deprecated: %s",h)}]`:`[${r("deprecated")}]`):null,l,t in s?`[${r("required")}]`:null,m.choices&&m.choices[t]?`[${r("choices:")} ${n.stringifiedValues(m.choices[t])}]`:null,v(m.default[t],m.defaultDescription[t])].filter(Boolean).join(" ");var h;F.span({text:le(i),padding:[0,2,0,2+ue(i)],width:y(o,E)+4},u);const d=!0===e.getInternalMethods().getUsageConfiguration()["hide-types"];c&&!d?F.div({text:c,padding:[0,0,0,2],align:"right"}):F.div()})),F.div()})),h.length&&(F.div(r("Examples:")),h.forEach((e=>{e[0]=e[0].replace(/\$0/g,i)})),h.forEach((e=>{""===e[1]?F.div({text:e[0],padding:[0,2,0,2]}):F.div({text:e[0],padding:[0,2,0,2],width:y(h,E)+4},{text:e[1]})})),F.div()),f.length>0){const e=f.map((e=>e.replace(/\$0/g,i))).join("\n");F.div(`${e}\n`)}return F.toString().replace(/\s*$/,"")},n.cacheHelpMessage=function(){D=this.help()},n.clearCachedHelpMessage=function(){D=void 0},n.hasCachedHelpMessage=function(){return!!D},n.showHelp=t=>{const r=e.getInternalMethods().getLoggerInstance();t||(t="error"),("function"==typeof t?t:r[t])(n.help())},n.functionDescription=e=>["(",e.name?t.Parser.decamelize(e.name,"-"):r("generated-value"),")"].join(""),n.stringifiedValues=function(e,t){let r="";const n=t||", ",i=[].concat(e);return e&&i.length?(i.forEach((e=>{r.length&&(r+=n),r+=JSON.stringify(e)})),r):r};let E=null;n.version=e=>{E=e},n.showVersion=t=>{const r=e.getInternalMethods().getLoggerInstance();t||(t="error"),("function"==typeof t?t:r[t])(E)},n.reset=function(e){return s=null,u=!1,l=[],c=!1,f=[],h=[],d=[],p=ie(p,(t=>!e[t])),n};const F=[];return n.freeze=function(){F.push({failMessage:s,failureOutput:u,usages:l,usageDisabled:c,epilogs:f,examples:h,commands:d,descriptions:p})},n.unfreeze=function(e=!1){const t=F.pop();t&&(e?(p={...t.descriptions,...p},d=[...t.commands,...d],l=[...t.usages,...l],h=[...t.examples,...h],f=[...t.epilogs,...f]):({failMessage:s,failureOutput:u,usages:l,usageDisabled:c,epilogs:f,examples:h,commands:d,descriptions:p}=t))},n}(this,Xe(this,Ge,"f")),"f"),Qe(this,Ze,Xe(this,Ze,"f")?Xe(this,Ze,"f").reset(r):function(e,t,r){const n=r.y18n.__,i=r.y18n.__n,s={nonOptionCount:function(r){const n=e.getDemandedCommands(),s=r._.length+(r["--"]?r["--"].length:0)-e.getInternalMethods().getContext().commands.length;n._&&(s<n._.min||s>n._.max)&&(s<n._.min?void 0!==n._.minMsg?t.fail(n._.minMsg?n._.minMsg.replace(/\$0/g,s.toString()).replace(/\$1/,n._.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(),n._.min.toString())):s>n._.max&&(void 0!==n._.maxMsg?t.fail(n._.maxMsg?n._.maxMsg.replace(/\$0/g,s.toString()).replace(/\$1/,n._.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(),n._.max.toString()))))},positionalCount:function(e,r){r<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",r,r+"",e+""))},requiredArguments:function(e,r){let n=null;for(const t of Object.keys(r))Object.prototype.hasOwnProperty.call(e,t)&&void 0!==e[t]||(n=n||{},n[t]=r[t]);if(n){const e=[];for(const t of Object.keys(n)){const r=n[t];r&&e.indexOf(r)<0&&e.push(r)}const r=e.length?`\n${e.join("\n")}`:"";t.fail(i("Missing required argument: %s","Missing required arguments: %s",Object.keys(n).length,Object.keys(n).join(", ")+r))}},unknownArguments:function(r,n,o,a,u=!0){var l;const c=e.getInternalMethods().getCommandInstance().getCommands(),h=[],d=e.getInternalMethods().getContext();if(Object.keys(r).forEach((t=>{de.includes(t)||Object.prototype.hasOwnProperty.call(o,t)||Object.prototype.hasOwnProperty.call(e.getInternalMethods().getParseContext(),t)||s.isValidAndSomeAliasIsNotNew(t,n)||h.push(t)})),u&&(d.commands.length>0||c.length>0||a)&&r._.slice(d.commands.length).forEach((e=>{c.includes(""+e)||h.push(""+e)})),u){const t=(null===(l=e.getDemandedCommands()._)||void 0===l?void 0:l.max)||0,n=d.commands.length+t;n<r._.length&&r._.slice(n).forEach((e=>{e=String(e),d.commands.includes(e)||h.includes(e)||h.push(e)}))}h.length&&t.fail(i("Unknown argument: %s","Unknown arguments: %s",h.length,h.map((e=>e.trim()?e:`"${e}"`)).join(", ")))},unknownCommands:function(r){const n=e.getInternalMethods().getCommandInstance().getCommands(),s=[],o=e.getInternalMethods().getContext();return(o.commands.length>0||n.length>0)&&r._.slice(o.commands.length).forEach((e=>{n.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,r){if(!Object.prototype.hasOwnProperty.call(r,t))return!1;const n=e.parsed.newAliases;return[t,...r[t]].some((e=>!Object.prototype.hasOwnProperty.call(n,e)||!n[t]))},limitedChoices:function(r){const i=e.getOptions(),s={};if(!Object.keys(i.choices).length)return;Object.keys(r).forEach((e=>{-1===de.indexOf(e)&&Object.prototype.hasOwnProperty.call(i.choices,e)&&[].concat(r[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=n("Invalid values:");o.forEach((e=>{a+=`\n ${n("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 r=Number(t);return"number"==typeof(t=isNaN(r)?t:r)?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,n){Y("<string|object> [array|number|string]",[t,n],arguments.length),"object"==typeof t?Object.keys(t).forEach((e=>{s.implies(e,t[e])})):(e.global(t),o[t]||(o[t]=[]),Array.isArray(n)?n.forEach((e=>s.implies(t,e))):(W(n,void 0,r),o[t].push(n)))},s.getImplied=function(){return o},s.implications=function(e){const r=[];if(Object.keys(o).forEach((t=>{const n=t;(o[t]||[]).forEach((t=>{let i=n;const s=t;i=a(e,i),t=a(e,t),i&&!t&&r.push(` ${n} -> ${s}`)}))})),r.length){let e=`${n("Implications failed:")}\n`;r.forEach((t=>{e+=t})),t.fail(e)}};let u={};s.conflicts=function(t,r){Y("<string|object> [array|string]",[t,r],arguments.length),"object"==typeof t?Object.keys(t).forEach((e=>{s.conflicts(e,t[e])})):(e.global(t),u[t]||(u[t]=[]),Array.isArray(r)?r.forEach((e=>s.conflicts(t,e))):u[t].push(r))},s.getConflicting=()=>u,s.conflicting=function(i){Object.keys(i).forEach((e=>{u[e]&&u[e].forEach((r=>{r&&void 0!==i[e]&&void 0!==i[r]&&t.fail(n("Arguments %s and %s are mutually exclusive",e,r))}))})),e.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(u).forEach((e=>{u[e].forEach((s=>{s&&void 0!==i[r.Parser.camelCase(e)]&&void 0!==i[r.Parser.camelCase(s)]&&t.fail(n("Arguments %s and %s are mutually exclusive",e,s))}))}))},s.recommendCommands=function(e,r){r=r.sort(((e,t)=>t.length-e.length));let i=null,s=1/0;for(let t,n=0;void 0!==(t=r[n]);n++){const r=he(e,t);r<=3&&r<s&&(s=r,i=t)}i&&t.fail(n("Did you mean %s?",i))},s.reset=function(e){return o=ie(o,(t=>!e[t])),u=ie(u,(t=>!e[t])),s};const l=[];return s.freeze=function(){l.push({implied:o,conflicting:u})},s.unfreeze=function(){const e=l.pop();W(e,void 0,r),({implied:o,conflicting:u}=e)},s}(this,Xe(this,Ye,"f"),Xe(this,Ge,"f")),"f"),Qe(this,be,Xe(this,be,"f")?Xe(this,be,"f").reset():(n=Xe(this,Ye,"f"),i=Xe(this,Ze,"f"),s=Xe(this,_e,"f"),o=Xe(this,Ge,"f"),new te(n,i,s,o)),"f"),Xe(this,we,"f")||Qe(this,we,function(e,t,r,n){return new ce(e,t,r,n)}(this,Xe(this,Ye,"f"),Xe(this,be,"f"),Xe(this,Ge,"f")),"f"),Xe(this,_e,"f").reset(),Qe(this,ve,null,"f"),Qe(this,je,"","f"),Qe(this,Fe,null,"f"),Qe(this,Te,!1,"f"),this.parsed=!1,this}[Tt](e,t){return Xe(this,Ge,"f").path.relative(e,t)}[kt](e,t,r,n=0,i=!1){let s=!!r||i;e=e||Xe(this,We,"f"),Xe(this,Be,"f").__=Xe(this,Ge,"f").y18n.__,Xe(this,Be,"f").configuration=this[ot]();const o=!!Xe(this,Be,"f").configuration["populate--"],a=Object.assign({},Xe(this,Be,"f").configuration,{"populate--":!0}),u=Xe(this,Ge,"f").Parser.detailed(e,Object.assign({},Xe(this,Be,"f"),{configuration:{"parse-positional-numbers":!1,...a}})),l=Object.assign(u.argv,Xe(this,Ne,"f"));let c;const h=u.aliases;let d=!1,p=!1;Object.keys(l).forEach((e=>{e===Xe(this,Me,"f")&&l[e]?d=!0:e===Xe(this,Je,"f")&&l[e]&&(p=!0)})),l.$0=this.$0,this.parsed=u,0===n&&Xe(this,Ye,"f").clearCachedHelpMessage();try{if(this[ut](),t)return this[At](l,o,!!r,!1);Xe(this,Me,"f")&&[Xe(this,Me,"f")].concat(h[Xe(this,Me,"f")]||[]).filter((e=>e.length>1)).includes(""+l._[l._.length-1])&&(l._.pop(),d=!0),Qe(this,ke,!1,"f");const a=Xe(this,be,"f").getCommands(),f=Xe(this,we,"f").completionKey in l,m=d||f||i;if(l._.length){if(a.length){let e;for(let t,s=n||0;void 0!==l._[s];s++){if(t=String(l._[s]),a.includes(t)&&t!==Xe(this,ve,"f")){const e=Xe(this,be,"f").runCommand(t,this,u,s+1,i,d||p||i);return this[At](e,o,!!r,!1)}if(!e&&t!==Xe(this,ve,"f")){e=t;break}}!Xe(this,be,"f").hasDefaultCommand()&&Xe(this,He,"f")&&e&&!m&&Xe(this,Ze,"f").recommendCommands(e,a)}Xe(this,ve,"f")&&l._.includes(Xe(this,ve,"f"))&&!f&&(Xe(this,xe,"f")&&se(!0),this.showCompletionScript(),this.exit(0))}if(Xe(this,be,"f").hasDefaultCommand()&&!m){const e=Xe(this,be,"f").runCommand(null,this,u,0,i,d||p||i);return this[At](e,o,!!r,!1)}if(f){Xe(this,xe,"f")&&se(!0);const t=(e=[].concat(e)).slice(e.indexOf(`--${Xe(this,we,"f").completionKey}`)+1);return Xe(this,we,"f").getCompletion(t,((e,t)=>{if(e)throw new I(e.message);(t||[]).forEach((e=>{Xe(this,Ie,"f").log(e)})),this.exit(0)})),this[At](l,!o,!!r,!1)}if(Xe(this,Te,"f")||(d?(Xe(this,xe,"f")&&se(!0),s=!0,this.showHelp("log"),this.exit(0)):p&&(Xe(this,xe,"f")&&se(!0),s=!0,Xe(this,Ye,"f").showVersion("log"),this.exit(0))),!s&&Xe(this,Be,"f").skipValidation.length>0&&(s=Object.keys(l).some((e=>Xe(this,Be,"f").skipValidation.indexOf(e)>=0&&!0===l[e]))),!s){if(u.error)throw new I(u.error.message);if(!f){const e=this[It](h,{},u.error);r||(c=Q(l,this,Xe(this,_e,"f").getMiddleware(),!0)),c=this[Dt](e,null!=c?c:l),z(c)&&!r&&(c=c.then((()=>Q(l,this,Xe(this,_e,"f").getMiddleware(),!1))))}}}catch(e){if(!(e instanceof I))throw e;Xe(this,Ye,"f").fail(e.message,e)}return this[At](null!=c?c:l,o,!!r,!0)}[It](e,t,r,n){const i={...this.getDemandedOptions()};return s=>{if(r)throw new I(r.message);Xe(this,Ze,"f").nonOptionCount(s),Xe(this,Ze,"f").requiredArguments(s,i);let o=!1;Xe(this,Ve,"f")&&(o=Xe(this,Ze,"f").unknownCommands(s)),Xe(this,ze,"f")&&!o?Xe(this,Ze,"f").unknownArguments(s,e,t,!!n):Xe(this,qe,"f")&&Xe(this,Ze,"f").unknownArguments(s,e,{},!1,!1),Xe(this,Ze,"f").limitedChoices(s),Xe(this,Ze,"f").implications(s),Xe(this,Ze,"f").conflicting(s)}}[jt](){Qe(this,Te,!0,"f")}[Bt](e){if("string"==typeof e)Xe(this,Be,"f").key[e]=!0;else for(const t of e)Xe(this,Be,"f").key[t]=!0}}var Rt;const $t=(Rt=L,(e=[],t=Rt.process.cwd(),r)=>{const n=new Pt(e,t,r,Rt);return Object.defineProperty(n,"argv",{get:()=>n.parse(),enumerable:!0}),n.help(),n.version(),n});function Nt(e,t){const r=e.startsWith(".")?(0,m.join)(t,e):e;return import(r)}var Lt=n(1732);const Ut=(e=0)=>t=>`\x1b[${t+e}m`,Wt=(e=0)=>t=>`\x1b[${38+e};5;${t}m`,Ht=(e=0)=>(t,r,n)=>`\x1b[${38+e};2;${t};${r};${n}m`,Gt={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(Gt.modifier),Object.keys(Gt.color),Object.keys(Gt.bgColor);const zt=function(){const e=new Map;for(const[t,r]of Object.entries(Gt)){for(const[t,n]of Object.entries(r))Gt[t]={open:`\x1b[${n[0]}m`,close:`\x1b[${n[1]}m`},r[t]=Gt[t],e.set(n[0],n[1]);Object.defineProperty(Gt,t,{value:r,enumerable:!1})}return Object.defineProperty(Gt,"codes",{value:e,enumerable:!1}),Gt.color.close="\x1b[39m",Gt.bgColor.close="\x1b[49m",Gt.color.ansi=Ut(),Gt.color.ansi256=Wt(),Gt.color.ansi16m=Ht(),Gt.bgColor.ansi=Ut(10),Gt.bgColor.ansi256=Wt(10),Gt.bgColor.ansi16m=Ht(10),Object.defineProperties(Gt,{rgbToAnsi256:{value:(e,t,r)=>e===t&&t===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value(e){const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[r]=t;3===r.length&&(r=[...r].map((e=>e+e)).join(""));const n=Number.parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},enumerable:!1},hexToAnsi256:{value:e=>Gt.rgbToAnsi256(...Gt.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return e-8+90;let t,r,n;if(e>=232)t=(10*(e-232)+8)/255,r=t,n=t;else{const i=(e-=16)%36;t=Math.floor(e/36)/5,r=Math.floor(i/6)/5,n=i%6/5}const i=2*Math.max(t,r,n);if(0===i)return 30;let s=30+(Math.round(n)<<2|Math.round(r)<<1|Math.round(t));return 2===i&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(e,t,r)=>Gt.ansi256ToAnsi(Gt.rgbToAnsi256(e,t,r)),enumerable:!1},hexToAnsi:{value:e=>Gt.ansi256ToAnsi(Gt.hexToAnsi256(e)),enumerable:!1}}),Gt}(),Vt=e(import.meta.url)("node:process"),qt=e(import.meta.url)("node:os"),Yt=e(import.meta.url)("node:tty");function Kt(e,t=(globalThis.Deno?globalThis.Deno.args:Vt.argv)){const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return-1!==n&&(-1===i||n<i)}const{env:Jt}=Vt;let Zt;function Qt(e,t={}){return 0!==(r=function(e,{streamIsTTY:t,sniffFlags:r=!0}={}){const n=function(){if("FORCE_COLOR"in Jt)return"true"===Jt.FORCE_COLOR?1:"false"===Jt.FORCE_COLOR?0:0===Jt.FORCE_COLOR.length?1:Math.min(Number.parseInt(Jt.FORCE_COLOR,10),3)}();void 0!==n&&(Zt=n);const i=r?Zt:n;if(0===i)return 0;if(r){if(Kt("color=16m")||Kt("color=full")||Kt("color=truecolor"))return 3;if(Kt("color=256"))return 2}if("TF_BUILD"in Jt&&"AGENT_NAME"in Jt)return 1;if(e&&!t&&void 0===i)return 0;const s=i||0;if("dumb"===Jt.TERM)return s;if("win32"===Vt.platform){const e=qt.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in Jt)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((e=>e in Jt))?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((e=>e in Jt))||"codeship"===Jt.CI_NAME?1:s;if("TEAMCITY_VERSION"in Jt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Jt.TEAMCITY_VERSION)?1:0;if("truecolor"===Jt.COLORTERM)return 3;if("xterm-kitty"===Jt.TERM)return 3;if("TERM_PROGRAM"in Jt){const e=Number.parseInt((Jt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Jt.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Jt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Jt.TERM)||"COLORTERM"in Jt?1:s}(e,{streamIsTTY:e&&e.isTTY,...t}))&&{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3};var r}Kt("no-color")||Kt("no-colors")||Kt("color=false")||Kt("color=never")?Zt=0:(Kt("color")||Kt("colors")||Kt("color=true")||Kt("color=always"))&&(Zt=1);const Xt={stdout:Qt({isTTY:Yt.isatty(1)}),stderr:Qt({isTTY:Yt.isatty(2)})};function er(e,t,r){let n=e.indexOf(t);if(-1===n)return e;const i=t.length;let s=0,o="";do{o+=e.slice(s,n)+t+r,s=n+i,n=e.indexOf(t,s)}while(-1!==n);return o+=e.slice(s),o}const{stdout:tr,stderr:rr}=Xt,nr=Symbol("GENERATOR"),ir=Symbol("STYLER"),sr=Symbol("IS_EMPTY"),or=["ansi","ansi","ansi256","ansi16m"],ar=Object.create(null);function ur(e){return(e=>{const t=(...e)=>e.join(" ");return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const r=tr?tr.level:0;e.level=void 0===t.level?r:t.level})(t,e),Object.setPrototypeOf(t,ur.prototype),t})(e)}Object.setPrototypeOf(ur.prototype,Function.prototype);for(const[e,t]of Object.entries(zt))ar[e]={get(){const r=pr(this,dr(t.open,t.close,this[ir]),this[sr]);return Object.defineProperty(this,e,{value:r}),r}};ar.visible={get(){const e=pr(this,this[ir],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const lr=(e,t,r,...n)=>"rgb"===e?"ansi16m"===t?zt[r].ansi16m(...n):"ansi256"===t?zt[r].ansi256(zt.rgbToAnsi256(...n)):zt[r].ansi(zt.rgbToAnsi(...n)):"hex"===e?lr("rgb",t,r,...zt.hexToRgb(...n)):zt[r][e](...n),cr=["rgb","hex","ansi256"];for(const e of cr)ar[e]={get(){const{level:t}=this;return function(...r){const n=dr(lr(e,or[t],"color",...r),zt.color.close,this[ir]);return pr(this,n,this[sr])}}},ar["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...r){const n=dr(lr(e,or[t],"bgColor",...r),zt.bgColor.close,this[ir]);return pr(this,n,this[sr])}}};const hr=Object.defineProperties((()=>{}),{...ar,level:{enumerable:!0,get(){return this[nr].level},set(e){this[nr].level=e}}}),dr=(e,t,r)=>{let n,i;return void 0===r?(n=e,i=t):(n=r.openAll+e,i=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:i,parent:r}},pr=(e,t,r)=>{const n=(...e)=>fr(n,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(n,hr),n[nr]=e,n[ir]=t,n[sr]=r,n},fr=(e,t)=>{if(e.level<=0||!t)return e[sr]?"":t;let r=e[ir];if(void 0===r)return t;const{openAll:n,closeAll:i}=r;if(t.includes("\x1b"))for(;void 0!==r;)t=er(t,r.close,r.open),r=r.parent;const s=t.indexOf("\n");return-1!==s&&(t=function(e,t,r,n){let i=0,s="";do{const o="\r"===e[n-1];s+=e.slice(i,o?n-1:n)+t+(o?"\r\n":"\n")+r,i=n+1,n=e.indexOf("\n",i)}while(-1!==n);return s+=e.slice(i),s}(t,i,n,s)),n+t+i};Object.defineProperties(ur.prototype,ar);const mr=ur(),gr=(ur({level:rr?rr.level:0}),mr),{cyan:br,red:yr,green:Dr}=gr;function wr(){return(new Lt.Text).onDone((()=>"# Created by nice-move\nroot = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\nindent_size = 2\nindent_style = space\ninsert_final_newline = true\nmax_line_length = 80\nquote_type = single\ntab_width = 2\ntrim_trailing_whitespace = true\n")).output(".editorconfig").logger("Create/Overwrite",br(".editorconfig")).catch(console.warn)}const vr=(e,t,r,n)=>{if("length"===r||"prototype"===r)return;if("arguments"===r||"caller"===r)return;const i=Object.getOwnPropertyDescriptor(e,r),s=Object.getOwnPropertyDescriptor(t,r);!Er(i,s)&&n||Object.defineProperty(e,r,s)},Er=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)},Fr=(e,t)=>`/* Wrapped ${e}*/\n${t}`,Cr=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Sr=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");const xr=new WeakMap,Or=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let r,n=0;const i=e.displayName||e.name||"<anonymous>",s=function(...o){if(xr.set(s,++n),1===n)r=e.apply(this,o),e=void 0;else if(!0===t.throw)throw new Error(`Function \`${i}\` can only be called once`);return r};return function(e,t,{ignoreNonConfigurable:r=!1}={}){const{name:n}=e;for(const n of Reflect.ownKeys(t))vr(e,t,n,r);((e,t)=>{const r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)})(e,t),((e,t,r)=>{const n=""===r?"":`with ${r.trim()}() `,i=Fr.bind(null,n,t.toString());Object.defineProperty(i,"name",Sr);const{writable:s,enumerable:o,configurable:a}=Cr;Object.defineProperty(e,"toString",{value:i,writable:s,enumerable:o,configurable:a})})(e,t,n)}(s,e),xr.set(s,n),s};Or.callCount=e=>{if(!xr.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return xr.get(e)};const _r=Or,Ar=[];Ar.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Ar.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Ar.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Tr=e=>!!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,Mr=Symbol.for("signal-exit emitter"),kr=globalThis,Ir=Object.defineProperty.bind(Object);class jr{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(kr[Mr])return kr[Mr];Ir(kr,Mr,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const i of this.listeners[e])n=!0===i(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Br{}const Pr=globalThis.process,{onExit:Rr,load:$r,unload:Nr}=(Lr=Tr(Pr)?new class extends Br{#e="win32"===Pr.platform?"SIGINT":"SIGHUP";#t=new jr;#r;#n;#i;#s={};#o=!1;constructor(e){super(),this.#r=e,this.#s={};for(const t of Ar)this.#s[t]=()=>{const r=this.#r.listeners(t);let{count:n}=this.#t;const i=e;if("object"==typeof i.__signal_exit_emitter__&&"number"==typeof i.__signal_exit_emitter__.count&&(n+=i.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#t.emit("exit",null,t),n="SIGHUP"===t?this.#e:t;r||e.kill(e.pid,n)}};this.#i=e.reallyExit,this.#n=e.emit}onExit(e,t){if(!Tr(this.#r))return()=>{};!1===this.#o&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#t.on(r,e),()=>{this.#t.removeListener(r,e),0===this.#t.listeners.exit.length&&0===this.#t.listeners.afterExit.length&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(const e of Ar)try{const t=this.#s[e];t&&this.#r.on(e,t)}catch(e){}this.#r.emit=(e,...t)=>this.#a(e,...t),this.#r.reallyExit=e=>this.#u(e)}}unload(){this.#o&&(this.#o=!1,Ar.forEach((e=>{const t=this.#s[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#r.removeListener(e,t)}catch(e){}})),this.#r.emit=this.#n,this.#r.reallyExit=this.#i,this.#t.count-=1)}#u(e){return Tr(this.#r)?(this.#r.exitCode=e||0,this.#t.emit("exit",this.#r.exitCode,null),this.#i.call(this.#r,this.#r.exitCode)):0}#a(e,...t){const r=this.#n;if("exit"===e&&Tr(this.#r)){"number"==typeof t[0]&&(this.#r.exitCode=t[0]);const n=r.call(this.#r,e,...t);return this.#t.emit("exit",this.#r.exitCode,null),n}return r.call(this.#r,e,...t)}}(Pr):new class extends Br{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>Lr.onExit(e,t),load:()=>Lr.load(),unload:()=>Lr.unload()});var Lr;const Ur=Vt.stderr.isTTY?Vt.stderr:Vt.stdout.isTTY?Vt.stdout:void 0,Wr=Ur?_r((()=>{Rr((()=>{Ur.write("\x1b[?25h")}),{alwaysLast:!0})})):()=>{};let Hr=!1;const Gr={show:(e=Vt.stderr)=>{e.isTTY&&(Hr=!1,e.write("\x1b[?25h"))},hide:(e=Vt.stderr)=>{e.isTTY&&(Wr(),Hr=!0,e.write("\x1b[?25l"))},toggle:(e,t)=>{void 0!==e&&(Hr=e),Hr?Gr.show(t):Gr.hide(t)}},zr=Gr;var Vr=n(1473);const qr={info:gr.blue("\u2139"),success:gr.green("\u2714"),warning:gr.yellow("\u26a0"),error:gr.red("\u2716")},Yr={info:gr.blue("i"),success:gr.green("\u221a"),warning:gr.yellow("\u203c"),error:gr.red("\xd7")},Kr=("win32"!==Vt.platform?"linux"!==Vt.env.TERM:Boolean(Vt.env.CI)||Boolean(Vt.env.WT_SESSION)||Boolean(Vt.env.TERMINUS_SUBLIME)||"{cmd::Cmder}"===Vt.env.ConEmuTask||"Terminus-Sublime"===Vt.env.TERM_PROGRAM||"vscode"===Vt.env.TERM_PROGRAM||"xterm-256color"===Vt.env.TERM||"alacritty"===Vt.env.TERM||"JetBrains-JediTerm"===Vt.env.TERMINAL_EMULATOR)?qr:Yr,Jr=function({onlyFirst:e=!1}={}){const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}();function Zr(e){if("string"!=typeof e)throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Jr,"")}function Qr(e,{ambiguousAsWide:t=!1}={}){return function(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}(e),12288===(r=e)||r>=65281&&r<=65376||r>=65504&&r<=65510||function(e){return e>=4352&&e<=4447||8986===e||8987===e||9001===e||9002===e||e>=9193&&e<=9196||9200===e||9203===e||9725===e||9726===e||9748===e||9749===e||e>=9776&&e<=9783||e>=9800&&e<=9811||9855===e||e>=9866&&e<=9871||9875===e||9889===e||9898===e||9899===e||9917===e||9918===e||9924===e||9925===e||9934===e||9940===e||9962===e||9970===e||9971===e||9973===e||9978===e||9981===e||9989===e||9994===e||9995===e||10024===e||10060===e||10062===e||e>=10067&&e<=10069||10071===e||e>=10133&&e<=10135||10160===e||10175===e||11035===e||11036===e||11088===e||11093===e||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||94192===e||94193===e||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||110589===e||110590===e||e>=110592&&e<=110882||110898===e||e>=110928&&e<=110930||110933===e||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||126980===e||127183===e||127374===e||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||127568===e||127569===e||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||127988===e||e>=127992&&e<=128062||128064===e||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||128378===e||128405===e||128406===e||128420===e||e>=128507&&e<=128591||e>=128640&&e<=128709||128716===e||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||128747===e||128748===e||e>=128756&&e<=128764||e>=128992&&e<=129003||129008===e||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}(e)||t&&function(e){return 161===e||164===e||167===e||168===e||170===e||173===e||174===e||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||198===e||208===e||215===e||216===e||e>=222&&e<=225||230===e||e>=232&&e<=234||236===e||237===e||240===e||242===e||243===e||e>=247&&e<=250||252===e||254===e||257===e||273===e||275===e||283===e||294===e||295===e||299===e||e>=305&&e<=307||312===e||e>=319&&e<=322||324===e||e>=328&&e<=331||333===e||338===e||339===e||358===e||359===e||363===e||462===e||464===e||466===e||468===e||470===e||472===e||474===e||476===e||593===e||609===e||708===e||711===e||e>=713&&e<=715||717===e||720===e||e>=728&&e<=731||733===e||735===e||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||1025===e||e>=1040&&e<=1103||1105===e||8208===e||e>=8211&&e<=8214||8216===e||8217===e||8220===e||8221===e||e>=8224&&e<=8226||e>=8228&&e<=8231||8240===e||8242===e||8243===e||8245===e||8251===e||8254===e||8308===e||8319===e||e>=8321&&e<=8324||8364===e||8451===e||8453===e||8457===e||8467===e||8470===e||8481===e||8482===e||8486===e||8491===e||8531===e||8532===e||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||8585===e||e>=8592&&e<=8601||8632===e||8633===e||8658===e||8660===e||8679===e||8704===e||8706===e||8707===e||8711===e||8712===e||8715===e||8719===e||8721===e||8725===e||8730===e||e>=8733&&e<=8736||8739===e||8741===e||e>=8743&&e<=8748||8750===e||e>=8756&&e<=8759||8764===e||8765===e||8776===e||8780===e||8786===e||8800===e||8801===e||e>=8804&&e<=8807||8810===e||8811===e||8814===e||8815===e||8834===e||8835===e||8838===e||8839===e||8853===e||8857===e||8869===e||8895===e||8978===e||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||9632===e||9633===e||e>=9635&&e<=9641||9650===e||9651===e||9654===e||9655===e||9660===e||9661===e||9664===e||9665===e||e>=9670&&e<=9672||9675===e||e>=9678&&e<=9681||e>=9698&&e<=9701||9711===e||9733===e||9734===e||9737===e||9742===e||9743===e||9756===e||9758===e||9792===e||9794===e||9824===e||9825===e||e>=9827&&e<=9829||e>=9831&&e<=9834||9836===e||9837===e||9839===e||9886===e||9887===e||9919===e||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||9955===e||9960===e||9961===e||e>=9963&&e<=9969||9972===e||e>=9974&&e<=9977||9979===e||9980===e||9982===e||9983===e||10045===e||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||65533===e||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||127375===e||127376===e||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}(e)?2:1;var r}const Xr=new Intl.Segmenter,en=/^\p{Default_Ignorable_Code_Point}$/u;function tn(e,t={}){if("string"!=typeof e||0===e.length)return 0;const{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:n=!1}=t;if(n||(e=Zr(e)),0===e.length)return 0;let i=0;const s={ambiguousAsWide:!r};for(const{segment:t}of Xr.segment(e)){const e=t.codePointAt(0);e<=31||e>=127&&e<=159||e>=8203&&e<=8207||65279===e||e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071||e>=55296&&e<=57343||e>=65024&&e<=65039||en.test(t)||(/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g.test(t)?i+=2:i+=Qr(e,s))}return i}function rn(){const{env:e}=Vt,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==Vt.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}const nn=new class{#l=0;start(){this.#l++,1===this.#l&&this.#c()}stop(){if(this.#l<=0)throw new Error("`stop` called more times than `start`");this.#l--,0===this.#l&&this.#h()}#c(){"win32"!==Vt.platform&&Vt.stdin.isTTY&&(Vt.stdin.setRawMode(!0),Vt.stdin.on("data",this.#d),Vt.stdin.resume())}#h(){Vt.stdin.isTTY&&(Vt.stdin.off("data",this.#d),Vt.stdin.pause(),Vt.stdin.setRawMode(!1))}#d(e){3===e[0]&&Vt.emit("SIGINT")}};class sn{#p=0;#f=!1;#m=0;#g=-1;#b=0;#y;#D;#w;#v;#E;#F;#C;#S;#x;#O;#_;color;constructor(e){"string"==typeof e&&(e={text:e}),this.#y={color:"cyan",stream:Vt.stderr,discardStdin:!0,hideCursor:!0,...e},this.color=this.#y.color,this.spinner=this.#y.spinner,this.#E=this.#y.interval,this.#w=this.#y.stream,this.#F="boolean"==typeof this.#y.isEnabled?this.#y.isEnabled:function({stream:e=process.stdout}={}){return Boolean(e&&e.isTTY&&"dumb"!==process.env.TERM&&!("CI"in process.env))}({stream:this.#w}),this.#C="boolean"==typeof this.#y.isSilent&&this.#y.isSilent,this.text=this.#y.text,this.prefixText=this.#y.prefixText,this.suffixText=this.#y.suffixText,this.indent=this.#y.indent,"test"===Vt.env.NODE_ENV&&(this._stream=this.#w,this._isEnabled=this.#F,Object.defineProperty(this,"_linesToClear",{get(){return this.#p},set(e){this.#p=e}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#g}}),Object.defineProperty(this,"_lineCount",{get(){return this.#m}}))}get indent(){return this.#S}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw new Error("The `indent` option must be an integer from 0 and up");this.#S=e,this.#A()}get interval(){return this.#E??this.#D.interval??100}get spinner(){return this.#D}set spinner(e){if(this.#g=-1,this.#E=void 0,"object"==typeof e){if(void 0===e.frames)throw new Error("The given spinner must have a `frames` property");this.#D=e}else if(rn())if(void 0===e)this.#D=Vr.dots;else{if("default"===e||!Vr[e])throw new Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`);this.#D=Vr[e]}else this.#D=Vr.line}get text(){return this.#x}set text(e=""){this.#x=e,this.#A()}get prefixText(){return this.#O}set prefixText(e=""){this.#O=e,this.#A()}get suffixText(){return this.#_}set suffixText(e=""){this.#_=e,this.#A()}get isSpinning(){return void 0!==this.#v}#T(e=this.#O,t=" "){return"string"==typeof e&&""!==e?e+t:"function"==typeof e?e()+t:""}#M(e=this.#_,t=" "){return"string"==typeof e&&""!==e?t+e:"function"==typeof e?t+e():""}#A(){const e=this.#w.columns??80,t=this.#T(this.#O,"-"),r=this.#M(this.#_,"-"),n=" ".repeat(this.#S)+t+"--"+this.#x+"--"+r;this.#m=0;for(const t of Zr(n).split("\n"))this.#m+=Math.max(1,Math.ceil(tn(t,{countAnsiEscapeCodes:!0})/e))}get isEnabled(){return this.#F&&!this.#C}set isEnabled(e){if("boolean"!=typeof e)throw new TypeError("The `isEnabled` option must be a boolean");this.#F=e}get isSilent(){return this.#C}set isSilent(e){if("boolean"!=typeof e)throw new TypeError("The `isSilent` option must be a boolean");this.#C=e}frame(){const e=Date.now();(-1===this.#g||e-this.#b>=this.interval)&&(this.#g=++this.#g%this.#D.frames.length,this.#b=e);const{frames:t}=this.#D;let r=t[this.#g];return this.color&&(r=gr[this.color](r)),("string"==typeof this.#O&&""!==this.#O?this.#O+" ":"")+r+("string"==typeof this.text?" "+this.text:"")+("string"==typeof this.#_&&""!==this.#_?" "+this.#_:"")}clear(){if(!this.#F||!this.#w.isTTY)return this;this.#w.cursorTo(0);for(let e=0;e<this.#p;e++)e>0&&this.#w.moveCursor(0,-1),this.#w.clearLine(1);return(this.#S||this.lastIndent!==this.#S)&&this.#w.cursorTo(this.#S),this.lastIndent=this.#S,this.#p=0,this}render(){return this.#C||(this.clear(),this.#w.write(this.frame()),this.#p=this.#m),this}start(e){return e&&(this.text=e),this.#C?this:this.#F?(this.isSpinning||(this.#y.hideCursor&&zr.hide(this.#w),this.#y.discardStdin&&Vt.stdin.isTTY&&(this.#f=!0,nn.start()),this.render(),this.#v=setInterval(this.render.bind(this),this.interval)),this):(this.text&&this.#w.write(`- ${this.text}\n`),this)}stop(){return this.#F?(clearInterval(this.#v),this.#v=void 0,this.#g=0,this.clear(),this.#y.hideCursor&&zr.show(this.#w),this.#y.discardStdin&&Vt.stdin.isTTY&&this.#f&&(nn.stop(),this.#f=!1),this):this}succeed(e){return this.stopAndPersist({symbol:Kr.success,text:e})}fail(e){return this.stopAndPersist({symbol:Kr.error,text:e})}warn(e){return this.stopAndPersist({symbol:Kr.warning,text:e})}info(e){return this.stopAndPersist({symbol:Kr.info,text:e})}stopAndPersist(e={}){if(this.#C)return this;const t=e.prefixText??this.#O,r=this.#T(t," "),n=e.symbol??" ",i=e.text??this.text,s="string"==typeof i?(n?" ":"")+i:"",o=e.suffixText??this.#_,a=r+n+s+this.#M(o," ")+"\n";return this.stop(),this.#w.write(a),this}}const on=e(import.meta.url)("node:child_process"),an=e(import.meta.url)("node:fs");var un=n(6760),ln=n(1364),cn=n(3396);function hn(e){return ln(e).timeout(5e3).send().then((e=>301===e.statusCode?hn(e.headers.location):e.text())).then((e=>{const t=e.trim();if(t)return t;throw new Error("template download fail")}))}function dn(e){return e?e.trim():void 0}async function pn(e){if(e)return e;const t=function(){try{return{name:(0,on.execSync)("git config user.name").toString().trim(),email:(0,on.execSync)("git config user.email").toString().trim()}}catch{return{}}}();return t.name?cn(t):"Unknown"}function fn(){try{return JSON.parse((0,an.readFileSync)((0,un.join)(process.cwd(),"package.json")))}catch{return{}}}const mn={Windows_NT:"windows",Linux:"linux",Darwin:"macos"};async function gn(){await(new Lt.Text).onDone((()=>"# Created by nice-move\n\n* text=auto eol=lf\n")).output(".gitattributes").logger("Create/Overwrite",br(".gitattributes"));const e=(r={text:"Downloading template from `gitignore.io`"},new sn(r)).start(),t=`Create/Overwrite ${br(".gitignore")}`;var r;return(new Lt.Text).source(".gitignore").onFail().onDone(((e="")=>hn(`https://gitignore.io/api/ssh,certificates,node,${mn[(0,qt.type)()]}`).then((e=>`${e.replaceAll(/(www\.)?toptal\.com\/developers\/gitignore/g,"gitignore.io").trim()}\n`)).catch((()=>e||"node_modules\n")))).output().then((()=>{e.stopAndPersist({symbol:Dr("\u221a"),text:t})})).catch((r=>{e.stopAndPersist({symbol:yr("\xd7"),text:`${t} - ${r.message}`})}))}async function bn(){const{license:e,author:t=""}=fn(),r="MIT"===e;if(r||"Unlicense"===e){const e=await async function(e){return(await pn(e)).name||"Unknown"}(t);return(new Lt.Text).onDone((()=>r?'MIT License\n\nCopyright (c) {{year}} {{holder}}\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n'.replace("{{year}}",(new Date).getFullYear()).replace("{{holder}}",e):'This is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or\ndistribute this software, either in source code form or as a compiled\nbinary, for any purpose, commercial or non-commercial, and by any\nmeans.\n\nIn jurisdictions that recognize copyright laws, the author or authors\nof this software dedicate any and all copyright interest in the\nsoftware to the public domain. We make this dedication for the benefit\nof the public at large and to the detriment of our heirs and\nsuccessors. We intend this dedication to be an overt act of\nrelinquishment in perpetuity of all present and future rights to this\nsoftware under copyright law.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to <https://unlicense.org/>\n')).output("LICENSE").logger("Create/Overwrite",br("LICENSE")).catch(console.warn)}}const yn={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")};function Dn(e,t){return t}function wn(e,t){return e.filter((e=>void 0!==e))}var vn,En;function Fn(e){return"object"!=typeof e||null===e?0:Array.isArray(e)?2:function(e){if(!Sn.includes(Object.prototype.toString.call(e)))return!1;const{constructor:t}=e;if(void 0===t)return!0;const r=t.prototype;return!(null===r||"object"!=typeof r||!Sn.includes(Object.prototype.toString.call(r)))&&!!r.hasOwnProperty("isPrototypeOf")}(e)?1:e instanceof Set?3:e instanceof Map?4:5}function Cn(e){let t=0,r=e[0]?.[Symbol.iterator]();return{[Symbol.iterator]:()=>({next(){for(;;){if(void 0===r)return{done:!0,value:void 0};const n=r.next();if(!0!==n.done)return{done:!1,value:n.value};t+=1,r=e[t]?.[Symbol.iterator]()}}})}}(En=vn||(vn={}))[En.NOT=0]="NOT",En[En.RECORD=1]="RECORD",En[En.ARRAY=2]="ARRAY",En[En.SET=3]="SET",En[En.MAP=4]="MAP",En[En.OTHER=5]="OTHER";const Sn=["[object Object]","[object Module]"],xn={mergeRecords:function(e,t,r){const n={};for(const o of function(e){const t=new Set;for(const r of e)for(const e of[...Object.keys(r),...Object.getOwnPropertySymbols(r)])t.add(e);return t}(e)){const a=[];for(const t of e)s=o,"object"==typeof(i=t)&&Object.prototype.propertyIsEnumerable.call(i,s)&&a.push(t[o]);if(0===a.length)continue;const u=t.metaDataUpdater(r,{key:o,parents:e}),l=_n(a,t,u);l!==yn.skip&&("__proto__"===o?Object.defineProperty(n,o,{value:l,configurable:!0,enumerable:!0,writable:!0}):n[o]=l)}var i,s;return n},mergeArrays:function(e){return e.flat()},mergeSets:function(e){return new Set(Cn(e))},mergeMaps:function(e){return new Map(Cn(e))},mergeOthers:function(e){return e.at(-1)}};function On(...e){return function(){const e=function(e,t){return{defaultMergeFunctions:xn,mergeFunctions:{...xn,...Object.fromEntries(Object.entries(e).filter((([e,t])=>Object.hasOwn(xn,e))).map((([e,t])=>!1===t?[e,xn.mergeOthers]:[e,t])))},metaDataUpdater:e.metaDataUpdater??Dn,deepmerge:t,useImplicitDefaultMerging:e.enableImplicitDefaultMerging??!1,filterValues:!1===e.filterValues?void 0:e.filterValues??wn,actions:yn}}({},t);function t(...t){return _n(t,e,undefined)}return t}()(...e)}function _n(e,t,r){const n=t.filterValues?.(e,r)??e;if(0===n.length)return;if(1===n.length)return An(n,t,r);const i=Fn(n[0]);if(0!==i&&5!==i)for(let e=1;e<n.length;e++)if(Fn(n[e])!==i)return An(n,t,r);switch(i){case 1:return function(e,t,r){const n=t.mergeFunctions.mergeRecords(e,t,r);return n===yn.defaultMerge||t.useImplicitDefaultMerging&&void 0===n&&t.mergeFunctions.mergeRecords!==t.defaultMergeFunctions.mergeRecords?t.defaultMergeFunctions.mergeRecords(e,t,r):n}(n,t,r);case 2:return function(e,t,r){const n=t.mergeFunctions.mergeArrays(e,t,r);return n===yn.defaultMerge||t.useImplicitDefaultMerging&&void 0===n&&t.mergeFunctions.mergeArrays!==t.defaultMergeFunctions.mergeArrays?t.defaultMergeFunctions.mergeArrays(e):n}(n,t,r);case 3:return function(e,t,r){const n=t.mergeFunctions.mergeSets(e,t,r);return n===yn.defaultMerge||t.useImplicitDefaultMerging&&void 0===n&&t.mergeFunctions.mergeSets!==t.defaultMergeFunctions.mergeSets?t.defaultMergeFunctions.mergeSets(e):n}(n,t,r);case 4:return function(e,t,r){const n=t.mergeFunctions.mergeMaps(e,t,r);return n===yn.defaultMerge||t.useImplicitDefaultMerging&&void 0===n&&t.mergeFunctions.mergeMaps!==t.defaultMergeFunctions.mergeMaps?t.defaultMergeFunctions.mergeMaps(e):n}(n,t,r);default:return An(n,t,r)}}function An(e,t,r){const n=t.mergeFunctions.mergeOthers(e,t,r);return n===yn.defaultMerge||t.useImplicitDefaultMerging&&void 0===n&&t.mergeFunctions.mergeOthers!==t.defaultMergeFunctions.mergeOthers?t.defaultMergeFunctions.mergeOthers(e):n}var Tn=n(323);const Mn=e(import.meta.url)("node:util"),kn=(0,Mn.promisify)(on.execFile),In={spawn:!0},jn="en-US";async function Bn(e,t){return(await async function(e,t){const r=await kn(e,t,{encoding:"utf8"});return r.stdout=r.stdout.trim(),r}(e,t)).stdout}function Pn(e=process.env){return e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}function Rn(e){return e&&e.replace(/[.:].*/,"")}async function $n(){return Bn("locale",["-a"])}const Nn=new Map;async function Ln(e=In){if(Nn.has(e.spawn))return Nn.get(e.spawn);let t;try{const r=Pn();t=r||!1===e.spawn?Rn(r):"win32"===process.platform?await async function(){const e=await Bn("wmic",["os","get","locale"]),t=Number.parseInt(e.replace("Locale",""),16);return Tn.from(t)}():"darwin"===process.platform?await async function(){const e=await Promise.all([Bn("defaults",["read","-globalDomain","AppleLocale"]),$n()]);return function(e,t=""){return t.includes(e)?e:jn}(e[0],e[1])}():await async function(){return Rn(function(e){const t={};for(const r of e.split("\n")){const[e,n]=r.split("=");t[e]=n.replace(/^"|"$/g,"")}return Pn(t)}(await Bn("locale")))}()}catch{}const r=(t||jn).replace(/_/,"-");return Nn.set(e.spawn,r),r}const Un={"@bring-it/cli":"^0.9.9","@bring-it/npm":"^0.5.9","@cospaia/prettier-plugin-clojure":"^0.0.2","@vitest/ui":"^3.0.4","best-shot":"^0.9.0",eslint:"catalog:",garou:"catalog:",postcss:"^8.5.1",prettier:"^3.4.2","prettier-plugin-tailwindcss":"^0.6.11",stylelint:"catalog:",syncpack:"^13.0.0",typescript:"catalog:",vitest:"^3.0.4","@bring-it/sftp":"^0.3.8","@nice-move/init":"workspace:~","@playwright/test":"~1.49.1","@types/react":"~18.3.18",react:"~18.3.1","react-dom":"~18.3.1",tailwindcss:"^3.4.17",vue:"~3.5.13","eslint-config-base":"^0.12.8","stylelint-config":"^0.10.9","prettier-config":"^0.14.11","syncpack-config":"^0.2.9",tsconfig:"^0.2.7",cli:"^0.11.19",lts:"^20.18.1 || ^22.11.0"},Wn="package.json";async function Hn(){const{name:e,description:t}=fn();(new Lt.Text).source("README.md").onFail().onDone((r=>r||[`# ${e}`,t?`${t}.\n`:""].filter(Boolean).join("\n\n"))).output().logger("Create",br("README.md")).catch(console.warn)}function Gn(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}var zn=n(3136);const Vn=(e,t)=>{const r=Kn(qn(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},qn=e=>Yn(e)?e.toString():e,Yn=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,Kn=e=>e instanceof URL?(0,zn.fileURLToPath)(e):e,Jn=(e,t=[],r={})=>{const n=Vn(e,"First argument"),[i,s]=Gn(t)?[[],t]:[t,r];if(!Array.isArray(i))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${i}`);if(i.some((e=>"object"==typeof e&&null!==e)))throw new TypeError(`Second argument must be an array of strings: ${i}`);const o=i.map(String),a=o.find((e=>e.includes("\0")));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Gn(s))throw new TypeError(`Last argument must be an options object: ${s}`);return[n,o,s]},Zn=e(import.meta.url)("node:string_decoder"),{toString:Qn}=Object.prototype,Xn=e=>"[object Uint8Array]"===Qn.call(e),ei=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),ti=new TextEncoder,ri=e=>ti.encode(e),ni=new TextDecoder,ii=e=>ni.decode(e),si=e=>1===e.length&&Xn(e[0])?e[0]:ai(oi(e)),oi=e=>e.map((e=>"string"==typeof e?ri(e):e)),ai=e=>{const t=new Uint8Array(ui(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ui=e=>{let t=0;for(const r of e)t+=r.length;return t},li=({templates:e,expressions:t,tokens:r,index:n,template:i})=>{if(void 0===i)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:s,leadingWhitespaces:o,trailingWhitespaces:a}=ci(i,e.raw[n]),u=pi(r,s,o);if(n===t.length)return u;const l=t[n],c=Array.isArray(l)?l.map((e=>fi(e))):[fi(l)];return pi(u,c,a)},ci=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const i=hi.has(t[0]);for(let i=0,s=0;i<e.length;i+=1,s+=1){const o=t[s];if(hi.has(o))n!==i&&r.push(e.slice(n,i)),n=i+1;else if("\\"===o){const e=t[s+1];"\n"===e?(i-=1,s+=1):"u"===e&&"{"===t[s+2]?s=t.indexOf("}",s+3):s+=di[e]??1}}const s=n===e.length;return s||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:i,trailingWhitespaces:s}},hi=new Set([" ","\t","\r","\n"]),di={x:3,u:5},pi=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],fi=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Gn(e)&&("stdout"in e||"isMaxBuffer"in e))return mi(e);if(e instanceof on.ChildProcess||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},mi=({stdout:e})=>{if("string"==typeof e)return e;if(Xn(e))return ii(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},gi=e=>bi.includes(e),bi=[Vt.stdin,Vt.stdout,Vt.stderr],yi=["stdin","stdout","stderr"],Di=e=>yi[e]??`stdio[${e}]`,wi=(e,t)=>{const r=Array.from({length:vi(e)+1}),n=Ei(e[t],r,t);return Ai(n,t)},vi=({stdio:e})=>Array.isArray(e)?Math.max(e.length,yi.length):yi.length,Ei=(e,t,r)=>Gn(e)?Fi(e,t,r):t.fill(e),Fi=(e,t,r)=>{for(const n of Object.keys(e).sort(Ci))for(const i of xi(n,r,t))t[i]=e[n];return t},Ci=(e,t)=>Si(e)<Si(t)?1:-1,Si=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,xi=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Oi(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Oi=e=>{if("all"===e)return e;if(yi.includes(e))return yi.indexOf(e);const t=_i.exec(e);return null!==t?Number(t[1]):void 0},_i=/^fd(\d+)$/,Ai=(e,t)=>e.map((e=>void 0===e?Ti[t]:e)),Ti={lines:!1,buffer:!0,maxBuffer:1e8,verbose:(0,Mn.debuglog)("execa").enabled?"full":"none",stripFinalNewline:!0},Mi=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ki=(e,t)=>"ipc"===t?e.at(-1):e[t],Ii=({verbose:e},t)=>"none"!==Bi(e,t),ji=({verbose:e},t)=>!["none","short"].includes(Bi(e,t)),Bi=(e,t)=>void 0===t?Pi(e):ki(e,t),Pi=e=>e.find((e=>Ri(e)))??$i.findLast((t=>e.includes(t))),Ri=e=>"function"==typeof e,$i=["none","short","full"],Ni=e=>(0,Mn.stripVTControlCharacters)(e).split("\n").map((e=>Li(e))).join("\n"),Li=e=>e.replaceAll(Wi,(e=>Ui(e))),Ui=e=>{const t=Hi[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Gi?`\\u${n.padStart(4,"0")}`:`\\U${n}`},Wi=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Hi={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Gi=65535,zi=/^[\w./-]+$/,Vi={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258c",squareRight:"\u2590",squareCenter:"\u25a0",bullet:"\u25cf",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203a",triangleUp:"\u25b2",triangleUpSmall:"\u25b4",triangleDown:"\u25bc",triangleDownSmall:"\u25be",triangleLeftSmall:"\u25c2",triangleRightSmall:"\u25b8",home:"\u2302",heart:"\u2665",musicNote:"\u266a",musicNoteBeamed:"\u266b",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221e",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xbd",oneThird:"\u2153",oneQuarter:"\xbc",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215b",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xbe",threeFifths:"\u2157",threeEighths:"\u215c",fourFifths:"\u2158",fiveSixths:"\u215a",fiveEighths:"\u215d",sevenEighths:"\u215e",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254c",lineDashed5:"\u254d",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257a",lineDashed10:"\u257c",lineDashed11:"\u257e",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250a",lineVerticalDashed3:"\u250b",lineVerticalDashed4:"\u254e",lineVerticalDashed5:"\u254f",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257b",lineVerticalDashed10:"\u257d",lineVerticalDashed11:"\u257f",lineDownLeft:"\u2510",lineDownLeftArc:"\u256e",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250c",lineDownRightArc:"\u256d",lineDownBoldRightBold:"\u250f",lineDownBoldRight:"\u250e",lineDownRightBold:"\u250d",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256f",lineUpBoldLeftBold:"\u251b",lineUpBoldLeft:"\u251a",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255d",lineUpDoubleLeft:"\u255c",lineUpLeftDouble:"\u255b",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255a",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252b",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252a",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251c",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251d",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251f",lineUpBoldDownRight:"\u251e",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255f",lineUpDownRightDouble:"\u255e",lineDownLeftRight:"\u252c",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252f",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252e",lineDownLeftBoldRight:"\u252d",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253b",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253a",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253c",lineUpBoldDownBoldLeftBoldRightBold:"\u254b",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254a",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253d",lineUpDownLeftRightBold:"\u253e",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253f",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256c",lineUpDoubleDownDoubleLeftRight:"\u256b",lineUpDownLeftDoubleRightDouble:"\u256a",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},qi={tick:"\u2714",info:"\u2139",warning:"\u26a0",cross:"\u2718",squareSmall:"\u25fb",squareSmallFilled:"\u25fc",circle:"\u25ef",circleFilled:"\u25c9",circleDotted:"\u25cc",circleDouble:"\u25ce",circleCircle:"\u24de",circleCross:"\u24e7",circlePipe:"\u24be",radioOn:"\u25c9",radioOff:"\u25ef",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24e7",checkboxCircleOff:"\u24be",pointer:"\u276f",triangleUpOutline:"\u25b3",triangleLeft:"\u25c0",triangleRight:"\u25b6",lozenge:"\u25c6",lozengeOutline:"\u25c7",hamburger:"\u2630",smiley:"\u32e1",mustache:"\u0df4",star:"\u2605",play:"\u25b6",nodejs:"\u2b22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},Yi={...Vi,...qi},Ki={...Vi,tick:"\u221a",info:"i",warning:"\u203c",cross:"\xd7",squareSmall:"\u25a1",squareSmallFilled:"\u25a0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25cb)",circleCross:"(\xd7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xd7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xd7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25c4",triangleRight:"\u25ba",lozenge:"\u2666",lozengeOutline:"\u25ca",hamburger:"\u2261",smiley:"\u263a",mustache:"\u250c\u2500\u2510",star:"\u2736",play:"\u25ba",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},Ji=rn()?Yi:Ki,Zi=(Object.entries(qi),Yt?.WriteStream?.prototype?.hasColors?.()??!1),Qi=(e,t)=>{if(!Zi)return e=>e;const r=`\x1b[${e}m`,n=`\x1b[${t}m`;return e=>{const t=e+"";let i=t.indexOf(n);if(-1===i)return r+t+n;let s=r,o=0;for(;-1!==i;)s+=t.slice(o,i)+r,o=i+n.length,i=t.indexOf(n,o);return s+=t.slice(o)+n,s}},Xi=(Qi(0,0),Qi(1,22)),es=(Qi(2,22),Qi(3,23),Qi(4,24),Qi(53,55),Qi(7,27),Qi(8,28),Qi(9,29),Qi(30,39),Qi(31,39),Qi(32,39),Qi(33,39),Qi(34,39),Qi(35,39),Qi(36,39),Qi(37,39),Qi(90,39)),ts=(Qi(40,49),Qi(41,49),Qi(42,49),Qi(43,49),Qi(44,49),Qi(45,49),Qi(46,49),Qi(47,49),Qi(100,49),Qi(91,39)),rs=(Qi(92,39),Qi(93,39)),ns=(Qi(94,39),Qi(95,39),Qi(96,39),Qi(97,39),Qi(101,49),Qi(102,49),Qi(103,49),Qi(104,49),Qi(105,49),Qi(106,49),Qi(107,49),e=>`${is(e.getHours(),2)}:${is(e.getMinutes(),2)}:${is(e.getSeconds(),2)}.${is(e.getMilliseconds(),3)}`),is=(e,t)=>String(e).padStart(t,"0"),ss=({failed:e,reject:t})=>e?t?Ji.cross:Ji.warning:Ji.tick,os={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:ss,duration:ss},as=e=>e,us={command:()=>Xi,output:()=>as,ipc:()=>as,error:({reject:e})=>e?ts:rs,duration:()=>es},ls=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},cs=e=>e.endsWith("\n")?e:`${e}\n`,hs=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:i})=>{const s=ds({type:e,result:i,verboseInfo:n}),o=((e,t,r)=>{const n=(({verbose:e},t)=>{const r=Bi(e,t);return Ri(r)?r:void 0})(t,r);return e.map((({verboseLine:e,verboseObject:t})=>ls(e,t,n))).filter((e=>void 0!==e)).map((e=>cs(e))).join("")})(ps(t,s),n,r);""!==o&&console.warn(o.slice(0,-1))},ds=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:i=!1,...s}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:i,result:t,options:s}),ps=(e,t)=>e.split("\n").map((e=>fs({...t,message:e}))),fs=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:i,result:{failed:s=!1}={},options:{reject:o=!0}})=>{const a=ns(r),u=os[e]({failed:s,reject:o,piped:n}),l=us[e]({reject:o});return`${es(`[${a}]`)} ${es(`[${i}]`)} ${l(u)} ${l(t)}`})(e),verboseObject:e}),ms=e=>{const t="string"==typeof e?e:(0,Mn.inspect)(e);return Ni(t).replaceAll("\t"," ".repeat(gs))},gs=2,bs=e=>Ii({verbose:e})?ys++:void 0;let ys=0n;const Ds=()=>Vt.hrtime.bigint(),ws=e=>Number(Vt.hrtime.bigint()-e)/1e6,vs=(e,t,r)=>{const n=Ds(),{command:i,escapedCommand:s}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map((e=>{return t=Li(e),zi.test(t)?t:"win32"===Vt.platform?`"${t.replaceAll('"','""')}"`:`'${t.replaceAll("'","'\\''")}'`;var t})).join(" ")}})(e,t),o=((e,t,r)=>((e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!$i.includes(t)&&!Ri(t)){const e=$i.map((e=>`'${e}'`)).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}})(e),{verbose:e,escapedCommand:t,commandId:bs(e),rawOptions:r}))(wi(r,"verbose"),s,{...r});return((e,t)=>{Ii(t)&&hs({type:"command",verboseMessage:e,verboseInfo:t})})(s,o),{command:i,escapedCommand:s,startTime:n,verboseInfo:o}};var Es=n(6507);function Fs(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"}function Cs(e){return e instanceof URL?(0,zn.fileURLToPath)(e):e}(0,Mn.promisify)(on.execFile);const Ss=({env:e=Vt.env,...t}={})=>{const r=Fs({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=Vt.cwd(),path:t=Vt.env[Fs()],preferLocal:r=!0,execPath:n=Vt.execPath,addExecPath:i=!0}={})=>{const s=un.resolve(Cs(e)),o=[],a=t.split(un.delimiter);return r&&((e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=un.resolve(Cs(e));for(;t!==r;)yield r,t=r,r=un.resolve(r,"..")}}}(r)){const r=un.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}})(o,a,s),i&&((e,t,r,n)=>{const i=un.resolve(n,Cs(r),"..");t.includes(i)||e.push(i)})(o,a,n,s),""===t||t===un.delimiter?`${o.join(un.delimiter)}${t}`:[...o,t].join(un.delimiter)})(t),e},xs=e(import.meta.url)("node:timers/promises");class Os extends Error{}const _s=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,As,{value:!0,writable:!1,enumerable:!1,configurable:!1})},As=Symbol("isExecaError"),Ts=e=>"[object Error]"===Object.prototype.toString.call(e);class Ms extends Error{}_s(Ms,Ms.name);class ks extends Error{}_s(ks,ks.name);const Is=(e,t)=>({name:`SIGRT${t+1}`,number:js+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),js=34,Bs=[{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"}],Ps=()=>{const e=(()=>{const e=64-js+1;return Array.from({length:e},Is)})();return[...Bs,...e].map(Rs)},Rs=({name:e,number:t,description:r,action:n,forced:i=!1,standard:s})=>{const{signals:{[e]:o}}=qt.constants,a=void 0!==o;return{name:e,number:a?o:t,description:r,supported:a,action:n,forced:i,standard:s}},$s=({name:e,number:t,description:r,supported:n,action:i,forced:s,standard:o})=>[e,{name:e,number:t,description:r,supported:n,action:i,forced:s,standard:o}],Ns=(()=>{const e=Ps();return Object.fromEntries(e.map($s))})(),Ls=(e,t)=>{const r=t.find((({name:t})=>qt.constants.signals[t]===e));return void 0!==r?r:t.find((t=>t.number===e))},Us=((()=>{const e=Ps(),t=Array.from({length:65},((t,r)=>((e,t)=>{const r=Ls(e,t);if(void 0===r)return{};const{name:n,description:i,supported:s,action:o,forced:a,standard:u}=r;return{[e]:{name:n,number:e,description:i,supported:s,action:o,forced:a,standard:u}}})(r,e)));Object.assign({},...t)})(),e=>0===e?e:Ws(e,"`subprocess.kill()`'s argument")),Ws=(e,t)=>{if(Number.isInteger(e))return Hs(e,t);if("string"==typeof e)return zs(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${Vs()}`)},Hs=(e,t)=>{if(Gs.has(e))return Gs.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${Vs()}`)},Gs=new Map(Object.entries(qt.constants.signals).reverse().map((([e,t])=>[t,e]))),zs=(e,t)=>{if(e in qt.constants.signals)return e;if(e.toUpperCase()in qt.constants.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${Vs()}`)},Vs=()=>`Available signal names: ${qs()}.\nAvailable signal numbers: ${Ys()}.`,qs=()=>Object.keys(qt.constants.signals).sort().map((e=>`'${e}'`)).join(", "),Ys=()=>[...new Set(Object.values(qt.constants.signals).sort(((e,t)=>e-t)))].join(", "),Ks=e=>Ns[e].description,Js=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:i,controller:s},o,a)=>{const{signal:u,error:l}=Zs(o,a,r);Qs(l,n);const c=e(u);return Xs({kill:e,signal:u,forceKillAfterDelay:t,killSignal:r,killResult:c,context:i,controller:s}),c},Zs=(e,t,r)=>{const[n=r,i]=Ts(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==i&&!Ts(i))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${i}`);return{signal:Us(n),error:i}},Qs=(e,t)=>{void 0!==e&&t.reject(e)},Xs=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:i,context:s,controller:o})=>{t===n&&i&&eo({kill:e,forceKillAfterDelay:r,context:s,controllerSignal:o.signal})},eo=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await(0,xs.setTimeout)(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},to=e(import.meta.url)("node:events"),ro=async(e,t)=>{e.aborted||await(0,to.once)(e,"abort",{signal:t})},no=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:i})=>void 0===t||r?[]:[io(e,t,n,i)],io=async(e,t,r,{signal:n})=>{throw await ro(t,n),r.terminationReason??="cancel",e.kill(),t.reason},so=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{oo(e,t,r),ao(e,t,n)},oo=(e,t,r)=>{if(!r)throw new Error(`${ho(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},ao=(e,t,r)=>{if(!r)throw new Error(`${ho(e,t)} cannot be used: the ${fo(t)} has already exited or disconnected.`)},uo=(e,t)=>new Error(`${ho("sendMessage",t)} failed when sending an acknowledgment response to the ${fo(t)}.`,{cause:e}),lo=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),co=["could not be cloned","circular structure","call stack size exceeded"],ho=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${po(t)}${e}(${r})`,po=e=>e?"":"subprocess.",fo=e=>e?"parent process":"subprocess",mo=e=>{e.connected&&e.disconnect()},go=()=>{const e={},t=new Promise(((t,r)=>{Object.assign(e,{resolve:t,reject:r})}));return Object.assign(t,e)},bo=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:i}=Do.get(e),s=wo(i,t,r),o=e.stdio[s];if(null===o)throw new TypeError(Fo(s,t,n,r));return o},yo=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:i}=Do.get(e),s=wo(i,t,r),o="all"===s?e.all:e.stdio[s];if(null==o)throw new TypeError(Fo(s,t,n,r));return o},Do=new WeakMap,wo=(e,t,r)=>{const n=vo(t,r);return Eo(n,t,r,e),n},vo=(e,t)=>{const r=Oi(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:i}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${xo(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${i}".`)},Eo=(e,t,r,n)=>{const i=n[So(e)];if(void 0===i)throw new TypeError(`"${xo(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===i.direction&&!r)throw new TypeError(`"${xo(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==i.direction&&r)throw new TypeError(`"${xo(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Fo=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:i,optionValue:s}=Co(e,r);return`The "${i}: ${Oo(s)}" option is incompatible with using "${xo(n)}: ${Oo(t)}".\nPlease set this option with "pipe" instead.`},Co=(e,{stdin:t,stdout:r,stderr:n,stdio:i})=>{const s=So(e);return 0===s&&void 0!==t?{optionName:"stdin",optionValue:t}:1===s&&void 0!==r?{optionName:"stdout",optionValue:r}:2===s&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${s}]`,optionValue:i[s]}},So=e=>"all"===e?1:e,xo=e=>e?"to":"from",Oo=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",_o=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),(0,to.addAbortListener)(r,(()=>{e.setMaxListeners(e.getMaxListeners()-t)})))},Ao=(e,t)=>{t&&To(e)},To=e=>{e.refCounted()},Mo=(e,t)=>{t&&ko(e)},ko=e=>{e.unrefCounted()},Io=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},i)=>{if(Ho(i)||aa(i))return;Bo.has(e)||Bo.set(e,[]);const s=Bo.get(e);if(s.push(i),!(s.length>1))for(;s.length>0;){await Ko(e,n,i),await xs.scheduler.yield();const o=await Wo({wrappedMessage:s[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});s.shift(),n.emit("message",o),n.emit("message:done")}},jo=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:i})=>{la();const s=Bo.get(e);for(;s?.length>0;)await(0,to.once)(n,"message:done");e.removeListener("message",i),((e,t)=>{t&&(To(e),To(e))})(t,r),n.connected=!1,n.emit("disconnect")},Bo=new WeakMap,Po=(e,t,r)=>{if(Ro.has(e))return Ro.get(e);const n=new to.EventEmitter;return n.connected=!0,Ro.set(e,n),$o({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Ro=new WeakMap,$o=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const i=Io.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",i),t.once("disconnect",jo.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:i})),((e,t)=>{t&&(ko(e),ko(e))})(r,n)},No=e=>{const t=Ro.get(e);return void 0===t?null!==e.channel:t.connected};let Lo=0n;const Uo=(e,t)=>{if(t?.type===qo&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&zo[t].resolve({isDeadlock:!0,hasListeners:!1})},Wo=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:i})=>{if(e?.type!==qo||!t.connected)return e;const{id:s,message:o}=e,a={id:s,type:Yo,message:Zo(t,i)};try{await Xo({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){i.emit("strict:error",e)}return o},Ho=e=>{if(e?.type!==Yo)return!1;const{id:t,message:r}=e;return zo[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},Go=async(e,t,r)=>{if(e?.type!==qo)return;const n=go();zo[e.id]=n;const i=new AbortController;try{const{isDeadlock:e,hasListeners:s}=await Promise.race([n,Vo(t,r,i)]);e&&(e=>{throw new Error(`${ho("sendMessage",e)} failed: the ${fo(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${ho("getOneMessage",e)},\n\t${ho("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),s||(e=>{throw new Error(`${ho("sendMessage",e)} failed: the ${fo(e)} is not listening to incoming messages.`)})(r)}finally{i.abort(),delete zo[e.id]}},zo={},Vo=async(e,t,{signal:r})=>{_o(e,1,r),await(0,to.once)(e,"disconnect",{signal:r}),(e=>{throw new Error(`${ho("sendMessage",e)} failed: the ${fo(e)} exited without listening to incoming messages.`)})(t)},qo="execa:ipc:request",Yo="execa:ipc:response",Ko=async(e,t,r)=>{for(;!Zo(e,t)&&Jo.get(e)?.size>0;){const t=[...Jo.get(e)];Uo(t,r),await Promise.all(t.map((({onMessageSent:e})=>e)))}},Jo=new WeakMap,Zo=(e,t)=>t.listenerCount("message")>Qo(e),Qo=e=>Do.has(e)&&!ki(Do.get(e).options.buffer,"ipc")?1:0,Xo=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},i,{strict:s=!1}={})=>{const o="sendMessage";return so({methodName:o,isSubprocess:r,ipc:n,isConnected:e.connected}),ea({anyProcess:e,channel:t,methodName:o,isSubprocess:r,message:i,strict:s})},ea=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:i,strict:s})=>{const o=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:i})=>{if(!i)return n;const s=Po(e,t,r),o=Zo(e,s);return{id:Lo++,type:qo,message:n,hasListeners:o}})({anyProcess:e,channel:t,isSubprocess:n,message:i,strict:s}),a=((e,t,r)=>{Jo.has(e)||Jo.set(e,new Set);const n=Jo.get(e),i={onMessageSent:go(),id:r?t.id:void 0};return n.add(i),{outgoingMessages:n,outgoingMessage:i}})(e,o,s);try{await ta({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:o,message:i})}catch(t){throw mo(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},ta=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:i})=>{const s=ra(e);try{await Promise.all([Go(n,e,r),s(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${ho(t,r)} cannot be used: the ${fo(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if((({code:e,message:t})=>lo.has(e)||co.some((e=>t.includes(e))))(e))throw new Error(`${ho(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:i}),e}},ra=e=>{if(na.has(e))return na.get(e);const t=(0,Mn.promisify)(e.send.bind(e));return na.set(e,t),t},na=new WeakMap,ia=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await sa({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),ca.signal),sa=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{oa||(oa=!0,n?null!==t?(Po(e,t,r),await xs.scheduler.yield()):la():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let oa=!1;const aa=e=>e?.type===ua&&(ca.abort(e.message),!0),ua="execa:ipc:cancel",la=()=>{ca.abort(new Error(`\`cancelSignal\` aborted: the ${fo(!0)} disconnected.`))},ca=new AbortController,ha=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:i,controller:s})=>r?[da({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:i,controller:s})]:[],da=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:i}})=>{await ro(t,i);const s=pa(t);throw await((e,t)=>{const r="cancelSignal";return ao(r,!1,e.connected),ta({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:ua,message:t},message:t})})(e,s),eo({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:i}),n.terminationReason??="gracefulCancel",t.reason},pa=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},fa=(e,t,r,n)=>0===t||void 0===t?[]:[ma(e,t,r,n)],ma=async(e,t,r,{signal:n})=>{throw await(0,xs.setTimeout)(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new Os},ga=e(import.meta.url)("node:v8"),ba={advanced:e=>{try{(0,ga.serialize)(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},ya=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},Da=new Set(["utf8","utf16le"]),wa=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),va=new Set([...Da,...wa]),Ea={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Fa=e=>"string"==typeof e?`"${e}"`:String(e),Ca=()=>{try{return Vt.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},Sa=(e,t,r)=>{r.cwd=((e=Ca())=>{const t=Vn(e,'The "cwd" option');return un.resolve(t)})(r.cwd);const[n,i,s]=((e,t,{node:r=!1,nodePath:n=Vt.execPath,nodeOptions:i=Vt.execArgv.filter((e=>!e.startsWith("--inspect"))),cwd:s,execPath:o,...a})=>{if(void 0!==o)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const u=Vn(n,'The "nodePath" option'),l=un.resolve(s,u),c={...a,nodePath:l,node:r,cwd:s};if(!r)return[e,t,c];if("node"===un.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[l,[...i,e,...t],{ipc:!0,...c,shell:!1}]})(e,t,r),{command:o,args:a,options:u}=Es._parse(n,i,s),l=(e=>{const t={...e};for(const r of Mi)t[r]=wi(e,r);return t})(u),c=xa(l);return(({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})`)})(c),(({encoding:e})=>{if(va.has(e))return;const t=(e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Ea?Ea[t]:va.has(t)?t:void 0})(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Fa(e)}\`.\nPlease rename it to ${Fa(t)}.`);const r=[...va].map((e=>Fa(e))).join(", ");throw new TypeError(`Invalid option \`encoding: ${Fa(e)}\`.\nPlease rename it to one of: ${r}.`)})(c),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");ba[r](e)}})(c),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(c),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(c),c.shell=Kn(c.shell),c.env=Oa(c),c.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return Ws(e,t)})(c.killSignal),c.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(c.forceKillAfterDelay),c.lines=c.lines.map(((e,t)=>e&&!wa.has(c.encoding)&&c.buffer[t])),"win32"===Vt.platform&&"cmd"===un.basename(o,".exe")&&a.unshift("/q"),{file:o,commandArguments:a,options:c}},xa=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:i="utf8",reject:s=!0,cleanup:o=!0,all:a=!1,windowsHide:u=!0,killSignal:l="SIGTERM",forceKillAfterDelay:c=!0,gracefulCancel:h=!1,ipcInput:d,ipc:p=void 0!==d||h,serialization:f="advanced",...m})=>({...m,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:i,reject:s,cleanup:o,all:a,windowsHide:u,killSignal:l,forceKillAfterDelay:c,gracefulCancel:h,ipcInput:d,ipc:p,serialization:f}),Oa=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:i,nodePath:s})=>{const o=t?{...Vt.env,...e}:e;return r||n?Ss({env:o,cwd:i,execPath:s,preferLocal:r,addExecPath:n}):o};function _a(e){if("string"==typeof e)return Aa(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Ta(e)}const Aa=e=>e.at(-1)===Ma?e.slice(0,e.at(-2)===Ia?-2:-1):e,Ta=e=>e.at(-1)===ka?e.subarray(0,e.at(-2)===ja?-2:-1):e,Ma="\n",ka=Ma.codePointAt(0),Ia="\r",ja=Ia.codePointAt(0);function Ba(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Pa(e,{checkOpen:t=!0}={}){return Ba(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Ra(e,{checkOpen:t=!0}={}){return Ba(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function $a(e,t){return Pa(e,t)&&Ra(e,t)}const Na=Object.getPrototypeOf(Object.getPrototypeOf((async function*(){})).prototype);class La{#k;#I;#j=!1;#B=void 0;constructor(e,t){this.#k=e,this.#I=t}next(){const e=()=>this.#P();return this.#B=this.#B?this.#B.then(e,e):e(),this.#B}return(e){const t=()=>this.#R(e);return this.#B?this.#B.then(t,t):t()}async#P(){if(this.#j)return{done:!0,value:void 0};let e;try{e=await this.#k.read()}catch(e){throw this.#B=void 0,this.#j=!0,this.#k.releaseLock(),e}return e.done&&(this.#B=void 0,this.#j=!0,this.#k.releaseLock()),e}async#R(e){if(this.#j)return{done:!0,value:e};if(this.#j=!0,!this.#I){const t=this.#k.cancel(e);return this.#k.releaseLock(),await t,{done:!0,value:e}}return this.#k.releaseLock(),{done:!0,value:e}}}const Ua=Symbol();function Wa(){return this[Ua].next()}function Ha(e){return this[Ua].return(e)}Object.defineProperty(Wa,"name",{value:"next"}),Object.defineProperty(Ha,"name",{value:"return"});const Ga=Object.create(Na,{next:{enumerable:!0,configurable:!0,writable:!0,value:Wa},return:{enumerable:!0,configurable:!0,writable:!0,value:Ha}});function za({preventCancel:e=!1}={}){const t=this.getReader(),r=new La(t,e),n=Object.create(Ga);return n[Ua]=r,n}const Va=e=>{if(Ra(e,{checkOpen:!1})&&void 0!==Ja.on)return Ya(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===qa.call(e))return za.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:qa}=Object.prototype,Ya=async function*(e){const t=new AbortController,r={};Ka(e,t,r);try{for await(const[r]of Ja.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},Ka=async(e,t,r)=>{try{await Ja.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},Ja={},Za=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:i,addChunk:s,getFinalChunk:o,finalize:a},{maxBuffer:u=Number.POSITIVE_INFINITY}={})=>{const l=Va(e),c=t();c.length=0;try{for await(const e of l){const t=r[tu(e)](e,c);Xa({convertedChunk:t,state:c,getSize:n,truncateChunk:i,addChunk:s,maxBuffer:u})}return Qa({state:c,convertChunk:r,getSize:n,truncateChunk:i,addChunk:s,getFinalChunk:o,maxBuffer:u}),a(c)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(c),t}},Qa=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:i,maxBuffer:s})=>{const o=i(e);void 0!==o&&Xa({convertedChunk:o,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:s})},Xa=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:i,maxBuffer:s})=>{const o=r(e),a=t.length+o;if(a<=s)return void eu(e,t,i,a);const u=n(e,s-t.length);throw void 0!==u&&eu(u,t,i,s),new nu},eu=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},tu=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=ru.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===ru.call(e.buffer)?"typedArray":"others"},{toString:ru}=Object.prototype;class nu extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const iu=(e,t,r)=>{if(t.length!==r)return;const n=new nu;throw n.maxBufferInfo={fdNumber:"ipc"},n},su=([,e])=>e,ou=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:i,errorCode:s,signal:o,signalDescription:a,exitCode:u,isCanceled:l,isGracefullyCanceled:c,isForcefullyTerminated:h,forceKillAfterDelay:d,killSignal:p})=>{const f=au(h,d);return t?`Command timed out after ${r} milliseconds${f}`:c?void 0===o?`Command was gracefully canceled with exit code ${u}`:h?`Command was gracefully canceled${f}`:`Command was gracefully canceled with ${o} (${a})`:l?`Command was canceled${f}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:i}=((e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const i=ki(t,r);return"ipc"===r?{streamName:"IPC output",threshold:i,unit:"messages"}:{streamName:Di(r),threshold:i,unit:n}})(e,t);return`Command's ${r} was larger than ${n} ${i}`})(e,i)}${f}`:void 0!==s?`Command failed with ${s}${f}`:h?`Command was killed with ${p} (${Ks(p)})${f}`:void 0!==o?`Command was killed with ${o} (${a})`:void 0!==u?`Command failed with exit code ${u}`:"Command failed"},au=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",uu=e=>"string"==typeof e?e:Xn(e)?ii(e):"",lu=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:i,options:{cwd:s},startTime:o})=>pu({command:e,escapedCommand:t,cwd:s,durationMs:ws(o),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:i,pipedFrom:[]}),cu=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:i,startTime:s,isSync:o})=>hu({error:e,command:t,escapedCommand:r,startTime:s,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:i,isSync:o}),hu=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:i,isCanceled:s,isGracefullyCanceled:o,isMaxBuffer:a,isForcefullyTerminated:u,exitCode:l,signal:c,stdio:h,all:d,ipcOutput:p,options:{timeoutDuration:f,timeout:m=f,forceKillAfterDelay:g,killSignal:b,cwd:y,maxBuffer:D},isSync:w})=>{const{exitCode:v,signal:E,signalDescription:F}=fu(l,c),{originalMessage:C,shortMessage:S,message:x}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:i,signalDescription:s,exitCode:o,escapedCommand:a,timedOut:u,isCanceled:l,isGracefullyCanceled:c,isMaxBuffer:h,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f,maxBuffer:m,timeout:g,cwd:b})=>{const y=n?.code,D=ou({originalError:n,timedOut:u,timeout:g,isMaxBuffer:h,maxBuffer:m,errorCode:y,signal:i,signalDescription:s,exitCode:o,isCanceled:l,isGracefullyCanceled:c,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f}),w=((e,t)=>{if(e instanceof Os)return;const r=Ts(n=e)&&As in n?e.originalMessage:String(e?.message??e);var n;const i=Ni(((e,t)=>{if(t===Ca())return e;let r;try{r=(0,an.statSync)(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===i?void 0:i})(n,b),v=`${D}: ${a}${void 0===w?"":`\n${w}`}`,E=[v,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map((e=>(e=>"string"==typeof e?e:(0,Mn.inspect)(e))(e))).join("\n")].map((e=>Ni(_a((e=>Array.isArray(e)?e.map((e=>_a(uu(e)))).filter(Boolean).join("\n"):uu(e))(e))))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:v,message:E}})({stdio:h,all:d,ipcOutput:p,originalError:e,signal:E,signalDescription:F,exitCode:v,escapedCommand:r,timedOut:i,isCanceled:s,isGracefullyCanceled:o,isMaxBuffer:a,isForcefullyTerminated:u,forceKillAfterDelay:g,killSignal:b,maxBuffer:D,timeout:m,cwd:y}),O=((e,t,r)=>new(r?ks:Ms)(t,e instanceof Os?{}:{cause:e}))(e,x,w);return Object.assign(O,du({error:O,command:t,escapedCommand:r,startTime:n,timedOut:i,isCanceled:s,isGracefullyCanceled:o,isMaxBuffer:a,isForcefullyTerminated:u,exitCode:v,signal:E,signalDescription:F,stdio:h,all:d,ipcOutput:p,cwd:y,originalMessage:C,shortMessage:S})),O},du=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:i,isCanceled:s,isGracefullyCanceled:o,isMaxBuffer:a,isForcefullyTerminated:u,exitCode:l,signal:c,signalDescription:h,stdio:d,all:p,ipcOutput:f,cwd:m,originalMessage:g,shortMessage:b})=>pu({shortMessage:b,originalMessage:g,command:t,escapedCommand:r,cwd:m,durationMs:ws(n),failed:!0,timedOut:i,isCanceled:s,isGracefullyCanceled:o,isTerminated:void 0!==c,isMaxBuffer:a,isForcefullyTerminated:u,exitCode:l,signal:c,signalDescription:h,code:e.cause?.code,stdout:d[1],stderr:d[2],all:p,stdio:d,ipcOutput:f,pipedFrom:[]}),pu=e=>Object.fromEntries(Object.entries(e).filter((([,e])=>void 0!==e))),fu=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:Ks(t)}},mu=e=>Number.isFinite(e)?e:0;function gu(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let i=[];const s=(e,r,n,s)=>{if(0!==i.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(s??=String(e),t.colonNotation){const e=s.includes(".")?s.split(".")[0].length:s.length,t=i.length>0?2:1;s="0".repeat(Math.max(0,t-e))+s}else s+=t.verbose?" "+(o=r,1===(a=e)||1n===a?o:`${o}s`):n;var o,a;i.push(s)}},o=function(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(mu(1e3*e)%1e3),nanoseconds:Math.trunc(mu(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}(e),a=BigInt(o.days);if(t.hideYearAndDays?s(24n*BigInt(a)+BigInt(o.hours),"hour","h"):(t.hideYear?s(a,"day","d"):(s(a/365n,"year","y"),s(a%365n,"day","d")),s(Number(o.hours),"hour","h")),s(Number(o.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){const e=Number(o.seconds),r=Number(o.milliseconds),n=Number(o.microseconds),i=Number(o.nanoseconds);if(s(e,"second","s"),t.formatSubMilliseconds)s(r,"millisecond","ms"),s(n,"microsecond","\xb5s"),s(i,"nanosecond","ns");else{const e=r+n/1e3+i/1e6,o="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),u=o?e.toFixed(o):a;s(Number.parseFloat(u),"millisecond","ms",u)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),i=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");s(Number.parseFloat(i),"second","s",i)}if(0===i.length)return n+"0"+(t.verbose?" milliseconds":"ms");const u=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(i=i.slice(0,Math.max(t.unitCount,1))),n+i.join(u)}const bu=(e,t)=>{const r=`(done in ${gu(e.durationMs)})`;hs({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},yu=(e,t,{reject:r})=>{if(((e,t)=>{Ii(t)&&(((e,t)=>{e.failed&&hs({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),bu(e,t))})(e,t),e.failed&&r)throw e;return e},Du=(e,t)=>_u(e)?"asyncGenerator":Au(e)?"generator":Mu(e)?"fileUrl":ku(e)?"filePath":$u(e)?"webStream":Ba(e,{checkOpen:!1})?"native":Xn(e)?"uint8Array":Lu(e)?"asyncIterable":Uu(e)?"iterable":Nu(e)?Eu({transform:e},t):Tu(e)?wu(e,t):"native",wu=(e,t)=>$a(e.transform,{checkOpen:!1})?vu(e,t):Nu(e.transform)?Eu(e,t):Su(e,t),vu=(e,t)=>(Fu(e,t,"Duplex stream"),"duplex"),Eu=(e,t)=>(Fu(e,t,"web TransformStream"),"webTransform"),Fu=({final:e,binary:t,objectMode:r},n,i)=>{Cu(e,`${n}.final`,i),Cu(t,`${n}.binary`,i),xu(r,`${n}.objectMode`)},Cu=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},Su=({transform:e,final:t,binary:r,objectMode:n},i)=>{if(void 0!==e&&!Ou(e))throw new TypeError(`The \`${i}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if($a(t,{checkOpen:!1}))throw new TypeError(`The \`${i}.final\` option must not be a Duplex stream.`);if(Nu(t))throw new TypeError(`The \`${i}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!Ou(t))throw new TypeError(`The \`${i}.final\` option must be a generator.`);return xu(r,`${i}.binary`),xu(n,`${i}.objectMode`),_u(e)||_u(t)?"asyncGenerator":"generator"},xu=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},Ou=e=>_u(e)||Au(e),_u=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),Au=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),Tu=e=>Gn(e)&&(void 0!==e.transform||void 0!==e.final),Mu=e=>"[object URL]"===Object.prototype.toString.call(e),ku=e=>Gn(e)&&Object.keys(e).length>0&&Object.keys(e).every((e=>Iu.has(e)))&&ju(e.file),Iu=new Set(["file","append"]),ju=e=>"string"==typeof e,Bu=new Set(["ipc","ignore","inherit","overlapped","pipe"]),Pu=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),Ru=e=>"[object WritableStream]"===Object.prototype.toString.call(e),$u=e=>Pu(e)||Ru(e),Nu=e=>Pu(e?.readable)&&Ru(e?.writable),Lu=e=>Wu(e)&&"function"==typeof e[Symbol.asyncIterator],Uu=e=>Wu(e)&&"function"==typeof e[Symbol.iterator],Wu=e=>"object"==typeof e&&null!==e,Hu=new Set(["generator","asyncGenerator","duplex","webTransform"]),Gu=new Set(["fileUrl","filePath","fileNumber"]),zu=new Set(["fileUrl","filePath"]),Vu=new Set([...zu,"webStream","nodeStream"]),qu=new Set(["webTransform","duplex"]),Yu={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ku=(e,t,r,n)=>"output"===n?Ju(e,t,r):Zu(e,t,r),Ju=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Zu=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Qu=(e,t,r,{encoding:n})=>{const i=e.filter((({type:e})=>Hu.has(e))),s=Array.from({length:i.length});for(const[e,o]of Object.entries(i))s[e]=Xu({stdioItem:o,index:Number(e),newTransforms:s,optionName:t,direction:r,encoding:n});return nl(s,r)},Xu=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:i,direction:s,encoding:o})=>"duplex"===t?el({stdioItem:e,optionName:i}):"webTransform"===t?tl({stdioItem:e,index:r,newTransforms:n,direction:s}):rl({stdioItem:e,index:r,newTransforms:n,direction:s,encoding:o}),el=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:i=n}},optionName:s})=>{if(i&&!n)throw new TypeError(`The \`${s}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!i&&n)throw new TypeError(`The \`${s}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},tl=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:i})=>{const{transform:s,objectMode:o}=Gn(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:u}=Ku(o,r,n,i);return{...e,value:{transform:s,writableObjectMode:a,readableObjectMode:u}}},rl=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:i,encoding:s})=>{const{transform:o,final:a,binary:u=!1,preserveNewlines:l=!1,objectMode:c}=Gn(t)?t:{transform:t},h=u||wa.has(s),{writableObjectMode:d,readableObjectMode:p}=Ku(c,r,n,i);return{...e,value:{transform:o,final:a,binary:h,preserveNewlines:l,writableObjectMode:d,readableObjectMode:p}}},nl=(e,t)=>"input"===t?e.reverse():e,il=["input","output","output"],sl=()=>{},ol=()=>"input",al={generator:sl,asyncGenerator:sl,fileUrl:sl,filePath:sl,iterable:ol,asyncIterable:ol,uint8Array:ol,webStream:e=>Ru(e)?"output":"input",nodeStream:e=>Ra(e,{checkOpen:!1})?Pa(e,{checkOpen:!1})?void 0:"input":"output",webTransform:sl,duplex:sl,native(e){const t=ul(e);return void 0!==t?t:Ba(e,{checkOpen:!1})?al.nodeStream(e):void 0}},ul=e=>[0,Vt.stdin].includes(e)?"input":[1,2,Vt.stdout,Vt.stderr].includes(e)?"output":void 0,ll=e=>yi.some((t=>void 0!==e[t])),cl=(e,t)=>Array.isArray(e)?e.map((e=>cl(e,t))):null==e?t>=yi.length?"ignore":"pipe":e,hl=e=>"pipe"===e||Array.isArray(e)&&e.every((e=>"pipe"===e)),dl=({value:e,optionName:t,fdNumber:r,direction:n})=>{const i=pl(e,r);if(void 0!==i){if("output"===n)return{type:"fileNumber",value:i,optionName:t};if(Yt.isatty(i))throw new TypeError(`The \`${t}: ${Oo(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ei((0,an.readFileSync)(i)),optionName:t}}},pl=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=bi.indexOf(e);return-1!==r?r:void 0},fl=(e,t,r)=>{const n=bi[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},ml=({input:e,inputFile:t},r)=>0===r?[...gl(e),...yl(t)]:[],gl=e=>void 0===e?[]:[{type:bl(e),value:e,optionName:"input"}],bl=e=>{if(Ra(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(Xn(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},yl=e=>void 0===e?[]:[{...Dl(e),optionName:"inputFile"}],Dl=e=>{if(Mu(e))return{type:"fileUrl",value:e};if(ju(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},wl=({otherStdioItems:e,type:t,value:r,optionName:n,direction:i})=>{const s=e.filter((e=>vl(e,r)));if(0===s.length)return;const o=s.find((e=>e.direction!==i));return El(o,n,t),"output"===i?s[0].stream:void 0},vl=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,El=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Yu[r]} that is the same.`)},Fl=(e,t,r,n)=>{const i=(({stdio:e,ipc:t,buffer:r,...n},i,s)=>{const o=((e,t)=>{if(void 0===e)return yi.map((e=>t[e]));if(ll(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${yi.map((e=>`\`${e}\``)).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,yi.length);return Array.from({length:r},((t,r)=>e[r]))})(e,n).map(((e,t)=>cl(e,t)));return s?((e,t,r)=>e.map(((e,n)=>t[n]||0===n||ji(r,n)||!hl(e)?e:"ignore")))(o,r,i):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(o,t)})(t,r,n),s=i.map(((e,r)=>Cl({stdioOption:e,fdNumber:r,options:t,isSync:n}))),o=kl({initialFileDescriptors:s,addProperties:e,options:t,isSync:n});return t.stdio=o.map((({stdioItems:e})=>Pl(e))),o},Cl=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const i=Di(t),{stdioItems:s,isStdioArray:o}=Sl({stdioOption:e,fdNumber:t,options:r,optionName:i}),a=((e,t,r)=>{const n=e.map((e=>(({type:e,value:t},r)=>il[r]??al[e](t))(e,t)));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??"output"})(s,t,i),u=s.map((e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:i,isSync:s})=>r&&"native"===t?s?(({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:i})=>{const s=dl({value:t,optionName:r,fdNumber:n,direction:i});if(void 0!==s)return s;if(Ba(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e})({stdioItem:e,fdNumber:n,direction:i}):(({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:fl(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:fl(t,t,r),optionName:r}:Ba(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e)({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:o,fdNumber:t,direction:a,isSync:n}))),l=((e,t,r,n)=>[...e.filter((({type:e})=>!Hu.has(e))),...Qu(e,t,r,n)])(u,i,a,r),c=((e,t)=>{const r=e.findLast((({type:e})=>Hu.has(e)));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return Ml(l,c),{direction:a,objectMode:c,stdioItems:l}},Sl=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const i=(e=>e.filter(((t,r)=>e.every(((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))))([...(Array.isArray(e)?e:[e]).map((e=>xl(e,n))),...ml(r,t)]),s=i.length>1;return Ol(i,s,n),Al(i),{stdioItems:i,isStdioArray:s}},xl=(e,t)=>({type:Du(e,t),value:e,optionName:t}),Ol=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(_l.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},_l=new Set(["ignore","ipc"]),Al=e=>{for(const t of e)Tl(t)},Tl=({type:e,value:t,optionName:r})=>{if((e=>Mu(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!Bu.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},Ml=(e,t)=>{if(!t)return;const r=e.find((({type:e})=>Gu.has(e)));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},kl=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const i=[];try{for(const s of e)i.push(Il({fileDescriptor:s,fileDescriptors:i,addProperties:t,options:r,isSync:n}));return i}catch(e){throw Bl(i),e}},Il=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:i,options:s,isSync:o})=>{const a=r.map((t=>jl({stdioItem:t,addProperties:i,direction:e,options:s,fileDescriptors:n,isSync:o})));return{direction:e,objectMode:t,stdioItems:a}},jl=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:i,isSync:s})=>{const o=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:i,isSync:s})=>{const o=((e,t)=>e.flatMap((({direction:e,stdioItems:r})=>r.filter((e=>e.type===t)).map((t=>({...t,direction:e}))))))(i,e);if(0!==o.length){if(!s)return Vu.has(e)?wl({otherStdioItems:o,type:e,value:t,optionName:r,direction:n}):void(qu.has(e)&&(({otherStdioItems:e,type:t,value:r,optionName:n})=>{const i=e.find((({value:{transform:e}})=>e===r.transform));El(i,n,t)})({otherStdioItems:o,type:e,value:t,optionName:r}));(({otherStdioItems:e,type:t,value:r,optionName:n,direction:i})=>{zu.has(t)&&wl({otherStdioItems:e,type:t,value:r,optionName:n,direction:i})})({otherStdioItems:o,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:i,isSync:s});return void 0!==o?{...e,stream:o}:{...e,...t[r][e.type](e,n)}},Bl=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||gi(e)||e.destroy()},Pl=e=>{if(e.length>1)return e.some((({value:e})=>"overlapped"===e))?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},Rl=({type:e,optionName:t})=>{$l(t,Yu[e])},$l=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},Nl={generator(){},asyncGenerator:Rl,webStream:Rl,nodeStream:Rl,webTransform:Rl,duplex:Rl,asyncIterable:Rl,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||$l(e,`"${t}"`),{})},Ll={input:{...Nl,fileUrl:({value:e})=>({contents:[ei((0,an.readFileSync)(e))]}),filePath:({value:{file:e}})=>({contents:[ei((0,an.readFileSync)(e))]}),fileNumber:Rl,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...Nl,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:Rl,string:Rl,uint8Array:Rl}},Ul=(e,{stripFinalNewline:t},r)=>Wl(t,r)&&void 0!==e&&!Array.isArray(e)?_a(e):e,Wl=(e,t)=>"all"===t?e[1]||e[2]:e[t],Hl=e(import.meta.url)("node:stream"),Gl=(e,t,r,n)=>e||r?void 0:ql(t,n),zl=(e,t,r)=>r?e.flatMap((e=>Vl(e,t))):Vl(e,t),Vl=(e,t)=>{const{transform:r,final:n}=ql(t,{});return[...r(e),...n()]},ql=(e,t)=>(t.previousChunks="",{transform:Yl.bind(void 0,t,e),final:Jl.bind(void 0,t)}),Yl=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,i=-1;for(let s=0;s<r.length;s+=1)if("\n"===r[s]){const o=Kl(r,s,t,e);let a=r.slice(i+1,s+1-o);n.length>0&&(a=Xl(n,a),n=""),yield a,i=s}i!==r.length-1&&(n=Xl(n,r.slice(i+1))),e.previousChunks=n},Kl=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Jl=function*({previousChunks:e}){e.length>0&&(yield e)},Zl=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Ql.bind(void 0,n)},Ql=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:i,concatBytes:s}="string"==typeof t?ec:tc;if(t.at(-1)===i)return void(yield t);const o=e?n:r;yield s(t,o)},Xl=(e,t)=>`${e}${t}`,ec={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Xl},tc={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},rc=e(import.meta.url)("node:buffer"),nc=(e,t)=>e?void 0:ic.bind(void 0,t),ic=function*(e,t){if("string"!=typeof t&&!Xn(t)&&!rc.Buffer.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},sc=(e,t)=>e?oc.bind(void 0,t):ac.bind(void 0,t),oc=function*(e,t){uc(e,t),yield t},ac=function*(e,t){if(uc(e,t),"string"!=typeof t&&!Xn(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},uc=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},lc=(e,t,r)=>{if(r)return;if(e)return{transform:cc.bind(void 0,new TextEncoder)};const n=new Zn.StringDecoder(t);return{transform:hc.bind(void 0,n),final:dc.bind(void 0,n)}},cc=function*(e,t){rc.Buffer.isBuffer(t)?yield ei(t):"string"==typeof t?yield e.encode(t):yield t},hc=function*(e,t){yield Xn(t)?e.write(t):t},dc=function*(e){const t=e.end();""!==t&&(yield t)},pc=(0,Mn.callbackify)((async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}})),fc=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=yc}=t[r];for await(const i of n(e))yield*fc(i,t,r+1)},mc=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*gc(r,Number(t),e)},gc=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*fc(n,r,t+1)},bc=(0,Mn.callbackify)((async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())})),yc=function*(e){yield e},Dc=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},wc=(e,t)=>[...t.flatMap((t=>[...vc(t,e,0)])),...Ec(e)],vc=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=Cc}=t[r];for(const i of n(e))yield*vc(i,t,r+1)},Ec=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*Fc(r,Number(t),e)},Fc=function*(e,t,r){if(void 0!==e)for(const n of e())yield*vc(n,r,t+1)},Cc=function*(e){yield e},Sc=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:i},optionName:s},{encoding:o})=>{const a={},u=Oc(e,o,s),l=_u(t),c=_u(r),h=l?pc.bind(void 0,fc,a):Dc.bind(void 0,vc),d=l||c?pc.bind(void 0,mc,a):Dc.bind(void 0,Ec),p=l||c?bc.bind(void 0,a):void 0;return{stream:new Hl.Transform({writableObjectMode:n,writableHighWaterMark:(0,Hl.getDefaultHighWaterMark)(n),readableObjectMode:i,readableHighWaterMark:(0,Hl.getDefaultHighWaterMark)(i),transform(e,t,r){h([e,u,0],this,r)},flush(e){d([u],this,e)},destroy:p})}},xc=(e,t,r,n)=>{const i=t.filter((({type:e})=>"generator"===e)),s=n?i.reverse():i;for(const{value:t,optionName:n}of s){const i=Oc(t,r,n);e=wc(i,e)}return e},Oc=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:i,preserveNewlines:s},o,a)=>{const u={};return[{transform:nc(n,a)},lc(r,o,n),Gl(r,s,n,u),{transform:e,final:t},{transform:sc(i,a)},Zl({binary:r,preserveNewlines:s,readableObjectMode:i,state:u})].filter(Boolean)},_c=(e,t,r)=>{const{stdioItems:n}=e[t],i=n.filter((({contents:e})=>void 0!==e));if(0===i.length)return;if(0!==t){const[{type:e,optionName:t}]=i;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Yu[e]} with synchronous methods.`)}const s=i.map((({contents:e})=>e)).map((e=>Ac(e,n)));r.input=si(s)},Ac=(e,t)=>{const r=xc(e,t,"utf8",!0);return Tc(r),si(r)},Tc=e=>{const t=e.find((e=>"string"!=typeof e&&!Xn(e)));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},Mc=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&ji(r,n)&&!wa.has(t)&&kc(n)&&(e.some((({type:e,value:t})=>"native"===e&&Ic.has(t)))||e.every((({type:e})=>Hu.has(e)))),kc=e=>1===e||2===e,Ic=new Set(["pipe","overlapped"]),jc=e=>e._readableState.pipes.length>0,Bc=(e,t,r)=>{const n=ms(e);hs({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Pc=(e,t,r,n)=>{try{return xc(e,t,r,!1)}catch(t){return n.error=t,e}},Rc=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:i,fdNumber:s})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:si(e)};const o=((e,t)=>((e,t)=>{if("utf8"===t&&e.every((e=>"string"==typeof e)))return e;const r=new Zn.StringDecoder(t),n=e.map((e=>"string"==typeof e?ri(e):e)).map((e=>r.write(e))),i=r.end();return""===i?n:[...n,i]})(e,t).join(""))(e,r);return n[s]?{serializedResult:o,finalResult:zl(o,!i[s],t)}:{serializedResult:o}},$c=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:i,stdioItems:s,objectMode:o})=>{if(!Mc({stdioItems:s,encoding:i,verboseInfo:n,fdNumber:t}))return;const a=zl(e,!1,o);try{((e,t,r)=>{for(const n of e)Bc(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Nc=(e,t,r)=>{for(const{path:n,append:i}of t.filter((({type:e})=>Gu.has(e)))){const t="string"==typeof n?n:n.toString();i||r.has(t)?(0,an.appendFileSync)(n,e):(r.add(t),(0,an.writeFileSync)(n,e))}},Lc=async e=>{try{return await(0,to.once)(e,"exit")}catch{return Lc(e)}},Uc=async e=>{const[t,r]=await e;if(!Wc(t,r)&&Hc(t,r))throw new Os;return[t,r]},Wc=(e,t)=>void 0===e&&void 0===t,Hc=(e,t)=>0!==e||null!==t,Gc=(e,t,r)=>void 0!==e?e:Hc(t,r)?new Os:void 0,zc=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Vc=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&qc("ipcInput"),e&&qc("ipc: true"),r&&qc("detached: true"),n&&qc("cancelSignal")},qc=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Yc=({file:e,commandArguments:t,options:r,command:n,escapedCommand:i,verboseInfo:s,fileDescriptors:o,startTime:a})=>{const u=Kc({file:e,commandArguments:t,options:r,command:n,escapedCommand:i,fileDescriptors:o,startTime:a});if(u.failed)return u;const{resultError:l,exitCode:c,signal:h,timedOut:d,isMaxBuffer:p}=(({error:e,status:t,signal:r,output:n},{maxBuffer:i})=>{const s=Gc(e,t,r),o="ETIMEDOUT"===s?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some((e=>null!==e&&e.length>su(r))))(s,n,i);return{resultError:s,exitCode:t,signal:r,timedOut:o,isMaxBuffer:a}})(u,r),{output:f,error:m=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:i})=>{if(null===t)return{output:Array.from({length:3})};const s={},o=new Set([]);return{output:t.map(((t,a)=>(({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:i,isMaxBuffer:s,verboseInfo:o},{buffer:a,encoding:u,lines:l,stripFinalNewline:c,maxBuffer:h})=>{if(null===e)return;const d=((e,t,r)=>{if(!t)return e;const n=su(r);return e.length>n?e.slice(0,n):e})(e,s,h),p=ei(d),{stdioItems:f,objectMode:m}=t[r],g=Pc([p],f,u,n),{serializedResult:b,finalResult:y=b}=Rc({chunks:g,objectMode:m,encoding:u,lines:l,stripFinalNewline:c,fdNumber:r});$c({serializedResult:b,fdNumber:r,state:n,verboseInfo:o,encoding:u,stdioItems:f,objectMode:m});const D=a[r]?y:void 0;try{return void 0===n.error&&Nc(b,f,i),D}catch(e){return n.error=e,D}})({result:t,fileDescriptors:e,fdNumber:a,state:s,outputFiles:o,isMaxBuffer:n,verboseInfo:i},r))),...s}})({fileDescriptors:o,syncResult:u,options:r,isMaxBuffer:p,verboseInfo:s}),g=f.map(((e,t)=>Ul(e,r,t))),b=Ul((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Ul(t,r,"all")]:Array.isArray(t)?[Ul(e,r,"all"),...t]:Xn(e)&&Xn(t)?ai([e,t]):`${e}${t}`})(f,r),r,"all");return Zc({error:m,exitCode:c,signal:h,timedOut:d,isMaxBuffer:p,stdio:g,all:b,options:r,command:n,escapedCommand:i,startTime:a})},Kc=({file:e,commandArguments:t,options:r,command:n,escapedCommand:i,fileDescriptors:s,startTime:o})=>{try{((e,t)=>{for(const r of(e=>new Set(Object.entries(e).filter((([,{direction:e}])=>"input"===e)).map((([e])=>Number(e)))))(e))_c(e,r,t)})(s,r);const n=Jc(r);return(0,on.spawnSync)(e,t,n)}catch(e){return cu({error:e,command:n,escapedCommand:i,fileDescriptors:s,options:r,startTime:o,isSync:!0})}},Jc=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:su(t)}),Zc=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:i,stdio:s,all:o,options:a,command:u,escapedCommand:l,startTime:c})=>void 0===e?lu({command:u,escapedCommand:l,stdio:s,all:o,ipcOutput:[],options:a,startTime:c}):hu({error:e,command:u,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:i,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:s,all:o,ipcOutput:[],options:a,startTime:c,isSync:!0}),Qc=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:i=!0,filter:s}={})=>(so({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:No(e)}),Xc({anyProcess:e,channel:t,isSubprocess:r,filter:s,reference:i})),Xc=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:i})=>{Ao(t,i);const s=Po(e,t,r),o=new AbortController;try{return await Promise.race([eh(s,n,o),th(s,r,o),rh(s,r,o)])}catch(t){throw mo(e),t}finally{o.abort(),Mo(t,i)}},eh=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await(0,to.once)(e,"message",{signal:r});return t}for await(const[n]of(0,to.on)(e,"message",{signal:r}))if(t(n))return n},th=async(e,t,{signal:r})=>{await(0,to.once)(e,"disconnect",{signal:r}),(e=>{throw new Error(`${ho("getOneMessage",e)} could not complete: the ${fo(e)} exited or disconnected.`)})(t)},rh=async(e,t,{signal:r})=>{const[n]=await(0,to.once)(e,"strict:error",{signal:r});throw uo(n,t)},nh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:i=!0}={})=>ih({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:i}),ih=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:i,reference:s})=>{so({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:No(e)}),Ao(t,s);const o=Po(e,t,r),a=new AbortController,u={};return sh(e,o,a),oh({ipcEmitter:o,isSubprocess:r,controller:a,state:u}),ah({anyProcess:e,channel:t,ipcEmitter:o,isSubprocess:r,shouldAwait:i,controller:a,state:u,reference:s})},sh=async(e,t,r)=>{try{await(0,to.once)(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},oh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[i]=await(0,to.once)(e,"strict:error",{signal:r.signal});n.error=uo(i,t),r.abort()}catch{}},ah=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:i,controller:s,state:o,reference:a}){try{for await(const[e]of(0,to.on)(r,"message",{signal:s.signal}))uh(o),yield e}catch{uh(o)}finally{s.abort(),Mo(t,a),n||mo(e),i&&await e}},uh=({error:e})=>{if(e)throw e},lh=(e,t,r)=>({sendMessage:Xo.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:Qc.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:nh.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),ch=()=>{const e=new Hl.PassThrough;return e.end(),e},hh=()=>new Hl.Readable({read(){}}),dh=()=>new Hl.Writable({write(){}}),ph=()=>new Hl.Duplex({read(){},write(){}}),fh=async(e,t,r)=>yu(e,t,r),mh=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Yu[e]}.`)},gh={fileNumber:mh,generator:Sc,asyncGenerator:Sc,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Hl.Duplex.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},bh={input:{...gh,fileUrl:({value:e})=>({stream:(0,an.createReadStream)(e)}),filePath:({value:{file:e}})=>({stream:(0,an.createReadStream)(e)}),webStream:({value:e})=>({stream:Hl.Readable.fromWeb(e)}),iterable:({value:e})=>({stream:Hl.Readable.from(e)}),asyncIterable:({value:e})=>({stream:Hl.Readable.from(e)}),string:({value:e})=>({stream:Hl.Readable.from(e)}),uint8Array:({value:e})=>({stream:Hl.Readable.from(rc.Buffer.from(e))})},output:{...gh,fileUrl:({value:e})=>({stream:(0,an.createWriteStream)(e)}),filePath:({value:{file:e,append:t}})=>({stream:(0,an.createWriteStream)(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Hl.Writable.fromWeb(e)}),iterable:mh,asyncIterable:mh,string:mh,uint8Array:mh}},yh=e(import.meta.url)("node:stream/promises");function Dh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some((({readableObjectMode:e})=>e)),r=wh(e,t),n=new vh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const wh=(e,t)=>{if(0===e.length)return(0,Hl.getDefaultHighWaterMark)(t);const r=e.filter((({readableObjectMode:e})=>e===t)).map((({readableHighWaterMark:e})=>e));return Math.max(...r)};class vh extends Hl.PassThrough{#$=new Set([]);#N=new Set([]);#L=new Set([]);#U;#W=Symbol("unpipe");#H=new WeakMap;add(e){if(Sh(e),this.#$.has(e))return;this.#$.add(e),this.#U??=Eh(this,this.#$,this.#W);const t=xh({passThroughStream:this,stream:e,streams:this.#$,ended:this.#N,aborted:this.#L,onFinished:this.#U,unpipeEvent:this.#W});this.#H.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#$.has(e))return!1;const t=this.#H.get(e);return void 0!==t&&(this.#H.delete(e),e.unpipe(this),await t,!0)}}const Eh=async(e,t,r)=>{Ph(e,Rh);const n=new AbortController;try{await Promise.race([Fh(e,n),Ch(e,t,r,n)])}finally{n.abort(),Ph(e,-Rh)}},Fh=async(e,{signal:t})=>{try{await(0,yh.finished)(e,{signal:t,cleanup:!0})}catch(t){throw Mh(e,t),t}},Ch=async(e,t,r,{signal:n})=>{for await(const[i]of(0,to.on)(e,"unpipe",{signal:n}))t.has(i)&&i.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:i,onFinished:s,unpipeEvent:o})=>{Ph(e,$h);const a=new AbortController;try{await Promise.race([Oh(s,t,a),_h({passThroughStream:e,stream:t,streams:r,ended:n,aborted:i,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:i,unpipeEvent:o,controller:a})])}finally{a.abort(),Ph(e,-$h)}r.size>0&&r.size===n.size+i.size&&(0===n.size&&i.size>0?Ih(e):Th(e))},Oh=async(e,t,{signal:r})=>{try{await e,r.aborted||Ih(t)}catch(e){r.aborted||Mh(t,e)}},_h=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:i,controller:{signal:s}})=>{try{await(0,yh.finished)(t,{signal:s,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(s.aborted||!r.has(t))return;kh(n)?i.add(t):jh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:i,controller:{signal:s}})=>{if(await(0,to.once)(e,i,{signal:s}),!e.readable)return(0,to.once)(s,"abort",{signal:s});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Mh=(e,t)=>{kh(t)?Ih(e):jh(e,t)},kh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ih=e=>{(e.readable||e.writable)&&e.destroy()},jh=(e,t)=>{e.destroyed||(e.once("error",Bh),e.destroy(t))},Bh=()=>{},Ph=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Rh=2,$h=1,Nh=(e,t)=>{e.pipe(t),Lh(e,t),Wh(e,t)},Lh=async(e,t)=>{if(!gi(e)&&!gi(t)){try{await(0,yh.finished)(e,{cleanup:!0,readable:!0,writable:!1})}catch{}Uh(t)}},Uh=e=>{e.writable&&e.end()},Wh=async(e,t)=>{if(!gi(e)&&!gi(t)){try{await(0,yh.finished)(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Hh(e)}},Hh=e=>{e.readable&&e.destroy()},Gh=(e,t,r,n)=>{"output"===r?Nh(e.stdio[n],t):Nh(t,e.stdio[n]);const i=zh[n];void 0!==i&&(e[i]=t),e.stdio[n]=t},zh=["stdin","stdout","stderr"],Vh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:i,controller:s})=>{if(void 0===t)return;qh(t,s);const[o,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],u=i.get(o)??[];i.set(o,[...u,a])},qh=(e,{signal:t})=>{gi(e)&&_o(e,Yh,t)},Yh=2,Kh=(e,t,r,...n)=>{if(Array.isArray(r))return{destination:t(Jh,e)(r,...n),pipeOptions:e};if("string"==typeof r||r instanceof URL||Yn(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[i,s,o]=Jn(r,...n);return{destination:t(Jh)(i,s,o),pipeOptions:o}}if(Do.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},Jh=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),Zh=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>cu({error:e,command:Qh,escapedCommand:Qh,fileDescriptors:t,options:r,startTime:n,isSync:!1}),Qh="source.pipe(destination)",Xh=async e=>{const[{status:t,reason:r,value:n=r},{status:i,reason:s,value:o=s}]=await e;if(o.pipedFrom.includes(n)||o.pipedFrom.push(n),"rejected"===i)throw o;if("rejected"===t)throw n;return o},ed=new WeakMap,td=(e,t)=>void 0===e?[]:[rd(e,t)],rd=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:i,startTime:s})=>{await(0,Mn.aborted)(e,t),await r.remove(t);const o=new Error("Pipe canceled by `unpipeSignal` option.");throw Zh({error:o,fileDescriptors:n,sourceOptions:i,startTime:s})},nd=(e,...t)=>{if(Gn(t[0]))return nd.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...i)=>{const s=Ds(),{destination:o,destinationStream:a,destinationError:u,from:l,unpipeSignal:c}=((e,t,r)=>{try{const{destination:n,pipeOptions:{from:i,to:s,unpipeSignal:o}={}}=Kh(e,t,...r);return{destination:n,destinationStream:bo(n,s),from:i,unpipeSignal:o}}catch(e){return{destinationError:e}}})(r,n,i),{sourceStream:h,sourceError:d}=((e,t)=>{try{return{sourceStream:yo(e,t)}}catch(e){return{sourceError:e}}})(e,l),{options:p,fileDescriptors:f}=Do.get(e);return{sourcePromise:t,sourceStream:h,sourceOptions:p,sourceError:d,destination:o,destinationStream:a,destinationError:u,unpipeSignal:c,fileDescriptors:f,startTime:s}})(e,...t),i=id({...n,destination:r});return i.pipe=nd.bind(void 0,{...e,source:r,sourcePromise:i,boundOptions:{}}),i},id=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:i,destinationStream:s,destinationError:o,unpipeSignal:a,fileDescriptors:u,startTime:l})=>{const c=sd(e,i);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:i,sourceOptions:s,startTime:o})=>{const a=(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Hh(e),n):void 0!==t?(Uh(r),t):void 0)({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw Zh({error:a,fileDescriptors:i,sourceOptions:s,startTime:o})})({sourceStream:t,sourceError:n,destinationStream:s,destinationError:o,fileDescriptors:u,sourceOptions:r,startTime:l});const h=new AbortController;try{const e=((e,t,r)=>{const n=ed.has(t)?((e,t)=>{const r=ed.get(t);return r.add(e),r})(e,t):((e,t)=>{const r=Dh([e]);return Nh(r,t),ed.set(t,r),r})(e,t);return _o(e,2,r.signal),_o(t,1,r.signal),(async e=>{try{await(0,yh.finished)(e,{cleanup:!0,readable:!1,writable:!0})}catch{}ed.delete(e)})(t),n})(t,s,h);return await Promise.race([Xh(c),...td(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:u,startTime:l})])}finally{h.abort()}},sd=(e,t)=>Promise.allSettled([e,t]),od=e=>e,ad=()=>{},ud=({contents:e})=>e,ld=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},cd=e=>e.length,hd={init:()=>({contents:[]}),convertChunk:{string:od,buffer:od,arrayBuffer:od,dataView:od,typedArray:od,others:od},getSize:()=>1,truncateChunk:ad,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:ad,finalize:ud},dd=new TextEncoder,pd=e=>new Uint8Array(e),fd=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),md=e=>gd**Math.ceil(Math.log(e)/Math.log(gd)),gd=2,bd=()=>"resize"in ArrayBuffer.prototype,yd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>dd.encode(e),buffer:pd,arrayBuffer:pd,dataView:fd,typedArray:fd,others:ld},getSize:cd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const i=bd()?((e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:md(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r})(t,n):((e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(md(t));return new Uint8Array(r).set(new Uint8Array(e),0),r})(t,n);return new Uint8Array(i).set(e,r),i},getFinalChunk:ad,finalize:({contents:e,length:t})=>bd()?e:e.slice(0,t)},Dd=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),wd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:od,buffer:Dd,arrayBuffer:Dd,dataView:Dd,typedArray:Dd,others:ld},getSize:cd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:ud},vd=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:i,preserveNewlines:s})=>{const o=new AbortController;return Ed(t,o),Sd({stream:e,controller:o,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:i,shouldSplit:!e.readableObjectMode,preserveNewlines:s})},Ed=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Fd=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:i,allMixed:s})=>{const o=new AbortController;Cd(t,o,e);const a=e.readableObjectMode&&!s;return Sd({stream:e,controller:o,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!i})},Cd=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},Sd=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:i,shouldSplit:s,preserveNewlines:o})=>{const a=(0,to.on)(e,"data",{signal:t.signal,highWaterMark:Od,highWatermark:Od});return _d({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:i,shouldSplit:s,preserveNewlines:o})},xd=(0,Hl.getDefaultHighWaterMark)(!0),Od=xd,_d=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:i,shouldSplit:s,preserveNewlines:o}){const a=Ad({binary:r,shouldEncode:n,encoding:i,shouldSplit:s,preserveNewlines:o});try{for await(const[t]of e)yield*vc(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*Ec(a)}},Ad=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:i})=>[lc(e,r,!t),Gl(e,i,!n,{})].filter(Boolean),Td=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:i,maxBuffer:s,lines:o,allMixed:a,stripFinalNewline:u,verboseInfo:l,streamInfo:c})=>{const h=Md({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:c});if(!i)return void await Promise.all([kd(e),h]);const d=Wl(u,r),p=Fd({stream:e,onStreamEnd:t,lines:o,encoding:n,stripFinalNewline:d,allMixed:a}),[f]=await Promise.all([Id({stream:e,iterable:p,fdNumber:r,encoding:n,maxBuffer:s,lines:o}),h]);return f},Md=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:i,verboseInfo:s,streamInfo:{fileDescriptors:o}})=>{if(!Mc({stdioItems:o[r]?.stdioItems,encoding:n,verboseInfo:s,fdNumber:r}))return;const a=Fd({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:i});await(async(e,t,r,n)=>{for await(const i of e)jc(t)||Bc(i,r,n)})(a,e,r,s)},kd=async e=>{await(0,xs.setImmediate)(),null===e.readableFlowing&&e.resume()},Id=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:i,maxBuffer:s,lines:o})=>{try{return t||o?await async function(e,t){return Za(e,hd,t)}(r,{maxBuffer:s}):"buffer"===i?new Uint8Array(await async function(e,t){return Za(e,yd,t)}(r,{maxBuffer:s})):await async function(e,t){return Za(e,wd,t)}(r,{maxBuffer:s})}catch(r){return Bd((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:i,fdNumber:s})=>{if(!(e instanceof nu))throw e;if("all"===s)return e;const o=((e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters")(r,n,i);throw e.maxBufferInfo={fdNumber:s,unit:o},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:o,encoding:i,fdNumber:n}))}},jd=async e=>{try{return await e}catch(e){return Bd(e)}},Bd=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===Qn.call(t)?new Uint8Array(e):e;var t},Pd=async(e,t,r,{isSameDirection:n,stopOnExit:i=!1}={})=>{const s=Rd(e,r),o=new AbortController;try{await Promise.race([...i?[r.exitPromise]:[],(0,yh.finished)(e,{cleanup:!0,signal:o.signal})])}catch(e){s.stdinCleanedUp||Ld(e,t,r,n)}finally{o.abort()}},Rd=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$d(e,r,n),n},$d=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...i)=>{Nd(t,r),n.call(e,...i)}},Nd=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Ld=(e,t,r,n)=>{if(!Ud(e,t,r,n))throw e},Ud=(e,t,r,n=!0)=>r.propagating?Gd(e)||Hd(e):(r.propagating=!0,Wd(r,t)===n?Gd(e):Hd(e)),Wd=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Hd=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gd=e=>"EPIPE"===e?.code,zd=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:i,lines:s,allMixed:o,stripFinalNewline:a,verboseInfo:u,streamInfo:l})=>{if(!e)return;const c=Pd(e,t,l);if(Wd(l,t))return void await c;const[h]=await Promise.all([Td({stream:e,onStreamEnd:c,fdNumber:t,encoding:r,buffer:n,maxBuffer:i,lines:s,allMixed:o,stripFinalNewline:a,verboseInfo:u,streamInfo:l}),c]);return h},Vd=({stdout:e,stderr:t,all:r},[,n,i])=>{const s=n||i;return s?n?i?{stream:r,buffer:s}:{stream:e,buffer:s}:{stream:t,buffer:s}:{stream:r,buffer:s}},qd=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,Yd=(e,t)=>{const r=ms(e);hs({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},Kd=async(e,t)=>(await Promise.allSettled([e]),t),Jd=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:i,timeoutDuration:s,cancelSignal:o,gracefulCancel:a,forceKillAfterDelay:u,stripFinalNewline:l,ipc:c,ipcInput:h},context:d,verboseInfo:p,fileDescriptors:f,originalStreams:m,onInternalError:g,controller:b})=>{const y=(async(e,t)=>{const[r,n]=await(async e=>{const[t,r]=await Promise.allSettled([(0,to.once)(e,"spawn"),(0,to.once)(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lc(e):r.value})(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,d),D={originalStreams:m,fileDescriptors:f,subprocess:e,exitPromise:y,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:i,stripFinalNewline:s,verboseInfo:o,streamInfo:a})=>e.stdio.map(((e,u)=>zd({stream:e,fdNumber:u,encoding:t,buffer:r[u],maxBuffer:n[u],lines:i[u],allMixed:!1,stripFinalNewline:s,verboseInfo:o,streamInfo:a}))))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:i,stripFinalNewline:l,verboseInfo:p,streamInfo:D}),v=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:i,stripFinalNewline:s,verboseInfo:o,streamInfo:a})=>zd({...Vd(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:i[1]||i[2],allMixed:qd(e),stripFinalNewline:s,verboseInfo:o,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:i,stripFinalNewline:l,verboseInfo:p,streamInfo:D}),E=[],F=(async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:i,verboseInfo:s})=>{if(!n)return i;const o=(e=>ji(e,"ipc"))(s),a=ki(t,"ipc"),u=ki(r,"ipc");for await(const t of ih({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(iu(0,i,u),i.push(t)),o&&Yd(t,s);return i})({subprocess:e,buffer:r,maxBuffer:n,ipc:c,ipcOutput:E,verboseInfo:p}),C=Zd(m,e,D),S=Qd(f,D);try{return await Promise.race([Promise.all([{},Uc(y),Promise.all(w),v,F,ya(e,h),...C,...S]),g,Xd(e,b),...fa(e,s,d,b),...no({subprocess:e,cancelSignal:o,gracefulCancel:a,context:d,controller:b}),...ha({subprocess:e,cancelSignal:o,gracefulCancel:a,forceKillAfterDelay:u,context:d,controller:b})])}catch(e){return d.terminationReason??="other",Promise.all([{error:e},y,Promise.all(w.map((e=>jd(e)))),jd(v),Kd(F,E),Promise.allSettled(C),Promise.allSettled(S)])}},Zd=(e,t,r)=>e.map(((e,n)=>e===t.stdio[n]?void 0:Pd(e,n,r))),Qd=(e,t)=>e.flatMap((({stdioItems:e},r)=>e.filter((({value:e,stream:t=e})=>Ba(t,{checkOpen:!1})&&!gi(t))).map((({type:e,value:n,stream:i=n})=>Pd(i,r,t,{isSameDirection:Hu.has(e),stopOnExit:"native"===e}))))),Xd=async(e,{signal:t})=>{const[r]=await(0,to.once)(e,"error",{signal:t});throw r},ep=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const i=n.get(t),s=go();return i.push(s),{resolve:s.resolve.bind(s),promises:i}},tp=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},rp=async e=>{if(void 0!==e)try{await np(e)}catch{}},np=async e=>{await(0,yh.finished)(e,{cleanup:!0,readable:!1,writable:!0})},ip=async e=>{await(0,yh.finished)(e,{cleanup:!0,readable:!0,writable:!1})},sp=async(e,t)=>{if(await e,t)throw t},op=(e,t,r)=>{r&&!Hd(r)?e.destroy(r):t&&e.destroy()},ap=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:i=!0,preserveNewlines:s=!0}={})=>{const o=i||wa.has(r),{subprocessStdout:a,waitReadableDestroy:u}=up(e,n,t),{readableEncoding:l,readableObjectMode:c,readableHighWaterMark:h}=lp(a,o),{read:d,onStdoutDataDone:p}=cp({subprocessStdout:a,subprocess:e,binary:o,encoding:r,preserveNewlines:s}),f=new Hl.Readable({read:d,destroy:(0,Mn.callbackify)(pp.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:u})),highWaterMark:h,objectMode:c,encoding:l});return dp({subprocessStdout:a,onStdoutDataDone:p,readable:f,subprocess:e}),f},up=(e,t,r)=>{const n=yo(e,t);return{subprocessStdout:n,waitReadableDestroy:ep(r,n,"readableDestroy")}},lp=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:xd},cp=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:i})=>{const s=go(),o=vd({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:i});return{read(){hp(this,o,s)},onStdoutDataDone:s}},hp=async(e,t,r)=>{try{const{value:n,done:i}=await t.next();i?r.resolve():e.push(n)}catch{}},dp=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:i})=>{try{await ip(e),await n,await rp(i),await t,r.readable&&r.push(null)}catch(e){await rp(i),fp(r,e)}},pp=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await tp(r,t)&&(fp(e,n),await sp(t,n))},fp=(e,t)=>{op(e,e.readable,t)},mp=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:i,waitWritableDestroy:s}=gp(e,r,t),o=new Hl.Writable({...bp(n,e,i),destroy:(0,Mn.callbackify)(vp.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:i,waitWritableDestroy:s})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wp(n,o),o},gp=(e,t,r)=>{const n=bo(e,t);return{subprocessStdin:n,waitWritableFinal:ep(r,n,"writableFinal"),waitWritableDestroy:ep(r,n,"writableDestroy")}},bp=(e,t,r)=>({write:yp.bind(void 0,e),final:(0,Mn.callbackify)(Dp.bind(void 0,e,t,r))}),yp=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},Dp=async(e,t,r)=>{await tp(r,t)&&(e.writable&&e.end(),await t)},wp=async(e,t,r)=>{try{await np(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await ip(e)}catch{}})(r),Ep(t,e)}},vp=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},i)=>{await tp(r,t),await tp(n,t)&&(Ep(e,i),await sp(t,i))},Ep=(e,t)=>{op(e,e.writable,t)},Fp=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:i,binary:s=!0,preserveNewlines:o=!0}={})=>{const a=s||wa.has(r),{subprocessStdout:u,waitReadableDestroy:l}=up(e,n,t),{subprocessStdin:c,waitWritableFinal:h,waitWritableDestroy:d}=gp(e,i,t),{readableEncoding:p,readableObjectMode:f,readableHighWaterMark:m}=lp(u,a),{read:g,onStdoutDataDone:b}=cp({subprocessStdout:u,subprocess:e,binary:a,encoding:r,preserveNewlines:o}),y=new Hl.Duplex({read:g,...bp(c,e,h),destroy:(0,Mn.callbackify)(Cp.bind(void 0,{subprocessStdout:u,subprocessStdin:c,subprocess:e,waitReadableDestroy:l,waitWritableFinal:h,waitWritableDestroy:d})),readableHighWaterMark:m,writableHighWaterMark:c.writableHighWaterMark,readableObjectMode:f,writableObjectMode:c.writableObjectMode,encoding:p});return dp({subprocessStdout:u,onStdoutDataDone:b,readable:y,subprocess:e,subprocessStdin:c}),wp(c,y,u),y},Cp=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:i,waitWritableDestroy:s},o)=>{await Promise.all([pp({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},o),vp({subprocessStdin:t,subprocess:r,waitWritableFinal:i,waitWritableDestroy:s},o)])},Sp=(e,t,{from:r,binary:n=!1,preserveNewlines:i=!1}={})=>{const s=n||wa.has(t),o=yo(e,r),a=vd({subprocessStdout:o,subprocess:e,binary:s,shouldEncode:!0,encoding:t,preserveNewlines:i});return xp(a,o,e)},xp=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Op=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ap.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=mp.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=Fp.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Sp.bind(void 0,e,t),e[Symbol.asyncIterator]=Sp.bind(void 0,e,t,{})},_p=(async()=>{})().constructor.prototype,Ap=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(_p,e)])),Tp=(e,t,r)=>{const{command:n,escapedCommand:i,startTime:s,verboseInfo:o}=vs(e,t,r),{file:a,commandArguments:u,options:l}=Sa(e,t,r),c=Mp(l),h=((e,t)=>Fl(bh,e,t,!1))(c,o);return{file:a,commandArguments:u,command:n,escapedCommand:i,startTime:s,verboseInfo:o,options:c,fileDescriptors:h}},Mp=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},kp=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:i,command:s,escapedCommand:o,fileDescriptors:a})=>{let u;try{u=(0,on.spawn)(e,t,r)}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:i,startTime:s,verboseInfo:o})=>{Bl(n);const a=new on.ChildProcess;((e,t)=>{const r=ch(),n=ch(),i=ch(),s=Array.from({length:t.length-3},ch),o=ch(),a=[r,n,i,...s];Object.assign(e,{stdin:r,stdout:n,stderr:i,all:o,stdio:a})})(a,n),Object.assign(a,{readable:hh,writable:dh,duplex:ph});const u=cu({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:i,startTime:s,isSync:!1});return{subprocess:a,promise:fh(u,o,i)}})({error:e,command:s,escapedCommand:o,fileDescriptors:a,options:r,startTime:n,verboseInfo:i})}const l=new AbortController;(0,to.setMaxListeners)(Number.POSITIVE_INFINITY,l.signal);const c=[...u.stdio];((e,t,r)=>{const n=new Map;for(const[i,{stdioItems:s,direction:o}]of Object.entries(t)){for(const{stream:t}of s.filter((({type:e})=>Hu.has(e))))Gh(e,t,o,i);for(const{stream:t}of s.filter((({type:e})=>!Hu.has(e))))Vh({subprocess:e,stream:t,direction:o,fdNumber:i,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:Dh(t);Nh(r,e)}})(u,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const i=Rr((()=>{e.kill()}));(0,to.addAbortListener)(n,(()=>{i()}))})(u,r,l);const h={},d=go();return u.kill=Js.bind(void 0,{kill:u.kill.bind(u),options:r,onInternalError:d,context:h,controller:l}),u.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?Dh([e,t].filter(Boolean)):void 0)(u,r),Op(u,r),((e,{ipc:t})=>{Object.assign(e,lh(e,!1,t))})(u,r),{subprocess:u,promise:Ip({subprocess:u,options:r,startTime:n,verboseInfo:i,fileDescriptors:a,originalStreams:c,command:s,escapedCommand:o,context:h,onInternalError:d,controller:l})}},Ip=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:i,originalStreams:s,command:o,escapedCommand:a,context:u,onInternalError:l,controller:c})=>{const[h,[d,p],f,m,g]=await Jd({subprocess:e,options:t,context:u,verboseInfo:n,fileDescriptors:i,originalStreams:s,onInternalError:l,controller:c});c.abort(),l.resolve();const b=f.map(((e,r)=>Ul(e,t,r))),y=Ul(m,t,"all"),D=jp({errorInfo:h,exitCode:d,signal:p,stdio:b,all:y,ipcOutput:g,context:u,options:t,command:o,escapedCommand:a,startTime:r});return yu(D,n,t)},jp=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:i,ipcOutput:s,context:o,options:a,command:u,escapedCommand:l,startTime:c})=>"error"in e?hu({error:e.error,command:u,escapedCommand:l,timedOut:"timeout"===o.terminationReason,isCanceled:"cancel"===o.terminationReason||"gracefulCancel"===o.terminationReason,isGracefullyCanceled:"gracefulCancel"===o.terminationReason,isMaxBuffer:e.error instanceof nu,isForcefullyTerminated:o.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:i,ipcOutput:s,options:a,startTime:c,isSync:!1}):lu({command:u,escapedCommand:l,stdio:n,all:i,ipcOutput:s,options:a,startTime:c}),Bp=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map((([t,r])=>[t,Pp(t,e[t],r)])));return{...e,...r}},Pp=(e,t,r)=>Rp.has(e)&&Gn(t)&&Gn(r)?{...t,...r}:r,Rp=new Set(["env",...Mi]),$p=(e,t,r,n)=>{const i=(e,t,n)=>$p(e,t,r,n),s=(...s)=>Np({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:i},...s);return void 0!==n&&n(s,i,t),s},Np=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:i},s,...o)=>{if(Gn(s))return i(e,Bp(r,s),n);const{file:a,commandArguments:u,options:l,isSync:c}=Lp({mapArguments:e,firstArgument:s,nextArguments:o,deepOptions:t,boundOptions:r});return c?((e,t,r)=>{const{file:n,commandArguments:i,command:s,escapedCommand:o,startTime:a,verboseInfo:u,options:l,fileDescriptors:c}=((e,t,r)=>{const{command:n,escapedCommand:i,startTime:s,verboseInfo:o}=vs(e,t,r),a=zc(r),{file:u,commandArguments:l,options:c}=Sa(e,t,a);Vc(c);const h=((e,t)=>Fl(Ll,e,t,!0))(c,o);return{file:u,commandArguments:l,command:n,escapedCommand:i,startTime:s,verboseInfo:o,options:c,fileDescriptors:h}})(e,t,r),h=Yc({file:n,commandArguments:i,options:l,command:s,escapedCommand:o,verboseInfo:u,fileDescriptors:c,startTime:a});return yu(h,u,l)})(a,u,l):((e,t,r,n)=>{const{file:i,commandArguments:s,command:o,escapedCommand:a,startTime:u,verboseInfo:l,options:c,fileDescriptors:h}=Tp(e,t,r),{subprocess:d,promise:p}=kp({file:i,commandArguments:s,options:c,startTime:u,verboseInfo:l,command:o,escapedCommand:a,fileDescriptors:h});return d.pipe=nd.bind(void 0,{source:d,sourcePromise:p,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Ap){const i=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:i})}})(d,p),Do.set(d,{options:c,fileDescriptors:h}),d})(a,u,l,i)},Lp=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:i})=>{const s=(o=t,Array.isArray(o)&&Array.isArray(o.raw)?((e,t)=>{let r=[];for(const[n,i]of e.entries())r=li({templates:e,expressions:t,tokens:r,index:n,template:i});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...i]=r;return[n,i,{}]})(t,r):[t,...r]);var o;const[a,u,l]=Jn(...s),c=Bp(Bp(n,i),l),{file:h=a,commandArguments:d=u,options:p=c,isSync:f=!1}=e({file:a,commandArguments:u,options:c});return{file:h,commandArguments:d,options:p,isSync:f}},Up=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Wp(e);return{file:r,commandArguments:n}},Wp=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Hp)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Hp=/ +/g,Gp=({options:e})=>({...zp(e),isSync:!0}),zp=e=>({options:{...Vp(e),...e}}),Vp=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{},qp=$p((()=>({}))),{sendMessage:Yp,getOneMessage:Kp,getEachMessage:Jp,getCancelSignal:Zp}=($p((()=>({isSync:!0}))),$p((({file:e,commandArguments:t})=>Up(e,t))),$p((({file:e,commandArguments:t})=>({...Up(e,t),isSync:!0}))),$p((({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}})),$p((({options:e})=>zp(e)),{},{preferLocal:!0},((e,t,r)=>{e.sync=t(Gp,r),e.s=e.sync})),(()=>{const e=Vt,t=!0,r=void 0!==Vt.channel;return{...lh(e,t,r),getCancelSignal:ia.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}})());var Qp=n(5600);function Xp({vue:e,react:t}){const r=t&&e||!t&&!e?"base":t?"react":"vue";return{eslintConfig:{extends:`@nice-move/eslint-config-${r}`},devDependencies:{[`@nice-move/eslint-config-${r}`]:Un["eslint-config-base"],eslint:Un.eslint}}}const ef="Add/Reset project dependencies";function tf(){const{dependencies:e={},devDependencies:t={}}=fn();return{instructions:!1,optionsPerPage:20,message:ef,name:"Dependencies",type:e=>!1===e?null:"multiselect",choices:["tailwindcss","react","vue","typescript","commitlint","eslint","stylelint","prettier","syncpack","garou","ava","playwright","@bring-it/sftp","@bring-it/npm","best-shot"].map((r=>({title:r,value:r,selected:r in e||r in t}))),format:e=>{if(e.length>0)return t=>function(e,t={}){return(new Lt.Json).config({pretty:!0}).source("package.json").onFail().onDone((async(r={})=>{const{devDependencies:n={},dependencies:i={}}=r,{ava:s="ava"in n,commitlint:o="commitlint"in n,eslint:a="eslint"in n,garou:u="garou"in n,prettier:l="prettier"in n,react:c="react"in i,stylelint:h="stylelint"in n,syncpack:d="syncpack"in n,typescript:p="typescript"in n,vue:f="vue"in i,tailwindcss:m="tailwindcss"in i||"tailwindcss"in n,playwright:g,"@bring-it/sftp":b="@bring-it/sftp"in n,"@bring-it/npm":y="@bring-it/npm"in n,"best-shot":D="best-shot"in n}=t,w=a||h||l||u,v=[w?"npm run lint:staged":void 0,p?"npm run lint:type":void 0,s?"npm test":void 0].filter(Boolean);return v.length>0&&await(new Lt.Text).onDone((()=>["#!/bin/sh","",...v,""].join("\n"))).output(".githooks/pre-commit"),o&&await(new Lt.Text).onDone((()=>["#!/bin/sh","npx --no-install nice-move lint commit",""].join("\n\n"))).output(".githooks/commit-msg"),d&&await(new Lt.Text).onDone((()=>["// @ts-check","import defineConfig from '@nice-move/syncpack-config/define.cjs';","export default defineConfig(import.meta.url, {});","// export { default } from '@nice-move/syncpack-config';"].join("\n\n"))).output("syncpack.config.mjs"),p&&await(new Lt.Json).config({pretty:!0}).onDone((()=>({extends:"@nice-move/tsconfig/base.json",include:["./"]}))).output("tsconfig.json"),On(...[r,e&&(w||s||o||g||p)?{scripts:{prepare:"nice-move git hooks"}}:void 0,u?{devDependencies:{garou:Un.garou},"nice-move":{"import-groups":["nice-move-preset"]}}:void 0,p?{devDependencies:{typescript:Un.typescript,"@nice-move/tsconfig":Un.tsconfig},scripts:{"lint:type":"tsc --noEmit"}}:void 0,w||o?{devDependencies:{"@nice-move/cli":Un.cli}}:void 0,w?{scripts:{"lint:staged":"nice-move lint staged"}}:void 0,s?{devDependencies:{ava:Un.ava,...a?{"eslint-plugin-ava":Un["eslint-plugin-ava"]}:void 0},scripts:{prepublishOnly:r.private?void 0:v.join(" && ")||void 0,test:"ava --fail-fast",snapshot:"ava --fail-fast -u"}}:void 0,a?Xp({react:c,vue:f}):void 0,h?{devDependencies:{"@nice-move/stylelint-config":Un["stylelint-config"],stylelint:Un.stylelint},stylelint:{extends:"@nice-move/stylelint-config"}}:void 0,d?{devDependencies:{"@nice-move/syncpack-config":Un["syncpack-config"],syncpack:Un.syncpack},scripts:{"lint:version":"syncpack lint","version:pin":"syncpack fix-mismatches"}}:void 0,l?{devDependencies:{"@nice-move/prettier-config":Un["prettier-config"],prettier:Un.prettier},prettier:"@nice-move/prettier-config"}:void 0,c?{dependencies:{react:Un.react,"react-dom":Un["react-dom"]},peerDependencies:{"@types/react":Un["@types/react"]}}:void 0,f?{dependencies:{vue:Un.vue}}:void 0,m?{dependencies:{tailwindcss:Un.tailwindcss},devDependencies:{"prettier-plugin-tailwindcss":l?Un["prettier-plugin-tailwindcss"]:void 0}}:void 0,g?{scripts:{"pretest:e2e":"npm link @playwright/test","test:e2e":"playwright test"}}:void 0,b?{devDependencies:{"@bring-it/sftp":Un["@bring-it/sftp"]}}:void 0,y?{devDependencies:{"@bring-it/npm":Un["@bring-it/npm"]}}:void 0,D?{devDependencies:{"best-shot":Un["best-shot"]},"nice-move":{globals:{BEST_SHOT:"readonly"}},scripts:{build:"best-shot prod"}}:void 0].filter(Boolean))})).output().logger(ef).catch(console.warn)}(t,Object.fromEntries(e.map((e=>[e,!0]))))}}}const rf="Initialize as git repository";function nf(){return qp("git",["init"]).then((e=>(console.log(Dr("\u221a"),rf),e)),(e=>{throw console.log(yr("\xd7"),rf),e}))}function sf({gitSupported:e,isRoot:t}){return{message:rf,name:"GitInit",initial:!0,type:r=>!1===r||!e||t?null:"confirm",format(e){if(!0===e)return nf}}}var of=n(1416),af=n(5982);const uf=/(?<=^v?|\sv?)(?:(?:0|[1-9]\d{0,9}?)\.){2}(?:0|[1-9]\d{0,9})(?:-(?:--+)?(?:0|[1-9]\d*|\d*[a-z]+\d*)){0,100}(?=$| |\+|\.)(?:(?<=-\S+)(?:\.(?:--?|[\da-z-]*[a-z-]\d*|0|[1-9]\d*)){1,100}?)?(?!\.)(?:\+(?:[\da-z]\.?-?){1,100}?(?!\w))?(?!\+)/gi;async function lf(){const e=await qp("git",["--version"]).then((({stdout:e})=>Boolean(e))),t=e&&await qp("git",["rev-parse","--git-dir"]).then((({stdout:e})=>".git"===e)).catch((()=>!1)),r=!!t&&await qp("git",["status","--short"]).then((({stdout:e})=>e.length>0)),n=0===(0,an.readdirSync)(process.cwd()).filter((e=>".git"!==e)).length,i=fn(),s=process.cwd(),o={gitSupported:e,isRoot:t,isDirty:r,isEmpty:n,pkg:i,cwd:s},a=await async function({cwd:e,pkg:{author:t,description:r,license:n,name:i,private:s,version:o,workspaces:a}={}}){return[{format:dn,initial:(0,un.parse)(e).base,message:"package.json \xbb name",name:"name",type:e=>!1===e||i?null:"text",validate:e=>af(dn(e)||"").validForNewPackages},{format:dn,initial:"0.0.0",message:"package.json \xbb version",name:"version",type:e=>!1===e||o?null:"text",validate:e=>uf.test(dn(e)||"")},{format:dn,message:"package.json \xbb description",name:"description",type:e=>!1===e||r?null:"text"},{active:"MIT",format:e=>e?"MIT":"UNLICENSED",inactive:"UNLICENSED",initial:!0,message:"package.json \xbb license",name:"license",type:e=>!1===e||n?null:"toggle"},{type:e=>!1===e||("string"==typeof t?t:t&&t.name)?null:"text",format:of,initial:await pn(t),message:"package.json \xbb author",name:"author"},{active:"true",inactive:"false",initial:!1,message:"package.json \xbb private",name:"private",format:e=>!1===e?void 0:e,type:e=>!1===e||void 0!==s?null:"toggle"},{active:"recommend",inactive:"false",initial:!1,message:"package.json \xbb workspaces",name:"workspaces",format:e=>e?["packages/*","tools/*"]:void 0,type:(e,t)=>{return!1===e||!1===s||!1===t.private||(r=a&&a.packages?a.packages:a,Array.isArray(r)&&r.length>0)?null:"toggle";var r}}]}(o);return Qp([{active:"do it",inactive:"cancel",message:!0===r?"Repository not clean":"Workspace not empty",name:"okay",type:()=>n||!1===r?null:"toggle"},sf(o),...a,tf()],{onCancel(){throw new Error("cancel")}}).then((({okay:e,...t})=>{if(!1===e)throw new Error("cancel");return Object.entries(t)})).then((e=>{const t=a.map((({name:e})=>e)),r=Object.fromEntries(e.filter((([e])=>t.includes(e))));return{...Object.fromEntries(e.filter((([e])=>!t.includes(e)))),info:r,options:o}}))}process.on("SIGINT",(()=>{})),new class{constructor(e,t){this.root=t;const{bin:r,homepage:n,name:s="cheetor",repository:{url:o=""}={},version:a}="string"==typeof e?JSON.parse((0,i.readFileSync)(new URL(e,t))):e;this.homepage=n,this.repository=o.includes("github.com")?o.replace(/\.git$/,""):"";const u=$t(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 r=Object.keys(e);return 1===r.length&&r[0]}(r,s);l&&u.scriptName(l),this.cli=Promise.resolve(u)}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 r=await Nt(e,this.root);return t.command(r)})),this}commandSafe(e){return this.cli=this.cli.then((t=>function(e,t){return Nt(e,t).catch((e=>{if("ERR_MODULE_NOT_FOUND"===e.code&&e.message.endsWith(` imported from ${(0,b.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 r=e();return r&&r.command?t.command(r):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=>function(e,t){const{homepage:r,site:n=r,repository:i}=t,s=n&&n!==i,o=e.getInternalMethods(),a=(u=o.getCommandInstance().handlers,Object.keys(u).some((e=>e&&"$0"!==e)));var u;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: ${n}`),i&&e.epilogue(`Repository: ${i}`),e}(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").setup((()=>{(async function(){const{Dependencies:e,GitInit:t,Install:r,info:n,options:{isRoot:i}={}}=await lf();console.log("-".repeat(32));const s=[t,()=>function(e){return(new Lt.Json).config({pretty:!0}).source(Wn).onFail().onDone(((t={})=>On({engines:{node:Un.lts},publishConfig:e.private||t.private?void 0:{access:"public",registry:"https://registry.npmjs.org/"}},t,e))).onDone((e=>(!0===e.private&&async function(){"zh-CN"===await Ln()&&(new Lt.Text).source(".npmrc").onFail().onDone(((e="")=>e.trim()&&/registry\s*=\s*["']?https:\/\/mirrors\.tencent\.com\/npm\/["']?/i.test(e)?e:`registry = https://mirrors.tencent.com/npm/\r${e}`)).output().logger("Set registry to China mirror in",br(".npmrc")).catch(console.warn)}(),e))).output().logger("Add project info to",br(Wn)).catch(console.warn)}(n),Hn,bn,wr,()=>t||i?gn():void 0,()=>e?e(t||i):void 0,r].filter((e=>"function"==typeof e));for(const e of s){const t=await e();t&&t.catch&&t.catch((e=>{console.warn(e.message)}))}})().catch((e=>{if("cancel"!==e.message)throw e}))}));
1
+ import{__require as e}from"./chunk-D0Fku8VQ.mjs";import{readFileSync as t,readdirSync as n,statSync as r,writeFile as i}from"fs";import{notStrictEqual as a,strictEqual as o}from"assert";import{basename as s,dirname as c,extname as l,join as u,normalize as d,relative as f,resolve as p}from"path";import{format as m,inspect as h}from"util";import{fileURLToPath as g}from"url";const ee={right:S,center:ie},_=0,v=1,y=2,te=3;var ne=class{constructor(e){var t;this.width=e.width,this.wrap=(t=e.wrap)??!0,this.rows=[]}span(...e){let t=this.div(...e);t.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(``),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]==`string`)return this.applyLayoutDSL(e[0]);let t=e.map(e=>typeof e==`string`?this.colFromString(e):e);return this.rows.push(t),t}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]==`string`&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){let t=e.split(`
2
+ `).map(e=>e.split(` `)),n=0;return t.forEach(e=>{e.length>1&&C.stringWidth(e[0])>n&&(n=Math.min(Math.floor(this.width*.5),C.stringWidth(e[0])))}),t.forEach(e=>{this.div(...e.map((t,r)=>({text:t.trim(),padding:this.measurePadding(t),width:r===0&&e.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){let t=C.stripAnsi(e);return[0,t.match(/\s*$/)[0].length,0,t.match(/^\s*/)[0].length]}toString(){let e=[];return this.rows.forEach(t=>{this.rowToString(t,e)}),e.filter(e=>!e.hidden).map(e=>e.text).join(`
3
+ `)}rowToString(e,t){return this.rasterize(e).forEach((n,r)=>{let i=``;n.forEach((n,a)=>{let{width:o}=e[a],s=this.negatePadding(e[a]),c=n;if(s>C.stringWidth(n)&&(c+=` `.repeat(s-C.stringWidth(n))),e[a].align&&e[a].align!==`left`&&this.wrap){let t=ee[e[a].align];c=t(c,s),C.stringWidth(c)<s&&(c+=` `.repeat((o||0)-C.stringWidth(c)-1))}let l=e[a].padding||[0,0,0,0];l[te]&&(i+=` `.repeat(l[te])),i+=re(e[a],c,`| `),i+=c,i+=re(e[a],c,` |`),l[v]&&(i+=` `.repeat(l[v])),r===0&&t.length>0&&(i=this.renderInline(i,t[t.length-1]))}),t.push({text:i.replace(/ +$/,``),span:e.span})}),t}renderInline(e,t){let n=e.match(/^ */),r=n?n[0].length:0,i=t.text,a=C.stringWidth(i.trimRight());return t.span?this.wrap?r<a?e:(t.hidden=!0,i.trimRight()+` `.repeat(r-a)+e.trimLeft()):(t.hidden=!0,i+e):e}rasterize(e){let t=[],n=this.columnWidths(e),r;return e.forEach((e,i)=>{e.width=n[i],r=this.wrap?C.wrap(e.text,this.negatePadding(e),{hard:!0}).split(`
4
+ `):e.text.split(`
5
+ `),e.border&&(r.unshift(`.`+`-`.repeat(this.negatePadding(e)+2)+`.`),r.push(`'`+`-`.repeat(this.negatePadding(e)+2)+`'`)),e.padding&&(r.unshift(...Array(e.padding[_]||0).fill(``)),r.push(...Array(e.padding[y]||0).fill(``))),r.forEach((e,n)=>{t[n]||t.push([]);let r=t[n];for(let e=0;e<i;e++)r[e]===void 0&&r.push(``);r.push(e)})}),t}negatePadding(e){let t=e.width||0;return e.padding&&(t-=(e.padding[te]||0)+(e.padding[v]||0)),e.border&&(t-=4),t}columnWidths(e){if(!this.wrap)return e.map(e=>e.width||C.stringWidth(e.text));let t=e.length,n=this.width,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)=>t===void 0?Math.max(i,b(e[n])):t)}};function re(e,t,n){return e.border?/[.']-+[.']/.test(t)?``:t.trim().length===0?` `:n:``}function b(e){let t=e.padding||[],n=1+(t[te]||0)+(t[v]||0);return e.border?n+4:n}function x(){return typeof process==`object`&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function S(e,t){e=e.trim();let n=C.stringWidth(e);return n<t?` `.repeat(t-n)+e:e}function ie(e,t){e=e.trim();let n=C.stringWidth(e);return n>=t?e:` `.repeat(t-n>>1)+e}let C;function ae(e,t){return C=t,new ne({width:e?.width||x(),wrap:e?.wrap})}const oe=RegExp(`\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)`,`g`);function se(e){return e.replace(oe,``)}function ce(e,t){let[n,r]=e.match(oe)||[``,``];e=se(e);let i=``;for(let n=0;n<e.length;n++)n!==0&&n%t===0&&(i+=`
6
+ `),i+=e.charAt(n);return n&&r&&(i=`${n}${i}${r}`),i}function le(e){return ae(e,{stringWidth:e=>[...e].length,stripAnsi:se,wrap:ce})}function ue(e,t){let i=p(`.`,e),a,o=r(i);for(o.isDirectory()||(i=c(i));;){if(a=t(i,n(i)),a)return p(i,a);if(i=c(a=i),a===i)break}}function de(e){let t=e!==e.toLowerCase()&&e!==e.toUpperCase();if(t||(e=e.toLowerCase()),e.indexOf(`-`)===-1&&e.indexOf(`_`)===-1)return e;{let t=``,n=!1,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()),i!==0&&(r===`-`||r===`_`)?n=!0:r!==`-`&&r!==`_`&&(t+=r)}return t}}function fe(e,t){let n=e.toLowerCase();t||=`-`;let r=``;for(let i=0;i<e.length;i++){let a=n.charAt(i),o=e.charAt(i);a!==o&&i>0?r+=`${t}${n.charAt(i)}`:r+=o}return r}function pe(e){return e==null?!1:typeof e==`number`||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function me(e){if(Array.isArray(e))return e.map(e=>typeof e==`string`?e:e+``);e=e.trim();let t=0,n=null,r=null,i=null,a=[];for(let o=0;o<e.length;o++){if(n=r,r=e.charAt(o),r===` `&&!i){n!==` `&&t++;continue}r===i?i=null:(r===`'`||r===`"`)&&!i&&(i=r),a[t]||(a[t]=``),a[t]+=r}return a}var w;(function(e){e.BOOLEAN=`boolean`,e.STRING=`string`,e.NUMBER=`number`,e.ARRAY=`array`})(w||={});let T;var he=class{constructor(e){T=e}parse(e,t){let 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=me(e),i=typeof e==`string`,a=ge(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),s=Object.assign(Object.create(null),n.default),c=n.configObjects||[],l=n.envPrefix,u=o[`populate--`],d=u?`--`:`_`,f=Object.create(null),p=Object.create(null),m=n.__||T.format,h={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:[]},g=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,ee=RegExp(`^--`+o[`negation-prefix`]+`(.+)`);[].concat(n.array||[]).filter(Boolean).forEach(function(e){let t=typeof e==`object`?e.key:e,n=Object.keys(e).map(function(e){let t={boolean:`bools`,string:`strings`,number:`numbers`};return t[e]}).filter(Boolean).pop();n&&(h[n][t]=!0),h.arrays[t]=!0,h.keys.push(t)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(e){h.bools[e]=!0,h.keys.push(e)}),[].concat(n.string||[]).filter(Boolean).forEach(function(e){h.strings[e]=!0,h.keys.push(e)}),[].concat(n.number||[]).filter(Boolean).forEach(function(e){h.numbers[e]=!0,h.keys.push(e)}),[].concat(n.count||[]).filter(Boolean).forEach(function(e){h.counts[e]=!0,h.keys.push(e)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(e){h.normalize[e]=!0,h.keys.push(e)}),typeof n.narg==`object`&&Object.entries(n.narg).forEach(([e,t])=>{typeof t==`number`&&(h.nargs[e]=t,h.keys.push(e))}),typeof n.coerce==`object`&&Object.entries(n.coerce).forEach(([e,t])=>{typeof t==`function`&&(h.coercions[e]=t,h.keys.push(e))}),n.config!==void 0&&(Array.isArray(n.config)||typeof n.config==`string`?[].concat(n.config).filter(Boolean).forEach(function(e){h.configs[e]=!0}):typeof n.config==`object`&&Object.entries(n.config).forEach(([e,t])=>{(typeof t==`boolean`||typeof t==`function`)&&(h.configs[e]=t)})),Se(n.key,a,n.default,h.arrays),Object.keys(s).forEach(function(e){(h.aliases[e]||[]).forEach(function(t){s[t]=s[e]})});let _=null;k();let v=[],y=Object.assign(Object.create(null),{_:[]}),te={};for(let e=0;e<r.length;e++){let t=r[e],n=t.replace(/^-{3,}/,`---`),i,a,s,c,l,u;if(t!==`--`&&/^-/.test(t)&&D(t))ne(t);else if(n.match(/^---+(=|$)/)){ne(t);continue}else if(t.match(/^--.+=/)||!o[`short-option-groups`]&&t.match(/^-.+=/))c=t.match(/^--?([^=]+)=([\s\S]*)$/),c!==null&&Array.isArray(c)&&c.length>=3&&(E(c[1],h.arrays)?e=b(e,c[1],r,c[2]):E(c[1],h.nargs)===!1?x(c[1],c[2],!0):e=re(e,c[1],r,c[2]));else if(t.match(ee)&&o[`boolean-negation`])c=t.match(ee),c!==null&&Array.isArray(c)&&c.length>=2&&(a=c[1],x(a,E(a,h.arrays)?[!1]:!1));else if(t.match(/^--.+/)||!o[`short-option-groups`]&&t.match(/^-[^-]+/))c=t.match(/^--?(.+)/),c!==null&&Array.isArray(c)&&c.length>=2&&(a=c[1],E(a,h.arrays)?e=b(e,a,r):E(a,h.nargs)===!1?(l=r[e+1],l!==void 0&&(!l.match(/^-/)||l.match(g))&&!E(a,h.bools)&&!E(a,h.counts)||/^(true|false)$/.test(l)?(x(a,l),e++):x(a,De(a))):e=re(e,a,r));else if(t.match(/^-.\..+=/))c=t.match(/^-([^=]+)=([\s\S]*)$/),c!==null&&Array.isArray(c)&&c.length>=3&&x(c[1],c[2]);else if(t.match(/^-.\..+/)&&!t.match(g))l=r[e+1],c=t.match(/^-(.\..+)/),c!==null&&Array.isArray(c)&&c.length>=2&&(a=c[1],l!==void 0&&!l.match(/^-/)&&!E(a,h.bools)&&!E(a,h.counts)?(x(a,l),e++):x(a,De(a)));else if(t.match(/^-[^-]+/)&&!t.match(g)){s=t.slice(1,-1).split(``),i=!1;for(let n=0;n<s.length;n++){if(l=t.slice(n+2),s[n+1]&&s[n+1]===`=`){u=t.slice(n+3),a=s[n],E(a,h.arrays)?e=b(e,a,r,u):E(a,h.nargs)===!1?x(a,u):e=re(e,a,r,u),i=!0;break}if(l===`-`){x(s[n],l);continue}if(/[A-Za-z]/.test(s[n])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(l)&&E(l,h.bools)===!1){x(s[n],l),i=!0;break}if(s[n+1]&&s[n+1].match(/\W/)){x(s[n],l),i=!0;break}else x(s[n],De(s[n]))}a=t.slice(-1)[0],!i&&a!==`-`&&(E(a,h.arrays)?e=b(e,a,r):E(a,h.nargs)===!1?(l=r[e+1],l!==void 0&&(!/^(-|--)[^-]/.test(l)||l.match(g))&&!E(a,h.bools)&&!E(a,h.counts)||/^(true|false)$/.test(l)?(x(a,l),e++):x(a,De(a))):e=re(e,a,r))}else if(t.match(/^-[0-9]$/)&&t.match(g)&&E(t.slice(1),h.bools))a=t.slice(1),x(a,De(a));else if(t===`--`){v=r.slice(e+1);break}else if(o[`halt-at-non-option`]){v=r.slice(e);break}else ne(t)}ce(y,!0),ce(y,!1),ae(y),se(),he(y,h.aliases,s,!0),le(y),o[`set-placeholder-key`]&&ue(y),Object.keys(h.counts).forEach(function(e){be(y,e.split(`.`))||x(e,0)}),u&&v.length&&(y[d]=[]),v.forEach(function(e){y[d].push(e)}),o[`camel-case-expansion`]&&o[`strip-dashed`]&&Object.keys(y).filter(e=>e!==`--`&&e.includes(`-`)).forEach(e=>{delete y[e]}),o[`strip-aliased`]&&[].concat(...Object.keys(a).map(e=>a[e])).forEach(e=>{o[`camel-case-expansion`]&&e.includes(`-`)&&delete y[e.split(`.`).map(e=>de(e)).join(`.`)],delete y[e]});function ne(e){let t=C(`_`,e);(typeof t==`string`||typeof t==`number`)&&y._.push(t)}function re(e,t,n,r){let i,a=E(t,h.nargs);if(a=typeof a!=`number`||isNaN(a)?1:a,a===0)return O(r)||(_=Error(m(`Argument unexpected for: %s`,t))),x(t,De(t)),e;let s=O(r)?0:1;if(o[`nargs-eats-options`])n.length-(e+1)+s<a&&(_=Error(m(`Not enough arguments following: %s`,t))),s=a;else{for(i=e+1;i<n.length&&(!n[i].match(/^-[^0-9]/)||n[i].match(g)||D(n[i]));i++)s++;s<a&&(_=Error(m(`Not enough arguments following: %s`,t)))}let c=Math.min(s,a);for(!O(r)&&c>0&&(x(t,r),c--),i=e+1;i<c+e+1;i++)x(t,n[i]);return e+c}function b(e,t,n,r){let a=[],c=r||n[e+1],l=E(t,h.nargs);if(E(t,h.bools)&&!/^(true|false)$/.test(c))a.push(!0);else if(O(c)||O(r)&&/^-/.test(c)&&!g.test(c)&&!D(c)){if(s[t]!==void 0){let e=s[t];a=Array.isArray(e)?e:[e]}}else{O(r)||a.push(ie(t,r,!0));for(let r=e+1;r<n.length&&!(!o[`greedy-arrays`]&&a.length>0||l&&typeof l==`number`&&a.length>=l||(c=n[r],/^-/.test(c)&&!g.test(c)&&!D(c)));r++)e=r,a.push(ie(t,c,i))}return typeof l==`number`&&(l&&a.length<l||isNaN(l)&&a.length===0)&&(_=Error(m(`Not enough arguments following: %s`,t))),x(t,a),e}function x(e,t,n=i){if(/-/.test(e)&&o[`camel-case-expansion`]){let t=e.split(`.`).map(function(e){return de(e)}).join(`.`);S(e,t)}let r=ie(e,t,n),a=e.split(`.`);if(xe(y,a,r),h.aliases[e]&&h.aliases[e].forEach(function(e){let t=e.split(`.`);xe(y,t,r)}),a.length>1&&o[`dot-notation`]&&(h.aliases[a[0]]||[]).forEach(function(t){let n=t.split(`.`),i=[].concat(a);i.shift(),n=n.concat(i),(h.aliases[e]||[]).includes(n.join(`.`))||xe(y,n,r)}),E(e,h.normalize)&&!E(e,h.arrays)){let n=[e].concat(h.aliases[e]||[]);n.forEach(function(e){Object.defineProperty(te,e,{enumerable:!0,get(){return t},set(e){t=typeof e==`string`?T.normalize(e):e}})})}}function S(e,t){h.aliases[e]&&h.aliases[e].length||(h.aliases[e]=[t],f[t]=!0),h.aliases[t]&&h.aliases[t].length||S(t,e)}function ie(e,t,n){n&&(t=ye(t)),(E(e,h.bools)||E(e,h.counts))&&typeof t==`string`&&(t=t===`true`);let r=Array.isArray(t)?t.map(function(t){return C(e,t)}):C(e,t);return E(e,h.counts)&&(O(r)||typeof r==`boolean`)&&(r=_e()),E(e,h.normalize)&&E(e,h.arrays)&&(r=Array.isArray(t)?t.map(e=>T.normalize(e)):T.normalize(t)),r}function C(e,t){if(!o[`parse-positional-numbers`]&&e===`_`)return t;if(!E(e,h.strings)&&!E(e,h.bools)&&!Array.isArray(t)){let n=pe(t)&&o[`parse-numbers`]&&Number.isSafeInteger(Math.floor(parseFloat(`${t}`)));(n||!O(t)&&E(e,h.numbers))&&(t=Number(t))}return t}function ae(e){let t=Object.create(null);he(t,h.aliases,s),Object.keys(h.configs).forEach(function(n){let r=e[n]||t[n];if(r)try{let e=null,t=T.resolve(T.cwd(),r),i=h.configs[n];if(typeof i==`function`){try{e=i(t)}catch(t){e=t}if(e instanceof Error){_=e;return}}else e=T.require(t);oe(e)}catch(t){t.name===`PermissionDenied`?_=t:e[n]&&(_=Error(m(`Invalid JSON config file: %s`,r)))}})}function oe(e,t){Object.keys(e).forEach(function(n){let r=e[n],i=t?t+`.`+n:n;typeof r==`object`&&r&&!Array.isArray(r)&&o[`dot-notation`]?oe(r,i):(!be(y,i.split(`.`))||E(i,h.arrays)&&o[`combine-arrays`])&&x(i,r)})}function se(){c!==void 0&&c.forEach(function(e){oe(e)})}function ce(e,t){if(l===void 0)return;let n=typeof l==`string`?l:``,r=T.env();Object.keys(r).forEach(function(i){if(n===``||i.lastIndexOf(n,0)===0){let a=i.split(`__`).map(function(e,t){return t===0&&(e=e.substring(n.length)),de(e)});(t&&h.configs[a.join(`.`)]||!t)&&!be(e,a)&&x(a.join(`.`),r[i])}})}function le(e){let t,n=new Set;Object.keys(e).forEach(function(r){if(!n.has(r)&&(t=E(r,h.coercions),typeof t==`function`))try{let i=C(r,t(e[r]));[].concat(h.aliases[r]||[],r).forEach(t=>{n.add(t),e[t]=i})}catch(e){_=e}})}function ue(e){return h.keys.forEach(t=>{~t.indexOf(`.`)||e[t]===void 0&&(e[t]=void 0)}),e}function he(e,t,n,r=!1){Object.keys(n).forEach(function(i){be(e,i.split(`.`))||(xe(e,i.split(`.`),n[i]),r&&(p[i]=!0),(t[i]||[]).forEach(function(t){be(e,t.split(`.`))||xe(e,t.split(`.`),n[i])}))})}function be(e,t){let n=e;o[`dot-notation`]||(t=[t.join(`.`)]),t.slice(0,-1).forEach(function(e){n=n[e]||{}});let r=t[t.length-1];return typeof n==`object`?r in n:!1}function xe(e,t,n){let r=e;o[`dot-notation`]||(t=[t.join(`.`)]),t.slice(0,-1).forEach(function(e){e=ve(e),typeof r==`object`&&r[e]===void 0&&(r[e]={}),typeof r[e]!=`object`||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]});let i=ve(t[t.length-1]),a=E(t.join(`.`),h.arrays),s=Array.isArray(n),c=o[`duplicate-arguments-array`];!c&&E(i,h.nargs)&&(c=!0,(!O(r[i])&&h.nargs[i]===1||Array.isArray(r[i])&&r[i].length===h.nargs[i])&&(r[i]=void 0)),n===_e()?r[i]=_e(r[i]):Array.isArray(r[i])?c&&a&&s?r[i]=o[`flatten-duplicate-arrays`]?r[i].concat(n):(Array.isArray(r[i][0])?r[i]:[r[i]]).concat([n]):!c&&!!a==!!s?r[i]=n:r[i]=r[i].concat([n]):r[i]===void 0&&a?r[i]=s?n:[n]:c&&!(r[i]===void 0||E(i,h.counts)||E(i,h.bools))?r[i]=[r[i],n]:r[i]=n}function Se(...e){e.forEach(function(e){Object.keys(e||{}).forEach(function(e){h.aliases[e]||(h.aliases[e]=[].concat(a[e]||[]),h.aliases[e].concat(e).forEach(function(t){if(/-/.test(t)&&o[`camel-case-expansion`]){let n=de(t);n!==e&&h.aliases[e].indexOf(n)===-1&&(h.aliases[e].push(n),f[n]=!0)}}),h.aliases[e].concat(e).forEach(function(t){if(t.length>1&&/[A-Z]/.test(t)&&o[`camel-case-expansion`]){let n=fe(t,`-`);n!==e&&h.aliases[e].indexOf(n)===-1&&(h.aliases[e].push(n),f[n]=!0)}}),h.aliases[e].forEach(function(t){h.aliases[t]=[e].concat(h.aliases[e].filter(function(e){return t!==e}))}))})})}function E(e,t){let n=[].concat(h.aliases[e]||[],e),r=Object.keys(t),i=n.find(e=>r.includes(e));return i?t[i]:!1}function Ce(e){let t=Object.keys(h),n=[].concat(t.map(e=>h[e]));return n.some(function(t){return Array.isArray(t)?t.includes(e):t[e]})}function we(e,...t){let n=[].concat(...t);return n.some(function(t){let n=e.match(t);return n&&Ce(n[1])})}function Te(e){if(e.match(g)||!e.match(/^-[^-]+/))return!1;let t=!0,n,r=e.slice(1).split(``);for(let i=0;i<r.length;i++){if(n=e.slice(i+2),!Ce(r[i])){t=!1;break}if(r[i+1]&&r[i+1]===`=`||n===`-`||/[A-Za-z]/.test(r[i])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(n)||r[i+1]&&r[i+1].match(/\W/))break}return t}function D(e){return o[`unknown-options-as-args`]&&Ee(e)}function Ee(e){if(e=e.replace(/^-{3,}/,`--`),e.match(g)||Te(e))return!1;let t=/^-+([^=]+?)=[\s\S]*$/,n=/^-+([^=]+?)$/,r=/^-+([^=]+?)-$/,i=/^-+([^=]+?\d+)$/,a=/^-+([^=]+?)\W+.*$/;return!we(e,t,ee,n,r,i,a)}function De(e){return!E(e,h.bools)&&!E(e,h.counts)&&`${e}`in s?s[e]:Oe(ke(e))}function Oe(e){let t={[w.BOOLEAN]:!0,[w.STRING]:``,[w.NUMBER]:void 0,[w.ARRAY]:[]};return t[e]}function ke(e){let t=w.BOOLEAN;return E(e,h.strings)?t=w.STRING:E(e,h.numbers)?t=w.NUMBER:E(e,h.bools)?t=w.BOOLEAN:E(e,h.arrays)&&(t=w.ARRAY),t}function O(e){return e===void 0}function k(){Object.keys(h.counts).find(e=>E(e,h.arrays)?(_=Error(m(`Invalid configuration: %s, opts.count excludes opts.array.`,e)),!0):E(e,h.nargs)?(_=Error(m(`Invalid configuration: %s, opts.count excludes opts.narg.`,e)),!0):!1)}return{aliases:Object.assign({},h.aliases),argv:Object.assign(te,y),configuration:o,defaulted:Object.assign({},p),error:_,newAliases:Object.assign({},f)}}};function ge(e){let t=[],n=Object.create(null),r=!0;for(Object.keys(e).forEach(function(n){t.push([].concat(e[n],n))});r;){r=!1;for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++){let i=t[e].filter(function(e){return t[n].indexOf(e)!==-1});if(i.length){t[e]=t[e].concat(t[n]),t.splice(n,1),r=!0;break}}}return t.forEach(function(e){e=e.filter(function(e,t,n){return n.indexOf(e)===t});let t=e.pop();t!==void 0&&typeof t==`string`&&(n[t]=e)}),n}function _e(e){return e===void 0?1:e+1}function ve(e){return e===`__proto__`?`___proto___`:e}function ye(e){return typeof e==`string`&&(e[0]===`'`||e[0]===`"`)&&e[e.length-1]===e[0]?e.substring(1,e.length-1):e}var be,xe,Se;const E=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,Ce=(xe=(be=process==null?void 0:process.versions)?.node)??(Se=process==null?void 0:process.version)?.slice(1);if(Ce){let e=Number(Ce.match(/^([^.]+)/)[1]);if(e<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 we=process?process.env:{},Te=new he({cwd:process.cwd,env:()=>we,format:m,normalize:d,resolve:p,require:n=>{if(e!==void 0)return e(n);if(n.match(/\.json$/))return JSON.parse(t(n,`utf8`));throw Error(`only .json config files are supported in ESM`)}}),D=function(e,t){let n=Te.parse(e.slice(),t);return n.argv};D.detailed=function(e,t){return Te.parse(e.slice(),t)},D.camelCase=de,D.decamelize=fe,D.looksLikeNumber=pe;var Ee=D;function De(){return Oe()?0:1}function Oe(){return ke()&&!process.defaultApp}function ke(){return!!process.versions.electron}function O(){return process.argv[De()]}var k=class e extends Error{constructor(t){super(t||`yargs error`),this.name=`YError`,Error.captureStackTrace&&Error.captureStackTrace(this,e)}},Ae={fs:{readFileSync:t,writeFile:i},format:m,resolve:p,exists:e=>{try{return r(e).isFile()}catch{return!1}}};let A;var je=class{constructor(e){e||={},this.directory=e.directory||`./locales`,this.updateFiles=typeof e.updateFiles==`boolean`?e.updateFiles:!0,this.locale=e.locale||`en`,this.fallbackToLanguage=typeof e.fallbackToLanguage==`boolean`?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!=`string`)return this._taggedLiteral(arguments[0],...arguments);let t=e.shift(),n=function(){};return typeof e[e.length-1]==`function`&&(n=e.pop()),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(),A.format.apply(A.format,[this.cache[this.locale][t]||t].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),t=e.shift(),n=e.shift(),r=e.shift(),i=function(){};typeof e[e.length-1]==`function`&&(i=e.pop()),this.cache[this.locale]||this._readLocaleFile();let a=r===1?t:n;if(this.cache[this.locale][t]){let e=this.cache[this.locale][t];a=e[r===1?`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();let o=[a];return~a.indexOf(`%d`)&&o.push(r),A.format.apply(A.format,o.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){for(let t in this.cache[this.locale]||this._readLocaleFile(),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){let i=t[r+1];n+=e,i!==void 0&&(n+=`%s`)}),this.__.apply(this,[n].concat([].slice.call(t,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,t=this.writeQueue[0],n=t.directory,r=t.locale,i=t.cb,a=this._resolveLocaleFile(n,r),o=JSON.stringify(this.cache[r],null,2);A.fs.writeFile(a,o,`utf-8`,function(t){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),i(t)})}_readLocaleFile(){let e={},t=this._resolveLocaleFile(this.directory,this.locale);try{A.fs.readFileSync&&(e=JSON.parse(A.fs.readFileSync(t,`utf-8`)))}catch(n){if(n instanceof SyntaxError&&(n.message=`syntax error in `+t),n.code===`ENOENT`)e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,t){let n=A.resolve(e,`./`,t+`.json`);if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~t.lastIndexOf(`_`)){let r=A.resolve(e,`./`,t.split(`_`)[0]+`.json`);this._fileExistsSync(r)&&(n=r)}return n}_fileExistsSync(e){return A.exists(e)}};function Me(e,t){A=t;let n=new je(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}}const Ne=e=>Me(e,Ae);var Pe=Ne;const Fe=`require is not supported by ESM`,Ie=`loading a directory of commands is not supported yet for ESM`;let Le;try{Le=g(import.meta.url)}catch{Le=process.cwd()}const Re=Le.substring(0,Le.lastIndexOf(`node_modules`));var ze={assert:{notStrictEqual:a,strictEqual:o},cliui:le,findUp:ue,getEnv:e=>process.env[e],inspect:h,getCallerFile:()=>{throw new k(Ie)},getProcessArgvBin:O,mainFilename:Re||process.cwd(),Parser:Ee,path:{basename:s,dirname:c,extname:l,relative:f,resolve:p},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(e,t)=>process.emitWarning(e,t),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:process.stdout.columns===void 0?null:process.stdout.columns},readFileSync:t,require:()=>{throw new k(Fe)},requireDirectory:()=>{throw new k(Ie)},stringWidth:e=>[...e].length,y18n:Pe({directory:p(Le,`../../../locales`),updateFiles:!1})};function j(e,t,n,r){n.assert.notStrictEqual(e,t,r)}function Be(e,t){t.assert.strictEqual(typeof e,`string`)}function Ve(e){return Object.keys(e)}function M(e){return!!e&&!!e.then&&typeof e.then==`function`}function He(e){let t=e.replace(/\s{2,}/g,` `),n=t.split(/\s+(?![^[]*]|[^<]*>)/),r=/\.*[\][<>]/g,i=n.shift();if(!i)throw Error(`No command found in: ${e}`);let a={cmd:i.replace(r,``),demanded:[],optional:[]};return n.forEach((e,t)=>{let i=!1;e=e.replace(/\s/g,``),/\.+[\]>]/.test(e)&&t===n.length-1&&(i=!0),/^\[/.test(e)?a.optional.push({cmd:e.replace(r,``).split(`|`),variadic:i}):a.demanded.push({cmd:e.replace(r,``).split(`|`),variadic:i})}),a}const Ue=[`first`,`second`,`third`,`fourth`,`fifth`,`sixth`];function N(e,t,n){function r(){return typeof e==`object`?[{demanded:[],optional:[]},e,t]:[He(`cmd ${e}`),t,n]}try{let e=0,[t,n,i]=r(),a=[].slice.call(n);for(;a.length&&a[a.length-1]===void 0;)a.pop();let o=i||a.length;if(o<t.demanded.length)throw new k(`Not enough arguments provided. Expected ${t.demanded.length} but received ${a.length}.`);let s=t.demanded.length+t.optional.length;if(o>s)throw new k(`Too many arguments provided. Expected max ${s} but received ${o}.`);t.demanded.forEach(t=>{let n=a.shift(),r=We(n),i=t.cmd.filter(e=>e===r||e===`*`);i.length===0&&Ge(r,t.cmd,e),e+=1}),t.optional.forEach(t=>{if(a.length===0)return;let n=a.shift(),r=We(n),i=t.cmd.filter(e=>e===r||e===`*`);i.length===0&&Ge(r,t.cmd,e),e+=1})}catch(e){console.warn(e.stack)}}function We(e){return Array.isArray(e)?`array`:e===null?`null`:typeof e}function Ge(e,t,n){throw new k(`Invalid ${Ue[n]||`manyith`} argument. Expected ${t.join(` or `)} but received ${e}.`)}var Ke=class{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,t,n=!0,r=!1){if(N(`<array|function> [boolean] [boolean] [boolean]`,[e,t,n],arguments.length),Array.isArray(e)){for(let r=0;r<e.length;r++){if(typeof e[r]!=`function`)throw Error(`middleware must be a function`);let i=e[r];i.applyBeforeValidation=t,i.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e==`function`){let i=e;i.applyBeforeValidation=t,i.global=n,i.mutates=r,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,t){let n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(e=>{let r=[...n[t]||[],t];return e.option?!r.includes(e.option):!0}),e.option=t,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}};function qe(e){return e?e.map(e=>(e.applyBeforeValidation=!1,e)):[]}function Je(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(M(e))return e.then(e=>Promise.all([e,n(e,t)])).then(([e,t])=>Object.assign(e,t));{let r=n(e,t);return M(r)?r.then(t=>Object.assign(e,t)):Object.assign(e,r)}},e)}function Ye(e,t,n=e=>{throw e}){try{let n=Xe(e)?e():e;return M(n)?n.then(e=>t(e)):t(n)}catch(e){return n(e)}}function Xe(e){return typeof e==`function`}function Ze(t){if(e===void 0)return null;for(let n=0,r=Object.keys(e.cache),i;n<r.length;n++)if(i=e.cache[r[n]],i.exports===t)return i;return null}const Qe=/(^\*)|(^\$0)/;var $e=class{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){r||={},typeof r.recurse!=`boolean`&&(r.recurse=!1),Array.isArray(r.extensions)||(r.extensions=[`js`]);let i=typeof r.visit==`function`?r.visit:e=>e;r.visit=(e,t,n)=>{let 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,a){let o=[],s=qe(i);if(r||=()=>{},Array.isArray(e))if(nt(e))[e,...o]=e;else for(let t of e)this.addHandler(t);else if(at(e)){let t=Array.isArray(e.command)||typeof e.command==`string`?e.command:this.moduleName(e);e.aliases&&(t=[].concat(t,e.aliases)),this.addHandler(t,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(tt(n)){this.addHandler([e].concat(o),t,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e==`string`){let i=He(e);o=o.map(e=>He(e).cmd);let c=!1,l=[i.cmd].concat(o).filter(e=>Qe.test(e)?(c=!0,!1):!0);l.length===0&&c&&l.push(`$0`),c&&(i.cmd=l[0],o=l.slice(1),e=e.replace(Qe,i.cmd)),o.forEach(e=>{this.aliasMap[e]=i.cmd}),t!==!1&&this.usage.command(e,t,c,o,a),this.handlers[i.cmd]={original:e,description:t,handler:r,builder:n||{},middlewares:s,deprecated:a,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,a){let o=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,s=t.getInternalMethods().getContext(),c=s.commands.slice(),l=!e;e&&(s.commands.push(e),s.fullCommands.push(o.original));let u=this.applyBuilderUpdateUsageAndParse(l,o,t,n.aliases,c,r,i,a);return M(u)?u.then(e=>this.applyMiddlewareAndGetResult(l,o,e.innerArgv,s,i,e.aliases,t)):this.applyMiddlewareAndGetResult(l,o,u.innerArgv,s,i,u.aliases,t)}applyBuilderUpdateUsageAndParse(e,t,n,r,i,a,o,s){let c=t.builder,l=n;if(rt(c)){n.getInternalMethods().getUsageInstance().freeze();let u=c(n.getInternalMethods().reset(r),s);if(M(u))return u.then(r=>(l=jn(r)?r:n,this.parseAndUpdateUsage(e,t,l,i,a,o)))}else it(c)&&(n.getInternalMethods().getUsageInstance().freeze(),l=n.getInternalMethods().reset(r),Object.keys(t.builder).forEach(e=>{l.option(e,c[e])}));return this.parseAndUpdateUsage(e,t,l,i,a,o)}parseAndUpdateUsage(e,t,n,r,i,a){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(r,t),t.description);let o=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,i,a);return M(o)?o.then(e=>({aliases:n.parsed.aliases,innerArgv:e})):{aliases:n.parsed.aliases,innerArgv:o}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,t){let n=Qe.test(t.original)?t.original.replace(Qe,``).trim():t.original,r=e.filter(e=>!Qe.test(e));return r.push(n),`$0 ${r.join(` `)}`}handleValidationAndGetResult(e,t,n,r,i,a,o,s){if(!a.getInternalMethods().getHasOutput()){let t=a.getInternalMethods().runValidation(i,s,a.parsed.error,e);n=Ye(n,e=>(t(e),e))}if(t.handler&&!a.getInternalMethods().getHasOutput()){a.getInternalMethods().setHasOutput();let r=!!a.getOptions().configuration[`populate--`];a.getInternalMethods().postProcess(n,r,!1,!1),n=Je(n,a,o,!1),n=Ye(n,e=>{let n=t.handler(e);return M(n)?n.then(()=>e):e}),e||a.getInternalMethods().getUsageInstance().cacheHelpMessage(),M(n)&&!a.getInternalMethods().hasParseCallback()&&n.catch(e=>{try{a.getInternalMethods().getUsageInstance().fail(null,e)}catch{}})}return e||(r.commands.pop(),r.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,t,n,r,i,a,o){let s={};if(i)return n;o.getInternalMethods().getHasOutput()||(s=this.populatePositionals(t,n,r,o));let c=this.globalMiddleware.getMiddleware().slice(0).concat(t.middlewares),l=Je(n,o,c,!0);return M(l)?l.then(n=>this.handleValidationAndGetResult(e,t,n,r,a,o,c,s)):this.handleValidationAndGetResult(e,t,l,r,a,o,c,s)}populatePositionals(e,t,n,r){t._=t._.slice(n.commands.length);let i=e.demanded.slice(0),a=e.optional.slice(0),o={};for(this.validation.positionalCount(i.length,t._.length);i.length;){let e=i.shift();this.populatePositional(e,t,o)}for(;a.length;){let e=a.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){let r=e.cmd[0];e.variadic?n[r]=t._.splice(0).map(String):t._.length&&(n[r]=[String(t._.shift())])}cmdToParseOptions(e){let t={array:[],default:{},alias:{},demand:{}},n=He(e);return n.demanded.forEach(e=>{let[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=>{let[n,...r]=e.cmd;e.variadic&&(t.array.push(n),t.default[n]=[]),t.alias[n]=r}),t}postProcessPositionals(e,t,n,r){let i=Object.assign({},r.getOptions());i.default=Object.assign(n.default,i.default);for(let 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={};let a=[];if(Object.keys(t).forEach(e=>{t[e].map(t=>{i.configuration[`unknown-options-as-args`]&&(i.key[e]=!0),a.push(`--${e}`),a.push(t)})}),!a.length)return;let o=Object.assign({},i.configuration,{"populate--":!1}),s=this.shim.Parser.detailed(a,Object.assign({},i,{configuration:o}));if(s.error)r.getInternalMethods().getUsageInstance().fail(s.error.message,s.error);else{let n=Object.keys(t);Object.keys(t).forEach(e=>{n.push(...s.aliases[e])}),Object.keys(s.argv).forEach(i=>{n.includes(i)&&(t[i]||(t[i]=s.argv[i]),!this.isInConfigs(r,i)&&!this.isDefaulted(r,i)&&Object.prototype.hasOwnProperty.call(e,i)&&Object.prototype.hasOwnProperty.call(s.argv,i)&&(Array.isArray(e[i])||Array.isArray(s.argv[i]))?e[i]=[].concat(e[i],s.argv[i]):e[i]=s.argv[i])})}}isDefaulted(e,t){let{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,t)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(t))}isInConfigs(e,t){let{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)){let t=Qe.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,`$0 `);e.getInternalMethods().getUsageInstance().usage(t,this.defaultCommand.description)}let t=this.defaultCommand.builder;if(rt(t))return t(e,!0);tt(t)||Object.keys(t).forEach(n=>{e.option(n,t[n])})}moduleName(e){let t=Ze(e);if(!t)throw 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(let r of[e,t,n]){if(typeof r==`string`||r===!1)return r;j(r,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let e=this.frozens.pop();j(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 et(e,t,n,r){return new $e(e,t,n,r)}function tt(e){return typeof e==`object`&&!!e.builder&&typeof e.handler==`function`}function nt(e){return e.every(e=>typeof e==`string`)}function rt(e){return typeof e==`function`}function it(e){return typeof e==`object`}function at(e){return typeof e==`object`&&!Array.isArray(e)}function ot(e={},t=()=>!0){let n={};return Ve(e).forEach(r=>{t(r,e[r])&&(n[r]=e[r])}),n}function st(e){typeof process>`u`||[process.stdout,process.stderr].forEach(t=>{let n=t;n._handle&&n.isTTY&&typeof n._handle.setBlocking==`function`&&n._handle.setBlocking(e)})}function ct(e){return typeof e==`boolean`}function lt(e,t){let n=t.y18n.__,r={},i=[];r.failFn=function(e){i.push(e)};let a=null,o=null,s=!0;r.showHelpOnFail=function(t=!0,n){let[i,c]=typeof t==`string`?[!0,t]:[t,n];return e.getInternalMethods().isGlobalContext()&&(o=c),a=c,s=i,r};let c=!1;r.fail=function(t,n){let l=e.getInternalMethods().getLoggerInstance();if(i.length)for(let e=i.length-1;e>=0;--e){let a=i[e];if(ct(a)){if(n)throw n;if(t)throw Error(t)}else a(t,n,r)}else{if(e.getExitProcess()&&st(!0),!c){c=!0,s&&(e.showHelp(`error`),l.error()),(t||n)&&l.error(t||n);let r=a||o;r&&((t||n)&&l.error(``),l.error(r))}if(n||=new k(t),e.getExitProcess())return e.exit(1);if(e.getInternalMethods().hasParseCallback())return e.exit(1,n);throw n}};let l=[],u=!1;r.usage=(e,t)=>e===null?(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 f=[];r.command=function(e,t,n,r,i=!1){n&&(f=f.map(e=>(e[2]=!1,e))),f.push([e,t||``,n,r,i])},r.getCommands=()=>f;let p={};r.describe=function(e,t){Array.isArray(e)?e.forEach(e=>{r.describe(e,t)}):typeof e==`object`?Object.keys(e).forEach(t=>{r.describe(t,e[t])}):p[e]=t},r.getDescriptions=()=>p;let m=[];r.epilog=e=>{m.push(e)};let h=!1,g;r.wrap=e=>{h=!0,g=e},r.getWrap=()=>t.getEnv(`YARGS_DISABLE_WRAP`)?null:(h||(g=b(),h=!0),g);let ee=`__yargsString__:`;r.deferY18nLookup=e=>ee+e,r.help=function(){if(y)return y;v();let i=e.customScriptName?e.$0:t.path.basename(e.$0),a=e.getDemandedOptions(),o=e.getDemandedCommands(),s=e.getDeprecatedOptions(),c=e.getGroups(),h=e.getOptions(),g=[];g=g.concat(Object.keys(p)),g=g.concat(Object.keys(a)),g=g.concat(Object.keys(o)),g=g.concat(Object.keys(h.default)),g=g.filter(ne),g=Object.keys(g.reduce((e,t)=>(t!==`_`&&(e[t]=!0),e),{}));let b=r.getWrap(),x=t.cliui({width:b,wrap:!!b});if(!u){if(l.length)l.forEach(e=>{x.div({text:`${e[0].replace(/\$0/g,i)}`}),e[1]&&x.div({text:`${e[1]}`,padding:[1,0,0,0]})}),x.div();else if(f.length){let e=null;e=o._?`${i} <${n(`command`)}>\n`:`${i} [${n(`command`)}]\n`,x.div(`${e}`)}}if(f.length>1||f.length===1&&!f[0][2]){x.div(n(`Commands:`));let t=e.getInternalMethods().getContext(),r=t.commands.length?`${t.commands.join(` `)} `:``;e.getInternalMethods().getParserConfiguration()[`sort-commands`]===!0&&(f=f.sort((e,t)=>e[0].localeCompare(t[0])));let a=i?`${i} `:``;f.forEach(e=>{let t=`${a}${r}${e[0].replace(/^\$0 ?/,``)}`;x.span({text:t,padding:[0,2,0,2],width:_(f,b,`${i}${r}`)+4},{text:e[1]});let o=[];e[2]&&o.push(`[${n(`default`)}]`),e[3]&&e[3].length&&o.push(`[${n(`aliases:`)} ${e[3].join(`, `)}]`),e[4]&&(typeof e[4]==`string`?o.push(`[${n(`deprecated: %s`,e[4])}]`):o.push(`[${n(`deprecated`)}]`)),o.length?x.div({text:o.join(` `),padding:[0,0,0,2],align:`right`}):x.div()}),x.div()}let S=(Object.keys(h.alias)||[]).concat(Object.keys(e.parsed.newAliases)||[]);g=g.filter(t=>!e.parsed.newAliases[t]&&S.every(e=>(h.alias[e]||[]).indexOf(t)===-1));let ie=n(`Options:`);c[ie]||(c[ie]=[]),te(g,h.alias,c,ie);let C=e=>/^--/.test(pt(e)),ae=Object.keys(c).filter(e=>c[e].length>0).map(e=>{let t=c[e].filter(ne).map(e=>{if(S.includes(e))return e;for(let t=0,n;(n=S[t])!==void 0;t++)if((h.alias[n]||[]).includes(e))return n;return e});return{groupName:e,normalizedKeys:t}}).filter(({normalizedKeys:e})=>e.length>0).map(({groupName:e,normalizedKeys:t})=>{let n=t.reduce((t,n)=>(t[n]=[n].concat(h.alias[n]||[]).map(t=>e===r.getPositionalGroupName()?t:(/^[0-9]$/.test(t)?h.boolean.includes(n)?`-`:`--`:t.length>1?`--`:`-`)+t).sort((e,t)=>C(e)===C(t)?0:C(e)?1:-1).join(`, `),t),{});return{groupName:e,normalizedKeys:t,switches:n}}),oe=ae.filter(({groupName:e})=>e!==r.getPositionalGroupName()).some(({normalizedKeys:e,switches:t})=>!e.every(e=>C(t[e])));if(oe&&ae.filter(({groupName:e})=>e!==r.getPositionalGroupName()).forEach(({normalizedKeys:e,switches:t})=>{e.forEach(e=>{C(t[e])&&(t[e]=dt(t[e],4))})}),ae.forEach(({groupName:t,normalizedKeys:i,switches:o})=>{x.div(t),i.forEach(t=>{let i=o[t],c=p[t]||``,l=null;c.includes(ee)&&(c=n(c.substring(ee.length))),h.boolean.includes(t)&&(l=`[${n(`boolean`)}]`),h.count.includes(t)&&(l=`[${n(`count`)}]`),h.string.includes(t)&&(l=`[${n(`string`)}]`),h.normalize.includes(t)&&(l=`[${n(`string`)}]`),h.array.includes(t)&&(l=`[${n(`array`)}]`),h.number.includes(t)&&(l=`[${n(`number`)}]`);let u=e=>typeof e==`string`?`[${n(`deprecated: %s`,e)}]`:`[${n(`deprecated`)}]`,d=[t in s?u(s[t]):null,l,t in a?`[${n(`required`)}]`:null,h.choices&&h.choices[t]?`[${n(`choices:`)} ${r.stringifiedValues(h.choices[t])}]`:null,re(h.default[t],h.defaultDescription[t])].filter(Boolean).join(` `);x.span({text:pt(i),padding:[0,2,0,2+ft(i)],width:_(o,b)+4},c);let f=e.getInternalMethods().getUsageConfiguration()[`hide-types`]===!0;d&&!f?x.div({text:d,padding:[0,0,0,2],align:`right`}):x.div()}),x.div()}),d.length&&(x.div(n(`Examples:`)),d.forEach(e=>{e[0]=e[0].replace(/\$0/g,i)}),d.forEach(e=>{e[1]===``?x.div({text:e[0],padding:[0,2,0,2]}):x.div({text:e[0],padding:[0,2,0,2],width:_(d,b)+4},{text:e[1]})}),x.div()),m.length>0){let e=m.map(e=>e.replace(/\$0/g,i)).join(`
7
+ `);x.div(`${e}\n`)}return x.toString().replace(/\s*$/,``)};function _(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} ${pt(e[0])}`:pt(e[0]))+ft(e[0]),i)}),n&&(i=Math.min(i,parseInt((n*.5).toString(),10))),i}function v(){let t=e.getDemandedOptions(),n=e.getOptions();(Object.keys(n.alias)||[]).forEach(i=>{n.alias[i].forEach(a=>{p[a]&&r.describe(i,p[a]),a in t&&e.demandOption(i,t[a]),n.boolean.includes(a)&&e.boolean(i),n.count.includes(a)&&e.count(i),n.string.includes(a)&&e.string(i),n.normalize.includes(a)&&e.normalize(i),n.array.includes(a)&&e.array(i),n.number.includes(a)&&e.number(i)})})}let y;r.cacheHelpMessage=function(){y=this.help()},r.clearCachedHelpMessage=function(){y=void 0},r.hasCachedHelpMessage=function(){return!!y};function te(e,t,n,r){let i=[],a=null;return Object.keys(n).forEach(e=>{i=i.concat(n[e])}),e.forEach(e=>{a=[e].concat(t[e]),a.some(e=>i.indexOf(e)!==-1)||n[r].push(e)}),i}function ne(t){return e.getOptions().hiddenOptions.indexOf(t)<0||e.parsed.argv[e.getOptions().showHiddenOpt]}r.showHelp=t=>{let n=e.getInternalMethods().getLoggerInstance();t||=`error`;let i=typeof t==`function`?t:n[t];i(r.help())},r.functionDescription=e=>{let r=e.name?t.Parser.decamelize(e.name,`-`):n(`generated-value`);return[`(`,r,`)`].join(``)},r.stringifiedValues=function(e,t){let n=``,r=t||`, `,i=[].concat(e);return!e||!i.length||i.forEach(e=>{n.length&&(n+=r),n+=JSON.stringify(e)}),n};function re(e,t){let r=`[${n(`default:`)} `;if(e===void 0&&!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}]`}function b(){let e=80;return t.process.stdColumns?Math.min(e,t.process.stdColumns):e}let x=null;r.version=e=>{x=e},r.showVersion=t=>{let n=e.getInternalMethods().getLoggerInstance();t||=`error`;let r=typeof t==`function`?t:n[t];r(x)},r.reset=function(e){return a=null,c=!1,l=[],u=!1,m=[],d=[],f=[],p=ot(p,t=>!e[t]),r};let S=[];return r.freeze=function(){S.push({failMessage:a,failureOutput:c,usages:l,usageDisabled:u,epilogs:m,examples:d,commands:f,descriptions:p})},r.unfreeze=function(e=!1){let t=S.pop();t&&(e?(p={...t.descriptions,...p},f=[...t.commands,...f],l=[...t.usages,...l],d=[...t.examples,...d],m=[...t.epilogs,...m]):{failMessage:a,failureOutput:c,usages:l,usageDisabled:u,epilogs:m,examples:d,commands:f,descriptions:p}=t)},r}function ut(e){return typeof e==`object`}function dt(e,t){return ut(e)?{text:e.text,indentation:e.indentation+t}:{text:e,indentation:t}}function ft(e){return ut(e)?e.indentation:0}function pt(e){return ut(e)?e.text:e}const mt=`###-begin-{{app_name}}-completions-###
8
+ #
9
+ # yargs command completion script
10
+ #
11
+ # Installation: {{app_path}} {{completion_command}} >> ~/.bashrc
12
+ # or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.
13
+ #
14
+ _{{app_name}}_yargs_completions()
15
+ {
16
+ local cur_word args type_list
17
+
18
+ cur_word="\${COMP_WORDS[COMP_CWORD]}"
19
+ args=("\${COMP_WORDS[@]}")
20
+
21
+ # ask yargs to generate completions.
22
+ type_list=$({{app_path}} --get-yargs-completions "\${args[@]}")
23
+
24
+ COMPREPLY=( $(compgen -W "\${type_list}" -- \${cur_word}) )
25
+
26
+ # if no match was found, fall back to filename completion
27
+ if [ \${#COMPREPLY[@]} -eq 0 ]; then
28
+ COMPREPLY=()
29
+ fi
30
+
31
+ return 0
32
+ }
33
+ complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}
34
+ ###-end-{{app_name}}-completions-###
35
+ `,ht=`#compdef {{app_name}}
36
+ ###-begin-{{app_name}}-completions-###
37
+ #
38
+ # yargs command completion script
39
+ #
40
+ # Installation: {{app_path}} {{completion_command}} >> ~/.zshrc
41
+ # or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.
42
+ #
43
+ _{{app_name}}_yargs_completions()
44
+ {
45
+ local reply
46
+ local si=$IFS
47
+ IFS=$'
48
+ ' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}"))
49
+ IFS=$si
50
+ _describe 'values' reply
51
+ }
52
+ compdef _{{app_name}}_yargs_completions {{app_name}}
53
+ ###-end-{{app_name}}-completions-###
54
+ `;var gt=class{constructor(e,t,n,r){var i,a,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=(o=(i=this.shim.getEnv(`SHELL`))?.includes(`zsh`)||(a=this.shim.getEnv(`ZSH_NAME`))?.includes(`zsh`))??!1}defaultCompletion(e,t,n,r){let i=this.command.getCommandHandlers();for(let t=0,n=e.length;t<n;++t)if(i[e[t]]&&i[e[t]].builder){let n=i[e[t]].builder;if(rt(n)){this.indexAfterLastReset=t+1;let e=this.yargs.getInternalMethods().reset();return n(e,!0),e.argv}}let a=[];this.commandCompletions(a,e,n),this.optionCompletions(a,e,t,n),this.choicesFromOptionsCompletions(a,e,t,n),this.choicesFromPositionalsCompletions(a,e,t,n),r(null,a)}commandCompletions(e,t,n){let r=this.yargs.getInternalMethods().getContext().commands;!n.match(/^-/)&&r[r.length-1]!==n&&!this.previousArgHasChoices(t)&&this.usage.getCommands().forEach(n=>{let r=He(n[0]).cmd;if(t.indexOf(r)===-1)if(!this.zshShell)e.push(r);else{let t=n[1]||``;e.push(r.replace(/:/g,`\\:`)+`:`+t)}})}optionCompletions(e,t,n,r){if((r.match(/^-/)||r===``&&e.length===0)&&!this.previousArgHasChoices(t)){let n=this.yargs.getOptions(),i=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(n.key).forEach(a=>{let o=!!n.configuration[`boolean-negation`]&&n.boolean.includes(a),s=i.includes(a);!s&&!n.hiddenOptions.includes(a)&&!this.argsContainKey(t,a,o)&&this.completeOptionKey(a,e,r,o&&!!n.default[a])})}}choicesFromOptionsCompletions(e,t,n,r){if(this.previousArgHasChoices(t)){let 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;let i=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],a=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),o=i[n._.length-a-1];if(!o)return;let s=this.yargs.getOptions().choices[o]||[];for(let t of s)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;let r=t.replace(/^-+/,``),i=this.yargs.getOptions(),a=[r,...this.yargs.getAliases()[r]||[]],o;for(let e of a)if(Object.prototype.hasOwnProperty.call(i.key,e)&&Array.isArray(i.choices[e])){o=i.choices[e];break}if(o)return o.filter(e=>!n||e.startsWith(n))}previousArgHasChoices(e){let t=this.getPreviousArgChoices(e);return t!==void 0&&t.length>0}argsContainKey(e,t,n){let r=t=>e.indexOf((/^[^0-9]$/.test(t)?`-`:`--`)+t)!==-1;if(r(t)||n&&r(`no-${t}`))return!0;if(this.aliases){for(let e of this.aliases[t])if(r(e))return!0}return!1}completeOptionKey(e,t,n,r){var i,a,o,s;let c=e;if(this.zshShell){let t=this.usage.getDescriptions(),n=(a=(i=this===null||this===void 0?void 0:this.aliases)?.[e])?.find(e=>{let n=t[e];return typeof n==`string`&&n.length>0}),r=n?t[n]:void 0,l=(s=(o=t[e])??r)??``;c=`${e.replace(/:/g,`\\:`)}:${l.replace(`__yargsString__:`,``).replace(/(\r\n|\n|\r)/gm,` `)}`}let l=e=>/^--/.test(e),u=e=>/^[^0-9]$/.test(e),d=!l(n)&&u(e)?`-`:`--`;t.push(d+c),r&&t.push(d+`no-`+c)}customCompletion(e,t,n,r){if(j(this.customCompletionFunction,null,this.shim),vt(this.customCompletionFunction)){let e=this.customCompletionFunction(n,t);return M(e)?e.then(e=>{this.shim.process.nextTick(()=>{r(null,e)})}).catch(e=>{this.shim.process.nextTick(()=>{r(e,void 0)})}):r(null,e)}else if(yt(this.customCompletionFunction))return this.customCompletionFunction(n,t,(i=r)=>this.defaultCompletion(e,t,n,i),e=>{r(null,e)});else return this.customCompletionFunction(n,t,e=>{r(null,e)})}getCompletion(e,t){let 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 M(r)?r.then(i):i(r)}generateCompletionScript(e,t){let n=this.zshShell?ht:mt,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 _t(e,t,n,r){return new gt(e,t,n,r)}function vt(e){return e.length<3}function yt(e){return e.length>3}function bt(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let n=[],r;for(r=0;r<=t.length;r++)n[r]=[r];let i;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 xt=[`$0`,`--`,`_`];function St(e,t,n){let r=n.y18n.__,i=n.y18n.__n,a={};a.nonOptionCount=function(n){let r=e.getDemandedCommands(),a=n._.length+(n[`--`]?n[`--`].length:0),o=a-e.getInternalMethods().getContext().commands.length;r._&&(o<r._.min||o>r._.max)&&(o<r._.min?r._.minMsg===void 0?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`,o,o.toString(),r._.min.toString())):t.fail(r._.minMsg?r._.minMsg.replace(/\$0/g,o.toString()).replace(/\$1/,r._.min.toString()):null):o>r._.max&&(r._.maxMsg===void 0?t.fail(i(`Too many non-option arguments: got %s, maximum of %s`,`Too many non-option arguments: got %s, maximum of %s`,o,o.toString(),r._.max.toString())):t.fail(r._.maxMsg?r._.maxMsg.replace(/\$0/g,o.toString()).replace(/\$1/,r._.max.toString()):null)))},a.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+``))},a.requiredArguments=function(e,n){let r=null;for(let t of Object.keys(n))(!Object.prototype.hasOwnProperty.call(e,t)||e[t]===void 0)&&(r||={},r[t]=n[t]);if(r){let e=[];for(let t of Object.keys(r)){let n=r[t];n&&e.indexOf(n)<0&&e.push(n)}let n=e.length?`\n${e.join(`
55
+ `)}`:``;t.fail(i(`Missing required argument: %s`,`Missing required arguments: %s`,Object.keys(r).length,Object.keys(r).join(`, `)+n))}},a.unknownArguments=function(n,r,o,s,c=!0){var l;let u=e.getInternalMethods().getCommandInstance().getCommands(),d=[],f=e.getInternalMethods().getContext();if(Object.keys(n).forEach(t=>{!xt.includes(t)&&!Object.prototype.hasOwnProperty.call(o,t)&&!Object.prototype.hasOwnProperty.call(e.getInternalMethods().getParseContext(),t)&&!a.isValidAndSomeAliasIsNotNew(t,r)&&d.push(t)}),c&&(f.commands.length>0||u.length>0||s)&&n._.slice(f.commands.length).forEach(e=>{u.includes(``+e)||d.push(``+e)}),c){let t=e.getDemandedCommands(),r=(l=t._)?.max||0,i=f.commands.length+r;i<n._.length&&n._.slice(i).forEach(e=>{e=String(e),!f.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(`, `)))},a.unknownCommands=function(n){let r=e.getInternalMethods().getCommandInstance().getCommands(),a=[],o=e.getInternalMethods().getContext();return(o.commands.length>0||r.length>0)&&n._.slice(o.commands.length).forEach(e=>{r.includes(``+e)||a.push(``+e)}),a.length>0?(t.fail(i(`Unknown command: %s`,`Unknown commands: %s`,a.length,a.join(`, `))),!0):!1},a.isValidAndSomeAliasIsNotNew=function(t,n){if(!Object.prototype.hasOwnProperty.call(n,t))return!1;let r=e.parsed.newAliases;return[t,...n[t]].some(e=>!Object.prototype.hasOwnProperty.call(r,e)||!r[t])},a.limitedChoices=function(n){let i=e.getOptions(),a={};if(!Object.keys(i.choices).length)return;Object.keys(n).forEach(e=>{xt.indexOf(e)===-1&&Object.prototype.hasOwnProperty.call(i.choices,e)&&[].concat(n[e]).forEach(t=>{i.choices[e].indexOf(t)===-1&&t!==void 0&&(a[e]=(a[e]||[]).concat(t))})});let o=Object.keys(a);if(!o.length)return;let s=r(`Invalid values:`);o.forEach(e=>{s+=`\n ${r(`Argument: %s, Given: %s, Choices: %s`,e,t.stringifiedValues(a[e]),t.stringifiedValues(i.choices[e]))}`}),t.fail(s)};let o={};a.implies=function(t,r){N(`<string|object> [array|number|string]`,[t,r],arguments.length),typeof t==`object`?Object.keys(t).forEach(e=>{a.implies(e,t[e])}):(e.global(t),o[t]||(o[t]=[]),Array.isArray(r)?r.forEach(e=>a.implies(t,e)):(j(r,void 0,n),o[t].push(r)))},a.getImplied=function(){return o};function s(e,t){let n=Number(t);return t=isNaN(n)?t:n,typeof t==`number`?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}a.implications=function(e){let n=[];if(Object.keys(o).forEach(t=>{let r=t;(o[t]||[]).forEach(t=>{let i=r,a=t;i=s(e,i),t=s(e,t),i&&!t&&n.push(` ${r} -> ${a}`)})}),n.length){let e=`${r(`Implications failed:`)}\n`;n.forEach(t=>{e+=t}),t.fail(e)}};let c={};a.conflicts=function(t,n){N(`<string|object> [array|string]`,[t,n],arguments.length),typeof t==`object`?Object.keys(t).forEach(e=>{a.conflicts(e,t[e])}):(e.global(t),c[t]||(c[t]=[]),Array.isArray(n)?n.forEach(e=>a.conflicts(t,e)):c[t].push(n))},a.getConflicting=()=>c,a.conflicting=function(i){Object.keys(i).forEach(e=>{c[e]&&c[e].forEach(n=>{n&&i[e]!==void 0&&i[n]!==void 0&&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(a=>{a&&i[n.Parser.camelCase(e)]!==void 0&&i[n.Parser.camelCase(a)]!==void 0&&t.fail(r(`Arguments %s and %s are mutually exclusive`,e,a))})})},a.recommendCommands=function(e,n){let i=3;n=n.sort((e,t)=>t.length-e.length);let a=null,o=1/0;for(let t=0,r;(r=n[t])!==void 0;t++){let t=bt(e,r);t<=i&&t<o&&(o=t,a=r)}a&&t.fail(r(`Did you mean %s?`,a))},a.reset=function(e){return o=ot(o,t=>!e[t]),c=ot(c,t=>!e[t]),a};let l=[];return a.freeze=function(){l.push({implied:o,conflicting:c})},a.unfreeze=function(){let e=l.pop();j(e,void 0,n),{implied:o,conflicting:c}=e},a}let Ct=[],wt;function Tt(t,n,r,i){wt=i;let a={};if(Object.prototype.hasOwnProperty.call(t,`extends`)){if(typeof t.extends!=`string`)return a;let i=/\.json|\..*rc$/.test(t.extends),o=null;if(i)o=Dt(n,t.extends);else try{o=e.resolve(t.extends)}catch{return t}Et(o),Ct.push(o),a=i?JSON.parse(wt.readFileSync(o,`utf8`)):e(t.extends),delete t.extends,a=Tt(a,wt.path.dirname(o),r,wt)}return Ct=[],r?Ot(a,t):Object.assign({},a,t)}function Et(e){if(Ct.indexOf(e)>-1)throw new k(`Circular extended configurations: '${e}'.`)}function Dt(e,t){return wt.path.resolve(e,t)}function Ot(e,t){let n={};function r(e){return e&&typeof e==`object`&&!Array.isArray(e)}Object.assign(n,e);for(let i of Object.keys(t))r(t[i])&&r(n[i])?n[i]=Ot(e[i],t[i]):n[i]=t[i];return n}var P=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},F=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},I,kt,At,L,R,jt,z,Mt,Nt,B,Pt,V,H,U,W,Ft,It,G,K,Lt,Rt,q,zt,Bt,Vt,J,Ht,Y,Ut,Wt,Gt,X,Kt,Z,Q;function qt(e){return(t=[],n=e.process.cwd(),r)=>{let i=new An(t,n,r,e);return Object.defineProperty(i,`argv`,{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}}const Jt=Symbol(`copyDoubleDash`),Yt=Symbol(`copyDoubleDash`),Xt=Symbol(`deleteFromParserHintObject`),Zt=Symbol(`emitWarning`),Qt=Symbol(`freeze`),$t=Symbol(`getDollarZero`),en=Symbol(`getParserConfiguration`),tn=Symbol(`getUsageConfiguration`),nn=Symbol(`guessLocale`),rn=Symbol(`guessVersion`),an=Symbol(`parsePositionalNumbers`),on=Symbol(`pkgUp`),$=Symbol(`populateParserHintArray`),sn=Symbol(`populateParserHintSingleValueDictionary`),cn=Symbol(`populateParserHintArrayDictionary`),ln=Symbol(`populateParserHintDictionary`),un=Symbol(`sanitizeKey`),dn=Symbol(`setKey`),fn=Symbol(`unfreeze`),pn=Symbol(`validateAsync`),mn=Symbol(`getCommandInstance`),hn=Symbol(`getContext`),gn=Symbol(`getHasOutput`),_n=Symbol(`getLoggerInstance`),vn=Symbol(`getParseContext`),yn=Symbol(`getUsageInstance`),bn=Symbol(`getValidationInstance`),xn=Symbol(`hasParseCallback`),Sn=Symbol(`isGlobalContext`),Cn=Symbol(`postProcess`),wn=Symbol(`rebase`),Tn=Symbol(`reset`),En=Symbol(`runYargsParserAndExecuteCommands`),Dn=Symbol(`runValidation`),On=Symbol(`setHasOutput`),kn=Symbol(`kTrackManuallySetKeys`);var An=class{constructor(e=[],t,n,r){this.customScriptName=!1,this.parsed=!1,I.set(this,void 0),kt.set(this,void 0),At.set(this,{commands:[],fullCommands:[]}),L.set(this,null),R.set(this,null),jt.set(this,`show-hidden`),z.set(this,null),Mt.set(this,!0),Nt.set(this,{}),B.set(this,!0),Pt.set(this,[]),V.set(this,void 0),H.set(this,{}),U.set(this,!1),W.set(this,null),Ft.set(this,!0),It.set(this,void 0),G.set(this,``),K.set(this,void 0),Lt.set(this,void 0),Rt.set(this,{}),q.set(this,null),zt.set(this,null),Bt.set(this,{}),Vt.set(this,{}),J.set(this,void 0),Ht.set(this,!1),Y.set(this,void 0),Ut.set(this,!1),Wt.set(this,!1),Gt.set(this,!1),X.set(this,void 0),Kt.set(this,{}),Z.set(this,null),Q.set(this,void 0),P(this,Y,r,`f`),P(this,J,e,`f`),P(this,kt,t,`f`),P(this,Lt,n,`f`),P(this,V,new Ke(this),`f`),this.$0=this[$t](),this[Tn](),P(this,I,F(this,I,`f`),`f`),P(this,X,F(this,X,`f`),`f`),P(this,Q,F(this,Q,`f`),`f`),P(this,K,F(this,K,`f`),`f`),F(this,K,`f`).showHiddenOpt=F(this,jt,`f`),P(this,It,this[Yt](),`f`)}addHelpOpt(e,t){let n=`help`;return N(`[string|boolean] [string]`,[e,t],arguments.length),F(this,W,`f`)&&(this[Xt](F(this,W,`f`)),P(this,W,null,`f`)),e===!1&&t===void 0?this:(P(this,W,typeof e==`string`?e:n,`f`),this.boolean(F(this,W,`f`)),this.describe(F(this,W,`f`),t||F(this,X,`f`).deferY18nLookup(`Show help`)),this)}help(e,t){return this.addHelpOpt(e,t)}addShowHiddenOpt(e,t){if(N(`[string|boolean] [string]`,[e,t],arguments.length),e===!1&&t===void 0)return this;let n=typeof e==`string`?e:F(this,jt,`f`);return this.boolean(n),this.describe(n,t||F(this,X,`f`).deferY18nLookup(`Show hidden options`)),F(this,K,`f`).showHiddenOpt=n,this}showHidden(e,t){return this.addShowHiddenOpt(e,t)}alias(e,t){return N(`<object|string|array> [string|array]`,[e,t],arguments.length),this[cn](this.alias.bind(this),`alias`,e,t),this}array(e){return N(`<array|string>`,[e],arguments.length),this[$](`array`,e),this[kn](e),this}boolean(e){return N(`<array|string>`,[e],arguments.length),this[$](`boolean`,e),this[kn](e),this}check(e,t){return N(`<function> [boolean]`,[e,t],arguments.length),this.middleware((t,n)=>Ye(()=>e(t,n.getOptions()),n=>(n?(typeof n==`string`||n instanceof Error)&&F(this,X,`f`).fail(n.toString(),n):F(this,X,`f`).fail(F(this,Y,`f`).y18n.__(`Argument check failed: %s`,e.toString())),t),e=>(F(this,X,`f`).fail(e.message?e.message:e.toString(),e),t)),!1,t),this}choices(e,t){return N(`<object|string|array> [string|array]`,[e,t],arguments.length),this[cn](this.choices.bind(this),`choices`,e,t),this}coerce(e,t){if(N(`<object|string|array> [function]`,[e,t],arguments.length),Array.isArray(e)){if(!t)throw new k(`coerce callback must be provided`);for(let n of e)this.coerce(n,t);return this}else if(typeof e==`object`){for(let t of Object.keys(e))this.coerce(t,e[t]);return this}if(!t)throw new k(`coerce callback must be provided`);return F(this,K,`f`).key[e]=!0,F(this,V,`f`).addCoerceMiddleware((n,r)=>{let i,a=Object.prototype.hasOwnProperty.call(n,e);return a?Ye(()=>(i=r.getAliases(),t(n[e])),t=>{n[e]=t;let a=r.getInternalMethods().getParserConfiguration()[`strip-aliased`];if(i[e]&&a!==!0)for(let r of i[e])n[r]=t;return n},e=>{throw new k(e.message)}):n},e),this}conflicts(e,t){return N(`<string|object> [string|array]`,[e,t],arguments.length),F(this,Q,`f`).conflicts(e,t),this}config(e=`config`,t,n){return N(`[object|string] [string|function] [function]`,[e,t,n],arguments.length),typeof e==`object`&&!Array.isArray(e)?(e=Tt(e,F(this,kt,`f`),this[en]()[`deep-merge-config`]||!1,F(this,Y,`f`)),F(this,K,`f`).configObjects=(F(this,K,`f`).configObjects||[]).concat(e),this):(typeof t==`function`&&(n=t,t=void 0),this.describe(e,t||F(this,X,`f`).deferY18nLookup(`Path to JSON config file`)),(Array.isArray(e)?e:[e]).forEach(e=>{F(this,K,`f`).config[e]=n||!0}),this)}completion(e,t,n){return N(`[string] [string|boolean|function] [function]`,[e,t,n],arguments.length),typeof t==`function`&&(n=t,t=void 0),P(this,R,e||F(this,R,`f`)||`completion`,`f`),!t&&t!==!1&&(t=`generate completion script`),this.command(F(this,R,`f`),t),n&&F(this,L,`f`).registerFunction(n),this}command(e,t,n,r,i,a){return N(`<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]`,[e,t,n,r,i,a],arguments.length),F(this,I,`f`).addHandler(e,t,n,r,i,a),this}commands(e,t,n,r,i,a){return this.command(e,t,n,r,i,a)}commandDir(e,t){N(`<string> [object]`,[e,t],arguments.length);let n=F(this,Lt,`f`)||F(this,Y,`f`).require;return F(this,I,`f`).addDirectory(e,n,F(this,Y,`f`).getCallerFile(),t),this}count(e){return N(`<array|string>`,[e],arguments.length),this[$](`count`,e),this[kn](e),this}default(e,t,n){return N(`<object|string|array> [*] [string]`,[e,t,n],arguments.length),n&&(Be(e,F(this,Y,`f`)),F(this,K,`f`).defaultDescription[e]=n),typeof t==`function`&&(Be(e,F(this,Y,`f`)),F(this,K,`f`).defaultDescription[e]||(F(this,K,`f`).defaultDescription[e]=F(this,X,`f`).functionDescription(t)),t=t.call()),this[sn](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 N(`[number] [number|string] [string|null|undefined] [string|null|undefined]`,[e,t,n,r],arguments.length),typeof t!=`number`&&(n=t,t=1/0),this.global(`_`,!1),F(this,K,`f`).demandedCommands._={min:e,max:t,minMsg:n,maxMsg:r},this}demand(e,t,n){return Array.isArray(t)?(t.forEach(e=>{j(n,!0,F(this,Y,`f`)),this.demandOption(e,n)}),t=1/0):typeof t!=`number`&&(n=t,t=1/0),typeof e==`number`?(j(n,!0,F(this,Y,`f`)),this.demandCommand(e,t,n,n)):Array.isArray(e)?e.forEach(e=>{j(n,!0,F(this,Y,`f`)),this.demandOption(e,n)}):typeof n==`string`?this.demandOption(e,n):(n===!0||n===void 0)&&this.demandOption(e),this}demandOption(e,t){return N(`<object|string|array> [string]`,[e,t],arguments.length),this[sn](this.demandOption.bind(this),`demandedOptions`,e,t),this}deprecateOption(e,t){return N(`<string> [string|boolean]`,[e,t],arguments.length),F(this,K,`f`).deprecatedOptions[e]=t,this}describe(e,t){return N(`<object|string|array> [string]`,[e,t],arguments.length),this[dn](e,!0),F(this,X,`f`).describe(e,t),this}detectLocale(e){return N(`<boolean>`,[e],arguments.length),P(this,Mt,e,`f`),this}env(e){return N(`[string|boolean]`,[e],arguments.length),e===!1?delete F(this,K,`f`).envPrefix:F(this,K,`f`).envPrefix=e||``,this}epilogue(e){return N(`<string>`,[e],arguments.length),F(this,X,`f`).epilog(e),this}epilog(e){return this.epilogue(e)}example(e,t){return N(`<string|array> [string]`,[e,t],arguments.length),Array.isArray(e)?e.forEach(e=>this.example(...e)):F(this,X,`f`).example(e,t),this}exit(e,t){P(this,U,!0,`f`),P(this,z,t,`f`),F(this,B,`f`)&&F(this,Y,`f`).process.exit(e)}exitProcess(e=!0){return N(`[boolean]`,[e],arguments.length),P(this,B,e,`f`),this}fail(e){if(N(`<function|boolean>`,[e],arguments.length),typeof e==`boolean`&&e!==!1)throw new k(`Invalid first argument. Expected function or boolean 'false'`);return F(this,X,`f`).failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,t){return N(`<array> [function]`,[e,t],arguments.length),t?F(this,L,`f`).getCompletion(e,t):new Promise((t,n)=>{F(this,L,`f`).getCompletion(e,(e,r)=>{e?n(e):t(r)})})}getDemandedOptions(){return N([],0),F(this,K,`f`).demandedOptions}getDemandedCommands(){return N([],0),F(this,K,`f`).demandedCommands}getDeprecatedOptions(){return N([],0),F(this,K,`f`).deprecatedOptions}getDetectLocale(){return F(this,Mt,`f`)}getExitProcess(){return F(this,B,`f`)}getGroups(){return Object.assign({},F(this,H,`f`),F(this,Vt,`f`))}getHelp(){if(P(this,U,!0,`f`),!F(this,X,`f`).hasCachedHelpMessage()){if(!this.parsed){let e=this[En](F(this,J,`f`),void 0,void 0,0,!0);if(M(e))return e.then(()=>F(this,X,`f`).help())}let e=F(this,I,`f`).runDefaultBuilderOn(this);if(M(e))return e.then(()=>F(this,X,`f`).help())}return Promise.resolve(F(this,X,`f`).help())}getOptions(){return F(this,K,`f`)}getStrict(){return F(this,Ut,`f`)}getStrictCommands(){return F(this,Wt,`f`)}getStrictOptions(){return F(this,Gt,`f`)}global(e,t){return N(`<string|array> [boolean]`,[e,t],arguments.length),e=[].concat(e),t===!1?e.forEach(e=>{F(this,K,`f`).local.includes(e)||F(this,K,`f`).local.push(e)}):F(this,K,`f`).local=F(this,K,`f`).local.filter(t=>e.indexOf(t)===-1),this}group(e,t){N(`<string|array> <string>`,[e,t],arguments.length);let n=F(this,Vt,`f`)[t]||F(this,H,`f`)[t];F(this,Vt,`f`)[t]&&delete F(this,Vt,`f`)[t];let r={};return F(this,H,`f`)[t]=(n||[]).concat(e).filter(e=>r[e]?!1:r[e]=!0),this}hide(e){return N(`<string>`,[e],arguments.length),F(this,K,`f`).hiddenOptions.push(e),this}implies(e,t){return N(`<string|object> [number|string|array]`,[e,t],arguments.length),F(this,Q,`f`).implies(e,t),this}locale(e){return N(`[string]`,[e],arguments.length),e===void 0?(this[nn](),F(this,Y,`f`).y18n.getLocale()):(P(this,Mt,!1,`f`),F(this,Y,`f`).y18n.setLocale(e),this)}middleware(e,t,n){return F(this,V,`f`).addMiddleware(e,!!t,n)}nargs(e,t){return N(`<string|object|array> [number]`,[e,t],arguments.length),this[sn](this.nargs.bind(this),`narg`,e,t),this}normalize(e){return N(`<array|string>`,[e],arguments.length),this[$](`normalize`,e),this}number(e){return N(`<array|string>`,[e],arguments.length),this[$](`number`,e),this[kn](e),this}option(e,t){if(N(`<string|object> [object]`,[e,t],arguments.length),typeof e==`object`)Object.keys(e).forEach(t=>{this.options(t,e[t])});else{typeof t!=`object`&&(t={}),this[kn](e),F(this,Z,`f`)&&(e===`version`||t?.alias===`version`)&&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(`
56
+ `),void 0,`versionWarning`),F(this,K,`f`).key[e]=!0,t.alias&&this.alias(e,t.alias);let n=t.deprecate||t.deprecated;n&&this.deprecateOption(e,n);let r=t.demand||t.required||t.require;r&&this.demand(e,r),t.demandOption&&this.demandOption(e,typeof t.demandOption==`string`?t.demandOption:void 0),t.conflicts&&this.conflicts(e,t.conflicts),`default`in t&&this.default(e,t.default),t.implies!==void 0&&this.implies(e,t.implies),t.nargs!==void 0&&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||t.type===`boolean`)&&(this.boolean(e),t.alias&&this.boolean(t.alias)),(t.array||t.type===`array`)&&(this.array(e),t.alias&&this.array(t.alias)),(t.number||t.type===`number`)&&(this.number(e),t.alias&&this.number(t.alias)),(t.string||t.type===`string`)&&(this.string(e),t.alias&&this.string(t.alias)),(t.count||t.type===`count`)&&this.count(e),typeof t.global==`boolean`&&this.global(e,t.global),t.defaultDescription&&(F(this,K,`f`).defaultDescription[e]=t.defaultDescription),t.skipValidation&&this.skipValidation(e);let i=t.describe||t.description||t.desc,a=F(this,X,`f`).getDescriptions();(!Object.prototype.hasOwnProperty.call(a,e)||typeof i==`string`)&&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){N(`[string|array] [function|boolean|object] [function]`,[e,t,n],arguments.length),this[Qt](),e===void 0&&(e=F(this,J,`f`)),typeof t==`object`&&(P(this,zt,t,`f`),t=n),typeof t==`function`&&(P(this,q,t,`f`),t=!1),t||P(this,J,e,`f`),F(this,q,`f`)&&P(this,B,!1,`f`);let r=this[En](e,!!t),i=this.parsed;return F(this,L,`f`).setParsed(this.parsed),M(r)?r.then(e=>(F(this,q,`f`)&&F(this,q,`f`).call(this,F(this,z,`f`),e,F(this,G,`f`)),e)).catch(e=>{throw F(this,q,`f`)&&F(this,q,`f`)(e,this.parsed.argv,F(this,G,`f`)),e}).finally(()=>{this[fn](),this.parsed=i}):(F(this,q,`f`)&&F(this,q,`f`).call(this,F(this,z,`f`),r,F(this,G,`f`)),this[fn](),this.parsed=i,r)}parseAsync(e,t,n){let r=this.parse(e,t,n);return M(r)?r:Promise.resolve(r)}parseSync(e,t,n){let r=this.parse(e,t,n);if(M(r))throw new k(`.parseSync() must not be used with asynchronous builders, handlers, or middleware`);return r}parserConfiguration(e){return N(`<object>`,[e],arguments.length),P(this,Rt,e,`f`),this}pkgConf(e,t){N(`<string> [string]`,[e,t],arguments.length);let n=null,r=this[on](t||F(this,kt,`f`));return r[e]&&typeof r[e]==`object`&&(n=Tt(r[e],t||F(this,kt,`f`),this[en]()[`deep-merge-config`]||!1,F(this,Y,`f`)),F(this,K,`f`).configObjects=(F(this,K,`f`).configObjects||[]).concat(n)),this}positional(e,t){N(`<string> <object>`,[e,t],arguments.length);let n=[`default`,`defaultDescription`,`implies`,`normalize`,`choices`,`conflicts`,`coerce`,`type`,`describe`,`desc`,`description`,`alias`];t=ot(t,(e,t)=>e===`type`&&![`string`,`number`,`boolean`].includes(t)?!1:n.includes(e));let r=F(this,At,`f`).fullCommands[F(this,At,`f`).fullCommands.length-1],i=r?F(this,I,`f`).cmdToParseOptions(r):{array:[],alias:{},default:{},demand:{}};return Ve(i).forEach(n=>{let r=i[n];Array.isArray(r)?r.indexOf(e)!==-1&&(t[n]=!0):r[e]&&!(n in t)&&(t[n]=r[e])}),this.group(e,F(this,X,`f`).getPositionalGroupName()),this.option(e,t)}recommendCommands(e=!0){return N(`[boolean]`,[e],arguments.length),P(this,Ht,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 N(`<array|string|object> [number]`,[e],arguments.length),typeof e==`string`&&F(this,K,`f`).narg[e]||this[sn](this.requiresArg.bind(this),`narg`,e,NaN),this}showCompletionScript(e,t){return N(`[string] [string]`,[e,t],arguments.length),e||=this.$0,F(this,It,`f`).log(F(this,L,`f`).generateCompletionScript(e,t||F(this,R,`f`)||`completion`)),this}showHelp(e){if(N(`[string|function]`,[e],arguments.length),P(this,U,!0,`f`),!F(this,X,`f`).hasCachedHelpMessage()){if(!this.parsed){let t=this[En](F(this,J,`f`),void 0,void 0,0,!0);if(M(t))return t.then(()=>{F(this,X,`f`).showHelp(e)}),this}let t=F(this,I,`f`).runDefaultBuilderOn(this);if(M(t))return t.then(()=>{F(this,X,`f`).showHelp(e)}),this}return F(this,X,`f`).showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,t){return N(`[boolean|string] [string]`,[e,t],arguments.length),F(this,X,`f`).showHelpOnFail(e,t),this}showVersion(e){return N(`[string|function]`,[e],arguments.length),F(this,X,`f`).showVersion(e),this}skipValidation(e){return N(`<array|string>`,[e],arguments.length),this[$](`skipValidation`,e),this}strict(e){return N(`[boolean]`,[e],arguments.length),P(this,Ut,e!==!1,`f`),this}strictCommands(e){return N(`[boolean]`,[e],arguments.length),P(this,Wt,e!==!1,`f`),this}strictOptions(e){return N(`[boolean]`,[e],arguments.length),P(this,Gt,e!==!1,`f`),this}string(e){return N(`<array|string>`,[e],arguments.length),this[$](`string`,e),this[kn](e),this}terminalWidth(){return N([],0),F(this,Y,`f`).process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return N(`<object>`,[e],arguments.length),P(this,Mt,!1,`f`),F(this,Y,`f`).y18n.updateLocale(e),this}usage(e,t,n,r){if(N(`<string|null|undefined> [string|boolean] [function|object] [function]`,[e,t,n,r],arguments.length),t!==void 0){if(j(e,null,F(this,Y,`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()`)}else return F(this,X,`f`).usage(e),this}usageConfiguration(e){return N(`<object>`,[e],arguments.length),P(this,Kt,e,`f`),this}version(e,t,n){let r=`version`;if(N(`[boolean|string] [string] [string]`,[e,t,n],arguments.length),F(this,Z,`f`)&&(this[Xt](F(this,Z,`f`)),F(this,X,`f`).version(void 0),P(this,Z,null,`f`)),arguments.length===0)n=this[rn](),e=r;else if(arguments.length===1){if(e===!1)return this;n=e,e=r}else arguments.length===2&&(n=t,t=void 0);return P(this,Z,typeof e==`string`?e:r,`f`),t||=F(this,X,`f`).deferY18nLookup(`Show version number`),F(this,X,`f`).version(n||void 0),this.boolean(F(this,Z,`f`)),this.describe(F(this,Z,`f`),t),this}wrap(e){return N(`<number|null|undefined>`,[e],arguments.length),F(this,X,`f`).wrap(e),this}[(I=new WeakMap,kt=new WeakMap,At=new WeakMap,L=new WeakMap,R=new WeakMap,jt=new WeakMap,z=new WeakMap,Mt=new WeakMap,Nt=new WeakMap,B=new WeakMap,Pt=new WeakMap,V=new WeakMap,H=new WeakMap,U=new WeakMap,W=new WeakMap,Ft=new WeakMap,It=new WeakMap,G=new WeakMap,K=new WeakMap,Lt=new WeakMap,Rt=new WeakMap,q=new WeakMap,zt=new WeakMap,Bt=new WeakMap,Vt=new WeakMap,J=new WeakMap,Ht=new WeakMap,Y=new WeakMap,Ut=new WeakMap,Wt=new WeakMap,Gt=new WeakMap,X=new WeakMap,Kt=new WeakMap,Z=new WeakMap,Q=new WeakMap,Jt)](e){if(!e._||!e[`--`])return e;e._.push.apply(e._,e[`--`]);try{delete e[`--`]}catch{}return e}[Yt](){return{log:(...e)=>{this[xn]()||console.log(...e),P(this,U,!0,`f`),F(this,G,`f`).length&&P(this,G,F(this,G,`f`)+`
57
+ `,`f`),P(this,G,F(this,G,`f`)+e.join(` `),`f`)},error:(...e)=>{this[xn]()||console.error(...e),P(this,U,!0,`f`),F(this,G,`f`).length&&P(this,G,F(this,G,`f`)+`
58
+ `,`f`),P(this,G,F(this,G,`f`)+e.join(` `),`f`)}}}[Xt](e){Ve(F(this,K,`f`)).forEach(t=>{if((e=>e===`configObjects`)(t))return;let n=F(this,K,`f`)[t];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n==`object`&&delete n[e]}),delete F(this,X,`f`).getDescriptions()[e]}[Zt](e,t,n){F(this,Nt,`f`)[n]||(F(this,Y,`f`).process.emitWarning(e,t),F(this,Nt,`f`)[n]=!0)}[Qt](){F(this,Pt,`f`).push({options:F(this,K,`f`),configObjects:F(this,K,`f`).configObjects.slice(0),exitProcess:F(this,B,`f`),groups:F(this,H,`f`),strict:F(this,Ut,`f`),strictCommands:F(this,Wt,`f`),strictOptions:F(this,Gt,`f`),completionCommand:F(this,R,`f`),output:F(this,G,`f`),exitError:F(this,z,`f`),hasOutput:F(this,U,`f`),parsed:this.parsed,parseFn:F(this,q,`f`),parseContext:F(this,zt,`f`)}),F(this,X,`f`).freeze(),F(this,Q,`f`).freeze(),F(this,I,`f`).freeze(),F(this,V,`f`).freeze()}[$t](){let e=``,t;return t=/\b(node|iojs|electron)(\.exe)?$/.test(F(this,Y,`f`).process.argv()[0])?F(this,Y,`f`).process.argv().slice(1,2):F(this,Y,`f`).process.argv().slice(0,1),e=t.map(e=>{let t=this[wn](F(this,kt,`f`),e);return e.match(/^(\/|([a-zA-Z]:)?\\)/)&&t.length<e.length?t:e}).join(` `).trim(),F(this,Y,`f`).getEnv(`_`)&&F(this,Y,`f`).getProcessArgvBin()===F(this,Y,`f`).getEnv(`_`)&&(e=F(this,Y,`f`).getEnv(`_`).replace(`${F(this,Y,`f`).path.dirname(F(this,Y,`f`).process.execPath())}/`,``)),e}[en](){return F(this,Rt,`f`)}[tn](){return F(this,Kt,`f`)}[nn](){if(!F(this,Mt,`f`))return;let e=F(this,Y,`f`).getEnv(`LC_ALL`)||F(this,Y,`f`).getEnv(`LC_MESSAGES`)||F(this,Y,`f`).getEnv(`LANG`)||F(this,Y,`f`).getEnv(`LANGUAGE`)||`en_US`;this.locale(e.replace(/[.:].*/,``))}[rn](){let e=this[on]();return e.version||`unknown`}[an](e){let t=e[`--`]?e[`--`]:e._;for(let e=0,n;(n=t[e])!==void 0;e++)F(this,Y,`f`).Parser.looksLikeNumber(n)&&Number.isSafeInteger(Math.floor(parseFloat(`${n}`)))&&(t[e]=Number(n));return e}[on](e){let t=e||`*`;if(F(this,Bt,`f`)[t])return F(this,Bt,`f`)[t];let n={};try{let t=e||F(this,Y,`f`).mainFilename;!e&&F(this,Y,`f`).path.extname(t)&&(t=F(this,Y,`f`).path.dirname(t));let r=F(this,Y,`f`).findUp(t,(e,t)=>{if(t.includes(`package.json`))return`package.json`});j(r,void 0,F(this,Y,`f`)),n=JSON.parse(F(this,Y,`f`).readFileSync(r,`utf8`))}catch{}return F(this,Bt,`f`)[t]=n||{},F(this,Bt,`f`)[t]}[$](e,t){t=[].concat(t),t.forEach(t=>{t=this[un](t),F(this,K,`f`)[e].push(t)})}[sn](e,t,n,r){this[ln](e,t,n,r,(e,t,n)=>{F(this,K,`f`)[e][t]=n})}[cn](e,t,n,r){this[ln](e,t,n,r,(e,t,n)=>{F(this,K,`f`)[e][t]=(F(this,K,`f`)[e][t]||[]).concat(n)})}[ln](e,t,n,r,i){if(Array.isArray(n))n.forEach(t=>{e(t,r)});else if((e=>typeof e==`object`)(n))for(let t of Ve(n))e(t,n[t]);else i(t,this[un](n),r)}[un](e){return e===`__proto__`?`___proto___`:e}[dn](e,t){return this[sn](this[dn].bind(this),`key`,e,t),this}[fn](){var e,t,n,r,i,a,o,s,c,l,u,d;let f=F(this,Pt,`f`).pop();j(f,void 0,F(this,Y,`f`));let p;e=this,t=this,n=this,r=this,i=this,a=this,o=this,s=this,c=this,l=this,u=this,d=this,{options:{set value(t){P(e,K,t,`f`)}}.value,configObjects:p,exitProcess:{set value(e){P(t,B,e,`f`)}}.value,groups:{set value(e){P(n,H,e,`f`)}}.value,output:{set value(e){P(r,G,e,`f`)}}.value,exitError:{set value(e){P(i,z,e,`f`)}}.value,hasOutput:{set value(e){P(a,U,e,`f`)}}.value,parsed:this.parsed,strict:{set value(e){P(o,Ut,e,`f`)}}.value,strictCommands:{set value(e){P(s,Wt,e,`f`)}}.value,strictOptions:{set value(e){P(c,Gt,e,`f`)}}.value,completionCommand:{set value(e){P(l,R,e,`f`)}}.value,parseFn:{set value(e){P(u,q,e,`f`)}}.value,parseContext:{set value(e){P(d,zt,e,`f`)}}.value}=f,F(this,K,`f`).configObjects=p,F(this,X,`f`).unfreeze(),F(this,Q,`f`).unfreeze(),F(this,I,`f`).unfreeze(),F(this,V,`f`).unfreeze()}[pn](e,t){return Ye(t,t=>(e(t),t))}getInternalMethods(){return{getCommandInstance:this[mn].bind(this),getContext:this[hn].bind(this),getHasOutput:this[gn].bind(this),getLoggerInstance:this[_n].bind(this),getParseContext:this[vn].bind(this),getParserConfiguration:this[en].bind(this),getUsageConfiguration:this[tn].bind(this),getUsageInstance:this[yn].bind(this),getValidationInstance:this[bn].bind(this),hasParseCallback:this[xn].bind(this),isGlobalContext:this[Sn].bind(this),postProcess:this[Cn].bind(this),reset:this[Tn].bind(this),runValidation:this[Dn].bind(this),runYargsParserAndExecuteCommands:this[En].bind(this),setHasOutput:this[On].bind(this)}}[mn](){return F(this,I,`f`)}[hn](){return F(this,At,`f`)}[gn](){return F(this,U,`f`)}[_n](){return F(this,It,`f`)}[vn](){return F(this,zt,`f`)||{}}[yn](){return F(this,X,`f`)}[bn](){return F(this,Q,`f`)}[xn](){return!!F(this,q,`f`)}[Sn](){return F(this,Ft,`f`)}[Cn](e,t,n,r){if(n||M(e))return e;t||(e=this[Jt](e));let i=this[en]()[`parse-positional-numbers`]||this[en]()[`parse-positional-numbers`]===void 0;return i&&(e=this[an](e)),r&&(e=Je(e,this,F(this,V,`f`).getMiddleware(),!1)),e}[Tn](e={}){P(this,K,F(this,K,`f`)||{},`f`);let t={};t.local=F(this,K,`f`).local||[],t.configObjects=F(this,K,`f`).configObjects||[];let n={};t.local.forEach(t=>{n[t]=!0,(e[t]||[]).forEach(e=>{n[e]=!0})}),Object.assign(F(this,Vt,`f`),Object.keys(F(this,H,`f`)).reduce((e,t)=>{let r=F(this,H,`f`)[t].filter(e=>!(e in n));return r.length>0&&(e[t]=r),e},{})),P(this,H,{},`f`);let r=[`array`,`boolean`,`string`,`skipValidation`,`count`,`normalize`,`number`,`hiddenOptions`],i=[`narg`,`key`,`alias`,`default`,`defaultDescription`,`config`,`choices`,`demandedOptions`,`demandedCommands`,`deprecatedOptions`];return r.forEach(e=>{t[e]=(F(this,K,`f`)[e]||[]).filter(e=>!n[e])}),i.forEach(e=>{t[e]=ot(F(this,K,`f`)[e],e=>!n[e])}),t.envPrefix=F(this,K,`f`).envPrefix,P(this,K,t,`f`),P(this,X,F(this,X,`f`)?F(this,X,`f`).reset(n):lt(this,F(this,Y,`f`)),`f`),P(this,Q,F(this,Q,`f`)?F(this,Q,`f`).reset(n):St(this,F(this,X,`f`),F(this,Y,`f`)),`f`),P(this,I,F(this,I,`f`)?F(this,I,`f`).reset():et(F(this,X,`f`),F(this,Q,`f`),F(this,V,`f`),F(this,Y,`f`)),`f`),F(this,L,`f`)||P(this,L,_t(this,F(this,X,`f`),F(this,I,`f`),F(this,Y,`f`)),`f`),F(this,V,`f`).reset(),P(this,R,null,`f`),P(this,G,``,`f`),P(this,z,null,`f`),P(this,U,!1,`f`),this.parsed=!1,this}[wn](e,t){return F(this,Y,`f`).path.relative(e,t)}[En](e,t,n,r=0,i=!1){let a=!!n||i;e||=F(this,J,`f`),F(this,K,`f`).__=F(this,Y,`f`).y18n.__,F(this,K,`f`).configuration=this[en]();let o=!!F(this,K,`f`).configuration[`populate--`],s=Object.assign({},F(this,K,`f`).configuration,{"populate--":!0}),c=F(this,Y,`f`).Parser.detailed(e,Object.assign({},F(this,K,`f`),{configuration:{"parse-positional-numbers":!1,...s}})),l=Object.assign(c.argv,F(this,zt,`f`)),u,d=c.aliases,f=!1,p=!1;Object.keys(l).forEach(e=>{e===F(this,W,`f`)&&l[e]?f=!0:e===F(this,Z,`f`)&&l[e]&&(p=!0)}),l.$0=this.$0,this.parsed=c,r===0&&F(this,X,`f`).clearCachedHelpMessage();try{if(this[nn](),t)return this[Cn](l,o,!!n,!1);if(F(this,W,`f`)){let e=[F(this,W,`f`)].concat(d[F(this,W,`f`)]||[]).filter(e=>e.length>1);e.includes(``+l._[l._.length-1])&&(l._.pop(),f=!0)}P(this,Ft,!1,`f`);let s=F(this,I,`f`).getCommands(),m=F(this,L,`f`).completionKey in l,h=f||m||i;if(l._.length){if(s.length){let e;for(let t=r||0,a;l._[t]!==void 0;t++)if(a=String(l._[t]),s.includes(a)&&a!==F(this,R,`f`)){let e=F(this,I,`f`).runCommand(a,this,c,t+1,i,f||p||i);return this[Cn](e,o,!!n,!1)}else if(!e&&a!==F(this,R,`f`)){e=a;break}!F(this,I,`f`).hasDefaultCommand()&&F(this,Ht,`f`)&&e&&!h&&F(this,Q,`f`).recommendCommands(e,s)}F(this,R,`f`)&&l._.includes(F(this,R,`f`))&&!m&&(F(this,B,`f`)&&st(!0),this.showCompletionScript(),this.exit(0))}if(F(this,I,`f`).hasDefaultCommand()&&!h){let e=F(this,I,`f`).runCommand(null,this,c,0,i,f||p||i);return this[Cn](e,o,!!n,!1)}if(m){F(this,B,`f`)&&st(!0),e=[].concat(e);let t=e.slice(e.indexOf(`--${F(this,L,`f`).completionKey}`)+1);return F(this,L,`f`).getCompletion(t,(e,t)=>{if(e)throw new k(e.message);(t||[]).forEach(e=>{F(this,It,`f`).log(e)}),this.exit(0)}),this[Cn](l,!o,!!n,!1)}if(F(this,U,`f`)||(f?(F(this,B,`f`)&&st(!0),a=!0,this.showHelp(`log`),this.exit(0)):p&&(F(this,B,`f`)&&st(!0),a=!0,F(this,X,`f`).showVersion(`log`),this.exit(0))),!a&&F(this,K,`f`).skipValidation.length>0&&(a=Object.keys(l).some(e=>F(this,K,`f`).skipValidation.indexOf(e)>=0&&l[e]===!0)),!a){if(c.error)throw new k(c.error.message);if(!m){let e=this[Dn](d,{},c.error);n||(u=Je(l,this,F(this,V,`f`).getMiddleware(),!0)),u=this[pn](e,u??l),M(u)&&!n&&(u=u.then(()=>Je(l,this,F(this,V,`f`).getMiddleware(),!1)))}}}catch(e){if(e instanceof k)F(this,X,`f`).fail(e.message,e);else throw e}return this[Cn](u??l,o,!!n,!0)}[Dn](e,t,n,r){let i={...this.getDemandedOptions()};return a=>{if(n)throw new k(n.message);F(this,Q,`f`).nonOptionCount(a),F(this,Q,`f`).requiredArguments(a,i);let o=!1;F(this,Wt,`f`)&&(o=F(this,Q,`f`).unknownCommands(a)),F(this,Ut,`f`)&&!o?F(this,Q,`f`).unknownArguments(a,e,t,!!r):F(this,Gt,`f`)&&F(this,Q,`f`).unknownArguments(a,e,{},!1,!1),F(this,Q,`f`).limitedChoices(a),F(this,Q,`f`).implications(a),F(this,Q,`f`).conflicting(a)}}[On](){P(this,U,!0,`f`)}[kn](e){if(typeof e==`string`)F(this,K,`f`).key[e]=!0;else for(let t of e)F(this,K,`f`).key[t]=!0}};function jn(e){return!!e&&typeof e.getInternalMethods==`function`}const Mn=qt(ze);var Nn=Mn;function Pn(e,t){let n=e.startsWith(`.`)?u(t,e):e;return import(n)}function Fn(e,t){return Pn(e,t).catch(e=>{if(e.code===`ERR_MODULE_NOT_FOUND`&&e.message.endsWith(` imported from ${g(import.meta.url)}`))return!1;throw e})}function In(e){return Object.keys(e).some(e=>e&&e!==`$0`)}function Ln(e,t){let{homepage:n,site:r=n,repository:i}=t,a=r&&r!==i,o=e.getInternalMethods(),s=In(o.getCommandInstance().handlers);return o.getUsageInstance().getUsage().length===0&&(s?e.usage(`Usage: $0 <command>`):e.usage(`Usage: $0`)),s&&e.demandCommand(1,`Won't work without a command`),a&&e.epilogue(`Website: ${r}`),i&&e.epilogue(`Repository: ${i}`),e}function Rn(e,t){if(typeof e==`string`||!e)return t;let n=Object.keys(e);return n.length===1?n[0]:!1}var zn=class{constructor(e,n){this.root=n;let{bin:r,homepage:i,name:a=`cheetor`,repository:{url:o=``}={},version:s}=typeof e==`string`?JSON.parse(t(new URL(e,n))):e;this.homepage=i,this.repository=o.includes(`github.com`)?o.replace(/\.git$/,``):``;let c=Nn(process.argv.slice(2)).strict().alias(`help`,`h`).alias(`version`,`v`).hide(`help`).version(s).hide(`version`).detectLocale(!1),l=Rn(r,a);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=>{let n=await Pn(e,this.root);return t.command(n)}),this}commandSafe(e){return this.cli=this.cli.then(t=>Fn(e,this.root).then(e=>e&&e.command?t.command(e):t)),this}commandSmart(e){return this.cli=this.cli.then(async t=>{let 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=>Ln(e,this)).then(t=>typeof e==`function`?e(t.parse()):t.parse())}};process.on(`SIGINT`,()=>{}),new zn(`../package.json`,import.meta.url).website(`https://www.npmjs.com/org/nice-move`).setup(()=>{import(`./lib-CE3Cn25u.mjs`).then(({init:e})=>{e()}).catch(e=>{if(e.message!==`cancel`)throw e})});