create-qwik 2.0.0-beta.1 → 2.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +105 -98
- package/dist/starters/apps/base/package.json +10 -10
- package/dist/starters/apps/base/src/entry.preview.tsx +1 -3
- package/dist/starters/apps/base/src/entry.ssr.tsx +23 -23
- package/dist/starters/apps/base/tsconfig.json +1 -1
- package/dist/starters/apps/empty/src/root.tsx +20 -17
- package/dist/starters/apps/library/README.md +8 -0
- package/dist/starters/apps/library/package.json +11 -10
- package/dist/starters/apps/library/src/root.tsx +7 -1
- package/dist/starters/apps/library/tsconfig.json +1 -1
- package/dist/starters/apps/library/vite.config.mts +3 -2
- package/dist/starters/apps/playground/src/root.tsx +20 -17
- package/dist/starters/apps/playground/src/routes/demo/flower/index.tsx +0 -1
- package/package.json +3 -3
- package/dist/starters/apps/base/src/entry.dev.tsx +0 -17
- package/dist/starters/apps/empty/public/manifest.json +0 -9
- package/dist/starters/apps/empty/src/components/router-head/router-head.tsx +0 -32
- package/dist/starters/apps/library/src/entry.dev.tsx +0 -17
- package/dist/starters/apps/library/src/entry.ssr.tsx +0 -21
- package/dist/starters/apps/playground/src/components/router-head/router-head.tsx +0 -37
package/dist/index.cjs
CHANGED
|
@@ -1,112 +1,119 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* create-qwik 2.0.0-beta.
|
|
3
|
+
* create-qwik 2.0.0-beta.10-dev+4669425
|
|
4
4
|
* Copyright QwikDev. All Rights Reserved.
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://github.com/QwikDev/qwik/blob/main/LICENSE
|
|
7
7
|
*/
|
|
8
|
-
"use strict";var Zo=Object.create;var Jt=Object.defineProperty;var Xo=Object.getOwnPropertyDescriptor;var eu=Object.getOwnPropertyNames;var tu=Object.getPrototypeOf,nu=Object.prototype.hasOwnProperty;var he=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),iu=(n,e)=>{for(var t in e)Jt(n,t,{get:e[t],enumerable:!0})},is=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of eu(e))!nu.call(n,r)&&r!==t&&Jt(n,r,{get:()=>e[r],enumerable:!(i=Xo(e,r))||i.enumerable});return n};var ae=(n,e,t)=>(t=n!=null?Zo(tu(n)):{},is(e||!n||!n.__esModule?Jt(t,"default",{value:n,enumerable:!0}):t,n)),su=n=>is(Jt({},"__esModule",{value:!0}),n);var Vn=he((Cc,ss)=>{"use strict";var qn="\x1B",X=`${qn}[`,ru="\x07",Un={to(n,e){return e?`${X}${e+1};${n+1}H`:`${X}${n+1}G`},move(n,e){let t="";return n<0?t+=`${X}${-n}D`:n>0&&(t+=`${X}${n}C`),e<0?t+=`${X}${-e}A`:e>0&&(t+=`${X}${e}B`),t},up:(n=1)=>`${X}${n}A`,down:(n=1)=>`${X}${n}B`,forward:(n=1)=>`${X}${n}C`,backward:(n=1)=>`${X}${n}D`,nextLine:(n=1)=>`${X}E`.repeat(n),prevLine:(n=1)=>`${X}F`.repeat(n),left:`${X}G`,hide:`${X}?25l`,show:`${X}?25h`,save:`${qn}7`,restore:`${qn}8`},ou={up:(n=1)=>`${X}S`.repeat(n),down:(n=1)=>`${X}T`.repeat(n)},uu={screen:`${X}2J`,up:(n=1)=>`${X}1J`.repeat(n),down:(n=1)=>`${X}J`.repeat(n),line:`${X}2K`,lineEnd:`${X}K`,lineStart:`${X}1K`,lines(n){let e="";for(let t=0;t<n;t++)e+=this.line+(t<n-1?Un.up():"");return n&&(e+=Un.left),e}};ss.exports={cursor:Un,scroll:ou,erase:uu,beep:ru}});var Gn=he((Fc,Hn)=>{var Qt=process||{},rs=Qt.argv||[],Kt=Qt.env||{},au=!(Kt.NO_COLOR||rs.includes("--no-color"))&&(!!Kt.FORCE_COLOR||rs.includes("--color")||Qt.platform==="win32"||(Qt.stdout||{}).isTTY&&Kt.TERM!=="dumb"||!!Kt.CI),cu=(n,e,t=n)=>i=>{let r=""+i,o=r.indexOf(e,n.length);return~o?n+lu(r,e,t,o)+e:n+r+e},lu=(n,e,t,i)=>{let r="",o=0;do r+=n.substring(o,i)+t,o=i+e.length,i=n.indexOf(e,o);while(~i);return r+n.substring(o)},os=(n=au)=>{let e=n?cu:()=>String;return{isColorSupported:n,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};Hn.exports=os();Hn.exports.createColors=os});var Rs=he((Zc,Ws)=>{"use strict";Ws.exports=function(){if(process.env.npm_config_user_agent)return qu(process.env.npm_config_user_agent)};function qu(n){let e=n.split(" ")[0],t=e.lastIndexOf("/"),i=e.substring(0,t);return{name:i==="npminstall"?"cnpm":i,version:e.substring(t+1)}}});var Us=he((Xc,qs)=>{qs.exports=zs;zs.sync=Vu;var Ls=require("fs");function Uu(n,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var i=0;i<t.length;i++){var r=t[i].toLowerCase();if(r&&n.substr(-r.length).toLowerCase()===r)return!0}return!1}function ks(n,e,t){return!n.isSymbolicLink()&&!n.isFile()?!1:Uu(e,t)}function zs(n,e,t){Ls.stat(n,function(i,r){t(i,i?!1:ks(r,n,e))})}function Vu(n,e){return ks(Ls.statSync(n),n,e)}});var Js=he((el,Ys)=>{Ys.exports=Hs;Hs.sync=Hu;var Vs=require("fs");function Hs(n,e,t){Vs.stat(n,function(i,r){t(i,i?!1:Gs(r,e))})}function Hu(n,e){return Gs(Vs.statSync(n),e)}function Gs(n,e){return n.isFile()&&Gu(n,e)}function Gu(n,e){var t=n.mode,i=n.uid,r=n.gid,o=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),s=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),f=parseInt("010",8),D=parseInt("001",8),h=a|f,c=t&D||t&f&&r===s||t&a&&i===o||t&h&&o===0;return c}});var Qs=he((nl,Ks)=>{var tl=require("fs"),an;process.platform==="win32"||global.TESTING_WINDOWS?an=Us():an=Js();Ks.exports=ci;ci.sync=Yu;function ci(n,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,r){ci(n,e||{},function(o,s){o?r(o):i(s)})})}an(n,e||{},function(i,r){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,r=!1),t(i,r)})}function Yu(n,e){try{return an.sync(n,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var sr=he((il,ir)=>{var xt=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Zs=require("path"),Ju=xt?";":":",Xs=Qs(),er=n=>Object.assign(new Error(`not found: ${n}`),{code:"ENOENT"}),tr=(n,e)=>{let t=e.colon||Ju,i=n.match(/\//)||xt&&n.match(/\\/)?[""]:[...xt?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],r=xt?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=xt?r.split(t):[""];return xt&&n.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:i,pathExt:o,pathExtExe:r}},nr=(n,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:r,pathExtExe:o}=tr(n,e),s=[],a=D=>new Promise((h,c)=>{if(D===i.length)return e.all&&s.length?h(s):c(er(n));let p=i[D],C=/^".*"$/.test(p)?p.slice(1,-1):p,E=Zs.join(C,n),b=!C&&/^\.[\\\/]/.test(n)?n.slice(0,2)+E:E;h(f(b,D,0))}),f=(D,h,c)=>new Promise((p,C)=>{if(c===r.length)return p(a(h+1));let E=r[c];Xs(D+E,{pathExt:o},(b,g)=>{if(!b&&g)if(e.all)s.push(D+E);else return p(D+E);return p(f(D,h,c+1))})});return t?a(0).then(D=>t(null,D),t):a(0)},Ku=(n,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:r}=tr(n,e),o=[];for(let s=0;s<t.length;s++){let a=t[s],f=/^".*"$/.test(a)?a.slice(1,-1):a,D=Zs.join(f,n),h=!f&&/^\.[\\\/]/.test(n)?n.slice(0,2)+D:D;for(let c=0;c<i.length;c++){let p=h+i[c];try{if(Xs.sync(p,{pathExt:r}))if(e.all)o.push(p);else return p}catch{}}}if(e.all&&o.length)return o;if(e.nothrow)return null;throw er(n)};ir.exports=nr;nr.sync=Ku});var or=he((sl,li)=>{"use strict";var rr=(n={})=>{let e=n.env||process.env;return(n.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};li.exports=rr;li.exports.default=rr});var lr=he((rl,cr)=>{"use strict";var ur=require("path"),Qu=sr(),Zu=or();function ar(n,e){let t=n.options.env||process.env,i=process.cwd(),r=n.options.cwd!=null,o=r&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(n.options.cwd)}catch{}let s;try{s=Qu.sync(n.command,{path:t[Zu({env:t})],pathExt:e?ur.delimiter:void 0})}catch{}finally{o&&process.chdir(i)}return s&&(s=ur.resolve(r?n.options.cwd:"",s)),s}function Xu(n){return ar(n)||ar(n,!0)}cr.exports=Xu});var fr=he((ol,Di)=>{"use strict";var fi=/([()\][%!^"`<>&|;, *?])/g;function ea(n){return n=n.replace(fi,"^$1"),n}function ta(n,e){return n=`${n}`,n=n.replace(/(\\*)"/g,'$1$1\\"'),n=n.replace(/(\\*)$/,"$1$1"),n=`"${n}"`,n=n.replace(fi,"^$1"),e&&(n=n.replace(fi,"^$1")),n}Di.exports.command=ea;Di.exports.argument=ta});var hr=he((ul,Dr)=>{"use strict";Dr.exports=/^#!(.*)/});var dr=he((al,pr)=>{"use strict";var na=hr();pr.exports=(n="")=>{let e=n.match(na);if(!e)return null;let[t,i]=e[0].replace(/#! ?/,"").split(" "),r=t.split("/").pop();return r==="env"?i:i?`${r} ${i}`:r}});var gr=he((cl,mr)=>{"use strict";var hi=require("fs"),ia=dr();function sa(n){let t=Buffer.alloc(150),i;try{i=hi.openSync(n,"r"),hi.readSync(i,t,0,150,0),hi.closeSync(i)}catch{}return ia(t.toString())}mr.exports=sa});var Er=he((ll,br)=>{"use strict";var ra=require("path"),Cr=lr(),Fr=fr(),oa=gr(),ua=process.platform==="win32",aa=/\.(?:com|exe)$/i,ca=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function la(n){n.file=Cr(n);let e=n.file&&oa(n.file);return e?(n.args.unshift(n.file),n.command=e,Cr(n)):n.file}function fa(n){if(!ua)return n;let e=la(n),t=!aa.test(e);if(n.options.forceShell||t){let i=ca.test(e);n.command=ra.normalize(n.command),n.command=Fr.command(n.command),n.args=n.args.map(o=>Fr.argument(o,i));let r=[n.command].concat(n.args).join(" ");n.args=["/d","/s","/c",`"${r}"`],n.command=process.env.comspec||"cmd.exe",n.options.windowsVerbatimArguments=!0}return n}function Da(n,e,t){e&&!Array.isArray(e)&&(t=e,e=null),e=e?e.slice(0):[],t=Object.assign({},t);let i={command:n,args:e,options:t,file:void 0,original:{command:n,args:e}};return t.shell?i:fa(i)}br.exports=Da});var xr=he((fl,wr)=>{"use strict";var pi=process.platform==="win32";function di(n,e){return Object.assign(new Error(`${e} ${n.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${n.command}`,path:n.command,spawnargs:n.args})}function ha(n,e){if(!pi)return;let t=n.emit;n.emit=function(i,r){if(i==="exit"){let o=yr(r,e,"spawn");if(o)return t.call(n,"error",o)}return t.apply(n,arguments)}}function yr(n,e){return pi&&n===1&&!e.file?di(e.original,"spawn"):null}function pa(n,e){return pi&&n===1&&!e.file?di(e.original,"spawnSync"):null}wr.exports={hookChildProcess:ha,verifyENOENT:yr,verifyENOENTSync:pa,notFoundError:di}});var vr=he((Dl,At)=>{"use strict";var Ar=require("child_process"),mi=Er(),gi=xr();function $r(n,e,t){let i=mi(n,e,t),r=Ar.spawn(i.command,i.args,i.options);return gi.hookChildProcess(r,i),r}function da(n,e,t){let i=mi(n,e,t),r=Ar.spawnSync(i.command,i.args,i.options);return r.error=r.error||gi.verifyENOENTSync(r.status,i),r}At.exports=$r;At.exports.spawn=$r;At.exports.sync=da;At.exports._parse=mi;At.exports._enoent=gi});var mc={};iu(mc,{createApp:()=>Qo,runCli:()=>pc,runCreateCli:()=>es,runCreateInteractiveCli:()=>ns});module.exports=su(mc);var me=ae(Vn(),1),bt=require("node:process"),Ve=ae(require("node:readline"),1),Kn=ae(require("node:readline"),1),ds=require("node:tty"),Xt=ae(Gn(),1);function fu({onlyFirst:n=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,n?void 0:"g")}function ms(n){if(typeof n!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof n}\``);return n.replace(fu(),"")}function gs(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Cs={exports:{}};(function(n){var e={};n.exports=e,e.eastAsianWidth=function(i){var r=i.charCodeAt(0),o=i.length==2?i.charCodeAt(1):0,s=r;return 55296<=r&&r<=56319&&56320<=o&&o<=57343&&(r&=1023,o&=1023,s=r<<10|o,s+=65536),s==12288||65281<=s&&s<=65376||65504<=s&&s<=65510?"F":s==8361||65377<=s&&s<=65470||65474<=s&&s<=65479||65482<=s&&s<=65487||65490<=s&&s<=65495||65498<=s&&s<=65500||65512<=s&&s<=65518?"H":4352<=s&&s<=4447||4515<=s&&s<=4519||4602<=s&&s<=4607||9001<=s&&s<=9002||11904<=s&&s<=11929||11931<=s&&s<=12019||12032<=s&&s<=12245||12272<=s&&s<=12283||12289<=s&&s<=12350||12353<=s&&s<=12438||12441<=s&&s<=12543||12549<=s&&s<=12589||12593<=s&&s<=12686||12688<=s&&s<=12730||12736<=s&&s<=12771||12784<=s&&s<=12830||12832<=s&&s<=12871||12880<=s&&s<=13054||13056<=s&&s<=19903||19968<=s&&s<=42124||42128<=s&&s<=42182||43360<=s&&s<=43388||44032<=s&&s<=55203||55216<=s&&s<=55238||55243<=s&&s<=55291||63744<=s&&s<=64255||65040<=s&&s<=65049||65072<=s&&s<=65106||65108<=s&&s<=65126||65128<=s&&s<=65131||110592<=s&&s<=110593||127488<=s&&s<=127490||127504<=s&&s<=127546||127552<=s&&s<=127560||127568<=s&&s<=127569||131072<=s&&s<=194367||177984<=s&&s<=196605||196608<=s&&s<=262141?"W":32<=s&&s<=126||162<=s&&s<=163||165<=s&&s<=166||s==172||s==175||10214<=s&&s<=10221||10629<=s&&s<=10630?"Na":s==161||s==164||167<=s&&s<=168||s==170||173<=s&&s<=174||176<=s&&s<=180||182<=s&&s<=186||188<=s&&s<=191||s==198||s==208||215<=s&&s<=216||222<=s&&s<=225||s==230||232<=s&&s<=234||236<=s&&s<=237||s==240||242<=s&&s<=243||247<=s&&s<=250||s==252||s==254||s==257||s==273||s==275||s==283||294<=s&&s<=295||s==299||305<=s&&s<=307||s==312||319<=s&&s<=322||s==324||328<=s&&s<=331||s==333||338<=s&&s<=339||358<=s&&s<=359||s==363||s==462||s==464||s==466||s==468||s==470||s==472||s==474||s==476||s==593||s==609||s==708||s==711||713<=s&&s<=715||s==717||s==720||728<=s&&s<=731||s==733||s==735||768<=s&&s<=879||913<=s&&s<=929||931<=s&&s<=937||945<=s&&s<=961||963<=s&&s<=969||s==1025||1040<=s&&s<=1103||s==1105||s==8208||8211<=s&&s<=8214||8216<=s&&s<=8217||8220<=s&&s<=8221||8224<=s&&s<=8226||8228<=s&&s<=8231||s==8240||8242<=s&&s<=8243||s==8245||s==8251||s==8254||s==8308||s==8319||8321<=s&&s<=8324||s==8364||s==8451||s==8453||s==8457||s==8467||s==8470||8481<=s&&s<=8482||s==8486||s==8491||8531<=s&&s<=8532||8539<=s&&s<=8542||8544<=s&&s<=8555||8560<=s&&s<=8569||s==8585||8592<=s&&s<=8601||8632<=s&&s<=8633||s==8658||s==8660||s==8679||s==8704||8706<=s&&s<=8707||8711<=s&&s<=8712||s==8715||s==8719||s==8721||s==8725||s==8730||8733<=s&&s<=8736||s==8739||s==8741||8743<=s&&s<=8748||s==8750||8756<=s&&s<=8759||8764<=s&&s<=8765||s==8776||s==8780||s==8786||8800<=s&&s<=8801||8804<=s&&s<=8807||8810<=s&&s<=8811||8814<=s&&s<=8815||8834<=s&&s<=8835||8838<=s&&s<=8839||s==8853||s==8857||s==8869||s==8895||s==8978||9312<=s&&s<=9449||9451<=s&&s<=9547||9552<=s&&s<=9587||9600<=s&&s<=9615||9618<=s&&s<=9621||9632<=s&&s<=9633||9635<=s&&s<=9641||9650<=s&&s<=9651||9654<=s&&s<=9655||9660<=s&&s<=9661||9664<=s&&s<=9665||9670<=s&&s<=9672||s==9675||9678<=s&&s<=9681||9698<=s&&s<=9701||s==9711||9733<=s&&s<=9734||s==9737||9742<=s&&s<=9743||9748<=s&&s<=9749||s==9756||s==9758||s==9792||s==9794||9824<=s&&s<=9825||9827<=s&&s<=9829||9831<=s&&s<=9834||9836<=s&&s<=9837||s==9839||9886<=s&&s<=9887||9918<=s&&s<=9919||9924<=s&&s<=9933||9935<=s&&s<=9953||s==9955||9960<=s&&s<=9983||s==10045||s==10071||10102<=s&&s<=10111||11093<=s&&s<=11097||12872<=s&&s<=12879||57344<=s&&s<=63743||65024<=s&&s<=65039||s==65533||127232<=s&&s<=127242||127248<=s&&s<=127277||127280<=s&&s<=127337||127344<=s&&s<=127386||917760<=s&&s<=917999||983040<=s&&s<=1048573||1048576<=s&&s<=1114109?"A":"N"},e.characterLength=function(i){var r=this.eastAsianWidth(i);return r=="F"||r=="W"||r=="A"?2:1};function t(i){return i.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(i){for(var r=t(i),o=0,s=0;s<r.length;s++)o=o+this.characterLength(r[s]);return o},e.slice=function(i,r,o){textLen=e.length(i),r=r||0,o=o||1,r<0&&(r=textLen+r),o<0&&(o=textLen+o);for(var s="",a=0,f=t(i),D=0;D<f.length;D++){var h=f[D],c=e.length(h);if(a>=r-(c==2?1:0))if(a+c<=o)s+=h;else break;a+=c}return s}})(Cs);var Du=Cs.exports,hu=gs(Du),pu=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},du=gs(pu);function Wt(n,e={}){if(typeof n!="string"||n.length===0||(e={ambiguousIsNarrow:!0,...e},n=ms(n),n.length===0))return 0;n=n.replace(du()," ");let t=e.ambiguousIsNarrow?1:2,i=0;for(let r of n){let o=r.codePointAt(0);if(!(o<=31||o>=127&&o<=159||o>=768&&o<=879))switch(hu.eastAsianWidth(r)){case"F":case"W":i+=2;break;case"A":i+=t;break;default:i+=1}}return i}var Yn=10,us=(n=0)=>e=>`\x1B[${e+n}m`,as=(n=0)=>e=>`\x1B[${38+n};5;${e}m`,cs=(n=0)=>(e,t,i)=>`\x1B[${38+n};2;${e};${t};${i}m`,Q={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(Q.modifier);var mu=Object.keys(Q.color),gu=Object.keys(Q.bgColor);[...mu,...gu];function Cu(){let n=new Map;for(let[e,t]of Object.entries(Q)){for(let[i,r]of Object.entries(t))Q[i]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},t[i]=Q[i],n.set(r[0],r[1]);Object.defineProperty(Q,e,{value:t,enumerable:!1})}return Object.defineProperty(Q,"codes",{value:n,enumerable:!1}),Q.color.close="\x1B[39m",Q.bgColor.close="\x1B[49m",Q.color.ansi=us(),Q.color.ansi256=as(),Q.color.ansi16m=cs(),Q.bgColor.ansi=us(Yn),Q.bgColor.ansi256=as(Yn),Q.bgColor.ansi16m=cs(Yn),Object.defineProperties(Q,{rgbToAnsi256:{value:(e,t,i)=>e===t&&t===i?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(i/255*5),enumerable:!1},hexToRgb:{value:e=>{let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[i]=t;i.length===3&&(i=[...i].map(o=>o+o).join(""));let r=Number.parseInt(i,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>Q.rgbToAnsi256(...Q.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,i,r;if(e>=232)t=((e-232)*10+8)/255,i=t,r=t;else{e-=16;let a=e%36;t=Math.floor(e/36)/5,i=Math.floor(a/6)/5,r=a%6/5}let o=Math.max(t,i,r)*2;if(o===0)return 30;let s=30+(Math.round(r)<<2|Math.round(i)<<1|Math.round(t));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(e,t,i)=>Q.ansi256ToAnsi(Q.rgbToAnsi256(e,t,i)),enumerable:!1},hexToAnsi:{value:e=>Q.ansi256ToAnsi(Q.hexToAnsi256(e)),enumerable:!1}}),Q}var Fu=Cu(),nn=new Set(["\x1B","\x9B"]),bu=39,Qn="\x07",Fs="[",Eu="]",bs="m",Zn=`${Eu}8;;`,ls=n=>`${nn.values().next().value}${Fs}${n}${bs}`,fs=n=>`${nn.values().next().value}${Zn}${n}${Qn}`,yu=n=>n.split(" ").map(e=>Wt(e)),Jn=(n,e,t)=>{let i=[...e],r=!1,o=!1,s=Wt(ms(n[n.length-1]));for(let[a,f]of i.entries()){let D=Wt(f);if(s+D<=t?n[n.length-1]+=f:(n.push(f),s=0),nn.has(f)&&(r=!0,o=i.slice(a+1).join("").startsWith(Zn)),r){o?f===Qn&&(r=!1,o=!1):f===bs&&(r=!1);continue}s+=D,s===t&&a<i.length-1&&(n.push(""),s=0)}!s&&n[n.length-1].length>0&&n.length>1&&(n[n.length-2]+=n.pop())},wu=n=>{let e=n.split(" "),t=e.length;for(;t>0&&!(Wt(e[t-1])>0);)t--;return t===e.length?n:e.slice(0,t).join(" ")+e.slice(t).join("")},xu=(n,e,t={})=>{if(t.trim!==!1&&n.trim()==="")return"";let i="",r,o,s=yu(n),a=[""];for(let[D,h]of n.split(" ").entries()){t.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let c=Wt(a[a.length-1]);if(D!==0&&(c>=e&&(t.wordWrap===!1||t.trim===!1)&&(a.push(""),c=0),(c>0||t.trim===!1)&&(a[a.length-1]+=" ",c++)),t.hard&&s[D]>e){let p=e-c,C=1+Math.floor((s[D]-p-1)/e);Math.floor((s[D]-1)/e)<C&&a.push(""),Jn(a,h,e);continue}if(c+s[D]>e&&c>0&&s[D]>0){if(t.wordWrap===!1&&c<e){Jn(a,h,e);continue}a.push("")}if(c+s[D]>e&&t.wordWrap===!1){Jn(a,h,e);continue}a[a.length-1]+=h}t.trim!==!1&&(a=a.map(D=>wu(D)));let f=[...a.join(`
|
|
9
|
-
`)];for(let[D,h]of f.entries()){if(i+=h,nn.has(h)){let{groups:p}=new RegExp(`(?:\\${Fs}(?<code>\\d+)m|\\${Zn}(?<uri>.*)${Qn})`).exec(f.slice(D).join(""))||{groups:{}};if(p.code!==void 0){let C=Number.parseFloat(p.code);r=C===bu?void 0:C}else p.uri!==void 0&&(o=p.uri.length===0?void 0:p.uri)}let c=Fu.codes.get(Number(r));f[D+1]===`
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
"use strict";var La=Object.create;var Tn=Object.defineProperty;var Wa=Object.getOwnPropertyDescriptor;var qa=Object.getOwnPropertyNames;var Ga=Object.getPrototypeOf,Ha=Object.prototype.hasOwnProperty;var q=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports),Ua=(s,e)=>{for(var t in e)Tn(s,t,{get:e[t],enumerable:!0})},_r=(s,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of qa(e))!Ha.call(s,r)&&r!==t&&Tn(s,r,{get:()=>e[r],enumerable:!(n=Wa(e,r))||n.enumerable});return s};var he=(s,e,t)=>(t=s!=null?La(Ga(s)):{},_r(e||!s||!s.__esModule?Tn(t,"default",{value:s,enumerable:!0}):t,s)),Va=s=>_r(Tn({},"__esModule",{value:!0}),s);var Zs=q((Hh,Ir)=>{"use strict";var Qs={to(s,e){return e?`\x1B[${e+1};${s+1}H`:`\x1B[${s+1}G`},move(s,e){let t="";return s<0?t+=`\x1B[${-s}D`:s>0&&(t+=`\x1B[${s}C`),e<0?t+=`\x1B[${-e}A`:e>0&&(t+=`\x1B[${e}B`),t},up:(s=1)=>`\x1B[${s}A`,down:(s=1)=>`\x1B[${s}B`,forward:(s=1)=>`\x1B[${s}C`,backward:(s=1)=>`\x1B[${s}D`,nextLine:(s=1)=>"\x1B[E".repeat(s),prevLine:(s=1)=>"\x1B[F".repeat(s),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},za={up:(s=1)=>"\x1B[S".repeat(s),down:(s=1)=>"\x1B[T".repeat(s)},Ya={screen:"\x1B[2J",up:(s=1)=>"\x1B[1J".repeat(s),down:(s=1)=>"\x1B[J".repeat(s),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(s){let e="";for(let t=0;t<s;t++)e+=this.line+(t<s-1?Qs.up():"");return s&&(e+=Qs.left),e}};Ir.exports={cursor:Qs,scroll:za,erase:Ya,beep:"\x07"}});var ei=q((Uh,Xs)=>{var In=process||{},Nr=In.argv||[],_n=In.env||{},Ka=!(_n.NO_COLOR||Nr.includes("--no-color"))&&(!!_n.FORCE_COLOR||Nr.includes("--color")||In.platform==="win32"||(In.stdout||{}).isTTY&&_n.TERM!=="dumb"||!!_n.CI),Qa=(s,e,t=s)=>n=>{let r=""+n,o=r.indexOf(e,s.length);return~o?s+Za(r,e,t,o)+e:s+r+e},Za=(s,e,t,n)=>{let r="",o=0;do r+=s.substring(o,n)+t,o=n+e.length,n=s.indexOf(e,o);while(~n);return r+s.substring(o)},Br=(s=Ka)=>{let e=s?Qa:()=>String;return{isColorSupported:s,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};Xs.exports=Br();Xs.exports.createColors=Br});var lo=q(($f,co)=>{"use strict";co.exports=function(){if(process.env.npm_config_user_agent)return Ic(process.env.npm_config_user_agent)};function Ic(s){let e=s.split(" ")[0],t=e.lastIndexOf("/"),n=e.substring(0,t);return{name:n==="npminstall"?"cnpm":n,version:e.substring(t+1)}}});var mo=q((Of,Do)=>{Do.exports=po;po.sync=Bc;var ho=require("fs");function Nc(s,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var n=0;n<t.length;n++){var r=t[n].toLowerCase();if(r&&s.substr(-r.length).toLowerCase()===r)return!0}return!1}function fo(s,e,t){return!s.isSymbolicLink()&&!s.isFile()?!1:Nc(e,t)}function po(s,e,t){ho.stat(s,function(n,r){t(n,n?!1:fo(r,s,e))})}function Bc(s,e){return fo(ho.statSync(s),s,e)}});var Fo=q((Tf,yo)=>{yo.exports=Co;Co.sync=Sc;var go=require("fs");function Co(s,e,t){go.stat(s,function(n,r){t(n,n?!1:Eo(r,e))})}function Sc(s,e){return Eo(go.statSync(s),e)}function Eo(s,e){return s.isFile()&&kc(s,e)}function kc(s,e){var t=s.mode,n=s.uid,r=s.gid,o=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),i=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),u=parseInt("100",8),c=parseInt("010",8),h=parseInt("001",8),p=u|c,l=t&h||t&c&&r===i||t&u&&n===o||t&p&&o===0;return l}});var wo=q((If,bo)=>{var _f=require("fs"),qn;process.platform==="win32"||global.TESTING_WINDOWS?qn=mo():qn=Fo();bo.exports=Ci;Ci.sync=jc;function Ci(s,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,r){Ci(s,e||{},function(o,i){o?r(o):n(i)})})}qn(s,e||{},function(n,r){n&&(n.code==="EACCES"||e&&e.ignoreErrors)&&(n=null,r=!1),t(n,r)})}function jc(s,e){try{return qn.sync(s,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var _o=q((Nf,To)=>{var Ht=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",xo=require("path"),Mc=Ht?";":":",vo=wo(),Ao=s=>Object.assign(new Error(`not found: ${s}`),{code:"ENOENT"}),$o=(s,e)=>{let t=e.colon||Mc,n=s.match(/\//)||Ht&&s.match(/\\/)?[""]:[...Ht?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],r=Ht?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=Ht?r.split(t):[""];return Ht&&s.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:r}},Oo=(s,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:n,pathExt:r,pathExtExe:o}=$o(s,e),i=[],u=h=>new Promise((p,l)=>{if(h===n.length)return e.all&&i.length?p(i):l(Ao(s));let d=n[h],C=/^".*"$/.test(d)?d.slice(1,-1):d,F=xo.join(C,s),E=!C&&/^\.[\\\/]/.test(s)?s.slice(0,2)+F:F;p(c(E,h,0))}),c=(h,p,l)=>new Promise((d,C)=>{if(l===r.length)return d(u(p+1));let F=r[l];vo(h+F,{pathExt:o},(E,D)=>{if(!E&&D)if(e.all)i.push(h+F);else return d(h+F);return d(c(h,p,l+1))})});return t?u(0).then(h=>t(null,h),t):u(0)},Pc=(s,e)=>{e=e||{};let{pathEnv:t,pathExt:n,pathExtExe:r}=$o(s,e),o=[];for(let i=0;i<t.length;i++){let u=t[i],c=/^".*"$/.test(u)?u.slice(1,-1):u,h=xo.join(c,s),p=!c&&/^\.[\\\/]/.test(s)?s.slice(0,2)+h:h;for(let l=0;l<n.length;l++){let d=p+n[l];try{if(vo.sync(d,{pathExt:r}))if(e.all)o.push(d);else return d}catch{}}}if(e.all&&o.length)return o;if(e.nothrow)return null;throw Ao(s)};To.exports=Oo;Oo.sync=Pc});var No=q((Bf,Ei)=>{"use strict";var Io=(s={})=>{let e=s.env||process.env;return(s.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};Ei.exports=Io;Ei.exports.default=Io});var jo=q((Sf,ko)=>{"use strict";var Bo=require("path"),Jc=_o(),Rc=No();function So(s,e){let t=s.options.env||process.env,n=process.cwd(),r=s.options.cwd!=null,o=r&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(s.options.cwd)}catch{}let i;try{i=Jc.sync(s.command,{path:t[Rc({env:t})],pathExt:e?Bo.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return i&&(i=Bo.resolve(r?s.options.cwd:"",i)),i}function Lc(s){return So(s)||So(s,!0)}ko.exports=Lc});var Mo=q((kf,Fi)=>{"use strict";var yi=/([()\][%!^"`<>&|;, *?])/g;function Wc(s){return s=s.replace(yi,"^$1"),s}function qc(s,e){return s=`${s}`,s=s.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),s=s.replace(/(?=(\\+?)?)\1$/,"$1$1"),s=`"${s}"`,s=s.replace(yi,"^$1"),e&&(s=s.replace(yi,"^$1")),s}Fi.exports.command=Wc;Fi.exports.argument=qc});var Jo=q((jf,Po)=>{"use strict";Po.exports=/^#!(.*)/});var Lo=q((Mf,Ro)=>{"use strict";var Gc=Jo();Ro.exports=(s="")=>{let e=s.match(Gc);if(!e)return null;let[t,n]=e[0].replace(/#! ?/,"").split(" "),r=t.split("/").pop();return r==="env"?n:n?`${r} ${n}`:r}});var qo=q((Pf,Wo)=>{"use strict";var bi=require("fs"),Hc=Lo();function Uc(s){let t=Buffer.alloc(150),n;try{n=bi.openSync(s,"r"),bi.readSync(n,t,0,150,0),bi.closeSync(n)}catch{}return Hc(t.toString())}Wo.exports=Uc});var Vo=q((Jf,Uo)=>{"use strict";var Vc=require("path"),Go=jo(),Ho=Mo(),zc=qo(),Yc=process.platform==="win32",Kc=/\.(?:com|exe)$/i,Qc=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Zc(s){s.file=Go(s);let e=s.file&&zc(s.file);return e?(s.args.unshift(s.file),s.command=e,Go(s)):s.file}function Xc(s){if(!Yc)return s;let e=Zc(s),t=!Kc.test(e);if(s.options.forceShell||t){let n=Qc.test(e);s.command=Vc.normalize(s.command),s.command=Ho.command(s.command),s.args=s.args.map(o=>Ho.argument(o,n));let r=[s.command].concat(s.args).join(" ");s.args=["/d","/s","/c",`"${r}"`],s.command=process.env.comspec||"cmd.exe",s.options.windowsVerbatimArguments=!0}return s}function el(s,e,t){e&&!Array.isArray(e)&&(t=e,e=null),e=e?e.slice(0):[],t=Object.assign({},t);let n={command:s,args:e,options:t,file:void 0,original:{command:s,args:e}};return t.shell?n:Xc(n)}Uo.exports=el});var Ko=q((Rf,Yo)=>{"use strict";var wi=process.platform==="win32";function xi(s,e){return Object.assign(new Error(`${e} ${s.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${s.command}`,path:s.command,spawnargs:s.args})}function tl(s,e){if(!wi)return;let t=s.emit;s.emit=function(n,r){if(n==="exit"){let o=zo(r,e);if(o)return t.call(s,"error",o)}return t.apply(s,arguments)}}function zo(s,e){return wi&&s===1&&!e.file?xi(e.original,"spawn"):null}function nl(s,e){return wi&&s===1&&!e.file?xi(e.original,"spawnSync"):null}Yo.exports={hookChildProcess:tl,verifyENOENT:zo,verifyENOENTSync:nl,notFoundError:xi}});var Xo=q((Lf,Ut)=>{"use strict";var Qo=require("child_process"),vi=Vo(),Ai=Ko();function Zo(s,e,t){let n=vi(s,e,t),r=Qo.spawn(n.command,n.args,n.options);return Ai.hookChildProcess(r,n),r}function sl(s,e,t){let n=vi(s,e,t),r=Qo.spawnSync(n.command,n.args,n.options);return r.error=r.error||Ai.verifyENOENTSync(r.status,n),r}Ut.exports=Zo;Ut.exports.spawn=Zo;Ut.exports.sync=sl;Ut.exports._parse=vi;Ut.exports._enoent=Ai});var Yt=q(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.identifierRegex=Ve.reservedIdentifiers=void 0;Ve.isReserved=hu;Ve.isIdentifier=fl;Ve.reservedIdentifiers=["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with","yield","implements","interface","package","private","protected","public"];Ve.identifierRegex=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}]*/u;var hl=new RegExp(`^${Ve.identifierRegex.source}$`,Ve.identifierRegex.flags);function hu(s){return Ve.reservedIdentifiers.includes(s)}function fl(s){return hl.test(s)&&!hu(s)}});var ze=q(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.JsonToken=Kt.JsonTokenType=void 0;var fu;(function(s){s.IDENTIFIER="IDENTIFIER",s.STRING="STRING",s.NUMBER="NUMBER",s.BOOLEAN="BOOLEAN",s.NULL="NULL",s.COLON="COLON",s.COMMA="COMMA",s.LINE_COMMENT="LINE_COMMENT",s.BLOCK_COMMENT="BLOCK_COMMENT",s.BRACE_LEFT="BRACE_LEFT",s.BRACE_RIGHT="BRACE_RIGHT",s.BRACKET_LEFT="BRACKET_LEFT",s.BRACKET_RIGHT="BRACKET_RIGHT",s.WHITESPACE="WHITESPACE",s.NEWLINE="NEWLINE",s.EOF="EOF"})(fu||(Kt.JsonTokenType=fu={}));var pu;(function(s){function e(t,n){return t.type===n}s.isType=e})(pu||(Kt.JsonToken=pu={}))});var lt=q(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.JsonParseError=Qt.JsonError=void 0;var Yn=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}};Qt.JsonError=Yn;var Ni=class extends Yn{constructor(e,t){super(e),this.location=t,Object.setPrototypeOf(this,new.target.prototype)}};Qt.JsonParseError=Ni});var Bi=q(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.JsonLexer=void 0;var ue=ze(),Du=Yt(),du=lt(),Kn=class s{constructor(e){this.current=null,this.remaining=e}static tokenize(e){return[...new s(e)]}isEof(){var e;return((e=this.current)==null?void 0:e.type)===ue.JsonTokenType.EOF}[Symbol.iterator](){return{next:()=>this.isEof()?{done:!0,value:void 0}:{done:!1,value:this.next()}}}skipInsignificant(){return this.skip(ue.JsonTokenType.WHITESPACE,ue.JsonTokenType.NEWLINE,ue.JsonTokenType.LINE_COMMENT,ue.JsonTokenType.BLOCK_COMMENT)}skip(...e){let t=[];for(;!this.isEof()&&this.matches(...e);)t.push(this.peek()),this.next();return t}expect(e,...t){let n=this.peek(),r=[e,...t];if(!s.isTokenType(n,r)){let{line:o,column:i}=n.location.start,u=r.length===1?r[0]:`either ${r.slice(0,-1).join(", ")} or ${r[r.length-1]}`;throw new du.JsonParseError(`Expected ${u}, but got ${n.type} at ${o}:${i}.`,n.location)}return n}consume(e,...t){let n=this.expect(e,...t);return this.isEof()||this.next(),n}matches(...e){return s.isTokenType(this.peek(),e)}peek(){if(this.current===null)throw new Error("No token has been consumed yet.");return this.current}next(){if(this.isEof())throw new Error("The end of the input has been reached.");return this.remaining===""?this.current=this.createToken(ue.JsonTokenType.EOF,""):(this.current=this.match(),this.remaining=this.remaining.slice(this.current.value.length)),this.current}match(){var r,o,i;for(let{type:u,pattern:c}of s.PATTERNS){if(typeof c=="string"){if(this.remaining.startsWith(c))return this.createToken(u,c);continue}let h=this.remaining.match(c);if(h!==null)return this.createToken(u,h[0])}let e={index:((r=this.current)==null?void 0:r.location.end.index)??0,line:((o=this.current)==null?void 0:o.location.end.line)??1,column:((i=this.current)==null?void 0:i.location.end.column)??1},t={index:e.index+1,line:e.line,column:e.column+1},n=this.remaining[0];throw new du.JsonParseError(`Unexpected token '${n}' at ${e.line}:${e.column}.`,{start:e,end:t})}createToken(e,t){var o,i,u;let n={index:((o=this.current)==null?void 0:o.location.end.index)??0,line:((i=this.current)==null?void 0:i.location.end.line)??1,column:((u=this.current)==null?void 0:u.location.end.column)??1},r={index:n.index,line:n.line,column:n.column};r.index+=[...t].length;for(let c of t)c===`
|
|
9
|
+
`?(r.line++,r.column=1):r.column++;return{type:e,value:t,location:{start:n,end:r}}}static isTokenType(e,t){return t.length===0||t.includes(e.type)}};Qn.JsonLexer=Kn;Kn.PATTERNS=[{type:ue.JsonTokenType.BRACE_LEFT,pattern:"{"},{type:ue.JsonTokenType.BRACE_RIGHT,pattern:"}"},{type:ue.JsonTokenType.BRACKET_LEFT,pattern:"["},{type:ue.JsonTokenType.BRACKET_RIGHT,pattern:"]"},{type:ue.JsonTokenType.COLON,pattern:":"},{type:ue.JsonTokenType.COMMA,pattern:","},{type:ue.JsonTokenType.LINE_COMMENT,pattern:/^\/\/.*/},{type:ue.JsonTokenType.BLOCK_COMMENT,pattern:/^\/\*[\s\S]*?\*\//},{type:ue.JsonTokenType.STRING,pattern:/^"(?:[^"\r\n\u2028\u2029\\]|\\(?:.|\r\n|\r|\n|\u2028|\u2029))*"/u},{type:ue.JsonTokenType.STRING,pattern:/^'(?:[^'\r\n\u2028\u2029\\]|\\(?:.|\r\n|\r|\n|\u2028|\u2029))*'/u},{type:ue.JsonTokenType.NEWLINE,pattern:/^(\r?\n)/},{type:ue.JsonTokenType.WHITESPACE,pattern:/^[ \r\t\v\f\u00A0\u2028\u2029\uFEFF\u1680\u2000-\u200A\u202F\u205F\u3000]+/},{type:ue.JsonTokenType.NUMBER,pattern:/^[-+]?((?:NaN|Infinity)(?![$_\u200C\u200D\p{ID_Continue}])|0[xX][\da-fA-F]+|(?:(?:0|[1-9]\d*)(?:\.\d*)?|\.\d*)(?:[eE][+-]?\d+)?)/u},{type:ue.JsonTokenType.NULL,pattern:/^null(?![$_\u200C\u200D\p{ID_Continue}])/u},{type:ue.JsonTokenType.BOOLEAN,pattern:/^(true|false)(?![$_\u200C\u200D\p{ID_Continue}])/u},{type:ue.JsonTokenType.IDENTIFIER,pattern:new RegExp(`^${Du.identifierRegex.source}`,Du.identifierRegex.flags)}]});var Si=q(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.SourceLocation=Zt.SourcePosition=void 0;var Zn;(function(s){function e(){return{index:-1,line:0,column:0}}s.unknown=e})(Zn||(Zt.SourcePosition=Zn={}));var mu;(function(s){function e(){return{start:Zn.unknown(),end:Zn.unknown()}}s.unknown=e})(mu||(Zt.SourceLocation=mu={}))});var es=q(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.JsonNode=void 0;var pl=Si(),ki=class{constructor(e){this.location=e.location??pl.SourceLocation.unknown()}equals(e){return this.equalsLocation(e)&&this.isEquivalent(e)}equalsLocation(e){return this.location.start.index===e.location.start.index&&this.location.start.line===e.location.start.line&&this.location.start.column===e.location.start.column&&this.location.end.index===e.location.end.index&&this.location.end.line===e.location.end.line&&this.location.end.column===e.location.end.column}};Xn.JsonNode=ki});var Cn=q(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.JsonCompositeNode=void 0;var Dl=es(),ji=class s extends Dl.JsonNode{constructor(e){super(e),this.children=[...e.children??[]]}toString(e){let t=this.clone();return t.rebuild(e),s.flatten(t).join("")}reformat(e={}){this.reset(),this.rebuild(e)}static flatten(e){return e instanceof s?e.children.flatMap(s.flatten):[e]}};ts.JsonCompositeNode=ji});var xt=q(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.JsonValueNode=void 0;var dl=Cn(),ml=lt(),Mi=class extends dl.JsonCompositeNode{cast(e){if(!(this instanceof e))throw new ml.JsonError(`Expected value of type ${e.name}, but got ${this.constructor.name}.`);return this}};ns.JsonValueNode=Mi});var vt=q(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.JsonTokenNode=void 0;var gl=ze(),Cl=es(),Pi=class s extends Cl.JsonNode{constructor(e){super(e),this.type=e.type,this.value=e.value}isType(e){return gl.JsonToken.isType(this,e)}clone(){return new s({type:this.type,value:this.value,location:this.location})}isEquivalent(e){return e instanceof s&&this.type===e.type&&this.value===e.value}toString(){return this.value}};ss.JsonTokenNode=Pi});var en=q(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.NodeManipulator=Xt.NodeMatcher=void 0;var Ye=ze(),Pe=is(),ge;(function(s){s.ANY=()=>!0,s.NONE=()=>!1,s.SIGNIFICANT=e=>!s.INSIGNIFICANT(e),s.INSIGNIFICANT=e=>s.SPACE(e)||s.COMMENT(e),s.SPACE=e=>s.WHITESPACE(e)||s.NEWLINE(e),s.WHITESPACE=e=>e instanceof Pe.JsonTokenNode&&e.type===Ye.JsonTokenType.WHITESPACE,s.NEWLINE=e=>e instanceof Pe.JsonTokenNode&&e.type===Ye.JsonTokenType.NEWLINE,s.COMMENT=e=>s.LINE_COMMENT(e)||s.BLOCK_COMMENT(e),s.LINE_COMMENT=e=>e instanceof Pe.JsonTokenNode&&e.type===Ye.JsonTokenType.LINE_COMMENT,s.BLOCK_COMMENT=e=>e instanceof Pe.JsonTokenNode&&e.type===Ye.JsonTokenType.BLOCK_COMMENT,s.PUNCTUATION=e=>e instanceof Pe.JsonTokenNode&&[Ye.JsonTokenType.COLON,Ye.JsonTokenType.COMMA,Ye.JsonTokenType.BRACE_LEFT,Ye.JsonTokenType.BRACE_RIGHT,Ye.JsonTokenType.BRACKET_LEFT,Ye.JsonTokenType.BRACKET_RIGHT].includes(e.type)})(ge||(Xt.NodeMatcher=ge={}));var Ji=class s{constructor(e){this.index=0,this.fixing=!1,this.list=e}done(){return this.index>=this.list.length}next(){if(this.done())throw new Error("The iterator is at the end of the list.");this.index++}get position(){return this.index}seek(e){if(e<0||e>=this.list.length)throw new Error("The position is out of bounds.");this.index=e}previous(){if(this.index===0)throw new Error("The iterator is at the beginning of the list.");this.index--}get current(){if(this.done())throw new Error("The iterator is at the end of the list.");return this.list[this.index]}get nodeList(){return this.list}matchesPreviousToken(e){if(this.index===0)return!1;let t=this.list[this.index-1];return t instanceof Pe.JsonTokenNode&&t.type===e}matches(e){return this.findMatch([e])>=0}matchesToken(e){return this.matchesNext(t=>t instanceof Pe.JsonTokenNode&&t.type===e,ge.NONE)}matchesNext(e,t){return this.findNext(e,t)>=0}findNext(e,t=ge.INSIGNIFICANT){let n=-1,r=this.index;for(;!this.done();){let{current:o}=this;if(e(o)){n=this.index;break}if(t(o)){this.next();continue}break}return this.index=r,n}token(e,t=!1){return this.nodes([e],t)}node(e,t=!1){return this.nodes([e],t)}nodes(e,t=!1){let n=this.findMatch(e);return n>=0?(e.length===1?(this.seek(n),this.remove(),this.insert(e[0])):this.seek(n+1),this.fixing=!1):t||(this.fixing=!0,this.accommodate(e[0])),this}insert(e){return this.list.splice(this.index,0,e),this.next(),this}remove(){return this.list.splice(this.index,1),this}dropUntil(e){let t=!1,n=this.index;for(;!this.done();){let r=this.current;if(e(r))return t&&this.fixSpacing(n),!0;if(!(r instanceof Pe.JsonTokenNode)||ge.SIGNIFICANT(r)){this.remove(),t=!0;continue}if(!t||r.type===Ye.JsonTokenType.WHITESPACE){this.next();continue}this.fixSpacing(n),t=!1}return t&&this.fixSpacing(n),!1}end(){if(this.dropUntil(ge.NONE),!this.fixing)return this;for(;this.index>0;){this.previous();let e=this.current;if(ge.INSIGNIFICANT(e)){this.remove();continue}this.next();break}return this}findMatch(e){return this.findNext(t=>e.some(n=>t==null?void 0:t.isEquivalent(n)),ge.INSIGNIFICANT)}fixSpacing(e){let t=this.done()?null:this.current,n=0;for(;this.index>e;){this.previous();let o=this.current;if(!ge.WHITESPACE(o)){this.next();break}n++}let r=this.list[this.index-1]??null;for(t!==null&&(r===null&&ge.SPACE(t)||n>0&&(ge.BLOCK_COMMENT(r)&&ge.PUNCTUATION(t)||ge.BLOCK_COMMENT(t)&&ge.PUNCTUATION(r))?n++:ge.NEWLINE(r)&&ge.NEWLINE(t)?(n++,this.previous()):ge.NEWLINE(t)||(n--,this.next()));n-- >0;)this.remove()}accommodate(e){if(ge.INSIGNIFICANT(e)){this.insert(e);return}if(!this.done()){let t=this.findNext(n=>s.isReplacement(n,e));t>=0&&(this.seek(t),this.remove(),this.fixing=!1)}this.insert(e)}static isReplacement(e,t){return t instanceof Pe.JsonTokenNode||e instanceof Pe.JsonTokenNode?e.isEquivalent(t):t instanceof Pe.JsonValueNode&&e instanceof Pe.JsonValueNode?!0:e.constructor===t.constructor}};Xt.NodeManipulator=Ji});var At=q(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});rs.JsonValueFactory=void 0;var El=xt(),gu;(function(s){let e={};function t(r,o){e[r]=o}s.register=t;function n(r){return r instanceof El.JsonValueNode?r:Array.isArray(r)?e.array(r):typeof r=="object"&&r!==null?e.object(r):e.primitive(r)}s.create=n})(gu||(rs.JsonValueFactory=gu={}))});var Li=q(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});os.JsonIdentifierNode=void 0;var yl=xt(),Fl=en(),bl=vt(),wl=ze(),xl=At(),vl=Yt(),Al=lt(),Ri=class s extends yl.JsonValueNode{constructor(e){super(e),this.token=e.token}static of(e){if(!(0,vl.isIdentifier)(e))throw new Al.JsonError(`Invalid identifier '${e}'.`);return new s({token:new bl.JsonTokenNode({type:wl.JsonTokenType.IDENTIFIER,value:e})})}update(e){let t=xl.JsonValueFactory.create(e);return this.isEquivalent(t)?this:t}reset(){this.children.length=0}rebuild(){new Fl.NodeManipulator(this.children).node(this.token).end()}clone(){let e=this.token.clone();return new s({token:e,children:this.children.map(t=>t===this.token?e:t),location:this.location})}isEquivalent(e){return e instanceof s&&this.token.equals(e.token)}toJSON(){return this.token.value}};os.JsonIdentifierNode=Ri});var cs=q(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});as.JsonPrimitiveNode=void 0;var $l=xt(),Ol=en(),Wi=vt(),$t=ze(),qi=At(),us=class s extends $l.JsonValueNode{constructor(e){super(e),this.token=e.token,this.value=e.value}static of(e){return qi.JsonValueFactory.create(e)}static ofHex(e){return new s({token:new Wi.JsonTokenNode({type:$t.JsonTokenType.NUMBER,value:`"0x${e.toString(16)}"`}),value:e})}update(e){let t=qi.JsonValueFactory.create(e);return this.isEquivalent(t)?this:t}reset(){this.children.length=0}rebuild(e){var r;let t=new Ol.NodeManipulator(this.children),n=this.token;if(n.isType($t.JsonTokenType.STRING)&&t.done()&&((r=e==null?void 0:e.string)==null?void 0:r.quote)==="single"){let i=JSON.stringify(this.value).slice(1,-1).replace(/((?:^|[^\\])(?:\\\\)*)\\"/g,(u,c)=>`${c}"`).replace(/'/g,"\\'");i=`'${i}'`,n=new Wi.JsonTokenNode({type:$t.JsonTokenType.STRING,value:i})}t.node(n),t.end()}clone(){let e=this.token.clone();return new s({token:e,value:this.value,children:this.children.map(t=>t===this.token?e:t.clone()),location:this.location})}isEquivalent(e){return e instanceof s&&this.token.equals(e.token)&&this.value===e.value}toJSON(){return this.value}};as.JsonPrimitiveNode=us;var Tl={string:$t.JsonTokenType.STRING,number:$t.JsonTokenType.NUMBER,boolean:$t.JsonTokenType.BOOLEAN,null:$t.JsonTokenType.NULL};qi.JsonValueFactory.register("primitive",s=>new us({value:s,token:new Wi.JsonTokenNode({type:Tl[s===null?"null":typeof s],value:JSON.stringify(s)})}))});var hs=q(ls=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});ls.JsonPropertyNode=void 0;var Cu=vt(),Eu=ze(),_l=Cn(),Il=en(),Nl=At(),Bl=Li(),Sl=Yt(),kl=cs(),Gi=class s extends _l.JsonCompositeNode{constructor(e){super(e),this.key=e.key,this.value=e.value}reset(){this.key.reset(),this.value.reset(),this.children.length=0}set(e){this.value=Nl.JsonValueFactory.create(e)}rebuild(e){var i,u,c;this.value.rebuild(e);let t=(i=e==null?void 0:e.property)==null?void 0:i.quote,n=((u=e==null?void 0:e.object)==null?void 0:u.colonSpacing)??!1,r=new Il.NodeManipulator(this.children),{key:o}=this;r.matches(this.key)?o.rebuild():(o=this.formatKey(e),o.rebuild({...e,string:{quote:t==="single"||t==="double"?t:(c=e==null?void 0:e.string)==null?void 0:c.quote}})),r.node(o),r.token(new Cu.JsonTokenNode({type:Eu.JsonTokenType.COLON,value:":"})),n&&r.token(new Cu.JsonTokenNode({type:Eu.JsonTokenType.WHITESPACE,value:" "}),!r.done()),r.node(this.value).end()}formatKey(e){var t;return this.key instanceof kl.JsonPrimitiveNode&&((t=e==null?void 0:e.property)==null?void 0:t.unquoted)===!0&&(0,Sl.isIdentifier)(this.key.value)?Bl.JsonIdentifierNode.of(this.key.value):this.key}clone(){let e=this.key.clone(),t=this.value.clone();return new s({key:e,value:t,children:this.children.map(n=>n===this.key?e:n===this.value?t:n.clone()),location:this.location})}isEquivalent(e){return e instanceof s?this.key.isEquivalent(e.key)&&this.value.isEquivalent(e.value):!1}};ls.JsonPropertyNode=Gi});var fs=q(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.JsonStructureNode=Ot.StructureDelimiter=void 0;var jl=xt(),ae=ze(),Xe=vt(),ve=en(),yu=Cn(),Ml=hs(),Pl=ve.NodeMatcher.COMMENT,ht=ve.NodeMatcher.WHITESPACE,tn=ve.NodeMatcher.NEWLINE,Jl=ve.NodeMatcher.SPACE,Rl=ve.NodeMatcher.INSIGNIFICANT,ft;(function(s){s.OBJECT="object",s.ARRAY="array"})(ft||(Ot.StructureDelimiter=ft={}));(function(s){let e={[s.OBJECT]:{start:{type:ae.JsonTokenType.BRACE_LEFT,value:"{"},end:{type:ae.JsonTokenType.BRACE_RIGHT,value:"}"}},[s.ARRAY]:{start:{type:ae.JsonTokenType.BRACKET_LEFT,value:"["},end:{type:ae.JsonTokenType.BRACKET_RIGHT,value:"]"}}};function t(i){return Object.values(e).some(({start:u})=>u.type===i.type)}s.isStartToken=t;function n(i){return Object.values(e).some(({end:u})=>u.type===i.type)}s.isEndToken=n;function r(i){return new Xe.JsonTokenNode(e[i].start)}s.getStartToken=r;function o(i){return new Xe.JsonTokenNode(e[i].end)}s.getEndToken=o})(ft||(Ot.StructureDelimiter=ft={}));var Hi=class s extends jl.JsonValueNode{reset(){for(let e of this.getList())e.reset();this.children.length=0}rebuild(e={}){let t=this.detectFormatting(e),n=t,r=[...this.children];for(let o=0;o<r.length;o++){let i=r[o];if(i instanceof s){n={...i.detectFormatting(n),indentationLevel:n.indentationLevel};continue}i instanceof yu.JsonCompositeNode&&this.children.includes(i)&&r.splice(o+1,0,...i.children)}for(let o of this.getList())o.rebuild(n);this.rebuildChildren(t)}rebuildChildren(e){let t=new ve.NodeManipulator(this.children),n=this.getDelimiter(),r=ft.getStartToken(n),o=ft.getEndToken(n);t.token(r);let i=this.getList(),u=i.length,{indentationLevel:c=0}=e,{indentationSize:h=0,commaSpacing:p=!1,entryIndentation:l=!1,leadingIndentation:d=!1,trailingIndentation:C=!1,trailingComma:F=!1}=e[n]??{},E=!1;for(let D=0;D<u;D++){let I=i[D],x=D!==0&&l||D===0&&d;if(s.matchesInsertion(t,i,D))x&&this.indent(t,e),t.insert(I),E=!1;else if(s.matchesRemoval(t,i,D))t.dropUntil(I.isEquivalent.bind(I)),t.node(I),E=!0;else{let B=t.matches(I);if(B||s.skipComments(t),x&&(h>0&&t.matchesNext(w=>o.isEquivalent(w))?(t.node(new Xe.JsonTokenNode({type:ae.JsonTokenType.NEWLINE,value:`
|
|
10
|
+
`})),t.matchesToken(ae.JsonTokenType.WHITESPACE)&&t.matchesNext(ve.NodeMatcher.NEWLINE,ve.NodeMatcher.WHITESPACE)&&t.remove(),t.token(this.getIndentationToken(e))):this.indent(t,e,E&&B)),E=B,t.matchesPreviousToken(ae.JsonTokenType.LINE_COMMENT))t.insert(new Xe.JsonTokenNode({type:ae.JsonTokenType.NEWLINE,value:`
|
|
11
|
+
`}));else if(t.position>1&&!B&&t.matchesPreviousToken(ae.JsonTokenType.BLOCK_COMMENT)&&!t.matchesToken(ae.JsonTokenType.WHITESPACE)){t.previous();let w=t.matchesPreviousToken(ae.JsonTokenType.WHITESPACE);t.next(),w&&t.token(new Xe.JsonTokenNode({type:ae.JsonTokenType.WHITESPACE,value:" "}))}t.node(I)}(D<u-1||F)&&t.node(new Xe.JsonTokenNode({type:ae.JsonTokenType.COMMA,value:","})),D===u-1?C&&this.indent(t,{...e,indentationLevel:c-1}):(h===0||!l)&&p&&(!t.matchesNext(ve.NodeMatcher.SPACE)||t.matchesNext(B=>o.isEquivalent(B),ve.NodeMatcher.SPACE))&&t.token(new Xe.JsonTokenNode({type:ae.JsonTokenType.WHITESPACE,value:" "}),t.matchesNext(B=>i[D+1].isEquivalent(B),ve.NodeMatcher.SPACE))}u===0&&t.findNext(I=>I.isEquivalent(o),ve.NodeMatcher.ANY)>=0&&t.dropUntil(I=>I.isEquivalent(o)),t.token(o),t.end()}detectFormatting(e={}){let t=!1,n=!0,r=!1,o=!1,i=!1,u=0,c=0,h,p,l=!1,d=!1,C=!0,F=!0,E={},D={},I=[...s.iterate(this,this.getMaxDepth())];for(let B=0;B<I.length;B++){let{token:w,depth:R,parents:X}=I[B];switch(w.type){case ae.JsonTokenType.IDENTIFIER:E.property={...E.property,unquoted:!0};break;case ae.JsonTokenType.STRING:{let z=X[X.length-2],be=w.value.startsWith("'")?"single":"double";z instanceof Ml.JsonPropertyNode&&z.key.equals(X[X.length-1])?E.property={...E.property,quote:be}:E.string={...E.string,quote:be};break}}if(R===0&&ft.isStartToken(w))t=!0;else{let z=ft.isEndToken(w);R===0&&(z&&(p=n,l=i),t&&(h=tn(w),ht(w)||(t=!1))),z||(c=u,C=!1,Jl(w)||(F=!1))}if(ht(w)&&(w.value.includes(" ")&&(E.indentationCharacter="tab"),R===0&&n&&(u=w.value.includes(" ")?w.value.replace(/[^\t]/g,"").length:w.value.replace(/[^ ]/g,"").length)),r&&B>0&&I[B-1].depth===0){tn(w)||(D.commaSpacing=ht(w));let z=tn(w);for(let be=B;!z&&be<I.length;be++){let{token:Ge,depth:V}=I[be];if(V===0){if(ht(Ge)||Pl(Ge))continue;tn(Ge)&&(z=!0)}break}D.entryIndentation=z,r=!1}o&&(D.colonSpacing=ht(w),o=!1),o=w.type===ae.JsonTokenType.COLON||o&&ht(w),r=w.type===ae.JsonTokenType.COMMA||r&&ht(w),i=R===0&&w.type===ae.JsonTokenType.COMMA||i&&Rl(w),n=tn(w)||n&&ht(w),d=d||tn(w)}C||(F||(D.indentationSize=0,D.trailingComma=l),D.leadingIndentation=h??!1,D.trailingIndentation=p??!1);let x=Math.max(e.indentationLevel??0,0)+1;if(c>0&&!F){let B=c%x;D.indentationSize=(c-B)/x+B}return d&&(D.commaSpacing===void 0&&(D.commaSpacing=!0),D.colonSpacing===void 0&&(D.colonSpacing=!0),D.entryIndentation===void 0&&(D.entryIndentation=!0)),E[this.getDelimiter()]=D,E.indentationLevel=x,{...e,...E,object:{...e.array,...E.array,...e.object,...E.object},array:{...e.object,...E.object,...e.array,...E.array}}}indent(e,t,n=!1){let r=this.getDelimiter(),{indentationSize:o=0,leadingIndentation:i=!1,trailingIndentation:u=!1}=t[r]??{};if(o<=0&&!i&&!u)return;let c=new Xe.JsonTokenNode({type:ae.JsonTokenType.NEWLINE,value:`
|
|
12
|
+
`});e.token(c,n),e.matchesToken(ae.JsonTokenType.WHITESPACE)?e.next():e.token(this.getIndentationToken(t),n)}getIndentationToken(e){let t=this.getDelimiter(),{indentationLevel:n=0}=e,{indentationSize:r=0}=e[t]??{},o=e.indentationCharacter==="tab"?" ":" ";return new Xe.JsonTokenNode({type:ae.JsonTokenType.WHITESPACE,value:o.repeat(n*r)})}static*iterate(e,t,n=[]){for(let r of e.children)r instanceof Xe.JsonTokenNode&&(yield{depth:n.length,token:r,parents:[...n,e]}),t>0&&r instanceof yu.JsonCompositeNode&&(yield*s.iterate(r,t-1,[...n,e]))}static skipComments(e){for(;e.matchesNext(ve.NodeMatcher.COMMENT,ve.NodeMatcher.SPACE);)e.next()}static matchesInsertion(e,t,n){let r=t.length,o=t[n];if(e.matchesNext(o.isEquivalent.bind(o),ve.NodeMatcher.ANY))return!1;for(let i=n+1;i<r;i++)if(e.matches(t[i]))return!0;return!1}static matchesRemoval(e,t,n){if(e.matches(t[n]))return!1;let r=t.slice(n+1);return e.matchesNext(t[n].isEquivalent.bind(t[n]),o=>r.every(i=>!i.isEquivalent(o)))}};Ot.JsonStructureNode=Hi});var bu=q(Ds=>{"use strict";Object.defineProperty(Ds,"__esModule",{value:!0});Ds.JsonArrayNode=void 0;var Fu=fs(),pt=At(),Ll=lt(),ps=class s extends Fu.JsonStructureNode{constructor(e){super(e),this.elementNodes=[...e.elements]}static of(...e){return new s({elements:e.map(pt.JsonValueFactory.create)})}update(e){if(!(e instanceof s)&&!Array.isArray(e))return pt.JsonValueFactory.create(e);let t=e instanceof s?e.elements:e,n=this.elementNodes.splice(0);for(let r=0;r<t.length;r++)this.push(r<n.length?n[r].update(t[r]):t[r]);return t.length<n.length&&this.splice(t.length,n.length-t.length),this}getList(){return[...this.elementNodes]}getDelimiter(){return Fu.StructureDelimiter.ARRAY}getMaxDepth(){return 1}get elements(){return[...this.elementNodes]}get(e,t){let n=this.elementNodes[e];if(t!==void 0&&!(n instanceof t))throw new Ll.JsonError(`Expected ${t.name} at index ${e}, but got ${n.constructor.name}.`);return n}set(e,t){if(e<0||e>=this.elementNodes.length)throw new Error(`Index ${e} is out of bounds.`);this.elementNodes[e]=pt.JsonValueFactory.create(t)}clear(){this.elementNodes.length=0}delete(e){if(e<0||e>=this.elementNodes.length)throw new Error(`Index ${e} is out of bounds.`);this.splice(e,1)}unshift(...e){this.elementNodes.unshift(...e.map(pt.JsonValueFactory.create))}push(...e){this.elementNodes.push(...e.map(pt.JsonValueFactory.create))}shift(){return this.elementNodes.shift()}pop(){return this.elementNodes.pop()}splice(e,t,...n){return this.elementNodes.splice(e,t,...n.map(pt.JsonValueFactory.create))}clone(){let e=new Map;for(let t of this.elementNodes)e.set(t,t.clone());return new s({elements:[...e.values()],children:this.children.map(t=>e.get(t)??t.clone()),location:this.location})}isEquivalent(e){return!(e instanceof s)||this.elements.length!==e.elements.length?!1:this.elements.every((t,n)=>e.elements[n].isEquivalent(t))}toJSON(){return this.elements.map(e=>e.toJSON())}};Ds.JsonArrayNode=ps;pt.JsonValueFactory.register("array",s=>new ps({elements:s.map(pt.JsonValueFactory.create)}))});var xu=q(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.JsonObjectNode=void 0;var Wl=xt(),wu=fs(),ms=hs(),zi=cs(),yn=At(),ql=lt(),Cs=en(),ds=vt(),En=ze(),Gl=Cs.NodeMatcher.INSIGNIFICANT,Ui=Cs.NodeMatcher.NEWLINE,Vi=Cs.NodeMatcher.SIGNIFICANT,Hl=Cs.NodeMatcher.SPACE,gs=class s extends wu.JsonStructureNode{constructor(e){super(e),this.propertyNodes=[...e.properties]}static of(e){return new s({properties:Object.entries(e).map(([t,n])=>new ms.JsonPropertyNode({key:zi.JsonPrimitiveNode.of(t),value:yn.JsonValueFactory.create(n)}))})}merge(e){if(e.propertyNodes.length!==0){if(this.propertyNodes.length===0){this.propertyNodes.push(...e.propertyNodes.map(t=>t.clone())),this.children.splice(0,this.children.length,...e.children.map(t=>t.clone()));return}for(let t of e.propertyNodes){let n=t.key.toJSON(),r=e.findPropertyRange(n),o=[t];r!==null&&(o=e.children.slice(r[0],r[1]+1));let i=t.clone();o=o.map(h=>h===t?i:h.clone());let u=this.findPropertyRange(n);if(u===null){this.propertyNodes.push(i),this.insert(o);continue}let c=this.propertyNodes.findIndex(h=>h.key.toJSON()===n);this.propertyNodes.splice(c,1,i),this.children.splice(u[0],u[1]-u[0]+1,...o)}}}insert(e){let t=this.children.length;for(let r=this.children.length-1;r>=0;r--){let o=this.children[r];if(o instanceof ds.JsonTokenNode){if(o.isType(En.JsonTokenType.BRACE_RIGHT)){t=r;continue}if(o.isType(En.JsonTokenType.COMMA)){t=r+1;break}}if(Vi(o))break;if(Ui(o)){for(;r>0&&Hl(this.children[r-1]);)r--;t=r;break}t=r}let n=!1;for(let r=t-1;r>=0;r--){let o=this.children[r];if(o instanceof ds.JsonTokenNode&&o.isType(En.JsonTokenType.COMMA)){n=!1;break}if(Vi(o)){n=!0;break}}n&&(this.children.splice(t,0,new ds.JsonTokenNode({type:En.JsonTokenType.COMMA,value:","})),t++),this.children.splice(t,0,...e)}findPropertyRange(e){let t=this.children.findIndex(r=>r instanceof ms.JsonPropertyNode&&r.key.toJSON()===e);if(t===-1)return null;let n=t;for(let r=t-1;r>=0;r--){let o=this.children[r];if(!Gl(o))break;Ui(o)&&(t=r)}for(let r=n+1;r<this.children.length;r++){let o=this.children[r];if(!(o instanceof ds.JsonTokenNode)||Vi(o)&&!o.isType(En.JsonTokenType.COMMA))break;if(Ui(o)){n=r-1;break}n=r}return[t,n]}update(e){if(!(e instanceof Wl.JsonValueNode)){if(typeof e!="object"||e===null||Array.isArray(e))return yn.JsonValueFactory.create(e);for(let[t,n]of Object.entries(e)){if(n===void 0){this.delete(t);continue}let r=this.propertyNodes.find(o=>o.key.toJSON()===t);if(r!==void 0){r.value=r.value.update(n);continue}this.set(t,n)}for(let t of this.propertyNodes){let n=t.key.toJSON();e[n]===void 0&&this.delete(t.key.toJSON())}return this}if(!(e instanceof s))return e;for(let t of e.propertyNodes){let n=this.propertyNodes.findIndex(r=>r.key.toJSON()===t.key.toJSON());if(n>=0){let r=this.propertyNodes[n].clone();r.value=r.value.update(t.value)}else this.propertyNodes.push(t)}for(let t of this.propertyNodes){let n=t.key.toJSON();e.has(n)||this.delete(n)}return this}getList(){return[...this.propertyNodes]}getDelimiter(){return wu.StructureDelimiter.OBJECT}getMaxDepth(){return 2}has(e){return this.propertyNodes.some(t=>t.key.toJSON()===e)}get properties(){return[...this.propertyNodes]}set(e,t){let n=this.propertyNodes.findIndex(r=>r.key.toJSON()===e);if(n>=0){this.propertyNodes[n].set(t);return}this.propertyNodes.push(new ms.JsonPropertyNode({key:typeof e=="string"?zi.JsonPrimitiveNode.of(e):e,value:yn.JsonValueFactory.create(t)}))}delete(e){for(let t=0;t<this.propertyNodes.length;t++)if(this.propertyNodes[t].key.toJSON()===e){this.propertyNodes.splice(t,1);break}}get(e,t){let n=this.propertyNodes.find(o=>o.key.toJSON()===e);if(n===void 0)throw new Error(`Property "${e}" does not exist.`);let{value:r}=n;if(t!==void 0&&!(r instanceof t))throw new ql.JsonError(`Expected a value of type ${t.name}, but got ${r.constructor.name}`);return r}clone(){let e=new Map;for(let t of this.propertyNodes)e.set(t,t.clone());return new s({properties:[...e.values()],children:this.children.map(t=>e.get(t)??t.clone()),location:this.location})}isEquivalent(e){if(!(e instanceof s)||this.properties.length!==e.properties.length)return!1;let t=Object.fromEntries(e.properties.map(n=>[n.key.toJSON(),n]));return this.properties.every(n=>{var r;return((r=t[n.key.toJSON()])==null?void 0:r.isEquivalent(n))===!0})}toJSON(){return Object.fromEntries(this.properties.map(e=>[e.key.toJSON(),e.value.toJSON()]))}};Es.JsonObjectNode=gs;yn.JsonValueFactory.register("object",s=>new gs({properties:Object.entries(s).flatMap(([e,t])=>t===void 0?[]:[new ms.JsonPropertyNode({key:zi.JsonPrimitiveNode.of(e),value:yn.JsonValueFactory.create(t)})])}))});var is=q(Ee=>{"use strict";var Ul=Ee&&Ee.__createBinding||(Object.create?(function(s,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,n,r)}):(function(s,e,t,n){n===void 0&&(n=t),s[n]=e[t]})),Ke=Ee&&Ee.__exportStar||function(s,e){for(var t in s)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Ul(e,s,t)};Object.defineProperty(Ee,"__esModule",{value:!0});Ke(fs(),Ee);Ke(bu(),Ee);Ke(Cn(),Ee);Ke(Li(),Ee);Ke(es(),Ee);Ke(xu(),Ee);Ke(cs(),Ee);Ke(hs(),Ee);Ke(vt(),Ee);Ke(xt(),Ee);Ke(At(),Ee)});var vu=q(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});ys.JsonParser=void 0;var Vl=Bi(),K=ze(),Ae=is(),zl=Yt(),Fn=lt(),Yi=class s{constructor(e){this.lexer=new Vl.JsonLexer(e)}static parse(e,t){let n=new s(e);return t!==void 0?n.parseValue(t):n.parseValue()}parseValue(e){let t=this.parseRoot();if(e!==void 0&&!(t instanceof e))throw new Fn.JsonError(`Expected ${e.name}, but got ${t.constructor.name}.`);return t}parseRoot(){this.lexer.next();let e=this.lexer.skipInsignificant(),t=this.parseNext(),n=this.lexer.skipInsignificant();if(t.children.unshift(...s.createChildren(e)),t.children.push(...s.createChildren(n)),!this.lexer.isEof()){let r=this.lexer.peek(),o=r.location.start;throw new Fn.JsonParseError(`Unexpected token '${r.value}' at ${o.line}:${o.column}.`,r.location)}return t}parseNext(){let e=this.lexer.peek();switch(e.type){case K.JsonTokenType.BRACE_LEFT:return this.parseObject();case K.JsonTokenType.BRACKET_LEFT:return this.parseArray();case K.JsonTokenType.NUMBER:return this.parseNumber();case K.JsonTokenType.STRING:return this.parseString();case K.JsonTokenType.BOOLEAN:return this.parseBoolean();case K.JsonTokenType.NULL:return this.parseNull();default:{let t=e.location.start;throw new Fn.JsonParseError(`Unexpected token '${e.value}' at ${t.line}:${t.column}.`,e.location)}}}parseNumber(){let e=this.lexer.consume(K.JsonTokenType.NUMBER),t=new Ae.JsonTokenNode(e);return new Ae.JsonPrimitiveNode({token:t,value:this.parseNumberValue(e),children:[t],location:e.location})}parseNumberValue(e){let{value:t}=e,n=1;return t.startsWith("+")?t=t.slice(1):t.startsWith("-")&&(n=-1,t=t.slice(1)),t==="Infinity"?n*(1/0):t==="NaN"?NaN:(t.startsWith(".")?t=`0${t}`:t=t.replace(/\.(?!\d)/,""),t.startsWith("0x")||t.startsWith("0X")?n*Number.parseInt(t,16):n*JSON.parse(t))}parseString(){let e=this.lexer.consume(K.JsonTokenType.STRING),{value:t}=e;t.startsWith("'")&&(t=t.slice(1,-1).replace(/((?:^|[^\\])(?:\\\\)*)\\(["'])/g,(o,i,u)=>`${i}${u==='"'?'\\"':"'"}`),t=`"${t}"`),t=t.replace(/\\(?:\r\n|\r|\n|\u2028|\u2029)/gu,"");let n=new Ae.JsonTokenNode(e),r;try{r=JSON.parse(t)}catch(o){throw o instanceof Error?new Fn.JsonParseError(`Invalid string at ${e.location.start.line}:${e.location.start.column}: ${o.message}`,e.location):o}return new Ae.JsonPrimitiveNode({token:n,value:r,children:[n],location:e.location})}parseNull(){let e=this.lexer.consume(K.JsonTokenType.NULL),t=new Ae.JsonTokenNode(e);return new Ae.JsonPrimitiveNode({token:t,value:null,children:[t],location:e.location})}parseBoolean(){let e=this.lexer.consume(K.JsonTokenType.BOOLEAN),t=new Ae.JsonTokenNode(e);return new Ae.JsonPrimitiveNode({token:t,value:e.value==="true",children:[t],location:e.location})}parseArray(){let e=[this.lexer.consume(K.JsonTokenType.BRACKET_LEFT),...this.lexer.skipInsignificant()],t=[];for(;!this.lexer.matches(K.JsonTokenType.BRACKET_RIGHT);){let n=this.parseNext();t.push(n),e.push(n,...this.lexer.skipInsignificant()),this.lexer.matches(K.JsonTokenType.BRACKET_RIGHT)||e.push(this.lexer.consume(K.JsonTokenType.COMMA),...this.lexer.skipInsignificant())}return e.push(this.lexer.consume(K.JsonTokenType.BRACKET_RIGHT)),new Ae.JsonArrayNode({elements:t,children:s.createChildren(e),location:{start:e[0].location.start,end:e[e.length-1].location.end}})}parseObject(){let e=[this.lexer.consume(K.JsonTokenType.BRACE_LEFT),...this.lexer.skipInsignificant()],t=[];for(;!this.lexer.matches(K.JsonTokenType.BRACE_RIGHT);){let n=this.parseObjectProperty();t.push(n),e.push(n,...this.lexer.skipInsignificant()),this.lexer.matches(K.JsonTokenType.BRACE_RIGHT)||e.push(this.lexer.consume(K.JsonTokenType.COMMA),...this.lexer.skipInsignificant())}return e.push(this.lexer.consume(K.JsonTokenType.BRACE_RIGHT)),new Ae.JsonObjectNode({properties:t,children:s.createChildren(e),location:{start:e[0].location.start,end:e[e.length-1].location.end}})}parseObjectProperty(){let e=[];this.lexer.expect(K.JsonTokenType.STRING,K.JsonTokenType.IDENTIFIER);let t=this.lexer.matches(K.JsonTokenType.STRING)?this.parseString():this.parseIdentifier();e.push(t,...this.lexer.skipInsignificant(),this.lexer.consume(K.JsonTokenType.COLON),...this.lexer.skipInsignificant());let n=this.parseNext();return e.push(n),new Ae.JsonPropertyNode({key:t,value:n,children:s.createChildren(e),location:{start:e[0].location.start,end:e[e.length-1].location.end}})}parseIdentifier(){let e=this.lexer.consume(K.JsonTokenType.IDENTIFIER);if((0,zl.isReserved)(e.value)){let n=e.location.start;throw new Fn.JsonParseError(`Reserved identifier '${e.value}' at ${n.line}:${n.column}.`,e.location)}let t=new Ae.JsonTokenNode(e);return new Ae.JsonIdentifierNode({token:t,children:[t],location:e.location})}static createChildren(e){return e.map(t=>t instanceof Ae.JsonNode?t:new Ae.JsonTokenNode(t))}};ys.JsonParser=Yi});var $u=q(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0})});var Ou=q(Oe=>{"use strict";var Yl=Oe&&Oe.__createBinding||(Object.create?(function(s,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,n,r)}):(function(s,e,t,n){n===void 0&&(n=t),s[n]=e[t]})),Dt=Oe&&Oe.__exportStar||function(s,e){for(var t in s)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Yl(e,s,t)};Object.defineProperty(Oe,"__esModule",{value:!0});Dt(Yt(),Oe);Dt(Bi(),Oe);Dt(Si(),Oe);Dt(vu(),Oe);Dt(ze(),Oe);Dt($u(),Oe);Dt(is(),Oe);Dt(lt(),Oe)});var qh={};Ua(qh,{createApp:()=>Ra,runCli:()=>Lh,runCreateCli:()=>$r,runCreateInteractiveCli:()=>Tr});module.exports=Va(qh);var ye=he(Zs(),1),Wt=require("node:process"),ot=he(require("node:readline"),1),si=he(require("node:readline"),1),Lr=require("node:stream"),Wr=he(ei(),1);function Xa({onlyFirst:s=!1}={}){let e=["[\\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(e,s?void 0:"g")}var ec=Xa();function qr(s){if(typeof s!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof s}\``);return s.replace(ec,"")}function Gr(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Hr={exports:{}};(function(s){var e={};s.exports=e,e.eastAsianWidth=function(n){var r=n.charCodeAt(0),o=n.length==2?n.charCodeAt(1):0,i=r;return 55296<=r&&r<=56319&&56320<=o&&o<=57343&&(r&=1023,o&=1023,i=r<<10|o,i+=65536),i==12288||65281<=i&&i<=65376||65504<=i&&i<=65510?"F":i==8361||65377<=i&&i<=65470||65474<=i&&i<=65479||65482<=i&&i<=65487||65490<=i&&i<=65495||65498<=i&&i<=65500||65512<=i&&i<=65518?"H":4352<=i&&i<=4447||4515<=i&&i<=4519||4602<=i&&i<=4607||9001<=i&&i<=9002||11904<=i&&i<=11929||11931<=i&&i<=12019||12032<=i&&i<=12245||12272<=i&&i<=12283||12289<=i&&i<=12350||12353<=i&&i<=12438||12441<=i&&i<=12543||12549<=i&&i<=12589||12593<=i&&i<=12686||12688<=i&&i<=12730||12736<=i&&i<=12771||12784<=i&&i<=12830||12832<=i&&i<=12871||12880<=i&&i<=13054||13056<=i&&i<=19903||19968<=i&&i<=42124||42128<=i&&i<=42182||43360<=i&&i<=43388||44032<=i&&i<=55203||55216<=i&&i<=55238||55243<=i&&i<=55291||63744<=i&&i<=64255||65040<=i&&i<=65049||65072<=i&&i<=65106||65108<=i&&i<=65126||65128<=i&&i<=65131||110592<=i&&i<=110593||127488<=i&&i<=127490||127504<=i&&i<=127546||127552<=i&&i<=127560||127568<=i&&i<=127569||131072<=i&&i<=194367||177984<=i&&i<=196605||196608<=i&&i<=262141?"W":32<=i&&i<=126||162<=i&&i<=163||165<=i&&i<=166||i==172||i==175||10214<=i&&i<=10221||10629<=i&&i<=10630?"Na":i==161||i==164||167<=i&&i<=168||i==170||173<=i&&i<=174||176<=i&&i<=180||182<=i&&i<=186||188<=i&&i<=191||i==198||i==208||215<=i&&i<=216||222<=i&&i<=225||i==230||232<=i&&i<=234||236<=i&&i<=237||i==240||242<=i&&i<=243||247<=i&&i<=250||i==252||i==254||i==257||i==273||i==275||i==283||294<=i&&i<=295||i==299||305<=i&&i<=307||i==312||319<=i&&i<=322||i==324||328<=i&&i<=331||i==333||338<=i&&i<=339||358<=i&&i<=359||i==363||i==462||i==464||i==466||i==468||i==470||i==472||i==474||i==476||i==593||i==609||i==708||i==711||713<=i&&i<=715||i==717||i==720||728<=i&&i<=731||i==733||i==735||768<=i&&i<=879||913<=i&&i<=929||931<=i&&i<=937||945<=i&&i<=961||963<=i&&i<=969||i==1025||1040<=i&&i<=1103||i==1105||i==8208||8211<=i&&i<=8214||8216<=i&&i<=8217||8220<=i&&i<=8221||8224<=i&&i<=8226||8228<=i&&i<=8231||i==8240||8242<=i&&i<=8243||i==8245||i==8251||i==8254||i==8308||i==8319||8321<=i&&i<=8324||i==8364||i==8451||i==8453||i==8457||i==8467||i==8470||8481<=i&&i<=8482||i==8486||i==8491||8531<=i&&i<=8532||8539<=i&&i<=8542||8544<=i&&i<=8555||8560<=i&&i<=8569||i==8585||8592<=i&&i<=8601||8632<=i&&i<=8633||i==8658||i==8660||i==8679||i==8704||8706<=i&&i<=8707||8711<=i&&i<=8712||i==8715||i==8719||i==8721||i==8725||i==8730||8733<=i&&i<=8736||i==8739||i==8741||8743<=i&&i<=8748||i==8750||8756<=i&&i<=8759||8764<=i&&i<=8765||i==8776||i==8780||i==8786||8800<=i&&i<=8801||8804<=i&&i<=8807||8810<=i&&i<=8811||8814<=i&&i<=8815||8834<=i&&i<=8835||8838<=i&&i<=8839||i==8853||i==8857||i==8869||i==8895||i==8978||9312<=i&&i<=9449||9451<=i&&i<=9547||9552<=i&&i<=9587||9600<=i&&i<=9615||9618<=i&&i<=9621||9632<=i&&i<=9633||9635<=i&&i<=9641||9650<=i&&i<=9651||9654<=i&&i<=9655||9660<=i&&i<=9661||9664<=i&&i<=9665||9670<=i&&i<=9672||i==9675||9678<=i&&i<=9681||9698<=i&&i<=9701||i==9711||9733<=i&&i<=9734||i==9737||9742<=i&&i<=9743||9748<=i&&i<=9749||i==9756||i==9758||i==9792||i==9794||9824<=i&&i<=9825||9827<=i&&i<=9829||9831<=i&&i<=9834||9836<=i&&i<=9837||i==9839||9886<=i&&i<=9887||9918<=i&&i<=9919||9924<=i&&i<=9933||9935<=i&&i<=9953||i==9955||9960<=i&&i<=9983||i==10045||i==10071||10102<=i&&i<=10111||11093<=i&&i<=11097||12872<=i&&i<=12879||57344<=i&&i<=63743||65024<=i&&i<=65039||i==65533||127232<=i&&i<=127242||127248<=i&&i<=127277||127280<=i&&i<=127337||127344<=i&&i<=127386||917760<=i&&i<=917999||983040<=i&&i<=1048573||1048576<=i&&i<=1114109?"A":"N"},e.characterLength=function(n){var r=this.eastAsianWidth(n);return r=="F"||r=="W"||r=="A"?2:1};function t(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(n){for(var r=t(n),o=0,i=0;i<r.length;i++)o=o+this.characterLength(r[i]);return o},e.slice=function(n,r,o){textLen=e.length(n),r=r||0,o=o||1,r<0&&(r=textLen+r),o<0&&(o=textLen+o);for(var i="",u=0,c=t(n),h=0;h<c.length;h++){var p=c[h],l=e.length(p);if(u>=r-(l==2?1:0))if(u+l<=o)i+=p;else break;u+=l}return i}})(Hr);var tc=Hr.exports,nc=Gr(tc),sc=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},ic=Gr(sc);function Dn(s,e={}){if(typeof s!="string"||s.length===0||(e={ambiguousIsNarrow:!0,...e},s=qr(s),s.length===0))return 0;s=s.replace(ic()," ");let t=e.ambiguousIsNarrow?1:2,n=0;for(let r of s){let o=r.codePointAt(0);if(!(o<=31||o>=127&&o<=159||o>=768&&o<=879))switch(nc.eastAsianWidth(r)){case"F":case"W":n+=2;break;case"A":n+=t;break;default:n+=1}}return n}var ti=10,Sr=(s=0)=>e=>`\x1B[${e+s}m`,kr=(s=0)=>e=>`\x1B[${38+s};5;${e}m`,jr=(s=0)=>(e,t,n)=>`\x1B[${38+s};2;${e};${t};${n}m`,te={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(te.modifier);var rc=Object.keys(te.color),oc=Object.keys(te.bgColor);[...rc,...oc];function uc(){let s=new Map;for(let[e,t]of Object.entries(te)){for(let[n,r]of Object.entries(t))te[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},t[n]=te[n],s.set(r[0],r[1]);Object.defineProperty(te,e,{value:t,enumerable:!1})}return Object.defineProperty(te,"codes",{value:s,enumerable:!1}),te.color.close="\x1B[39m",te.bgColor.close="\x1B[49m",te.color.ansi=Sr(),te.color.ansi256=kr(),te.color.ansi16m=jr(),te.bgColor.ansi=Sr(ti),te.bgColor.ansi256=kr(ti),te.bgColor.ansi16m=jr(ti),Object.defineProperties(te,{rgbToAnsi256:{value:(e,t,n)=>e===t&&t===n?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(n/255*5),enumerable:!1},hexToRgb:{value:e=>{let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(o=>o+o).join(""));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>te.rgbToAnsi256(...te.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let u=e%36;t=Math.floor(e/36)/5,n=Math.floor(u/6)/5,r=u%6/5}let o=Math.max(t,n,r)*2;if(o===0)return 30;let i=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return o===2&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>te.ansi256ToAnsi(te.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>te.ansi256ToAnsi(te.hexToAnsi256(e)),enumerable:!1}}),te}var ac=uc(),Mn=new Set(["\x1B","\x9B"]),cc=39,ri="\x07",Ur="[",lc="]",Vr="m",oi=`${lc}8;;`,Mr=s=>`${Mn.values().next().value}${Ur}${s}${Vr}`,Pr=s=>`${Mn.values().next().value}${oi}${s}${ri}`,hc=s=>s.split(" ").map(e=>Dn(e)),ni=(s,e,t)=>{let n=[...e],r=!1,o=!1,i=Dn(qr(s[s.length-1]));for(let[u,c]of n.entries()){let h=Dn(c);if(i+h<=t?s[s.length-1]+=c:(s.push(c),i=0),Mn.has(c)&&(r=!0,o=n.slice(u+1).join("").startsWith(oi)),r){o?c===ri&&(r=!1,o=!1):c===Vr&&(r=!1);continue}i+=h,i===t&&u<n.length-1&&(s.push(""),i=0)}!i&&s[s.length-1].length>0&&s.length>1&&(s[s.length-2]+=s.pop())},fc=s=>{let e=s.split(" "),t=e.length;for(;t>0&&!(Dn(e[t-1])>0);)t--;return t===e.length?s:e.slice(0,t).join(" ")+e.slice(t).join("")},pc=(s,e,t={})=>{if(t.trim!==!1&&s.trim()==="")return"";let n="",r,o,i=hc(s),u=[""];for(let[h,p]of s.split(" ").entries()){t.trim!==!1&&(u[u.length-1]=u[u.length-1].trimStart());let l=Dn(u[u.length-1]);if(h!==0&&(l>=e&&(t.wordWrap===!1||t.trim===!1)&&(u.push(""),l=0),(l>0||t.trim===!1)&&(u[u.length-1]+=" ",l++)),t.hard&&i[h]>e){let d=e-l,C=1+Math.floor((i[h]-d-1)/e);Math.floor((i[h]-1)/e)<C&&u.push(""),ni(u,p,e);continue}if(l+i[h]>e&&l>0&&i[h]>0){if(t.wordWrap===!1&&l<e){ni(u,p,e);continue}u.push("")}if(l+i[h]>e&&t.wordWrap===!1){ni(u,p,e);continue}u[u.length-1]+=p}t.trim!==!1&&(u=u.map(h=>fc(h)));let c=[...u.join(`
|
|
13
|
+
`)];for(let[h,p]of c.entries()){if(n+=p,Mn.has(p)){let{groups:d}=new RegExp(`(?:\\${Ur}(?<code>\\d+)m|\\${oi}(?<uri>.*)${ri})`).exec(c.slice(h).join(""))||{groups:{}};if(d.code!==void 0){let C=Number.parseFloat(d.code);r=C===cc?void 0:C}else d.uri!==void 0&&(o=d.uri.length===0?void 0:d.uri)}let l=ac.codes.get(Number(r));c[h+1]===`
|
|
14
|
+
`?(o&&(n+=Pr("")),r&&l&&(n+=Mr(l))):p===`
|
|
15
|
+
`&&(r&&l&&(n+=Mr(r)),o&&(n+=Pr(o)))}return n};function Jr(s,e,t){return String(s).normalize().replace(/\r\n/g,`
|
|
12
16
|
`).split(`
|
|
13
|
-
`).map(
|
|
14
|
-
`)}var
|
|
15
|
-
`),
|
|
16
|
-
`),r=[];for(let o=0;o<Math.max(t.length,
|
|
17
|
-
`),
|
|
18
|
-
`).length-1;this.output.write(
|
|
19
|
-
`);this.output.write(r[
|
|
20
|
-
`).slice(
|
|
21
|
-
`)),this._prevFrame=e;return}this.output.write(
|
|
22
|
-
${
|
|
23
|
-
`,t=
|
|
24
|
-
${
|
|
25
|
-
${
|
|
26
|
-
`;case"submit":return`${e}${
|
|
27
|
-
|
|
28
|
-
${
|
|
29
|
-
`}}}).prompt();var
|
|
30
|
-
${
|
|
31
|
-
`,r=this.value?e:t;switch(this.state){case"submit":return`${
|
|
32
|
-
${
|
|
33
|
-
${
|
|
34
|
-
`}}}).prompt()},
|
|
35
|
-
${
|
|
36
|
-
`;switch(this.state){case"submit":return`${
|
|
37
|
-
${
|
|
38
|
-
${
|
|
39
|
-
${
|
|
40
|
-
`}}}
|
|
41
|
-
|
|
42
|
-
`)},
|
|
43
|
-
`)},
|
|
44
|
-
${
|
|
45
|
-
|
|
46
|
-
`)},
|
|
47
|
-
`);t.push(`${e} ${
|
|
17
|
+
`).map(n=>pc(n,e,t)).join(`
|
|
18
|
+
`)}var Dc=["up","down","left","right","space","enter","cancel"],Bn={actions:new Set(Dc),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};function ui(s,e){if(typeof s=="string")return Bn.aliases.get(s)===e;for(let t of s)if(t!==void 0&&ui(t,e))return!0;return!1}function dc(s,e){if(s===e)return;let t=s.split(`
|
|
19
|
+
`),n=e.split(`
|
|
20
|
+
`),r=[];for(let o=0;o<Math.max(t.length,n.length);o++)t[o]!==n[o]&&r.push(o);return r}var mc=globalThis.process.platform.startsWith("win"),ii=Symbol("clack:cancel");function ut(s){return s===ii}function Nn(s,e){let t=s;t.isTTY&&t.setRawMode(e)}function zr({input:s=Wt.stdin,output:e=Wt.stdout,overwrite:t=!0,hideCursor:n=!0}={}){let r=ot.createInterface({input:s,output:e,prompt:"",tabSize:1});ot.emitKeypressEvents(s,r),s.isTTY&&s.setRawMode(!0);let o=(i,{name:u,sequence:c})=>{let h=String(i);if(ui([h,u,c],"cancel")){n&&e.write(ye.cursor.show),process.exit(0);return}if(!t)return;ot.moveCursor(e,u==="return"?0:-1,u==="return"?-1:0,()=>{ot.clearLine(e,1,()=>{s.once("keypress",o)})})};return n&&e.write(ye.cursor.hide),s.once("keypress",o),()=>{s.off("keypress",o),n&&e.write(ye.cursor.show),s.isTTY&&!mc&&s.setRawMode(!1),r.terminal=!1,r.close()}}var gc=Object.defineProperty,Cc=(s,e,t)=>e in s?gc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Te=(s,e,t)=>(Cc(s,typeof e!="symbol"?e+"":e,t),t),dn=class{constructor(e,t=!0){Te(this,"input"),Te(this,"output"),Te(this,"_abortSignal"),Te(this,"rl"),Te(this,"opts"),Te(this,"_render"),Te(this,"_track",!1),Te(this,"_prevFrame",""),Te(this,"_subscribers",new Map),Te(this,"_cursor",0),Te(this,"state","initial"),Te(this,"error",""),Te(this,"value");let{input:n=Wt.stdin,output:r=Wt.stdout,render:o,signal:i,...u}=e;this.opts=u,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=o.bind(this),this._track=t,this._abortSignal=i,this.input=n,this.output=r}unsubscribe(){this._subscribers.clear()}setSubscriber(e,t){let n=this._subscribers.get(e)??[];n.push(t),this._subscribers.set(e,n)}on(e,t){this.setSubscriber(e,{cb:t})}once(e,t){this.setSubscriber(e,{cb:t,once:!0})}emit(e,...t){let n=this._subscribers.get(e)??[],r=[];for(let o of n)o.cb(...t),o.once&&r.push(()=>n.splice(n.indexOf(o),1));for(let o of r)o()}prompt(){return new Promise((e,t)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),e(ii);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let n=new Lr.Writable;n._write=(r,o,i)=>{var u,c;this._track&&(this.value=(u=this.rl)==null?void 0:u.line.replace(/\t/g,""),this._cursor=((c=this.rl)==null?void 0:c.cursor)??0,this.emit("value",this.value)),i()},this.input.pipe(n),this.rl=si.default.createInterface({input:this.input,output:n,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),si.default.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),Nn(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(ye.cursor.show),this.output.off("resize",this.render),Nn(this.input,!1),e(this.value)}),this.once("cancel",()=>{this.output.write(ye.cursor.show),this.output.off("resize",this.render),Nn(this.input,!1),e(ii)})})}onKeypress(e,t){var n,r;if(this.state==="error"&&(this.state="active"),t!=null&&t.name&&(!this._track&&Bn.aliases.has(t.name)&&this.emit("cursor",Bn.aliases.get(t.name)),Bn.actions.has(t.name)&&this.emit("cursor",t.name)),e&&(e.toLowerCase()==="y"||e.toLowerCase()==="n")&&this.emit("confirm",e.toLowerCase()==="y"),e===" "&&this.opts.placeholder&&(this.value||((n=this.rl)==null||n.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),e&&this.emit("key",e.toLowerCase()),(t==null?void 0:t.name)==="return"){if(this.opts.validate){let o=this.opts.validate(this.value);o&&(this.error=o instanceof Error?o.message:o,this.state="error",(r=this.rl)==null||r.write(this.value))}this.state!=="error"&&(this.state="submit")}ui([e,t==null?void 0:t.name,t==null?void 0:t.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){var e;this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
|
|
21
|
+
`),Nn(this.input,!1),(e=this.rl)==null||e.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=Jr(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
22
|
+
`).length-1;this.output.write(ye.cursor.move(-999,e*-1))}render(){let e=Jr(this._render(this)??"",process.stdout.columns,{hard:!0});if(e!==this._prevFrame){if(this.state==="initial")this.output.write(ye.cursor.hide);else{let t=dc(this._prevFrame,e);if(this.restoreCursor(),t&&(t==null?void 0:t.length)===1){let n=t[0];this.output.write(ye.cursor.move(0,n)),this.output.write(ye.erase.lines(1));let r=e.split(`
|
|
23
|
+
`);this.output.write(r[n]),this._prevFrame=e,this.output.write(ye.cursor.move(0,r.length-n-1));return}if(t&&(t==null?void 0:t.length)>1){let n=t[0];this.output.write(ye.cursor.move(0,n)),this.output.write(ye.erase.down());let r=e.split(`
|
|
24
|
+
`).slice(n);this.output.write(r.join(`
|
|
25
|
+
`)),this._prevFrame=e;return}this.output.write(ye.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}},Sn=class extends dn{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(e){super(e,!1),this.value=!!e.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",t=>{this.output.write(ye.cursor.move(0,-1)),this.value=t,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};var Ec;Ec=new WeakMap;var yc=Object.defineProperty,Fc=(s,e,t)=>e in s?yc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Rr=(s,e,t)=>(Fc(s,typeof e!="symbol"?e+"":e,t),t),kn=class extends dn{constructor(e){super(e,!1),Rr(this,"options"),Rr(this,"cursor",0),this.options=e.options,this.cursor=this.options.findIndex(({value:t})=>t===e.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",t=>{switch(t){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}};var jn=class extends dn{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;let e=this.value.slice(0,this.cursor),[t,...n]=this.value.slice(this.cursor);return`${e}${Wr.default.inverse(t)}${n.join("")}`}get cursor(){return this._cursor}constructor(e){super(e),this.on("finalize",()=>{this.value||(this.value=e.defaultValue)})}};var je=he(require("node:process"),1),v=he(ei(),1),Pn=he(Zs(),1);function bc(){return je.default.platform!=="win32"?je.default.env.TERM!=="linux":!!je.default.env.CI||!!je.default.env.WT_SESSION||!!je.default.env.TERMINUS_SUBLIME||je.default.env.ConEmuTask==="{cmd::Cmder}"||je.default.env.TERM_PROGRAM==="Terminus-Sublime"||je.default.env.TERM_PROGRAM==="vscode"||je.default.env.TERM==="xterm-256color"||je.default.env.TERM==="alacritty"||je.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var ai=bc(),fe=(s,e)=>ai?s:e,wc=fe("\u25C6","*"),Yr=fe("\u25A0","x"),Kr=fe("\u25B2","x"),hi=fe("\u25C7","o"),xc=fe("\u250C","T"),se=fe("\u2502","|"),qt=fe("\u2514","\u2014"),ci=fe("\u25CF",">"),li=fe("\u25CB"," "),ef=fe("\u25FB","[\u2022]"),tf=fe("\u25FC","[+]"),nf=fe("\u25FB","[ ]"),sf=fe("\u25AA","\u2022"),rf=fe("\u2500","-"),of=fe("\u256E","+"),uf=fe("\u251C","+"),af=fe("\u256F","+"),vc=fe("\u25CF","\u2022"),Ac=fe("\u25C6","*"),$c=fe("\u25B2","!"),Oc=fe("\u25A0","x"),fi=s=>{switch(s){case"initial":case"active":return v.default.cyan(wc);case"cancel":return v.default.red(Yr);case"error":return v.default.yellow(Kr);case"submit":return v.default.green(hi)}},Tc=s=>{let{cursor:e,options:t,style:n}=s,r=s.maxItems??Number.POSITIVE_INFINITY,o=Math.max(process.stdout.rows-4,0),i=Math.min(o,Math.max(r,5)),u=0;e>=u+i-3?u=Math.max(Math.min(e-i+3,t.length-i),0):e<u+2&&(u=Math.max(e-2,0));let c=i<t.length&&u>0,h=i<t.length&&u+i<t.length;return t.slice(u,u+i).map((p,l,d)=>{let C=l===0&&c,F=l===d.length-1&&h;return C||F?v.default.dim("..."):n(p,l+u===e)})},Qr=s=>new jn({validate:s.validate,placeholder:s.placeholder,defaultValue:s.defaultValue,initialValue:s.initialValue,render(){var r;let e=`${v.default.gray(se)}
|
|
26
|
+
${fi(this.state)} ${s.message}
|
|
27
|
+
`,t=s.placeholder?v.default.inverse(s.placeholder[0])+v.default.dim(s.placeholder.slice(1)):v.default.inverse(v.default.hidden("_")),n=this.value?this.valueWithCursor:t;switch(this.state){case"error":return`${e.trim()}
|
|
28
|
+
${v.default.yellow(se)} ${n}
|
|
29
|
+
${v.default.yellow(qt)} ${v.default.yellow(this.error)}
|
|
30
|
+
`;case"submit":return`${e}${v.default.gray(se)} ${v.default.dim(this.value||s.placeholder)}`;case"cancel":return`${e}${v.default.gray(se)} ${v.default.strikethrough(v.default.dim(this.value??""))}${(r=this.value)!=null&&r.trim()?`
|
|
31
|
+
${v.default.gray(se)}`:""}`;default:return`${e}${v.default.cyan(se)} ${n}
|
|
32
|
+
${v.default.cyan(qt)}
|
|
33
|
+
`}}}).prompt();var Jn=s=>{let e=s.active??"Yes",t=s.inactive??"No";return new Sn({active:e,inactive:t,initialValue:s.initialValue??!0,render(){let n=`${v.default.gray(se)}
|
|
34
|
+
${fi(this.state)} ${s.message}
|
|
35
|
+
`,r=this.value?e:t;switch(this.state){case"submit":return`${n}${v.default.gray(se)} ${v.default.dim(r)}`;case"cancel":return`${n}${v.default.gray(se)} ${v.default.strikethrough(v.default.dim(r))}
|
|
36
|
+
${v.default.gray(se)}`;default:return`${n}${v.default.cyan(se)} ${this.value?`${v.default.green(ci)} ${e}`:`${v.default.dim(li)} ${v.default.dim(e)}`} ${v.default.dim("/")} ${this.value?`${v.default.dim(li)} ${v.default.dim(t)}`:`${v.default.green(ci)} ${t}`}
|
|
37
|
+
${v.default.cyan(qt)}
|
|
38
|
+
`}}}).prompt()},pi=s=>{let e=(t,n)=>{let r=t.label??String(t.value);switch(n){case"selected":return`${v.default.dim(r)}`;case"active":return`${v.default.green(ci)} ${r} ${t.hint?v.default.dim(`(${t.hint})`):""}`;case"cancelled":return`${v.default.strikethrough(v.default.dim(r))}`;default:return`${v.default.dim(li)} ${v.default.dim(r)}`}};return new kn({options:s.options,initialValue:s.initialValue,render(){let t=`${v.default.gray(se)}
|
|
39
|
+
${fi(this.state)} ${s.message}
|
|
40
|
+
`;switch(this.state){case"submit":return`${t}${v.default.gray(se)} ${e(this.options[this.cursor],"selected")}`;case"cancel":return`${t}${v.default.gray(se)} ${e(this.options[this.cursor],"cancelled")}
|
|
41
|
+
${v.default.gray(se)}`;default:return`${t}${v.default.cyan(se)} ${Tc({cursor:this.cursor,options:this.options,maxItems:s.maxItems,style:(n,r)=>e(n,r?"active":"inactive")}).join(`
|
|
42
|
+
${v.default.cyan(se)} `)}
|
|
43
|
+
${v.default.cyan(qt)}
|
|
44
|
+
`}}}).prompt()};var mn=(s="")=>{process.stdout.write(`${v.default.gray(qt)} ${v.default.red(s)}
|
|
45
|
+
|
|
46
|
+
`)},Rn=(s="")=>{process.stdout.write(`${v.default.gray(xc)} ${s}
|
|
47
|
+
`)},Di=(s="")=>{process.stdout.write(`${v.default.gray(se)}
|
|
48
|
+
${v.default.gray(qt)} ${s}
|
|
49
|
+
|
|
50
|
+
`)},ie={message:(s="",{symbol:e=v.default.gray(se)}={})=>{let t=[`${v.default.gray(se)}`];if(s){let[n,...r]=s.split(`
|
|
51
|
+
`);t.push(`${e} ${n}`,...r.map(o=>`${v.default.gray(se)} ${o}`))}process.stdout.write(`${t.join(`
|
|
48
52
|
`)}
|
|
49
|
-
`)},info:
|
|
50
|
-
`);let
|
|
51
|
-
`)
|
|
52
|
-
|
|
53
|
-
`):
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
`)
|
|
57
|
-
|
|
58
|
-
`),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
53
|
+
`)},info:s=>{ie.message(s,{symbol:v.default.blue(vc)})},success:s=>{ie.message(s,{symbol:v.default.green(Ac)})},step:s=>{ie.message(s,{symbol:v.default.green(hi)})},warn:s=>{ie.message(s,{symbol:v.default.yellow($c)})},warning:s=>{ie.warn(s)},error:s=>{ie.message(s,{symbol:v.default.red(Oc)})}},cf=`${v.default.gray(se)} `;var Gt=({indicator:s="dots"}={})=>{let e=ai?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],t=ai?80:120,n=process.env.CI==="true",r,o,i=!1,u="",c,h=performance.now(),p=w=>{let R=w>1?"Something went wrong":"Canceled";i&&B(R,w)},l=()=>p(2),d=()=>p(1),C=()=>{process.on("uncaughtExceptionMonitor",l),process.on("unhandledRejection",l),process.on("SIGINT",d),process.on("SIGTERM",d),process.on("exit",p)},F=()=>{process.removeListener("uncaughtExceptionMonitor",l),process.removeListener("unhandledRejection",l),process.removeListener("SIGINT",d),process.removeListener("SIGTERM",d),process.removeListener("exit",p)},E=()=>{if(c===void 0)return;n&&process.stdout.write(`
|
|
54
|
+
`);let w=c.split(`
|
|
55
|
+
`);process.stdout.write(Pn.cursor.move(-999,w.length-1)),process.stdout.write(Pn.erase.down(w.length))},D=w=>w.replace(/\.+$/,""),I=w=>{let R=(performance.now()-w)/1e3,X=Math.floor(R/60),z=Math.floor(R%60);return X>0?`[${X}m ${z}s]`:`[${z}s]`},x=(w="")=>{i=!0,r=zr(),u=D(w),h=performance.now(),process.stdout.write(`${v.default.gray(se)}
|
|
56
|
+
`);let R=0,X=0;C(),o=setInterval(()=>{if(n&&u===c)return;E(),c=u;let z=v.default.magenta(e[R]);if(n)process.stdout.write(`${z} ${u}...`);else if(s==="timer")process.stdout.write(`${z} ${u} ${I(h)}`);else{let be=".".repeat(Math.floor(X)).slice(0,3);process.stdout.write(`${z} ${u}${be}`)}R=R+1<e.length?R+1:0,X=X<e.length?X+.125:0},t)},B=(w="",R=0)=>{i=!1,clearInterval(o),E();let X=R===0?v.default.green(hi):R===1?v.default.red(Yr):v.default.red(Kr);u=D(w??u),s==="timer"?process.stdout.write(`${X} ${u} ${I(h)}
|
|
57
|
+
`):process.stdout.write(`${X} ${u}
|
|
58
|
+
`),F(),r()};return{start:x,stop:B,message:(w="")=>{u=D(w??u)}}};var di,Zr,Xr,eo,to=!0;typeof process<"u"&&({FORCE_COLOR:di,NODE_DISABLE_COLORS:Zr,NO_COLOR:Xr,TERM:eo}=process.env||{},to=process.stdout&&process.stdout.isTTY);var _c={enabled:!Zr&&Xr==null&&eo!=="dumb"&&(di!=null&&di!=="0"||to)};function Y(s,e){let t=new RegExp(`\\x1b\\[${e}m`,"g"),n=`\x1B[${s}m`,r=`\x1B[${e}m`;return function(o){return!_c.enabled||o==null?o:n+(~(""+o).indexOf(r)?o.replace(t,r+n):o)+r}}var no=Y(0,0),so=Y(1,22),ff=Y(2,22),pf=Y(3,23),Df=Y(4,24),df=Y(7,27),mf=Y(8,28),gf=Y(9,29),Cf=Y(30,39),_e=Y(31,39),io=Y(32,39),ro=Y(33,39),oo=Y(34,39),xe=Y(35,39),Ie=Y(36,39),uo=Y(37,39),at=Y(90,39),Ef=Y(90,39),yf=Y(40,49),Ln=Y(41,49),Ff=Y(42,49),bf=Y(43,49),gn=Y(44,49),mi=Y(45,49),wf=Y(46,49),xf=Y(47,49);var gi=he(require("node:fs")),ao=require("node:path"),Wn=async s=>{let e=await gi.default.promises.readdir(s);return await Promise.all(e.map(t=>gi.default.promises.rm((0,ao.join)(s,t),{recursive:!0})))};var Fs=he(require("node:fs")),bs=require("node:path");var tu=he(lo(),1),Ti=he(require("node:fs"),1),_i=require("node:path"),nu=he(Xo(),1);function Vt(s,e,t){let n,r=new Promise(i=>{try{n=(0,nu.default)(s,e,{cwd:t,stdio:"ignore"}),n.on("error",u=>{u&&(u.message?ie.error(_e(String(u.message))+`
|
|
59
|
+
|
|
60
|
+
`):ie.error(_e(String(u))+`
|
|
61
|
+
|
|
62
|
+
`)),i(!1)}),n.on("close",u=>{i(u===0)})}catch{i(!1)}});return{abort:async()=>{n&&n.kill("SIGINT")},install:r}}async function su(s){let e=(0,_i.join)(s,"package.json");return JSON.parse(await Ti.default.promises.readFile(e,"utf-8"))}async function iu(s,e){let t=(0,_i.join)(s,"package.json");await Ti.default.promises.writeFile(t,JSON.stringify(e,null,2)+`
|
|
63
|
+
`)}function ru(s){return new Promise(e=>setTimeout(e,s))}function ou(s){var n;s={...s};let e={name:s.name,version:s.version,description:s.description,scripts:s.scripts,dependencies:s.dependencies,devDependencies:s.devDependencies,main:s.main,qwik:s.qwik,module:s.module,types:s.types,exports:s.exports,files:s.files,engines:{node:((n=s.engines)==null?void 0:n.node)||"^18.17.0 || ^20.3.0 || >=21.0.0"}};Object.keys(e).forEach(r=>{delete s[r]}),delete s.__qwik__;let t=Object.keys(s).sort();for(let r of t)e[r]=s[r];return e}function uu(s){return s.toLocaleLowerCase().split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function ct(){var s;return((s=(0,tu.default)())==null?void 0:s.name)||"pnpm"}function Gn(s){console.error(`
|
|
64
|
+
\u274C ${_e(s)}
|
|
65
|
+
`),process.exit(1)}function au(){console.log(oo(`
|
|
66
|
+
${xe("............")}
|
|
67
|
+
.::: ${xe(":--------:.")}
|
|
68
|
+
.:::: ${xe(".:-------:.")}
|
|
69
|
+
.:::::. ${xe(".:-------.")}
|
|
70
|
+
::::::. ${xe(".:------.")}
|
|
71
|
+
::::::. ${xe(":-----:")}
|
|
72
|
+
::::::. ${xe(".:-----.")}
|
|
73
|
+
:::::::. ${xe(".-----.")}
|
|
74
|
+
::::::::.. ${xe("---:.")}
|
|
75
|
+
.:::::::::. ${xe(":-:.")}
|
|
69
76
|
..::::::::::::
|
|
70
77
|
...::::
|
|
71
78
|
`),`
|
|
72
|
-
`)}function
|
|
73
|
-
${
|
|
79
|
+
`)}function cu(){return process.platform!=="win32"?process.env.TERM!=="linux":!!process.env.CI||!!process.env.WT_SESSION||!!process.env.TERMINUS_SUBLIME||process.env.ConEmuTask==="{cmd::Cmder}"||process.env.TERM_PROGRAM==="Terminus-Sublime"||process.env.TERM_PROGRAM==="vscode"||process.env.TERM==="xterm-256color"||process.env.TERM==="alacritty"||process.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var il=cu(),zt=(s,e)=>il?s:e,$i=zt("\u2502","|"),eu=zt("\u2500","-"),rl=zt("\u256E","+"),ol=zt("\u251C","+"),ul=zt("\u256F","+"),al=zt("\u25C7","o");function cl(){let s=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(s,"g")}var Oi=s=>s.replace(cl(),""),Hn=(s="",e="")=>{let t=`
|
|
80
|
+
${s}
|
|
74
81
|
`.split(`
|
|
75
|
-
`),
|
|
76
|
-
`);process.stdout.write(`${
|
|
77
|
-
${
|
|
82
|
+
`),n=Oi(e).length,r=Math.max(t.reduce((i,u)=>(u=Oi(u),u.length>i?u.length:i),0),n)+2,o=t.map(i=>`${at($i)} ${uo(i)}${" ".repeat(r-Oi(i).length)}${at($i)}`).join(`
|
|
83
|
+
`);process.stdout.write(`${at($i)}
|
|
84
|
+
${io(al)} ${no(e)} ${at(eu.repeat(Math.max(r-n-1,1))+rl)}
|
|
78
85
|
${o}
|
|
79
|
-
${
|
|
80
|
-
`)};var
|
|
86
|
+
${at(ol+eu.repeat(r+2)+ul)}
|
|
87
|
+
`)};var Qi=he(require("node:fs"),1),Tu=require("node:path");var it=he(require("node:fs"),1),Me=he(require("node:path"),1);function wt(s,e){return Vt(s,["install"],e)}function lu(s,e){let{tmpInstallDir:t}=ll(e),{install:n,abort:r}=wt(s,t),i={abort:()=>r().finally(()=>it.default.rmSync(t,{recursive:!0})),complete:async u=>{let c=!1;try{if(await n){let p=Me.default.join(t,"node_modules"),l=Me.default.join(u,"node_modules");await it.default.promises.rename(p,l);try{await it.default.promises.rename(Me.default.join(t,"package-lock.json"),Me.default.join(u,"package-lock.json"))}catch{}try{await it.default.promises.rename(Me.default.join(t,"yarn.lock"),Me.default.join(u,"yarn.lock"))}catch{}try{await it.default.promises.rename(Me.default.join(t,"pnpm-lock.yaml"),Me.default.join(u,"pnpm-lock.yaml"))}catch{}c=!0,it.default.rmSync(t,{recursive:!0})}}catch(h){h&&(h.message?ie.error(_e(String(h.message))+`
|
|
81
88
|
|
|
82
|
-
`):
|
|
89
|
+
`):ie.error(_e(String(h))+`
|
|
83
90
|
|
|
84
|
-
`))}if(!
|
|
85
|
-
You might need to run ${
|
|
91
|
+
`))}if(!c){let h=`${Ln(` ${s} install failed `)}
|
|
92
|
+
You might need to run ${Ie(`"${s} install"`)} manually inside the root of the project.
|
|
86
93
|
|
|
87
|
-
`;
|
|
88
|
-
`,type:"modify"})}catch{
|
|
89
|
-
`,type:"modify"})}catch{
|
|
94
|
+
`;ie.error(h)}return c},success:void 0};return n.then(u=>i.success=u),i}function ll(s){let e=".create-qwik-"+Math.round(Math.random()*Number.MAX_SAFE_INTEGER).toString(36).toLowerCase(),t=Me.default.resolve(s.target,"..",e);try{it.default.mkdirSync(t)}catch(o){ie.error(`\u274C ${_e(String(o))}`)}let n=Me.default.join(s.dir,"package.json"),r=Me.default.join(t,"package.json");return it.default.copyFileSync(n,r),{tmpInstallDir:t}}var Un=he(require("node:fs"),1),Vn=require("node:path");var Ii=null;async function zn(){if(!Ii){let s=[],e=["app","feature","adapter"],t=(0,Vn.join)(__dirname,"starters"),n=await Un.default.promises.readdir(t);await Promise.all(n.map(async r=>{let o=r.slice(0,r.length-1);if(e.includes(o)){let i=(0,Vn.join)(t,r),u=await Un.default.promises.readdir(i);await Promise.all(u.map(async c=>{var l,d,C,F;let h=(0,Vn.join)(i,c);if((await Un.default.promises.stat(h)).isDirectory()){let E=await su(h),D={id:c,name:((l=E.__qwik__)==null?void 0:l.displayName)??uu(c),type:o,dir:h,pkgJson:E,docs:((d=E.__qwik__)==null?void 0:d.docs)??[],priority:((C=E==null?void 0:E.__qwik__)==null?void 0:C.priority)??0,alwaysInRoot:((F=E.__qwik__)==null?void 0:F.alwaysInRoot)??[]};s.push(D)}}))}})),s.sort((r,o)=>r.priority>o.priority?-1:r.priority<o.priority?1:r.id<o.id?-1:1),Ii=s}return Ii}var nn=he(Ou(),1),Fe=he(require("node:fs"),1),sn=require("node:path");async function Ki(s,e,t,n,r){let o=await Fe.default.promises.readdir(t);await Promise.all(o.map(async i=>{let u=i==="gitignore"?".gitignore":i,c=(0,sn.extname)(u),h=(0,sn.join)(t,i),p=(0,sn.join)(n,u),l=await Fe.default.promises.stat(h);if(l.isDirectory())await Ki(s,e,h,p,r);else if(l.isFile()){let d=Kl(e,p,n,u,r);u==="package.json"?await Ql(s,h,p):n.endsWith(".vscode")&&u==="settings.json"?await Zl(s,h,d):u==="README.md"?await eh(s,h,d):u===".gitignore"||u===".prettierignore"||u===".eslintignore"?await th(s,h,p):c===".css"?await nh(s,h,d,e):Fe.default.existsSync(d)?s.files.push({path:d,content:await Fe.default.promises.readFile(h),type:"overwrite"}):s.files.push({path:d,content:await Fe.default.promises.readFile(h),type:"create"})}}))}function Kl(s,e,t,n,r){let o=s.projectDir?s.projectDir:"",i=t.indexOf(s.rootDir)+s.rootDir.length,u=t.slice(i),c=(0,sn.join)(s.rootDir,o,u,n);return r&&r.some(p=>n.includes(p)||t.includes(p))?e:c}async function Ql(s,e,t){var r;let n=await Fe.default.promises.readFile(e,"utf-8");try{let o=JSON.parse(n),i=["scripts","dependencies","devDependencies"],u=JSON.parse(await Fe.default.promises.readFile(t,"utf-8"));if(i.forEach(c=>{Xl(o,u,c)}),(r=u.scripts)!=null&&r.qwik){let c=u.scripts.qwik;delete u.scripts.qwik,u.scripts.qwik=c}s.files.push({path:t,content:JSON.stringify(u,null,2)+`
|
|
95
|
+
`,type:"modify"})}catch{s.files.push({path:t,content:n,type:"create"})}}async function Zl(s,e,t){let n=await Fe.default.promises.readFile(e,"utf-8");try{let r=nn.JsonParser.parse(n,nn.JsonObjectNode),o=nn.JsonParser.parse(await Fe.default.promises.readFile(t,"utf-8"),nn.JsonObjectNode);o.merge(r),s.files.push({path:t,content:o.toString()+`
|
|
96
|
+
`,type:"modify"})}catch{s.files.push({path:t,content:n,type:"create"})}}function Xl(s,e,t){if(s[t]){e[t]?Object.assign(e[t],{...s[t]}):e[t]={...s[t]};let n={},r=Object.keys(e[t]).sort();for(let o of r)n[o]=e[t][o];e[t]=n}}async function eh(s,e,t){let n=await Fe.default.promises.readFile(e,"utf-8"),r,o="";try{o=await Fe.default.promises.readFile(t,"utf-8"),o=o.trim()+`
|
|
90
97
|
|
|
91
|
-
`+
|
|
92
|
-
`,type:r})}async function
|
|
98
|
+
`+n,r="modify"}catch{o=n,r="create"}let i=ct();i!=="npm"&&(o=o.replace(/\b(npm run|pnpm run|yarn( run)?)\b/g,i)),s.files.push({path:t,content:o.trim()+`
|
|
99
|
+
`,type:r})}async function th(s,e,t){let n=await Fe.default.promises.readFile(e,"utf-8");try{let r=await Fe.default.promises.readFile(t,"utf-8"),o=n.trim().split(/\r?\n/),i=r.trim().split(/\r?\n/);for(let u of o)i.includes(u)||(u.startsWith("#")&&i.push(""),i.push(u));s.files.push({path:t,content:i.join(`
|
|
93
100
|
`).trim()+`
|
|
94
|
-
`,type:"modify"})}catch{
|
|
101
|
+
`,type:"modify"})}catch{s.files.push({path:t,content:n,type:"create"})}}async function nh(s,e,t,n){let r=await Fe.default.promises.readFile(e,"utf-8");try{let o=await Fe.default.promises.readFile(t,"utf-8"),i=r.trim()+`
|
|
95
102
|
|
|
96
103
|
`+o.trim()+`
|
|
97
|
-
`,
|
|
98
|
-
You might need to run "${
|
|
99
|
-
`)}var
|
|
100
|
-
`),"Result"),
|
|
101
|
-
`).map(r=>r.split(" ")),
|
|
102
|
-
`)}rowToString(e,t){return this.rasterize(e).forEach((
|
|
104
|
+
`,u=n.installDeps===!0;s.files.push({path:t,content:u?i:r,type:u?"modify":"overwrite"})}catch{s.files.push({path:t,content:r,type:"create"})}}async function Zi(s,e){let n=(await zn()).find(u=>u.id===e.integration);if(!n)throw new Error(`Unable to find integration "${e.integration}"`);let r={files:[],installedDeps:{},installedScripts:Object.keys(n.pkgJson.scripts||{})};e.installDeps&&(r.installedDeps={...n.pkgJson.dependencies,...n.pkgJson.devDependencies}),await Ki(r,e,n.dir,e.rootDir,n.alwaysInRoot);let o=async u=>{let c=Object.keys(r.installedDeps).length>0,h=Gt();u&&h.start(`Updating app${c?" and installing dependencies":""}...`);let p=!0;try{let l=new Set(r.files.map(C=>(0,Tu.dirname)(C.path)));for(let C of Array.from(l))try{Qi.default.mkdirSync(C,{recursive:!0})}catch{}let d=Promise.all(r.files.map(async C=>{await Qi.default.promises.writeFile(C.path,C.content)}));if(e.installDeps&&Object.keys(r.installedDeps).length>0){let{install:C}=wt(s,e.rootDir);p=await C}if(await d,u&&h.stop("App updated"),!p){let C=`${Ln(` ${s} install failed `)}
|
|
105
|
+
You might need to run "${Ie(`${s} install`)}" manually inside the root of the project.`;ie.error(C)}}catch(l){u&&h.stop("App updated"),Gn(String(l))}};return{rootDir:e.rootDir,integration:n,updates:r,commit:o}}function sh(s){return typeof s=="string"&&s.trim().length>0}function ih(s){if(!sh(s.outDir))throw new Error("Missing outDir");if(!(0,bs.isAbsolute)(s.outDir))throw new Error("outDir must be an absolute path")}async function rn(s){let{appId:e,outDir:t,pkgManager:n,templateManager:r}=s,{baseApp:o,starterApp:i}=r.getBootstrapApps(e);ih(s),Fs.default.existsSync(t)||Fs.default.mkdirSync(decodeURIComponent(t),{recursive:!0});let u=await rh({baseApp:o,starterApp:i,pkgManager:n,outDir:t});return{starterId:s.appId,outDir:t,pkgManager:n,docs:u}}async function rh({baseApp:s,starterApp:e,outDir:t,pkgManager:n}){let r=[...s.docs],o=e??s,i=ou({...s.pkgJson,name:`my-${o.pkgJson.name}`,description:o.pkgJson.description,scripts:void 0,dependencies:void 0,devDependencies:void 0});await iu(t,i);let u=(0,bs.join)(t,"README.md");return await Fs.default.promises.writeFile(u,""),await(await Zi(n,{rootDir:t,integration:s.id,installDeps:!1})).commit(!1),e&&(r.push(...e.docs),await(await Zi(n,{rootDir:t,integration:e.id,installDeps:!1})).commit(!1)),r}var Ar=he(require("node:fs"));async function ws(s,{pkgManager:e,spinner:t}){t.start(`Installing ${e} dependencies...`);let n=await s();return t.stop(`${n?"Installed":"Failed to install"} ${e} dependencies \u{1F4CB}`),n}function _u(s){let e=[];return s.length>0&&(e.push(`\u{1F4C4} ${Ie("Relevant docs:")}`),s.forEach(t=>{e.push(` ${t}`)})),e.push(""),e.push(`\u{1F4AC} ${Ie("Questions? Start the conversation at:")}`),e.push(" https://qwik.dev/chat"),e.push(" https://twitter.com/QwikDev"),e.push(""),e.join(`
|
|
106
|
+
`)}var Iu=require("node:path");function xs(s,e,t){let n=process.cwd()===e.outDir,r=(0,Iu.relative)(process.cwd(),e.outDir),o=[];n?o.push(`\u{1F984} ${mi(" Success! ")}`):o.push(`\u{1F984} ${mi(" Success! ")} ${Ie("Project created in")} ${so(xe(r))} ${Ie("directory")}`),o.push("");let i=s!=="npm"?`${s} qwik add`:"npm run qwik add";o.push(`\u{1F90D} ${Ie("Integrations? Add Netlify, Cloudflare, Tailwind...")}`),o.push(` ${i}`),o.push(""),o.push(_u(e.docs)),o.push(`\u{1F440} ${Ie("Presentations, Podcasts and Videos:")}`),o.push(" https://qwik.dev/media/"),o.push(""),o.push(`\u{1F430} ${Ie("Next steps:")}`),n||o.push(` cd ${r}`),t||o.push(` ${s} install`),s==="deno"?o.push(" deno task start"):o.push(` ${s} start`),o.push(""),Hn(o.join(`
|
|
107
|
+
`),"Result"),Di("Happy coding! \u{1F389}")}var Xi,oh="library",vs="base",bn=class extends Error{constructor(e,t){super(),this.message=`Invalid app id "${e}". It can only be one of${t.map(n=>` "${n.id}"`)}.`}},on=async s=>{Xi||(Xi=await zn());let e=Xi.filter(i=>i.type===s),t=e.filter(i=>i.id!==vs);function n(i,u=!0){return u?t.find(c=>c.id===i):e.find(c=>c.id===i)}function r(){return n(vs,!1)}function o(i){if(i===oh){let p=n(i);if(!p)throw new bn(i,t);return{baseApp:p}}let c=n(vs,!1),h=n(i);if(!c)throw new bn(vs,t);if(!h)throw new bn(i,t);return{baseApp:c,starterApp:h}}return{templates:e,standaloneTemplates:t,getAppById:n,getBootstrapApps:o,getBaseApp:r}};var er=require("path"),Nu=he(require("node:os"));function As(s){return s.startsWith("~/")?(0,er.resolve)(Nu.default.homedir(),s):(0,er.resolve)(process.cwd(),s)}var Ss=require("assert");var uh={right:fh,center:ph},ah=0,$s=1,ch=2,Os=3,tr=class{constructor(e){var t;this.width=e.width,this.wrap=(t=e.wrap)!==null&&t!==void 0?t:!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(n=>typeof n=="string"?this.colFromString(n):n);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(`
|
|
108
|
+
`).map(r=>r.split(" ")),n=0;return t.forEach(r=>{r.length>1&&Ne.stringWidth(r[0])>n&&(n=Math.min(Math.floor(this.width*.5),Ne.stringWidth(r[0])))}),t.forEach(r=>{this.div(...r.map((o,i)=>({text:o.trim(),padding:this.measurePadding(o),width:i===0&&r.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){let t=Ne.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(t=>!t.hidden).map(t=>t.text).join(`
|
|
109
|
+
`)}rowToString(e,t){return this.rasterize(e).forEach((n,r)=>{let o="";n.forEach((i,u)=>{let{width:c}=e[u],h=this.negatePadding(e[u]),p=i;if(h>Ne.stringWidth(i)&&(p+=" ".repeat(h-Ne.stringWidth(i))),e[u].align&&e[u].align!=="left"&&this.wrap){let d=uh[e[u].align];p=d(p,h),Ne.stringWidth(p)<h&&(p+=" ".repeat((c||0)-Ne.stringWidth(p)-1))}let l=e[u].padding||[0,0,0,0];l[Os]&&(o+=" ".repeat(l[Os])),o+=Bu(e[u],p,"| "),o+=p,o+=Bu(e[u],p," |"),l[$s]&&(o+=" ".repeat(l[$s])),r===0&&t.length>0&&(o=this.renderInline(o,t[t.length-1]))}),t.push({text:o.replace(/ +$/,""),span:e.span})}),t}renderInline(e,t){let n=e.match(/^ */),r=n?n[0].length:0,o=t.text,i=Ne.stringWidth(o.trimRight());return t.span?this.wrap?r<i?e:(t.hidden=!0,o.trimRight()+" ".repeat(r-i)+e.trimLeft()):(t.hidden=!0,o+e):e}rasterize(e){let t=[],n=this.columnWidths(e),r;return e.forEach((o,i)=>{o.width=n[i],this.wrap?r=Ne.wrap(o.text,this.negatePadding(o),{hard:!0}).split(`
|
|
103
110
|
`):r=o.text.split(`
|
|
104
|
-
`),o.border&&(r.unshift("."+"-".repeat(this.negatePadding(o)+2)+"."),r.push("'"+"-".repeat(this.negatePadding(o)+2)+"'")),o.padding&&(r.unshift(...new Array(o.padding[
|
|
105
|
-
`),r+=n.charAt(o);return t&&i&&(r=`${t}${r}${i}`),r}function _i(n){return Ur(n,{stringWidth:e=>[...e].length,stripAnsi:Oi,wrap:Hr})}var St=require("path"),En=require("fs");function Gr(n,e){let t=(0,St.resolve)(".",n),i;for((0,En.statSync)(t).isDirectory()||(t=(0,St.dirname)(t));;){if(i=e(t,(0,En.readdirSync)(t)),i)return(0,St.resolve)(t,i);if(t=(0,St.dirname)(i=t),i===t)break}}var co=require("util"),lo=require("fs"),fo=require("url");var Zr=require("util"),An=require("path");function ot(n){if(n!==n.toLowerCase()&&n!==n.toUpperCase()||(n=n.toLowerCase()),n.indexOf("-")===-1&&n.indexOf("_")===-1)return n;{let t="",i=!1,r=n.match(/^-+/);for(let o=r?r[0].length:0;o<n.length;o++){let s=n.charAt(o);i&&(i=!1,s=s.toUpperCase()),o!==0&&(s==="-"||s==="_")?i=!0:s!=="-"&&s!=="_"&&(t+=s)}return t}}function yn(n,e){let t=n.toLowerCase();e=e||"-";let i="";for(let r=0;r<n.length;r++){let o=t.charAt(r),s=n.charAt(r);o!==s&&r>0?i+=`${e}${t.charAt(r)}`:i+=s}return i}function wn(n){return n==null?!1:typeof n=="number"||/^0x[0-9a-f]+$/i.test(n)?!0:/^0[^.]/.test(n)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(n)}function Yr(n){if(Array.isArray(n))return n.map(s=>typeof s!="string"?s+"":s);n=n.trim();let e=0,t=null,i=null,r=null,o=[];for(let s=0;s<n.length;s++){if(t=i,i=n.charAt(s),i===" "&&!r){t!==" "&&e++;continue}i===r?r=null:(i==="'"||i==='"')&&!r&&(r=i),o[e]||(o[e]=""),o[e]+=i}return o}var Be;(function(n){n.BOOLEAN="boolean",n.STRING="string",n.NUMBER="number",n.ARRAY="array"})(Be||(Be={}));var qe,xn=class{constructor(e){qe=e}parse(e,t){let i=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=Yr(e),o=typeof e=="string",s=ka(Object.assign(Object.create(null),i.alias)),a=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},i.configuration),f=Object.assign(Object.create(null),i.default),D=i.configObjects||[],h=i.envPrefix,c=a["populate--"],p=c?"--":"_",C=Object.create(null),E=Object.create(null),b=i.__||qe.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]+)$/,N=new RegExp("^--"+a["negation-prefix"]+"(.+)");[].concat(i.array||[]).filter(Boolean).forEach(function(l){let m=typeof l=="object"?l.key:l,y=Object.keys(l).map(function(F){return{boolean:"bools",string:"strings",number:"numbers"}[F]}).filter(Boolean).pop();y&&(g[y][m]=!0),g.arrays[m]=!0,g.keys.push(m)}),[].concat(i.boolean||[]).filter(Boolean).forEach(function(l){g.bools[l]=!0,g.keys.push(l)}),[].concat(i.string||[]).filter(Boolean).forEach(function(l){g.strings[l]=!0,g.keys.push(l)}),[].concat(i.number||[]).filter(Boolean).forEach(function(l){g.numbers[l]=!0,g.keys.push(l)}),[].concat(i.count||[]).filter(Boolean).forEach(function(l){g.counts[l]=!0,g.keys.push(l)}),[].concat(i.normalize||[]).filter(Boolean).forEach(function(l){g.normalize[l]=!0,g.keys.push(l)}),typeof i.narg=="object"&&Object.entries(i.narg).forEach(([l,m])=>{typeof m=="number"&&(g.nargs[l]=m,g.keys.push(l))}),typeof i.coerce=="object"&&Object.entries(i.coerce).forEach(([l,m])=>{typeof m=="function"&&(g.coercions[l]=m,g.keys.push(l))}),typeof i.config<"u"&&(Array.isArray(i.config)||typeof i.config=="string"?[].concat(i.config).filter(Boolean).forEach(function(l){g.configs[l]=!0}):typeof i.config=="object"&&Object.entries(i.config).forEach(([l,m])=>{(typeof m=="boolean"||typeof m=="function")&&(g.configs[l]=m)})),it(i.key,s,i.default,g.arrays),Object.keys(f).forEach(function(l){(g.aliases[l]||[]).forEach(function(m){f[m]=f[l]})});let U=null;Yt();let k=[],V=Object.assign(Object.create(null),{_:[]}),Ue={};for(let l=0;l<r.length;l++){let m=r[l],y=m.replace(/^-{3,}/,"---"),F,d,_,A,I,fe;if(m!=="--"&&/^-/.test(m)&&te(m))Ie(m);else if(y.match(/^---+(=|$)/)){Ie(m);continue}else if(m.match(/^--.+=/)||!a["short-option-groups"]&&m.match(/^-.+=/))A=m.match(/^--?([^=]+)=([\s\S]*)$/),A!==null&&Array.isArray(A)&&A.length>=3&&(M(A[1],g.arrays)?l=tt(l,A[1],r,A[2]):M(A[1],g.nargs)!==!1?l=Ft(l,A[1],r,A[2]):H(A[1],A[2],!0));else if(m.match(N)&&a["boolean-negation"])A=m.match(N),A!==null&&Array.isArray(A)&&A.length>=2&&(d=A[1],H(d,M(d,g.arrays)?[!1]:!1));else if(m.match(/^--.+/)||!a["short-option-groups"]&&m.match(/^-[^-]+/))A=m.match(/^--?(.+)/),A!==null&&Array.isArray(A)&&A.length>=2&&(d=A[1],M(d,g.arrays)?l=tt(l,d,r):M(d,g.nargs)!==!1?l=Ft(l,d,r):(I=r[l+1],I!==void 0&&(!I.match(/^-/)||I.match(B))&&!M(d,g.bools)&&!M(d,g.counts)||/^(true|false)$/.test(I)?(H(d,I),l++):H(d,ne(d))));else if(m.match(/^-.\..+=/))A=m.match(/^-([^=]+)=([\s\S]*)$/),A!==null&&Array.isArray(A)&&A.length>=3&&H(A[1],A[2]);else if(m.match(/^-.\..+/)&&!m.match(B))I=r[l+1],A=m.match(/^-(.\..+)/),A!==null&&Array.isArray(A)&&A.length>=2&&(d=A[1],I!==void 0&&!I.match(/^-/)&&!M(d,g.bools)&&!M(d,g.counts)?(H(d,I),l++):H(d,ne(d)));else if(m.match(/^-[^-]+/)&&!m.match(B)){_=m.slice(1,-1).split(""),F=!1;for(let de=0;de<_.length;de++){if(I=m.slice(de+2),_[de+1]&&_[de+1]==="="){fe=m.slice(de+3),d=_[de],M(d,g.arrays)?l=tt(l,d,r,fe):M(d,g.nargs)!==!1?l=Ft(l,d,r,fe):H(d,fe),F=!0;break}if(I==="-"){H(_[de],I);continue}if(/[A-Za-z]/.test(_[de])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(I)&&M(I,g.bools)===!1){H(_[de],I),F=!0;break}if(_[de+1]&&_[de+1].match(/\W/)){H(_[de],I),F=!0;break}else H(_[de],ne(_[de]))}d=m.slice(-1)[0],!F&&d!=="-"&&(M(d,g.arrays)?l=tt(l,d,r):M(d,g.nargs)!==!1?l=Ft(l,d,r):(I=r[l+1],I!==void 0&&(!/^(-|--)[^-]/.test(I)||I.match(B))&&!M(d,g.bools)&&!M(d,g.counts)||/^(true|false)$/.test(I)?(H(d,I),l++):H(d,ne(d))))}else if(m.match(/^-[0-9]$/)&&m.match(B)&&M(m.slice(1),g.bools))d=m.slice(1),H(d,ne(d));else if(m==="--"){k=r.slice(l+1);break}else if(a["halt-at-non-option"]){k=r.slice(l);break}else Ie(m)}z(V,!0),z(V,!1),R(V),ce(),Z(V,g.aliases,f,!0),le(V),a["set-placeholder-key"]&&nt(V),Object.keys(g.counts).forEach(function(l){Le(V,l.split("."))||H(l,0)}),c&&k.length&&(V[p]=[]),k.forEach(function(l){V[p].push(l)}),a["camel-case-expansion"]&&a["strip-dashed"]&&Object.keys(V).filter(l=>l!=="--"&&l.includes("-")).forEach(l=>{delete V[l]}),a["strip-aliased"]&&[].concat(...Object.keys(s).map(l=>s[l])).forEach(l=>{a["camel-case-expansion"]&&l.includes("-")&&delete V[l.split(".").map(m=>ot(m)).join(".")],delete V[l]});function Ie(l){let m=O("_",l);(typeof m=="string"||typeof m=="number")&&V._.push(m)}function Ft(l,m,y,F){let d,_=M(m,g.nargs);if(_=typeof _!="number"||isNaN(_)?1:_,_===0)return Me(F)||(U=Error(b("Argument unexpected for: %s",m))),H(m,ne(m)),l;let A=Me(F)?0:1;if(a["nargs-eats-options"])y.length-(l+1)+A<_&&(U=Error(b("Not enough arguments following: %s",m))),A=_;else{for(d=l+1;d<y.length&&(!y[d].match(/^-[^0-9]/)||y[d].match(B)||te(y[d]));d++)A++;A<_&&(U=Error(b("Not enough arguments following: %s",m)))}let I=Math.min(A,_);for(!Me(F)&&I>0&&(H(m,F),I--),d=l+1;d<I+l+1;d++)H(m,y[d]);return l+I}function tt(l,m,y,F){let d=[],_=F||y[l+1],A=M(m,g.nargs);if(M(m,g.bools)&&!/^(true|false)$/.test(_))d.push(!0);else if(Me(_)||Me(F)&&/^-/.test(_)&&!B.test(_)&&!te(_)){if(f[m]!==void 0){let I=f[m];d=Array.isArray(I)?I:[I]}}else{Me(F)||d.push(x(m,F,!0));for(let I=l+1;I<y.length&&!(!a["greedy-arrays"]&&d.length>0||A&&typeof A=="number"&&d.length>=A||(_=y[I],/^-/.test(_)&&!B.test(_)&&!te(_)));I++)l=I,d.push(x(m,_,o))}return typeof A=="number"&&(A&&d.length<A||isNaN(A)&&d.length===0)&&(U=Error(b("Not enough arguments following: %s",m))),H(m,d),l}function H(l,m,y=o){if(/-/.test(l)&&a["camel-case-expansion"]){let _=l.split(".").map(function(A){return ot(A)}).join(".");S(l,_)}let F=x(l,m,y),d=l.split(".");ke(V,d,F),g.aliases[l]&&g.aliases[l].forEach(function(_){let A=_.split(".");ke(V,A,F)}),d.length>1&&a["dot-notation"]&&(g.aliases[d[0]]||[]).forEach(function(_){let A=_.split("."),I=[].concat(d);I.shift(),A=A.concat(I),(g.aliases[l]||[]).includes(A.join("."))||ke(V,A,F)}),M(l,g.normalize)&&!M(l,g.arrays)&&[l].concat(g.aliases[l]||[]).forEach(function(A){Object.defineProperty(Ue,A,{enumerable:!0,get(){return m},set(I){m=typeof I=="string"?qe.normalize(I):I}})})}function S(l,m){g.aliases[l]&&g.aliases[l].length||(g.aliases[l]=[m],C[m]=!0),g.aliases[m]&&g.aliases[m].length||S(m,l)}function x(l,m,y){y&&(m=za(m)),(M(l,g.bools)||M(l,g.counts))&&typeof m=="string"&&(m=m==="true");let F=Array.isArray(m)?m.map(function(d){return O(l,d)}):O(l,m);return M(l,g.counts)&&(Me(F)||typeof F=="boolean")&&(F=Si()),M(l,g.normalize)&&M(l,g.arrays)&&(Array.isArray(m)?F=m.map(d=>qe.normalize(d)):F=qe.normalize(m)),F}function O(l,m){return!a["parse-positional-numbers"]&&l==="_"||!M(l,g.strings)&&!M(l,g.bools)&&!Array.isArray(m)&&(wn(m)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${m}`)))||!Me(m)&&M(l,g.numbers))&&(m=Number(m)),m}function R(l){let m=Object.create(null);Z(m,g.aliases,f),Object.keys(g.configs).forEach(function(y){let F=l[y]||m[y];if(F)try{let d=null,_=qe.resolve(qe.cwd(),F),A=g.configs[y];if(typeof A=="function"){try{d=A(_)}catch(I){d=I}if(d instanceof Error){U=d;return}}else d=qe.require(_);q(d)}catch(d){d.name==="PermissionDenied"?U=d:l[y]&&(U=Error(b("Invalid JSON config file: %s",F)))}})}function q(l,m){Object.keys(l).forEach(function(y){let F=l[y],d=m?m+"."+y:y;typeof F=="object"&&F!==null&&!Array.isArray(F)&&a["dot-notation"]?q(F,d):(!Le(V,d.split("."))||M(d,g.arrays)&&a["combine-arrays"])&&H(d,F)})}function ce(){typeof D<"u"&&D.forEach(function(l){q(l)})}function z(l,m){if(typeof h>"u")return;let y=typeof h=="string"?h:"",F=qe.env();Object.keys(F).forEach(function(d){if(y===""||d.lastIndexOf(y,0)===0){let _=d.split("__").map(function(A,I){return I===0&&(A=A.substring(y.length)),ot(A)});(m&&g.configs[_.join(".")]||!m)&&!Le(l,_)&&H(_.join("."),F[d])}})}function le(l){let m,y=new Set;Object.keys(l).forEach(function(F){if(!y.has(F)&&(m=M(F,g.coercions),typeof m=="function"))try{let d=O(F,m(l[F]));[].concat(g.aliases[F]||[],F).forEach(_=>{y.add(_),l[_]=d})}catch(d){U=d}})}function nt(l){return g.keys.forEach(m=>{~m.indexOf(".")||typeof l[m]>"u"&&(l[m]=void 0)}),l}function Z(l,m,y,F=!1){Object.keys(y).forEach(function(d){Le(l,d.split("."))||(ke(l,d.split("."),y[d]),F&&(E[d]=!0),(m[d]||[]).forEach(function(_){Le(l,_.split("."))||ke(l,_.split("."),y[d])}))})}function Le(l,m){let y=l;a["dot-notation"]||(m=[m.join(".")]),m.slice(0,-1).forEach(function(d){y=y[d]||{}});let F=m[m.length-1];return typeof y!="object"?!1:F in y}function ke(l,m,y){let F=l;a["dot-notation"]||(m=[m.join(".")]),m.slice(0,-1).forEach(function(fe){fe=Jr(fe),typeof F=="object"&&F[fe]===void 0&&(F[fe]={}),typeof F[fe]!="object"||Array.isArray(F[fe])?(Array.isArray(F[fe])?F[fe].push({}):F[fe]=[F[fe],{}],F=F[fe][F[fe].length-1]):F=F[fe]});let d=Jr(m[m.length-1]),_=M(m.join("."),g.arrays),A=Array.isArray(y),I=a["duplicate-arguments-array"];!I&&M(d,g.nargs)&&(I=!0,(!Me(F[d])&&g.nargs[d]===1||Array.isArray(F[d])&&F[d].length===g.nargs[d])&&(F[d]=void 0)),y===Si()?F[d]=Si(F[d]):Array.isArray(F[d])?I&&_&&A?F[d]=a["flatten-duplicate-arrays"]?F[d].concat(y):(Array.isArray(F[d][0])?F[d]:[F[d]]).concat([y]):!I&&!!_==!!A?F[d]=y:F[d]=F[d].concat([y]):F[d]===void 0&&_?F[d]=A?y:[y]:I&&!(F[d]===void 0||M(d,g.counts)||M(d,g.bools))?F[d]=[F[d],y]:F[d]=y}function it(...l){l.forEach(function(m){Object.keys(m||{}).forEach(function(y){g.aliases[y]||(g.aliases[y]=[].concat(s[y]||[]),g.aliases[y].concat(y).forEach(function(F){if(/-/.test(F)&&a["camel-case-expansion"]){let d=ot(F);d!==y&&g.aliases[y].indexOf(d)===-1&&(g.aliases[y].push(d),C[d]=!0)}}),g.aliases[y].concat(y).forEach(function(F){if(F.length>1&&/[A-Z]/.test(F)&&a["camel-case-expansion"]){let d=yn(F,"-");d!==y&&g.aliases[y].indexOf(d)===-1&&(g.aliases[y].push(d),C[d]=!0)}}),g.aliases[y].forEach(function(F){g.aliases[F]=[y].concat(g.aliases[y].filter(function(d){return F!==d}))}))})})}function M(l,m){let y=[].concat(g.aliases[l]||[],l),F=Object.keys(m),d=y.find(_=>F.includes(_));return d?m[d]:!1}function zn(l){let m=Object.keys(g);return[].concat(m.map(F=>g[F])).some(function(F){return Array.isArray(F)?F.includes(l):F[l]})}function P(l,...m){return[].concat(...m).some(function(F){let d=l.match(F);return d&&zn(d[1])})}function K(l){if(l.match(B)||!l.match(/^-[^-]+/))return!1;let m=!0,y,F=l.slice(1).split("");for(let d=0;d<F.length;d++){if(y=l.slice(d+2),!zn(F[d])){m=!1;break}if(F[d+1]&&F[d+1]==="="||y==="-"||/[A-Za-z]/.test(F[d])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(y)||F[d+1]&&F[d+1].match(/\W/))break}return m}function te(l){return a["unknown-options-as-args"]&&L(l)}function L(l){return l=l.replace(/^-{3,}/,"--"),l.match(B)||K(l)?!1:!P(l,/^-+([^=]+?)=[\s\S]*$/,N,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function ne(l){return!M(l,g.bools)&&!M(l,g.counts)&&`${l}`in f?f[l]:re(Pe(l))}function re(l){return{[Be.BOOLEAN]:!0,[Be.STRING]:"",[Be.NUMBER]:void 0,[Be.ARRAY]:[]}[l]}function Pe(l){let m=Be.BOOLEAN;return M(l,g.strings)?m=Be.STRING:M(l,g.numbers)?m=Be.NUMBER:M(l,g.bools)?m=Be.BOOLEAN:M(l,g.arrays)&&(m=Be.ARRAY),m}function Me(l){return l===void 0}function Yt(){Object.keys(g.counts).find(l=>M(l,g.arrays)?(U=Error(b("Invalid configuration: %s, opts.count excludes opts.array.",l)),!0):M(l,g.nargs)?(U=Error(b("Invalid configuration: %s, opts.count excludes opts.narg.",l)),!0):!1)}return{aliases:Object.assign({},g.aliases),argv:Object.assign(Ue,V),configuration:a,defaulted:Object.assign({},E),error:U,newAliases:Object.assign({},C)}}};function ka(n){let e=[],t=Object.create(null),i=!0;for(Object.keys(n).forEach(function(r){e.push([].concat(n[r],r))});i;){i=!1;for(let r=0;r<e.length;r++)for(let o=r+1;o<e.length;o++)if(e[r].filter(function(a){return e[o].indexOf(a)!==-1}).length){e[r]=e[r].concat(e[o]),e.splice(o,1),i=!0;break}}return e.forEach(function(r){r=r.filter(function(s,a,f){return f.indexOf(s)===a});let o=r.pop();o!==void 0&&typeof o=="string"&&(t[o]=r)}),t}function Si(n){return n!==void 0?n+1:1}function Jr(n){return n==="__proto__"?"___proto___":n}function za(n){return typeof n=="string"&&(n[0]==="'"||n[0]==='"')&&n[n.length-1]===n[0]?n.substring(1,n.length-1):n}var Xr=require("fs");var ji,Ii,Pi,Kr=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,Qr=(Ii=(ji=process==null?void 0:process.versions)===null||ji===void 0?void 0:ji.node)!==null&&Ii!==void 0?Ii:(Pi=process==null?void 0:process.version)===null||Pi===void 0?void 0:Pi.slice(1);if(Qr&&Number(Qr.match(/^([^.]+)/)[1])<Kr)throw Error(`yargs parser supports a minimum Node.js version of ${Kr}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var qa=process?process.env:{},eo=new xn({cwd:process.cwd,env:()=>qa,format:Zr.format,normalize:An.normalize,resolve:An.resolve,require:n=>{if(typeof require<"u")return require(n);if(n.match(/\.json$/))return JSON.parse((0,Xr.readFileSync)(n,"utf8"));throw Error("only .json config files are supported in ESM")}}),qt=function(e,t){return eo.parse(e.slice(),t).argv};qt.detailed=function(n,e){return eo.parse(n.slice(),e)};qt.camelCase=ot;qt.decamelize=yn;qt.looksLikeNumber=wn;var to=qt;var Ne=require("path");function Ua(){return Va()?0:1}function Va(){return Ha()&&!process.defaultApp}function Ha(){return!!process.versions.electron}function no(){return process.argv[Ua()]}var Y=class n extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,n)}};var jt=require("fs"),io=require("util"),so=require("path"),ro={fs:{readFileSync:jt.readFileSync,writeFile:jt.writeFile},format:io.format,resolve:so.resolve,exists:n=>{try{return(0,jt.statSync)(n).isFile()}catch{return!1}}};var Te,Mi=class{constructor(e){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(),i=function(){};return typeof e[e.length-1]=="function"&&(i=e.pop()),i=i||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:i})):i(),Te.format.apply(Te.format,[this.cache[this.locale][t]||t].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),t=e.shift(),i=e.shift(),r=e.shift(),o=function(){};typeof e[e.length-1]=="function"&&(o=e.pop()),this.cache[this.locale]||this._readLocaleFile();let s=r===1?t:i;this.cache[this.locale][t]&&(s=this.cache[this.locale][t][r===1?"one":"other"]),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]={one:t,other:i},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:o})):o();let a=[s];return~s.indexOf("%d")&&a.push(r),Te.format.apply(Te.format,a.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.cache[this.locale][t]=e[t])}_taggedLiteral(e,...t){let i="";return e.forEach(function(r,o){let s=t[o+1];i+=r,typeof s<"u"&&(i+="%s")}),this.__.apply(this,[i].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],i=t.directory,r=t.locale,o=t.cb,s=this._resolveLocaleFile(i,r),a=JSON.stringify(this.cache[r],null,2);Te.fs.writeFile(s,a,"utf-8",function(f){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),o(f)})}_readLocaleFile(){let e={},t=this._resolveLocaleFile(this.directory,this.locale);try{Te.fs.readFileSync&&(e=JSON.parse(Te.fs.readFileSync(t,"utf-8")))}catch(i){if(i instanceof SyntaxError&&(i.message="syntax error in "+t),i.code==="ENOENT")e={};else throw i}this.cache[this.locale]=e}_resolveLocaleFile(e,t){let i=Te.resolve(e,"./",t+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(i)&&~t.lastIndexOf("_")){let r=Te.resolve(e,"./",t.split("_")[0]+".json");this._fileExistsSync(r)&&(i=r)}return i}_fileExistsSync(e){return Te.exists(e)}};function oo(n,e){Te=e;let t=new Mi(n);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}}var Ga=n=>oo(n,ro),uo=Ga;var Ka={},Ya="require is not supported by ESM",ao="loading a directory of commands is not supported yet for ESM",Ut;try{Ut=(0,fo.fileURLToPath)(Ka.url)}catch{Ut=process.cwd()}var Ja=Ut.substring(0,Ut.lastIndexOf("node_modules")),Do={assert:{notStrictEqual:$n.notStrictEqual,strictEqual:$n.strictEqual},cliui:_i,findUp:Gr,getEnv:n=>process.env[n],inspect:co.inspect,getCallerFile:()=>{throw new Y(ao)},getProcessArgvBin:no,mainFilename:Ja||process.cwd(),Parser:to,path:{basename:Ne.basename,dirname:Ne.dirname,extname:Ne.extname,relative:Ne.relative,resolve:Ne.resolve},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(n,e)=>process.emitWarning(n,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:lo.readFileSync,require:()=>{throw new Y(Ya)},requireDirectory:()=>{throw new Y(ao)},stringWidth:n=>[...n].length,y18n:uo({directory:(0,Ne.resolve)(Ut,"../../../locales"),updateFiles:!1})};function Ce(n,e,t,i){t.assert.notStrictEqual(n,e,i)}function Ti(n,e){e.assert.strictEqual(typeof n,"string")}function It(n){return Object.keys(n)}function J(n){return!!n&&!!n.then&&typeof n.then=="function"}function Je(n){let t=n.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),i=/\.*[\][<>]/g,r=t.shift();if(!r)throw new Error(`No command found in: ${n}`);let o={cmd:r.replace(i,""),demanded:[],optional:[]};return t.forEach((s,a)=>{let f=!1;s=s.replace(/\s/g,""),/\.+[\]>]/.test(s)&&a===t.length-1&&(f=!0),/^\[/.test(s)?o.optional.push({cmd:s.replace(i,"").split("|"),variadic:f}):o.demanded.push({cmd:s.replace(i,"").split("|"),variadic:f})}),o}var Qa=["first","second","third","fourth","fifth","sixth"];function $(n,e,t){function i(){return typeof n=="object"?[{demanded:[],optional:[]},n,e]:[Je(`cmd ${n}`),e,t]}try{let r=0,[o,s,a]=i(),f=[].slice.call(s);for(;f.length&&f[f.length-1]===void 0;)f.pop();let D=a||f.length;if(D<o.demanded.length)throw new Y(`Not enough arguments provided. Expected ${o.demanded.length} but received ${f.length}.`);let h=o.demanded.length+o.optional.length;if(D>h)throw new Y(`Too many arguments provided. Expected max ${h} but received ${D}.`);o.demanded.forEach(c=>{let p=f.shift(),C=ho(p);c.cmd.filter(b=>b===C||b==="*").length===0&&po(C,c.cmd,r),r+=1}),o.optional.forEach(c=>{if(f.length===0)return;let p=f.shift(),C=ho(p);c.cmd.filter(b=>b===C||b==="*").length===0&&po(C,c.cmd,r),r+=1})}catch(r){console.warn(r.stack)}}function ho(n){return Array.isArray(n)?"array":n===null?"null":typeof n}function po(n,e,t){throw new Y(`Invalid ${Qa[t]||"manyith"} argument. Expected ${e.join(" or ")} but received ${n}.`)}var vn=class{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,t,i=!0,r=!1){if($("<array|function> [boolean] [boolean] [boolean]",[e,t,i],arguments.length),Array.isArray(e)){for(let o=0;o<e.length;o++){if(typeof e[o]!="function")throw Error("middleware must be a function");let s=e[o];s.applyBeforeValidation=t,s.global=i}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e=="function"){let o=e;o.applyBeforeValidation=t,o.global=i,o.mutates=r,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,t){let i=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(r=>{let o=[...i[t]||[],t];return r.option?!o.includes(r.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 mo(n){return n?n.map(e=>(e.applyBeforeValidation=!1,e)):[]}function ut(n,e,t,i){return t.reduce((r,o)=>{if(o.applyBeforeValidation!==i)return r;if(o.mutates){if(o.applied)return r;o.applied=!0}if(J(r))return r.then(s=>Promise.all([s,o(s,e)])).then(([s,a])=>Object.assign(s,a));{let s=o(r,e);return J(s)?s.then(a=>Object.assign(r,a)):Object.assign(r,s)}},n)}function at(n,e,t=i=>{throw i}){try{let i=Za(n)?n():n;return J(i)?i.then(r=>e(r)):e(i)}catch(i){return t(i)}}function Za(n){return typeof n=="function"}function Ni(n){if(typeof require>"u")return null;for(let e=0,t=Object.keys(require.cache),i;e<t.length;e++)if(i=require.cache[t[e]],i.exports===n)return i;return null}var Pt=/(^\*)|(^\$0)/,Wi=class{constructor(e,t,i,r){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=r,this.usage=e,this.globalMiddleware=i,this.validation=t}addDirectory(e,t,i,r){r=r||{},typeof r.recurse!="boolean"&&(r.recurse=!1),Array.isArray(r.extensions)||(r.extensions=["js"]);let o=typeof r.visit=="function"?r.visit:s=>s;r.visit=(s,a,f)=>{let D=o(s,a,f);if(D){if(this.requireCache.has(a))return D;this.requireCache.add(a),this.addHandler(D)}return D},this.shim.requireDirectory({require:t,filename:i},e,r)}addHandler(e,t,i,r,o,s){let a=[],f=mo(o);if(r=r||(()=>{}),Array.isArray(e))if(Xa(e))[e,...a]=e;else for(let D of e)this.addHandler(D);else if(tc(e)){let D=Array.isArray(e.command)||typeof e.command=="string"?e.command:this.moduleName(e);e.aliases&&(D=[].concat(D).concat(e.aliases)),this.addHandler(D,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(go(i)){this.addHandler([e].concat(a),t,i.builder,i.handler,i.middlewares,i.deprecated);return}if(typeof e=="string"){let D=Je(e);a=a.map(p=>Je(p).cmd);let h=!1,c=[D.cmd].concat(a).filter(p=>Pt.test(p)?(h=!0,!1):!0);c.length===0&&h&&c.push("$0"),h&&(D.cmd=c[0],a=c.slice(1),e=e.replace(Pt,D.cmd)),a.forEach(p=>{this.aliasMap[p]=D.cmd}),t!==!1&&this.usage.command(e,t,h,a,s),this.handlers[D.cmd]={original:e,description:t,handler:r,builder:i||{},middlewares:f,deprecated:s,demanded:D.demanded,optional:D.optional},h&&(this.defaultCommand=this.handlers[D.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,t,i,r,o,s){let a=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,f=t.getInternalMethods().getContext(),D=f.commands.slice(),h=!e;e&&(f.commands.push(e),f.fullCommands.push(a.original));let c=this.applyBuilderUpdateUsageAndParse(h,a,t,i.aliases,D,r,o,s);return J(c)?c.then(p=>this.applyMiddlewareAndGetResult(h,a,p.innerArgv,f,o,p.aliases,t)):this.applyMiddlewareAndGetResult(h,a,c.innerArgv,f,o,c.aliases,t)}applyBuilderUpdateUsageAndParse(e,t,i,r,o,s,a,f){let D=t.builder,h=i;if(Bn(D)){i.getInternalMethods().getUsageInstance().freeze();let c=D(i.getInternalMethods().reset(r),f);if(J(c))return c.then(p=>(h=Fo(p)?p:i,this.parseAndUpdateUsage(e,t,h,o,s,a)))}else ec(D)&&(i.getInternalMethods().getUsageInstance().freeze(),h=i.getInternalMethods().reset(r),Object.keys(t.builder).forEach(c=>{h.option(c,D[c])}));return this.parseAndUpdateUsage(e,t,h,o,s,a)}parseAndUpdateUsage(e,t,i,r,o,s){e&&i.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(i)&&i.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(r,t),t.description);let a=i.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,o,s);return J(a)?a.then(f=>({aliases:i.parsed.aliases,innerArgv:f})):{aliases:i.parsed.aliases,innerArgv:a}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,t){let i=Pt.test(t.original)?t.original.replace(Pt,"").trim():t.original,r=e.filter(o=>!Pt.test(o));return r.push(i),`$0 ${r.join(" ")}`}handleValidationAndGetResult(e,t,i,r,o,s,a,f){if(!s.getInternalMethods().getHasOutput()){let D=s.getInternalMethods().runValidation(o,f,s.parsed.error,e);i=at(i,h=>(D(h),h))}if(t.handler&&!s.getInternalMethods().getHasOutput()){s.getInternalMethods().setHasOutput();let D=!!s.getOptions().configuration["populate--"];s.getInternalMethods().postProcess(i,D,!1,!1),i=ut(i,s,a,!1),i=at(i,h=>{let c=t.handler(h);return J(c)?c.then(()=>h):h}),e||s.getInternalMethods().getUsageInstance().cacheHelpMessage(),J(i)&&!s.getInternalMethods().hasParseCallback()&&i.catch(h=>{try{s.getInternalMethods().getUsageInstance().fail(null,h)}catch{}})}return e||(r.commands.pop(),r.fullCommands.pop()),i}applyMiddlewareAndGetResult(e,t,i,r,o,s,a){let f={};if(o)return i;a.getInternalMethods().getHasOutput()||(f=this.populatePositionals(t,i,r,a));let D=this.globalMiddleware.getMiddleware().slice(0).concat(t.middlewares),h=ut(i,a,D,!0);return J(h)?h.then(c=>this.handleValidationAndGetResult(e,t,c,r,s,a,D,f)):this.handleValidationAndGetResult(e,t,h,r,s,a,D,f)}populatePositionals(e,t,i,r){t._=t._.slice(i.commands.length);let o=e.demanded.slice(0),s=e.optional.slice(0),a={};for(this.validation.positionalCount(o.length,t._.length);o.length;){let f=o.shift();this.populatePositional(f,t,a)}for(;s.length;){let f=s.shift();this.populatePositional(f,t,a)}return t._=i.commands.concat(t._.map(f=>""+f)),this.postProcessPositionals(t,a,this.cmdToParseOptions(e.original),r),a}populatePositional(e,t,i){let r=e.cmd[0];e.variadic?i[r]=t._.splice(0).map(String):t._.length&&(i[r]=[String(t._.shift())])}cmdToParseOptions(e){let t={array:[],default:{},alias:{},demand:{}},i=Je(e);return i.demanded.forEach(r=>{let[o,...s]=r.cmd;r.variadic&&(t.array.push(o),t.default[o]=[]),t.alias[o]=s,t.demand[o]=!0}),i.optional.forEach(r=>{let[o,...s]=r.cmd;r.variadic&&(t.array.push(o),t.default[o]=[]),t.alias[o]=s}),t}postProcessPositionals(e,t,i,r){let o=Object.assign({},r.getOptions());o.default=Object.assign(i.default,o.default);for(let D of Object.keys(i.alias))o.alias[D]=(o.alias[D]||[]).concat(i.alias[D]);o.array=o.array.concat(i.array),o.config={};let s=[];if(Object.keys(t).forEach(D=>{t[D].map(h=>{o.configuration["unknown-options-as-args"]&&(o.key[D]=!0),s.push(`--${D}`),s.push(h)})}),!s.length)return;let a=Object.assign({},o.configuration,{"populate--":!1}),f=this.shim.Parser.detailed(s,Object.assign({},o,{configuration:a}));if(f.error)r.getInternalMethods().getUsageInstance().fail(f.error.message,f.error);else{let D=Object.keys(t);Object.keys(t).forEach(h=>{D.push(...f.aliases[h])}),Object.keys(f.argv).forEach(h=>{D.includes(h)&&(t[h]||(t[h]=f.argv[h]),!this.isInConfigs(r,h)&&!this.isDefaulted(r,h)&&Object.prototype.hasOwnProperty.call(e,h)&&Object.prototype.hasOwnProperty.call(f.argv,h)&&(Array.isArray(e[h])||Array.isArray(f.argv[h]))?e[h]=[].concat(e[h],f.argv[h]):e[h]=f.argv[h])})}}isDefaulted(e,t){let{default:i}=e.getOptions();return Object.prototype.hasOwnProperty.call(i,t)||Object.prototype.hasOwnProperty.call(i,this.shim.Parser.camelCase(t))}isInConfigs(e,t){let{configObjects:i}=e.getOptions();return i.some(r=>Object.prototype.hasOwnProperty.call(r,t))||i.some(r=>Object.prototype.hasOwnProperty.call(r,this.shim.Parser.camelCase(t)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){let i=Pt.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(i,this.defaultCommand.description)}let t=this.defaultCommand.builder;if(Bn(t))return t(e,!0);go(t)||Object.keys(t).forEach(i=>{e.option(i,t[i])})}moduleName(e){let t=Ni(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:i}){for(let r of[e,t,i]){if(typeof r=="string"||r===!1)return r;Ce(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();Ce(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 Co(n,e,t,i){return new Wi(n,e,t,i)}function go(n){return typeof n=="object"&&!!n.builder&&typeof n.handler=="function"}function Xa(n){return n.every(e=>typeof e=="string")}function Bn(n){return typeof n=="function"}function ec(n){return typeof n=="object"}function tc(n){return typeof n=="object"&&!Array.isArray(n)}function Ke(n={},e=()=>!0){let t={};return It(n).forEach(i=>{e(i,n[i])&&(t[i]=n[i])}),t}function Qe(n){typeof process>"u"||[process.stdout,process.stderr].forEach(e=>{let t=e;t._handle&&t.isTTY&&typeof t._handle.setBlocking=="function"&&t._handle.setBlocking(n)})}function nc(n){return typeof n=="boolean"}function Eo(n,e){let t=e.y18n.__,i={},r=[];i.failFn=function(x){r.push(x)};let o=null,s=null,a=!0;i.showHelpOnFail=function(x=!0,O){let[R,q]=typeof x=="string"?[!0,x]:[x,O];return n.getInternalMethods().isGlobalContext()&&(s=q),o=q,a=R,i};let f=!1;i.fail=function(x,O){let R=n.getInternalMethods().getLoggerInstance();if(r.length)for(let q=r.length-1;q>=0;--q){let ce=r[q];if(nc(ce)){if(O)throw O;if(x)throw Error(x)}else ce(x,O,i)}else{if(n.getExitProcess()&&Qe(!0),!f){f=!0,a&&(n.showHelp("error"),R.error()),(x||O)&&R.error(x||O);let q=o||s;q&&((x||O)&&R.error(""),R.error(q))}if(O=O||new Y(x),n.getExitProcess())return n.exit(1);if(n.getInternalMethods().hasParseCallback())return n.exit(1,O);throw O}};let D=[],h=!1;i.usage=(S,x)=>S===null?(h=!0,D=[],i):(h=!1,D.push([S,x||""]),i),i.getUsage=()=>D,i.getUsageDisabled=()=>h,i.getPositionalGroupName=()=>t("Positionals:");let c=[];i.example=(S,x)=>{c.push([S,x||""])};let p=[];i.command=function(x,O,R,q,ce=!1){R&&(p=p.map(z=>(z[2]=!1,z))),p.push([x,O||"",R,q,ce])},i.getCommands=()=>p;let C={};i.describe=function(x,O){Array.isArray(x)?x.forEach(R=>{i.describe(R,O)}):typeof x=="object"?Object.keys(x).forEach(R=>{i.describe(R,x[R])}):C[x]=O},i.getDescriptions=()=>C;let E=[];i.epilog=S=>{E.push(S)};let b=!1,g;i.wrap=S=>{b=!0,g=S},i.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(b||(g=Ft(),b=!0),g);let B="__yargsString__:";i.deferY18nLookup=S=>B+S,i.help=function(){if(k)return k;U();let x=n.customScriptName?n.$0:e.path.basename(n.$0),O=n.getDemandedOptions(),R=n.getDemandedCommands(),q=n.getDeprecatedOptions(),ce=n.getGroups(),z=n.getOptions(),le=[];le=le.concat(Object.keys(C)),le=le.concat(Object.keys(O)),le=le.concat(Object.keys(R)),le=le.concat(Object.keys(z.default)),le=le.filter(Ue),le=Object.keys(le.reduce((P,K)=>(K!=="_"&&(P[K]=!0),P),{}));let nt=i.getWrap(),Z=e.cliui({width:nt,wrap:!!nt});if(!h){if(D.length)D.forEach(P=>{Z.div({text:`${P[0].replace(/\$0/g,x)}`}),P[1]&&Z.div({text:`${P[1]}`,padding:[1,0,0,0]})}),Z.div();else if(p.length){let P=null;R._?P=`${x} <${t("command")}>
|
|
106
|
-
`:
|
|
107
|
-
`,
|
|
108
|
-
`);
|
|
109
|
-
`)}return
|
|
111
|
+
`),o.border&&(r.unshift("."+"-".repeat(this.negatePadding(o)+2)+"."),r.push("'"+"-".repeat(this.negatePadding(o)+2)+"'")),o.padding&&(r.unshift(...new Array(o.padding[ah]||0).fill("")),r.push(...new Array(o.padding[ch]||0).fill(""))),r.forEach((u,c)=>{t[c]||t.push([]);let h=t[c];for(let p=0;p<i;p++)h[p]===void 0&&h.push("");h.push(u)})}),t}negatePadding(e){let t=e.width||0;return e.padding&&(t-=(e.padding[Os]||0)+(e.padding[$s]||0)),e.border&&(t-=4),t}columnWidths(e){if(!this.wrap)return e.map(i=>i.width||Ne.stringWidth(i.text));let t=e.length,n=this.width,r=e.map(i=>{if(i.width)return t--,n-=i.width,i.width}),o=t?Math.floor(n/t):0;return r.map((i,u)=>i===void 0?Math.max(o,lh(e[u])):i)}};function Bu(s,e,t){return s.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?t:" ":""}function lh(s){let e=s.padding||[],t=1+(e[Os]||0)+(e[$s]||0);return s.border?t+4:t}function hh(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function fh(s,e){s=s.trim();let t=Ne.stringWidth(s);return t<e?" ".repeat(e-t)+s:s}function ph(s,e){s=s.trim();let t=Ne.stringWidth(s);return t>=e?s:" ".repeat(e-t>>1)+s}var Ne;function Su(s,e){return Ne=e,new tr({width:(s==null?void 0:s.width)||hh(),wrap:s==null?void 0:s.wrap})}var ku=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function nr(s){return s.replace(ku,"")}function ju(s,e){let[t,n]=s.match(ku)||["",""];s=nr(s);let r="";for(let o=0;o<s.length;o++)o!==0&&o%e===0&&(r+=`
|
|
112
|
+
`),r+=s.charAt(o);return t&&n&&(r=`${t}${r}${n}`),r}function sr(s){return Su(s,{stringWidth:e=>[...e].length,stripAnsi:nr,wrap:ju})}var un=require("path"),Ts=require("fs");function Mu(s,e){let t=(0,un.resolve)(".",s),n;for((0,Ts.statSync)(t).isDirectory()||(t=(0,un.dirname)(t));;){if(n=e(t,(0,Ts.readdirSync)(t)),n)return(0,un.resolve)(t,n);if(t=(0,un.dirname)(n=t),n===t)break}}var Xu=require("util"),ea=require("fs"),ta=require("url");var Wu=require("util"),Bs=require("path");function Tt(s){if(s!==s.toLowerCase()&&s!==s.toUpperCase()||(s=s.toLowerCase()),s.indexOf("-")===-1&&s.indexOf("_")===-1)return s;{let t="",n=!1,r=s.match(/^-+/);for(let o=r?r[0].length:0;o<s.length;o++){let i=s.charAt(o);n&&(n=!1,i=i.toUpperCase()),o!==0&&(i==="-"||i==="_")?n=!0:i!=="-"&&i!=="_"&&(t+=i)}return t}}function _s(s,e){let t=s.toLowerCase();e=e||"-";let n="";for(let r=0;r<s.length;r++){let o=t.charAt(r),i=s.charAt(r);o!==i&&r>0?n+=`${e}${t.charAt(r)}`:n+=i}return n}function Is(s){return s==null?!1:typeof s=="number"||/^0x[0-9a-f]+$/i.test(s)?!0:/^0[^.]/.test(s)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(s)}function Pu(s){if(Array.isArray(s))return s.map(i=>typeof i!="string"?i+"":i);s=s.trim();let e=0,t=null,n=null,r=null,o=[];for(let i=0;i<s.length;i++){if(t=n,n=s.charAt(i),n===" "&&!r){t!==" "&&e++;continue}n===r?r=null:(n==="'"||n==='"')&&!r&&(r=n),o[e]||(o[e]=""),o[e]+=n}return o}var Je;(function(s){s.BOOLEAN="boolean",s.STRING="string",s.NUMBER="number",s.ARRAY="array"})(Je||(Je={}));var rt,Ns=class{constructor(e){rt=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=Pu(e),o=typeof e=="string",i=Dh(Object.assign(Object.create(null),n.alias)),u=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),c=Object.assign(Object.create(null),n.default),h=n.configObjects||[],p=n.envPrefix,l=u["populate--"],d=l?"--":"_",C=Object.create(null),F=Object.create(null),E=n.__||rt.format,D={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},I=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,x=new RegExp("^--"+u["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(f){let g=typeof f=="object"?f.key:f,b=Object.keys(f).map(function(y){return{boolean:"bools",string:"strings",number:"numbers"}[y]}).filter(Boolean).pop();b&&(D[b][g]=!0),D.arrays[g]=!0,D.keys.push(g)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(f){D.bools[f]=!0,D.keys.push(f)}),[].concat(n.string||[]).filter(Boolean).forEach(function(f){D.strings[f]=!0,D.keys.push(f)}),[].concat(n.number||[]).filter(Boolean).forEach(function(f){D.numbers[f]=!0,D.keys.push(f)}),[].concat(n.count||[]).filter(Boolean).forEach(function(f){D.counts[f]=!0,D.keys.push(f)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(f){D.normalize[f]=!0,D.keys.push(f)}),typeof n.narg=="object"&&Object.entries(n.narg).forEach(([f,g])=>{typeof g=="number"&&(D.nargs[f]=g,D.keys.push(f))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([f,g])=>{typeof g=="function"&&(D.coercions[f]=g,D.keys.push(f))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(f){D.configs[f]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([f,g])=>{(typeof g=="boolean"||typeof g=="function")&&(D.configs[f]=g)})),bt(n.key,i,n.default,D.arrays),Object.keys(c).forEach(function(f){(D.aliases[f]||[]).forEach(function(g){c[g]=c[f]})});let B=null;On();let w=[],R=Object.assign(Object.create(null),{_:[]}),X={};for(let f=0;f<r.length;f++){let g=r[f],b=g.replace(/^-{3,}/,"---"),y,m,N,$,j,me;if(g!=="--"&&/^-/.test(g)&&re(g))z(g);else if(b.match(/^---+(=|$)/)){z(g);continue}else if(g.match(/^--.+=/)||!u["short-option-groups"]&&g.match(/^-.+=/))$=g.match(/^--?([^=]+)=([\s\S]*)$/),$!==null&&Array.isArray($)&&$.length>=3&&(P($[1],D.arrays)?f=Ge(f,$[1],r,$[2]):P($[1],D.nargs)!==!1?f=be(f,$[1],r,$[2]):V($[1],$[2],!0));else if(g.match(x)&&u["boolean-negation"])$=g.match(x),$!==null&&Array.isArray($)&&$.length>=2&&(m=$[1],V(m,P(m,D.arrays)?[!1]:!1));else if(g.match(/^--.+/)||!u["short-option-groups"]&&g.match(/^-[^-]+/))$=g.match(/^--?(.+)/),$!==null&&Array.isArray($)&&$.length>=2&&(m=$[1],P(m,D.arrays)?f=Ge(f,m,r):P(m,D.nargs)!==!1?f=be(f,m,r):(j=r[f+1],j!==void 0&&(!j.match(/^-/)||j.match(I))&&!P(m,D.bools)&&!P(m,D.counts)||/^(true|false)$/.test(j)?(V(m,j),f++):V(m,oe(m))));else if(g.match(/^-.\..+=/))$=g.match(/^-([^=]+)=([\s\S]*)$/),$!==null&&Array.isArray($)&&$.length>=3&&V($[1],$[2]);else if(g.match(/^-.\..+/)&&!g.match(I))j=r[f+1],$=g.match(/^-(.\..+)/),$!==null&&Array.isArray($)&&$.length>=2&&(m=$[1],j!==void 0&&!j.match(/^-/)&&!P(m,D.bools)&&!P(m,D.counts)?(V(m,j),f++):V(m,oe(m)));else if(g.match(/^-[^-]+/)&&!g.match(I)){N=g.slice(1,-1).split(""),y=!1;for(let we=0;we<N.length;we++){if(j=g.slice(we+2),N[we+1]&&N[we+1]==="="){me=g.slice(we+3),m=N[we],P(m,D.arrays)?f=Ge(f,m,r,me):P(m,D.nargs)!==!1?f=be(f,m,r,me):V(m,me),y=!0;break}if(j==="-"){V(N[we],j);continue}if(/[A-Za-z]/.test(N[we])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(j)&&P(j,D.bools)===!1){V(N[we],j),y=!0;break}if(N[we+1]&&N[we+1].match(/\W/)){V(N[we],j),y=!0;break}else V(N[we],oe(N[we]))}m=g.slice(-1)[0],!y&&m!=="-"&&(P(m,D.arrays)?f=Ge(f,m,r):P(m,D.nargs)!==!1?f=be(f,m,r):(j=r[f+1],j!==void 0&&(!/^(-|--)[^-]/.test(j)||j.match(I))&&!P(m,D.bools)&&!P(m,D.counts)||/^(true|false)$/.test(j)?(V(m,j),f++):V(m,oe(m))))}else if(g.match(/^-[0-9]$/)&&g.match(I)&&P(g.slice(1),D.bools))m=g.slice(1),V(m,oe(m));else if(g==="--"){w=r.slice(f+1);break}else if(u["halt-at-non-option"]){w=r.slice(f);break}else z(g)}H(R,!0),H(R,!1),W(R),De(),ne(R,D.aliases,c,!0),de(R),u["set-placeholder-key"]&&Ft(R),Object.keys(D.counts).forEach(function(f){nt(R,f.split("."))||V(f,0)}),l&&w.length&&(R[d]=[]),w.forEach(function(f){R[d].push(f)}),u["camel-case-expansion"]&&u["strip-dashed"]&&Object.keys(R).filter(f=>f!=="--"&&f.includes("-")).forEach(f=>{delete R[f]}),u["strip-aliased"]&&[].concat(...Object.keys(i).map(f=>i[f])).forEach(f=>{u["camel-case-expansion"]&&f.includes("-")&&delete R[f.split(".").map(g=>Tt(g)).join(".")],delete R[f]});function z(f){let g=_("_",f);(typeof g=="string"||typeof g=="number")&&R._.push(g)}function be(f,g,b,y){let m,N=P(g,D.nargs);if(N=typeof N!="number"||isNaN(N)?1:N,N===0)return Ue(y)||(B=Error(E("Argument unexpected for: %s",g))),V(g,oe(g)),f;let $=Ue(y)?0:1;if(u["nargs-eats-options"])b.length-(f+1)+$<N&&(B=Error(E("Not enough arguments following: %s",g))),$=N;else{for(m=f+1;m<b.length&&(!b[m].match(/^-[^0-9]/)||b[m].match(I)||re(b[m]));m++)$++;$<N&&(B=Error(E("Not enough arguments following: %s",g)))}let j=Math.min($,N);for(!Ue(y)&&j>0&&(V(g,y),j--),m=f+1;m<j+f+1;m++)V(g,b[m]);return f+j}function Ge(f,g,b,y){let m=[],N=y||b[f+1],$=P(g,D.nargs);if(P(g,D.bools)&&!/^(true|false)$/.test(N))m.push(!0);else if(Ue(N)||Ue(y)&&/^-/.test(N)&&!I.test(N)&&!re(N)){if(c[g]!==void 0){let j=c[g];m=Array.isArray(j)?j:[j]}}else{Ue(y)||m.push(A(g,y,!0));for(let j=f+1;j<b.length&&!(!u["greedy-arrays"]&&m.length>0||$&&typeof $=="number"&&m.length>=$||(N=b[j],/^-/.test(N)&&!I.test(N)&&!re(N)));j++)f=j,m.push(A(g,N,o))}return typeof $=="number"&&($&&m.length<$||isNaN($)&&m.length===0)&&(B=Error(E("Not enough arguments following: %s",g))),V(g,m),f}function V(f,g,b=o){if(/-/.test(f)&&u["camel-case-expansion"]){let N=f.split(".").map(function($){return Tt($)}).join(".");S(f,N)}let y=A(f,g,b),m=f.split(".");st(R,m,y),D.aliases[f]&&D.aliases[f].forEach(function(N){let $=N.split(".");st(R,$,y)}),m.length>1&&u["dot-notation"]&&(D.aliases[m[0]]||[]).forEach(function(N){let $=N.split("."),j=[].concat(m);j.shift(),$=$.concat(j),(D.aliases[f]||[]).includes($.join("."))||st(R,$,y)}),P(f,D.normalize)&&!P(f,D.arrays)&&[f].concat(D.aliases[f]||[]).forEach(function($){Object.defineProperty(X,$,{enumerable:!0,get(){return g},set(j){g=typeof j=="string"?rt.normalize(j):j}})})}function S(f,g){D.aliases[f]&&D.aliases[f].length||(D.aliases[f]=[g],C[g]=!0),D.aliases[g]&&D.aliases[g].length||S(g,f)}function A(f,g,b){b&&(g=dh(g)),(P(f,D.bools)||P(f,D.counts))&&typeof g=="string"&&(g=g==="true");let y=Array.isArray(g)?g.map(function(m){return _(f,m)}):_(f,g);return P(f,D.counts)&&(Ue(y)||typeof y=="boolean")&&(y=ir()),P(f,D.normalize)&&P(f,D.arrays)&&(Array.isArray(g)?y=g.map(m=>rt.normalize(m)):y=rt.normalize(g)),y}function _(f,g){return!u["parse-positional-numbers"]&&f==="_"||!P(f,D.strings)&&!P(f,D.bools)&&!Array.isArray(g)&&(Is(g)&&u["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${g}`)))||!Ue(g)&&P(f,D.numbers))&&(g=Number(g)),g}function W(f){let g=Object.create(null);ne(g,D.aliases,c),Object.keys(D.configs).forEach(function(b){let y=f[b]||g[b];if(y)try{let m=null,N=rt.resolve(rt.cwd(),y),$=D.configs[b];if(typeof $=="function"){try{m=$(N)}catch(j){m=j}if(m instanceof Error){B=m;return}}else m=rt.require(N);U(m)}catch(m){m.name==="PermissionDenied"?B=m:f[b]&&(B=Error(E("Invalid JSON config file: %s",y)))}})}function U(f,g){Object.keys(f).forEach(function(b){let y=f[b],m=g?g+"."+b:b;typeof y=="object"&&y!==null&&!Array.isArray(y)&&u["dot-notation"]?U(y,m):(!nt(R,m.split("."))||P(m,D.arrays)&&u["combine-arrays"])&&V(m,y)})}function De(){typeof h<"u"&&h.forEach(function(f){U(f)})}function H(f,g){if(typeof p>"u")return;let b=typeof p=="string"?p:"",y=rt.env();Object.keys(y).forEach(function(m){if(b===""||m.lastIndexOf(b,0)===0){let N=m.split("__").map(function($,j){return j===0&&($=$.substring(b.length)),Tt($)});(g&&D.configs[N.join(".")]||!g)&&!nt(f,N)&&V(N.join("."),y[m])}})}function de(f){let g,b=new Set;Object.keys(f).forEach(function(y){if(!b.has(y)&&(g=P(y,D.coercions),typeof g=="function"))try{let m=_(y,g(f[y]));[].concat(D.aliases[y]||[],y).forEach(N=>{b.add(N),f[N]=m})}catch(m){B=m}})}function Ft(f){return D.keys.forEach(g=>{~g.indexOf(".")||typeof f[g]>"u"&&(f[g]=void 0)}),f}function ne(f,g,b,y=!1){Object.keys(b).forEach(function(m){nt(f,m.split("."))||(st(f,m.split("."),b[m]),y&&(F[m]=!0),(g[m]||[]).forEach(function(N){nt(f,N.split("."))||st(f,N.split("."),b[m])}))})}function nt(f,g){let b=f;u["dot-notation"]||(g=[g.join(".")]),g.slice(0,-1).forEach(function(m){b=b[m]||{}});let y=g[g.length-1];return typeof b!="object"?!1:y in b}function st(f,g,b){let y=f;u["dot-notation"]||(g=[g.join(".")]),g.slice(0,-1).forEach(function(me){me=Ju(me),typeof y=="object"&&y[me]===void 0&&(y[me]={}),typeof y[me]!="object"||Array.isArray(y[me])?(Array.isArray(y[me])?y[me].push({}):y[me]=[y[me],{}],y=y[me][y[me].length-1]):y=y[me]});let m=Ju(g[g.length-1]),N=P(g.join("."),D.arrays),$=Array.isArray(b),j=u["duplicate-arguments-array"];!j&&P(m,D.nargs)&&(j=!0,(!Ue(y[m])&&D.nargs[m]===1||Array.isArray(y[m])&&y[m].length===D.nargs[m])&&(y[m]=void 0)),b===ir()?y[m]=ir(y[m]):Array.isArray(y[m])?j&&N&&$?y[m]=u["flatten-duplicate-arrays"]?y[m].concat(b):(Array.isArray(y[m][0])?y[m]:[y[m]]).concat([b]):!j&&!!N==!!$?y[m]=b:y[m]=y[m].concat([b]):y[m]===void 0&&N?y[m]=$?b:[b]:j&&!(y[m]===void 0||P(m,D.counts)||P(m,D.bools))?y[m]=[y[m],b]:y[m]=b}function bt(...f){f.forEach(function(g){Object.keys(g||{}).forEach(function(b){D.aliases[b]||(D.aliases[b]=[].concat(i[b]||[]),D.aliases[b].concat(b).forEach(function(y){if(/-/.test(y)&&u["camel-case-expansion"]){let m=Tt(y);m!==b&&D.aliases[b].indexOf(m)===-1&&(D.aliases[b].push(m),C[m]=!0)}}),D.aliases[b].concat(b).forEach(function(y){if(y.length>1&&/[A-Z]/.test(y)&&u["camel-case-expansion"]){let m=_s(y,"-");m!==b&&D.aliases[b].indexOf(m)===-1&&(D.aliases[b].push(m),C[m]=!0)}}),D.aliases[b].forEach(function(y){D.aliases[y]=[b].concat(D.aliases[b].filter(function(m){return y!==m}))}))})})}function P(f,g){let b=[].concat(D.aliases[f]||[],f),y=Object.keys(g),m=b.find(N=>y.includes(N));return m?g[m]:!1}function Ks(f){let g=Object.keys(D);return[].concat(g.map(y=>D[y])).some(function(y){return Array.isArray(y)?y.includes(f):y[f]})}function M(f,...g){return[].concat(...g).some(function(y){let m=f.match(y);return m&&Ks(m[1])})}function ee(f){if(f.match(I)||!f.match(/^-[^-]+/))return!1;let g=!0,b,y=f.slice(1).split("");for(let m=0;m<y.length;m++){if(b=f.slice(m+2),!Ks(y[m])){g=!1;break}if(y[m+1]&&y[m+1]==="="||b==="-"||/[A-Za-z]/.test(y[m])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(b)||y[m+1]&&y[m+1].match(/\W/))break}return g}function re(f){return u["unknown-options-as-args"]&&G(f)}function G(f){return f=f.replace(/^-{3,}/,"--"),f.match(I)||ee(f)?!1:!M(f,/^-+([^=]+?)=[\s\S]*$/,x,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function oe(f){return!P(f,D.bools)&&!P(f,D.counts)&&`${f}`in c?c[f]:le(He(f))}function le(f){return{[Je.BOOLEAN]:!0,[Je.STRING]:"",[Je.NUMBER]:void 0,[Je.ARRAY]:[]}[f]}function He(f){let g=Je.BOOLEAN;return P(f,D.strings)?g=Je.STRING:P(f,D.numbers)?g=Je.NUMBER:P(f,D.bools)?g=Je.BOOLEAN:P(f,D.arrays)&&(g=Je.ARRAY),g}function Ue(f){return f===void 0}function On(){Object.keys(D.counts).find(f=>P(f,D.arrays)?(B=Error(E("Invalid configuration: %s, opts.count excludes opts.array.",f)),!0):P(f,D.nargs)?(B=Error(E("Invalid configuration: %s, opts.count excludes opts.narg.",f)),!0):!1)}return{aliases:Object.assign({},D.aliases),argv:Object.assign(X,R),configuration:u,defaulted:Object.assign({},F),error:B,newAliases:Object.assign({},C)}}};function Dh(s){let e=[],t=Object.create(null),n=!0;for(Object.keys(s).forEach(function(r){e.push([].concat(s[r],r))});n;){n=!1;for(let r=0;r<e.length;r++)for(let o=r+1;o<e.length;o++)if(e[r].filter(function(u){return e[o].indexOf(u)!==-1}).length){e[r]=e[r].concat(e[o]),e.splice(o,1),n=!0;break}}return e.forEach(function(r){r=r.filter(function(i,u,c){return c.indexOf(i)===u});let o=r.pop();o!==void 0&&typeof o=="string"&&(t[o]=r)}),t}function ir(s){return s!==void 0?s+1:1}function Ju(s){return s==="__proto__"?"___proto___":s}function dh(s){return typeof s=="string"&&(s[0]==="'"||s[0]==='"')&&s[s.length-1]===s[0]?s.substring(1,s.length-1):s}var qu=require("fs");var rr,or,ur,Ru=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,Lu=(or=(rr=process==null?void 0:process.versions)===null||rr===void 0?void 0:rr.node)!==null&&or!==void 0?or:(ur=process==null?void 0:process.version)===null||ur===void 0?void 0:ur.slice(1);if(Lu&&Number(Lu.match(/^([^.]+)/)[1])<Ru)throw Error(`yargs parser supports a minimum Node.js version of ${Ru}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var mh=process?process.env:{},Gu=new Ns({cwd:process.cwd,env:()=>mh,format:Wu.format,normalize:Bs.normalize,resolve:Bs.resolve,require:s=>{if(typeof require<"u")return require(s);if(s.match(/\.json$/))return JSON.parse((0,qu.readFileSync)(s,"utf8"));throw Error("only .json config files are supported in ESM")}}),wn=function(e,t){return Gu.parse(e.slice(),t).argv};wn.detailed=function(s,e){return Gu.parse(s.slice(),e)};wn.camelCase=Tt;wn.decamelize=_s;wn.looksLikeNumber=Is;var Hu=wn;var Ze=require("path");function gh(){return Ch()?0:1}function Ch(){return Eh()&&!process.defaultApp}function Eh(){return!!process.versions.electron}function Uu(){return process.argv[gh()]}var Q=class s extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,s)}};var an=require("fs"),Vu=require("util"),zu=require("path"),Yu={fs:{readFileSync:an.readFileSync,writeFile:an.writeFile},format:Vu.format,resolve:zu.resolve,exists:s=>{try{return(0,an.statSync)(s).isFile()}catch{return!1}}};var Qe,ar=class{constructor(e){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=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(),Qe.format.apply(Qe.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(),o=function(){};typeof e[e.length-1]=="function"&&(o=e.pop()),this.cache[this.locale]||this._readLocaleFile();let i=r===1?t:n;this.cache[this.locale][t]&&(i=this.cache[this.locale][t][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:o})):o();let u=[i];return~i.indexOf("%d")&&u.push(r),Qe.format.apply(Qe.format,u.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.cache[this.locale][t]=e[t])}_taggedLiteral(e,...t){let n="";return e.forEach(function(r,o){let i=t[o+1];n+=r,typeof i<"u"&&(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,o=t.cb,i=this._resolveLocaleFile(n,r),u=JSON.stringify(this.cache[r],null,2);Qe.fs.writeFile(i,u,"utf-8",function(c){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),o(c)})}_readLocaleFile(){let e={},t=this._resolveLocaleFile(this.directory,this.locale);try{Qe.fs.readFileSync&&(e=JSON.parse(Qe.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=Qe.resolve(e,"./",t+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~t.lastIndexOf("_")){let r=Qe.resolve(e,"./",t.split("_")[0]+".json");this._fileExistsSync(r)&&(n=r)}return n}_fileExistsSync(e){return Qe.exists(e)}};function Ku(s,e){Qe=e;let t=new ar(s);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}}var yh=s=>Ku(s,Yu),Qu=yh;var wh={},Fh="require is not supported by ESM",Zu="loading a directory of commands is not supported yet for ESM",xn;try{xn=(0,ta.fileURLToPath)(wh.url)}catch{xn=process.cwd()}var bh=xn.substring(0,xn.lastIndexOf("node_modules")),na={assert:{notStrictEqual:Ss.notStrictEqual,strictEqual:Ss.strictEqual},cliui:sr,findUp:Mu,getEnv:s=>process.env[s],inspect:Xu.inspect,getCallerFile:()=>{throw new Q(Zu)},getProcessArgvBin:Uu,mainFilename:bh||process.cwd(),Parser:Hu,path:{basename:Ze.basename,dirname:Ze.dirname,extname:Ze.extname,relative:Ze.relative,resolve:Ze.resolve},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(s,e)=>process.emitWarning(s,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:ea.readFileSync,require:()=>{throw new Q(Fh)},requireDirectory:()=>{throw new Q(Zu)},stringWidth:s=>[...s].length,y18n:Qu({directory:(0,Ze.resolve)(xn,"../../../locales"),updateFiles:!1})};function $e(s,e,t,n){t.assert.notStrictEqual(s,e,n)}function cr(s,e){e.assert.strictEqual(typeof s,"string")}function cn(s){return Object.keys(s)}function Z(s){return!!s&&!!s.then&&typeof s.then=="function"}function dt(s){let t=s.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,r=t.shift();if(!r)throw new Error(`No command found in: ${s}`);let o={cmd:r.replace(n,""),demanded:[],optional:[]};return t.forEach((i,u)=>{let c=!1;i=i.replace(/\s/g,""),/\.+[\]>]/.test(i)&&u===t.length-1&&(c=!0),/^\[/.test(i)?o.optional.push({cmd:i.replace(n,"").split("|"),variadic:c}):o.demanded.push({cmd:i.replace(n,"").split("|"),variadic:c})}),o}var xh=["first","second","third","fourth","fifth","sixth"];function O(s,e,t){function n(){return typeof s=="object"?[{demanded:[],optional:[]},s,e]:[dt(`cmd ${s}`),e,t]}try{let r=0,[o,i,u]=n(),c=[].slice.call(i);for(;c.length&&c[c.length-1]===void 0;)c.pop();let h=u||c.length;if(h<o.demanded.length)throw new Q(`Not enough arguments provided. Expected ${o.demanded.length} but received ${c.length}.`);let p=o.demanded.length+o.optional.length;if(h>p)throw new Q(`Too many arguments provided. Expected max ${p} but received ${h}.`);o.demanded.forEach(l=>{let d=c.shift(),C=sa(d);l.cmd.filter(E=>E===C||E==="*").length===0&&ia(C,l.cmd,r),r+=1}),o.optional.forEach(l=>{if(c.length===0)return;let d=c.shift(),C=sa(d);l.cmd.filter(E=>E===C||E==="*").length===0&&ia(C,l.cmd,r),r+=1})}catch(r){console.warn(r.stack)}}function sa(s){return Array.isArray(s)?"array":s===null?"null":typeof s}function ia(s,e,t){throw new Q(`Invalid ${xh[t]||"manyith"} argument. Expected ${e.join(" or ")} but received ${s}.`)}var ks=class{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,t,n=!0,r=!1){if(O("<array|function> [boolean] [boolean] [boolean]",[e,t,n],arguments.length),Array.isArray(e)){for(let o=0;o<e.length;o++){if(typeof e[o]!="function")throw Error("middleware must be a function");let i=e[o];i.applyBeforeValidation=t,i.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e=="function"){let o=e;o.applyBeforeValidation=t,o.global=n,o.mutates=r,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,t){let n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(r=>{let o=[...n[t]||[],t];return r.option?!o.includes(r.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 ra(s){return s?s.map(e=>(e.applyBeforeValidation=!1,e)):[]}function _t(s,e,t,n){return t.reduce((r,o)=>{if(o.applyBeforeValidation!==n)return r;if(o.mutates){if(o.applied)return r;o.applied=!0}if(Z(r))return r.then(i=>Promise.all([i,o(i,e)])).then(([i,u])=>Object.assign(i,u));{let i=o(r,e);return Z(i)?i.then(u=>Object.assign(r,u)):Object.assign(r,i)}},s)}function It(s,e,t=n=>{throw n}){try{let n=vh(s)?s():s;return Z(n)?n.then(r=>e(r)):e(n)}catch(n){return t(n)}}function vh(s){return typeof s=="function"}function lr(s){if(typeof require>"u")return null;for(let e=0,t=Object.keys(require.cache),n;e<t.length;e++)if(n=require.cache[t[e]],n.exports===s)return n;return null}var ln=/(^\*)|(^\$0)/,hr=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=r||{},typeof r.recurse!="boolean"&&(r.recurse=!1),Array.isArray(r.extensions)||(r.extensions=["js"]);let o=typeof r.visit=="function"?r.visit:i=>i;r.visit=(i,u,c)=>{let h=o(i,u,c);if(h){if(this.requireCache.has(u))return h;this.requireCache.add(u),this.addHandler(h)}return h},this.shim.requireDirectory({require:t,filename:n},e,r)}addHandler(e,t,n,r,o,i){let u=[],c=ra(o);if(r=r||(()=>{}),Array.isArray(e))if(Ah(e))[e,...u]=e;else for(let h of e)this.addHandler(h);else if(Oh(e)){let h=Array.isArray(e.command)||typeof e.command=="string"?e.command:this.moduleName(e);e.aliases&&(h=[].concat(h).concat(e.aliases)),this.addHandler(h,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(oa(n)){this.addHandler([e].concat(u),t,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e=="string"){let h=dt(e);u=u.map(d=>dt(d).cmd);let p=!1,l=[h.cmd].concat(u).filter(d=>ln.test(d)?(p=!0,!1):!0);l.length===0&&p&&l.push("$0"),p&&(h.cmd=l[0],u=l.slice(1),e=e.replace(ln,h.cmd)),u.forEach(d=>{this.aliasMap[d]=h.cmd}),t!==!1&&this.usage.command(e,t,p,u,i),this.handlers[h.cmd]={original:e,description:t,handler:r,builder:n||{},middlewares:c,deprecated:i,demanded:h.demanded,optional:h.optional},p&&(this.defaultCommand=this.handlers[h.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,t,n,r,o,i){let u=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,c=t.getInternalMethods().getContext(),h=c.commands.slice(),p=!e;e&&(c.commands.push(e),c.fullCommands.push(u.original));let l=this.applyBuilderUpdateUsageAndParse(p,u,t,n.aliases,h,r,o,i);return Z(l)?l.then(d=>this.applyMiddlewareAndGetResult(p,u,d.innerArgv,c,o,d.aliases,t)):this.applyMiddlewareAndGetResult(p,u,l.innerArgv,c,o,l.aliases,t)}applyBuilderUpdateUsageAndParse(e,t,n,r,o,i,u,c){let h=t.builder,p=n;if(js(h)){n.getInternalMethods().getUsageInstance().freeze();let l=h(n.getInternalMethods().reset(r),c);if(Z(l))return l.then(d=>(p=aa(d)?d:n,this.parseAndUpdateUsage(e,t,p,o,i,u)))}else $h(h)&&(n.getInternalMethods().getUsageInstance().freeze(),p=n.getInternalMethods().reset(r),Object.keys(t.builder).forEach(l=>{p.option(l,h[l])}));return this.parseAndUpdateUsage(e,t,p,o,i,u)}parseAndUpdateUsage(e,t,n,r,o,i){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(r,t),t.description);let u=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,o,i);return Z(u)?u.then(c=>({aliases:n.parsed.aliases,innerArgv:c})):{aliases:n.parsed.aliases,innerArgv:u}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,t){let n=ln.test(t.original)?t.original.replace(ln,"").trim():t.original,r=e.filter(o=>!ln.test(o));return r.push(n),`$0 ${r.join(" ")}`}handleValidationAndGetResult(e,t,n,r,o,i,u,c){if(!i.getInternalMethods().getHasOutput()){let h=i.getInternalMethods().runValidation(o,c,i.parsed.error,e);n=It(n,p=>(h(p),p))}if(t.handler&&!i.getInternalMethods().getHasOutput()){i.getInternalMethods().setHasOutput();let h=!!i.getOptions().configuration["populate--"];i.getInternalMethods().postProcess(n,h,!1,!1),n=_t(n,i,u,!1),n=It(n,p=>{let l=t.handler(p);return Z(l)?l.then(()=>p):p}),e||i.getInternalMethods().getUsageInstance().cacheHelpMessage(),Z(n)&&!i.getInternalMethods().hasParseCallback()&&n.catch(p=>{try{i.getInternalMethods().getUsageInstance().fail(null,p)}catch{}})}return e||(r.commands.pop(),r.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,t,n,r,o,i,u){let c={};if(o)return n;u.getInternalMethods().getHasOutput()||(c=this.populatePositionals(t,n,r,u));let h=this.globalMiddleware.getMiddleware().slice(0).concat(t.middlewares),p=_t(n,u,h,!0);return Z(p)?p.then(l=>this.handleValidationAndGetResult(e,t,l,r,i,u,h,c)):this.handleValidationAndGetResult(e,t,p,r,i,u,h,c)}populatePositionals(e,t,n,r){t._=t._.slice(n.commands.length);let o=e.demanded.slice(0),i=e.optional.slice(0),u={};for(this.validation.positionalCount(o.length,t._.length);o.length;){let c=o.shift();this.populatePositional(c,t,u)}for(;i.length;){let c=i.shift();this.populatePositional(c,t,u)}return t._=n.commands.concat(t._.map(c=>""+c)),this.postProcessPositionals(t,u,this.cmdToParseOptions(e.original),r),u}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=dt(e);return n.demanded.forEach(r=>{let[o,...i]=r.cmd;r.variadic&&(t.array.push(o),t.default[o]=[]),t.alias[o]=i,t.demand[o]=!0}),n.optional.forEach(r=>{let[o,...i]=r.cmd;r.variadic&&(t.array.push(o),t.default[o]=[]),t.alias[o]=i}),t}postProcessPositionals(e,t,n,r){let o=Object.assign({},r.getOptions());o.default=Object.assign(n.default,o.default);for(let h of Object.keys(n.alias))o.alias[h]=(o.alias[h]||[]).concat(n.alias[h]);o.array=o.array.concat(n.array),o.config={};let i=[];if(Object.keys(t).forEach(h=>{t[h].map(p=>{o.configuration["unknown-options-as-args"]&&(o.key[h]=!0),i.push(`--${h}`),i.push(p)})}),!i.length)return;let u=Object.assign({},o.configuration,{"populate--":!1}),c=this.shim.Parser.detailed(i,Object.assign({},o,{configuration:u}));if(c.error)r.getInternalMethods().getUsageInstance().fail(c.error.message,c.error);else{let h=Object.keys(t);Object.keys(t).forEach(p=>{h.push(...c.aliases[p])}),Object.keys(c.argv).forEach(p=>{h.includes(p)&&(t[p]||(t[p]=c.argv[p]),!this.isInConfigs(r,p)&&!this.isDefaulted(r,p)&&Object.prototype.hasOwnProperty.call(e,p)&&Object.prototype.hasOwnProperty.call(c.argv,p)&&(Array.isArray(e[p])||Array.isArray(c.argv[p]))?e[p]=[].concat(e[p],c.argv[p]):e[p]=c.argv[p])})}}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(r=>Object.prototype.hasOwnProperty.call(r,t))||n.some(r=>Object.prototype.hasOwnProperty.call(r,this.shim.Parser.camelCase(t)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){let n=ln.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(n,this.defaultCommand.description)}let t=this.defaultCommand.builder;if(js(t))return t(e,!0);oa(t)||Object.keys(t).forEach(n=>{e.option(n,t[n])})}moduleName(e){let t=lr(e);if(!t)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(t.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:t,desc:n}){for(let r of[e,t,n]){if(typeof r=="string"||r===!1)return r;$e(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();$e(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 ua(s,e,t,n){return new hr(s,e,t,n)}function oa(s){return typeof s=="object"&&!!s.builder&&typeof s.handler=="function"}function Ah(s){return s.every(e=>typeof e=="string")}function js(s){return typeof s=="function"}function $h(s){return typeof s=="object"}function Oh(s){return typeof s=="object"&&!Array.isArray(s)}function mt(s={},e=()=>!0){let t={};return cn(s).forEach(n=>{e(n,s[n])&&(t[n]=s[n])}),t}function gt(s){typeof process>"u"||[process.stdout,process.stderr].forEach(e=>{let t=e;t._handle&&t.isTTY&&typeof t._handle.setBlocking=="function"&&t._handle.setBlocking(s)})}function Th(s){return typeof s=="boolean"}function la(s,e){let t=e.y18n.__,n={},r=[];n.failFn=function(A){r.push(A)};let o=null,i=null,u=!0;n.showHelpOnFail=function(A=!0,_){let[W,U]=typeof A=="string"?[!0,A]:[A,_];return s.getInternalMethods().isGlobalContext()&&(i=U),o=U,u=W,n};let c=!1;n.fail=function(A,_){let W=s.getInternalMethods().getLoggerInstance();if(r.length)for(let U=r.length-1;U>=0;--U){let De=r[U];if(Th(De)){if(_)throw _;if(A)throw Error(A)}else De(A,_,n)}else{if(s.getExitProcess()&>(!0),!c){c=!0,u&&(s.showHelp("error"),W.error()),(A||_)&&W.error(A||_);let U=o||i;U&&((A||_)&&W.error(""),W.error(U))}if(_=_||new Q(A),s.getExitProcess())return s.exit(1);if(s.getInternalMethods().hasParseCallback())return s.exit(1,_);throw _}};let h=[],p=!1;n.usage=(S,A)=>S===null?(p=!0,h=[],n):(p=!1,h.push([S,A||""]),n),n.getUsage=()=>h,n.getUsageDisabled=()=>p,n.getPositionalGroupName=()=>t("Positionals:");let l=[];n.example=(S,A)=>{l.push([S,A||""])};let d=[];n.command=function(A,_,W,U,De=!1){W&&(d=d.map(H=>(H[2]=!1,H))),d.push([A,_||"",W,U,De])},n.getCommands=()=>d;let C={};n.describe=function(A,_){Array.isArray(A)?A.forEach(W=>{n.describe(W,_)}):typeof A=="object"?Object.keys(A).forEach(W=>{n.describe(W,A[W])}):C[A]=_},n.getDescriptions=()=>C;let F=[];n.epilog=S=>{F.push(S)};let E=!1,D;n.wrap=S=>{E=!0,D=S},n.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(E||(D=be(),E=!0),D);let I="__yargsString__:";n.deferY18nLookup=S=>I+S,n.help=function(){if(w)return w;B();let A=s.customScriptName?s.$0:e.path.basename(s.$0),_=s.getDemandedOptions(),W=s.getDemandedCommands(),U=s.getDeprecatedOptions(),De=s.getGroups(),H=s.getOptions(),de=[];de=de.concat(Object.keys(C)),de=de.concat(Object.keys(_)),de=de.concat(Object.keys(W)),de=de.concat(Object.keys(H.default)),de=de.filter(X),de=Object.keys(de.reduce((M,ee)=>(ee!=="_"&&(M[ee]=!0),M),{}));let Ft=n.getWrap(),ne=e.cliui({width:Ft,wrap:!!Ft});if(!p){if(h.length)h.forEach(M=>{ne.div({text:`${M[0].replace(/\$0/g,A)}`}),M[1]&&ne.div({text:`${M[1]}`,padding:[1,0,0,0]})}),ne.div();else if(d.length){let M=null;W._?M=`${A} <${t("command")}>
|
|
113
|
+
`:M=`${A} [${t("command")}]
|
|
114
|
+
`,ne.div(`${M}`)}}if(d.length>1||d.length===1&&!d[0][2]){ne.div(t("Commands:"));let M=s.getInternalMethods().getContext(),ee=M.commands.length?`${M.commands.join(" ")} `:"";s.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(d=d.sort((G,oe)=>G[0].localeCompare(oe[0])));let re=A?`${A} `:"";d.forEach(G=>{let oe=`${re}${ee}${G[0].replace(/^\$0 ?/,"")}`;ne.span({text:oe,padding:[0,2,0,2],width:x(d,Ft,`${A}${ee}`)+4},{text:G[1]});let le=[];G[2]&&le.push(`[${t("default")}]`),G[3]&&G[3].length&&le.push(`[${t("aliases:")} ${G[3].join(", ")}]`),G[4]&&(typeof G[4]=="string"?le.push(`[${t("deprecated: %s",G[4])}]`):le.push(`[${t("deprecated")}]`)),le.length?ne.div({text:le.join(" "),padding:[0,0,0,2],align:"right"}):ne.div()}),ne.div()}let nt=(Object.keys(H.alias)||[]).concat(Object.keys(s.parsed.newAliases)||[]);de=de.filter(M=>!s.parsed.newAliases[M]&&nt.every(ee=>(H.alias[ee]||[]).indexOf(M)===-1));let st=t("Options:");De[st]||(De[st]=[]),R(de,H.alias,De,st);let bt=M=>/^--/.test(Ms(M)),P=Object.keys(De).filter(M=>De[M].length>0).map(M=>{let ee=De[M].filter(X).map(re=>{if(nt.includes(re))return re;for(let G=0,oe;(oe=nt[G])!==void 0;G++)if((H.alias[oe]||[]).includes(re))return oe;return re});return{groupName:M,normalizedKeys:ee}}).filter(({normalizedKeys:M})=>M.length>0).map(({groupName:M,normalizedKeys:ee})=>{let re=ee.reduce((G,oe)=>(G[oe]=[oe].concat(H.alias[oe]||[]).map(le=>M===n.getPositionalGroupName()?le:(/^[0-9]$/.test(le)?H.boolean.includes(oe)?"-":"--":le.length>1?"--":"-")+le).sort((le,He)=>bt(le)===bt(He)?0:bt(le)?1:-1).join(", "),G),{});return{groupName:M,normalizedKeys:ee,switches:re}});if(P.filter(({groupName:M})=>M!==n.getPositionalGroupName()).some(({normalizedKeys:M,switches:ee})=>!M.every(re=>bt(ee[re])))&&P.filter(({groupName:M})=>M!==n.getPositionalGroupName()).forEach(({normalizedKeys:M,switches:ee})=>{M.forEach(re=>{bt(ee[re])&&(ee[re]=_h(ee[re],4))})}),P.forEach(({groupName:M,normalizedKeys:ee,switches:re})=>{ne.div(M),ee.forEach(G=>{let oe=re[G],le=C[G]||"",He=null;le.includes(I)&&(le=t(le.substring(I.length))),H.boolean.includes(G)&&(He=`[${t("boolean")}]`),H.count.includes(G)&&(He=`[${t("count")}]`),H.string.includes(G)&&(He=`[${t("string")}]`),H.normalize.includes(G)&&(He=`[${t("string")}]`),H.array.includes(G)&&(He=`[${t("array")}]`),H.number.includes(G)&&(He=`[${t("number")}]`);let Ue=g=>typeof g=="string"?`[${t("deprecated: %s",g)}]`:`[${t("deprecated")}]`,On=[G in U?Ue(U[G]):null,He,G in _?`[${t("required")}]`:null,H.choices&&H.choices[G]?`[${t("choices:")} ${n.stringifiedValues(H.choices[G])}]`:null,z(H.default[G],H.defaultDescription[G])].filter(Boolean).join(" ");ne.span({text:Ms(oe),padding:[0,2,0,2+ca(oe)],width:x(re,Ft)+4},le);let f=s.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;On&&!f?ne.div({text:On,padding:[0,0,0,2],align:"right"}):ne.div()}),ne.div()}),l.length&&(ne.div(t("Examples:")),l.forEach(M=>{M[0]=M[0].replace(/\$0/g,A)}),l.forEach(M=>{M[1]===""?ne.div({text:M[0],padding:[0,2,0,2]}):ne.div({text:M[0],padding:[0,2,0,2],width:x(l,Ft)+4},{text:M[1]})}),ne.div()),F.length>0){let M=F.map(ee=>ee.replace(/\$0/g,A)).join(`
|
|
115
|
+
`);ne.div(`${M}
|
|
116
|
+
`)}return ne.toString().replace(/\s*$/,"")};function x(S,A,_){let W=0;return Array.isArray(S)||(S=Object.values(S).map(U=>[U])),S.forEach(U=>{W=Math.max(e.stringWidth(_?`${_} ${Ms(U[0])}`:Ms(U[0]))+ca(U[0]),W)}),A&&(W=Math.min(W,parseInt((A*.5).toString(),10))),W}function B(){let S=s.getDemandedOptions(),A=s.getOptions();(Object.keys(A.alias)||[]).forEach(_=>{A.alias[_].forEach(W=>{C[W]&&n.describe(_,C[W]),W in S&&s.demandOption(_,S[W]),A.boolean.includes(W)&&s.boolean(_),A.count.includes(W)&&s.count(_),A.string.includes(W)&&s.string(_),A.normalize.includes(W)&&s.normalize(_),A.array.includes(W)&&s.array(_),A.number.includes(W)&&s.number(_)})})}let w;n.cacheHelpMessage=function(){w=this.help()},n.clearCachedHelpMessage=function(){w=void 0},n.hasCachedHelpMessage=function(){return!!w};function R(S,A,_,W){let U=[],De=null;return Object.keys(_).forEach(H=>{U=U.concat(_[H])}),S.forEach(H=>{De=[H].concat(A[H]),De.some(de=>U.indexOf(de)!==-1)||_[W].push(H)}),U}function X(S){return s.getOptions().hiddenOptions.indexOf(S)<0||s.parsed.argv[s.getOptions().showHiddenOpt]}n.showHelp=S=>{let A=s.getInternalMethods().getLoggerInstance();S||(S="error"),(typeof S=="function"?S:A[S])(n.help())},n.functionDescription=S=>["(",S.name?e.Parser.decamelize(S.name,"-"):t("generated-value"),")"].join(""),n.stringifiedValues=function(A,_){let W="",U=_||", ",De=[].concat(A);return!A||!De.length||De.forEach(H=>{W.length&&(W+=U),W+=JSON.stringify(H)}),W};function z(S,A){let _=`[${t("default:")} `;if(S===void 0&&!A)return null;if(A)_+=A;else switch(typeof S){case"string":_+=`"${S}"`;break;case"object":_+=JSON.stringify(S);break;default:_+=S}return`${_}]`}function be(){return e.process.stdColumns?Math.min(80,e.process.stdColumns):80}let Ge=null;n.version=S=>{Ge=S},n.showVersion=S=>{let A=s.getInternalMethods().getLoggerInstance();S||(S="error"),(typeof S=="function"?S:A[S])(Ge)},n.reset=function(A){return o=null,c=!1,h=[],p=!1,F=[],l=[],d=[],C=mt(C,_=>!A[_]),n};let V=[];return n.freeze=function(){V.push({failMessage:o,failureOutput:c,usages:h,usageDisabled:p,epilogs:F,examples:l,commands:d,descriptions:C})},n.unfreeze=function(A=!1){let _=V.pop();_&&(A?(C={..._.descriptions,...C},d=[..._.commands,...d],h=[..._.usages,...h],l=[..._.examples,...l],F=[..._.epilogs,...F]):{failMessage:o,failureOutput:c,usages:h,usageDisabled:p,epilogs:F,examples:l,commands:d,descriptions:C}=_)},n}function fr(s){return typeof s=="object"}function _h(s,e){return fr(s)?{text:s.text,indentation:s.indentation+e}:{text:s,indentation:e}}function ca(s){return fr(s)?s.indentation:0}function Ms(s){return fr(s)?s.text:s}var ha=`###-begin-{{app_name}}-completions-###
|
|
110
117
|
#
|
|
111
118
|
# yargs command completion script
|
|
112
119
|
#
|
|
@@ -134,7 +141,7 @@ _{{app_name}}_yargs_completions()
|
|
|
134
141
|
}
|
|
135
142
|
complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}
|
|
136
143
|
###-end-{{app_name}}-completions-###
|
|
137
|
-
`,
|
|
144
|
+
`,fa=`#compdef {{app_name}}
|
|
138
145
|
###-begin-{{app_name}}-completions-###
|
|
139
146
|
#
|
|
140
147
|
# yargs command completion script
|
|
@@ -153,15 +160,15 @@ _{{app_name}}_yargs_completions()
|
|
|
153
160
|
}
|
|
154
161
|
compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
155
162
|
###-end-{{app_name}}-completions-###
|
|
156
|
-
`;var
|
|
157
|
-
${
|
|
158
|
-
`)}`:"";e.fail(r("Missing required argument: %s","Missing required arguments: %s",Object.keys(C).length,Object.keys(C).join(", ")+
|
|
159
|
-
${
|
|
160
|
-
`;p.forEach(E=>{C+=E}),e.fail(C)}};let f={};o.conflicts=function(c,p){$("<string|object> [array|string]",[c,p],arguments.length),typeof c=="object"?Object.keys(c).forEach(C=>{o.conflicts(C,c[C])}):(n.global(c),f[c]||(f[c]=[]),Array.isArray(p)?p.forEach(C=>o.conflicts(c,C)):f[c].push(p))},o.getConflicting=()=>f,o.conflicting=function(c){Object.keys(c).forEach(p=>{f[p]&&f[p].forEach(C=>{C&&c[p]!==void 0&&c[C]!==void 0&&e.fail(i("Arguments %s and %s are mutually exclusive",p,C))})}),n.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(f).forEach(p=>{f[p].forEach(C=>{C&&c[t.Parser.camelCase(p)]!==void 0&&c[t.Parser.camelCase(C)]!==void 0&&e.fail(i("Arguments %s and %s are mutually exclusive",p,C))})})},o.recommendCommands=function(c,p){p=p.sort((g,B)=>B.length-g.length);let E=null,b=1/0;for(let g=0,B;(B=p[g])!==void 0;g++){let N=Ao(c,B);N<=3&&N<b&&(b=N,E=B)}E&&e.fail(i("Did you mean %s?",E))},o.reset=function(c){return s=Ke(s,p=>!c[p]),f=Ke(f,p=>!c[p]),o};let D=[];return o.freeze=function(){D.push({implied:s,conflicting:f})},o.unfreeze=function(){let c=D.pop();Ce(c,void 0,t),{implied:s,conflicting:f}=c},o}var ki=[],Vt;function _n(n,e,t,i){Vt=i;let r={};if(Object.prototype.hasOwnProperty.call(n,"extends")){if(typeof n.extends!="string")return r;let o=/\.json|\..*rc$/.test(n.extends),s=null;if(o)s=ac(e,n.extends);else try{s=require.resolve(n.extends)}catch{return n}uc(s),ki.push(s),r=o?JSON.parse(Vt.readFileSync(s,"utf8")):require(n.extends),delete n.extends,r=_n(r,Vt.path.dirname(s),t,Vt)}return ki=[],t?Bo(r,n):Object.assign({},r,n)}function uc(n){if(ki.indexOf(n)>-1)throw new Y(`Circular extended configurations: '${n}'.`)}function ac(n,e){return Vt.path.resolve(n,e)}function Bo(n,e){let t={};function i(r){return r&&typeof r=="object"&&!Array.isArray(r)}Object.assign(t,n);for(let r of Object.keys(e))i(e[r])&&i(t[r])?t[r]=Bo(n[r],e[r]):t[r]=e[r];return t}var v=function(n,e,t,i,r){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?n!==e||!r:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?r.call(n,t):r?r.value=t:e.set(n,t),t},u=function(n,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?n!==e||!i:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(n):i?i.value:e.get(n)},ue,ct,Ht,Oe,ye,Sn,Ze,lt,jn,_e,In,Se,We,we,je,Pn,Mt,De,j,Mn,Tn,xe,ft,Tt,Dt,Xe,Nn,T,ht,pt,dt,W,Wn,Re,se;function Yo(n){return(e=[],t=n.process.cwd(),i)=>{let r=new Zi(e,t,i,n);return Object.defineProperty(r,"argv",{get:()=>r.parse(),enumerable:!0}),r.help(),r.version(),r}}var Oo=Symbol("copyDoubleDash"),_o=Symbol("copyDoubleDash"),zi=Symbol("deleteFromParserHintObject"),So=Symbol("emitWarning"),jo=Symbol("freeze"),Io=Symbol("getDollarZero"),mt=Symbol("getParserConfiguration"),Po=Symbol("getUsageConfiguration"),qi=Symbol("guessLocale"),Mo=Symbol("guessVersion"),To=Symbol("parsePositionalNumbers"),Ui=Symbol("pkgUp"),et=Symbol("populateParserHintArray"),Nt=Symbol("populateParserHintSingleValueDictionary"),Vi=Symbol("populateParserHintArrayDictionary"),Hi=Symbol("populateParserHintDictionary"),Gi=Symbol("sanitizeKey"),Yi=Symbol("setKey"),Ji=Symbol("unfreeze"),No=Symbol("validateAsync"),Wo=Symbol("getCommandInstance"),Ro=Symbol("getContext"),Lo=Symbol("getHasOutput"),ko=Symbol("getLoggerInstance"),zo=Symbol("getParseContext"),qo=Symbol("getUsageInstance"),Uo=Symbol("getValidationInstance"),Rn=Symbol("hasParseCallback"),Vo=Symbol("isGlobalContext"),gt=Symbol("postProcess"),Ho=Symbol("rebase"),Ki=Symbol("reset"),Gt=Symbol("runYargsParserAndExecuteCommands"),Qi=Symbol("runValidation"),Go=Symbol("setHasOutput"),Ct=Symbol("kTrackManuallySetKeys"),Zi=class{constructor(e=[],t,i,r){this.customScriptName=!1,this.parsed=!1,ue.set(this,void 0),ct.set(this,void 0),Ht.set(this,{commands:[],fullCommands:[]}),Oe.set(this,null),ye.set(this,null),Sn.set(this,"show-hidden"),Ze.set(this,null),lt.set(this,!0),jn.set(this,{}),_e.set(this,!0),In.set(this,[]),Se.set(this,void 0),We.set(this,{}),we.set(this,!1),je.set(this,null),Pn.set(this,!0),Mt.set(this,void 0),De.set(this,""),j.set(this,void 0),Mn.set(this,void 0),Tn.set(this,{}),xe.set(this,null),ft.set(this,null),Tt.set(this,{}),Dt.set(this,{}),Xe.set(this,void 0),Nn.set(this,!1),T.set(this,void 0),ht.set(this,!1),pt.set(this,!1),dt.set(this,!1),W.set(this,void 0),Wn.set(this,{}),Re.set(this,null),se.set(this,void 0),v(this,T,r,"f"),v(this,Xe,e,"f"),v(this,ct,t,"f"),v(this,Mn,i,"f"),v(this,Se,new vn(this),"f"),this.$0=this[Io](),this[Ki](),v(this,ue,u(this,ue,"f"),"f"),v(this,W,u(this,W,"f"),"f"),v(this,se,u(this,se,"f"),"f"),v(this,j,u(this,j,"f"),"f"),u(this,j,"f").showHiddenOpt=u(this,Sn,"f"),v(this,Mt,this[_o](),"f")}addHelpOpt(e,t){let i="help";return $("[string|boolean] [string]",[e,t],arguments.length),u(this,je,"f")&&(this[zi](u(this,je,"f")),v(this,je,null,"f")),e===!1&&t===void 0?this:(v(this,je,typeof e=="string"?e:i,"f"),this.boolean(u(this,je,"f")),this.describe(u(this,je,"f"),t||u(this,W,"f").deferY18nLookup("Show help")),this)}help(e,t){return this.addHelpOpt(e,t)}addShowHiddenOpt(e,t){if($("[string|boolean] [string]",[e,t],arguments.length),e===!1&&t===void 0)return this;let i=typeof e=="string"?e:u(this,Sn,"f");return this.boolean(i),this.describe(i,t||u(this,W,"f").deferY18nLookup("Show hidden options")),u(this,j,"f").showHiddenOpt=i,this}showHidden(e,t){return this.addShowHiddenOpt(e,t)}alias(e,t){return $("<object|string|array> [string|array]",[e,t],arguments.length),this[Vi](this.alias.bind(this),"alias",e,t),this}array(e){return $("<array|string>",[e],arguments.length),this[et]("array",e),this[Ct](e),this}boolean(e){return $("<array|string>",[e],arguments.length),this[et]("boolean",e),this[Ct](e),this}check(e,t){return $("<function> [boolean]",[e,t],arguments.length),this.middleware((i,r)=>at(()=>e(i,r.getOptions()),o=>(o?(typeof o=="string"||o instanceof Error)&&u(this,W,"f").fail(o.toString(),o):u(this,W,"f").fail(u(this,T,"f").y18n.__("Argument check failed: %s",e.toString())),i),o=>(u(this,W,"f").fail(o.message?o.message:o.toString(),o),i)),!1,t),this}choices(e,t){return $("<object|string|array> [string|array]",[e,t],arguments.length),this[Vi](this.choices.bind(this),"choices",e,t),this}coerce(e,t){if($("<object|string|array> [function]",[e,t],arguments.length),Array.isArray(e)){if(!t)throw new Y("coerce callback must be provided");for(let i of e)this.coerce(i,t);return this}else if(typeof e=="object"){for(let i of Object.keys(e))this.coerce(i,e[i]);return this}if(!t)throw new Y("coerce callback must be provided");return u(this,j,"f").key[e]=!0,u(this,Se,"f").addCoerceMiddleware((i,r)=>{let o;return Object.prototype.hasOwnProperty.call(i,e)?at(()=>(o=r.getAliases(),t(i[e])),a=>{i[e]=a;let f=r.getInternalMethods().getParserConfiguration()["strip-aliased"];if(o[e]&&f!==!0)for(let D of o[e])i[D]=a;return i},a=>{throw new Y(a.message)}):i},e),this}conflicts(e,t){return $("<string|object> [string|array]",[e,t],arguments.length),u(this,se,"f").conflicts(e,t),this}config(e="config",t,i){return $("[object|string] [string|function] [function]",[e,t,i],arguments.length),typeof e=="object"&&!Array.isArray(e)?(e=_n(e,u(this,ct,"f"),this[mt]()["deep-merge-config"]||!1,u(this,T,"f")),u(this,j,"f").configObjects=(u(this,j,"f").configObjects||[]).concat(e),this):(typeof t=="function"&&(i=t,t=void 0),this.describe(e,t||u(this,W,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach(r=>{u(this,j,"f").config[r]=i||!0}),this)}completion(e,t,i){return $("[string] [string|boolean|function] [function]",[e,t,i],arguments.length),typeof t=="function"&&(i=t,t=void 0),v(this,ye,e||u(this,ye,"f")||"completion","f"),!t&&t!==!1&&(t="generate completion script"),this.command(u(this,ye,"f"),t),i&&u(this,Oe,"f").registerFunction(i),this}command(e,t,i,r,o,s){return $("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,t,i,r,o,s],arguments.length),u(this,ue,"f").addHandler(e,t,i,r,o,s),this}commands(e,t,i,r,o,s){return this.command(e,t,i,r,o,s)}commandDir(e,t){$("<string> [object]",[e,t],arguments.length);let i=u(this,Mn,"f")||u(this,T,"f").require;return u(this,ue,"f").addDirectory(e,i,u(this,T,"f").getCallerFile(),t),this}count(e){return $("<array|string>",[e],arguments.length),this[et]("count",e),this[Ct](e),this}default(e,t,i){return $("<object|string|array> [*] [string]",[e,t,i],arguments.length),i&&(Ti(e,u(this,T,"f")),u(this,j,"f").defaultDescription[e]=i),typeof t=="function"&&(Ti(e,u(this,T,"f")),u(this,j,"f").defaultDescription[e]||(u(this,j,"f").defaultDescription[e]=u(this,W,"f").functionDescription(t)),t=t.call()),this[Nt](this.default.bind(this),"default",e,t),this}defaults(e,t,i){return this.default(e,t,i)}demandCommand(e=1,t,i,r){return $("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,t,i,r],arguments.length),typeof t!="number"&&(i=t,t=1/0),this.global("_",!1),u(this,j,"f").demandedCommands._={min:e,max:t,minMsg:i,maxMsg:r},this}demand(e,t,i){return Array.isArray(t)?(t.forEach(r=>{Ce(i,!0,u(this,T,"f")),this.demandOption(r,i)}),t=1/0):typeof t!="number"&&(i=t,t=1/0),typeof e=="number"?(Ce(i,!0,u(this,T,"f")),this.demandCommand(e,t,i,i)):Array.isArray(e)?e.forEach(r=>{Ce(i,!0,u(this,T,"f")),this.demandOption(r,i)}):typeof i=="string"?this.demandOption(e,i):(i===!0||typeof i>"u")&&this.demandOption(e),this}demandOption(e,t){return $("<object|string|array> [string]",[e,t],arguments.length),this[Nt](this.demandOption.bind(this),"demandedOptions",e,t),this}deprecateOption(e,t){return $("<string> [string|boolean]",[e,t],arguments.length),u(this,j,"f").deprecatedOptions[e]=t,this}describe(e,t){return $("<object|string|array> [string]",[e,t],arguments.length),this[Yi](e,!0),u(this,W,"f").describe(e,t),this}detectLocale(e){return $("<boolean>",[e],arguments.length),v(this,lt,e,"f"),this}env(e){return $("[string|boolean]",[e],arguments.length),e===!1?delete u(this,j,"f").envPrefix:u(this,j,"f").envPrefix=e||"",this}epilogue(e){return $("<string>",[e],arguments.length),u(this,W,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,t){return $("<string|array> [string]",[e,t],arguments.length),Array.isArray(e)?e.forEach(i=>this.example(...i)):u(this,W,"f").example(e,t),this}exit(e,t){v(this,we,!0,"f"),v(this,Ze,t,"f"),u(this,_e,"f")&&u(this,T,"f").process.exit(e)}exitProcess(e=!0){return $("[boolean]",[e],arguments.length),v(this,_e,e,"f"),this}fail(e){if($("<function|boolean>",[e],arguments.length),typeof e=="boolean"&&e!==!1)throw new Y("Invalid first argument. Expected function or boolean 'false'");return u(this,W,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,t){return $("<array> [function]",[e,t],arguments.length),t?u(this,Oe,"f").getCompletion(e,t):new Promise((i,r)=>{u(this,Oe,"f").getCompletion(e,(o,s)=>{o?r(o):i(s)})})}getDemandedOptions(){return $([],0),u(this,j,"f").demandedOptions}getDemandedCommands(){return $([],0),u(this,j,"f").demandedCommands}getDeprecatedOptions(){return $([],0),u(this,j,"f").deprecatedOptions}getDetectLocale(){return u(this,lt,"f")}getExitProcess(){return u(this,_e,"f")}getGroups(){return Object.assign({},u(this,We,"f"),u(this,Dt,"f"))}getHelp(){if(v(this,we,!0,"f"),!u(this,W,"f").hasCachedHelpMessage()){if(!this.parsed){let t=this[Gt](u(this,Xe,"f"),void 0,void 0,0,!0);if(J(t))return t.then(()=>u(this,W,"f").help())}let e=u(this,ue,"f").runDefaultBuilderOn(this);if(J(e))return e.then(()=>u(this,W,"f").help())}return Promise.resolve(u(this,W,"f").help())}getOptions(){return u(this,j,"f")}getStrict(){return u(this,ht,"f")}getStrictCommands(){return u(this,pt,"f")}getStrictOptions(){return u(this,dt,"f")}global(e,t){return $("<string|array> [boolean]",[e,t],arguments.length),e=[].concat(e),t!==!1?u(this,j,"f").local=u(this,j,"f").local.filter(i=>e.indexOf(i)===-1):e.forEach(i=>{u(this,j,"f").local.includes(i)||u(this,j,"f").local.push(i)}),this}group(e,t){$("<string|array> <string>",[e,t],arguments.length);let i=u(this,Dt,"f")[t]||u(this,We,"f")[t];u(this,Dt,"f")[t]&&delete u(this,Dt,"f")[t];let r={};return u(this,We,"f")[t]=(i||[]).concat(e).filter(o=>r[o]?!1:r[o]=!0),this}hide(e){return $("<string>",[e],arguments.length),u(this,j,"f").hiddenOptions.push(e),this}implies(e,t){return $("<string|object> [number|string|array]",[e,t],arguments.length),u(this,se,"f").implies(e,t),this}locale(e){return $("[string]",[e],arguments.length),e===void 0?(this[qi](),u(this,T,"f").y18n.getLocale()):(v(this,lt,!1,"f"),u(this,T,"f").y18n.setLocale(e),this)}middleware(e,t,i){return u(this,Se,"f").addMiddleware(e,!!t,i)}nargs(e,t){return $("<string|object|array> [number]",[e,t],arguments.length),this[Nt](this.nargs.bind(this),"narg",e,t),this}normalize(e){return $("<array|string>",[e],arguments.length),this[et]("normalize",e),this}number(e){return $("<array|string>",[e],arguments.length),this[et]("number",e),this[Ct](e),this}option(e,t){if($("<string|object> [object]",[e,t],arguments.length),typeof e=="object")Object.keys(e).forEach(i=>{this.options(i,e[i])});else{typeof t!="object"&&(t={}),this[Ct](e),u(this,Re,"f")&&(e==="version"||(t==null?void 0:t.alias)==="version")&&this[So](['"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(`
|
|
161
|
-
`),void 0,"versionWarning"),
|
|
162
|
-
`,"f"),
|
|
163
|
-
`,"f"),v(this,De,u(this,De,"f")+e.join(" "),"f")}}}[zi](e){It(u(this,j,"f")).forEach(t=>{if((r=>r==="configObjects")(t))return;let i=u(this,j,"f")[t];Array.isArray(i)?i.includes(e)&&i.splice(i.indexOf(e),1):typeof i=="object"&&delete i[e]}),delete u(this,W,"f").getDescriptions()[e]}[So](e,t,i){u(this,jn,"f")[i]||(u(this,T,"f").process.emitWarning(e,t),u(this,jn,"f")[i]=!0)}[jo](){u(this,In,"f").push({options:u(this,j,"f"),configObjects:u(this,j,"f").configObjects.slice(0),exitProcess:u(this,_e,"f"),groups:u(this,We,"f"),strict:u(this,ht,"f"),strictCommands:u(this,pt,"f"),strictOptions:u(this,dt,"f"),completionCommand:u(this,ye,"f"),output:u(this,De,"f"),exitError:u(this,Ze,"f"),hasOutput:u(this,we,"f"),parsed:this.parsed,parseFn:u(this,xe,"f"),parseContext:u(this,ft,"f")}),u(this,W,"f").freeze(),u(this,se,"f").freeze(),u(this,ue,"f").freeze(),u(this,Se,"f").freeze()}[Io](){let e="",t;return/\b(node|iojs|electron)(\.exe)?$/.test(u(this,T,"f").process.argv()[0])?t=u(this,T,"f").process.argv().slice(1,2):t=u(this,T,"f").process.argv().slice(0,1),e=t.map(i=>{let r=this[Ho](u(this,ct,"f"),i);return i.match(/^(\/|([a-zA-Z]:)?\\)/)&&r.length<i.length?r:i}).join(" ").trim(),u(this,T,"f").getEnv("_")&&u(this,T,"f").getProcessArgvBin()===u(this,T,"f").getEnv("_")&&(e=u(this,T,"f").getEnv("_").replace(`${u(this,T,"f").path.dirname(u(this,T,"f").process.execPath())}/`,"")),e}[mt](){return u(this,Tn,"f")}[Po](){return u(this,Wn,"f")}[qi](){if(!u(this,lt,"f"))return;let e=u(this,T,"f").getEnv("LC_ALL")||u(this,T,"f").getEnv("LC_MESSAGES")||u(this,T,"f").getEnv("LANG")||u(this,T,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[Mo](){return this[Ui]().version||"unknown"}[To](e){let t=e["--"]?e["--"]:e._;for(let i=0,r;(r=t[i])!==void 0;i++)u(this,T,"f").Parser.looksLikeNumber(r)&&Number.isSafeInteger(Math.floor(parseFloat(`${r}`)))&&(t[i]=Number(r));return e}[Ui](e){let t=e||"*";if(u(this,Tt,"f")[t])return u(this,Tt,"f")[t];let i={};try{let r=e||u(this,T,"f").mainFilename;!e&&u(this,T,"f").path.extname(r)&&(r=u(this,T,"f").path.dirname(r));let o=u(this,T,"f").findUp(r,(s,a)=>{if(a.includes("package.json"))return"package.json"});Ce(o,void 0,u(this,T,"f")),i=JSON.parse(u(this,T,"f").readFileSync(o,"utf8"))}catch{}return u(this,Tt,"f")[t]=i||{},u(this,Tt,"f")[t]}[et](e,t){t=[].concat(t),t.forEach(i=>{i=this[Gi](i),u(this,j,"f")[e].push(i)})}[Nt](e,t,i,r){this[Hi](e,t,i,r,(o,s,a)=>{u(this,j,"f")[o][s]=a})}[Vi](e,t,i,r){this[Hi](e,t,i,r,(o,s,a)=>{u(this,j,"f")[o][s]=(u(this,j,"f")[o][s]||[]).concat(a)})}[Hi](e,t,i,r,o){if(Array.isArray(i))i.forEach(s=>{e(s,r)});else if((s=>typeof s=="object")(i))for(let s of It(i))e(s,i[s]);else o(t,this[Gi](i),r)}[Gi](e){return e==="__proto__"?"___proto___":e}[Yi](e,t){return this[Nt](this[Yi].bind(this),"key",e,t),this}[Ji](){var e,t,i,r,o,s,a,f,D,h,c,p;let C=u(this,In,"f").pop();Ce(C,void 0,u(this,T,"f"));let E;e=this,t=this,i=this,r=this,o=this,s=this,a=this,f=this,D=this,h=this,c=this,p=this,{options:{set value(b){v(e,j,b,"f")}}.value,configObjects:E,exitProcess:{set value(b){v(t,_e,b,"f")}}.value,groups:{set value(b){v(i,We,b,"f")}}.value,output:{set value(b){v(r,De,b,"f")}}.value,exitError:{set value(b){v(o,Ze,b,"f")}}.value,hasOutput:{set value(b){v(s,we,b,"f")}}.value,parsed:this.parsed,strict:{set value(b){v(a,ht,b,"f")}}.value,strictCommands:{set value(b){v(f,pt,b,"f")}}.value,strictOptions:{set value(b){v(D,dt,b,"f")}}.value,completionCommand:{set value(b){v(h,ye,b,"f")}}.value,parseFn:{set value(b){v(c,xe,b,"f")}}.value,parseContext:{set value(b){v(p,ft,b,"f")}}.value}=C,u(this,j,"f").configObjects=E,u(this,W,"f").unfreeze(),u(this,se,"f").unfreeze(),u(this,ue,"f").unfreeze(),u(this,Se,"f").unfreeze()}[No](e,t){return at(t,i=>(e(i),i))}getInternalMethods(){return{getCommandInstance:this[Wo].bind(this),getContext:this[Ro].bind(this),getHasOutput:this[Lo].bind(this),getLoggerInstance:this[ko].bind(this),getParseContext:this[zo].bind(this),getParserConfiguration:this[mt].bind(this),getUsageConfiguration:this[Po].bind(this),getUsageInstance:this[qo].bind(this),getValidationInstance:this[Uo].bind(this),hasParseCallback:this[Rn].bind(this),isGlobalContext:this[Vo].bind(this),postProcess:this[gt].bind(this),reset:this[Ki].bind(this),runValidation:this[Qi].bind(this),runYargsParserAndExecuteCommands:this[Gt].bind(this),setHasOutput:this[Go].bind(this)}}[Wo](){return u(this,ue,"f")}[Ro](){return u(this,Ht,"f")}[Lo](){return u(this,we,"f")}[ko](){return u(this,Mt,"f")}[zo](){return u(this,ft,"f")||{}}[qo](){return u(this,W,"f")}[Uo](){return u(this,se,"f")}[Rn](){return!!u(this,xe,"f")}[Vo](){return u(this,Pn,"f")}[gt](e,t,i,r){return i||J(e)||(t||(e=this[Oo](e)),(this[mt]()["parse-positional-numbers"]||this[mt]()["parse-positional-numbers"]===void 0)&&(e=this[To](e)),r&&(e=ut(e,this,u(this,Se,"f").getMiddleware(),!1))),e}[Ki](e={}){v(this,j,u(this,j,"f")||{},"f");let t={};t.local=u(this,j,"f").local||[],t.configObjects=u(this,j,"f").configObjects||[];let i={};t.local.forEach(s=>{i[s]=!0,(e[s]||[]).forEach(a=>{i[a]=!0})}),Object.assign(u(this,Dt,"f"),Object.keys(u(this,We,"f")).reduce((s,a)=>{let f=u(this,We,"f")[a].filter(D=>!(D in i));return f.length>0&&(s[a]=f),s},{})),v(this,We,{},"f");let r=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],o=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return r.forEach(s=>{t[s]=(u(this,j,"f")[s]||[]).filter(a=>!i[a])}),o.forEach(s=>{t[s]=Ke(u(this,j,"f")[s],a=>!i[a])}),t.envPrefix=u(this,j,"f").envPrefix,v(this,j,t,"f"),v(this,W,u(this,W,"f")?u(this,W,"f").reset(i):Eo(this,u(this,T,"f")),"f"),v(this,se,u(this,se,"f")?u(this,se,"f").reset(i):vo(this,u(this,W,"f"),u(this,T,"f")),"f"),v(this,ue,u(this,ue,"f")?u(this,ue,"f").reset():Co(u(this,W,"f"),u(this,se,"f"),u(this,Se,"f"),u(this,T,"f")),"f"),u(this,Oe,"f")||v(this,Oe,xo(this,u(this,W,"f"),u(this,ue,"f"),u(this,T,"f")),"f"),u(this,Se,"f").reset(),v(this,ye,null,"f"),v(this,De,"","f"),v(this,Ze,null,"f"),v(this,we,!1,"f"),this.parsed=!1,this}[Ho](e,t){return u(this,T,"f").path.relative(e,t)}[Gt](e,t,i,r=0,o=!1){let s=!!i||o;e=e||u(this,Xe,"f"),u(this,j,"f").__=u(this,T,"f").y18n.__,u(this,j,"f").configuration=this[mt]();let a=!!u(this,j,"f").configuration["populate--"],f=Object.assign({},u(this,j,"f").configuration,{"populate--":!0}),D=u(this,T,"f").Parser.detailed(e,Object.assign({},u(this,j,"f"),{configuration:{"parse-positional-numbers":!1,...f}})),h=Object.assign(D.argv,u(this,ft,"f")),c,p=D.aliases,C=!1,E=!1;Object.keys(h).forEach(b=>{b===u(this,je,"f")&&h[b]?C=!0:b===u(this,Re,"f")&&h[b]&&(E=!0)}),h.$0=this.$0,this.parsed=D,r===0&&u(this,W,"f").clearCachedHelpMessage();try{if(this[qi](),t)return this[gt](h,a,!!i,!1);u(this,je,"f")&&[u(this,je,"f")].concat(p[u(this,je,"f")]||[]).filter(U=>U.length>1).includes(""+h._[h._.length-1])&&(h._.pop(),C=!0),v(this,Pn,!1,"f");let b=u(this,ue,"f").getCommands(),g=u(this,Oe,"f").completionKey in h,B=C||g||o;if(h._.length){if(b.length){let N;for(let U=r||0,k;h._[U]!==void 0;U++)if(k=String(h._[U]),b.includes(k)&&k!==u(this,ye,"f")){let V=u(this,ue,"f").runCommand(k,this,D,U+1,o,C||E||o);return this[gt](V,a,!!i,!1)}else if(!N&&k!==u(this,ye,"f")){N=k;break}!u(this,ue,"f").hasDefaultCommand()&&u(this,Nn,"f")&&N&&!B&&u(this,se,"f").recommendCommands(N,b)}u(this,ye,"f")&&h._.includes(u(this,ye,"f"))&&!g&&(u(this,_e,"f")&&Qe(!0),this.showCompletionScript(),this.exit(0))}if(u(this,ue,"f").hasDefaultCommand()&&!B){let N=u(this,ue,"f").runCommand(null,this,D,0,o,C||E||o);return this[gt](N,a,!!i,!1)}if(g){u(this,_e,"f")&&Qe(!0),e=[].concat(e);let N=e.slice(e.indexOf(`--${u(this,Oe,"f").completionKey}`)+1);return u(this,Oe,"f").getCompletion(N,(U,k)=>{if(U)throw new Y(U.message);(k||[]).forEach(V=>{u(this,Mt,"f").log(V)}),this.exit(0)}),this[gt](h,!a,!!i,!1)}if(u(this,we,"f")||(C?(u(this,_e,"f")&&Qe(!0),s=!0,this.showHelp("log"),this.exit(0)):E&&(u(this,_e,"f")&&Qe(!0),s=!0,u(this,W,"f").showVersion("log"),this.exit(0))),!s&&u(this,j,"f").skipValidation.length>0&&(s=Object.keys(h).some(N=>u(this,j,"f").skipValidation.indexOf(N)>=0&&h[N]===!0)),!s){if(D.error)throw new Y(D.error.message);if(!g){let N=this[Qi](p,{},D.error);i||(c=ut(h,this,u(this,Se,"f").getMiddleware(),!0)),c=this[No](N,c??h),J(c)&&!i&&(c=c.then(()=>ut(h,this,u(this,Se,"f").getMiddleware(),!1)))}}}catch(b){if(b instanceof Y)u(this,W,"f").fail(b.message,b);else throw b}return this[gt](c??h,a,!!i,!0)}[Qi](e,t,i,r){let o={...this.getDemandedOptions()};return s=>{if(i)throw new Y(i.message);u(this,se,"f").nonOptionCount(s),u(this,se,"f").requiredArguments(s,o);let a=!1;u(this,pt,"f")&&(a=u(this,se,"f").unknownCommands(s)),u(this,ht,"f")&&!a?u(this,se,"f").unknownArguments(s,e,t,!!r):u(this,dt,"f")&&u(this,se,"f").unknownArguments(s,e,{},!1,!1),u(this,se,"f").limitedChoices(s),u(this,se,"f").implications(s),u(this,se,"f").conflicting(s)}}[Go](){v(this,we,!0,"f")}[Ct](e){if(typeof e=="string")u(this,j,"f").key[e]=!0;else for(let t of e)u(this,j,"f").key[t]=!0}};function Fo(n){return!!n&&typeof n.getInternalMethods=="function"}var cc=Yo(Do),Jo=cc;function lc(n,e){return Jo(n).strict().command("* <template> <outDir>","Create a new project powered by qwik",i=>i.positional("template",{type:"string",desc:"Starter template",choices:e}).positional("outDir",{type:"string",desc:"Directory of the project"}).option("force",{alias:"f",type:"boolean",default:!1,desc:"Overwrite target directory if it exists"}).option("installDeps",{alias:"i",default:!1,type:"boolean",desc:"Install dependencies"}).usage("npm create qwik@latest base ./my-project <options>")).argv}async function es(...n){let e=Ye(),t=await _t("app"),i=t.standaloneTemplates.map(({id:p})=>p),r=lc(n,i),{force:o,installDeps:s,template:a}=r,f=r.outDir;rn(`Let's create a ${Lt(" Qwik App ")} \u2728 (v2.0.0-beta.1-dev+495e8d9)`),fc()?f=process.cwd():(f=Cn(f),Xi.default.existsSync(f)&&Xi.default.readdirSync(f).length>0&&(o?await un(f):(ee.error(`Directory "${f}" already exists.`),ee.info("Please either remove this directory, choose another location or run the command again with '--force | -f' flag."),st(),process.exit(1))));let D=await Ot({outDir:f,appId:a,pkgManager:e,templateManager:t}),h=wt(),c=!1;return s&&(c=await dn(async()=>await rt(e,f).install,{pkgManager:e,spinner:h})),mn(e,D,c),D}function fc(){return Dc()}function Dc(){try{return process.cwd().startsWith("/home/projects/")}catch{}return!1}var kn=require("node:path");var Ln=ae(require("node:fs"));var ts=[["What's the best thing about a Boolean?","Even if you're wrong, you're only off by a bit."],["Why did the developer stay at home?","Because he couldn't find his keys."],["How many programmers does it take to change a lightbulb?","None that's a hardware problem"],["A user interface is like a joke.","If you have to explain it then it is not that good."],["['hip', 'hip']","(hip hip array)"],["A SQL query goes into a bar, walks up to two tables and asks:","'Can I JOIN you?'"],["Why did the developer go to therapy?","He had too many unresolved issues."],["Why do C# and Java developers keep breaking their keyboards?","Because they use a strongly typed language."],["What's the object-oriented way to become wealthy?","Inheritance"],["Where do programmers like to hangout?","The Foo Bar."],["Why do Java programmers wear glasses?","Because they don't C#"],["To understand what recursion is...","You must first understand what recursion is"],["The punchline often arrives before the set-up.","Do you know the problem with UDP jokes?"],["Why did the programmer quit his job?","Because he didn't get arrays."],["Why was the computer tired when it got home?","It had a hard drive."],["There are 10 types of people in this world...","Those who understand binary and those who don't"],["Why do programmers always mix up Halloween and Christmas?","Because Oct 31 == Dec 25"],["I was gonna tell you a joke about UDP...","...but you might not get it."],["Normal People: give me just a second","Developers: give me 1000 milliseconds!"],["Why do programmers prefer dark mode?","Because light attracts bugs."],["Why don't programmers like nature?","It has too many bugs."],["Why was the computer freezing?","It left its Windows open!"],["What did the Java code say to the C code?","You've got no class."],["Why do programmers prefer the outdoors?","Because it's free of bugs."],["Why do programmers love movies?","Because they can 'script' the ending."],["why do desert animals hate Qwik?","Because there's no hydration...."],["What can you do if you cannot push your git changes?","Use the --force, Luke"],["How did the developer announce he's getting married?","'She returned true!'"],["How many Prolog programmers does it take to change a lightbulb?","Yes."],["Why did the developer ground their kid?","They weren't telling the truthy"],["!false","It's funny 'cause it's true."],["Where did the parallel function wash its hands?","Async"],["How do functions break up?","They stop calling each other"],["Why did the functions stop calling each other?","Because they had constant arguments."],["What's the second movie about a database engineer called?","The SQL."],["What did the computer do at lunchtime?","NoSQL."],["Why doesn't Hollywood make more Big Data movies?","Had a byte!"],["What does a baby computer call his father?","Data!"],["I never tell the same joke twice","I have a DRY sense of humor."],["How do programming pirates pass method parameters?","ARRRRRGS."],["Why don't bachelors like Git?","Because they are afraid to commit."],["Why do astronauts use Linux?","They can't open Windows in space!"],["How do front end devs like their brownies?","GUI"],["What do hackers do on a boat?","Phishing."],["Why couldn't the HTML list be trusted?","There were LI's everywhere"],["To the person who invented zero:","Thank's for nothing!"],["What do you call a bee that lives in America?","A USB"],["want about to a race conditions hear joke?",""],["What is a Package Managers favorite holiday?","Dependency Day"],["Where do we get all of these dad jokes from?","A dad-a-base!"],["What advice do you give to a JS developer who has never played baseball?","Try catch."],["We don't have any DNS jokes, know why?","Because it may take 24 hours to get them"],["Why do Front-End Developers eat lunch alone?","Because they don't know how to join tables."],["How do you help JS errors?","You `console` them!"],["When do front end developers go out to eat?","On their lunch <br>."],["What do you call optimistic front-end developers?","Stack half-full developers."]];function Ko(){let n=Math.floor(Math.random()*ts.length);return ts[n]}async function ns(){let n=Ye(),e=await _t("app"),t="./qwik-app";rn(`Let's create a ${Lt(" Qwik App ")} \u2728 (v2.0.0-beta.1-dev+495e8d9)`),await Ir(500);let i=await $s({message:`Where would you like to create your new project? ${Ge("(Use '.' or './' for current directory)")}`,placeholder:t})||t;He(i)&&(st("Operation cancelled."),process.exit(0));let r=e.getBaseApp();if(!r)throw new Error("Base app not found");let o=e.templates.filter(B=>B.id!==r.id).sort((B,N)=>B.name.localeCompare(N.name)),s=Cn(i.trim());r.target=s;let a=Wr(n,r);ee.info(`Creating new project in ${Lt(" "+s+" ")} ... \u{1F407}`);let f=null;if(Ln.default.existsSync(s)&&Ln.default.readdirSync(s).length>0){let B=await si({message:`Directory "./${(0,kn.relative)(process.cwd(),s)}" already exists and is not empty. What would you like to do?`,options:[{value:"exit",label:"Do not overwrite this directory and exit"},{value:"replace",label:"Remove contents of this directory"}]});(He(B)||B==="exit")&&(st("Operation cancelled."),process.exit(0)),B==="replace"&&(f=un(s))}let D=await si({message:"Select a starter",options:o.map(B=>{var N;return{label:B.name,value:B.id,hint:(N=B.pkgJson)==null?void 0:N.description}})});He(D)&&(st("Operation cancelled."),process.exit(0));let h=D,c=await sn({message:`Would you like to install ${n} dependencies?`,initialValue:!0});He(c)&&(st("Operation cancelled."),process.exit(0));let p=await sn({message:"Initialize a new git repository?",initialValue:!0});f&&await f;let C=c;if(!C)a.abort();else if(typeof a.success>"u")try{let B=await sn({message:"Finishing the install. Wanna hear a joke?",initialValue:!0});if(!He(B)&&B){let[N,U]=Ko();cn(ge(`${N.trim()}
|
|
164
|
-
${
|
|
163
|
+
`;var pr=class{constructor(e,t,n,r){var o,i,u;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=(u=((o=this.shim.getEnv("SHELL"))===null||o===void 0?void 0:o.includes("zsh"))||((i=this.shim.getEnv("ZSH_NAME"))===null||i===void 0?void 0:i.includes("zsh")))!==null&&u!==void 0?u:!1}defaultCompletion(e,t,n,r){let o=this.command.getCommandHandlers();for(let u=0,c=e.length;u<c;++u)if(o[e[u]]&&o[e[u]].builder){let h=o[e[u]].builder;if(js(h)){this.indexAfterLastReset=u+1;let p=this.yargs.getInternalMethods().reset();return h(p,!0),p.argv}}let i=[];this.commandCompletions(i,e,n),this.optionCompletions(i,e,t,n),this.choicesFromOptionsCompletions(i,e,t,n),this.choicesFromPositionalsCompletions(i,e,t,n),r(null,i)}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(o=>{let i=dt(o[0]).cmd;if(t.indexOf(i)===-1)if(!this.zshShell)e.push(i);else{let u=o[1]||"";e.push(i.replace(/:/g,"\\:")+":"+u)}})}optionCompletions(e,t,n,r){if((r.match(/^-/)||r===""&&e.length===0)&&!this.previousArgHasChoices(t)){let o=this.yargs.getOptions(),i=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(o.key).forEach(u=>{let c=!!o.configuration["boolean-negation"]&&o.boolean.includes(u);!i.includes(u)&&!o.hiddenOptions.includes(u)&&!this.argsContainKey(t,u,c)&&this.completeOptionKey(u,e,r,c&&!!o.default[u])})}}choicesFromOptionsCompletions(e,t,n,r){if(this.previousArgHasChoices(t)){let o=this.getPreviousArgChoices(t);o&&o.length>0&&e.push(...o.map(i=>i.replace(/:/g,"\\:")))}}choicesFromPositionalsCompletions(e,t,n,r){if(r===""&&e.length>0&&this.previousArgHasChoices(t))return;let o=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],i=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),u=o[n._.length-i-1];if(!u)return;let c=this.yargs.getOptions().choices[u]||[];for(let h of c)h.startsWith(r)&&e.push(h.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(/^-+/,""),o=this.yargs.getOptions(),i=[r,...this.yargs.getAliases()[r]||[]],u;for(let c of i)if(Object.prototype.hasOwnProperty.call(o.key,c)&&Array.isArray(o.choices[c])){u=o.choices[c];break}if(u)return u.filter(c=>!n||c.startsWith(n))}previousArgHasChoices(e){let t=this.getPreviousArgChoices(e);return t!==void 0&&t.length>0}argsContainKey(e,t,n){let r=o=>e.indexOf((/^[^0-9]$/.test(o)?"-":"--")+o)!==-1;if(r(t)||n&&r(`no-${t}`))return!0;if(this.aliases){for(let o of this.aliases[t])if(r(o))return!0}return!1}completeOptionKey(e,t,n,r){var o,i,u,c;let h=e;if(this.zshShell){let C=this.usage.getDescriptions(),F=(i=(o=this===null||this===void 0?void 0:this.aliases)===null||o===void 0?void 0:o[e])===null||i===void 0?void 0:i.find(I=>{let x=C[I];return typeof x=="string"&&x.length>0}),E=F?C[F]:void 0,D=(c=(u=C[e])!==null&&u!==void 0?u:E)!==null&&c!==void 0?c:"";h=`${e.replace(/:/g,"\\:")}:${D.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}let p=C=>/^--/.test(C),l=C=>/^[^0-9]$/.test(C),d=!p(n)&&l(e)?"-":"--";t.push(d+h),r&&t.push(d+"no-"+h)}customCompletion(e,t,n,r){if($e(this.customCompletionFunction,null,this.shim),Nh(this.customCompletionFunction)){let o=this.customCompletionFunction(n,t);return Z(o)?o.then(i=>{this.shim.process.nextTick(()=>{r(null,i)})}).catch(i=>{this.shim.process.nextTick(()=>{r(i,void 0)})}):r(null,o)}else return Bh(this.customCompletionFunction)?this.customCompletionFunction(n,t,(o=r)=>this.defaultCompletion(e,t,n,o),o=>{r(null,o)}):this.customCompletionFunction(n,t,o=>{r(null,o)})}getCompletion(e,t){let n=e.length?e[e.length-1]:"",r=this.yargs.parse(e,!0),o=this.customCompletionFunction?i=>this.customCompletion(e,i,n,t):i=>this.defaultCompletion(e,i,n,t);return Z(r)?r.then(o):o(r)}generateCompletionScript(e,t){let n=this.zshShell?fa:ha,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 pa(s,e,t,n){return new pr(s,e,t,n)}function Nh(s){return s.length<3}function Bh(s){return s.length>3}function Da(s,e){if(s.length===0)return e.length;if(e.length===0)return s.length;let t=[],n;for(n=0;n<=e.length;n++)t[n]=[n];let r;for(r=0;r<=s.length;r++)t[0][r]=r;for(n=1;n<=e.length;n++)for(r=1;r<=s.length;r++)e.charAt(n-1)===s.charAt(r-1)?t[n][r]=t[n-1][r-1]:n>1&&r>1&&e.charAt(n-2)===s.charAt(r-1)&&e.charAt(n-1)===s.charAt(r-2)?t[n][r]=t[n-2][r-2]+1:t[n][r]=Math.min(t[n-1][r-1]+1,Math.min(t[n][r-1]+1,t[n-1][r]+1));return t[e.length][s.length]}var da=["$0","--","_"];function ma(s,e,t){let n=t.y18n.__,r=t.y18n.__n,o={};o.nonOptionCount=function(l){let d=s.getDemandedCommands(),F=l._.length+(l["--"]?l["--"].length:0)-s.getInternalMethods().getContext().commands.length;d._&&(F<d._.min||F>d._.max)&&(F<d._.min?d._.minMsg!==void 0?e.fail(d._.minMsg?d._.minMsg.replace(/\$0/g,F.toString()).replace(/\$1/,d._.min.toString()):null):e.fail(r("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",F,F.toString(),d._.min.toString())):F>d._.max&&(d._.maxMsg!==void 0?e.fail(d._.maxMsg?d._.maxMsg.replace(/\$0/g,F.toString()).replace(/\$1/,d._.max.toString()):null):e.fail(r("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",F,F.toString(),d._.max.toString()))))},o.positionalCount=function(l,d){d<l&&e.fail(r("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",d,d+"",l+""))},o.requiredArguments=function(l,d){let C=null;for(let F of Object.keys(d))(!Object.prototype.hasOwnProperty.call(l,F)||typeof l[F]>"u")&&(C=C||{},C[F]=d[F]);if(C){let F=[];for(let D of Object.keys(C)){let I=C[D];I&&F.indexOf(I)<0&&F.push(I)}let E=F.length?`
|
|
164
|
+
${F.join(`
|
|
165
|
+
`)}`:"";e.fail(r("Missing required argument: %s","Missing required arguments: %s",Object.keys(C).length,Object.keys(C).join(", ")+E))}},o.unknownArguments=function(l,d,C,F,E=!0){var D;let I=s.getInternalMethods().getCommandInstance().getCommands(),x=[],B=s.getInternalMethods().getContext();if(Object.keys(l).forEach(w=>{!da.includes(w)&&!Object.prototype.hasOwnProperty.call(C,w)&&!Object.prototype.hasOwnProperty.call(s.getInternalMethods().getParseContext(),w)&&!o.isValidAndSomeAliasIsNotNew(w,d)&&x.push(w)}),E&&(B.commands.length>0||I.length>0||F)&&l._.slice(B.commands.length).forEach(w=>{I.includes(""+w)||x.push(""+w)}),E){let R=((D=s.getDemandedCommands()._)===null||D===void 0?void 0:D.max)||0,X=B.commands.length+R;X<l._.length&&l._.slice(X).forEach(z=>{z=String(z),!B.commands.includes(z)&&!x.includes(z)&&x.push(z)})}x.length&&e.fail(r("Unknown argument: %s","Unknown arguments: %s",x.length,x.map(w=>w.trim()?w:`"${w}"`).join(", ")))},o.unknownCommands=function(l){let d=s.getInternalMethods().getCommandInstance().getCommands(),C=[],F=s.getInternalMethods().getContext();return(F.commands.length>0||d.length>0)&&l._.slice(F.commands.length).forEach(E=>{d.includes(""+E)||C.push(""+E)}),C.length>0?(e.fail(r("Unknown command: %s","Unknown commands: %s",C.length,C.join(", "))),!0):!1},o.isValidAndSomeAliasIsNotNew=function(l,d){if(!Object.prototype.hasOwnProperty.call(d,l))return!1;let C=s.parsed.newAliases;return[l,...d[l]].some(F=>!Object.prototype.hasOwnProperty.call(C,F)||!C[l])},o.limitedChoices=function(l){let d=s.getOptions(),C={};if(!Object.keys(d.choices).length)return;Object.keys(l).forEach(D=>{da.indexOf(D)===-1&&Object.prototype.hasOwnProperty.call(d.choices,D)&&[].concat(l[D]).forEach(I=>{d.choices[D].indexOf(I)===-1&&I!==void 0&&(C[D]=(C[D]||[]).concat(I))})});let F=Object.keys(C);if(!F.length)return;let E=n("Invalid values:");F.forEach(D=>{E+=`
|
|
166
|
+
${n("Argument: %s, Given: %s, Choices: %s",D,e.stringifiedValues(C[D]),e.stringifiedValues(d.choices[D]))}`}),e.fail(E)};let i={};o.implies=function(l,d){O("<string|object> [array|number|string]",[l,d],arguments.length),typeof l=="object"?Object.keys(l).forEach(C=>{o.implies(C,l[C])}):(s.global(l),i[l]||(i[l]=[]),Array.isArray(d)?d.forEach(C=>o.implies(l,C)):($e(d,void 0,t),i[l].push(d)))},o.getImplied=function(){return i};function u(p,l){let d=Number(l);return l=isNaN(d)?l:d,typeof l=="number"?l=p._.length>=l:l.match(/^--no-.+/)?(l=l.match(/^--no-(.+)/)[1],l=!Object.prototype.hasOwnProperty.call(p,l)):l=Object.prototype.hasOwnProperty.call(p,l),l}o.implications=function(l){let d=[];if(Object.keys(i).forEach(C=>{let F=C;(i[C]||[]).forEach(E=>{let D=F,I=E;D=u(l,D),E=u(l,E),D&&!E&&d.push(` ${F} -> ${I}`)})}),d.length){let C=`${n("Implications failed:")}
|
|
167
|
+
`;d.forEach(F=>{C+=F}),e.fail(C)}};let c={};o.conflicts=function(l,d){O("<string|object> [array|string]",[l,d],arguments.length),typeof l=="object"?Object.keys(l).forEach(C=>{o.conflicts(C,l[C])}):(s.global(l),c[l]||(c[l]=[]),Array.isArray(d)?d.forEach(C=>o.conflicts(l,C)):c[l].push(d))},o.getConflicting=()=>c,o.conflicting=function(l){Object.keys(l).forEach(d=>{c[d]&&c[d].forEach(C=>{C&&l[d]!==void 0&&l[C]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",d,C))})}),s.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(c).forEach(d=>{c[d].forEach(C=>{C&&l[t.Parser.camelCase(d)]!==void 0&&l[t.Parser.camelCase(C)]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",d,C))})})},o.recommendCommands=function(l,d){d=d.sort((D,I)=>I.length-D.length);let F=null,E=1/0;for(let D=0,I;(I=d[D])!==void 0;D++){let x=Da(l,I);x<=3&&x<E&&(E=x,F=I)}F&&e.fail(n("Did you mean %s?",F))},o.reset=function(l){return i=mt(i,d=>!l[d]),c=mt(c,d=>!l[d]),o};let h=[];return o.freeze=function(){h.push({implied:i,conflicting:c})},o.unfreeze=function(){let l=h.pop();$e(l,void 0,t),{implied:i,conflicting:c}=l},o}var Dr=[],vn;function Ps(s,e,t,n){vn=n;let r={};if(Object.prototype.hasOwnProperty.call(s,"extends")){if(typeof s.extends!="string")return r;let o=/\.json|\..*rc$/.test(s.extends),i=null;if(o)i=kh(e,s.extends);else try{i=require.resolve(s.extends)}catch{return s}Sh(i),Dr.push(i),r=o?JSON.parse(vn.readFileSync(i,"utf8")):require(s.extends),delete s.extends,r=Ps(r,vn.path.dirname(i),t,vn)}return Dr=[],t?ga(r,s):Object.assign({},r,s)}function Sh(s){if(Dr.indexOf(s)>-1)throw new Q(`Circular extended configurations: '${s}'.`)}function kh(s,e){return vn.path.resolve(s,e)}function ga(s,e){let t={};function n(r){return r&&typeof r=="object"&&!Array.isArray(r)}Object.assign(t,s);for(let r of Object.keys(e))n(e[r])&&n(t[r])?t[r]=ga(s[r],e[r]):t[r]=e[r];return t}var T=function(s,e,t,n,r){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?s!==e||!r:!e.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?r.call(s,t):r?r.value=t:e.set(s,t),t},a=function(s,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?s!==e||!n:!e.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(s):n?n.value:e.get(s)},pe,Nt,An,Re,Be,Js,Ct,Bt,Rs,Le,Ls,We,et,Se,qe,Ws,hn,Ce,k,qs,Gs,ke,St,fn,kt,Et,Hs,J,jt,Mt,Pt,L,Us,tt,ce;function Ma(s){return(e=[],t=s.process.cwd(),n)=>{let r=new vr(e,t,n,s);return Object.defineProperty(r,"argv",{get:()=>r.parse(),enumerable:!0}),r.help(),r.version(),r}}var Ca=Symbol("copyDoubleDash"),Ea=Symbol("copyDoubleDash"),dr=Symbol("deleteFromParserHintObject"),ya=Symbol("emitWarning"),Fa=Symbol("freeze"),ba=Symbol("getDollarZero"),Jt=Symbol("getParserConfiguration"),wa=Symbol("getUsageConfiguration"),mr=Symbol("guessLocale"),xa=Symbol("guessVersion"),va=Symbol("parsePositionalNumbers"),gr=Symbol("pkgUp"),yt=Symbol("populateParserHintArray"),pn=Symbol("populateParserHintSingleValueDictionary"),Cr=Symbol("populateParserHintArrayDictionary"),Er=Symbol("populateParserHintDictionary"),yr=Symbol("sanitizeKey"),Fr=Symbol("setKey"),br=Symbol("unfreeze"),Aa=Symbol("validateAsync"),$a=Symbol("getCommandInstance"),Oa=Symbol("getContext"),Ta=Symbol("getHasOutput"),_a=Symbol("getLoggerInstance"),Ia=Symbol("getParseContext"),Na=Symbol("getUsageInstance"),Ba=Symbol("getValidationInstance"),Vs=Symbol("hasParseCallback"),Sa=Symbol("isGlobalContext"),Rt=Symbol("postProcess"),ka=Symbol("rebase"),wr=Symbol("reset"),$n=Symbol("runYargsParserAndExecuteCommands"),xr=Symbol("runValidation"),ja=Symbol("setHasOutput"),Lt=Symbol("kTrackManuallySetKeys"),vr=class{constructor(e=[],t,n,r){this.customScriptName=!1,this.parsed=!1,pe.set(this,void 0),Nt.set(this,void 0),An.set(this,{commands:[],fullCommands:[]}),Re.set(this,null),Be.set(this,null),Js.set(this,"show-hidden"),Ct.set(this,null),Bt.set(this,!0),Rs.set(this,{}),Le.set(this,!0),Ls.set(this,[]),We.set(this,void 0),et.set(this,{}),Se.set(this,!1),qe.set(this,null),Ws.set(this,!0),hn.set(this,void 0),Ce.set(this,""),k.set(this,void 0),qs.set(this,void 0),Gs.set(this,{}),ke.set(this,null),St.set(this,null),fn.set(this,{}),kt.set(this,{}),Et.set(this,void 0),Hs.set(this,!1),J.set(this,void 0),jt.set(this,!1),Mt.set(this,!1),Pt.set(this,!1),L.set(this,void 0),Us.set(this,{}),tt.set(this,null),ce.set(this,void 0),T(this,J,r,"f"),T(this,Et,e,"f"),T(this,Nt,t,"f"),T(this,qs,n,"f"),T(this,We,new ks(this),"f"),this.$0=this[ba](),this[wr](),T(this,pe,a(this,pe,"f"),"f"),T(this,L,a(this,L,"f"),"f"),T(this,ce,a(this,ce,"f"),"f"),T(this,k,a(this,k,"f"),"f"),a(this,k,"f").showHiddenOpt=a(this,Js,"f"),T(this,hn,this[Ea](),"f")}addHelpOpt(e,t){let n="help";return O("[string|boolean] [string]",[e,t],arguments.length),a(this,qe,"f")&&(this[dr](a(this,qe,"f")),T(this,qe,null,"f")),e===!1&&t===void 0?this:(T(this,qe,typeof e=="string"?e:n,"f"),this.boolean(a(this,qe,"f")),this.describe(a(this,qe,"f"),t||a(this,L,"f").deferY18nLookup("Show help")),this)}help(e,t){return this.addHelpOpt(e,t)}addShowHiddenOpt(e,t){if(O("[string|boolean] [string]",[e,t],arguments.length),e===!1&&t===void 0)return this;let n=typeof e=="string"?e:a(this,Js,"f");return this.boolean(n),this.describe(n,t||a(this,L,"f").deferY18nLookup("Show hidden options")),a(this,k,"f").showHiddenOpt=n,this}showHidden(e,t){return this.addShowHiddenOpt(e,t)}alias(e,t){return O("<object|string|array> [string|array]",[e,t],arguments.length),this[Cr](this.alias.bind(this),"alias",e,t),this}array(e){return O("<array|string>",[e],arguments.length),this[yt]("array",e),this[Lt](e),this}boolean(e){return O("<array|string>",[e],arguments.length),this[yt]("boolean",e),this[Lt](e),this}check(e,t){return O("<function> [boolean]",[e,t],arguments.length),this.middleware((n,r)=>It(()=>e(n,r.getOptions()),o=>(o?(typeof o=="string"||o instanceof Error)&&a(this,L,"f").fail(o.toString(),o):a(this,L,"f").fail(a(this,J,"f").y18n.__("Argument check failed: %s",e.toString())),n),o=>(a(this,L,"f").fail(o.message?o.message:o.toString(),o),n)),!1,t),this}choices(e,t){return O("<object|string|array> [string|array]",[e,t],arguments.length),this[Cr](this.choices.bind(this),"choices",e,t),this}coerce(e,t){if(O("<object|string|array> [function]",[e,t],arguments.length),Array.isArray(e)){if(!t)throw new Q("coerce callback must be provided");for(let n of e)this.coerce(n,t);return this}else if(typeof e=="object"){for(let n of Object.keys(e))this.coerce(n,e[n]);return this}if(!t)throw new Q("coerce callback must be provided");return a(this,k,"f").key[e]=!0,a(this,We,"f").addCoerceMiddleware((n,r)=>{let o;return Object.prototype.hasOwnProperty.call(n,e)?It(()=>(o=r.getAliases(),t(n[e])),u=>{n[e]=u;let c=r.getInternalMethods().getParserConfiguration()["strip-aliased"];if(o[e]&&c!==!0)for(let h of o[e])n[h]=u;return n},u=>{throw new Q(u.message)}):n},e),this}conflicts(e,t){return O("<string|object> [string|array]",[e,t],arguments.length),a(this,ce,"f").conflicts(e,t),this}config(e="config",t,n){return O("[object|string] [string|function] [function]",[e,t,n],arguments.length),typeof e=="object"&&!Array.isArray(e)?(e=Ps(e,a(this,Nt,"f"),this[Jt]()["deep-merge-config"]||!1,a(this,J,"f")),a(this,k,"f").configObjects=(a(this,k,"f").configObjects||[]).concat(e),this):(typeof t=="function"&&(n=t,t=void 0),this.describe(e,t||a(this,L,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach(r=>{a(this,k,"f").config[r]=n||!0}),this)}completion(e,t,n){return O("[string] [string|boolean|function] [function]",[e,t,n],arguments.length),typeof t=="function"&&(n=t,t=void 0),T(this,Be,e||a(this,Be,"f")||"completion","f"),!t&&t!==!1&&(t="generate completion script"),this.command(a(this,Be,"f"),t),n&&a(this,Re,"f").registerFunction(n),this}command(e,t,n,r,o,i){return O("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,t,n,r,o,i],arguments.length),a(this,pe,"f").addHandler(e,t,n,r,o,i),this}commands(e,t,n,r,o,i){return this.command(e,t,n,r,o,i)}commandDir(e,t){O("<string> [object]",[e,t],arguments.length);let n=a(this,qs,"f")||a(this,J,"f").require;return a(this,pe,"f").addDirectory(e,n,a(this,J,"f").getCallerFile(),t),this}count(e){return O("<array|string>",[e],arguments.length),this[yt]("count",e),this[Lt](e),this}default(e,t,n){return O("<object|string|array> [*] [string]",[e,t,n],arguments.length),n&&(cr(e,a(this,J,"f")),a(this,k,"f").defaultDescription[e]=n),typeof t=="function"&&(cr(e,a(this,J,"f")),a(this,k,"f").defaultDescription[e]||(a(this,k,"f").defaultDescription[e]=a(this,L,"f").functionDescription(t)),t=t.call()),this[pn](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 O("[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),a(this,k,"f").demandedCommands._={min:e,max:t,minMsg:n,maxMsg:r},this}demand(e,t,n){return Array.isArray(t)?(t.forEach(r=>{$e(n,!0,a(this,J,"f")),this.demandOption(r,n)}),t=1/0):typeof t!="number"&&(n=t,t=1/0),typeof e=="number"?($e(n,!0,a(this,J,"f")),this.demandCommand(e,t,n,n)):Array.isArray(e)?e.forEach(r=>{$e(n,!0,a(this,J,"f")),this.demandOption(r,n)}):typeof n=="string"?this.demandOption(e,n):(n===!0||typeof n>"u")&&this.demandOption(e),this}demandOption(e,t){return O("<object|string|array> [string]",[e,t],arguments.length),this[pn](this.demandOption.bind(this),"demandedOptions",e,t),this}deprecateOption(e,t){return O("<string> [string|boolean]",[e,t],arguments.length),a(this,k,"f").deprecatedOptions[e]=t,this}describe(e,t){return O("<object|string|array> [string]",[e,t],arguments.length),this[Fr](e,!0),a(this,L,"f").describe(e,t),this}detectLocale(e){return O("<boolean>",[e],arguments.length),T(this,Bt,e,"f"),this}env(e){return O("[string|boolean]",[e],arguments.length),e===!1?delete a(this,k,"f").envPrefix:a(this,k,"f").envPrefix=e||"",this}epilogue(e){return O("<string>",[e],arguments.length),a(this,L,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,t){return O("<string|array> [string]",[e,t],arguments.length),Array.isArray(e)?e.forEach(n=>this.example(...n)):a(this,L,"f").example(e,t),this}exit(e,t){T(this,Se,!0,"f"),T(this,Ct,t,"f"),a(this,Le,"f")&&a(this,J,"f").process.exit(e)}exitProcess(e=!0){return O("[boolean]",[e],arguments.length),T(this,Le,e,"f"),this}fail(e){if(O("<function|boolean>",[e],arguments.length),typeof e=="boolean"&&e!==!1)throw new Q("Invalid first argument. Expected function or boolean 'false'");return a(this,L,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,t){return O("<array> [function]",[e,t],arguments.length),t?a(this,Re,"f").getCompletion(e,t):new Promise((n,r)=>{a(this,Re,"f").getCompletion(e,(o,i)=>{o?r(o):n(i)})})}getDemandedOptions(){return O([],0),a(this,k,"f").demandedOptions}getDemandedCommands(){return O([],0),a(this,k,"f").demandedCommands}getDeprecatedOptions(){return O([],0),a(this,k,"f").deprecatedOptions}getDetectLocale(){return a(this,Bt,"f")}getExitProcess(){return a(this,Le,"f")}getGroups(){return Object.assign({},a(this,et,"f"),a(this,kt,"f"))}getHelp(){if(T(this,Se,!0,"f"),!a(this,L,"f").hasCachedHelpMessage()){if(!this.parsed){let t=this[$n](a(this,Et,"f"),void 0,void 0,0,!0);if(Z(t))return t.then(()=>a(this,L,"f").help())}let e=a(this,pe,"f").runDefaultBuilderOn(this);if(Z(e))return e.then(()=>a(this,L,"f").help())}return Promise.resolve(a(this,L,"f").help())}getOptions(){return a(this,k,"f")}getStrict(){return a(this,jt,"f")}getStrictCommands(){return a(this,Mt,"f")}getStrictOptions(){return a(this,Pt,"f")}global(e,t){return O("<string|array> [boolean]",[e,t],arguments.length),e=[].concat(e),t!==!1?a(this,k,"f").local=a(this,k,"f").local.filter(n=>e.indexOf(n)===-1):e.forEach(n=>{a(this,k,"f").local.includes(n)||a(this,k,"f").local.push(n)}),this}group(e,t){O("<string|array> <string>",[e,t],arguments.length);let n=a(this,kt,"f")[t]||a(this,et,"f")[t];a(this,kt,"f")[t]&&delete a(this,kt,"f")[t];let r={};return a(this,et,"f")[t]=(n||[]).concat(e).filter(o=>r[o]?!1:r[o]=!0),this}hide(e){return O("<string>",[e],arguments.length),a(this,k,"f").hiddenOptions.push(e),this}implies(e,t){return O("<string|object> [number|string|array]",[e,t],arguments.length),a(this,ce,"f").implies(e,t),this}locale(e){return O("[string]",[e],arguments.length),e===void 0?(this[mr](),a(this,J,"f").y18n.getLocale()):(T(this,Bt,!1,"f"),a(this,J,"f").y18n.setLocale(e),this)}middleware(e,t,n){return a(this,We,"f").addMiddleware(e,!!t,n)}nargs(e,t){return O("<string|object|array> [number]",[e,t],arguments.length),this[pn](this.nargs.bind(this),"narg",e,t),this}normalize(e){return O("<array|string>",[e],arguments.length),this[yt]("normalize",e),this}number(e){return O("<array|string>",[e],arguments.length),this[yt]("number",e),this[Lt](e),this}option(e,t){if(O("<string|object> [object]",[e,t],arguments.length),typeof e=="object")Object.keys(e).forEach(n=>{this.options(n,e[n])});else{typeof t!="object"&&(t={}),this[Lt](e),a(this,tt,"f")&&(e==="version"||(t==null?void 0:t.alias)==="version")&&this[ya](['"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(`
|
|
168
|
+
`),void 0,"versionWarning"),a(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&&(a(this,k,"f").defaultDescription[e]=t.defaultDescription),t.skipValidation&&this.skipValidation(e);let o=t.describe||t.description||t.desc,i=a(this,L,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(i,e)||typeof o=="string")&&this.describe(e,o),t.hidden&&this.hide(e),t.requiresArg&&this.requiresArg(e)}return this}options(e,t){return this.option(e,t)}parse(e,t,n){O("[string|array] [function|boolean|object] [function]",[e,t,n],arguments.length),this[Fa](),typeof e>"u"&&(e=a(this,Et,"f")),typeof t=="object"&&(T(this,St,t,"f"),t=n),typeof t=="function"&&(T(this,ke,t,"f"),t=!1),t||T(this,Et,e,"f"),a(this,ke,"f")&&T(this,Le,!1,"f");let r=this[$n](e,!!t),o=this.parsed;return a(this,Re,"f").setParsed(this.parsed),Z(r)?r.then(i=>(a(this,ke,"f")&&a(this,ke,"f").call(this,a(this,Ct,"f"),i,a(this,Ce,"f")),i)).catch(i=>{throw a(this,ke,"f")&&a(this,ke,"f")(i,this.parsed.argv,a(this,Ce,"f")),i}).finally(()=>{this[br](),this.parsed=o}):(a(this,ke,"f")&&a(this,ke,"f").call(this,a(this,Ct,"f"),r,a(this,Ce,"f")),this[br](),this.parsed=o,r)}parseAsync(e,t,n){let r=this.parse(e,t,n);return Z(r)?r:Promise.resolve(r)}parseSync(e,t,n){let r=this.parse(e,t,n);if(Z(r))throw new Q(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return r}parserConfiguration(e){return O("<object>",[e],arguments.length),T(this,Gs,e,"f"),this}pkgConf(e,t){O("<string> [string]",[e,t],arguments.length);let n=null,r=this[gr](t||a(this,Nt,"f"));return r[e]&&typeof r[e]=="object"&&(n=Ps(r[e],t||a(this,Nt,"f"),this[Jt]()["deep-merge-config"]||!1,a(this,J,"f")),a(this,k,"f").configObjects=(a(this,k,"f").configObjects||[]).concat(n)),this}positional(e,t){O("<string> <object>",[e,t],arguments.length);let n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];t=mt(t,(i,u)=>i==="type"&&!["string","number","boolean"].includes(u)?!1:n.includes(i));let r=a(this,An,"f").fullCommands[a(this,An,"f").fullCommands.length-1],o=r?a(this,pe,"f").cmdToParseOptions(r):{array:[],alias:{},default:{},demand:{}};return cn(o).forEach(i=>{let u=o[i];Array.isArray(u)?u.indexOf(e)!==-1&&(t[i]=!0):u[e]&&!(i in t)&&(t[i]=u[e])}),this.group(e,a(this,L,"f").getPositionalGroupName()),this.option(e,t)}recommendCommands(e=!0){return O("[boolean]",[e],arguments.length),T(this,Hs,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 O("<array|string|object> [number]",[e],arguments.length),typeof e=="string"&&a(this,k,"f").narg[e]?this:(this[pn](this.requiresArg.bind(this),"narg",e,NaN),this)}showCompletionScript(e,t){return O("[string] [string]",[e,t],arguments.length),e=e||this.$0,a(this,hn,"f").log(a(this,Re,"f").generateCompletionScript(e,t||a(this,Be,"f")||"completion")),this}showHelp(e){if(O("[string|function]",[e],arguments.length),T(this,Se,!0,"f"),!a(this,L,"f").hasCachedHelpMessage()){if(!this.parsed){let n=this[$n](a(this,Et,"f"),void 0,void 0,0,!0);if(Z(n))return n.then(()=>{a(this,L,"f").showHelp(e)}),this}let t=a(this,pe,"f").runDefaultBuilderOn(this);if(Z(t))return t.then(()=>{a(this,L,"f").showHelp(e)}),this}return a(this,L,"f").showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,t){return O("[boolean|string] [string]",[e,t],arguments.length),a(this,L,"f").showHelpOnFail(e,t),this}showVersion(e){return O("[string|function]",[e],arguments.length),a(this,L,"f").showVersion(e),this}skipValidation(e){return O("<array|string>",[e],arguments.length),this[yt]("skipValidation",e),this}strict(e){return O("[boolean]",[e],arguments.length),T(this,jt,e!==!1,"f"),this}strictCommands(e){return O("[boolean]",[e],arguments.length),T(this,Mt,e!==!1,"f"),this}strictOptions(e){return O("[boolean]",[e],arguments.length),T(this,Pt,e!==!1,"f"),this}string(e){return O("<array|string>",[e],arguments.length),this[yt]("string",e),this[Lt](e),this}terminalWidth(){return O([],0),a(this,J,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return O("<object>",[e],arguments.length),T(this,Bt,!1,"f"),a(this,J,"f").y18n.updateLocale(e),this}usage(e,t,n,r){if(O("<string|null|undefined> [string|boolean] [function|object] [function]",[e,t,n,r],arguments.length),t!==void 0){if($e(e,null,a(this,J,"f")),(e||"").match(/^\$0( |$)/))return this.command(e,t,n,r);throw new Q(".usage() description must start with $0 if being used as alias for .command()")}else return a(this,L,"f").usage(e),this}usageConfiguration(e){return O("<object>",[e],arguments.length),T(this,Us,e,"f"),this}version(e,t,n){let r="version";if(O("[boolean|string] [string] [string]",[e,t,n],arguments.length),a(this,tt,"f")&&(this[dr](a(this,tt,"f")),a(this,L,"f").version(void 0),T(this,tt,null,"f")),arguments.length===0)n=this[xa](),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 T(this,tt,typeof e=="string"?e:r,"f"),t=t||a(this,L,"f").deferY18nLookup("Show version number"),a(this,L,"f").version(n||void 0),this.boolean(a(this,tt,"f")),this.describe(a(this,tt,"f"),t),this}wrap(e){return O("<number|null|undefined>",[e],arguments.length),a(this,L,"f").wrap(e),this}[(pe=new WeakMap,Nt=new WeakMap,An=new WeakMap,Re=new WeakMap,Be=new WeakMap,Js=new WeakMap,Ct=new WeakMap,Bt=new WeakMap,Rs=new WeakMap,Le=new WeakMap,Ls=new WeakMap,We=new WeakMap,et=new WeakMap,Se=new WeakMap,qe=new WeakMap,Ws=new WeakMap,hn=new WeakMap,Ce=new WeakMap,k=new WeakMap,qs=new WeakMap,Gs=new WeakMap,ke=new WeakMap,St=new WeakMap,fn=new WeakMap,kt=new WeakMap,Et=new WeakMap,Hs=new WeakMap,J=new WeakMap,jt=new WeakMap,Mt=new WeakMap,Pt=new WeakMap,L=new WeakMap,Us=new WeakMap,tt=new WeakMap,ce=new WeakMap,Ca)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch{}return e}[Ea](){return{log:(...e)=>{this[Vs]()||console.log(...e),T(this,Se,!0,"f"),a(this,Ce,"f").length&&T(this,Ce,a(this,Ce,"f")+`
|
|
169
|
+
`,"f"),T(this,Ce,a(this,Ce,"f")+e.join(" "),"f")},error:(...e)=>{this[Vs]()||console.error(...e),T(this,Se,!0,"f"),a(this,Ce,"f").length&&T(this,Ce,a(this,Ce,"f")+`
|
|
170
|
+
`,"f"),T(this,Ce,a(this,Ce,"f")+e.join(" "),"f")}}}[dr](e){cn(a(this,k,"f")).forEach(t=>{if((r=>r==="configObjects")(t))return;let n=a(this,k,"f")[t];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete a(this,L,"f").getDescriptions()[e]}[ya](e,t,n){a(this,Rs,"f")[n]||(a(this,J,"f").process.emitWarning(e,t),a(this,Rs,"f")[n]=!0)}[Fa](){a(this,Ls,"f").push({options:a(this,k,"f"),configObjects:a(this,k,"f").configObjects.slice(0),exitProcess:a(this,Le,"f"),groups:a(this,et,"f"),strict:a(this,jt,"f"),strictCommands:a(this,Mt,"f"),strictOptions:a(this,Pt,"f"),completionCommand:a(this,Be,"f"),output:a(this,Ce,"f"),exitError:a(this,Ct,"f"),hasOutput:a(this,Se,"f"),parsed:this.parsed,parseFn:a(this,ke,"f"),parseContext:a(this,St,"f")}),a(this,L,"f").freeze(),a(this,ce,"f").freeze(),a(this,pe,"f").freeze(),a(this,We,"f").freeze()}[ba](){let e="",t;return/\b(node|iojs|electron)(\.exe)?$/.test(a(this,J,"f").process.argv()[0])?t=a(this,J,"f").process.argv().slice(1,2):t=a(this,J,"f").process.argv().slice(0,1),e=t.map(n=>{let r=this[ka](a(this,Nt,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&r.length<n.length?r:n}).join(" ").trim(),a(this,J,"f").getEnv("_")&&a(this,J,"f").getProcessArgvBin()===a(this,J,"f").getEnv("_")&&(e=a(this,J,"f").getEnv("_").replace(`${a(this,J,"f").path.dirname(a(this,J,"f").process.execPath())}/`,"")),e}[Jt](){return a(this,Gs,"f")}[wa](){return a(this,Us,"f")}[mr](){if(!a(this,Bt,"f"))return;let e=a(this,J,"f").getEnv("LC_ALL")||a(this,J,"f").getEnv("LC_MESSAGES")||a(this,J,"f").getEnv("LANG")||a(this,J,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[xa](){return this[gr]().version||"unknown"}[va](e){let t=e["--"]?e["--"]:e._;for(let n=0,r;(r=t[n])!==void 0;n++)a(this,J,"f").Parser.looksLikeNumber(r)&&Number.isSafeInteger(Math.floor(parseFloat(`${r}`)))&&(t[n]=Number(r));return e}[gr](e){let t=e||"*";if(a(this,fn,"f")[t])return a(this,fn,"f")[t];let n={};try{let r=e||a(this,J,"f").mainFilename;!e&&a(this,J,"f").path.extname(r)&&(r=a(this,J,"f").path.dirname(r));let o=a(this,J,"f").findUp(r,(i,u)=>{if(u.includes("package.json"))return"package.json"});$e(o,void 0,a(this,J,"f")),n=JSON.parse(a(this,J,"f").readFileSync(o,"utf8"))}catch{}return a(this,fn,"f")[t]=n||{},a(this,fn,"f")[t]}[yt](e,t){t=[].concat(t),t.forEach(n=>{n=this[yr](n),a(this,k,"f")[e].push(n)})}[pn](e,t,n,r){this[Er](e,t,n,r,(o,i,u)=>{a(this,k,"f")[o][i]=u})}[Cr](e,t,n,r){this[Er](e,t,n,r,(o,i,u)=>{a(this,k,"f")[o][i]=(a(this,k,"f")[o][i]||[]).concat(u)})}[Er](e,t,n,r,o){if(Array.isArray(n))n.forEach(i=>{e(i,r)});else if((i=>typeof i=="object")(n))for(let i of cn(n))e(i,n[i]);else o(t,this[yr](n),r)}[yr](e){return e==="__proto__"?"___proto___":e}[Fr](e,t){return this[pn](this[Fr].bind(this),"key",e,t),this}[br](){var e,t,n,r,o,i,u,c,h,p,l,d;let C=a(this,Ls,"f").pop();$e(C,void 0,a(this,J,"f"));let F;e=this,t=this,n=this,r=this,o=this,i=this,u=this,c=this,h=this,p=this,l=this,d=this,{options:{set value(E){T(e,k,E,"f")}}.value,configObjects:F,exitProcess:{set value(E){T(t,Le,E,"f")}}.value,groups:{set value(E){T(n,et,E,"f")}}.value,output:{set value(E){T(r,Ce,E,"f")}}.value,exitError:{set value(E){T(o,Ct,E,"f")}}.value,hasOutput:{set value(E){T(i,Se,E,"f")}}.value,parsed:this.parsed,strict:{set value(E){T(u,jt,E,"f")}}.value,strictCommands:{set value(E){T(c,Mt,E,"f")}}.value,strictOptions:{set value(E){T(h,Pt,E,"f")}}.value,completionCommand:{set value(E){T(p,Be,E,"f")}}.value,parseFn:{set value(E){T(l,ke,E,"f")}}.value,parseContext:{set value(E){T(d,St,E,"f")}}.value}=C,a(this,k,"f").configObjects=F,a(this,L,"f").unfreeze(),a(this,ce,"f").unfreeze(),a(this,pe,"f").unfreeze(),a(this,We,"f").unfreeze()}[Aa](e,t){return It(t,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[$a].bind(this),getContext:this[Oa].bind(this),getHasOutput:this[Ta].bind(this),getLoggerInstance:this[_a].bind(this),getParseContext:this[Ia].bind(this),getParserConfiguration:this[Jt].bind(this),getUsageConfiguration:this[wa].bind(this),getUsageInstance:this[Na].bind(this),getValidationInstance:this[Ba].bind(this),hasParseCallback:this[Vs].bind(this),isGlobalContext:this[Sa].bind(this),postProcess:this[Rt].bind(this),reset:this[wr].bind(this),runValidation:this[xr].bind(this),runYargsParserAndExecuteCommands:this[$n].bind(this),setHasOutput:this[ja].bind(this)}}[$a](){return a(this,pe,"f")}[Oa](){return a(this,An,"f")}[Ta](){return a(this,Se,"f")}[_a](){return a(this,hn,"f")}[Ia](){return a(this,St,"f")||{}}[Na](){return a(this,L,"f")}[Ba](){return a(this,ce,"f")}[Vs](){return!!a(this,ke,"f")}[Sa](){return a(this,Ws,"f")}[Rt](e,t,n,r){return n||Z(e)||(t||(e=this[Ca](e)),(this[Jt]()["parse-positional-numbers"]||this[Jt]()["parse-positional-numbers"]===void 0)&&(e=this[va](e)),r&&(e=_t(e,this,a(this,We,"f").getMiddleware(),!1))),e}[wr](e={}){T(this,k,a(this,k,"f")||{},"f");let t={};t.local=a(this,k,"f").local||[],t.configObjects=a(this,k,"f").configObjects||[];let n={};t.local.forEach(i=>{n[i]=!0,(e[i]||[]).forEach(u=>{n[u]=!0})}),Object.assign(a(this,kt,"f"),Object.keys(a(this,et,"f")).reduce((i,u)=>{let c=a(this,et,"f")[u].filter(h=>!(h in n));return c.length>0&&(i[u]=c),i},{})),T(this,et,{},"f");let r=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],o=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return r.forEach(i=>{t[i]=(a(this,k,"f")[i]||[]).filter(u=>!n[u])}),o.forEach(i=>{t[i]=mt(a(this,k,"f")[i],u=>!n[u])}),t.envPrefix=a(this,k,"f").envPrefix,T(this,k,t,"f"),T(this,L,a(this,L,"f")?a(this,L,"f").reset(n):la(this,a(this,J,"f")),"f"),T(this,ce,a(this,ce,"f")?a(this,ce,"f").reset(n):ma(this,a(this,L,"f"),a(this,J,"f")),"f"),T(this,pe,a(this,pe,"f")?a(this,pe,"f").reset():ua(a(this,L,"f"),a(this,ce,"f"),a(this,We,"f"),a(this,J,"f")),"f"),a(this,Re,"f")||T(this,Re,pa(this,a(this,L,"f"),a(this,pe,"f"),a(this,J,"f")),"f"),a(this,We,"f").reset(),T(this,Be,null,"f"),T(this,Ce,"","f"),T(this,Ct,null,"f"),T(this,Se,!1,"f"),this.parsed=!1,this}[ka](e,t){return a(this,J,"f").path.relative(e,t)}[$n](e,t,n,r=0,o=!1){let i=!!n||o;e=e||a(this,Et,"f"),a(this,k,"f").__=a(this,J,"f").y18n.__,a(this,k,"f").configuration=this[Jt]();let u=!!a(this,k,"f").configuration["populate--"],c=Object.assign({},a(this,k,"f").configuration,{"populate--":!0}),h=a(this,J,"f").Parser.detailed(e,Object.assign({},a(this,k,"f"),{configuration:{"parse-positional-numbers":!1,...c}})),p=Object.assign(h.argv,a(this,St,"f")),l,d=h.aliases,C=!1,F=!1;Object.keys(p).forEach(E=>{E===a(this,qe,"f")&&p[E]?C=!0:E===a(this,tt,"f")&&p[E]&&(F=!0)}),p.$0=this.$0,this.parsed=h,r===0&&a(this,L,"f").clearCachedHelpMessage();try{if(this[mr](),t)return this[Rt](p,u,!!n,!1);a(this,qe,"f")&&[a(this,qe,"f")].concat(d[a(this,qe,"f")]||[]).filter(B=>B.length>1).includes(""+p._[p._.length-1])&&(p._.pop(),C=!0),T(this,Ws,!1,"f");let E=a(this,pe,"f").getCommands(),D=a(this,Re,"f").completionKey in p,I=C||D||o;if(p._.length){if(E.length){let x;for(let B=r||0,w;p._[B]!==void 0;B++)if(w=String(p._[B]),E.includes(w)&&w!==a(this,Be,"f")){let R=a(this,pe,"f").runCommand(w,this,h,B+1,o,C||F||o);return this[Rt](R,u,!!n,!1)}else if(!x&&w!==a(this,Be,"f")){x=w;break}!a(this,pe,"f").hasDefaultCommand()&&a(this,Hs,"f")&&x&&!I&&a(this,ce,"f").recommendCommands(x,E)}a(this,Be,"f")&&p._.includes(a(this,Be,"f"))&&!D&&(a(this,Le,"f")&>(!0),this.showCompletionScript(),this.exit(0))}if(a(this,pe,"f").hasDefaultCommand()&&!I){let x=a(this,pe,"f").runCommand(null,this,h,0,o,C||F||o);return this[Rt](x,u,!!n,!1)}if(D){a(this,Le,"f")&>(!0),e=[].concat(e);let x=e.slice(e.indexOf(`--${a(this,Re,"f").completionKey}`)+1);return a(this,Re,"f").getCompletion(x,(B,w)=>{if(B)throw new Q(B.message);(w||[]).forEach(R=>{a(this,hn,"f").log(R)}),this.exit(0)}),this[Rt](p,!u,!!n,!1)}if(a(this,Se,"f")||(C?(a(this,Le,"f")&>(!0),i=!0,this.showHelp("log"),this.exit(0)):F&&(a(this,Le,"f")&>(!0),i=!0,a(this,L,"f").showVersion("log"),this.exit(0))),!i&&a(this,k,"f").skipValidation.length>0&&(i=Object.keys(p).some(x=>a(this,k,"f").skipValidation.indexOf(x)>=0&&p[x]===!0)),!i){if(h.error)throw new Q(h.error.message);if(!D){let x=this[xr](d,{},h.error);n||(l=_t(p,this,a(this,We,"f").getMiddleware(),!0)),l=this[Aa](x,l??p),Z(l)&&!n&&(l=l.then(()=>_t(p,this,a(this,We,"f").getMiddleware(),!1)))}}}catch(E){if(E instanceof Q)a(this,L,"f").fail(E.message,E);else throw E}return this[Rt](l??p,u,!!n,!0)}[xr](e,t,n,r){let o={...this.getDemandedOptions()};return i=>{if(n)throw new Q(n.message);a(this,ce,"f").nonOptionCount(i),a(this,ce,"f").requiredArguments(i,o);let u=!1;a(this,Mt,"f")&&(u=a(this,ce,"f").unknownCommands(i)),a(this,jt,"f")&&!u?a(this,ce,"f").unknownArguments(i,e,t,!!r):a(this,Pt,"f")&&a(this,ce,"f").unknownArguments(i,e,{},!1,!1),a(this,ce,"f").limitedChoices(i),a(this,ce,"f").implications(i),a(this,ce,"f").conflicting(i)}}[ja](){T(this,Se,!0,"f")}[Lt](e){if(typeof e=="string")a(this,k,"f").key[e]=!0;else for(let t of e)a(this,k,"f").key[t]=!0}};function aa(s){return!!s&&typeof s.getInternalMethods=="function"}var jh=Ma(na),Pa=jh;function Mh(s,e){return Pa(s).strict().command("* <template> <outDir>","Create a new project powered by qwik",n=>n.positional("template",{type:"string",desc:"Starter template",choices:e}).positional("outDir",{type:"string",desc:"Directory of the project"}).option("force",{alias:"f",type:"boolean",default:!1,desc:"Overwrite target directory if it exists"}).option("installDeps",{alias:"i",default:!1,type:"boolean",desc:"Install dependencies"}).usage("npm create qwik@latest base ./my-project <options>")).argv}async function $r(...s){let e=ct(),t=await on("app"),n=t.standaloneTemplates.map(({id:d})=>d),r=Mh(s,n),{force:o,installDeps:i,template:u}=r,c=r.outDir;Rn(`Let's create a ${gn(" Qwik App ")} \u2728 (v2.0.0-beta.10-dev+4669425)`),Ph()?c=process.cwd():(c=As(c),Ar.default.existsSync(c)&&Ar.default.readdirSync(c).length>0&&(o?await Wn(c):(ie.error(`Directory "${c}" already exists.`),ie.info("Please either remove this directory, choose another location or run the command again with '--force | -f' flag."),mn(),process.exit(1))));let h=await rn({outDir:c,appId:u,pkgManager:e,templateManager:t}),p=Gt(),l=!1;return i&&(l=await ws(async()=>await wt(e,c).install,{pkgManager:e,spinner:p})),xs(e,h,l),h}function Ph(){return Jh()}function Jh(){try{return process.cwd().startsWith("/home/projects/")}catch{}return!1}var Ys=require("node:path");var zs=he(require("node:fs"));var Or=[["What's the best thing about a Boolean?","Even if you're wrong, you're only off by a bit."],["Why did the developer stay at home?","Because he couldn't find his keys."],["How many programmers does it take to change a lightbulb?","None that's a hardware problem"],["A user interface is like a joke.","If you have to explain it then it is not that good."],["['hip', 'hip']","(hip hip array)"],["A SQL query goes into a bar, walks up to two tables and asks:","'Can I JOIN you?'"],["Why did the developer go to therapy?","He had too many unresolved issues."],["Why do C# and Java developers keep breaking their keyboards?","Because they use a strongly typed language."],["What's the object-oriented way to become wealthy?","Inheritance"],["Where do programmers like to hangout?","The Foo Bar."],["Why do Java programmers wear glasses?","Because they don't C#"],["To understand what recursion is...","You must first understand what recursion is"],["The punchline often arrives before the set-up.","Do you know the problem with UDP jokes?"],["Why did the programmer quit his job?","Because he didn't get arrays."],["Why was the computer tired when it got home?","It had a hard drive."],["There are 10 types of people in this world...","Those who understand binary and those who don't"],["Why do programmers always mix up Halloween and Christmas?","Because Oct 31 == Dec 25"],["I was gonna tell you a joke about UDP...","...but you might not get it."],["Normal People: give me just a second","Developers: give me 1000 milliseconds!"],["Why do programmers prefer dark mode?","Because light attracts bugs."],["Why don't programmers like nature?","It has too many bugs."],["Why was the computer freezing?","It left its Windows open!"],["What did the Java code say to the C code?","You've got no class."],["Why do programmers prefer the outdoors?","Because it's free of bugs."],["Why do programmers love movies?","Because they can 'script' the ending."],["why do desert animals hate Qwik?","Because there's no hydration...."],["What can you do if you cannot push your git changes?","Use the --force, Luke"],["How did the developer announce he's getting married?","'She returned true!'"],["How many Prolog programmers does it take to change a lightbulb?","Yes."],["Why did the developer ground their kid?","They weren't telling the truthy"],["!false","It's funny 'cause it's true."],["Where did the parallel function wash its hands?","Async"],["How do functions break up?","They stop calling each other"],["Why did the functions stop calling each other?","Because they had constant arguments."],["What's the second movie about a database engineer called?","The SQL."],["What did the computer do at lunchtime?","NoSQL."],["Why doesn't Hollywood make more Big Data movies?","Had a byte!"],["What does a baby computer call his father?","Data!"],["I never tell the same joke twice","I have a DRY sense of humor."],["How do programming pirates pass method parameters?","ARRRRRGS."],["Why don't bachelors like Git?","Because they are afraid to commit."],["Why do astronauts use Linux?","They can't open Windows in space!"],["How do front end devs like their brownies?","GUI"],["What do hackers do on a boat?","Phishing."],["Why couldn't the HTML list be trusted?","There were LI's everywhere"],["To the person who invented zero:","Thank's for nothing!"],["What do you call a bee that lives in America?","A USB"],["want about to a race conditions hear joke?",""],["What is a Package Managers favorite holiday?","Dependency Day"],["Where do we get all of these dad jokes from?","A dad-a-base!"],["What advice do you give to a JS developer who has never played baseball?","Try catch."],["We don't have any DNS jokes, know why?","Because it may take 24 hours to get them"],["Why do Front-End Developers eat lunch alone?","Because they don't know how to join tables."],["How do you help JS errors?","You `console` them!"],["When do front end developers go out to eat?","On their lunch <br>."],["What do you call optimistic front-end developers?","Stack half-full developers."]];function Ja(){let s=Math.floor(Math.random()*Or.length);return Or[s]}async function Tr(){let s=ct(),e=await on("app"),t="./qwik-app";Rn(`Let's create a ${gn(" Qwik App ")} \u2728 (v2.0.0-beta.10-dev+4669425)`),await ru(500);let n=await Qr({message:`Where would you like to create your new project? ${at("(Use '.' or './' for current directory)")}`,placeholder:t})||t;ut(n)&&(mn("Operation cancelled."),process.exit(0));let r=e.getBaseApp();if(!r)throw new Error("Base app not found");let o=e.templates.filter(x=>x.id!==r.id).sort((x,B)=>x.name.localeCompare(B.name)),i=As(n.trim());r.target=i;let u=lu(s,r),c=async()=>{await u.abort(),mn("Operation cancelled."),process.exit(0)};ie.info(`Creating new project in ${gn(" "+i+" ")} ... \u{1F407}`);let h=null;if(zs.default.existsSync(i)&&zs.default.readdirSync(i).length>0){let x=await pi({message:`Directory "./${(0,Ys.relative)(process.cwd(),i)}" already exists and is not empty. What would you like to do?`,options:[{value:"exit",label:"Do not overwrite this directory and exit"},{value:"replace",label:"Remove contents of this directory"}]});if(ut(x)||x==="exit")return await c();x==="replace"&&(h=Wn(i))}let p=await pi({message:"Select a starter",options:o.map(x=>{var B;return{label:x.name,value:x.id,hint:(B=x.pkgJson)==null?void 0:B.description}})});if(ut(p))return await c();let l=p,d=await Jn({message:`Would you like to install ${s} dependencies?`,initialValue:!0});if(ut(d))return await c();let C=await Jn({message:"Initialize a new git repository?",initialValue:!0});h&&await h;let F=d;if(!F)u.abort();else if(typeof u.success>"u")try{let x=await Jn({message:"Finishing the install. Wanna hear a joke?",initialValue:!0});if(!ut(x)&&x){let[B,w]=Ja();Hn(xe(`${B.trim()}
|
|
171
|
+
${w.trim()}`),"\u{1F648}")}}catch{}let E=Gt();E.start("Creating App...");let D=await rn({appId:l,outDir:i,pkgManager:s,templateManager:e});if(E.stop("App Created \u{1F430}"),C)if(zs.default.existsSync((0,Ys.join)(i,".git")))ie.info("Git has already been initialized before. Skipping...");else{E.start("Git initializing...");try{let x=[];if(x.push(await Vt("git",["init"],i).install),x.push(await Vt("git",["add","-A"],i).install),x.push(await Vt("git",["commit","-m","Initial commit \u26A1\uFE0F"],i).install),x.some(B=>B===!1))throw"";E.stop("Git initialized \u{1F3B2}")}catch{E.stop("Git failed to initialize"),ie.error(_e("Git failed to initialize. You can do this manually by running: git init"))}}let I=!1;return F&&(I=await ws(async()=>{let x=await u.complete(D.outDir);return x&&await wt(s,D.outDir).install},{pkgManager:s,spinner:E})),xs(s,D,I),D}async function Ra(s){let e=ct(),t=await on("app");return await rn({appId:s.starterId,templateManager:t,outDir:s.outDir,pkgManager:e})}async function Lh(){au(),Wh();try{let s=process.argv.slice(2);s.length>0?await $r(...s):await Tr()}catch(s){Gn(s.message||s)}}function Wh(){let s=process.version,[e,t]=s.replace("v","").split(".");Number(e)<16?(console.error(_e(`Qwik requires Node.js 16.8 or higher. You are currently running Node.js ${s}.`)),process.exit(1)):Number(e)===16?Number(t)<8&&console.warn(ro(`Node.js 16.8 or higher is recommended. You are currently running Node.js ${s}.`)):Number(e)===18&&Number(t)<11&&console.error(_e(`Node.js 18.11 or higher is REQUIRED. From Node 18.0.0 to 18.11.0, there is a bug preventing correct behaviour of Qwik. You are currently running Node.js ${s}. https://github.com/QwikDev/qwik/issues/3035`))}0&&(module.exports={createApp,runCli,runCreateCli,runCreateInteractiveCli});
|
|
165
172
|
/*! Bundled license information:
|
|
166
173
|
|
|
167
174
|
yargs-parser/build/lib/string-utils.js:
|