tsx 4.4.0 → 4.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.mjs CHANGED
@@ -1,55 +1,55 @@
1
1
  #!/usr/bin/env node
2
- import ws from"tty";import{transformSync as Rs}from"esbuild";import{v as bs}from"./package-e15f6aa4.mjs";import{r as at}from"./pkgroll_create-require-b92e8e0d.mjs";import{pathToFileURL as vs,fileURLToPath as Bs}from"url";import Ss from"child_process";import K from"path";import ie from"fs";import{s as $s,t as Ts}from"./node-features-32913946.mjs";import gu,{constants as xs}from"os";import Os from"events";import me from"util";import Ns from"stream";import"module";const Hs="known-flag",Ls="unknown-flag",Ps="argument",{stringify:_e}=JSON,Is=/\B([A-Z])/g,ks=t=>t.replace(Is,"-$1").toLowerCase(),{hasOwnProperty:Ms}=Object.prototype,Ae=(t,e)=>Ms.call(t,e),Ws=t=>Array.isArray(t),mu=t=>typeof t=="function"?[t,!1]:Ws(t)?[t[0],!0]:mu(t.type),Gs=(t,e)=>t===Boolean?e!=="false":e,js=(t,e)=>typeof e=="boolean"?e:t===Number&&e===""?Number.NaN:t(e),Us=/[\s.:=]/,Ks=t=>{const e=`Flag name ${_e(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(Us);if(u)throw new Error(`${e} cannot contain ${_e(u==null?void 0:u[0])}`)},Vs=t=>{const e={},u=(n,s)=>{if(Ae(e,n))throw new Error(`Duplicate flags named ${_e(n)}`);e[n]=s};for(const n in t){if(!Ae(t,n))continue;Ks(n);const s=t[n],r=[[],...mu(s),s];u(n,r);const i=ks(n);if(n!==i&&u(i,r),"alias"in s&&typeof s.alias=="string"){const{alias:D}=s,o=`Flag alias ${_e(D)} for flag ${_e(n)}`;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},zs=(t,e)=>{const u={};for(const n in t){if(!Ae(t,n))continue;const[s,,r,i]=e[n];if(s.length===0&&"default"in i){let{default:D}=i;typeof D=="function"&&(D=D()),u[n]=D}else u[n]=r?s:s.pop()}return u},Ie="--",Ys=/[.:=]/,qs=/^-{1,2}\w/,Xs=t=>{if(!qs.test(t))return;const e=!t.startsWith(Ie);let u=t.slice(e?1:2),n;const s=u.match(Ys);if(s){const{index:r}=s;n=u.slice(r+1),u=u.slice(0,r)}return[u,n,e]},Qs=(t,{onFlag:e,onArgument:u})=>{let n;const s=(r,i)=>{if(typeof n!="function")return!0;n(r,i),n=void 0};for(let r=0;r<t.length;r+=1){const i=t[r];if(i===Ie){s();const o=t.slice(r+1);u==null||u(o,[r],!0);break}const D=Xs(i);if(D){if(s(),!e)continue;const[o,a,c]=D;if(c)for(let f=0;f<o.length;f+=1){s();const l=f===o.length-1;n=e(o[f],l?a:void 0,[r,f+1,l])}else n=e(o,a,[r])}else s(i,[r])&&(u==null||u([i],[r]))}s()},Zs=(t,e)=>{for(const[u,n,s]of e.reverse()){if(n){const r=t[u];let i=r.slice(0,n);if(s||(i+=r.slice(n+1)),i!=="-"){t[u]=i;continue}}t.splice(u,1)}},_u=(t,e=process.argv.slice(2),{ignore:u}={})=>{const n=[],s=Vs(t),r={},i=[];return i[Ie]=[],Qs(e,{onFlag(D,o,a){const c=Ae(s,D);if(!(u!=null&&u(c?Hs:Ls,D,o))){if(c){const[f,l]=s[D],p=Gs(l,o),C=(F,A)=>{n.push(a),A&&n.push(A),f.push(js(l,F||""))};return p===void 0?C:C(p)}Ae(r,D)||(r[D]=[]),r[D].push(o===void 0?!0:o),n.push(a)}},onArgument(D,o,a){u!=null&&u(Ps,e[o[0]])||(i.push(...D),a?(i[Ie]=D,e.splice(o[0])):n.push(o))}}),Zs(e,n),{flags:zs(t,s),unknownFlags:r,_:i}};var Js=Object.create,ke=Object.defineProperty,er=Object.defineProperties,tr=Object.getOwnPropertyDescriptor,ur=Object.getOwnPropertyDescriptors,nr=Object.getOwnPropertyNames,Au=Object.getOwnPropertySymbols,sr=Object.getPrototypeOf,yu=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable,wu=(t,e,u)=>e in t?ke(t,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):t[e]=u,Me=(t,e)=>{for(var u in e||(e={}))yu.call(e,u)&&wu(t,u,e[u]);if(Au)for(var u of Au(e))rr.call(e,u)&&wu(t,u,e[u]);return t},lt=(t,e)=>er(t,ur(e)),ir=t=>ke(t,"__esModule",{value:!0}),Dr=(t,e)=>()=>(t&&(e=t(t=0)),e),or=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ar=(t,e,u,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of nr(e))!yu.call(t,s)&&(u||s!=="default")&&ke(t,s,{get:()=>e[s],enumerable:!(n=tr(e,s))||n.enumerable});return t},lr=(t,e)=>ar(ir(ke(t!=null?Js(sr(t)):{},"default",!e&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),U=Dr(()=>{}),cr=or((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 fr=t=>{var e,u,n;let s=(e=process.stdout.columns)!=null?e:Number.POSITIVE_INFINITY;return typeof t=="function"&&(t=t(s)),t||(t={}),Array.isArray(t)?{columns:t,stdoutColumns:s}:{columns:(u=t.columns)!=null?u:[],stdoutColumns:(n=t.stdoutColumns)!=null?n:s}};U(),U(),U(),U(),U();function hr({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 Ru(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(hr(),"")}U();function dr(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 Er=lr(cr(),1);function De(t){if(typeof t!="string"||t.length===0||(t=Ru(t),t.length===0))return 0;t=t.replace((0,Er.default)()," ");let e=0;for(let u=0;u<t.length;u++){let n=t.codePointAt(u);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&u++,e+=dr(n)?2:1)}return e}var bu=t=>Math.max(...t.split(`
3
- `).map(De)),pr=t=>{let e=[];for(let u of t){let{length:n}=u,s=n-e.length;for(let r=0;r<s;r+=1)e.push(0);for(let r=0;r<n;r+=1){let i=bu(u[r]);i>e[r]&&(e[r]=i)}}return e};U();var vu=/^\d+%$/,Bu={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},Cr=(t,e)=>{var u;let n=[];for(let s=0;s<t.length;s+=1){let r=(u=e[s])!=null?u:"auto";if(typeof r=="number"||r==="auto"||r==="content-width"||typeof r=="string"&&vu.test(r)){n.push(lt(Me({},Bu),{width:r,contentWidth:t[s]}));continue}if(r&&typeof r=="object"){let i=lt(Me(Me({},Bu),r),{contentWidth:t[s]});i.horizontalPadding=i.paddingLeft+i.paddingRight,n.push(i);continue}throw new Error(`Invalid column width: ${JSON.stringify(r)}`)}return n};function Fr(t,e){for(let u of t){let{width:n}=u;if(n==="content-width"&&(u.width=u.contentWidth),n==="auto"){let o=Math.min(20,u.contentWidth);u.width=o,u.autoOverflow=u.contentWidth-o}if(typeof n=="string"&&vu.test(n)){let o=Number.parseFloat(n.slice(0,-1))/100;u.width=Math.floor(e*o)-(u.paddingLeft+u.paddingRight)}let{horizontalPadding:s}=u,r=1,i=r+s;if(i>=e){let o=i-e,a=Math.ceil(u.paddingLeft/s*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 Su=()=>Object.assign([],{columns:0});function gr(t,e){let u=[Su()],[n]=u;for(let s of t){let r=s.width+s.horizontalPadding;n.columns+r>e&&(n=Su(),u.push(n)),n.push(s),n.columns+=r}for(let s of u){let r=s.reduce((l,p)=>l+p.width+p.horizontalPadding,0),i=e-r;if(i===0)continue;let D=s.filter(l=>"autoOverflow"in l),o=D.filter(l=>l.autoOverflow>0),a=o.reduce((l,p)=>l+p.autoOverflow,0),c=Math.min(a,i);for(let l of o){let p=Math.floor(l.autoOverflow/a*c);l.width+=p,i-=p}let f=Math.floor(i/D.length);for(let l=0;l<D.length;l+=1){let p=D[l];l===D.length-1?p.width+=i:p.width+=f,i-=f}}return u}function mr(t,e,u){let n=Cr(u,e);return Fr(n,t),gr(n,t)}U(),U(),U();var ct=10,$u=(t=0)=>e=>`\x1B[${e+t}m`,Tu=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,xu=(t=0)=>(e,u,n)=>`\x1B[${38+t};2;${e};${u};${n}m`;function _r(){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,n]of Object.entries(e)){for(let[s,r]of Object.entries(n))e[s]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[s]=e[s],t.set(r[0],r[1]);Object.defineProperty(e,u,{value:n,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=$u(),e.color.ansi256=Tu(),e.color.ansi16m=xu(),e.bgColor.ansi=$u(ct),e.bgColor.ansi256=Tu(ct),e.bgColor.ansi16m=xu(ct),Object.defineProperties(e,{rgbToAnsi256:{value:(u,n,s)=>u===n&&n===s?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(n/255*5)+Math.round(s/255*5),enumerable:!1},hexToRgb:{value:u=>{let n=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(u.toString(16));if(!n)return[0,0,0];let{colorString:s}=n.groups;s.length===3&&(s=s.split("").map(i=>i+i).join(""));let r=Number.parseInt(s,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 n,s,r;if(u>=232)n=((u-232)*10+8)/255,s=n,r=n;else{u-=16;let o=u%36;n=Math.floor(u/36)/5,s=Math.floor(o/6)/5,r=o%6/5}let i=Math.max(n,s,r)*2;if(i===0)return 30;let D=30+(Math.round(r)<<2|Math.round(s)<<1|Math.round(n));return i===2&&(D+=60),D},enumerable:!1},rgbToAnsi:{value:(u,n,s)=>e.ansi256ToAnsi(e.rgbToAnsi256(u,n,s)),enumerable:!1},hexToAnsi:{value:u=>e.ansi256ToAnsi(e.hexToAnsi256(u)),enumerable:!1}}),e}var Ar=_r(),yr=Ar,We=new Set(["\x1B","\x9B"]),wr=39,ft="\x07",Ou="[",Rr="]",Nu="m",ht=`${Rr}8;;`,Hu=t=>`${We.values().next().value}${Ou}${t}${Nu}`,Lu=t=>`${We.values().next().value}${ht}${t}${ft}`,br=t=>t.split(" ").map(e=>De(e)),dt=(t,e,u)=>{let n=[...e],s=!1,r=!1,i=De(Ru(t[t.length-1]));for(let[D,o]of n.entries()){let a=De(o);if(i+a<=u?t[t.length-1]+=o:(t.push(o),i=0),We.has(o)&&(s=!0,r=n.slice(D+1).join("").startsWith(ht)),s){r?o===ft&&(s=!1,r=!1):o===Nu&&(s=!1);continue}i+=a,i===u&&D<n.length-1&&(t.push(""),i=0)}!i&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},vr=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("")},Br=(t,e,u={})=>{if(u.trim!==!1&&t.trim()==="")return"";let n="",s,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,p=1+Math.floor((i[a]-l-1)/e);Math.floor((i[a]-1)/e)<p&&D.push(""),dt(D,c,e);continue}if(f+i[a]>e&&f>0&&i[a]>0){if(u.wordWrap===!1&&f<e){dt(D,c,e);continue}D.push("")}if(f+i[a]>e&&u.wordWrap===!1){dt(D,c,e);continue}D[D.length-1]+=c}u.trim!==!1&&(D=D.map(a=>vr(a)));let o=[...D.join(`
4
- `)];for(let[a,c]of o.entries()){if(n+=c,We.has(c)){let{groups:l}=new RegExp(`(?:\\${Ou}(?<code>\\d+)m|\\${ht}(?<uri>.*)${ft})`).exec(o.slice(a).join(""))||{groups:{}};if(l.code!==void 0){let p=Number.parseFloat(l.code);s=p===wr?void 0:p}else l.uri!==void 0&&(r=l.uri.length===0?void 0:l.uri)}let f=yr.codes.get(Number(s));o[a+1]===`
5
- `?(r&&(n+=Lu("")),s&&f&&(n+=Hu(f))):c===`
6
- `&&(s&&f&&(n+=Hu(s)),r&&(n+=Lu(r)))}return n};function Sr(t,e,u){return String(t).normalize().replace(/\r\n/g,`
2
+ import Au,{constants as ft}from"os";import bs from"tty";import{transformSync as vs}from"esbuild";import{v as Bs}from"./package-c8af9097.mjs";import{r as ht}from"./pkgroll_create-require-b92e8e0d.mjs";import{pathToFileURL as Ss,fileURLToPath as $s}from"url";import Ts from"child_process";import K from"path";import ie from"fs";import{s as xs,t as Os}from"./node-features-32913946.mjs";import Ns from"events";import me from"util";import Hs from"stream";import"module";const Ls="known-flag",Is="unknown-flag",Ps="argument",{stringify:_e}=JSON,ks=/\B([A-Z])/g,Ms=t=>t.replace(ks,"-$1").toLowerCase(),{hasOwnProperty:Ws}=Object.prototype,Ae=(t,e)=>Ws.call(t,e),Gs=t=>Array.isArray(t),yu=t=>typeof t=="function"?[t,!1]:Gs(t)?[t[0],!0]:yu(t.type),js=(t,e)=>t===Boolean?e!=="false":e,Us=(t,e)=>typeof e=="boolean"?e:t===Number&&e===""?Number.NaN:t(e),Ks=/[\s.:=]/,Vs=t=>{const e=`Flag name ${_e(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(Ks);if(u)throw new Error(`${e} cannot contain ${_e(u==null?void 0:u[0])}`)},zs=t=>{const e={},u=(n,s)=>{if(Ae(e,n))throw new Error(`Duplicate flags named ${_e(n)}`);e[n]=s};for(const n in t){if(!Ae(t,n))continue;Vs(n);const s=t[n],r=[[],...yu(s),s];u(n,r);const i=Ms(n);if(n!==i&&u(i,r),"alias"in s&&typeof s.alias=="string"){const{alias:D}=s,o=`Flag alias ${_e(D)} for flag ${_e(n)}`;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},Ys=(t,e)=>{const u={};for(const n in t){if(!Ae(t,n))continue;const[s,,r,i]=e[n];if(s.length===0&&"default"in i){let{default:D}=i;typeof D=="function"&&(D=D()),u[n]=D}else u[n]=r?s:s.pop()}return u},We="--",qs=/[.:=]/,Xs=/^-{1,2}\w/,Qs=t=>{if(!Xs.test(t))return;const e=!t.startsWith(We);let u=t.slice(e?1:2),n;const s=u.match(qs);if(s){const{index:r}=s;n=u.slice(r+1),u=u.slice(0,r)}return[u,n,e]},Zs=(t,{onFlag:e,onArgument:u})=>{let n;const s=(r,i)=>{if(typeof n!="function")return!0;n(r,i),n=void 0};for(let r=0;r<t.length;r+=1){const i=t[r];if(i===We){s();const o=t.slice(r+1);u==null||u(o,[r],!0);break}const D=Qs(i);if(D){if(s(),!e)continue;const[o,l,f]=D;if(f)for(let c=0;c<o.length;c+=1){s();const a=c===o.length-1;n=e(o[c],a?l:void 0,[r,c+1,a])}else n=e(o,l,[r])}else s(i,[r])&&(u==null||u([i],[r]))}s()},Js=(t,e)=>{for(const[u,n,s]of e.reverse()){if(n){const r=t[u];let i=r.slice(0,n);if(s||(i+=r.slice(n+1)),i!=="-"){t[u]=i;continue}}t.splice(u,1)}},wu=(t,e=process.argv.slice(2),{ignore:u}={})=>{const n=[],s=zs(t),r={},i=[];return i[We]=[],Zs(e,{onFlag(D,o,l){const f=Ae(s,D);if(!(u!=null&&u(f?Ls:Is,D,o))){if(f){const[c,a]=s[D],E=js(a,o),C=(F,A)=>{n.push(l),A&&n.push(A),c.push(Us(a,F||""))};return E===void 0?C:C(E)}Ae(r,D)||(r[D]=[]),r[D].push(o===void 0?!0:o),n.push(l)}},onArgument(D,o,l){u!=null&&u(Ps,e[o[0]])||(i.push(...D),l?(i[We]=D,e.splice(o[0])):n.push(o))}}),Js(e,n),{flags:Ys(t,s),unknownFlags:r,_:i}};var er=Object.create,Ge=Object.defineProperty,tr=Object.defineProperties,ur=Object.getOwnPropertyDescriptor,nr=Object.getOwnPropertyDescriptors,sr=Object.getOwnPropertyNames,Ru=Object.getOwnPropertySymbols,rr=Object.getPrototypeOf,bu=Object.prototype.hasOwnProperty,ir=Object.prototype.propertyIsEnumerable,vu=(t,e,u)=>e in t?Ge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):t[e]=u,je=(t,e)=>{for(var u in e||(e={}))bu.call(e,u)&&vu(t,u,e[u]);if(Ru)for(var u of Ru(e))ir.call(e,u)&&vu(t,u,e[u]);return t},dt=(t,e)=>tr(t,nr(e)),Dr=t=>Ge(t,"__esModule",{value:!0}),or=(t,e)=>()=>(t&&(e=t(t=0)),e),ar=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),lr=(t,e,u,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of sr(e))!bu.call(t,s)&&(u||s!=="default")&&Ge(t,s,{get:()=>e[s],enumerable:!(n=ur(e,s))||n.enumerable});return t},cr=(t,e)=>lr(Dr(Ge(t!=null?er(rr(t)):{},"default",!e&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),U=or(()=>{}),fr=ar((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 hr=t=>{var e,u,n;let s=(e=process.stdout.columns)!=null?e:Number.POSITIVE_INFINITY;return typeof t=="function"&&(t=t(s)),t||(t={}),Array.isArray(t)?{columns:t,stdoutColumns:s}:{columns:(u=t.columns)!=null?u:[],stdoutColumns:(n=t.stdoutColumns)!=null?n:s}};U(),U(),U(),U(),U();function dr({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 Bu(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(dr(),"")}U();function Er(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 pr=cr(fr(),1);function De(t){if(typeof t!="string"||t.length===0||(t=Bu(t),t.length===0))return 0;t=t.replace((0,pr.default)()," ");let e=0;for(let u=0;u<t.length;u++){let n=t.codePointAt(u);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&u++,e+=Er(n)?2:1)}return e}var Su=t=>Math.max(...t.split(`
3
+ `).map(De)),Cr=t=>{let e=[];for(let u of t){let{length:n}=u,s=n-e.length;for(let r=0;r<s;r+=1)e.push(0);for(let r=0;r<n;r+=1){let i=Su(u[r]);i>e[r]&&(e[r]=i)}}return e};U();var $u=/^\d+%$/,Tu={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},Fr=(t,e)=>{var u;let n=[];for(let s=0;s<t.length;s+=1){let r=(u=e[s])!=null?u:"auto";if(typeof r=="number"||r==="auto"||r==="content-width"||typeof r=="string"&&$u.test(r)){n.push(dt(je({},Tu),{width:r,contentWidth:t[s]}));continue}if(r&&typeof r=="object"){let i=dt(je(je({},Tu),r),{contentWidth:t[s]});i.horizontalPadding=i.paddingLeft+i.paddingRight,n.push(i);continue}throw new Error(`Invalid column width: ${JSON.stringify(r)}`)}return n};function gr(t,e){for(let u of t){let{width:n}=u;if(n==="content-width"&&(u.width=u.contentWidth),n==="auto"){let o=Math.min(20,u.contentWidth);u.width=o,u.autoOverflow=u.contentWidth-o}if(typeof n=="string"&&$u.test(n)){let o=Number.parseFloat(n.slice(0,-1))/100;u.width=Math.floor(e*o)-(u.paddingLeft+u.paddingRight)}let{horizontalPadding:s}=u,r=1,i=r+s;if(i>=e){let o=i-e,l=Math.ceil(u.paddingLeft/s*o),f=o-l;u.paddingLeft-=l,u.paddingRight-=f,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 xu=()=>Object.assign([],{columns:0});function mr(t,e){let u=[xu()],[n]=u;for(let s of t){let r=s.width+s.horizontalPadding;n.columns+r>e&&(n=xu(),u.push(n)),n.push(s),n.columns+=r}for(let s of u){let r=s.reduce((a,E)=>a+E.width+E.horizontalPadding,0),i=e-r;if(i===0)continue;let D=s.filter(a=>"autoOverflow"in a),o=D.filter(a=>a.autoOverflow>0),l=o.reduce((a,E)=>a+E.autoOverflow,0),f=Math.min(l,i);for(let a of o){let E=Math.floor(a.autoOverflow/l*f);a.width+=E,i-=E}let c=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+=c,i-=c}}return u}function _r(t,e,u){let n=Fr(u,e);return gr(n,t),mr(n,t)}U(),U(),U();var Et=10,Ou=(t=0)=>e=>`\x1B[${e+t}m`,Nu=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Hu=(t=0)=>(e,u,n)=>`\x1B[${38+t};2;${e};${u};${n}m`;function Ar(){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,n]of Object.entries(e)){for(let[s,r]of Object.entries(n))e[s]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[s]=e[s],t.set(r[0],r[1]);Object.defineProperty(e,u,{value:n,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=Ou(),e.color.ansi256=Nu(),e.color.ansi16m=Hu(),e.bgColor.ansi=Ou(Et),e.bgColor.ansi256=Nu(Et),e.bgColor.ansi16m=Hu(Et),Object.defineProperties(e,{rgbToAnsi256:{value:(u,n,s)=>u===n&&n===s?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(n/255*5)+Math.round(s/255*5),enumerable:!1},hexToRgb:{value:u=>{let n=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(u.toString(16));if(!n)return[0,0,0];let{colorString:s}=n.groups;s.length===3&&(s=s.split("").map(i=>i+i).join(""));let r=Number.parseInt(s,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 n,s,r;if(u>=232)n=((u-232)*10+8)/255,s=n,r=n;else{u-=16;let o=u%36;n=Math.floor(u/36)/5,s=Math.floor(o/6)/5,r=o%6/5}let i=Math.max(n,s,r)*2;if(i===0)return 30;let D=30+(Math.round(r)<<2|Math.round(s)<<1|Math.round(n));return i===2&&(D+=60),D},enumerable:!1},rgbToAnsi:{value:(u,n,s)=>e.ansi256ToAnsi(e.rgbToAnsi256(u,n,s)),enumerable:!1},hexToAnsi:{value:u=>e.ansi256ToAnsi(e.hexToAnsi256(u)),enumerable:!1}}),e}var yr=Ar(),wr=yr,Ue=new Set(["\x1B","\x9B"]),Rr=39,pt="\x07",Lu="[",br="]",Iu="m",Ct=`${br}8;;`,Pu=t=>`${Ue.values().next().value}${Lu}${t}${Iu}`,ku=t=>`${Ue.values().next().value}${Ct}${t}${pt}`,vr=t=>t.split(" ").map(e=>De(e)),Ft=(t,e,u)=>{let n=[...e],s=!1,r=!1,i=De(Bu(t[t.length-1]));for(let[D,o]of n.entries()){let l=De(o);if(i+l<=u?t[t.length-1]+=o:(t.push(o),i=0),Ue.has(o)&&(s=!0,r=n.slice(D+1).join("").startsWith(Ct)),s){r?o===pt&&(s=!1,r=!1):o===Iu&&(s=!1);continue}i+=l,i===u&&D<n.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("")},Sr=(t,e,u={})=>{if(u.trim!==!1&&t.trim()==="")return"";let n="",s,r,i=vr(t),D=[""];for(let[l,f]of t.split(" ").entries()){u.trim!==!1&&(D[D.length-1]=D[D.length-1].trimStart());let c=De(D[D.length-1]);if(l!==0&&(c>=e&&(u.wordWrap===!1||u.trim===!1)&&(D.push(""),c=0),(c>0||u.trim===!1)&&(D[D.length-1]+=" ",c++)),u.hard&&i[l]>e){let a=e-c,E=1+Math.floor((i[l]-a-1)/e);Math.floor((i[l]-1)/e)<E&&D.push(""),Ft(D,f,e);continue}if(c+i[l]>e&&c>0&&i[l]>0){if(u.wordWrap===!1&&c<e){Ft(D,f,e);continue}D.push("")}if(c+i[l]>e&&u.wordWrap===!1){Ft(D,f,e);continue}D[D.length-1]+=f}u.trim!==!1&&(D=D.map(l=>Br(l)));let o=[...D.join(`
4
+ `)];for(let[l,f]of o.entries()){if(n+=f,Ue.has(f)){let{groups:a}=new RegExp(`(?:\\${Lu}(?<code>\\d+)m|\\${Ct}(?<uri>.*)${pt})`).exec(o.slice(l).join(""))||{groups:{}};if(a.code!==void 0){let E=Number.parseFloat(a.code);s=E===Rr?void 0:E}else a.uri!==void 0&&(r=a.uri.length===0?void 0:a.uri)}let c=wr.codes.get(Number(s));o[l+1]===`
5
+ `?(r&&(n+=ku("")),s&&c&&(n+=Pu(c))):f===`
6
+ `&&(s&&c&&(n+=Pu(s)),r&&(n+=ku(r)))}return n};function $r(t,e,u){return String(t).normalize().replace(/\r\n/g,`
7
7
  `).split(`
8
- `).map(n=>Br(n,e,u)).join(`
9
- `)}var Pu=t=>Array.from({length:t}).fill("");function $r(t,e){let u=[],n=0;for(let s of t){let r=0,i=s.map(o=>{var a;let c=(a=e[n])!=null?a:"";n+=1,o.preprocess&&(c=o.preprocess(c)),bu(c)>o.width&&(c=Sr(c,o.width,{hard:!0}));let f=c.split(`
10
- `);if(o.postprocess){let{postprocess:l}=o;f=f.map((p,C)=>l.call(o,p,C))}return o.paddingTop&&f.unshift(...Pu(o.paddingTop)),o.paddingBottom&&f.push(...Pu(o.paddingBottom)),f.length>r&&(r=f.length),lt(Me({},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:"",p=Number.isFinite(c.width)?" ".repeat(c.width-De(l)):"",C=c.paddingLeftString;return c.align==="right"&&(C+=p),C+=l,c.align==="left"&&(C+=p),C+c.paddingRightString}).join("");D.push(a)}u.push(D.join(`
8
+ `).map(n=>Sr(n,e,u)).join(`
9
+ `)}var Mu=t=>Array.from({length:t}).fill("");function Tr(t,e){let u=[],n=0;for(let s of t){let r=0,i=s.map(o=>{var l;let f=(l=e[n])!=null?l:"";n+=1,o.preprocess&&(f=o.preprocess(f)),Su(f)>o.width&&(f=$r(f,o.width,{hard:!0}));let c=f.split(`
10
+ `);if(o.postprocess){let{postprocess:a}=o;c=c.map((E,C)=>a.call(o,E,C))}return o.paddingTop&&c.unshift(...Mu(o.paddingTop)),o.paddingBottom&&c.push(...Mu(o.paddingBottom)),c.length>r&&(r=c.length),dt(je({},o),{lines:c})}),D=[];for(let o=0;o<r;o+=1){let l=i.map(f=>{var c;let a=(c=f.lines[o])!=null?c:"",E=Number.isFinite(f.width)?" ".repeat(f.width-De(a)):"",C=f.paddingLeftString;return f.align==="right"&&(C+=E),C+=a,f.align==="left"&&(C+=E),C+f.paddingRightString}).join("");D.push(l)}u.push(D.join(`
11
11
  `))}return u.join(`
12
- `)}function Tr(t,e){if(!t||t.length===0)return"";let u=pr(t),n=u.length;if(n===0)return"";let{stdoutColumns:s,columns:r}=fr(e);if(r.length>n)throw new Error(`${r.length} columns defined, but only ${n} columns found`);let i=mr(s,r,u);return t.map(D=>$r(i,D)).join(`
13
- `)}U();var xr=["<",">","=",">=","<="];function Or(t){if(!xr.includes(t))throw new TypeError(`Invalid breakpoint operator: ${t}`)}function Nr(t){let e=Object.keys(t).map(u=>{let[n,s]=u.split(" ");Or(n);let r=Number.parseInt(s,10);if(Number.isNaN(r))throw new TypeError(`Invalid breakpoint value: ${s}`);let i=t[u];return{operator:n,breakpoint:r,value:i}}).sort((u,n)=>n.breakpoint-u.breakpoint);return u=>{var n;return(n=e.find(({operator:s,breakpoint:r})=>s==="="&&u===r||s===">"&&u>r||s==="<"&&u<r||s===">="&&u>=r||s==="<="&&u<=r))==null?void 0:n.value}}const Hr=t=>t.replace(/[\W_]([a-z\d])?/gi,(e,u)=>u?u.toUpperCase():""),Lr=t=>t.replace(/\B([A-Z])/g,"-$1").toLowerCase(),Pr={"> 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 Ir(t){let e=!1;return{type:"table",data:{tableData:Object.keys(t).sort((u,n)=>u.localeCompare(n)).map(u=>{const n=t[u],s="alias"in n;return s&&(e=!0),{name:u,flag:n,flagFormatted:`--${Lr(u)}`,aliasesEnabled:e,aliasFormatted:s?`-${n.alias}`:void 0}}).map(u=>(u.aliasesEnabled=e,[{type:"flagName",data:u},{type:"flagDescription",data:u}])),tableBreakpoints:Pr}}}const Iu=t=>{var e;return!t||((e=t.version)!=null?e:t.help?t.help.version:void 0)},ku=t=>{var u;const e="parent"in t&&((u=t.parent)==null?void 0:u.name);return(e?`${e} `:"")+t.name};function kr(t){var n;const e=[];t.name&&e.push(ku(t));const u=(n=Iu(t))!=null?n:"parent"in t&&Iu(t.parent);if(u&&e.push(`v${u}`),e.length!==0)return{id:"name",type:"text",data:`${e.join(" ")}
14
- `}}function Mr(t){const{help:e}=t;if(!(!e||!e.description))return{id:"description",type:"text",data:`${e.description}
15
- `}}function Wr(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(`
16
- `):e.usage}}:void 0;if(t.name){const n=[],s=[ku(t)];if(t.flags&&Object.keys(t.flags).length>0&&s.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("<"));s.push(r.map(o=>o!=="--"?o:D?"--":"[--]").join(" "))}if(s.length>1&&n.push(s.join(" ")),"commands"in t&&((u=t.commands)!=null&&u.length)&&n.push(`${t.name} <command>`),n.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:n.join(`
17
- `)}}}}function Gr(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 jr(t){if(!(!t.flags||Object.keys(t.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:Ir(t.flags),indentBody:0}}}function Ur(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(`
18
- `)),u)return{id:"examples",type:"section",data:{title:"Examples:",body:u}}}function Kr(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 Vr=t=>[kr,Mr,Wr,Gr,jr,Ur,Kr].map(e=>e(t)).filter(Boolean),zr=ws.WriteStream.prototype.hasColors();class Yr{text(e){return e}bold(e){return zr?`\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:n=2}){return`${(e?`${this.heading(e)}
12
+ `)}function xr(t,e){if(!t||t.length===0)return"";let u=Cr(t),n=u.length;if(n===0)return"";let{stdoutColumns:s,columns:r}=hr(e);if(r.length>n)throw new Error(`${r.length} columns defined, but only ${n} columns found`);let i=_r(s,r,u);return t.map(D=>Tr(i,D)).join(`
13
+ `)}U();var Or=["<",">","=",">=","<="];function Nr(t){if(!Or.includes(t))throw new TypeError(`Invalid breakpoint operator: ${t}`)}function Hr(t){let e=Object.keys(t).map(u=>{let[n,s]=u.split(" ");Nr(n);let r=Number.parseInt(s,10);if(Number.isNaN(r))throw new TypeError(`Invalid breakpoint value: ${s}`);let i=t[u];return{operator:n,breakpoint:r,value:i}}).sort((u,n)=>n.breakpoint-u.breakpoint);return u=>{var n;return(n=e.find(({operator:s,breakpoint:r})=>s==="="&&u===r||s===">"&&u>r||s==="<"&&u<r||s===">="&&u>=r||s==="<="&&u<=r))==null?void 0:n.value}}const Lr=t=>t.replace(/[\W_]([a-z\d])?/gi,(e,u)=>u?u.toUpperCase():""),Ir=t=>t.replace(/\B([A-Z])/g,"-$1").toLowerCase(),Pr={"> 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 kr(t){let e=!1;return{type:"table",data:{tableData:Object.keys(t).sort((u,n)=>u.localeCompare(n)).map(u=>{const n=t[u],s="alias"in n;return s&&(e=!0),{name:u,flag:n,flagFormatted:`--${Ir(u)}`,aliasesEnabled:e,aliasFormatted:s?`-${n.alias}`:void 0}}).map(u=>(u.aliasesEnabled=e,[{type:"flagName",data:u},{type:"flagDescription",data:u}])),tableBreakpoints:Pr}}}const Wu=t=>{var e;return!t||((e=t.version)!=null?e:t.help?t.help.version:void 0)},Gu=t=>{var u;const e="parent"in t&&((u=t.parent)==null?void 0:u.name);return(e?`${e} `:"")+t.name};function Mr(t){var n;const e=[];t.name&&e.push(Gu(t));const u=(n=Wu(t))!=null?n:"parent"in t&&Wu(t.parent);if(u&&e.push(`v${u}`),e.length!==0)return{id:"name",type:"text",data:`${e.join(" ")}
14
+ `}}function Wr(t){const{help:e}=t;if(!(!e||!e.description))return{id:"description",type:"text",data:`${e.description}
15
+ `}}function Gr(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(`
16
+ `):e.usage}}:void 0;if(t.name){const n=[],s=[Gu(t)];if(t.flags&&Object.keys(t.flags).length>0&&s.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("<"));s.push(r.map(o=>o!=="--"?o:D?"--":"[--]").join(" "))}if(s.length>1&&n.push(s.join(" ")),"commands"in t&&((u=t.commands)!=null&&u.length)&&n.push(`${t.name} <command>`),n.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:n.join(`
17
+ `)}}}}function jr(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 Ur(t){if(!(!t.flags||Object.keys(t.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:kr(t.flags),indentBody:0}}}function Kr(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(`
18
+ `)),u)return{id:"examples",type:"section",data:{title:"Examples:",body:u}}}function Vr(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 zr=t=>[Mr,Wr,Gr,jr,Ur,Kr,Vr].map(e=>e(t)).filter(Boolean),Yr=bs.WriteStream.prototype.hasColors();class qr{text(e){return e}bold(e){return Yr?`\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:n=2}){return`${(e?`${this.heading(e)}
19
19
  `:"")+(u?this.indentText({text:this.render(u),spaces:n}):"")}
20
- `}table({tableData:e,tableOptions:u,tableBreakpoints:n}){return Tr(e.map(s=>s.map(r=>this.render(r))),n?Nr(n):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:n,aliasesEnabled:s,aliasFormatted:r}=e;let i="";if(r?i+=`${r}, `:s&&(i+=" "),i+=n,"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 n;let u="description"in e&&(n=e.description)!=null?n:"";if("default"in e){let{default:s}=e;typeof s=="function"&&(s=s()),s&&(u+=` (default: ${this.flagDefault(s)})`)}return u}render(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(u=>this.render(u)).join(`
21
- `);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 Et=/^[\w.-]+$/,{stringify:J}=JSON,qr=/[|\\{}()[\]^$+*?.]/;function pt(t){const e=[];let u,n;for(const s of t){if(n)throw new Error(`Invalid parameter: Spread parameter ${J(n)} must be last`);const r=s[0],i=s[s.length-1];let D;if(r==="<"&&i===">"&&(D=!0,u))throw new Error(`Invalid parameter: Required parameter ${J(s)} cannot come after optional parameter ${J(u)}`);if(r==="["&&i==="]"&&(D=!1,u=s),D===void 0)throw new Error(`Invalid parameter: ${J(s)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let o=s.slice(1,-1);const a=o.slice(-3)==="...";a&&(n=s,o=o.slice(0,-3));const c=o.match(qr);if(c)throw new Error(`Invalid parameter: ${J(s)}. Invalid character found ${J(c[0])}`);e.push({name:o,required:D,spread:a})}return e}function Ct(t,e,u,n){for(let s=0;s<e.length;s+=1){const{name:r,required:i,spread:D}=e[s],o=Hr(r);if(o in t)throw new Error(`Invalid parameter: ${J(r)} is used more than once.`);const a=D?u.slice(s):u[s];if(D&&(s=e.length),i&&(!a||D&&a.length===0))return console.error(`Error: Missing required parameter ${J(r)}
22
- `),n(),process.exit(1);t[o]=a}}function Xr(t){return t===void 0||t!==!1}function Mu(t,e,u,n){const s={...e.flags},r=e.version;r&&(s.version={type:Boolean,description:"Show version"});const{help:i}=e,D=Xr(i);D&&!("help"in s)&&(s.help={type:Boolean,alias:"h",description:"Show help"});const o=_u(s,n,{ignore:e.ignoreArgv}),a=()=>{console.log(e.version)};if(r&&o.flags.version===!0)return a(),process.exit(0);const c=new Yr,f=D&&(i!=null&&i.render)?i.render:C=>c.render(C),l=C=>{const F=Vr({...e,...C?{help:C}:{},flags:s});console.log(f(F,c))};if(D&&o.flags.help===!0)return l(),process.exit(0);if(e.parameters){let{parameters:C}=e,F=o._;const A=C.indexOf("--"),B=C.slice(A+1),H=Object.create(null);if(A>-1&&B.length>0){C=C.slice(0,A);const S=o._["--"];F=F.slice(0,-S.length||void 0),Ct(H,pt(C),F,l),Ct(H,pt(B),S,l)}else Ct(H,pt(C),F,l);Object.assign(o._,H)}const p={...o,showVersion:a,showHelp:l};return typeof u=="function"&&u(p),{command:t,...p}}function Qr(t,e){const u=new Map;for(const n of e){const s=[n.options.name],{alias:r}=n.options;r&&(Array.isArray(r)?s.push(...r):s.push(r));for(const i of s){if(u.has(i))throw new Error(`Duplicate command name found: ${J(i)}`);u.set(i,n)}}return u.get(t)}function Wu(t,e,u=process.argv.slice(2)){if(!t)throw new Error("Options is required");if("name"in t&&(!t.name||!Et.test(t.name)))throw new Error(`Invalid script name: ${J(t.name)}`);const n=u[0];if(t.commands&&Et.test(n)){const s=Qr(n,t.commands);if(s)return Mu(s.options.name,{...s.options,parent:t},s.callback,u.slice(1))}return Mu(void 0,t,e,u)}function Zr(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(!Et.test(u))throw new Error(`Invalid command name ${JSON.stringify(u)}. Command names must be one word.`);return{options:t,callback:e}}var Jr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ei(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var fe={exports:{}},Ft,Gu;function ti(){if(Gu)return Ft;Gu=1,Ft=n,n.sync=s;var t=ie;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 n(r,i,D){t.stat(r,function(o,a){D(o,o?!1:u(a,r,i))})}function s(r,i){return u(t.statSync(r),r,i)}return Ft}var gt,ju;function ui(){if(ju)return gt;ju=1,gt=e,e.sync=u;var t=ie;function e(r,i,D){t.stat(r,function(o,a){D(o,o?!1:n(a,i))})}function u(r,i){return n(t.statSync(r),i)}function n(r,i){return r.isFile()&&s(r,i)}function s(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),p=parseInt("010",8),C=parseInt("001",8),F=l|p,A=D&C||D&p&&a===f||D&l&&o===c||D&F&&c===0;return A}return gt}var Ge;process.platform==="win32"||Jr.TESTING_WINDOWS?Ge=ti():Ge=ui();var ni=mt;mt.sync=si;function mt(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(n,s){mt(t,e||{},function(r,i){r?s(r):n(i)})})}Ge(t,e||{},function(n,s){n&&(n.code==="EACCES"||e&&e.ignoreErrors)&&(n=null,s=!1),u(n,s)})}function si(t,e){try{return Ge.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",Uu=K,ri=he?";":":",Ku=ni,Vu=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),zu=(t,e)=>{const u=e.colon||ri,n=t.match(/\//)||he&&t.match(/\\/)?[""]:[...he?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(u)],s=he?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",r=he?s.split(u):[""];return he&&t.indexOf(".")!==-1&&r[0]!==""&&r.unshift(""),{pathEnv:n,pathExt:r,pathExtExe:s}},Yu=(t,e,u)=>{typeof e=="function"&&(u=e,e={}),e||(e={});const{pathEnv:n,pathExt:s,pathExtExe:r}=zu(t,e),i=[],D=a=>new Promise((c,f)=>{if(a===n.length)return e.all&&i.length?c(i):f(Vu(t));const l=n[a],p=/^".*"$/.test(l)?l.slice(1,-1):l,C=Uu.join(p,t),F=!p&&/^\.[\\\/]/.test(t)?t.slice(0,2)+C:C;c(o(F,a,0))}),o=(a,c,f)=>new Promise((l,p)=>{if(f===s.length)return l(D(c+1));const C=s[f];Ku(a+C,{pathExt:r},(F,A)=>{if(!F&&A)if(e.all)i.push(a+C);else return l(a+C);return l(o(a,c,f+1))})});return u?D(0).then(a=>u(null,a),u):D(0)},ii=(t,e)=>{e=e||{};const{pathEnv:u,pathExt:n,pathExtExe:s}=zu(t,e),r=[];for(let i=0;i<u.length;i++){const D=u[i],o=/^".*"$/.test(D)?D.slice(1,-1):D,a=Uu.join(o,t),c=!o&&/^\.[\\\/]/.test(t)?t.slice(0,2)+a:a;for(let f=0;f<n.length;f++){const l=c+n[f];try{if(Ku.sync(l,{pathExt:s}))if(e.all)r.push(l);else return l}catch{}}}if(e.all&&r.length)return r;if(e.nothrow)return null;throw Vu(t)};var Di=Yu;Yu.sync=ii;var _t={exports:{}};const qu=(t={})=>{const e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};_t.exports=qu,_t.exports.default=qu;var oi=_t.exports;const Xu=K,ai=Di,li=oi;function Qu(t,e){const u=t.options.env||process.env,n=process.cwd(),s=t.options.cwd!=null,r=s&&process.chdir!==void 0&&!process.chdir.disabled;if(r)try{process.chdir(t.options.cwd)}catch{}let i;try{i=ai.sync(t.command,{path:u[li({env:u})],pathExt:e?Xu.delimiter:void 0})}catch{}finally{r&&process.chdir(n)}return i&&(i=Xu.resolve(s?t.options.cwd:"",i)),i}function ci(t){return Qu(t)||Qu(t,!0)}var fi=ci,At={};const yt=/([()\][%!^"`<>&|;, *?])/g;function hi(t){return t=t.replace(yt,"^$1"),t}function di(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(yt,"^$1"),e&&(t=t.replace(yt,"^$1")),t}At.command=hi,At.argument=di;var Ei=/^#!(.*)/;const pi=Ei;var Ci=(t="")=>{const e=t.match(pi);if(!e)return null;const[u,n]=e[0].replace(/#! ?/,"").split(" "),s=u.split("/").pop();return s==="env"?n:n?`${s} ${n}`:s};const wt=ie,Fi=Ci;function gi(t){const u=Buffer.alloc(150);let n;try{n=wt.openSync(t,"r"),wt.readSync(n,u,0,150,0),wt.closeSync(n)}catch{}return Fi(u.toString())}var mi=gi;const _i=K,Zu=fi,Ju=At,Ai=mi,yi=process.platform==="win32",wi=/\.(?:com|exe)$/i,Ri=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function bi(t){t.file=Zu(t);const e=t.file&&Ai(t.file);return e?(t.args.unshift(t.file),t.command=e,Zu(t)):t.file}function vi(t){if(!yi)return t;const e=bi(t),u=!wi.test(e);if(t.options.forceShell||u){const n=Ri.test(e);t.command=_i.normalize(t.command),t.command=Ju.command(t.command),t.args=t.args.map(r=>Ju.argument(r,n));const s=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${s}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function Bi(t,e,u){e&&!Array.isArray(e)&&(u=e,e=null),e=e?e.slice(0):[],u=Object.assign({},u);const n={command:t,args:e,options:u,file:void 0,original:{command:t,args:e}};return u.shell?n:vi(n)}var Si=Bi;const Rt=process.platform==="win32";function bt(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 $i(t,e){if(!Rt)return;const u=t.emit;t.emit=function(n,s){if(n==="exit"){const r=en(s,e);if(r)return u.call(t,"error",r)}return u.apply(t,arguments)}}function en(t,e){return Rt&&t===1&&!e.file?bt(e.original,"spawn"):null}function Ti(t,e){return Rt&&t===1&&!e.file?bt(e.original,"spawnSync"):null}var xi={hookChildProcess:$i,verifyENOENT:en,verifyENOENTSync:Ti,notFoundError:bt};const tn=Ss,vt=Si,Bt=xi;function un(t,e,u){const n=vt(t,e,u),s=tn.spawn(n.command,n.args,n.options);return Bt.hookChildProcess(s,n),s}function Oi(t,e,u){const n=vt(t,e,u),s=tn.spawnSync(n.command,n.args,n.options);return s.error=s.error||Bt.verifyENOENTSync(s.status,n),s}fe.exports=un,fe.exports.spawn=un,fe.exports.sync=Oi,fe.exports._parse=vt,fe.exports._enoent=Bt;var Ni=fe.exports,Hi=ei(Ni);const nn=(t,e)=>{const u={...process.env},n=["inherit","inherit","inherit","ipc"];return e&&(e.noCache&&(u.TSX_DISABLE_CACHE="1"),e.tsconfigPath&&(u.TSX_TSCONFIG_PATH=e.tsconfigPath)),Hi(process.execPath,["--require",at.resolve("./preflight.cjs"),$s?"--import":"--loader",vs(at.resolve("./loader.mjs")).toString(),...t],{stdio:n,env:u})};var je={};const Li=K,ee="\\\\/",sn=`[^${ee}]`,te="\\.",Pi="\\+",Ii="\\?",Ue="\\/",ki="(?=.)",rn="[^/]",St=`(?:${Ue}|$)`,Dn=`(?:^|${Ue})`,$t=`${te}{1,2}${St}`,Mi=`(?!${te})`,Wi=`(?!${Dn}${$t})`,Gi=`(?!${te}{0,1}${St})`,ji=`(?!${$t})`,Ui=`[^.${Ue}]`,Ki=`${rn}*?`,on={DOT_LITERAL:te,PLUS_LITERAL:Pi,QMARK_LITERAL:Ii,SLASH_LITERAL:Ue,ONE_CHAR:ki,QMARK:rn,END_ANCHOR:St,DOTS_SLASH:$t,NO_DOT:Mi,NO_DOTS:Wi,NO_DOT_SLASH:Gi,NO_DOTS_SLASH:ji,QMARK_NO_DOT:Ui,STAR:Ki,START_ANCHOR:Dn},Vi={...on,SLASH_LITERAL:`[${ee}]`,QMARK:sn,STAR:`${sn}*?`,DOTS_SLASH:`${te}{1,2}(?:[${ee}]|$)`,NO_DOT:`(?!${te})`,NO_DOTS:`(?!(?:^|[${ee}])${te}{1,2}(?:[${ee}]|$))`,NO_DOT_SLASH:`(?!${te}{0,1}(?:[${ee}]|$))`,NO_DOTS_SLASH:`(?!${te}{1,2}(?:[${ee}]|$))`,QMARK_NO_DOT:`[^.${ee}]`,START_ANCHOR:`(?:^|[${ee}])`,END_ANCHOR:`(?:[${ee}]|$)`},zi={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 Ke={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:zi,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:Li.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?Vi:on}};(function(t){const e=K,u=process.platform==="win32",{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=Ke;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(n,"/"),t.removeBackslashes=D=>D.replace(s,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}})(je);const an=je,{CHAR_ASTERISK:Tt,CHAR_AT:Yi,CHAR_BACKWARD_SLASH:ye,CHAR_COMMA:qi,CHAR_DOT:xt,CHAR_EXCLAMATION_MARK:Ot,CHAR_FORWARD_SLASH:ln,CHAR_LEFT_CURLY_BRACE:Nt,CHAR_LEFT_PARENTHESES:Ht,CHAR_LEFT_SQUARE_BRACKET:Xi,CHAR_PLUS:Qi,CHAR_QUESTION_MARK:cn,CHAR_RIGHT_CURLY_BRACE:Zi,CHAR_RIGHT_PARENTHESES:fn,CHAR_RIGHT_SQUARE_BRACKET:Ji}=Ke,hn=t=>t===ln||t===ye,dn=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},eD=(t,e)=>{const u=e||{},n=t.length-1,s=u.parts===!0||u.scanToEnd===!0,r=[],i=[],D=[];let o=t,a=-1,c=0,f=0,l=!1,p=!1,C=!1,F=!1,A=!1,B=!1,H=!1,S=!1,X=!1,M=!1,ne=0,W,_,b={value:"",depth:0,isGlob:!1};const k=()=>a>=n,E=()=>o.charCodeAt(a+1),x=()=>(W=_,o.charCodeAt(++a));for(;a<n;){_=x();let G;if(_===ye){H=b.backslashes=!0,_=x(),_===Nt&&(B=!0);continue}if(B===!0||_===Nt){for(ne++;k()!==!0&&(_=x());){if(_===ye){H=b.backslashes=!0,x();continue}if(_===Nt){ne++;continue}if(B!==!0&&_===xt&&(_=x())===xt){if(l=b.isBrace=!0,C=b.isGlob=!0,M=!0,s===!0)continue;break}if(B!==!0&&_===qi){if(l=b.isBrace=!0,C=b.isGlob=!0,M=!0,s===!0)continue;break}if(_===Zi&&(ne--,ne===0)){B=!1,l=b.isBrace=!0,M=!0;break}}if(s===!0)continue;break}if(_===ln){if(r.push(a),i.push(b),b={value:"",depth:0,isGlob:!1},M===!0)continue;if(W===xt&&a===c+1){c+=2;continue}f=a+1;continue}if(u.noext!==!0&&(_===Qi||_===Yi||_===Tt||_===cn||_===Ot)===!0&&E()===Ht){if(C=b.isGlob=!0,F=b.isExtglob=!0,M=!0,_===Ot&&a===c&&(X=!0),s===!0){for(;k()!==!0&&(_=x());){if(_===ye){H=b.backslashes=!0,_=x();continue}if(_===fn){C=b.isGlob=!0,M=!0;break}}continue}break}if(_===Tt){if(W===Tt&&(A=b.isGlobstar=!0),C=b.isGlob=!0,M=!0,s===!0)continue;break}if(_===cn){if(C=b.isGlob=!0,M=!0,s===!0)continue;break}if(_===Xi){for(;k()!==!0&&(G=x());){if(G===ye){H=b.backslashes=!0,x();continue}if(G===Ji){p=b.isBracket=!0,C=b.isGlob=!0,M=!0;break}}if(s===!0)continue;break}if(u.nonegate!==!0&&_===Ot&&a===c){S=b.negated=!0,c++;continue}if(u.noparen!==!0&&_===Ht){if(C=b.isGlob=!0,s===!0){for(;k()!==!0&&(_=x());){if(_===Ht){H=b.backslashes=!0,_=x();continue}if(_===fn){M=!0;break}}continue}break}if(C===!0){if(M=!0,s===!0)continue;break}}u.noext===!0&&(F=!1,C=!1);let $=o,se="",h="";c>0&&(se=o.slice(0,c),o=o.slice(c),f-=c),$&&C===!0&&f>0?($=o.slice(0,f),h=o.slice(f)):C===!0?($="",h=o):$=o,$&&$!==""&&$!=="/"&&$!==o&&hn($.charCodeAt($.length-1))&&($=$.slice(0,-1)),u.unescape===!0&&(h&&(h=an.removeBackslashes(h)),$&&H===!0&&($=an.removeBackslashes($)));const d={prefix:se,input:t,start:c,base:$,glob:h,isBrace:l,isBracket:p,isGlob:C,isExtglob:F,isGlobstar:A,negated:S,negatedExtglob:X};if(u.tokens===!0&&(d.maxDepth=0,hn(_)||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=se):i[R].value=V,dn(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,dn(i[i.length-1]),d.maxDepth+=i[i.length-1].depth)}d.slashes=r,d.parts=D}return d};var tD=eD;const Ve=Ke,z=je,{MAX_LENGTH:ze,POSIX_REGEX_SOURCE:uD,REGEX_NON_SPECIAL_CHARS:nD,REGEX_SPECIAL_CHARS_BACKREF:sD,REPLACEMENTS:En}=Ve,rD=(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(s=>z.escapeRegex(s)).join("..")}return u},de=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,Lt=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=En[t]||t;const u={...e},n=typeof u.maxLength=="number"?Math.min(ze,u.maxLength):ze;let s=t.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);const r={type:"bos",value:"",output:u.prepend||""},i=[r],D=u.capture?"":"?:",o=z.isWindows(e),a=Ve.globChars(o),c=Ve.extglobChars(a),{DOT_LITERAL:f,PLUS_LITERAL:l,SLASH_LITERAL:p,ONE_CHAR:C,DOTS_SLASH:F,NO_DOT:A,NO_DOT_SLASH:B,NO_DOTS_SLASH:H,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 E={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,E),s=t.length;const x=[],$=[],se=[];let h=r,d;const G=()=>E.index===s-1,R=E.peek=(m=1)=>t[E.index+m],Q=E.advance=()=>t[++E.index]||"",Z=()=>t.slice(E.index+1),V=(m="",T=0)=>{E.consumed+=m,E.index+=T},Ne=m=>{E.output+=m.output!=null?m.output:m.value,V(m.value)},As=()=>{let m=1;for(;R()==="!"&&(R(2)!=="("||R(3)==="?");)Q(),E.start++,m++;return m%2===0?!1:(E.negated=!0,E.start++,!0)},He=m=>{E[m]++,se.push(m)},re=m=>{E[m]--,se.pop()},w=m=>{if(h.type==="globstar"){const T=E.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&&(E.output=E.output.slice(0,-h.output.length),h.type="star",h.value="*",h.output=k,E.output+=h.output)}if(x.length&&m.type!=="paren"&&(x[x.length-1].inner+=m.value),(m.value||m.output)&&Ne(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},Le=(m,T)=>{const g={...c[T],conditions:1,inner:""};g.prev=h,g.parens=E.parens,g.output=E.output;const y=(u.capture?"(":"")+g.open;He("parens"),w({type:m,value:T,output:E.output?"":C}),w({type:"paren",extglob:!0,value:Q(),output:y}),x.push(g)},ys=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=Lt(g,{...e,fastpaths:!1}).output;T=m.close=`)${O})${y})`}m.prev.type==="bos"&&(E.negatedExtglob=!0)}w({type:"paren",extglob:!0,value:d,output:T}),re("parens")};if(u.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let m=!1,T=t.replace(sD,(g,y,O,j,L,ot)=>j==="\\"?(m=!0,g):j==="?"?y?y+j+(L?S.repeat(L.length):""):ot===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?(E.output=t,E):(E.output=z.wrapOutput(T,E,e),E)}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,E.index+=O,O%2!==0&&(d+="\\")),u.unescape===!0?d=Q():d+=Q(),E.brackets===0){w({type:"text",value:d});continue}}if(E.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=uD[j];if(L){h.value=O+L,E.backtrack=!0,Q(),!r.output&&i.indexOf(h)===1&&(r.output=C);continue}}}(d==="["&&R()!==":"||d==="-"&&R()==="]")&&(d=`\\${d}`),d==="]"&&(h.value==="["||h.value==="[^")&&(d=`\\${d}`),u.posix===!0&&d==="!"&&h.value==="["&&(d="^"),h.value+=d,Ne({value:d});continue}if(E.quotes===1&&d!=='"'){d=z.escapeRegex(d),h.value+=d,Ne({value:d});continue}if(d==='"'){E.quotes=E.quotes===1?0:1,u.keepQuotes===!0&&w({type:"text",value:d});continue}if(d==="("){He("parens"),w({type:"paren",value:d});continue}if(d===")"){if(E.parens===0&&u.strictBrackets===!0)throw new SyntaxError(de("opening","("));const g=x[x.length-1];if(g&&E.parens===g.parens+1){ys(x.pop());continue}w({type:"paren",value:d,output:E.parens?")":"\\)"}),re("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 He("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(E.brackets===0){if(u.strictBrackets===!0)throw new SyntaxError(de("opening","["));w({type:"text",value:d,output:`\\${d}`});continue}re("brackets");const g=h.value.slice(1);if(h.posix!==!0&&g[0]==="^"&&!g.includes("/")&&(d=`/${d}`),h.value+=d,Ne({value:d}),u.literalBrackets===!1||z.hasRegexChars(g))continue;const y=z.escapeRegex(h.value);if(E.output=E.output.slice(0,-h.value.length),u.literalBrackets===!0){E.output+=y,h.value=y;continue}h.value=`(${D}${y}|${h.value})`,E.output+=h.value;continue}if(d==="{"&&u.nobrace!==!0){He("braces");const g={type:"brace",value:d,output:"(",outputIndex:E.output.length,tokensIndex:E.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=rD(j,u),E.backtrack=!0}if(g.comma!==!0&&g.dots!==!0){const O=E.output.slice(0,g.outputIndex),j=E.tokens.slice(g.tokensIndex);g.value=g.output="\\{",d=y="\\}",E.output=O;for(const L of j)E.output+=L.output||L.value}w({type:"brace",value:d,output:y}),re("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&&se[se.length-1]==="braces"&&(y.comma=!0,g="|"),w({type:"comma",value:d,output:g});continue}if(d==="/"){if(h.type==="dot"&&E.index===E.start+1){E.start=E.index+1,E.consumed="",E.output="",i.pop(),h=r;continue}w({type:"slash",value:d,output:p});continue}if(d==="."){if(E.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(E.braces+E.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)!=="?"){Le("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)))){Le("negate",d);continue}if(u.nonegate!==!0&&E.index===0){As();continue}}if(d==="+"){if(u.noextglob!==!0&&R()==="("&&R(2)!=="?"){Le("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")||E.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=nD.exec(Z());g&&(d+=g[0],E.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,E.backtrack=!0,E.globstar=!0,V(d);continue}let m=Z();if(u.noextglob!==!0&&/^\([^?]/.test(m)){Le("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=E.braces>0&&(g.type==="comma"||g.type==="brace"),ot=x.length&&(g.type==="pipe"||g.type==="paren");if(!O&&g.type!=="paren"&&!L&&!ot){w({type:"star",value:d,output:""});continue}for(;m.slice(0,3)==="/**";){const Pe=t[E.index+4];if(Pe&&Pe!=="/")break;m=m.slice(3),V("/**",3)}if(g.type==="bos"&&G()){h.type="globstar",h.value+=d,h.output=W(u),E.output=h.output,E.globstar=!0,V(d);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&!j&&G()){E.output=E.output.slice(0,-(g.output+h.output).length),g.output=`(?:${g.output}`,h.type="globstar",h.output=W(u)+(u.strictSlashes?")":"|$)"),h.value+=d,E.globstar=!0,E.output+=g.output+h.output,V(d);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&m[0]==="/"){const Pe=m[1]!==void 0?"|$":"";E.output=E.output.slice(0,-(g.output+h.output).length),g.output=`(?:${g.output}`,h.type="globstar",h.output=`${W(u)}${p}|${p}${Pe})`,h.value+=d,E.output+=g.output+h.output,E.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=`(?:^|${p}|${W(u)}${p})`,E.output=h.output,E.globstar=!0,V(d+Q()),w({type:"slash",value:"/",output:""});continue}E.output=E.output.slice(0,-h.output.length),h.type="globstar",h.output=W(u),h.value+=d,E.output+=h.output,E.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}(E.index===E.start||h.type==="slash"||h.type==="dot")&&(h.type==="dot"?(E.output+=B,h.output+=B):u.dot===!0?(E.output+=H,h.output+=H):(E.output+=_,h.output+=_),R()!=="*"&&(E.output+=C,h.output+=C)),w(T)}for(;E.brackets>0;){if(u.strictBrackets===!0)throw new SyntaxError(de("closing","]"));E.output=z.escapeLast(E.output,"["),re("brackets")}for(;E.parens>0;){if(u.strictBrackets===!0)throw new SyntaxError(de("closing",")"));E.output=z.escapeLast(E.output,"("),re("parens")}for(;E.braces>0;){if(u.strictBrackets===!0)throw new SyntaxError(de("closing","}"));E.output=z.escapeLast(E.output,"{"),re("braces")}if(u.strictSlashes!==!0&&(h.type==="star"||h.type==="bracket")&&w({type:"maybe_slash",value:"",output:`${p}?`}),E.backtrack===!0){E.output="";for(const m of E.tokens)E.output+=m.output!=null?m.output:m.value,m.suffix&&(E.output+=m.suffix)}return E};Lt.fastpaths=(t,e)=>{const u={...e},n=typeof u.maxLength=="number"?Math.min(ze,u.maxLength):ze,s=t.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);t=En[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:p,START_ANCHOR:C}=Ve.globChars(r),F=u.dot?f:c,A=u.dot?l:c,B=u.capture?"":"?:",H={negated:!1,prefix:""};let S=u.bash===!0?".*?":p;u.capture&&(S=`(${S})`);const X=_=>_.noglobstar===!0?S:`(${B}(?:(?!${C}${_.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,H);let W=M(ne);return W&&u.strictSlashes!==!0&&(W+=`${D}?`),W};var iD=Lt;const DD=K,oD=tD,Pt=iD,It=je,aD=Ke,lD=t=>t&&typeof t=="object"&&!Array.isArray(t),N=(t,e,u=!1)=>{if(Array.isArray(t)){const c=t.map(l=>N(l,e,u));return l=>{for(const p of c){const C=p(l);if(C)return C}return!1}}const n=lD(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");const s=e||{},r=It.isWindows(e),i=n?N.compileRe(t,e):N.makeRe(t,e,!1,!0),D=i.state;delete i.state;let o=()=>!1;if(s.ignore){const c={...e,ignore:null,onMatch:null,onResult:null};o=N(s.ignore,c,u)}const a=(c,f=!1)=>{const{isMatch:l,match:p,output:C}=N.test(c,i,e,{glob:t,posix:r}),F={glob:t,state:D,regex:i,posix:r,input:c,output:C,match:p,isMatch:l};return typeof s.onResult=="function"&&s.onResult(F),l===!1?(F.isMatch=!1,f?F:!1):o(c)?(typeof s.onIgnore=="function"&&s.onIgnore(F),F.isMatch=!1,f?F:!1):(typeof s.onMatch=="function"&&s.onMatch(F),f?F:!0)};return u&&(a.state=D),a};N.test=(t,e,u,{glob:n,posix:s}={})=>{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||(s?It.toPosixSlashes:null);let D=t===n,o=D&&i?i(t):t;return D===!1&&(o=i?i(t):t,D=o===n),(D===!1||r.capture===!0)&&(r.matchBase===!0||r.basename===!0?D=N.matchBase(t,e,u,s):D=e.exec(o)),{isMatch:!!D,match:D,output:o}},N.matchBase=(t,e,u,n=It.isWindows(u))=>(e instanceof RegExp?e:N.makeRe(e,u)).test(DD.basename(t)),N.isMatch=(t,e,u)=>N(e,u)(t),N.parse=(t,e)=>Array.isArray(t)?t.map(u=>N.parse(u,e)):Pt(t,{...e,fastpaths:!1}),N.scan=(t,e)=>oD(t,e),N.compileRe=(t,e,u=!1,n=!1)=>{if(u===!0)return t.output;const s=e||{},r=s.contains?"":"^",i=s.contains?"":"$";let D=`${r}(?:${t.output})${i}`;t&&t.negated===!0&&(D=`^(?!${D}).*$`);const o=N.toRegex(D,e);return n===!0&&(o.state=t),o},N.makeRe=(t,e={},u=!1,n=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(s.output=Pt.fastpaths(t,e)),s.output||(s=Pt(t,e)),N.compileRe(s,e,u,n)},N.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/$^/}},N.constants=aD;var cD=N,pn=cD;const we=ie,{Readable:fD}=Ns,Re=K,{promisify:Ye}=me,kt=pn,hD=Ye(we.readdir),dD=Ye(we.stat),Cn=Ye(we.lstat),ED=Ye(we.realpath),pD="!",Fn="READDIRP_RECURSIVE_ERROR",CD=new Set(["ENOENT","EPERM","EACCES","ELOOP",Fn]),Mt="files",gn="directories",qe="files_directories",Xe="all",mn=[Mt,gn,qe,Xe],FD=t=>CD.has(t.code),[_n,gD]=process.versions.node.split(".").slice(0,2).map(t=>Number.parseInt(t,10)),mD=process.platform==="win32"&&(_n>10||_n===10&&gD>=5),An=t=>{if(t!==void 0){if(typeof t=="function")return t;if(typeof t=="string"){const e=kt(t.trim());return u=>e(u.basename)}if(Array.isArray(t)){const e=[],u=[];for(const n of t){const s=n.trim();s.charAt(0)===pD?u.push(kt(s.slice(1))):e.push(kt(s))}return u.length>0?e.length>0?n=>e.some(s=>s(n.basename))&&!u.some(s=>s(n.basename)):n=>!u.some(s=>s(n.basename)):n=>e.some(s=>s(n.basename))}}};class Dt extends fD{static get defaultOptions(){return{root:".",fileFilter:e=>!0,directoryFilter:e=>!0,type:Mt,lstat:!1,depth:2147483648,alwaysStat:!1}}constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark||4096});const u={...Dt.defaultOptions,...e},{root:n,type:s}=u;this._fileFilter=An(u.fileFilter),this._directoryFilter=An(u.directoryFilter);const r=u.lstat?Cn:dD;mD?this._stat=i=>r(i,{bigint:!0}):this._stat=r,this._maxDepth=u.depth,this._wantsDir=[gn,qe,Xe].includes(s),this._wantsFile=[Mt,qe,Xe].includes(s),this._wantsEverything=s===Xe,this._root=Re.resolve(n),this._isDirent="Dirent"in we&&!u.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(n,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:n,files:s=[]}=this.parent||{};if(s.length>0){const r=s.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)?(n<=this._maxDepth&&this.parents.push(this._exploreDir(i.fullPath,n+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 n;try{n=await hD(e,this._rdOptions)}catch(s){this._onError(s)}return{files:n,depth:u,path:e}}async _formatEntry(e,u){let n;try{const s=this._isDirent?e.name:e,r=Re.resolve(Re.join(u,s));n={path:Re.relative(this._root,r),fullPath:r,basename:s},n[this._statsProp]=this._isDirent?e:await this._stat(r)}catch(s){this._onError(s)}return n}_onError(e){FD(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 n=e.fullPath;try{const s=await ED(n),r=await Cn(s);if(r.isFile())return"file";if(r.isDirectory()){const i=s.length;if(n.startsWith(s)&&n.substr(i,1)===Re.sep){const D=new Error(`Circular symlink detected: "${n}" points to "${s}"`);return D.code=Fn,this._onError(D)}return"directory"}}catch(s){this._onError(s)}}}}_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=qe),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&&!mn.includes(u))throw new Error(`readdirp: Invalid type passed. Use one of ${mn.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return e.root=t,new Dt(e)},_D=(t,e={})=>new Promise((u,n)=>{const s=[];Ee(t,e).on("data",r=>s.push(r)).on("end",()=>u(s)).on("error",r=>n(r))});Ee.promise=_D,Ee.ReaddirpStream=Dt,Ee.default=Ee;var AD=Ee,Wt={exports:{}};/*!
20
+ `}table({tableData:e,tableOptions:u,tableBreakpoints:n}){return xr(e.map(s=>s.map(r=>this.render(r))),n?Hr(n):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:n,aliasesEnabled:s,aliasFormatted:r}=e;let i="";if(r?i+=`${r}, `:s&&(i+=" "),i+=n,"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 n;let u="description"in e&&(n=e.description)!=null?n:"";if("default"in e){let{default:s}=e;typeof s=="function"&&(s=s()),s&&(u+=` (default: ${this.flagDefault(s)})`)}return u}render(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(u=>this.render(u)).join(`
21
+ `);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 gt=/^[\w.-]+$/,{stringify:J}=JSON,Xr=/[|\\{}()[\]^$+*?.]/;function mt(t){const e=[];let u,n;for(const s of t){if(n)throw new Error(`Invalid parameter: Spread parameter ${J(n)} must be last`);const r=s[0],i=s[s.length-1];let D;if(r==="<"&&i===">"&&(D=!0,u))throw new Error(`Invalid parameter: Required parameter ${J(s)} cannot come after optional parameter ${J(u)}`);if(r==="["&&i==="]"&&(D=!1,u=s),D===void 0)throw new Error(`Invalid parameter: ${J(s)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let o=s.slice(1,-1);const l=o.slice(-3)==="...";l&&(n=s,o=o.slice(0,-3));const f=o.match(Xr);if(f)throw new Error(`Invalid parameter: ${J(s)}. Invalid character found ${J(f[0])}`);e.push({name:o,required:D,spread:l})}return e}function _t(t,e,u,n){for(let s=0;s<e.length;s+=1){const{name:r,required:i,spread:D}=e[s],o=Lr(r);if(o in t)throw new Error(`Invalid parameter: ${J(r)} is used more than once.`);const l=D?u.slice(s):u[s];if(D&&(s=e.length),i&&(!l||D&&l.length===0))return console.error(`Error: Missing required parameter ${J(r)}
22
+ `),n(),process.exit(1);t[o]=l}}function Qr(t){return t===void 0||t!==!1}function ju(t,e,u,n){const s={...e.flags},r=e.version;r&&(s.version={type:Boolean,description:"Show version"});const{help:i}=e,D=Qr(i);D&&!("help"in s)&&(s.help={type:Boolean,alias:"h",description:"Show help"});const o=wu(s,n,{ignore:e.ignoreArgv}),l=()=>{console.log(e.version)};if(r&&o.flags.version===!0)return l(),process.exit(0);const f=new qr,c=D&&(i!=null&&i.render)?i.render:C=>f.render(C),a=C=>{const F=zr({...e,...C?{help:C}:{},flags:s});console.log(c(F,f))};if(D&&o.flags.help===!0)return a(),process.exit(0);if(e.parameters){let{parameters:C}=e,F=o._;const A=C.indexOf("--"),B=C.slice(A+1),H=Object.create(null);if(A>-1&&B.length>0){C=C.slice(0,A);const S=o._["--"];F=F.slice(0,-S.length||void 0),_t(H,mt(C),F,a),_t(H,mt(B),S,a)}else _t(H,mt(C),F,a);Object.assign(o._,H)}const E={...o,showVersion:l,showHelp:a};return typeof u=="function"&&u(E),{command:t,...E}}function Zr(t,e){const u=new Map;for(const n of e){const s=[n.options.name],{alias:r}=n.options;r&&(Array.isArray(r)?s.push(...r):s.push(r));for(const i of s){if(u.has(i))throw new Error(`Duplicate command name found: ${J(i)}`);u.set(i,n)}}return u.get(t)}function Uu(t,e,u=process.argv.slice(2)){if(!t)throw new Error("Options is required");if("name"in t&&(!t.name||!gt.test(t.name)))throw new Error(`Invalid script name: ${J(t.name)}`);const n=u[0];if(t.commands&&gt.test(n)){const s=Zr(n,t.commands);if(s)return ju(s.options.name,{...s.options,parent:t},s.callback,u.slice(1))}return ju(void 0,t,e,u)}function Jr(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(!gt.test(u))throw new Error(`Invalid command name ${JSON.stringify(u)}. Command names must be one word.`);return{options:t,callback:e}}var ei=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ti(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var fe={exports:{}},At,Ku;function ui(){if(Ku)return At;Ku=1,At=n,n.sync=s;var t=ie;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 n(r,i,D){t.stat(r,function(o,l){D(o,o?!1:u(l,r,i))})}function s(r,i){return u(t.statSync(r),r,i)}return At}var yt,Vu;function ni(){if(Vu)return yt;Vu=1,yt=e,e.sync=u;var t=ie;function e(r,i,D){t.stat(r,function(o,l){D(o,o?!1:n(l,i))})}function u(r,i){return n(t.statSync(r),i)}function n(r,i){return r.isFile()&&s(r,i)}function s(r,i){var D=r.mode,o=r.uid,l=r.gid,f=i.uid!==void 0?i.uid:process.getuid&&process.getuid(),c=i.gid!==void 0?i.gid:process.getgid&&process.getgid(),a=parseInt("100",8),E=parseInt("010",8),C=parseInt("001",8),F=a|E,A=D&C||D&E&&l===c||D&a&&o===f||D&F&&f===0;return A}return yt}var Ke;process.platform==="win32"||ei.TESTING_WINDOWS?Ke=ui():Ke=ni();var si=wt;wt.sync=ri;function wt(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(n,s){wt(t,e||{},function(r,i){r?s(r):n(i)})})}Ke(t,e||{},function(n,s){n&&(n.code==="EACCES"||e&&e.ignoreErrors)&&(n=null,s=!1),u(n,s)})}function ri(t,e){try{return Ke.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",zu=K,ii=he?";":":",Yu=si,qu=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),Xu=(t,e)=>{const u=e.colon||ii,n=t.match(/\//)||he&&t.match(/\\/)?[""]:[...he?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(u)],s=he?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",r=he?s.split(u):[""];return he&&t.indexOf(".")!==-1&&r[0]!==""&&r.unshift(""),{pathEnv:n,pathExt:r,pathExtExe:s}},Qu=(t,e,u)=>{typeof e=="function"&&(u=e,e={}),e||(e={});const{pathEnv:n,pathExt:s,pathExtExe:r}=Xu(t,e),i=[],D=l=>new Promise((f,c)=>{if(l===n.length)return e.all&&i.length?f(i):c(qu(t));const a=n[l],E=/^".*"$/.test(a)?a.slice(1,-1):a,C=zu.join(E,t),F=!E&&/^\.[\\\/]/.test(t)?t.slice(0,2)+C:C;f(o(F,l,0))}),o=(l,f,c)=>new Promise((a,E)=>{if(c===s.length)return a(D(f+1));const C=s[c];Yu(l+C,{pathExt:r},(F,A)=>{if(!F&&A)if(e.all)i.push(l+C);else return a(l+C);return a(o(l,f,c+1))})});return u?D(0).then(l=>u(null,l),u):D(0)},Di=(t,e)=>{e=e||{};const{pathEnv:u,pathExt:n,pathExtExe:s}=Xu(t,e),r=[];for(let i=0;i<u.length;i++){const D=u[i],o=/^".*"$/.test(D)?D.slice(1,-1):D,l=zu.join(o,t),f=!o&&/^\.[\\\/]/.test(t)?t.slice(0,2)+l:l;for(let c=0;c<n.length;c++){const a=f+n[c];try{if(Yu.sync(a,{pathExt:s}))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 oi=Qu;Qu.sync=Di;var Rt={exports:{}};const Zu=(t={})=>{const e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};Rt.exports=Zu,Rt.exports.default=Zu;var ai=Rt.exports;const Ju=K,li=oi,ci=ai;function en(t,e){const u=t.options.env||process.env,n=process.cwd(),s=t.options.cwd!=null,r=s&&process.chdir!==void 0&&!process.chdir.disabled;if(r)try{process.chdir(t.options.cwd)}catch{}let i;try{i=li.sync(t.command,{path:u[ci({env:u})],pathExt:e?Ju.delimiter:void 0})}catch{}finally{r&&process.chdir(n)}return i&&(i=Ju.resolve(s?t.options.cwd:"",i)),i}function fi(t){return en(t)||en(t,!0)}var hi=fi,bt={};const vt=/([()\][%!^"`<>&|;, *?])/g;function di(t){return t=t.replace(vt,"^$1"),t}function Ei(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(vt,"^$1"),e&&(t=t.replace(vt,"^$1")),t}bt.command=di,bt.argument=Ei;var pi=/^#!(.*)/;const Ci=pi;var Fi=(t="")=>{const e=t.match(Ci);if(!e)return null;const[u,n]=e[0].replace(/#! ?/,"").split(" "),s=u.split("/").pop();return s==="env"?n:n?`${s} ${n}`:s};const Bt=ie,gi=Fi;function mi(t){const u=Buffer.alloc(150);let n;try{n=Bt.openSync(t,"r"),Bt.readSync(n,u,0,150,0),Bt.closeSync(n)}catch{}return gi(u.toString())}var _i=mi;const Ai=K,tn=hi,un=bt,yi=_i,wi=process.platform==="win32",Ri=/\.(?:com|exe)$/i,bi=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function vi(t){t.file=tn(t);const e=t.file&&yi(t.file);return e?(t.args.unshift(t.file),t.command=e,tn(t)):t.file}function Bi(t){if(!wi)return t;const e=vi(t),u=!Ri.test(e);if(t.options.forceShell||u){const n=bi.test(e);t.command=Ai.normalize(t.command),t.command=un.command(t.command),t.args=t.args.map(r=>un.argument(r,n));const s=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${s}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function Si(t,e,u){e&&!Array.isArray(e)&&(u=e,e=null),e=e?e.slice(0):[],u=Object.assign({},u);const n={command:t,args:e,options:u,file:void 0,original:{command:t,args:e}};return u.shell?n:Bi(n)}var $i=Si;const St=process.platform==="win32";function $t(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 Ti(t,e){if(!St)return;const u=t.emit;t.emit=function(n,s){if(n==="exit"){const r=nn(s,e);if(r)return u.call(t,"error",r)}return u.apply(t,arguments)}}function nn(t,e){return St&&t===1&&!e.file?$t(e.original,"spawn"):null}function xi(t,e){return St&&t===1&&!e.file?$t(e.original,"spawnSync"):null}var Oi={hookChildProcess:Ti,verifyENOENT:nn,verifyENOENTSync:xi,notFoundError:$t};const sn=Ts,Tt=$i,xt=Oi;function rn(t,e,u){const n=Tt(t,e,u),s=sn.spawn(n.command,n.args,n.options);return xt.hookChildProcess(s,n),s}function Ni(t,e,u){const n=Tt(t,e,u),s=sn.spawnSync(n.command,n.args,n.options);return s.error=s.error||xt.verifyENOENTSync(s.status,n),s}fe.exports=rn,fe.exports.spawn=rn,fe.exports.sync=Ni,fe.exports._parse=Tt,fe.exports._enoent=xt;var Hi=fe.exports,Li=ti(Hi);const Dn=(t,e)=>{const u={...process.env},n=["inherit","inherit","inherit","ipc"];return e&&(e.noCache&&(u.TSX_DISABLE_CACHE="1"),e.tsconfigPath&&(u.TSX_TSCONFIG_PATH=e.tsconfigPath)),Li(process.execPath,["--require",ht.resolve("./preflight.cjs"),xs?"--import":"--loader",Ss(ht.resolve("./loader.mjs")).toString(),...t],{stdio:n,env:u})};var Ve={};const Ii=K,ee="\\\\/",on=`[^${ee}]`,te="\\.",Pi="\\+",ki="\\?",ze="\\/",Mi="(?=.)",an="[^/]",Ot=`(?:${ze}|$)`,ln=`(?:^|${ze})`,Nt=`${te}{1,2}${Ot}`,Wi=`(?!${te})`,Gi=`(?!${ln}${Nt})`,ji=`(?!${te}{0,1}${Ot})`,Ui=`(?!${Nt})`,Ki=`[^.${ze}]`,Vi=`${an}*?`,cn={DOT_LITERAL:te,PLUS_LITERAL:Pi,QMARK_LITERAL:ki,SLASH_LITERAL:ze,ONE_CHAR:Mi,QMARK:an,END_ANCHOR:Ot,DOTS_SLASH:Nt,NO_DOT:Wi,NO_DOTS:Gi,NO_DOT_SLASH:ji,NO_DOTS_SLASH:Ui,QMARK_NO_DOT:Ki,STAR:Vi,START_ANCHOR:ln},zi={...cn,SLASH_LITERAL:`[${ee}]`,QMARK:on,STAR:`${on}*?`,DOTS_SLASH:`${te}{1,2}(?:[${ee}]|$)`,NO_DOT:`(?!${te})`,NO_DOTS:`(?!(?:^|[${ee}])${te}{1,2}(?:[${ee}]|$))`,NO_DOT_SLASH:`(?!${te}{0,1}(?:[${ee}]|$))`,NO_DOTS_SLASH:`(?!${te}{1,2}(?:[${ee}]|$))`,QMARK_NO_DOT:`[^.${ee}]`,START_ANCHOR:`(?:^|[${ee}])`,END_ANCHOR:`(?:[${ee}]|$)`},Yi={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 Ye={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Yi,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:Ii.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?zi:cn}};(function(t){const e=K,u=process.platform==="win32",{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=Ye;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(n,"/"),t.removeBackslashes=D=>D.replace(s,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 f=D.lastIndexOf(o,l);return f===-1?D:D[f-1]==="\\"?t.escapeLast(D,o,f-1):`${D.slice(0,f)}\\${D.slice(f)}`},t.removePrefix=(D,o={})=>{let l=D;return l.startsWith("./")&&(l=l.slice(2),o.prefix="./"),l},t.wrapOutput=(D,o={},l={})=>{const f=l.contains?"":"^",c=l.contains?"":"$";let a=`${f}(?:${D})${c}`;return o.negated===!0&&(a=`(?:^(?!${a}).*$)`),a}})(Ve);const fn=Ve,{CHAR_ASTERISK:Ht,CHAR_AT:qi,CHAR_BACKWARD_SLASH:ye,CHAR_COMMA:Xi,CHAR_DOT:Lt,CHAR_EXCLAMATION_MARK:It,CHAR_FORWARD_SLASH:hn,CHAR_LEFT_CURLY_BRACE:Pt,CHAR_LEFT_PARENTHESES:kt,CHAR_LEFT_SQUARE_BRACKET:Qi,CHAR_PLUS:Zi,CHAR_QUESTION_MARK:dn,CHAR_RIGHT_CURLY_BRACE:Ji,CHAR_RIGHT_PARENTHESES:En,CHAR_RIGHT_SQUARE_BRACKET:eD}=Ye,pn=t=>t===hn||t===ye,Cn=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},tD=(t,e)=>{const u=e||{},n=t.length-1,s=u.parts===!0||u.scanToEnd===!0,r=[],i=[],D=[];let o=t,l=-1,f=0,c=0,a=!1,E=!1,C=!1,F=!1,A=!1,B=!1,H=!1,S=!1,X=!1,M=!1,ne=0,W,_,b={value:"",depth:0,isGlob:!1};const k=()=>l>=n,p=()=>o.charCodeAt(l+1),x=()=>(W=_,o.charCodeAt(++l));for(;l<n;){_=x();let G;if(_===ye){H=b.backslashes=!0,_=x(),_===Pt&&(B=!0);continue}if(B===!0||_===Pt){for(ne++;k()!==!0&&(_=x());){if(_===ye){H=b.backslashes=!0,x();continue}if(_===Pt){ne++;continue}if(B!==!0&&_===Lt&&(_=x())===Lt){if(a=b.isBrace=!0,C=b.isGlob=!0,M=!0,s===!0)continue;break}if(B!==!0&&_===Xi){if(a=b.isBrace=!0,C=b.isGlob=!0,M=!0,s===!0)continue;break}if(_===Ji&&(ne--,ne===0)){B=!1,a=b.isBrace=!0,M=!0;break}}if(s===!0)continue;break}if(_===hn){if(r.push(l),i.push(b),b={value:"",depth:0,isGlob:!1},M===!0)continue;if(W===Lt&&l===f+1){f+=2;continue}c=l+1;continue}if(u.noext!==!0&&(_===Zi||_===qi||_===Ht||_===dn||_===It)===!0&&p()===kt){if(C=b.isGlob=!0,F=b.isExtglob=!0,M=!0,_===It&&l===f&&(X=!0),s===!0){for(;k()!==!0&&(_=x());){if(_===ye){H=b.backslashes=!0,_=x();continue}if(_===En){C=b.isGlob=!0,M=!0;break}}continue}break}if(_===Ht){if(W===Ht&&(A=b.isGlobstar=!0),C=b.isGlob=!0,M=!0,s===!0)continue;break}if(_===dn){if(C=b.isGlob=!0,M=!0,s===!0)continue;break}if(_===Qi){for(;k()!==!0&&(G=x());){if(G===ye){H=b.backslashes=!0,x();continue}if(G===eD){E=b.isBracket=!0,C=b.isGlob=!0,M=!0;break}}if(s===!0)continue;break}if(u.nonegate!==!0&&_===It&&l===f){S=b.negated=!0,f++;continue}if(u.noparen!==!0&&_===kt){if(C=b.isGlob=!0,s===!0){for(;k()!==!0&&(_=x());){if(_===kt){H=b.backslashes=!0,_=x();continue}if(_===En){M=!0;break}}continue}break}if(C===!0){if(M=!0,s===!0)continue;break}}u.noext===!0&&(F=!1,C=!1);let $=o,se="",h="";f>0&&(se=o.slice(0,f),o=o.slice(f),c-=f),$&&C===!0&&c>0?($=o.slice(0,c),h=o.slice(c)):C===!0?($="",h=o):$=o,$&&$!==""&&$!=="/"&&$!==o&&pn($.charCodeAt($.length-1))&&($=$.slice(0,-1)),u.unescape===!0&&(h&&(h=fn.removeBackslashes(h)),$&&H===!0&&($=fn.removeBackslashes($)));const d={prefix:se,input:t,start:f,base:$,glob:h,isBrace:a,isBracket:E,isGlob:C,isExtglob:F,isGlobstar:A,negated:S,negatedExtglob:X};if(u.tokens===!0&&(d.maxDepth=0,pn(_)||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:f,Z=r[R],V=t.slice(Q,Z);u.tokens&&(R===0&&f!==0?(i[R].isPrefix=!0,i[R].value=se):i[R].value=V,Cn(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,Cn(i[i.length-1]),d.maxDepth+=i[i.length-1].depth)}d.slashes=r,d.parts=D}return d};var uD=tD;const qe=Ye,z=Ve,{MAX_LENGTH:Xe,POSIX_REGEX_SOURCE:nD,REGEX_NON_SPECIAL_CHARS:sD,REGEX_SPECIAL_CHARS_BACKREF:rD,REPLACEMENTS:Fn}=qe,iD=(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(s=>z.escapeRegex(s)).join("..")}return u},de=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,Mt=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=Fn[t]||t;const u={...e},n=typeof u.maxLength=="number"?Math.min(Xe,u.maxLength):Xe;let s=t.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);const r={type:"bos",value:"",output:u.prepend||""},i=[r],D=u.capture?"":"?:",o=z.isWindows(e),l=qe.globChars(o),f=qe.extglobChars(l),{DOT_LITERAL:c,PLUS_LITERAL:a,SLASH_LITERAL:E,ONE_CHAR:C,DOTS_SLASH:F,NO_DOT:A,NO_DOT_SLASH:B,NO_DOTS_SLASH:H,QMARK:S,QMARK_NO_DOT:X,STAR:M,START_ANCHOR:ne}=l,W=m=>`(${D}(?:(?!${ne}${m.dot?F:c}).)*?)`,_=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 p={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,p),s=t.length;const x=[],$=[],se=[];let h=r,d;const G=()=>p.index===s-1,R=p.peek=(m=1)=>t[p.index+m],Q=p.advance=()=>t[++p.index]||"",Z=()=>t.slice(p.index+1),V=(m="",T=0)=>{p.consumed+=m,p.index+=T},Ie=m=>{p.output+=m.output!=null?m.output:m.value,V(m.value)},ws=()=>{let m=1;for(;R()==="!"&&(R(2)!=="("||R(3)==="?");)Q(),p.start++,m++;return m%2===0?!1:(p.negated=!0,p.start++,!0)},Pe=m=>{p[m]++,se.push(m)},re=m=>{p[m]--,se.pop()},w=m=>{if(h.type==="globstar"){const T=p.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&&(p.output=p.output.slice(0,-h.output.length),h.type="star",h.value="*",h.output=k,p.output+=h.output)}if(x.length&&m.type!=="paren"&&(x[x.length-1].inner+=m.value),(m.value||m.output)&&Ie(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},ke=(m,T)=>{const g={...f[T],conditions:1,inner:""};g.prev=h,g.parens=p.parens,g.output=p.output;const y=(u.capture?"(":"")+g.open;Pe("parens"),w({type:m,value:T,output:p.output?"":C}),w({type:"paren",extglob:!0,value:Q(),output:y}),x.push(g)},Rs=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=Mt(g,{...e,fastpaths:!1}).output;T=m.close=`)${O})${y})`}m.prev.type==="bos"&&(p.negatedExtglob=!0)}w({type:"paren",extglob:!0,value:d,output:T}),re("parens")};if(u.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let m=!1,T=t.replace(rD,(g,y,O,j,L,ct)=>j==="\\"?(m=!0,g):j==="?"?y?y+j+(L?S.repeat(L.length):""):ct===0?b+(L?S.repeat(L.length):""):S.repeat(O.length):j==="."?c.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?(p.output=t,p):(p.output=z.wrapOutput(T,p,e),p)}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,p.index+=O,O%2!==0&&(d+="\\")),u.unescape===!0?d=Q():d+=Q(),p.brackets===0){w({type:"text",value:d});continue}}if(p.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,p.backtrack=!0,Q(),!r.output&&i.indexOf(h)===1&&(r.output=C);continue}}}(d==="["&&R()!==":"||d==="-"&&R()==="]")&&(d=`\\${d}`),d==="]"&&(h.value==="["||h.value==="[^")&&(d=`\\${d}`),u.posix===!0&&d==="!"&&h.value==="["&&(d="^"),h.value+=d,Ie({value:d});continue}if(p.quotes===1&&d!=='"'){d=z.escapeRegex(d),h.value+=d,Ie({value:d});continue}if(d==='"'){p.quotes=p.quotes===1?0:1,u.keepQuotes===!0&&w({type:"text",value:d});continue}if(d==="("){Pe("parens"),w({type:"paren",value:d});continue}if(d===")"){if(p.parens===0&&u.strictBrackets===!0)throw new SyntaxError(de("opening","("));const g=x[x.length-1];if(g&&p.parens===g.parens+1){Rs(x.pop());continue}w({type:"paren",value:d,output:p.parens?")":"\\)"}),re("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 Pe("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(p.brackets===0){if(u.strictBrackets===!0)throw new SyntaxError(de("opening","["));w({type:"text",value:d,output:`\\${d}`});continue}re("brackets");const g=h.value.slice(1);if(h.posix!==!0&&g[0]==="^"&&!g.includes("/")&&(d=`/${d}`),h.value+=d,Ie({value:d}),u.literalBrackets===!1||z.hasRegexChars(g))continue;const y=z.escapeRegex(h.value);if(p.output=p.output.slice(0,-h.value.length),u.literalBrackets===!0){p.output+=y,h.value=y;continue}h.value=`(${D}${y}|${h.value})`,p.output+=h.value;continue}if(d==="{"&&u.nobrace!==!0){Pe("braces");const g={type:"brace",value:d,output:"(",outputIndex:p.output.length,tokensIndex:p.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=iD(j,u),p.backtrack=!0}if(g.comma!==!0&&g.dots!==!0){const O=p.output.slice(0,g.outputIndex),j=p.tokens.slice(g.tokensIndex);g.value=g.output="\\{",d=y="\\}",p.output=O;for(const L of j)p.output+=L.output||L.value}w({type:"brace",value:d,output:y}),re("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&&se[se.length-1]==="braces"&&(y.comma=!0,g="|"),w({type:"comma",value:d,output:g});continue}if(d==="/"){if(h.type==="dot"&&p.index===p.start+1){p.start=p.index+1,p.consumed="",p.output="",i.pop(),h=r;continue}w({type:"slash",value:d,output:E});continue}if(d==="."){if(p.braces>0&&h.type==="dot"){h.value==="."&&(h.output=c);const g=$[$.length-1];h.type="dots",h.output+=d,h.value+=d,g.dots=!0;continue}if(p.braces+p.parens===0&&h.type!=="bos"&&h.type!=="slash"){w({type:"text",value:d,output:c});continue}w({type:"dot",value:d,output:c});continue}if(d==="?"){if(!(h&&h.value==="(")&&u.noextglob!==!0&&R()==="("&&R(2)!=="?"){ke("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)))){ke("negate",d);continue}if(u.nonegate!==!0&&p.index===0){ws();continue}}if(d==="+"){if(u.noextglob!==!0&&R()==="("&&R(2)!=="?"){ke("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")||p.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=sD.exec(Z());g&&(d+=g[0],p.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,p.backtrack=!0,p.globstar=!0,V(d);continue}let m=Z();if(u.noextglob!==!0&&/^\([^?]/.test(m)){ke("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=p.braces>0&&(g.type==="comma"||g.type==="brace"),ct=x.length&&(g.type==="pipe"||g.type==="paren");if(!O&&g.type!=="paren"&&!L&&!ct){w({type:"star",value:d,output:""});continue}for(;m.slice(0,3)==="/**";){const Me=t[p.index+4];if(Me&&Me!=="/")break;m=m.slice(3),V("/**",3)}if(g.type==="bos"&&G()){h.type="globstar",h.value+=d,h.output=W(u),p.output=h.output,p.globstar=!0,V(d);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&!j&&G()){p.output=p.output.slice(0,-(g.output+h.output).length),g.output=`(?:${g.output}`,h.type="globstar",h.output=W(u)+(u.strictSlashes?")":"|$)"),h.value+=d,p.globstar=!0,p.output+=g.output+h.output,V(d);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&m[0]==="/"){const Me=m[1]!==void 0?"|$":"";p.output=p.output.slice(0,-(g.output+h.output).length),g.output=`(?:${g.output}`,h.type="globstar",h.output=`${W(u)}${E}|${E}${Me})`,h.value+=d,p.output+=g.output+h.output,p.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})`,p.output=h.output,p.globstar=!0,V(d+Q()),w({type:"slash",value:"/",output:""});continue}p.output=p.output.slice(0,-h.output.length),h.type="globstar",h.output=W(u),h.value+=d,p.output+=h.output,p.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}(p.index===p.start||h.type==="slash"||h.type==="dot")&&(h.type==="dot"?(p.output+=B,h.output+=B):u.dot===!0?(p.output+=H,h.output+=H):(p.output+=_,h.output+=_),R()!=="*"&&(p.output+=C,h.output+=C)),w(T)}for(;p.brackets>0;){if(u.strictBrackets===!0)throw new SyntaxError(de("closing","]"));p.output=z.escapeLast(p.output,"["),re("brackets")}for(;p.parens>0;){if(u.strictBrackets===!0)throw new SyntaxError(de("closing",")"));p.output=z.escapeLast(p.output,"("),re("parens")}for(;p.braces>0;){if(u.strictBrackets===!0)throw new SyntaxError(de("closing","}"));p.output=z.escapeLast(p.output,"{"),re("braces")}if(u.strictSlashes!==!0&&(h.type==="star"||h.type==="bracket")&&w({type:"maybe_slash",value:"",output:`${E}?`}),p.backtrack===!0){p.output="";for(const m of p.tokens)p.output+=m.output!=null?m.output:m.value,m.suffix&&(p.output+=m.suffix)}return p};Mt.fastpaths=(t,e)=>{const u={...e},n=typeof u.maxLength=="number"?Math.min(Xe,u.maxLength):Xe,s=t.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);t=Fn[t]||t;const r=z.isWindows(e),{DOT_LITERAL:i,SLASH_LITERAL:D,ONE_CHAR:o,DOTS_SLASH:l,NO_DOT:f,NO_DOTS:c,NO_DOTS_SLASH:a,STAR:E,START_ANCHOR:C}=qe.globChars(r),F=u.dot?c:f,A=u.dot?a:f,B=u.capture?"":"?:",H={negated:!1,prefix:""};let S=u.bash===!0?".*?":E;u.capture&&(S=`(${S})`);const X=_=>_.noglobstar===!0?S:`(${B}(?:(?!${C}${_.dot?l: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,H);let W=M(ne);return W&&u.strictSlashes!==!0&&(W+=`${D}?`),W};var DD=Mt;const oD=K,aD=uD,Wt=DD,Gt=Ve,lD=Ye,cD=t=>t&&typeof t=="object"&&!Array.isArray(t),N=(t,e,u=!1)=>{if(Array.isArray(t)){const f=t.map(a=>N(a,e,u));return a=>{for(const E of f){const C=E(a);if(C)return C}return!1}}const n=cD(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");const s=e||{},r=Gt.isWindows(e),i=n?N.compileRe(t,e):N.makeRe(t,e,!1,!0),D=i.state;delete i.state;let o=()=>!1;if(s.ignore){const f={...e,ignore:null,onMatch:null,onResult:null};o=N(s.ignore,f,u)}const l=(f,c=!1)=>{const{isMatch:a,match:E,output:C}=N.test(f,i,e,{glob:t,posix:r}),F={glob:t,state:D,regex:i,posix:r,input:f,output:C,match:E,isMatch:a};return typeof s.onResult=="function"&&s.onResult(F),a===!1?(F.isMatch=!1,c?F:!1):o(f)?(typeof s.onIgnore=="function"&&s.onIgnore(F),F.isMatch=!1,c?F:!1):(typeof s.onMatch=="function"&&s.onMatch(F),c?F:!0)};return u&&(l.state=D),l};N.test=(t,e,u,{glob:n,posix:s}={})=>{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||(s?Gt.toPosixSlashes:null);let D=t===n,o=D&&i?i(t):t;return D===!1&&(o=i?i(t):t,D=o===n),(D===!1||r.capture===!0)&&(r.matchBase===!0||r.basename===!0?D=N.matchBase(t,e,u,s):D=e.exec(o)),{isMatch:!!D,match:D,output:o}},N.matchBase=(t,e,u,n=Gt.isWindows(u))=>(e instanceof RegExp?e:N.makeRe(e,u)).test(oD.basename(t)),N.isMatch=(t,e,u)=>N(e,u)(t),N.parse=(t,e)=>Array.isArray(t)?t.map(u=>N.parse(u,e)):Wt(t,{...e,fastpaths:!1}),N.scan=(t,e)=>aD(t,e),N.compileRe=(t,e,u=!1,n=!1)=>{if(u===!0)return t.output;const s=e||{},r=s.contains?"":"^",i=s.contains?"":"$";let D=`${r}(?:${t.output})${i}`;t&&t.negated===!0&&(D=`^(?!${D}).*$`);const o=N.toRegex(D,e);return n===!0&&(o.state=t),o},N.makeRe=(t,e={},u=!1,n=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(s.output=Wt.fastpaths(t,e)),s.output||(s=Wt(t,e)),N.compileRe(s,e,u,n)},N.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/$^/}},N.constants=lD;var fD=N,gn=fD;const we=ie,{Readable:hD}=Hs,Re=K,{promisify:Qe}=me,jt=gn,dD=Qe(we.readdir),ED=Qe(we.stat),mn=Qe(we.lstat),pD=Qe(we.realpath),CD="!",_n="READDIRP_RECURSIVE_ERROR",FD=new Set(["ENOENT","EPERM","EACCES","ELOOP",_n]),Ut="files",An="directories",Ze="files_directories",Je="all",yn=[Ut,An,Ze,Je],gD=t=>FD.has(t.code),[wn,mD]=process.versions.node.split(".").slice(0,2).map(t=>Number.parseInt(t,10)),_D=process.platform==="win32"&&(wn>10||wn===10&&mD>=5),Rn=t=>{if(t!==void 0){if(typeof t=="function")return t;if(typeof t=="string"){const e=jt(t.trim());return u=>e(u.basename)}if(Array.isArray(t)){const e=[],u=[];for(const n of t){const s=n.trim();s.charAt(0)===CD?u.push(jt(s.slice(1))):e.push(jt(s))}return u.length>0?e.length>0?n=>e.some(s=>s(n.basename))&&!u.some(s=>s(n.basename)):n=>!u.some(s=>s(n.basename)):n=>e.some(s=>s(n.basename))}}};class lt extends hD{static get defaultOptions(){return{root:".",fileFilter:e=>!0,directoryFilter:e=>!0,type:Ut,lstat:!1,depth:2147483648,alwaysStat:!1}}constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark||4096});const u={...lt.defaultOptions,...e},{root:n,type:s}=u;this._fileFilter=Rn(u.fileFilter),this._directoryFilter=Rn(u.directoryFilter);const r=u.lstat?mn:ED;_D?this._stat=i=>r(i,{bigint:!0}):this._stat=r,this._maxDepth=u.depth,this._wantsDir=[An,Ze,Je].includes(s),this._wantsFile=[Ut,Ze,Je].includes(s),this._wantsEverything=s===Je,this._root=Re.resolve(n),this._isDirent="Dirent"in we&&!u.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(n,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:n,files:s=[]}=this.parent||{};if(s.length>0){const r=s.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)?(n<=this._maxDepth&&this.parents.push(this._exploreDir(i.fullPath,n+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 n;try{n=await dD(e,this._rdOptions)}catch(s){this._onError(s)}return{files:n,depth:u,path:e}}async _formatEntry(e,u){let n;try{const s=this._isDirent?e.name:e,r=Re.resolve(Re.join(u,s));n={path:Re.relative(this._root,r),fullPath:r,basename:s},n[this._statsProp]=this._isDirent?e:await this._stat(r)}catch(s){this._onError(s)}return n}_onError(e){gD(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 n=e.fullPath;try{const s=await pD(n),r=await mn(s);if(r.isFile())return"file";if(r.isDirectory()){const i=s.length;if(n.startsWith(s)&&n.substr(i,1)===Re.sep){const D=new Error(`Circular symlink detected: "${n}" points to "${s}"`);return D.code=_n,this._onError(D)}return"directory"}}catch(s){this._onError(s)}}}}_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=Ze),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&&!yn.includes(u))throw new Error(`readdirp: Invalid type passed. Use one of ${yn.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return e.root=t,new lt(e)},AD=(t,e={})=>new Promise((u,n)=>{const s=[];Ee(t,e).on("data",r=>s.push(r)).on("end",()=>u(s)).on("error",r=>n(r))});Ee.promise=AD,Ee.ReaddirpStream=lt,Ee.default=Ee;var yD=Ee,Kt={exports:{}};/*!
23
23
  * normalize-path <https://github.com/jonschlinkert/normalize-path>
24
24
  *
25
25
  * Copyright (c) 2014-2018, Jon Schlinkert.
26
26
  * Released under the MIT License.
27
- */var yn=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 n="";if(u>4&&t[3]==="\\"){var s=t[2];(s==="?"||s===".")&&t.slice(0,2)==="\\\\"&&(t=t.slice(2),n="//")}var r=t.split(/[/\\]+/);return e!==!1&&r[r.length-1]===""&&r.pop(),n+r.join("/")},yD=Wt.exports;Object.defineProperty(yD,"__esModule",{value:!0});const wn=pn,wD=yn,Rn="!",RD={returnIndex:!1},bD=t=>Array.isArray(t)?t:[t],vD=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){const u=wn(t,e);return n=>t===n||u(n)}return t instanceof RegExp?u=>t.test(u):u=>!1},bn=(t,e,u,n)=>{const s=Array.isArray(u),r=s?u[0]:u;if(!s&&typeof r!="string")throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(r));const i=wD(r,!1);for(let o=0;o<e.length;o++){const a=e[o];if(a(i))return n?-1:!1}const D=s&&[i].concat(u.slice(1));for(let o=0;o<t.length;o++){const a=t[o];if(s?a(...D):a(i))return n?o:!0}return n?-1:!1},Gt=(t,e,u=RD)=>{if(t==null)throw new TypeError("anymatch: specify first argument");const n=typeof u=="boolean"?{returnIndex:u}:u,s=n.returnIndex||!1,r=bD(t),i=r.filter(o=>typeof o=="string"&&o.charAt(0)===Rn).map(o=>o.slice(1)).map(o=>wn(o,n)),D=r.filter(o=>typeof o!="string"||typeof o=="string"&&o.charAt(0)!==Rn).map(o=>vD(o,n));return e==null?(o,a=!1)=>bn(D,i,o,typeof a=="boolean"?a:!1):bn(D,i,e,s)};Gt.default=Gt,Wt.exports=Gt;var BD=Wt.exports;/*!
27
+ */var bn=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 n="";if(u>4&&t[3]==="\\"){var s=t[2];(s==="?"||s===".")&&t.slice(0,2)==="\\\\"&&(t=t.slice(2),n="//")}var r=t.split(/[/\\]+/);return e!==!1&&r[r.length-1]===""&&r.pop(),n+r.join("/")},wD=Kt.exports;Object.defineProperty(wD,"__esModule",{value:!0});const vn=gn,RD=bn,Bn="!",bD={returnIndex:!1},vD=t=>Array.isArray(t)?t:[t],BD=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){const u=vn(t,e);return n=>t===n||u(n)}return t instanceof RegExp?u=>t.test(u):u=>!1},Sn=(t,e,u,n)=>{const s=Array.isArray(u),r=s?u[0]:u;if(!s&&typeof r!="string")throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(r));const i=RD(r,!1);for(let o=0;o<e.length;o++){const l=e[o];if(l(i))return n?-1:!1}const D=s&&[i].concat(u.slice(1));for(let o=0;o<t.length;o++){const l=t[o];if(s?l(...D):l(i))return n?o:!0}return n?-1:!1},Vt=(t,e,u=bD)=>{if(t==null)throw new TypeError("anymatch: specify first argument");const n=typeof u=="boolean"?{returnIndex:u}:u,s=n.returnIndex||!1,r=vD(t),i=r.filter(o=>typeof o=="string"&&o.charAt(0)===Bn).map(o=>o.slice(1)).map(o=>vn(o,n)),D=r.filter(o=>typeof o!="string"||typeof o=="string"&&o.charAt(0)!==Bn).map(o=>BD(o,n));return e==null?(o,l=!1)=>Sn(D,i,o,typeof l=="boolean"?l:!1):Sn(D,i,e,s)};Vt.default=Vt,Kt.exports=Vt;var SD=Kt.exports;/*!
28
28
  * is-extglob <https://github.com/jonschlinkert/is-extglob>
29
29
  *
30
30
  * Copyright (c) 2014-2016, Jon Schlinkert.
31
31
  * Licensed under the MIT License.
32
- */var SD=function(e){if(typeof e!="string"||e==="")return!1;for(var u;u=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(u[2])return!0;e=e.slice(u.index+u[0].length)}return!1};/*!
32
+ */var $D=function(e){if(typeof e!="string"||e==="")return!1;for(var u;u=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(u[2])return!0;e=e.slice(u.index+u[0].length)}return!1};/*!
33
33
  * is-glob <https://github.com/jonschlinkert/is-glob>
34
34
  *
35
35
  * Copyright (c) 2014-2017, Jon Schlinkert.
36
36
  * Released under the MIT License.
37
- */var $D=SD,vn={"{":"}","(":")","[":"]"},TD=function(t){if(t[0]==="!")return!0;for(var e=0,u=-2,n=-2,s=-2,r=-2,i=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||n!==-1&&t[e]==="["&&t[e+1]!=="]"&&(n<e&&(n=t.indexOf("]",e)),n>e&&(i===-1||i>n||(i=t.indexOf("\\",e),i===-1||i>n)))||s!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(s=t.indexOf("}",e),s>e&&(i=t.indexOf("\\",e),i===-1||i>s))||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=vn[D];if(o){var a=t.indexOf(o,e);a!==-1&&(e=a+1)}if(t[e]==="!")return!0}else e++}return!1},xD=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 n=vn[u];if(n){var s=t.indexOf(n,e);s!==-1&&(e=s+1)}if(t[e]==="!")return!0}else e++}return!1},Bn=function(e,u){if(typeof e!="string"||e==="")return!1;if($D(e))return!0;var n=TD;return u&&u.strict===!1&&(n=xD),n(e)},OD=Bn,ND=K.posix.dirname,HD=gu.platform()==="win32",jt="/",LD=/\\/g,PD=/[\{\[].*[\}\]]$/,ID=/(^|[^\\])([\{\[]|\([^\)]+$)/,kD=/\\([\!\*\?\|\[\]\(\)\{\}])/g,MD=function(e,u){var n=Object.assign({flipBackslashes:!0},u);n.flipBackslashes&&HD&&e.indexOf(jt)<0&&(e=e.replace(LD,jt)),PD.test(e)&&(e+=jt),e+="a";do e=ND(e);while(OD(e)||ID.test(e));return e.replace(kD,"$1")},Qe={};(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(n=>n.type===u),t.exceedsLimit=(e,u,n=1,s)=>s===!1||!t.isInteger(e)||!t.isInteger(u)?!1:(Number(u)-Number(e))/Number(n)>=s,t.escapeNode=(e,u=0,n)=>{let s=e.nodes[u];s&&(n&&s.type===n||s.type==="open"||s.type==="close")&&s.escaped!==!0&&(s.value="\\"+s.value,s.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,n)=>(n.type==="text"&&u.push(n.value),n.type==="range"&&(n.type="text"),u),[]),t.flatten=(...e)=>{const u=[],n=s=>{for(let r=0;r<s.length;r++){let i=s[r];Array.isArray(i)?n(i):i!==void 0&&u.push(i)}return u};return n(e),u}})(Qe);const Sn=Qe;var Ut=(t,e={})=>{let u=(n,s={})=>{let r=e.escapeInvalid&&Sn.isInvalidBrace(s),i=n.invalid===!0&&e.escapeInvalid===!0,D="";if(n.value)return(r||i)&&Sn.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let o of n.nodes)D+=u(o);return D};return u(t)};/*!
37
+ */var TD=$D,$n={"{":"}","(":")","[":"]"},xD=function(t){if(t[0]==="!")return!0;for(var e=0,u=-2,n=-2,s=-2,r=-2,i=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||n!==-1&&t[e]==="["&&t[e+1]!=="]"&&(n<e&&(n=t.indexOf("]",e)),n>e&&(i===-1||i>n||(i=t.indexOf("\\",e),i===-1||i>n)))||s!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(s=t.indexOf("}",e),s>e&&(i=t.indexOf("\\",e),i===-1||i>s))||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=$n[D];if(o){var l=t.indexOf(o,e);l!==-1&&(e=l+1)}if(t[e]==="!")return!0}else e++}return!1},OD=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 n=$n[u];if(n){var s=t.indexOf(n,e);s!==-1&&(e=s+1)}if(t[e]==="!")return!0}else e++}return!1},Tn=function(e,u){if(typeof e!="string"||e==="")return!1;if(TD(e))return!0;var n=xD;return u&&u.strict===!1&&(n=OD),n(e)},ND=Tn,HD=K.posix.dirname,LD=Au.platform()==="win32",zt="/",ID=/\\/g,PD=/[\{\[].*[\}\]]$/,kD=/(^|[^\\])([\{\[]|\([^\)]+$)/,MD=/\\([\!\*\?\|\[\]\(\)\{\}])/g,WD=function(e,u){var n=Object.assign({flipBackslashes:!0},u);n.flipBackslashes&&LD&&e.indexOf(zt)<0&&(e=e.replace(ID,zt)),PD.test(e)&&(e+=zt),e+="a";do e=HD(e);while(ND(e)||kD.test(e));return e.replace(MD,"$1")},et={};(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(n=>n.type===u),t.exceedsLimit=(e,u,n=1,s)=>s===!1||!t.isInteger(e)||!t.isInteger(u)?!1:(Number(u)-Number(e))/Number(n)>=s,t.escapeNode=(e,u=0,n)=>{let s=e.nodes[u];s&&(n&&s.type===n||s.type==="open"||s.type==="close")&&s.escaped!==!0&&(s.value="\\"+s.value,s.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,n)=>(n.type==="text"&&u.push(n.value),n.type==="range"&&(n.type="text"),u),[]),t.flatten=(...e)=>{const u=[],n=s=>{for(let r=0;r<s.length;r++){let i=s[r];Array.isArray(i)?n(i):i!==void 0&&u.push(i)}return u};return n(e),u}})(et);const xn=et;var Yt=(t,e={})=>{let u=(n,s={})=>{let r=e.escapeInvalid&&xn.isInvalidBrace(s),i=n.invalid===!0&&e.escapeInvalid===!0,D="";if(n.value)return(r||i)&&xn.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let o of n.nodes)D+=u(o);return D};return u(t)};/*!
38
38
  * is-number <https://github.com/jonschlinkert/is-number>
39
39
  *
40
40
  * Copyright (c) 2014-present, Jon Schlinkert.
41
41
  * Released under the MIT License.
42
- */var WD=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1};/*!
42
+ */var GD=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1};/*!
43
43
  * to-regex-range <https://github.com/micromatch/to-regex-range>
44
44
  *
45
45
  * Copyright (c) 2015-present, Jon Schlinkert.
46
46
  * Released under the MIT License.
47
- */const $n=WD,oe=(t,e,u)=>{if($n(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if($n(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...u};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let s=String(n.relaxZeros),r=String(n.shorthand),i=String(n.capture),D=String(n.wrap),o=t+":"+e+"="+s+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 n.capture?`(${F})`:n.wrap===!1?F:`(?:${F})`}let f=Ln(t)||Ln(e),l={min:t,max:e,a,b:c},p=[],C=[];if(f&&(l.isPadded=f,l.maxLen=String(l.max).length),a<0){let F=c<0?Math.abs(c):1;C=Tn(F,Math.abs(a),l,n),a=l.a=0}return c>=0&&(p=Tn(a,c,l,n)),l.negatives=C,l.positives=p,l.result=GD(C,p),n.capture===!0?l.result=`(${l.result})`:n.wrap!==!1&&p.length+C.length>1&&(l.result=`(?:${l.result})`),oe.cache[o]=l,l.result};function GD(t,e,u){let n=Kt(t,e,"-",!1)||[],s=Kt(e,t,"",!1)||[],r=Kt(t,e,"-?",!0)||[];return n.concat(r).concat(s).join("|")}function jD(t,e){let u=1,n=1,s=On(t,u),r=new Set([e]);for(;t<=s&&s<=e;)r.add(s),u+=1,s=On(t,u);for(s=Nn(e+1,n)-1;t<s&&s<=e;)r.add(s),n+=1,s=Nn(e+1,n)-1;return r=[...r],r.sort(VD),r}function UD(t,e,u){if(t===e)return{pattern:t,count:[],digits:0};let n=KD(t,e),s=n.length,r="",i=0;for(let D=0;D<s;D++){let[o,a]=n[D];o===a?r+=o:o!=="0"||a!=="9"?r+=zD(o,a):i++}return i&&(r+=u.shorthand===!0?"\\d":"[0-9]"),{pattern:r,count:[i],digits:s}}function Tn(t,e,u,n){let s=jD(t,e),r=[],i=t,D;for(let o=0;o<s.length;o++){let a=s[o],c=UD(String(i),String(a),n),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+Hn(D.count),i=a+1;continue}u.isPadded&&(f=YD(a,u,n)),c.string=f+c.pattern+Hn(c.count),r.push(c),i=a+1,D=c}return r}function Kt(t,e,u,n,s){let r=[];for(let i of t){let{string:D}=i;!n&&!xn(e,"string",D)&&r.push(u+D),n&&xn(e,"string",D)&&r.push(u+D)}return r}function KD(t,e){let u=[];for(let n=0;n<t.length;n++)u.push([t[n],e[n]]);return u}function VD(t,e){return t>e?1:e>t?-1:0}function xn(t,e,u){return t.some(n=>n[e]===u)}function On(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function Nn(t,e){return t-t%Math.pow(10,e)}function Hn(t){let[e=0,u=""]=t;return u||e>1?`{${e+(u?","+u:"")}}`:""}function zD(t,e,u){return`[${t}${e-t===1?"":"-"}${e}]`}function Ln(t){return/^-?(0+)\d/.test(t)}function YD(t,e,u){if(!e.isPadded)return t;let n=Math.abs(e.maxLen-String(t).length),s=u.relaxZeros!==!1;switch(n){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:return s?`0{0,${n}}`:`0{${n}}`}}oe.cache={},oe.clearCache=()=>oe.cache={};var qD=oe;/*!
47
+ */const On=GD,oe=(t,e,u)=>{if(On(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(On(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...u};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let s=String(n.relaxZeros),r=String(n.shorthand),i=String(n.capture),D=String(n.wrap),o=t+":"+e+"="+s+r+i+D;if(oe.cache.hasOwnProperty(o))return oe.cache[o].result;let l=Math.min(t,e),f=Math.max(t,e);if(Math.abs(l-f)===1){let F=t+"|"+e;return n.capture?`(${F})`:n.wrap===!1?F:`(?:${F})`}let c=kn(t)||kn(e),a={min:t,max:e,a:l,b:f},E=[],C=[];if(c&&(a.isPadded=c,a.maxLen=String(a.max).length),l<0){let F=f<0?Math.abs(f):1;C=Nn(F,Math.abs(l),a,n),l=a.a=0}return f>=0&&(E=Nn(l,f,a,n)),a.negatives=C,a.positives=E,a.result=jD(C,E),n.capture===!0?a.result=`(${a.result})`:n.wrap!==!1&&E.length+C.length>1&&(a.result=`(?:${a.result})`),oe.cache[o]=a,a.result};function jD(t,e,u){let n=qt(t,e,"-",!1)||[],s=qt(e,t,"",!1)||[],r=qt(t,e,"-?",!0)||[];return n.concat(r).concat(s).join("|")}function UD(t,e){let u=1,n=1,s=Ln(t,u),r=new Set([e]);for(;t<=s&&s<=e;)r.add(s),u+=1,s=Ln(t,u);for(s=In(e+1,n)-1;t<s&&s<=e;)r.add(s),n+=1,s=In(e+1,n)-1;return r=[...r],r.sort(zD),r}function KD(t,e,u){if(t===e)return{pattern:t,count:[],digits:0};let n=VD(t,e),s=n.length,r="",i=0;for(let D=0;D<s;D++){let[o,l]=n[D];o===l?r+=o:o!=="0"||l!=="9"?r+=YD(o,l):i++}return i&&(r+=u.shorthand===!0?"\\d":"[0-9]"),{pattern:r,count:[i],digits:s}}function Nn(t,e,u,n){let s=UD(t,e),r=[],i=t,D;for(let o=0;o<s.length;o++){let l=s[o],f=KD(String(i),String(l),n),c="";if(!u.isPadded&&D&&D.pattern===f.pattern){D.count.length>1&&D.count.pop(),D.count.push(f.count[0]),D.string=D.pattern+Pn(D.count),i=l+1;continue}u.isPadded&&(c=qD(l,u,n)),f.string=c+f.pattern+Pn(f.count),r.push(f),i=l+1,D=f}return r}function qt(t,e,u,n,s){let r=[];for(let i of t){let{string:D}=i;!n&&!Hn(e,"string",D)&&r.push(u+D),n&&Hn(e,"string",D)&&r.push(u+D)}return r}function VD(t,e){let u=[];for(let n=0;n<t.length;n++)u.push([t[n],e[n]]);return u}function zD(t,e){return t>e?1:e>t?-1:0}function Hn(t,e,u){return t.some(n=>n[e]===u)}function Ln(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function In(t,e){return t-t%Math.pow(10,e)}function Pn(t){let[e=0,u=""]=t;return u||e>1?`{${e+(u?","+u:"")}}`:""}function YD(t,e,u){return`[${t}${e-t===1?"":"-"}${e}]`}function kn(t){return/^-?(0+)\d/.test(t)}function qD(t,e,u){if(!e.isPadded)return t;let n=Math.abs(e.maxLen-String(t).length),s=u.relaxZeros!==!1;switch(n){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:return s?`0{0,${n}}`:`0{${n}}`}}oe.cache={},oe.clearCache=()=>oe.cache={};var XD=oe;/*!
48
48
  * fill-range <https://github.com/jonschlinkert/fill-range>
49
49
  *
50
50
  * Copyright (c) 2014-present, Jon Schlinkert.
51
51
  * Licensed under the MIT License.
52
- */const XD=me,Pn=qD,In=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),QD=t=>e=>t===!0?Number(e):String(e),Vt=t=>typeof t=="number"||typeof t=="string"&&t!=="",be=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},ZD=(t,e,u)=>typeof t=="string"||typeof e=="string"?!0:u.stringify===!0,JD=(t,e,u)=>{if(e>0){let n=t[0]==="-"?"-":"";n&&(t=t.slice(1)),t=n+t.padStart(n?e-1:e,"0")}return u===!1?String(t):t},kn=(t,e)=>{let u=t[0]==="-"?"-":"";for(u&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return u?"-"+t:t},eo=(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?"":"?:",n="",s="",r;return t.positives.length&&(n=t.positives.join("|")),t.negatives.length&&(s=`-(${u}${t.negatives.join("|")})`),n&&s?r=`${n}|${s}`:r=n||s,e.wrap?`(${u}${r})`:r},Mn=(t,e,u,n)=>{if(u)return Pn(t,e,{wrap:!1,...n});let s=String.fromCharCode(t);if(t===e)return s;let r=String.fromCharCode(e);return`[${s}-${r}]`},Wn=(t,e,u)=>{if(Array.isArray(t)){let n=u.wrap===!0,s=u.capture?"":"?:";return n?`(${s}${t.join("|")})`:t.join("|")}return Pn(t,e,u)},Gn=(...t)=>new RangeError("Invalid range arguments: "+XD.inspect(...t)),jn=(t,e,u)=>{if(u.strictRanges===!0)throw Gn([t,e]);return[]},to=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},uo=(t,e,u=1,n={})=>{let s=Number(t),r=Number(e);if(!Number.isInteger(s)||!Number.isInteger(r)){if(n.strictRanges===!0)throw Gn([t,e]);return[]}s===0&&(s=0),r===0&&(r=0);let i=s>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&&ZD(t,e,n)===!1,p=n.transform||QD(l);if(n.toRegex&&u===1)return Mn(kn(t,f),kn(e,f),!0,n);let C={negatives:[],positives:[]},F=H=>C[H<0?"negatives":"positives"].push(Math.abs(H)),A=[],B=0;for(;i?s>=r:s<=r;)n.toRegex===!0&&u>1?F(s):A.push(JD(p(s,B),f,l)),s=i?s-u:s+u,B++;return n.toRegex===!0?u>1?eo(C,n):Wn(A,null,{wrap:!1,...n}):A},no=(t,e,u=1,n={})=>{if(!be(t)&&t.length>1||!be(e)&&e.length>1)return jn(t,e,n);let s=n.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(n.toRegex&&u===1)return Mn(o,a,!1,n);let c=[],f=0;for(;D?r>=i:r<=i;)c.push(s(r,f)),r=D?r-u:r+u,f++;return n.toRegex===!0?Wn(c,null,{wrap:!1,options:n}):c},Ze=(t,e,u,n={})=>{if(e==null&&Vt(t))return[t];if(!Vt(t)||!Vt(e))return jn(t,e,n);if(typeof u=="function")return Ze(t,e,1,{transform:u});if(In(u))return Ze(t,e,0,u);let s={...n};return s.capture===!0&&(s.wrap=!0),u=u||s.step||1,be(u)?be(t)&&be(e)?uo(t,e,u,s):no(t,e,Math.max(Math.abs(u),1),s):u!=null&&!In(u)?to(u,s):Ze(t,e,1,u)};var Un=Ze;const so=Un,Kn=Qe,ro=(t,e={})=>{let u=(n,s={})=>{let r=Kn.isInvalidBrace(s),i=n.invalid===!0&&e.escapeInvalid===!0,D=r===!0||i===!0,o=e.escapeInvalid===!0?"\\":"",a="";if(n.isOpen===!0||n.isClose===!0)return o+n.value;if(n.type==="open")return D?o+n.value:"(";if(n.type==="close")return D?o+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":D?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let c=Kn.reduce(n.nodes),f=so(...c,{...e,wrap:!1,toRegex:!0});if(f.length!==0)return c.length>1&&f.length>1?`(${f})`:f}if(n.nodes)for(let c of n.nodes)a+=u(c,n);return a};return u(t)};var io=ro;const Do=Un,Vn=Ut,pe=Qe,ae=(t="",e="",u=!1)=>{let n=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return u?pe.flatten(e).map(s=>`{${s}}`):e;for(let s of t)if(Array.isArray(s))for(let r of s)n.push(ae(r,e,u));else for(let r of e)u===!0&&typeof r=="string"&&(r=`{${r}}`),n.push(Array.isArray(r)?ae(s,r,u):s+r);return pe.flatten(n)},oo=(t,e={})=>{let u=e.rangeLimit===void 0?1e3:e.rangeLimit,n=(s,r={})=>{s.queue=[];let i=r,D=r.queue;for(;i.type!=="brace"&&i.type!=="root"&&i.parent;)i=i.parent,D=i.queue;if(s.invalid||s.dollar){D.push(ae(D.pop(),Vn(s,e)));return}if(s.type==="brace"&&s.invalid!==!0&&s.nodes.length===2){D.push(ae(D.pop(),["{}"]));return}if(s.nodes&&s.ranges>0){let f=pe.reduce(s.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=Do(...f,e);l.length===0&&(l=Vn(s,e)),D.push(ae(D.pop(),l)),s.nodes=[];return}let o=pe.encloseBrace(s),a=s.queue,c=s;for(;c.type!=="brace"&&c.type!=="root"&&c.parent;)c=c.parent,a=c.queue;for(let f=0;f<s.nodes.length;f++){let l=s.nodes[f];if(l.type==="comma"&&s.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&&n(l,s)}return a};return pe.flatten(n(t))};var ao=oo,lo={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:`
53
- `,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 co=Ut,{MAX_LENGTH:zn,CHAR_BACKSLASH:Yt,CHAR_BACKTICK:fo,CHAR_COMMA:ho,CHAR_DOT:Eo,CHAR_LEFT_PARENTHESES:po,CHAR_RIGHT_PARENTHESES:Co,CHAR_LEFT_CURLY_BRACE:Fo,CHAR_RIGHT_CURLY_BRACE:go,CHAR_LEFT_SQUARE_BRACKET:Yn,CHAR_RIGHT_SQUARE_BRACKET:qn,CHAR_DOUBLE_QUOTE:mo,CHAR_SINGLE_QUOTE:_o,CHAR_NO_BREAK_SPACE:Ao,CHAR_ZERO_WIDTH_NOBREAK_SPACE:yo}=lo,wo=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let u=e||{},n=typeof u.maxLength=="number"?Math.min(zn,u.maxLength):zn;if(t.length>n)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${n})`);let s={type:"root",input:t,nodes:[]},r=[s],i=s,D=s,o=0,a=t.length,c=0,f=0,l;const p=()=>t[c++],C=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(C({type:"bos"});c<a;)if(i=r[r.length-1],l=p(),!(l===yo||l===Ao)){if(l===Yt){C({type:"text",value:(e.keepEscaping?l:"")+p()});continue}if(l===qn){C({type:"text",value:"\\"+l});continue}if(l===Yn){o++;let F;for(;c<a&&(F=p());){if(l+=F,F===Yn){o++;continue}if(F===Yt){l+=p();continue}if(F===qn&&(o--,o===0))break}C({type:"text",value:l});continue}if(l===po){i=C({type:"paren",nodes:[]}),r.push(i),C({type:"text",value:l});continue}if(l===Co){if(i.type!=="paren"){C({type:"text",value:l});continue}i=r.pop(),C({type:"text",value:l}),i=r[r.length-1];continue}if(l===mo||l===_o||l===fo){let F=l,A;for(e.keepQuotes!==!0&&(l="");c<a&&(A=p());){if(A===Yt){l+=A+p();continue}if(A===F){e.keepQuotes===!0&&(l+=A);break}l+=A}C({type:"text",value:l});continue}if(l===Fo){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=C(A),r.push(i),C({type:"open",value:l});continue}if(l===go){if(i.type!=="brace"){C({type:"text",value:l});continue}let F="close";i=r.pop(),i.close=!0,C({type:F,value:l}),f--,i=r[r.length-1];continue}if(l===ho&&f>0){if(i.ranges>0){i.ranges=0;let F=i.nodes.shift();i.nodes=[F,{type:"text",value:co(i)}]}C({type:"comma",value:l}),i.commas++;continue}if(l===Eo&&f>0&&i.commas===0){let F=i.nodes;if(f===0||F.length===0){C({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}C({type:"dot",value:l});continue}C({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 C({type:"eos"}),s};var Ro=wo;const Xn=Ut,bo=io,vo=ao,Bo=Ro,Y=(t,e={})=>{let u=[];if(Array.isArray(t))for(let n of t){let s=Y.create(n,e);Array.isArray(s)?u.push(...s):u.push(s)}else u=[].concat(Y.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(u=[...new Set(u)]),u};Y.parse=(t,e={})=>Bo(t,e),Y.stringify=(t,e={})=>Xn(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=vo(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 So=Y,$o=["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"],To=$o;const xo=K,Oo=To,No=new Set(Oo);var Ho=t=>No.has(xo.extname(t).slice(1).toLowerCase()),Je={};(function(t){const{sep:e}=K,{platform:u}=process,n=gu;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=s=>s,t.isWindows=u==="win32",t.isMacos=u==="darwin",t.isLinux=u==="linux",t.isIBMi=n.type()==="OS400"})(Je);const ue=ie,P=K,{promisify:ve}=me,Lo=Ho,{isWindows:Po,isLinux:Io,EMPTY_FN:ko,EMPTY_STR:Mo,KEY_LISTENERS:Ce,KEY_ERR:qt,KEY_RAW:Be,HANDLER_KEYS:Wo,EV_CHANGE:et,EV_ADD:tt,EV_ADD_DIR:Go,EV_ERROR:Qn,STR_DATA:jo,STR_END:Uo,BRACE_START:Ko,STAR:Vo}=Je,zo="watch",Yo=ve(ue.open),Zn=ve(ue.stat),qo=ve(ue.lstat),Xo=ve(ue.close),Xt=ve(ue.realpath),Qo={lstat:qo,stat:Zn},Qt=(t,e)=>{t instanceof Set?t.forEach(e):e(t)},Se=(t,e,u)=>{let n=t[e];n instanceof Set||(t[e]=n=new Set([n])),n.add(u)},Zo=t=>e=>{const u=t[e];u instanceof Set?u.clear():delete t[e]},$e=(t,e,u)=>{const n=t[e];n instanceof Set?n.delete(u):n===u&&delete t[e]},Jn=t=>t instanceof Set?t.size===0:!t,ut=new Map;function es(t,e,u,n,s){const r=(i,D)=>{u(t),s(i,D,{watchedPath:t}),D&&t!==D&&nt(P.resolve(t,D),Ce,P.join(t,D))};try{return ue.watch(t,e,r)}catch(i){n(i)}}const nt=(t,e,u,n,s)=>{const r=ut.get(t);r&&Qt(r[e],i=>{i(u,n,s)})},Jo=(t,e,u,n)=>{const{listener:s,errHandler:r,rawEmitter:i}=n;let D=ut.get(e),o;if(!u.persistent)return o=es(t,u,s,r,i),o.close.bind(o);if(D)Se(D,Ce,s),Se(D,qt,r),Se(D,Be,i);else{if(o=es(t,u,nt.bind(null,e,Ce),r,nt.bind(null,e,Be)),!o)return;o.on(Qn,async a=>{const c=nt.bind(null,e,qt);if(D.watcherUnusable=!0,Po&&a.code==="EPERM")try{const f=await Yo(t,"r");await Xo(f),c(a)}catch{}else c(a)}),D={listeners:s,errHandlers:r,rawEmitters:i,watcher:o},ut.set(e,D)}return()=>{$e(D,Ce,s),$e(D,qt,r),$e(D,Be,i),Jn(D.listeners)&&(D.watcher.close(),ut.delete(e),Wo.forEach(Zo(D)),D.watcher=void 0,Object.freeze(D))}},Zt=new Map,ea=(t,e,u,n)=>{const{listener:s,rawEmitter:r}=n;let i=Zt.get(e);const D=i&&i.options;return D&&(D.persistent<u.persistent||D.interval>u.interval)&&(i.listeners,i.rawEmitters,ue.unwatchFile(e),i=void 0),i?(Se(i,Ce,s),Se(i,Be,r)):(i={listeners:s,rawEmitters:r,options:u,watcher:ue.watchFile(e,u,(o,a)=>{Qt(i.rawEmitters,f=>{f(et,e,{curr:o,prev:a})});const c=o.mtimeMs;(o.size!==a.size||c>a.mtimeMs||c===0)&&Qt(i.listeners,f=>f(t,o))})},Zt.set(e,i)),()=>{$e(i,Ce,s),$e(i,Be,r),Jn(i.listeners)&&(Zt.delete(e),ue.unwatchFile(e),i.options=i.watcher=void 0,Object.freeze(i))}};let ta=class{constructor(e){this.fsw=e,this._boundHandleError=u=>e._handleError(u)}_watchWithNodeFs(e,u){const n=this.fsw.options,s=P.dirname(e),r=P.basename(e);this.fsw._getWatchedDir(s).add(r);const D=P.resolve(e),o={persistent:n.persistent};u||(u=ko);let a;return n.usePolling?(o.interval=n.enableBinaryInterval&&Lo(r)?n.binaryInterval:n.interval,a=ea(e,D,o,{listener:u,rawEmitter:this.fsw._emitRaw})):a=Jo(e,D,o,{listener:u,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw}),a}_handleFile(e,u,n){if(this.fsw.closed)return;const s=P.dirname(e),r=P.basename(e),i=this.fsw._getWatchedDir(s);let D=u;if(i.has(r))return;const o=async(c,f)=>{if(this.fsw._throttle(zo,e,5)){if(!f||f.mtimeMs===0)try{const l=await Zn(e);if(this.fsw.closed)return;const p=l.atimeMs,C=l.mtimeMs;(!p||p<=C||C!==D.mtimeMs)&&this.fsw._emit(et,e,l),Io&&D.ino!==l.ino?(this.fsw._closeFile(c),D=l,this.fsw._addPathCloser(c,this._watchWithNodeFs(e,o))):D=l}catch{this.fsw._remove(s,r)}else if(i.has(r)){const l=f.atimeMs,p=f.mtimeMs;(!l||l<=p||p!==D.mtimeMs)&&this.fsw._emit(et,e,f),D=f}}},a=this._watchWithNodeFs(e,o);if(!(n&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(tt,e,0))return;this.fsw._emit(tt,e,u)}return a}async _handleSymlink(e,u,n,s){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 Xt(n)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(i.has(s)?this.fsw._symlinkPaths.get(r)!==D&&(this.fsw._symlinkPaths.set(r,D),this.fsw._emit(et,n,e.stats)):(i.add(s),this.fsw._symlinkPaths.set(r,D),this.fsw._emit(tt,n,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(r))return!0;this.fsw._symlinkPaths.set(r,!0)}_handleRead(e,u,n,s,r,i,D){if(e=P.join(e,Mo),!n.hasGlob&&(D=this.fsw._throttle("readdir",e,1e3),!D))return;const o=this.fsw._getWatchedDir(n.path),a=new Set;let c=this.fsw._readdirp(e,{fileFilter:f=>n.filterPath(f),directoryFilter:f=>n.filterDir(f),depth:0}).on(jo,async f=>{if(this.fsw.closed){c=void 0;return}const l=f.path;let p=P.join(e,l);if(a.add(l),!(f.stats.isSymbolicLink()&&await this._handleSymlink(f,e,p,l))){if(this.fsw.closed){c=void 0;return}(l===s||!s&&!o.has(l))&&(this.fsw._incrReadyCount(),p=P.join(r,P.relative(r,p)),this._addToNodeFs(p,u,n,i+1))}}).on(Qn,this._boundHandleError);return new Promise(f=>c.once(Uo,()=>{if(this.fsw.closed){c=void 0;return}const l=D?D.clear():!1;f(),o.getChildren().filter(p=>p!==e&&!a.has(p)&&(!n.hasGlob||n.filterPath({fullPath:P.resolve(e,p)}))).forEach(p=>{this.fsw._remove(e,p)}),c=void 0,l&&this._handleRead(e,!1,n,s,r,i,D)}))}async _handleDir(e,u,n,s,r,i,D){const o=this.fsw._getWatchedDir(P.dirname(e)),a=o.has(P.basename(e));!(n&&this.fsw.options.ignoreInitial)&&!r&&!a&&(!i.hasGlob||i.globFilter(e))&&this.fsw._emit(Go,e,u),o.add(P.basename(e)),this.fsw._getWatchedDir(e);let c,f;const l=this.fsw.options.depth;if((l==null||s<=l)&&!this.fsw._symlinkPaths.has(D)){if(!r&&(await this._handleRead(e,n,i,r,e,s,c),this.fsw.closed))return;f=this._watchWithNodeFs(e,(p,C)=>{C&&C.mtimeMs===0||this._handleRead(p,!1,i,r,e,s,c)})}return f}async _addToNodeFs(e,u,n,s,r){const i=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return i(),!1;const D=this.fsw._getWatchHelpers(e,s);!D.hasGlob&&n&&(D.hasGlob=n.hasGlob,D.globFilter=n.globFilter,D.filterPath=o=>n.filterPath(o),D.filterDir=o=>n.filterDir(o));try{const o=await Qo[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(Vo)&&!e.includes(Ko);let c;if(o.isDirectory()){const f=P.resolve(e),l=a?await Xt(e):e;if(this.fsw.closed||(c=await this._handleDir(D.watchPath,o,u,s,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 Xt(e):e;if(this.fsw.closed)return;const l=P.dirname(D.watchPath);if(this.fsw._getWatchedDir(l).add(D.watchPath),this.fsw._emit(tt,D.watchPath,o),c=await this._handleDir(l,o,u,s,e,D,f),this.fsw.closed)return;f!==void 0&&this.fsw._symlinkPaths.set(P.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 ua=ta,Jt={exports:{}};const eu=ie,I=K,{promisify:tu}=me;let Fe;try{Fe=at("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:uu,EV_CHANGE:na,EV_ADD_DIR:ts,EV_UNLINK:st,EV_ERROR:sa,STR_DATA:ra,STR_END:ia,FSEVENT_CREATED:Da,FSEVENT_MODIFIED:oa,FSEVENT_DELETED:aa,FSEVENT_MOVED:la,FSEVENT_UNKNOWN:ca,FSEVENT_TYPE_FILE:fa,FSEVENT_TYPE_DIRECTORY:Te,FSEVENT_TYPE_SYMLINK:us,ROOT_GLOBSTAR:ns,DIR_SUFFIX:ha,DOT_SLASH:ss,FUNCTION_TYPE:nu,EMPTY_FN:da,IDENTITY_FN:Ea}=Je,pa=t=>isNaN(t)?{}:{depth:t},su=tu(eu.stat),Ca=tu(eu.lstat),rs=tu(eu.realpath),Fa={stat:su,lstat:Ca},le=new Map,ga=10,ma=new Set([69888,70400,71424,72704,73472,131328,131840,262912]),_a=(t,e)=>({stop:Fe.watch(t,e)});function Aa(t,e,u,n){let s=I.extname(e)?I.dirname(e):e;const r=I.dirname(s);let i=le.get(s);ya(r)&&(s=r);const D=I.resolve(t),o=D!==e,a=(f,l,p)=>{o&&(f=f.replace(e,D)),(f===D||!f.indexOf(D+I.sep))&&u(f,l,p)};let c=!1;for(const f of le.keys())if(e.indexOf(I.resolve(f)+I.sep)===0){s=f,i=le.get(s),c=!0;break}return i||c?i.listeners.add(a):(i={listeners:new Set([a]),rawEmitter:n,watcher:_a(s,(f,l)=>{if(!i.listeners.size)return;const p=Fe.getInfo(f,l);i.listeners.forEach(C=>{C(f,l,p)}),i.rawEmitter(p.event,f,p)})},le.set(s,i)),()=>{const f=i.listeners;if(f.delete(a),!f.size&&(le.delete(s),i.watcher))return i.watcher.stop().then(()=>{i.rawEmitter=i.watcher=void 0,Object.freeze(i)})}}const ya=t=>{let e=0;for(const u of le.keys())if(u.indexOf(t)===0&&(e++,e>=ga))return!0;return!1},wa=()=>Fe&&le.size<128,ru=(t,e)=>{let u=0;for(;!t.indexOf(e)&&(t=I.dirname(t))!==e;)u++;return u},is=(t,e)=>t.type===Te&&e.isDirectory()||t.type===us&&e.isSymbolicLink()||t.type===fa&&e.isFile();let Ra=class{constructor(e){this.fsw=e}checkIgnored(e,u){const n=this.fsw._ignoredPaths;if(this.fsw._isIgnored(e,u))return n.add(e),u&&u.isDirectory()&&n.add(e+ns),!0;n.delete(e),n.delete(e+ns)}addOrChange(e,u,n,s,r,i,D,o){const a=r.has(i)?na:uu;this.handleEvent(a,e,u,n,s,r,i,D,o)}async checkExists(e,u,n,s,r,i,D,o){try{const a=await su(e);if(this.fsw.closed)return;is(D,a)?this.addOrChange(e,u,n,s,r,i,D,o):this.handleEvent(st,e,u,n,s,r,i,D,o)}catch(a){a.code==="EACCES"?this.addOrChange(e,u,n,s,r,i,D,o):this.handleEvent(st,e,u,n,s,r,i,D,o)}}handleEvent(e,u,n,s,r,i,D,o,a){if(!(this.fsw.closed||this.checkIgnored(u)))if(e===st){const c=o.type===Te;(c||i.has(D))&&this.fsw._remove(r,D,c)}else{if(e===uu){if(o.type===Te&&this.fsw._getWatchedDir(u),o.type===us&&a.followSymlinks){const f=a.depth===void 0?void 0:ru(n,s)+1;return this._addToFsEvents(u,!1,!0,f)}this.fsw._getWatchedDir(r).add(D)}const c=o.type===Te?e+ha:e;this.fsw._emit(c,u),c===ts&&this._addToFsEvents(u,!1,!0)}}_watchWithFsEvents(e,u,n,s){if(this.fsw.closed||this.fsw._isIgnored(e))return;const r=this.fsw.options,D=Aa(e,u,async(o,a,c)=>{if(this.fsw.closed||r.depth!==void 0&&ru(o,u)>r.depth)return;const f=n(I.join(e,I.relative(e,o)));if(s&&!s(f))return;const l=I.dirname(f),p=I.basename(f),C=this.fsw._getWatchedDir(c.type===Te?f:l);if(ma.has(a)||c.event===ca)if(typeof r.ignored===nu){let F;try{F=await su(f)}catch{}if(this.fsw.closed||this.checkIgnored(f,F))return;is(c,F)?this.addOrChange(f,o,u,l,C,p,c,r):this.handleEvent(st,f,o,u,l,C,p,c,r)}else this.checkExists(f,o,u,l,C,p,c,r);else switch(c.event){case Da:case oa:return this.addOrChange(f,o,u,l,C,p,c,r);case aa:case la:return this.checkExists(f,o,u,l,C,p,c,r)}},this.fsw._emitRaw);return this.fsw._emitReady(),D}async _handleFsEventsSymlink(e,u,n,s){if(!(this.fsw.closed||this.fsw._symlinkPaths.has(u))){this.fsw._symlinkPaths.set(u,!0),this.fsw._incrReadyCount();try{const r=await rs(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!==ss?D=i.replace(r,e):i!==ss&&(D=I.join(e,i)),n(D)},!1,s)}catch(r){if(this.fsw._handleError(r))return this.fsw._emitReady()}}}emitAdd(e,u,n,s,r){const i=n(e),D=u.isDirectory(),o=this.fsw._getWatchedDir(I.dirname(i)),a=I.basename(i);D&&this.fsw._getWatchedDir(i),!o.has(a)&&(o.add(a),(!s.ignoreInitial||r===!0)&&this.fsw._emit(D?ts:uu,i,u))}initWatch(e,u,n,s){if(this.fsw.closed)return;const r=this._watchWithFsEvents(n.watchPath,I.resolve(e||n.watchPath),s,n.globFilter);this.fsw._addPathCloser(u,r)}async _addToFsEvents(e,u,n,s){if(this.fsw.closed)return;const r=this.fsw.options,i=typeof u===nu?u:Ea,D=this.fsw._getWatchHelpers(e);try{const o=await Fa[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,n),s&&s>r.depth)return;this.fsw._readdirp(D.watchPath,{fileFilter:a=>D.filterPath(a),directoryFilter:a=>D.filterDir(a),...pa(r.depth-(s||0))}).on(ra,a=>{if(this.fsw.closed||a.stats.isDirectory()&&!D.filterPath(a))return;const c=I.join(D.watchPath,a.path),{fullPath:f}=a;if(D.followSymlinks&&a.stats.isSymbolicLink()){const l=r.depth===void 0?void 0:ru(c,I.resolve(D.watchPath))+1;this._handleFsEventsSymlink(c,f,i,l)}else this.emitAdd(c,a.stats,i,r,n)}).on(sa,da).on(ia,()=>{this.fsw._emitReady()})}else this.emitAdd(D.watchPath,o,i,r,n),this.fsw._emitReady()}catch(o){(!o||this.fsw._handleError(o))&&(this.fsw._emitReady(),this.fsw._emitReady())}if(r.persistent&&n!==!0)if(typeof u===nu)this.initWatch(void 0,e,D,i);else{let o;try{o=await rs(D.watchPath)}catch{}this.initWatch(o,e,D,i)}}};Jt.exports=Ra,Jt.exports.canUse=wa;var ba=Jt.exports;const{EventEmitter:va}=Os,iu=ie,v=K,{promisify:Ds}=me,Ba=AD,Du=BD.default,Sa=MD,ou=Bn,$a=So,Ta=yn,xa=ua,os=ba,{EV_ALL:au,EV_READY:Oa,EV_ADD:rt,EV_CHANGE:xe,EV_UNLINK:as,EV_ADD_DIR:Na,EV_UNLINK_DIR:Ha,EV_RAW:La,EV_ERROR:lu,STR_CLOSE:Pa,STR_END:Ia,BACK_SLASH_RE:ka,DOUBLE_SLASH_RE:ls,SLASH_OR_BACK_SLASH_RE:Ma,DOT_RE:Wa,REPLACER_RE:Ga,SLASH:cu,SLASH_SLASH:ja,BRACE_START:Ua,BANG:fu,ONE_DOT:cs,TWO_DOTS:Ka,GLOBSTAR:Va,SLASH_GLOBSTAR:hu,ANYMATCH_OPTS:du,STRING_TYPE:Eu,FUNCTION_TYPE:za,EMPTY_STR:pu,EMPTY_FN:Ya,isWindows:qa,isMacos:Xa,isIBMi:Qa}=Je,Za=Ds(iu.stat),Ja=Ds(iu.readdir),Cu=(t=[])=>Array.isArray(t)?t:[t],fs=(t,e=[])=>(t.forEach(u=>{Array.isArray(u)?fs(u,e):e.push(u)}),e),hs=t=>{const e=fs(Cu(t));if(!e.every(u=>typeof u===Eu))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(Es)},ds=t=>{let e=t.replace(ka,cu),u=!1;for(e.startsWith(ja)&&(u=!0);e.match(ls);)e=e.replace(ls,cu);return u&&(e=cu+e),e},Es=t=>ds(v.normalize(ds(t))),ps=(t=pu)=>e=>typeof e!==Eu?e:Es(v.isAbsolute(e)?e:v.join(t,e)),el=(t,e)=>v.isAbsolute(t)?t:t.startsWith(fu)?fu+v.join(e,t.slice(1)):v.join(e,t),q=(t,e)=>t[e]===void 0;class tl{constructor(e,u){this.path=e,this._removeWatcher=u,this.items=new Set}add(e){const{items:u}=this;u&&e!==cs&&e!==Ka&&u.add(e)}async remove(e){const{items:u}=this;if(!u||(u.delete(e),u.size>0))return;const n=this.path;try{await Ja(n)}catch{this._removeWatcher&&this._removeWatcher(v.dirname(n),v.basename(n))}}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 ul="stat",nl="lstat";class sl{constructor(e,u,n,s){this.fsw=s,this.path=e=e.replace(Ga,pu),this.watchPath=u,this.fullWatchPath=v.resolve(u),this.hasGlob=u!==e,e===pu&&(this.hasGlob=!1),this.globSymlink=this.hasGlob&&n?void 0:!1,this.globFilter=this.hasGlob?Du(e,void 0,du):!1,this.dirParts=this.getDirParts(e),this.dirParts.forEach(r=>{r.length>1&&r.pop()}),this.followSymlinks=n,this.statMethod=n?ul:nl}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 n=this.entryPath(e);return(this.hasGlob&&typeof this.globFilter===za?this.globFilter(n):!0)&&this.fsw._isntIgnored(n,u)&&this.fsw._hasReadPermissions(u)}getDirParts(e){if(!this.hasGlob)return[];const u=[];return(e.includes(Ua)?$a.expand(e):[e]).forEach(s=>{u.push(v.relative(this.watchPath,s).split(Ma))}),u}filterDir(e){if(this.hasGlob){const u=this.getDirParts(this.checkGlobSymlink(e));let n=!1;this.unmatchedGlob=!this.dirParts.some(s=>s.every((r,i)=>(r===Va&&(n=!0),n||!u[0][i]||Du(r,u[0][i],du))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(e),e.stats)}}class rl extends va{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),os.canUse()||(u.useFsEvents=!1),q(u,"usePolling")&&!u.useFsEvents&&(u.usePolling=Xa),Qa&&(u.usePolling=!0);const s=process.env.CHOKIDAR_USEPOLLING;if(s!==void 0){const o=s.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=Cu(u.ignored));let D=0;this._emitReady=()=>{D++,D>=this._readyCount&&(this._emitReady=Ya,this._readyEmitted=!0,process.nextTick(()=>this.emit(Oa)))},this._emitRaw=(...o)=>this.emit(La,...o),this._readyEmitted=!1,this.options=u,u.useFsEvents?this._fsEventsHandler=new os(this):this._nodeFsHandler=new xa(this),Object.freeze(u)}add(e,u,n){const{cwd:s,disableGlobbing:r}=this.options;this.closed=!1;let i=hs(e);return s&&(i=i.map(D=>{const o=el(D,s);return r||!ou(D)?o:Ta(o)})),i=i.filter(D=>D.startsWith(fu)?(this._ignoredPaths.add(D.slice(1)),!1):(this._ignoredPaths.delete(D),this._ignoredPaths.delete(D+hu),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,!n,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=hs(e),{cwd:n}=this.options;return u.forEach(s=>{!v.isAbsolute(s)&&!this._closers.has(s)&&(n&&(s=v.join(n,s)),s=v.resolve(s)),this._closePath(s),this._ignoredPaths.add(s),this._watched.has(s)&&this._ignoredPaths.add(s+hu),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(n=>{const s=n();s instanceof Promise&&e.push(s)})),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,n)=>{const s=this.options.cwd?v.relative(this.options.cwd,n):n;e[s||cs]=u.getChildren().sort()}),e}emitWithAll(e,u){this.emit(...u),e!==lu&&this.emit(au,...u)}async _emit(e,u,n,s,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(n,s,r):s!==void 0?D.push(n,s):n!==void 0&&D.push(n);const o=i.awaitWriteFinish;let a;if(o&&(a=this._pendingWrites.get(u)))return a.lastChange=new Date,this;if(i.atomic){if(e===as)return this._pendingUnlinks.set(u,D),setTimeout(()=>{this._pendingUnlinks.forEach((c,f)=>{this.emit(...c),this.emit(au,...c),this._pendingUnlinks.delete(f)})},typeof i.atomic=="number"?i.atomic:100),this;e===rt&&this._pendingUnlinks.has(u)&&(e=D[0]=xe,this._pendingUnlinks.delete(u))}if(o&&(e===rt||e===xe)&&this._readyEmitted){const c=(f,l)=>{f?(e=D[0]=lu,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===xe&&!this._throttle(xe,u,50))return this;if(i.alwaysStat&&n===void 0&&(e===rt||e===Na||e===xe)){const c=i.cwd?v.join(i.cwd,u):u;let f;try{f=await Za(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(lu,e),e||this.closed}_throttle(e,u,n){this._throttled.has(e)||this._throttled.set(e,new Map);const s=this._throttled.get(e),r=s.get(u);if(r)return r.count++,!1;let i;const D=()=>{const a=s.get(u),c=a?a.count:0;return s.delete(u),clearTimeout(i),a&&clearTimeout(a.timeoutObject),c};i=setTimeout(D,n);const o={timeoutObject:i,clear:D,count:0};return s.set(u,o),o}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,u,n,s){let r,i=e;this.options.cwd&&!v.isAbsolute(e)&&(i=v.join(this.options.cwd,e));const D=new Date,o=a=>{iu.stat(i,(c,f)=>{if(c||!this._pendingWrites.has(e)){c&&c.code!=="ENOENT"&&s(c);return}const l=Number(new Date);a&&f.size!==a.size&&(this._pendingWrites.get(e).lastChange=l);const p=this._pendingWrites.get(e);l-p.lastChange>=u?(this._pendingWrites.delete(e),s(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),n)}),r=setTimeout(o,this.options.awaitWriteFinish.pollInterval))}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(e,u){if(this.options.atomic&&Wa.test(e))return!0;if(!this._userIgnored){const{cwd:n}=this.options,s=this.options.ignored,r=s&&s.map(ps(n)),i=Cu(r).filter(o=>typeof o===Eu&&!ou(o)).map(o=>o+hu),D=this._getGlobIgnored().map(ps(n)).concat(r,i);this._userIgnored=Du(D,void 0,du)}return this._userIgnored([e,u])}_isntIgnored(e,u){return!this._isIgnored(e,u)}_getWatchHelpers(e,u){const n=u||this.options.disableGlobbing||!ou(e)?e:Sa(e),s=this.options.followSymlinks;return new sl(e,n,s,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 tl(u,this._boundRemove)),this._watched.get(u)}_hasReadPermissions(e){if(this.options.ignorePermissionErrors)return!0;const n=(e&&Number.parseInt(e.mode,10))&511;return!!(4&Number.parseInt(n.toString(8)[0],10))}_remove(e,u,n){const s=v.join(e,u),r=v.resolve(s);if(n=n!=null?n:this._watched.has(s)||this._watched.has(r),!this._throttle("remove",s,100))return;!n&&!this.options.useFsEvents&&this._watched.size===1&&this.add(e,u,!0),this._getWatchedDir(s).getChildren().forEach(l=>this._remove(s,l));const o=this._getWatchedDir(e),a=o.has(u);o.remove(u),this._symlinkPaths.has(r)&&this._symlinkPaths.delete(r);let c=s;if(this.options.cwd&&(c=v.relative(this.options.cwd,s)),this.options.awaitWriteFinish&&this._pendingWrites.has(c)&&this._pendingWrites.get(c).cancelWait()===rt)return;this._watched.delete(s),this._watched.delete(r);const f=n?Ha:as;a&&!this._isIgnored(s)&&this._emit(f,s),this.options.useFsEvents||this._closePath(s)}_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(n=>n()),this._closers.delete(e))}_addPathCloser(e,u){if(!u)return;let n=this._closers.get(e);n||(n=[],this._closers.set(e,n)),n.push(u)}_readdirp(e,u){if(this.closed)return;const n={type:au,alwaysStat:!0,lstat:!0,...u};let s=Ba(e,n);return this._streams.add(s),s.once(Pa,()=>{s=void 0}),s.once(Ia,()=>{s&&(this._streams.delete(s),s=void 0)}),s}}const il=(t,e)=>{const u=new rl(e);return u.add(t),u};var Dl=il;const it=(t=!0)=>{let e=!1;return u=>{if(e||u==="unknown-flag")return!0;if(u==="argument")return e=!0,t}},Cs=(t,e=process.argv.slice(2))=>(_u(t,e,{ignore:it()}),e);let ce=!0;const ge=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let Oe=0;if(ge.process&&ge.process.env&&ge.process.stdout){const{FORCE_COLOR:t,NODE_DISABLE_COLORS:e,NO_COLOR:u,TERM:n,COLORTERM:s}=ge.process.env;e||u||t==="0"?ce=!1:t==="1"||t==="2"||t==="3"?ce=!0:n==="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"||s&&(s==="truecolor"||s==="24bit")?Oe=3:n&&(n.endsWith("-256color")||n.endsWith("256"))?Oe=2:Oe=1)}let Fs={enabled:ce,supportLevel:Oe};function gs(t,e,u=1){const n=`\x1B[${t}m`,s=`\x1B[${e}m`,r=new RegExp(`\\x1b\\[${e}m`,"g");return i=>Fs.enabled&&Fs.supportLevel>=u?n+(""+i).replace(r,n)+s:""+i}const ol=gs(90,39),al=gs(96,39),ll=()=>new Date().toLocaleTimeString(),Fu=(...t)=>console.log(ol(ll()),al("[tsx]"),...t),cl="\x1Bc";function fl(t,e){let u;return()=>{u&&clearTimeout(u),u=setTimeout(()=>t(),e)}}const hl=async t=>{const e=new Promise(u=>{t.on("exit",u)});t.kill(),await e},ms={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"}},dl=Zr({name:"watch",parameters:["<script path>"],flags:ms,help:{description:"Run the script and watch for changes"},ignoreArgv:it(!1)},t=>{const e=Cs(ms,process.argv.slice(3)),u={noCache:t.flags.noCache,tsconfigPath:t.flags.tsconfig,clearScreen:t.flags.clearScreen,ignore:t.flags.ignore,ipc:!0};let n;const s=()=>{const c=nn(e,u);return c.on("message",f=>{if(f&&typeof f=="object"&&"type"in f&&f.type==="dependency"&&"path"in f&&typeof f.path=="string"){const l=f.path.startsWith("file:")?Bs(f.path):f.path;K.isAbsolute(l)&&a.add(l)}}),c};let r=!1;const i=fl(async()=>{if(r){Fu("forcing restart"),n.kill("SIGKILL");return}n&&(n.exitCode===null?(Fu("restarting"),r=!0,await hl(n),r=!1):Fu("rerunning"),u.clearScreen&&process.stdout.write(cl)),n=s()},100);i();function D(c){process.exit(128+xs.signals[c])}function o(c){n&&n.exitCode===null?(n.on("close",()=>D(c)),n.kill(c)):D(c)}process.once("SIGINT",o),process.once("SIGTERM",o);const a=Dl(t._,{cwd:process.cwd(),ignoreInitial:!0,ignored:["**/.*/**","**/.*","**/{node_modules,bower_components,vendor}/**",...u.ignore],ignorePermissionErrors:!0}).on("all",i);process.stdin.on("data",i)}),El=t=>{let e;t.on("message",s=>{s&&s.type==="kill"&&e&&e(s.signal)});const u=()=>{const s=new Promise(r=>{setTimeout(()=>r(void 0),30),e=r});return s.then(()=>{e=void 0},()=>{}),s},n=async s=>{await u()!==s&&(t.kill(s),await u()!==s&&t.kill("SIGKILL"))};process.on("SIGINT",n),process.on("SIGTERM",n)},_s={noCache:{type:Boolean,description:"Disable caching"},tsconfig:{type:String,description:"Custom tsconfig.json path"}};Wu({name:"tsx",parameters:["[script path]"],commands:[dl],flags:{..._s,version:{type:Boolean,alias:"v",description:"Show version"},help:{type:Boolean,alias:"h",description:"Show help"}},help:!1,ignoreArgv:it()},t=>{t.flags.version?process.stdout.write(`tsx v${bs}
52
+ */const QD=me,Mn=XD,Wn=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),ZD=t=>e=>t===!0?Number(e):String(e),Xt=t=>typeof t=="number"||typeof t=="string"&&t!=="",be=t=>Number.isInteger(+t),Qt=t=>{let e=`${t}`,u=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++u]==="0";);return u>0},JD=(t,e,u)=>typeof t=="string"||typeof e=="string"?!0:u.stringify===!0,eo=(t,e,u)=>{if(e>0){let n=t[0]==="-"?"-":"";n&&(t=t.slice(1)),t=n+t.padStart(n?e-1:e,"0")}return u===!1?String(t):t},Gn=(t,e)=>{let u=t[0]==="-"?"-":"";for(u&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return u?"-"+t:t},to=(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?"":"?:",n="",s="",r;return t.positives.length&&(n=t.positives.join("|")),t.negatives.length&&(s=`-(${u}${t.negatives.join("|")})`),n&&s?r=`${n}|${s}`:r=n||s,e.wrap?`(${u}${r})`:r},jn=(t,e,u,n)=>{if(u)return Mn(t,e,{wrap:!1,...n});let s=String.fromCharCode(t);if(t===e)return s;let r=String.fromCharCode(e);return`[${s}-${r}]`},Un=(t,e,u)=>{if(Array.isArray(t)){let n=u.wrap===!0,s=u.capture?"":"?:";return n?`(${s}${t.join("|")})`:t.join("|")}return Mn(t,e,u)},Kn=(...t)=>new RangeError("Invalid range arguments: "+QD.inspect(...t)),Vn=(t,e,u)=>{if(u.strictRanges===!0)throw Kn([t,e]);return[]},uo=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},no=(t,e,u=1,n={})=>{let s=Number(t),r=Number(e);if(!Number.isInteger(s)||!Number.isInteger(r)){if(n.strictRanges===!0)throw Kn([t,e]);return[]}s===0&&(s=0),r===0&&(r=0);let i=s>r,D=String(t),o=String(e),l=String(u);u=Math.max(Math.abs(u),1);let f=Qt(D)||Qt(o)||Qt(l),c=f?Math.max(D.length,o.length,l.length):0,a=f===!1&&JD(t,e,n)===!1,E=n.transform||ZD(a);if(n.toRegex&&u===1)return jn(Gn(t,c),Gn(e,c),!0,n);let C={negatives:[],positives:[]},F=H=>C[H<0?"negatives":"positives"].push(Math.abs(H)),A=[],B=0;for(;i?s>=r:s<=r;)n.toRegex===!0&&u>1?F(s):A.push(eo(E(s,B),c,a)),s=i?s-u:s+u,B++;return n.toRegex===!0?u>1?to(C,n):Un(A,null,{wrap:!1,...n}):A},so=(t,e,u=1,n={})=>{if(!be(t)&&t.length>1||!be(e)&&e.length>1)return Vn(t,e,n);let s=n.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(n.toRegex&&u===1)return jn(o,l,!1,n);let f=[],c=0;for(;D?r>=i:r<=i;)f.push(s(r,c)),r=D?r-u:r+u,c++;return n.toRegex===!0?Un(f,null,{wrap:!1,options:n}):f},tt=(t,e,u,n={})=>{if(e==null&&Xt(t))return[t];if(!Xt(t)||!Xt(e))return Vn(t,e,n);if(typeof u=="function")return tt(t,e,1,{transform:u});if(Wn(u))return tt(t,e,0,u);let s={...n};return s.capture===!0&&(s.wrap=!0),u=u||s.step||1,be(u)?be(t)&&be(e)?no(t,e,u,s):so(t,e,Math.max(Math.abs(u),1),s):u!=null&&!Wn(u)?uo(u,s):tt(t,e,1,u)};var zn=tt;const ro=zn,Yn=et,io=(t,e={})=>{let u=(n,s={})=>{let r=Yn.isInvalidBrace(s),i=n.invalid===!0&&e.escapeInvalid===!0,D=r===!0||i===!0,o=e.escapeInvalid===!0?"\\":"",l="";if(n.isOpen===!0||n.isClose===!0)return o+n.value;if(n.type==="open")return D?o+n.value:"(";if(n.type==="close")return D?o+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":D?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let f=Yn.reduce(n.nodes),c=ro(...f,{...e,wrap:!1,toRegex:!0});if(c.length!==0)return f.length>1&&c.length>1?`(${c})`:c}if(n.nodes)for(let f of n.nodes)l+=u(f,n);return l};return u(t)};var Do=io;const oo=zn,qn=Yt,pe=et,ae=(t="",e="",u=!1)=>{let n=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return u?pe.flatten(e).map(s=>`{${s}}`):e;for(let s of t)if(Array.isArray(s))for(let r of s)n.push(ae(r,e,u));else for(let r of e)u===!0&&typeof r=="string"&&(r=`{${r}}`),n.push(Array.isArray(r)?ae(s,r,u):s+r);return pe.flatten(n)},ao=(t,e={})=>{let u=e.rangeLimit===void 0?1e3:e.rangeLimit,n=(s,r={})=>{s.queue=[];let i=r,D=r.queue;for(;i.type!=="brace"&&i.type!=="root"&&i.parent;)i=i.parent,D=i.queue;if(s.invalid||s.dollar){D.push(ae(D.pop(),qn(s,e)));return}if(s.type==="brace"&&s.invalid!==!0&&s.nodes.length===2){D.push(ae(D.pop(),["{}"]));return}if(s.nodes&&s.ranges>0){let c=pe.reduce(s.nodes);if(pe.exceedsLimit(...c,e.step,u))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let a=oo(...c,e);a.length===0&&(a=qn(s,e)),D.push(ae(D.pop(),a)),s.nodes=[];return}let o=pe.encloseBrace(s),l=s.queue,f=s;for(;f.type!=="brace"&&f.type!=="root"&&f.parent;)f=f.parent,l=f.queue;for(let c=0;c<s.nodes.length;c++){let a=s.nodes[c];if(a.type==="comma"&&s.type==="brace"){c===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&&n(a,s)}return l};return pe.flatten(n(t))};var lo=ao,co={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:`
53
+ `,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 fo=Yt,{MAX_LENGTH:Xn,CHAR_BACKSLASH:Zt,CHAR_BACKTICK:ho,CHAR_COMMA:Eo,CHAR_DOT:po,CHAR_LEFT_PARENTHESES:Co,CHAR_RIGHT_PARENTHESES:Fo,CHAR_LEFT_CURLY_BRACE:go,CHAR_RIGHT_CURLY_BRACE:mo,CHAR_LEFT_SQUARE_BRACKET:Qn,CHAR_RIGHT_SQUARE_BRACKET:Zn,CHAR_DOUBLE_QUOTE:_o,CHAR_SINGLE_QUOTE:Ao,CHAR_NO_BREAK_SPACE:yo,CHAR_ZERO_WIDTH_NOBREAK_SPACE:wo}=co,Ro=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let u=e||{},n=typeof u.maxLength=="number"?Math.min(Xn,u.maxLength):Xn;if(t.length>n)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${n})`);let s={type:"root",input:t,nodes:[]},r=[s],i=s,D=s,o=0,l=t.length,f=0,c=0,a;const E=()=>t[f++],C=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(C({type:"bos"});f<l;)if(i=r[r.length-1],a=E(),!(a===wo||a===yo)){if(a===Zt){C({type:"text",value:(e.keepEscaping?a:"")+E()});continue}if(a===Zn){C({type:"text",value:"\\"+a});continue}if(a===Qn){o++;let F;for(;f<l&&(F=E());){if(a+=F,F===Qn){o++;continue}if(F===Zt){a+=E();continue}if(F===Zn&&(o--,o===0))break}C({type:"text",value:a});continue}if(a===Co){i=C({type:"paren",nodes:[]}),r.push(i),C({type:"text",value:a});continue}if(a===Fo){if(i.type!=="paren"){C({type:"text",value:a});continue}i=r.pop(),C({type:"text",value:a}),i=r[r.length-1];continue}if(a===_o||a===Ao||a===ho){let F=a,A;for(e.keepQuotes!==!0&&(a="");f<l&&(A=E());){if(A===Zt){a+=A+E();continue}if(A===F){e.keepQuotes===!0&&(a+=A);break}a+=A}C({type:"text",value:a});continue}if(a===go){c++;let A={type:"brace",open:!0,close:!1,dollar:D.value&&D.value.slice(-1)==="$"||i.dollar===!0,depth:c,commas:0,ranges:0,nodes:[]};i=C(A),r.push(i),C({type:"open",value:a});continue}if(a===mo){if(i.type!=="brace"){C({type:"text",value:a});continue}let F="close";i=r.pop(),i.close=!0,C({type:F,value:a}),c--,i=r[r.length-1];continue}if(a===Eo&&c>0){if(i.ranges>0){i.ranges=0;let F=i.nodes.shift();i.nodes=[F,{type:"text",value:fo(i)}]}C({type:"comma",value:a}),i.commas++;continue}if(a===po&&c>0&&i.commas===0){let F=i.nodes;if(c===0||F.length===0){C({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}C({type:"dot",value:a});continue}C({type:"text",value:a})}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 C({type:"eos"}),s};var bo=Ro;const Jn=Yt,vo=Do,Bo=lo,So=bo,Y=(t,e={})=>{let u=[];if(Array.isArray(t))for(let n of t){let s=Y.create(n,e);Array.isArray(s)?u.push(...s):u.push(s)}else u=[].concat(Y.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(u=[...new Set(u)]),u};Y.parse=(t,e={})=>So(t,e),Y.stringify=(t,e={})=>Jn(typeof t=="string"?Y.parse(t,e):t,e),Y.compile=(t,e={})=>(typeof t=="string"&&(t=Y.parse(t,e)),vo(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 $o=Y,To=["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"],xo=To;const Oo=K,No=xo,Ho=new Set(No);var Lo=t=>Ho.has(Oo.extname(t).slice(1).toLowerCase()),ut={};(function(t){const{sep:e}=K,{platform:u}=process,n=Au;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=s=>s,t.isWindows=u==="win32",t.isMacos=u==="darwin",t.isLinux=u==="linux",t.isIBMi=n.type()==="OS400"})(ut);const ue=ie,I=K,{promisify:ve}=me,Io=Lo,{isWindows:Po,isLinux:ko,EMPTY_FN:Mo,EMPTY_STR:Wo,KEY_LISTENERS:Ce,KEY_ERR:Jt,KEY_RAW:Be,HANDLER_KEYS:Go,EV_CHANGE:nt,EV_ADD:st,EV_ADD_DIR:jo,EV_ERROR:es,STR_DATA:Uo,STR_END:Ko,BRACE_START:Vo,STAR:zo}=ut,Yo="watch",qo=ve(ue.open),ts=ve(ue.stat),Xo=ve(ue.lstat),Qo=ve(ue.close),eu=ve(ue.realpath),Zo={lstat:Xo,stat:ts},tu=(t,e)=>{t instanceof Set?t.forEach(e):e(t)},Se=(t,e,u)=>{let n=t[e];n instanceof Set||(t[e]=n=new Set([n])),n.add(u)},Jo=t=>e=>{const u=t[e];u instanceof Set?u.clear():delete t[e]},$e=(t,e,u)=>{const n=t[e];n instanceof Set?n.delete(u):n===u&&delete t[e]},us=t=>t instanceof Set?t.size===0:!t,rt=new Map;function ns(t,e,u,n,s){const r=(i,D)=>{u(t),s(i,D,{watchedPath:t}),D&&t!==D&&it(I.resolve(t,D),Ce,I.join(t,D))};try{return ue.watch(t,e,r)}catch(i){n(i)}}const it=(t,e,u,n,s)=>{const r=rt.get(t);r&&tu(r[e],i=>{i(u,n,s)})},ea=(t,e,u,n)=>{const{listener:s,errHandler:r,rawEmitter:i}=n;let D=rt.get(e),o;if(!u.persistent)return o=ns(t,u,s,r,i),o.close.bind(o);if(D)Se(D,Ce,s),Se(D,Jt,r),Se(D,Be,i);else{if(o=ns(t,u,it.bind(null,e,Ce),r,it.bind(null,e,Be)),!o)return;o.on(es,async l=>{const f=it.bind(null,e,Jt);if(D.watcherUnusable=!0,Po&&l.code==="EPERM")try{const c=await qo(t,"r");await Qo(c),f(l)}catch{}else f(l)}),D={listeners:s,errHandlers:r,rawEmitters:i,watcher:o},rt.set(e,D)}return()=>{$e(D,Ce,s),$e(D,Jt,r),$e(D,Be,i),us(D.listeners)&&(D.watcher.close(),rt.delete(e),Go.forEach(Jo(D)),D.watcher=void 0,Object.freeze(D))}},uu=new Map,ta=(t,e,u,n)=>{const{listener:s,rawEmitter:r}=n;let i=uu.get(e);const D=i&&i.options;return D&&(D.persistent<u.persistent||D.interval>u.interval)&&(i.listeners,i.rawEmitters,ue.unwatchFile(e),i=void 0),i?(Se(i,Ce,s),Se(i,Be,r)):(i={listeners:s,rawEmitters:r,options:u,watcher:ue.watchFile(e,u,(o,l)=>{tu(i.rawEmitters,c=>{c(nt,e,{curr:o,prev:l})});const f=o.mtimeMs;(o.size!==l.size||f>l.mtimeMs||f===0)&&tu(i.listeners,c=>c(t,o))})},uu.set(e,i)),()=>{$e(i,Ce,s),$e(i,Be,r),us(i.listeners)&&(uu.delete(e),ue.unwatchFile(e),i.options=i.watcher=void 0,Object.freeze(i))}};let ua=class{constructor(e){this.fsw=e,this._boundHandleError=u=>e._handleError(u)}_watchWithNodeFs(e,u){const n=this.fsw.options,s=I.dirname(e),r=I.basename(e);this.fsw._getWatchedDir(s).add(r);const D=I.resolve(e),o={persistent:n.persistent};u||(u=Mo);let l;return n.usePolling?(o.interval=n.enableBinaryInterval&&Io(r)?n.binaryInterval:n.interval,l=ta(e,D,o,{listener:u,rawEmitter:this.fsw._emitRaw})):l=ea(e,D,o,{listener:u,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw}),l}_handleFile(e,u,n){if(this.fsw.closed)return;const s=I.dirname(e),r=I.basename(e),i=this.fsw._getWatchedDir(s);let D=u;if(i.has(r))return;const o=async(f,c)=>{if(this.fsw._throttle(Yo,e,5)){if(!c||c.mtimeMs===0)try{const a=await ts(e);if(this.fsw.closed)return;const E=a.atimeMs,C=a.mtimeMs;(!E||E<=C||C!==D.mtimeMs)&&this.fsw._emit(nt,e,a),ko&&D.ino!==a.ino?(this.fsw._closeFile(f),D=a,this.fsw._addPathCloser(f,this._watchWithNodeFs(e,o))):D=a}catch{this.fsw._remove(s,r)}else if(i.has(r)){const a=c.atimeMs,E=c.mtimeMs;(!a||a<=E||E!==D.mtimeMs)&&this.fsw._emit(nt,e,c),D=c}}},l=this._watchWithNodeFs(e,o);if(!(n&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(st,e,0))return;this.fsw._emit(st,e,u)}return l}async _handleSymlink(e,u,n,s){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 eu(n)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(i.has(s)?this.fsw._symlinkPaths.get(r)!==D&&(this.fsw._symlinkPaths.set(r,D),this.fsw._emit(nt,n,e.stats)):(i.add(s),this.fsw._symlinkPaths.set(r,D),this.fsw._emit(st,n,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(r))return!0;this.fsw._symlinkPaths.set(r,!0)}_handleRead(e,u,n,s,r,i,D){if(e=I.join(e,Wo),!n.hasGlob&&(D=this.fsw._throttle("readdir",e,1e3),!D))return;const o=this.fsw._getWatchedDir(n.path),l=new Set;let f=this.fsw._readdirp(e,{fileFilter:c=>n.filterPath(c),directoryFilter:c=>n.filterDir(c),depth:0}).on(Uo,async c=>{if(this.fsw.closed){f=void 0;return}const a=c.path;let E=I.join(e,a);if(l.add(a),!(c.stats.isSymbolicLink()&&await this._handleSymlink(c,e,E,a))){if(this.fsw.closed){f=void 0;return}(a===s||!s&&!o.has(a))&&(this.fsw._incrReadyCount(),E=I.join(r,I.relative(r,E)),this._addToNodeFs(E,u,n,i+1))}}).on(es,this._boundHandleError);return new Promise(c=>f.once(Ko,()=>{if(this.fsw.closed){f=void 0;return}const a=D?D.clear():!1;c(),o.getChildren().filter(E=>E!==e&&!l.has(E)&&(!n.hasGlob||n.filterPath({fullPath:I.resolve(e,E)}))).forEach(E=>{this.fsw._remove(e,E)}),f=void 0,a&&this._handleRead(e,!1,n,s,r,i,D)}))}async _handleDir(e,u,n,s,r,i,D){const o=this.fsw._getWatchedDir(I.dirname(e)),l=o.has(I.basename(e));!(n&&this.fsw.options.ignoreInitial)&&!r&&!l&&(!i.hasGlob||i.globFilter(e))&&this.fsw._emit(jo,e,u),o.add(I.basename(e)),this.fsw._getWatchedDir(e);let f,c;const a=this.fsw.options.depth;if((a==null||s<=a)&&!this.fsw._symlinkPaths.has(D)){if(!r&&(await this._handleRead(e,n,i,r,e,s,f),this.fsw.closed))return;c=this._watchWithNodeFs(e,(E,C)=>{C&&C.mtimeMs===0||this._handleRead(E,!1,i,r,e,s,f)})}return c}async _addToNodeFs(e,u,n,s,r){const i=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return i(),!1;const D=this.fsw._getWatchHelpers(e,s);!D.hasGlob&&n&&(D.hasGlob=n.hasGlob,D.globFilter=n.globFilter,D.filterPath=o=>n.filterPath(o),D.filterDir=o=>n.filterDir(o));try{const o=await Zo[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(zo)&&!e.includes(Vo);let f;if(o.isDirectory()){const c=I.resolve(e),a=l?await eu(e):e;if(this.fsw.closed||(f=await this._handleDir(D.watchPath,o,u,s,r,D,a),this.fsw.closed))return;c!==a&&a!==void 0&&this.fsw._symlinkPaths.set(c,a)}else if(o.isSymbolicLink()){const c=l?await eu(e):e;if(this.fsw.closed)return;const a=I.dirname(D.watchPath);if(this.fsw._getWatchedDir(a).add(D.watchPath),this.fsw._emit(st,D.watchPath,o),f=await this._handleDir(a,o,u,s,e,D,c),this.fsw.closed)return;c!==void 0&&this.fsw._symlinkPaths.set(I.resolve(e),c)}else f=this._handleFile(D.watchPath,o,u);return i(),this.fsw._addPathCloser(e,f),!1}catch(o){if(this.fsw._handleError(o))return i(),e}}};var na=ua,nu={exports:{}};const su=ie,P=K,{promisify:ru}=me;let Fe;try{Fe=ht("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:iu,EV_CHANGE:sa,EV_ADD_DIR:ss,EV_UNLINK:Dt,EV_ERROR:ra,STR_DATA:ia,STR_END:Da,FSEVENT_CREATED:oa,FSEVENT_MODIFIED:aa,FSEVENT_DELETED:la,FSEVENT_MOVED:ca,FSEVENT_UNKNOWN:fa,FSEVENT_TYPE_FILE:ha,FSEVENT_TYPE_DIRECTORY:Te,FSEVENT_TYPE_SYMLINK:rs,ROOT_GLOBSTAR:is,DIR_SUFFIX:da,DOT_SLASH:Ds,FUNCTION_TYPE:Du,EMPTY_FN:Ea,IDENTITY_FN:pa}=ut,Ca=t=>isNaN(t)?{}:{depth:t},ou=ru(su.stat),Fa=ru(su.lstat),os=ru(su.realpath),ga={stat:ou,lstat:Fa},le=new Map,ma=10,_a=new Set([69888,70400,71424,72704,73472,131328,131840,262912]),Aa=(t,e)=>({stop:Fe.watch(t,e)});function ya(t,e,u,n){let s=P.extname(e)?P.dirname(e):e;const r=P.dirname(s);let i=le.get(s);wa(r)&&(s=r);const D=P.resolve(t),o=D!==e,l=(c,a,E)=>{o&&(c=c.replace(e,D)),(c===D||!c.indexOf(D+P.sep))&&u(c,a,E)};let f=!1;for(const c of le.keys())if(e.indexOf(P.resolve(c)+P.sep)===0){s=c,i=le.get(s),f=!0;break}return i||f?i.listeners.add(l):(i={listeners:new Set([l]),rawEmitter:n,watcher:Aa(s,(c,a)=>{if(!i.listeners.size)return;const E=Fe.getInfo(c,a);i.listeners.forEach(C=>{C(c,a,E)}),i.rawEmitter(E.event,c,E)})},le.set(s,i)),()=>{const c=i.listeners;if(c.delete(l),!c.size&&(le.delete(s),i.watcher))return i.watcher.stop().then(()=>{i.rawEmitter=i.watcher=void 0,Object.freeze(i)})}}const wa=t=>{let e=0;for(const u of le.keys())if(u.indexOf(t)===0&&(e++,e>=ma))return!0;return!1},Ra=()=>Fe&&le.size<128,au=(t,e)=>{let u=0;for(;!t.indexOf(e)&&(t=P.dirname(t))!==e;)u++;return u},as=(t,e)=>t.type===Te&&e.isDirectory()||t.type===rs&&e.isSymbolicLink()||t.type===ha&&e.isFile();let ba=class{constructor(e){this.fsw=e}checkIgnored(e,u){const n=this.fsw._ignoredPaths;if(this.fsw._isIgnored(e,u))return n.add(e),u&&u.isDirectory()&&n.add(e+is),!0;n.delete(e),n.delete(e+is)}addOrChange(e,u,n,s,r,i,D,o){const l=r.has(i)?sa:iu;this.handleEvent(l,e,u,n,s,r,i,D,o)}async checkExists(e,u,n,s,r,i,D,o){try{const l=await ou(e);if(this.fsw.closed)return;as(D,l)?this.addOrChange(e,u,n,s,r,i,D,o):this.handleEvent(Dt,e,u,n,s,r,i,D,o)}catch(l){l.code==="EACCES"?this.addOrChange(e,u,n,s,r,i,D,o):this.handleEvent(Dt,e,u,n,s,r,i,D,o)}}handleEvent(e,u,n,s,r,i,D,o,l){if(!(this.fsw.closed||this.checkIgnored(u)))if(e===Dt){const f=o.type===Te;(f||i.has(D))&&this.fsw._remove(r,D,f)}else{if(e===iu){if(o.type===Te&&this.fsw._getWatchedDir(u),o.type===rs&&l.followSymlinks){const c=l.depth===void 0?void 0:au(n,s)+1;return this._addToFsEvents(u,!1,!0,c)}this.fsw._getWatchedDir(r).add(D)}const f=o.type===Te?e+da:e;this.fsw._emit(f,u),f===ss&&this._addToFsEvents(u,!1,!0)}}_watchWithFsEvents(e,u,n,s){if(this.fsw.closed||this.fsw._isIgnored(e))return;const r=this.fsw.options,D=ya(e,u,async(o,l,f)=>{if(this.fsw.closed||r.depth!==void 0&&au(o,u)>r.depth)return;const c=n(P.join(e,P.relative(e,o)));if(s&&!s(c))return;const a=P.dirname(c),E=P.basename(c),C=this.fsw._getWatchedDir(f.type===Te?c:a);if(_a.has(l)||f.event===fa)if(typeof r.ignored===Du){let F;try{F=await ou(c)}catch{}if(this.fsw.closed||this.checkIgnored(c,F))return;as(f,F)?this.addOrChange(c,o,u,a,C,E,f,r):this.handleEvent(Dt,c,o,u,a,C,E,f,r)}else this.checkExists(c,o,u,a,C,E,f,r);else switch(f.event){case oa:case aa:return this.addOrChange(c,o,u,a,C,E,f,r);case la:case ca:return this.checkExists(c,o,u,a,C,E,f,r)}},this.fsw._emitRaw);return this.fsw._emitReady(),D}async _handleFsEventsSymlink(e,u,n,s){if(!(this.fsw.closed||this.fsw._symlinkPaths.has(u))){this.fsw._symlinkPaths.set(u,!0),this.fsw._incrReadyCount();try{const r=await os(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!==Ds?D=i.replace(r,e):i!==Ds&&(D=P.join(e,i)),n(D)},!1,s)}catch(r){if(this.fsw._handleError(r))return this.fsw._emitReady()}}}emitAdd(e,u,n,s,r){const i=n(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),(!s.ignoreInitial||r===!0)&&this.fsw._emit(D?ss:iu,i,u))}initWatch(e,u,n,s){if(this.fsw.closed)return;const r=this._watchWithFsEvents(n.watchPath,P.resolve(e||n.watchPath),s,n.globFilter);this.fsw._addPathCloser(u,r)}async _addToFsEvents(e,u,n,s){if(this.fsw.closed)return;const r=this.fsw.options,i=typeof u===Du?u:pa,D=this.fsw._getWatchHelpers(e);try{const o=await ga[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,n),s&&s>r.depth)return;this.fsw._readdirp(D.watchPath,{fileFilter:l=>D.filterPath(l),directoryFilter:l=>D.filterDir(l),...Ca(r.depth-(s||0))}).on(ia,l=>{if(this.fsw.closed||l.stats.isDirectory()&&!D.filterPath(l))return;const f=P.join(D.watchPath,l.path),{fullPath:c}=l;if(D.followSymlinks&&l.stats.isSymbolicLink()){const a=r.depth===void 0?void 0:au(f,P.resolve(D.watchPath))+1;this._handleFsEventsSymlink(f,c,i,a)}else this.emitAdd(f,l.stats,i,r,n)}).on(ra,Ea).on(Da,()=>{this.fsw._emitReady()})}else this.emitAdd(D.watchPath,o,i,r,n),this.fsw._emitReady()}catch(o){(!o||this.fsw._handleError(o))&&(this.fsw._emitReady(),this.fsw._emitReady())}if(r.persistent&&n!==!0)if(typeof u===Du)this.initWatch(void 0,e,D,i);else{let o;try{o=await os(D.watchPath)}catch{}this.initWatch(o,e,D,i)}}};nu.exports=ba,nu.exports.canUse=Ra;var va=nu.exports;const{EventEmitter:Ba}=Ns,lu=ie,v=K,{promisify:ls}=me,Sa=yD,cu=SD.default,$a=WD,fu=Tn,Ta=$o,xa=bn,Oa=na,cs=va,{EV_ALL:hu,EV_READY:Na,EV_ADD:ot,EV_CHANGE:xe,EV_UNLINK:fs,EV_ADD_DIR:Ha,EV_UNLINK_DIR:La,EV_RAW:Ia,EV_ERROR:du,STR_CLOSE:Pa,STR_END:ka,BACK_SLASH_RE:Ma,DOUBLE_SLASH_RE:hs,SLASH_OR_BACK_SLASH_RE:Wa,DOT_RE:Ga,REPLACER_RE:ja,SLASH:Eu,SLASH_SLASH:Ua,BRACE_START:Ka,BANG:pu,ONE_DOT:ds,TWO_DOTS:Va,GLOBSTAR:za,SLASH_GLOBSTAR:Cu,ANYMATCH_OPTS:Fu,STRING_TYPE:gu,FUNCTION_TYPE:Ya,EMPTY_STR:mu,EMPTY_FN:qa,isWindows:Xa,isMacos:Qa,isIBMi:Za}=ut,Ja=ls(lu.stat),el=ls(lu.readdir),_u=(t=[])=>Array.isArray(t)?t:[t],Es=(t,e=[])=>(t.forEach(u=>{Array.isArray(u)?Es(u,e):e.push(u)}),e),ps=t=>{const e=Es(_u(t));if(!e.every(u=>typeof u===gu))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(Fs)},Cs=t=>{let e=t.replace(Ma,Eu),u=!1;for(e.startsWith(Ua)&&(u=!0);e.match(hs);)e=e.replace(hs,Eu);return u&&(e=Eu+e),e},Fs=t=>Cs(v.normalize(Cs(t))),gs=(t=mu)=>e=>typeof e!==gu?e:Fs(v.isAbsolute(e)?e:v.join(t,e)),tl=(t,e)=>v.isAbsolute(t)?t:t.startsWith(pu)?pu+v.join(e,t.slice(1)):v.join(e,t),q=(t,e)=>t[e]===void 0;class ul{constructor(e,u){this.path=e,this._removeWatcher=u,this.items=new Set}add(e){const{items:u}=this;u&&e!==ds&&e!==Va&&u.add(e)}async remove(e){const{items:u}=this;if(!u||(u.delete(e),u.size>0))return;const n=this.path;try{await el(n)}catch{this._removeWatcher&&this._removeWatcher(v.dirname(n),v.basename(n))}}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",sl="lstat";class rl{constructor(e,u,n,s){this.fsw=s,this.path=e=e.replace(ja,mu),this.watchPath=u,this.fullWatchPath=v.resolve(u),this.hasGlob=u!==e,e===mu&&(this.hasGlob=!1),this.globSymlink=this.hasGlob&&n?void 0:!1,this.globFilter=this.hasGlob?cu(e,void 0,Fu):!1,this.dirParts=this.getDirParts(e),this.dirParts.forEach(r=>{r.length>1&&r.pop()}),this.followSymlinks=n,this.statMethod=n?nl:sl}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 n=this.entryPath(e);return(this.hasGlob&&typeof this.globFilter===Ya?this.globFilter(n):!0)&&this.fsw._isntIgnored(n,u)&&this.fsw._hasReadPermissions(u)}getDirParts(e){if(!this.hasGlob)return[];const u=[];return(e.includes(Ka)?Ta.expand(e):[e]).forEach(s=>{u.push(v.relative(this.watchPath,s).split(Wa))}),u}filterDir(e){if(this.hasGlob){const u=this.getDirParts(this.checkGlobSymlink(e));let n=!1;this.unmatchedGlob=!this.dirParts.some(s=>s.every((r,i)=>(r===za&&(n=!0),n||!u[0][i]||cu(r,u[0][i],Fu))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(e),e.stats)}}class il extends Ba{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),cs.canUse()||(u.useFsEvents=!1),q(u,"usePolling")&&!u.useFsEvents&&(u.usePolling=Qa),Za&&(u.usePolling=!0);const s=process.env.CHOKIDAR_USEPOLLING;if(s!==void 0){const o=s.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=_u(u.ignored));let D=0;this._emitReady=()=>{D++,D>=this._readyCount&&(this._emitReady=qa,this._readyEmitted=!0,process.nextTick(()=>this.emit(Na)))},this._emitRaw=(...o)=>this.emit(Ia,...o),this._readyEmitted=!1,this.options=u,u.useFsEvents?this._fsEventsHandler=new cs(this):this._nodeFsHandler=new Oa(this),Object.freeze(u)}add(e,u,n){const{cwd:s,disableGlobbing:r}=this.options;this.closed=!1;let i=ps(e);return s&&(i=i.map(D=>{const o=tl(D,s);return r||!fu(D)?o:xa(o)})),i=i.filter(D=>D.startsWith(pu)?(this._ignoredPaths.add(D.slice(1)),!1):(this._ignoredPaths.delete(D),this._ignoredPaths.delete(D+Cu),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,!n,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=ps(e),{cwd:n}=this.options;return u.forEach(s=>{!v.isAbsolute(s)&&!this._closers.has(s)&&(n&&(s=v.join(n,s)),s=v.resolve(s)),this._closePath(s),this._ignoredPaths.add(s),this._watched.has(s)&&this._ignoredPaths.add(s+Cu),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(n=>{const s=n();s instanceof Promise&&e.push(s)})),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,n)=>{const s=this.options.cwd?v.relative(this.options.cwd,n):n;e[s||ds]=u.getChildren().sort()}),e}emitWithAll(e,u){this.emit(...u),e!==du&&this.emit(hu,...u)}async _emit(e,u,n,s,r){if(this.closed)return;const i=this.options;Xa&&(u=v.normalize(u)),i.cwd&&(u=v.relative(i.cwd,u));const D=[e,u];r!==void 0?D.push(n,s,r):s!==void 0?D.push(n,s):n!==void 0&&D.push(n);const o=i.awaitWriteFinish;let l;if(o&&(l=this._pendingWrites.get(u)))return l.lastChange=new Date,this;if(i.atomic){if(e===fs)return this._pendingUnlinks.set(u,D),setTimeout(()=>{this._pendingUnlinks.forEach((f,c)=>{this.emit(...f),this.emit(hu,...f),this._pendingUnlinks.delete(c)})},typeof i.atomic=="number"?i.atomic:100),this;e===ot&&this._pendingUnlinks.has(u)&&(e=D[0]=xe,this._pendingUnlinks.delete(u))}if(o&&(e===ot||e===xe)&&this._readyEmitted){const f=(c,a)=>{c?(e=D[0]=du,D[1]=c,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,f),this}if(e===xe&&!this._throttle(xe,u,50))return this;if(i.alwaysStat&&n===void 0&&(e===ot||e===Ha||e===xe)){const f=i.cwd?v.join(i.cwd,u):u;let c;try{c=await Ja(f)}catch{}if(!c||this.closed)return;D.push(c)}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(du,e),e||this.closed}_throttle(e,u,n){this._throttled.has(e)||this._throttled.set(e,new Map);const s=this._throttled.get(e),r=s.get(u);if(r)return r.count++,!1;let i;const D=()=>{const l=s.get(u),f=l?l.count:0;return s.delete(u),clearTimeout(i),l&&clearTimeout(l.timeoutObject),f};i=setTimeout(D,n);const o={timeoutObject:i,clear:D,count:0};return s.set(u,o),o}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,u,n,s){let r,i=e;this.options.cwd&&!v.isAbsolute(e)&&(i=v.join(this.options.cwd,e));const D=new Date,o=l=>{lu.stat(i,(f,c)=>{if(f||!this._pendingWrites.has(e)){f&&f.code!=="ENOENT"&&s(f);return}const a=Number(new Date);l&&c.size!==l.size&&(this._pendingWrites.get(e).lastChange=a);const E=this._pendingWrites.get(e);a-E.lastChange>=u?(this._pendingWrites.delete(e),s(void 0,c)):r=setTimeout(o,this.options.awaitWriteFinish.pollInterval,c)})};this._pendingWrites.has(e)||(this._pendingWrites.set(e,{lastChange:D,cancelWait:()=>(this._pendingWrites.delete(e),clearTimeout(r),n)}),r=setTimeout(o,this.options.awaitWriteFinish.pollInterval))}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(e,u){if(this.options.atomic&&Ga.test(e))return!0;if(!this._userIgnored){const{cwd:n}=this.options,s=this.options.ignored,r=s&&s.map(gs(n)),i=_u(r).filter(o=>typeof o===gu&&!fu(o)).map(o=>o+Cu),D=this._getGlobIgnored().map(gs(n)).concat(r,i);this._userIgnored=cu(D,void 0,Fu)}return this._userIgnored([e,u])}_isntIgnored(e,u){return!this._isIgnored(e,u)}_getWatchHelpers(e,u){const n=u||this.options.disableGlobbing||!fu(e)?e:$a(e),s=this.options.followSymlinks;return new rl(e,n,s,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 ul(u,this._boundRemove)),this._watched.get(u)}_hasReadPermissions(e){if(this.options.ignorePermissionErrors)return!0;const n=(e&&Number.parseInt(e.mode,10))&511;return!!(4&Number.parseInt(n.toString(8)[0],10))}_remove(e,u,n){const s=v.join(e,u),r=v.resolve(s);if(n=n!=null?n:this._watched.has(s)||this._watched.has(r),!this._throttle("remove",s,100))return;!n&&!this.options.useFsEvents&&this._watched.size===1&&this.add(e,u,!0),this._getWatchedDir(s).getChildren().forEach(a=>this._remove(s,a));const o=this._getWatchedDir(e),l=o.has(u);o.remove(u),this._symlinkPaths.has(r)&&this._symlinkPaths.delete(r);let f=s;if(this.options.cwd&&(f=v.relative(this.options.cwd,s)),this.options.awaitWriteFinish&&this._pendingWrites.has(f)&&this._pendingWrites.get(f).cancelWait()===ot)return;this._watched.delete(s),this._watched.delete(r);const c=n?La:fs;l&&!this._isIgnored(s)&&this._emit(c,s),this.options.useFsEvents||this._closePath(s)}_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(n=>n()),this._closers.delete(e))}_addPathCloser(e,u){if(!u)return;let n=this._closers.get(e);n||(n=[],this._closers.set(e,n)),n.push(u)}_readdirp(e,u){if(this.closed)return;const n={type:hu,alwaysStat:!0,lstat:!0,...u};let s=Sa(e,n);return this._streams.add(s),s.once(Pa,()=>{s=void 0}),s.once(ka,()=>{s&&(this._streams.delete(s),s=void 0)}),s}}const Dl=(t,e)=>{const u=new il(e);return u.add(t),u};var ol=Dl;let ce=!0;const ge=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let Oe=0;if(ge.process&&ge.process.env&&ge.process.stdout){const{FORCE_COLOR:t,NODE_DISABLE_COLORS:e,NO_COLOR:u,TERM:n,COLORTERM:s}=ge.process.env;e||u||t==="0"?ce=!1:t==="1"||t==="2"||t==="3"?ce=!0:n==="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"||s&&(s==="truecolor"||s==="24bit")?Oe=3:n&&(n.endsWith("-256color")||n.endsWith("256"))?Oe=2:Oe=1)}let ms={enabled:ce,supportLevel:Oe};function Ne(t,e,u=1){const n=`\x1B[${t}m`,s=`\x1B[${e}m`,r=new RegExp(`\\x1b\\[${e}m`,"g");return i=>ms.enabled&&ms.supportLevel>=u?n+(""+i).replace(r,n)+s:""+i}const He=Ne(33,39),al=Ne(90,39),ll=Ne(92,39),cl=Ne(95,39),fl=Ne(96,39),at=(t=!0)=>{let e=!1;return u=>{if(e||u==="unknown-flag")return!0;if(u==="argument")return e=!0,t}},_s=(t,e=process.argv.slice(2))=>(wu(t,e,{ignore:at()}),e),hl=()=>new Date().toLocaleTimeString(),Le=(...t)=>console.log(al(hl()),fl("[tsx]"),...t),dl="\x1Bc",El=(t,e)=>{let u;return function(){u&&clearTimeout(u),u=setTimeout(()=>Reflect.apply(t,this,arguments),e)}},As={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"}},pl=Jr({name:"watch",parameters:["<script path>"],flags:As,help:{description:"Run the script and watch for changes"},ignoreArgv:at(!1)},t=>{const e=_s(As,process.argv.slice(3)),u={noCache:t.flags.noCache,tsconfigPath:t.flags.tsconfig,clearScreen:t.flags.clearScreen,ignore:t.flags.ignore,ipc:!0};let n,s=!1;const r=()=>{if(s)return;const c=Dn(e,u);return c.on("message",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:")?$s(a.path):a.path;K.isAbsolute(E)&&f.add(E)}}),c};let i=!1;const D=async(c,a="SIGTERM",E=5e3)=>{let C=!1;const F=new Promise(A=>{c.on("exit",B=>{C=!0,i=!1,A(B)})});return i=!0,c.kill(a),setTimeout(()=>{C||(Le(He(`Process didn't exit in ${Math.floor(E/1e3)}s. Force killing...`)),c.kill("SIGKILL"))},E),await F},o=El(async(c,a)=>{const E=c?`${c?cl(c):""}${a?` in ${ll(`./${a}`)}`:""}`:"";if(i){Le(E,He("Process hasn't exited. Killing process...")),n.kill("SIGKILL");return}n&&(n.exitCode===null?(Le(E,He("Restarting...")),await D(n)):Le(E,He("Rerunning...")),u.clearScreen&&process.stdout.write(dl)),n=r()},100);o();const l=c=>{s=!0,(n==null?void 0:n.exitCode)===null?(i&&Le(He("Previous process hasn't exited yet. Force killing...")),D(n,i?"SIGKILL":c).then(a=>{process.exit(a!=null?a:0)},()=>{})):process.exit(ft.signals[c])};process.on("SIGINT",l),process.on("SIGTERM",l);const f=ol(t._,{cwd:process.cwd(),ignoreInitial:!0,ignored:["**/.*/**","**/.*","**/{node_modules,bower_components,vendor}/**",...u.ignore],ignorePermissionErrors:!0}).on("all",o);process.stdin.on("data",()=>o("Return key"))}),Cl=t=>{let e;t.on("message",s=>{s&&s.type==="kill"&&e&&e(s.signal)});const u=()=>{const s=new Promise(r=>{setTimeout(()=>r(void 0),30),e=r});return s.then(()=>{e=void 0},()=>{}),s},n=async s=>{await u()!==s&&(t.kill(s),await u()!==s&&(t.on("exit",()=>{const D=ft.signals[s];process.exit(128+D)}),t.kill("SIGKILL")))};process.on("SIGINT",n),process.on("SIGTERM",n)},ys={noCache:{type:Boolean,description:"Disable caching"},tsconfig:{type:String,description:"Custom tsconfig.json path"}};Uu({name:"tsx",parameters:["[script path]"],commands:[pl],flags:{...ys,version:{type:Boolean,alias:"v",description:"Show version"},help:{type:Boolean,alias:"h",description:"Show help"}},help:!1,ignoreArgv:at()},t=>{t.flags.version?process.stdout.write(`tsx v${Bs}
54
54
  node `):t.flags.help&&(t.showHelp({description:"Node.js runtime enhanced with esbuild for loading TypeScript & ESM"}),console.log(`${"-".repeat(45)}
55
- `));const e={eval:{type:String,alias:"e"},print:{type:String,alias:"p"}},{_:u,flags:n}=Wu({flags:{...e,inputType:String,test:Boolean},help:!1,ignoreArgv:it(!1)}),s=Cs({..._s,...e}),i=["print","eval"].find(o=>!!n[o]);if(i){const{inputType:o}=n,a=n[i],c=Rs(a,{loader:"default",sourcefile:"/eval.ts",format:o==="module"?"esm":"cjs"});s.unshift(`--${i}`,c.code)}Ts&&n.test&&u.length===0&&s.push("**/{test,test/**/*,test-*,*[.-_]test}.?(c|m)@(t|j)s");const D=nn(s,{noCache:!!t.flags.noCache,tsconfigPath:t.flags.tsconfig});El(D),D.on("close",o=>process.exit(o))});
55
+ `));const e={eval:{type:String,alias:"e"},print:{type:String,alias:"p"}},{_:u,flags:n}=Uu({flags:{...e,inputType:String,test:Boolean},help:!1,ignoreArgv:at(!1)}),s=_s({...ys,...e}),i=["print","eval"].find(o=>!!n[o]);if(i){const{inputType:o}=n,l=n[i],f=vs(l,{loader:"default",sourcefile:"/eval.ts",format:o==="module"?"esm":"cjs"});s.unshift(`--${i}`,f.code)}Os&&n.test&&u.length===0&&s.push("**/{test,test/**/*,test-*,*[.-_]test}.?(c|m)@(t|j)s");const D=Dn(s,{noCache:!!t.flags.noCache,tsconfigPath:t.flags.tsconfig});Cl(D),D.on("close",o=>{o===null&&(o=ft.signals[D.signalCode]+128),process.exit(o)})});