tsx 4.7.3 → 4.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +4 -8
  2. package/dist/cjs/api/index.cjs +1 -0
  3. package/dist/cjs/api/index.d.ts +16 -0
  4. package/dist/cjs/api/index.mjs +1 -0
  5. package/dist/cjs/index.cjs +1 -1
  6. package/dist/cjs/index.mjs +1 -1
  7. package/dist/cli.cjs +19 -19
  8. package/dist/cli.mjs +24 -24
  9. package/dist/client-SVJjVqAT.mjs +1 -0
  10. package/dist/client-SVUnbl6F.cjs +1 -0
  11. package/dist/esm/index.cjs +3 -3
  12. package/dist/esm/index.mjs +2 -2
  13. package/dist/get-pipe-path-BYPSsSrX.mjs +1 -0
  14. package/dist/get-pipe-path-d1K0T1_d.cjs +1 -0
  15. package/dist/global-require-patch-CDlRjmTW.cjs +1 -0
  16. package/dist/global-require-patch-DjUalNu1.mjs +1 -0
  17. package/dist/index-D78kOPjy.cjs +16 -0
  18. package/dist/index-NttFZkao.mjs +16 -0
  19. package/dist/is-relative-path-pattern-B4sgw8uQ.mjs +1 -0
  20. package/dist/is-relative-path-pattern-D6NaPCaG.cjs +1 -0
  21. package/dist/loader.cjs +1 -1
  22. package/dist/loader.mjs +1 -1
  23. package/dist/package-D2hNxin-.mjs +1 -0
  24. package/dist/package-DTO70U7s.cjs +1 -0
  25. package/dist/preflight.cjs +1 -1
  26. package/dist/preflight.mjs +1 -1
  27. package/dist/repl.cjs +1 -1
  28. package/dist/repl.mjs +1 -1
  29. package/dist/source-map.cjs +2 -2
  30. package/dist/source-map.mjs +2 -2
  31. package/package.json +7 -3
  32. package/dist/client-2f0df4a6.cjs +0 -1
  33. package/dist/client-e665d820.mjs +0 -1
  34. package/dist/get-pipe-path-86e97fc9.cjs +0 -1
  35. package/dist/get-pipe-path-b74d9893.mjs +0 -1
  36. package/dist/index-29948669.mjs +0 -17
  37. package/dist/index-971a6964.cjs +0 -17
  38. package/dist/package-05d0d69c.mjs +0 -1
  39. package/dist/package-399aa504.cjs +0 -1
  40. package/dist/resolve-ts-path-3fca13b7.cjs +0 -1
  41. package/dist/resolve-ts-path-eb3847f5.mjs +0 -1
  42. /package/dist/{node-features-c450ed54.cjs → node-features-CKvB621_.cjs} +0 -0
  43. /package/dist/{node-features-fb266590.mjs → node-features-Dcn4STxq.mjs} +0 -0
  44. /package/dist/{pkgroll_create-require-c530e400.cjs → pkgroll_create-require-B-Pljx_-.cjs} +0 -0
  45. /package/dist/{pkgroll_create-require-b92e8e0d.mjs → pkgroll_create-require-CddX1PP_.mjs} +0 -0
  46. /package/dist/{temporary-directory-04b36185.mjs → temporary-directory-C5UVr6xa.mjs} +0 -0
  47. /package/dist/{temporary-directory-2a027842.cjs → temporary-directory-CoGR4SrV.cjs} +0 -0
