pkgroll 2.9.0 → 2.10.0

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,29 +1,29 @@
1
1
  #!/usr/bin/env node
2
- var ze=Object.defineProperty;var i=(u,e)=>ze(u,"name",{value:e,configurable:!0});import S from"node:fs";import qe from"tty";import{watch as Je,rollup as Ge}from"rollup";import h from"node:path";import Ke from"@rollup/plugin-node-resolve";import He from"@rollup/plugin-commonjs";import Ze from"@rollup/plugin-json";import Qe from"@rollup/plugin-alias";import Ye from"@rollup/plugin-replace";import Xe from"@rollup/plugin-dynamic-import-vars";import{createFilter as ut}from"@rollup/pluginutils";import{transform as Mu}from"esbuild";import et,{builtinModules as tt}from"node:module";import cu from"magic-string";import Dt from"fs";import{attachScopes as nt}from"rollup-pluginutils";const rt="known-flag",ot="unknown-flag",st="argument",{stringify:q}=JSON,it=/\B([A-Z])/g,at=i(u=>u.replace(it,"-$1").toLowerCase(),"v$2"),{hasOwnProperty:lt}=Object.prototype,J=i((u,e)=>lt.call(u,e),"w$3"),ct=i(u=>Array.isArray(u),"L$2"),Wu=i(u=>typeof u=="function"?[u,!1]:ct(u)?[u[0],!0]:Wu(u.type),"b$2"),ft=i((u,e)=>u===Boolean?e!=="false":e,"d$3"),Ft=i((u,e)=>typeof e=="boolean"?e:u===Number&&e===""?Number.NaN:u(e),"m$2"),Ct=/[\s.:=]/,pt=i(u=>{const e=`Flag name ${q(u)}`;if(u.length===0)throw new Error(`${e} cannot be empty`);if(u.length===1)throw new Error(`${e} must be longer than a character`);const D=u.match(Ct);if(D)throw new Error(`${e} cannot contain ${q(D?.[0])}`)},"B$1"),dt=i(u=>{const e={},D=i((t,n)=>{if(J(e,t))throw new Error(`Duplicate flags named ${q(t)}`);e[t]=n},"r");for(const t in u){if(!J(u,t))continue;pt(t);const n=u[t],r=[[],...Wu(n),n];D(t,r);const o=at(t);if(t!==o&&D(o,r),"alias"in n&&typeof n.alias=="string"){const{alias:s}=n,a=`Flag alias ${q(s)} for flag ${q(t)}`;if(s.length===0)throw new Error(`${a} cannot be empty`);if(s.length>1)throw new Error(`${a} must be a single character`);D(s,r)}}return e},"K$2"),Et=i((u,e)=>{const D={};for(const t in u){if(!J(u,t))continue;const[n,,r,o]=e[t];if(n.length===0&&"default"in o){let{default:s}=o;typeof s=="function"&&(s=s()),D[t]=s}else D[t]=r?n:n.pop()}return D},"_$3"),X="--",ht=/[.:=]/,mt=/^-{1,2}\w/,gt=i(u=>{if(!mt.test(u))return;const e=!u.startsWith(X);let D=u.slice(e?1:2),t;const n=D.match(ht);if(n){const{index:r}=n;t=D.slice(r+1),D=D.slice(0,r)}return[D,t,e]},"N$1"),Bt=i((u,{onFlag:e,onArgument:D})=>{let t;const n=i((r,o)=>{if(typeof t!="function")return!0;t(r,o),t=void 0},"o");for(let r=0;r<u.length;r+=1){const o=u[r];if(o===X){n();const a=u.slice(r+1);D?.(a,[r],!0);break}const s=gt(o);if(s){if(n(),!e)continue;const[a,l,C]=s;if(C)for(let F=0;F<a.length;F+=1){n();const c=F===a.length-1;t=e(a[F],c?l:void 0,[r,F+1,c])}else t=e(a,l,[r])}else n(o,[r])&&D?.([o],[r])}n()},"$$2"),At=i((u,e)=>{for(const[D,t,n]of e.reverse()){if(t){const r=u[D];let o=r.slice(0,t);if(n||(o+=r.slice(t+1)),o!=="-"){u[D]=o;continue}}u.splice(D,1)}},"E$2"),yt=i((u,e=process.argv.slice(2),{ignore:D}={})=>{const t=[],n=dt(u),r={},o=[];return o[X]=[],Bt(e,{onFlag(s,a,l){const C=J(n,s);if(!D?.(C?rt:ot,s,a)){if(C){const[F,c]=n[s],E=ft(c,a),d=i((m,y)=>{t.push(l),y&&t.push(y),F.push(Ft(c,m||""))},"p");return E===void 0?d:d(E)}J(r,s)||(r[s]=[]),r[s].push(a===void 0?!0:a),t.push(l)}},onArgument(s,a,l){D?.(st,e[a[0]])||(o.push(...s),l?(o[X]=s,e.splice(a[0])):t.push(a))}}),At(e,t),{flags:Et(u,n),unknownFlags:r,_:o}},"U$2");var bt=Object.create,uu=Object.defineProperty,wt=Object.defineProperties,vt=Object.getOwnPropertyDescriptor,$t=Object.getOwnPropertyDescriptors,xt=Object.getOwnPropertyNames,Uu=Object.getOwnPropertySymbols,kt=Object.getPrototypeOf,Vu=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable,zu=i((u,e,D)=>e in u?uu(u,e,{enumerable:!0,configurable:!0,writable:!0,value:D}):u[e]=D,"W$2"),eu=i((u,e)=>{for(var D in e||(e={}))Vu.call(e,D)&&zu(u,D,e[D]);if(Uu)for(var D of Uu(e))jt.call(e,D)&&zu(u,D,e[D]);return u},"p$1"),fu=i((u,e)=>wt(u,$t(e)),"c"),Ot=i(u=>uu(u,"__esModule",{value:!0}),"nD"),Tt=i((u,e)=>()=>(u&&(e=u(u=0)),e),"rD"),St=i((u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports),"iD"),Pt=i((u,e,D,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of xt(e))!Vu.call(u,n)&&n!=="default"&&uu(u,n,{get:i(()=>e[n],"get"),enumerable:!(t=vt(e,n))||t.enumerable});return u},"oD"),_t=i((u,e)=>Pt(Ot(uu(u!=null?bt(kt(u)):{},"default",{value:u,enumerable:!0})),u),"BD"),x=Tt(()=>{}),It=St((u,e)=>{x(),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}});x(),x(),x();var Nt=i(u=>{var e,D,t;let n=(e=process.stdout.columns)!=null?e:Number.POSITIVE_INFINITY;return typeof u=="function"&&(u=u(n)),u||(u={}),Array.isArray(u)?{columns:u,stdoutColumns:n}:{columns:(D=u.columns)!=null?D:[],stdoutColumns:(t=u.stdoutColumns)!=null?t:n}},"v$1");x(),x(),x(),x(),x();function Rt({onlyFirst:u=!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,u?void 0:"g")}i(Rt,"w$2");function qu(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(Rt(),"")}i(qu,"d$2"),x();function Lt(u){return Number.isInteger(u)?u>=4352&&(u<=4447||u===9001||u===9002||11904<=u&&u<=12871&&u!==12351||12880<=u&&u<=19903||19968<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65131||65281<=u&&u<=65376||65504<=u&&u<=65510||110592<=u&&u<=110593||127488<=u&&u<=127569||131072<=u&&u<=262141):!1}i(Lt,"y$1");var Mt=_t(It());function N(u){if(typeof u!="string"||u.length===0||(u=qu(u),u.length===0))return 0;u=u.replace((0,Mt.default)()," ");let e=0;for(let D=0;D<u.length;D++){let t=u.codePointAt(D);t<=31||t>=127&&t<=159||t>=768&&t<=879||(t>65535&&D++,e+=Lt(t)?2:1)}return e}i(N,"g");var Ju=i(u=>Math.max(...u.split(`
3
- `).map(N)),"b$1"),Wt=i(u=>{let e=[];for(let D of u){let{length:t}=D,n=t-e.length;for(let r=0;r<n;r+=1)e.push(0);for(let r=0;r<t;r+=1){let o=Ju(D[r]);o>e[r]&&(e[r]=o)}}return e},"k$1");x();var Gu=/^\d+%$/,Ku={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},Ut=i((u,e)=>{var D;let t=[];for(let n=0;n<u.length;n+=1){let r=(D=e[n])!=null?D:"auto";if(typeof r=="number"||r==="auto"||r==="content-width"||typeof r=="string"&&Gu.test(r)){t.push(fu(eu({},Ku),{width:r,contentWidth:u[n]}));continue}if(r&&typeof r=="object"){let o=fu(eu(eu({},Ku),r),{contentWidth:u[n]});o.horizontalPadding=o.paddingLeft+o.paddingRight,t.push(o);continue}throw new Error(`Invalid column width: ${JSON.stringify(r)}`)}return t},"sD");function Vt(u,e){for(let D of u){let{width:t}=D;if(t==="content-width"&&(D.width=D.contentWidth),t==="auto"){let a=Math.min(20,D.contentWidth);D.width=a,D.autoOverflow=D.contentWidth-a}if(typeof t=="string"&&Gu.test(t)){let a=Number.parseFloat(t.slice(0,-1))/100;D.width=Math.floor(e*a)-(D.paddingLeft+D.paddingRight)}let{horizontalPadding:n}=D,r=1,o=r+n;if(o>=e){let a=o-e,l=Math.ceil(D.paddingLeft/n*a),C=a-l;D.paddingLeft-=l,D.paddingRight-=C,D.horizontalPadding=D.paddingLeft+D.paddingRight}D.paddingLeftString=D.paddingLeft?" ".repeat(D.paddingLeft):"",D.paddingRightString=D.paddingRight?" ".repeat(D.paddingRight):"";let s=e-D.horizontalPadding;D.width=Math.max(Math.min(D.width,s),r)}}i(Vt,"aD");var Hu=i(()=>Object.assign([],{columns:0}),"G$1");function zt(u,e){let D=[Hu()],[t]=D;for(let n of u){let r=n.width+n.horizontalPadding;t.columns+r>e&&(t=Hu(),D.push(t)),t.push(n),t.columns+=r}for(let n of D){let r=n.reduce((c,E)=>c+E.width+E.horizontalPadding,0),o=e-r;if(o===0)continue;let s=n.filter(c=>"autoOverflow"in c),a=s.filter(c=>c.autoOverflow>0),l=a.reduce((c,E)=>c+E.autoOverflow,0),C=Math.min(l,o);for(let c of a){let E=Math.floor(c.autoOverflow/l*C);c.width+=E,o-=E}let F=Math.floor(o/s.length);for(let c=0;c<s.length;c+=1){let E=s[c];c===s.length-1?E.width+=o:E.width+=F,o-=F}}return D}i(zt,"lD");function qt(u,e,D){let t=Ut(D,e);return Vt(t,u),zt(t,u)}i(qt,"Z$2"),x(),x(),x();var Fu=10,Zu=i((u=0)=>e=>`\x1B[${e+u}m`,"U$1"),Qu=i((u=0)=>e=>`\x1B[${38+u};5;${e}m`,"V$2"),Yu=i((u=0)=>(e,D,t)=>`\x1B[${38+u};2;${e};${D};${t}m`,"Y$1");function Jt(){let u=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[D,t]of Object.entries(e)){for(let[n,r]of Object.entries(t))e[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},t[n]=e[n],u.set(r[0],r[1]);Object.defineProperty(e,D,{value:t,enumerable:!1})}return Object.defineProperty(e,"codes",{value:u,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=Zu(),e.color.ansi256=Qu(),e.color.ansi16m=Yu(),e.bgColor.ansi=Zu(Fu),e.bgColor.ansi256=Qu(Fu),e.bgColor.ansi16m=Yu(Fu),Object.defineProperties(e,{rgbToAnsi256:{value:i((D,t,n)=>D===t&&t===n?D<8?16:D>248?231:Math.round((D-8)/247*24)+232:16+36*Math.round(D/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),"value"),enumerable:!1},hexToRgb:{value:i(D=>{let t=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(D.toString(16));if(!t)return[0,0,0];let{colorString:n}=t.groups;n.length===3&&(n=n.split("").map(o=>o+o).join(""));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},"value"),enumerable:!1},hexToAnsi256:{value:i(D=>e.rgbToAnsi256(...e.hexToRgb(D)),"value"),enumerable:!1},ansi256ToAnsi:{value:i(D=>{if(D<8)return 30+D;if(D<16)return 90+(D-8);let t,n,r;if(D>=232)t=((D-232)*10+8)/255,n=t,r=t;else{D-=16;let a=D%36;t=Math.floor(D/36)/5,n=Math.floor(a/6)/5,r=a%6/5}let o=Math.max(t,n,r)*2;if(o===0)return 30;let s=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return o===2&&(s+=60),s},"value"),enumerable:!1},rgbToAnsi:{value:i((D,t,n)=>e.ansi256ToAnsi(e.rgbToAnsi256(D,t,n)),"value"),enumerable:!1},hexToAnsi:{value:i(D=>e.ansi256ToAnsi(e.hexToAnsi256(D)),"value"),enumerable:!1}}),e}i(Jt,"AD");var Gt=Jt(),Kt=Gt,tu=new Set(["\x1B","\x9B"]),Ht=39,Cu="\x07",Xu="[",Zt="]",ue="m",pu=`${Zt}8;;`,ee=i(u=>`${tu.values().next().value}${Xu}${u}${ue}`,"J$2"),te=i(u=>`${tu.values().next().value}${pu}${u}${Cu}`,"Q$1"),Qt=i(u=>u.split(" ").map(e=>N(e)),"hD"),du=i((u,e,D)=>{let t=[...e],n=!1,r=!1,o=N(qu(u[u.length-1]));for(let[s,a]of t.entries()){let l=N(a);if(o+l<=D?u[u.length-1]+=a:(u.push(a),o=0),tu.has(a)&&(n=!0,r=t.slice(s+1).join("").startsWith(pu)),n){r?a===Cu&&(n=!1,r=!1):a===ue&&(n=!1);continue}o+=l,o===D&&s<t.length-1&&(u.push(""),o=0)}!o&&u[u.length-1].length>0&&u.length>1&&(u[u.length-2]+=u.pop())},"S"),Yt=i(u=>{let e=u.split(" "),D=e.length;for(;D>0&&!(N(e[D-1])>0);)D--;return D===e.length?u:e.slice(0,D).join(" ")+e.slice(D).join("")},"cD"),Xt=i((u,e,D={})=>{if(D.trim!==!1&&u.trim()==="")return"";let t="",n,r,o=Qt(u),s=[""];for(let[l,C]of u.split(" ").entries()){D.trim!==!1&&(s[s.length-1]=s[s.length-1].trimStart());let F=N(s[s.length-1]);if(l!==0&&(F>=e&&(D.wordWrap===!1||D.trim===!1)&&(s.push(""),F=0),(F>0||D.trim===!1)&&(s[s.length-1]+=" ",F++)),D.hard&&o[l]>e){let c=e-F,E=1+Math.floor((o[l]-c-1)/e);Math.floor((o[l]-1)/e)<E&&s.push(""),du(s,C,e);continue}if(F+o[l]>e&&F>0&&o[l]>0){if(D.wordWrap===!1&&F<e){du(s,C,e);continue}s.push("")}if(F+o[l]>e&&D.wordWrap===!1){du(s,C,e);continue}s[s.length-1]+=C}D.trim!==!1&&(s=s.map(l=>Yt(l)));let a=[...s.join(`
4
- `)];for(let[l,C]of a.entries()){if(t+=C,tu.has(C)){let{groups:c}=new RegExp(`(?:\\${Xu}(?<code>\\d+)m|\\${pu}(?<uri>.*)${Cu})`).exec(a.slice(l).join(""))||{groups:{}};if(c.code!==void 0){let E=Number.parseFloat(c.code);n=E===Ht?void 0:E}else c.uri!==void 0&&(r=c.uri.length===0?void 0:c.uri)}let F=Kt.codes.get(Number(n));a[l+1]===`
2
+ var ze=Object.defineProperty;var i=(u,e)=>ze(u,"name",{value:e,configurable:!0});import S from"node:fs";import qe from"tty";import{watch as Je,rollup as Ge}from"rollup";import h from"node:path";import Ke from"@rollup/plugin-node-resolve";import He from"@rollup/plugin-commonjs";import Ze from"@rollup/plugin-json";import Qe from"@rollup/plugin-alias";import Ye from"@rollup/plugin-dynamic-import-vars";import{createFilter as Xe}from"@rollup/pluginutils";import{transform as Mu}from"esbuild";import ut,{builtinModules as et}from"node:module";import cu from"magic-string";import tt from"fs";import{attachScopes as Dt}from"rollup-pluginutils";const nt="known-flag",rt="unknown-flag",ot="argument",{stringify:q}=JSON,st=/\B([A-Z])/g,it=i(u=>u.replace(st,"-$1").toLowerCase(),"v$2"),{hasOwnProperty:at}=Object.prototype,J=i((u,e)=>at.call(u,e),"w$3"),lt=i(u=>Array.isArray(u),"L$2"),Wu=i(u=>typeof u=="function"?[u,!1]:lt(u)?[u[0],!0]:Wu(u.type),"b$2"),ct=i((u,e)=>u===Boolean?e!=="false":e,"d$3"),ft=i((u,e)=>typeof e=="boolean"?e:u===Number&&e===""?Number.NaN:u(e),"m$2"),Ft=/[\s.:=]/,Ct=i(u=>{const e=`Flag name ${q(u)}`;if(u.length===0)throw new Error(`${e} cannot be empty`);if(u.length===1)throw new Error(`${e} must be longer than a character`);const D=u.match(Ft);if(D)throw new Error(`${e} cannot contain ${q(D?.[0])}`)},"B$1"),pt=i(u=>{const e={},D=i((t,n)=>{if(J(e,t))throw new Error(`Duplicate flags named ${q(t)}`);e[t]=n},"r");for(const t in u){if(!J(u,t))continue;Ct(t);const n=u[t],r=[[],...Wu(n),n];D(t,r);const o=it(t);if(t!==o&&D(o,r),"alias"in n&&typeof n.alias=="string"){const{alias:s}=n,a=`Flag alias ${q(s)} for flag ${q(t)}`;if(s.length===0)throw new Error(`${a} cannot be empty`);if(s.length>1)throw new Error(`${a} must be a single character`);D(s,r)}}return e},"K$2"),dt=i((u,e)=>{const D={};for(const t in u){if(!J(u,t))continue;const[n,,r,o]=e[t];if(n.length===0&&"default"in o){let{default:s}=o;typeof s=="function"&&(s=s()),D[t]=s}else D[t]=r?n:n.pop()}return D},"_$3"),X="--",Et=/[.:=]/,ht=/^-{1,2}\w/,mt=i(u=>{if(!ht.test(u))return;const e=!u.startsWith(X);let D=u.slice(e?1:2),t;const n=D.match(Et);if(n){const{index:r}=n;t=D.slice(r+1),D=D.slice(0,r)}return[D,t,e]},"N$1"),gt=i((u,{onFlag:e,onArgument:D})=>{let t;const n=i((r,o)=>{if(typeof t!="function")return!0;t(r,o),t=void 0},"o");for(let r=0;r<u.length;r+=1){const o=u[r];if(o===X){n();const a=u.slice(r+1);D?.(a,[r],!0);break}const s=mt(o);if(s){if(n(),!e)continue;const[a,l,C]=s;if(C)for(let F=0;F<a.length;F+=1){n();const c=F===a.length-1;t=e(a[F],c?l:void 0,[r,F+1,c])}else t=e(a,l,[r])}else n(o,[r])&&D?.([o],[r])}n()},"$$2"),Bt=i((u,e)=>{for(const[D,t,n]of e.reverse()){if(t){const r=u[D];let o=r.slice(0,t);if(n||(o+=r.slice(t+1)),o!=="-"){u[D]=o;continue}}u.splice(D,1)}},"E$2"),At=i((u,e=process.argv.slice(2),{ignore:D}={})=>{const t=[],n=pt(u),r={},o=[];return o[X]=[],gt(e,{onFlag(s,a,l){const C=J(n,s);if(!D?.(C?nt:rt,s,a)){if(C){const[F,c]=n[s],E=ct(c,a),d=i((m,y)=>{t.push(l),y&&t.push(y),F.push(ft(c,m||""))},"p");return E===void 0?d:d(E)}J(r,s)||(r[s]=[]),r[s].push(a===void 0?!0:a),t.push(l)}},onArgument(s,a,l){D?.(ot,e[a[0]])||(o.push(...s),l?(o[X]=s,e.splice(a[0])):t.push(a))}}),Bt(e,t),{flags:dt(u,n),unknownFlags:r,_:o}},"U$2");var yt=Object.create,uu=Object.defineProperty,bt=Object.defineProperties,wt=Object.getOwnPropertyDescriptor,vt=Object.getOwnPropertyDescriptors,$t=Object.getOwnPropertyNames,Uu=Object.getOwnPropertySymbols,xt=Object.getPrototypeOf,Vu=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,zu=i((u,e,D)=>e in u?uu(u,e,{enumerable:!0,configurable:!0,writable:!0,value:D}):u[e]=D,"W$2"),eu=i((u,e)=>{for(var D in e||(e={}))Vu.call(e,D)&&zu(u,D,e[D]);if(Uu)for(var D of Uu(e))kt.call(e,D)&&zu(u,D,e[D]);return u},"p$1"),fu=i((u,e)=>bt(u,vt(e)),"c"),jt=i(u=>uu(u,"__esModule",{value:!0}),"nD"),Ot=i((u,e)=>()=>(u&&(e=u(u=0)),e),"rD"),Tt=i((u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports),"iD"),St=i((u,e,D,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of $t(e))!Vu.call(u,n)&&n!=="default"&&uu(u,n,{get:i(()=>e[n],"get"),enumerable:!(t=wt(e,n))||t.enumerable});return u},"oD"),Pt=i((u,e)=>St(jt(uu(u!=null?yt(xt(u)):{},"default",{value:u,enumerable:!0})),u),"BD"),x=Ot(()=>{}),_t=Tt((u,e)=>{x(),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}});x(),x(),x();var It=i(u=>{var e,D,t;let n=(e=process.stdout.columns)!=null?e:Number.POSITIVE_INFINITY;return typeof u=="function"&&(u=u(n)),u||(u={}),Array.isArray(u)?{columns:u,stdoutColumns:n}:{columns:(D=u.columns)!=null?D:[],stdoutColumns:(t=u.stdoutColumns)!=null?t:n}},"v$1");x(),x(),x(),x(),x();function Nt({onlyFirst:u=!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,u?void 0:"g")}i(Nt,"w$2");function qu(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(Nt(),"")}i(qu,"d$2"),x();function Rt(u){return Number.isInteger(u)?u>=4352&&(u<=4447||u===9001||u===9002||11904<=u&&u<=12871&&u!==12351||12880<=u&&u<=19903||19968<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65131||65281<=u&&u<=65376||65504<=u&&u<=65510||110592<=u&&u<=110593||127488<=u&&u<=127569||131072<=u&&u<=262141):!1}i(Rt,"y$1");var Lt=Pt(_t());function N(u){if(typeof u!="string"||u.length===0||(u=qu(u),u.length===0))return 0;u=u.replace((0,Lt.default)()," ");let e=0;for(let D=0;D<u.length;D++){let t=u.codePointAt(D);t<=31||t>=127&&t<=159||t>=768&&t<=879||(t>65535&&D++,e+=Rt(t)?2:1)}return e}i(N,"g");var Ju=i(u=>Math.max(...u.split(`
3
+ `).map(N)),"b$1"),Mt=i(u=>{let e=[];for(let D of u){let{length:t}=D,n=t-e.length;for(let r=0;r<n;r+=1)e.push(0);for(let r=0;r<t;r+=1){let o=Ju(D[r]);o>e[r]&&(e[r]=o)}}return e},"k$1");x();var Gu=/^\d+%$/,Ku={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},Wt=i((u,e)=>{var D;let t=[];for(let n=0;n<u.length;n+=1){let r=(D=e[n])!=null?D:"auto";if(typeof r=="number"||r==="auto"||r==="content-width"||typeof r=="string"&&Gu.test(r)){t.push(fu(eu({},Ku),{width:r,contentWidth:u[n]}));continue}if(r&&typeof r=="object"){let o=fu(eu(eu({},Ku),r),{contentWidth:u[n]});o.horizontalPadding=o.paddingLeft+o.paddingRight,t.push(o);continue}throw new Error(`Invalid column width: ${JSON.stringify(r)}`)}return t},"sD");function Ut(u,e){for(let D of u){let{width:t}=D;if(t==="content-width"&&(D.width=D.contentWidth),t==="auto"){let a=Math.min(20,D.contentWidth);D.width=a,D.autoOverflow=D.contentWidth-a}if(typeof t=="string"&&Gu.test(t)){let a=Number.parseFloat(t.slice(0,-1))/100;D.width=Math.floor(e*a)-(D.paddingLeft+D.paddingRight)}let{horizontalPadding:n}=D,r=1,o=r+n;if(o>=e){let a=o-e,l=Math.ceil(D.paddingLeft/n*a),C=a-l;D.paddingLeft-=l,D.paddingRight-=C,D.horizontalPadding=D.paddingLeft+D.paddingRight}D.paddingLeftString=D.paddingLeft?" ".repeat(D.paddingLeft):"",D.paddingRightString=D.paddingRight?" ".repeat(D.paddingRight):"";let s=e-D.horizontalPadding;D.width=Math.max(Math.min(D.width,s),r)}}i(Ut,"aD");var Hu=i(()=>Object.assign([],{columns:0}),"G$1");function Vt(u,e){let D=[Hu()],[t]=D;for(let n of u){let r=n.width+n.horizontalPadding;t.columns+r>e&&(t=Hu(),D.push(t)),t.push(n),t.columns+=r}for(let n of D){let r=n.reduce((c,E)=>c+E.width+E.horizontalPadding,0),o=e-r;if(o===0)continue;let s=n.filter(c=>"autoOverflow"in c),a=s.filter(c=>c.autoOverflow>0),l=a.reduce((c,E)=>c+E.autoOverflow,0),C=Math.min(l,o);for(let c of a){let E=Math.floor(c.autoOverflow/l*C);c.width+=E,o-=E}let F=Math.floor(o/s.length);for(let c=0;c<s.length;c+=1){let E=s[c];c===s.length-1?E.width+=o:E.width+=F,o-=F}}return D}i(Vt,"lD");function zt(u,e,D){let t=Wt(D,e);return Ut(t,u),Vt(t,u)}i(zt,"Z$2"),x(),x(),x();var Fu=10,Zu=i((u=0)=>e=>`\x1B[${e+u}m`,"U$1"),Qu=i((u=0)=>e=>`\x1B[${38+u};5;${e}m`,"V$2"),Yu=i((u=0)=>(e,D,t)=>`\x1B[${38+u};2;${e};${D};${t}m`,"Y$1");function qt(){let u=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[D,t]of Object.entries(e)){for(let[n,r]of Object.entries(t))e[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},t[n]=e[n],u.set(r[0],r[1]);Object.defineProperty(e,D,{value:t,enumerable:!1})}return Object.defineProperty(e,"codes",{value:u,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=Zu(),e.color.ansi256=Qu(),e.color.ansi16m=Yu(),e.bgColor.ansi=Zu(Fu),e.bgColor.ansi256=Qu(Fu),e.bgColor.ansi16m=Yu(Fu),Object.defineProperties(e,{rgbToAnsi256:{value:i((D,t,n)=>D===t&&t===n?D<8?16:D>248?231:Math.round((D-8)/247*24)+232:16+36*Math.round(D/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),"value"),enumerable:!1},hexToRgb:{value:i(D=>{let t=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(D.toString(16));if(!t)return[0,0,0];let{colorString:n}=t.groups;n.length===3&&(n=n.split("").map(o=>o+o).join(""));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},"value"),enumerable:!1},hexToAnsi256:{value:i(D=>e.rgbToAnsi256(...e.hexToRgb(D)),"value"),enumerable:!1},ansi256ToAnsi:{value:i(D=>{if(D<8)return 30+D;if(D<16)return 90+(D-8);let t,n,r;if(D>=232)t=((D-232)*10+8)/255,n=t,r=t;else{D-=16;let a=D%36;t=Math.floor(D/36)/5,n=Math.floor(a/6)/5,r=a%6/5}let o=Math.max(t,n,r)*2;if(o===0)return 30;let s=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return o===2&&(s+=60),s},"value"),enumerable:!1},rgbToAnsi:{value:i((D,t,n)=>e.ansi256ToAnsi(e.rgbToAnsi256(D,t,n)),"value"),enumerable:!1},hexToAnsi:{value:i(D=>e.ansi256ToAnsi(e.hexToAnsi256(D)),"value"),enumerable:!1}}),e}i(qt,"AD");var Jt=qt(),Gt=Jt,tu=new Set(["\x1B","\x9B"]),Kt=39,Cu="\x07",Xu="[",Ht="]",ue="m",pu=`${Ht}8;;`,ee=i(u=>`${tu.values().next().value}${Xu}${u}${ue}`,"J$2"),te=i(u=>`${tu.values().next().value}${pu}${u}${Cu}`,"Q$1"),Zt=i(u=>u.split(" ").map(e=>N(e)),"hD"),du=i((u,e,D)=>{let t=[...e],n=!1,r=!1,o=N(qu(u[u.length-1]));for(let[s,a]of t.entries()){let l=N(a);if(o+l<=D?u[u.length-1]+=a:(u.push(a),o=0),tu.has(a)&&(n=!0,r=t.slice(s+1).join("").startsWith(pu)),n){r?a===Cu&&(n=!1,r=!1):a===ue&&(n=!1);continue}o+=l,o===D&&s<t.length-1&&(u.push(""),o=0)}!o&&u[u.length-1].length>0&&u.length>1&&(u[u.length-2]+=u.pop())},"S"),Qt=i(u=>{let e=u.split(" "),D=e.length;for(;D>0&&!(N(e[D-1])>0);)D--;return D===e.length?u:e.slice(0,D).join(" ")+e.slice(D).join("")},"cD"),Yt=i((u,e,D={})=>{if(D.trim!==!1&&u.trim()==="")return"";let t="",n,r,o=Zt(u),s=[""];for(let[l,C]of u.split(" ").entries()){D.trim!==!1&&(s[s.length-1]=s[s.length-1].trimStart());let F=N(s[s.length-1]);if(l!==0&&(F>=e&&(D.wordWrap===!1||D.trim===!1)&&(s.push(""),F=0),(F>0||D.trim===!1)&&(s[s.length-1]+=" ",F++)),D.hard&&o[l]>e){let c=e-F,E=1+Math.floor((o[l]-c-1)/e);Math.floor((o[l]-1)/e)<E&&s.push(""),du(s,C,e);continue}if(F+o[l]>e&&F>0&&o[l]>0){if(D.wordWrap===!1&&F<e){du(s,C,e);continue}s.push("")}if(F+o[l]>e&&D.wordWrap===!1){du(s,C,e);continue}s[s.length-1]+=C}D.trim!==!1&&(s=s.map(l=>Qt(l)));let a=[...s.join(`
4
+ `)];for(let[l,C]of a.entries()){if(t+=C,tu.has(C)){let{groups:c}=new RegExp(`(?:\\${Xu}(?<code>\\d+)m|\\${pu}(?<uri>.*)${Cu})`).exec(a.slice(l).join(""))||{groups:{}};if(c.code!==void 0){let E=Number.parseFloat(c.code);n=E===Kt?void 0:E}else c.uri!==void 0&&(r=c.uri.length===0?void 0:c.uri)}let F=Gt.codes.get(Number(n));a[l+1]===`
5
5
  `?(r&&(t+=te("")),n&&F&&(t+=ee(F))):C===`
6
- `&&(n&&F&&(t+=ee(n)),r&&(t+=te(r)))}return t},"dD");function uD(u,e,D){return String(u).normalize().replace(/\r\n/g,`
6
+ `&&(n&&F&&(t+=ee(n)),r&&(t+=te(r)))}return t},"dD");function Xt(u,e,D){return String(u).normalize().replace(/\r\n/g,`
7
7
  `).split(`
8
- `).map(t=>Xt(t,e,D)).join(`
9
- `)}i(uD,"T$1");var De=i(u=>Array.from({length:u}).fill(""),"X$1");function eD(u,e){let D=[],t=0;for(let n of u){let r=0,o=n.map(a=>{var l;let C=(l=e[t])!=null?l:"";t+=1,a.preprocess&&(C=a.preprocess(C)),Ju(C)>a.width&&(C=uD(C,a.width,{hard:!0}));let F=C.split(`
8
+ `).map(t=>Yt(t,e,D)).join(`
9
+ `)}i(Xt,"T$1");var De=i(u=>Array.from({length:u}).fill(""),"X$1");function uD(u,e){let D=[],t=0;for(let n of u){let r=0,o=n.map(a=>{var l;let C=(l=e[t])!=null?l:"";t+=1,a.preprocess&&(C=a.preprocess(C)),Ju(C)>a.width&&(C=Xt(C,a.width,{hard:!0}));let F=C.split(`
10
10
  `);if(a.postprocess){let{postprocess:c}=a;F=F.map((E,d)=>c.call(a,E,d))}return a.paddingTop&&F.unshift(...De(a.paddingTop)),a.paddingBottom&&F.push(...De(a.paddingBottom)),F.length>r&&(r=F.length),fu(eu({},a),{lines:F})}),s=[];for(let a=0;a<r;a+=1){let l=o.map(C=>{var F;let c=(F=C.lines[a])!=null?F:"",E=Number.isFinite(C.width)?" ".repeat(C.width-N(c)):"",d=C.paddingLeftString;return C.align==="right"&&(d+=E),d+=c,C.align==="left"&&(d+=E),d+C.paddingRightString}).join("");s.push(l)}D.push(s.join(`
11
11
  `))}return D.join(`
12
- `)}i(eD,"P$1");function tD(u,e){if(!u||u.length===0)return"";let D=Wt(u),t=D.length;if(t===0)return"";let{stdoutColumns:n,columns:r}=Nt(e);if(r.length>t)throw new Error(`${r.length} columns defined, but only ${t} columns found`);let o=qt(n,r,D);return u.map(s=>eD(o,s)).join(`
13
- `)}i(tD,"mD"),x();var DD=["<",">","=",">=","<="];function nD(u){if(!DD.includes(u))throw new TypeError(`Invalid breakpoint operator: ${u}`)}i(nD,"xD");function rD(u){let e=Object.keys(u).map(D=>{let[t,n]=D.split(" ");nD(t);let r=Number.parseInt(n,10);if(Number.isNaN(r))throw new TypeError(`Invalid breakpoint value: ${n}`);let o=u[D];return{operator:t,breakpoint:r,value:o}}).sort((D,t)=>t.breakpoint-D.breakpoint);return D=>{var t;return(t=e.find(({operator:n,breakpoint:r})=>n==="="&&D===r||n===">"&&D>r||n==="<"&&D<r||n===">="&&D>=r||n==="<="&&D<=r))==null?void 0:t.value}}i(rD,"wD");const oD=i(u=>u.replace(/[\W_]([a-z\d])?/gi,(e,D)=>D?D.toUpperCase():""),"P"),sD=i(u=>u.replace(/\B([A-Z])/g,"-$1").toLowerCase(),"q$1"),iD={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:i(u=>u.trim(),"preprocess")},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function aD(u){let e=!1;return{type:"table",data:{tableData:Object.keys(u).sort((D,t)=>D.localeCompare(t)).map(D=>{const t=u[D],n="alias"in t;return n&&(e=!0),{name:D,flag:t,flagFormatted:`--${sD(D)}`,aliasesEnabled:e,aliasFormatted:n?`-${t.alias}`:void 0}}).map(D=>(D.aliasesEnabled=e,[{type:"flagName",data:D},{type:"flagDescription",data:D}])),tableBreakpoints:iD}}}i(aD,"D");const ne=i(u=>!u||(u.version??(u.help?u.help.version:void 0)),"A$1"),re=i(u=>{const e="parent"in u&&u.parent?.name;return(e?`${e} `:"")+u.name},"C$1");function lD(u){const e=[];u.name&&e.push(re(u));const D=ne(u)??("parent"in u&&ne(u.parent));if(D&&e.push(`v${D}`),e.length!==0)return{id:"name",type:"text",data:`${e.join(" ")}
14
- `}}i(lD,"R$1");function cD(u){const{help:e}=u;if(!(!e||!e.description))return{id:"description",type:"text",data:`${e.description}
15
- `}}i(cD,"L");function fD(u){const e=u.help||{};if("usage"in e)return e.usage?{id:"usage",type:"section",data:{title:"Usage:",body:Array.isArray(e.usage)?e.usage.join(`
12
+ `)}i(uD,"P$1");function eD(u,e){if(!u||u.length===0)return"";let D=Mt(u),t=D.length;if(t===0)return"";let{stdoutColumns:n,columns:r}=It(e);if(r.length>t)throw new Error(`${r.length} columns defined, but only ${t} columns found`);let o=zt(n,r,D);return u.map(s=>uD(o,s)).join(`
13
+ `)}i(eD,"mD"),x();var tD=["<",">","=",">=","<="];function DD(u){if(!tD.includes(u))throw new TypeError(`Invalid breakpoint operator: ${u}`)}i(DD,"xD");function nD(u){let e=Object.keys(u).map(D=>{let[t,n]=D.split(" ");DD(t);let r=Number.parseInt(n,10);if(Number.isNaN(r))throw new TypeError(`Invalid breakpoint value: ${n}`);let o=u[D];return{operator:t,breakpoint:r,value:o}}).sort((D,t)=>t.breakpoint-D.breakpoint);return D=>{var t;return(t=e.find(({operator:n,breakpoint:r})=>n==="="&&D===r||n===">"&&D>r||n==="<"&&D<r||n===">="&&D>=r||n==="<="&&D<=r))==null?void 0:t.value}}i(nD,"wD");const rD=i(u=>u.replace(/[\W_]([a-z\d])?/gi,(e,D)=>D?D.toUpperCase():""),"P"),oD=i(u=>u.replace(/\B([A-Z])/g,"-$1").toLowerCase(),"q$1"),sD={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:i(u=>u.trim(),"preprocess")},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function iD(u){let e=!1;return{type:"table",data:{tableData:Object.keys(u).sort((D,t)=>D.localeCompare(t)).map(D=>{const t=u[D],n="alias"in t;return n&&(e=!0),{name:D,flag:t,flagFormatted:`--${oD(D)}`,aliasesEnabled:e,aliasFormatted:n?`-${t.alias}`:void 0}}).map(D=>(D.aliasesEnabled=e,[{type:"flagName",data:D},{type:"flagDescription",data:D}])),tableBreakpoints:sD}}}i(iD,"D");const ne=i(u=>!u||(u.version??(u.help?u.help.version:void 0)),"A$1"),re=i(u=>{const e="parent"in u&&u.parent?.name;return(e?`${e} `:"")+u.name},"C$1");function aD(u){const e=[];u.name&&e.push(re(u));const D=ne(u)??("parent"in u&&ne(u.parent));if(D&&e.push(`v${D}`),e.length!==0)return{id:"name",type:"text",data:`${e.join(" ")}
14
+ `}}i(aD,"R$1");function lD(u){const{help:e}=u;if(!(!e||!e.description))return{id:"description",type:"text",data:`${e.description}
15
+ `}}i(lD,"L");function cD(u){const e=u.help||{};if("usage"in e)return e.usage?{id:"usage",type:"section",data:{title:"Usage:",body:Array.isArray(e.usage)?e.usage.join(`
16
16
  `):e.usage}}:void 0;if(u.name){const D=[],t=[re(u)];if(u.flags&&Object.keys(u.flags).length>0&&t.push("[flags...]"),u.parameters&&u.parameters.length>0){const{parameters:n}=u,r=n.indexOf("--"),o=r>-1&&n.slice(r+1).some(s=>s.startsWith("<"));t.push(n.map(s=>s!=="--"?s:o?"--":"[--]").join(" "))}if(t.length>1&&D.push(t.join(" ")),"commands"in u&&u.commands?.length&&D.push(`${u.name} <command>`),D.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:D.join(`
17
- `)}}}}i(fD,"T");function FD(u){return!("commands"in u)||!u.commands?.length?void 0:{id:"commands",type:"section",data:{title:"Commands:",body:{type:"table",data:{tableData:u.commands.map(e=>[e.options.name,e.options.help?e.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}i(FD,"_$1");function CD(u){if(!(!u.flags||Object.keys(u.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:aD(u.flags),indentBody:0}}}i(CD,"k");function pD(u){const{help:e}=u;if(!e||!e.examples||e.examples.length===0)return;let{examples:D}=e;if(Array.isArray(D)&&(D=D.join(`
18
- `)),D)return{id:"examples",type:"section",data:{title:"Examples:",body:D}}}i(pD,"F");function dD(u){if(!("alias"in u)||!u.alias)return;const{alias:e}=u;return{id:"aliases",type:"section",data:{title:"Aliases:",body:Array.isArray(e)?e.join(", "):e}}}i(dD,"H$1");const ED=i(u=>[lD,cD,fD,FD,CD,pD,dD].map(e=>e(u)).filter(Boolean),"U"),hD=qe.WriteStream.prototype.hasColors();let mD=class{static{i(this,"J")}text(e){return e}bold(e){return hD?`\x1B[1m${e}\x1B[22m`:e.toLocaleUpperCase()}indentText({text:e,spaces:D}){return e.replace(/^/gm," ".repeat(D))}heading(e){return this.bold(e)}section({title:e,body:D,indentBody:t=2}){return`${(e?`${this.heading(e)}
17
+ `)}}}}i(cD,"T");function fD(u){return!("commands"in u)||!u.commands?.length?void 0:{id:"commands",type:"section",data:{title:"Commands:",body:{type:"table",data:{tableData:u.commands.map(e=>[e.options.name,e.options.help?e.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}i(fD,"_$1");function FD(u){if(!(!u.flags||Object.keys(u.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:iD(u.flags),indentBody:0}}}i(FD,"k");function CD(u){const{help:e}=u;if(!e||!e.examples||e.examples.length===0)return;let{examples:D}=e;if(Array.isArray(D)&&(D=D.join(`
18
+ `)),D)return{id:"examples",type:"section",data:{title:"Examples:",body:D}}}i(CD,"F");function pD(u){if(!("alias"in u)||!u.alias)return;const{alias:e}=u;return{id:"aliases",type:"section",data:{title:"Aliases:",body:Array.isArray(e)?e.join(", "):e}}}i(pD,"H$1");const dD=i(u=>[aD,lD,cD,fD,FD,CD,pD].map(e=>e(u)).filter(Boolean),"U"),ED=qe.WriteStream.prototype.hasColors();let hD=class{static{i(this,"J")}text(e){return e}bold(e){return ED?`\x1B[1m${e}\x1B[22m`:e.toLocaleUpperCase()}indentText({text:e,spaces:D}){return e.replace(/^/gm," ".repeat(D))}heading(e){return this.bold(e)}section({title:e,body:D,indentBody:t=2}){return`${(e?`${this.heading(e)}
19
19
  `:"")+(D?this.indentText({text:this.render(D),spaces:t}):"")}
20
- `}table({tableData:e,tableOptions:D,tableBreakpoints:t}){return tD(e.map(n=>n.map(r=>this.render(r))),t?rD(t):D)}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:D,flagFormatted:t,aliasesEnabled:n,aliasFormatted:r}=e;let o="";if(r?o+=`${r}, `:n&&(o+=" "),o+=t,"placeholder"in D&&typeof D.placeholder=="string")o+=`${this.flagOperator(e)}${D.placeholder}`;else{const s=this.flagParameter("type"in D?D.type:D);s&&(o+=`${this.flagOperator(e)}${s}`)}return o}flagDefault(e){return JSON.stringify(e)}flagDescription({flag:e}){let D="description"in e?e.description??"":"";if("default"in e){let{default:t}=e;typeof t=="function"&&(t=t()),t&&(D+=` (default: ${this.flagDefault(t)})`)}return D}render(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(D=>this.render(D)).join(`
21
- `);if("type"in e&&this[e.type]){const D=this[e.type];if(typeof D=="function")return D.call(this,e.data)}throw new Error(`Invalid node type: ${JSON.stringify(e)}`)}};const oe=i(u=>u.length>0&&!u.includes(" "),"y"),{stringify:T}=JSON,gD=/[|\\{}()[\]^$+*?.]/;function Eu(u){const e=[];let D,t;for(const n of u){if(t)throw new Error(`Invalid parameter: Spread parameter ${T(t)} must be last`);const r=n[0],o=n[n.length-1];let s;if(r==="<"&&o===">"&&(s=!0,D))throw new Error(`Invalid parameter: Required parameter ${T(n)} cannot come after optional parameter ${T(D)}`);if(r==="["&&o==="]"&&(s=!1,D=n),s===void 0)throw new Error(`Invalid parameter: ${T(n)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let a=n.slice(1,-1);const l=a.slice(-3)==="...";l&&(t=n,a=a.slice(0,-3));const C=a.match(gD);if(C)throw new Error(`Invalid parameter: ${T(n)}. Invalid character found ${T(C[0])}`);e.push({name:a,required:s,spread:l})}return e}i(Eu,"w$1");function hu(u,e,D,t){for(let n=0;n<e.length;n+=1){const{name:r,required:o,spread:s}=e[n],a=oD(r);if(a in u)throw new Error(`Invalid parameter: ${T(r)} is used more than once.`);const l=s?D.slice(n):D[n];if(s&&(n=e.length),o&&(!l||s&&l.length===0))return console.error(`Error: Missing required parameter ${T(r)}
22
- `),t(),process.exit(1);u[a]=l}}i(hu,"b");function BD(u){return u===void 0||u!==!1}i(BD,"W$1");function se(u,e,D,t){const n={...e.flags},r=e.version;r&&(n.version={type:Boolean,description:"Show version"});const{help:o}=e,s=BD(o);s&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const a=yt(n,t,{ignore:e.ignoreArgv}),l=i(()=>{console.log(e.version)},"f");if(r&&a.flags.version===!0)return l(),process.exit(0);const C=new mD,F=s&&o?.render?o.render:d=>C.render(d),c=i(d=>{const m=ED({...e,...d?{help:d}:{},flags:n});console.log(F(m,C))},"p");if(s&&a.flags.help===!0)return c(),process.exit(0);if(e.parameters){let{parameters:d}=e,m=a._;const y=d.indexOf("--"),j=d.slice(y+1),$=Object.create(null);if(y>-1&&j.length>0){d=d.slice(0,y);const p=a._["--"];m=m.slice(0,-p.length||void 0),hu($,Eu(d),m,c),hu($,Eu(j),p,c)}else hu($,Eu(d),m,c);Object.assign(a._,$)}const E={...a,showVersion:l,showHelp:c};return typeof D=="function"&&D(E),{command:u,...E}}i(se,"x$1");function AD(u,e){const D=new Map;for(const t of e){const n=[t.options.name],{alias:r}=t.options;r&&(Array.isArray(r)?n.push(...r):n.push(r));for(const o of n){if(D.has(o))throw new Error(`Duplicate command name found: ${T(o)}`);D.set(o,t)}}return D.get(u)}i(AD,"z$1");function yD(u,e,D=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!oe(u.name)))throw new Error(`Invalid script name: ${T(u.name)}`);const t=D[0];if(u.commands&&oe(t)){const n=AD(t,u.commands);if(n)return se(n.options.name,{...n.options,parent:u},n.callback,D.slice(1))}return se(void 0,u,e,D)}i(yD,"Z$1");var bD="2.9.0";const mu=i(u=>S.promises.access(u).then(()=>!0,()=>!1),"fsExists"),wD=i(async u=>{const e=h.join(u,"package.json");if(!await mu(e))throw new Error(`package.json not found at: ${e}`);const t=await S.promises.readFile(e,"utf8");try{return JSON.parse(t)}catch(n){throw new Error(`Cannot parse package.json: ${n.message}`)}},"readPackageJson"),vD=/^[/.]/,G=i((u,e)=>(!h.isAbsolute(u)&&!vD.test(u)&&(u=`./${u}`),e&&!u.endsWith("/")&&(u+="/"),u),"normalizePath"),$D=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,xD=new Set(["do","if","in","for","int","new","try","var","byte","case","char","else","enum","goto","long","null","this","true","void","with","break","catch","class","const","false","final","float","short","super","throw","while","delete","double","export","import","native","public","return","static","switch","throws","typeof","boolean","default","extends","finally","package","private","abstract","continue","debugger","function","volatile","interface","protected","transient","implements","instanceof","synchronized"]),gu=i(u=>!$D.test(u)||xD.has(u),"propertyNeedsQuotes"),P=i(u=>{if(u.endsWith(".mjs"))return"module";if(u.endsWith(".cjs"))return"commonjs"},"getFileType"),ie=i(u=>u.startsWith("."),"isPath"),Bu=i((u,e,D="exports")=>{if(u){if(typeof u=="string")return ie(u)?[{outputPath:u,type:P(u)||e,from:D}]:[];if(Array.isArray(u))return u.flatMap((t,n)=>{const r=`${D}[${n}]`;return typeof t=="string"?ie(t)?{outputPath:t,type:P(t)||e,from:r}:[]:Bu(t,e,r)});if(typeof u=="object")return Object.entries(u).flatMap(([t,n])=>{if(typeof n=="string"){const o=gu(t)?`["${t}"]`:`.${t}`,s={outputPath:n,from:`${D}${o}`};if(t==="require")return{...s,type:"commonjs"};if(t==="import")return{...s,type:P(n)||e};if(t==="types")return{...s,type:"types"};if(t==="node")return{...s,type:P(n)||e,platform:"node"};if(t==="default")return{...s,type:P(n)||e}}const r=gu(t)?`["${t}"]`:`.${t}`;return Bu(n,e,`${D}${r}`)})}return[]},"parseExportsMap"),M=i((u,e)=>{e.outputPath=G(e.outputPath);const{outputPath:D,type:t,platform:n}=e,r=u[D];if(r){if(r.type!==t)throw new Error(`Conflicting export types "${r.type}" & "${t}" found for ${D}`);if(r.platform!==n)throw new Error(`Conflicting export platforms "${r.platform}" & "${n}" found for ${D}`);Object.assign(r,e)}else u[D]=e},"addExportPath"),kD=i(u=>{const e={},D=u.type??"commonjs";if(u.main){const t=u.main;M(e,{outputPath:t,type:P(t)??D,from:"main"})}if(u.module&&M(e,{outputPath:u.module,type:"module",from:"module"}),u.types&&M(e,{outputPath:u.types,type:"types",from:"types"}),u.bin){const{bin:t}=u;if(typeof t=="string")M(e,{outputPath:t,type:P(t)??D,isExecutable:!0,from:"bin"});else for(const[n,r]of Object.entries(t)){const o=gu(n)?`["${n}"]`:`.${n}`;M(e,{outputPath:r,type:P(r)??D,isExecutable:!0,from:`bin${o}`})}}if(u.exports){const t=Bu(u.exports,D);for(const n of t)M(e,n)}return Object.values(e)},"getExportEntries"),jD=i(u=>{let e=!1;if(u.includes("=")){const[D,t]=u.split("=");u=t,e=D==="bin"||D==="binary"}return{outputPath:G(u),type:P(u),isExecutable:e,from:"cli"}},"parseCliInputFlag"),OD=i(({imports:u},e)=>{const D={};if(u)for(const t in u){if(t.startsWith("#"))continue;const n=u[t];typeof n=="string"&&(D[t]=h.join(e,n))}return D},"getAliases"),{stringify:TD}=JSON,SD=i(async(u,e)=>{for(const D of e){const t=u+D;if(await mu(t))return{extension:D,path:t}}},"tryExtensions"),ae={".d.ts":[".d.ts",".d.mts",".d.cts",".ts",".tsx",".mts",".cts"],".d.mts":[".d.mts",".d.ts",".d.cts",".ts",".tsx",".mts",".cts"],".d.cts":[".d.cts",".d.ts",".d.mts",".ts",".tsx",".mts",".cts"],".js":[".js",".ts",".tsx",".mts",".cts"],".mjs":[".mjs",".js",".cjs",".mts",".cts",".ts",".tsx"],".cjs":[".cjs",".js",".mjs",".mts",".cts",".ts",".tsx"]},PD=Object.keys(ae),_D=i(async(u,e,D)=>{const t=e+u.outputPath.slice(D.length);for(const n of PD)if(u.outputPath.endsWith(n)){const r=await SD(t.slice(0,-n.length),ae[n]);if(r)return{input:r.path,srcExtension:r.extension,distExtension:n}}throw new Error(`Could not find matching source file for export path ${TD(u.outputPath)}`)},"getSourcePath"),ID=["peerDependencies","dependencies","optionalDependencies"],Au="@types/",le=i((u,e,D=!1)=>{const t=[],{devDependencies:n}=u;for(const r of ID){const o=u[r];if(!o)continue;const s=Object.keys(o);for(const a of s)if(!(a in e))if(a.startsWith(Au)){if(D){let l=a.slice(Au.length);l.includes("__")&&(l=`@${l.replace("__","/")}`),t.push(l)}}else{if(n&&D){const l=Au+a.replace("@","").replace("/","__");n[l]&&!(l in o)&&console.warn(`Recommendation: "${l}" is externalized because "${a}" is in "${r}". Place "${l}" in "${r}" as well so users don't have missing types.`)}t.push(a)}}return t.flatMap(r=>[r,new RegExp(`^${r}/`)])},"getExternalDependencies"),ND=i(u=>{const e=ut(/\.([cm]?ts|[jt]sx)$/);return{name:"esbuild-transform",transform:i(async(D,t)=>{if(!e(t))return null;const n=await Mu(D,{...u,loader:"default",sourcefile:t.replace(/\.[cm]ts/,".ts")});return{code:n.code,map:n.map||null}},"transform")}},"esbuildTransform"),RD=i(u=>{if(u==="es")return"esm";if(u==="cjs"||u==="iife")return u},"getEsbuildFormat"),LD=i(u=>({name:"esbuild-minify",renderChunk:i(async(e,D,t)=>{const n=await Mu(e,{...u,format:RD(t.format),minify:!0,keepNames:!0});return{code:n.code,map:n.map||null}},"renderChunk")}),"esbuildMinify"),yu=i((u,e)=>u[0]-e[0]||u[1]-e[1]||u[2]-e[2],"compareSemver"),ce=i(({target:u})=>{const e=u.some(D=>{if(D=D.trim(),!D.startsWith("node"))return;const t=D.slice(4).split(".").map(Number),n=[t[0],t[1]??0,t[2]??0];return!(yu(n,[12,20,0])>=0&&yu(n,[13,0,0])<0||yu(n,[14,13,1])>=0)});return{name:"externalize-node-builtins",resolveId:i(D=>{const t=D.startsWith("node:");if(e&&t&&(D=D.slice(5)),tt.includes(D)||t)return{id:D,external:!0}},"resolveId")}},"externalizeNodeBuiltins"),MD=i(u=>({name:"patch-binary",renderChunk:i((e,D,t)=>{if(!D.isEntry||!D.facadeModuleId)return;const n=t.entryFileNames,r=`./${h.posix.join(t.dir,n(D))}`;if(u.includes(r)){const o=new cu(e);return o.prepend(`#!/usr/bin/env node
23
- `),{code:o.toString(),map:t.sourcemap?o.generateMap({hires:!0}):void 0}}},"renderChunk"),writeBundle:i(async(e,D)=>{const t=e.entryFileNames,n=Object.values(D).map(async r=>{const o=r;if(o.isEntry&&o.facadeModuleId){const s=`./${h.posix.join(e.dir,t(o))}`;await S.promises.chmod(s,493)}});await Promise.all(n)},"writeBundle")}),"patchBinary"),fe=i(()=>{const u=/\.(?:[mc]?js|jsx)$/;return{name:"resolve-typescript-mjs-cjs",resolveId(e,D,t){return u.test(e)&&D?this.resolve(e.replace(/js(x?)$/,"ts$1"),D,t):null}}},"resolveTypescriptMjsCts"),Fe=i(u=>u!==null&&typeof u=="object","A"),W=i((u,e)=>Object.assign(new Error(`[${u}]: ${e}`),{code:u}),"a"),Ce="ERR_INVALID_PACKAGE_CONFIG",bu="ERR_INVALID_PACKAGE_TARGET",WD="ERR_PACKAGE_PATH_NOT_EXPORTED",UD=/^\d+$/,VD=/^(\.{1,2}|node_modules)$/i,zD=/\/|\\/;var pe=(u=>(u.Export="exports",u.Import="imports",u))(pe||{});const wu=i((u,e,D,t,n)=>{if(e==null)return[];if(typeof e=="string"){const[r,...o]=e.split(zD);if(r===".."||o.some(s=>VD.test(s)))throw W(bu,`Invalid "${u}" target "${e}" defined in the package config`);return[n?e.replace(/\*/g,n):e]}if(Array.isArray(e))return e.flatMap(r=>wu(u,r,D,t,n));if(Fe(e)){for(const r of Object.keys(e)){if(UD.test(r))throw W(Ce,"Cannot contain numeric property keys");if(r==="default"||t.includes(r))return wu(u,e[r],D,t,n)}return[]}throw W(bu,`Invalid "${u}" target "${e}"`)},"f"),K="*",qD=i((u,e)=>{const D=u.indexOf(K),t=e.indexOf(K);return D===t?e.length>u.length:t>D},"m");function JD(u,e){if(!e.includes(K)&&u.hasOwnProperty(e))return[e];let D,t;for(const n of Object.keys(u))if(n.includes(K)){const[r,o,s]=n.split(K);if(s===void 0&&e.startsWith(r)&&e.endsWith(o)){const a=e.slice(r.length,-o.length||void 0);a&&(!D||qD(D,n))&&(D=n,t=a)}}return[D,t]}i(JD,"d");const GD=i(u=>Object.keys(u).reduce((e,D)=>{const t=D===""||D[0]!==".";if(e===void 0||e===t)return t;throw W(Ce,'"exports" cannot contain some keys starting with "." and some not')},void 0),"p"),KD=/^\w+:/,HD=i((u,e,D)=>{if(!u)throw new Error('"exports" is required');e=e===""?".":`./${e}`,(typeof u=="string"||Array.isArray(u)||Fe(u)&&GD(u))&&(u={".":u});const[t,n]=JD(u,e),r=wu(pe.Export,u[t],e,D,n);if(r.length===0)throw W(WD,e==="."?'No "exports" main defined':`Package subpath '${e}' is not defined by "exports"`);for(const o of r)if(!o.startsWith("./")&&!KD.test(o))throw W(bu,`Invalid "exports" target "${o}" defined in the package config`);return r},"v");var ZD=Object.defineProperty,f=i((u,e)=>ZD(u,"name",{value:e,configurable:!0}),"o");function k(u){return u.startsWith("\\\\?\\")?u:u.replace(/\\/g,"/")}i(k,"E"),f(k,"slash");const vu=f(u=>{const e=S[u];return(D,...t)=>{const n=`${u}:${t.join(":")}`;let r=D?.get(n);return r===void 0&&(r=Reflect.apply(e,S,t),D?.set(n,r)),r}},"cacheFs"),O=vu("existsSync"),QD=vu("readFileSync"),Du=vu("statSync"),de=f((u,e,D)=>{for(;;){const t=h.posix.join(u,e);if(O(D,t))return t;const n=h.dirname(u);if(n===u)return;u=n}},"findUp"),$u=/^\.{1,2}(\/.*)?$/,xu=f(u=>{const e=k(u);return $u.test(e)?e:`./${e}`},"normalizeRelativePath");function Ee(u,e=!1){const D=u.length;let t=0,n="",r=0,o=16,s=0,a=0,l=0,C=0,F=0;function c(p,B){let g=0,b=0;for(;g<p;){let w=u.charCodeAt(t);if(w>=48&&w<=57)b=b*16+w-48;else if(w>=65&&w<=70)b=b*16+w-65+10;else if(w>=97&&w<=102)b=b*16+w-97+10;else break;t++,g++}return g<p&&(b=-1),b}i(c,"_"),f(c,"scanHexDigits");function E(p){t=p,n="",r=0,o=16,F=0}i(E,"d"),f(E,"setPosition");function d(){let p=t;if(u.charCodeAt(t)===48)t++;else for(t++;t<u.length&&R(u.charCodeAt(t));)t++;if(t<u.length&&u.charCodeAt(t)===46)if(t++,t<u.length&&R(u.charCodeAt(t)))for(t++;t<u.length&&R(u.charCodeAt(t));)t++;else return F=3,u.substring(p,t);let B=t;if(t<u.length&&(u.charCodeAt(t)===69||u.charCodeAt(t)===101))if(t++,(t<u.length&&u.charCodeAt(t)===43||u.charCodeAt(t)===45)&&t++,t<u.length&&R(u.charCodeAt(t))){for(t++;t<u.length&&R(u.charCodeAt(t));)t++;B=t}else F=3;return u.substring(p,B)}i(d,"A"),f(d,"scanNumber");function m(){let p="",B=t;for(;;){if(t>=D){p+=u.substring(B,t),F=2;break}const g=u.charCodeAt(t);if(g===34){p+=u.substring(B,t),t++;break}if(g===92){if(p+=u.substring(B,t),t++,t>=D){F=2;break}switch(u.charCodeAt(t++)){case 34:p+='"';break;case 92:p+="\\";break;case 47:p+="/";break;case 98:p+="\b";break;case 102:p+="\f";break;case 110:p+=`
20
+ `}table({tableData:e,tableOptions:D,tableBreakpoints:t}){return eD(e.map(n=>n.map(r=>this.render(r))),t?nD(t):D)}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:D,flagFormatted:t,aliasesEnabled:n,aliasFormatted:r}=e;let o="";if(r?o+=`${r}, `:n&&(o+=" "),o+=t,"placeholder"in D&&typeof D.placeholder=="string")o+=`${this.flagOperator(e)}${D.placeholder}`;else{const s=this.flagParameter("type"in D?D.type:D);s&&(o+=`${this.flagOperator(e)}${s}`)}return o}flagDefault(e){return JSON.stringify(e)}flagDescription({flag:e}){let D="description"in e?e.description??"":"";if("default"in e){let{default:t}=e;typeof t=="function"&&(t=t()),t&&(D+=` (default: ${this.flagDefault(t)})`)}return D}render(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(D=>this.render(D)).join(`
21
+ `);if("type"in e&&this[e.type]){const D=this[e.type];if(typeof D=="function")return D.call(this,e.data)}throw new Error(`Invalid node type: ${JSON.stringify(e)}`)}};const oe=i(u=>u.length>0&&!u.includes(" "),"y"),{stringify:T}=JSON,mD=/[|\\{}()[\]^$+*?.]/;function Eu(u){const e=[];let D,t;for(const n of u){if(t)throw new Error(`Invalid parameter: Spread parameter ${T(t)} must be last`);const r=n[0],o=n[n.length-1];let s;if(r==="<"&&o===">"&&(s=!0,D))throw new Error(`Invalid parameter: Required parameter ${T(n)} cannot come after optional parameter ${T(D)}`);if(r==="["&&o==="]"&&(s=!1,D=n),s===void 0)throw new Error(`Invalid parameter: ${T(n)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let a=n.slice(1,-1);const l=a.slice(-3)==="...";l&&(t=n,a=a.slice(0,-3));const C=a.match(mD);if(C)throw new Error(`Invalid parameter: ${T(n)}. Invalid character found ${T(C[0])}`);e.push({name:a,required:s,spread:l})}return e}i(Eu,"w$1");function hu(u,e,D,t){for(let n=0;n<e.length;n+=1){const{name:r,required:o,spread:s}=e[n],a=rD(r);if(a in u)throw new Error(`Invalid parameter: ${T(r)} is used more than once.`);const l=s?D.slice(n):D[n];if(s&&(n=e.length),o&&(!l||s&&l.length===0))return console.error(`Error: Missing required parameter ${T(r)}
22
+ `),t(),process.exit(1);u[a]=l}}i(hu,"b");function gD(u){return u===void 0||u!==!1}i(gD,"W$1");function se(u,e,D,t){const n={...e.flags},r=e.version;r&&(n.version={type:Boolean,description:"Show version"});const{help:o}=e,s=gD(o);s&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const a=At(n,t,{ignore:e.ignoreArgv}),l=i(()=>{console.log(e.version)},"f");if(r&&a.flags.version===!0)return l(),process.exit(0);const C=new hD,F=s&&o?.render?o.render:d=>C.render(d),c=i(d=>{const m=dD({...e,...d?{help:d}:{},flags:n});console.log(F(m,C))},"p");if(s&&a.flags.help===!0)return c(),process.exit(0);if(e.parameters){let{parameters:d}=e,m=a._;const y=d.indexOf("--"),j=d.slice(y+1),$=Object.create(null);if(y>-1&&j.length>0){d=d.slice(0,y);const p=a._["--"];m=m.slice(0,-p.length||void 0),hu($,Eu(d),m,c),hu($,Eu(j),p,c)}else hu($,Eu(d),m,c);Object.assign(a._,$)}const E={...a,showVersion:l,showHelp:c};return typeof D=="function"&&D(E),{command:u,...E}}i(se,"x$1");function BD(u,e){const D=new Map;for(const t of e){const n=[t.options.name],{alias:r}=t.options;r&&(Array.isArray(r)?n.push(...r):n.push(r));for(const o of n){if(D.has(o))throw new Error(`Duplicate command name found: ${T(o)}`);D.set(o,t)}}return D.get(u)}i(BD,"z$1");function AD(u,e,D=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!oe(u.name)))throw new Error(`Invalid script name: ${T(u.name)}`);const t=D[0];if(u.commands&&oe(t)){const n=BD(t,u.commands);if(n)return se(n.options.name,{...n.options,parent:u},n.callback,D.slice(1))}return se(void 0,u,e,D)}i(AD,"Z$1");var yD="2.10.0";const mu=i(u=>S.promises.access(u).then(()=>!0,()=>!1),"fsExists"),bD=i(async u=>{const e=h.join(u,"package.json");if(!await mu(e))throw new Error(`package.json not found at: ${e}`);const t=await S.promises.readFile(e,"utf8");try{return JSON.parse(t)}catch(n){throw new Error(`Cannot parse package.json: ${n.message}`)}},"readPackageJson"),wD=/^[/.]/,G=i((u,e)=>(!h.isAbsolute(u)&&!wD.test(u)&&(u=`./${u}`),e&&!u.endsWith("/")&&(u+="/"),u),"normalizePath"),vD=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,$D=new Set(["do","if","in","for","int","new","try","var","byte","case","char","else","enum","goto","long","null","this","true","void","with","break","catch","class","const","false","final","float","short","super","throw","while","delete","double","export","import","native","public","return","static","switch","throws","typeof","boolean","default","extends","finally","package","private","abstract","continue","debugger","function","volatile","interface","protected","transient","implements","instanceof","synchronized"]),gu=i(u=>!vD.test(u)||$D.has(u),"propertyNeedsQuotes"),P=i(u=>{if(u.endsWith(".mjs"))return"module";if(u.endsWith(".cjs"))return"commonjs"},"getFileType"),ie=i(u=>u.startsWith("."),"isPath"),Bu=i((u,e,D="exports")=>{if(u){if(typeof u=="string")return ie(u)?[{outputPath:u,type:P(u)||e,from:D}]:[];if(Array.isArray(u))return u.flatMap((t,n)=>{const r=`${D}[${n}]`;return typeof t=="string"?ie(t)?{outputPath:t,type:P(t)||e,from:r}:[]:Bu(t,e,r)});if(typeof u=="object")return Object.entries(u).flatMap(([t,n])=>{if(typeof n=="string"){const o=gu(t)?`["${t}"]`:`.${t}`,s={outputPath:n,from:`${D}${o}`};if(t==="require")return{...s,type:"commonjs"};if(t==="import")return{...s,type:P(n)||e};if(t==="types")return{...s,type:"types"};if(t==="node")return{...s,type:P(n)||e,platform:"node"};if(t==="default")return{...s,type:P(n)||e}}const r=gu(t)?`["${t}"]`:`.${t}`;return Bu(n,e,`${D}${r}`)})}return[]},"parseExportsMap"),M=i((u,e)=>{e.outputPath=G(e.outputPath);const{outputPath:D,type:t,platform:n}=e,r=u[D];if(r){if(r.type!==t)throw new Error(`Conflicting export types "${r.type}" & "${t}" found for ${D}`);if(r.platform!==n)throw new Error(`Conflicting export platforms "${r.platform}" & "${n}" found for ${D}`);Object.assign(r,e)}else u[D]=e},"addExportPath"),xD=i(u=>{const e={},D=u.type??"commonjs";if(u.main){const t=u.main;M(e,{outputPath:t,type:P(t)??D,from:"main"})}if(u.module&&M(e,{outputPath:u.module,type:"module",from:"module"}),u.types&&M(e,{outputPath:u.types,type:"types",from:"types"}),u.bin){const{bin:t}=u;if(typeof t=="string")M(e,{outputPath:t,type:P(t)??D,isExecutable:!0,from:"bin"});else for(const[n,r]of Object.entries(t)){const o=gu(n)?`["${n}"]`:`.${n}`;M(e,{outputPath:r,type:P(r)??D,isExecutable:!0,from:`bin${o}`})}}if(u.exports){const t=Bu(u.exports,D);for(const n of t)M(e,n)}return Object.values(e)},"getExportEntries"),kD=i(u=>{let e=!1;if(u.includes("=")){const[D,t]=u.split("=");u=t,e=D==="bin"||D==="binary"}return{outputPath:G(u),type:P(u),isExecutable:e,from:"cli"}},"parseCliInputFlag"),jD=i(({imports:u},e)=>{const D={};if(u)for(const t in u){if(t.startsWith("#"))continue;const n=u[t];typeof n=="string"&&(D[t]=h.join(e,n))}return D},"getAliases"),{stringify:OD}=JSON,TD=i(async(u,e)=>{for(const D of e){const t=u+D;if(await mu(t))return{extension:D,path:t}}},"tryExtensions"),ae={".d.ts":[".d.ts",".d.mts",".d.cts",".ts",".tsx",".mts",".cts"],".d.mts":[".d.mts",".d.ts",".d.cts",".ts",".tsx",".mts",".cts"],".d.cts":[".d.cts",".d.ts",".d.mts",".ts",".tsx",".mts",".cts"],".js":[".js",".ts",".tsx",".mts",".cts"],".mjs":[".mjs",".js",".cjs",".mts",".cts",".ts",".tsx"],".cjs":[".cjs",".js",".mjs",".mts",".cts",".ts",".tsx"]},SD=Object.keys(ae),PD=i(async(u,e,D)=>{const t=e+u.outputPath.slice(D.length);for(const n of SD)if(u.outputPath.endsWith(n)){const r=await TD(t.slice(0,-n.length),ae[n]);if(r)return{input:r.path,srcExtension:r.extension,distExtension:n}}throw new Error(`Could not find matching source file for export path ${OD(u.outputPath)}`)},"getSourcePath"),_D=["peerDependencies","dependencies","optionalDependencies"],Au="@types/",le=i((u,e,D=!1)=>{const t=[],{devDependencies:n}=u;for(const r of _D){const o=u[r];if(!o)continue;const s=Object.keys(o);for(const a of s)if(!(a in e))if(a.startsWith(Au)){if(D){let l=a.slice(Au.length);l.includes("__")&&(l=`@${l.replace("__","/")}`),t.push(l)}}else{if(n&&D){const l=Au+a.replace("@","").replace("/","__");n[l]&&!(l in o)&&console.warn(`Recommendation: "${l}" is externalized because "${a}" is in "${r}". Place "${l}" in "${r}" as well so users don't have missing types.`)}t.push(a)}}return t.flatMap(r=>[r,new RegExp(`^${r}/`)])},"getExternalDependencies"),ID=i(u=>{const e=Xe(/\.([cm]?[jt]s|[jt]sx)$/);return{name:"esbuild-transform",transform:i(async(D,t)=>{if(!e(t))return null;const n=await Mu(D,{...u,loader:"default",sourcefile:t.replace(/\.[cm]ts/,".ts")});return{code:n.code,map:n.map||null}},"transform")}},"esbuildTransform"),ND=i(u=>{if(u==="es")return"esm";if(u==="cjs"||u==="iife")return u},"getEsbuildFormat"),RD=i(u=>({name:"esbuild-minify",renderChunk:i(async(e,D,t)=>{const n=await Mu(e,{...u,format:ND(t.format),minify:!0,keepNames:!0});return{code:n.code,map:n.map||null}},"renderChunk")}),"esbuildMinify"),yu=i((u,e)=>u[0]-e[0]||u[1]-e[1]||u[2]-e[2],"compareSemver"),ce=i(({target:u})=>{const e=u.some(D=>{if(D=D.trim(),!D.startsWith("node"))return;const t=D.slice(4).split(".").map(Number),n=[t[0],t[1]??0,t[2]??0];return!(yu(n,[12,20,0])>=0&&yu(n,[13,0,0])<0||yu(n,[14,13,1])>=0)});return{name:"externalize-node-builtins",resolveId:i(D=>{const t=D.startsWith("node:");if(e&&t&&(D=D.slice(5)),et.includes(D)||t)return{id:D,external:!0}},"resolveId")}},"externalizeNodeBuiltins"),LD=i(u=>({name:"patch-binary",renderChunk:i((e,D,t)=>{if(!D.isEntry||!D.facadeModuleId)return;const n=t.entryFileNames,r=`./${h.posix.join(t.dir,n(D))}`;if(u.includes(r)){const o=new cu(e);return o.prepend(`#!/usr/bin/env node
23
+ `),{code:o.toString(),map:t.sourcemap?o.generateMap({hires:!0}):void 0}}},"renderChunk"),writeBundle:i(async(e,D)=>{const t=e.entryFileNames,n=Object.values(D).map(async r=>{const o=r;if(o.isEntry&&o.facadeModuleId){const s=`./${h.posix.join(e.dir,t(o))}`;await S.promises.chmod(s,493)}});await Promise.all(n)},"writeBundle")}),"patchBinary"),fe=i(()=>{const u=/\.(?:[mc]?js|jsx)$/;return{name:"resolve-typescript-mjs-cjs",resolveId(e,D,t){return u.test(e)&&D?this.resolve(e.replace(/js(x?)$/,"ts$1"),D,t):null}}},"resolveTypescriptMjsCts"),Fe=i(u=>u!==null&&typeof u=="object","A"),W=i((u,e)=>Object.assign(new Error(`[${u}]: ${e}`),{code:u}),"a"),Ce="ERR_INVALID_PACKAGE_CONFIG",bu="ERR_INVALID_PACKAGE_TARGET",MD="ERR_PACKAGE_PATH_NOT_EXPORTED",WD=/^\d+$/,UD=/^(\.{1,2}|node_modules)$/i,VD=/\/|\\/;var pe=(u=>(u.Export="exports",u.Import="imports",u))(pe||{});const wu=i((u,e,D,t,n)=>{if(e==null)return[];if(typeof e=="string"){const[r,...o]=e.split(VD);if(r===".."||o.some(s=>UD.test(s)))throw W(bu,`Invalid "${u}" target "${e}" defined in the package config`);return[n?e.replace(/\*/g,n):e]}if(Array.isArray(e))return e.flatMap(r=>wu(u,r,D,t,n));if(Fe(e)){for(const r of Object.keys(e)){if(WD.test(r))throw W(Ce,"Cannot contain numeric property keys");if(r==="default"||t.includes(r))return wu(u,e[r],D,t,n)}return[]}throw W(bu,`Invalid "${u}" target "${e}"`)},"f"),K="*",zD=i((u,e)=>{const D=u.indexOf(K),t=e.indexOf(K);return D===t?e.length>u.length:t>D},"m");function qD(u,e){if(!e.includes(K)&&u.hasOwnProperty(e))return[e];let D,t;for(const n of Object.keys(u))if(n.includes(K)){const[r,o,s]=n.split(K);if(s===void 0&&e.startsWith(r)&&e.endsWith(o)){const a=e.slice(r.length,-o.length||void 0);a&&(!D||zD(D,n))&&(D=n,t=a)}}return[D,t]}i(qD,"d");const JD=i(u=>Object.keys(u).reduce((e,D)=>{const t=D===""||D[0]!==".";if(e===void 0||e===t)return t;throw W(Ce,'"exports" cannot contain some keys starting with "." and some not')},void 0),"p"),GD=/^\w+:/,KD=i((u,e,D)=>{if(!u)throw new Error('"exports" is required');e=e===""?".":`./${e}`,(typeof u=="string"||Array.isArray(u)||Fe(u)&&JD(u))&&(u={".":u});const[t,n]=qD(u,e),r=wu(pe.Export,u[t],e,D,n);if(r.length===0)throw W(MD,e==="."?'No "exports" main defined':`Package subpath '${e}' is not defined by "exports"`);for(const o of r)if(!o.startsWith("./")&&!GD.test(o))throw W(bu,`Invalid "exports" target "${o}" defined in the package config`);return r},"v");var HD=Object.defineProperty,f=i((u,e)=>HD(u,"name",{value:e,configurable:!0}),"o");function k(u){return u.startsWith("\\\\?\\")?u:u.replace(/\\/g,"/")}i(k,"E"),f(k,"slash");const vu=f(u=>{const e=S[u];return(D,...t)=>{const n=`${u}:${t.join(":")}`;let r=D?.get(n);return r===void 0&&(r=Reflect.apply(e,S,t),D?.set(n,r)),r}},"cacheFs"),O=vu("existsSync"),ZD=vu("readFileSync"),Du=vu("statSync"),de=f((u,e,D)=>{for(;;){const t=h.posix.join(u,e);if(O(D,t))return t;const n=h.dirname(u);if(n===u)return;u=n}},"findUp"),$u=/^\.{1,2}(\/.*)?$/,xu=f(u=>{const e=k(u);return $u.test(e)?e:`./${e}`},"normalizeRelativePath");function Ee(u,e=!1){const D=u.length;let t=0,n="",r=0,o=16,s=0,a=0,l=0,C=0,F=0;function c(p,B){let g=0,b=0;for(;g<p;){let w=u.charCodeAt(t);if(w>=48&&w<=57)b=b*16+w-48;else if(w>=65&&w<=70)b=b*16+w-65+10;else if(w>=97&&w<=102)b=b*16+w-97+10;else break;t++,g++}return g<p&&(b=-1),b}i(c,"_"),f(c,"scanHexDigits");function E(p){t=p,n="",r=0,o=16,F=0}i(E,"d"),f(E,"setPosition");function d(){let p=t;if(u.charCodeAt(t)===48)t++;else for(t++;t<u.length&&R(u.charCodeAt(t));)t++;if(t<u.length&&u.charCodeAt(t)===46)if(t++,t<u.length&&R(u.charCodeAt(t)))for(t++;t<u.length&&R(u.charCodeAt(t));)t++;else return F=3,u.substring(p,t);let B=t;if(t<u.length&&(u.charCodeAt(t)===69||u.charCodeAt(t)===101))if(t++,(t<u.length&&u.charCodeAt(t)===43||u.charCodeAt(t)===45)&&t++,t<u.length&&R(u.charCodeAt(t))){for(t++;t<u.length&&R(u.charCodeAt(t));)t++;B=t}else F=3;return u.substring(p,B)}i(d,"A"),f(d,"scanNumber");function m(){let p="",B=t;for(;;){if(t>=D){p+=u.substring(B,t),F=2;break}const g=u.charCodeAt(t);if(g===34){p+=u.substring(B,t),t++;break}if(g===92){if(p+=u.substring(B,t),t++,t>=D){F=2;break}switch(u.charCodeAt(t++)){case 34:p+='"';break;case 92:p+="\\";break;case 47:p+="/";break;case 98:p+="\b";break;case 102:p+="\f";break;case 110:p+=`
24
24
  `;break;case 114:p+="\r";break;case 116:p+=" ";break;case 117:const b=c(4);b>=0?p+=String.fromCharCode(b):F=4;break;default:F=5}B=t;continue}if(g>=0&&g<=31)if(U(g)){p+=u.substring(B,t),F=2;break}else F=6;t++}return p}i(m,"w"),f(m,"scanString");function y(){if(n="",F=0,r=t,a=s,C=l,t>=D)return r=D,o=17;let p=u.charCodeAt(t);if(nu(p)){do t++,n+=String.fromCharCode(p),p=u.charCodeAt(t);while(nu(p));return o=15}if(U(p))return t++,n+=String.fromCharCode(p),p===13&&u.charCodeAt(t)===10&&(t++,n+=`
25
25
  `),s++,l=t,o=14;switch(p){case 123:return t++,o=1;case 125:return t++,o=2;case 91:return t++,o=3;case 93:return t++,o=4;case 58:return t++,o=6;case 44:return t++,o=5;case 34:return t++,n=m(),o=10;case 47:const B=t-1;if(u.charCodeAt(t+1)===47){for(t+=2;t<D&&!U(u.charCodeAt(t));)t++;return n=u.substring(B,t),o=12}if(u.charCodeAt(t+1)===42){t+=2;const g=D-1;let b=!1;for(;t<g;){const w=u.charCodeAt(t);if(w===42&&u.charCodeAt(t+1)===47){t+=2,b=!0;break}t++,U(w)&&(w===13&&u.charCodeAt(t)===10&&t++,s++,l=t)}return b||(t++,F=1),n=u.substring(B,t),o=13}return n+=String.fromCharCode(p),t++,o=16;case 45:if(n+=String.fromCharCode(p),t++,t===D||!R(u.charCodeAt(t)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return n+=d(),o=11;default:for(;t<D&&j(p);)t++,p=u.charCodeAt(t);if(r!==t){switch(n=u.substring(r,t),n){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return n+=String.fromCharCode(p),t++,o=16}}i(y,"y"),f(y,"scanNext");function j(p){if(nu(p)||U(p))return!1;switch(p){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}i(j,"I"),f(j,"isUnknownContentCharacter");function $(){let p;do p=y();while(p>=12&&p<=15);return p}return i($,"L"),f($,"scanNextNonTrivia"),{setPosition:E,getPosition:f(()=>t,"getPosition"),scan:e?$:y,getToken:f(()=>o,"getToken"),getTokenValue:f(()=>n,"getTokenValue"),getTokenOffset:f(()=>r,"getTokenOffset"),getTokenLength:f(()=>t-r,"getTokenLength"),getTokenStartLine:f(()=>a,"getTokenStartLine"),getTokenStartCharacter:f(()=>r-C,"getTokenStartCharacter"),getTokenError:f(()=>F,"getTokenError")}}i(Ee,"je"),f(Ee,"createScanner");function nu(u){return u===32||u===9}i(nu,"H"),f(nu,"isWhiteSpace");function U(u){return u===10||u===13}i(U,"N"),f(U,"isLineBreak");function R(u){return u>=48&&u<=57}i(R,"h"),f(R,"isDigit");var he;(function(u){u[u.lineFeed=10]="lineFeed",u[u.carriageReturn=13]="carriageReturn",u[u.space=32]="space",u[u._0=48]="_0",u[u._1=49]="_1",u[u._2=50]="_2",u[u._3=51]="_3",u[u._4=52]="_4",u[u._5=53]="_5",u[u._6=54]="_6",u[u._7=55]="_7",u[u._8=56]="_8",u[u._9=57]="_9",u[u.a=97]="a",u[u.b=98]="b",u[u.c=99]="c",u[u.d=100]="d",u[u.e=101]="e",u[u.f=102]="f",u[u.g=103]="g",u[u.h=104]="h",u[u.i=105]="i",u[u.j=106]="j",u[u.k=107]="k",u[u.l=108]="l",u[u.m=109]="m",u[u.n=110]="n",u[u.o=111]="o",u[u.p=112]="p",u[u.q=113]="q",u[u.r=114]="r",u[u.s=115]="s",u[u.t=116]="t",u[u.u=117]="u",u[u.v=118]="v",u[u.w=119]="w",u[u.x=120]="x",u[u.y=121]="y",u[u.z=122]="z",u[u.A=65]="A",u[u.B=66]="B",u[u.C=67]="C",u[u.D=68]="D",u[u.E=69]="E",u[u.F=70]="F",u[u.G=71]="G",u[u.H=72]="H",u[u.I=73]="I",u[u.J=74]="J",u[u.K=75]="K",u[u.L=76]="L",u[u.M=77]="M",u[u.N=78]="N",u[u.O=79]="O",u[u.P=80]="P",u[u.Q=81]="Q",u[u.R=82]="R",u[u.S=83]="S",u[u.T=84]="T",u[u.U=85]="U",u[u.V=86]="V",u[u.W=87]="W",u[u.X=88]="X",u[u.Y=89]="Y",u[u.Z=90]="Z",u[u.asterisk=42]="asterisk",u[u.backslash=92]="backslash",u[u.closeBrace=125]="closeBrace",u[u.closeBracket=93]="closeBracket",u[u.colon=58]="colon",u[u.comma=44]="comma",u[u.dot=46]="dot",u[u.doubleQuote=34]="doubleQuote",u[u.minus=45]="minus",u[u.openBrace=123]="openBrace",u[u.openBracket=91]="openBracket",u[u.plus=43]="plus",u[u.slash=47]="slash",u[u.formFeed=12]="formFeed",u[u.tab=9]="tab"})(he||(he={})),new Array(20).fill(0).map((u,e)=>" ".repeat(e));const V=200;new Array(V).fill(0).map((u,e)=>`
26
26
  `+" ".repeat(e)),new Array(V).fill(0).map((u,e)=>"\r"+" ".repeat(e)),new Array(V).fill(0).map((u,e)=>`\r
27
27
  `+" ".repeat(e)),new Array(V).fill(0).map((u,e)=>`
28
28
  `+" ".repeat(e)),new Array(V).fill(0).map((u,e)=>"\r"+" ".repeat(e)),new Array(V).fill(0).map((u,e)=>`\r
29
- `+" ".repeat(e));var ru;(function(u){u.DEFAULT={allowTrailingComma:!1}})(ru||(ru={}));function me(u,e=[],D=ru.DEFAULT){let t=null,n=[];const r=[];function o(s){Array.isArray(n)?n.push(s):t!==null&&(n[t]=s)}return i(o,"u"),f(o,"onValue"),ge(u,{onObjectBegin:f(()=>{const s={};o(s),r.push(n),n=s,t=null},"onObjectBegin"),onObjectProperty:f(s=>{t=s},"onObjectProperty"),onObjectEnd:f(()=>{n=r.pop()},"onObjectEnd"),onArrayBegin:f(()=>{const s=[];o(s),r.push(n),n=s,t=null},"onArrayBegin"),onArrayEnd:f(()=>{n=r.pop()},"onArrayEnd"),onLiteralValue:o,onError:f((s,a,l)=>{e.push({error:s,offset:a,length:l})},"onError")},D),n[0]}i(me,"ye"),f(me,"parse$1");function ge(u,e,D=ru.DEFAULT){const t=Ee(u,!1),n=[];function r(A){return A?()=>A(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}i(r,"i"),f(r,"toNoArgVisit");function o(A){return A?()=>A(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>n.slice()):()=>!0}i(o,"u"),f(o,"toNoArgVisitWithPath");function s(A){return A?v=>A(v,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}i(s,"f"),f(s,"toOneArgVisit");function a(A){return A?v=>A(v,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>n.slice()):()=>!0}i(a,"r"),f(a,"toOneArgVisitWithPath");const l=o(e.onObjectBegin),C=a(e.onObjectProperty),F=r(e.onObjectEnd),c=o(e.onArrayBegin),E=r(e.onArrayEnd),d=a(e.onLiteralValue),m=s(e.onSeparator),y=r(e.onComment),j=s(e.onError),$=D&&D.disallowComments,p=D&&D.allowTrailingComma;function B(){for(;;){const A=t.scan();switch(t.getTokenError()){case 4:g(14);break;case 5:g(15);break;case 3:g(13);break;case 1:$||g(11);break;case 2:g(12);break;case 6:g(16);break}switch(A){case 12:case 13:$?g(10):y();break;case 16:g(1);break;case 15:case 14:break;default:return A}}}i(B,"k"),f(B,"scanNext");function g(A,v=[],Lu=[]){if(j(A),v.length+Lu.length>0){let Y=t.getToken();for(;Y!==17;){if(v.indexOf(Y)!==-1){B();break}else if(Lu.indexOf(Y)!==-1)break;Y=B()}}}i(g,"m"),f(g,"handleError");function b(A){const v=t.getTokenValue();return A?d(v):(C(v),n.push(v)),B(),!0}i(b,"F"),f(b,"parseString");function w(){switch(t.getToken()){case 11:const A=t.getTokenValue();let v=Number(A);isNaN(v)&&(g(2),v=0),d(v);break;case 7:d(null);break;case 8:d(!0);break;case 9:d(!1);break;default:return!1}return B(),!0}i(w,"j"),f(w,"parseLiteral");function lu(){return t.getToken()!==10?(g(3,[],[2,5]),!1):(b(!1),t.getToken()===6?(m(":"),B(),Q()||g(4,[],[2,5])):g(5,[],[2,5]),n.pop(),!0)}i(lu,"S"),f(lu,"parseProperty");function Nu(){l(),B();let A=!1;for(;t.getToken()!==2&&t.getToken()!==17;){if(t.getToken()===5){if(A||g(4,[],[]),m(","),B(),t.getToken()===2&&p)break}else A&&g(6,[],[]);lu()||g(4,[],[2,5]),A=!0}return F(),t.getToken()!==2?g(7,[2],[]):B(),!0}i(Nu,"R"),f(Nu,"parseObject");function Ru(){c(),B();let A=!0,v=!1;for(;t.getToken()!==4&&t.getToken()!==17;){if(t.getToken()===5){if(v||g(4,[],[]),m(","),B(),t.getToken()===4&&p)break}else v&&g(6,[],[]);A?(n.push(0),A=!1):n[n.length-1]++,Q()||g(4,[],[4,5]),v=!0}return E(),A||n.pop(),t.getToken()!==4?g(8,[4],[]):B(),!0}i(Ru,"a"),f(Ru,"parseArray");function Q(){switch(t.getToken()){case 3:return Ru();case 1:return Nu();case 10:return b(!0);default:return w()}}return i(Q,"U"),f(Q,"parseValue"),B(),t.getToken()===17?D.allowEmptyContent?!0:(g(4,[],[]),!1):Q()?(t.getToken()!==17&&g(9,[],[]),!0):(g(4,[],[]),!1)}i(ge,"Fe"),f(ge,"visit");var Be;(function(u){u[u.None=0]="None",u[u.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",u[u.UnexpectedEndOfString=2]="UnexpectedEndOfString",u[u.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",u[u.InvalidUnicode=4]="InvalidUnicode",u[u.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",u[u.InvalidCharacter=6]="InvalidCharacter"})(Be||(Be={}));var Ae;(function(u){u[u.OpenBraceToken=1]="OpenBraceToken",u[u.CloseBraceToken=2]="CloseBraceToken",u[u.OpenBracketToken=3]="OpenBracketToken",u[u.CloseBracketToken=4]="CloseBracketToken",u[u.CommaToken=5]="CommaToken",u[u.ColonToken=6]="ColonToken",u[u.NullKeyword=7]="NullKeyword",u[u.TrueKeyword=8]="TrueKeyword",u[u.FalseKeyword=9]="FalseKeyword",u[u.StringLiteral=10]="StringLiteral",u[u.NumericLiteral=11]="NumericLiteral",u[u.LineCommentTrivia=12]="LineCommentTrivia",u[u.BlockCommentTrivia=13]="BlockCommentTrivia",u[u.LineBreakTrivia=14]="LineBreakTrivia",u[u.Trivia=15]="Trivia",u[u.Unknown=16]="Unknown",u[u.EOF=17]="EOF"})(Ae||(Ae={}));const YD=me;var ye;(function(u){u[u.InvalidSymbol=1]="InvalidSymbol",u[u.InvalidNumberFormat=2]="InvalidNumberFormat",u[u.PropertyNameExpected=3]="PropertyNameExpected",u[u.ValueExpected=4]="ValueExpected",u[u.ColonExpected=5]="ColonExpected",u[u.CommaExpected=6]="CommaExpected",u[u.CloseBraceExpected=7]="CloseBraceExpected",u[u.CloseBracketExpected=8]="CloseBracketExpected",u[u.EndOfFileExpected=9]="EndOfFileExpected",u[u.InvalidCommentToken=10]="InvalidCommentToken",u[u.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",u[u.UnexpectedEndOfString=12]="UnexpectedEndOfString",u[u.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",u[u.InvalidUnicode=14]="InvalidUnicode",u[u.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",u[u.InvalidCharacter=16]="InvalidCharacter"})(ye||(ye={}));const be=f((u,e)=>YD(QD(e,u,"utf8")),"readJsonc"),ku=Symbol("implicitBaseUrl"),_="${configDir}",XD=f(()=>{const{findPnpApi:u}=et;return u&&u(process.cwd())},"getPnpApi"),ju=f((u,e,D,t)=>{const n=`resolveFromPackageJsonPath:${u}:${e}:${D}`;if(t!=null&&t.has(n))return t.get(n);const r=be(u,t);if(!r)return;let o=e||"tsconfig.json";if(!D&&r.exports)try{const[s]=HD(r.exports,e,["require","types"]);o=s}catch{return!1}else!e&&r.tsconfig&&(o=r.tsconfig);return o=h.join(u,"..",o),t?.set(n,o),o},"resolveFromPackageJsonPath"),Ou="package.json",Tu="tsconfig.json",un=f((u,e,D)=>{let t=u;if(u===".."&&(t=h.join(t,Tu)),u[0]==="."&&(t=h.resolve(e,t)),h.isAbsolute(t)){if(O(D,t)){if(Du(D,t).isFile())return t}else if(!t.endsWith(".json")){const E=`${t}.json`;if(O(D,E))return E}return}const[n,...r]=u.split("/"),o=n[0]==="@"?`${n}/${r.shift()}`:n,s=r.join("/"),a=XD();if(a){const{resolveRequest:E}=a;try{if(o===u){const d=E(h.join(o,Ou),e);if(d){const m=ju(d,s,!1,D);if(m&&O(D,m))return m}}else{let d;try{d=E(u,e,{extensions:[".json"]})}catch{d=E(h.join(u,Tu),e)}if(d)return d}}catch{}}const l=de(h.resolve(e),h.join("node_modules",o),D);if(!l||!Du(D,l).isDirectory())return;const C=h.join(l,Ou);if(O(D,C)){const E=ju(C,s,!1,D);if(E===!1)return;if(E&&O(D,E)&&Du(D,E).isFile())return E}const F=h.join(l,s),c=F.endsWith(".json");if(!c){const E=`${F}.json`;if(O(D,E))return E}if(O(D,F)){if(Du(D,F).isDirectory()){const E=h.join(F,Ou);if(O(D,E)){const m=ju(E,"",!0,D);if(m&&O(D,m))return m}const d=h.join(F,Tu);if(O(D,d))return d}else if(c)return F}},"resolveExtendsPath"),Su=f((u,e)=>xu(h.relative(u,e)),"pathRelative"),we=["files","include","exclude"],en=f((u,e,D,t)=>{const n=un(u,e,t);if(!n)throw new Error(`File '${u}' not found.`);if(D.has(n))throw new Error(`Circularity detected while resolving configuration: ${n}`);D.add(n);const r=h.dirname(n),o=ve(n,t,D);delete o.references;const{compilerOptions:s}=o;if(s){const{baseUrl:a}=s;a&&!a.startsWith(_)&&(s.baseUrl=k(h.relative(e,h.join(r,a)))||"./");let{outDir:l}=s;l&&(l.startsWith(_)||(l=h.relative(e,h.join(r,l))),s.outDir=k(l)||"./")}for(const a of we){const l=o[a];l&&(o[a]=l.map(C=>C.startsWith(_)?C:k(h.relative(e,h.join(r,C)))))}return o},"resolveExtends"),tn=["outDir","declarationDir"],ve=f((u,e,D=new Set)=>{let t;try{t=be(u,e)||{}}catch{throw new Error(`Cannot resolve tsconfig at path: ${u}`)}if(typeof t!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${u}`);const n=h.dirname(u);if(t.compilerOptions){const{compilerOptions:r}=t;r.paths&&!r.baseUrl&&(r[ku]=n)}if(t.extends){const r=Array.isArray(t.extends)?t.extends:[t.extends];delete t.extends;for(const o of r.reverse()){const s=en(o,n,new Set(D),e),a={...s,...t,compilerOptions:{...s.compilerOptions,...t.compilerOptions}};s.watchOptions&&(a.watchOptions={...s.watchOptions,...t.watchOptions}),t=a}}if(t.compilerOptions){const{compilerOptions:r}=t,o=["baseUrl","rootDir"];for(const s of o){const a=r[s];if(a&&!a.startsWith(_)){const l=h.resolve(n,a),C=Su(n,l);r[s]=C}}for(const s of tn){let a=r[s];a&&(Array.isArray(t.exclude)||(t.exclude=[]),t.exclude.includes(a)||t.exclude.push(a),a.startsWith(_)||(a=xu(a)),r[s]=a)}}else t.compilerOptions={};if(t.include?(t.include=t.include.map(k),t.files&&delete t.files):t.files&&(t.files=t.files.map(r=>r.startsWith(_)?r:xu(r))),t.watchOptions){const{watchOptions:r}=t;r.excludeDirectories&&(r.excludeDirectories=r.excludeDirectories.map(o=>k(h.resolve(n,o))))}return t},"_parseTsconfig"),ou=f((u,e)=>{if(u.startsWith(_))return k(h.join(e,u.slice(_.length)))},"interpolateConfigDir"),Dn=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],nn=f(u=>{if(u.strict){const e=["noImplicitAny","noImplicitThis","strictNullChecks","strictFunctionTypes","strictBindCallApply","strictPropertyInitialization","strictBuiltinIteratorReturn","alwaysStrict","useUnknownInCatchVariables"];for(const D of e)u[D]===void 0&&(u[D]=!0)}if(u.target){let e=u.target.toLowerCase();e==="es2015"&&(e="es6"),u.target=e,e==="esnext"&&(u.module!=null||(u.module="es6"),u.moduleResolution!=null||(u.moduleResolution="classic"),u.useDefineForClassFields!=null||(u.useDefineForClassFields=!0)),(e==="es6"||e==="es2016"||e==="es2017"||e==="es2018"||e==="es2019"||e==="es2020"||e==="es2021"||e==="es2022"||e==="es2023"||e==="es2024")&&(u.module!=null||(u.module="es6"),u.moduleResolution!=null||(u.moduleResolution="classic")),(e==="es2022"||e==="es2023"||e==="es2024")&&(u.useDefineForClassFields!=null||(u.useDefineForClassFields=!0))}if(u.module){let e=u.module.toLowerCase();e==="es2015"&&(e="es6"),u.module=e,(e==="es6"||e==="es2020"||e==="es2022"||e==="esnext"||e==="none"||e==="system"||e==="umd"||e==="amd")&&(u.moduleResolution!=null||(u.moduleResolution="classic")),e==="system"&&(u.allowSyntheticDefaultImports!=null||(u.allowSyntheticDefaultImports=!0)),(e==="node16"||e==="nodenext"||e==="preserve")&&(u.esModuleInterop!=null||(u.esModuleInterop=!0),u.allowSyntheticDefaultImports!=null||(u.allowSyntheticDefaultImports=!0)),(e==="node16"||e==="nodenext")&&(u.moduleDetection!=null||(u.moduleDetection="force"),u.useDefineForClassFields!=null||(u.useDefineForClassFields=!0)),e==="node16"&&(u.target!=null||(u.target="es2022"),u.moduleResolution!=null||(u.moduleResolution="node16")),e==="nodenext"&&(u.target!=null||(u.target="esnext"),u.moduleResolution!=null||(u.moduleResolution="nodenext")),e==="preserve"&&(u.moduleResolution!=null||(u.moduleResolution="bundler"))}if(u.moduleResolution){let e=u.moduleResolution.toLowerCase();e==="node"&&(e="node10"),u.moduleResolution=e,(e==="node16"||e==="nodenext"||e==="bundler")&&(u.resolvePackageJsonExports!=null||(u.resolvePackageJsonExports=!0),u.resolvePackageJsonImports!=null||(u.resolvePackageJsonImports=!0)),e==="bundler"&&(u.allowSyntheticDefaultImports!=null||(u.allowSyntheticDefaultImports=!0),u.resolveJsonModule!=null||(u.resolveJsonModule=!0))}u.esModuleInterop&&(u.allowSyntheticDefaultImports!=null||(u.allowSyntheticDefaultImports=!0)),u.verbatimModuleSyntax&&(u.isolatedModules!=null||(u.isolatedModules=!0),u.preserveConstEnums!=null||(u.preserveConstEnums=!0)),u.isolatedModules&&(u.preserveConstEnums!=null||(u.preserveConstEnums=!0))},"normalizeCompilerOptions"),$e=f((u,e=new Map)=>{const D=h.resolve(u),t=ve(D,e),n=h.dirname(D),{compilerOptions:r}=t;if(r){for(const s of Dn){const a=r[s];if(a){const l=ou(a,n);r[s]=l?Su(n,l):a}}for(const s of["rootDirs","typeRoots"]){const a=r[s];a&&(r[s]=a.map(l=>{const C=ou(l,n);return C?Su(n,C):l}))}const{paths:o}=r;if(o)for(const s of Object.keys(o))o[s]=o[s].map(a=>{var l;return(l=ou(a,n))!=null?l:a});nn(r)}for(const o of we){const s=t[o];s&&(t[o]=s.map(a=>{var l;return(l=ou(a,n))!=null?l:a}))}return t},"parseTsconfig"),rn=f((u=process.cwd(),e="tsconfig.json",D=new Map)=>{const t=de(k(u),e,D);if(!t)return null;const n=$e(t,D);return{path:t,config:n}},"getTsconfig"),on=/\*/g,xe=f((u,e)=>{const D=u.match(on);if(D&&D.length>1)throw new Error(e)},"assertStarCount"),sn=f(u=>{if(u.includes("*")){const[e,D]=u.split("*");return{prefix:e,suffix:D}}return u},"parsePattern"),an=f(({prefix:u,suffix:e},D)=>D.startsWith(u)&&D.endsWith(e),"isPatternMatch"),ln=f((u,e,D)=>Object.entries(u).map(([t,n])=>(xe(t,`Pattern '${t}' can have at most one '*' character.`),{pattern:sn(t),substitutions:n.map(r=>{if(xe(r,`Substitution '${r}' in pattern '${t}' can have at most one '*' character.`),!e&&!$u.test(r))throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return h.resolve(D,r)})})),"parsePaths"),cn=f(u=>{const{compilerOptions:e}=u.config;if(!e)return null;const{baseUrl:D,paths:t}=e;if(!D&&!t)return null;const n=ku in e&&e[ku],r=h.resolve(h.dirname(u.path),D||n||"."),o=t?ln(t,D,r):[];return s=>{if($u.test(s))return[];const a=[];for(const c of o){if(c.pattern===s)return c.substitutions.map(k);typeof c.pattern!="string"&&a.push(c)}let l,C=-1;for(const c of a)an(c.pattern,s)&&c.pattern.prefix.length>C&&(C=c.pattern.prefix.length,l=c);if(!l)return D?[k(h.join(r,s))]:[];const F=s.slice(l.pattern.prefix.length,s.length-l.pattern.suffix.length);return l.substitutions.map(c=>k(c.replace("*",F)))}},"createPathsMatcher"),ke=f(u=>{let e="";for(let D=0;D<u.length;D+=1){const t=u[D],n=t.toUpperCase();e+=t===n?t.toLowerCase():n}return e},"s"),fn=65,Fn=97,Cn=f(()=>Math.floor(Math.random()*26),"m"),pn=f(u=>Array.from({length:u},()=>String.fromCodePoint(Cn()+(Math.random()>.5?fn:Fn))).join(""),"S"),dn=f((u=Dt)=>{const e=process.execPath;if(u.existsSync(e))return!u.existsSync(ke(e));const D=`/${pn(10)}`;u.writeFileSync(D,"");const t=!u.existsSync(ke(D));return u.unlinkSync(D),t},"l"),{join:su}=h.posix,Pu={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},En=f(u=>{const e=[...Pu.ts],D=[...Pu.cts],t=[...Pu.mts];return u!=null&&u.allowJs&&(e.push(".js",".jsx"),D.push(".cjs"),t.push(".mjs")),[...e,...D,...t]},"getSupportedExtensions"),hn=f(u=>{const e=[];if(!u)return e;const{outDir:D,declarationDir:t}=u;return D&&e.push(D),t&&e.push(t),e},"getDefaultExcludeSpec"),je=f(u=>u.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),mn=["node_modules","bower_components","jspm_packages"],_u=`(?!(${mn.join("|")})(/|$))`,gn=/(?:^|\/)[^.*?]+$/,Oe="**/*",iu="[^/]",Iu="[^./]",Te=process.platform==="win32";f(({config:u,path:e},D=dn())=>{if("extends"in u)throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");if(!h.isAbsolute(e))throw new Error("The tsconfig path must be absolute");Te&&(e=k(e));const t=h.dirname(e),{files:n,include:r,exclude:o,compilerOptions:s}=u,a=n?.map(d=>su(t,d)),l=En(s),C=D?"":"i",F=(o||hn(s)).map(d=>{const m=su(t,d),y=je(m).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${iu}*`).replaceAll(String.raw`\?`,iu);return new RegExp(`^${y}($|/)`,C)}),c=n||r?r:[Oe],E=c?c.map(d=>{let m=su(t,d);gn.test(m)&&(m=su(m,Oe));const y=je(m).replaceAll(String.raw`/\*\*`,`(/${_u}${Iu}${iu}*)*?`).replaceAll(/(\/)?\\\*/g,(j,$)=>{const p=`(${Iu}|(\\.(?!min\\.js$))?)*`;return $?`/${_u}${Iu}${p}`:p}).replaceAll(/(\/)?\\\?/g,(j,$)=>{const p=iu;return $?`/${_u}${p}`:p});return new RegExp(`^${y}$`,C)}):void 0;return d=>{if(!h.isAbsolute(d))throw new Error("filePath must be absolute");if(Te&&(d=k(d)),a!=null&&a.includes(d)||!(!l.some(m=>d.endsWith(m))||F.some(m=>m.test(d)))&&E&&E.some(m=>m.test(d)))return u}},"createFilesMatcher");const Se="resolve-tsconfig-paths",Bn=i(u=>u[0]===".","isRelative"),An=i(u=>u[0]==="/"||/^[\s\S]:/.test(u),"isAbsolute"),Pe=i(u=>{const e=cn(u);return e?{name:Se,async resolveId(D,t,n){if(!t||Bn(D)||An(D)||D.startsWith("\0"))return null;const r=e(D);for(const o of r){const s=await this.resolve(o,t,{skipSelf:!0,...n});if(s)return s}return null}}:{name:Se}},"resolveTsconfigPaths"),_e=/^#!.*/,yn=i(()=>({name:"strip-hashbang",transform:i(u=>{if(!_e.test(u))return null;const e=new cu(u);return e.replace(_e,""),{code:e.toString(),map:e.generateMap({hires:!0})}},"transform")}),"stripHashbang");class bn{static{i(this,"WalkerBase")}constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:i(()=>this.should_skip=!0,"skip"),remove:i(()=>this.should_remove=!0,"remove"),replace:i(e=>this.replacement=e,"replace")}}replace(e,D,t,n){e&&D&&(t!=null?e[D][t]=n:e[D]=n)}remove(e,D,t){e&&D&&(t!=null?e[D].splice(t,1):delete e[D])}}class wn extends bn{static{i(this,"SyncWalker")}constructor(e,D){super(),this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:i(()=>this.should_skip=!0,"skip"),remove:i(()=>this.should_remove=!0,"remove"),replace:i(t=>this.replacement=t,"replace")},this.enter=e,this.leave=D}visit(e,D,t,n){if(e){if(this.enter){const o=this.should_skip,s=this.should_remove,a=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,e,D,t,n),this.replacement&&(e=this.replacement,this.replace(D,t,n,e)),this.should_remove&&this.remove(D,t,n);const l=this.should_skip,C=this.should_remove;if(this.should_skip=o,this.should_remove=s,this.replacement=a,l)return e;if(C)return null}let r;for(r in e){const o=e[r];if(o&&typeof o=="object")if(Array.isArray(o)){const s=o;for(let a=0;a<s.length;a+=1){const l=s[a];Ie(l)&&(this.visit(l,e,r,a)||a--)}}else Ie(o)&&this.visit(o,e,r,null)}if(this.leave){const o=this.replacement,s=this.should_remove;this.replacement=null,this.should_remove=!1,this.leave.call(this.context,e,D,t,n),this.replacement&&(e=this.replacement,this.replace(D,t,n,e)),this.should_remove&&this.remove(D,t,n);const a=this.should_remove;if(this.replacement=o,this.should_remove=s,a)return null}}return e}}function Ie(u){return u!==null&&typeof u=="object"&&"type"in u&&typeof u.type=="string"}i(Ie,"isNode");function vn(u,{enter:e,leave:D}){return new wn(e,D).visit(u,null)}i(vn,"walk");const $n=i(()=>{const u='import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);';return{name:"esmInjectCreateRequire",renderChunk(e,D,t){if(t.format!=="es"||!/\brequire\b/.test(e))return null;const n=this.parse(e);let r=nt(n,"scope"),o=!1;if(vn(n,{enter(a){a.scope&&(r=a.scope),a.type==="Identifier"&&a.name==="require"&&!r.contains("require")&&(o=!0,this.skip())},leave:i(a=>{a.scope&&(r=r.parent)},"leave")}),!o)return null;const s=new cu(e);return s.prepend(u),{code:s.toString(),map:s.generateMap({hires:!0})}}}},"esmInjectCreateRequire"),xn=i((u,e,D,t,n)=>{const r={target:u.target,tsconfigRaw:n?.config};return{input:[],preserveEntrySignatures:"strict",plugins:[ce(u),...n?[Pe(n)]:[],fe(),Qe({entries:e}),Ke({extensions:[".mjs",".js",".ts",".jsx",".tsx",".json"],exportConditions:u.exportCondition}),...Object.keys(D).length>0?[Ye({preventAssignment:!0,objectGuards:!0,values:D})]:[],yn(),Ze(),ND(r),He({ignoreDynamicRequires:!0,extensions:[".js",".ts",".jsx",".tsx"],transformMixedEsModules:!0}),Xe({warnOnError:!0}),$n(),...u.minify?[LD(r)]:[],MD(t)],output:[],external:[]}},"getPkgConfig"),kn=i(async(u,e)=>{const[D,t]=await Promise.all([import("./rollup-plugin-dts-BqPrtt4K.mjs"),import("./local-typescript-loader-CSvrvK-x.mjs")]);return{input:[],preserveEntrySignatures:"strict",plugins:[ce(u),...e?[Pe(e)]:[],fe(),D.default({respectExternal:!0,compilerOptions:{composite:!1,preserveSymlinks:!1,module:t.default.ModuleKind.Preserve,moduleResolution:t.default.ModuleResolutionKind.Bundler},tsconfig:e?.path})],output:[],external:[]}},"getDtsConfig"),Ne=i(u=>u.split("?")[0],"stripQuery"),jn=i(async(u,e,D,t,n,r,o)=>{const s=D.filter(({exportEntry:c})=>c.isExecutable).map(({exportEntry:c})=>c.outputPath),a=Object.create(null),l=Object.fromEntries(t.env.map(({key:c,value:E})=>[`process.env.${c}`,JSON.stringify(E)])),C=le(r,n),F=le(r,n,!0);for(const{input:c,srcExtension:E,distExtension:d,exportEntry:m}of D){if(m.type==="types"){let B=a.dts;B||(B=await kn(t,o),B.external=F,a.dts=B),B.input.includes(c)||B.input.push(c),B.output.push({dir:e,entryFileNames:i(g=>S.realpathSync.native(Ne(g.facadeModuleId)).slice(u.length,-E.length)+d,"entryFileNames"),exports:"auto",format:"esm"});continue}let y=a.pkg;y||(y=xn(t,n,l,s,o),y.external=C,a.pkg=y),y.input.includes(c)||y.input.push(c);const j=y.output,$=h.extname(m.outputPath),p=`${m.type}-${$}`;if(!j[p]){const B={dir:e,exports:"auto",format:m.type,chunkFileNames:`[name]-[hash]${$}`,sourcemap:t.sourcemap,entryFileNames:i(g=>{const w=S.realpathSync.native(Ne(g.facadeModuleId)).slice(u.length);return h.join(h.dirname(w),g.name)+d},"entryFileNames")};j.push(B),j[p]=B}}return Object.values(a)},"getRollupConfigs"),On=i(u=>{if(!u)return rn();const e=h.resolve(u),D=$e(e);return{path:e,config:D}},"getTsconfig");let L=!0;const z=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let H=0;if(z.process&&z.process.env&&z.process.stdout){const{FORCE_COLOR:u,NODE_DISABLE_COLORS:e,NO_COLOR:D,TERM:t,COLORTERM:n}=z.process.env;e||D||u==="0"?L=!1:u==="1"||u==="2"||u==="3"?L=!0:t==="dumb"?L=!1:"CI"in z.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(r=>r in z.process.env)?L=!0:L=process.stdout.isTTY,L&&(process.platform==="win32"||n&&(n==="truecolor"||n==="24bit")?H=3:t&&(t.endsWith("-256color")||t.endsWith("256"))?H=2:H=1)}let Re={enabled:L,supportLevel:H};function Tn(u,e,D=1){const t=`\x1B[${u}m`,n=`\x1B[${e}m`,r=new RegExp(`\\x1b\\[${e}m`,"g");return o=>Re.enabled&&Re.supportLevel>=D?t+(""+o).replace(r,t)+n:""+o}i(Tn,"kolorist");const Sn=Tn(90,39),Pn=i(()=>new Date().toLocaleTimeString(),"currentTime"),au=i((...u)=>console.log(`[${Sn(Pn())}]`,...u),"log"),_n=i(async u=>{await mu(u)&&await S.promises.rm(u,{recursive:!0,force:!0})},"cleanDist"),{stringify:Le}=JSON,I=yD({name:"pkgroll",version:bD,flags:{input:{type:[jD],alias:"i",description:"Dist paths for source files to bundle (Only use if you cannot use package.json entries)"},src:{type:String,description:"Source directory",default:"./src"},dist:{type:String,description:"Distribution directory",default:"./dist"},minify:{type:Boolean,description:"Minify output",alias:"m",default:!1},target:{type:[String],default:[`node${process.versions.node}`],description:"Environments to support. `target` in tsconfig.json is automatically added. Defaults to the current Node.js version.",alias:"t"},tsconfig:{type:String,description:"Custom tsconfig.json file path",alias:"p"},watch:{type:Boolean,description:"Watch mode",alias:"w",default:!1},env:{type:[u=>{const[e,D]=u.split("=");return{key:e,value:D}}],description:"Compile-time environment variables (eg. --env.NODE_ENV=production)"},exportCondition:{type:[String],description:"Export conditions for resolving dependency export and import maps (eg. --export-condition=node)"},sourcemap:{type:i(u=>{if(u==="")return!0;if(u==="inline")return u;throw new Error(`Invalid sourcemap option ${Le(u)}`)},"type"),description:"Sourcemap generation. Provide `inline` option for inline sourcemap (eg. --sourcemap, --sourcemap=inline)"},cleanDist:{type:Boolean,description:"Clean dist before bundling",default:!1}},help:{description:"Minimalistic package bundler",render:i((u,e)=>(e.flagOperator=D=>D.name==="env"?".key=":" ",e.render(u)),"render")}}),Me=process.cwd(),We=G(I.flags.src,!0),Z=G(I.flags.dist,!0),Ue=On(I.flags.tsconfig),Ve=Ue?.config.compilerOptions?.target;Ve&&I.flags.target.push(Ve),(async()=>{const u=await wD(Me);let e=kD(u);const D=I.flags.input;if(D.length>0){const r=u.type??"commonjs";e.push(...D.map(o=>(o.type||(o.type=r),o)))}if(e=e.filter(r=>{const o=r.outputPath.startsWith(Z);return o||console.warn(`Ignoring entry outside of ${Z} directory: package.json#${r.from}=${Le(r.outputPath)}`),o}),e.length===0)throw new Error("No export entries found in package.json");const t=await Promise.all(e.map(async r=>({...await _D(r,We,Z),exportEntry:r}))),n=await jn(G(S.realpathSync.native(We),!0),Z,t,I.flags,OD(u,Me),u,Ue);I.flags.cleanDist&&await _n(Z),I.flags.watch?(au("Watch initialized"),n.map(async r=>{Je(r).on("event",async s=>{s.code==="BUNDLE_START"&&au("Building",...Array.isArray(s.input)?s.input:[s.input]),s.code==="BUNDLE_END"&&(await Promise.all(r.output.map(a=>s.result.write(a))),au("Built",...Array.isArray(s.input)?s.input:[s.input])),s.code==="ERROR"&&au("Error:",s.error.message)})})):await Promise.all(n.map(async r=>{const o=await Ge(r);return Promise.all(r.output.map(s=>o.write(s)))}))})().catch(u=>{console.error(u),process.exit(1)});
29
+ `+" ".repeat(e));var ru;(function(u){u.DEFAULT={allowTrailingComma:!1}})(ru||(ru={}));function me(u,e=[],D=ru.DEFAULT){let t=null,n=[];const r=[];function o(s){Array.isArray(n)?n.push(s):t!==null&&(n[t]=s)}return i(o,"u"),f(o,"onValue"),ge(u,{onObjectBegin:f(()=>{const s={};o(s),r.push(n),n=s,t=null},"onObjectBegin"),onObjectProperty:f(s=>{t=s},"onObjectProperty"),onObjectEnd:f(()=>{n=r.pop()},"onObjectEnd"),onArrayBegin:f(()=>{const s=[];o(s),r.push(n),n=s,t=null},"onArrayBegin"),onArrayEnd:f(()=>{n=r.pop()},"onArrayEnd"),onLiteralValue:o,onError:f((s,a,l)=>{e.push({error:s,offset:a,length:l})},"onError")},D),n[0]}i(me,"ye"),f(me,"parse$1");function ge(u,e,D=ru.DEFAULT){const t=Ee(u,!1),n=[];function r(A){return A?()=>A(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}i(r,"i"),f(r,"toNoArgVisit");function o(A){return A?()=>A(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>n.slice()):()=>!0}i(o,"u"),f(o,"toNoArgVisitWithPath");function s(A){return A?v=>A(v,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}i(s,"f"),f(s,"toOneArgVisit");function a(A){return A?v=>A(v,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>n.slice()):()=>!0}i(a,"r"),f(a,"toOneArgVisitWithPath");const l=o(e.onObjectBegin),C=a(e.onObjectProperty),F=r(e.onObjectEnd),c=o(e.onArrayBegin),E=r(e.onArrayEnd),d=a(e.onLiteralValue),m=s(e.onSeparator),y=r(e.onComment),j=s(e.onError),$=D&&D.disallowComments,p=D&&D.allowTrailingComma;function B(){for(;;){const A=t.scan();switch(t.getTokenError()){case 4:g(14);break;case 5:g(15);break;case 3:g(13);break;case 1:$||g(11);break;case 2:g(12);break;case 6:g(16);break}switch(A){case 12:case 13:$?g(10):y();break;case 16:g(1);break;case 15:case 14:break;default:return A}}}i(B,"k"),f(B,"scanNext");function g(A,v=[],Lu=[]){if(j(A),v.length+Lu.length>0){let Y=t.getToken();for(;Y!==17;){if(v.indexOf(Y)!==-1){B();break}else if(Lu.indexOf(Y)!==-1)break;Y=B()}}}i(g,"m"),f(g,"handleError");function b(A){const v=t.getTokenValue();return A?d(v):(C(v),n.push(v)),B(),!0}i(b,"F"),f(b,"parseString");function w(){switch(t.getToken()){case 11:const A=t.getTokenValue();let v=Number(A);isNaN(v)&&(g(2),v=0),d(v);break;case 7:d(null);break;case 8:d(!0);break;case 9:d(!1);break;default:return!1}return B(),!0}i(w,"j"),f(w,"parseLiteral");function lu(){return t.getToken()!==10?(g(3,[],[2,5]),!1):(b(!1),t.getToken()===6?(m(":"),B(),Q()||g(4,[],[2,5])):g(5,[],[2,5]),n.pop(),!0)}i(lu,"S"),f(lu,"parseProperty");function Nu(){l(),B();let A=!1;for(;t.getToken()!==2&&t.getToken()!==17;){if(t.getToken()===5){if(A||g(4,[],[]),m(","),B(),t.getToken()===2&&p)break}else A&&g(6,[],[]);lu()||g(4,[],[2,5]),A=!0}return F(),t.getToken()!==2?g(7,[2],[]):B(),!0}i(Nu,"R"),f(Nu,"parseObject");function Ru(){c(),B();let A=!0,v=!1;for(;t.getToken()!==4&&t.getToken()!==17;){if(t.getToken()===5){if(v||g(4,[],[]),m(","),B(),t.getToken()===4&&p)break}else v&&g(6,[],[]);A?(n.push(0),A=!1):n[n.length-1]++,Q()||g(4,[],[4,5]),v=!0}return E(),A||n.pop(),t.getToken()!==4?g(8,[4],[]):B(),!0}i(Ru,"a"),f(Ru,"parseArray");function Q(){switch(t.getToken()){case 3:return Ru();case 1:return Nu();case 10:return b(!0);default:return w()}}return i(Q,"U"),f(Q,"parseValue"),B(),t.getToken()===17?D.allowEmptyContent?!0:(g(4,[],[]),!1):Q()?(t.getToken()!==17&&g(9,[],[]),!0):(g(4,[],[]),!1)}i(ge,"Fe"),f(ge,"visit");var Be;(function(u){u[u.None=0]="None",u[u.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",u[u.UnexpectedEndOfString=2]="UnexpectedEndOfString",u[u.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",u[u.InvalidUnicode=4]="InvalidUnicode",u[u.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",u[u.InvalidCharacter=6]="InvalidCharacter"})(Be||(Be={}));var Ae;(function(u){u[u.OpenBraceToken=1]="OpenBraceToken",u[u.CloseBraceToken=2]="CloseBraceToken",u[u.OpenBracketToken=3]="OpenBracketToken",u[u.CloseBracketToken=4]="CloseBracketToken",u[u.CommaToken=5]="CommaToken",u[u.ColonToken=6]="ColonToken",u[u.NullKeyword=7]="NullKeyword",u[u.TrueKeyword=8]="TrueKeyword",u[u.FalseKeyword=9]="FalseKeyword",u[u.StringLiteral=10]="StringLiteral",u[u.NumericLiteral=11]="NumericLiteral",u[u.LineCommentTrivia=12]="LineCommentTrivia",u[u.BlockCommentTrivia=13]="BlockCommentTrivia",u[u.LineBreakTrivia=14]="LineBreakTrivia",u[u.Trivia=15]="Trivia",u[u.Unknown=16]="Unknown",u[u.EOF=17]="EOF"})(Ae||(Ae={}));const QD=me;var ye;(function(u){u[u.InvalidSymbol=1]="InvalidSymbol",u[u.InvalidNumberFormat=2]="InvalidNumberFormat",u[u.PropertyNameExpected=3]="PropertyNameExpected",u[u.ValueExpected=4]="ValueExpected",u[u.ColonExpected=5]="ColonExpected",u[u.CommaExpected=6]="CommaExpected",u[u.CloseBraceExpected=7]="CloseBraceExpected",u[u.CloseBracketExpected=8]="CloseBracketExpected",u[u.EndOfFileExpected=9]="EndOfFileExpected",u[u.InvalidCommentToken=10]="InvalidCommentToken",u[u.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",u[u.UnexpectedEndOfString=12]="UnexpectedEndOfString",u[u.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",u[u.InvalidUnicode=14]="InvalidUnicode",u[u.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",u[u.InvalidCharacter=16]="InvalidCharacter"})(ye||(ye={}));const be=f((u,e)=>QD(ZD(e,u,"utf8")),"readJsonc"),ku=Symbol("implicitBaseUrl"),_="${configDir}",YD=f(()=>{const{findPnpApi:u}=ut;return u&&u(process.cwd())},"getPnpApi"),ju=f((u,e,D,t)=>{const n=`resolveFromPackageJsonPath:${u}:${e}:${D}`;if(t!=null&&t.has(n))return t.get(n);const r=be(u,t);if(!r)return;let o=e||"tsconfig.json";if(!D&&r.exports)try{const[s]=KD(r.exports,e,["require","types"]);o=s}catch{return!1}else!e&&r.tsconfig&&(o=r.tsconfig);return o=h.join(u,"..",o),t?.set(n,o),o},"resolveFromPackageJsonPath"),Ou="package.json",Tu="tsconfig.json",XD=f((u,e,D)=>{let t=u;if(u===".."&&(t=h.join(t,Tu)),u[0]==="."&&(t=h.resolve(e,t)),h.isAbsolute(t)){if(O(D,t)){if(Du(D,t).isFile())return t}else if(!t.endsWith(".json")){const E=`${t}.json`;if(O(D,E))return E}return}const[n,...r]=u.split("/"),o=n[0]==="@"?`${n}/${r.shift()}`:n,s=r.join("/"),a=YD();if(a){const{resolveRequest:E}=a;try{if(o===u){const d=E(h.join(o,Ou),e);if(d){const m=ju(d,s,!1,D);if(m&&O(D,m))return m}}else{let d;try{d=E(u,e,{extensions:[".json"]})}catch{d=E(h.join(u,Tu),e)}if(d)return d}}catch{}}const l=de(h.resolve(e),h.join("node_modules",o),D);if(!l||!Du(D,l).isDirectory())return;const C=h.join(l,Ou);if(O(D,C)){const E=ju(C,s,!1,D);if(E===!1)return;if(E&&O(D,E)&&Du(D,E).isFile())return E}const F=h.join(l,s),c=F.endsWith(".json");if(!c){const E=`${F}.json`;if(O(D,E))return E}if(O(D,F)){if(Du(D,F).isDirectory()){const E=h.join(F,Ou);if(O(D,E)){const m=ju(E,"",!0,D);if(m&&O(D,m))return m}const d=h.join(F,Tu);if(O(D,d))return d}else if(c)return F}},"resolveExtendsPath"),Su=f((u,e)=>xu(h.relative(u,e)),"pathRelative"),we=["files","include","exclude"],un=f((u,e,D,t)=>{const n=XD(u,e,t);if(!n)throw new Error(`File '${u}' not found.`);if(D.has(n))throw new Error(`Circularity detected while resolving configuration: ${n}`);D.add(n);const r=h.dirname(n),o=ve(n,t,D);delete o.references;const{compilerOptions:s}=o;if(s){const{baseUrl:a}=s;a&&!a.startsWith(_)&&(s.baseUrl=k(h.relative(e,h.join(r,a)))||"./");let{outDir:l}=s;l&&(l.startsWith(_)||(l=h.relative(e,h.join(r,l))),s.outDir=k(l)||"./")}for(const a of we){const l=o[a];l&&(o[a]=l.map(C=>C.startsWith(_)?C:k(h.relative(e,h.join(r,C)))))}return o},"resolveExtends"),en=["outDir","declarationDir"],ve=f((u,e,D=new Set)=>{let t;try{t=be(u,e)||{}}catch{throw new Error(`Cannot resolve tsconfig at path: ${u}`)}if(typeof t!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${u}`);const n=h.dirname(u);if(t.compilerOptions){const{compilerOptions:r}=t;r.paths&&!r.baseUrl&&(r[ku]=n)}if(t.extends){const r=Array.isArray(t.extends)?t.extends:[t.extends];delete t.extends;for(const o of r.reverse()){const s=un(o,n,new Set(D),e),a={...s,...t,compilerOptions:{...s.compilerOptions,...t.compilerOptions}};s.watchOptions&&(a.watchOptions={...s.watchOptions,...t.watchOptions}),t=a}}if(t.compilerOptions){const{compilerOptions:r}=t,o=["baseUrl","rootDir"];for(const s of o){const a=r[s];if(a&&!a.startsWith(_)){const l=h.resolve(n,a),C=Su(n,l);r[s]=C}}for(const s of en){let a=r[s];a&&(Array.isArray(t.exclude)||(t.exclude=[]),t.exclude.includes(a)||t.exclude.push(a),a.startsWith(_)||(a=xu(a)),r[s]=a)}}else t.compilerOptions={};if(t.include?(t.include=t.include.map(k),t.files&&delete t.files):t.files&&(t.files=t.files.map(r=>r.startsWith(_)?r:xu(r))),t.watchOptions){const{watchOptions:r}=t;r.excludeDirectories&&(r.excludeDirectories=r.excludeDirectories.map(o=>k(h.resolve(n,o))))}return t},"_parseTsconfig"),ou=f((u,e)=>{if(u.startsWith(_))return k(h.join(e,u.slice(_.length)))},"interpolateConfigDir"),tn=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],Dn=f(u=>{if(u.strict){const e=["noImplicitAny","noImplicitThis","strictNullChecks","strictFunctionTypes","strictBindCallApply","strictPropertyInitialization","strictBuiltinIteratorReturn","alwaysStrict","useUnknownInCatchVariables"];for(const D of e)u[D]===void 0&&(u[D]=!0)}if(u.target){let e=u.target.toLowerCase();e==="es2015"&&(e="es6"),u.target=e,e==="esnext"&&(u.module!=null||(u.module="es6"),u.moduleResolution!=null||(u.moduleResolution="classic"),u.useDefineForClassFields!=null||(u.useDefineForClassFields=!0)),(e==="es6"||e==="es2016"||e==="es2017"||e==="es2018"||e==="es2019"||e==="es2020"||e==="es2021"||e==="es2022"||e==="es2023"||e==="es2024")&&(u.module!=null||(u.module="es6"),u.moduleResolution!=null||(u.moduleResolution="classic")),(e==="es2022"||e==="es2023"||e==="es2024")&&(u.useDefineForClassFields!=null||(u.useDefineForClassFields=!0))}if(u.module){let e=u.module.toLowerCase();e==="es2015"&&(e="es6"),u.module=e,(e==="es6"||e==="es2020"||e==="es2022"||e==="esnext"||e==="none"||e==="system"||e==="umd"||e==="amd")&&(u.moduleResolution!=null||(u.moduleResolution="classic")),e==="system"&&(u.allowSyntheticDefaultImports!=null||(u.allowSyntheticDefaultImports=!0)),(e==="node16"||e==="nodenext"||e==="preserve")&&(u.esModuleInterop!=null||(u.esModuleInterop=!0),u.allowSyntheticDefaultImports!=null||(u.allowSyntheticDefaultImports=!0)),(e==="node16"||e==="nodenext")&&(u.moduleDetection!=null||(u.moduleDetection="force"),u.useDefineForClassFields!=null||(u.useDefineForClassFields=!0)),e==="node16"&&(u.target!=null||(u.target="es2022"),u.moduleResolution!=null||(u.moduleResolution="node16")),e==="nodenext"&&(u.target!=null||(u.target="esnext"),u.moduleResolution!=null||(u.moduleResolution="nodenext")),e==="preserve"&&(u.moduleResolution!=null||(u.moduleResolution="bundler"))}if(u.moduleResolution){let e=u.moduleResolution.toLowerCase();e==="node"&&(e="node10"),u.moduleResolution=e,(e==="node16"||e==="nodenext"||e==="bundler")&&(u.resolvePackageJsonExports!=null||(u.resolvePackageJsonExports=!0),u.resolvePackageJsonImports!=null||(u.resolvePackageJsonImports=!0)),e==="bundler"&&(u.allowSyntheticDefaultImports!=null||(u.allowSyntheticDefaultImports=!0),u.resolveJsonModule!=null||(u.resolveJsonModule=!0))}u.esModuleInterop&&(u.allowSyntheticDefaultImports!=null||(u.allowSyntheticDefaultImports=!0)),u.verbatimModuleSyntax&&(u.isolatedModules!=null||(u.isolatedModules=!0),u.preserveConstEnums!=null||(u.preserveConstEnums=!0)),u.isolatedModules&&(u.preserveConstEnums!=null||(u.preserveConstEnums=!0))},"normalizeCompilerOptions"),$e=f((u,e=new Map)=>{const D=h.resolve(u),t=ve(D,e),n=h.dirname(D),{compilerOptions:r}=t;if(r){for(const s of tn){const a=r[s];if(a){const l=ou(a,n);r[s]=l?Su(n,l):a}}for(const s of["rootDirs","typeRoots"]){const a=r[s];a&&(r[s]=a.map(l=>{const C=ou(l,n);return C?Su(n,C):l}))}const{paths:o}=r;if(o)for(const s of Object.keys(o))o[s]=o[s].map(a=>{var l;return(l=ou(a,n))!=null?l:a});Dn(r)}for(const o of we){const s=t[o];s&&(t[o]=s.map(a=>{var l;return(l=ou(a,n))!=null?l:a}))}return t},"parseTsconfig"),nn=f((u=process.cwd(),e="tsconfig.json",D=new Map)=>{const t=de(k(u),e,D);if(!t)return null;const n=$e(t,D);return{path:t,config:n}},"getTsconfig"),rn=/\*/g,xe=f((u,e)=>{const D=u.match(rn);if(D&&D.length>1)throw new Error(e)},"assertStarCount"),on=f(u=>{if(u.includes("*")){const[e,D]=u.split("*");return{prefix:e,suffix:D}}return u},"parsePattern"),sn=f(({prefix:u,suffix:e},D)=>D.startsWith(u)&&D.endsWith(e),"isPatternMatch"),an=f((u,e,D)=>Object.entries(u).map(([t,n])=>(xe(t,`Pattern '${t}' can have at most one '*' character.`),{pattern:on(t),substitutions:n.map(r=>{if(xe(r,`Substitution '${r}' in pattern '${t}' can have at most one '*' character.`),!e&&!$u.test(r))throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return h.resolve(D,r)})})),"parsePaths"),ln=f(u=>{const{compilerOptions:e}=u.config;if(!e)return null;const{baseUrl:D,paths:t}=e;if(!D&&!t)return null;const n=ku in e&&e[ku],r=h.resolve(h.dirname(u.path),D||n||"."),o=t?an(t,D,r):[];return s=>{if($u.test(s))return[];const a=[];for(const c of o){if(c.pattern===s)return c.substitutions.map(k);typeof c.pattern!="string"&&a.push(c)}let l,C=-1;for(const c of a)sn(c.pattern,s)&&c.pattern.prefix.length>C&&(C=c.pattern.prefix.length,l=c);if(!l)return D?[k(h.join(r,s))]:[];const F=s.slice(l.pattern.prefix.length,s.length-l.pattern.suffix.length);return l.substitutions.map(c=>k(c.replace("*",F)))}},"createPathsMatcher"),ke=f(u=>{let e="";for(let D=0;D<u.length;D+=1){const t=u[D],n=t.toUpperCase();e+=t===n?t.toLowerCase():n}return e},"s"),cn=65,fn=97,Fn=f(()=>Math.floor(Math.random()*26),"m"),Cn=f(u=>Array.from({length:u},()=>String.fromCodePoint(Fn()+(Math.random()>.5?cn:fn))).join(""),"S"),pn=f((u=tt)=>{const e=process.execPath;if(u.existsSync(e))return!u.existsSync(ke(e));const D=`/${Cn(10)}`;u.writeFileSync(D,"");const t=!u.existsSync(ke(D));return u.unlinkSync(D),t},"l"),{join:su}=h.posix,Pu={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},dn=f(u=>{const e=[...Pu.ts],D=[...Pu.cts],t=[...Pu.mts];return u!=null&&u.allowJs&&(e.push(".js",".jsx"),D.push(".cjs"),t.push(".mjs")),[...e,...D,...t]},"getSupportedExtensions"),En=f(u=>{const e=[];if(!u)return e;const{outDir:D,declarationDir:t}=u;return D&&e.push(D),t&&e.push(t),e},"getDefaultExcludeSpec"),je=f(u=>u.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),hn=["node_modules","bower_components","jspm_packages"],_u=`(?!(${hn.join("|")})(/|$))`,mn=/(?:^|\/)[^.*?]+$/,Oe="**/*",iu="[^/]",Iu="[^./]",Te=process.platform==="win32";f(({config:u,path:e},D=pn())=>{if("extends"in u)throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");if(!h.isAbsolute(e))throw new Error("The tsconfig path must be absolute");Te&&(e=k(e));const t=h.dirname(e),{files:n,include:r,exclude:o,compilerOptions:s}=u,a=n?.map(d=>su(t,d)),l=dn(s),C=D?"":"i",F=(o||En(s)).map(d=>{const m=su(t,d),y=je(m).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${iu}*`).replaceAll(String.raw`\?`,iu);return new RegExp(`^${y}($|/)`,C)}),c=n||r?r:[Oe],E=c?c.map(d=>{let m=su(t,d);mn.test(m)&&(m=su(m,Oe));const y=je(m).replaceAll(String.raw`/\*\*`,`(/${_u}${Iu}${iu}*)*?`).replaceAll(/(\/)?\\\*/g,(j,$)=>{const p=`(${Iu}|(\\.(?!min\\.js$))?)*`;return $?`/${_u}${Iu}${p}`:p}).replaceAll(/(\/)?\\\?/g,(j,$)=>{const p=iu;return $?`/${_u}${p}`:p});return new RegExp(`^${y}$`,C)}):void 0;return d=>{if(!h.isAbsolute(d))throw new Error("filePath must be absolute");if(Te&&(d=k(d)),a!=null&&a.includes(d)||!(!l.some(m=>d.endsWith(m))||F.some(m=>m.test(d)))&&E&&E.some(m=>m.test(d)))return u}},"createFilesMatcher");const Se="resolve-tsconfig-paths",gn=i(u=>u[0]===".","isRelative"),Bn=i(u=>u[0]==="/"||/^[\s\S]:/.test(u),"isAbsolute"),Pe=i(u=>{const e=ln(u);return e?{name:Se,async resolveId(D,t,n){if(!t||gn(D)||Bn(D)||D.startsWith("\0"))return null;const r=e(D);for(const o of r){const s=await this.resolve(o,t,{skipSelf:!0,...n});if(s)return s}return null}}:{name:Se}},"resolveTsconfigPaths"),_e=/^#!.*/,An=i(()=>({name:"strip-hashbang",transform:i(u=>{if(!_e.test(u))return null;const e=new cu(u);return e.replace(_e,""),{code:e.toString(),map:e.generateMap({hires:!0})}},"transform")}),"stripHashbang");class yn{static{i(this,"WalkerBase")}constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:i(()=>this.should_skip=!0,"skip"),remove:i(()=>this.should_remove=!0,"remove"),replace:i(e=>this.replacement=e,"replace")}}replace(e,D,t,n){e&&D&&(t!=null?e[D][t]=n:e[D]=n)}remove(e,D,t){e&&D&&(t!=null?e[D].splice(t,1):delete e[D])}}class bn extends yn{static{i(this,"SyncWalker")}constructor(e,D){super(),this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:i(()=>this.should_skip=!0,"skip"),remove:i(()=>this.should_remove=!0,"remove"),replace:i(t=>this.replacement=t,"replace")},this.enter=e,this.leave=D}visit(e,D,t,n){if(e){if(this.enter){const o=this.should_skip,s=this.should_remove,a=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,e,D,t,n),this.replacement&&(e=this.replacement,this.replace(D,t,n,e)),this.should_remove&&this.remove(D,t,n);const l=this.should_skip,C=this.should_remove;if(this.should_skip=o,this.should_remove=s,this.replacement=a,l)return e;if(C)return null}let r;for(r in e){const o=e[r];if(o&&typeof o=="object")if(Array.isArray(o)){const s=o;for(let a=0;a<s.length;a+=1){const l=s[a];Ie(l)&&(this.visit(l,e,r,a)||a--)}}else Ie(o)&&this.visit(o,e,r,null)}if(this.leave){const o=this.replacement,s=this.should_remove;this.replacement=null,this.should_remove=!1,this.leave.call(this.context,e,D,t,n),this.replacement&&(e=this.replacement,this.replace(D,t,n,e)),this.should_remove&&this.remove(D,t,n);const a=this.should_remove;if(this.replacement=o,this.should_remove=s,a)return null}}return e}}function Ie(u){return u!==null&&typeof u=="object"&&"type"in u&&typeof u.type=="string"}i(Ie,"isNode");function wn(u,{enter:e,leave:D}){return new bn(e,D).visit(u,null)}i(wn,"walk");const vn=i(()=>{const u='import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);';return{name:"esmInjectCreateRequire",renderChunk(e,D,t){if(t.format!=="es"||!/\brequire\b/.test(e))return null;const n=this.parse(e);let r=Dt(n,"scope"),o=!1;if(wn(n,{enter(a){a.scope&&(r=a.scope),a.type==="Identifier"&&a.name==="require"&&!r.contains("require")&&(o=!0,this.skip())},leave:i(a=>{a.scope&&(r=r.parent)},"leave")}),!o)return null;const s=new cu(e);return s.prepend(u),{code:s.toString(),map:s.generateMap({hires:!0})}}}},"esmInjectCreateRequire"),$n=i((u,e,D,t,n)=>{const r={target:u.target,tsconfigRaw:n?.config,define:D};return{input:[],preserveEntrySignatures:"strict",plugins:[ce(u),...n?[Pe(n)]:[],fe(),Qe({entries:e}),Ke({extensions:[".mjs",".js",".ts",".jsx",".tsx",".json"],exportConditions:u.exportCondition}),An(),Ze(),ID(r),He({ignoreDynamicRequires:!0,extensions:[".js",".ts",".jsx",".tsx"],transformMixedEsModules:!0}),Ye({warnOnError:!0}),vn(),...u.minify?[RD(r)]:[],LD(t)],output:[],external:[]}},"getPkgConfig"),xn=i(async(u,e)=>{const[D,t]=await Promise.all([import("./rollup-plugin-dts-CKfQVads.mjs"),import("./local-typescript-loader-CSvrvK-x.mjs")]);return{input:[],preserveEntrySignatures:"strict",plugins:[ce(u),...e?[Pe(e)]:[],fe(),D.default({respectExternal:!0,compilerOptions:{composite:!1,preserveSymlinks:!1,module:t.default.ModuleKind.Preserve,moduleResolution:t.default.ModuleResolutionKind.Bundler},tsconfig:e?.path})],output:[],external:[]}},"getDtsConfig"),Ne=i(u=>u.split("?")[0],"stripQuery"),kn=i(async(u,e,D,t,n,r,o)=>{const s=D.filter(({exportEntry:c})=>c.isExecutable).map(({exportEntry:c})=>c.outputPath),a=Object.create(null),l=Object.fromEntries(t.env.map(({key:c,value:E})=>[`process.env.${c}`,JSON.stringify(E)])),C=le(r,n),F=le(r,n,!0);for(const{input:c,srcExtension:E,distExtension:d,exportEntry:m}of D){if(m.type==="types"){let B=a.dts;B||(B=await xn(t,o),B.external=F,a.dts=B),B.input.includes(c)||B.input.push(c),B.output.push({dir:e,entryFileNames:i(g=>S.realpathSync.native(Ne(g.facadeModuleId)).slice(u.length,-E.length)+d,"entryFileNames"),exports:"auto",format:"esm"});continue}let y=a.pkg;y||(y=$n(t,n,l,s,o),y.external=C,a.pkg=y),y.input.includes(c)||y.input.push(c);const j=y.output,$=h.extname(m.outputPath),p=`${m.type}-${$}`;if(!j[p]){const B={dir:e,exports:"auto",format:m.type,chunkFileNames:`[name]-[hash]${$}`,sourcemap:t.sourcemap,entryFileNames:i(g=>{const w=S.realpathSync.native(Ne(g.facadeModuleId)).slice(u.length);return h.join(h.dirname(w),g.name)+d},"entryFileNames")};j.push(B),j[p]=B}}return Object.values(a)},"getRollupConfigs"),jn=i(u=>{if(!u)return nn();const e=h.resolve(u),D=$e(e);return{path:e,config:D}},"getTsconfig");let L=!0;const z=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let H=0;if(z.process&&z.process.env&&z.process.stdout){const{FORCE_COLOR:u,NODE_DISABLE_COLORS:e,NO_COLOR:D,TERM:t,COLORTERM:n}=z.process.env;e||D||u==="0"?L=!1:u==="1"||u==="2"||u==="3"?L=!0:t==="dumb"?L=!1:"CI"in z.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(r=>r in z.process.env)?L=!0:L=process.stdout.isTTY,L&&(process.platform==="win32"||n&&(n==="truecolor"||n==="24bit")?H=3:t&&(t.endsWith("-256color")||t.endsWith("256"))?H=2:H=1)}let Re={enabled:L,supportLevel:H};function On(u,e,D=1){const t=`\x1B[${u}m`,n=`\x1B[${e}m`,r=new RegExp(`\\x1b\\[${e}m`,"g");return o=>Re.enabled&&Re.supportLevel>=D?t+(""+o).replace(r,t)+n:""+o}i(On,"kolorist");const Tn=On(90,39),Sn=i(()=>new Date().toLocaleTimeString(),"currentTime"),au=i((...u)=>console.log(`[${Tn(Sn())}]`,...u),"log"),Pn=i(async u=>{await mu(u)&&await S.promises.rm(u,{recursive:!0,force:!0})},"cleanDist"),{stringify:Le}=JSON,I=AD({name:"pkgroll",version:yD,flags:{input:{type:[kD],alias:"i",description:"Dist paths for source files to bundle (Only use if you cannot use package.json entries)"},src:{type:String,description:"Source directory",default:"./src"},dist:{type:String,description:"Distribution directory",default:"./dist"},minify:{type:Boolean,description:"Minify output",alias:"m",default:!1},target:{type:[String],default:[`node${process.versions.node}`],description:"Environments to support. `target` in tsconfig.json is automatically added. Defaults to the current Node.js version.",alias:"t"},tsconfig:{type:String,description:"Custom tsconfig.json file path",alias:"p"},watch:{type:Boolean,description:"Watch mode",alias:"w",default:!1},env:{type:[u=>{const[e,D]=u.split("=");return{key:e,value:D}}],description:"Compile-time environment variables (eg. --env.NODE_ENV=production)"},exportCondition:{type:[String],description:"Export conditions for resolving dependency export and import maps (eg. --export-condition=node)"},sourcemap:{type:i(u=>{if(u==="")return!0;if(u==="inline")return u;throw new Error(`Invalid sourcemap option ${Le(u)}`)},"type"),description:"Sourcemap generation. Provide `inline` option for inline sourcemap (eg. --sourcemap, --sourcemap=inline)"},cleanDist:{type:Boolean,description:"Clean dist before bundling",default:!1}},help:{description:"Minimalistic package bundler",render:i((u,e)=>(e.flagOperator=D=>D.name==="env"?".key=":" ",e.render(u)),"render")}}),Me=process.cwd(),We=G(I.flags.src,!0),Z=G(I.flags.dist,!0),Ue=jn(I.flags.tsconfig),Ve=Ue?.config.compilerOptions?.target;Ve&&I.flags.target.push(Ve),(async()=>{const u=await bD(Me);let e=xD(u);const D=I.flags.input;if(D.length>0){const r=u.type??"commonjs";e.push(...D.map(o=>(o.type||(o.type=r),o)))}if(e=e.filter(r=>{const o=r.outputPath.startsWith(Z);return o||console.warn(`Ignoring entry outside of ${Z} directory: package.json#${r.from}=${Le(r.outputPath)}`),o}),e.length===0)throw new Error("No export entries found in package.json");const t=await Promise.all(e.map(async r=>({...await PD(r,We,Z),exportEntry:r}))),n=await kn(G(S.realpathSync.native(We),!0),Z,t,I.flags,jD(u,Me),u,Ue);I.flags.cleanDist&&await Pn(Z),I.flags.watch?(au("Watch initialized"),n.map(async r=>{Je(r).on("event",async s=>{s.code==="BUNDLE_START"&&au("Building",...Array.isArray(s.input)?s.input:[s.input]),s.code==="BUNDLE_END"&&(await Promise.all(r.output.map(a=>s.result.write(a))),au("Built",...Array.isArray(s.input)?s.input:[s.input])),s.code==="ERROR"&&au("Error:",s.error.message)})})):await Promise.all(n.map(async r=>{const o=await Ge(r);return Promise.all(r.output.map(s=>o.write(s)))}))})().catch(u=>{console.error(u),process.exit(1)});
@@ -0,0 +1,30 @@
1
+ var He=Object.defineProperty;var v=(p,e)=>He(p,"name",{value:e,configurable:!0});import{createRequire as Xe}from"node:module";const de=Xe(import.meta.url);import*as w from"path";import l from"typescript";import Ye from"tty";import Je from"os";import{createRequire as Qe}from"module";import Ze from"magic-string";var q={},_={},W={},ge;function et(){return ge||(ge=1,Object.defineProperty(W,"__esModule",{value:!0}),W.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,W.matchToToken=function(p){var e={type:"invalid",value:p[0],closed:void 0};return p[1]?(e.type="string",e.closed=!!(p[3]||p[4])):p[5]?e.type="comment":p[6]?(e.type="comment",e.closed=!!p[7]):p[8]?e.type="regex":p[9]?e.type="number":p[10]?e.type="name":p[11]?e.type="punctuator":p[12]&&(e.type="whitespace"),e}),W}v(et,"requireJsTokens");var ee={},j={},ve;function tt(){if(ve)return j;ve=1,Object.defineProperty(j,"__esModule",{value:!0}),j.isIdentifierChar=n,j.isIdentifierName=i,j.isIdentifierStart=m;let p="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",e="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";const r=new RegExp("["+p+"]"),u=new RegExp("["+p+e+"]");p=e=null;const c=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],A=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function f(t,s){let o=65536;for(let d=0,a=s.length;d<a;d+=2){if(o+=s[d],o>t)return!1;if(o+=s[d+1],o>=t)return!0}return!1}v(f,"isInAstralSet");function m(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&r.test(String.fromCharCode(t)):f(t,c)}v(m,"isIdentifierStart");function n(t){return t<48?t===36:t<58?!0:t<65?!1:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&u.test(String.fromCharCode(t)):f(t,c)||f(t,A)}v(n,"isIdentifierChar");function i(t){let s=!0;for(let o=0;o<t.length;o++){let d=t.charCodeAt(o);if((d&64512)===55296&&o+1<t.length){const a=t.charCodeAt(++o);(a&64512)===56320&&(d=65536+((d&1023)<<10)+(a&1023))}if(s){if(s=!1,!m(d))return!1}else if(!n(d))return!1}return!s}return v(i,"isIdentifierName"),j}v(tt,"requireIdentifier");var M={},ye;function rt(){if(ye)return M;ye=1,Object.defineProperty(M,"__esModule",{value:!0}),M.isKeyword=n,M.isReservedWord=c,M.isStrictBindOnlyReservedWord=f,M.isStrictBindReservedWord=m,M.isStrictReservedWord=A;const p={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},e=new Set(p.keyword),r=new Set(p.strict),u=new Set(p.strictBind);function c(i,t){return t&&i==="await"||i==="enum"}v(c,"isReservedWord");function A(i,t){return c(i,t)||r.has(i)}v(A,"isStrictReservedWord");function f(i){return u.has(i)}v(f,"isStrictBindOnlyReservedWord");function m(i,t){return A(i,t)||f(i)}v(m,"isStrictBindReservedWord");function n(i){return e.has(i)}return v(n,"isKeyword"),M}v(rt,"requireKeyword");var Ae;function nt(){return Ae||(Ae=1,function(p){Object.defineProperty(p,"__esModule",{value:!0}),Object.defineProperty(p,"isIdentifierChar",{enumerable:!0,get:v(function(){return e.isIdentifierChar},"get")}),Object.defineProperty(p,"isIdentifierName",{enumerable:!0,get:v(function(){return e.isIdentifierName},"get")}),Object.defineProperty(p,"isIdentifierStart",{enumerable:!0,get:v(function(){return e.isIdentifierStart},"get")}),Object.defineProperty(p,"isKeyword",{enumerable:!0,get:v(function(){return r.isKeyword},"get")}),Object.defineProperty(p,"isReservedWord",{enumerable:!0,get:v(function(){return r.isReservedWord},"get")}),Object.defineProperty(p,"isStrictBindOnlyReservedWord",{enumerable:!0,get:v(function(){return r.isStrictBindOnlyReservedWord},"get")}),Object.defineProperty(p,"isStrictBindReservedWord",{enumerable:!0,get:v(function(){return r.isStrictBindReservedWord},"get")}),Object.defineProperty(p,"isStrictReservedWord",{enumerable:!0,get:v(function(){return r.isStrictReservedWord},"get")});var e=tt(),r=rt()}(ee)),ee}v(nt,"requireLib$2");var U={exports:{}},Ce;function Fe(){if(Ce)return U.exports;Ce=1;let p=process.argv||[],e=process.env,r=!("NO_COLOR"in e||p.includes("--no-color"))&&("FORCE_COLOR"in e||p.includes("--color")||process.platform==="win32"||de!=null&&Ye.isatty(1)&&e.TERM!=="dumb"||"CI"in e),u=v((f,m,n=f)=>i=>{let t=""+i,s=t.indexOf(m,f.length);return~s?f+c(t,m,n,s)+m:f+t+m},"formatter"),c=v((f,m,n,i)=>{let t="",s=0;do t+=f.substring(s,i)+n,s=i+m.length,i=f.indexOf(m,s);while(~i);return t+f.substring(s)},"replaceClose"),A=v((f=r)=>{let m=f?u:()=>String;return{isColorSupported:f,reset:m("\x1B[0m","\x1B[0m"),bold:m("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:m("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:m("\x1B[3m","\x1B[23m"),underline:m("\x1B[4m","\x1B[24m"),inverse:m("\x1B[7m","\x1B[27m"),hidden:m("\x1B[8m","\x1B[28m"),strikethrough:m("\x1B[9m","\x1B[29m"),black:m("\x1B[30m","\x1B[39m"),red:m("\x1B[31m","\x1B[39m"),green:m("\x1B[32m","\x1B[39m"),yellow:m("\x1B[33m","\x1B[39m"),blue:m("\x1B[34m","\x1B[39m"),magenta:m("\x1B[35m","\x1B[39m"),cyan:m("\x1B[36m","\x1B[39m"),white:m("\x1B[37m","\x1B[39m"),gray:m("\x1B[90m","\x1B[39m"),bgBlack:m("\x1B[40m","\x1B[49m"),bgRed:m("\x1B[41m","\x1B[49m"),bgGreen:m("\x1B[42m","\x1B[49m"),bgYellow:m("\x1B[43m","\x1B[49m"),bgBlue:m("\x1B[44m","\x1B[49m"),bgMagenta:m("\x1B[45m","\x1B[49m"),bgCyan:m("\x1B[46m","\x1B[49m"),bgWhite:m("\x1B[47m","\x1B[49m")}},"createColors");return U.exports=A(),U.exports.createColors=A,U.exports}v(Fe,"requirePicocolors");var te={exports:{}},re,Ee;function it(){if(Ee)return re;Ee=1;var p=/[|\\{}()[\]^$+*?.]/g;return re=v(function(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(p,"\\$&")},"escapeStringRegexp"),re}v(it,"requireEscapeStringRegexp");var H={exports:{}},ne={exports:{}},ie,be;function st(){return be||(be=1,ie={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),ie}v(st,"requireColorName");var xe;function De(){if(xe)return ne.exports;xe=1;var p=st(),e={};for(var r in p)p.hasOwnProperty(r)&&(e[p[r]]=r);var u=ne.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var c in u)if(u.hasOwnProperty(c)){if(!("channels"in u[c]))throw new Error("missing channels property: "+c);if(!("labels"in u[c]))throw new Error("missing channel labels property: "+c);if(u[c].labels.length!==u[c].channels)throw new Error("channel and label counts mismatch: "+c);var A=u[c].channels,f=u[c].labels;delete u[c].channels,delete u[c].labels,Object.defineProperty(u[c],"channels",{value:A}),Object.defineProperty(u[c],"labels",{value:f})}u.rgb.hsl=function(n){var i=n[0]/255,t=n[1]/255,s=n[2]/255,o=Math.min(i,t,s),d=Math.max(i,t,s),a=d-o,h,y,g;return d===o?h=0:i===d?h=(t-s)/a:t===d?h=2+(s-i)/a:s===d&&(h=4+(i-t)/a),h=Math.min(h*60,360),h<0&&(h+=360),g=(o+d)/2,d===o?y=0:g<=.5?y=a/(d+o):y=a/(2-d-o),[h,y*100,g*100]},u.rgb.hsv=function(n){var i,t,s,o,d,a=n[0]/255,h=n[1]/255,y=n[2]/255,g=Math.max(a,h,y),F=g-Math.min(a,h,y),C=v(function(E){return(g-E)/6/F+1/2},"diffc");return F===0?o=d=0:(d=F/g,i=C(a),t=C(h),s=C(y),a===g?o=s-t:h===g?o=1/3+i-s:y===g&&(o=2/3+t-i),o<0?o+=1:o>1&&(o-=1)),[o*360,d*100,g*100]},u.rgb.hwb=function(n){var i=n[0],t=n[1],s=n[2],o=u.rgb.hsl(n)[0],d=1/255*Math.min(i,Math.min(t,s));return s=1-1/255*Math.max(i,Math.max(t,s)),[o,d*100,s*100]},u.rgb.cmyk=function(n){var i=n[0]/255,t=n[1]/255,s=n[2]/255,o,d,a,h;return h=Math.min(1-i,1-t,1-s),o=(1-i-h)/(1-h)||0,d=(1-t-h)/(1-h)||0,a=(1-s-h)/(1-h)||0,[o*100,d*100,a*100,h*100]};function m(n,i){return Math.pow(n[0]-i[0],2)+Math.pow(n[1]-i[1],2)+Math.pow(n[2]-i[2],2)}return v(m,"comparativeDistance"),u.rgb.keyword=function(n){var i=e[n];if(i)return i;var t=1/0,s;for(var o in p)if(p.hasOwnProperty(o)){var d=p[o],a=m(n,d);a<t&&(t=a,s=o)}return s},u.keyword.rgb=function(n){return p[n]},u.rgb.xyz=function(n){var i=n[0]/255,t=n[1]/255,s=n[2]/255;i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;var o=i*.4124+t*.3576+s*.1805,d=i*.2126+t*.7152+s*.0722,a=i*.0193+t*.1192+s*.9505;return[o*100,d*100,a*100]},u.rgb.lab=function(n){var i=u.rgb.xyz(n),t=i[0],s=i[1],o=i[2],d,a,h;return t/=95.047,s/=100,o/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,d=116*s-16,a=500*(t-s),h=200*(s-o),[d,a,h]},u.hsl.rgb=function(n){var i=n[0]/360,t=n[1]/100,s=n[2]/100,o,d,a,h,y;if(t===0)return y=s*255,[y,y,y];s<.5?d=s*(1+t):d=s+t-s*t,o=2*s-d,h=[0,0,0];for(var g=0;g<3;g++)a=i+1/3*-(g-1),a<0&&a++,a>1&&a--,6*a<1?y=o+(d-o)*6*a:2*a<1?y=d:3*a<2?y=o+(d-o)*(2/3-a)*6:y=o,h[g]=y*255;return h},u.hsl.hsv=function(n){var i=n[0],t=n[1]/100,s=n[2]/100,o=t,d=Math.max(s,.01),a,h;return s*=2,t*=s<=1?s:2-s,o*=d<=1?d:2-d,h=(s+t)/2,a=s===0?2*o/(d+o):2*t/(s+t),[i,a*100,h*100]},u.hsv.rgb=function(n){var i=n[0]/60,t=n[1]/100,s=n[2]/100,o=Math.floor(i)%6,d=i-Math.floor(i),a=255*s*(1-t),h=255*s*(1-t*d),y=255*s*(1-t*(1-d));switch(s*=255,o){case 0:return[s,y,a];case 1:return[h,s,a];case 2:return[a,s,y];case 3:return[a,h,s];case 4:return[y,a,s];case 5:return[s,a,h]}},u.hsv.hsl=function(n){var i=n[0],t=n[1]/100,s=n[2]/100,o=Math.max(s,.01),d,a,h;return h=(2-t)*s,d=(2-t)*o,a=t*o,a/=d<=1?d:2-d,a=a||0,h/=2,[i,a*100,h*100]},u.hwb.rgb=function(n){var i=n[0]/360,t=n[1]/100,s=n[2]/100,o=t+s,d,a,h,y;o>1&&(t/=o,s/=o),d=Math.floor(6*i),a=1-s,h=6*i-d,d&1&&(h=1-h),y=t+h*(a-t);var g,F,C;switch(d){default:case 6:case 0:g=a,F=y,C=t;break;case 1:g=y,F=a,C=t;break;case 2:g=t,F=a,C=y;break;case 3:g=t,F=y,C=a;break;case 4:g=y,F=t,C=a;break;case 5:g=a,F=t,C=y;break}return[g*255,F*255,C*255]},u.cmyk.rgb=function(n){var i=n[0]/100,t=n[1]/100,s=n[2]/100,o=n[3]/100,d,a,h;return d=1-Math.min(1,i*(1-o)+o),a=1-Math.min(1,t*(1-o)+o),h=1-Math.min(1,s*(1-o)+o),[d*255,a*255,h*255]},u.xyz.rgb=function(n){var i=n[0]/100,t=n[1]/100,s=n[2]/100,o,d,a;return o=i*3.2406+t*-1.5372+s*-.4986,d=i*-.9689+t*1.8758+s*.0415,a=i*.0557+t*-.204+s*1.057,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,d=d>.0031308?1.055*Math.pow(d,1/2.4)-.055:d*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,o=Math.min(Math.max(0,o),1),d=Math.min(Math.max(0,d),1),a=Math.min(Math.max(0,a),1),[o*255,d*255,a*255]},u.xyz.lab=function(n){var i=n[0],t=n[1],s=n[2],o,d,a;return i/=95.047,t/=100,s/=108.883,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,o=116*t-16,d=500*(i-t),a=200*(t-s),[o,d,a]},u.lab.xyz=function(n){var i=n[0],t=n[1],s=n[2],o,d,a;d=(i+16)/116,o=t/500+d,a=d-s/200;var h=Math.pow(d,3),y=Math.pow(o,3),g=Math.pow(a,3);return d=h>.008856?h:(d-16/116)/7.787,o=y>.008856?y:(o-16/116)/7.787,a=g>.008856?g:(a-16/116)/7.787,o*=95.047,d*=100,a*=108.883,[o,d,a]},u.lab.lch=function(n){var i=n[0],t=n[1],s=n[2],o,d,a;return o=Math.atan2(s,t),d=o*360/2/Math.PI,d<0&&(d+=360),a=Math.sqrt(t*t+s*s),[i,a,d]},u.lch.lab=function(n){var i=n[0],t=n[1],s=n[2],o,d,a;return a=s/360*2*Math.PI,o=t*Math.cos(a),d=t*Math.sin(a),[i,o,d]},u.rgb.ansi16=function(n){var i=n[0],t=n[1],s=n[2],o=1 in arguments?arguments[1]:u.rgb.hsv(n)[2];if(o=Math.round(o/50),o===0)return 30;var d=30+(Math.round(s/255)<<2|Math.round(t/255)<<1|Math.round(i/255));return o===2&&(d+=60),d},u.hsv.ansi16=function(n){return u.rgb.ansi16(u.hsv.rgb(n),n[2])},u.rgb.ansi256=function(n){var i=n[0],t=n[1],s=n[2];if(i===t&&t===s)return i<8?16:i>248?231:Math.round((i-8)/247*24)+232;var o=16+36*Math.round(i/255*5)+6*Math.round(t/255*5)+Math.round(s/255*5);return o},u.ansi16.rgb=function(n){var i=n%10;if(i===0||i===7)return n>50&&(i+=3.5),i=i/10.5*255,[i,i,i];var t=(~~(n>50)+1)*.5,s=(i&1)*t*255,o=(i>>1&1)*t*255,d=(i>>2&1)*t*255;return[s,o,d]},u.ansi256.rgb=function(n){if(n>=232){var i=(n-232)*10+8;return[i,i,i]}n-=16;var t,s=Math.floor(n/36)/5*255,o=Math.floor((t=n%36)/6)/5*255,d=t%6/5*255;return[s,o,d]},u.rgb.hex=function(n){var i=((Math.round(n[0])&255)<<16)+((Math.round(n[1])&255)<<8)+(Math.round(n[2])&255),t=i.toString(16).toUpperCase();return"000000".substring(t.length)+t},u.hex.rgb=function(n){var i=n.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!i)return[0,0,0];var t=i[0];i[0].length===3&&(t=t.split("").map(function(h){return h+h}).join(""));var s=parseInt(t,16),o=s>>16&255,d=s>>8&255,a=s&255;return[o,d,a]},u.rgb.hcg=function(n){var i=n[0]/255,t=n[1]/255,s=n[2]/255,o=Math.max(Math.max(i,t),s),d=Math.min(Math.min(i,t),s),a=o-d,h,y;return a<1?h=d/(1-a):h=0,a<=0?y=0:o===i?y=(t-s)/a%6:o===t?y=2+(s-i)/a:y=4+(i-t)/a+4,y/=6,y%=1,[y*360,a*100,h*100]},u.hsl.hcg=function(n){var i=n[1]/100,t=n[2]/100,s=1,o=0;return t<.5?s=2*i*t:s=2*i*(1-t),s<1&&(o=(t-.5*s)/(1-s)),[n[0],s*100,o*100]},u.hsv.hcg=function(n){var i=n[1]/100,t=n[2]/100,s=i*t,o=0;return s<1&&(o=(t-s)/(1-s)),[n[0],s*100,o*100]},u.hcg.rgb=function(n){var i=n[0]/360,t=n[1]/100,s=n[2]/100;if(t===0)return[s*255,s*255,s*255];var o=[0,0,0],d=i%1*6,a=d%1,h=1-a,y=0;switch(Math.floor(d)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=h,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=a;break;case 3:o[0]=0,o[1]=h,o[2]=1;break;case 4:o[0]=a,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=h}return y=(1-t)*s,[(t*o[0]+y)*255,(t*o[1]+y)*255,(t*o[2]+y)*255]},u.hcg.hsv=function(n){var i=n[1]/100,t=n[2]/100,s=i+t*(1-i),o=0;return s>0&&(o=i/s),[n[0],o*100,s*100]},u.hcg.hsl=function(n){var i=n[1]/100,t=n[2]/100,s=t*(1-i)+.5*i,o=0;return s>0&&s<.5?o=i/(2*s):s>=.5&&s<1&&(o=i/(2*(1-s))),[n[0],o*100,s*100]},u.hcg.hwb=function(n){var i=n[1]/100,t=n[2]/100,s=i+t*(1-i);return[n[0],(s-i)*100,(1-s)*100]},u.hwb.hcg=function(n){var i=n[1]/100,t=n[2]/100,s=1-t,o=s-i,d=0;return o<1&&(d=(s-o)/(1-o)),[n[0],o*100,d*100]},u.apple.rgb=function(n){return[n[0]/65535*255,n[1]/65535*255,n[2]/65535*255]},u.rgb.apple=function(n){return[n[0]/255*65535,n[1]/255*65535,n[2]/255*65535]},u.gray.rgb=function(n){return[n[0]/100*255,n[0]/100*255,n[0]/100*255]},u.gray.hsl=u.gray.hsv=function(n){return[0,0,n[0]]},u.gray.hwb=function(n){return[0,100,n[0]]},u.gray.cmyk=function(n){return[0,0,0,n[0]]},u.gray.lab=function(n){return[n[0],0,0]},u.gray.hex=function(n){var i=Math.round(n[0]/100*255)&255,t=(i<<16)+(i<<8)+i,s=t.toString(16).toUpperCase();return"000000".substring(s.length)+s},u.rgb.gray=function(n){var i=(n[0]+n[1]+n[2])/3;return[i/255*100]},ne.exports}v(De,"requireConversions");var se,Be;function ut(){if(Be)return se;Be=1;var p=De();function e(){for(var A={},f=Object.keys(p),m=f.length,n=0;n<m;n++)A[f[n]]={distance:-1,parent:null};return A}v(e,"buildGraph");function r(A){var f=e(),m=[A];for(f[A].distance=0;m.length;)for(var n=m.pop(),i=Object.keys(p[n]),t=i.length,s=0;s<t;s++){var o=i[s],d=f[o];d.distance===-1&&(d.distance=f[n].distance+1,d.parent=n,m.unshift(o))}return f}v(r,"deriveBFS");function u(A,f){return function(m){return f(A(m))}}v(u,"link");function c(A,f){for(var m=[f[A].parent,A],n=p[f[A].parent][A],i=f[A].parent;f[i].parent;)m.unshift(f[i].parent),n=u(p[f[i].parent][i],n),i=f[i].parent;return n.conversion=m,n}return v(c,"wrapConversion"),se=v(function(A){for(var f=r(A),m={},n=Object.keys(f),i=n.length,t=0;t<i;t++){var s=n[t],o=f[s];o.parent!==null&&(m[s]=c(s,f))}return m},"route"),se}v(ut,"requireRoute");var ue,we;function at(){if(we)return ue;we=1;var p=De(),e=ut(),r={},u=Object.keys(p);function c(f){var m=v(function(n){return n==null?n:(arguments.length>1&&(n=Array.prototype.slice.call(arguments)),f(n))},"wrappedFn");return"conversion"in f&&(m.conversion=f.conversion),m}v(c,"wrapRaw");function A(f){var m=v(function(n){if(n==null)return n;arguments.length>1&&(n=Array.prototype.slice.call(arguments));var i=f(n);if(typeof i=="object")for(var t=i.length,s=0;s<t;s++)i[s]=Math.round(i[s]);return i},"wrappedFn");return"conversion"in f&&(m.conversion=f.conversion),m}return v(A,"wrapRounded"),u.forEach(function(f){r[f]={},Object.defineProperty(r[f],"channels",{value:p[f].channels}),Object.defineProperty(r[f],"labels",{value:p[f].labels});var m=e(f),n=Object.keys(m);n.forEach(function(i){var t=m[i];r[f][i]=A(t),r[f][i].raw=c(t)})}),ue=r,ue}v(at,"requireColorConvert"),H.exports;var Se;function ot(){return Se||(Se=1,function(p){const e=at(),r=v((f,m)=>function(){return`\x1B[${f.apply(e,arguments)+m}m`},"wrapAnsi16"),u=v((f,m)=>function(){const n=f.apply(e,arguments);return`\x1B[${38+m};5;${n}m`},"wrapAnsi256"),c=v((f,m)=>function(){const n=f.apply(e,arguments);return`\x1B[${38+m};2;${n[0]};${n[1]};${n[2]}m`},"wrapAnsi16m");function A(){const f=new Map,m={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[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]}};m.color.grey=m.color.gray;for(const t of Object.keys(m)){const s=m[t];for(const o of Object.keys(s)){const d=s[o];m[o]={open:`\x1B[${d[0]}m`,close:`\x1B[${d[1]}m`},s[o]=m[o],f.set(d[0],d[1])}Object.defineProperty(m,t,{value:s,enumerable:!1}),Object.defineProperty(m,"codes",{value:f,enumerable:!1})}const n=v(t=>t,"ansi2ansi"),i=v((t,s,o)=>[t,s,o],"rgb2rgb");m.color.close="\x1B[39m",m.bgColor.close="\x1B[49m",m.color.ansi={ansi:r(n,0)},m.color.ansi256={ansi256:u(n,0)},m.color.ansi16m={rgb:c(i,0)},m.bgColor.ansi={ansi:r(n,10)},m.bgColor.ansi256={ansi256:u(n,10)},m.bgColor.ansi16m={rgb:c(i,10)};for(let t of Object.keys(e)){if(typeof e[t]!="object")continue;const s=e[t];t==="ansi16"&&(t="ansi"),"ansi16"in s&&(m.color.ansi[t]=r(s.ansi16,0),m.bgColor.ansi[t]=r(s.ansi16,10)),"ansi256"in s&&(m.color.ansi256[t]=u(s.ansi256,0),m.bgColor.ansi256[t]=u(s.ansi256,10)),"rgb"in s&&(m.color.ansi16m[t]=c(s.rgb,0),m.bgColor.ansi16m[t]=c(s.rgb,10))}return m}v(A,"assembleStyles"),Object.defineProperty(p,"exports",{enumerable:!0,get:A})}(H)),H.exports}v(ot,"requireAnsiStyles");var ae,Te;function lt(){return Te||(Te=1,ae=v((p,e)=>{e=e||process.argv;const r=p.startsWith("-")?"":p.length===1?"-":"--",u=e.indexOf(r+p),c=e.indexOf("--");return u!==-1&&(c===-1?!0:u<c)},"hasFlag")),ae}v(lt,"requireHasFlag");var oe,Ne;function ct(){if(Ne)return oe;Ne=1;const p=Je,e=lt(),r=process.env;let u;e("no-color")||e("no-colors")||e("color=false")?u=!1:(e("color")||e("colors")||e("color=true")||e("color=always"))&&(u=!0),"FORCE_COLOR"in r&&(u=r.FORCE_COLOR.length===0||parseInt(r.FORCE_COLOR,10)!==0);function c(m){return m===0?!1:{level:m,hasBasic:!0,has256:m>=2,has16m:m>=3}}v(c,"translateLevel");function A(m){if(u===!1)return 0;if(e("color=16m")||e("color=full")||e("color=truecolor"))return 3;if(e("color=256"))return 2;if(m&&!m.isTTY&&u!==!0)return 0;const n=u?1:0;if(process.platform==="win32"){const i=p.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(i=>i in r)||r.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if(r.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in r){const i=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:(r.TERM==="dumb",n)}v(A,"supportsColor");function f(m){const n=A(m);return c(n)}return v(f,"getSupportLevel"),oe={supportsColor:f,stdout:f(process.stdout),stderr:f(process.stderr)},oe}v(ct,"requireSupportsColor");var le,Oe;function pt(){if(Oe)return le;Oe=1;const p=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,e=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,r=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,u=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,c=new Map([["n",`
2
+ `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function A(i){return i[0]==="u"&&i.length===5||i[0]==="x"&&i.length===3?String.fromCharCode(parseInt(i.slice(1),16)):c.get(i)||i}v(A,"unescape");function f(i,t){const s=[],o=t.trim().split(/\s*,\s*/g);let d;for(const a of o)if(!isNaN(a))s.push(Number(a));else if(d=a.match(r))s.push(d[2].replace(u,(h,y,g)=>y?A(y):g));else throw new Error(`Invalid Chalk template style argument: ${a} (in style '${i}')`);return s}v(f,"parseArguments");function m(i){e.lastIndex=0;const t=[];let s;for(;(s=e.exec(i))!==null;){const o=s[1];if(s[2]){const d=f(o,s[2]);t.push([o].concat(d))}else t.push([o])}return t}v(m,"parseStyle");function n(i,t){const s={};for(const d of t)for(const a of d.styles)s[a[0]]=d.inverse?null:a.slice(1);let o=i;for(const d of Object.keys(s))if(Array.isArray(s[d])){if(!(d in o))throw new Error(`Unknown Chalk style: ${d}`);s[d].length>0?o=o[d].apply(o,s[d]):o=o[d]}return o}return v(n,"buildStyle"),le=v((i,t)=>{const s=[],o=[];let d=[];if(t.replace(p,(a,h,y,g,F,C)=>{if(h)d.push(A(h));else if(g){const E=d.join("");d=[],o.push(s.length===0?E:n(i,s)(E)),s.push({inverse:y,styles:m(g)})}else if(F){if(s.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(n(i,s)(d.join(""))),d=[],s.pop()}else d.push(C)}),o.push(d.join("")),s.length>0){const a=`Chalk template literal is missing ${s.length} closing bracket${s.length===1?"":"s"} (\`}\`)`;throw new Error(a)}return o.join("")},"templates"),le}v(pt,"requireTemplates");var ke;function ft(){return ke||(ke=1,function(p){const e=it(),r=ot(),u=ct().stdout,c=pt(),A=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),f=["ansi","ansi","ansi256","ansi16m"],m=new Set(["gray"]),n=Object.create(null);function i(h,y){y=y||{};const g=u?u.level:0;h.level=y.level===void 0?g:y.level,h.enabled="enabled"in y?y.enabled:h.level>0}v(i,"applyOptions");function t(h){if(!this||!(this instanceof t)||this.template){const y={};return i(y,h),y.template=function(){const g=[].slice.call(arguments);return a.apply(null,[y.template].concat(g))},Object.setPrototypeOf(y,t.prototype),Object.setPrototypeOf(y.template,y),y.template.constructor=t,y.template}i(this,h)}v(t,"Chalk"),A&&(r.blue.open="\x1B[94m");for(const h of Object.keys(r))r[h].closeRe=new RegExp(e(r[h].close),"g"),n[h]={get(){const y=r[h];return o.call(this,this._styles?this._styles.concat(y):[y],this._empty,h)}};n.visible={get(){return o.call(this,this._styles||[],!0,"visible")}},r.color.closeRe=new RegExp(e(r.color.close),"g");for(const h of Object.keys(r.color.ansi))m.has(h)||(n[h]={get(){const y=this.level;return function(){const F={open:r.color[f[y]][h].apply(null,arguments),close:r.color.close,closeRe:r.color.closeRe};return o.call(this,this._styles?this._styles.concat(F):[F],this._empty,h)}}});r.bgColor.closeRe=new RegExp(e(r.bgColor.close),"g");for(const h of Object.keys(r.bgColor.ansi)){if(m.has(h))continue;const y="bg"+h[0].toUpperCase()+h.slice(1);n[y]={get(){const g=this.level;return function(){const C={open:r.bgColor[f[g]][h].apply(null,arguments),close:r.bgColor.close,closeRe:r.bgColor.closeRe};return o.call(this,this._styles?this._styles.concat(C):[C],this._empty,h)}}}}const s=Object.defineProperties(()=>{},n);function o(h,y,g){const F=v(function(){return d.apply(F,arguments)},"builder");F._styles=h,F._empty=y;const C=this;return Object.defineProperty(F,"level",{enumerable:!0,get(){return C.level},set(E){C.level=E}}),Object.defineProperty(F,"enabled",{enumerable:!0,get(){return C.enabled},set(E){C.enabled=E}}),F.hasGrey=this.hasGrey||g==="gray"||g==="grey",F.__proto__=s,F}v(o,"build");function d(){const h=arguments,y=h.length;let g=String(arguments[0]);if(y===0)return"";if(y>1)for(let C=1;C<y;C++)g+=" "+h[C];if(!this.enabled||this.level<=0||!g)return this._empty?"":g;const F=r.dim.open;A&&this.hasGrey&&(r.dim.open="");for(const C of this._styles.slice().reverse())g=C.open+g.replace(C.closeRe,C.open)+C.close,g=g.replace(/\r?\n/g,`${C.close}$&${C.open}`);return r.dim.open=F,g}v(d,"applyStyle");function a(h,y){if(!Array.isArray(y))return[].slice.call(arguments,1).join(" ");const g=[].slice.call(arguments,2),F=[y.raw[0]];for(let C=1;C<y.length;C++)F.push(String(g[C-1]).replace(/[{}\\]/g,"\\$&")),F.push(String(y.raw[C]));return c(h,F.join(""))}v(a,"chalkTag"),Object.defineProperties(t.prototype,n),p.exports=t(),p.exports.supportsColor=u,p.exports.default=p.exports}(te)),te.exports}v(ft,"requireChalk");var Re;function mt(){if(Re)return _;Re=1,Object.defineProperty(_,"__esModule",{value:!0}),_.default=y,_.shouldHighlight=d;var p=et(),e=nt(),r=c(Fe(),!0);function u(g){if(typeof WeakMap!="function")return null;var F=new WeakMap,C=new WeakMap;return(u=v(function(E){return E?C:F},"_getRequireWildcardCache"))(g)}v(u,"_getRequireWildcardCache");function c(g,F){if(g===null||typeof g!="object"&&typeof g!="function")return{default:g};var C=u(F);if(C&&C.has(g))return C.get(g);var E={__proto__:null},x=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var b in g)if(b!=="default"&&{}.hasOwnProperty.call(g,b)){var D=x?Object.getOwnPropertyDescriptor(g,b):null;D&&(D.get||D.set)?Object.defineProperty(E,b,D):E[b]=g[b]}return E.default=g,C&&C.set(g,E),E}v(c,"_interopRequireWildcard");const A=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,r.createColors)(!1):r.default,f=v((g,F)=>C=>g(F(C)),"compose"),m=new Set(["as","async","from","get","of","set"]);function n(g){return{keyword:g.cyan,capitalized:g.yellow,jsxIdentifier:g.yellow,punctuator:g.yellow,number:g.magenta,string:g.green,regex:g.magenta,comment:g.gray,invalid:f(f(g.white,g.bgRed),g.bold)}}v(n,"getDefs");const i=/\r\n|[\n\r\u2028\u2029]/,t=/^[()[\]{}]$/;let s;{const g=/^[a-z][\w-]*$/i,F=v(function(C,E,x){if(C.type==="name"){if((0,e.isKeyword)(C.value)||(0,e.isStrictReservedWord)(C.value,!0)||m.has(C.value))return"keyword";if(g.test(C.value)&&(x[E-1]==="<"||x.slice(E-2,E)==="</"))return"jsxIdentifier";if(C.value[0]!==C.value[0].toLowerCase())return"capitalized"}return C.type==="punctuator"&&t.test(C.value)?"bracket":C.type==="invalid"&&(C.value==="@"||C.value==="#")?"punctuator":C.type},"getTokenType");s=v(function*(C){let E;for(;E=p.default.exec(C);){const x=p.matchToToken(E);yield{type:F(x,E.index,C),value:x.value}}},"tokenize")}function o(g,F){let C="";for(const{type:E,value:x}of s(F)){const b=g[E];b?C+=x.split(i).map(D=>b(D)).join(`
3
+ `):C+=x}return C}v(o,"highlightTokens");function d(g){return A.isColorSupported||g.forceColor}v(d,"shouldHighlight");let a;function h(g){if(g){var F;return(F=a)!=null||(a=(0,r.createColors)(!0)),a}return A}v(h,"getColors");function y(g,F={}){if(g!==""&&d(F)){const C=n(h(F.forceColor));return o(C,g)}else return g}v(y,"highlight");{let g,F;_.getChalk=({forceColor:C})=>{var E;if((E=g)!=null||(g=ft()),C){var x;return(x=F)!=null||(F=new g.constructor({enabled:!0,level:1})),F}return g}}return _}v(mt,"requireLib$1");var Me;function ht(){if(Me)return q;Me=1,Object.defineProperty(q,"__esModule",{value:!0}),q.codeFrameColumns=o,q.default=d;var p=mt(),e=u(Fe(),!0);function r(a){if(typeof WeakMap!="function")return null;var h=new WeakMap,y=new WeakMap;return(r=v(function(g){return g?y:h},"_getRequireWildcardCache"))(a)}v(r,"_getRequireWildcardCache");function u(a,h){if(a===null||typeof a!="object"&&typeof a!="function")return{default:a};var y=r(h);if(y&&y.has(a))return y.get(a);var g={__proto__:null},F=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var C in a)if(C!=="default"&&Object.prototype.hasOwnProperty.call(a,C)){var E=F?Object.getOwnPropertyDescriptor(a,C):null;E&&(E.get||E.set)?Object.defineProperty(g,C,E):g[C]=a[C]}return g.default=a,y&&y.set(a,g),g}v(u,"_interopRequireWildcard");const c=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,e.createColors)(!1):e.default,A=v((a,h)=>y=>a(h(y)),"compose");let f;function m(a){if(a){var h;return(h=f)!=null||(f=(0,e.createColors)(!0)),f}return c}v(m,"getColors");let n=!1;function i(a){return{gutter:a.gray,marker:A(a.red,a.bold),message:A(a.red,a.bold)}}v(i,"getDefs");const t=/\r\n|[\n\r\u2028\u2029]/;function s(a,h,y){const g=Object.assign({column:0,line:-1},a.start),F=Object.assign({},g,a.end),{linesAbove:C=2,linesBelow:E=3}=y||{},x=g.line,b=g.column,D=F.line,N=F.column;let I=Math.max(x-(C+1),0),K=Math.min(h.length,D+E);x===-1&&(I=0),D===-1&&(K=h.length);const z=D-x,k={};if(z)for(let O=0;O<=z;O++){const R=O+x;if(!b)k[R]=!0;else if(O===0){const P=h[R-1].length;k[R]=[b,P-b+1]}else if(O===z)k[R]=[0,N];else{const P=h[R-O].length;k[R]=[0,P]}}else b===N?b?k[x]=[b,0]:k[x]=!0:k[x]=[b,N-b];return{start:I,end:K,markerLines:k}}v(s,"getMarkerLines");function o(a,h,y={}){const g=(y.highlightCode||y.forceColor)&&(0,p.shouldHighlight)(y),F=m(y.forceColor),C=i(F),E=v((O,R)=>g?O(R):R,"maybeHighlight"),x=a.split(t),{start:b,end:D,markerLines:N}=s(h,x,y),I=h.start&&typeof h.start.column=="number",K=String(D).length;let k=(g?(0,p.default)(a,y):a).split(t,D).slice(b,D).map((O,R)=>{const P=b+1+R,Q=` ${` ${P}`.slice(-K)} |`,V=N[P],ze=!N[P+1];if(V){let Z="";if(Array.isArray(V)){const Ve=O.slice(0,Math.max(V[0]-1,0)).replace(/[^\t]/g," "),Ue=V[1]||1;Z=[`
4
+ `,E(C.gutter,Q.replace(/\d/g," "))," ",Ve,E(C.marker,"^").repeat(Ue)].join(""),ze&&y.message&&(Z+=" "+E(C.message,y.message))}return[E(C.marker,">"),E(C.gutter,Q),O.length>0?` ${O}`:"",Z].join("")}else return` ${E(C.gutter,Q)}${O.length>0?` ${O}`:""}`}).join(`
5
+ `);return y.message&&!I&&(k=`${" ".repeat(K+1)}${y.message}
6
+ ${k}`),g?F.reset(k):k}v(o,"codeFrameColumns");function d(a,h,y,g={}){if(!n){n=!0;const C="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(C,"DeprecationWarning");else{const E=new Error(C);E.name="DeprecationWarning",console.warn(new Error(C))}}return y=Math.max(y,0),o(a,{start:{column:y,line:h}},g)}return v(d,"_default"),q}v(ht,"requireLib"),ht();function dt(p){return{...p,compilerOptions:p.compilerOptions??{},respectExternal:p.respectExternal??!1}}v(dt,"resolveDefaultOptions");const X=/\.d\.(c|m)?tsx?$/,Ie=".d.ts",ce={getCurrentDirectory:v(()=>l.sys.getCurrentDirectory(),"getCurrentDirectory"),getNewLine:v(()=>l.sys.newLine,"getNewLine"),getCanonicalFileName:l.sys.useCaseSensitiveFileNames?p=>p:p=>p.toLowerCase()},gt={declaration:!0,noEmit:!1,emitDeclarationOnly:!0,noEmitOnError:!0,checkJs:!1,declarationMap:!1,skipLibCheck:!0,preserveSymlinks:!0,target:l.ScriptTarget.ESNext},G=new Map,L=v((...p)=>process.env.DTS_LOG_CACHE?console.log("[cache]",...p):null,"logCache");function Pe([p,e],r){for(L(p),G.set(p,r);p!==e&&p!==w.dirname(p);){if(p=w.dirname(p),L("up",p),G.has(p))return L("has",p);G.set(p,r)}}v(Pe,"cacheConfig");function pe(p,e,r){const u={...gt,...e};let c=w.dirname(p),A=[];const f=r||c;if(G.has(f))L("HIT",f);else{L("miss",f);const t=r?w.resolve(process.cwd(),r):l.findConfigFile(c,l.sys.fileExists);if(!t)return{dtsFiles:A,dirName:c,compilerOptions:u};let s=c;c=w.dirname(t);const{config:o,error:d}=l.readConfigFile(t,l.sys.readFile);if(d)return console.error(l.formatDiagnostic(d,ce)),{dtsFiles:A,dirName:c,compilerOptions:u};L("tsconfig",o);const a=l.parseJsonConfigFileContent(o,l.sys,c);Pe(r?[r,r]:[s,c],a)}const{fileNames:m,options:n,errors:i}=G.get(f);return A=m.filter(t=>X.test(t)),i.length?(console.error(l.formatDiagnostics(i,ce)),{dtsFiles:A,dirName:c,compilerOptions:u}):{dtsFiles:A,dirName:c,compilerOptions:{...n,...u}}}v(pe,"getCompilerOptions");function vt(p,e,r){const{dtsFiles:u,compilerOptions:c}=pe(p,e,r);return l.createProgram([p].concat(Array.from(u)),c,l.createCompilerHost(c,!0))}v(vt,"createProgram$1");function yt(p,e,r){const u=[];let c=[],A=new Set,f="",m={};for(let n of p){if(X.test(n))continue;n=w.resolve(n);const i=pe(n,e,r);if(i.dtsFiles.forEach(A.add,A),!c.length){c.push(n),{dirName:f,compilerOptions:m}=i;continue}if(i.dirName===f)c.push(n);else{const t=l.createCompilerHost(m,!0),s=l.createProgram(c.concat(Array.from(A)),m,t);u.push(s),c=[n],{dirName:f,compilerOptions:m}=i}}if(c.length){const n=l.createCompilerHost(m,!0),i=l.createProgram(c.concat(Array.from(A)),m,n);u.push(i)}return u}v(yt,"createPrograms");function At(){let p;try{return{codeFrameColumns:p}=de("@babel/code-frame"),p}catch{try{return{codeFrameColumns:p}=Qe(import.meta.url)("@babel/code-frame"),p}catch{}}}v(At,"getCodeFrame");function Ct(p){const e=p.getSourceFile(),r=e.getLineAndCharacterOfPosition(p.getStart()),u=e.getLineAndCharacterOfPosition(p.getEnd());return{start:{line:r.line+1,column:r.character+1},end:{line:u.line+1,column:u.character+1}}}v(Ct,"getLocation");function Ft(p){const e=At(),u=p.getSourceFile().getFullText(),c=Ct(p);return e?`
7
+ `+e(u,c,{highlightCode:!0}):`
8
+ ${c.start.line}:${c.start.column}: \`${p.getFullText().trim()}\``}v(Ft,"frameNode");class B extends Error{static{v(this,"UnsupportedSyntaxError")}constructor(e,r="Syntax not yet supported"){super(`${r}
9
+ ${Ft(e)}`)}}class Et{static{v(this,"NamespaceFixer")}constructor(e){this.sourceFile=e}findNamespaces(){const e=[],r={};for(const u of this.sourceFile.statements){const c={start:u.getStart(),end:u.getEnd()};if(l.isEmptyStatement(u)){e.unshift({name:"",exports:[],location:c});continue}if((l.isImportDeclaration(u)||l.isExportDeclaration(u))&&u.moduleSpecifier&&l.isStringLiteral(u.moduleSpecifier)){let{text:t}=u.moduleSpecifier;if(t.startsWith(".")&&(t.endsWith(".d.ts")||t.endsWith(".d.cts")||t.endsWith(".d.mts"))){let s=u.moduleSpecifier.getStart()+1,o=u.moduleSpecifier.getEnd()-1;e.unshift({name:"",exports:[],location:{start:s,end:o},textBeforeCodeAfter:t.replace(/\.d\.ts$/,".js").replace(/\.d\.cts$/,".cjs").replace(/\.d\.mts$/,".mjs")})}}if(l.isModuleDeclaration(u)&&u.body&&l.isModuleBlock(u.body)){for(const t of u.body.statements)if(l.isExportDeclaration(t)&&t.exportClause){if(l.isNamespaceExport(t.exportClause))continue;for(const s of t.exportClause.elements)s.propertyName&&s.propertyName.getText()==s.name.getText()&&e.unshift({name:"",exports:[],location:{start:s.propertyName.getEnd(),end:s.name.getEnd()}})}}if(l.isClassDeclaration(u)?r[u.name.getText()]={type:"class",generics:u.typeParameters}:l.isFunctionDeclaration(u)?r[u.name.getText()]={type:"function"}:l.isInterfaceDeclaration(u)?r[u.name.getText()]={type:"interface",generics:u.typeParameters}:l.isTypeAliasDeclaration(u)?r[u.name.getText()]={type:"type",generics:u.typeParameters}:l.isModuleDeclaration(u)&&l.isIdentifier(u.name)?r[u.name.getText()]={type:"namespace"}:l.isEnumDeclaration(u)&&(r[u.name.getText()]={type:"enum"}),!l.isVariableStatement(u))continue;const{declarations:A}=u.declarationList;if(A.length!==1)continue;const f=A[0],m=f.name.getText();if(!f.initializer||!l.isCallExpression(f.initializer)){r[m]={type:"var"};continue}const n=f.initializer.arguments[0];if(!f.initializer.expression.getFullText().includes("/*#__PURE__*/Object.freeze")||!l.isObjectLiteralExpression(n))continue;const i=[];for(const t of n.properties){if(!l.isPropertyAssignment(t)||!(l.isIdentifier(t.name)||l.isStringLiteral(t.name))||t.name.text!=="__proto__"&&!l.isIdentifier(t.initializer))throw new B(t,"Expected a property assignment");t.name.text!=="__proto__"&&i.push({exportedName:t.name.text,localName:t.initializer.getText()})}e.unshift({name:m,exports:i,location:c})}return{namespaces:e,itemTypes:r}}fix(){let e=this.sourceFile.getFullText();const{namespaces:r,itemTypes:u}=this.findNamespaces();for(const c of r){const A=e.slice(c.location.end);e=e.slice(0,c.location.start);for(const{exportedName:f,localName:m}of c.exports)if(f===m){const{type:n,generics:i}=u[m]||{};if(n==="interface"||n==="type"){const t=$e(i);e+=`type ${c.name}_${f}${t.in} = ${m}${t.out};
10
+ `}else if(n==="enum"||n==="class"){const t=$e(i);e+=`type ${c.name}_${f}${t.in} = ${m}${t.out};
11
+ `,e+=`declare const ${c.name}_${f}: typeof ${m};
12
+ `}else e+=`declare const ${c.name}_${f}: typeof ${m};
13
+ `}if(c.name){e+=`declare namespace ${c.name} {
14
+ `,e+=` export {
15
+ `;for(const{exportedName:f,localName:m}of c.exports)f===m?e+=` ${c.name}_${f} as ${f},
16
+ `:e+=` ${m} as ${f},
17
+ `;e+=` };
18
+ `,e+="}"}e+=c.textBeforeCodeAfter??"",e+=A}return e}}function $e(p){return!p||!p.length?{in:"",out:""}:{in:`<${p.map(e=>e.getText()).join(", ")}>`,out:`<${p.map(e=>e.name.getText()).join(", ")}>`}}v($e,"renderTypeParams");let _e=1;function bt(p){return S({type:"Program",sourceType:"module",body:[]},{start:p.getFullStart(),end:p.getEnd()})}v(bt,"createProgram");function xt(p){const e={type:"Identifier",name:String(_e++)};return{ident:e,expr:{type:"AssignmentPattern",left:e,right:p}}}v(xt,"createReference");function T(p){return S({type:"Identifier",name:p.getText()},p)}v(T,"createIdentifier");function Dt(p){const e=S({type:"FunctionExpression",id:null,params:[],body:{type:"BlockStatement",body:[]}},p),r=S({type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:String(_e++)},arguments:[e],optional:!1}},p);return{fn:e,iife:r}}v(Dt,"createIIFE");function Bt(){const p={type:"ArrayExpression",elements:[]};return{expr:p,stmt:{type:"ReturnStatement",argument:p}}}v(Bt,"createReturn");function wt(p,e){return S({type:"FunctionDeclaration",id:S({type:"Identifier",name:l.idText(p)},p),params:[],body:{type:"BlockStatement",body:[]}},e)}v(wt,"createDeclaration");function $(p){if(l.isLiteralExpression(p))return{type:"Literal",value:p.text};if(l.isPropertyAccessExpression(p)){if(l.isPrivateIdentifier(p.name))throw new B(p.name);return S({type:"MemberExpression",computed:!1,optional:!1,object:$(p.expression),property:$(p.name)},{start:p.expression.getStart(),end:p.name.getEnd()})}if(l.isIdentifier(p))return T(p);if(p.kind==l.SyntaxKind.NullKeyword)return{type:"Literal",value:null};throw new B(p)}v($,"convertExpression");function S(p,e){let r="start"in e?e:{start:e.getStart(),end:e.getEnd()};return Object.assign(p,r)}v(S,"withStartEnd");function Y(p,e){return(l.getCombinedModifierFlags(p)&e)===e}v(Y,"matchesModifier");function St({sourceFile:p}){const e=new Ze(p.getFullText()),r=new Set,u=new Set;let c="";const A=new Map,f=new Map;for(const a of p.statements){if(l.isEmptyStatement(a)){e.remove(a.getStart(),a.getEnd());continue}if(l.isEnumDeclaration(a)||l.isFunctionDeclaration(a)||l.isInterfaceDeclaration(a)||l.isClassDeclaration(a)||l.isTypeAliasDeclaration(a)||l.isModuleDeclaration(a)){if(a.name){const h=a.name.getText();r.add(h),Y(a,l.ModifierFlags.ExportDefault)?c=h:Y(a,l.ModifierFlags.Export)&&u.add(h),a.flags&l.NodeFlags.GlobalAugmentation||d(h,[fe(a),Le(a)])}l.isModuleDeclaration(a)&&Tt(e,a),je(e,a)}else if(l.isVariableStatement(a)){const{declarations:h}=a.declarationList,y=Y(a,l.ModifierFlags.Export);for(const b of a.declarationList.declarations)if(l.isIdentifier(b.name)){const D=b.name.getText();r.add(D),y&&u.add(D)}if(je(e,a),h.length==1){const b=h[0];l.isIdentifier(b.name)&&d(b.name.getText(),[fe(a),Le(a)])}else{const b=h.slice(),D=b.shift();d(D.name.getText(),[fe(a),D.getEnd()]);for(const N of b)l.isIdentifier(N.name)&&d(N.name.getText(),[N.getFullStart(),N.getEnd()])}const{flags:g}=a.declarationList,C=`declare ${g&l.NodeFlags.Let?"let":g&l.NodeFlags.Const?"const":"var"} `,E=a.declarationList.getChildren().find(b=>b.kind===l.SyntaxKind.SyntaxList).getChildren();let x=0;for(const b of E)if(b.kind===l.SyntaxKind.CommaToken)x=b.getStart(),e.remove(x,b.getEnd());else if(x){e.appendLeft(x,`;
19
+ `);const D=b.getFullStart(),N=e.slice(D,b.getStart());let I=N.length-N.trimStart().length;I?e.overwrite(D,D+I,C):e.appendLeft(D,C)}}}for(const a of p.statements)if(t(a),!!Y(a,l.ModifierFlags.ExportDefault)&&(l.isFunctionDeclaration(a)||l.isClassDeclaration(a))){if(a.name)continue;c||(c=o("export_default"));const h=a.getChildren(),y=h.findIndex(E=>E.kind===l.SyntaxKind.ClassKeyword||E.kind===l.SyntaxKind.FunctionKeyword),g=h[y],F=h[y+1];if(F.kind>=l.SyntaxKind.FirstPunctuation&&F.kind<=l.SyntaxKind.LastPunctuation){const E=e.slice(g.getEnd(),F.getStart())!=" ";e.appendLeft(F.getStart(),`${E?" ":""}${c}`)}else e.appendRight(g.getEnd(),` ${c}`)}for(const a of f.values()){const y=a.pop()[0];for(const g of a)e.move(g[0],g[1],y)}c&&e.append(`
20
+ export default ${c};
21
+ `),u.size&&e.append(`
22
+ export { ${[...u].join(", ")} };
23
+ `);for(const[a,h]of A.entries())e.prepend(`import * as ${h} from "${a}";
24
+ `);const m=p.getLineStarts(),n=new Set;for(const a of p.typeReferenceDirectives){n.add(a.fileName);const{line:h}=p.getLineAndCharacterOfPosition(a.pos),y=m[h];let g=p.getLineEndOfPosition(a.pos);e.slice(g,g+1)==`
25
+ `&&(g+=1),e.remove(y,g)}const i=new Set;for(const a of p.referencedFiles){i.add(a.fileName);const{line:h}=p.getLineAndCharacterOfPosition(a.pos),y=m[h];let g=p.getLineEndOfPosition(a.pos);e.slice(g,g+1)==`
26
+ `&&(g+=1),e.remove(y,g)}return{code:e,typeReferences:n,fileReferences:i};function t(a){if(l.forEachChild(a,t),l.isImportTypeNode(a)){if(!l.isLiteralTypeNode(a.argument)||!l.isStringLiteral(a.argument.literal))throw new B(a,"inline imports should have a literal argument");const h=a.argument.literal.text,y=a.getChildren(),g=y.find(x=>x.kind===l.SyntaxKind.ImportKeyword).getStart();let F=a.getEnd();const C=y.find(x=>x.kind===l.SyntaxKind.DotToken||x.kind===l.SyntaxKind.LessThanToken);C&&(F=C.getStart());const E=s(h);e.overwrite(g,F,E)}}function s(a){let h=A.get(a);return h||(h=o(a.replace(/[^a-zA-Z0-9_$]/g,()=>"_")),A.set(a,h)),h}function o(a){let h=a;for(;r.has(h);)h=`_${h}`;return r.add(h),h}function d(a,h){let y=f.get(a);if(!y)y=[h],f.set(a,y);else{const g=y[y.length-1];g[1]===h[0]?g[1]=h[1]:y.push(h)}}}v(St,"preProcess");function je(p,e){if(!l.canHaveModifiers(e))return;let r=!1;const u=l.isEnumDeclaration(e)||l.isClassDeclaration(e)||l.isFunctionDeclaration(e)||l.isModuleDeclaration(e)||l.isVariableStatement(e);for(const c of e.modifiers??[])switch(c.kind){case l.SyntaxKind.ExportKeyword:case l.SyntaxKind.DefaultKeyword:p.remove(c.getStart(),c.getEnd()+1);break;case l.SyntaxKind.DeclareKeyword:r=!0}u&&!r&&p.appendRight(e.getStart(),"declare ")}v(je,"fixModifiers");function Tt(p,e){if(!(!e.body||!l.isModuleBlock(e.body))){for(const r of e.body.statements)if(l.isExportDeclaration(r)&&r.exportClause){if(l.isNamespaceExport(r.exportClause))continue;for(const u of r.exportClause.elements)u.propertyName||p.appendLeft(u.name.getEnd(),` as ${u.name.getText()}`)}}}v(Tt,"duplicateExports");function fe(p){const e=p.getFullStart();return e+(Ke(p,e)?1:0)}v(fe,"getStart");function Le(p){const e=p.getEnd();return e+(Ke(p,e)?1:0)}v(Le,"getEnd");function Ke(p,e){return p.getSourceFile().getFullText()[e]==`
27
+ `}v(Ke,"newlineAt");const Nt=new Set([l.SyntaxKind.LiteralType,l.SyntaxKind.VoidKeyword,l.SyntaxKind.UnknownKeyword,l.SyntaxKind.AnyKeyword,l.SyntaxKind.BooleanKeyword,l.SyntaxKind.NumberKeyword,l.SyntaxKind.StringKeyword,l.SyntaxKind.ObjectKeyword,l.SyntaxKind.NullKeyword,l.SyntaxKind.UndefinedKeyword,l.SyntaxKind.SymbolKeyword,l.SyntaxKind.NeverKeyword,l.SyntaxKind.ThisKeyword,l.SyntaxKind.ThisType,l.SyntaxKind.BigIntKeyword]);class qe{static{v(this,"DeclarationScope")}constructor({id:e,range:r}){if(this.scopes=[],e)this.declaration=wt(e,r);else{const{iife:c,fn:A}=Dt(r);this.iife=c,this.declaration=A}const u=Bt();this.declaration.body.body.push(u.stmt),this.returnExpr=u.expr}pushScope(){this.scopes.push(new Set)}popScope(e=1){for(let r=0;r<e;r++)this.scopes.pop()}pushTypeVariable(e){const r=e.getText();this.scopes[this.scopes.length-1]?.add(r)}pushReference(e){let r;if(e.type==="Identifier"?r=e.name:e.type==="MemberExpression"&&e.object.type==="Identifier"&&(r=e.object.name),r){for(const A of this.scopes)if(A.has(r))return}if(r==="this")return;const{ident:u,expr:c}=xt(e);this.declaration.params.push(c),this.returnExpr.elements.push(u)}pushIdentifierReference(e){this.pushReference(T(e))}convertEntityName(e){return l.isIdentifier(e)?T(e):S({type:"MemberExpression",computed:!1,optional:!1,object:this.convertEntityName(e.left),property:T(e.right)},e)}convertPropertyAccess(e){if(!l.isIdentifier(e.expression)&&!l.isPropertyAccessExpression(e.expression))throw new B(e.expression);if(l.isPrivateIdentifier(e.name))throw new B(e.name);let r=l.isIdentifier(e.expression)?T(e.expression):this.convertPropertyAccess(e.expression);return S({type:"MemberExpression",computed:!1,optional:!1,object:r,property:T(e.name)},e)}convertComputedPropertyName(e){if(!e.name||!l.isComputedPropertyName(e.name))return;const{expression:r}=e.name;if(!(l.isLiteralExpression(r)||l.isPrefixUnaryExpression(r))){if(l.isIdentifier(r))return this.pushReference(T(r));if(l.isPropertyAccessExpression(r))return this.pushReference(this.convertPropertyAccess(r));throw new B(r)}}convertParametersAndType(e){this.convertComputedPropertyName(e);const r=this.convertTypeParameters(e.typeParameters);for(const u of e.parameters)this.convertTypeNode(u.type);this.convertTypeNode(e.type),this.popScope(r)}convertHeritageClauses(e){for(const r of e.heritageClauses||[])for(const u of r.types)this.pushReference($(u.expression)),this.convertTypeArguments(u)}convertTypeArguments(e){if(e.typeArguments)for(const r of e.typeArguments)this.convertTypeNode(r)}convertMembers(e){for(const r of e){if(l.isPropertyDeclaration(r)||l.isPropertySignature(r)||l.isIndexSignatureDeclaration(r)){l.isPropertyDeclaration(r)&&r.initializer&&l.isPropertyAccessExpression(r.initializer)&&this.pushReference(this.convertPropertyAccess(r.initializer)),this.convertComputedPropertyName(r),this.convertTypeNode(r.type);continue}if(l.isMethodDeclaration(r)||l.isMethodSignature(r)||l.isConstructorDeclaration(r)||l.isConstructSignatureDeclaration(r)||l.isCallSignatureDeclaration(r)||l.isGetAccessorDeclaration(r)||l.isSetAccessorDeclaration(r))this.convertParametersAndType(r);else throw new B(r)}}convertTypeParameters(e){if(!e)return 0;for(const r of e)this.convertTypeNode(r.constraint),this.convertTypeNode(r.default),this.pushScope(),this.pushTypeVariable(r.name);return e.length}convertTypeNode(e){if(e&&!Nt.has(e.kind)){if(l.isTypeReferenceNode(e)){this.pushReference(this.convertEntityName(e.typeName)),this.convertTypeArguments(e);return}if(l.isTypeLiteralNode(e))return this.convertMembers(e.members);if(l.isArrayTypeNode(e))return this.convertTypeNode(e.elementType);if(l.isTupleTypeNode(e)){for(const r of e.elements)this.convertTypeNode(r);return}if(l.isNamedTupleMember(e)||l.isParenthesizedTypeNode(e)||l.isTypeOperatorNode(e)||l.isTypePredicateNode(e))return this.convertTypeNode(e.type);if(l.isUnionTypeNode(e)||l.isIntersectionTypeNode(e)){for(const r of e.types)this.convertTypeNode(r);return}if(l.isMappedTypeNode(e)){const{typeParameter:r,type:u,nameType:c}=e;this.convertTypeNode(r.constraint),this.pushScope(),this.pushTypeVariable(r.name),this.convertTypeNode(u),c&&this.convertTypeNode(c),this.popScope();return}if(l.isConditionalTypeNode(e)){this.convertTypeNode(e.checkType),this.pushScope(),this.convertTypeNode(e.extendsType),this.convertTypeNode(e.trueType),this.convertTypeNode(e.falseType),this.popScope();return}if(l.isIndexedAccessTypeNode(e)){this.convertTypeNode(e.objectType),this.convertTypeNode(e.indexType);return}if(l.isFunctionOrConstructorTypeNode(e)){this.convertParametersAndType(e);return}if(l.isTypeQueryNode(e)){this.pushReference(this.convertEntityName(e.exprName));return}if(l.isRestTypeNode(e)){this.convertTypeNode(e.type);return}if(l.isOptionalTypeNode(e)){this.convertTypeNode(e.type);return}if(l.isTemplateLiteralTypeNode(e)){for(const r of e.templateSpans)this.convertTypeNode(r.type);return}if(l.isInferTypeNode(e)){const{typeParameter:r}=e;this.convertTypeNode(r.constraint),this.pushTypeVariable(r.name);return}else throw new B(e)}}convertNamespace(e,r=!1){if(this.pushScope(),r&&e.body&&l.isModuleDeclaration(e.body)){this.convertNamespace(e.body,!0);return}if(!e.body||!l.isModuleBlock(e.body))throw new B(e,'namespace must have a "ModuleBlock" body.');const{statements:u}=e.body;for(const c of u){if(l.isEnumDeclaration(c)||l.isFunctionDeclaration(c)||l.isClassDeclaration(c)||l.isInterfaceDeclaration(c)||l.isTypeAliasDeclaration(c)||l.isModuleDeclaration(c)){if(c.name&&l.isIdentifier(c.name))this.pushTypeVariable(c.name);else throw new B(c,"non-Identifier name not supported");continue}if(l.isVariableStatement(c)){for(const A of c.declarationList.declarations)if(l.isIdentifier(A.name))this.pushTypeVariable(A.name);else throw new B(A,"non-Identifier name not supported");continue}if(!l.isExportDeclaration(c))throw new B(c,"namespace child (hoisting) not supported yet")}for(const c of u){if(l.isVariableStatement(c)){for(const A of c.declarationList.declarations)A.type&&this.convertTypeNode(A.type);continue}if(l.isFunctionDeclaration(c)){this.convertParametersAndType(c);continue}if(l.isInterfaceDeclaration(c)||l.isClassDeclaration(c)){const A=this.convertTypeParameters(c.typeParameters);this.convertHeritageClauses(c),this.convertMembers(c.members),this.popScope(A);continue}if(l.isTypeAliasDeclaration(c)){const A=this.convertTypeParameters(c.typeParameters);this.convertTypeNode(c.type),this.popScope(A);continue}if(l.isModuleDeclaration(c)){this.convertNamespace(c,r);continue}if(!l.isEnumDeclaration(c))if(l.isExportDeclaration(c)){if(c.exportClause){if(l.isNamespaceExport(c.exportClause))throw new B(c.exportClause);for(const A of c.exportClause.elements){const f=A.propertyName||A.name;this.pushIdentifierReference(f)}}}else throw new B(c,"namespace child (walking) not supported yet")}this.popScope()}}function Ot({sourceFile:p}){return new kt(p).transform()}v(Ot,"convert");class kt{static{v(this,"Transformer")}constructor(e){this.sourceFile=e,this.declarations=new Map,this.ast=bt(e);for(const r of e.statements)this.convertStatement(r)}transform(){return{ast:this.ast}}pushStatement(e){this.ast.body.push(e)}createDeclaration(e,r){const u={start:e.getFullStart(),end:e.getEnd()};if(!r){const m=new qe({range:u});return this.pushStatement(m.iife),m}const c=r.getText(),A=new qe({id:r,range:u}),f=this.declarations.get(c);if(f){f.pushIdentifierReference(r),f.declaration.end=u.end;let m=this.ast.body.findIndex(n=>n==f.declaration);for(let n=m+1;n<this.ast.body.length;n++){const i=this.ast.body[n];i.start=i.end=u.end}}else this.pushStatement(A.declaration),this.declarations.set(c,A);return f||A}convertStatement(e){if(l.isEnumDeclaration(e))return this.convertEnumDeclaration(e);if(l.isFunctionDeclaration(e))return this.convertFunctionDeclaration(e);if(l.isInterfaceDeclaration(e)||l.isClassDeclaration(e))return this.convertClassOrInterfaceDeclaration(e);if(l.isTypeAliasDeclaration(e))return this.convertTypeAliasDeclaration(e);if(l.isVariableStatement(e))return this.convertVariableStatement(e);if(l.isExportDeclaration(e)||l.isExportAssignment(e))return this.convertExportDeclaration(e);if(l.isModuleDeclaration(e))return this.convertNamespaceDeclaration(e);if(e.kind==l.SyntaxKind.NamespaceExportDeclaration)return this.removeStatement(e);if(l.isImportDeclaration(e)||l.isImportEqualsDeclaration(e))return this.convertImportDeclaration(e);throw new B(e)}removeStatement(e){this.pushStatement(S({type:"ExpressionStatement",expression:{type:"Literal",value:"pls remove me"}},e))}convertNamespaceDeclaration(e){if(e.flags&l.NodeFlags.GlobalAugmentation||!l.isIdentifier(e.name)){this.createDeclaration(e).convertNamespace(e,!0);return}const u=this.createDeclaration(e,e.name);u.pushIdentifierReference(e.name),u.convertNamespace(e)}convertEnumDeclaration(e){this.createDeclaration(e,e.name).pushIdentifierReference(e.name)}convertFunctionDeclaration(e){if(!e.name)throw new B(e,"FunctionDeclaration should have a name");const r=this.createDeclaration(e,e.name);r.pushIdentifierReference(e.name),r.convertParametersAndType(e)}convertClassOrInterfaceDeclaration(e){if(!e.name)throw new B(e,"ClassDeclaration / InterfaceDeclaration should have a name");const r=this.createDeclaration(e,e.name),u=r.convertTypeParameters(e.typeParameters);r.convertHeritageClauses(e),r.convertMembers(e.members),r.popScope(u)}convertTypeAliasDeclaration(e){const r=this.createDeclaration(e,e.name),u=r.convertTypeParameters(e.typeParameters);r.convertTypeNode(e.type),r.popScope(u)}convertVariableStatement(e){const{declarations:r}=e.declarationList;if(r.length!==1)throw new B(e,"VariableStatement with more than one declaration not yet supported");for(const u of r){if(!l.isIdentifier(u.name))throw new B(e,"VariableDeclaration must have a name");this.createDeclaration(e,u.name).convertTypeNode(u.type)}}convertExportDeclaration(e){if(l.isExportAssignment(e)){this.pushStatement(S({type:"ExportDefaultDeclaration",declaration:$(e.expression)},e));return}const r=e.moduleSpecifier?$(e.moduleSpecifier):void 0;if(!e.exportClause)this.pushStatement(S({type:"ExportAllDeclaration",source:r,exported:null},e));else if(l.isNamespaceExport(e.exportClause))this.pushStatement(S({type:"ExportAllDeclaration",source:r,exported:T(e.exportClause.name)},e));else{const u=[];for(const c of e.exportClause.elements)u.push(this.convertExportSpecifier(c));this.pushStatement(S({type:"ExportNamedDeclaration",declaration:null,specifiers:u,source:r},e))}}convertImportDeclaration(e){if(l.isImportEqualsDeclaration(e)){if(!l.isExternalModuleReference(e.moduleReference))throw new B(e,"ImportEquals should have a literal source.");this.pushStatement(S({type:"ImportDeclaration",specifiers:[{type:"ImportDefaultSpecifier",local:T(e.name)}],source:$(e.moduleReference.expression)},e));return}const r=$(e.moduleSpecifier),u=e.importClause&&e.importClause.namedBindings?this.convertNamedImportBindings(e.importClause.namedBindings):[];e.importClause&&e.importClause.name&&u.push({type:"ImportDefaultSpecifier",local:T(e.importClause.name)}),this.pushStatement(S({type:"ImportDeclaration",specifiers:u,source:r},e))}convertNamedImportBindings(e){return l.isNamedImports(e)?e.elements.map(r=>{const u=T(r.name),c=r.propertyName?T(r.propertyName):u;return{type:"ImportSpecifier",local:u,imported:c}}):[{type:"ImportNamespaceSpecifier",local:T(e.name)}]}convertExportSpecifier(e){const r=T(e.name);return{type:"ExportSpecifier",exported:r,local:e.propertyName?T(e.propertyName):r}}}class Rt{static{v(this,"ExportsFixer")}constructor(e){this.source=e,this.DEBUG=!!process.env.DTS_EXPORTS_FIXER_DEBUG}fix(){const e=this.findExports();return e.sort((r,u)=>r.location.start-u.location.start),this.getCodeParts(e).join("")}findExports(){const{rawExports:e,values:r,types:u}=this.getExportsAndLocals();return e.map(c=>{const A=c.elements.map(f=>{const m=f.name.text,n=f.propertyName?.text??f.name.text,i=u.some(t=>t.getText()===n)&&!r.some(t=>t.getText()===n)?"type":"value";return this.DEBUG&&console.log(`export ${n} as ${m} is a ${i}`),{exportedName:m,localName:n,kind:i}});return{location:{start:c.getStart(),end:c.getEnd()},exports:A}})}getExportsAndLocals(e=this.source.statements){const r=[],u=[],c=[],A=v(f=>{const{rawExports:m,values:n,types:i}=this.getExportsAndLocals(f);r.push(...m),u.push(...n),c.push(...i)},"recurseInto");for(const f of e)if(this.DEBUG&&console.log(f.getText(),f.kind),!l.isImportDeclaration(f)){if(l.isInterfaceDeclaration(f)||l.isTypeAliasDeclaration(f)){this.DEBUG&&console.log(`${f.name.getFullText()} is a type`),c.push(f.name);continue}if(l.isEnumDeclaration(f)||l.isFunctionDeclaration(f)||l.isClassDeclaration(f)||l.isVariableStatement(f)){if(l.isVariableStatement(f))for(const m of f.declarationList.declarations)l.isIdentifier(m.name)&&(this.DEBUG&&console.log(`${m.name.getFullText()} is a value (from var statement)`),u.push(m.name));else f.name&&(this.DEBUG&&console.log(`${f.name.getFullText()} is a value (from declaration)`),u.push(f.name));continue}if(l.isModuleBlock(f)){const m=f.statements;A(m);continue}if(l.isModuleDeclaration(f)){f.name&&l.isIdentifier(f.name)&&(this.DEBUG&&console.log(`${f.name.getFullText()} is a value (from module declaration)`),u.push(f.name)),A(f.getChildren());continue}if(l.isExportDeclaration(f)){if(f.moduleSpecifier||f.isTypeOnly)continue;const m=f.exportClause;if(!m||!l.isNamedExports(m))continue;r.push(m);continue}this.DEBUG&&console.log("unhandled statement",f.getFullText(),f.kind)}return{rawExports:r,values:u,types:c}}createNamedExport(e,r=!1){return`${!r&&e.kind==="type"?"type ":""}${e.localName}${e.localName===e.exportedName?"":` as ${e.exportedName}`}`}getCodeParts(e){let r=0;const u=this.source.getFullText(),c=[];for(const A of e){const f=u.slice(r,A.location.start);f.length>0&&c.push(f),c.push(this.getExportStatement(A)),r=A.location.end}return r<u.length&&c.push(u.slice(r)),c}getExportStatement(e){const r=e.exports.every(u=>u.kind==="type")&&e.exports.length>0;return`${r?"type ":""}{ ${e.exports.map(u=>this.createNamedExport(u,r)).join(", ")} }`}}function J(p,e){return l.createSourceFile(p,e,l.ScriptTarget.Latest,!0)}v(J,"parse");const Mt=v(()=>{const p=new Map,e=new Map;return{name:"dts-transform",options({onLog:r,...u}){return{...u,onLog(c,A,f){c==="warn"&&A.code=="CIRCULAR_DEPENDENCY"||(r?r(c,A,f):f(c,A))},treeshake:{moduleSideEffects:"no-external",propertyReadSideEffects:!0,unknownGlobalSideEffects:!1}}},outputOptions(r){return{...r,chunkFileNames:r.chunkFileNames||"[name]-[hash].d.ts",entryFileNames:r.entryFileNames||"[name].d.ts",format:"es",exports:"named",compact:!1,freeze:!0,interop:"esModule",generatedCode:Object.assign({symbols:!1},r.generatedCode),strict:!1}},transform(r,u){let c=J(u,r);const A=St({sourceFile:c});p.set(c.fileName,A.typeReferences),e.set(c.fileName,A.fileReferences),r=A.code.toString(),c=J(u,r);const f=Ot({sourceFile:c});return process.env.DTS_DUMP_AST&&(console.log(u),console.log(r),console.log(JSON.stringify(f.ast.body,void 0,2))),{code:r,ast:f.ast,map:A.code.generateMap()}},renderChunk(r,u,c){const A=J(u.fileName,r),f=new Et(A),m=new Set,n=new Set;for(const s of Object.keys(u.modules)){for(const o of p.get(s.split("\\").join("/"))||[])m.add(o);for(const o of e.get(s.split("\\").join("/"))||[])if(o.startsWith(".")){const d=w.join(w.dirname(s),o),a=c.file&&w.dirname(c.file)||u.facadeModuleId&&w.dirname(u.facadeModuleId)||".";let h=w.relative(a,d).split("\\").join("/");h[0]!=="."&&(h="./"+h),n.add(h)}else n.add(o)}let i=We(Array.from(n,s=>`/// <reference path="${s}" />`));return i+=We(Array.from(m,s=>`/// <reference types="${s}" />`)),i+=f.fix(),i||(i+=`
28
+ export { }`),{code:new Rt(J(u.fileName,i)).fix(),map:{mappings:""}}}}},"transform");function We(p){return p.length?p.join(`
29
+ `)+`
30
+ `:""}v(We,"writeBlock");const me=/\.([cm]ts|[tj]sx?)$/;function he({programs:p,resolvedOptions:{compilerOptions:e,tsconfig:r}},u,c){if(!p.length&&X.test(u))return{code:c};const A=p.find(f=>!!f.getSourceFile(u));if(A){const f=A.getSourceFile(u);return{code:f?.getFullText(),source:f,program:A}}else if(l.sys.fileExists(u)){const f=vt(u,e,r);p.push(f);const m=f.getSourceFile(u);return{code:m?.getFullText(),source:m,program:f}}else return null}v(he,"getModule");const Ge=v((p={})=>{const e=Mt(),r={programs:[],resolvedOptions:dt(p)};return{name:"dts",outputOptions:e.outputOptions,renderChunk:e.renderChunk,options(u){let{input:c=[]}=u;if(!Array.isArray(c))c=typeof c=="string"?[c]:Object.values(c);else if(c.length>1){u.input={};for(const A of c){let f=A.replace(/((\.d)?\.(c|m)?(t|j)sx?)$/,"");w.isAbsolute(A)?f=w.basename(f):f=w.normalize(f),u.input[f]=A}}return r.programs=yt(Object.values(c),r.resolvedOptions.compilerOptions,r.resolvedOptions.tsconfig),e.options.call(this,u)},transform(u,c){if(!me.test(c))return null;const A=v(i=>{if(i.program){const t=w.dirname(c);i.program.getSourceFiles().map(o=>o.fileName).filter(o=>o.startsWith(t)).forEach(this.addWatchFile)}},"watchFiles"),f=v(()=>{const i=he(r,c,u);return i?(A(i),e.transform.call(this,i.code,c)):null},"handleDtsFile"),m=v(()=>{const i=c.replace(me,Ie);let t=he(r,i,u);return t?(A(t),e.transform.call(this,t.code,i)):null},"treatTsAsDts"),n=v(()=>{const i=he(r,c,u);if(!i||!i.source||!i.program)return null;A(i);const t=c.replace(me,Ie);let s;const{emitSkipped:o,diagnostics:d}=i.program.emit(i.source,(a,h)=>{s=e.transform.call(this,h,t)},void 0,!0);if(o){const a=d.filter(h=>h.category===l.DiagnosticCategory.Error);a.length&&(console.error(l.formatDiagnostics(a,ce)),this.error("Failed to compile. Check the logs above."))}return s},"generateDtsFromTs");return X.test(c)?f():m()??n()},resolveId(u,c){if(!c)return;c=c.split("\\").join("/");let A=r.resolvedOptions.compilerOptions;if(r.resolvedOptions.tsconfig){const m=u.startsWith(".")?w.resolve(w.dirname(c),u):u;A=pe(m,r.resolvedOptions.compilerOptions,r.resolvedOptions.tsconfig).compilerOptions}const{resolvedModule:f}=l.resolveModuleName(u,c,A,l.sys);if(f)return!r.resolvedOptions.respectExternal&&f.isExternalLibraryImport?{id:u,external:!0}:{id:w.resolve(f.resolvedFileName)}}}},"plugin");export{Ge as default,Ge as dts};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pkgroll",
3
- "version": "2.9.0",
3
+ "version": "2.10.0",
4
4
  "description": "Zero-config rollup bundler",
5
5
  "keywords": [
6
6
  "zero config",
@@ -35,7 +35,6 @@
35
35
  "@rollup/plugin-inject": "^5.0.5",
36
36
  "@rollup/plugin-json": "^6.1.0",
37
37
  "@rollup/plugin-node-resolve": "^16.0.0",
38
- "@rollup/plugin-replace": "^6.0.2",
39
38
  "@rollup/pluginutils": "^5.1.4",
40
39
  "esbuild": "^0.24.2",
41
40
  "magic-string": "^0.30.17",
@@ -1,30 +0,0 @@
1
- var He=Object.defineProperty;var g=(f,e)=>He(f,"name",{value:e,configurable:!0});import{createRequire as Xe}from"node:module";const he=Xe(import.meta.url);import*as O from"path";import c from"typescript";import Ye from"tty";import Je from"os";import{createRequire as Qe}from"module";import Ze from"magic-string";var q={},j={},W={},be;function et(){return be||(be=1,Object.defineProperty(W,"__esModule",{value:!0}),W.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,W.matchToToken=function(f){var e={type:"invalid",value:f[0],closed:void 0};return f[1]?(e.type="string",e.closed=!!(f[3]||f[4])):f[5]?e.type="comment":f[6]?(e.type="comment",e.closed=!!f[7]):f[8]?e.type="regex":f[9]?e.type="number":f[10]?e.type="name":f[11]?e.type="punctuator":f[12]&&(e.type="whitespace"),e}),W}g(et,"requireJsTokens");var ee={},L={},ge;function tt(){if(ge)return L;ge=1,Object.defineProperty(L,"__esModule",{value:!0}),L.isIdentifierChar=n,L.isIdentifierName=a,L.isIdentifierStart=d;let f="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",e="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";const r=new RegExp("["+f+"]"),s=new RegExp("["+f+e+"]");f=e=null;const l=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],v=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function p(t,i){let o=65536;for(let h=0,u=i.length;h<u;h+=2){if(o+=i[h],o>t)return!1;if(o+=i[h+1],o>=t)return!0}return!1}g(p,"isInAstralSet");function d(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&r.test(String.fromCharCode(t)):p(t,l)}g(d,"isIdentifierStart");function n(t){return t<48?t===36:t<58?!0:t<65?!1:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&s.test(String.fromCharCode(t)):p(t,l)||p(t,v)}g(n,"isIdentifierChar");function a(t){let i=!0;for(let o=0;o<t.length;o++){let h=t.charCodeAt(o);if((h&64512)===55296&&o+1<t.length){const u=t.charCodeAt(++o);(u&64512)===56320&&(h=65536+((h&1023)<<10)+(u&1023))}if(i){if(i=!1,!d(h))return!1}else if(!n(h))return!1}return!i}return g(a,"isIdentifierName"),L}g(tt,"requireIdentifier");var P={},ye;function rt(){if(ye)return P;ye=1,Object.defineProperty(P,"__esModule",{value:!0}),P.isKeyword=n,P.isReservedWord=l,P.isStrictBindOnlyReservedWord=p,P.isStrictBindReservedWord=d,P.isStrictReservedWord=v;const f={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},e=new Set(f.keyword),r=new Set(f.strict),s=new Set(f.strictBind);function l(a,t){return t&&a==="await"||a==="enum"}g(l,"isReservedWord");function v(a,t){return l(a,t)||r.has(a)}g(v,"isStrictReservedWord");function p(a){return s.has(a)}g(p,"isStrictBindOnlyReservedWord");function d(a,t){return v(a,t)||p(a)}g(d,"isStrictBindReservedWord");function n(a){return e.has(a)}return g(n,"isKeyword"),P}g(rt,"requireKeyword");var ve;function nt(){return ve||(ve=1,function(f){Object.defineProperty(f,"__esModule",{value:!0}),Object.defineProperty(f,"isIdentifierChar",{enumerable:!0,get:g(function(){return e.isIdentifierChar},"get")}),Object.defineProperty(f,"isIdentifierName",{enumerable:!0,get:g(function(){return e.isIdentifierName},"get")}),Object.defineProperty(f,"isIdentifierStart",{enumerable:!0,get:g(function(){return e.isIdentifierStart},"get")}),Object.defineProperty(f,"isKeyword",{enumerable:!0,get:g(function(){return r.isKeyword},"get")}),Object.defineProperty(f,"isReservedWord",{enumerable:!0,get:g(function(){return r.isReservedWord},"get")}),Object.defineProperty(f,"isStrictBindOnlyReservedWord",{enumerable:!0,get:g(function(){return r.isStrictBindOnlyReservedWord},"get")}),Object.defineProperty(f,"isStrictBindReservedWord",{enumerable:!0,get:g(function(){return r.isStrictBindReservedWord},"get")}),Object.defineProperty(f,"isStrictReservedWord",{enumerable:!0,get:g(function(){return r.isStrictReservedWord},"get")});var e=tt(),r=rt()}(ee)),ee}g(nt,"requireLib$2");var U={exports:{}},xe;function we(){if(xe)return U.exports;xe=1;let f=process.argv||[],e=process.env,r=!("NO_COLOR"in e||f.includes("--no-color"))&&("FORCE_COLOR"in e||f.includes("--color")||process.platform==="win32"||he!=null&&Ye.isatty(1)&&e.TERM!=="dumb"||"CI"in e),s=g((p,d,n=p)=>a=>{let t=""+a,i=t.indexOf(d,p.length);return~i?p+l(t,d,n,i)+d:p+t+d},"formatter"),l=g((p,d,n,a)=>{let t="",i=0;do t+=p.substring(i,a)+n,i=a+d.length,a=p.indexOf(d,i);while(~a);return t+p.substring(i)},"replaceClose"),v=g((p=r)=>{let d=p?s:()=>String;return{isColorSupported:p,reset:d("\x1B[0m","\x1B[0m"),bold:d("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:d("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:d("\x1B[3m","\x1B[23m"),underline:d("\x1B[4m","\x1B[24m"),inverse:d("\x1B[7m","\x1B[27m"),hidden:d("\x1B[8m","\x1B[28m"),strikethrough:d("\x1B[9m","\x1B[29m"),black:d("\x1B[30m","\x1B[39m"),red:d("\x1B[31m","\x1B[39m"),green:d("\x1B[32m","\x1B[39m"),yellow:d("\x1B[33m","\x1B[39m"),blue:d("\x1B[34m","\x1B[39m"),magenta:d("\x1B[35m","\x1B[39m"),cyan:d("\x1B[36m","\x1B[39m"),white:d("\x1B[37m","\x1B[39m"),gray:d("\x1B[90m","\x1B[39m"),bgBlack:d("\x1B[40m","\x1B[49m"),bgRed:d("\x1B[41m","\x1B[49m"),bgGreen:d("\x1B[42m","\x1B[49m"),bgYellow:d("\x1B[43m","\x1B[49m"),bgBlue:d("\x1B[44m","\x1B[49m"),bgMagenta:d("\x1B[45m","\x1B[49m"),bgCyan:d("\x1B[46m","\x1B[49m"),bgWhite:d("\x1B[47m","\x1B[49m")}},"createColors");return U.exports=v(),U.exports.createColors=v,U.exports}g(we,"requirePicocolors");var te={exports:{}},re,Se;function at(){if(Se)return re;Se=1;var f=/[|\\{}()[\]^$+*?.]/g;return re=g(function(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(f,"\\$&")},"escapeStringRegexp"),re}g(at,"requireEscapeStringRegexp");var H={exports:{}},ne={exports:{}},ae,Ce;function it(){return Ce||(Ce=1,ae={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),ae}g(it,"requireColorName");var Ee;function Te(){if(Ee)return ne.exports;Ee=1;var f=it(),e={};for(var r in f)f.hasOwnProperty(r)&&(e[f[r]]=r);var s=ne.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var l in s)if(s.hasOwnProperty(l)){if(!("channels"in s[l]))throw new Error("missing channels property: "+l);if(!("labels"in s[l]))throw new Error("missing channel labels property: "+l);if(s[l].labels.length!==s[l].channels)throw new Error("channel and label counts mismatch: "+l);var v=s[l].channels,p=s[l].labels;delete s[l].channels,delete s[l].labels,Object.defineProperty(s[l],"channels",{value:v}),Object.defineProperty(s[l],"labels",{value:p})}s.rgb.hsl=function(n){var a=n[0]/255,t=n[1]/255,i=n[2]/255,o=Math.min(a,t,i),h=Math.max(a,t,i),u=h-o,m,y,b;return h===o?m=0:a===h?m=(t-i)/u:t===h?m=2+(i-a)/u:i===h&&(m=4+(a-t)/u),m=Math.min(m*60,360),m<0&&(m+=360),b=(o+h)/2,h===o?y=0:b<=.5?y=u/(h+o):y=u/(2-h-o),[m,y*100,b*100]},s.rgb.hsv=function(n){var a,t,i,o,h,u=n[0]/255,m=n[1]/255,y=n[2]/255,b=Math.max(u,m,y),w=b-Math.min(u,m,y),x=g(function(S){return(b-S)/6/w+1/2},"diffc");return w===0?o=h=0:(h=w/b,a=x(u),t=x(m),i=x(y),u===b?o=i-t:m===b?o=1/3+a-i:y===b&&(o=2/3+t-a),o<0?o+=1:o>1&&(o-=1)),[o*360,h*100,b*100]},s.rgb.hwb=function(n){var a=n[0],t=n[1],i=n[2],o=s.rgb.hsl(n)[0],h=1/255*Math.min(a,Math.min(t,i));return i=1-1/255*Math.max(a,Math.max(t,i)),[o,h*100,i*100]},s.rgb.cmyk=function(n){var a=n[0]/255,t=n[1]/255,i=n[2]/255,o,h,u,m;return m=Math.min(1-a,1-t,1-i),o=(1-a-m)/(1-m)||0,h=(1-t-m)/(1-m)||0,u=(1-i-m)/(1-m)||0,[o*100,h*100,u*100,m*100]};function d(n,a){return Math.pow(n[0]-a[0],2)+Math.pow(n[1]-a[1],2)+Math.pow(n[2]-a[2],2)}return g(d,"comparativeDistance"),s.rgb.keyword=function(n){var a=e[n];if(a)return a;var t=1/0,i;for(var o in f)if(f.hasOwnProperty(o)){var h=f[o],u=d(n,h);u<t&&(t=u,i=o)}return i},s.keyword.rgb=function(n){return f[n]},s.rgb.xyz=function(n){var a=n[0]/255,t=n[1]/255,i=n[2]/255;a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var o=a*.4124+t*.3576+i*.1805,h=a*.2126+t*.7152+i*.0722,u=a*.0193+t*.1192+i*.9505;return[o*100,h*100,u*100]},s.rgb.lab=function(n){var a=s.rgb.xyz(n),t=a[0],i=a[1],o=a[2],h,u,m;return t/=95.047,i/=100,o/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,h=116*i-16,u=500*(t-i),m=200*(i-o),[h,u,m]},s.hsl.rgb=function(n){var a=n[0]/360,t=n[1]/100,i=n[2]/100,o,h,u,m,y;if(t===0)return y=i*255,[y,y,y];i<.5?h=i*(1+t):h=i+t-i*t,o=2*i-h,m=[0,0,0];for(var b=0;b<3;b++)u=a+1/3*-(b-1),u<0&&u++,u>1&&u--,6*u<1?y=o+(h-o)*6*u:2*u<1?y=h:3*u<2?y=o+(h-o)*(2/3-u)*6:y=o,m[b]=y*255;return m},s.hsl.hsv=function(n){var a=n[0],t=n[1]/100,i=n[2]/100,o=t,h=Math.max(i,.01),u,m;return i*=2,t*=i<=1?i:2-i,o*=h<=1?h:2-h,m=(i+t)/2,u=i===0?2*o/(h+o):2*t/(i+t),[a,u*100,m*100]},s.hsv.rgb=function(n){var a=n[0]/60,t=n[1]/100,i=n[2]/100,o=Math.floor(a)%6,h=a-Math.floor(a),u=255*i*(1-t),m=255*i*(1-t*h),y=255*i*(1-t*(1-h));switch(i*=255,o){case 0:return[i,y,u];case 1:return[m,i,u];case 2:return[u,i,y];case 3:return[u,m,i];case 4:return[y,u,i];case 5:return[i,u,m]}},s.hsv.hsl=function(n){var a=n[0],t=n[1]/100,i=n[2]/100,o=Math.max(i,.01),h,u,m;return m=(2-t)*i,h=(2-t)*o,u=t*o,u/=h<=1?h:2-h,u=u||0,m/=2,[a,u*100,m*100]},s.hwb.rgb=function(n){var a=n[0]/360,t=n[1]/100,i=n[2]/100,o=t+i,h,u,m,y;o>1&&(t/=o,i/=o),h=Math.floor(6*a),u=1-i,m=6*a-h,h&1&&(m=1-m),y=t+m*(u-t);var b,w,x;switch(h){default:case 6:case 0:b=u,w=y,x=t;break;case 1:b=y,w=u,x=t;break;case 2:b=t,w=u,x=y;break;case 3:b=t,w=y,x=u;break;case 4:b=y,w=t,x=u;break;case 5:b=u,w=t,x=y;break}return[b*255,w*255,x*255]},s.cmyk.rgb=function(n){var a=n[0]/100,t=n[1]/100,i=n[2]/100,o=n[3]/100,h,u,m;return h=1-Math.min(1,a*(1-o)+o),u=1-Math.min(1,t*(1-o)+o),m=1-Math.min(1,i*(1-o)+o),[h*255,u*255,m*255]},s.xyz.rgb=function(n){var a=n[0]/100,t=n[1]/100,i=n[2]/100,o,h,u;return o=a*3.2406+t*-1.5372+i*-.4986,h=a*-.9689+t*1.8758+i*.0415,u=a*.0557+t*-.204+i*1.057,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,h=h>.0031308?1.055*Math.pow(h,1/2.4)-.055:h*12.92,u=u>.0031308?1.055*Math.pow(u,1/2.4)-.055:u*12.92,o=Math.min(Math.max(0,o),1),h=Math.min(Math.max(0,h),1),u=Math.min(Math.max(0,u),1),[o*255,h*255,u*255]},s.xyz.lab=function(n){var a=n[0],t=n[1],i=n[2],o,h,u;return a/=95.047,t/=100,i/=108.883,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,o=116*t-16,h=500*(a-t),u=200*(t-i),[o,h,u]},s.lab.xyz=function(n){var a=n[0],t=n[1],i=n[2],o,h,u;h=(a+16)/116,o=t/500+h,u=h-i/200;var m=Math.pow(h,3),y=Math.pow(o,3),b=Math.pow(u,3);return h=m>.008856?m:(h-16/116)/7.787,o=y>.008856?y:(o-16/116)/7.787,u=b>.008856?b:(u-16/116)/7.787,o*=95.047,h*=100,u*=108.883,[o,h,u]},s.lab.lch=function(n){var a=n[0],t=n[1],i=n[2],o,h,u;return o=Math.atan2(i,t),h=o*360/2/Math.PI,h<0&&(h+=360),u=Math.sqrt(t*t+i*i),[a,u,h]},s.lch.lab=function(n){var a=n[0],t=n[1],i=n[2],o,h,u;return u=i/360*2*Math.PI,o=t*Math.cos(u),h=t*Math.sin(u),[a,o,h]},s.rgb.ansi16=function(n){var a=n[0],t=n[1],i=n[2],o=1 in arguments?arguments[1]:s.rgb.hsv(n)[2];if(o=Math.round(o/50),o===0)return 30;var h=30+(Math.round(i/255)<<2|Math.round(t/255)<<1|Math.round(a/255));return o===2&&(h+=60),h},s.hsv.ansi16=function(n){return s.rgb.ansi16(s.hsv.rgb(n),n[2])},s.rgb.ansi256=function(n){var a=n[0],t=n[1],i=n[2];if(a===t&&t===i)return a<8?16:a>248?231:Math.round((a-8)/247*24)+232;var o=16+36*Math.round(a/255*5)+6*Math.round(t/255*5)+Math.round(i/255*5);return o},s.ansi16.rgb=function(n){var a=n%10;if(a===0||a===7)return n>50&&(a+=3.5),a=a/10.5*255,[a,a,a];var t=(~~(n>50)+1)*.5,i=(a&1)*t*255,o=(a>>1&1)*t*255,h=(a>>2&1)*t*255;return[i,o,h]},s.ansi256.rgb=function(n){if(n>=232){var a=(n-232)*10+8;return[a,a,a]}n-=16;var t,i=Math.floor(n/36)/5*255,o=Math.floor((t=n%36)/6)/5*255,h=t%6/5*255;return[i,o,h]},s.rgb.hex=function(n){var a=((Math.round(n[0])&255)<<16)+((Math.round(n[1])&255)<<8)+(Math.round(n[2])&255),t=a.toString(16).toUpperCase();return"000000".substring(t.length)+t},s.hex.rgb=function(n){var a=n.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!a)return[0,0,0];var t=a[0];a[0].length===3&&(t=t.split("").map(function(m){return m+m}).join(""));var i=parseInt(t,16),o=i>>16&255,h=i>>8&255,u=i&255;return[o,h,u]},s.rgb.hcg=function(n){var a=n[0]/255,t=n[1]/255,i=n[2]/255,o=Math.max(Math.max(a,t),i),h=Math.min(Math.min(a,t),i),u=o-h,m,y;return u<1?m=h/(1-u):m=0,u<=0?y=0:o===a?y=(t-i)/u%6:o===t?y=2+(i-a)/u:y=4+(a-t)/u+4,y/=6,y%=1,[y*360,u*100,m*100]},s.hsl.hcg=function(n){var a=n[1]/100,t=n[2]/100,i=1,o=0;return t<.5?i=2*a*t:i=2*a*(1-t),i<1&&(o=(t-.5*i)/(1-i)),[n[0],i*100,o*100]},s.hsv.hcg=function(n){var a=n[1]/100,t=n[2]/100,i=a*t,o=0;return i<1&&(o=(t-i)/(1-i)),[n[0],i*100,o*100]},s.hcg.rgb=function(n){var a=n[0]/360,t=n[1]/100,i=n[2]/100;if(t===0)return[i*255,i*255,i*255];var o=[0,0,0],h=a%1*6,u=h%1,m=1-u,y=0;switch(Math.floor(h)){case 0:o[0]=1,o[1]=u,o[2]=0;break;case 1:o[0]=m,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=u;break;case 3:o[0]=0,o[1]=m,o[2]=1;break;case 4:o[0]=u,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=m}return y=(1-t)*i,[(t*o[0]+y)*255,(t*o[1]+y)*255,(t*o[2]+y)*255]},s.hcg.hsv=function(n){var a=n[1]/100,t=n[2]/100,i=a+t*(1-a),o=0;return i>0&&(o=a/i),[n[0],o*100,i*100]},s.hcg.hsl=function(n){var a=n[1]/100,t=n[2]/100,i=t*(1-a)+.5*a,o=0;return i>0&&i<.5?o=a/(2*i):i>=.5&&i<1&&(o=a/(2*(1-i))),[n[0],o*100,i*100]},s.hcg.hwb=function(n){var a=n[1]/100,t=n[2]/100,i=a+t*(1-a);return[n[0],(i-a)*100,(1-i)*100]},s.hwb.hcg=function(n){var a=n[1]/100,t=n[2]/100,i=1-t,o=i-a,h=0;return o<1&&(h=(i-o)/(1-o)),[n[0],o*100,h*100]},s.apple.rgb=function(n){return[n[0]/65535*255,n[1]/65535*255,n[2]/65535*255]},s.rgb.apple=function(n){return[n[0]/255*65535,n[1]/255*65535,n[2]/255*65535]},s.gray.rgb=function(n){return[n[0]/100*255,n[0]/100*255,n[0]/100*255]},s.gray.hsl=s.gray.hsv=function(n){return[0,0,n[0]]},s.gray.hwb=function(n){return[0,100,n[0]]},s.gray.cmyk=function(n){return[0,0,0,n[0]]},s.gray.lab=function(n){return[n[0],0,0]},s.gray.hex=function(n){var a=Math.round(n[0]/100*255)&255,t=(a<<16)+(a<<8)+a,i=t.toString(16).toUpperCase();return"000000".substring(i.length)+i},s.rgb.gray=function(n){var a=(n[0]+n[1]+n[2])/3;return[a/255*100]},ne.exports}g(Te,"requireConversions");var ie,Ne;function st(){if(Ne)return ie;Ne=1;var f=Te();function e(){for(var v={},p=Object.keys(f),d=p.length,n=0;n<d;n++)v[p[n]]={distance:-1,parent:null};return v}g(e,"buildGraph");function r(v){var p=e(),d=[v];for(p[v].distance=0;d.length;)for(var n=d.pop(),a=Object.keys(f[n]),t=a.length,i=0;i<t;i++){var o=a[i],h=p[o];h.distance===-1&&(h.distance=p[n].distance+1,h.parent=n,d.unshift(o))}return p}g(r,"deriveBFS");function s(v,p){return function(d){return p(v(d))}}g(s,"link");function l(v,p){for(var d=[p[v].parent,v],n=f[p[v].parent][v],a=p[v].parent;p[a].parent;)d.unshift(p[a].parent),n=s(f[p[a].parent][a],n),a=p[a].parent;return n.conversion=d,n}return g(l,"wrapConversion"),ie=g(function(v){for(var p=r(v),d={},n=Object.keys(p),a=n.length,t=0;t<a;t++){var i=n[t],o=p[i];o.parent!==null&&(d[i]=l(i,p))}return d},"route"),ie}g(st,"requireRoute");var se,Oe;function ut(){if(Oe)return se;Oe=1;var f=Te(),e=st(),r={},s=Object.keys(f);function l(p){var d=g(function(n){return n==null?n:(arguments.length>1&&(n=Array.prototype.slice.call(arguments)),p(n))},"wrappedFn");return"conversion"in p&&(d.conversion=p.conversion),d}g(l,"wrapRaw");function v(p){var d=g(function(n){if(n==null)return n;arguments.length>1&&(n=Array.prototype.slice.call(arguments));var a=p(n);if(typeof a=="object")for(var t=a.length,i=0;i<t;i++)a[i]=Math.round(a[i]);return a},"wrappedFn");return"conversion"in p&&(d.conversion=p.conversion),d}return g(v,"wrapRounded"),s.forEach(function(p){r[p]={},Object.defineProperty(r[p],"channels",{value:f[p].channels}),Object.defineProperty(r[p],"labels",{value:f[p].labels});var d=e(p),n=Object.keys(d);n.forEach(function(a){var t=d[a];r[p][a]=v(t),r[p][a].raw=l(t)})}),se=r,se}g(ut,"requireColorConvert"),H.exports;var ke;function ot(){return ke||(ke=1,function(f){const e=ut(),r=g((p,d)=>function(){return`\x1B[${p.apply(e,arguments)+d}m`},"wrapAnsi16"),s=g((p,d)=>function(){const n=p.apply(e,arguments);return`\x1B[${38+d};5;${n}m`},"wrapAnsi256"),l=g((p,d)=>function(){const n=p.apply(e,arguments);return`\x1B[${38+d};2;${n[0]};${n[1]};${n[2]}m`},"wrapAnsi16m");function v(){const p=new Map,d={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[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]}};d.color.grey=d.color.gray;for(const t of Object.keys(d)){const i=d[t];for(const o of Object.keys(i)){const h=i[o];d[o]={open:`\x1B[${h[0]}m`,close:`\x1B[${h[1]}m`},i[o]=d[o],p.set(h[0],h[1])}Object.defineProperty(d,t,{value:i,enumerable:!1}),Object.defineProperty(d,"codes",{value:p,enumerable:!1})}const n=g(t=>t,"ansi2ansi"),a=g((t,i,o)=>[t,i,o],"rgb2rgb");d.color.close="\x1B[39m",d.bgColor.close="\x1B[49m",d.color.ansi={ansi:r(n,0)},d.color.ansi256={ansi256:s(n,0)},d.color.ansi16m={rgb:l(a,0)},d.bgColor.ansi={ansi:r(n,10)},d.bgColor.ansi256={ansi256:s(n,10)},d.bgColor.ansi16m={rgb:l(a,10)};for(let t of Object.keys(e)){if(typeof e[t]!="object")continue;const i=e[t];t==="ansi16"&&(t="ansi"),"ansi16"in i&&(d.color.ansi[t]=r(i.ansi16,0),d.bgColor.ansi[t]=r(i.ansi16,10)),"ansi256"in i&&(d.color.ansi256[t]=s(i.ansi256,0),d.bgColor.ansi256[t]=s(i.ansi256,10)),"rgb"in i&&(d.color.ansi16m[t]=l(i.rgb,0),d.bgColor.ansi16m[t]=l(i.rgb,10))}return d}g(v,"assembleStyles"),Object.defineProperty(f,"exports",{enumerable:!0,get:v})}(H)),H.exports}g(ot,"requireAnsiStyles");var ue,De;function ct(){return De||(De=1,ue=g((f,e)=>{e=e||process.argv;const r=f.startsWith("-")?"":f.length===1?"-":"--",s=e.indexOf(r+f),l=e.indexOf("--");return s!==-1&&(l===-1?!0:s<l)},"hasFlag")),ue}g(ct,"requireHasFlag");var oe,Re;function lt(){if(Re)return oe;Re=1;const f=Je,e=ct(),r=process.env;let s;e("no-color")||e("no-colors")||e("color=false")?s=!1:(e("color")||e("colors")||e("color=true")||e("color=always"))&&(s=!0),"FORCE_COLOR"in r&&(s=r.FORCE_COLOR.length===0||parseInt(r.FORCE_COLOR,10)!==0);function l(d){return d===0?!1:{level:d,hasBasic:!0,has256:d>=2,has16m:d>=3}}g(l,"translateLevel");function v(d){if(s===!1)return 0;if(e("color=16m")||e("color=full")||e("color=truecolor"))return 3;if(e("color=256"))return 2;if(d&&!d.isTTY&&s!==!0)return 0;const n=s?1:0;if(process.platform==="win32"){const a=f.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(a=>a in r)||r.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if(r.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in r){const a=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:(r.TERM==="dumb",n)}g(v,"supportsColor");function p(d){const n=v(d);return l(n)}return g(p,"getSupportLevel"),oe={supportsColor:p,stdout:p(process.stdout),stderr:p(process.stderr)},oe}g(lt,"requireSupportsColor");var ce,Me;function ft(){if(Me)return ce;Me=1;const f=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,e=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,r=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,s=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,l=new Map([["n",`
2
- `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function v(a){return a[0]==="u"&&a.length===5||a[0]==="x"&&a.length===3?String.fromCharCode(parseInt(a.slice(1),16)):l.get(a)||a}g(v,"unescape");function p(a,t){const i=[],o=t.trim().split(/\s*,\s*/g);let h;for(const u of o)if(!isNaN(u))i.push(Number(u));else if(h=u.match(r))i.push(h[2].replace(s,(m,y,b)=>y?v(y):b));else throw new Error(`Invalid Chalk template style argument: ${u} (in style '${a}')`);return i}g(p,"parseArguments");function d(a){e.lastIndex=0;const t=[];let i;for(;(i=e.exec(a))!==null;){const o=i[1];if(i[2]){const h=p(o,i[2]);t.push([o].concat(h))}else t.push([o])}return t}g(d,"parseStyle");function n(a,t){const i={};for(const h of t)for(const u of h.styles)i[u[0]]=h.inverse?null:u.slice(1);let o=a;for(const h of Object.keys(i))if(Array.isArray(i[h])){if(!(h in o))throw new Error(`Unknown Chalk style: ${h}`);i[h].length>0?o=o[h].apply(o,i[h]):o=o[h]}return o}return g(n,"buildStyle"),ce=g((a,t)=>{const i=[],o=[];let h=[];if(t.replace(f,(u,m,y,b,w,x)=>{if(m)h.push(v(m));else if(b){const S=h.join("");h=[],o.push(i.length===0?S:n(a,i)(S)),i.push({inverse:y,styles:d(b)})}else if(w){if(i.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(n(a,i)(h.join(""))),h=[],i.pop()}else h.push(x)}),o.push(h.join("")),i.length>0){const u=`Chalk template literal is missing ${i.length} closing bracket${i.length===1?"":"s"} (\`}\`)`;throw new Error(u)}return o.join("")},"templates"),ce}g(ft,"requireTemplates");var Ie;function pt(){return Ie||(Ie=1,function(f){const e=at(),r=ot(),s=lt().stdout,l=ft(),v=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),p=["ansi","ansi","ansi256","ansi16m"],d=new Set(["gray"]),n=Object.create(null);function a(m,y){y=y||{};const b=s?s.level:0;m.level=y.level===void 0?b:y.level,m.enabled="enabled"in y?y.enabled:m.level>0}g(a,"applyOptions");function t(m){if(!this||!(this instanceof t)||this.template){const y={};return a(y,m),y.template=function(){const b=[].slice.call(arguments);return u.apply(null,[y.template].concat(b))},Object.setPrototypeOf(y,t.prototype),Object.setPrototypeOf(y.template,y),y.template.constructor=t,y.template}a(this,m)}g(t,"Chalk"),v&&(r.blue.open="\x1B[94m");for(const m of Object.keys(r))r[m].closeRe=new RegExp(e(r[m].close),"g"),n[m]={get(){const y=r[m];return o.call(this,this._styles?this._styles.concat(y):[y],this._empty,m)}};n.visible={get(){return o.call(this,this._styles||[],!0,"visible")}},r.color.closeRe=new RegExp(e(r.color.close),"g");for(const m of Object.keys(r.color.ansi))d.has(m)||(n[m]={get(){const y=this.level;return function(){const w={open:r.color[p[y]][m].apply(null,arguments),close:r.color.close,closeRe:r.color.closeRe};return o.call(this,this._styles?this._styles.concat(w):[w],this._empty,m)}}});r.bgColor.closeRe=new RegExp(e(r.bgColor.close),"g");for(const m of Object.keys(r.bgColor.ansi)){if(d.has(m))continue;const y="bg"+m[0].toUpperCase()+m.slice(1);n[y]={get(){const b=this.level;return function(){const x={open:r.bgColor[p[b]][m].apply(null,arguments),close:r.bgColor.close,closeRe:r.bgColor.closeRe};return o.call(this,this._styles?this._styles.concat(x):[x],this._empty,m)}}}}const i=Object.defineProperties(()=>{},n);function o(m,y,b){const w=g(function(){return h.apply(w,arguments)},"builder");w._styles=m,w._empty=y;const x=this;return Object.defineProperty(w,"level",{enumerable:!0,get(){return x.level},set(S){x.level=S}}),Object.defineProperty(w,"enabled",{enumerable:!0,get(){return x.enabled},set(S){x.enabled=S}}),w.hasGrey=this.hasGrey||b==="gray"||b==="grey",w.__proto__=i,w}g(o,"build");function h(){const m=arguments,y=m.length;let b=String(arguments[0]);if(y===0)return"";if(y>1)for(let x=1;x<y;x++)b+=" "+m[x];if(!this.enabled||this.level<=0||!b)return this._empty?"":b;const w=r.dim.open;v&&this.hasGrey&&(r.dim.open="");for(const x of this._styles.slice().reverse())b=x.open+b.replace(x.closeRe,x.open)+x.close,b=b.replace(/\r?\n/g,`${x.close}$&${x.open}`);return r.dim.open=w,b}g(h,"applyStyle");function u(m,y){if(!Array.isArray(y))return[].slice.call(arguments,1).join(" ");const b=[].slice.call(arguments,2),w=[y.raw[0]];for(let x=1;x<y.length;x++)w.push(String(b[x-1]).replace(/[{}\\]/g,"\\$&")),w.push(String(y.raw[x]));return l(m,w.join(""))}g(u,"chalkTag"),Object.defineProperties(t.prototype,n),f.exports=t(),f.exports.supportsColor=s,f.exports.default=f.exports}(te)),te.exports}g(pt,"requireChalk");var Fe;function dt(){if(Fe)return j;Fe=1,Object.defineProperty(j,"__esModule",{value:!0}),j.default=y,j.shouldHighlight=h;var f=et(),e=nt(),r=l(we(),!0);function s(b){if(typeof WeakMap!="function")return null;var w=new WeakMap,x=new WeakMap;return(s=g(function(S){return S?x:w},"_getRequireWildcardCache"))(b)}g(s,"_getRequireWildcardCache");function l(b,w){if(b===null||typeof b!="object"&&typeof b!="function")return{default:b};var x=s(w);if(x&&x.has(b))return x.get(b);var S={__proto__:null},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var C in b)if(C!=="default"&&{}.hasOwnProperty.call(b,C)){var T=E?Object.getOwnPropertyDescriptor(b,C):null;T&&(T.get||T.set)?Object.defineProperty(S,C,T):S[C]=b[C]}return S.default=b,x&&x.set(b,S),S}g(l,"_interopRequireWildcard");const v=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,r.createColors)(!1):r.default,p=g((b,w)=>x=>b(w(x)),"compose"),d=new Set(["as","async","from","get","of","set"]);function n(b){return{keyword:b.cyan,capitalized:b.yellow,jsxIdentifier:b.yellow,punctuator:b.yellow,number:b.magenta,string:b.green,regex:b.magenta,comment:b.gray,invalid:p(p(b.white,b.bgRed),b.bold)}}g(n,"getDefs");const a=/\r\n|[\n\r\u2028\u2029]/,t=/^[()[\]{}]$/;let i;{const b=/^[a-z][\w-]*$/i,w=g(function(x,S,E){if(x.type==="name"){if((0,e.isKeyword)(x.value)||(0,e.isStrictReservedWord)(x.value,!0)||d.has(x.value))return"keyword";if(b.test(x.value)&&(E[S-1]==="<"||E.slice(S-2,S)==="</"))return"jsxIdentifier";if(x.value[0]!==x.value[0].toLowerCase())return"capitalized"}return x.type==="punctuator"&&t.test(x.value)?"bracket":x.type==="invalid"&&(x.value==="@"||x.value==="#")?"punctuator":x.type},"getTokenType");i=g(function*(x){let S;for(;S=f.default.exec(x);){const E=f.matchToToken(S);yield{type:w(E,S.index,x),value:E.value}}},"tokenize")}function o(b,w){let x="";for(const{type:S,value:E}of i(w)){const C=b[S];C?x+=E.split(a).map(T=>C(T)).join(`
3
- `):x+=E}return x}g(o,"highlightTokens");function h(b){return v.isColorSupported||b.forceColor}g(h,"shouldHighlight");let u;function m(b){if(b){var w;return(w=u)!=null||(u=(0,r.createColors)(!0)),u}return v}g(m,"getColors");function y(b,w={}){if(b!==""&&h(w)){const x=n(m(w.forceColor));return o(x,b)}else return b}g(y,"highlight");{let b,w;j.getChalk=({forceColor:x})=>{var S;if((S=b)!=null||(b=pt()),x){var E;return(E=w)!=null||(w=new b.constructor({enabled:!0,level:1})),w}return b}}return j}g(dt,"requireLib$1");var Pe;function mt(){if(Pe)return q;Pe=1,Object.defineProperty(q,"__esModule",{value:!0}),q.codeFrameColumns=o,q.default=h;var f=dt(),e=s(we(),!0);function r(u){if(typeof WeakMap!="function")return null;var m=new WeakMap,y=new WeakMap;return(r=g(function(b){return b?y:m},"_getRequireWildcardCache"))(u)}g(r,"_getRequireWildcardCache");function s(u,m){if(u===null||typeof u!="object"&&typeof u!="function")return{default:u};var y=r(m);if(y&&y.has(u))return y.get(u);var b={__proto__:null},w=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in u)if(x!=="default"&&Object.prototype.hasOwnProperty.call(u,x)){var S=w?Object.getOwnPropertyDescriptor(u,x):null;S&&(S.get||S.set)?Object.defineProperty(b,x,S):b[x]=u[x]}return b.default=u,y&&y.set(u,b),b}g(s,"_interopRequireWildcard");const l=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,e.createColors)(!1):e.default,v=g((u,m)=>y=>u(m(y)),"compose");let p;function d(u){if(u){var m;return(m=p)!=null||(p=(0,e.createColors)(!0)),p}return l}g(d,"getColors");let n=!1;function a(u){return{gutter:u.gray,marker:v(u.red,u.bold),message:v(u.red,u.bold)}}g(a,"getDefs");const t=/\r\n|[\n\r\u2028\u2029]/;function i(u,m,y){const b=Object.assign({column:0,line:-1},u.start),w=Object.assign({},b,u.end),{linesAbove:x=2,linesBelow:S=3}=y||{},E=b.line,C=b.column,T=w.line,R=w.column;let $=Math.max(E-(x+1),0),K=Math.min(m.length,T+S);E===-1&&($=0),T===-1&&(K=m.length);const z=T-E,I={};if(z)for(let M=0;M<=z;M++){const F=M+E;if(!C)I[F]=!0;else if(M===0){const A=m[F-1].length;I[F]=[C,A-C+1]}else if(M===z)I[F]=[0,R];else{const A=m[F-M].length;I[F]=[0,A]}}else C===R?C?I[E]=[C,0]:I[E]=!0:I[E]=[C,R-C];return{start:$,end:K,markerLines:I}}g(i,"getMarkerLines");function o(u,m,y={}){const b=(y.highlightCode||y.forceColor)&&(0,f.shouldHighlight)(y),w=d(y.forceColor),x=a(w),S=g((M,F)=>b?M(F):F,"maybeHighlight"),E=u.split(t),{start:C,end:T,markerLines:R}=i(m,E,y),$=m.start&&typeof m.start.column=="number",K=String(T).length;let I=(b?(0,f.default)(u,y):u).split(t,T).slice(C,T).map((M,F)=>{const A=C+1+F,Q=` ${` ${A}`.slice(-K)} |`,V=R[A],ze=!R[A+1];if(V){let Z="";if(Array.isArray(V)){const Ve=M.slice(0,Math.max(V[0]-1,0)).replace(/[^\t]/g," "),Ue=V[1]||1;Z=[`
4
- `,S(x.gutter,Q.replace(/\d/g," "))," ",Ve,S(x.marker,"^").repeat(Ue)].join(""),ze&&y.message&&(Z+=" "+S(x.message,y.message))}return[S(x.marker,">"),S(x.gutter,Q),M.length>0?` ${M}`:"",Z].join("")}else return` ${S(x.gutter,Q)}${M.length>0?` ${M}`:""}`}).join(`
5
- `);return y.message&&!$&&(I=`${" ".repeat(K+1)}${y.message}
6
- ${I}`),b?w.reset(I):I}g(o,"codeFrameColumns");function h(u,m,y,b={}){if(!n){n=!0;const x="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(x,"DeprecationWarning");else{const S=new Error(x);S.name="DeprecationWarning",console.warn(new Error(x))}}return y=Math.max(y,0),o(u,{start:{column:y,line:m}},b)}return g(h,"_default"),q}g(mt,"requireLib"),mt();function ht(f){return{...f,compilerOptions:f.compilerOptions??{},respectExternal:f.respectExternal??!1}}g(ht,"resolveDefaultOptions");const X=/\.d\.(c|m)?tsx?$/,$e=".d.ts",le={getCurrentDirectory:g(()=>c.sys.getCurrentDirectory(),"getCurrentDirectory"),getNewLine:g(()=>c.sys.newLine,"getNewLine"),getCanonicalFileName:c.sys.useCaseSensitiveFileNames?f=>f:f=>f.toLowerCase()},bt={declaration:!0,noEmit:!1,emitDeclarationOnly:!0,noEmitOnError:!0,checkJs:!1,declarationMap:!1,skipLibCheck:!0,preserveSymlinks:!0,target:c.ScriptTarget.ESNext},G=new Map,B=g((...f)=>process.env.DTS_LOG_CACHE?console.log("[cache]",...f):null,"logCache");function Ae([f,e],r){for(B(f),G.set(f,r);f!==e&&f!==O.dirname(f);){if(f=O.dirname(f),B("up",f),G.has(f))return B("has",f);G.set(f,r)}}g(Ae,"cacheConfig");function fe(f,e,r){const s={...bt,...e};let l=O.dirname(f),v=[];const p=r||l;if(G.has(p))B("HIT",p);else{B("miss",p);const t=r?O.resolve(process.cwd(),r):c.findConfigFile(l,c.sys.fileExists);if(!t)return{dtsFiles:v,dirName:l,compilerOptions:s};let i=l;l=O.dirname(t);const{config:o,error:h}=c.readConfigFile(t,c.sys.readFile);if(h)return console.error(c.formatDiagnostic(h,le)),{dtsFiles:v,dirName:l,compilerOptions:s};B("tsconfig",o);const u=c.parseJsonConfigFileContent(o,c.sys,l);Ae(r?[r,r]:[i,l],u)}const{fileNames:d,options:n,errors:a}=G.get(p);return v=d.filter(t=>X.test(t)),a.length?(console.error(c.formatDiagnostics(a,le)),{dtsFiles:v,dirName:l,compilerOptions:s}):{dtsFiles:v,dirName:l,compilerOptions:{...n,...s}}}g(fe,"getCompilerOptions");function gt(f,e,r){const{dtsFiles:s,compilerOptions:l}=fe(f,e,r);return c.createProgram([f].concat(Array.from(s)),l,c.createCompilerHost(l,!0))}g(gt,"createProgram$1");function yt(f,e,r){const s=[];let l=[],v=new Set,p="",d={};for(let n of f){if(X.test(n))continue;n=O.resolve(n);const a=fe(n,e,r);if(a.dtsFiles.forEach(v.add,v),!l.length){l.push(n),{dirName:p,compilerOptions:d}=a;continue}if(a.dirName===p)l.push(n);else{const t=c.createCompilerHost(d,!0),i=c.createProgram(l.concat(Array.from(v)),d,t);s.push(i),l=[n],{dirName:p,compilerOptions:d}=a}}if(l.length){const n=c.createCompilerHost(d,!0),a=c.createProgram(l.concat(Array.from(v)),d,n);s.push(a)}return s}g(yt,"createPrograms");function vt(){let f;try{return{codeFrameColumns:f}=he("@babel/code-frame"),f}catch{try{return{codeFrameColumns:f}=Qe(import.meta.url)("@babel/code-frame"),f}catch{}}}g(vt,"getCodeFrame");function xt(f){const e=f.getSourceFile(),r=e.getLineAndCharacterOfPosition(f.getStart()),s=e.getLineAndCharacterOfPosition(f.getEnd());return{start:{line:r.line+1,column:r.character+1},end:{line:s.line+1,column:s.character+1}}}g(xt,"getLocation");function wt(f){const e=vt(),s=f.getSourceFile().getFullText(),l=xt(f);return e?`
7
- `+e(s,l,{highlightCode:!0}):`
8
- ${l.start.line}:${l.start.column}: \`${f.getFullText().trim()}\``}g(wt,"frameNode");class N extends Error{static{g(this,"UnsupportedSyntaxError")}constructor(e,r="Syntax not yet supported"){super(`${r}
9
- ${wt(e)}`)}}class St{static{g(this,"NamespaceFixer")}constructor(e){this.sourceFile=e}findNamespaces(){const e=[],r={};for(const s of this.sourceFile.statements){const l={start:s.getStart(),end:s.getEnd()};if(c.isEmptyStatement(s)){e.unshift({name:"",exports:[],location:l});continue}if((c.isImportDeclaration(s)||c.isExportDeclaration(s))&&s.moduleSpecifier&&c.isStringLiteral(s.moduleSpecifier)){let{text:t}=s.moduleSpecifier;if(t.startsWith(".")&&(t.endsWith(".d.ts")||t.endsWith(".d.cts")||t.endsWith(".d.mts"))){let i=s.moduleSpecifier.getStart()+1,o=s.moduleSpecifier.getEnd()-1;e.unshift({name:"",exports:[],location:{start:i,end:o},textBeforeCodeAfter:t.replace(/\.d\.ts$/,".js").replace(/\.d\.cts$/,".cjs").replace(/\.d\.mts$/,".mjs")})}}if(c.isModuleDeclaration(s)&&s.body&&c.isModuleBlock(s.body)){for(const t of s.body.statements)if(c.isExportDeclaration(t)&&t.exportClause){if(c.isNamespaceExport(t.exportClause))continue;for(const i of t.exportClause.elements)i.propertyName&&i.propertyName.getText()==i.name.getText()&&e.unshift({name:"",exports:[],location:{start:i.propertyName.getEnd(),end:i.name.getEnd()}})}}if(c.isClassDeclaration(s)?r[s.name.getText()]={type:"class",generics:s.typeParameters}:c.isFunctionDeclaration(s)?r[s.name.getText()]={type:"function"}:c.isInterfaceDeclaration(s)?r[s.name.getText()]={type:"interface",generics:s.typeParameters}:c.isTypeAliasDeclaration(s)?r[s.name.getText()]={type:"type",generics:s.typeParameters}:c.isModuleDeclaration(s)&&c.isIdentifier(s.name)?r[s.name.getText()]={type:"namespace"}:c.isEnumDeclaration(s)&&(r[s.name.getText()]={type:"enum"}),!c.isVariableStatement(s))continue;const{declarations:v}=s.declarationList;if(v.length!==1)continue;const p=v[0],d=p.name.getText();if(!p.initializer||!c.isCallExpression(p.initializer)){r[d]={type:"var"};continue}const n=p.initializer.arguments[0];if(!p.initializer.expression.getFullText().includes("/*#__PURE__*/Object.freeze")||!c.isObjectLiteralExpression(n))continue;const a=[];for(const t of n.properties){if(!c.isPropertyAssignment(t)||!(c.isIdentifier(t.name)||c.isStringLiteral(t.name))||t.name.text!=="__proto__"&&!c.isIdentifier(t.initializer))throw new N(t,"Expected a property assignment");t.name.text!=="__proto__"&&a.push({exportedName:t.name.text,localName:t.initializer.getText()})}e.unshift({name:d,exports:a,location:l})}return{namespaces:e,itemTypes:r}}fix(){let e=this.sourceFile.getFullText();const{namespaces:r,itemTypes:s}=this.findNamespaces();for(const l of r){const v=e.slice(l.location.end);e=e.slice(0,l.location.start);for(const{exportedName:p,localName:d}of l.exports)if(p===d){const{type:n,generics:a}=s[d]||{};if(n==="interface"||n==="type"){const t=_e(a);e+=`type ${l.name}_${p}${t.in} = ${d}${t.out};
10
- `}else if(n==="enum"||n==="class"){const t=_e(a);e+=`type ${l.name}_${p}${t.in} = ${d}${t.out};
11
- `,e+=`declare const ${l.name}_${p}: typeof ${d};
12
- `}else e+=`declare const ${l.name}_${p}: typeof ${d};
13
- `}if(l.name){e+=`declare namespace ${l.name} {
14
- `,e+=` export {
15
- `;for(const{exportedName:p,localName:d}of l.exports)p===d?e+=` ${l.name}_${p} as ${p},
16
- `:e+=` ${d} as ${p},
17
- `;e+=` };
18
- `,e+="}"}e+=l.textBeforeCodeAfter??"",e+=v}return e}}function _e(f){return!f||!f.length?{in:"",out:""}:{in:`<${f.map(e=>e.getText()).join(", ")}>`,out:`<${f.map(e=>e.name.getText()).join(", ")}>`}}g(_e,"renderTypeParams");let je=1;function Ct(f){return k({type:"Program",sourceType:"module",body:[]},{start:f.getFullStart(),end:f.getEnd()})}g(Ct,"createProgram");function Et(f){const e={type:"Identifier",name:String(je++)};return{ident:e,expr:{type:"AssignmentPattern",left:e,right:f}}}g(Et,"createReference");function D(f){return k({type:"Identifier",name:f.getText()},f)}g(D,"createIdentifier");function Tt(f){const e=k({type:"FunctionExpression",id:null,params:[],body:{type:"BlockStatement",body:[]}},f),r=k({type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:String(je++)},arguments:[e],optional:!1}},f);return{fn:e,iife:r}}g(Tt,"createIIFE");function Nt(){const f={type:"ArrayExpression",elements:[]};return{expr:f,stmt:{type:"ReturnStatement",argument:f}}}g(Nt,"createReturn");function Ot(f,e){return k({type:"FunctionDeclaration",id:k({type:"Identifier",name:c.idText(f)},f),params:[],body:{type:"BlockStatement",body:[]}},e)}g(Ot,"createDeclaration");function _(f){if(c.isLiteralExpression(f))return{type:"Literal",value:f.text};if(c.isPropertyAccessExpression(f)){if(c.isPrivateIdentifier(f.name))throw new N(f.name);return k({type:"MemberExpression",computed:!1,optional:!1,object:_(f.expression),property:_(f.name)},{start:f.expression.getStart(),end:f.name.getEnd()})}if(c.isIdentifier(f))return D(f);if(f.kind==c.SyntaxKind.NullKeyword)return{type:"Literal",value:null};throw new N(f)}g(_,"convertExpression");function k(f,e){let r="start"in e?e:{start:e.getStart(),end:e.getEnd()};return Object.assign(f,r)}g(k,"withStartEnd");function Y(f,e){return(c.getCombinedModifierFlags(f)&e)===e}g(Y,"matchesModifier");function kt({sourceFile:f}){const e=new Ze(f.getFullText()),r=new Set,s=new Set;let l="";const v=new Map,p=new Map;for(const u of f.statements){if(c.isEmptyStatement(u)){e.remove(u.getStart(),u.getEnd());continue}if(c.isEnumDeclaration(u)||c.isFunctionDeclaration(u)||c.isInterfaceDeclaration(u)||c.isClassDeclaration(u)||c.isTypeAliasDeclaration(u)||c.isModuleDeclaration(u)){if(u.name){const m=u.name.getText();r.add(m),Y(u,c.ModifierFlags.ExportDefault)?l=m:Y(u,c.ModifierFlags.Export)&&s.add(m),u.flags&c.NodeFlags.GlobalAugmentation||h(m,[pe(u),Be(u)])}c.isModuleDeclaration(u)&&Dt(e,u),Le(e,u)}else if(c.isVariableStatement(u)){const{declarations:m}=u.declarationList,y=Y(u,c.ModifierFlags.Export);for(const C of u.declarationList.declarations)if(c.isIdentifier(C.name)){const T=C.name.getText();r.add(T),y&&s.add(T)}if(Le(e,u),m.length==1){const C=m[0];c.isIdentifier(C.name)&&h(C.name.getText(),[pe(u),Be(u)])}else{const C=m.slice(),T=C.shift();h(T.name.getText(),[pe(u),T.getEnd()]);for(const R of C)c.isIdentifier(R.name)&&h(R.name.getText(),[R.getFullStart(),R.getEnd()])}const{flags:b}=u.declarationList,x=`declare ${b&c.NodeFlags.Let?"let":b&c.NodeFlags.Const?"const":"var"} `,S=u.declarationList.getChildren().find(C=>C.kind===c.SyntaxKind.SyntaxList).getChildren();let E=0;for(const C of S)if(C.kind===c.SyntaxKind.CommaToken)E=C.getStart(),e.remove(E,C.getEnd());else if(E){e.appendLeft(E,`;
19
- `);const T=C.getFullStart(),R=e.slice(T,C.getStart());let $=R.length-R.trimStart().length;$?e.overwrite(T,T+$,x):e.appendLeft(T,x)}}}for(const u of f.statements)if(t(u),!!Y(u,c.ModifierFlags.ExportDefault)&&(c.isFunctionDeclaration(u)||c.isClassDeclaration(u))){if(u.name)continue;l||(l=o("export_default"));const m=u.getChildren(),y=m.findIndex(S=>S.kind===c.SyntaxKind.ClassKeyword||S.kind===c.SyntaxKind.FunctionKeyword),b=m[y],w=m[y+1];if(w.kind>=c.SyntaxKind.FirstPunctuation&&w.kind<=c.SyntaxKind.LastPunctuation){const S=e.slice(b.getEnd(),w.getStart())!=" ";e.appendLeft(w.getStart(),`${S?" ":""}${l}`)}else e.appendRight(b.getEnd(),` ${l}`)}for(const u of p.values()){const y=u.pop()[0];for(const b of u)e.move(b[0],b[1],y)}l&&e.append(`
20
- export default ${l};
21
- `),s.size&&e.append(`
22
- export { ${[...s].join(", ")} };
23
- `);for(const[u,m]of v.entries())e.prepend(`import * as ${m} from "${u}";
24
- `);const d=f.getLineStarts(),n=new Set;for(const u of f.typeReferenceDirectives){n.add(u.fileName);const{line:m}=f.getLineAndCharacterOfPosition(u.pos),y=d[m];let b=f.getLineEndOfPosition(u.pos);e.slice(b,b+1)==`
25
- `&&(b+=1),e.remove(y,b)}const a=new Set;for(const u of f.referencedFiles){a.add(u.fileName);const{line:m}=f.getLineAndCharacterOfPosition(u.pos),y=d[m];let b=f.getLineEndOfPosition(u.pos);e.slice(b,b+1)==`
26
- `&&(b+=1),e.remove(y,b)}return{code:e,typeReferences:n,fileReferences:a};function t(u){if(c.forEachChild(u,t),c.isImportTypeNode(u)){if(!c.isLiteralTypeNode(u.argument)||!c.isStringLiteral(u.argument.literal))throw new N(u,"inline imports should have a literal argument");const m=u.argument.literal.text,y=u.getChildren(),b=y.find(E=>E.kind===c.SyntaxKind.ImportKeyword).getStart();let w=u.getEnd();const x=y.find(E=>E.kind===c.SyntaxKind.DotToken||E.kind===c.SyntaxKind.LessThanToken);x&&(w=x.getStart());const S=i(m);e.overwrite(b,w,S)}}function i(u){let m=v.get(u);return m||(m=o(u.replace(/[^a-zA-Z0-9_$]/g,()=>"_")),v.set(u,m)),m}function o(u){let m=u;for(;r.has(m);)m=`_${m}`;return r.add(m),m}function h(u,m){let y=p.get(u);if(!y)y=[m],p.set(u,y);else{const b=y[y.length-1];b[1]===m[0]?b[1]=m[1]:y.push(m)}}}g(kt,"preProcess");function Le(f,e){if(!c.canHaveModifiers(e))return;let r=!1;const s=c.isEnumDeclaration(e)||c.isClassDeclaration(e)||c.isFunctionDeclaration(e)||c.isModuleDeclaration(e)||c.isVariableStatement(e);for(const l of e.modifiers??[])switch(l.kind){case c.SyntaxKind.ExportKeyword:case c.SyntaxKind.DefaultKeyword:f.remove(l.getStart(),l.getEnd()+1);break;case c.SyntaxKind.DeclareKeyword:r=!0}s&&!r&&f.appendRight(e.getStart(),"declare ")}g(Le,"fixModifiers");function Dt(f,e){if(!(!e.body||!c.isModuleBlock(e.body))){for(const r of e.body.statements)if(c.isExportDeclaration(r)&&r.exportClause){if(c.isNamespaceExport(r.exportClause))continue;for(const s of r.exportClause.elements)s.propertyName||f.appendLeft(s.name.getEnd(),` as ${s.name.getText()}`)}}}g(Dt,"duplicateExports");function pe(f){const e=f.getFullStart();return e+(Ke(f,e)?1:0)}g(pe,"getStart");function Be(f){const e=f.getEnd();return e+(Ke(f,e)?1:0)}g(Be,"getEnd");function Ke(f,e){return f.getSourceFile().getFullText()[e]==`
27
- `}g(Ke,"newlineAt");const Rt=new Set([c.SyntaxKind.LiteralType,c.SyntaxKind.VoidKeyword,c.SyntaxKind.UnknownKeyword,c.SyntaxKind.AnyKeyword,c.SyntaxKind.BooleanKeyword,c.SyntaxKind.NumberKeyword,c.SyntaxKind.StringKeyword,c.SyntaxKind.ObjectKeyword,c.SyntaxKind.NullKeyword,c.SyntaxKind.UndefinedKeyword,c.SyntaxKind.SymbolKeyword,c.SyntaxKind.NeverKeyword,c.SyntaxKind.ThisKeyword,c.SyntaxKind.ThisType,c.SyntaxKind.BigIntKeyword]);class qe{static{g(this,"DeclarationScope")}constructor({id:e,range:r}){if(this.scopes=[],e)this.declaration=Ot(e,r);else{const{iife:l,fn:v}=Tt(r);this.iife=l,this.declaration=v}const s=Nt();this.declaration.body.body.push(s.stmt),this.returnExpr=s.expr}pushScope(){this.scopes.push(new Set)}popScope(e=1){for(let r=0;r<e;r++)this.scopes.pop()}pushTypeVariable(e){const r=e.getText();this.scopes[this.scopes.length-1]?.add(r)}pushReference(e){let r;if(e.type==="Identifier"?r=e.name:e.type==="MemberExpression"&&e.object.type==="Identifier"&&(r=e.object.name),r){for(const v of this.scopes)if(v.has(r))return}if(r==="this")return;const{ident:s,expr:l}=Et(e);this.declaration.params.push(l),this.returnExpr.elements.push(s)}pushIdentifierReference(e){this.pushReference(D(e))}convertEntityName(e){return c.isIdentifier(e)?D(e):k({type:"MemberExpression",computed:!1,optional:!1,object:this.convertEntityName(e.left),property:D(e.right)},e)}convertPropertyAccess(e){if(!c.isIdentifier(e.expression)&&!c.isPropertyAccessExpression(e.expression))throw new N(e.expression);if(c.isPrivateIdentifier(e.name))throw new N(e.name);let r=c.isIdentifier(e.expression)?D(e.expression):this.convertPropertyAccess(e.expression);return k({type:"MemberExpression",computed:!1,optional:!1,object:r,property:D(e.name)},e)}convertComputedPropertyName(e){if(!e.name||!c.isComputedPropertyName(e.name))return;const{expression:r}=e.name;if(!(c.isLiteralExpression(r)||c.isPrefixUnaryExpression(r))){if(c.isIdentifier(r))return this.pushReference(D(r));if(c.isPropertyAccessExpression(r))return this.pushReference(this.convertPropertyAccess(r));throw new N(r)}}convertParametersAndType(e){this.convertComputedPropertyName(e);const r=this.convertTypeParameters(e.typeParameters);for(const s of e.parameters)this.convertTypeNode(s.type);this.convertTypeNode(e.type),this.popScope(r)}convertHeritageClauses(e){for(const r of e.heritageClauses||[])for(const s of r.types)this.pushReference(_(s.expression)),this.convertTypeArguments(s)}convertTypeArguments(e){if(e.typeArguments)for(const r of e.typeArguments)this.convertTypeNode(r)}convertMembers(e){for(const r of e){if(c.isPropertyDeclaration(r)||c.isPropertySignature(r)||c.isIndexSignatureDeclaration(r)){c.isPropertyDeclaration(r)&&r.initializer&&c.isPropertyAccessExpression(r.initializer)&&this.pushReference(this.convertPropertyAccess(r.initializer)),this.convertComputedPropertyName(r),this.convertTypeNode(r.type);continue}if(c.isMethodDeclaration(r)||c.isMethodSignature(r)||c.isConstructorDeclaration(r)||c.isConstructSignatureDeclaration(r)||c.isCallSignatureDeclaration(r)||c.isGetAccessorDeclaration(r)||c.isSetAccessorDeclaration(r))this.convertParametersAndType(r);else throw new N(r)}}convertTypeParameters(e){if(!e)return 0;for(const r of e)this.convertTypeNode(r.constraint),this.convertTypeNode(r.default),this.pushScope(),this.pushTypeVariable(r.name);return e.length}convertTypeNode(e){if(e&&!Rt.has(e.kind)){if(c.isTypeReferenceNode(e)){this.pushReference(this.convertEntityName(e.typeName)),this.convertTypeArguments(e);return}if(c.isTypeLiteralNode(e))return this.convertMembers(e.members);if(c.isArrayTypeNode(e))return this.convertTypeNode(e.elementType);if(c.isTupleTypeNode(e)){for(const r of e.elements)this.convertTypeNode(r);return}if(c.isNamedTupleMember(e)||c.isParenthesizedTypeNode(e)||c.isTypeOperatorNode(e)||c.isTypePredicateNode(e))return this.convertTypeNode(e.type);if(c.isUnionTypeNode(e)||c.isIntersectionTypeNode(e)){for(const r of e.types)this.convertTypeNode(r);return}if(c.isMappedTypeNode(e)){const{typeParameter:r,type:s,nameType:l}=e;this.convertTypeNode(r.constraint),this.pushScope(),this.pushTypeVariable(r.name),this.convertTypeNode(s),l&&this.convertTypeNode(l),this.popScope();return}if(c.isConditionalTypeNode(e)){this.convertTypeNode(e.checkType),this.pushScope(),this.convertTypeNode(e.extendsType),this.convertTypeNode(e.trueType),this.convertTypeNode(e.falseType),this.popScope();return}if(c.isIndexedAccessTypeNode(e)){this.convertTypeNode(e.objectType),this.convertTypeNode(e.indexType);return}if(c.isFunctionOrConstructorTypeNode(e)){this.convertParametersAndType(e);return}if(c.isTypeQueryNode(e)){this.pushReference(this.convertEntityName(e.exprName));return}if(c.isRestTypeNode(e)){this.convertTypeNode(e.type);return}if(c.isOptionalTypeNode(e)){this.convertTypeNode(e.type);return}if(c.isTemplateLiteralTypeNode(e)){for(const r of e.templateSpans)this.convertTypeNode(r.type);return}if(c.isInferTypeNode(e)){const{typeParameter:r}=e;this.convertTypeNode(r.constraint),this.pushTypeVariable(r.name);return}else throw new N(e)}}convertNamespace(e,r=!1){if(this.pushScope(),r&&e.body&&c.isModuleDeclaration(e.body)){this.convertNamespace(e.body,!0);return}if(!e.body||!c.isModuleBlock(e.body))throw new N(e,'namespace must have a "ModuleBlock" body.');const{statements:s}=e.body;for(const l of s){if(c.isEnumDeclaration(l)||c.isFunctionDeclaration(l)||c.isClassDeclaration(l)||c.isInterfaceDeclaration(l)||c.isTypeAliasDeclaration(l)||c.isModuleDeclaration(l)){if(l.name&&c.isIdentifier(l.name))this.pushTypeVariable(l.name);else throw new N(l,"non-Identifier name not supported");continue}if(c.isVariableStatement(l)){for(const v of l.declarationList.declarations)if(c.isIdentifier(v.name))this.pushTypeVariable(v.name);else throw new N(v,"non-Identifier name not supported");continue}if(!c.isExportDeclaration(l))throw new N(l,"namespace child (hoisting) not supported yet")}for(const l of s){if(c.isVariableStatement(l)){for(const v of l.declarationList.declarations)v.type&&this.convertTypeNode(v.type);continue}if(c.isFunctionDeclaration(l)){this.convertParametersAndType(l);continue}if(c.isInterfaceDeclaration(l)||c.isClassDeclaration(l)){const v=this.convertTypeParameters(l.typeParameters);this.convertHeritageClauses(l),this.convertMembers(l.members),this.popScope(v);continue}if(c.isTypeAliasDeclaration(l)){const v=this.convertTypeParameters(l.typeParameters);this.convertTypeNode(l.type),this.popScope(v);continue}if(c.isModuleDeclaration(l)){this.convertNamespace(l,r);continue}if(!c.isEnumDeclaration(l))if(c.isExportDeclaration(l)){if(l.exportClause){if(c.isNamespaceExport(l.exportClause))throw new N(l.exportClause);for(const v of l.exportClause.elements){const p=v.propertyName||v.name;this.pushIdentifierReference(p)}}}else throw new N(l,"namespace child (walking) not supported yet")}this.popScope()}}function Mt({sourceFile:f}){return new It(f).transform()}g(Mt,"convert");class It{static{g(this,"Transformer")}constructor(e){this.sourceFile=e,this.declarations=new Map,this.ast=Ct(e);for(const r of e.statements)this.convertStatement(r)}transform(){return{ast:this.ast}}pushStatement(e){this.ast.body.push(e)}createDeclaration(e,r){const s={start:e.getFullStart(),end:e.getEnd()};if(!r){const d=new qe({range:s});return this.pushStatement(d.iife),d}const l=r.getText(),v=new qe({id:r,range:s}),p=this.declarations.get(l);if(p){p.pushIdentifierReference(r),p.declaration.end=s.end;let d=this.ast.body.findIndex(n=>n==p.declaration);for(let n=d+1;n<this.ast.body.length;n++){const a=this.ast.body[n];a.start=a.end=s.end}}else this.pushStatement(v.declaration),this.declarations.set(l,v);return p||v}convertStatement(e){if(c.isEnumDeclaration(e))return this.convertEnumDeclaration(e);if(c.isFunctionDeclaration(e))return this.convertFunctionDeclaration(e);if(c.isInterfaceDeclaration(e)||c.isClassDeclaration(e))return this.convertClassOrInterfaceDeclaration(e);if(c.isTypeAliasDeclaration(e))return this.convertTypeAliasDeclaration(e);if(c.isVariableStatement(e))return this.convertVariableStatement(e);if(c.isExportDeclaration(e)||c.isExportAssignment(e))return this.convertExportDeclaration(e);if(c.isModuleDeclaration(e))return this.convertNamespaceDeclaration(e);if(e.kind==c.SyntaxKind.NamespaceExportDeclaration)return this.removeStatement(e);if(c.isImportDeclaration(e)||c.isImportEqualsDeclaration(e))return this.convertImportDeclaration(e);throw new N(e)}removeStatement(e){this.pushStatement(k({type:"ExpressionStatement",expression:{type:"Literal",value:"pls remove me"}},e))}convertNamespaceDeclaration(e){if(e.flags&c.NodeFlags.GlobalAugmentation||!c.isIdentifier(e.name)){this.createDeclaration(e).convertNamespace(e,!0);return}const s=this.createDeclaration(e,e.name);s.pushIdentifierReference(e.name),s.convertNamespace(e)}convertEnumDeclaration(e){this.createDeclaration(e,e.name).pushIdentifierReference(e.name)}convertFunctionDeclaration(e){if(!e.name)throw new N(e,"FunctionDeclaration should have a name");const r=this.createDeclaration(e,e.name);r.pushIdentifierReference(e.name),r.convertParametersAndType(e)}convertClassOrInterfaceDeclaration(e){if(!e.name)throw new N(e,"ClassDeclaration / InterfaceDeclaration should have a name");const r=this.createDeclaration(e,e.name),s=r.convertTypeParameters(e.typeParameters);r.convertHeritageClauses(e),r.convertMembers(e.members),r.popScope(s)}convertTypeAliasDeclaration(e){const r=this.createDeclaration(e,e.name),s=r.convertTypeParameters(e.typeParameters);r.convertTypeNode(e.type),r.popScope(s)}convertVariableStatement(e){const{declarations:r}=e.declarationList;if(r.length!==1)throw new N(e,"VariableStatement with more than one declaration not yet supported");for(const s of r){if(!c.isIdentifier(s.name))throw new N(e,"VariableDeclaration must have a name");this.createDeclaration(e,s.name).convertTypeNode(s.type)}}convertExportDeclaration(e){if(c.isExportAssignment(e)){this.pushStatement(k({type:"ExportDefaultDeclaration",declaration:_(e.expression)},e));return}const r=e.moduleSpecifier?_(e.moduleSpecifier):void 0;if(!e.exportClause)this.pushStatement(k({type:"ExportAllDeclaration",source:r,exported:null},e));else if(c.isNamespaceExport(e.exportClause))this.pushStatement(k({type:"ExportAllDeclaration",source:r,exported:D(e.exportClause.name)},e));else{const s=[];for(const l of e.exportClause.elements)s.push(this.convertExportSpecifier(l));this.pushStatement(k({type:"ExportNamedDeclaration",declaration:null,specifiers:s,source:r},e))}}convertImportDeclaration(e){if(c.isImportEqualsDeclaration(e)){if(!c.isExternalModuleReference(e.moduleReference))throw new N(e,"ImportEquals should have a literal source.");this.pushStatement(k({type:"ImportDeclaration",specifiers:[{type:"ImportDefaultSpecifier",local:D(e.name)}],source:_(e.moduleReference.expression)},e));return}const r=_(e.moduleSpecifier),s=e.importClause&&e.importClause.namedBindings?this.convertNamedImportBindings(e.importClause.namedBindings):[];e.importClause&&e.importClause.name&&s.push({type:"ImportDefaultSpecifier",local:D(e.importClause.name)}),this.pushStatement(k({type:"ImportDeclaration",specifiers:s,source:r},e))}convertNamedImportBindings(e){return c.isNamedImports(e)?e.elements.map(r=>{const s=D(r.name),l=r.propertyName?D(r.propertyName):s;return{type:"ImportSpecifier",local:s,imported:l}}):[{type:"ImportNamespaceSpecifier",local:D(e.name)}]}convertExportSpecifier(e){const r=D(e.name);return{type:"ExportSpecifier",exported:r,local:e.propertyName?D(e.propertyName):r}}}class Ft{static{g(this,"ExportsFixer")}constructor(e){this.source=e,this.DEBUG=!!process.env.DTS_EXPORTS_FIXER_DEBUG}fix(){const e=this.findExports();return e.sort((r,s)=>r.location.start-s.location.start),this.getCodeParts(e).join("")}findExports(){const{rawExports:e,values:r,types:s}=this.getExportsAndLocals();return e.map(l=>{const v=l.elements.map(p=>{const d=p.name.text,n=p.propertyName?.text??p.name.text,a=s.some(t=>t.getText()===n)&&!r.some(t=>t.getText()===n)?"type":"value";return this.DEBUG&&console.log(`export ${n} as ${d} is a ${a}`),{exportedName:d,localName:n,kind:a}});return{location:{start:l.getStart(),end:l.getEnd()},exports:v}})}getExportsAndLocals(e=this.source.statements){const r=[],s=[],l=[],v=g(p=>{const{rawExports:d,values:n,types:a}=this.getExportsAndLocals(p);r.push(...d),s.push(...n),l.push(...a)},"recurseInto");for(const p of e)if(this.DEBUG&&console.log(p.getText(),p.kind),!c.isImportDeclaration(p)){if(c.isInterfaceDeclaration(p)||c.isTypeAliasDeclaration(p)){this.DEBUG&&console.log(`${p.name.getFullText()} is a type`),l.push(p.name);continue}if(c.isEnumDeclaration(p)||c.isFunctionDeclaration(p)||c.isClassDeclaration(p)||c.isVariableStatement(p)){if(c.isVariableStatement(p))for(const d of p.declarationList.declarations)c.isIdentifier(d.name)&&(this.DEBUG&&console.log(`${d.name.getFullText()} is a value (from var statement)`),s.push(d.name));else p.name&&(this.DEBUG&&console.log(`${p.name.getFullText()} is a value (from declaration)`),s.push(p.name));continue}if(c.isModuleBlock(p)){const d=p.statements;v(d);continue}if(c.isModuleDeclaration(p)){p.name&&c.isIdentifier(p.name)&&(this.DEBUG&&console.log(`${p.name.getFullText()} is a value (from module declaration)`),s.push(p.name)),v(p.getChildren());continue}if(c.isExportDeclaration(p)){if(p.moduleSpecifier||p.isTypeOnly)continue;const d=p.exportClause;if(!d||!c.isNamedExports(d))continue;r.push(d);continue}this.DEBUG&&console.log("unhandled statement",p.getFullText(),p.kind)}return{rawExports:r,values:s,types:l}}createNamedExport(e,r=!1){return`${!r&&e.kind==="type"?"type ":""}${e.localName}${e.localName===e.exportedName?"":` as ${e.exportedName}`}`}getCodeParts(e){let r=0;const s=this.source.getFullText(),l=[];for(const v of e){const p=s.slice(r,v.location.start);p.length>0&&l.push(p),l.push(this.getExportStatement(v)),r=v.location.end}return r<s.length&&l.push(s.slice(r)),l}getExportStatement(e){const r=e.exports.every(s=>s.kind==="type")&&e.exports.length>0;return`${r?"type ":""}{ ${e.exports.map(s=>this.createNamedExport(s,r)).join(", ")} }`}}function J(f,e){return c.createSourceFile(f,e,c.ScriptTarget.Latest,!0)}g(J,"parse");const Pt=g(()=>{const f=new Map,e=new Map;return{name:"dts-transform",options({onLog:r,...s}){return{...s,onLog(l,v,p){l==="warn"&&v.code=="CIRCULAR_DEPENDENCY"||(r?r(l,v,p):p(l,v))},treeshake:{moduleSideEffects:"no-external",propertyReadSideEffects:!0,unknownGlobalSideEffects:!1}}},outputOptions(r){return{...r,chunkFileNames:r.chunkFileNames||"[name]-[hash].d.ts",entryFileNames:r.entryFileNames||"[name].d.ts",format:"es",exports:"named",compact:!1,freeze:!0,interop:"esModule",generatedCode:Object.assign({symbols:!1},r.generatedCode),strict:!1}},transform(r,s){let l=J(s,r);const v=kt({sourceFile:l});f.set(l.fileName,v.typeReferences),e.set(l.fileName,v.fileReferences),r=v.code.toString(),l=J(s,r);const p=Mt({sourceFile:l});return process.env.DTS_DUMP_AST&&(console.log(s),console.log(r),console.log(JSON.stringify(p.ast.body,void 0,2))),{code:r,ast:p.ast,map:v.code.generateMap()}},renderChunk(r,s,l){const v=J(s.fileName,r),p=new St(v),d=new Set,n=new Set;for(const i of Object.keys(s.modules)){for(const o of f.get(i.split("\\").join("/"))||[])d.add(o);for(const o of e.get(i.split("\\").join("/"))||[])if(o.startsWith(".")){const h=O.join(O.dirname(i),o),u=l.file&&O.dirname(l.file)||s.facadeModuleId&&O.dirname(s.facadeModuleId)||".";let m=O.relative(u,h).split("\\").join("/");m[0]!=="."&&(m="./"+m),n.add(m)}else n.add(o)}let a=We(Array.from(n,i=>`/// <reference path="${i}" />`));return a+=We(Array.from(d,i=>`/// <reference types="${i}" />`)),a+=p.fix(),a||(a+=`
28
- export { }`),{code:new Ft(J(s.fileName,a)).fix(),map:{mappings:""}}}}},"transform");function We(f){return f.length?f.join(`
29
- `)+`
30
- `:""}g(We,"writeBlock");const de=/\.([cm]ts|[tj]sx?)$/;function me({programs:f,resolvedOptions:{compilerOptions:e,tsconfig:r}},s,l){if(!f.length&&X.test(s))return{code:l};const v=f.find(p=>!!p.getSourceFile(s));if(v){const p=v.getSourceFile(s);return{code:p?.getFullText(),source:p,program:v}}else if(c.sys.fileExists(s)){const p=gt(s,e,r);f.push(p);const d=p.getSourceFile(s);return{code:d?.getFullText(),source:d,program:p}}else return null}g(me,"getModule");const Ge=g((f={})=>{const e=Pt(),r={programs:[],resolvedOptions:ht(f)};return{name:"dts",outputOptions:e.outputOptions,renderChunk:e.renderChunk,options(s){let{input:l=[]}=s;if(!Array.isArray(l))l=typeof l=="string"?[l]:Object.values(l);else if(l.length>1){s.input={};for(const v of l){let p=v.replace(/((\.d)?\.(c|m)?(t|j)sx?)$/,"");O.isAbsolute(v)?p=O.basename(p):p=O.normalize(p),s.input[p]=v}}return r.programs=yt(Object.values(l),r.resolvedOptions.compilerOptions,r.resolvedOptions.tsconfig),e.options.call(this,s)},transform(s,l){if(!de.test(l))return null;const v=g(a=>{if(a.program){const t=O.dirname(l);a.program.getSourceFiles().map(o=>o.fileName).filter(o=>o.startsWith(t)).forEach(this.addWatchFile)}},"watchFiles"),p=g(()=>{const a=me(r,l,s);return a?(v(a),e.transform.call(this,a.code,l)):null},"handleDtsFile"),d=g(()=>{const a=l.replace(de,$e);let t=me(r,a,s);return t?(v(t),e.transform.call(this,t.code,a)):null},"treatTsAsDts"),n=g(()=>{const a=me(r,l,s);if(!a||!a.source||!a.program)return null;v(a);const t=l.replace(de,$e);let i;const{emitSkipped:o,diagnostics:h}=a.program.emit(a.source,(u,m)=>{i=e.transform.call(this,m,t)},void 0,!0);if(o){const u=h.filter(m=>m.category===c.DiagnosticCategory.Error);u.length&&(console.error(c.formatDiagnostics(u,le)),this.error("Failed to compile. Check the logs above."))}return i},"generateDtsFromTs");return X.test(l)?p():d()??n()},resolveId(s,l){if(!l)return;l=l.split("\\").join("/");let v=r.resolvedOptions.compilerOptions;if(r.resolvedOptions.tsconfig){const d=s.startsWith(".")?O.resolve(O.dirname(l),s):s;v=fe(d,r.resolvedOptions.compilerOptions,r.resolvedOptions.tsconfig).compilerOptions}const{resolvedModule:p}=c.resolveModuleName(s,l,v,c.sys);if(p)return!r.resolvedOptions.respectExternal&&p.isExternalLibraryImport?{id:s,external:!0}:{id:O.resolve(p.resolvedFileName)}}}},"plugin");export{Ge as default,Ge as dts};