package/dist/cli.cjs CHANGED
@@ -1,29 +1,29 @@
1
- "use strict";var me=require("os"),Bn=require("tty"),Sn=require("esbuild"),$n=require("./package-399aa504.cjs"),dt=require("./pkgroll_create-require-c530e400.cjs"),yu=require("url"),Tn=require("child_process"),K=require("path"),J=require("fs"),Ge=require("./node-features-c450ed54.cjs"),xn=require("events"),_e=require("util"),On=require("stream"),Nn=require("net"),Hn=require("./temporary-directory-2a027842.cjs"),Ln=require("./get-pipe-path-86e97fc9.cjs");require("module");const In="known-flag",Pn="unknown-flag",kn="argument",{stringify:Ae}=JSON,Mn=/\B([A-Z])/g,Wn=t=>t.replace(Mn,"-$1").toLowerCase(),{hasOwnProperty:Gn}=Object.prototype,ye=(t,e)=>Gn.call(t,e),jn=t=>Array.isArray(t),wu=t=>typeof t=="function"?[t,!1]:jn(t)?[t[0],!0]:wu(t.type),Un=(t,e)=>t===Boolean?e!=="false":e,Kn=(t,e)=>typeof e=="boolean"?e:t===Number&&e===""?Number.NaN:t(e),Vn=/[\s.:=]/,zn=t=>{const e=`Flag name ${Ae(t)}`;if(t.length===0)throw new Error(`${e} cannot be empty`);if(t.length===1)throw new Error(`${e} must be longer than a character`);const u=t.match(Vn);if(u)throw new Error(`${e} cannot contain ${Ae(u==null?void 0:u[0])}`)},Yn=t=>{const e={},u=(s,n)=>{if(ye(e,s))throw new Error(`Duplicate flags named ${Ae(s)}`);e[s]=n};for(const s in t){if(!ye(t,s))continue;zn(s);const n=t[s],r=[[],...wu(n),n];u(s,r);const i=Wn(s);if(s!==i&&u(i,r),"alias"in n&&typeof n.alias=="string"){const{alias:D}=n,o=`Flag alias ${Ae(D)} for flag ${Ae(s)}`;if(D.length===0)throw new Error(`${o} cannot be empty`);if(D.length>1)throw new Error(`${o} must be a single character`);u(D,r)}}return e},qn=(t,e)=>{const u={};for(const s in t){if(!ye(t,s))continue;const[n,,r,i]=e[s];if(n.length===0&&"default"in i){let{default:D}=i;typeof D=="function"&&(D=D()),u[s]=D}else u[s]=r?n:n.pop()}return u},je="--",Xn=/[.:=]/,Qn=/^-{1,2}\w/,Zn=t=>{if(!Qn.test(t))return;const e=!t.startsWith(je);let u=t.slice(e?1:2),s;const n=u.match(Xn);if(n){const{index:r}=n;s=u.slice(r+1),u=u.slice(0,r)}return[u,s,e]},Jn=(t,{onFlag:e,onArgument:u})=>{let s;const n=(r,i)=>{if(typeof s!="function")return!0;s(r,i),s=void 0};for(let r=0;r<t.length;r+=1){const i=t[r];if(i===je){n();const o=t.slice(r+1);u==null||u(o,[r],!0);break}const D=Zn(i);if(D){if(n(),!e)continue;const[o,a,c]=D;if(c)for(let f=0;f<o.length;f+=1){n();const l=f===o.length-1;s=e(o[f],l?a:void 0,[r,f+1,l])}else s=e(o,a,[r])}else n(i,[r])&&(u==null||u([i],[r]))}n()},er=(t,e)=>{for(const[u,s,n]of e.reverse()){if(s){const r=t[u];let i=r.slice(0,s);if(n||(i+=r.slice(s+1)),i!=="-"){t[u]=i;continue}}t.splice(u,1)}},Ru=(t,e=process.argv.slice(2),{ignore:u}={})=>{const s=[],n=Yn(t),r={},i=[];return i[je]=[],Jn(e,{onFlag(D,o,a){const c=ye(n,D);if(!(u!=null&&u(c?In:Pn,D,o))){if(c){const[f,l]=n[D],E=Un(l,o),p=(F,A)=>{s.push(a),A&&s.push(A),f.push(Kn(l,F||""))};return E===void 0?p:p(E)}ye(r,D)||(r[D]=[]),r[D].push(o===void 0?!0:o),s.push(a)}},onArgument(D,o,a){u!=null&&u(kn,e[o[0]])||(i.push(...D),a?(i[je]=D,e.splice(o[0])):s.push(o))}}),er(e,s),{flags:qn(t,n),unknownFlags:r,_:i}};var tr=Object.create,Ue=Object.defineProperty,ur=Object.defineProperties,sr=Object.getOwnPropertyDescriptor,nr=Object.getOwnPropertyDescriptors,rr=Object.getOwnPropertyNames,bu=Object.getOwnPropertySymbols,ir=Object.getPrototypeOf,vu=Object.prototype.hasOwnProperty,Dr=Object.prototype.propertyIsEnumerable,Bu=(t,e,u)=>e in t?Ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):t[e]=u,Ke=(t,e)=>{for(var u in e||(e={}))vu.call(e,u)&&Bu(t,u,e[u]);if(bu)for(var u of bu(e))Dr.call(e,u)&&Bu(t,u,e[u]);return t},Et=(t,e)=>ur(t,nr(e)),or=t=>Ue(t,"__esModule",{value:!0}),ar=(t,e)=>()=>(t&&(e=t(t=0)),e),lr=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),cr=(t,e,u,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of rr(e))!vu.call(t,n)&&(u||n!=="default")&&Ue(t,n,{get:()=>e[n],enumerable:!(s=sr(e,n))||s.enumerable});return t},fr=(t,e)=>cr(or(Ue(t!=null?tr(ir(t)):{},"default",!e&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),U=ar(()=>{}),hr=lr((t,e)=>{U(),e.exports=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}});U(),U(),U();var dr=t=>{var e,u,s;let n=(e=process.stdout.columns)!=null?e:Number.POSITIVE_INFINITY;return typeof t=="function"&&(t=t(n)),t||(t={}),Array.isArray(t)?{columns:t,stdoutColumns:n}:{columns:(u=t.columns)!=null?u:[],stdoutColumns:(s=t.stdoutColumns)!=null?s:n}};U(),U(),U(),U(),U();function Er({onlyFirst:t=!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,t?void 0:"g")}function Su(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(Er(),"")}U();function pr(t){return Number.isInteger(t)?t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141):!1}var Cr=fr(hr(),1);function De(t){if(typeof t!="string"||t.length===0||(t=Su(t),t.length===0))return 0;t=t.replace((0,Cr.default)()," ");let e=0;for(let u=0;u<t.length;u++){let s=t.codePointAt(u);s<=31||s>=127&&s<=159||s>=768&&s<=879||(s>65535&&u++,e+=pr(s)?2:1)}return e}var $u=t=>Math.max(...t.split(`
2
- `).map(De)),Fr=t=>{let e=[];for(let u of t){let{length:s}=u,n=s-e.length;for(let r=0;r<n;r+=1)e.push(0);for(let r=0;r<s;r+=1){let i=$u(u[r]);i>e[r]&&(e[r]=i)}}return e};U();var Tu=/^\d+%$/,xu={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},gr=(t,e)=>{var u;let s=[];for(let n=0;n<t.length;n+=1){let r=(u=e[n])!=null?u:"auto";if(typeof r=="number"||r==="auto"||r==="content-width"||typeof r=="string"&&Tu.test(r)){s.push(Et(Ke({},xu),{width:r,contentWidth:t[n]}));continue}if(r&&typeof r=="object"){let i=Et(Ke(Ke({},xu),r),{contentWidth:t[n]});i.horizontalPadding=i.paddingLeft+i.paddingRight,s.push(i);continue}throw new Error(`Invalid column width: ${JSON.stringify(r)}`)}return s};function mr(t,e){for(let u of t){let{width:s}=u;if(s==="content-width"&&(u.width=u.contentWidth),s==="auto"){let o=Math.min(20,u.contentWidth);u.width=o,u.autoOverflow=u.contentWidth-o}if(typeof s=="string"&&Tu.test(s)){let o=Number.parseFloat(s.slice(0,-1))/100;u.width=Math.floor(e*o)-(u.paddingLeft+u.paddingRight)}let{horizontalPadding:n}=u,r=1,i=r+n;if(i>=e){let o=i-e,a=Math.ceil(u.paddingLeft/n*o),c=o-a;u.paddingLeft-=a,u.paddingRight-=c,u.horizontalPadding=u.paddingLeft+u.paddingRight}u.paddingLeftString=u.paddingLeft?" ".repeat(u.paddingLeft):"",u.paddingRightString=u.paddingRight?" ".repeat(u.paddingRight):"";let D=e-u.horizontalPadding;u.width=Math.max(Math.min(u.width,D),r)}}var Ou=()=>Object.assign([],{columns:0});function _r(t,e){let u=[Ou()],[s]=u;for(let n of t){let r=n.width+n.horizontalPadding;s.columns+r>e&&(s=Ou(),u.push(s)),s.push(n),s.columns+=r}for(let n of u){let r=n.reduce((l,E)=>l+E.width+E.horizontalPadding,0),i=e-r;if(i===0)continue;let D=n.filter(l=>"autoOverflow"in l),o=D.filter(l=>l.autoOverflow>0),a=o.reduce((l,E)=>l+E.autoOverflow,0),c=Math.min(a,i);for(let l of o){let E=Math.floor(l.autoOverflow/a*c);l.width+=E,i-=E}let f=Math.floor(i/D.length);for(let l=0;l<D.length;l+=1){let E=D[l];l===D.length-1?E.width+=i:E.width+=f,i-=f}}return u}function Ar(t,e,u){let s=gr(u,e);return mr(s,t),_r(s,t)}U(),U(),U();var pt=10,Nu=(t=0)=>e=>`\x1B[${e+t}m`,Hu=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Lu=(t=0)=>(e,u,s)=>`\x1B[${38+t};2;${e};${u};${s}m`;function yr(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[u,s]of Object.entries(e)){for(let[n,r]of Object.entries(s))e[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},s[n]=e[n],t.set(r[0],r[1]);Object.defineProperty(e,u,{value:s,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=Nu(),e.color.ansi256=Hu(),e.color.ansi16m=Lu(),e.bgColor.ansi=Nu(pt),e.bgColor.ansi256=Hu(pt),e.bgColor.ansi16m=Lu(pt),Object.defineProperties(e,{rgbToAnsi256:{value:(u,s,n)=>u===s&&s===n?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(s/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:u=>{let s=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(u.toString(16));if(!s)return[0,0,0];let{colorString:n}=s.groups;n.length===3&&(n=n.split("").map(i=>i+i).join(""));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:u=>e.rgbToAnsi256(...e.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:u=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let s,n,r;if(u>=232)s=((u-232)*10+8)/255,n=s,r=s;else{u-=16;let o=u%36;s=Math.floor(u/36)/5,n=Math.floor(o/6)/5,r=o%6/5}let i=Math.max(s,n,r)*2;if(i===0)return 30;let D=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(s));return i===2&&(D+=60),D},enumerable:!1},rgbToAnsi:{value:(u,s,n)=>e.ansi256ToAnsi(e.rgbToAnsi256(u,s,n)),enumerable:!1},hexToAnsi:{value:u=>e.ansi256ToAnsi(e.hexToAnsi256(u)),enumerable:!1}}),e}var wr=yr(),Rr=wr,Ve=new Set(["\x1B","\x9B"]),br=39,Ct="\x07",Iu="[",vr="]",Pu="m",Ft=`${vr}8;;`,ku=t=>`${Ve.values().next().value}${Iu}${t}${Pu}`,Mu=t=>`${Ve.values().next().value}${Ft}${t}${Ct}`,Br=t=>t.split(" ").map(e=>De(e)),gt=(t,e,u)=>{let s=[...e],n=!1,r=!1,i=De(Su(t[t.length-1]));for(let[D,o]of s.entries()){let a=De(o);if(i+a<=u?t[t.length-1]+=o:(t.push(o),i=0),Ve.has(o)&&(n=!0,r=s.slice(D+1).join("").startsWith(Ft)),n){r?o===Ct&&(n=!1,r=!1):o===Pu&&(n=!1);continue}i+=a,i===u&&D<s.length-1&&(t.push(""),i=0)}!i&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},Sr=t=>{let e=t.split(" "),u=e.length;for(;u>0&&!(De(e[u-1])>0);)u--;return u===e.length?t:e.slice(0,u).join(" ")+e.slice(u).join("")},$r=(t,e,u={})=>{if(u.trim!==!1&&t.trim()==="")return"";let s="",n,r,i=Br(t),D=[""];for(let[a,c]of t.split(" ").entries()){u.trim!==!1&&(D[D.length-1]=D[D.length-1].trimStart());let f=De(D[D.length-1]);if(a!==0&&(f>=e&&(u.wordWrap===!1||u.trim===!1)&&(D.push(""),f=0),(f>0||u.trim===!1)&&(D[D.length-1]+=" ",f++)),u.hard&&i[a]>e){let l=e-f,E=1+Math.floor((i[a]-l-1)/e);Math.floor((i[a]-1)/e)<E&&D.push(""),gt(D,c,e);continue}if(f+i[a]>e&&f>0&&i[a]>0){if(u.wordWrap===!1&&f<e){gt(D,c,e);continue}D.push("")}if(f+i[a]>e&&u.wordWrap===!1){gt(D,c,e);continue}D[D.length-1]+=c}u.trim!==!1&&(D=D.map(a=>Sr(a)));let o=[...D.join(`
3
- `)];for(let[a,c]of o.entries()){if(s+=c,Ve.has(c)){let{groups:l}=new RegExp(`(?:\\${Iu}(?<code>\\d+)m|\\${Ft}(?<uri>.*)${Ct})`).exec(o.slice(a).join(""))||{groups:{}};if(l.code!==void 0){let E=Number.parseFloat(l.code);n=E===br?void 0:E}else l.uri!==void 0&&(r=l.uri.length===0?void 0:l.uri)}let f=Rr.codes.get(Number(n));o[a+1]===`
4
- `?(r&&(s+=Mu("")),n&&f&&(s+=ku(f))):c===`
5
- `&&(n&&f&&(s+=ku(n)),r&&(s+=Mu(r)))}return s};function Tr(t,e,u){return String(t).normalize().replace(/\r\n/g,`
1
+ "use strict";var me=require("os"),Bn=require("tty"),$n=require("esbuild"),Tn=require("./package-DTO70U7s.cjs"),dt=require("./pkgroll_create-require-B-Pljx_-.cjs"),yu=require("url"),xn=require("child_process"),K=require("path"),J=require("fs"),We=require("./node-features-CKvB621_.cjs"),On=require("events"),_e=require("util"),Nn=require("stream"),Hn=require("net"),Ln=require("./temporary-directory-CoGR4SrV.cjs"),wu=require("./get-pipe-path-d1K0T1_d.cjs");require("module");const In="known-flag",Pn="unknown-flag",kn="argument",{stringify:Ae}=JSON,Mn=/\B([A-Z])/g,Gn=t=>t.replace(Mn,"-$1").toLowerCase(),{hasOwnProperty:Wn}=Object.prototype,ye=(t,e)=>Wn.call(t,e),jn=t=>Array.isArray(t),Ru=t=>typeof t=="function"?[t,!1]:jn(t)?[t[0],!0]:Ru(t.type),Un=(t,e)=>t===Boolean?e!=="false":e,Kn=(t,e)=>typeof e=="boolean"?e:t===Number&&e===""?Number.NaN:t(e),Vn=/[\s.:=]/,zn=t=>{const e=`Flag name ${Ae(t)}`;if(t.length===0)throw new Error(`${e} cannot be empty`);if(t.length===1)throw new Error(`${e} must be longer than a character`);const u=t.match(Vn);if(u)throw new Error(`${e} cannot contain ${Ae(u==null?void 0:u[0])}`)},Yn=t=>{const e={},u=(s,n)=>{if(ye(e,s))throw new Error(`Duplicate flags named ${Ae(s)}`);e[s]=n};for(const s in t){if(!ye(t,s))continue;zn(s);const n=t[s],r=[[],...Ru(n),n];u(s,r);const i=Gn(s);if(s!==i&&u(i,r),"alias"in n&&typeof n.alias=="string"){const{alias:D}=n,o=`Flag alias ${Ae(D)} for flag ${Ae(s)}`;if(D.length===0)throw new Error(`${o} cannot be empty`);if(D.length>1)throw new Error(`${o} must be a single character`);u(D,r)}}return e},qn=(t,e)=>{const u={};for(const s in t){if(!ye(t,s))continue;const[n,,r,i]=e[s];if(n.length===0&&"default"in i){let{default:D}=i;typeof D=="function"&&(D=D()),u[s]=D}else u[s]=r?n:n.pop()}return u},je="--",Xn=/[.:=]/,Qn=/^-{1,2}\w/,Zn=t=>{if(!Qn.test(t))return;const e=!t.startsWith(je);let u=t.slice(e?1:2),s;const n=u.match(Xn);if(n){const{index:r}=n;s=u.slice(r+1),u=u.slice(0,r)}return[u,s,e]},Jn=(t,{onFlag:e,onArgument:u})=>{let s;const n=(r,i)=>{if(typeof s!="function")return!0;s(r,i),s=void 0};for(let r=0;r<t.length;r+=1){const i=t[r];if(i===je){n();const o=t.slice(r+1);u==null||u(o,[r],!0);break}const D=Zn(i);if(D){if(n(),!e)continue;const[o,l,c]=D;if(c)for(let f=0;f<o.length;f+=1){n();const a=f===o.length-1;s=e(o[f],a?l:void 0,[r,f+1,a])}else s=e(o,l,[r])}else n(i,[r])&&(u==null||u([i],[r]))}n()},er=(t,e)=>{for(const[u,s,n]of e.reverse()){if(s){const r=t[u];let i=r.slice(0,s);if(n||(i+=r.slice(s+1)),i!=="-"){t[u]=i;continue}}t.splice(u,1)}},bu=(t,e=process.argv.slice(2),{ignore:u}={})=>{const s=[],n=Yn(t),r={},i=[];return i[je]=[],Jn(e,{onFlag(D,o,l){const c=ye(n,D);if(!(u!=null&&u(c?In:Pn,D,o))){if(c){const[f,a]=n[D],E=Un(a,o),p=(F,A)=>{s.push(l),A&&s.push(A),f.push(Kn(a,F||""))};return E===void 0?p:p(E)}ye(r,D)||(r[D]=[]),r[D].push(o===void 0?!0:o),s.push(l)}},onArgument(D,o,l){u!=null&&u(kn,e[o[0]])||(i.push(...D),l?(i[je]=D,e.splice(o[0])):s.push(o))}}),er(e,s),{flags:qn(t,n),unknownFlags:r,_:i}};var tr=Object.create,Ue=Object.defineProperty,ur=Object.defineProperties,sr=Object.getOwnPropertyDescriptor,nr=Object.getOwnPropertyDescriptors,rr=Object.getOwnPropertyNames,vu=Object.getOwnPropertySymbols,ir=Object.getPrototypeOf,Su=Object.prototype.hasOwnProperty,Dr=Object.prototype.propertyIsEnumerable,Bu=(t,e,u)=>e in t?Ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):t[e]=u,Ke=(t,e)=>{for(var u in e||(e={}))Su.call(e,u)&&Bu(t,u,e[u]);if(vu)for(var u of vu(e))Dr.call(e,u)&&Bu(t,u,e[u]);return t},Et=(t,e)=>ur(t,nr(e)),or=t=>Ue(t,"__esModule",{value:!0}),ar=(t,e)=>()=>(t&&(e=t(t=0)),e),lr=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),cr=(t,e,u,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of rr(e))!Su.call(t,n)&&n!=="default"&&Ue(t,n,{get:()=>e[n],enumerable:!(s=sr(e,n))||s.enumerable});return t},fr=(t,e)=>cr(or(Ue(t!=null?tr(ir(t)):{},"default",{value:t,enumerable:!0})),t),U=ar(()=>{}),hr=lr((t,e)=>{U(),e.exports=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}});U(),U(),U();var dr=t=>{var e,u,s;let n=(e=process.stdout.columns)!=null?e:Number.POSITIVE_INFINITY;return typeof t=="function"&&(t=t(n)),t||(t={}),Array.isArray(t)?{columns:t,stdoutColumns:n}:{columns:(u=t.columns)!=null?u:[],stdoutColumns:(s=t.stdoutColumns)!=null?s:n}};U(),U(),U(),U(),U();function Er({onlyFirst:t=!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,t?void 0:"g")}function $u(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(Er(),"")}U();function pr(t){return Number.isInteger(t)?t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141):!1}var Cr=fr(hr());function De(t){if(typeof t!="string"||t.length===0||(t=$u(t),t.length===0))return 0;t=t.replace((0,Cr.default)()," ");let e=0;for(let u=0;u<t.length;u++){let s=t.codePointAt(u);s<=31||s>=127&&s<=159||s>=768&&s<=879||(s>65535&&u++,e+=pr(s)?2:1)}return e}var Tu=t=>Math.max(...t.split(`
2
+ `).map(De)),Fr=t=>{let e=[];for(let u of t){let{length:s}=u,n=s-e.length;for(let r=0;r<n;r+=1)e.push(0);for(let r=0;r<s;r+=1){let i=Tu(u[r]);i>e[r]&&(e[r]=i)}}return e};U();var xu=/^\d+%$/,Ou={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},gr=(t,e)=>{var u;let s=[];for(let n=0;n<t.length;n+=1){let r=(u=e[n])!=null?u:"auto";if(typeof r=="number"||r==="auto"||r==="content-width"||typeof r=="string"&&xu.test(r)){s.push(Et(Ke({},Ou),{width:r,contentWidth:t[n]}));continue}if(r&&typeof r=="object"){let i=Et(Ke(Ke({},Ou),r),{contentWidth:t[n]});i.horizontalPadding=i.paddingLeft+i.paddingRight,s.push(i);continue}throw new Error(`Invalid column width: ${JSON.stringify(r)}`)}return s};function mr(t,e){for(let u of t){let{width:s}=u;if(s==="content-width"&&(u.width=u.contentWidth),s==="auto"){let o=Math.min(20,u.contentWidth);u.width=o,u.autoOverflow=u.contentWidth-o}if(typeof s=="string"&&xu.test(s)){let o=Number.parseFloat(s.slice(0,-1))/100;u.width=Math.floor(e*o)-(u.paddingLeft+u.paddingRight)}let{horizontalPadding:n}=u,r=1,i=r+n;if(i>=e){let o=i-e,l=Math.ceil(u.paddingLeft/n*o),c=o-l;u.paddingLeft-=l,u.paddingRight-=c,u.horizontalPadding=u.paddingLeft+u.paddingRight}u.paddingLeftString=u.paddingLeft?" ".repeat(u.paddingLeft):"",u.paddingRightString=u.paddingRight?" ".repeat(u.paddingRight):"";let D=e-u.horizontalPadding;u.width=Math.max(Math.min(u.width,D),r)}}var Nu=()=>Object.assign([],{columns:0});function _r(t,e){let u=[Nu()],[s]=u;for(let n of t){let r=n.width+n.horizontalPadding;s.columns+r>e&&(s=Nu(),u.push(s)),s.push(n),s.columns+=r}for(let n of u){let r=n.reduce((a,E)=>a+E.width+E.horizontalPadding,0),i=e-r;if(i===0)continue;let D=n.filter(a=>"autoOverflow"in a),o=D.filter(a=>a.autoOverflow>0),l=o.reduce((a,E)=>a+E.autoOverflow,0),c=Math.min(l,i);for(let a of o){let E=Math.floor(a.autoOverflow/l*c);a.width+=E,i-=E}let f=Math.floor(i/D.length);for(let a=0;a<D.length;a+=1){let E=D[a];a===D.length-1?E.width+=i:E.width+=f,i-=f}}return u}function Ar(t,e,u){let s=gr(u,e);return mr(s,t),_r(s,t)}U(),U(),U();var pt=10,Hu=(t=0)=>e=>`\x1B[${e+t}m`,Lu=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Iu=(t=0)=>(e,u,s)=>`\x1B[${38+t};2;${e};${u};${s}m`;function yr(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[u,s]of Object.entries(e)){for(let[n,r]of Object.entries(s))e[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},s[n]=e[n],t.set(r[0],r[1]);Object.defineProperty(e,u,{value:s,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=Hu(),e.color.ansi256=Lu(),e.color.ansi16m=Iu(),e.bgColor.ansi=Hu(pt),e.bgColor.ansi256=Lu(pt),e.bgColor.ansi16m=Iu(pt),Object.defineProperties(e,{rgbToAnsi256:{value:(u,s,n)=>u===s&&s===n?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(s/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:u=>{let s=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(u.toString(16));if(!s)return[0,0,0];let{colorString:n}=s.groups;n.length===3&&(n=n.split("").map(i=>i+i).join(""));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:u=>e.rgbToAnsi256(...e.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:u=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let s,n,r;if(u>=232)s=((u-232)*10+8)/255,n=s,r=s;else{u-=16;let o=u%36;s=Math.floor(u/36)/5,n=Math.floor(o/6)/5,r=o%6/5}let i=Math.max(s,n,r)*2;if(i===0)return 30;let D=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(s));return i===2&&(D+=60),D},enumerable:!1},rgbToAnsi:{value:(u,s,n)=>e.ansi256ToAnsi(e.rgbToAnsi256(u,s,n)),enumerable:!1},hexToAnsi:{value:u=>e.ansi256ToAnsi(e.hexToAnsi256(u)),enumerable:!1}}),e}var wr=yr(),Rr=wr,Ve=new Set(["\x1B","\x9B"]),br=39,Ct="\x07",Pu="[",vr="]",ku="m",Ft=`${vr}8;;`,Mu=t=>`${Ve.values().next().value}${Pu}${t}${ku}`,Gu=t=>`${Ve.values().next().value}${Ft}${t}${Ct}`,Sr=t=>t.split(" ").map(e=>De(e)),gt=(t,e,u)=>{let s=[...e],n=!1,r=!1,i=De($u(t[t.length-1]));for(let[D,o]of s.entries()){let l=De(o);if(i+l<=u?t[t.length-1]+=o:(t.push(o),i=0),Ve.has(o)&&(n=!0,r=s.slice(D+1).join("").startsWith(Ft)),n){r?o===Ct&&(n=!1,r=!1):o===ku&&(n=!1);continue}i+=l,i===u&&D<s.length-1&&(t.push(""),i=0)}!i&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},Br=t=>{let e=t.split(" "),u=e.length;for(;u>0&&!(De(e[u-1])>0);)u--;return u===e.length?t:e.slice(0,u).join(" ")+e.slice(u).join("")},$r=(t,e,u={})=>{if(u.trim!==!1&&t.trim()==="")return"";let s="",n,r,i=Sr(t),D=[""];for(let[l,c]of t.split(" ").entries()){u.trim!==!1&&(D[D.length-1]=D[D.length-1].trimStart());let f=De(D[D.length-1]);if(l!==0&&(f>=e&&(u.wordWrap===!1||u.trim===!1)&&(D.push(""),f=0),(f>0||u.trim===!1)&&(D[D.length-1]+=" ",f++)),u.hard&&i[l]>e){let a=e-f,E=1+Math.floor((i[l]-a-1)/e);Math.floor((i[l]-1)/e)<E&&D.push(""),gt(D,c,e);continue}if(f+i[l]>e&&f>0&&i[l]>0){if(u.wordWrap===!1&&f<e){gt(D,c,e);continue}D.push("")}if(f+i[l]>e&&u.wordWrap===!1){gt(D,c,e);continue}D[D.length-1]+=c}u.trim!==!1&&(D=D.map(l=>Br(l)));let o=[...D.join(`
3
+ `)];for(let[l,c]of o.entries()){if(s+=c,Ve.has(c)){let{groups:a}=new RegExp(`(?:\\${Pu}(?<code>\\d+)m|\\${Ft}(?<uri>.*)${Ct})`).exec(o.slice(l).join(""))||{groups:{}};if(a.code!==void 0){let E=Number.parseFloat(a.code);n=E===br?void 0:E}else a.uri!==void 0&&(r=a.uri.length===0?void 0:a.uri)}let f=Rr.codes.get(Number(n));o[l+1]===`
4
+ `?(r&&(s+=Gu("")),n&&f&&(s+=Mu(f))):c===`
5
+ `&&(n&&f&&(s+=Mu(n)),r&&(s+=Gu(r)))}return s};function Tr(t,e,u){return String(t).normalize().replace(/\r\n/g,`
6
6
  `).split(`
7
7
  `).map(s=>$r(s,e,u)).join(`
8
- `)}var Wu=t=>Array.from({length:t}).fill("");function xr(t,e){let u=[],s=0;for(let n of t){let r=0,i=n.map(o=>{var a;let c=(a=e[s])!=null?a:"";s+=1,o.preprocess&&(c=o.preprocess(c)),$u(c)>o.width&&(c=Tr(c,o.width,{hard:!0}));let f=c.split(`
9
- `);if(o.postprocess){let{postprocess:l}=o;f=f.map((E,p)=>l.call(o,E,p))}return o.paddingTop&&f.unshift(...Wu(o.paddingTop)),o.paddingBottom&&f.push(...Wu(o.paddingBottom)),f.length>r&&(r=f.length),Et(Ke({},o),{lines:f})}),D=[];for(let o=0;o<r;o+=1){let a=i.map(c=>{var f;let l=(f=c.lines[o])!=null?f:"",E=Number.isFinite(c.width)?" ".repeat(c.width-De(l)):"",p=c.paddingLeftString;return c.align==="right"&&(p+=E),p+=l,c.align==="left"&&(p+=E),p+c.paddingRightString}).join("");D.push(a)}u.push(D.join(`
8
+ `)}var Wu=t=>Array.from({length:t}).fill("");function xr(t,e){let u=[],s=0;for(let n of t){let r=0,i=n.map(o=>{var l;let c=(l=e[s])!=null?l:"";s+=1,o.preprocess&&(c=o.preprocess(c)),Tu(c)>o.width&&(c=Tr(c,o.width,{hard:!0}));let f=c.split(`
9
+ `);if(o.postprocess){let{postprocess:a}=o;f=f.map((E,p)=>a.call(o,E,p))}return o.paddingTop&&f.unshift(...Wu(o.paddingTop)),o.paddingBottom&&f.push(...Wu(o.paddingBottom)),f.length>r&&(r=f.length),Et(Ke({},o),{lines:f})}),D=[];for(let o=0;o<r;o+=1){let l=i.map(c=>{var f;let a=(f=c.lines[o])!=null?f:"",E=Number.isFinite(c.width)?" ".repeat(c.width-De(a)):"",p=c.paddingLeftString;return c.align==="right"&&(p+=E),p+=a,c.align==="left"&&(p+=E),p+c.paddingRightString}).join("");D.push(l)}u.push(D.join(`
10
10
  `))}return u.join(`
11
11
  `)}function Or(t,e){if(!t||t.length===0)return"";let u=Fr(t),s=u.length;if(s===0)return"";let{stdoutColumns:n,columns:r}=dr(e);if(r.length>s)throw new Error(`${r.length} columns defined, but only ${s} columns found`);let i=Ar(n,r,u);return t.map(D=>xr(i,D)).join(`
12
- `)}U();var Nr=["<",">","=",">=","<="];function Hr(t){if(!Nr.includes(t))throw new TypeError(`Invalid breakpoint operator: ${t}`)}function Lr(t){let e=Object.keys(t).map(u=>{let[s,n]=u.split(" ");Hr(s);let r=Number.parseInt(n,10);if(Number.isNaN(r))throw new TypeError(`Invalid breakpoint value: ${n}`);let i=t[u];return{operator:s,breakpoint:r,value:i}}).sort((u,s)=>s.breakpoint-u.breakpoint);return u=>{var s;return(s=e.find(({operator:n,breakpoint:r})=>n==="="&&u===r||n===">"&&u>r||n==="<"&&u<r||n===">="&&u>=r||n==="<="&&u<=r))==null?void 0:s.value}}const Ir=t=>t.replace(/[\W_]([a-z\d])?/gi,(e,u)=>u?u.toUpperCase():""),Pr=t=>t.replace(/\B([A-Z])/g,"-$1").toLowerCase(),kr={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:t=>t.trim()},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function Mr(t){let e=!1;return{type:"table",data:{tableData:Object.keys(t).sort((u,s)=>u.localeCompare(s)).map(u=>{const s=t[u],n="alias"in s;return n&&(e=!0),{name:u,flag:s,flagFormatted:`--${Pr(u)}`,aliasesEnabled:e,aliasFormatted:n?`-${s.alias}`:void 0}}).map(u=>(u.aliasesEnabled=e,[{type:"flagName",data:u},{type:"flagDescription",data:u}])),tableBreakpoints:kr}}}const Gu=t=>{var e;return!t||((e=t.version)!=null?e:t.help?t.help.version:void 0)},ju=t=>{var u;const e="parent"in t&&((u=t.parent)==null?void 0:u.name);return(e?`${e} `:"")+t.name};function Wr(t){var s;const e=[];t.name&&e.push(ju(t));const u=(s=Gu(t))!=null?s:"parent"in t&&Gu(t.parent);if(u&&e.push(`v${u}`),e.length!==0)return{id:"name",type:"text",data:`${e.join(" ")}
13
- `}}function Gr(t){const{help:e}=t;if(!(!e||!e.description))return{id:"description",type:"text",data:`${e.description}
12
+ `)}U();var Nr=["<",">","=",">=","<="];function Hr(t){if(!Nr.includes(t))throw new TypeError(`Invalid breakpoint operator: ${t}`)}function Lr(t){let e=Object.keys(t).map(u=>{let[s,n]=u.split(" ");Hr(s);let r=Number.parseInt(n,10);if(Number.isNaN(r))throw new TypeError(`Invalid breakpoint value: ${n}`);let i=t[u];return{operator:s,breakpoint:r,value:i}}).sort((u,s)=>s.breakpoint-u.breakpoint);return u=>{var s;return(s=e.find(({operator:n,breakpoint:r})=>n==="="&&u===r||n===">"&&u>r||n==="<"&&u<r||n===">="&&u>=r||n==="<="&&u<=r))==null?void 0:s.value}}const Ir=t=>t.replace(/[\W_]([a-z\d])?/gi,(e,u)=>u?u.toUpperCase():""),Pr=t=>t.replace(/\B([A-Z])/g,"-$1").toLowerCase(),kr={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:t=>t.trim()},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function Mr(t){let e=!1;return{type:"table",data:{tableData:Object.keys(t).sort((u,s)=>u.localeCompare(s)).map(u=>{const s=t[u],n="alias"in s;return n&&(e=!0),{name:u,flag:s,flagFormatted:`--${Pr(u)}`,aliasesEnabled:e,aliasFormatted:n?`-${s.alias}`:void 0}}).map(u=>(u.aliasesEnabled=e,[{type:"flagName",data:u},{type:"flagDescription",data:u}])),tableBreakpoints:kr}}}const ju=t=>{var e;return!t||((e=t.version)!=null?e:t.help?t.help.version:void 0)},Uu=t=>{var u;const e="parent"in t&&((u=t.parent)==null?void 0:u.name);return(e?`${e} `:"")+t.name};function Gr(t){var s;const e=[];t.name&&e.push(Uu(t));const u=(s=ju(t))!=null?s:"parent"in t&&ju(t.parent);if(u&&e.push(`v${u}`),e.length!==0)return{id:"name",type:"text",data:`${e.join(" ")}
13
+ `}}function Wr(t){const{help:e}=t;if(!(!e||!e.description))return{id:"description",type:"text",data:`${e.description}
14
14
  `}}function jr(t){var u;const e=t.help||{};if("usage"in e)return e.usage?{id:"usage",type:"section",data:{title:"Usage:",body:Array.isArray(e.usage)?e.usage.join(`
15
- `):e.usage}}:void 0;if(t.name){const s=[],n=[ju(t)];if(t.flags&&Object.keys(t.flags).length>0&&n.push("[flags...]"),t.parameters&&t.parameters.length>0){const{parameters:r}=t,i=r.indexOf("--"),D=i>-1&&r.slice(i+1).some(o=>o.startsWith("<"));n.push(r.map(o=>o!=="--"?o:D?"--":"[--]").join(" "))}if(n.length>1&&s.push(n.join(" ")),"commands"in t&&((u=t.commands)!=null&&u.length)&&s.push(`${t.name} <command>`),s.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:s.join(`
15
+ `):e.usage}}:void 0;if(t.name){const s=[],n=[Uu(t)];if(t.flags&&Object.keys(t.flags).length>0&&n.push("[flags...]"),t.parameters&&t.parameters.length>0){const{parameters:r}=t,i=r.indexOf("--"),D=i>-1&&r.slice(i+1).some(o=>o.startsWith("<"));n.push(r.map(o=>o!=="--"?o:D?"--":"[--]").join(" "))}if(n.length>1&&s.push(n.join(" ")),"commands"in t&&((u=t.commands)!=null&&u.length)&&s.push(`${t.name} <command>`),s.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:s.join(`
16
16
  `)}}}}function Ur(t){var e;return!("commands"in t)||!((e=t.commands)!=null&&e.length)?void 0:{id:"commands",type:"section",data:{title:"Commands:",body:{type:"table",data:{tableData:t.commands.map(u=>[u.options.name,u.options.help?u.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}function Kr(t){if(!(!t.flags||Object.keys(t.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:Mr(t.flags),indentBody:0}}}function Vr(t){const{help:e}=t;if(!e||!e.examples||e.examples.length===0)return;let{examples:u}=e;if(Array.isArray(u)&&(u=u.join(`
17
- `)),u)return{id:"examples",type:"section",data:{title:"Examples:",body:u}}}function zr(t){if(!("alias"in t)||!t.alias)return;const{alias:e}=t;return{id:"aliases",type:"section",data:{title:"Aliases:",body:Array.isArray(e)?e.join(", "):e}}}const Yr=t=>[Wr,Gr,jr,Ur,Kr,Vr,zr].map(e=>e(t)).filter(Boolean),qr=Bn.WriteStream.prototype.hasColors();class Xr{text(e){return e}bold(e){return qr?`\x1B[1m${e}\x1B[22m`:e.toLocaleUpperCase()}indentText({text:e,spaces:u}){return e.replace(/^/gm," ".repeat(u))}heading(e){return this.bold(e)}section({title:e,body:u,indentBody:s=2}){return`${(e?`${this.heading(e)}
17
+ `)),u)return{id:"examples",type:"section",data:{title:"Examples:",body:u}}}function zr(t){if(!("alias"in t)||!t.alias)return;const{alias:e}=t;return{id:"aliases",type:"section",data:{title:"Aliases:",body:Array.isArray(e)?e.join(", "):e}}}const Yr=t=>[Gr,Wr,jr,Ur,Kr,Vr,zr].map(e=>e(t)).filter(Boolean),qr=Bn.WriteStream.prototype.hasColors();class Xr{text(e){return e}bold(e){return qr?`\x1B[1m${e}\x1B[22m`:e.toLocaleUpperCase()}indentText({text:e,spaces:u}){return e.replace(/^/gm," ".repeat(u))}heading(e){return this.bold(e)}section({title:e,body:u,indentBody:s=2}){return`${(e?`${this.heading(e)}
18
18
  `:"")+(u?this.indentText({text:this.render(u),spaces:s}):"")}
19
19
  `}table({tableData:e,tableOptions:u,tableBreakpoints:s}){return Or(e.map(n=>n.map(r=>this.render(r))),s?Lr(s):u)}flagParameter(e){return e===Boolean?"":e===String?"<string>":e===Number?"<number>":Array.isArray(e)?this.flagParameter(e[0]):"<value>"}flagOperator(e){return" "}flagName(e){const{flag:u,flagFormatted:s,aliasesEnabled:n,aliasFormatted:r}=e;let i="";if(r?i+=`${r}, `:n&&(i+=" "),i+=s,"placeholder"in u&&typeof u.placeholder=="string")i+=`${this.flagOperator(e)}${u.placeholder}`;else{const D=this.flagParameter("type"in u?u.type:u);D&&(i+=`${this.flagOperator(e)}${D}`)}return i}flagDefault(e){return JSON.stringify(e)}flagDescription({flag:e}){var s;let u="description"in e&&(s=e.description)!=null?s:"";if("default"in e){let{default:n}=e;typeof n=="function"&&(n=n()),n&&(u+=` (default: ${this.flagDefault(n)})`)}return u}render(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(u=>this.render(u)).join(`
20
- `);if("type"in e&&this[e.type]){const u=this[e.type];if(typeof u=="function")return u.call(this,e.data)}throw new Error(`Invalid node type: ${JSON.stringify(e)}`)}}const mt=/^[\w.-]+$/,{stringify:ee}=JSON,Qr=/[|\\{}()[\]^$+*?.]/;function _t(t){const e=[];let u,s;for(const n of t){if(s)throw new Error(`Invalid parameter: Spread parameter ${ee(s)} must be last`);const r=n[0],i=n[n.length-1];let D;if(r==="<"&&i===">"&&(D=!0,u))throw new Error(`Invalid parameter: Required parameter ${ee(n)} cannot come after optional parameter ${ee(u)}`);if(r==="["&&i==="]"&&(D=!1,u=n),D===void 0)throw new Error(`Invalid parameter: ${ee(n)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let o=n.slice(1,-1);const a=o.slice(-3)==="...";a&&(s=n,o=o.slice(0,-3));const c=o.match(Qr);if(c)throw new Error(`Invalid parameter: ${ee(n)}. Invalid character found ${ee(c[0])}`);e.push({name:o,required:D,spread:a})}return e}function At(t,e,u,s){for(let n=0;n<e.length;n+=1){const{name:r,required:i,spread:D}=e[n],o=Ir(r);if(o in t)throw new Error(`Invalid parameter: ${ee(r)} is used more than once.`);const a=D?u.slice(n):u[n];if(D&&(n=e.length),i&&(!a||D&&a.length===0))return console.error(`Error: Missing required parameter ${ee(r)}
21
- `),s(),process.exit(1);t[o]=a}}function Zr(t){return t===void 0||t!==!1}function Uu(t,e,u,s){const n={...e.flags},r=e.version;r&&(n.version={type:Boolean,description:"Show version"});const{help:i}=e,D=Zr(i);D&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const o=Ru(n,s,{ignore:e.ignoreArgv}),a=()=>{console.log(e.version)};if(r&&o.flags.version===!0)return a(),process.exit(0);const c=new Xr,f=D&&(i!=null&&i.render)?i.render:p=>c.render(p),l=p=>{const F=Yr({...e,...p?{help:p}:{},flags:n});console.log(f(F,c))};if(D&&o.flags.help===!0)return l(),process.exit(0);if(e.parameters){let{parameters:p}=e,F=o._;const A=p.indexOf("--"),B=p.slice(A+1),N=Object.create(null);if(A>-1&&B.length>0){p=p.slice(0,A);const S=o._["--"];F=F.slice(0,-S.length||void 0),At(N,_t(p),F,l),At(N,_t(B),S,l)}else At(N,_t(p),F,l);Object.assign(o._,N)}const E={...o,showVersion:a,showHelp:l};return typeof u=="function"&&u(E),{command:t,...E}}function Jr(t,e){const u=new Map;for(const s of e){const n=[s.options.name],{alias:r}=s.options;r&&(Array.isArray(r)?n.push(...r):n.push(r));for(const i of n){if(u.has(i))throw new Error(`Duplicate command name found: ${ee(i)}`);u.set(i,s)}}return u.get(t)}function Ku(t,e,u=process.argv.slice(2)){if(!t)throw new Error("Options is required");if("name"in t&&(!t.name||!mt.test(t.name)))throw new Error(`Invalid script name: ${ee(t.name)}`);const s=u[0];if(t.commands&&mt.test(s)){const n=Jr(s,t.commands);if(n)return Uu(n.options.name,{...n.options,parent:t},n.callback,u.slice(1))}return Uu(void 0,t,e,u)}function ei(t,e){if(!t)throw new Error("Command options are required");const{name:u}=t;if(t.name===void 0)throw new Error("Command name is required");if(!mt.test(u))throw new Error(`Invalid command name ${JSON.stringify(u)}. Command names must be one word.`);return{options:t,callback:e}}var ti=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ui(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var fe={exports:{}},yt,Vu;function si(){if(Vu)return yt;Vu=1,yt=s,s.sync=n;var t=J;function e(r,i){var D=i.pathExt!==void 0?i.pathExt:process.env.PATHEXT;if(!D||(D=D.split(";"),D.indexOf("")!==-1))return!0;for(var o=0;o<D.length;o++){var a=D[o].toLowerCase();if(a&&r.substr(-a.length).toLowerCase()===a)return!0}return!1}function u(r,i,D){return!r.isSymbolicLink()&&!r.isFile()?!1:e(i,D)}function s(r,i,D){t.stat(r,function(o,a){D(o,o?!1:u(a,r,i))})}function n(r,i){return u(t.statSync(r),r,i)}return yt}var wt,zu;function ni(){if(zu)return wt;zu=1,wt=e,e.sync=u;var t=J;function e(r,i,D){t.stat(r,function(o,a){D(o,o?!1:s(a,i))})}function u(r,i){return s(t.statSync(r),i)}function s(r,i){return r.isFile()&&n(r,i)}function n(r,i){var D=r.mode,o=r.uid,a=r.gid,c=i.uid!==void 0?i.uid:process.getuid&&process.getuid(),f=i.gid!==void 0?i.gid:process.getgid&&process.getgid(),l=parseInt("100",8),E=parseInt("010",8),p=parseInt("001",8),F=l|E,A=D&p||D&E&&a===f||D&l&&o===c||D&F&&c===0;return A}return wt}var ze;process.platform==="win32"||ti.TESTING_WINDOWS?ze=si():ze=ni();var ri=Rt;Rt.sync=ii;function Rt(t,e,u){if(typeof e=="function"&&(u=e,e={}),!u){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(s,n){Rt(t,e||{},function(r,i){r?n(r):s(i)})})}ze(t,e||{},function(s,n){s&&(s.code==="EACCES"||e&&e.ignoreErrors)&&(s=null,n=!1),u(s,n)})}function ii(t,e){try{return ze.sync(t,e||{})}catch(u){if(e&&e.ignoreErrors||u.code==="EACCES")return!1;throw u}}const he=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Yu=K,Di=he?";":":",qu=ri,Xu=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),Qu=(t,e)=>{const u=e.colon||Di,s=t.match(/\//)||he&&t.match(/\\/)?[""]:[...he?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(u)],n=he?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",r=he?n.split(u):[""];return he&&t.indexOf(".")!==-1&&r[0]!==""&&r.unshift(""),{pathEnv:s,pathExt:r,pathExtExe:n}},Zu=(t,e,u)=>{typeof e=="function"&&(u=e,e={}),e||(e={});const{pathEnv:s,pathExt:n,pathExtExe:r}=Qu(t,e),i=[],D=a=>new Promise((c,f)=>{if(a===s.length)return e.all&&i.length?c(i):f(Xu(t));const l=s[a],E=/^".*"$/.test(l)?l.slice(1,-1):l,p=Yu.join(E,t),F=!E&&/^\.[\\\/]/.test(t)?t.slice(0,2)+p:p;c(o(F,a,0))}),o=(a,c,f)=>new Promise((l,E)=>{if(f===n.length)return l(D(c+1));const p=n[f];qu(a+p,{pathExt:r},(F,A)=>{if(!F&&A)if(e.all)i.push(a+p);else return l(a+p);return l(o(a,c,f+1))})});return u?D(0).then(a=>u(null,a),u):D(0)},oi=(t,e)=>{e=e||{};const{pathEnv:u,pathExt:s,pathExtExe:n}=Qu(t,e),r=[];for(let i=0;i<u.length;i++){const D=u[i],o=/^".*"$/.test(D)?D.slice(1,-1):D,a=Yu.join(o,t),c=!o&&/^\.[\\\/]/.test(t)?t.slice(0,2)+a:a;for(let f=0;f<s.length;f++){const l=c+s[f];try{if(qu.sync(l,{pathExt:n}))if(e.all)r.push(l);else return l}catch{}}}if(e.all&&r.length)return r;if(e.nothrow)return null;throw Xu(t)};var ai=Zu;Zu.sync=oi;var bt={exports:{}};const Ju=(t={})=>{const e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(s=>s.toUpperCase()==="PATH")||"Path"};bt.exports=Ju,bt.exports.default=Ju;var li=bt.exports;const es=K,ci=ai,fi=li;function ts(t,e){const u=t.options.env||process.env,s=process.cwd(),n=t.options.cwd!=null,r=n&&process.chdir!==void 0&&!process.chdir.disabled;if(r)try{process.chdir(t.options.cwd)}catch{}let i;try{i=ci.sync(t.command,{path:u[fi({env:u})],pathExt:e?es.delimiter:void 0})}catch{}finally{r&&process.chdir(s)}return i&&(i=es.resolve(n?t.options.cwd:"",i)),i}function hi(t){return ts(t)||ts(t,!0)}var di=hi,vt={};const Bt=/([()\][%!^"`<>&|;, *?])/g;function Ei(t){return t=t.replace(Bt,"^$1"),t}function pi(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(Bt,"^$1"),e&&(t=t.replace(Bt,"^$1")),t}vt.command=Ei,vt.argument=pi;var Ci=/^#!(.*)/;const Fi=Ci;var gi=(t="")=>{const e=t.match(Fi);if(!e)return null;const[u,s]=e[0].replace(/#! ?/,"").split(" "),n=u.split("/").pop();return n==="env"?s:s?`${n} ${s}`:n};const St=J,mi=gi;function _i(t){const u=Buffer.alloc(150);let s;try{s=St.openSync(t,"r"),St.readSync(s,u,0,150,0),St.closeSync(s)}catch{}return mi(u.toString())}var Ai=_i;const yi=K,us=di,ss=vt,wi=Ai,Ri=process.platform==="win32",bi=/\.(?:com|exe)$/i,vi=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Bi(t){t.file=us(t);const e=t.file&&wi(t.file);return e?(t.args.unshift(t.file),t.command=e,us(t)):t.file}function Si(t){if(!Ri)return t;const e=Bi(t),u=!bi.test(e);if(t.options.forceShell||u){const s=vi.test(e);t.command=yi.normalize(t.command),t.command=ss.command(t.command),t.args=t.args.map(r=>ss.argument(r,s));const n=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${n}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function $i(t,e,u){e&&!Array.isArray(e)&&(u=e,e=null),e=e?e.slice(0):[],u=Object.assign({},u);const s={command:t,args:e,options:u,file:void 0,original:{command:t,args:e}};return u.shell?s:Si(s)}var Ti=$i;const $t=process.platform==="win32";function Tt(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function xi(t,e){if(!$t)return;const u=t.emit;t.emit=function(s,n){if(s==="exit"){const r=ns(n,e);if(r)return u.call(t,"error",r)}return u.apply(t,arguments)}}function ns(t,e){return $t&&t===1&&!e.file?Tt(e.original,"spawn"):null}function Oi(t,e){return $t&&t===1&&!e.file?Tt(e.original,"spawnSync"):null}var Ni={hookChildProcess:xi,verifyENOENT:ns,verifyENOENTSync:Oi,notFoundError:Tt};const rs=Tn,xt=Ti,Ot=Ni;function is(t,e,u){const s=xt(t,e,u),n=rs.spawn(s.command,s.args,s.options);return Ot.hookChildProcess(n,s),n}function Hi(t,e,u){const s=xt(t,e,u),n=rs.spawnSync(s.command,s.args,s.options);return n.error=n.error||Ot.verifyENOENTSync(n.status,s),n}fe.exports=is,fe.exports.spawn=is,fe.exports.sync=Hi,fe.exports._parse=xt,fe.exports._enoent=Ot;var Li=fe.exports,Ii=ui(Li);const Ds=(t,e)=>{const u={...process.env},s=["inherit","inherit","inherit"];return process.send&&s.push("ipc"),e&&(e.noCache&&(u.TSX_DISABLE_CACHE="1"),e.tsconfigPath&&(u.TSX_TSCONFIG_PATH=e.tsconfigPath)),Ii(process.execPath,["--require",dt.require.resolve("./preflight.cjs"),Ge.isFeatureSupported(Ge.moduleRegister)?"--import":"--loader",yu.pathToFileURL(dt.require.resolve("./loader.mjs")).toString(),...t],{stdio:s,env:u})};var Ye={};const Pi=K,te="\\\\/",os=`[^${te}]`,ue="\\.",ki="\\+",Mi="\\?",qe="\\/",Wi="(?=.)",as="[^/]",Nt=`(?:${qe}|$)`,ls=`(?:^|${qe})`,Ht=`${ue}{1,2}${Nt}`,Gi=`(?!${ue})`,ji=`(?!${ls}${Ht})`,Ui=`(?!${ue}{0,1}${Nt})`,Ki=`(?!${Ht})`,Vi=`[^.${qe}]`,zi=`${as}*?`,cs={DOT_LITERAL:ue,PLUS_LITERAL:ki,QMARK_LITERAL:Mi,SLASH_LITERAL:qe,ONE_CHAR:Wi,QMARK:as,END_ANCHOR:Nt,DOTS_SLASH:Ht,NO_DOT:Gi,NO_DOTS:ji,NO_DOT_SLASH:Ui,NO_DOTS_SLASH:Ki,QMARK_NO_DOT:Vi,STAR:zi,START_ANCHOR:ls},Yi={...cs,SLASH_LITERAL:`[${te}]`,QMARK:os,STAR:`${os}*?`,DOTS_SLASH:`${ue}{1,2}(?:[${te}]|$)`,NO_DOT:`(?!${ue})`,NO_DOTS:`(?!(?:^|[${te}])${ue}{1,2}(?:[${te}]|$))`,NO_DOT_SLASH:`(?!${ue}{0,1}(?:[${te}]|$))`,NO_DOTS_SLASH:`(?!${ue}{1,2}(?:[${te}]|$))`,QMARK_NO_DOT:`[^.${te}]`,START_ANCHOR:`(?:^|[${te}])`,END_ANCHOR:`(?:[${te}]|$)`},qi={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};var Xe={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:qi,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:Pi.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?Yi:cs}};(function(t){const e=K,u=process.platform==="win32",{REGEX_BACKSLASH:s,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=Xe;t.isObject=D=>D!==null&&typeof D=="object"&&!Array.isArray(D),t.hasRegexChars=D=>r.test(D),t.isRegexChar=D=>D.length===1&&t.hasRegexChars(D),t.escapeRegex=D=>D.replace(i,"\\$1"),t.toPosixSlashes=D=>D.replace(s,"/"),t.removeBackslashes=D=>D.replace(n,o=>o==="\\"?"":o),t.supportsLookbehinds=()=>{const D=process.version.slice(1).split(".").map(Number);return D.length===3&&D[0]>=9||D[0]===8&&D[1]>=10},t.isWindows=D=>D&&typeof D.windows=="boolean"?D.windows:u===!0||e.sep==="\\",t.escapeLast=(D,o,a)=>{const c=D.lastIndexOf(o,a);return c===-1?D:D[c-1]==="\\"?t.escapeLast(D,o,c-1):`${D.slice(0,c)}\\${D.slice(c)}`},t.removePrefix=(D,o={})=>{let a=D;return a.startsWith("./")&&(a=a.slice(2),o.prefix="./"),a},t.wrapOutput=(D,o={},a={})=>{const c=a.contains?"":"^",f=a.contains?"":"$";let l=`${c}(?:${D})${f}`;return o.negated===!0&&(l=`(?:^(?!${l}).*$)`),l}})(Ye);const fs=Ye,{CHAR_ASTERISK:Lt,CHAR_AT:Xi,CHAR_BACKWARD_SLASH:we,CHAR_COMMA:Qi,CHAR_DOT:It,CHAR_EXCLAMATION_MARK:Pt,CHAR_FORWARD_SLASH:hs,CHAR_LEFT_CURLY_BRACE:kt,CHAR_LEFT_PARENTHESES:Mt,CHAR_LEFT_SQUARE_BRACKET:Zi,CHAR_PLUS:Ji,CHAR_QUESTION_MARK:ds,CHAR_RIGHT_CURLY_BRACE:eD,CHAR_RIGHT_PARENTHESES:Es,CHAR_RIGHT_SQUARE_BRACKET:tD}=Xe,ps=t=>t===hs||t===we,Cs=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},uD=(t,e)=>{const u=e||{},s=t.length-1,n=u.parts===!0||u.scanToEnd===!0,r=[],i=[],D=[];let o=t,a=-1,c=0,f=0,l=!1,E=!1,p=!1,F=!1,A=!1,B=!1,N=!1,S=!1,X=!1,M=!1,ne=0,W,_,b={value:"",depth:0,isGlob:!1};const k=()=>a>=s,C=()=>o.charCodeAt(a+1),x=()=>(W=_,o.charCodeAt(++a));for(;a<s;){_=x();let G;if(_===we){N=b.backslashes=!0,_=x(),_===kt&&(B=!0);continue}if(B===!0||_===kt){for(ne++;k()!==!0&&(_=x());){if(_===we){N=b.backslashes=!0,x();continue}if(_===kt){ne++;continue}if(B!==!0&&_===It&&(_=x())===It){if(l=b.isBrace=!0,p=b.isGlob=!0,M=!0,n===!0)continue;break}if(B!==!0&&_===Qi){if(l=b.isBrace=!0,p=b.isGlob=!0,M=!0,n===!0)continue;break}if(_===eD&&(ne--,ne===0)){B=!1,l=b.isBrace=!0,M=!0;break}}if(n===!0)continue;break}if(_===hs){if(r.push(a),i.push(b),b={value:"",depth:0,isGlob:!1},M===!0)continue;if(W===It&&a===c+1){c+=2;continue}f=a+1;continue}if(u.noext!==!0&&(_===Ji||_===Xi||_===Lt||_===ds||_===Pt)===!0&&C()===Mt){if(p=b.isGlob=!0,F=b.isExtglob=!0,M=!0,_===Pt&&a===c&&(X=!0),n===!0){for(;k()!==!0&&(_=x());){if(_===we){N=b.backslashes=!0,_=x();continue}if(_===Es){p=b.isGlob=!0,M=!0;break}}continue}break}if(_===Lt){if(W===Lt&&(A=b.isGlobstar=!0),p=b.isGlob=!0,M=!0,n===!0)continue;break}if(_===ds){if(p=b.isGlob=!0,M=!0,n===!0)continue;break}if(_===Zi){for(;k()!==!0&&(G=x());){if(G===we){N=b.backslashes=!0,x();continue}if(G===tD){E=b.isBracket=!0,p=b.isGlob=!0,M=!0;break}}if(n===!0)continue;break}if(u.nonegate!==!0&&_===Pt&&a===c){S=b.negated=!0,c++;continue}if(u.noparen!==!0&&_===Mt){if(p=b.isGlob=!0,n===!0){for(;k()!==!0&&(_=x());){if(_===Mt){N=b.backslashes=!0,_=x();continue}if(_===Es){M=!0;break}}continue}break}if(p===!0){if(M=!0,n===!0)continue;break}}u.noext===!0&&(F=!1,p=!1);let $=o,re="",h="";c>0&&(re=o.slice(0,c),o=o.slice(c),f-=c),$&&p===!0&&f>0?($=o.slice(0,f),h=o.slice(f)):p===!0?($="",h=o):$=o,$&&$!==""&&$!=="/"&&$!==o&&ps($.charCodeAt($.length-1))&&($=$.slice(0,-1)),u.unescape===!0&&(h&&(h=fs.removeBackslashes(h)),$&&N===!0&&($=fs.removeBackslashes($)));const d={prefix:re,input:t,start:c,base:$,glob:h,isBrace:l,isBracket:E,isGlob:p,isExtglob:F,isGlobstar:A,negated:S,negatedExtglob:X};if(u.tokens===!0&&(d.maxDepth=0,ps(_)||i.push(b),d.tokens=i),u.parts===!0||u.tokens===!0){let G;for(let R=0;R<r.length;R++){const Q=G?G+1:c,Z=r[R],V=t.slice(Q,Z);u.tokens&&(R===0&&c!==0?(i[R].isPrefix=!0,i[R].value=re):i[R].value=V,Cs(i[R]),d.maxDepth+=i[R].depth),(R!==0||V!=="")&&D.push(V),G=Z}if(G&&G+1<t.length){const R=t.slice(G+1);D.push(R),u.tokens&&(i[i.length-1].value=R,Cs(i[i.length-1]),d.maxDepth+=i[i.length-1].depth)}d.slashes=r,d.parts=D}return d};var sD=uD;const Qe=Xe,z=Ye,{MAX_LENGTH:Ze,POSIX_REGEX_SOURCE:nD,REGEX_NON_SPECIAL_CHARS:rD,REGEX_SPECIAL_CHARS_BACKREF:iD,REPLACEMENTS:Fs}=Qe,DD=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();const u=`[${t.join("-")}]`;try{new RegExp(u)}catch{return t.map(n=>z.escapeRegex(n)).join("..")}return u},de=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,Wt=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=Fs[t]||t;const u={...e},s=typeof u.maxLength=="number"?Math.min(Ze,u.maxLength):Ze;let n=t.length;if(n>s)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${s}`);const r={type:"bos",value:"",output:u.prepend||""},i=[r],D=u.capture?"":"?:",o=z.isWindows(e),a=Qe.globChars(o),c=Qe.extglobChars(a),{DOT_LITERAL:f,PLUS_LITERAL:l,SLASH_LITERAL:E,ONE_CHAR:p,DOTS_SLASH:F,NO_DOT:A,NO_DOT_SLASH:B,NO_DOTS_SLASH:N,QMARK:S,QMARK_NO_DOT:X,STAR:M,START_ANCHOR:ne}=a,W=m=>`(${D}(?:(?!${ne}${m.dot?F:f}).)*?)`,_=u.dot?"":A,b=u.dot?S:X;let k=u.bash===!0?W(u):M;u.capture&&(k=`(${k})`),typeof u.noext=="boolean"&&(u.noextglob=u.noext);const C={input:t,index:-1,start:0,dot:u.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:i};t=z.removePrefix(t,C),n=t.length;const x=[],$=[],re=[];let h=r,d;const G=()=>C.index===n-1,R=C.peek=(m=1)=>t[C.index+m],Q=C.advance=()=>t[++C.index]||"",Z=()=>t.slice(C.index+1),V=(m="",T=0)=>{C.consumed+=m,C.index+=T},Pe=m=>{C.output+=m.output!=null?m.output:m.value,V(m.value)},bn=()=>{let m=1;for(;R()==="!"&&(R(2)!=="("||R(3)==="?");)Q(),C.start++,m++;return m%2===0?!1:(C.negated=!0,C.start++,!0)},ke=m=>{C[m]++,re.push(m)},ie=m=>{C[m]--,re.pop()},w=m=>{if(h.type==="globstar"){const T=C.braces>0&&(m.type==="comma"||m.type==="brace"),g=m.extglob===!0||x.length&&(m.type==="pipe"||m.type==="paren");m.type!=="slash"&&m.type!=="paren"&&!T&&!g&&(C.output=C.output.slice(0,-h.output.length),h.type="star",h.value="*",h.output=k,C.output+=h.output)}if(x.length&&m.type!=="paren"&&(x[x.length-1].inner+=m.value),(m.value||m.output)&&Pe(m),h&&h.type==="text"&&m.type==="text"){h.value+=m.value,h.output=(h.output||"")+m.value;return}m.prev=h,i.push(m),h=m},Me=(m,T)=>{const g={...c[T],conditions:1,inner:""};g.prev=h,g.parens=C.parens,g.output=C.output;const y=(u.capture?"(":"")+g.open;ke("parens"),w({type:m,value:T,output:C.output?"":p}),w({type:"paren",extglob:!0,value:Q(),output:y}),x.push(g)},vn=m=>{let T=m.close+(u.capture?")":""),g;if(m.type==="negate"){let y=k;if(m.inner&&m.inner.length>1&&m.inner.includes("/")&&(y=W(u)),(y!==k||G()||/^\)+$/.test(Z()))&&(T=m.close=`)$))${y}`),m.inner.includes("*")&&(g=Z())&&/^\.[^\\/.]+$/.test(g)){const O=Wt(g,{...e,fastpaths:!1}).output;T=m.close=`)${O})${y})`}m.prev.type==="bos"&&(C.negatedExtglob=!0)}w({type:"paren",extglob:!0,value:d,output:T}),ie("parens")};if(u.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let m=!1,T=t.replace(iD,(g,y,O,j,L,ht)=>j==="\\"?(m=!0,g):j==="?"?y?y+j+(L?S.repeat(L.length):""):ht===0?b+(L?S.repeat(L.length):""):S.repeat(O.length):j==="."?f.repeat(O.length):j==="*"?y?y+j+(L?k:""):k:y?g:`\\${g}`);return m===!0&&(u.unescape===!0?T=T.replace(/\\/g,""):T=T.replace(/\\+/g,g=>g.length%2===0?"\\\\":g?"\\":"")),T===t&&u.contains===!0?(C.output=t,C):(C.output=z.wrapOutput(T,C,e),C)}for(;!G();){if(d=Q(),d==="\0")continue;if(d==="\\"){const g=R();if(g==="/"&&u.bash!==!0||g==="."||g===";")continue;if(!g){d+="\\",w({type:"text",value:d});continue}const y=/^\\+/.exec(Z());let O=0;if(y&&y[0].length>2&&(O=y[0].length,C.index+=O,O%2!==0&&(d+="\\")),u.unescape===!0?d=Q():d+=Q(),C.brackets===0){w({type:"text",value:d});continue}}if(C.brackets>0&&(d!=="]"||h.value==="["||h.value==="[^")){if(u.posix!==!1&&d===":"){const g=h.value.slice(1);if(g.includes("[")&&(h.posix=!0,g.includes(":"))){const y=h.value.lastIndexOf("["),O=h.value.slice(0,y),j=h.value.slice(y+2),L=nD[j];if(L){h.value=O+L,C.backtrack=!0,Q(),!r.output&&i.indexOf(h)===1&&(r.output=p);continue}}}(d==="["&&R()!==":"||d==="-"&&R()==="]")&&(d=`\\${d}`),d==="]"&&(h.value==="["||h.value==="[^")&&(d=`\\${d}`),u.posix===!0&&d==="!"&&h.value==="["&&(d="^"),h.value+=d,Pe({value:d});continue}if(C.quotes===1&&d!=='"'){d=z.escapeRegex(d),h.value+=d,Pe({value:d});continue}if(d==='"'){C.quotes=C.quotes===1?0:1,u.keepQuotes===!0&&w({type:"text",value:d});continue}if(d==="("){ke("parens"),w({type:"paren",value:d});continue}if(d===")"){if(C.parens===0&&u.strictBrackets===!0)throw new SyntaxError(de("opening","("));const g=x[x.length-1];if(g&&C.parens===g.parens+1){vn(x.pop());continue}w({type:"paren",value:d,output:C.parens?")":"\\)"}),ie("parens");continue}if(d==="["){if(u.nobracket===!0||!Z().includes("]")){if(u.nobracket!==!0&&u.strictBrackets===!0)throw new SyntaxError(de("closing","]"));d=`\\${d}`}else ke("brackets");w({type:"bracket",value:d});continue}if(d==="]"){if(u.nobracket===!0||h&&h.type==="bracket"&&h.value.length===1){w({type:"text",value:d,output:`\\${d}`});continue}if(C.brackets===0){if(u.strictBrackets===!0)throw new SyntaxError(de("opening","["));w({type:"text",value:d,output:`\\${d}`});continue}ie("brackets");const g=h.value.slice(1);if(h.posix!==!0&&g[0]==="^"&&!g.includes("/")&&(d=`/${d}`),h.value+=d,Pe({value:d}),u.literalBrackets===!1||z.hasRegexChars(g))continue;const y=z.escapeRegex(h.value);if(C.output=C.output.slice(0,-h.value.length),u.literalBrackets===!0){C.output+=y,h.value=y;continue}h.value=`(${D}${y}|${h.value})`,C.output+=h.value;continue}if(d==="{"&&u.nobrace!==!0){ke("braces");const g={type:"brace",value:d,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};$.push(g),w(g);continue}if(d==="}"){const g=$[$.length-1];if(u.nobrace===!0||!g){w({type:"text",value:d,output:d});continue}let y=")";if(g.dots===!0){const O=i.slice(),j=[];for(let L=O.length-1;L>=0&&(i.pop(),O[L].type!=="brace");L--)O[L].type!=="dots"&&j.unshift(O[L].value);y=DD(j,u),C.backtrack=!0}if(g.comma!==!0&&g.dots!==!0){const O=C.output.slice(0,g.outputIndex),j=C.tokens.slice(g.tokensIndex);g.value=g.output="\\{",d=y="\\}",C.output=O;for(const L of j)C.output+=L.output||L.value}w({type:"brace",value:d,output:y}),ie("braces"),$.pop();continue}if(d==="|"){x.length>0&&x[x.length-1].conditions++,w({type:"text",value:d});continue}if(d===","){let g=d;const y=$[$.length-1];y&&re[re.length-1]==="braces"&&(y.comma=!0,g="|"),w({type:"comma",value:d,output:g});continue}if(d==="/"){if(h.type==="dot"&&C.index===C.start+1){C.start=C.index+1,C.consumed="",C.output="",i.pop(),h=r;continue}w({type:"slash",value:d,output:E});continue}if(d==="."){if(C.braces>0&&h.type==="dot"){h.value==="."&&(h.output=f);const g=$[$.length-1];h.type="dots",h.output+=d,h.value+=d,g.dots=!0;continue}if(C.braces+C.parens===0&&h.type!=="bos"&&h.type!=="slash"){w({type:"text",value:d,output:f});continue}w({type:"dot",value:d,output:f});continue}if(d==="?"){if(!(h&&h.value==="(")&&u.noextglob!==!0&&R()==="("&&R(2)!=="?"){Me("qmark",d);continue}if(h&&h.type==="paren"){const y=R();let O=d;if(y==="<"&&!z.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(h.value==="("&&!/[!=<:]/.test(y)||y==="<"&&!/<([!=]|\w+>)/.test(Z()))&&(O=`\\${d}`),w({type:"text",value:d,output:O});continue}if(u.dot!==!0&&(h.type==="slash"||h.type==="bos")){w({type:"qmark",value:d,output:X});continue}w({type:"qmark",value:d,output:S});continue}if(d==="!"){if(u.noextglob!==!0&&R()==="("&&(R(2)!=="?"||!/[!=<:]/.test(R(3)))){Me("negate",d);continue}if(u.nonegate!==!0&&C.index===0){bn();continue}}if(d==="+"){if(u.noextglob!==!0&&R()==="("&&R(2)!=="?"){Me("plus",d);continue}if(h&&h.value==="("||u.regex===!1){w({type:"plus",value:d,output:l});continue}if(h&&(h.type==="bracket"||h.type==="paren"||h.type==="brace")||C.parens>0){w({type:"plus",value:d});continue}w({type:"plus",value:l});continue}if(d==="@"){if(u.noextglob!==!0&&R()==="("&&R(2)!=="?"){w({type:"at",extglob:!0,value:d,output:""});continue}w({type:"text",value:d});continue}if(d!=="*"){(d==="$"||d==="^")&&(d=`\\${d}`);const g=rD.exec(Z());g&&(d+=g[0],C.index+=g[0].length),w({type:"text",value:d});continue}if(h&&(h.type==="globstar"||h.star===!0)){h.type="star",h.star=!0,h.value+=d,h.output=k,C.backtrack=!0,C.globstar=!0,V(d);continue}let m=Z();if(u.noextglob!==!0&&/^\([^?]/.test(m)){Me("star",d);continue}if(h.type==="star"){if(u.noglobstar===!0){V(d);continue}const g=h.prev,y=g.prev,O=g.type==="slash"||g.type==="bos",j=y&&(y.type==="star"||y.type==="globstar");if(u.bash===!0&&(!O||m[0]&&m[0]!=="/")){w({type:"star",value:d,output:""});continue}const L=C.braces>0&&(g.type==="comma"||g.type==="brace"),ht=x.length&&(g.type==="pipe"||g.type==="paren");if(!O&&g.type!=="paren"&&!L&&!ht){w({type:"star",value:d,output:""});continue}for(;m.slice(0,3)==="/**";){const We=t[C.index+4];if(We&&We!=="/")break;m=m.slice(3),V("/**",3)}if(g.type==="bos"&&G()){h.type="globstar",h.value+=d,h.output=W(u),C.output=h.output,C.globstar=!0,V(d);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&!j&&G()){C.output=C.output.slice(0,-(g.output+h.output).length),g.output=`(?:${g.output}`,h.type="globstar",h.output=W(u)+(u.strictSlashes?")":"|$)"),h.value+=d,C.globstar=!0,C.output+=g.output+h.output,V(d);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&m[0]==="/"){const We=m[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(g.output+h.output).length),g.output=`(?:${g.output}`,h.type="globstar",h.output=`${W(u)}${E}|${E}${We})`,h.value+=d,C.output+=g.output+h.output,C.globstar=!0,V(d+Q()),w({type:"slash",value:"/",output:""});continue}if(g.type==="bos"&&m[0]==="/"){h.type="globstar",h.value+=d,h.output=`(?:^|${E}|${W(u)}${E})`,C.output=h.output,C.globstar=!0,V(d+Q()),w({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-h.output.length),h.type="globstar",h.output=W(u),h.value+=d,C.output+=h.output,C.globstar=!0,V(d);continue}const T={type:"star",value:d,output:k};if(u.bash===!0){T.output=".*?",(h.type==="bos"||h.type==="slash")&&(T.output=_+T.output),w(T);continue}if(h&&(h.type==="bracket"||h.type==="paren")&&u.regex===!0){T.output=d,w(T);continue}(C.index===C.start||h.type==="slash"||h.type==="dot")&&(h.type==="dot"?(C.output+=B,h.output+=B):u.dot===!0?(C.output+=N,h.output+=N):(C.output+=_,h.output+=_),R()!=="*"&&(C.output+=p,h.output+=p)),w(T)}for(;C.brackets>0;){if(u.strictBrackets===!0)throw new SyntaxError(de("closing","]"));C.output=z.escapeLast(C.output,"["),ie("brackets")}for(;C.parens>0;){if(u.strictBrackets===!0)throw new SyntaxError(de("closing",")"));C.output=z.escapeLast(C.output,"("),ie("parens")}for(;C.braces>0;){if(u.strictBrackets===!0)throw new SyntaxError(de("closing","}"));C.output=z.escapeLast(C.output,"{"),ie("braces")}if(u.strictSlashes!==!0&&(h.type==="star"||h.type==="bracket")&&w({type:"maybe_slash",value:"",output:`${E}?`}),C.backtrack===!0){C.output="";for(const m of C.tokens)C.output+=m.output!=null?m.output:m.value,m.suffix&&(C.output+=m.suffix)}return C};Wt.fastpaths=(t,e)=>{const u={...e},s=typeof u.maxLength=="number"?Math.min(Ze,u.maxLength):Ze,n=t.length;if(n>s)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${s}`);t=Fs[t]||t;const r=z.isWindows(e),{DOT_LITERAL:i,SLASH_LITERAL:D,ONE_CHAR:o,DOTS_SLASH:a,NO_DOT:c,NO_DOTS:f,NO_DOTS_SLASH:l,STAR:E,START_ANCHOR:p}=Qe.globChars(r),F=u.dot?f:c,A=u.dot?l:c,B=u.capture?"":"?:",N={negated:!1,prefix:""};let S=u.bash===!0?".*?":E;u.capture&&(S=`(${S})`);const X=_=>_.noglobstar===!0?S:`(${B}(?:(?!${p}${_.dot?a:i}).)*?)`,M=_=>{switch(_){case"*":return`${F}${o}${S}`;case".*":return`${i}${o}${S}`;case"*.*":return`${F}${S}${i}${o}${S}`;case"*/*":return`${F}${S}${D}${o}${A}${S}`;case"**":return F+X(u);case"**/*":return`(?:${F}${X(u)}${D})?${A}${o}${S}`;case"**/*.*":return`(?:${F}${X(u)}${D})?${A}${S}${i}${o}${S}`;case"**/.*":return`(?:${F}${X(u)}${D})?${i}${o}${S}`;default:{const b=/^(.*?)\.(\w+)$/.exec(_);if(!b)return;const k=M(b[1]);return k?k+i+b[2]:void 0}}},ne=z.removePrefix(t,N);let W=M(ne);return W&&u.strictSlashes!==!0&&(W+=`${D}?`),W};var oD=Wt;const aD=K,lD=sD,Gt=oD,jt=Ye,cD=Xe,fD=t=>t&&typeof t=="object"&&!Array.isArray(t),H=(t,e,u=!1)=>{if(Array.isArray(t)){const c=t.map(l=>H(l,e,u));return l=>{for(const E of c){const p=E(l);if(p)return p}return!1}}const s=fD(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!s)throw new TypeError("Expected pattern to be a non-empty string");const n=e||{},r=jt.isWindows(e),i=s?H.compileRe(t,e):H.makeRe(t,e,!1,!0),D=i.state;delete i.state;let o=()=>!1;if(n.ignore){const c={...e,ignore:null,onMatch:null,onResult:null};o=H(n.ignore,c,u)}const a=(c,f=!1)=>{const{isMatch:l,match:E,output:p}=H.test(c,i,e,{glob:t,posix:r}),F={glob:t,state:D,regex:i,posix:r,input:c,output:p,match:E,isMatch:l};return typeof n.onResult=="function"&&n.onResult(F),l===!1?(F.isMatch=!1,f?F:!1):o(c)?(typeof n.onIgnore=="function"&&n.onIgnore(F),F.isMatch=!1,f?F:!1):(typeof n.onMatch=="function"&&n.onMatch(F),f?F:!0)};return u&&(a.state=D),a};H.test=(t,e,u,{glob:s,posix:n}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};const r=u||{},i=r.format||(n?jt.toPosixSlashes:null);let D=t===s,o=D&&i?i(t):t;return D===!1&&(o=i?i(t):t,D=o===s),(D===!1||r.capture===!0)&&(r.matchBase===!0||r.basename===!0?D=H.matchBase(t,e,u,n):D=e.exec(o)),{isMatch:!!D,match:D,output:o}},H.matchBase=(t,e,u,s=jt.isWindows(u))=>(e instanceof RegExp?e:H.makeRe(e,u)).test(aD.basename(t)),H.isMatch=(t,e,u)=>H(e,u)(t),H.parse=(t,e)=>Array.isArray(t)?t.map(u=>H.parse(u,e)):Gt(t,{...e,fastpaths:!1}),H.scan=(t,e)=>lD(t,e),H.compileRe=(t,e,u=!1,s=!1)=>{if(u===!0)return t.output;const n=e||{},r=n.contains?"":"^",i=n.contains?"":"$";let D=`${r}(?:${t.output})${i}`;t&&t.negated===!0&&(D=`^(?!${D}).*$`);const o=H.toRegex(D,e);return s===!0&&(o.state=t),o},H.makeRe=(t,e={},u=!1,s=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let n={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(n.output=Gt.fastpaths(t,e)),n.output||(n=Gt(t,e)),H.compileRe(n,e,u,s)},H.toRegex=(t,e)=>{try{const u=e||{};return new RegExp(t,u.flags||(u.nocase?"i":""))}catch(u){if(e&&e.debug===!0)throw u;return/$^/}},H.constants=cD;var hD=H,gs=hD;const Re=J,{Readable:dD}=On,be=K,{promisify:Je}=_e,Ut=gs,ED=Je(Re.readdir),pD=Je(Re.stat),ms=Je(Re.lstat),CD=Je(Re.realpath),FD="!",_s="READDIRP_RECURSIVE_ERROR",gD=new Set(["ENOENT","EPERM","EACCES","ELOOP",_s]),Kt="files",As="directories",et="files_directories",tt="all",ys=[Kt,As,et,tt],mD=t=>gD.has(t.code),[ws,_D]=process.versions.node.split(".").slice(0,2).map(t=>Number.parseInt(t,10)),AD=process.platform==="win32"&&(ws>10||ws===10&&_D>=5),Rs=t=>{if(t!==void 0){if(typeof t=="function")return t;if(typeof t=="string"){const e=Ut(t.trim());return u=>e(u.basename)}if(Array.isArray(t)){const e=[],u=[];for(const s of t){const n=s.trim();n.charAt(0)===FD?u.push(Ut(n.slice(1))):e.push(Ut(n))}return u.length>0?e.length>0?s=>e.some(n=>n(s.basename))&&!u.some(n=>n(s.basename)):s=>!u.some(n=>n(s.basename)):s=>e.some(n=>n(s.basename))}}};class ft extends dD{static get defaultOptions(){return{root:".",fileFilter:e=>!0,directoryFilter:e=>!0,type:Kt,lstat:!1,depth:2147483648,alwaysStat:!1}}constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark||4096});const u={...ft.defaultOptions,...e},{root:s,type:n}=u;this._fileFilter=Rs(u.fileFilter),this._directoryFilter=Rs(u.directoryFilter);const r=u.lstat?ms:pD;AD?this._stat=i=>r(i,{bigint:!0}):this._stat=r,this._maxDepth=u.depth,this._wantsDir=[As,et,tt].includes(n),this._wantsFile=[Kt,et,tt].includes(n),this._wantsEverything=n===tt,this._root=be.resolve(s),this._isDirent="Dirent"in Re&&!u.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(s,1)],this.reading=!1,this.parent=void 0}async _read(e){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&e>0;){const{path:u,depth:s,files:n=[]}=this.parent||{};if(n.length>0){const r=n.splice(0,e).map(i=>this._formatEntry(i,u));for(const i of await Promise.all(r)){if(this.destroyed)return;const D=await this._getEntryType(i);D==="directory"&&this._directoryFilter(i)?(s<=this._maxDepth&&this.parents.push(this._exploreDir(i.fullPath,s+1)),this._wantsDir&&(this.push(i),e--)):(D==="file"||this._includeAsFile(i))&&this._fileFilter(i)&&this._wantsFile&&(this.push(i),e--)}}else{const r=this.parents.pop();if(!r){this.push(null);break}if(this.parent=await r,this.destroyed)return}}}catch(u){this.destroy(u)}finally{this.reading=!1}}}async _exploreDir(e,u){let s;try{s=await ED(e,this._rdOptions)}catch(n){this._onError(n)}return{files:s,depth:u,path:e}}async _formatEntry(e,u){let s;try{const n=this._isDirent?e.name:e,r=be.resolve(be.join(u,n));s={path:be.relative(this._root,r),fullPath:r,basename:n},s[this._statsProp]=this._isDirent?e:await this._stat(r)}catch(n){this._onError(n)}return s}_onError(e){mD(e)&&!this.destroyed?this.emit("warn",e):this.destroy(e)}async _getEntryType(e){const u=e&&e[this._statsProp];if(u){if(u.isFile())return"file";if(u.isDirectory())return"directory";if(u&&u.isSymbolicLink()){const s=e.fullPath;try{const n=await CD(s),r=await ms(n);if(r.isFile())return"file";if(r.isDirectory()){const i=n.length;if(s.startsWith(n)&&s.substr(i,1)===be.sep){const D=new Error(`Circular symlink detected: "${s}" points to "${n}"`);return D.code=_s,this._onError(D)}return"directory"}}catch(n){this._onError(n)}}}}_includeAsFile(e){const u=e&&e[this._statsProp];return u&&this._wantsEverything&&!u.isDirectory()}}const Ee=(t,e={})=>{let u=e.entryType||e.type;if(u==="both"&&(u=et),u&&(e.type=u),t){if(typeof t!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(u&&!ys.includes(u))throw new Error(`readdirp: Invalid type passed. Use one of ${ys.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return e.root=t,new ft(e)},yD=(t,e={})=>new Promise((u,s)=>{const n=[];Ee(t,e).on("data",r=>n.push(r)).on("end",()=>u(n)).on("error",r=>s(r))});Ee.promise=yD,Ee.ReaddirpStream=ft,Ee.default=Ee;var wD=Ee,Vt={exports:{}};/*!
20
+ `);if("type"in e&&this[e.type]){const u=this[e.type];if(typeof u=="function")return u.call(this,e.data)}throw new Error(`Invalid node type: ${JSON.stringify(e)}`)}}const mt=/^[\w.-]+$/,{stringify:ee}=JSON,Qr=/[|\\{}()[\]^$+*?.]/;function _t(t){const e=[];let u,s;for(const n of t){if(s)throw new Error(`Invalid parameter: Spread parameter ${ee(s)} must be last`);const r=n[0],i=n[n.length-1];let D;if(r==="<"&&i===">"&&(D=!0,u))throw new Error(`Invalid parameter: Required parameter ${ee(n)} cannot come after optional parameter ${ee(u)}`);if(r==="["&&i==="]"&&(D=!1,u=n),D===void 0)throw new Error(`Invalid parameter: ${ee(n)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let o=n.slice(1,-1);const l=o.slice(-3)==="...";l&&(s=n,o=o.slice(0,-3));const c=o.match(Qr);if(c)throw new Error(`Invalid parameter: ${ee(n)}. Invalid character found ${ee(c[0])}`);e.push({name:o,required:D,spread:l})}return e}function At(t,e,u,s){for(let n=0;n<e.length;n+=1){const{name:r,required:i,spread:D}=e[n],o=Ir(r);if(o in t)throw new Error(`Invalid parameter: ${ee(r)} is used more than once.`);const l=D?u.slice(n):u[n];if(D&&(n=e.length),i&&(!l||D&&l.length===0))return console.error(`Error: Missing required parameter ${ee(r)}
21
+ `),s(),process.exit(1);t[o]=l}}function Zr(t){return t===void 0||t!==!1}function Ku(t,e,u,s){const n={...e.flags},r=e.version;r&&(n.version={type:Boolean,description:"Show version"});const{help:i}=e,D=Zr(i);D&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const o=bu(n,s,{ignore:e.ignoreArgv}),l=()=>{console.log(e.version)};if(r&&o.flags.version===!0)return l(),process.exit(0);const c=new Xr,f=D&&(i!=null&&i.render)?i.render:p=>c.render(p),a=p=>{const F=Yr({...e,...p?{help:p}:{},flags:n});console.log(f(F,c))};if(D&&o.flags.help===!0)return a(),process.exit(0);if(e.parameters){let{parameters:p}=e,F=o._;const A=p.indexOf("--"),S=p.slice(A+1),N=Object.create(null);if(A>-1&&S.length>0){p=p.slice(0,A);const B=o._["--"];F=F.slice(0,-B.length||void 0),At(N,_t(p),F,a),At(N,_t(S),B,a)}else At(N,_t(p),F,a);Object.assign(o._,N)}const E={...o,showVersion:l,showHelp:a};return typeof u=="function"&&u(E),{command:t,...E}}function Jr(t,e){const u=new Map;for(const s of e){const n=[s.options.name],{alias:r}=s.options;r&&(Array.isArray(r)?n.push(...r):n.push(r));for(const i of n){if(u.has(i))throw new Error(`Duplicate command name found: ${ee(i)}`);u.set(i,s)}}return u.get(t)}function Vu(t,e,u=process.argv.slice(2)){if(!t)throw new Error("Options is required");if("name"in t&&(!t.name||!mt.test(t.name)))throw new Error(`Invalid script name: ${ee(t.name)}`);const s=u[0];if(t.commands&&mt.test(s)){const n=Jr(s,t.commands);if(n)return Ku(n.options.name,{...n.options,parent:t},n.callback,u.slice(1))}return Ku(void 0,t,e,u)}function ei(t,e){if(!t)throw new Error("Command options are required");const{name:u}=t;if(t.name===void 0)throw new Error("Command name is required");if(!mt.test(u))throw new Error(`Invalid command name ${JSON.stringify(u)}. Command names must be one word.`);return{options:t,callback:e}}var ti=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ui(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var fe={exports:{}},yt,zu;function si(){if(zu)return yt;zu=1,yt=s,s.sync=n;var t=J;function e(r,i){var D=i.pathExt!==void 0?i.pathExt:process.env.PATHEXT;if(!D||(D=D.split(";"),D.indexOf("")!==-1))return!0;for(var o=0;o<D.length;o++){var l=D[o].toLowerCase();if(l&&r.substr(-l.length).toLowerCase()===l)return!0}return!1}function u(r,i,D){return!r.isSymbolicLink()&&!r.isFile()?!1:e(i,D)}function s(r,i,D){t.stat(r,function(o,l){D(o,o?!1:u(l,r,i))})}function n(r,i){return u(t.statSync(r),r,i)}return yt}var wt,Yu;function ni(){if(Yu)return wt;Yu=1,wt=e,e.sync=u;var t=J;function e(r,i,D){t.stat(r,function(o,l){D(o,o?!1:s(l,i))})}function u(r,i){return s(t.statSync(r),i)}function s(r,i){return r.isFile()&&n(r,i)}function n(r,i){var D=r.mode,o=r.uid,l=r.gid,c=i.uid!==void 0?i.uid:process.getuid&&process.getuid(),f=i.gid!==void 0?i.gid:process.getgid&&process.getgid(),a=parseInt("100",8),E=parseInt("010",8),p=parseInt("001",8),F=a|E,A=D&p||D&E&&l===f||D&a&&o===c||D&F&&c===0;return A}return wt}var ze;process.platform==="win32"||ti.TESTING_WINDOWS?ze=si():ze=ni();var ri=Rt;Rt.sync=ii;function Rt(t,e,u){if(typeof e=="function"&&(u=e,e={}),!u){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(s,n){Rt(t,e||{},function(r,i){r?n(r):s(i)})})}ze(t,e||{},function(s,n){s&&(s.code==="EACCES"||e&&e.ignoreErrors)&&(s=null,n=!1),u(s,n)})}function ii(t,e){try{return ze.sync(t,e||{})}catch(u){if(e&&e.ignoreErrors||u.code==="EACCES")return!1;throw u}}const he=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",qu=K,Di=he?";":":",Xu=ri,Qu=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),Zu=(t,e)=>{const u=e.colon||Di,s=t.match(/\//)||he&&t.match(/\\/)?[""]:[...he?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(u)],n=he?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",r=he?n.split(u):[""];return he&&t.indexOf(".")!==-1&&r[0]!==""&&r.unshift(""),{pathEnv:s,pathExt:r,pathExtExe:n}},Ju=(t,e,u)=>{typeof e=="function"&&(u=e,e={}),e||(e={});const{pathEnv:s,pathExt:n,pathExtExe:r}=Zu(t,e),i=[],D=l=>new Promise((c,f)=>{if(l===s.length)return e.all&&i.length?c(i):f(Qu(t));const a=s[l],E=/^".*"$/.test(a)?a.slice(1,-1):a,p=qu.join(E,t),F=!E&&/^\.[\\\/]/.test(t)?t.slice(0,2)+p:p;c(o(F,l,0))}),o=(l,c,f)=>new Promise((a,E)=>{if(f===n.length)return a(D(c+1));const p=n[f];Xu(l+p,{pathExt:r},(F,A)=>{if(!F&&A)if(e.all)i.push(l+p);else return a(l+p);return a(o(l,c,f+1))})});return u?D(0).then(l=>u(null,l),u):D(0)},oi=(t,e)=>{e=e||{};const{pathEnv:u,pathExt:s,pathExtExe:n}=Zu(t,e),r=[];for(let i=0;i<u.length;i++){const D=u[i],o=/^".*"$/.test(D)?D.slice(1,-1):D,l=qu.join(o,t),c=!o&&/^\.[\\\/]/.test(t)?t.slice(0,2)+l:l;for(let f=0;f<s.length;f++){const a=c+s[f];try{if(Xu.sync(a,{pathExt:n}))if(e.all)r.push(a);else return a}catch{}}}if(e.all&&r.length)return r;if(e.nothrow)return null;throw Qu(t)};var ai=Ju;Ju.sync=oi;var bt={exports:{}};const es=(t={})=>{const e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(s=>s.toUpperCase()==="PATH")||"Path"};bt.exports=es,bt.exports.default=es;var li=bt.exports;const ts=K,ci=ai,fi=li;function us(t,e){const u=t.options.env||process.env,s=process.cwd(),n=t.options.cwd!=null,r=n&&process.chdir!==void 0&&!process.chdir.disabled;if(r)try{process.chdir(t.options.cwd)}catch{}let i;try{i=ci.sync(t.command,{path:u[fi({env:u})],pathExt:e?ts.delimiter:void 0})}catch{}finally{r&&process.chdir(s)}return i&&(i=ts.resolve(n?t.options.cwd:"",i)),i}function hi(t){return us(t)||us(t,!0)}var di=hi,vt={};const St=/([()\][%!^"`<>&|;, *?])/g;function Ei(t){return t=t.replace(St,"^$1"),t}function pi(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(St,"^$1"),e&&(t=t.replace(St,"^$1")),t}vt.command=Ei,vt.argument=pi;var Ci=/^#!(.*)/;const Fi=Ci;var gi=(t="")=>{const e=t.match(Fi);if(!e)return null;const[u,s]=e[0].replace(/#! ?/,"").split(" "),n=u.split("/").pop();return n==="env"?s:s?`${n} ${s}`:n};const Bt=J,mi=gi;function _i(t){const u=Buffer.alloc(150);let s;try{s=Bt.openSync(t,"r"),Bt.readSync(s,u,0,150,0),Bt.closeSync(s)}catch{}return mi(u.toString())}var Ai=_i;const yi=K,ss=di,ns=vt,wi=Ai,Ri=process.platform==="win32",bi=/\.(?:com|exe)$/i,vi=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Si(t){t.file=ss(t);const e=t.file&&wi(t.file);return e?(t.args.unshift(t.file),t.command=e,ss(t)):t.file}function Bi(t){if(!Ri)return t;const e=Si(t),u=!bi.test(e);if(t.options.forceShell||u){const s=vi.test(e);t.command=yi.normalize(t.command),t.command=ns.command(t.command),t.args=t.args.map(r=>ns.argument(r,s));const n=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${n}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function $i(t,e,u){e&&!Array.isArray(e)&&(u=e,e=null),e=e?e.slice(0):[],u=Object.assign({},u);const s={command:t,args:e,options:u,file:void 0,original:{command:t,args:e}};return u.shell?s:Bi(s)}var Ti=$i;const $t=process.platform==="win32";function Tt(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function xi(t,e){if(!$t)return;const u=t.emit;t.emit=function(s,n){if(s==="exit"){const r=rs(n,e);if(r)return u.call(t,"error",r)}return u.apply(t,arguments)}}function rs(t,e){return $t&&t===1&&!e.file?Tt(e.original,"spawn"):null}function Oi(t,e){return $t&&t===1&&!e.file?Tt(e.original,"spawnSync"):null}var Ni={hookChildProcess:xi,verifyENOENT:rs,verifyENOENTSync:Oi,notFoundError:Tt};const is=xn,xt=Ti,Ot=Ni;function Ds(t,e,u){const s=xt(t,e,u),n=is.spawn(s.command,s.args,s.options);return Ot.hookChildProcess(n,s),n}function Hi(t,e,u){const s=xt(t,e,u),n=is.spawnSync(s.command,s.args,s.options);return n.error=n.error||Ot.verifyENOENTSync(n.status,s),n}fe.exports=Ds,fe.exports.spawn=Ds,fe.exports.sync=Hi,fe.exports._parse=xt,fe.exports._enoent=Ot;var Li=fe.exports,Ii=ui(Li);const os=(t,e)=>{const u={...process.env},s=["inherit","inherit","inherit"];return process.send&&s.push("ipc"),e&&(e.noCache&&(u.TSX_DISABLE_CACHE="1"),e.tsconfigPath&&(u.TSX_TSCONFIG_PATH=e.tsconfigPath)),Ii(process.execPath,["--require",dt.require.resolve("./preflight.cjs"),We.isFeatureSupported(We.moduleRegister)?"--import":"--loader",yu.pathToFileURL(dt.require.resolve("./loader.mjs")).toString(),...t],{stdio:s,env:u})};var Ye={};const Pi=K,te="\\\\/",as=`[^${te}]`,ue="\\.",ki="\\+",Mi="\\?",qe="\\/",Gi="(?=.)",ls="[^/]",Nt=`(?:${qe}|$)`,cs=`(?:^|${qe})`,Ht=`${ue}{1,2}${Nt}`,Wi=`(?!${ue})`,ji=`(?!${cs}${Ht})`,Ui=`(?!${ue}{0,1}${Nt})`,Ki=`(?!${Ht})`,Vi=`[^.${qe}]`,zi=`${ls}*?`,fs={DOT_LITERAL:ue,PLUS_LITERAL:ki,QMARK_LITERAL:Mi,SLASH_LITERAL:qe,ONE_CHAR:Gi,QMARK:ls,END_ANCHOR:Nt,DOTS_SLASH:Ht,NO_DOT:Wi,NO_DOTS:ji,NO_DOT_SLASH:Ui,NO_DOTS_SLASH:Ki,QMARK_NO_DOT:Vi,STAR:zi,START_ANCHOR:cs},Yi={...fs,SLASH_LITERAL:`[${te}]`,QMARK:as,STAR:`${as}*?`,DOTS_SLASH:`${ue}{1,2}(?:[${te}]|$)`,NO_DOT:`(?!${ue})`,NO_DOTS:`(?!(?:^|[${te}])${ue}{1,2}(?:[${te}]|$))`,NO_DOT_SLASH:`(?!${ue}{0,1}(?:[${te}]|$))`,NO_DOTS_SLASH:`(?!${ue}{1,2}(?:[${te}]|$))`,QMARK_NO_DOT:`[^.${te}]`,START_ANCHOR:`(?:^|[${te}])`,END_ANCHOR:`(?:[${te}]|$)`},qi={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};var Xe={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:qi,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:Pi.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?Yi:fs}};(function(t){const e=K,u=process.platform==="win32",{REGEX_BACKSLASH:s,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=Xe;t.isObject=D=>D!==null&&typeof D=="object"&&!Array.isArray(D),t.hasRegexChars=D=>r.test(D),t.isRegexChar=D=>D.length===1&&t.hasRegexChars(D),t.escapeRegex=D=>D.replace(i,"\\$1"),t.toPosixSlashes=D=>D.replace(s,"/"),t.removeBackslashes=D=>D.replace(n,o=>o==="\\"?"":o),t.supportsLookbehinds=()=>{const D=process.version.slice(1).split(".").map(Number);return D.length===3&&D[0]>=9||D[0]===8&&D[1]>=10},t.isWindows=D=>D&&typeof D.windows=="boolean"?D.windows:u===!0||e.sep==="\\",t.escapeLast=(D,o,l)=>{const c=D.lastIndexOf(o,l);return c===-1?D:D[c-1]==="\\"?t.escapeLast(D,o,c-1):`${D.slice(0,c)}\\${D.slice(c)}`},t.removePrefix=(D,o={})=>{let l=D;return l.startsWith("./")&&(l=l.slice(2),o.prefix="./"),l},t.wrapOutput=(D,o={},l={})=>{const c=l.contains?"":"^",f=l.contains?"":"$";let a=`${c}(?:${D})${f}`;return o.negated===!0&&(a=`(?:^(?!${a}).*$)`),a}})(Ye);const hs=Ye,{CHAR_ASTERISK:Lt,CHAR_AT:Xi,CHAR_BACKWARD_SLASH:we,CHAR_COMMA:Qi,CHAR_DOT:It,CHAR_EXCLAMATION_MARK:Pt,CHAR_FORWARD_SLASH:ds,CHAR_LEFT_CURLY_BRACE:kt,CHAR_LEFT_PARENTHESES:Mt,CHAR_LEFT_SQUARE_BRACKET:Zi,CHAR_PLUS:Ji,CHAR_QUESTION_MARK:Es,CHAR_RIGHT_CURLY_BRACE:eD,CHAR_RIGHT_PARENTHESES:ps,CHAR_RIGHT_SQUARE_BRACKET:tD}=Xe,Cs=t=>t===ds||t===we,Fs=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},uD=(t,e)=>{const u=e||{},s=t.length-1,n=u.parts===!0||u.scanToEnd===!0,r=[],i=[],D=[];let o=t,l=-1,c=0,f=0,a=!1,E=!1,p=!1,F=!1,A=!1,S=!1,N=!1,B=!1,X=!1,M=!1,ne=0,G,_,b={value:"",depth:0,isGlob:!1};const k=()=>l>=s,C=()=>o.charCodeAt(l+1),x=()=>(G=_,o.charCodeAt(++l));for(;l<s;){_=x();let W;if(_===we){N=b.backslashes=!0,_=x(),_===kt&&(S=!0);continue}if(S===!0||_===kt){for(ne++;k()!==!0&&(_=x());){if(_===we){N=b.backslashes=!0,x();continue}if(_===kt){ne++;continue}if(S!==!0&&_===It&&(_=x())===It){if(a=b.isBrace=!0,p=b.isGlob=!0,M=!0,n===!0)continue;break}if(S!==!0&&_===Qi){if(a=b.isBrace=!0,p=b.isGlob=!0,M=!0,n===!0)continue;break}if(_===eD&&(ne--,ne===0)){S=!1,a=b.isBrace=!0,M=!0;break}}if(n===!0)continue;break}if(_===ds){if(r.push(l),i.push(b),b={value:"",depth:0,isGlob:!1},M===!0)continue;if(G===It&&l===c+1){c+=2;continue}f=l+1;continue}if(u.noext!==!0&&(_===Ji||_===Xi||_===Lt||_===Es||_===Pt)===!0&&C()===Mt){if(p=b.isGlob=!0,F=b.isExtglob=!0,M=!0,_===Pt&&l===c&&(X=!0),n===!0){for(;k()!==!0&&(_=x());){if(_===we){N=b.backslashes=!0,_=x();continue}if(_===ps){p=b.isGlob=!0,M=!0;break}}continue}break}if(_===Lt){if(G===Lt&&(A=b.isGlobstar=!0),p=b.isGlob=!0,M=!0,n===!0)continue;break}if(_===Es){if(p=b.isGlob=!0,M=!0,n===!0)continue;break}if(_===Zi){for(;k()!==!0&&(W=x());){if(W===we){N=b.backslashes=!0,x();continue}if(W===tD){E=b.isBracket=!0,p=b.isGlob=!0,M=!0;break}}if(n===!0)continue;break}if(u.nonegate!==!0&&_===Pt&&l===c){B=b.negated=!0,c++;continue}if(u.noparen!==!0&&_===Mt){if(p=b.isGlob=!0,n===!0){for(;k()!==!0&&(_=x());){if(_===Mt){N=b.backslashes=!0,_=x();continue}if(_===ps){M=!0;break}}continue}break}if(p===!0){if(M=!0,n===!0)continue;break}}u.noext===!0&&(F=!1,p=!1);let $=o,re="",h="";c>0&&(re=o.slice(0,c),o=o.slice(c),f-=c),$&&p===!0&&f>0?($=o.slice(0,f),h=o.slice(f)):p===!0?($="",h=o):$=o,$&&$!==""&&$!=="/"&&$!==o&&Cs($.charCodeAt($.length-1))&&($=$.slice(0,-1)),u.unescape===!0&&(h&&(h=hs.removeBackslashes(h)),$&&N===!0&&($=hs.removeBackslashes($)));const d={prefix:re,input:t,start:c,base:$,glob:h,isBrace:a,isBracket:E,isGlob:p,isExtglob:F,isGlobstar:A,negated:B,negatedExtglob:X};if(u.tokens===!0&&(d.maxDepth=0,Cs(_)||i.push(b),d.tokens=i),u.parts===!0||u.tokens===!0){let W;for(let R=0;R<r.length;R++){const Q=W?W+1:c,Z=r[R],V=t.slice(Q,Z);u.tokens&&(R===0&&c!==0?(i[R].isPrefix=!0,i[R].value=re):i[R].value=V,Fs(i[R]),d.maxDepth+=i[R].depth),(R!==0||V!=="")&&D.push(V),W=Z}if(W&&W+1<t.length){const R=t.slice(W+1);D.push(R),u.tokens&&(i[i.length-1].value=R,Fs(i[i.length-1]),d.maxDepth+=i[i.length-1].depth)}d.slashes=r,d.parts=D}return d};var sD=uD;const Qe=Xe,z=Ye,{MAX_LENGTH:Ze,POSIX_REGEX_SOURCE:nD,REGEX_NON_SPECIAL_CHARS:rD,REGEX_SPECIAL_CHARS_BACKREF:iD,REPLACEMENTS:gs}=Qe,DD=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();const u=`[${t.join("-")}]`;try{new RegExp(u)}catch{return t.map(n=>z.escapeRegex(n)).join("..")}return u},de=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,Gt=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=gs[t]||t;const u={...e},s=typeof u.maxLength=="number"?Math.min(Ze,u.maxLength):Ze;let n=t.length;if(n>s)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${s}`);const r={type:"bos",value:"",output:u.prepend||""},i=[r],D=u.capture?"":"?:",o=z.isWindows(e),l=Qe.globChars(o),c=Qe.extglobChars(l),{DOT_LITERAL:f,PLUS_LITERAL:a,SLASH_LITERAL:E,ONE_CHAR:p,DOTS_SLASH:F,NO_DOT:A,NO_DOT_SLASH:S,NO_DOTS_SLASH:N,QMARK:B,QMARK_NO_DOT:X,STAR:M,START_ANCHOR:ne}=l,G=m=>`(${D}(?:(?!${ne}${m.dot?F:f}).)*?)`,_=u.dot?"":A,b=u.dot?B:X;let k=u.bash===!0?G(u):M;u.capture&&(k=`(${k})`),typeof u.noext=="boolean"&&(u.noextglob=u.noext);const C={input:t,index:-1,start:0,dot:u.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:i};t=z.removePrefix(t,C),n=t.length;const x=[],$=[],re=[];let h=r,d;const W=()=>C.index===n-1,R=C.peek=(m=1)=>t[C.index+m],Q=C.advance=()=>t[++C.index]||"",Z=()=>t.slice(C.index+1),V=(m="",T=0)=>{C.consumed+=m,C.index+=T},Pe=m=>{C.output+=m.output!=null?m.output:m.value,V(m.value)},vn=()=>{let m=1;for(;R()==="!"&&(R(2)!=="("||R(3)==="?");)Q(),C.start++,m++;return m%2===0?!1:(C.negated=!0,C.start++,!0)},ke=m=>{C[m]++,re.push(m)},ie=m=>{C[m]--,re.pop()},w=m=>{if(h.type==="globstar"){const T=C.braces>0&&(m.type==="comma"||m.type==="brace"),g=m.extglob===!0||x.length&&(m.type==="pipe"||m.type==="paren");m.type!=="slash"&&m.type!=="paren"&&!T&&!g&&(C.output=C.output.slice(0,-h.output.length),h.type="star",h.value="*",h.output=k,C.output+=h.output)}if(x.length&&m.type!=="paren"&&(x[x.length-1].inner+=m.value),(m.value||m.output)&&Pe(m),h&&h.type==="text"&&m.type==="text"){h.value+=m.value,h.output=(h.output||"")+m.value;return}m.prev=h,i.push(m),h=m},Me=(m,T)=>{const g={...c[T],conditions:1,inner:""};g.prev=h,g.parens=C.parens,g.output=C.output;const y=(u.capture?"(":"")+g.open;ke("parens"),w({type:m,value:T,output:C.output?"":p}),w({type:"paren",extglob:!0,value:Q(),output:y}),x.push(g)},Sn=m=>{let T=m.close+(u.capture?")":""),g;if(m.type==="negate"){let y=k;if(m.inner&&m.inner.length>1&&m.inner.includes("/")&&(y=G(u)),(y!==k||W()||/^\)+$/.test(Z()))&&(T=m.close=`)$))${y}`),m.inner.includes("*")&&(g=Z())&&/^\.[^\\/.]+$/.test(g)){const O=Gt(g,{...e,fastpaths:!1}).output;T=m.close=`)${O})${y})`}m.prev.type==="bos"&&(C.negatedExtglob=!0)}w({type:"paren",extglob:!0,value:d,output:T}),ie("parens")};if(u.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let m=!1,T=t.replace(iD,(g,y,O,j,L,ht)=>j==="\\"?(m=!0,g):j==="?"?y?y+j+(L?B.repeat(L.length):""):ht===0?b+(L?B.repeat(L.length):""):B.repeat(O.length):j==="."?f.repeat(O.length):j==="*"?y?y+j+(L?k:""):k:y?g:`\\${g}`);return m===!0&&(u.unescape===!0?T=T.replace(/\\/g,""):T=T.replace(/\\+/g,g=>g.length%2===0?"\\\\":g?"\\":"")),T===t&&u.contains===!0?(C.output=t,C):(C.output=z.wrapOutput(T,C,e),C)}for(;!W();){if(d=Q(),d==="\0")continue;if(d==="\\"){const g=R();if(g==="/"&&u.bash!==!0||g==="."||g===";")continue;if(!g){d+="\\",w({type:"text",value:d});continue}const y=/^\\+/.exec(Z());let O=0;if(y&&y[0].length>2&&(O=y[0].length,C.index+=O,O%2!==0&&(d+="\\")),u.unescape===!0?d=Q():d+=Q(),C.brackets===0){w({type:"text",value:d});continue}}if(C.brackets>0&&(d!=="]"||h.value==="["||h.value==="[^")){if(u.posix!==!1&&d===":"){const g=h.value.slice(1);if(g.includes("[")&&(h.posix=!0,g.includes(":"))){const y=h.value.lastIndexOf("["),O=h.value.slice(0,y),j=h.value.slice(y+2),L=nD[j];if(L){h.value=O+L,C.backtrack=!0,Q(),!r.output&&i.indexOf(h)===1&&(r.output=p);continue}}}(d==="["&&R()!==":"||d==="-"&&R()==="]")&&(d=`\\${d}`),d==="]"&&(h.value==="["||h.value==="[^")&&(d=`\\${d}`),u.posix===!0&&d==="!"&&h.value==="["&&(d="^"),h.value+=d,Pe({value:d});continue}if(C.quotes===1&&d!=='"'){d=z.escapeRegex(d),h.value+=d,Pe({value:d});continue}if(d==='"'){C.quotes=C.quotes===1?0:1,u.keepQuotes===!0&&w({type:"text",value:d});continue}if(d==="("){ke("parens"),w({type:"paren",value:d});continue}if(d===")"){if(C.parens===0&&u.strictBrackets===!0)throw new SyntaxError(de("opening","("));const g=x[x.length-1];if(g&&C.parens===g.parens+1){Sn(x.pop());continue}w({type:"paren",value:d,output:C.parens?")":"\\)"}),ie("parens");continue}if(d==="["){if(u.nobracket===!0||!Z().includes("]")){if(u.nobracket!==!0&&u.strictBrackets===!0)throw new SyntaxError(de("closing","]"));d=`\\${d}`}else ke("brackets");w({type:"bracket",value:d});continue}if(d==="]"){if(u.nobracket===!0||h&&h.type==="bracket"&&h.value.length===1){w({type:"text",value:d,output:`\\${d}`});continue}if(C.brackets===0){if(u.strictBrackets===!0)throw new SyntaxError(de("opening","["));w({type:"text",value:d,output:`\\${d}`});continue}ie("brackets");const g=h.value.slice(1);if(h.posix!==!0&&g[0]==="^"&&!g.includes("/")&&(d=`/${d}`),h.value+=d,Pe({value:d}),u.literalBrackets===!1||z.hasRegexChars(g))continue;const y=z.escapeRegex(h.value);if(C.output=C.output.slice(0,-h.value.length),u.literalBrackets===!0){C.output+=y,h.value=y;continue}h.value=`(${D}${y}|${h.value})`,C.output+=h.value;continue}if(d==="{"&&u.nobrace!==!0){ke("braces");const g={type:"brace",value:d,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};$.push(g),w(g);continue}if(d==="}"){const g=$[$.length-1];if(u.nobrace===!0||!g){w({type:"text",value:d,output:d});continue}let y=")";if(g.dots===!0){const O=i.slice(),j=[];for(let L=O.length-1;L>=0&&(i.pop(),O[L].type!=="brace");L--)O[L].type!=="dots"&&j.unshift(O[L].value);y=DD(j,u),C.backtrack=!0}if(g.comma!==!0&&g.dots!==!0){const O=C.output.slice(0,g.outputIndex),j=C.tokens.slice(g.tokensIndex);g.value=g.output="\\{",d=y="\\}",C.output=O;for(const L of j)C.output+=L.output||L.value}w({type:"brace",value:d,output:y}),ie("braces"),$.pop();continue}if(d==="|"){x.length>0&&x[x.length-1].conditions++,w({type:"text",value:d});continue}if(d===","){let g=d;const y=$[$.length-1];y&&re[re.length-1]==="braces"&&(y.comma=!0,g="|"),w({type:"comma",value:d,output:g});continue}if(d==="/"){if(h.type==="dot"&&C.index===C.start+1){C.start=C.index+1,C.consumed="",C.output="",i.pop(),h=r;continue}w({type:"slash",value:d,output:E});continue}if(d==="."){if(C.braces>0&&h.type==="dot"){h.value==="."&&(h.output=f);const g=$[$.length-1];h.type="dots",h.output+=d,h.value+=d,g.dots=!0;continue}if(C.braces+C.parens===0&&h.type!=="bos"&&h.type!=="slash"){w({type:"text",value:d,output:f});continue}w({type:"dot",value:d,output:f});continue}if(d==="?"){if(!(h&&h.value==="(")&&u.noextglob!==!0&&R()==="("&&R(2)!=="?"){Me("qmark",d);continue}if(h&&h.type==="paren"){const y=R();let O=d;if(y==="<"&&!z.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(h.value==="("&&!/[!=<:]/.test(y)||y==="<"&&!/<([!=]|\w+>)/.test(Z()))&&(O=`\\${d}`),w({type:"text",value:d,output:O});continue}if(u.dot!==!0&&(h.type==="slash"||h.type==="bos")){w({type:"qmark",value:d,output:X});continue}w({type:"qmark",value:d,output:B});continue}if(d==="!"){if(u.noextglob!==!0&&R()==="("&&(R(2)!=="?"||!/[!=<:]/.test(R(3)))){Me("negate",d);continue}if(u.nonegate!==!0&&C.index===0){vn();continue}}if(d==="+"){if(u.noextglob!==!0&&R()==="("&&R(2)!=="?"){Me("plus",d);continue}if(h&&h.value==="("||u.regex===!1){w({type:"plus",value:d,output:a});continue}if(h&&(h.type==="bracket"||h.type==="paren"||h.type==="brace")||C.parens>0){w({type:"plus",value:d});continue}w({type:"plus",value:a});continue}if(d==="@"){if(u.noextglob!==!0&&R()==="("&&R(2)!=="?"){w({type:"at",extglob:!0,value:d,output:""});continue}w({type:"text",value:d});continue}if(d!=="*"){(d==="$"||d==="^")&&(d=`\\${d}`);const g=rD.exec(Z());g&&(d+=g[0],C.index+=g[0].length),w({type:"text",value:d});continue}if(h&&(h.type==="globstar"||h.star===!0)){h.type="star",h.star=!0,h.value+=d,h.output=k,C.backtrack=!0,C.globstar=!0,V(d);continue}let m=Z();if(u.noextglob!==!0&&/^\([^?]/.test(m)){Me("star",d);continue}if(h.type==="star"){if(u.noglobstar===!0){V(d);continue}const g=h.prev,y=g.prev,O=g.type==="slash"||g.type==="bos",j=y&&(y.type==="star"||y.type==="globstar");if(u.bash===!0&&(!O||m[0]&&m[0]!=="/")){w({type:"star",value:d,output:""});continue}const L=C.braces>0&&(g.type==="comma"||g.type==="brace"),ht=x.length&&(g.type==="pipe"||g.type==="paren");if(!O&&g.type!=="paren"&&!L&&!ht){w({type:"star",value:d,output:""});continue}for(;m.slice(0,3)==="/**";){const Ge=t[C.index+4];if(Ge&&Ge!=="/")break;m=m.slice(3),V("/**",3)}if(g.type==="bos"&&W()){h.type="globstar",h.value+=d,h.output=G(u),C.output=h.output,C.globstar=!0,V(d);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&!j&&W()){C.output=C.output.slice(0,-(g.output+h.output).length),g.output=`(?:${g.output}`,h.type="globstar",h.output=G(u)+(u.strictSlashes?")":"|$)"),h.value+=d,C.globstar=!0,C.output+=g.output+h.output,V(d);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&m[0]==="/"){const Ge=m[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(g.output+h.output).length),g.output=`(?:${g.output}`,h.type="globstar",h.output=`${G(u)}${E}|${E}${Ge})`,h.value+=d,C.output+=g.output+h.output,C.globstar=!0,V(d+Q()),w({type:"slash",value:"/",output:""});continue}if(g.type==="bos"&&m[0]==="/"){h.type="globstar",h.value+=d,h.output=`(?:^|${E}|${G(u)}${E})`,C.output=h.output,C.globstar=!0,V(d+Q()),w({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-h.output.length),h.type="globstar",h.output=G(u),h.value+=d,C.output+=h.output,C.globstar=!0,V(d);continue}const T={type:"star",value:d,output:k};if(u.bash===!0){T.output=".*?",(h.type==="bos"||h.type==="slash")&&(T.output=_+T.output),w(T);continue}if(h&&(h.type==="bracket"||h.type==="paren")&&u.regex===!0){T.output=d,w(T);continue}(C.index===C.start||h.type==="slash"||h.type==="dot")&&(h.type==="dot"?(C.output+=S,h.output+=S):u.dot===!0?(C.output+=N,h.output+=N):(C.output+=_,h.output+=_),R()!=="*"&&(C.output+=p,h.output+=p)),w(T)}for(;C.brackets>0;){if(u.strictBrackets===!0)throw new SyntaxError(de("closing","]"));C.output=z.escapeLast(C.output,"["),ie("brackets")}for(;C.parens>0;){if(u.strictBrackets===!0)throw new SyntaxError(de("closing",")"));C.output=z.escapeLast(C.output,"("),ie("parens")}for(;C.braces>0;){if(u.strictBrackets===!0)throw new SyntaxError(de("closing","}"));C.output=z.escapeLast(C.output,"{"),ie("braces")}if(u.strictSlashes!==!0&&(h.type==="star"||h.type==="bracket")&&w({type:"maybe_slash",value:"",output:`${E}?`}),C.backtrack===!0){C.output="";for(const m of C.tokens)C.output+=m.output!=null?m.output:m.value,m.suffix&&(C.output+=m.suffix)}return C};Gt.fastpaths=(t,e)=>{const u={...e},s=typeof u.maxLength=="number"?Math.min(Ze,u.maxLength):Ze,n=t.length;if(n>s)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${s}`);t=gs[t]||t;const r=z.isWindows(e),{DOT_LITERAL:i,SLASH_LITERAL:D,ONE_CHAR:o,DOTS_SLASH:l,NO_DOT:c,NO_DOTS:f,NO_DOTS_SLASH:a,STAR:E,START_ANCHOR:p}=Qe.globChars(r),F=u.dot?f:c,A=u.dot?a:c,S=u.capture?"":"?:",N={negated:!1,prefix:""};let B=u.bash===!0?".*?":E;u.capture&&(B=`(${B})`);const X=_=>_.noglobstar===!0?B:`(${S}(?:(?!${p}${_.dot?l:i}).)*?)`,M=_=>{switch(_){case"*":return`${F}${o}${B}`;case".*":return`${i}${o}${B}`;case"*.*":return`${F}${B}${i}${o}${B}`;case"*/*":return`${F}${B}${D}${o}${A}${B}`;case"**":return F+X(u);case"**/*":return`(?:${F}${X(u)}${D})?${A}${o}${B}`;case"**/*.*":return`(?:${F}${X(u)}${D})?${A}${B}${i}${o}${B}`;case"**/.*":return`(?:${F}${X(u)}${D})?${i}${o}${B}`;default:{const b=/^(.*?)\.(\w+)$/.exec(_);if(!b)return;const k=M(b[1]);return k?k+i+b[2]:void 0}}},ne=z.removePrefix(t,N);let G=M(ne);return G&&u.strictSlashes!==!0&&(G+=`${D}?`),G};var oD=Gt;const aD=K,lD=sD,Wt=oD,jt=Ye,cD=Xe,fD=t=>t&&typeof t=="object"&&!Array.isArray(t),H=(t,e,u=!1)=>{if(Array.isArray(t)){const c=t.map(a=>H(a,e,u));return a=>{for(const E of c){const p=E(a);if(p)return p}return!1}}const s=fD(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!s)throw new TypeError("Expected pattern to be a non-empty string");const n=e||{},r=jt.isWindows(e),i=s?H.compileRe(t,e):H.makeRe(t,e,!1,!0),D=i.state;delete i.state;let o=()=>!1;if(n.ignore){const c={...e,ignore:null,onMatch:null,onResult:null};o=H(n.ignore,c,u)}const l=(c,f=!1)=>{const{isMatch:a,match:E,output:p}=H.test(c,i,e,{glob:t,posix:r}),F={glob:t,state:D,regex:i,posix:r,input:c,output:p,match:E,isMatch:a};return typeof n.onResult=="function"&&n.onResult(F),a===!1?(F.isMatch=!1,f?F:!1):o(c)?(typeof n.onIgnore=="function"&&n.onIgnore(F),F.isMatch=!1,f?F:!1):(typeof n.onMatch=="function"&&n.onMatch(F),f?F:!0)};return u&&(l.state=D),l};H.test=(t,e,u,{glob:s,posix:n}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};const r=u||{},i=r.format||(n?jt.toPosixSlashes:null);let D=t===s,o=D&&i?i(t):t;return D===!1&&(o=i?i(t):t,D=o===s),(D===!1||r.capture===!0)&&(r.matchBase===!0||r.basename===!0?D=H.matchBase(t,e,u,n):D=e.exec(o)),{isMatch:!!D,match:D,output:o}},H.matchBase=(t,e,u,s=jt.isWindows(u))=>(e instanceof RegExp?e:H.makeRe(e,u)).test(aD.basename(t)),H.isMatch=(t,e,u)=>H(e,u)(t),H.parse=(t,e)=>Array.isArray(t)?t.map(u=>H.parse(u,e)):Wt(t,{...e,fastpaths:!1}),H.scan=(t,e)=>lD(t,e),H.compileRe=(t,e,u=!1,s=!1)=>{if(u===!0)return t.output;const n=e||{},r=n.contains?"":"^",i=n.contains?"":"$";let D=`${r}(?:${t.output})${i}`;t&&t.negated===!0&&(D=`^(?!${D}).*$`);const o=H.toRegex(D,e);return s===!0&&(o.state=t),o},H.makeRe=(t,e={},u=!1,s=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let n={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(n.output=Wt.fastpaths(t,e)),n.output||(n=Wt(t,e)),H.compileRe(n,e,u,s)},H.toRegex=(t,e)=>{try{const u=e||{};return new RegExp(t,u.flags||(u.nocase?"i":""))}catch(u){if(e&&e.debug===!0)throw u;return/$^/}},H.constants=cD;var hD=H,ms=hD;const Re=J,{Readable:dD}=Nn,be=K,{promisify:Je}=_e,Ut=ms,ED=Je(Re.readdir),pD=Je(Re.stat),_s=Je(Re.lstat),CD=Je(Re.realpath),FD="!",As="READDIRP_RECURSIVE_ERROR",gD=new Set(["ENOENT","EPERM","EACCES","ELOOP",As]),Kt="files",ys="directories",et="files_directories",tt="all",ws=[Kt,ys,et,tt],mD=t=>gD.has(t.code),[Rs,_D]=process.versions.node.split(".").slice(0,2).map(t=>Number.parseInt(t,10)),AD=process.platform==="win32"&&(Rs>10||Rs===10&&_D>=5),bs=t=>{if(t!==void 0){if(typeof t=="function")return t;if(typeof t=="string"){const e=Ut(t.trim());return u=>e(u.basename)}if(Array.isArray(t)){const e=[],u=[];for(const s of t){const n=s.trim();n.charAt(0)===FD?u.push(Ut(n.slice(1))):e.push(Ut(n))}return u.length>0?e.length>0?s=>e.some(n=>n(s.basename))&&!u.some(n=>n(s.basename)):s=>!u.some(n=>n(s.basename)):s=>e.some(n=>n(s.basename))}}};class ft extends dD{static get defaultOptions(){return{root:".",fileFilter:e=>!0,directoryFilter:e=>!0,type:Kt,lstat:!1,depth:2147483648,alwaysStat:!1}}constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark||4096});const u={...ft.defaultOptions,...e},{root:s,type:n}=u;this._fileFilter=bs(u.fileFilter),this._directoryFilter=bs(u.directoryFilter);const r=u.lstat?_s:pD;AD?this._stat=i=>r(i,{bigint:!0}):this._stat=r,this._maxDepth=u.depth,this._wantsDir=[ys,et,tt].includes(n),this._wantsFile=[Kt,et,tt].includes(n),this._wantsEverything=n===tt,this._root=be.resolve(s),this._isDirent="Dirent"in Re&&!u.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(s,1)],this.reading=!1,this.parent=void 0}async _read(e){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&e>0;){const{path:u,depth:s,files:n=[]}=this.parent||{};if(n.length>0){const r=n.splice(0,e).map(i=>this._formatEntry(i,u));for(const i of await Promise.all(r)){if(this.destroyed)return;const D=await this._getEntryType(i);D==="directory"&&this._directoryFilter(i)?(s<=this._maxDepth&&this.parents.push(this._exploreDir(i.fullPath,s+1)),this._wantsDir&&(this.push(i),e--)):(D==="file"||this._includeAsFile(i))&&this._fileFilter(i)&&this._wantsFile&&(this.push(i),e--)}}else{const r=this.parents.pop();if(!r){this.push(null);break}if(this.parent=await r,this.destroyed)return}}}catch(u){this.destroy(u)}finally{this.reading=!1}}}async _exploreDir(e,u){let s;try{s=await ED(e,this._rdOptions)}catch(n){this._onError(n)}return{files:s,depth:u,path:e}}async _formatEntry(e,u){let s;try{const n=this._isDirent?e.name:e,r=be.resolve(be.join(u,n));s={path:be.relative(this._root,r),fullPath:r,basename:n},s[this._statsProp]=this._isDirent?e:await this._stat(r)}catch(n){this._onError(n)}return s}_onError(e){mD(e)&&!this.destroyed?this.emit("warn",e):this.destroy(e)}async _getEntryType(e){const u=e&&e[this._statsProp];if(u){if(u.isFile())return"file";if(u.isDirectory())return"directory";if(u&&u.isSymbolicLink()){const s=e.fullPath;try{const n=await CD(s),r=await _s(n);if(r.isFile())return"file";if(r.isDirectory()){const i=n.length;if(s.startsWith(n)&&s.substr(i,1)===be.sep){const D=new Error(`Circular symlink detected: "${s}" points to "${n}"`);return D.code=As,this._onError(D)}return"directory"}}catch(n){this._onError(n)}}}}_includeAsFile(e){const u=e&&e[this._statsProp];return u&&this._wantsEverything&&!u.isDirectory()}}const Ee=(t,e={})=>{let u=e.entryType||e.type;if(u==="both"&&(u=et),u&&(e.type=u),t){if(typeof t!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(u&&!ws.includes(u))throw new Error(`readdirp: Invalid type passed. Use one of ${ws.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return e.root=t,new ft(e)},yD=(t,e={})=>new Promise((u,s)=>{const n=[];Ee(t,e).on("data",r=>n.push(r)).on("end",()=>u(n)).on("error",r=>s(r))});Ee.promise=yD,Ee.ReaddirpStream=ft,Ee.default=Ee;var wD=Ee,Vt={exports:{}};/*!
22
22
  * normalize-path <https://github.com/jonschlinkert/normalize-path>
23
23
  *
24
24
  * Copyright (c) 2014-2018, Jon Schlinkert.
25
25
  * Released under the MIT License.
26
- */var bs=function(t,e){if(typeof t!="string")throw new TypeError("expected path to be a string");if(t==="\\"||t==="/")return"/";var u=t.length;if(u<=1)return t;var s="";if(u>4&&t[3]==="\\"){var n=t[2];(n==="?"||n===".")&&t.slice(0,2)==="\\\\"&&(t=t.slice(2),s="//")}var r=t.split(/[/\\]+/);return e!==!1&&r[r.length-1]===""&&r.pop(),s+r.join("/")},RD=Vt.exports;Object.defineProperty(RD,"__esModule",{value:!0});const vs=gs,bD=bs,Bs="!",vD={returnIndex:!1},BD=t=>Array.isArray(t)?t:[t],SD=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){const u=vs(t,e);return s=>t===s||u(s)}return t instanceof RegExp?u=>t.test(u):u=>!1},Ss=(t,e,u,s)=>{const n=Array.isArray(u),r=n?u[0]:u;if(!n&&typeof r!="string")throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(r));const i=bD(r,!1);for(let o=0;o<e.length;o++){const a=e[o];if(a(i))return s?-1:!1}const D=n&&[i].concat(u.slice(1));for(let o=0;o<t.length;o++){const a=t[o];if(n?a(...D):a(i))return s?o:!0}return s?-1:!1},zt=(t,e,u=vD)=>{if(t==null)throw new TypeError("anymatch: specify first argument");const s=typeof u=="boolean"?{returnIndex:u}:u,n=s.returnIndex||!1,r=BD(t),i=r.filter(o=>typeof o=="string"&&o.charAt(0)===Bs).map(o=>o.slice(1)).map(o=>vs(o,s)),D=r.filter(o=>typeof o!="string"||typeof o=="string"&&o.charAt(0)!==Bs).map(o=>SD(o,s));return e==null?(o,a=!1)=>Ss(D,i,o,typeof a=="boolean"?a:!1):Ss(D,i,e,n)};zt.default=zt,Vt.exports=zt;var $D=Vt.exports;/*!
26
+ */var vs=function(t,e){if(typeof t!="string")throw new TypeError("expected path to be a string");if(t==="\\"||t==="/")return"/";var u=t.length;if(u<=1)return t;var s="";if(u>4&&t[3]==="\\"){var n=t[2];(n==="?"||n===".")&&t.slice(0,2)==="\\\\"&&(t=t.slice(2),s="//")}var r=t.split(/[/\\]+/);return e!==!1&&r[r.length-1]===""&&r.pop(),s+r.join("/")},RD=Vt.exports;Object.defineProperty(RD,"__esModule",{value:!0});const Ss=ms,bD=vs,Bs="!",vD={returnIndex:!1},SD=t=>Array.isArray(t)?t:[t],BD=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){const u=Ss(t,e);return s=>t===s||u(s)}return t instanceof RegExp?u=>t.test(u):u=>!1},$s=(t,e,u,s)=>{const n=Array.isArray(u),r=n?u[0]:u;if(!n&&typeof r!="string")throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(r));const i=bD(r,!1);for(let o=0;o<e.length;o++){const l=e[o];if(l(i))return s?-1:!1}const D=n&&[i].concat(u.slice(1));for(let o=0;o<t.length;o++){const l=t[o];if(n?l(...D):l(i))return s?o:!0}return s?-1:!1},zt=(t,e,u=vD)=>{if(t==null)throw new TypeError("anymatch: specify first argument");const s=typeof u=="boolean"?{returnIndex:u}:u,n=s.returnIndex||!1,r=SD(t),i=r.filter(o=>typeof o=="string"&&o.charAt(0)===Bs).map(o=>o.slice(1)).map(o=>Ss(o,s)),D=r.filter(o=>typeof o!="string"||typeof o=="string"&&o.charAt(0)!==Bs).map(o=>BD(o,s));return e==null?(o,l=!1)=>$s(D,i,o,typeof l=="boolean"?l:!1):$s(D,i,e,n)};zt.default=zt,Vt.exports=zt;var $D=Vt.exports;/*!
27
27
  * is-extglob <https://github.com/jonschlinkert/is-extglob>
28
28
  *
29
29
  * Copyright (c) 2014-2016, Jon Schlinkert.
@@ -33,7 +33,7 @@
33
33
  *
34
34
  * Copyright (c) 2014-2017, Jon Schlinkert.
35
35
  * Released under the MIT License.
36
- */var xD=TD,$s={"{":"}","(":")","[":"]"},OD=function(t){if(t[0]==="!")return!0;for(var e=0,u=-2,s=-2,n=-2,r=-2,i=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||s!==-1&&t[e]==="["&&t[e+1]!=="]"&&(s<e&&(s=t.indexOf("]",e)),s>e&&(i===-1||i>s||(i=t.indexOf("\\",e),i===-1||i>s)))||n!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(n=t.indexOf("}",e),n>e&&(i=t.indexOf("\\",e),i===-1||i>n))||r!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(r=t.indexOf(")",e),r>e&&(i=t.indexOf("\\",e),i===-1||i>r))||u!==-1&&t[e]==="("&&t[e+1]!=="|"&&(u<e&&(u=t.indexOf("|",e)),u!==-1&&t[u+1]!==")"&&(r=t.indexOf(")",u),r>u&&(i=t.indexOf("\\",u),i===-1||i>r))))return!0;if(t[e]==="\\"){var D=t[e+1];e+=2;var o=$s[D];if(o){var a=t.indexOf(o,e);a!==-1&&(e=a+1)}if(t[e]==="!")return!0}else e++}return!1},ND=function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var u=t[e+1];e+=2;var s=$s[u];if(s){var n=t.indexOf(s,e);n!==-1&&(e=n+1)}if(t[e]==="!")return!0}else e++}return!1},Ts=function(e,u){if(typeof e!="string"||e==="")return!1;if(xD(e))return!0;var s=OD;return u&&u.strict===!1&&(s=ND),s(e)},HD=Ts,LD=K.posix.dirname,ID=me.platform()==="win32",Yt="/",PD=/\\/g,kD=/[\{\[].*[\}\]]$/,MD=/(^|[^\\])([\{\[]|\([^\)]+$)/,WD=/\\([\!\*\?\|\[\]\(\)\{\}])/g,GD=function(e,u){var s=Object.assign({flipBackslashes:!0},u);s.flipBackslashes&&ID&&e.indexOf(Yt)<0&&(e=e.replace(PD,Yt)),kD.test(e)&&(e+=Yt),e+="a";do e=LD(e);while(HD(e)||MD.test(e));return e.replace(WD,"$1")},ut={};(function(t){t.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1,t.find=(e,u)=>e.nodes.find(s=>s.type===u),t.exceedsLimit=(e,u,s=1,n)=>n===!1||!t.isInteger(e)||!t.isInteger(u)?!1:(Number(u)-Number(e))/Number(s)>=n,t.escapeNode=(e,u=0,s)=>{let n=e.nodes[u];n&&(s&&n.type===s||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)},t.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0),t.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:!(e.commas>>0+e.ranges>>0)||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1,t.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0,t.reduce=e=>e.reduce((u,s)=>(s.type==="text"&&u.push(s.value),s.type==="range"&&(s.type="text"),u),[]),t.flatten=(...e)=>{const u=[],s=n=>{for(let r=0;r<n.length;r++){let i=n[r];Array.isArray(i)?s(i):i!==void 0&&u.push(i)}return u};return s(e),u}})(ut);const xs=ut;var qt=(t,e={})=>{let u=(s,n={})=>{let r=e.escapeInvalid&&xs.isInvalidBrace(n),i=s.invalid===!0&&e.escapeInvalid===!0,D="";if(s.value)return(r||i)&&xs.isOpenOrClose(s)?"\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(let o of s.nodes)D+=u(o);return D};return u(t)};/*!
36
+ */var xD=TD,Ts={"{":"}","(":")","[":"]"},OD=function(t){if(t[0]==="!")return!0;for(var e=0,u=-2,s=-2,n=-2,r=-2,i=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||s!==-1&&t[e]==="["&&t[e+1]!=="]"&&(s<e&&(s=t.indexOf("]",e)),s>e&&(i===-1||i>s||(i=t.indexOf("\\",e),i===-1||i>s)))||n!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(n=t.indexOf("}",e),n>e&&(i=t.indexOf("\\",e),i===-1||i>n))||r!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(r=t.indexOf(")",e),r>e&&(i=t.indexOf("\\",e),i===-1||i>r))||u!==-1&&t[e]==="("&&t[e+1]!=="|"&&(u<e&&(u=t.indexOf("|",e)),u!==-1&&t[u+1]!==")"&&(r=t.indexOf(")",u),r>u&&(i=t.indexOf("\\",u),i===-1||i>r))))return!0;if(t[e]==="\\"){var D=t[e+1];e+=2;var o=Ts[D];if(o){var l=t.indexOf(o,e);l!==-1&&(e=l+1)}if(t[e]==="!")return!0}else e++}return!1},ND=function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var u=t[e+1];e+=2;var s=Ts[u];if(s){var n=t.indexOf(s,e);n!==-1&&(e=n+1)}if(t[e]==="!")return!0}else e++}return!1},xs=function(e,u){if(typeof e!="string"||e==="")return!1;if(xD(e))return!0;var s=OD;return u&&u.strict===!1&&(s=ND),s(e)},HD=xs,LD=K.posix.dirname,ID=me.platform()==="win32",Yt="/",PD=/\\/g,kD=/[\{\[].*[\}\]]$/,MD=/(^|[^\\])([\{\[]|\([^\)]+$)/,GD=/\\([\!\*\?\|\[\]\(\)\{\}])/g,WD=function(e,u){var s=Object.assign({flipBackslashes:!0},u);s.flipBackslashes&&ID&&e.indexOf(Yt)<0&&(e=e.replace(PD,Yt)),kD.test(e)&&(e+=Yt),e+="a";do e=LD(e);while(HD(e)||MD.test(e));return e.replace(GD,"$1")},ut={};(function(t){t.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1,t.find=(e,u)=>e.nodes.find(s=>s.type===u),t.exceedsLimit=(e,u,s=1,n)=>n===!1||!t.isInteger(e)||!t.isInteger(u)?!1:(Number(u)-Number(e))/Number(s)>=n,t.escapeNode=(e,u=0,s)=>{let n=e.nodes[u];n&&(s&&n.type===s||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)},t.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0),t.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:!(e.commas>>0+e.ranges>>0)||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1,t.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0,t.reduce=e=>e.reduce((u,s)=>(s.type==="text"&&u.push(s.value),s.type==="range"&&(s.type="text"),u),[]),t.flatten=(...e)=>{const u=[],s=n=>{for(let r=0;r<n.length;r++){let i=n[r];Array.isArray(i)?s(i):i!==void 0&&u.push(i)}return u};return s(e),u}})(ut);const Os=ut;var qt=(t,e={})=>{let u=(s,n={})=>{let r=e.escapeInvalid&&Os.isInvalidBrace(n),i=s.invalid===!0&&e.escapeInvalid===!0,D="";if(s.value)return(r||i)&&Os.isOpenOrClose(s)?"\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(let o of s.nodes)D+=u(o);return D};return u(t)};/*!
37
37
  * is-number <https://github.com/jonschlinkert/is-number>
38
38
  *
39
39
  * Copyright (c) 2014-present, Jon Schlinkert.
@@ -43,12 +43,12 @@
43
43
  *
44
44
  * Copyright (c) 2015-present, Jon Schlinkert.
45
45
  * Released under the MIT License.
46
- */const Os=jD,oe=(t,e,u)=>{if(Os(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(Os(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let s={relaxZeros:!0,...u};typeof s.strictZeros=="boolean"&&(s.relaxZeros=s.strictZeros===!1);let n=String(s.relaxZeros),r=String(s.shorthand),i=String(s.capture),D=String(s.wrap),o=t+":"+e+"="+n+r+i+D;if(oe.cache.hasOwnProperty(o))return oe.cache[o].result;let a=Math.min(t,e),c=Math.max(t,e);if(Math.abs(a-c)===1){let F=t+"|"+e;return s.capture?`(${F})`:s.wrap===!1?F:`(?:${F})`}let f=ks(t)||ks(e),l={min:t,max:e,a,b:c},E=[],p=[];if(f&&(l.isPadded=f,l.maxLen=String(l.max).length),a<0){let F=c<0?Math.abs(c):1;p=Ns(F,Math.abs(a),l,s),a=l.a=0}return c>=0&&(E=Ns(a,c,l,s)),l.negatives=p,l.positives=E,l.result=UD(p,E),s.capture===!0?l.result=`(${l.result})`:s.wrap!==!1&&E.length+p.length>1&&(l.result=`(?:${l.result})`),oe.cache[o]=l,l.result};function UD(t,e,u){let s=Xt(t,e,"-",!1)||[],n=Xt(e,t,"",!1)||[],r=Xt(t,e,"-?",!0)||[];return s.concat(r).concat(n).join("|")}function KD(t,e){let u=1,s=1,n=Ls(t,u),r=new Set([e]);for(;t<=n&&n<=e;)r.add(n),u+=1,n=Ls(t,u);for(n=Is(e+1,s)-1;t<n&&n<=e;)r.add(n),s+=1,n=Is(e+1,s)-1;return r=[...r],r.sort(YD),r}function VD(t,e,u){if(t===e)return{pattern:t,count:[],digits:0};let s=zD(t,e),n=s.length,r="",i=0;for(let D=0;D<n;D++){let[o,a]=s[D];o===a?r+=o:o!=="0"||a!=="9"?r+=qD(o,a):i++}return i&&(r+=u.shorthand===!0?"\\d":"[0-9]"),{pattern:r,count:[i],digits:n}}function Ns(t,e,u,s){let n=KD(t,e),r=[],i=t,D;for(let o=0;o<n.length;o++){let a=n[o],c=VD(String(i),String(a),s),f="";if(!u.isPadded&&D&&D.pattern===c.pattern){D.count.length>1&&D.count.pop(),D.count.push(c.count[0]),D.string=D.pattern+Ps(D.count),i=a+1;continue}u.isPadded&&(f=XD(a,u,s)),c.string=f+c.pattern+Ps(c.count),r.push(c),i=a+1,D=c}return r}function Xt(t,e,u,s,n){let r=[];for(let i of t){let{string:D}=i;!s&&!Hs(e,"string",D)&&r.push(u+D),s&&Hs(e,"string",D)&&r.push(u+D)}return r}function zD(t,e){let u=[];for(let s=0;s<t.length;s++)u.push([t[s],e[s]]);return u}function YD(t,e){return t>e?1:e>t?-1:0}function Hs(t,e,u){return t.some(s=>s[e]===u)}function Ls(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function Is(t,e){return t-t%Math.pow(10,e)}function Ps(t){let[e=0,u=""]=t;return u||e>1?`{${e+(u?","+u:"")}}`:""}function qD(t,e,u){return`[${t}${e-t===1?"":"-"}${e}]`}function ks(t){return/^-?(0+)\d/.test(t)}function XD(t,e,u){if(!e.isPadded)return t;let s=Math.abs(e.maxLen-String(t).length),n=u.relaxZeros!==!1;switch(s){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:return n?`0{0,${s}}`:`0{${s}}`}}oe.cache={},oe.clearCache=()=>oe.cache={};var QD=oe;/*!
46
+ */const Ns=jD,oe=(t,e,u)=>{if(Ns(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(Ns(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let s={relaxZeros:!0,...u};typeof s.strictZeros=="boolean"&&(s.relaxZeros=s.strictZeros===!1);let n=String(s.relaxZeros),r=String(s.shorthand),i=String(s.capture),D=String(s.wrap),o=t+":"+e+"="+n+r+i+D;if(oe.cache.hasOwnProperty(o))return oe.cache[o].result;let l=Math.min(t,e),c=Math.max(t,e);if(Math.abs(l-c)===1){let F=t+"|"+e;return s.capture?`(${F})`:s.wrap===!1?F:`(?:${F})`}let f=Ms(t)||Ms(e),a={min:t,max:e,a:l,b:c},E=[],p=[];if(f&&(a.isPadded=f,a.maxLen=String(a.max).length),l<0){let F=c<0?Math.abs(c):1;p=Hs(F,Math.abs(l),a,s),l=a.a=0}return c>=0&&(E=Hs(l,c,a,s)),a.negatives=p,a.positives=E,a.result=UD(p,E),s.capture===!0?a.result=`(${a.result})`:s.wrap!==!1&&E.length+p.length>1&&(a.result=`(?:${a.result})`),oe.cache[o]=a,a.result};function UD(t,e,u){let s=Xt(t,e,"-",!1)||[],n=Xt(e,t,"",!1)||[],r=Xt(t,e,"-?",!0)||[];return s.concat(r).concat(n).join("|")}function KD(t,e){let u=1,s=1,n=Is(t,u),r=new Set([e]);for(;t<=n&&n<=e;)r.add(n),u+=1,n=Is(t,u);for(n=Ps(e+1,s)-1;t<n&&n<=e;)r.add(n),s+=1,n=Ps(e+1,s)-1;return r=[...r],r.sort(YD),r}function VD(t,e,u){if(t===e)return{pattern:t,count:[],digits:0};let s=zD(t,e),n=s.length,r="",i=0;for(let D=0;D<n;D++){let[o,l]=s[D];o===l?r+=o:o!=="0"||l!=="9"?r+=qD(o,l):i++}return i&&(r+=u.shorthand===!0?"\\d":"[0-9]"),{pattern:r,count:[i],digits:n}}function Hs(t,e,u,s){let n=KD(t,e),r=[],i=t,D;for(let o=0;o<n.length;o++){let l=n[o],c=VD(String(i),String(l),s),f="";if(!u.isPadded&&D&&D.pattern===c.pattern){D.count.length>1&&D.count.pop(),D.count.push(c.count[0]),D.string=D.pattern+ks(D.count),i=l+1;continue}u.isPadded&&(f=XD(l,u,s)),c.string=f+c.pattern+ks(c.count),r.push(c),i=l+1,D=c}return r}function Xt(t,e,u,s,n){let r=[];for(let i of t){let{string:D}=i;!s&&!Ls(e,"string",D)&&r.push(u+D),s&&Ls(e,"string",D)&&r.push(u+D)}return r}function zD(t,e){let u=[];for(let s=0;s<t.length;s++)u.push([t[s],e[s]]);return u}function YD(t,e){return t>e?1:e>t?-1:0}function Ls(t,e,u){return t.some(s=>s[e]===u)}function Is(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function Ps(t,e){return t-t%Math.pow(10,e)}function ks(t){let[e=0,u=""]=t;return u||e>1?`{${e+(u?","+u:"")}}`:""}function qD(t,e,u){return`[${t}${e-t===1?"":"-"}${e}]`}function Ms(t){return/^-?(0+)\d/.test(t)}function XD(t,e,u){if(!e.isPadded)return t;let s=Math.abs(e.maxLen-String(t).length),n=u.relaxZeros!==!1;switch(s){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:return n?`0{0,${s}}`:`0{${s}}`}}oe.cache={},oe.clearCache=()=>oe.cache={};var QD=oe;/*!
47
47
  * fill-range <https://github.com/jonschlinkert/fill-range>
48
48
  *
49
49
  * Copyright (c) 2014-present, Jon Schlinkert.
50
50
  * Licensed under the MIT License.
51
- */const ZD=_e,Ms=QD,Ws=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),JD=t=>e=>t===!0?Number(e):String(e),Qt=t=>typeof t=="number"||typeof t=="string"&&t!=="",ve=t=>Number.isInteger(+t),Zt=t=>{let e=`${t}`,u=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++u]==="0";);return u>0},eo=(t,e,u)=>typeof t=="string"||typeof e=="string"?!0:u.stringify===!0,to=(t,e,u)=>{if(e>0){let s=t[0]==="-"?"-":"";s&&(t=t.slice(1)),t=s+t.padStart(s?e-1:e,"0")}return u===!1?String(t):t},Gs=(t,e)=>{let u=t[0]==="-"?"-":"";for(u&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return u?"-"+t:t},uo=(t,e)=>{t.negatives.sort((i,D)=>i<D?-1:i>D?1:0),t.positives.sort((i,D)=>i<D?-1:i>D?1:0);let u=e.capture?"":"?:",s="",n="",r;return t.positives.length&&(s=t.positives.join("|")),t.negatives.length&&(n=`-(${u}${t.negatives.join("|")})`),s&&n?r=`${s}|${n}`:r=s||n,e.wrap?`(${u}${r})`:r},js=(t,e,u,s)=>{if(u)return Ms(t,e,{wrap:!1,...s});let n=String.fromCharCode(t);if(t===e)return n;let r=String.fromCharCode(e);return`[${n}-${r}]`},Us=(t,e,u)=>{if(Array.isArray(t)){let s=u.wrap===!0,n=u.capture?"":"?:";return s?`(${n}${t.join("|")})`:t.join("|")}return Ms(t,e,u)},Ks=(...t)=>new RangeError("Invalid range arguments: "+ZD.inspect(...t)),Vs=(t,e,u)=>{if(u.strictRanges===!0)throw Ks([t,e]);return[]},so=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},no=(t,e,u=1,s={})=>{let n=Number(t),r=Number(e);if(!Number.isInteger(n)||!Number.isInteger(r)){if(s.strictRanges===!0)throw Ks([t,e]);return[]}n===0&&(n=0),r===0&&(r=0);let i=n>r,D=String(t),o=String(e),a=String(u);u=Math.max(Math.abs(u),1);let c=Zt(D)||Zt(o)||Zt(a),f=c?Math.max(D.length,o.length,a.length):0,l=c===!1&&eo(t,e,s)===!1,E=s.transform||JD(l);if(s.toRegex&&u===1)return js(Gs(t,f),Gs(e,f),!0,s);let p={negatives:[],positives:[]},F=N=>p[N<0?"negatives":"positives"].push(Math.abs(N)),A=[],B=0;for(;i?n>=r:n<=r;)s.toRegex===!0&&u>1?F(n):A.push(to(E(n,B),f,l)),n=i?n-u:n+u,B++;return s.toRegex===!0?u>1?uo(p,s):Us(A,null,{wrap:!1,...s}):A},ro=(t,e,u=1,s={})=>{if(!ve(t)&&t.length>1||!ve(e)&&e.length>1)return Vs(t,e,s);let n=s.transform||(l=>String.fromCharCode(l)),r=`${t}`.charCodeAt(0),i=`${e}`.charCodeAt(0),D=r>i,o=Math.min(r,i),a=Math.max(r,i);if(s.toRegex&&u===1)return js(o,a,!1,s);let c=[],f=0;for(;D?r>=i:r<=i;)c.push(n(r,f)),r=D?r-u:r+u,f++;return s.toRegex===!0?Us(c,null,{wrap:!1,options:s}):c},st=(t,e,u,s={})=>{if(e==null&&Qt(t))return[t];if(!Qt(t)||!Qt(e))return Vs(t,e,s);if(typeof u=="function")return st(t,e,1,{transform:u});if(Ws(u))return st(t,e,0,u);let n={...s};return n.capture===!0&&(n.wrap=!0),u=u||n.step||1,ve(u)?ve(t)&&ve(e)?no(t,e,u,n):ro(t,e,Math.max(Math.abs(u),1),n):u!=null&&!Ws(u)?so(u,n):st(t,e,1,u)};var zs=st;const io=zs,Ys=ut,Do=(t,e={})=>{let u=(s,n={})=>{let r=Ys.isInvalidBrace(n),i=s.invalid===!0&&e.escapeInvalid===!0,D=r===!0||i===!0,o=e.escapeInvalid===!0?"\\":"",a="";if(s.isOpen===!0||s.isClose===!0)return o+s.value;if(s.type==="open")return D?o+s.value:"(";if(s.type==="close")return D?o+s.value:")";if(s.type==="comma")return s.prev.type==="comma"?"":D?s.value:"|";if(s.value)return s.value;if(s.nodes&&s.ranges>0){let c=Ys.reduce(s.nodes),f=io(...c,{...e,wrap:!1,toRegex:!0});if(f.length!==0)return c.length>1&&f.length>1?`(${f})`:f}if(s.nodes)for(let c of s.nodes)a+=u(c,s);return a};return u(t)};var oo=Do;const ao=zs,qs=qt,pe=ut,ae=(t="",e="",u=!1)=>{let s=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return u?pe.flatten(e).map(n=>`{${n}}`):e;for(let n of t)if(Array.isArray(n))for(let r of n)s.push(ae(r,e,u));else for(let r of e)u===!0&&typeof r=="string"&&(r=`{${r}}`),s.push(Array.isArray(r)?ae(n,r,u):n+r);return pe.flatten(s)},lo=(t,e={})=>{let u=e.rangeLimit===void 0?1e3:e.rangeLimit,s=(n,r={})=>{n.queue=[];let i=r,D=r.queue;for(;i.type!=="brace"&&i.type!=="root"&&i.parent;)i=i.parent,D=i.queue;if(n.invalid||n.dollar){D.push(ae(D.pop(),qs(n,e)));return}if(n.type==="brace"&&n.invalid!==!0&&n.nodes.length===2){D.push(ae(D.pop(),["{}"]));return}if(n.nodes&&n.ranges>0){let f=pe.reduce(n.nodes);if(pe.exceedsLimit(...f,e.step,u))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let l=ao(...f,e);l.length===0&&(l=qs(n,e)),D.push(ae(D.pop(),l)),n.nodes=[];return}let o=pe.encloseBrace(n),a=n.queue,c=n;for(;c.type!=="brace"&&c.type!=="root"&&c.parent;)c=c.parent,a=c.queue;for(let f=0;f<n.nodes.length;f++){let l=n.nodes[f];if(l.type==="comma"&&n.type==="brace"){f===1&&a.push(""),a.push("");continue}if(l.type==="close"){D.push(ae(D.pop(),a,o));continue}if(l.value&&l.type!=="open"){a.push(ae(a.pop(),l.value));continue}l.nodes&&s(l,n)}return a};return pe.flatten(s(t))};var co=lo,fo={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
52
- `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"};const ho=qt,{MAX_LENGTH:Xs,CHAR_BACKSLASH:Jt,CHAR_BACKTICK:Eo,CHAR_COMMA:po,CHAR_DOT:Co,CHAR_LEFT_PARENTHESES:Fo,CHAR_RIGHT_PARENTHESES:go,CHAR_LEFT_CURLY_BRACE:mo,CHAR_RIGHT_CURLY_BRACE:_o,CHAR_LEFT_SQUARE_BRACKET:Qs,CHAR_RIGHT_SQUARE_BRACKET:Zs,CHAR_DOUBLE_QUOTE:Ao,CHAR_SINGLE_QUOTE:yo,CHAR_NO_BREAK_SPACE:wo,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Ro}=fo,bo=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let u=e||{},s=typeof u.maxLength=="number"?Math.min(Xs,u.maxLength):Xs;if(t.length>s)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${s})`);let n={type:"root",input:t,nodes:[]},r=[n],i=n,D=n,o=0,a=t.length,c=0,f=0,l;const E=()=>t[c++],p=F=>{if(F.type==="text"&&D.type==="dot"&&(D.type="text"),D&&D.type==="text"&&F.type==="text"){D.value+=F.value;return}return i.nodes.push(F),F.parent=i,F.prev=D,D=F,F};for(p({type:"bos"});c<a;)if(i=r[r.length-1],l=E(),!(l===Ro||l===wo)){if(l===Jt){p({type:"text",value:(e.keepEscaping?l:"")+E()});continue}if(l===Zs){p({type:"text",value:"\\"+l});continue}if(l===Qs){o++;let F;for(;c<a&&(F=E());){if(l+=F,F===Qs){o++;continue}if(F===Jt){l+=E();continue}if(F===Zs&&(o--,o===0))break}p({type:"text",value:l});continue}if(l===Fo){i=p({type:"paren",nodes:[]}),r.push(i),p({type:"text",value:l});continue}if(l===go){if(i.type!=="paren"){p({type:"text",value:l});continue}i=r.pop(),p({type:"text",value:l}),i=r[r.length-1];continue}if(l===Ao||l===yo||l===Eo){let F=l,A;for(e.keepQuotes!==!0&&(l="");c<a&&(A=E());){if(A===Jt){l+=A+E();continue}if(A===F){e.keepQuotes===!0&&(l+=A);break}l+=A}p({type:"text",value:l});continue}if(l===mo){f++;let A={type:"brace",open:!0,close:!1,dollar:D.value&&D.value.slice(-1)==="$"||i.dollar===!0,depth:f,commas:0,ranges:0,nodes:[]};i=p(A),r.push(i),p({type:"open",value:l});continue}if(l===_o){if(i.type!=="brace"){p({type:"text",value:l});continue}let F="close";i=r.pop(),i.close=!0,p({type:F,value:l}),f--,i=r[r.length-1];continue}if(l===po&&f>0){if(i.ranges>0){i.ranges=0;let F=i.nodes.shift();i.nodes=[F,{type:"text",value:ho(i)}]}p({type:"comma",value:l}),i.commas++;continue}if(l===Co&&f>0&&i.commas===0){let F=i.nodes;if(f===0||F.length===0){p({type:"text",value:l});continue}if(D.type==="dot"){if(i.range=[],D.value+=l,D.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,D.type="text";continue}i.ranges++,i.args=[];continue}if(D.type==="range"){F.pop();let A=F[F.length-1];A.value+=D.value+l,D=A,i.ranges--;continue}p({type:"dot",value:l});continue}p({type:"text",value:l})}do if(i=r.pop(),i.type!=="root"){i.nodes.forEach(B=>{B.nodes||(B.type==="open"&&(B.isOpen=!0),B.type==="close"&&(B.isClose=!0),B.nodes||(B.type="text"),B.invalid=!0)});let F=r[r.length-1],A=F.nodes.indexOf(i);F.nodes.splice(A,1,...i.nodes)}while(r.length>0);return p({type:"eos"}),n};var vo=bo;const Js=qt,Bo=oo,So=co,$o=vo,Y=(t,e={})=>{let u=[];if(Array.isArray(t))for(let s of t){let n=Y.create(s,e);Array.isArray(n)?u.push(...n):u.push(n)}else u=[].concat(Y.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(u=[...new Set(u)]),u};Y.parse=(t,e={})=>$o(t,e),Y.stringify=(t,e={})=>Js(typeof t=="string"?Y.parse(t,e):t,e),Y.compile=(t,e={})=>(typeof t=="string"&&(t=Y.parse(t,e)),Bo(t,e)),Y.expand=(t,e={})=>{typeof t=="string"&&(t=Y.parse(t,e));let u=So(t,e);return e.noempty===!0&&(u=u.filter(Boolean)),e.nodupes===!0&&(u=[...new Set(u)]),u},Y.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?Y.compile(t,e):Y.expand(t,e);var To=Y,xo=["3dm","3ds","3g2","3gp","7z","a","aac","adp","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"],Oo=xo;const No=K,Ho=Oo,Lo=new Set(Ho);var Io=t=>Lo.has(No.extname(t).slice(1).toLowerCase()),nt={};(function(t){const{sep:e}=K,{platform:u}=process,s=me;t.EV_ALL="all",t.EV_READY="ready",t.EV_ADD="add",t.EV_CHANGE="change",t.EV_ADD_DIR="addDir",t.EV_UNLINK="unlink",t.EV_UNLINK_DIR="unlinkDir",t.EV_RAW="raw",t.EV_ERROR="error",t.STR_DATA="data",t.STR_END="end",t.STR_CLOSE="close",t.FSEVENT_CREATED="created",t.FSEVENT_MODIFIED="modified",t.FSEVENT_DELETED="deleted",t.FSEVENT_MOVED="moved",t.FSEVENT_CLONED="cloned",t.FSEVENT_UNKNOWN="unknown",t.FSEVENT_TYPE_FILE="file",t.FSEVENT_TYPE_DIRECTORY="directory",t.FSEVENT_TYPE_SYMLINK="symlink",t.KEY_LISTENERS="listeners",t.KEY_ERR="errHandlers",t.KEY_RAW="rawEmitters",t.HANDLER_KEYS=[t.KEY_LISTENERS,t.KEY_ERR,t.KEY_RAW],t.DOT_SLASH=`.${e}`,t.BACK_SLASH_RE=/\\/g,t.DOUBLE_SLASH_RE=/\/\//,t.SLASH_OR_BACK_SLASH_RE=/[/\\]/,t.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,t.REPLACER_RE=/^\.[/\\]/,t.SLASH="/",t.SLASH_SLASH="//",t.BRACE_START="{",t.BANG="!",t.ONE_DOT=".",t.TWO_DOTS="..",t.STAR="*",t.GLOBSTAR="**",t.ROOT_GLOBSTAR="/**/*",t.SLASH_GLOBSTAR="/**",t.DIR_SUFFIX="Dir",t.ANYMATCH_OPTS={dot:!0},t.STRING_TYPE="string",t.FUNCTION_TYPE="function",t.EMPTY_STR="",t.EMPTY_FN=()=>{},t.IDENTITY_FN=n=>n,t.isWindows=u==="win32",t.isMacos=u==="darwin",t.isLinux=u==="linux",t.isIBMi=s.type()==="OS400"})(nt);const se=J,I=K,{promisify:Be}=_e,Po=Io,{isWindows:ko,isLinux:Mo,EMPTY_FN:Wo,EMPTY_STR:Go,KEY_LISTENERS:Ce,KEY_ERR:eu,KEY_RAW:Se,HANDLER_KEYS:jo,EV_CHANGE:rt,EV_ADD:it,EV_ADD_DIR:Uo,EV_ERROR:en,STR_DATA:Ko,STR_END:Vo,BRACE_START:zo,STAR:Yo}=nt,qo="watch",Xo=Be(se.open),tn=Be(se.stat),Qo=Be(se.lstat),Zo=Be(se.close),tu=Be(se.realpath),Jo={lstat:Qo,stat:tn},uu=(t,e)=>{t instanceof Set?t.forEach(e):e(t)},$e=(t,e,u)=>{let s=t[e];s instanceof Set||(t[e]=s=new Set([s])),s.add(u)},ea=t=>e=>{const u=t[e];u instanceof Set?u.clear():delete t[e]},Te=(t,e,u)=>{const s=t[e];s instanceof Set?s.delete(u):s===u&&delete t[e]},un=t=>t instanceof Set?t.size===0:!t,Dt=new Map;function sn(t,e,u,s,n){const r=(i,D)=>{u(t),n(i,D,{watchedPath:t}),D&&t!==D&&ot(I.resolve(t,D),Ce,I.join(t,D))};try{return se.watch(t,e,r)}catch(i){s(i)}}const ot=(t,e,u,s,n)=>{const r=Dt.get(t);r&&uu(r[e],i=>{i(u,s,n)})},ta=(t,e,u,s)=>{const{listener:n,errHandler:r,rawEmitter:i}=s;let D=Dt.get(e),o;if(!u.persistent)return o=sn(t,u,n,r,i),o.close.bind(o);if(D)$e(D,Ce,n),$e(D,eu,r),$e(D,Se,i);else{if(o=sn(t,u,ot.bind(null,e,Ce),r,ot.bind(null,e,Se)),!o)return;o.on(en,async a=>{const c=ot.bind(null,e,eu);if(D.watcherUnusable=!0,ko&&a.code==="EPERM")try{const f=await Xo(t,"r");await Zo(f),c(a)}catch{}else c(a)}),D={listeners:n,errHandlers:r,rawEmitters:i,watcher:o},Dt.set(e,D)}return()=>{Te(D,Ce,n),Te(D,eu,r),Te(D,Se,i),un(D.listeners)&&(D.watcher.close(),Dt.delete(e),jo.forEach(ea(D)),D.watcher=void 0,Object.freeze(D))}},su=new Map,ua=(t,e,u,s)=>{const{listener:n,rawEmitter:r}=s;let i=su.get(e);const D=i&&i.options;return D&&(D.persistent<u.persistent||D.interval>u.interval)&&(i.listeners,i.rawEmitters,se.unwatchFile(e),i=void 0),i?($e(i,Ce,n),$e(i,Se,r)):(i={listeners:n,rawEmitters:r,options:u,watcher:se.watchFile(e,u,(o,a)=>{uu(i.rawEmitters,f=>{f(rt,e,{curr:o,prev:a})});const c=o.mtimeMs;(o.size!==a.size||c>a.mtimeMs||c===0)&&uu(i.listeners,f=>f(t,o))})},su.set(e,i)),()=>{Te(i,Ce,n),Te(i,Se,r),un(i.listeners)&&(su.delete(e),se.unwatchFile(e),i.options=i.watcher=void 0,Object.freeze(i))}};let sa=class{constructor(e){this.fsw=e,this._boundHandleError=u=>e._handleError(u)}_watchWithNodeFs(e,u){const s=this.fsw.options,n=I.dirname(e),r=I.basename(e);this.fsw._getWatchedDir(n).add(r);const D=I.resolve(e),o={persistent:s.persistent};u||(u=Wo);let a;return s.usePolling?(o.interval=s.enableBinaryInterval&&Po(r)?s.binaryInterval:s.interval,a=ua(e,D,o,{listener:u,rawEmitter:this.fsw._emitRaw})):a=ta(e,D,o,{listener:u,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw}),a}_handleFile(e,u,s){if(this.fsw.closed)return;const n=I.dirname(e),r=I.basename(e),i=this.fsw._getWatchedDir(n);let D=u;if(i.has(r))return;const o=async(c,f)=>{if(this.fsw._throttle(qo,e,5)){if(!f||f.mtimeMs===0)try{const l=await tn(e);if(this.fsw.closed)return;const E=l.atimeMs,p=l.mtimeMs;(!E||E<=p||p!==D.mtimeMs)&&this.fsw._emit(rt,e,l),Mo&&D.ino!==l.ino?(this.fsw._closeFile(c),D=l,this.fsw._addPathCloser(c,this._watchWithNodeFs(e,o))):D=l}catch{this.fsw._remove(n,r)}else if(i.has(r)){const l=f.atimeMs,E=f.mtimeMs;(!l||l<=E||E!==D.mtimeMs)&&this.fsw._emit(rt,e,f),D=f}}},a=this._watchWithNodeFs(e,o);if(!(s&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(it,e,0))return;this.fsw._emit(it,e,u)}return a}async _handleSymlink(e,u,s,n){if(this.fsw.closed)return;const r=e.fullPath,i=this.fsw._getWatchedDir(u);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let D;try{D=await tu(s)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(i.has(n)?this.fsw._symlinkPaths.get(r)!==D&&(this.fsw._symlinkPaths.set(r,D),this.fsw._emit(rt,s,e.stats)):(i.add(n),this.fsw._symlinkPaths.set(r,D),this.fsw._emit(it,s,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(r))return!0;this.fsw._symlinkPaths.set(r,!0)}_handleRead(e,u,s,n,r,i,D){if(e=I.join(e,Go),!s.hasGlob&&(D=this.fsw._throttle("readdir",e,1e3),!D))return;const o=this.fsw._getWatchedDir(s.path),a=new Set;let c=this.fsw._readdirp(e,{fileFilter:f=>s.filterPath(f),directoryFilter:f=>s.filterDir(f),depth:0}).on(Ko,async f=>{if(this.fsw.closed){c=void 0;return}const l=f.path;let E=I.join(e,l);if(a.add(l),!(f.stats.isSymbolicLink()&&await this._handleSymlink(f,e,E,l))){if(this.fsw.closed){c=void 0;return}(l===n||!n&&!o.has(l))&&(this.fsw._incrReadyCount(),E=I.join(r,I.relative(r,E)),this._addToNodeFs(E,u,s,i+1))}}).on(en,this._boundHandleError);return new Promise(f=>c.once(Vo,()=>{if(this.fsw.closed){c=void 0;return}const l=D?D.clear():!1;f(),o.getChildren().filter(E=>E!==e&&!a.has(E)&&(!s.hasGlob||s.filterPath({fullPath:I.resolve(e,E)}))).forEach(E=>{this.fsw._remove(e,E)}),c=void 0,l&&this._handleRead(e,!1,s,n,r,i,D)}))}async _handleDir(e,u,s,n,r,i,D){const o=this.fsw._getWatchedDir(I.dirname(e)),a=o.has(I.basename(e));!(s&&this.fsw.options.ignoreInitial)&&!r&&!a&&(!i.hasGlob||i.globFilter(e))&&this.fsw._emit(Uo,e,u),o.add(I.basename(e)),this.fsw._getWatchedDir(e);let c,f;const l=this.fsw.options.depth;if((l==null||n<=l)&&!this.fsw._symlinkPaths.has(D)){if(!r&&(await this._handleRead(e,s,i,r,e,n,c),this.fsw.closed))return;f=this._watchWithNodeFs(e,(E,p)=>{p&&p.mtimeMs===0||this._handleRead(E,!1,i,r,e,n,c)})}return f}async _addToNodeFs(e,u,s,n,r){const i=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return i(),!1;const D=this.fsw._getWatchHelpers(e,n);!D.hasGlob&&s&&(D.hasGlob=s.hasGlob,D.globFilter=s.globFilter,D.filterPath=o=>s.filterPath(o),D.filterDir=o=>s.filterDir(o));try{const o=await Jo[D.statMethod](D.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(D.watchPath,o))return i(),!1;const a=this.fsw.options.followSymlinks&&!e.includes(Yo)&&!e.includes(zo);let c;if(o.isDirectory()){const f=I.resolve(e),l=a?await tu(e):e;if(this.fsw.closed||(c=await this._handleDir(D.watchPath,o,u,n,r,D,l),this.fsw.closed))return;f!==l&&l!==void 0&&this.fsw._symlinkPaths.set(f,l)}else if(o.isSymbolicLink()){const f=a?await tu(e):e;if(this.fsw.closed)return;const l=I.dirname(D.watchPath);if(this.fsw._getWatchedDir(l).add(D.watchPath),this.fsw._emit(it,D.watchPath,o),c=await this._handleDir(l,o,u,n,e,D,f),this.fsw.closed)return;f!==void 0&&this.fsw._symlinkPaths.set(I.resolve(e),f)}else c=this._handleFile(D.watchPath,o,u);return i(),this.fsw._addPathCloser(e,c),!1}catch(o){if(this.fsw._handleError(o))return i(),e}}};var na=sa,nu={exports:{}};const ru=J,P=K,{promisify:iu}=_e;let Fe;try{Fe=dt.require("fsevents")}catch(t){process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR&&console.error(t)}if(Fe){const t=process.version.match(/v(\d+)\.(\d+)/);if(t&&t[1]&&t[2]){const e=Number.parseInt(t[1],10),u=Number.parseInt(t[2],10);e===8&&u<16&&(Fe=void 0)}}const{EV_ADD:Du,EV_CHANGE:ra,EV_ADD_DIR:nn,EV_UNLINK:at,EV_ERROR:ia,STR_DATA:Da,STR_END:oa,FSEVENT_CREATED:aa,FSEVENT_MODIFIED:la,FSEVENT_DELETED:ca,FSEVENT_MOVED:fa,FSEVENT_UNKNOWN:ha,FSEVENT_TYPE_FILE:da,FSEVENT_TYPE_DIRECTORY:xe,FSEVENT_TYPE_SYMLINK:rn,ROOT_GLOBSTAR:Dn,DIR_SUFFIX:Ea,DOT_SLASH:on,FUNCTION_TYPE:ou,EMPTY_FN:pa,IDENTITY_FN:Ca}=nt,Fa=t=>isNaN(t)?{}:{depth:t},au=iu(ru.stat),ga=iu(ru.lstat),an=iu(ru.realpath),ma={stat:au,lstat:ga},le=new Map,_a=10,Aa=new Set([69888,70400,71424,72704,73472,131328,131840,262912]),ya=(t,e)=>({stop:Fe.watch(t,e)});function wa(t,e,u,s){let n=P.extname(e)?P.dirname(e):e;const r=P.dirname(n);let i=le.get(n);Ra(r)&&(n=r);const D=P.resolve(t),o=D!==e,a=(f,l,E)=>{o&&(f=f.replace(e,D)),(f===D||!f.indexOf(D+P.sep))&&u(f,l,E)};let c=!1;for(const f of le.keys())if(e.indexOf(P.resolve(f)+P.sep)===0){n=f,i=le.get(n),c=!0;break}return i||c?i.listeners.add(a):(i={listeners:new Set([a]),rawEmitter:s,watcher:ya(n,(f,l)=>{if(!i.listeners.size)return;const E=Fe.getInfo(f,l);i.listeners.forEach(p=>{p(f,l,E)}),i.rawEmitter(E.event,f,E)})},le.set(n,i)),()=>{const f=i.listeners;if(f.delete(a),!f.size&&(le.delete(n),i.watcher))return i.watcher.stop().then(()=>{i.rawEmitter=i.watcher=void 0,Object.freeze(i)})}}const Ra=t=>{let e=0;for(const u of le.keys())if(u.indexOf(t)===0&&(e++,e>=_a))return!0;return!1},ba=()=>Fe&&le.size<128,lu=(t,e)=>{let u=0;for(;!t.indexOf(e)&&(t=P.dirname(t))!==e;)u++;return u},ln=(t,e)=>t.type===xe&&e.isDirectory()||t.type===rn&&e.isSymbolicLink()||t.type===da&&e.isFile();let va=class{constructor(e){this.fsw=e}checkIgnored(e,u){const s=this.fsw._ignoredPaths;if(this.fsw._isIgnored(e,u))return s.add(e),u&&u.isDirectory()&&s.add(e+Dn),!0;s.delete(e),s.delete(e+Dn)}addOrChange(e,u,s,n,r,i,D,o){const a=r.has(i)?ra:Du;this.handleEvent(a,e,u,s,n,r,i,D,o)}async checkExists(e,u,s,n,r,i,D,o){try{const a=await au(e);if(this.fsw.closed)return;ln(D,a)?this.addOrChange(e,u,s,n,r,i,D,o):this.handleEvent(at,e,u,s,n,r,i,D,o)}catch(a){a.code==="EACCES"?this.addOrChange(e,u,s,n,r,i,D,o):this.handleEvent(at,e,u,s,n,r,i,D,o)}}handleEvent(e,u,s,n,r,i,D,o,a){if(!(this.fsw.closed||this.checkIgnored(u)))if(e===at){const c=o.type===xe;(c||i.has(D))&&this.fsw._remove(r,D,c)}else{if(e===Du){if(o.type===xe&&this.fsw._getWatchedDir(u),o.type===rn&&a.followSymlinks){const f=a.depth===void 0?void 0:lu(s,n)+1;return this._addToFsEvents(u,!1,!0,f)}this.fsw._getWatchedDir(r).add(D)}const c=o.type===xe?e+Ea:e;this.fsw._emit(c,u),c===nn&&this._addToFsEvents(u,!1,!0)}}_watchWithFsEvents(e,u,s,n){if(this.fsw.closed||this.fsw._isIgnored(e))return;const r=this.fsw.options,D=wa(e,u,async(o,a,c)=>{if(this.fsw.closed||r.depth!==void 0&&lu(o,u)>r.depth)return;const f=s(P.join(e,P.relative(e,o)));if(n&&!n(f))return;const l=P.dirname(f),E=P.basename(f),p=this.fsw._getWatchedDir(c.type===xe?f:l);if(Aa.has(a)||c.event===ha)if(typeof r.ignored===ou){let F;try{F=await au(f)}catch{}if(this.fsw.closed||this.checkIgnored(f,F))return;ln(c,F)?this.addOrChange(f,o,u,l,p,E,c,r):this.handleEvent(at,f,o,u,l,p,E,c,r)}else this.checkExists(f,o,u,l,p,E,c,r);else switch(c.event){case aa:case la:return this.addOrChange(f,o,u,l,p,E,c,r);case ca:case fa:return this.checkExists(f,o,u,l,p,E,c,r)}},this.fsw._emitRaw);return this.fsw._emitReady(),D}async _handleFsEventsSymlink(e,u,s,n){if(!(this.fsw.closed||this.fsw._symlinkPaths.has(u))){this.fsw._symlinkPaths.set(u,!0),this.fsw._incrReadyCount();try{const r=await an(e);if(this.fsw.closed)return;if(this.fsw._isIgnored(r))return this.fsw._emitReady();this.fsw._incrReadyCount(),this._addToFsEvents(r||e,i=>{let D=e;return r&&r!==on?D=i.replace(r,e):i!==on&&(D=P.join(e,i)),s(D)},!1,n)}catch(r){if(this.fsw._handleError(r))return this.fsw._emitReady()}}}emitAdd(e,u,s,n,r){const i=s(e),D=u.isDirectory(),o=this.fsw._getWatchedDir(P.dirname(i)),a=P.basename(i);D&&this.fsw._getWatchedDir(i),!o.has(a)&&(o.add(a),(!n.ignoreInitial||r===!0)&&this.fsw._emit(D?nn:Du,i,u))}initWatch(e,u,s,n){if(this.fsw.closed)return;const r=this._watchWithFsEvents(s.watchPath,P.resolve(e||s.watchPath),n,s.globFilter);this.fsw._addPathCloser(u,r)}async _addToFsEvents(e,u,s,n){if(this.fsw.closed)return;const r=this.fsw.options,i=typeof u===ou?u:Ca,D=this.fsw._getWatchHelpers(e);try{const o=await ma[D.statMethod](D.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(D.watchPath,o))throw null;if(o.isDirectory()){if(D.globFilter||this.emitAdd(i(e),o,i,r,s),n&&n>r.depth)return;this.fsw._readdirp(D.watchPath,{fileFilter:a=>D.filterPath(a),directoryFilter:a=>D.filterDir(a),...Fa(r.depth-(n||0))}).on(Da,a=>{if(this.fsw.closed||a.stats.isDirectory()&&!D.filterPath(a))return;const c=P.join(D.watchPath,a.path),{fullPath:f}=a;if(D.followSymlinks&&a.stats.isSymbolicLink()){const l=r.depth===void 0?void 0:lu(c,P.resolve(D.watchPath))+1;this._handleFsEventsSymlink(c,f,i,l)}else this.emitAdd(c,a.stats,i,r,s)}).on(ia,pa).on(oa,()=>{this.fsw._emitReady()})}else this.emitAdd(D.watchPath,o,i,r,s),this.fsw._emitReady()}catch(o){(!o||this.fsw._handleError(o))&&(this.fsw._emitReady(),this.fsw._emitReady())}if(r.persistent&&s!==!0)if(typeof u===ou)this.initWatch(void 0,e,D,i);else{let o;try{o=await an(D.watchPath)}catch{}this.initWatch(o,e,D,i)}}};nu.exports=va,nu.exports.canUse=ba;var Ba=nu.exports;const{EventEmitter:Sa}=xn,cu=J,v=K,{promisify:cn}=_e,$a=wD,fu=$D.default,Ta=GD,hu=Ts,xa=To,Oa=bs,Na=na,fn=Ba,{EV_ALL:du,EV_READY:Ha,EV_ADD:lt,EV_CHANGE:Oe,EV_UNLINK:hn,EV_ADD_DIR:La,EV_UNLINK_DIR:Ia,EV_RAW:Pa,EV_ERROR:Eu,STR_CLOSE:ka,STR_END:Ma,BACK_SLASH_RE:Wa,DOUBLE_SLASH_RE:dn,SLASH_OR_BACK_SLASH_RE:Ga,DOT_RE:ja,REPLACER_RE:Ua,SLASH:pu,SLASH_SLASH:Ka,BRACE_START:Va,BANG:Cu,ONE_DOT:En,TWO_DOTS:za,GLOBSTAR:Ya,SLASH_GLOBSTAR:Fu,ANYMATCH_OPTS:gu,STRING_TYPE:mu,FUNCTION_TYPE:qa,EMPTY_STR:_u,EMPTY_FN:Xa,isWindows:Qa,isMacos:Za,isIBMi:Ja}=nt,el=cn(cu.stat),tl=cn(cu.readdir),Au=(t=[])=>Array.isArray(t)?t:[t],pn=(t,e=[])=>(t.forEach(u=>{Array.isArray(u)?pn(u,e):e.push(u)}),e),Cn=t=>{const e=pn(Au(t));if(!e.every(u=>typeof u===mu))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(gn)},Fn=t=>{let e=t.replace(Wa,pu),u=!1;for(e.startsWith(Ka)&&(u=!0);e.match(dn);)e=e.replace(dn,pu);return u&&(e=pu+e),e},gn=t=>Fn(v.normalize(Fn(t))),mn=(t=_u)=>e=>typeof e!==mu?e:gn(v.isAbsolute(e)?e:v.join(t,e)),ul=(t,e)=>v.isAbsolute(t)?t:t.startsWith(Cu)?Cu+v.join(e,t.slice(1)):v.join(e,t),q=(t,e)=>t[e]===void 0;class sl{constructor(e,u){this.path=e,this._removeWatcher=u,this.items=new Set}add(e){const{items:u}=this;u&&e!==En&&e!==za&&u.add(e)}async remove(e){const{items:u}=this;if(!u||(u.delete(e),u.size>0))return;const s=this.path;try{await tl(s)}catch{this._removeWatcher&&this._removeWatcher(v.dirname(s),v.basename(s))}}has(e){const{items:u}=this;if(u)return u.has(e)}getChildren(){const{items:e}=this;if(e)return[...e.values()]}dispose(){this.items.clear(),delete this.path,delete this._removeWatcher,delete this.items,Object.freeze(this)}}const nl="stat",rl="lstat";class il{constructor(e,u,s,n){this.fsw=n,this.path=e=e.replace(Ua,_u),this.watchPath=u,this.fullWatchPath=v.resolve(u),this.hasGlob=u!==e,e===_u&&(this.hasGlob=!1),this.globSymlink=this.hasGlob&&s?void 0:!1,this.globFilter=this.hasGlob?fu(e,void 0,gu):!1,this.dirParts=this.getDirParts(e),this.dirParts.forEach(r=>{r.length>1&&r.pop()}),this.followSymlinks=s,this.statMethod=s?nl:rl}checkGlobSymlink(e){return this.globSymlink===void 0&&(this.globSymlink=e.fullParentDir===this.fullWatchPath?!1:{realPath:e.fullParentDir,linkPath:this.fullWatchPath}),this.globSymlink?e.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath):e.fullPath}entryPath(e){return v.join(this.watchPath,v.relative(this.watchPath,this.checkGlobSymlink(e)))}filterPath(e){const{stats:u}=e;if(u&&u.isSymbolicLink())return this.filterDir(e);const s=this.entryPath(e);return(this.hasGlob&&typeof this.globFilter===qa?this.globFilter(s):!0)&&this.fsw._isntIgnored(s,u)&&this.fsw._hasReadPermissions(u)}getDirParts(e){if(!this.hasGlob)return[];const u=[];return(e.includes(Va)?xa.expand(e):[e]).forEach(n=>{u.push(v.relative(this.watchPath,n).split(Ga))}),u}filterDir(e){if(this.hasGlob){const u=this.getDirParts(this.checkGlobSymlink(e));let s=!1;this.unmatchedGlob=!this.dirParts.some(n=>n.every((r,i)=>(r===Ya&&(s=!0),s||!u[0][i]||fu(r,u[0][i],gu))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(e),e.stats)}}class Dl extends Sa{constructor(e){super();const u={};e&&Object.assign(u,e),this._watched=new Map,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._symlinkPaths=new Map,this._streams=new Set,this.closed=!1,q(u,"persistent")&&(u.persistent=!0),q(u,"ignoreInitial")&&(u.ignoreInitial=!1),q(u,"ignorePermissionErrors")&&(u.ignorePermissionErrors=!1),q(u,"interval")&&(u.interval=100),q(u,"binaryInterval")&&(u.binaryInterval=300),q(u,"disableGlobbing")&&(u.disableGlobbing=!1),u.enableBinaryInterval=u.binaryInterval!==u.interval,q(u,"useFsEvents")&&(u.useFsEvents=!u.usePolling),fn.canUse()||(u.useFsEvents=!1),q(u,"usePolling")&&!u.useFsEvents&&(u.usePolling=Za),Ja&&(u.usePolling=!0);const n=process.env.CHOKIDAR_USEPOLLING;if(n!==void 0){const o=n.toLowerCase();o==="false"||o==="0"?u.usePolling=!1:o==="true"||o==="1"?u.usePolling=!0:u.usePolling=!!o}const r=process.env.CHOKIDAR_INTERVAL;r&&(u.interval=Number.parseInt(r,10)),q(u,"atomic")&&(u.atomic=!u.usePolling&&!u.useFsEvents),u.atomic&&(this._pendingUnlinks=new Map),q(u,"followSymlinks")&&(u.followSymlinks=!0),q(u,"awaitWriteFinish")&&(u.awaitWriteFinish=!1),u.awaitWriteFinish===!0&&(u.awaitWriteFinish={});const i=u.awaitWriteFinish;i&&(i.stabilityThreshold||(i.stabilityThreshold=2e3),i.pollInterval||(i.pollInterval=100),this._pendingWrites=new Map),u.ignored&&(u.ignored=Au(u.ignored));let D=0;this._emitReady=()=>{D++,D>=this._readyCount&&(this._emitReady=Xa,this._readyEmitted=!0,process.nextTick(()=>this.emit(Ha)))},this._emitRaw=(...o)=>this.emit(Pa,...o),this._readyEmitted=!1,this.options=u,u.useFsEvents?this._fsEventsHandler=new fn(this):this._nodeFsHandler=new Na(this),Object.freeze(u)}add(e,u,s){const{cwd:n,disableGlobbing:r}=this.options;this.closed=!1;let i=Cn(e);return n&&(i=i.map(D=>{const o=ul(D,n);return r||!hu(D)?o:Oa(o)})),i=i.filter(D=>D.startsWith(Cu)?(this._ignoredPaths.add(D.slice(1)),!1):(this._ignoredPaths.delete(D),this._ignoredPaths.delete(D+Fu),this._userIgnored=void 0,!0)),this.options.useFsEvents&&this._fsEventsHandler?(this._readyCount||(this._readyCount=i.length),this.options.persistent&&(this._readyCount*=2),i.forEach(D=>this._fsEventsHandler._addToFsEvents(D))):(this._readyCount||(this._readyCount=0),this._readyCount+=i.length,Promise.all(i.map(async D=>{const o=await this._nodeFsHandler._addToNodeFs(D,!s,0,0,u);return o&&this._emitReady(),o})).then(D=>{this.closed||D.filter(o=>o).forEach(o=>{this.add(v.dirname(o),v.basename(u||o))})})),this}unwatch(e){if(this.closed)return this;const u=Cn(e),{cwd:s}=this.options;return u.forEach(n=>{!v.isAbsolute(n)&&!this._closers.has(n)&&(s&&(n=v.join(s,n)),n=v.resolve(n)),this._closePath(n),this._ignoredPaths.add(n),this._watched.has(n)&&this._ignoredPaths.add(n+Fu),this._userIgnored=void 0}),this}close(){if(this.closed)return this._closePromise;this.closed=!0,this.removeAllListeners();const e=[];return this._closers.forEach(u=>u.forEach(s=>{const n=s();n instanceof Promise&&e.push(n)})),this._streams.forEach(u=>u.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(u=>u.dispose()),["closers","watched","streams","symlinkPaths","throttled"].forEach(u=>{this[`_${u}`].clear()}),this._closePromise=e.length?Promise.all(e).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){const e={};return this._watched.forEach((u,s)=>{const n=this.options.cwd?v.relative(this.options.cwd,s):s;e[n||En]=u.getChildren().sort()}),e}emitWithAll(e,u){this.emit(...u),e!==Eu&&this.emit(du,...u)}async _emit(e,u,s,n,r){if(this.closed)return;const i=this.options;Qa&&(u=v.normalize(u)),i.cwd&&(u=v.relative(i.cwd,u));const D=[e,u];r!==void 0?D.push(s,n,r):n!==void 0?D.push(s,n):s!==void 0&&D.push(s);const o=i.awaitWriteFinish;let a;if(o&&(a=this._pendingWrites.get(u)))return a.lastChange=new Date,this;if(i.atomic){if(e===hn)return this._pendingUnlinks.set(u,D),setTimeout(()=>{this._pendingUnlinks.forEach((c,f)=>{this.emit(...c),this.emit(du,...c),this._pendingUnlinks.delete(f)})},typeof i.atomic=="number"?i.atomic:100),this;e===lt&&this._pendingUnlinks.has(u)&&(e=D[0]=Oe,this._pendingUnlinks.delete(u))}if(o&&(e===lt||e===Oe)&&this._readyEmitted){const c=(f,l)=>{f?(e=D[0]=Eu,D[1]=f,this.emitWithAll(e,D)):l&&(D.length>2?D[2]=l:D.push(l),this.emitWithAll(e,D))};return this._awaitWriteFinish(u,o.stabilityThreshold,e,c),this}if(e===Oe&&!this._throttle(Oe,u,50))return this;if(i.alwaysStat&&s===void 0&&(e===lt||e===La||e===Oe)){const c=i.cwd?v.join(i.cwd,u):u;let f;try{f=await el(c)}catch{}if(!f||this.closed)return;D.push(f)}return this.emitWithAll(e,D),this}_handleError(e){const u=e&&e.code;return e&&u!=="ENOENT"&&u!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||u!=="EPERM"&&u!=="EACCES")&&this.emit(Eu,e),e||this.closed}_throttle(e,u,s){this._throttled.has(e)||this._throttled.set(e,new Map);const n=this._throttled.get(e),r=n.get(u);if(r)return r.count++,!1;let i;const D=()=>{const a=n.get(u),c=a?a.count:0;return n.delete(u),clearTimeout(i),a&&clearTimeout(a.timeoutObject),c};i=setTimeout(D,s);const o={timeoutObject:i,clear:D,count:0};return n.set(u,o),o}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,u,s,n){let r,i=e;this.options.cwd&&!v.isAbsolute(e)&&(i=v.join(this.options.cwd,e));const D=new Date,o=a=>{cu.stat(i,(c,f)=>{if(c||!this._pendingWrites.has(e)){c&&c.code!=="ENOENT"&&n(c);return}const l=Number(new Date);a&&f.size!==a.size&&(this._pendingWrites.get(e).lastChange=l);const E=this._pendingWrites.get(e);l-E.lastChange>=u?(this._pendingWrites.delete(e),n(void 0,f)):r=setTimeout(o,this.options.awaitWriteFinish.pollInterval,f)})};this._pendingWrites.has(e)||(this._pendingWrites.set(e,{lastChange:D,cancelWait:()=>(this._pendingWrites.delete(e),clearTimeout(r),s)}),r=setTimeout(o,this.options.awaitWriteFinish.pollInterval))}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(e,u){if(this.options.atomic&&ja.test(e))return!0;if(!this._userIgnored){const{cwd:s}=this.options,n=this.options.ignored,r=n&&n.map(mn(s)),i=Au(r).filter(o=>typeof o===mu&&!hu(o)).map(o=>o+Fu),D=this._getGlobIgnored().map(mn(s)).concat(r,i);this._userIgnored=fu(D,void 0,gu)}return this._userIgnored([e,u])}_isntIgnored(e,u){return!this._isIgnored(e,u)}_getWatchHelpers(e,u){const s=u||this.options.disableGlobbing||!hu(e)?e:Ta(e),n=this.options.followSymlinks;return new il(e,s,n,this)}_getWatchedDir(e){this._boundRemove||(this._boundRemove=this._remove.bind(this));const u=v.resolve(e);return this._watched.has(u)||this._watched.set(u,new sl(u,this._boundRemove)),this._watched.get(u)}_hasReadPermissions(e){if(this.options.ignorePermissionErrors)return!0;const s=(e&&Number.parseInt(e.mode,10))&511;return!!(4&Number.parseInt(s.toString(8)[0],10))}_remove(e,u,s){const n=v.join(e,u),r=v.resolve(n);if(s=s!=null?s:this._watched.has(n)||this._watched.has(r),!this._throttle("remove",n,100))return;!s&&!this.options.useFsEvents&&this._watched.size===1&&this.add(e,u,!0),this._getWatchedDir(n).getChildren().forEach(l=>this._remove(n,l));const o=this._getWatchedDir(e),a=o.has(u);o.remove(u),this._symlinkPaths.has(r)&&this._symlinkPaths.delete(r);let c=n;if(this.options.cwd&&(c=v.relative(this.options.cwd,n)),this.options.awaitWriteFinish&&this._pendingWrites.has(c)&&this._pendingWrites.get(c).cancelWait()===lt)return;this._watched.delete(n),this._watched.delete(r);const f=s?Ia:hn;a&&!this._isIgnored(n)&&this._emit(f,n),this.options.useFsEvents||this._closePath(n)}_closePath(e){this._closeFile(e);const u=v.dirname(e);this._getWatchedDir(u).remove(v.basename(e))}_closeFile(e){const u=this._closers.get(e);u&&(u.forEach(s=>s()),this._closers.delete(e))}_addPathCloser(e,u){if(!u)return;let s=this._closers.get(e);s||(s=[],this._closers.set(e,s)),s.push(u)}_readdirp(e,u){if(this.closed)return;const s={type:du,alwaysStat:!0,lstat:!0,...u};let n=$a(e,s);return this._streams.add(n),n.once(ka,()=>{n=void 0}),n.once(Ma,()=>{n&&(this._streams.delete(n),n=void 0)}),n}}const ol=(t,e)=>{const u=new Dl(e);return u.add(t),u};var al=ol;let ce=!0;const ge=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let Ne=0;if(ge.process&&ge.process.env&&ge.process.stdout){const{FORCE_COLOR:t,NODE_DISABLE_COLORS:e,NO_COLOR:u,TERM:s,COLORTERM:n}=ge.process.env;e||u||t==="0"?ce=!1:t==="1"||t==="2"||t==="3"?ce=!0:s==="dumb"?ce=!1:"CI"in ge.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(r=>r in ge.process.env)?ce=!0:ce=process.stdout.isTTY,ce&&(process.platform==="win32"||n&&(n==="truecolor"||n==="24bit")?Ne=3:s&&(s.endsWith("-256color")||s.endsWith("256"))?Ne=2:Ne=1)}let _n={enabled:ce,supportLevel:Ne};function He(t,e,u=1){const s=`\x1B[${t}m`,n=`\x1B[${e}m`,r=new RegExp(`\\x1b\\[${e}m`,"g");return i=>_n.enabled&&_n.supportLevel>=u?s+(""+i).replace(r,s)+n:""+i}const Le=He(33,39),ll=He(90,39),cl=He(92,39),fl=He(95,39),hl=He(96,39),ct=(t=!0)=>{let e=!1;return u=>{if(e||u==="unknown-flag")return!0;if(u==="argument")return e=!0,t}},An=(t,e=process.argv.slice(2))=>(Ru(t,e,{ignore:ct()}),e),dl=t=>{let e=Buffer.alloc(0);return u=>{for(e=Buffer.concat([e,u]);e.length>4;){const s=e.readInt32BE(0);if(e.length>=4+s){const n=e.slice(4,4+s);t(n),e=e.slice(4+s)}else break}}},yn=async()=>{const t=Nn.createServer(u=>{u.on("data",dl(s=>{const n=JSON.parse(s.toString());t.emit("data",n)}))}),e=Ln.getPipePath(process.pid);return await J.promises.mkdir(Hn.tmpdir,{recursive:!0}),await J.promises.rm(e,{force:!0}),await new Promise((u,s)=>{t.listen(e,u),t.on("error",s)}),t.unref(),process.on("exit",()=>{if(t.close(),process.platform!=="win32")try{J.rmSync(e)}catch{}}),t},El=()=>new Date().toLocaleTimeString(),Ie=(...t)=>console.log(ll(El()),hl("[tsx]"),...t),pl="\x1Bc",Cl=(t,e)=>{let u;return function(){u&&clearTimeout(u),u=setTimeout(()=>Reflect.apply(t,this,arguments),e)}},wn={noCache:{type:Boolean,description:"Disable caching",default:!1},tsconfig:{type:String,description:"Custom tsconfig.json path"},clearScreen:{type:Boolean,description:"Clearing the screen on rerun",default:!0},ignore:{type:[String],description:"Paths & globs to exclude from being watched"}},Fl=ei({name:"watch",parameters:["<script path>"],flags:wn,help:{description:"Run the script and watch for changes"},ignoreArgv:ct(!1)},async t=>{const e=An(wn,process.argv.slice(3)),u={noCache:t.flags.noCache,tsconfigPath:t.flags.tsconfig,clearScreen:t.flags.clearScreen,ignore:t.flags.ignore,ipc:!0};let s,n=!1;(await yn()).on("data",l=>{if(l&&typeof l=="object"&&"type"in l&&l.type==="dependency"&&"path"in l&&typeof l.path=="string"){const E=l.path.startsWith("file:")?yu.fileURLToPath(l.path):l.path;K.isAbsolute(E)&&f.add(E)}});const i=()=>{if(!n)return Ds(e,u)};let D=!1;const o=async(l,E="SIGTERM",p=5e3)=>{let F=!1;const A=new Promise(B=>{l.on("exit",N=>{F=!0,D=!1,B(N)})});return D=!0,l.kill(E),setTimeout(()=>{F||(Ie(Le(`Process didn't exit in ${Math.floor(p/1e3)}s. Force killing...`)),l.kill("SIGKILL"))},p),await A},a=Cl(async(l,E)=>{const p=l?`${l?fl(l):""}${E?` in ${cl(`./${E}`)}`:""}`:"";if(D){Ie(p,Le("Process hasn't exited. Killing process...")),s.kill("SIGKILL");return}s&&(s.exitCode===null?(Ie(p,Le("Restarting...")),await o(s)):Ie(p,Le("Rerunning...")),u.clearScreen&&process.stdout.write(pl)),s=i()},100);a();const c=l=>{n=!0,(s==null?void 0:s.exitCode)===null?(D&&Ie(Le("Previous process hasn't exited yet. Force killing...")),o(s,D?"SIGKILL":l).then(E=>{process.exit(E!=null?E:0)},()=>{})):process.exit(me.constants.signals[l])};process.on("SIGINT",c),process.on("SIGTERM",c);const f=al(t._,{cwd:process.cwd(),ignoreInitial:!0,ignored:["**/.*/**","**/.*","**/{node_modules,bower_components,vendor}/**",...u.ignore],ignorePermissionErrors:!0}).on("all",a);process.stdin.on("data",()=>a("Return key"))}),gl=(t,e)=>{let u;e.on("data",r=>{r&&r.type==="signal"&&u&&u(r.signal)});const s=()=>{const r=new Promise(i=>{setTimeout(()=>i(void 0),30),u=i});return r.then(()=>{u=void 0},()=>{}),r},n=async r=>{await s()!==r&&(t.kill(r),await s()!==r&&(t.on("exit",()=>{const o=me.constants.signals[r];process.exit(128+o)}),t.kill("SIGKILL")))};process.on("SIGINT",n),process.on("SIGTERM",n)},Rn={noCache:{type:Boolean,description:"Disable caching"},tsconfig:{type:String,description:"Custom tsconfig.json path"}};Ku({name:"tsx",parameters:["[script path]"],commands:[Fl],flags:{...Rn,version:{type:Boolean,alias:"v",description:"Show version"},help:{type:Boolean,alias:"h",description:"Show help"}},help:!1,ignoreArgv:ct()},async t=>{t.flags.version?process.stdout.write(`tsx v${$n.version}
51
+ */const ZD=_e,Gs=QD,Ws=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),JD=t=>e=>t===!0?Number(e):String(e),Qt=t=>typeof t=="number"||typeof t=="string"&&t!=="",ve=t=>Number.isInteger(+t),Zt=t=>{let e=`${t}`,u=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++u]==="0";);return u>0},eo=(t,e,u)=>typeof t=="string"||typeof e=="string"?!0:u.stringify===!0,to=(t,e,u)=>{if(e>0){let s=t[0]==="-"?"-":"";s&&(t=t.slice(1)),t=s+t.padStart(s?e-1:e,"0")}return u===!1?String(t):t},js=(t,e)=>{let u=t[0]==="-"?"-":"";for(u&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return u?"-"+t:t},uo=(t,e)=>{t.negatives.sort((i,D)=>i<D?-1:i>D?1:0),t.positives.sort((i,D)=>i<D?-1:i>D?1:0);let u=e.capture?"":"?:",s="",n="",r;return t.positives.length&&(s=t.positives.join("|")),t.negatives.length&&(n=`-(${u}${t.negatives.join("|")})`),s&&n?r=`${s}|${n}`:r=s||n,e.wrap?`(${u}${r})`:r},Us=(t,e,u,s)=>{if(u)return Gs(t,e,{wrap:!1,...s});let n=String.fromCharCode(t);if(t===e)return n;let r=String.fromCharCode(e);return`[${n}-${r}]`},Ks=(t,e,u)=>{if(Array.isArray(t)){let s=u.wrap===!0,n=u.capture?"":"?:";return s?`(${n}${t.join("|")})`:t.join("|")}return Gs(t,e,u)},Vs=(...t)=>new RangeError("Invalid range arguments: "+ZD.inspect(...t)),zs=(t,e,u)=>{if(u.strictRanges===!0)throw Vs([t,e]);return[]},so=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},no=(t,e,u=1,s={})=>{let n=Number(t),r=Number(e);if(!Number.isInteger(n)||!Number.isInteger(r)){if(s.strictRanges===!0)throw Vs([t,e]);return[]}n===0&&(n=0),r===0&&(r=0);let i=n>r,D=String(t),o=String(e),l=String(u);u=Math.max(Math.abs(u),1);let c=Zt(D)||Zt(o)||Zt(l),f=c?Math.max(D.length,o.length,l.length):0,a=c===!1&&eo(t,e,s)===!1,E=s.transform||JD(a);if(s.toRegex&&u===1)return Us(js(t,f),js(e,f),!0,s);let p={negatives:[],positives:[]},F=N=>p[N<0?"negatives":"positives"].push(Math.abs(N)),A=[],S=0;for(;i?n>=r:n<=r;)s.toRegex===!0&&u>1?F(n):A.push(to(E(n,S),f,a)),n=i?n-u:n+u,S++;return s.toRegex===!0?u>1?uo(p,s):Ks(A,null,{wrap:!1,...s}):A},ro=(t,e,u=1,s={})=>{if(!ve(t)&&t.length>1||!ve(e)&&e.length>1)return zs(t,e,s);let n=s.transform||(a=>String.fromCharCode(a)),r=`${t}`.charCodeAt(0),i=`${e}`.charCodeAt(0),D=r>i,o=Math.min(r,i),l=Math.max(r,i);if(s.toRegex&&u===1)return Us(o,l,!1,s);let c=[],f=0;for(;D?r>=i:r<=i;)c.push(n(r,f)),r=D?r-u:r+u,f++;return s.toRegex===!0?Ks(c,null,{wrap:!1,options:s}):c},st=(t,e,u,s={})=>{if(e==null&&Qt(t))return[t];if(!Qt(t)||!Qt(e))return zs(t,e,s);if(typeof u=="function")return st(t,e,1,{transform:u});if(Ws(u))return st(t,e,0,u);let n={...s};return n.capture===!0&&(n.wrap=!0),u=u||n.step||1,ve(u)?ve(t)&&ve(e)?no(t,e,u,n):ro(t,e,Math.max(Math.abs(u),1),n):u!=null&&!Ws(u)?so(u,n):st(t,e,1,u)};var Ys=st;const io=Ys,qs=ut,Do=(t,e={})=>{let u=(s,n={})=>{let r=qs.isInvalidBrace(n),i=s.invalid===!0&&e.escapeInvalid===!0,D=r===!0||i===!0,o=e.escapeInvalid===!0?"\\":"",l="";if(s.isOpen===!0||s.isClose===!0)return o+s.value;if(s.type==="open")return D?o+s.value:"(";if(s.type==="close")return D?o+s.value:")";if(s.type==="comma")return s.prev.type==="comma"?"":D?s.value:"|";if(s.value)return s.value;if(s.nodes&&s.ranges>0){let c=qs.reduce(s.nodes),f=io(...c,{...e,wrap:!1,toRegex:!0});if(f.length!==0)return c.length>1&&f.length>1?`(${f})`:f}if(s.nodes)for(let c of s.nodes)l+=u(c,s);return l};return u(t)};var oo=Do;const ao=Ys,Xs=qt,pe=ut,ae=(t="",e="",u=!1)=>{let s=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return u?pe.flatten(e).map(n=>`{${n}}`):e;for(let n of t)if(Array.isArray(n))for(let r of n)s.push(ae(r,e,u));else for(let r of e)u===!0&&typeof r=="string"&&(r=`{${r}}`),s.push(Array.isArray(r)?ae(n,r,u):n+r);return pe.flatten(s)},lo=(t,e={})=>{let u=e.rangeLimit===void 0?1e3:e.rangeLimit,s=(n,r={})=>{n.queue=[];let i=r,D=r.queue;for(;i.type!=="brace"&&i.type!=="root"&&i.parent;)i=i.parent,D=i.queue;if(n.invalid||n.dollar){D.push(ae(D.pop(),Xs(n,e)));return}if(n.type==="brace"&&n.invalid!==!0&&n.nodes.length===2){D.push(ae(D.pop(),["{}"]));return}if(n.nodes&&n.ranges>0){let f=pe.reduce(n.nodes);if(pe.exceedsLimit(...f,e.step,u))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let a=ao(...f,e);a.length===0&&(a=Xs(n,e)),D.push(ae(D.pop(),a)),n.nodes=[];return}let o=pe.encloseBrace(n),l=n.queue,c=n;for(;c.type!=="brace"&&c.type!=="root"&&c.parent;)c=c.parent,l=c.queue;for(let f=0;f<n.nodes.length;f++){let a=n.nodes[f];if(a.type==="comma"&&n.type==="brace"){f===1&&l.push(""),l.push("");continue}if(a.type==="close"){D.push(ae(D.pop(),l,o));continue}if(a.value&&a.type!=="open"){l.push(ae(l.pop(),a.value));continue}a.nodes&&s(a,n)}return l};return pe.flatten(s(t))};var co=lo,fo={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
52
+ `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"};const ho=qt,{MAX_LENGTH:Qs,CHAR_BACKSLASH:Jt,CHAR_BACKTICK:Eo,CHAR_COMMA:po,CHAR_DOT:Co,CHAR_LEFT_PARENTHESES:Fo,CHAR_RIGHT_PARENTHESES:go,CHAR_LEFT_CURLY_BRACE:mo,CHAR_RIGHT_CURLY_BRACE:_o,CHAR_LEFT_SQUARE_BRACKET:Zs,CHAR_RIGHT_SQUARE_BRACKET:Js,CHAR_DOUBLE_QUOTE:Ao,CHAR_SINGLE_QUOTE:yo,CHAR_NO_BREAK_SPACE:wo,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Ro}=fo,bo=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let u=e||{},s=typeof u.maxLength=="number"?Math.min(Qs,u.maxLength):Qs;if(t.length>s)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${s})`);let n={type:"root",input:t,nodes:[]},r=[n],i=n,D=n,o=0,l=t.length,c=0,f=0,a;const E=()=>t[c++],p=F=>{if(F.type==="text"&&D.type==="dot"&&(D.type="text"),D&&D.type==="text"&&F.type==="text"){D.value+=F.value;return}return i.nodes.push(F),F.parent=i,F.prev=D,D=F,F};for(p({type:"bos"});c<l;)if(i=r[r.length-1],a=E(),!(a===Ro||a===wo)){if(a===Jt){p({type:"text",value:(e.keepEscaping?a:"")+E()});continue}if(a===Js){p({type:"text",value:"\\"+a});continue}if(a===Zs){o++;let F;for(;c<l&&(F=E());){if(a+=F,F===Zs){o++;continue}if(F===Jt){a+=E();continue}if(F===Js&&(o--,o===0))break}p({type:"text",value:a});continue}if(a===Fo){i=p({type:"paren",nodes:[]}),r.push(i),p({type:"text",value:a});continue}if(a===go){if(i.type!=="paren"){p({type:"text",value:a});continue}i=r.pop(),p({type:"text",value:a}),i=r[r.length-1];continue}if(a===Ao||a===yo||a===Eo){let F=a,A;for(e.keepQuotes!==!0&&(a="");c<l&&(A=E());){if(A===Jt){a+=A+E();continue}if(A===F){e.keepQuotes===!0&&(a+=A);break}a+=A}p({type:"text",value:a});continue}if(a===mo){f++;let A={type:"brace",open:!0,close:!1,dollar:D.value&&D.value.slice(-1)==="$"||i.dollar===!0,depth:f,commas:0,ranges:0,nodes:[]};i=p(A),r.push(i),p({type:"open",value:a});continue}if(a===_o){if(i.type!=="brace"){p({type:"text",value:a});continue}let F="close";i=r.pop(),i.close=!0,p({type:F,value:a}),f--,i=r[r.length-1];continue}if(a===po&&f>0){if(i.ranges>0){i.ranges=0;let F=i.nodes.shift();i.nodes=[F,{type:"text",value:ho(i)}]}p({type:"comma",value:a}),i.commas++;continue}if(a===Co&&f>0&&i.commas===0){let F=i.nodes;if(f===0||F.length===0){p({type:"text",value:a});continue}if(D.type==="dot"){if(i.range=[],D.value+=a,D.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,D.type="text";continue}i.ranges++,i.args=[];continue}if(D.type==="range"){F.pop();let A=F[F.length-1];A.value+=D.value+a,D=A,i.ranges--;continue}p({type:"dot",value:a});continue}p({type:"text",value:a})}do if(i=r.pop(),i.type!=="root"){i.nodes.forEach(S=>{S.nodes||(S.type==="open"&&(S.isOpen=!0),S.type==="close"&&(S.isClose=!0),S.nodes||(S.type="text"),S.invalid=!0)});let F=r[r.length-1],A=F.nodes.indexOf(i);F.nodes.splice(A,1,...i.nodes)}while(r.length>0);return p({type:"eos"}),n};var vo=bo;const en=qt,So=oo,Bo=co,$o=vo,Y=(t,e={})=>{let u=[];if(Array.isArray(t))for(let s of t){let n=Y.create(s,e);Array.isArray(n)?u.push(...n):u.push(n)}else u=[].concat(Y.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(u=[...new Set(u)]),u};Y.parse=(t,e={})=>$o(t,e),Y.stringify=(t,e={})=>en(typeof t=="string"?Y.parse(t,e):t,e),Y.compile=(t,e={})=>(typeof t=="string"&&(t=Y.parse(t,e)),So(t,e)),Y.expand=(t,e={})=>{typeof t=="string"&&(t=Y.parse(t,e));let u=Bo(t,e);return e.noempty===!0&&(u=u.filter(Boolean)),e.nodupes===!0&&(u=[...new Set(u)]),u},Y.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?Y.compile(t,e):Y.expand(t,e);var To=Y,xo=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"],Oo=xo;const No=K,Ho=Oo,Lo=new Set(Ho);var Io=t=>Lo.has(No.extname(t).slice(1).toLowerCase()),nt={};(function(t){const{sep:e}=K,{platform:u}=process,s=me;t.EV_ALL="all",t.EV_READY="ready",t.EV_ADD="add",t.EV_CHANGE="change",t.EV_ADD_DIR="addDir",t.EV_UNLINK="unlink",t.EV_UNLINK_DIR="unlinkDir",t.EV_RAW="raw",t.EV_ERROR="error",t.STR_DATA="data",t.STR_END="end",t.STR_CLOSE="close",t.FSEVENT_CREATED="created",t.FSEVENT_MODIFIED="modified",t.FSEVENT_DELETED="deleted",t.FSEVENT_MOVED="moved",t.FSEVENT_CLONED="cloned",t.FSEVENT_UNKNOWN="unknown",t.FSEVENT_FLAG_MUST_SCAN_SUBDIRS=1,t.FSEVENT_TYPE_FILE="file",t.FSEVENT_TYPE_DIRECTORY="directory",t.FSEVENT_TYPE_SYMLINK="symlink",t.KEY_LISTENERS="listeners",t.KEY_ERR="errHandlers",t.KEY_RAW="rawEmitters",t.HANDLER_KEYS=[t.KEY_LISTENERS,t.KEY_ERR,t.KEY_RAW],t.DOT_SLASH=`.${e}`,t.BACK_SLASH_RE=/\\/g,t.DOUBLE_SLASH_RE=/\/\//,t.SLASH_OR_BACK_SLASH_RE=/[/\\]/,t.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,t.REPLACER_RE=/^\.[/\\]/,t.SLASH="/",t.SLASH_SLASH="//",t.BRACE_START="{",t.BANG="!",t.ONE_DOT=".",t.TWO_DOTS="..",t.STAR="*",t.GLOBSTAR="**",t.ROOT_GLOBSTAR="/**/*",t.SLASH_GLOBSTAR="/**",t.DIR_SUFFIX="Dir",t.ANYMATCH_OPTS={dot:!0},t.STRING_TYPE="string",t.FUNCTION_TYPE="function",t.EMPTY_STR="",t.EMPTY_FN=()=>{},t.IDENTITY_FN=n=>n,t.isWindows=u==="win32",t.isMacos=u==="darwin",t.isLinux=u==="linux",t.isIBMi=s.type()==="OS400"})(nt);const se=J,I=K,{promisify:Se}=_e,Po=Io,{isWindows:ko,isLinux:Mo,EMPTY_FN:Go,EMPTY_STR:Wo,KEY_LISTENERS:Ce,KEY_ERR:eu,KEY_RAW:Be,HANDLER_KEYS:jo,EV_CHANGE:rt,EV_ADD:it,EV_ADD_DIR:Uo,EV_ERROR:tn,STR_DATA:Ko,STR_END:Vo,BRACE_START:zo,STAR:Yo}=nt,qo="watch",Xo=Se(se.open),un=Se(se.stat),Qo=Se(se.lstat),Zo=Se(se.close),tu=Se(se.realpath),Jo={lstat:Qo,stat:un},uu=(t,e)=>{t instanceof Set?t.forEach(e):e(t)},$e=(t,e,u)=>{let s=t[e];s instanceof Set||(t[e]=s=new Set([s])),s.add(u)},ea=t=>e=>{const u=t[e];u instanceof Set?u.clear():delete t[e]},Te=(t,e,u)=>{const s=t[e];s instanceof Set?s.delete(u):s===u&&delete t[e]},sn=t=>t instanceof Set?t.size===0:!t,Dt=new Map;function nn(t,e,u,s,n){const r=(i,D)=>{u(t),n(i,D,{watchedPath:t}),D&&t!==D&&ot(I.resolve(t,D),Ce,I.join(t,D))};try{return se.watch(t,e,r)}catch(i){s(i)}}const ot=(t,e,u,s,n)=>{const r=Dt.get(t);r&&uu(r[e],i=>{i(u,s,n)})},ta=(t,e,u,s)=>{const{listener:n,errHandler:r,rawEmitter:i}=s;let D=Dt.get(e),o;if(!u.persistent)return o=nn(t,u,n,r,i),o.close.bind(o);if(D)$e(D,Ce,n),$e(D,eu,r),$e(D,Be,i);else{if(o=nn(t,u,ot.bind(null,e,Ce),r,ot.bind(null,e,Be)),!o)return;o.on(tn,async l=>{const c=ot.bind(null,e,eu);if(D.watcherUnusable=!0,ko&&l.code==="EPERM")try{const f=await Xo(t,"r");await Zo(f),c(l)}catch{}else c(l)}),D={listeners:n,errHandlers:r,rawEmitters:i,watcher:o},Dt.set(e,D)}return()=>{Te(D,Ce,n),Te(D,eu,r),Te(D,Be,i),sn(D.listeners)&&(D.watcher.close(),Dt.delete(e),jo.forEach(ea(D)),D.watcher=void 0,Object.freeze(D))}},su=new Map,ua=(t,e,u,s)=>{const{listener:n,rawEmitter:r}=s;let i=su.get(e);const D=i&&i.options;return D&&(D.persistent<u.persistent||D.interval>u.interval)&&(i.listeners,i.rawEmitters,se.unwatchFile(e),i=void 0),i?($e(i,Ce,n),$e(i,Be,r)):(i={listeners:n,rawEmitters:r,options:u,watcher:se.watchFile(e,u,(o,l)=>{uu(i.rawEmitters,f=>{f(rt,e,{curr:o,prev:l})});const c=o.mtimeMs;(o.size!==l.size||c>l.mtimeMs||c===0)&&uu(i.listeners,f=>f(t,o))})},su.set(e,i)),()=>{Te(i,Ce,n),Te(i,Be,r),sn(i.listeners)&&(su.delete(e),se.unwatchFile(e),i.options=i.watcher=void 0,Object.freeze(i))}};let sa=class{constructor(e){this.fsw=e,this._boundHandleError=u=>e._handleError(u)}_watchWithNodeFs(e,u){const s=this.fsw.options,n=I.dirname(e),r=I.basename(e);this.fsw._getWatchedDir(n).add(r);const D=I.resolve(e),o={persistent:s.persistent};u||(u=Go);let l;return s.usePolling?(o.interval=s.enableBinaryInterval&&Po(r)?s.binaryInterval:s.interval,l=ua(e,D,o,{listener:u,rawEmitter:this.fsw._emitRaw})):l=ta(e,D,o,{listener:u,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw}),l}_handleFile(e,u,s){if(this.fsw.closed)return;const n=I.dirname(e),r=I.basename(e),i=this.fsw._getWatchedDir(n);let D=u;if(i.has(r))return;const o=async(c,f)=>{if(this.fsw._throttle(qo,e,5)){if(!f||f.mtimeMs===0)try{const a=await un(e);if(this.fsw.closed)return;const E=a.atimeMs,p=a.mtimeMs;(!E||E<=p||p!==D.mtimeMs)&&this.fsw._emit(rt,e,a),Mo&&D.ino!==a.ino?(this.fsw._closeFile(c),D=a,this.fsw._addPathCloser(c,this._watchWithNodeFs(e,o))):D=a}catch{this.fsw._remove(n,r)}else if(i.has(r)){const a=f.atimeMs,E=f.mtimeMs;(!a||a<=E||E!==D.mtimeMs)&&this.fsw._emit(rt,e,f),D=f}}},l=this._watchWithNodeFs(e,o);if(!(s&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(it,e,0))return;this.fsw._emit(it,e,u)}return l}async _handleSymlink(e,u,s,n){if(this.fsw.closed)return;const r=e.fullPath,i=this.fsw._getWatchedDir(u);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let D;try{D=await tu(s)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(i.has(n)?this.fsw._symlinkPaths.get(r)!==D&&(this.fsw._symlinkPaths.set(r,D),this.fsw._emit(rt,s,e.stats)):(i.add(n),this.fsw._symlinkPaths.set(r,D),this.fsw._emit(it,s,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(r))return!0;this.fsw._symlinkPaths.set(r,!0)}_handleRead(e,u,s,n,r,i,D){if(e=I.join(e,Wo),!s.hasGlob&&(D=this.fsw._throttle("readdir",e,1e3),!D))return;const o=this.fsw._getWatchedDir(s.path),l=new Set;let c=this.fsw._readdirp(e,{fileFilter:f=>s.filterPath(f),directoryFilter:f=>s.filterDir(f),depth:0}).on(Ko,async f=>{if(this.fsw.closed){c=void 0;return}const a=f.path;let E=I.join(e,a);if(l.add(a),!(f.stats.isSymbolicLink()&&await this._handleSymlink(f,e,E,a))){if(this.fsw.closed){c=void 0;return}(a===n||!n&&!o.has(a))&&(this.fsw._incrReadyCount(),E=I.join(r,I.relative(r,E)),this._addToNodeFs(E,u,s,i+1))}}).on(tn,this._boundHandleError);return new Promise(f=>c.once(Vo,()=>{if(this.fsw.closed){c=void 0;return}const a=D?D.clear():!1;f(),o.getChildren().filter(E=>E!==e&&!l.has(E)&&(!s.hasGlob||s.filterPath({fullPath:I.resolve(e,E)}))).forEach(E=>{this.fsw._remove(e,E)}),c=void 0,a&&this._handleRead(e,!1,s,n,r,i,D)}))}async _handleDir(e,u,s,n,r,i,D){const o=this.fsw._getWatchedDir(I.dirname(e)),l=o.has(I.basename(e));!(s&&this.fsw.options.ignoreInitial)&&!r&&!l&&(!i.hasGlob||i.globFilter(e))&&this.fsw._emit(Uo,e,u),o.add(I.basename(e)),this.fsw._getWatchedDir(e);let c,f;const a=this.fsw.options.depth;if((a==null||n<=a)&&!this.fsw._symlinkPaths.has(D)){if(!r&&(await this._handleRead(e,s,i,r,e,n,c),this.fsw.closed))return;f=this._watchWithNodeFs(e,(E,p)=>{p&&p.mtimeMs===0||this._handleRead(E,!1,i,r,e,n,c)})}return f}async _addToNodeFs(e,u,s,n,r){const i=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return i(),!1;const D=this.fsw._getWatchHelpers(e,n);!D.hasGlob&&s&&(D.hasGlob=s.hasGlob,D.globFilter=s.globFilter,D.filterPath=o=>s.filterPath(o),D.filterDir=o=>s.filterDir(o));try{const o=await Jo[D.statMethod](D.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(D.watchPath,o))return i(),!1;const l=this.fsw.options.followSymlinks&&!e.includes(Yo)&&!e.includes(zo);let c;if(o.isDirectory()){const f=I.resolve(e),a=l?await tu(e):e;if(this.fsw.closed||(c=await this._handleDir(D.watchPath,o,u,n,r,D,a),this.fsw.closed))return;f!==a&&a!==void 0&&this.fsw._symlinkPaths.set(f,a)}else if(o.isSymbolicLink()){const f=l?await tu(e):e;if(this.fsw.closed)return;const a=I.dirname(D.watchPath);if(this.fsw._getWatchedDir(a).add(D.watchPath),this.fsw._emit(it,D.watchPath,o),c=await this._handleDir(a,o,u,n,e,D,f),this.fsw.closed)return;f!==void 0&&this.fsw._symlinkPaths.set(I.resolve(e),f)}else c=this._handleFile(D.watchPath,o,u);return i(),this.fsw._addPathCloser(e,c),!1}catch(o){if(this.fsw._handleError(o))return i(),e}}};var na=sa,nu={exports:{}};const ru=J,P=K,{promisify:iu}=_e;let Fe;try{Fe=dt.require("fsevents")}catch(t){process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR&&console.error(t)}if(Fe){const t=process.version.match(/v(\d+)\.(\d+)/);if(t&&t[1]&&t[2]){const e=Number.parseInt(t[1],10),u=Number.parseInt(t[2],10);e===8&&u<16&&(Fe=void 0)}}const{EV_ADD:Du,EV_CHANGE:ra,EV_ADD_DIR:rn,EV_UNLINK:at,EV_ERROR:ia,STR_DATA:Da,STR_END:oa,FSEVENT_CREATED:aa,FSEVENT_MODIFIED:la,FSEVENT_DELETED:ca,FSEVENT_MOVED:fa,FSEVENT_UNKNOWN:ha,FSEVENT_FLAG_MUST_SCAN_SUBDIRS:da,FSEVENT_TYPE_FILE:Ea,FSEVENT_TYPE_DIRECTORY:xe,FSEVENT_TYPE_SYMLINK:Dn,ROOT_GLOBSTAR:on,DIR_SUFFIX:pa,DOT_SLASH:an,FUNCTION_TYPE:ou,EMPTY_FN:Ca,IDENTITY_FN:Fa}=nt,ga=t=>isNaN(t)?{}:{depth:t},au=iu(ru.stat),ma=iu(ru.lstat),ln=iu(ru.realpath),_a={stat:au,lstat:ma},le=new Map,Aa=10,ya=new Set([69888,70400,71424,72704,73472,131328,131840,262912]),wa=(t,e)=>({stop:Fe.watch(t,e)});function Ra(t,e,u,s){let n=P.extname(e)?P.dirname(e):e;const r=P.dirname(n);let i=le.get(n);ba(r)&&(n=r);const D=P.resolve(t),o=D!==e,l=(f,a,E)=>{o&&(f=f.replace(e,D)),(f===D||!f.indexOf(D+P.sep))&&u(f,a,E)};let c=!1;for(const f of le.keys())if(e.indexOf(P.resolve(f)+P.sep)===0){n=f,i=le.get(n),c=!0;break}return i||c?i.listeners.add(l):(i={listeners:new Set([l]),rawEmitter:s,watcher:wa(n,(f,a)=>{if(!i.listeners.size||a&da)return;const E=Fe.getInfo(f,a);i.listeners.forEach(p=>{p(f,a,E)}),i.rawEmitter(E.event,f,E)})},le.set(n,i)),()=>{const f=i.listeners;if(f.delete(l),!f.size&&(le.delete(n),i.watcher))return i.watcher.stop().then(()=>{i.rawEmitter=i.watcher=void 0,Object.freeze(i)})}}const ba=t=>{let e=0;for(const u of le.keys())if(u.indexOf(t)===0&&(e++,e>=Aa))return!0;return!1},va=()=>Fe&&le.size<128,lu=(t,e)=>{let u=0;for(;!t.indexOf(e)&&(t=P.dirname(t))!==e;)u++;return u},cn=(t,e)=>t.type===xe&&e.isDirectory()||t.type===Dn&&e.isSymbolicLink()||t.type===Ea&&e.isFile();let Sa=class{constructor(e){this.fsw=e}checkIgnored(e,u){const s=this.fsw._ignoredPaths;if(this.fsw._isIgnored(e,u))return s.add(e),u&&u.isDirectory()&&s.add(e+on),!0;s.delete(e),s.delete(e+on)}addOrChange(e,u,s,n,r,i,D,o){const l=r.has(i)?ra:Du;this.handleEvent(l,e,u,s,n,r,i,D,o)}async checkExists(e,u,s,n,r,i,D,o){try{const l=await au(e);if(this.fsw.closed)return;cn(D,l)?this.addOrChange(e,u,s,n,r,i,D,o):this.handleEvent(at,e,u,s,n,r,i,D,o)}catch(l){l.code==="EACCES"?this.addOrChange(e,u,s,n,r,i,D,o):this.handleEvent(at,e,u,s,n,r,i,D,o)}}handleEvent(e,u,s,n,r,i,D,o,l){if(!(this.fsw.closed||this.checkIgnored(u)))if(e===at){const c=o.type===xe;(c||i.has(D))&&this.fsw._remove(r,D,c)}else{if(e===Du){if(o.type===xe&&this.fsw._getWatchedDir(u),o.type===Dn&&l.followSymlinks){const f=l.depth===void 0?void 0:lu(s,n)+1;return this._addToFsEvents(u,!1,!0,f)}this.fsw._getWatchedDir(r).add(D)}const c=o.type===xe?e+pa:e;this.fsw._emit(c,u),c===rn&&this._addToFsEvents(u,!1,!0)}}_watchWithFsEvents(e,u,s,n){if(this.fsw.closed||this.fsw._isIgnored(e))return;const r=this.fsw.options,D=Ra(e,u,async(o,l,c)=>{if(this.fsw.closed||r.depth!==void 0&&lu(o,u)>r.depth)return;const f=s(P.join(e,P.relative(e,o)));if(n&&!n(f))return;const a=P.dirname(f),E=P.basename(f),p=this.fsw._getWatchedDir(c.type===xe?f:a);if(ya.has(l)||c.event===ha)if(typeof r.ignored===ou){let F;try{F=await au(f)}catch{}if(this.fsw.closed||this.checkIgnored(f,F))return;cn(c,F)?this.addOrChange(f,o,u,a,p,E,c,r):this.handleEvent(at,f,o,u,a,p,E,c,r)}else this.checkExists(f,o,u,a,p,E,c,r);else switch(c.event){case aa:case la:return this.addOrChange(f,o,u,a,p,E,c,r);case ca:case fa:return this.checkExists(f,o,u,a,p,E,c,r)}},this.fsw._emitRaw);return this.fsw._emitReady(),D}async _handleFsEventsSymlink(e,u,s,n){if(!(this.fsw.closed||this.fsw._symlinkPaths.has(u))){this.fsw._symlinkPaths.set(u,!0),this.fsw._incrReadyCount();try{const r=await ln(e);if(this.fsw.closed)return;if(this.fsw._isIgnored(r))return this.fsw._emitReady();this.fsw._incrReadyCount(),this._addToFsEvents(r||e,i=>{let D=e;return r&&r!==an?D=i.replace(r,e):i!==an&&(D=P.join(e,i)),s(D)},!1,n)}catch(r){if(this.fsw._handleError(r))return this.fsw._emitReady()}}}emitAdd(e,u,s,n,r){const i=s(e),D=u.isDirectory(),o=this.fsw._getWatchedDir(P.dirname(i)),l=P.basename(i);D&&this.fsw._getWatchedDir(i),!o.has(l)&&(o.add(l),(!n.ignoreInitial||r===!0)&&this.fsw._emit(D?rn:Du,i,u))}initWatch(e,u,s,n){if(this.fsw.closed)return;const r=this._watchWithFsEvents(s.watchPath,P.resolve(e||s.watchPath),n,s.globFilter);this.fsw._addPathCloser(u,r)}async _addToFsEvents(e,u,s,n){if(this.fsw.closed)return;const r=this.fsw.options,i=typeof u===ou?u:Fa,D=this.fsw._getWatchHelpers(e);try{const o=await _a[D.statMethod](D.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(D.watchPath,o))throw null;if(o.isDirectory()){if(D.globFilter||this.emitAdd(i(e),o,i,r,s),n&&n>r.depth)return;this.fsw._readdirp(D.watchPath,{fileFilter:l=>D.filterPath(l),directoryFilter:l=>D.filterDir(l),...ga(r.depth-(n||0))}).on(Da,l=>{if(this.fsw.closed||l.stats.isDirectory()&&!D.filterPath(l))return;const c=P.join(D.watchPath,l.path),{fullPath:f}=l;if(D.followSymlinks&&l.stats.isSymbolicLink()){const a=r.depth===void 0?void 0:lu(c,P.resolve(D.watchPath))+1;this._handleFsEventsSymlink(c,f,i,a)}else this.emitAdd(c,l.stats,i,r,s)}).on(ia,Ca).on(oa,()=>{this.fsw._emitReady()})}else this.emitAdd(D.watchPath,o,i,r,s),this.fsw._emitReady()}catch(o){(!o||this.fsw._handleError(o))&&(this.fsw._emitReady(),this.fsw._emitReady())}if(r.persistent&&s!==!0)if(typeof u===ou)this.initWatch(void 0,e,D,i);else{let o;try{o=await ln(D.watchPath)}catch{}this.initWatch(o,e,D,i)}}};nu.exports=Sa,nu.exports.canUse=va;var Ba=nu.exports;const{EventEmitter:$a}=On,cu=J,v=K,{promisify:fn}=_e,Ta=wD,fu=$D.default,xa=WD,hu=xs,Oa=To,Na=vs,Ha=na,hn=Ba,{EV_ALL:du,EV_READY:La,EV_ADD:lt,EV_CHANGE:Oe,EV_UNLINK:dn,EV_ADD_DIR:Ia,EV_UNLINK_DIR:Pa,EV_RAW:ka,EV_ERROR:Eu,STR_CLOSE:Ma,STR_END:Ga,BACK_SLASH_RE:Wa,DOUBLE_SLASH_RE:En,SLASH_OR_BACK_SLASH_RE:ja,DOT_RE:Ua,REPLACER_RE:Ka,SLASH:pu,SLASH_SLASH:Va,BRACE_START:za,BANG:Cu,ONE_DOT:pn,TWO_DOTS:Ya,GLOBSTAR:qa,SLASH_GLOBSTAR:Fu,ANYMATCH_OPTS:gu,STRING_TYPE:mu,FUNCTION_TYPE:Xa,EMPTY_STR:_u,EMPTY_FN:Qa,isWindows:Za,isMacos:Ja,isIBMi:el}=nt,tl=fn(cu.stat),ul=fn(cu.readdir),Au=(t=[])=>Array.isArray(t)?t:[t],Cn=(t,e=[])=>(t.forEach(u=>{Array.isArray(u)?Cn(u,e):e.push(u)}),e),Fn=t=>{const e=Cn(Au(t));if(!e.every(u=>typeof u===mu))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(mn)},gn=t=>{let e=t.replace(Wa,pu),u=!1;for(e.startsWith(Va)&&(u=!0);e.match(En);)e=e.replace(En,pu);return u&&(e=pu+e),e},mn=t=>gn(v.normalize(gn(t))),_n=(t=_u)=>e=>typeof e!==mu?e:mn(v.isAbsolute(e)?e:v.join(t,e)),sl=(t,e)=>v.isAbsolute(t)?t:t.startsWith(Cu)?Cu+v.join(e,t.slice(1)):v.join(e,t),q=(t,e)=>t[e]===void 0;class nl{constructor(e,u){this.path=e,this._removeWatcher=u,this.items=new Set}add(e){const{items:u}=this;u&&e!==pn&&e!==Ya&&u.add(e)}async remove(e){const{items:u}=this;if(!u||(u.delete(e),u.size>0))return;const s=this.path;try{await ul(s)}catch{this._removeWatcher&&this._removeWatcher(v.dirname(s),v.basename(s))}}has(e){const{items:u}=this;if(u)return u.has(e)}getChildren(){const{items:e}=this;if(e)return[...e.values()]}dispose(){this.items.clear(),delete this.path,delete this._removeWatcher,delete this.items,Object.freeze(this)}}const rl="stat",il="lstat";class Dl{constructor(e,u,s,n){this.fsw=n,this.path=e=e.replace(Ka,_u),this.watchPath=u,this.fullWatchPath=v.resolve(u),this.hasGlob=u!==e,e===_u&&(this.hasGlob=!1),this.globSymlink=this.hasGlob&&s?void 0:!1,this.globFilter=this.hasGlob?fu(e,void 0,gu):!1,this.dirParts=this.getDirParts(e),this.dirParts.forEach(r=>{r.length>1&&r.pop()}),this.followSymlinks=s,this.statMethod=s?rl:il}checkGlobSymlink(e){return this.globSymlink===void 0&&(this.globSymlink=e.fullParentDir===this.fullWatchPath?!1:{realPath:e.fullParentDir,linkPath:this.fullWatchPath}),this.globSymlink?e.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath):e.fullPath}entryPath(e){return v.join(this.watchPath,v.relative(this.watchPath,this.checkGlobSymlink(e)))}filterPath(e){const{stats:u}=e;if(u&&u.isSymbolicLink())return this.filterDir(e);const s=this.entryPath(e);return(this.hasGlob&&typeof this.globFilter===Xa?this.globFilter(s):!0)&&this.fsw._isntIgnored(s,u)&&this.fsw._hasReadPermissions(u)}getDirParts(e){if(!this.hasGlob)return[];const u=[];return(e.includes(za)?Oa.expand(e):[e]).forEach(n=>{u.push(v.relative(this.watchPath,n).split(ja))}),u}filterDir(e){if(this.hasGlob){const u=this.getDirParts(this.checkGlobSymlink(e));let s=!1;this.unmatchedGlob=!this.dirParts.some(n=>n.every((r,i)=>(r===qa&&(s=!0),s||!u[0][i]||fu(r,u[0][i],gu))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(e),e.stats)}}class ol extends $a{constructor(e){super();const u={};e&&Object.assign(u,e),this._watched=new Map,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._symlinkPaths=new Map,this._streams=new Set,this.closed=!1,q(u,"persistent")&&(u.persistent=!0),q(u,"ignoreInitial")&&(u.ignoreInitial=!1),q(u,"ignorePermissionErrors")&&(u.ignorePermissionErrors=!1),q(u,"interval")&&(u.interval=100),q(u,"binaryInterval")&&(u.binaryInterval=300),q(u,"disableGlobbing")&&(u.disableGlobbing=!1),u.enableBinaryInterval=u.binaryInterval!==u.interval,q(u,"useFsEvents")&&(u.useFsEvents=!u.usePolling),hn.canUse()||(u.useFsEvents=!1),q(u,"usePolling")&&!u.useFsEvents&&(u.usePolling=Ja),el&&(u.usePolling=!0);const n=process.env.CHOKIDAR_USEPOLLING;if(n!==void 0){const o=n.toLowerCase();o==="false"||o==="0"?u.usePolling=!1:o==="true"||o==="1"?u.usePolling=!0:u.usePolling=!!o}const r=process.env.CHOKIDAR_INTERVAL;r&&(u.interval=Number.parseInt(r,10)),q(u,"atomic")&&(u.atomic=!u.usePolling&&!u.useFsEvents),u.atomic&&(this._pendingUnlinks=new Map),q(u,"followSymlinks")&&(u.followSymlinks=!0),q(u,"awaitWriteFinish")&&(u.awaitWriteFinish=!1),u.awaitWriteFinish===!0&&(u.awaitWriteFinish={});const i=u.awaitWriteFinish;i&&(i.stabilityThreshold||(i.stabilityThreshold=2e3),i.pollInterval||(i.pollInterval=100),this._pendingWrites=new Map),u.ignored&&(u.ignored=Au(u.ignored));let D=0;this._emitReady=()=>{D++,D>=this._readyCount&&(this._emitReady=Qa,this._readyEmitted=!0,process.nextTick(()=>this.emit(La)))},this._emitRaw=(...o)=>this.emit(ka,...o),this._readyEmitted=!1,this.options=u,u.useFsEvents?this._fsEventsHandler=new hn(this):this._nodeFsHandler=new Ha(this),Object.freeze(u)}add(e,u,s){const{cwd:n,disableGlobbing:r}=this.options;this.closed=!1;let i=Fn(e);return n&&(i=i.map(D=>{const o=sl(D,n);return r||!hu(D)?o:Na(o)})),i=i.filter(D=>D.startsWith(Cu)?(this._ignoredPaths.add(D.slice(1)),!1):(this._ignoredPaths.delete(D),this._ignoredPaths.delete(D+Fu),this._userIgnored=void 0,!0)),this.options.useFsEvents&&this._fsEventsHandler?(this._readyCount||(this._readyCount=i.length),this.options.persistent&&(this._readyCount+=i.length),i.forEach(D=>this._fsEventsHandler._addToFsEvents(D))):(this._readyCount||(this._readyCount=0),this._readyCount+=i.length,Promise.all(i.map(async D=>{const o=await this._nodeFsHandler._addToNodeFs(D,!s,0,0,u);return o&&this._emitReady(),o})).then(D=>{this.closed||D.filter(o=>o).forEach(o=>{this.add(v.dirname(o),v.basename(u||o))})})),this}unwatch(e){if(this.closed)return this;const u=Fn(e),{cwd:s}=this.options;return u.forEach(n=>{!v.isAbsolute(n)&&!this._closers.has(n)&&(s&&(n=v.join(s,n)),n=v.resolve(n)),this._closePath(n),this._ignoredPaths.add(n),this._watched.has(n)&&this._ignoredPaths.add(n+Fu),this._userIgnored=void 0}),this}close(){if(this.closed)return this._closePromise;this.closed=!0,this.removeAllListeners();const e=[];return this._closers.forEach(u=>u.forEach(s=>{const n=s();n instanceof Promise&&e.push(n)})),this._streams.forEach(u=>u.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(u=>u.dispose()),["closers","watched","streams","symlinkPaths","throttled"].forEach(u=>{this[`_${u}`].clear()}),this._closePromise=e.length?Promise.all(e).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){const e={};return this._watched.forEach((u,s)=>{const n=this.options.cwd?v.relative(this.options.cwd,s):s;e[n||pn]=u.getChildren().sort()}),e}emitWithAll(e,u){this.emit(...u),e!==Eu&&this.emit(du,...u)}async _emit(e,u,s,n,r){if(this.closed)return;const i=this.options;Za&&(u=v.normalize(u)),i.cwd&&(u=v.relative(i.cwd,u));const D=[e,u];r!==void 0?D.push(s,n,r):n!==void 0?D.push(s,n):s!==void 0&&D.push(s);const o=i.awaitWriteFinish;let l;if(o&&(l=this._pendingWrites.get(u)))return l.lastChange=new Date,this;if(i.atomic){if(e===dn)return this._pendingUnlinks.set(u,D),setTimeout(()=>{this._pendingUnlinks.forEach((c,f)=>{this.emit(...c),this.emit(du,...c),this._pendingUnlinks.delete(f)})},typeof i.atomic=="number"?i.atomic:100),this;e===lt&&this._pendingUnlinks.has(u)&&(e=D[0]=Oe,this._pendingUnlinks.delete(u))}if(o&&(e===lt||e===Oe)&&this._readyEmitted){const c=(f,a)=>{f?(e=D[0]=Eu,D[1]=f,this.emitWithAll(e,D)):a&&(D.length>2?D[2]=a:D.push(a),this.emitWithAll(e,D))};return this._awaitWriteFinish(u,o.stabilityThreshold,e,c),this}if(e===Oe&&!this._throttle(Oe,u,50))return this;if(i.alwaysStat&&s===void 0&&(e===lt||e===Ia||e===Oe)){const c=i.cwd?v.join(i.cwd,u):u;let f;try{f=await tl(c)}catch{}if(!f||this.closed)return;D.push(f)}return this.emitWithAll(e,D),this}_handleError(e){const u=e&&e.code;return e&&u!=="ENOENT"&&u!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||u!=="EPERM"&&u!=="EACCES")&&this.emit(Eu,e),e||this.closed}_throttle(e,u,s){this._throttled.has(e)||this._throttled.set(e,new Map);const n=this._throttled.get(e),r=n.get(u);if(r)return r.count++,!1;let i;const D=()=>{const l=n.get(u),c=l?l.count:0;return n.delete(u),clearTimeout(i),l&&clearTimeout(l.timeoutObject),c};i=setTimeout(D,s);const o={timeoutObject:i,clear:D,count:0};return n.set(u,o),o}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,u,s,n){let r,i=e;this.options.cwd&&!v.isAbsolute(e)&&(i=v.join(this.options.cwd,e));const D=new Date,o=l=>{cu.stat(i,(c,f)=>{if(c||!this._pendingWrites.has(e)){c&&c.code!=="ENOENT"&&n(c);return}const a=Number(new Date);l&&f.size!==l.size&&(this._pendingWrites.get(e).lastChange=a);const E=this._pendingWrites.get(e);a-E.lastChange>=u?(this._pendingWrites.delete(e),n(void 0,f)):r=setTimeout(o,this.options.awaitWriteFinish.pollInterval,f)})};this._pendingWrites.has(e)||(this._pendingWrites.set(e,{lastChange:D,cancelWait:()=>(this._pendingWrites.delete(e),clearTimeout(r),s)}),r=setTimeout(o,this.options.awaitWriteFinish.pollInterval))}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(e,u){if(this.options.atomic&&Ua.test(e))return!0;if(!this._userIgnored){const{cwd:s}=this.options,n=this.options.ignored,r=n&&n.map(_n(s)),i=Au(r).filter(o=>typeof o===mu&&!hu(o)).map(o=>o+Fu),D=this._getGlobIgnored().map(_n(s)).concat(r,i);this._userIgnored=fu(D,void 0,gu)}return this._userIgnored([e,u])}_isntIgnored(e,u){return!this._isIgnored(e,u)}_getWatchHelpers(e,u){const s=u||this.options.disableGlobbing||!hu(e)?e:xa(e),n=this.options.followSymlinks;return new Dl(e,s,n,this)}_getWatchedDir(e){this._boundRemove||(this._boundRemove=this._remove.bind(this));const u=v.resolve(e);return this._watched.has(u)||this._watched.set(u,new nl(u,this._boundRemove)),this._watched.get(u)}_hasReadPermissions(e){if(this.options.ignorePermissionErrors)return!0;const s=(e&&Number.parseInt(e.mode,10))&511;return!!(4&Number.parseInt(s.toString(8)[0],10))}_remove(e,u,s){const n=v.join(e,u),r=v.resolve(n);if(s=s!=null?s:this._watched.has(n)||this._watched.has(r),!this._throttle("remove",n,100))return;!s&&!this.options.useFsEvents&&this._watched.size===1&&this.add(e,u,!0),this._getWatchedDir(n).getChildren().forEach(a=>this._remove(n,a));const o=this._getWatchedDir(e),l=o.has(u);o.remove(u),this._symlinkPaths.has(r)&&this._symlinkPaths.delete(r);let c=n;if(this.options.cwd&&(c=v.relative(this.options.cwd,n)),this.options.awaitWriteFinish&&this._pendingWrites.has(c)&&this._pendingWrites.get(c).cancelWait()===lt)return;this._watched.delete(n),this._watched.delete(r);const f=s?Pa:dn;l&&!this._isIgnored(n)&&this._emit(f,n),this.options.useFsEvents||this._closePath(n)}_closePath(e){this._closeFile(e);const u=v.dirname(e);this._getWatchedDir(u).remove(v.basename(e))}_closeFile(e){const u=this._closers.get(e);u&&(u.forEach(s=>s()),this._closers.delete(e))}_addPathCloser(e,u){if(!u)return;let s=this._closers.get(e);s||(s=[],this._closers.set(e,s)),s.push(u)}_readdirp(e,u){if(this.closed)return;const s={type:du,alwaysStat:!0,lstat:!0,...u};let n=Ta(e,s);return this._streams.add(n),n.once(Ma,()=>{n=void 0}),n.once(Ga,()=>{n&&(this._streams.delete(n),n=void 0)}),n}}const al=(t,e)=>{const u=new ol(e);return u.add(t),u};var ll=al;let ce=!0;const ge=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let Ne=0;if(ge.process&&ge.process.env&&ge.process.stdout){const{FORCE_COLOR:t,NODE_DISABLE_COLORS:e,NO_COLOR:u,TERM:s,COLORTERM:n}=ge.process.env;e||u||t==="0"?ce=!1:t==="1"||t==="2"||t==="3"?ce=!0:s==="dumb"?ce=!1:"CI"in ge.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(r=>r in ge.process.env)?ce=!0:ce=process.stdout.isTTY,ce&&(process.platform==="win32"||n&&(n==="truecolor"||n==="24bit")?Ne=3:s&&(s.endsWith("-256color")||s.endsWith("256"))?Ne=2:Ne=1)}let An={enabled:ce,supportLevel:Ne};function He(t,e,u=1){const s=`\x1B[${t}m`,n=`\x1B[${e}m`,r=new RegExp(`\\x1b\\[${e}m`,"g");return i=>An.enabled&&An.supportLevel>=u?s+(""+i).replace(r,s)+n:""+i}const Le=He(33,39),cl=He(90,39),fl=He(92,39),hl=He(95,39),dl=He(96,39),ct=(t=!0)=>{let e=!1;return u=>{if(e||u==="unknown-flag")return!0;if(u==="argument")return e=!0,t}},yn=(t,e=process.argv.slice(2))=>(bu(t,e,{ignore:ct()}),e),El=t=>{let e=Buffer.alloc(0);return u=>{for(e=Buffer.concat([e,u]);e.length>4;){const s=e.readInt32BE(0);if(e.length>=4+s){const n=e.slice(4,4+s);t(n),e=e.slice(4+s)}else break}}},wn=async()=>{const t=Hn.createServer(u=>{u.on("data",El(s=>{const n=JSON.parse(s.toString());t.emit("data",n)}))}),e=wu.getPipePath(process.pid);return await J.promises.mkdir(Ln.tmpdir,{recursive:!0}),await J.promises.rm(e,{force:!0}),await new Promise((u,s)=>{t.listen(e,u),t.on("error",s)}),t.unref(),process.on("exit",()=>{if(t.close(),!wu.isWindows)try{J.rmSync(e)}catch{}}),t},pl=()=>new Date().toLocaleTimeString(),Ie=(...t)=>console.log(cl(pl()),dl("[tsx]"),...t),Cl="\x1Bc",Fl=(t,e)=>{let u;return function(){u&&clearTimeout(u),u=setTimeout(()=>Reflect.apply(t,this,arguments),e)}},Rn={noCache:{type:Boolean,description:"Disable caching",default:!1},tsconfig:{type:String,description:"Custom tsconfig.json path"},clearScreen:{type:Boolean,description:"Clearing the screen on rerun",default:!0},ignore:{type:[String],description:"Paths & globs to exclude from being watched"}},gl=ei({name:"watch",parameters:["<script path>"],flags:Rn,help:{description:"Run the script and watch for changes"},ignoreArgv:ct(!1)},async t=>{const e=yn(Rn,process.argv.slice(3)),u={noCache:t.flags.noCache,tsconfigPath:t.flags.tsconfig,clearScreen:t.flags.clearScreen,ignore:t.flags.ignore,ipc:!0};let s,n=!1;(await wn()).on("data",a=>{if(a&&typeof a=="object"&&"type"in a&&a.type==="dependency"&&"path"in a&&typeof a.path=="string"){const E=a.path.startsWith("file:")?yu.fileURLToPath(a.path):a.path;K.isAbsolute(E)&&f.add(E)}});const i=()=>{if(!n)return os(e,u)};let D=!1;const o=async(a,E="SIGTERM",p=5e3)=>{let F=!1;const A=new Promise(S=>{a.on("exit",N=>{F=!0,D=!1,S(N)})});return D=!0,a.kill(E),setTimeout(()=>{F||(Ie(Le(`Process didn't exit in ${Math.floor(p/1e3)}s. Force killing...`)),a.kill("SIGKILL"))},p),await A},l=Fl(async(a,E)=>{const p=a?`${a?hl(a):""}${E?` in ${fl(`./${E}`)}`:""}`:"";if(D){Ie(p,Le("Process hasn't exited. Killing process...")),s.kill("SIGKILL");return}s&&(s.exitCode===null?(Ie(p,Le("Restarting...")),await o(s)):Ie(p,Le("Rerunning...")),u.clearScreen&&process.stdout.write(Cl)),s=i()},100);l();const c=a=>{n=!0,(s==null?void 0:s.exitCode)===null?(D&&Ie(Le("Previous process hasn't exited yet. Force killing...")),o(s,D?"SIGKILL":a).then(E=>{process.exit(E!=null?E:0)},()=>{})):process.exit(me.constants.signals[a])};process.on("SIGINT",c),process.on("SIGTERM",c);const f=ll(t._,{cwd:process.cwd(),ignoreInitial:!0,ignored:["**/.*/**","**/.*","**/{node_modules,bower_components,vendor}/**",...u.ignore],ignorePermissionErrors:!0}).on("all",l);process.stdin.on("data",()=>l("Return key"))}),ml=(t,e)=>{let u;e.on("data",r=>{r&&r.type==="signal"&&u&&u(r.signal)});const s=()=>{const r=new Promise(i=>{setTimeout(()=>i(void 0),30),u=i});return r.then(()=>{u=void 0},()=>{}),r},n=async r=>{await s()!==r&&(t.kill(r),await s()!==r&&(t.on("exit",()=>{const o=me.constants.signals[r];process.exit(128+o)}),t.kill("SIGKILL")))};process.on("SIGINT",n),process.on("SIGTERM",n)},bn={noCache:{type:Boolean,description:"Disable caching"},tsconfig:{type:String,description:"Custom tsconfig.json path"}};Vu({name:"tsx",parameters:["[script path]"],commands:[gl],flags:{...bn,version:{type:Boolean,alias:"v",description:"Show version"},help:{type:Boolean,alias:"h",description:"Show help"}},help:!1,ignoreArgv:ct()},async t=>{t.flags.version?process.stdout.write(`tsx v${Tn.version}
53
53
  node `):t.flags.help&&(t.showHelp({description:"Node.js runtime enhanced with esbuild for loading TypeScript & ESM"}),console.log(`${"-".repeat(45)}
54
- `));const e={eval:{type:String,alias:"e"},print:{type:String,alias:"p"}},{_:u,flags:s}=Ku({flags:{...e,inputType:String,test:Boolean},help:!1,ignoreArgv:ct(!1)}),n=An({...Rn,...e}),i=["print","eval"].find(a=>!!s[a]);if(i){const{inputType:a}=s,c=s[i],f=Sn.transformSync(c,{loader:"default",sourcefile:"/eval.ts",format:a==="module"?"esm":"cjs"});n.unshift(`--${i}`,f.code)}Ge.isFeatureSupported(Ge.testRunnerGlob)&&s.test&&u.length===0&&n.push("**/{test,test/**/*,test-*,*[.-_]test}.?(c|m)@(t|j)s");const D=await yn(),o=Ds(n,{noCache:!!t.flags.noCache,tsconfigPath:t.flags.tsconfig});gl(o,D),process.send&&o.on("message",a=>{process.send(a)}),o.send&&process.on("message",a=>{o.send(a)}),o.on("close",a=>{a===null&&(a=me.constants.signals[o.signalCode]+128),process.exit(a)})});
54
+ `));const e={eval:{type:String,alias:"e"},print:{type:String,alias:"p"}},{_:u,flags:s}=Vu({flags:{...e,inputType:String,test:Boolean},help:!1,ignoreArgv:ct(!1)}),n=yn({...bn,...e}),i=["print","eval"].find(l=>!!s[l]);if(i){const{inputType:l}=s,c=s[i],f=$n.transformSync(c,{loader:"default",sourcefile:"/eval.ts",format:l==="module"?"esm":"cjs"});n.unshift(`--${i}`,f.code)}We.isFeatureSupported(We.testRunnerGlob)&&s.test&&u.length===0&&n.push("**/{test,test/**/*,test-*,*[.-_]test}.?(c|m)@(t|j)s");const D=await wn(),o=os(n,{noCache:!!t.flags.noCache,tsconfigPath:t.flags.tsconfig});ml(o,D),process.send&&o.on("message",l=>{process.send(l)}),o.send&&process.on("message",l=>{o.send(l)}),o.on("close",l=>{l===null&&(l=me.constants.signals[o.signalCode]+128),process.exit(l)})});