@salty-css/core 0.0.1-alpha.20 → 0.0.1-alpha.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/bin/index.cjs +18 -5
  2. package/bin/index.js +5768 -97
  3. package/package.json +1 -1
package/bin/index.cjs CHANGED
@@ -1,9 +1,22 @@
1
1
  #!/usr/bin/env node
2
- "use strict";const D=require("commander"),n=require("fs/promises"),t=require("path"),L=require("ejs"),O=require("../compiler/index.cjs"),R=require("../pascal-case-iWoaJWwT.cjs"),h=require("winston"),T=require("fs"),U=require("child_process");var $=typeof document<"u"?document.currentScript:null;const o=h.createLogger({level:"debug",format:h.format.combine(h.format.colorize(),h.format.cli()),transports:[new h.transports.Console({})]}),_=a=>new Promise((f,m)=>{U.exec(a,S=>{if(S)return m(S);f()})}),k=async(...a)=>{const f=a.join(" ");await _(`npm install ${f}`)},z=()=>T.existsSync(t.join(process.cwd(),"node_modules",".bin","prettier"));async function F(a){try{if(!z())return;await _(`./node_modules/.bin/prettier --write "${a}"`),o.info(`Formatted ${a} with Prettier`)}catch(f){o.error(`Error formatting ${a} with Prettier:`,f)}}async function A(){const a=new D.Command;a.name("salty-css").description("Salty-CSS CLI tool to help with annoying configuration tasks.");const f={"salty.config.ts":Promise.resolve().then(()=>require("../salty.config-BupieCfE.cjs")),"saltygen/index.css":Promise.resolve().then(()=>require("../index-84Wroia-.cjs")),"react/react-styled-file.ts":Promise.resolve().then(()=>require("../react-styled-file-Dkubsz-U.cjs"))},m=async(s,l)=>{const{default:p}=await f[s],c=L.render(p,l);return{fileName:s,content:c}},S=async()=>{const s=t.join(process.cwd(),".saltyrc");return await n.readFile(s,"utf-8").then(JSON.parse).catch(()=>({}))},E=async()=>{const s=new URL("../package.json",typeof document>"u"?require("url").pathToFileURL(__filename).href:$&&$.tagName.toUpperCase()==="SCRIPT"&&$.src||new URL("bin/index.cjs",document.baseURI).href);return console.log({packageJsonPath:s}),await n.readFile(s,"utf-8").then(JSON.parse).catch(()=>({}))},J=await(async()=>(await S()).defaultProject)(),j=await E(),P={core:`@salty-css/core@${j.version}`,react:`@salty-css/react@${j.version}`,eslintPluginCore:`@salty-css/eslint-plugin-core@${j.version}`,vite:`@salty-css/vite@${j.version}`};a.command("init").description("Initialize a new Salty-CSS project.").requiredOption("-d, --dir <dir>","Project directory to initialize the project in.").option("--css-file <css-file>","Existing CSS file where to import the generated CSS. Path must be relative to the given project directory.").action(async function(){o.info("Installing salty-css packages core, eslint-plugin and react"),await k(P.core,P.react),await k(`-D ${P.eslintPluginCore}`),o.info("Initializing a new Salty-CSS project...");const{dir:s,cssFile:l}=this.opts(),p=process.cwd(),c=t.join(p,s),x=await Promise.all([m("salty.config.ts"),m("saltygen/index.css")]);await n.mkdir(c,{recursive:!0});const I=x.map(async({fileName:e,content:r})=>{const d=t.join(c,e);if(await n.readFile(d,"utf-8").catch(()=>{})!==void 0){o.debug("File already exists: "+d);return}const q=e.split("/").slice(0,-1).join("/");q&&await n.mkdir(t.join(c,q),{recursive:!0}),o.info("Writing file: "+d),await n.writeFile(d,r),await F(d)});await Promise.all(I);const y=t.relative(p,c),i=t.join(p,".saltyrc"),u=await n.readFile(i,"utf-8").catch(()=>{});if(u===void 0){o.info("Creating file: "+i);const r=JSON.stringify({defaultProject:y,projects:[y]},null,2);await n.writeFile(i,r)}else{o.info("Edit file: "+i);const e=JSON.parse(u),r=new Set((e==null?void 0:e.projects)||[]);r.add(y),e.projects=[...r];const d=JSON.stringify(e,null,2);await n.writeFile(i,d)}const v=t.join(p,".gitignore"),w=await n.readFile(v,"utf-8").catch(()=>{});if(w!==void 0&&(w.includes("saltygen")||(o.info("Edit file: "+v),await n.writeFile(v,w+`
2
+ "use strict";const on=require("commander"),ee=require("fs/promises"),Q=require("path"),sn=require("ejs"),an=require("../compiler/index.cjs"),ln=require("../pascal-case-iWoaJWwT.cjs"),ke=require("winston"),fn=require("fs"),un=require("child_process");var ft=typeof document<"u"?document.currentScript:null;const ie=ke.createLogger({level:"debug",format:ke.format.combine(ke.format.colorize(),ke.format.cli()),transports:[new ke.transports.Console({})]});var oe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function hn(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function c(){return this instanceof c?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(c){var o=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(n,c,o.get?o:{enumerable:!0,get:function(){return e[c]}})}),n}var jt={exports:{}};const dn={},pn=Object.freeze(Object.defineProperty({__proto__:null,default:dn},Symbol.toStringTag,{value:"Module"})),Qe=hn(pn);var Nt={exports:{}},ut,Xt;function gn(){return Xt||(Xt=1,ut={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]}),ut}var ct,Jt;function Rr(){if(Jt)return ct;Jt=1;const e=gn(),t={};for(const o of Object.keys(e))t[e[o]]=o;const n={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"]}};ct=n;for(const o of Object.keys(n)){if(!("channels"in n[o]))throw new Error("missing channels property: "+o);if(!("labels"in n[o]))throw new Error("missing channel labels property: "+o);if(n[o].labels.length!==n[o].channels)throw new Error("channel and label counts mismatch: "+o);const{channels:l,labels:a}=n[o];delete n[o].channels,delete n[o].labels,Object.defineProperty(n[o],"channels",{value:l}),Object.defineProperty(n[o],"labels",{value:a})}n.rgb.hsl=function(o){const l=o[0]/255,a=o[1]/255,s=o[2]/255,f=Math.min(l,a,s),p=Math.max(l,a,s),y=p-f;let _,m;p===f?_=0:l===p?_=(a-s)/y:a===p?_=2+(s-l)/y:s===p&&(_=4+(l-a)/y),_=Math.min(_*60,360),_<0&&(_+=360);const R=(f+p)/2;return p===f?m=0:R<=.5?m=y/(p+f):m=y/(2-p-f),[_,m*100,R*100]},n.rgb.hsv=function(o){let l,a,s,f,p;const y=o[0]/255,_=o[1]/255,m=o[2]/255,R=Math.max(y,_,m),B=R-Math.min(y,_,m),F=function(S){return(R-S)/6/B+1/2};return B===0?(f=0,p=0):(p=B/R,l=F(y),a=F(_),s=F(m),y===R?f=s-a:_===R?f=1/3+l-s:m===R&&(f=2/3+a-l),f<0?f+=1:f>1&&(f-=1)),[f*360,p*100,R*100]},n.rgb.hwb=function(o){const l=o[0],a=o[1];let s=o[2];const f=n.rgb.hsl(o)[0],p=1/255*Math.min(l,Math.min(a,s));return s=1-1/255*Math.max(l,Math.max(a,s)),[f,p*100,s*100]},n.rgb.cmyk=function(o){const l=o[0]/255,a=o[1]/255,s=o[2]/255,f=Math.min(1-l,1-a,1-s),p=(1-l-f)/(1-f)||0,y=(1-a-f)/(1-f)||0,_=(1-s-f)/(1-f)||0;return[p*100,y*100,_*100,f*100]};function c(o,l){return(o[0]-l[0])**2+(o[1]-l[1])**2+(o[2]-l[2])**2}return n.rgb.keyword=function(o){const l=t[o];if(l)return l;let a=1/0,s;for(const f of Object.keys(e)){const p=e[f],y=c(o,p);y<a&&(a=y,s=f)}return s},n.keyword.rgb=function(o){return e[o]},n.rgb.xyz=function(o){let l=o[0]/255,a=o[1]/255,s=o[2]/255;l=l>.04045?((l+.055)/1.055)**2.4:l/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92,s=s>.04045?((s+.055)/1.055)**2.4:s/12.92;const f=l*.4124+a*.3576+s*.1805,p=l*.2126+a*.7152+s*.0722,y=l*.0193+a*.1192+s*.9505;return[f*100,p*100,y*100]},n.rgb.lab=function(o){const l=n.rgb.xyz(o);let a=l[0],s=l[1],f=l[2];a/=95.047,s/=100,f/=108.883,a=a>.008856?a**(1/3):7.787*a+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,f=f>.008856?f**(1/3):7.787*f+16/116;const p=116*s-16,y=500*(a-s),_=200*(s-f);return[p,y,_]},n.hsl.rgb=function(o){const l=o[0]/360,a=o[1]/100,s=o[2]/100;let f,p,y;if(a===0)return y=s*255,[y,y,y];s<.5?f=s*(1+a):f=s+a-s*a;const _=2*s-f,m=[0,0,0];for(let R=0;R<3;R++)p=l+1/3*-(R-1),p<0&&p++,p>1&&p--,6*p<1?y=_+(f-_)*6*p:2*p<1?y=f:3*p<2?y=_+(f-_)*(2/3-p)*6:y=_,m[R]=y*255;return m},n.hsl.hsv=function(o){const l=o[0];let a=o[1]/100,s=o[2]/100,f=a;const p=Math.max(s,.01);s*=2,a*=s<=1?s:2-s,f*=p<=1?p:2-p;const y=(s+a)/2,_=s===0?2*f/(p+f):2*a/(s+a);return[l,_*100,y*100]},n.hsv.rgb=function(o){const l=o[0]/60,a=o[1]/100;let s=o[2]/100;const f=Math.floor(l)%6,p=l-Math.floor(l),y=255*s*(1-a),_=255*s*(1-a*p),m=255*s*(1-a*(1-p));switch(s*=255,f){case 0:return[s,m,y];case 1:return[_,s,y];case 2:return[y,s,m];case 3:return[y,_,s];case 4:return[m,y,s];case 5:return[s,y,_]}},n.hsv.hsl=function(o){const l=o[0],a=o[1]/100,s=o[2]/100,f=Math.max(s,.01);let p,y;y=(2-a)*s;const _=(2-a)*f;return p=a*f,p/=_<=1?_:2-_,p=p||0,y/=2,[l,p*100,y*100]},n.hwb.rgb=function(o){const l=o[0]/360;let a=o[1]/100,s=o[2]/100;const f=a+s;let p;f>1&&(a/=f,s/=f);const y=Math.floor(6*l),_=1-s;p=6*l-y,y&1&&(p=1-p);const m=a+p*(_-a);let R,B,F;switch(y){default:case 6:case 0:R=_,B=m,F=a;break;case 1:R=m,B=_,F=a;break;case 2:R=a,B=_,F=m;break;case 3:R=a,B=m,F=_;break;case 4:R=m,B=a,F=_;break;case 5:R=_,B=a,F=m;break}return[R*255,B*255,F*255]},n.cmyk.rgb=function(o){const l=o[0]/100,a=o[1]/100,s=o[2]/100,f=o[3]/100,p=1-Math.min(1,l*(1-f)+f),y=1-Math.min(1,a*(1-f)+f),_=1-Math.min(1,s*(1-f)+f);return[p*255,y*255,_*255]},n.xyz.rgb=function(o){const l=o[0]/100,a=o[1]/100,s=o[2]/100;let f,p,y;return f=l*3.2406+a*-1.5372+s*-.4986,p=l*-.9689+a*1.8758+s*.0415,y=l*.0557+a*-.204+s*1.057,f=f>.0031308?1.055*f**(1/2.4)-.055:f*12.92,p=p>.0031308?1.055*p**(1/2.4)-.055:p*12.92,y=y>.0031308?1.055*y**(1/2.4)-.055:y*12.92,f=Math.min(Math.max(0,f),1),p=Math.min(Math.max(0,p),1),y=Math.min(Math.max(0,y),1),[f*255,p*255,y*255]},n.xyz.lab=function(o){let l=o[0],a=o[1],s=o[2];l/=95.047,a/=100,s/=108.883,l=l>.008856?l**(1/3):7.787*l+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;const f=116*a-16,p=500*(l-a),y=200*(a-s);return[f,p,y]},n.lab.xyz=function(o){const l=o[0],a=o[1],s=o[2];let f,p,y;p=(l+16)/116,f=a/500+p,y=p-s/200;const _=p**3,m=f**3,R=y**3;return p=_>.008856?_:(p-16/116)/7.787,f=m>.008856?m:(f-16/116)/7.787,y=R>.008856?R:(y-16/116)/7.787,f*=95.047,p*=100,y*=108.883,[f,p,y]},n.lab.lch=function(o){const l=o[0],a=o[1],s=o[2];let f;f=Math.atan2(s,a)*360/2/Math.PI,f<0&&(f+=360);const y=Math.sqrt(a*a+s*s);return[l,y,f]},n.lch.lab=function(o){const l=o[0],a=o[1],f=o[2]/360*2*Math.PI,p=a*Math.cos(f),y=a*Math.sin(f);return[l,p,y]},n.rgb.ansi16=function(o,l=null){const[a,s,f]=o;let p=l===null?n.rgb.hsv(o)[2]:l;if(p=Math.round(p/50),p===0)return 30;let y=30+(Math.round(f/255)<<2|Math.round(s/255)<<1|Math.round(a/255));return p===2&&(y+=60),y},n.hsv.ansi16=function(o){return n.rgb.ansi16(n.hsv.rgb(o),o[2])},n.rgb.ansi256=function(o){const l=o[0],a=o[1],s=o[2];return l===a&&a===s?l<8?16:l>248?231:Math.round((l-8)/247*24)+232:16+36*Math.round(l/255*5)+6*Math.round(a/255*5)+Math.round(s/255*5)},n.ansi16.rgb=function(o){let l=o%10;if(l===0||l===7)return o>50&&(l+=3.5),l=l/10.5*255,[l,l,l];const a=(~~(o>50)+1)*.5,s=(l&1)*a*255,f=(l>>1&1)*a*255,p=(l>>2&1)*a*255;return[s,f,p]},n.ansi256.rgb=function(o){if(o>=232){const p=(o-232)*10+8;return[p,p,p]}o-=16;let l;const a=Math.floor(o/36)/5*255,s=Math.floor((l=o%36)/6)/5*255,f=l%6/5*255;return[a,s,f]},n.rgb.hex=function(o){const a=(((Math.round(o[0])&255)<<16)+((Math.round(o[1])&255)<<8)+(Math.round(o[2])&255)).toString(16).toUpperCase();return"000000".substring(a.length)+a},n.hex.rgb=function(o){const l=o.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!l)return[0,0,0];let a=l[0];l[0].length===3&&(a=a.split("").map(_=>_+_).join(""));const s=parseInt(a,16),f=s>>16&255,p=s>>8&255,y=s&255;return[f,p,y]},n.rgb.hcg=function(o){const l=o[0]/255,a=o[1]/255,s=o[2]/255,f=Math.max(Math.max(l,a),s),p=Math.min(Math.min(l,a),s),y=f-p;let _,m;return y<1?_=p/(1-y):_=0,y<=0?m=0:f===l?m=(a-s)/y%6:f===a?m=2+(s-l)/y:m=4+(l-a)/y,m/=6,m%=1,[m*360,y*100,_*100]},n.hsl.hcg=function(o){const l=o[1]/100,a=o[2]/100,s=a<.5?2*l*a:2*l*(1-a);let f=0;return s<1&&(f=(a-.5*s)/(1-s)),[o[0],s*100,f*100]},n.hsv.hcg=function(o){const l=o[1]/100,a=o[2]/100,s=l*a;let f=0;return s<1&&(f=(a-s)/(1-s)),[o[0],s*100,f*100]},n.hcg.rgb=function(o){const l=o[0]/360,a=o[1]/100,s=o[2]/100;if(a===0)return[s*255,s*255,s*255];const f=[0,0,0],p=l%1*6,y=p%1,_=1-y;let m=0;switch(Math.floor(p)){case 0:f[0]=1,f[1]=y,f[2]=0;break;case 1:f[0]=_,f[1]=1,f[2]=0;break;case 2:f[0]=0,f[1]=1,f[2]=y;break;case 3:f[0]=0,f[1]=_,f[2]=1;break;case 4:f[0]=y,f[1]=0,f[2]=1;break;default:f[0]=1,f[1]=0,f[2]=_}return m=(1-a)*s,[(a*f[0]+m)*255,(a*f[1]+m)*255,(a*f[2]+m)*255]},n.hcg.hsv=function(o){const l=o[1]/100,a=o[2]/100,s=l+a*(1-l);let f=0;return s>0&&(f=l/s),[o[0],f*100,s*100]},n.hcg.hsl=function(o){const l=o[1]/100,s=o[2]/100*(1-l)+.5*l;let f=0;return s>0&&s<.5?f=l/(2*s):s>=.5&&s<1&&(f=l/(2*(1-s))),[o[0],f*100,s*100]},n.hcg.hwb=function(o){const l=o[1]/100,a=o[2]/100,s=l+a*(1-l);return[o[0],(s-l)*100,(1-s)*100]},n.hwb.hcg=function(o){const l=o[1]/100,s=1-o[2]/100,f=s-l;let p=0;return f<1&&(p=(s-f)/(1-f)),[o[0],f*100,p*100]},n.apple.rgb=function(o){return[o[0]/65535*255,o[1]/65535*255,o[2]/65535*255]},n.rgb.apple=function(o){return[o[0]/255*65535,o[1]/255*65535,o[2]/255*65535]},n.gray.rgb=function(o){return[o[0]/100*255,o[0]/100*255,o[0]/100*255]},n.gray.hsl=function(o){return[0,0,o[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(o){return[0,100,o[0]]},n.gray.cmyk=function(o){return[0,0,0,o[0]]},n.gray.lab=function(o){return[o[0],0,0]},n.gray.hex=function(o){const l=Math.round(o[0]/100*255)&255,s=((l<<16)+(l<<8)+l).toString(16).toUpperCase();return"000000".substring(s.length)+s},n.rgb.gray=function(o){return[(o[0]+o[1]+o[2])/3/255*100]},ct}var ht,Zt;function yn(){if(Zt)return ht;Zt=1;const e=Rr();function t(){const l={},a=Object.keys(e);for(let s=a.length,f=0;f<s;f++)l[a[f]]={distance:-1,parent:null};return l}function n(l){const a=t(),s=[l];for(a[l].distance=0;s.length;){const f=s.pop(),p=Object.keys(e[f]);for(let y=p.length,_=0;_<y;_++){const m=p[_],R=a[m];R.distance===-1&&(R.distance=a[f].distance+1,R.parent=f,s.unshift(m))}}return a}function c(l,a){return function(s){return a(l(s))}}function o(l,a){const s=[a[l].parent,l];let f=e[a[l].parent][l],p=a[l].parent;for(;a[p].parent;)s.unshift(a[p].parent),f=c(e[a[p].parent][p],f),p=a[p].parent;return f.conversion=s,f}return ht=function(l){const a=n(l),s={},f=Object.keys(a);for(let p=f.length,y=0;y<p;y++){const _=f[y];a[_].parent!==null&&(s[_]=o(_,a))}return s},ht}var dt,Qt;function _n(){if(Qt)return dt;Qt=1;const e=Rr(),t=yn(),n={},c=Object.keys(e);function o(a){const s=function(...f){const p=f[0];return p==null?p:(p.length>1&&(f=p),a(f))};return"conversion"in a&&(s.conversion=a.conversion),s}function l(a){const s=function(...f){const p=f[0];if(p==null)return p;p.length>1&&(f=p);const y=a(f);if(typeof y=="object")for(let _=y.length,m=0;m<_;m++)y[m]=Math.round(y[m]);return y};return"conversion"in a&&(s.conversion=a.conversion),s}return c.forEach(a=>{n[a]={},Object.defineProperty(n[a],"channels",{value:e[a].channels}),Object.defineProperty(n[a],"labels",{value:e[a].labels});const s=t(a);Object.keys(s).forEach(p=>{const y=s[p];n[a][p]=l(y),n[a][p].raw=o(y)})}),dt=n,dt}Nt.exports;(function(e){const t=(y,_)=>(...m)=>`\x1B[${y(...m)+_}m`,n=(y,_)=>(...m)=>{const R=y(...m);return`\x1B[${38+_};5;${R}m`},c=(y,_)=>(...m)=>{const R=y(...m);return`\x1B[${38+_};2;${R[0]};${R[1]};${R[2]}m`},o=y=>y,l=(y,_,m)=>[y,_,m],a=(y,_,m)=>{Object.defineProperty(y,_,{get:()=>{const R=m();return Object.defineProperty(y,_,{value:R,enumerable:!0,configurable:!0}),R},enumerable:!0,configurable:!0})};let s;const f=(y,_,m,R)=>{s===void 0&&(s=_n());const B=R?10:0,F={};for(const[S,v]of Object.entries(s)){const E=S==="ansi16"?"ansi":S;S===_?F[E]=y(m,B):typeof v=="object"&&(F[E]=y(v[_],B))}return F};function p(){const y=new Map,_={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};_.color.gray=_.color.blackBright,_.bgColor.bgGray=_.bgColor.bgBlackBright,_.color.grey=_.color.blackBright,_.bgColor.bgGrey=_.bgColor.bgBlackBright;for(const[m,R]of Object.entries(_)){for(const[B,F]of Object.entries(R))_[B]={open:`\x1B[${F[0]}m`,close:`\x1B[${F[1]}m`},R[B]=_[B],y.set(F[0],F[1]);Object.defineProperty(_,m,{value:R,enumerable:!1})}return Object.defineProperty(_,"codes",{value:y,enumerable:!1}),_.color.close="\x1B[39m",_.bgColor.close="\x1B[49m",a(_.color,"ansi",()=>f(t,"ansi16",o,!1)),a(_.color,"ansi256",()=>f(n,"ansi256",o,!1)),a(_.color,"ansi16m",()=>f(c,"rgb",l,!1)),a(_.bgColor,"ansi",()=>f(t,"ansi16",o,!0)),a(_.bgColor,"ansi256",()=>f(n,"ansi256",o,!0)),a(_.bgColor,"ansi16m",()=>f(c,"rgb",l,!0)),_}Object.defineProperty(e,"exports",{enumerable:!0,get:p})})(Nt);var vn=Nt.exports,wn={stdout:!1,stderr:!1};const bn=(e,t,n)=>{let c=e.indexOf(t);if(c===-1)return e;const o=t.length;let l=0,a="";do a+=e.substr(l,c-l)+t+n,l=c+o,c=e.indexOf(t,l);while(c!==-1);return a+=e.substr(l),a},xn=(e,t,n,c)=>{let o=0,l="";do{const a=e[c-1]==="\r";l+=e.substr(o,(a?c-1:c)-o)+t+(a?`\r
3
+ `:`
4
+ `)+n,o=c+1,c=e.indexOf(`
5
+ `,o)}while(c!==-1);return l+=e.substr(o),l};var mn={stringReplaceAll:bn,stringEncaseCRLFWithFirstIndex:xn},pt,er;function En(){if(er)return pt;er=1;const e=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,t=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,n=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,c=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,o=new Map([["n",`
6
+ `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function l(p){const y=p[0]==="u",_=p[1]==="{";return y&&!_&&p.length===5||p[0]==="x"&&p.length===3?String.fromCharCode(parseInt(p.slice(1),16)):y&&_?String.fromCodePoint(parseInt(p.slice(2,-1),16)):o.get(p)||p}function a(p,y){const _=[],m=y.trim().split(/\s*,\s*/g);let R;for(const B of m){const F=Number(B);if(!Number.isNaN(F))_.push(F);else if(R=B.match(n))_.push(R[2].replace(c,(S,v,E)=>v?l(v):E));else throw new Error(`Invalid Chalk template style argument: ${B} (in style '${p}')`)}return _}function s(p){t.lastIndex=0;const y=[];let _;for(;(_=t.exec(p))!==null;){const m=_[1];if(_[2]){const R=a(m,_[2]);y.push([m].concat(R))}else y.push([m])}return y}function f(p,y){const _={};for(const R of y)for(const B of R.styles)_[B[0]]=R.inverse?null:B.slice(1);let m=p;for(const[R,B]of Object.entries(_))if(Array.isArray(B)){if(!(R in m))throw new Error(`Unknown Chalk style: ${R}`);m=B.length>0?m[R](...B):m[R]}return m}return pt=(p,y)=>{const _=[],m=[];let R=[];if(y.replace(e,(B,F,S,v,E,T)=>{if(F)R.push(l(F));else if(v){const M=R.join("");R=[],m.push(_.length===0?M:f(p,_)(M)),_.push({inverse:S,styles:s(v)})}else if(E){if(_.length===0)throw new Error("Found extraneous } in Chalk template literal");m.push(f(p,_)(R.join(""))),R=[],_.pop()}else R.push(T)}),m.push(R.join("")),_.length>0){const B=`Chalk template literal is missing ${_.length} closing bracket${_.length===1?"":"s"} (\`}\`)`;throw new Error(B)}return m.join("")},pt}const Ne=vn,{stdout:Mt,stderr:Ot}=wn,{stringReplaceAll:Sn,stringEncaseCRLFWithFirstIndex:Rn}=mn,{isArray:Xe}=Array,Cr=["ansi","ansi","ansi256","ansi16m"],Fe=Object.create(null),Cn=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const n=Mt?Mt.level:0;e.level=t.level===void 0?n:t.level};class An{constructor(t){return Ar(t)}}const Ar=e=>{const t={};return Cn(t,e),t.template=(...n)=>Tr(t.template,...n),Object.setPrototypeOf(t,et.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=An,t.template};function et(e){return Ar(e)}for(const[e,t]of Object.entries(Ne))Fe[e]={get(){const n=tt(this,Ut(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:n}),n}};Fe.visible={get(){const e=tt(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const Br=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of Br)Fe[e]={get(){const{level:t}=this;return function(...n){const c=Ut(Ne.color[Cr[t]][e](...n),Ne.color.close,this._styler);return tt(this,c,this._isEmpty)}}};for(const e of Br){const t="bg"+e[0].toUpperCase()+e.slice(1);Fe[t]={get(){const{level:n}=this;return function(...c){const o=Ut(Ne.bgColor[Cr[n]][e](...c),Ne.bgColor.close,this._styler);return tt(this,o,this._isEmpty)}}}}const Bn=Object.defineProperties(()=>{},{...Fe,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),Ut=(e,t,n)=>{let c,o;return n===void 0?(c=e,o=t):(c=n.openAll+e,o=t+n.closeAll),{open:e,close:t,openAll:c,closeAll:o,parent:n}},tt=(e,t,n)=>{const c=(...o)=>Xe(o[0])&&Xe(o[0].raw)?tr(c,Tr(c,...o)):tr(c,o.length===1?""+o[0]:o.join(" "));return Object.setPrototypeOf(c,Bn),c._generator=e,c._styler=t,c._isEmpty=n,c},tr=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let n=e._styler;if(n===void 0)return t;const{openAll:c,closeAll:o}=n;if(t.indexOf("\x1B")!==-1)for(;n!==void 0;)t=Sn(t,n.close,n.open),n=n.parent;const l=t.indexOf(`
7
+ `);return l!==-1&&(t=Rn(t,o,c,l)),c+t+o};let gt;const Tr=(e,...t)=>{const[n]=t;if(!Xe(n)||!Xe(n.raw))return t.join(" ");const c=t.slice(1),o=[n.raw[0]];for(let l=1;l<n.length;l++)o.push(String(c[l-1]).replace(/[{}\\]/g,"\\$&"),String(n.raw[l]));return gt===void 0&&(gt=En()),gt(e,o.join(""))};Object.defineProperties(et.prototype,Fe);const rt=et();rt.supportsColor=Mt;rt.stderr=et({level:Ot?Ot.level:0});rt.stderr.supportsColor=Ot;var Tn=rt,Fr={},nt={exports:{}},qt={exports:{}};const Lr=(e,t)=>{for(const n of Reflect.ownKeys(t))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e};qt.exports=Lr;qt.exports.default=Lr;var Fn=qt.exports;const Ln=Fn,Je=new WeakMap,Ir=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,c=0;const o=e.displayName||e.name||"<anonymous>",l=function(...a){if(Je.set(l,++c),c===1)n=e.apply(this,a),e=null;else if(t.throw===!0)throw new Error(`Function \`${o}\` can only be called once`);return n};return Ln(l,e),Je.set(l,c),l};nt.exports=Ir;nt.exports.default=Ir;nt.exports.callCount=e=>{if(!Je.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Je.get(e)};var In=nt.exports,Ae={exports:{}},yt={exports:{}},rr;function Mn(){return rr||(rr=1,function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],process.platform!=="win32"&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),process.platform==="linux"&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}(yt)),yt.exports}var $t={exports:{}},Be=typeof Reflect=="object"?Reflect:null,nr=Be&&typeof Be.apply=="function"?Be.apply:function(t,n,c){return Function.prototype.apply.call(t,n,c)},Ke;Be&&typeof Be.ownKeys=="function"?Ke=Be.ownKeys:Object.getOwnPropertySymbols?Ke=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Ke=function(t){return Object.getOwnPropertyNames(t)};function On(e){console&&console.warn&&console.warn(e)}var Mr=Number.isNaN||function(t){return t!==t};function Y(){Y.init.call(this)}$t.exports=Y;$t.exports.once=jn;Y.EventEmitter=Y;Y.prototype._events=void 0;Y.prototype._eventsCount=0;Y.prototype._maxListeners=void 0;var ir=10;function it(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Y,"defaultMaxListeners",{enumerable:!0,get:function(){return ir},set:function(e){if(typeof e!="number"||e<0||Mr(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");ir=e}});Y.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Y.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Mr(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Or(e){return e._maxListeners===void 0?Y.defaultMaxListeners:e._maxListeners}Y.prototype.getMaxListeners=function(){return Or(this)};Y.prototype.emit=function(t){for(var n=[],c=1;c<arguments.length;c++)n.push(arguments[c]);var o=t==="error",l=this._events;if(l!==void 0)o=o&&l.error===void 0;else if(!o)return!1;if(o){var a;if(n.length>0&&(a=n[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var f=l[t];if(f===void 0)return!1;if(typeof f=="function")nr(f,this,n);else for(var p=f.length,y=Nr(f,p),c=0;c<p;++c)nr(y[c],this,n);return!0};function kr(e,t,n,c){var o,l,a;if(it(n),l=e._events,l===void 0?(l=e._events=Object.create(null),e._eventsCount=0):(l.newListener!==void 0&&(e.emit("newListener",t,n.listener?n.listener:n),l=e._events),a=l[t]),a===void 0)a=l[t]=n,++e._eventsCount;else if(typeof a=="function"?a=l[t]=c?[n,a]:[a,n]:c?a.unshift(n):a.push(n),o=Or(e),o>0&&a.length>o&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,On(s)}return e}Y.prototype.addListener=function(t,n){return kr(this,t,n,!1)};Y.prototype.on=Y.prototype.addListener;Y.prototype.prependListener=function(t,n){return kr(this,t,n,!0)};function kn(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Dr(e,t,n){var c={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=kn.bind(c);return o.listener=n,c.wrapFn=o,o}Y.prototype.once=function(t,n){return it(n),this.on(t,Dr(this,t,n)),this};Y.prototype.prependOnceListener=function(t,n){return it(n),this.prependListener(t,Dr(this,t,n)),this};Y.prototype.removeListener=function(t,n){var c,o,l,a,s;if(it(n),o=this._events,o===void 0)return this;if(c=o[t],c===void 0)return this;if(c===n||c.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete o[t],o.removeListener&&this.emit("removeListener",t,c.listener||n));else if(typeof c!="function"){for(l=-1,a=c.length-1;a>=0;a--)if(c[a]===n||c[a].listener===n){s=c[a].listener,l=a;break}if(l<0)return this;l===0?c.shift():Dn(c,l),c.length===1&&(o[t]=c[0]),o.removeListener!==void 0&&this.emit("removeListener",t,s||n)}return this};Y.prototype.off=Y.prototype.removeListener;Y.prototype.removeAllListeners=function(t){var n,c,o;if(c=this._events,c===void 0)return this;if(c.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):c[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete c[t]),this;if(arguments.length===0){var l=Object.keys(c),a;for(o=0;o<l.length;++o)a=l[o],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=c[t],typeof n=="function")this.removeListener(t,n);else if(n!==void 0)for(o=n.length-1;o>=0;o--)this.removeListener(t,n[o]);return this};function Pr(e,t,n){var c=e._events;if(c===void 0)return[];var o=c[t];return o===void 0?[]:typeof o=="function"?n?[o.listener||o]:[o]:n?Pn(o):Nr(o,o.length)}Y.prototype.listeners=function(t){return Pr(this,t,!0)};Y.prototype.rawListeners=function(t){return Pr(this,t,!1)};Y.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):jr.call(e,t)};Y.prototype.listenerCount=jr;function jr(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}Y.prototype.eventNames=function(){return this._eventsCount>0?Ke(this._events):[]};function Nr(e,t){for(var n=new Array(t),c=0;c<t;++c)n[c]=e[c];return n}function Dn(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function Pn(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function jn(e,t){return new Promise(function(n,c){function o(a){e.removeListener(t,l),c(a)}function l(){typeof e.removeListener=="function"&&e.removeListener("error",o),n([].slice.call(arguments))}Ur(e,t,l,{once:!0}),t!=="error"&&Nn(e,o,{once:!0})})}function Nn(e,t,n){typeof e.on=="function"&&Ur(e,"error",t,n)}function Ur(e,t,n,c){if(typeof e.on=="function")c.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener=="function")e.addEventListener(t,function o(l){c.once&&e.removeEventListener(t,o),n(l)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var Wt=$t.exports,z=oe.process;const ve=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};if(!ve(z))Ae.exports=function(){return function(){}};else{var Un=Qe,De=Mn(),qn=/^win/i.test(z.platform),$e=Wt;typeof $e!="function"&&($e=$e.EventEmitter);var te;z.__signal_exit_emitter__?te=z.__signal_exit_emitter__:(te=z.__signal_exit_emitter__=new $e,te.count=0,te.emitted={}),te.infinite||(te.setMaxListeners(1/0),te.infinite=!0),Ae.exports=function(e,t){if(!ve(oe.process))return function(){};Un.equal(typeof e,"function","a callback must be provided for exit handler"),Pe===!1&&or();var n="exit";t&&t.alwaysLast&&(n="afterexit");var c=function(){te.removeListener(n,e),te.listeners("exit").length===0&&te.listeners("afterexit").length===0&&_t()};return te.on(n,e),c};var _t=function(){!Pe||!ve(oe.process)||(Pe=!1,De.forEach(function(t){try{z.removeListener(t,vt[t])}catch{}}),z.emit=wt,z.reallyExit=sr,te.count-=1)};Ae.exports.unload=_t;var Re=function(t,n,c){te.emitted[t]||(te.emitted[t]=!0,te.emit(t,n,c))},vt={};De.forEach(function(e){vt[e]=function(){if(ve(oe.process)){var n=z.listeners(e);n.length===te.count&&(_t(),Re("exit",null,e),Re("afterexit",null,e),qn&&e==="SIGHUP"&&(e="SIGINT"),z.kill(z.pid,e))}}}),Ae.exports.signals=function(){return De};var Pe=!1,or=function(){Pe||!ve(oe.process)||(Pe=!0,te.count+=1,De=De.filter(function(t){try{return z.on(t,vt[t]),!0}catch{return!1}}),z.emit=Wn,z.reallyExit=$n)};Ae.exports.load=or;var sr=z.reallyExit,$n=function(t){ve(oe.process)&&(z.exitCode=t||0,Re("exit",z.exitCode,null),Re("afterexit",z.exitCode,null),sr.call(z,z.exitCode))},wt=z.emit,Wn=function(t,n){if(t==="exit"&&ve(oe.process)){n!==void 0&&(z.exitCode=n);var c=wt.apply(this,arguments);return Re("exit",z.exitCode,null),Re("afterexit",z.exitCode,null),c}else return wt.apply(this,arguments)}}var Gn=Ae.exports;const Hn=In,Yn=Gn;var Vn=Hn(()=>{Yn(()=>{process.stderr.write("\x1B[?25h")},{alwaysLast:!0})});(function(e){const t=Vn;let n=!1;e.show=(c=process.stderr)=>{c.isTTY&&(n=!1,c.write("\x1B[?25h"))},e.hide=(c=process.stderr)=>{c.isTTY&&(t(),n=!0,c.write("\x1B[?25l"))},e.toggle=(c,o)=>{c!==void 0&&(n=c),n?e.show(o):e.hide(o)}})(Fr);const Kn={interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},zn={interval:80,frames:["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},Xn={interval:80,frames:["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},Jn={interval:80,frames:["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},Zn={interval:80,frames:["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},Qn={interval:80,frames:["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},ei={interval:80,frames:["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},ti={interval:80,frames:["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},ri={interval:80,frames:["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},ni={interval:80,frames:["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},ii={interval:100,frames:["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},oi={interval:80,frames:["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},si={interval:80,frames:["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},ai={interval:130,frames:["-","\\","|","/"]},li={interval:100,frames:["⠂","-","–","—","–","-"]},fi={interval:100,frames:["┤","┘","┴","└","├","┌","┬","┐"]},ui={interval:400,frames:[". ",".. ","..."," "]},ci={interval:200,frames:[". ",".. ","..."," .."," ."," "]},hi={interval:70,frames:["✶","✸","✹","✺","✹","✷"]},di={interval:80,frames:["+","x","*"]},pi={interval:70,frames:["_","_","_","-","`","`","'","´","-","_","_","_"]},gi={interval:100,frames:["☱","☲","☴"]},yi={interval:120,frames:["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},_i={interval:120,frames:["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},vi={interval:140,frames:[" ",".","o","O","@","*"," "]},wi={interval:120,frames:[".","o","O","°","O","o","."]},bi={interval:100,frames:["▓","▒","░"]},xi={interval:120,frames:["⠁","⠂","⠄","⠂"]},mi={interval:120,frames:["▖","▘","▝","▗"]},Ei={interval:100,frames:["▌","▀","▐","▄"]},Si={interval:50,frames:["◢","◣","◤","◥"]},Ri={interval:100,frames:["◜","◠","◝","◞","◡","◟"]},Ci={interval:120,frames:["◡","⊙","◠"]},Ai={interval:180,frames:["◰","◳","◲","◱"]},Bi={interval:120,frames:["◴","◷","◶","◵"]},Ti={interval:50,frames:["◐","◓","◑","◒"]},Fi={interval:100,frames:["╫","╪"]},Li={interval:250,frames:["⊶","⊷"]},Ii={interval:80,frames:["▫","▪"]},Mi={interval:120,frames:["□","■"]},Oi={interval:100,frames:["■","□","▪","▫"]},ki={interval:100,frames:["▮","▯"]},Di={interval:300,frames:["ဝ","၀"]},Pi={interval:80,frames:["⦾","⦿"]},ji={interval:100,frames:["◍","◌"]},Ni={interval:100,frames:["◉","◎"]},Ui={interval:100,frames:["㊂","㊀","㊁"]},qi={interval:50,frames:["⧇","⧆"]},$i={interval:120,frames:["☗","☖"]},Wi={interval:80,frames:["=","*","-"]},Gi={interval:100,frames:["←","↖","↑","↗","→","↘","↓","↙"]},Hi={interval:80,frames:["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},Yi={interval:120,frames:["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},Vi={interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},Ki={interval:80,frames:["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},zi={interval:200,frames:["😄 ","😝 "]},Xi={interval:300,frames:["🙈 ","🙈 ","🙉 ","🙊 "]},Ji={interval:100,frames:["💛 ","💙 ","💜 ","💚 ","❤️ "]},Zi={interval:100,frames:["🕛 ","🕐 ","🕑 ","🕒 ","🕓 ","🕔 ","🕕 ","🕖 ","🕗 ","🕘 ","🕙 ","🕚 "]},Qi={interval:180,frames:["🌍 ","🌎 ","🌏 "]},eo={interval:17,frames:["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},to={interval:80,frames:["🌑 ","🌒 ","🌓 ","🌔 ","🌕 ","🌖 ","🌗 ","🌘 "]},ro={interval:140,frames:["🚶 ","🏃 "]},no={interval:80,frames:["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},io={interval:120,frames:["▐|\\____________▌","▐_|\\___________▌","▐__|\\__________▌","▐___|\\_________▌","▐____|\\________▌","▐_____|\\_______▌","▐______|\\______▌","▐_______|\\_____▌","▐________|\\____▌","▐_________|\\___▌","▐__________|\\__▌","▐___________|\\_▌","▐____________|\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},oo={interval:100,frames:["d","q","p","b"]},so={interval:100,frames:["☀️ ","☀️ ","☀️ ","🌤 ","⛅️ ","🌥 ","☁️ ","🌧 ","🌨 ","🌧 ","🌨 ","🌧 ","🌨 ","⛈ ","🌨 ","🌧 ","🌨 ","☁️ ","🌥 ","⛅️ ","🌤 ","☀️ ","☀️ "]},ao={interval:400,frames:["🌲","🎄"]},lo={interval:80,frames:["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},fo={interval:125,frames:["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},uo={interval:150,frames:["-","=","≡"]},co={interval:80,frames:["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},ho={interval:160,frames:["🤘 ","🤟 ","🖖 ","✋ ","🤚 ","👆 "]},po={interval:80,frames:["🤜    🤛 ","🤜    🤛 ","🤜    🤛 "," 🤜  🤛  ","  🤜🤛   "," 🤜✨🤛   ","🤜 ✨ 🤛  "]},go={interval:80,frames:[" 🧑⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 "]},yo={interval:160,frames:["😐 ","😐 ","😮 ","😮 ","😦 ","😦 ","😧 ","😧 ","🤯 ","💥 ","✨ ","  ","  ","  "]},_o={interval:160,frames:["🔈 ","🔉 ","🔊 ","🔉 "]},vo={interval:100,frames:["🔸 ","🔶 ","🟠 ","🟠 ","🔶 "]},wo={interval:100,frames:["🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},bo={interval:100,frames:["🔸 ","🔶 ","🟠 ","🟠 ","🔶 ","🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},xo={interval:100,frames:["🕛 ","🕚 ","🕙 ","🕘 ","🕗 ","🕖 ","🕕 ","🕔 ","🕓 ","🕒 ","🕑 ","🕐 "]},mo={interval:80,frames:["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]},Eo={dots:Kn,dots2:zn,dots3:Xn,dots4:Jn,dots5:Zn,dots6:Qn,dots7:ei,dots8:ti,dots9:ri,dots10:ni,dots11:ii,dots12:oi,dots8Bit:si,line:ai,line2:li,pipe:fi,simpleDots:ui,simpleDotsScrolling:ci,star:hi,star2:di,flip:pi,hamburger:gi,growVertical:yi,growHorizontal:_i,balloon:vi,balloon2:wi,noise:bi,bounce:xi,boxBounce:mi,boxBounce2:Ei,triangle:Si,arc:Ri,circle:Ci,squareCorners:Ai,circleQuarters:Bi,circleHalves:Ti,squish:Fi,toggle:Li,toggle2:Ii,toggle3:Mi,toggle4:Oi,toggle5:ki,toggle6:Di,toggle7:Pi,toggle8:ji,toggle9:Ni,toggle10:Ui,toggle11:qi,toggle12:$i,toggle13:Wi,arrow:Gi,arrow2:Hi,arrow3:Yi,bouncingBar:Vi,bouncingBall:Ki,smiley:zi,monkey:Xi,hearts:Ji,clock:Zi,earth:Qi,material:eo,moon:to,runner:ro,pong:no,shark:io,dqpb:oo,weather:so,christmas:ao,grenade:lo,point:fo,layer:uo,betaWave:co,fingerDance:ho,fistBump:po,soccerHeader:go,mindblown:yo,speaker:_o,orangePulse:vo,bluePulse:wo,orangeBluePulse:bo,timeTravel:xo,aesthetic:mo},Ze=Object.assign({},Eo),ar=Object.keys(Ze);Object.defineProperty(Ze,"random",{get(){const e=Math.floor(Math.random()*ar.length),t=ar[e];return Ze[t]}});var So=Ze,Ro={info:"ℹ️",success:"✅",warning:"⚠️",error:"❌️"},Co=({onlyFirst:e=!1}={})=>{const t=["[\\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(t,e?void 0:"g")};const Ao=Co;var Bo=e=>typeof e=="string"?e.replace(Ao(),""):e,Gt={exports:{}},qr={exports:{}};(function(e){var t=function(){function n(f,p,y,_){typeof p=="object"&&(y=p.depth,_=p.prototype,p.filter,p=p.circular);var m=[],R=[],B=typeof Buffer<"u";typeof p>"u"&&(p=!0),typeof y>"u"&&(y=1/0);function F(S,v){if(S===null)return null;if(v==0)return S;var E,T;if(typeof S!="object")return S;if(n.__isArray(S))E=[];else if(n.__isRegExp(S))E=new RegExp(S.source,s(S)),S.lastIndex&&(E.lastIndex=S.lastIndex);else if(n.__isDate(S))E=new Date(S.getTime());else{if(B&&Buffer.isBuffer(S))return Buffer.allocUnsafe?E=Buffer.allocUnsafe(S.length):E=new Buffer(S.length),S.copy(E),E;typeof _>"u"?(T=Object.getPrototypeOf(S),E=Object.create(T)):(E=Object.create(_),T=_)}if(p){var M=m.indexOf(S);if(M!=-1)return R[M];m.push(S),R.push(E)}for(var O in S){var D;T&&(D=Object.getOwnPropertyDescriptor(T,O)),!(D&&D.set==null)&&(E[O]=F(S[O],v-1))}return E}return F(f,y)}n.clonePrototype=function(p){if(p===null)return null;var y=function(){};return y.prototype=p,new y};function c(f){return Object.prototype.toString.call(f)}n.__objToStr=c;function o(f){return typeof f=="object"&&c(f)==="[object Date]"}n.__isDate=o;function l(f){return typeof f=="object"&&c(f)==="[object Array]"}n.__isArray=l;function a(f){return typeof f=="object"&&c(f)==="[object RegExp]"}n.__isRegExp=a;function s(f){var p="";return f.global&&(p+="g"),f.ignoreCase&&(p+="i"),f.multiline&&(p+="m"),p}return n.__getRegExpFlags=s,n}();e.exports&&(e.exports=t)})(qr);var To=qr.exports,Fo=To,Lo=function(e,t){return e=e||{},Object.keys(t).forEach(function(n){typeof e[n]>"u"&&(e[n]=Fo(t[n]))}),e},Io=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],Mo=Lo,je=Io,$r={nul:0,control:0};Gt.exports=function(t){return Wr(t,$r)};Gt.exports.config=function(e){return e=Mo(e||{},$r),function(n){return Wr(n,e)}};function Wr(e,t){if(typeof e!="string")return lr(e,t);for(var n=0,c=0;c<e.length;c++){var o=lr(e.charCodeAt(c),t);if(o<0)return-1;n+=o}return n}function lr(e,t){return e===0?t.nul:e<32||e>=127&&e<160?t.control:Oo(e)?0:1+(e>=4352&&(e<=4447||e==9001||e==9002||e>=11904&&e<=42191&&e!=12351||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65135||e>=65280&&e<=65376||e>=65504&&e<=65510||e>=131072&&e<=196605||e>=196608&&e<=262141))}function Oo(e){var t=0,n=je.length-1,c;if(e<je[0][0]||e>je[n][1])return!1;for(;n>=t;)if(c=Math.floor((t+n)/2),e>je[c][1])t=c+1;else if(e<je[c][0])n=c-1;else return!0;return!1}var ko=Gt.exports,Do=({stream:e=process.stdout}={})=>!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env)),ot={exports:{}},kt={exports:{}},Gr=Wt.EventEmitter,Le={},st={};st.byteLength=No;st.toByteArray=qo;st.fromByteArray=Go;var ce=[],se=[],Po=typeof Uint8Array<"u"?Uint8Array:Array,bt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Ce=0,jo=bt.length;Ce<jo;++Ce)ce[Ce]=bt[Ce],se[bt.charCodeAt(Ce)]=Ce;se[45]=62;se[95]=63;function Hr(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var c=n===t?0:4-n%4;return[n,c]}function No(e){var t=Hr(e),n=t[0],c=t[1];return(n+c)*3/4-c}function Uo(e,t,n){return(t+n)*3/4-n}function qo(e){var t,n=Hr(e),c=n[0],o=n[1],l=new Po(Uo(e,c,o)),a=0,s=o>0?c-4:c,f;for(f=0;f<s;f+=4)t=se[e.charCodeAt(f)]<<18|se[e.charCodeAt(f+1)]<<12|se[e.charCodeAt(f+2)]<<6|se[e.charCodeAt(f+3)],l[a++]=t>>16&255,l[a++]=t>>8&255,l[a++]=t&255;return o===2&&(t=se[e.charCodeAt(f)]<<2|se[e.charCodeAt(f+1)]>>4,l[a++]=t&255),o===1&&(t=se[e.charCodeAt(f)]<<10|se[e.charCodeAt(f+1)]<<4|se[e.charCodeAt(f+2)]>>2,l[a++]=t>>8&255,l[a++]=t&255),l}function $o(e){return ce[e>>18&63]+ce[e>>12&63]+ce[e>>6&63]+ce[e&63]}function Wo(e,t,n){for(var c,o=[],l=t;l<n;l+=3)c=(e[l]<<16&16711680)+(e[l+1]<<8&65280)+(e[l+2]&255),o.push($o(c));return o.join("")}function Go(e){for(var t,n=e.length,c=n%3,o=[],l=16383,a=0,s=n-c;a<s;a+=l)o.push(Wo(e,a,a+l>s?s:a+l));return c===1?(t=e[n-1],o.push(ce[t>>2]+ce[t<<4&63]+"==")):c===2&&(t=(e[n-2]<<8)+e[n-1],o.push(ce[t>>10]+ce[t>>4&63]+ce[t<<2&63]+"=")),o.join("")}var Ht={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ht.read=function(e,t,n,c,o){var l,a,s=o*8-c-1,f=(1<<s)-1,p=f>>1,y=-7,_=n?o-1:0,m=n?-1:1,R=e[t+_];for(_+=m,l=R&(1<<-y)-1,R>>=-y,y+=s;y>0;l=l*256+e[t+_],_+=m,y-=8);for(a=l&(1<<-y)-1,l>>=-y,y+=c;y>0;a=a*256+e[t+_],_+=m,y-=8);if(l===0)l=1-p;else{if(l===f)return a?NaN:(R?-1:1)*(1/0);a=a+Math.pow(2,c),l=l-p}return(R?-1:1)*a*Math.pow(2,l-c)};Ht.write=function(e,t,n,c,o,l){var a,s,f,p=l*8-o-1,y=(1<<p)-1,_=y>>1,m=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,R=c?0:l-1,B=c?1:-1,F=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=y):(a=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-a))<1&&(a--,f*=2),a+_>=1?t+=m/f:t+=m*Math.pow(2,1-_),t*f>=2&&(a++,f/=2),a+_>=y?(s=0,a=y):a+_>=1?(s=(t*f-1)*Math.pow(2,o),a=a+_):(s=t*Math.pow(2,_-1)*Math.pow(2,o),a=0));o>=8;e[n+R]=s&255,R+=B,s/=256,o-=8);for(a=a<<o|s,p+=o;p>0;e[n+R]=a&255,R+=B,a/=256,p-=8);e[n+R-B]|=F*128};/*!
8
+ * The buffer module from node.js, for the browser.
9
+ *
10
+ * @author Feross Aboukhadijeh <https://feross.org>
11
+ * @license MIT
12
+ */(function(e){var t=st,n=Ht,c=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=E,e.INSPECT_MAX_BYTES=50;var o=2147483647;e.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=l(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{var u=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(u,r),u.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function a(u){if(u>o)throw new RangeError('The value "'+u+'" is invalid for option "size"');var r=new Uint8Array(u);return Object.setPrototypeOf(r,s.prototype),r}function s(u,r,i){if(typeof u=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(u)}return f(u,r,i)}s.poolSize=8192;function f(u,r,i){if(typeof u=="string")return m(u,r);if(ArrayBuffer.isView(u))return B(u);if(u==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u);if(C(u,ArrayBuffer)||u&&C(u.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(C(u,SharedArrayBuffer)||u&&C(u.buffer,SharedArrayBuffer)))return F(u,r,i);if(typeof u=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var g=u.valueOf&&u.valueOf();if(g!=null&&g!==u)return s.from(g,r,i);var w=S(u);if(w)return w;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof u[Symbol.toPrimitive]=="function")return s.from(u[Symbol.toPrimitive]("string"),r,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u)}s.from=function(u,r,i){return f(u,r,i)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function p(u){if(typeof u!="number")throw new TypeError('"size" argument must be of type number');if(u<0)throw new RangeError('The value "'+u+'" is invalid for option "size"')}function y(u,r,i){return p(u),u<=0?a(u):r!==void 0?typeof i=="string"?a(u).fill(r,i):a(u).fill(r):a(u)}s.alloc=function(u,r,i){return y(u,r,i)};function _(u){return p(u),a(u<0?0:v(u)|0)}s.allocUnsafe=function(u){return _(u)},s.allocUnsafeSlow=function(u){return _(u)};function m(u,r){if((typeof r!="string"||r==="")&&(r="utf8"),!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var i=T(u,r)|0,g=a(i),w=g.write(u,r);return w!==i&&(g=g.slice(0,w)),g}function R(u){for(var r=u.length<0?0:v(u.length)|0,i=a(r),g=0;g<r;g+=1)i[g]=u[g]&255;return i}function B(u){if(C(u,Uint8Array)){var r=new Uint8Array(u);return F(r.buffer,r.byteOffset,r.byteLength)}return R(u)}function F(u,r,i){if(r<0||u.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(u.byteLength<r+(i||0))throw new RangeError('"length" is outside of buffer bounds');var g;return r===void 0&&i===void 0?g=new Uint8Array(u):i===void 0?g=new Uint8Array(u,r):g=new Uint8Array(u,r,i),Object.setPrototypeOf(g,s.prototype),g}function S(u){if(s.isBuffer(u)){var r=v(u.length)|0,i=a(r);return i.length===0||u.copy(i,0,0,r),i}if(u.length!==void 0)return typeof u.length!="number"||k(u.length)?a(0):R(u);if(u.type==="Buffer"&&Array.isArray(u.data))return R(u.data)}function v(u){if(u>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return u|0}function E(u){return+u!=u&&(u=0),s.alloc(+u)}s.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==s.prototype},s.compare=function(r,i){if(C(r,Uint8Array)&&(r=s.from(r,r.offset,r.byteLength)),C(i,Uint8Array)&&(i=s.from(i,i.offset,i.byteLength)),!s.isBuffer(r)||!s.isBuffer(i))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===i)return 0;for(var g=r.length,w=i.length,A=0,L=Math.min(g,w);A<L;++A)if(r[A]!==i[A]){g=r[A],w=i[A];break}return g<w?-1:w<g?1:0},s.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(r,i){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return s.alloc(0);var g;if(i===void 0)for(i=0,g=0;g<r.length;++g)i+=r[g].length;var w=s.allocUnsafe(i),A=0;for(g=0;g<r.length;++g){var L=r[g];if(C(L,Uint8Array))A+L.length>w.length?s.from(L).copy(w,A):Uint8Array.prototype.set.call(w,L,A);else if(s.isBuffer(L))L.copy(w,A);else throw new TypeError('"list" argument must be an Array of Buffers');A+=L.length}return w};function T(u,r){if(s.isBuffer(u))return u.length;if(ArrayBuffer.isView(u)||C(u,ArrayBuffer))return u.byteLength;if(typeof u!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof u);var i=u.length,g=arguments.length>2&&arguments[2]===!0;if(!g&&i===0)return 0;for(var w=!1;;)switch(r){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return I(u).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return i*2;case"hex":return i>>>1;case"base64":return h(u).length;default:if(w)return g?-1:I(u).length;r=(""+r).toLowerCase(),w=!0}}s.byteLength=T;function M(u,r,i){var g=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((i===void 0||i>this.length)&&(i=this.length),i<=0)||(i>>>=0,r>>>=0,i<=r))return"";for(u||(u="utf8");;)switch(u){case"hex":return ye(this,r,i);case"utf8":case"utf-8":return be(this,r,i);case"ascii":return de(this,r,i);case"latin1":case"binary":return xe(this,r,i);case"base64":return ge(this,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,r,i);default:if(g)throw new TypeError("Unknown encoding: "+u);u=(u+"").toLowerCase(),g=!0}}s.prototype._isBuffer=!0;function O(u,r,i){var g=u[r];u[r]=u[i],u[i]=g}s.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<r;i+=2)O(this,i,i+1);return this},s.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<r;i+=4)O(this,i,i+3),O(this,i+1,i+2);return this},s.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<r;i+=8)O(this,i,i+7),O(this,i+1,i+6),O(this,i+2,i+5),O(this,i+3,i+4);return this},s.prototype.toString=function(){var r=this.length;return r===0?"":arguments.length===0?be(this,0,r):M.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(r){if(!s.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:s.compare(this,r)===0},s.prototype.inspect=function(){var r="",i=e.INSPECT_MAX_BYTES;return r=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(r+=" ... "),"<Buffer "+r+">"},c&&(s.prototype[c]=s.prototype.inspect),s.prototype.compare=function(r,i,g,w,A){if(C(r,Uint8Array)&&(r=s.from(r,r.offset,r.byteLength)),!s.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(i===void 0&&(i=0),g===void 0&&(g=r?r.length:0),w===void 0&&(w=0),A===void 0&&(A=this.length),i<0||g>r.length||w<0||A>this.length)throw new RangeError("out of range index");if(w>=A&&i>=g)return 0;if(w>=A)return-1;if(i>=g)return 1;if(i>>>=0,g>>>=0,w>>>=0,A>>>=0,this===r)return 0;for(var L=A-w,q=g-i,W=Math.min(L,q),H=this.slice(w,A),J=r.slice(i,g),G=0;G<W;++G)if(H[G]!==J[G]){L=H[G],q=J[G];break}return L<q?-1:q<L?1:0};function D(u,r,i,g,w){if(u.length===0)return-1;if(typeof i=="string"?(g=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,k(i)&&(i=w?0:u.length-1),i<0&&(i=u.length+i),i>=u.length){if(w)return-1;i=u.length-1}else if(i<0)if(w)i=0;else return-1;if(typeof r=="string"&&(r=s.from(r,g)),s.isBuffer(r))return r.length===0?-1:$(u,r,i,g,w);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?w?Uint8Array.prototype.indexOf.call(u,r,i):Uint8Array.prototype.lastIndexOf.call(u,r,i):$(u,[r],i,g,w);throw new TypeError("val must be string, number or Buffer")}function $(u,r,i,g,w){var A=1,L=u.length,q=r.length;if(g!==void 0&&(g=String(g).toLowerCase(),g==="ucs2"||g==="ucs-2"||g==="utf16le"||g==="utf-16le")){if(u.length<2||r.length<2)return-1;A=2,L/=2,q/=2,i/=2}function W(Kt,zt){return A===1?Kt[zt]:Kt.readUInt16BE(zt*A)}var H;if(w){var J=-1;for(H=i;H<L;H++)if(W(u,H)===W(r,J===-1?0:H-J)){if(J===-1&&(J=H),H-J+1===q)return J*A}else J!==-1&&(H-=H-J),J=-1}else for(i+q>L&&(i=L-q),H=i;H>=0;H--){for(var G=!0,le=0;le<q;le++)if(W(u,H+le)!==W(r,le)){G=!1;break}if(G)return H}return-1}s.prototype.includes=function(r,i,g){return this.indexOf(r,i,g)!==-1},s.prototype.indexOf=function(r,i,g){return D(this,r,i,g,!0)},s.prototype.lastIndexOf=function(r,i,g){return D(this,r,i,g,!1)};function N(u,r,i,g){i=Number(i)||0;var w=u.length-i;g?(g=Number(g),g>w&&(g=w)):g=w;var A=r.length;g>A/2&&(g=A/2);for(var L=0;L<g;++L){var q=parseInt(r.substr(L*2,2),16);if(k(q))return L;u[i+L]=q}return L}function P(u,r,i,g){return d(I(r,u.length-i),u,i,g)}function ne(u,r,i,g){return d(j(r),u,i,g)}function he(u,r,i,g){return d(h(r),u,i,g)}function Me(u,r,i,g){return d(U(r,u.length-i),u,i,g)}s.prototype.write=function(r,i,g,w){if(i===void 0)w="utf8",g=this.length,i=0;else if(g===void 0&&typeof i=="string")w=i,g=this.length,i=0;else if(isFinite(i))i=i>>>0,isFinite(g)?(g=g>>>0,w===void 0&&(w="utf8")):(w=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var A=this.length-i;if((g===void 0||g>A)&&(g=A),r.length>0&&(g<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");w||(w="utf8");for(var L=!1;;)switch(w){case"hex":return N(this,r,i,g);case"utf8":case"utf-8":return P(this,r,i,g);case"ascii":case"latin1":case"binary":return ne(this,r,i,g);case"base64":return he(this,r,i,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Me(this,r,i,g);default:if(L)throw new TypeError("Unknown encoding: "+w);w=(""+w).toLowerCase(),L=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ge(u,r,i){return r===0&&i===u.length?t.fromByteArray(u):t.fromByteArray(u.slice(r,i))}function be(u,r,i){i=Math.min(u.length,i);for(var g=[],w=r;w<i;){var A=u[w],L=null,q=A>239?4:A>223?3:A>191?2:1;if(w+q<=i){var W,H,J,G;switch(q){case 1:A<128&&(L=A);break;case 2:W=u[w+1],(W&192)===128&&(G=(A&31)<<6|W&63,G>127&&(L=G));break;case 3:W=u[w+1],H=u[w+2],(W&192)===128&&(H&192)===128&&(G=(A&15)<<12|(W&63)<<6|H&63,G>2047&&(G<55296||G>57343)&&(L=G));break;case 4:W=u[w+1],H=u[w+2],J=u[w+3],(W&192)===128&&(H&192)===128&&(J&192)===128&&(G=(A&15)<<18|(W&63)<<12|(H&63)<<6|J&63,G>65535&&G<1114112&&(L=G))}}L===null?(L=65533,q=1):L>65535&&(L-=65536,g.push(L>>>10&1023|55296),L=56320|L&1023),g.push(L),w+=q}return Oe(g)}var _e=4096;function Oe(u){var r=u.length;if(r<=_e)return String.fromCharCode.apply(String,u);for(var i="",g=0;g<r;)i+=String.fromCharCode.apply(String,u.slice(g,g+=_e));return i}function de(u,r,i){var g="";i=Math.min(u.length,i);for(var w=r;w<i;++w)g+=String.fromCharCode(u[w]&127);return g}function xe(u,r,i){var g="";i=Math.min(u.length,i);for(var w=r;w<i;++w)g+=String.fromCharCode(u[w]);return g}function ye(u,r,i){var g=u.length;(!r||r<0)&&(r=0),(!i||i<0||i>g)&&(i=g);for(var w="",A=r;A<i;++A)w+=K[u[A]];return w}function me(u,r,i){for(var g=u.slice(r,i),w="",A=0;A<g.length-1;A+=2)w+=String.fromCharCode(g[A]+g[A+1]*256);return w}s.prototype.slice=function(r,i){var g=this.length;r=~~r,i=i===void 0?g:~~i,r<0?(r+=g,r<0&&(r=0)):r>g&&(r=g),i<0?(i+=g,i<0&&(i=0)):i>g&&(i=g),i<r&&(i=r);var w=this.subarray(r,i);return Object.setPrototypeOf(w,s.prototype),w};function X(u,r,i){if(u%1!==0||u<0)throw new RangeError("offset is not uint");if(u+r>i)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(r,i,g){r=r>>>0,i=i>>>0,g||X(r,i,this.length);for(var w=this[r],A=1,L=0;++L<i&&(A*=256);)w+=this[r+L]*A;return w},s.prototype.readUintBE=s.prototype.readUIntBE=function(r,i,g){r=r>>>0,i=i>>>0,g||X(r,i,this.length);for(var w=this[r+--i],A=1;i>0&&(A*=256);)w+=this[r+--i]*A;return w},s.prototype.readUint8=s.prototype.readUInt8=function(r,i){return r=r>>>0,i||X(r,1,this.length),this[r]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(r,i){return r=r>>>0,i||X(r,2,this.length),this[r]|this[r+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(r,i){return r=r>>>0,i||X(r,2,this.length),this[r]<<8|this[r+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(r,i){return r=r>>>0,i||X(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(r,i){return r=r>>>0,i||X(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])},s.prototype.readIntLE=function(r,i,g){r=r>>>0,i=i>>>0,g||X(r,i,this.length);for(var w=this[r],A=1,L=0;++L<i&&(A*=256);)w+=this[r+L]*A;return A*=128,w>=A&&(w-=Math.pow(2,8*i)),w},s.prototype.readIntBE=function(r,i,g){r=r>>>0,i=i>>>0,g||X(r,i,this.length);for(var w=i,A=1,L=this[r+--w];w>0&&(A*=256);)L+=this[r+--w]*A;return A*=128,L>=A&&(L-=Math.pow(2,8*i)),L},s.prototype.readInt8=function(r,i){return r=r>>>0,i||X(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]},s.prototype.readInt16LE=function(r,i){r=r>>>0,i||X(r,2,this.length);var g=this[r]|this[r+1]<<8;return g&32768?g|4294901760:g},s.prototype.readInt16BE=function(r,i){r=r>>>0,i||X(r,2,this.length);var g=this[r+1]|this[r]<<8;return g&32768?g|4294901760:g},s.prototype.readInt32LE=function(r,i){return r=r>>>0,i||X(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},s.prototype.readInt32BE=function(r,i){return r=r>>>0,i||X(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},s.prototype.readFloatLE=function(r,i){return r=r>>>0,i||X(r,4,this.length),n.read(this,r,!0,23,4)},s.prototype.readFloatBE=function(r,i){return r=r>>>0,i||X(r,4,this.length),n.read(this,r,!1,23,4)},s.prototype.readDoubleLE=function(r,i){return r=r>>>0,i||X(r,8,this.length),n.read(this,r,!0,52,8)},s.prototype.readDoubleBE=function(r,i){return r=r>>>0,i||X(r,8,this.length),n.read(this,r,!1,52,8)};function Z(u,r,i,g,w,A){if(!s.isBuffer(u))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>w||r<A)throw new RangeError('"value" argument is out of bounds');if(i+g>u.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(r,i,g,w){if(r=+r,i=i>>>0,g=g>>>0,!w){var A=Math.pow(2,8*g)-1;Z(this,r,i,g,A,0)}var L=1,q=0;for(this[i]=r&255;++q<g&&(L*=256);)this[i+q]=r/L&255;return i+g},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(r,i,g,w){if(r=+r,i=i>>>0,g=g>>>0,!w){var A=Math.pow(2,8*g)-1;Z(this,r,i,g,A,0)}var L=g-1,q=1;for(this[i+L]=r&255;--L>=0&&(q*=256);)this[i+L]=r/q&255;return i+g},s.prototype.writeUint8=s.prototype.writeUInt8=function(r,i,g){return r=+r,i=i>>>0,g||Z(this,r,i,1,255,0),this[i]=r&255,i+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(r,i,g){return r=+r,i=i>>>0,g||Z(this,r,i,2,65535,0),this[i]=r&255,this[i+1]=r>>>8,i+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(r,i,g){return r=+r,i=i>>>0,g||Z(this,r,i,2,65535,0),this[i]=r>>>8,this[i+1]=r&255,i+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(r,i,g){return r=+r,i=i>>>0,g||Z(this,r,i,4,4294967295,0),this[i+3]=r>>>24,this[i+2]=r>>>16,this[i+1]=r>>>8,this[i]=r&255,i+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(r,i,g){return r=+r,i=i>>>0,g||Z(this,r,i,4,4294967295,0),this[i]=r>>>24,this[i+1]=r>>>16,this[i+2]=r>>>8,this[i+3]=r&255,i+4},s.prototype.writeIntLE=function(r,i,g,w){if(r=+r,i=i>>>0,!w){var A=Math.pow(2,8*g-1);Z(this,r,i,g,A-1,-A)}var L=0,q=1,W=0;for(this[i]=r&255;++L<g&&(q*=256);)r<0&&W===0&&this[i+L-1]!==0&&(W=1),this[i+L]=(r/q>>0)-W&255;return i+g},s.prototype.writeIntBE=function(r,i,g,w){if(r=+r,i=i>>>0,!w){var A=Math.pow(2,8*g-1);Z(this,r,i,g,A-1,-A)}var L=g-1,q=1,W=0;for(this[i+L]=r&255;--L>=0&&(q*=256);)r<0&&W===0&&this[i+L+1]!==0&&(W=1),this[i+L]=(r/q>>0)-W&255;return i+g},s.prototype.writeInt8=function(r,i,g){return r=+r,i=i>>>0,g||Z(this,r,i,1,127,-128),r<0&&(r=255+r+1),this[i]=r&255,i+1},s.prototype.writeInt16LE=function(r,i,g){return r=+r,i=i>>>0,g||Z(this,r,i,2,32767,-32768),this[i]=r&255,this[i+1]=r>>>8,i+2},s.prototype.writeInt16BE=function(r,i,g){return r=+r,i=i>>>0,g||Z(this,r,i,2,32767,-32768),this[i]=r>>>8,this[i+1]=r&255,i+2},s.prototype.writeInt32LE=function(r,i,g){return r=+r,i=i>>>0,g||Z(this,r,i,4,2147483647,-2147483648),this[i]=r&255,this[i+1]=r>>>8,this[i+2]=r>>>16,this[i+3]=r>>>24,i+4},s.prototype.writeInt32BE=function(r,i,g){return r=+r,i=i>>>0,g||Z(this,r,i,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[i]=r>>>24,this[i+1]=r>>>16,this[i+2]=r>>>8,this[i+3]=r&255,i+4};function ue(u,r,i,g,w,A){if(i+g>u.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function Ee(u,r,i,g,w){return r=+r,i=i>>>0,w||ue(u,r,i,4),n.write(u,r,i,g,23,4),i+4}s.prototype.writeFloatLE=function(r,i,g){return Ee(this,r,i,!0,g)},s.prototype.writeFloatBE=function(r,i,g){return Ee(this,r,i,!1,g)};function Se(u,r,i,g,w){return r=+r,i=i>>>0,w||ue(u,r,i,8),n.write(u,r,i,g,52,8),i+8}s.prototype.writeDoubleLE=function(r,i,g){return Se(this,r,i,!0,g)},s.prototype.writeDoubleBE=function(r,i,g){return Se(this,r,i,!1,g)},s.prototype.copy=function(r,i,g,w){if(!s.isBuffer(r))throw new TypeError("argument should be a Buffer");if(g||(g=0),!w&&w!==0&&(w=this.length),i>=r.length&&(i=r.length),i||(i=0),w>0&&w<g&&(w=g),w===g||r.length===0||this.length===0)return 0;if(i<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=this.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("sourceEnd out of bounds");w>this.length&&(w=this.length),r.length-i<w-g&&(w=r.length-i+g);var A=w-g;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(i,g,w):Uint8Array.prototype.set.call(r,this.subarray(g,w),i),A},s.prototype.fill=function(r,i,g,w){if(typeof r=="string"){if(typeof i=="string"?(w=i,i=0,g=this.length):typeof g=="string"&&(w=g,g=this.length),w!==void 0&&typeof w!="string")throw new TypeError("encoding must be a string");if(typeof w=="string"&&!s.isEncoding(w))throw new TypeError("Unknown encoding: "+w);if(r.length===1){var A=r.charCodeAt(0);(w==="utf8"&&A<128||w==="latin1")&&(r=A)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(i<0||this.length<i||this.length<g)throw new RangeError("Out of range index");if(g<=i)return this;i=i>>>0,g=g===void 0?this.length:g>>>0,r||(r=0);var L;if(typeof r=="number")for(L=i;L<g;++L)this[L]=r;else{var q=s.isBuffer(r)?r:s.from(r,w),W=q.length;if(W===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(L=0;L<g-i;++L)this[L+i]=q[L%W]}return this};var x=/[^+/0-9A-Za-z-_]/g;function b(u){if(u=u.split("=")[0],u=u.trim().replace(x,""),u.length<2)return"";for(;u.length%4!==0;)u=u+"=";return u}function I(u,r){r=r||1/0;for(var i,g=u.length,w=null,A=[],L=0;L<g;++L){if(i=u.charCodeAt(L),i>55295&&i<57344){if(!w){if(i>56319){(r-=3)>-1&&A.push(239,191,189);continue}else if(L+1===g){(r-=3)>-1&&A.push(239,191,189);continue}w=i;continue}if(i<56320){(r-=3)>-1&&A.push(239,191,189),w=i;continue}i=(w-55296<<10|i-56320)+65536}else w&&(r-=3)>-1&&A.push(239,191,189);if(w=null,i<128){if((r-=1)<0)break;A.push(i)}else if(i<2048){if((r-=2)<0)break;A.push(i>>6|192,i&63|128)}else if(i<65536){if((r-=3)<0)break;A.push(i>>12|224,i>>6&63|128,i&63|128)}else if(i<1114112){if((r-=4)<0)break;A.push(i>>18|240,i>>12&63|128,i>>6&63|128,i&63|128)}else throw new Error("Invalid code point")}return A}function j(u){for(var r=[],i=0;i<u.length;++i)r.push(u.charCodeAt(i)&255);return r}function U(u,r){for(var i,g,w,A=[],L=0;L<u.length&&!((r-=2)<0);++L)i=u.charCodeAt(L),g=i>>8,w=i%256,A.push(w),A.push(g);return A}function h(u){return t.toByteArray(b(u))}function d(u,r,i,g){for(var w=0;w<g&&!(w+i>=r.length||w>=u.length);++w)r[w+i]=u[w];return w}function C(u,r){return u instanceof r||u!=null&&u.constructor!=null&&u.constructor.name!=null&&u.constructor.name===r.name}function k(u){return u!==u}var K=function(){for(var u="0123456789abcdef",r=new Array(256),i=0;i<16;++i)for(var g=i*16,w=0;w<16;++w)r[g+w]=u[i]+u[w];return r}()})(Le);var xt,fr;function Ho(){if(fr)return xt;fr=1;function e(B,F){var S=Object.keys(B);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(B);F&&(v=v.filter(function(E){return Object.getOwnPropertyDescriptor(B,E).enumerable})),S.push.apply(S,v)}return S}function t(B){for(var F=1;F<arguments.length;F++){var S=arguments[F]!=null?arguments[F]:{};F%2?e(Object(S),!0).forEach(function(v){n(B,v,S[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(B,Object.getOwnPropertyDescriptors(S)):e(Object(S)).forEach(function(v){Object.defineProperty(B,v,Object.getOwnPropertyDescriptor(S,v))})}return B}function n(B,F,S){return F=a(F),F in B?Object.defineProperty(B,F,{value:S,enumerable:!0,configurable:!0,writable:!0}):B[F]=S,B}function c(B,F){if(!(B instanceof F))throw new TypeError("Cannot call a class as a function")}function o(B,F){for(var S=0;S<F.length;S++){var v=F[S];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(B,a(v.key),v)}}function l(B,F,S){return F&&o(B.prototype,F),Object.defineProperty(B,"prototype",{writable:!1}),B}function a(B){var F=s(B,"string");return typeof F=="symbol"?F:String(F)}function s(B,F){if(typeof B!="object"||B===null)return B;var S=B[Symbol.toPrimitive];if(S!==void 0){var v=S.call(B,F||"default");if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(B)}var f=Le,p=f.Buffer,y=Qe,_=y.inspect,m=_&&_.custom||"inspect";function R(B,F,S){p.prototype.copy.call(B,F,S)}return xt=function(){function B(){c(this,B),this.head=null,this.tail=null,this.length=0}return l(B,[{key:"push",value:function(S){var v={data:S,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(S){var v={data:S,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var S=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,S}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(S){if(this.length===0)return"";for(var v=this.head,E=""+v.data;v=v.next;)E+=S+v.data;return E}},{key:"concat",value:function(S){if(this.length===0)return p.alloc(0);for(var v=p.allocUnsafe(S>>>0),E=this.head,T=0;E;)R(E.data,v,T),T+=E.data.length,E=E.next;return v}},{key:"consume",value:function(S,v){var E;return S<this.head.data.length?(E=this.head.data.slice(0,S),this.head.data=this.head.data.slice(S)):S===this.head.data.length?E=this.shift():E=v?this._getString(S):this._getBuffer(S),E}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(S){var v=this.head,E=1,T=v.data;for(S-=T.length;v=v.next;){var M=v.data,O=S>M.length?M.length:S;if(O===M.length?T+=M:T+=M.slice(0,S),S-=O,S===0){O===M.length?(++E,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=M.slice(O));break}++E}return this.length-=E,T}},{key:"_getBuffer",value:function(S){var v=p.allocUnsafe(S),E=this.head,T=1;for(E.data.copy(v),S-=E.data.length;E=E.next;){var M=E.data,O=S>M.length?M.length:S;if(M.copy(v,v.length-S,0,O),S-=O,S===0){O===M.length?(++T,E.next?this.head=E.next:this.head=this.tail=null):(this.head=E,E.data=M.slice(O));break}++T}return this.length-=T,v}},{key:m,value:function(S,v){return _(this,t(t({},v),{},{depth:0,customInspect:!1}))}}]),B}(),xt}function Yo(e,t){var n=this,c=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return c||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Dt,this,e)):process.nextTick(Dt,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(l){!t&&l?n._writableState?n._writableState.errorEmitted?process.nextTick(ze,n):(n._writableState.errorEmitted=!0,process.nextTick(ur,n,l)):process.nextTick(ur,n,l):t?(process.nextTick(ze,n),t(l)):process.nextTick(ze,n)}),this)}function ur(e,t){Dt(e,t),ze(e)}function ze(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function Vo(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Dt(e,t){e.emit("error",t)}function Ko(e,t){var n=e._readableState,c=e._writableState;n&&n.autoDestroy||c&&c.autoDestroy?e.destroy(t):e.emit("error",t)}var Yr={destroy:Yo,undestroy:Vo,errorOrDestroy:Ko},we={};function zo(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Vr={};function ae(e,t,n){n||(n=Error);function c(l,a,s){return typeof t=="string"?t:t(l,a,s)}var o=function(l){zo(a,l);function a(s,f,p){return l.call(this,c(s,f,p))||this}return a}(n);o.prototype.name=n.name,o.prototype.code=e,Vr[e]=o}function cr(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map(function(c){return String(c)}),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:n===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function Xo(e,t,n){return e.substr(0,t.length)===t}function Jo(e,t,n){return(n===void 0||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}function Zo(e,t,n){return typeof n!="number"&&(n=0),n+t.length>e.length?!1:e.indexOf(t,n)!==-1}ae("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);ae("ERR_INVALID_ARG_TYPE",function(e,t,n){var c;typeof t=="string"&&Xo(t,"not ")?(c="must not be",t=t.replace(/^not /,"")):c="must be";var o;if(Jo(e," argument"))o="The ".concat(e," ").concat(c," ").concat(cr(t,"type"));else{var l=Zo(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(l," ").concat(c," ").concat(cr(t,"type"))}return o+=". Received type ".concat(typeof n),o},TypeError);ae("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");ae("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});ae("ERR_STREAM_PREMATURE_CLOSE","Premature close");ae("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});ae("ERR_MULTIPLE_CALLBACK","Callback called multiple times");ae("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");ae("ERR_STREAM_WRITE_AFTER_END","write after end");ae("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);ae("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);ae("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");we.codes=Vr;var Qo=we.codes.ERR_INVALID_OPT_VALUE;function es(e,t,n){return e.highWaterMark!=null?e.highWaterMark:t?e[n]:null}function ts(e,t,n,c){var o=es(t,c,n);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var l=c?n:"highWaterMark";throw new Qo(l,o)}return Math.floor(o)}return e.objectMode?16:16*1024}var Kr={getHighWaterMark:ts},Pt={exports:{}};typeof Object.create=="function"?Pt.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Pt.exports=function(t,n){if(n){t.super_=n;var c=function(){};c.prototype=n.prototype,t.prototype=new c,t.prototype.constructor=t}};var Ie=Pt.exports,rs=ns;function ns(e,t){if(mt("noDeprecation"))return e;var n=!1;function c(){if(!n){if(mt("throwDeprecation"))throw new Error(t);mt("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}return c}function mt(e){try{if(!oe.localStorage)return!1}catch{return!1}var t=oe.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}var Et,hr;function zr(){if(hr)return Et;hr=1,Et=N;function e(x){var b=this;this.next=null,this.entry=null,this.finish=function(){Se(b,x)}}var t;N.WritableState=D;var n={deprecate:rs},c=Gr,o=Le.Buffer,l=(typeof oe<"u"?oe:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(x){return o.from(x)}function s(x){return o.isBuffer(x)||x instanceof l}var f=Yr,p=Kr,y=p.getHighWaterMark,_=we.codes,m=_.ERR_INVALID_ARG_TYPE,R=_.ERR_METHOD_NOT_IMPLEMENTED,B=_.ERR_MULTIPLE_CALLBACK,F=_.ERR_STREAM_CANNOT_PIPE,S=_.ERR_STREAM_DESTROYED,v=_.ERR_STREAM_NULL_VALUES,E=_.ERR_STREAM_WRITE_AFTER_END,T=_.ERR_UNKNOWN_ENCODING,M=f.errorOrDestroy;Ie(N,c);function O(){}function D(x,b,I){t=t||Te(),x=x||{},typeof I!="boolean"&&(I=b instanceof t),this.objectMode=!!x.objectMode,I&&(this.objectMode=this.objectMode||!!x.writableObjectMode),this.highWaterMark=y(this,x,"writableHighWaterMark",I),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var j=x.decodeStrings===!1;this.decodeStrings=!j,this.defaultEncoding=x.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(U){Oe(b,U)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=x.emitClose!==!1,this.autoDestroy=!!x.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}D.prototype.getBuffer=function(){for(var b=this.bufferedRequest,I=[];b;)I.push(b),b=b.next;return I},function(){try{Object.defineProperty(D.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var $;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?($=Function.prototype[Symbol.hasInstance],Object.defineProperty(N,Symbol.hasInstance,{value:function(b){return $.call(this,b)?!0:this!==N?!1:b&&b._writableState instanceof D}})):$=function(b){return b instanceof this};function N(x){t=t||Te();var b=this instanceof t;if(!b&&!$.call(N,this))return new N(x);this._writableState=new D(x,this,b),this.writable=!0,x&&(typeof x.write=="function"&&(this._write=x.write),typeof x.writev=="function"&&(this._writev=x.writev),typeof x.destroy=="function"&&(this._destroy=x.destroy),typeof x.final=="function"&&(this._final=x.final)),c.call(this)}N.prototype.pipe=function(){M(this,new F)};function P(x,b){var I=new E;M(x,I),process.nextTick(b,I)}function ne(x,b,I,j){var U;return I===null?U=new v:typeof I!="string"&&!b.objectMode&&(U=new m("chunk",["string","Buffer"],I)),U?(M(x,U),process.nextTick(j,U),!1):!0}N.prototype.write=function(x,b,I){var j=this._writableState,U=!1,h=!j.objectMode&&s(x);return h&&!o.isBuffer(x)&&(x=a(x)),typeof b=="function"&&(I=b,b=null),h?b="buffer":b||(b=j.defaultEncoding),typeof I!="function"&&(I=O),j.ending?P(this,I):(h||ne(this,j,x,I))&&(j.pendingcb++,U=Me(this,j,h,x,b,I)),U},N.prototype.cork=function(){this._writableState.corked++},N.prototype.uncork=function(){var x=this._writableState;x.corked&&(x.corked--,!x.writing&&!x.corked&&!x.bufferProcessing&&x.bufferedRequest&&ye(this,x))},N.prototype.setDefaultEncoding=function(b){if(typeof b=="string"&&(b=b.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((b+"").toLowerCase())>-1))throw new T(b);return this._writableState.defaultEncoding=b,this},Object.defineProperty(N.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function he(x,b,I){return!x.objectMode&&x.decodeStrings!==!1&&typeof b=="string"&&(b=o.from(b,I)),b}Object.defineProperty(N.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Me(x,b,I,j,U,h){if(!I){var d=he(b,j,U);j!==d&&(I=!0,U="buffer",j=d)}var C=b.objectMode?1:j.length;b.length+=C;var k=b.length<b.highWaterMark;if(k||(b.needDrain=!0),b.writing||b.corked){var K=b.lastBufferedRequest;b.lastBufferedRequest={chunk:j,encoding:U,isBuf:I,callback:h,next:null},K?K.next=b.lastBufferedRequest:b.bufferedRequest=b.lastBufferedRequest,b.bufferedRequestCount+=1}else ge(x,b,!1,C,j,U,h);return k}function ge(x,b,I,j,U,h,d){b.writelen=j,b.writecb=d,b.writing=!0,b.sync=!0,b.destroyed?b.onwrite(new S("write")):I?x._writev(U,b.onwrite):x._write(U,h,b.onwrite),b.sync=!1}function be(x,b,I,j,U){--b.pendingcb,I?(process.nextTick(U,j),process.nextTick(ue,x,b),x._writableState.errorEmitted=!0,M(x,j)):(U(j),x._writableState.errorEmitted=!0,M(x,j),ue(x,b))}function _e(x){x.writing=!1,x.writecb=null,x.length-=x.writelen,x.writelen=0}function Oe(x,b){var I=x._writableState,j=I.sync,U=I.writecb;if(typeof U!="function")throw new B;if(_e(I),b)be(x,I,j,b,U);else{var h=me(I)||x.destroyed;!h&&!I.corked&&!I.bufferProcessing&&I.bufferedRequest&&ye(x,I),j?process.nextTick(de,x,I,h,U):de(x,I,h,U)}}function de(x,b,I,j){I||xe(x,b),b.pendingcb--,j(),ue(x,b)}function xe(x,b){b.length===0&&b.needDrain&&(b.needDrain=!1,x.emit("drain"))}function ye(x,b){b.bufferProcessing=!0;var I=b.bufferedRequest;if(x._writev&&I&&I.next){var j=b.bufferedRequestCount,U=new Array(j),h=b.corkedRequestsFree;h.entry=I;for(var d=0,C=!0;I;)U[d]=I,I.isBuf||(C=!1),I=I.next,d+=1;U.allBuffers=C,ge(x,b,!0,b.length,U,"",h.finish),b.pendingcb++,b.lastBufferedRequest=null,h.next?(b.corkedRequestsFree=h.next,h.next=null):b.corkedRequestsFree=new e(b),b.bufferedRequestCount=0}else{for(;I;){var k=I.chunk,K=I.encoding,u=I.callback,r=b.objectMode?1:k.length;if(ge(x,b,!1,r,k,K,u),I=I.next,b.bufferedRequestCount--,b.writing)break}I===null&&(b.lastBufferedRequest=null)}b.bufferedRequest=I,b.bufferProcessing=!1}N.prototype._write=function(x,b,I){I(new R("_write()"))},N.prototype._writev=null,N.prototype.end=function(x,b,I){var j=this._writableState;return typeof x=="function"?(I=x,x=null,b=null):typeof b=="function"&&(I=b,b=null),x!=null&&this.write(x,b),j.corked&&(j.corked=1,this.uncork()),j.ending||Ee(this,j,I),this},Object.defineProperty(N.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function me(x){return x.ending&&x.length===0&&x.bufferedRequest===null&&!x.finished&&!x.writing}function X(x,b){x._final(function(I){b.pendingcb--,I&&M(x,I),b.prefinished=!0,x.emit("prefinish"),ue(x,b)})}function Z(x,b){!b.prefinished&&!b.finalCalled&&(typeof x._final=="function"&&!b.destroyed?(b.pendingcb++,b.finalCalled=!0,process.nextTick(X,x,b)):(b.prefinished=!0,x.emit("prefinish")))}function ue(x,b){var I=me(b);if(I&&(Z(x,b),b.pendingcb===0&&(b.finished=!0,x.emit("finish"),b.autoDestroy))){var j=x._readableState;(!j||j.autoDestroy&&j.endEmitted)&&x.destroy()}return I}function Ee(x,b,I){b.ending=!0,ue(x,b),I&&(b.finished?process.nextTick(I):x.once("finish",I)),b.ended=!0,x.writable=!1}function Se(x,b,I){var j=x.entry;for(x.entry=null;j;){var U=j.callback;b.pendingcb--,U(I),j=j.next}b.corkedRequestsFree.next=x}return Object.defineProperty(N.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(b){this._writableState&&(this._writableState.destroyed=b)}}),N.prototype.destroy=f.destroy,N.prototype._undestroy=f.undestroy,N.prototype._destroy=function(x,b){b(x)},Et}var St,dr;function Te(){if(dr)return St;dr=1;var e=Object.keys||function(p){var y=[];for(var _ in p)y.push(_);return y};St=a;var t=Jr(),n=zr();Ie(a,t);for(var c=e(n.prototype),o=0;o<c.length;o++){var l=c[o];a.prototype[l]||(a.prototype[l]=n.prototype[l])}function a(p){if(!(this instanceof a))return new a(p);t.call(this,p),n.call(this,p),this.allowHalfOpen=!0,p&&(p.readable===!1&&(this.readable=!1),p.writable===!1&&(this.writable=!1),p.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(f,this)}function f(p){p.end()}return Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(y){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=y,this._writableState.destroyed=y)}}),St}var Rt={},We={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var pr;function is(){return pr||(pr=1,function(e,t){var n=Le,c=n.Buffer;function o(a,s){for(var f in a)s[f]=a[f]}c.from&&c.alloc&&c.allocUnsafe&&c.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=l);function l(a,s,f){return c(a,s,f)}l.prototype=Object.create(c.prototype),o(c,l),l.from=function(a,s,f){if(typeof a=="number")throw new TypeError("Argument must not be a number");return c(a,s,f)},l.alloc=function(a,s,f){if(typeof a!="number")throw new TypeError("Argument must be a number");var p=c(a);return s!==void 0?typeof f=="string"?p.fill(s,f):p.fill(s):p.fill(0),p},l.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return c(a)},l.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(a)}}(We,We.exports)),We.exports}var gr;function yr(){if(gr)return Rt;gr=1;var e=is().Buffer,t=e.isEncoding||function(v){switch(v=""+v,v&&v.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function n(v){if(!v)return"utf8";for(var E;;)switch(v){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return v;default:if(E)return;v=(""+v).toLowerCase(),E=!0}}function c(v){var E=n(v);if(typeof E!="string"&&(e.isEncoding===t||!t(v)))throw new Error("Unknown encoding: "+v);return E||v}Rt.StringDecoder=o;function o(v){this.encoding=c(v);var E;switch(this.encoding){case"utf16le":this.text=_,this.end=m,E=4;break;case"utf8":this.fillLast=f,E=4;break;case"base64":this.text=R,this.end=B,E=3;break;default:this.write=F,this.end=S;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(E)}o.prototype.write=function(v){if(v.length===0)return"";var E,T;if(this.lastNeed){if(E=this.fillLast(v),E===void 0)return"";T=this.lastNeed,this.lastNeed=0}else T=0;return T<v.length?E?E+this.text(v,T):this.text(v,T):E||""},o.prototype.end=y,o.prototype.text=p,o.prototype.fillLast=function(v){if(this.lastNeed<=v.length)return v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,v.length),this.lastNeed-=v.length};function l(v){return v<=127?0:v>>5===6?2:v>>4===14?3:v>>3===30?4:v>>6===2?-1:-2}function a(v,E,T){var M=E.length-1;if(M<T)return 0;var O=l(E[M]);return O>=0?(O>0&&(v.lastNeed=O-1),O):--M<T||O===-2?0:(O=l(E[M]),O>=0?(O>0&&(v.lastNeed=O-2),O):--M<T||O===-2?0:(O=l(E[M]),O>=0?(O>0&&(O===2?O=0:v.lastNeed=O-3),O):0))}function s(v,E,T){if((E[0]&192)!==128)return v.lastNeed=0,"�";if(v.lastNeed>1&&E.length>1){if((E[1]&192)!==128)return v.lastNeed=1,"�";if(v.lastNeed>2&&E.length>2&&(E[2]&192)!==128)return v.lastNeed=2,"�"}}function f(v){var E=this.lastTotal-this.lastNeed,T=s(this,v);if(T!==void 0)return T;if(this.lastNeed<=v.length)return v.copy(this.lastChar,E,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,E,0,v.length),this.lastNeed-=v.length}function p(v,E){var T=a(this,v,E);if(!this.lastNeed)return v.toString("utf8",E);this.lastTotal=T;var M=v.length-(T-this.lastNeed);return v.copy(this.lastChar,0,M),v.toString("utf8",E,M)}function y(v){var E=v&&v.length?this.write(v):"";return this.lastNeed?E+"�":E}function _(v,E){if((v.length-E)%2===0){var T=v.toString("utf16le",E);if(T){var M=T.charCodeAt(T.length-1);if(M>=55296&&M<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1],T.slice(0,-1)}return T}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=v[v.length-1],v.toString("utf16le",E,v.length-1)}function m(v){var E=v&&v.length?this.write(v):"";if(this.lastNeed){var T=this.lastTotal-this.lastNeed;return E+this.lastChar.toString("utf16le",0,T)}return E}function R(v,E){var T=(v.length-E)%3;return T===0?v.toString("base64",E):(this.lastNeed=3-T,this.lastTotal=3,T===1?this.lastChar[0]=v[v.length-1]:(this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1]),v.toString("base64",E,v.length-T))}function B(v){var E=v&&v.length?this.write(v):"";return this.lastNeed?E+this.lastChar.toString("base64",0,3-this.lastNeed):E}function F(v){return v.toString(this.encoding)}function S(v){return v&&v.length?this.write(v):""}return Rt}var _r=we.codes.ERR_STREAM_PREMATURE_CLOSE;function os(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,c=new Array(n),o=0;o<n;o++)c[o]=arguments[o];e.apply(this,c)}}}function ss(){}function as(e){return e.setHeader&&typeof e.abort=="function"}function Xr(e,t,n){if(typeof t=="function")return Xr(e,null,t);t||(t={}),n=os(n||ss);var c=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,l=function(){e.writable||s()},a=e._writableState&&e._writableState.finished,s=function(){o=!1,a=!0,c||n.call(e)},f=e._readableState&&e._readableState.endEmitted,p=function(){c=!1,f=!0,o||n.call(e)},y=function(B){n.call(e,B)},_=function(){var B;if(c&&!f)return(!e._readableState||!e._readableState.ended)&&(B=new _r),n.call(e,B);if(o&&!a)return(!e._writableState||!e._writableState.ended)&&(B=new _r),n.call(e,B)},m=function(){e.req.on("finish",s)};return as(e)?(e.on("complete",s),e.on("abort",_),e.req?m():e.on("request",m)):o&&!e._writableState&&(e.on("end",l),e.on("close",l)),e.on("end",p),e.on("finish",s),t.error!==!1&&e.on("error",y),e.on("close",_),function(){e.removeListener("complete",s),e.removeListener("abort",_),e.removeListener("request",m),e.req&&e.req.removeListener("finish",s),e.removeListener("end",l),e.removeListener("close",l),e.removeListener("finish",s),e.removeListener("end",p),e.removeListener("error",y),e.removeListener("close",_)}}var Yt=Xr,Ct,vr;function ls(){if(vr)return Ct;vr=1;var e;function t(T,M,O){return M=n(M),M in T?Object.defineProperty(T,M,{value:O,enumerable:!0,configurable:!0,writable:!0}):T[M]=O,T}function n(T){var M=c(T,"string");return typeof M=="symbol"?M:String(M)}function c(T,M){if(typeof T!="object"||T===null)return T;var O=T[Symbol.toPrimitive];if(O!==void 0){var D=O.call(T,M||"default");if(typeof D!="object")return D;throw new TypeError("@@toPrimitive must return a primitive value.")}return(M==="string"?String:Number)(T)}var o=Yt,l=Symbol("lastResolve"),a=Symbol("lastReject"),s=Symbol("error"),f=Symbol("ended"),p=Symbol("lastPromise"),y=Symbol("handlePromise"),_=Symbol("stream");function m(T,M){return{value:T,done:M}}function R(T){var M=T[l];if(M!==null){var O=T[_].read();O!==null&&(T[p]=null,T[l]=null,T[a]=null,M(m(O,!1)))}}function B(T){process.nextTick(R,T)}function F(T,M){return function(O,D){T.then(function(){if(M[f]){O(m(void 0,!0));return}M[y](O,D)},D)}}var S=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((e={get stream(){return this[_]},next:function(){var M=this,O=this[s];if(O!==null)return Promise.reject(O);if(this[f])return Promise.resolve(m(void 0,!0));if(this[_].destroyed)return new Promise(function(P,ne){process.nextTick(function(){M[s]?ne(M[s]):P(m(void 0,!0))})});var D=this[p],$;if(D)$=new Promise(F(D,this));else{var N=this[_].read();if(N!==null)return Promise.resolve(m(N,!1));$=new Promise(this[y])}return this[p]=$,$}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var M=this;return new Promise(function(O,D){M[_].destroy(null,function($){if($){D($);return}O(m(void 0,!0))})})}),e),S),E=function(M){var O,D=Object.create(v,(O={},t(O,_,{value:M,writable:!0}),t(O,l,{value:null,writable:!0}),t(O,a,{value:null,writable:!0}),t(O,s,{value:null,writable:!0}),t(O,f,{value:M._readableState.endEmitted,writable:!0}),t(O,y,{value:function(N,P){var ne=D[_].read();ne?(D[p]=null,D[l]=null,D[a]=null,N(m(ne,!1))):(D[l]=N,D[a]=P)},writable:!0}),O));return D[p]=null,o(M,function($){if($&&$.code!=="ERR_STREAM_PREMATURE_CLOSE"){var N=D[a];N!==null&&(D[p]=null,D[l]=null,D[a]=null,N($)),D[s]=$;return}var P=D[l];P!==null&&(D[p]=null,D[l]=null,D[a]=null,P(m(void 0,!0))),D[f]=!0}),M.on("readable",B.bind(null,D)),D};return Ct=E,Ct}var At,wr;function fs(){return wr||(wr=1,At=function(){throw new Error("Readable.from is not available in the browser")}),At}var Bt,br;function Jr(){if(br)return Bt;br=1,Bt=P;var e;P.ReadableState=N,Wt.EventEmitter;var t=function(d,C){return d.listeners(C).length},n=Gr,c=Le.Buffer,o=(typeof oe<"u"?oe:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function l(h){return c.from(h)}function a(h){return c.isBuffer(h)||h instanceof o}var s=Qe,f;s&&s.debuglog?f=s.debuglog("stream"):f=function(){};var p=Ho(),y=Yr,_=Kr,m=_.getHighWaterMark,R=we.codes,B=R.ERR_INVALID_ARG_TYPE,F=R.ERR_STREAM_PUSH_AFTER_EOF,S=R.ERR_METHOD_NOT_IMPLEMENTED,v=R.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,E,T,M;Ie(P,n);var O=y.errorOrDestroy,D=["error","close","destroy","pause","resume"];function $(h,d,C){if(typeof h.prependListener=="function")return h.prependListener(d,C);!h._events||!h._events[d]?h.on(d,C):Array.isArray(h._events[d])?h._events[d].unshift(C):h._events[d]=[C,h._events[d]]}function N(h,d,C){e=e||Te(),h=h||{},typeof C!="boolean"&&(C=d instanceof e),this.objectMode=!!h.objectMode,C&&(this.objectMode=this.objectMode||!!h.readableObjectMode),this.highWaterMark=m(this,h,"readableHighWaterMark",C),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=h.emitClose!==!1,this.autoDestroy=!!h.autoDestroy,this.destroyed=!1,this.defaultEncoding=h.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,h.encoding&&(E||(E=yr().StringDecoder),this.decoder=new E(h.encoding),this.encoding=h.encoding)}function P(h){if(e=e||Te(),!(this instanceof P))return new P(h);var d=this instanceof e;this._readableState=new N(h,this,d),this.readable=!0,h&&(typeof h.read=="function"&&(this._read=h.read),typeof h.destroy=="function"&&(this._destroy=h.destroy)),n.call(this)}Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(d){this._readableState&&(this._readableState.destroyed=d)}}),P.prototype.destroy=y.destroy,P.prototype._undestroy=y.undestroy,P.prototype._destroy=function(h,d){d(h)},P.prototype.push=function(h,d){var C=this._readableState,k;return C.objectMode?k=!0:typeof h=="string"&&(d=d||C.defaultEncoding,d!==C.encoding&&(h=c.from(h,d),d=""),k=!0),ne(this,h,d,!1,k)},P.prototype.unshift=function(h){return ne(this,h,null,!0,!1)};function ne(h,d,C,k,K){f("readableAddChunk",d);var u=h._readableState;if(d===null)u.reading=!1,Oe(h,u);else{var r;if(K||(r=Me(u,d)),r)O(h,r);else if(u.objectMode||d&&d.length>0)if(typeof d!="string"&&!u.objectMode&&Object.getPrototypeOf(d)!==c.prototype&&(d=l(d)),k)u.endEmitted?O(h,new v):he(h,u,d,!0);else if(u.ended)O(h,new F);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!C?(d=u.decoder.write(d),u.objectMode||d.length!==0?he(h,u,d,!1):ye(h,u)):he(h,u,d,!1)}else k||(u.reading=!1,ye(h,u))}return!u.ended&&(u.length<u.highWaterMark||u.length===0)}function he(h,d,C,k){d.flowing&&d.length===0&&!d.sync?(d.awaitDrain=0,h.emit("data",C)):(d.length+=d.objectMode?1:C.length,k?d.buffer.unshift(C):d.buffer.push(C),d.needReadable&&de(h)),ye(h,d)}function Me(h,d){var C;return!a(d)&&typeof d!="string"&&d!==void 0&&!h.objectMode&&(C=new B("chunk",["string","Buffer","Uint8Array"],d)),C}P.prototype.isPaused=function(){return this._readableState.flowing===!1},P.prototype.setEncoding=function(h){E||(E=yr().StringDecoder);var d=new E(h);this._readableState.decoder=d,this._readableState.encoding=this._readableState.decoder.encoding;for(var C=this._readableState.buffer.head,k="";C!==null;)k+=d.write(C.data),C=C.next;return this._readableState.buffer.clear(),k!==""&&this._readableState.buffer.push(k),this._readableState.length=k.length,this};var ge=1073741824;function be(h){return h>=ge?h=ge:(h--,h|=h>>>1,h|=h>>>2,h|=h>>>4,h|=h>>>8,h|=h>>>16,h++),h}function _e(h,d){return h<=0||d.length===0&&d.ended?0:d.objectMode?1:h!==h?d.flowing&&d.length?d.buffer.head.data.length:d.length:(h>d.highWaterMark&&(d.highWaterMark=be(h)),h<=d.length?h:d.ended?d.length:(d.needReadable=!0,0))}P.prototype.read=function(h){f("read",h),h=parseInt(h,10);var d=this._readableState,C=h;if(h!==0&&(d.emittedReadable=!1),h===0&&d.needReadable&&((d.highWaterMark!==0?d.length>=d.highWaterMark:d.length>0)||d.ended))return f("read: emitReadable",d.length,d.ended),d.length===0&&d.ended?I(this):de(this),null;if(h=_e(h,d),h===0&&d.ended)return d.length===0&&I(this),null;var k=d.needReadable;f("need readable",k),(d.length===0||d.length-h<d.highWaterMark)&&(k=!0,f("length less than watermark",k)),d.ended||d.reading?(k=!1,f("reading or ended",k)):k&&(f("do read"),d.reading=!0,d.sync=!0,d.length===0&&(d.needReadable=!0),this._read(d.highWaterMark),d.sync=!1,d.reading||(h=_e(C,d)));var K;return h>0?K=b(h,d):K=null,K===null?(d.needReadable=d.length<=d.highWaterMark,h=0):(d.length-=h,d.awaitDrain=0),d.length===0&&(d.ended||(d.needReadable=!0),C!==h&&d.ended&&I(this)),K!==null&&this.emit("data",K),K};function Oe(h,d){if(f("onEofChunk"),!d.ended){if(d.decoder){var C=d.decoder.end();C&&C.length&&(d.buffer.push(C),d.length+=d.objectMode?1:C.length)}d.ended=!0,d.sync?de(h):(d.needReadable=!1,d.emittedReadable||(d.emittedReadable=!0,xe(h)))}}function de(h){var d=h._readableState;f("emitReadable",d.needReadable,d.emittedReadable),d.needReadable=!1,d.emittedReadable||(f("emitReadable",d.flowing),d.emittedReadable=!0,process.nextTick(xe,h))}function xe(h){var d=h._readableState;f("emitReadable_",d.destroyed,d.length,d.ended),!d.destroyed&&(d.length||d.ended)&&(h.emit("readable"),d.emittedReadable=!1),d.needReadable=!d.flowing&&!d.ended&&d.length<=d.highWaterMark,x(h)}function ye(h,d){d.readingMore||(d.readingMore=!0,process.nextTick(me,h,d))}function me(h,d){for(;!d.reading&&!d.ended&&(d.length<d.highWaterMark||d.flowing&&d.length===0);){var C=d.length;if(f("maybeReadMore read 0"),h.read(0),C===d.length)break}d.readingMore=!1}P.prototype._read=function(h){O(this,new S("_read()"))},P.prototype.pipe=function(h,d){var C=this,k=this._readableState;switch(k.pipesCount){case 0:k.pipes=h;break;case 1:k.pipes=[k.pipes,h];break;default:k.pipes.push(h);break}k.pipesCount+=1,f("pipe count=%d opts=%j",k.pipesCount,d);var K=(!d||d.end!==!1)&&h!==process.stdout&&h!==process.stderr,u=K?i:J;k.endEmitted?process.nextTick(u):C.once("end",u),h.on("unpipe",r);function r(G,le){f("onunpipe"),G===C&&le&&le.hasUnpiped===!1&&(le.hasUnpiped=!0,A())}function i(){f("onend"),h.end()}var g=X(C);h.on("drain",g);var w=!1;function A(){f("cleanup"),h.removeListener("close",W),h.removeListener("finish",H),h.removeListener("drain",g),h.removeListener("error",q),h.removeListener("unpipe",r),C.removeListener("end",i),C.removeListener("end",J),C.removeListener("data",L),w=!0,k.awaitDrain&&(!h._writableState||h._writableState.needDrain)&&g()}C.on("data",L);function L(G){f("ondata");var le=h.write(G);f("dest.write",le),le===!1&&((k.pipesCount===1&&k.pipes===h||k.pipesCount>1&&U(k.pipes,h)!==-1)&&!w&&(f("false write response, pause",k.awaitDrain),k.awaitDrain++),C.pause())}function q(G){f("onerror",G),J(),h.removeListener("error",q),t(h,"error")===0&&O(h,G)}$(h,"error",q);function W(){h.removeListener("finish",H),J()}h.once("close",W);function H(){f("onfinish"),h.removeListener("close",W),J()}h.once("finish",H);function J(){f("unpipe"),C.unpipe(h)}return h.emit("pipe",C),k.flowing||(f("pipe resume"),C.resume()),h};function X(h){return function(){var C=h._readableState;f("pipeOnDrain",C.awaitDrain),C.awaitDrain&&C.awaitDrain--,C.awaitDrain===0&&t(h,"data")&&(C.flowing=!0,x(h))}}P.prototype.unpipe=function(h){var d=this._readableState,C={hasUnpiped:!1};if(d.pipesCount===0)return this;if(d.pipesCount===1)return h&&h!==d.pipes?this:(h||(h=d.pipes),d.pipes=null,d.pipesCount=0,d.flowing=!1,h&&h.emit("unpipe",this,C),this);if(!h){var k=d.pipes,K=d.pipesCount;d.pipes=null,d.pipesCount=0,d.flowing=!1;for(var u=0;u<K;u++)k[u].emit("unpipe",this,{hasUnpiped:!1});return this}var r=U(d.pipes,h);return r===-1?this:(d.pipes.splice(r,1),d.pipesCount-=1,d.pipesCount===1&&(d.pipes=d.pipes[0]),h.emit("unpipe",this,C),this)},P.prototype.on=function(h,d){var C=n.prototype.on.call(this,h,d),k=this._readableState;return h==="data"?(k.readableListening=this.listenerCount("readable")>0,k.flowing!==!1&&this.resume()):h==="readable"&&!k.endEmitted&&!k.readableListening&&(k.readableListening=k.needReadable=!0,k.flowing=!1,k.emittedReadable=!1,f("on readable",k.length,k.reading),k.length?de(this):k.reading||process.nextTick(ue,this)),C},P.prototype.addListener=P.prototype.on,P.prototype.removeListener=function(h,d){var C=n.prototype.removeListener.call(this,h,d);return h==="readable"&&process.nextTick(Z,this),C},P.prototype.removeAllListeners=function(h){var d=n.prototype.removeAllListeners.apply(this,arguments);return(h==="readable"||h===void 0)&&process.nextTick(Z,this),d};function Z(h){var d=h._readableState;d.readableListening=h.listenerCount("readable")>0,d.resumeScheduled&&!d.paused?d.flowing=!0:h.listenerCount("data")>0&&h.resume()}function ue(h){f("readable nexttick read 0"),h.read(0)}P.prototype.resume=function(){var h=this._readableState;return h.flowing||(f("resume"),h.flowing=!h.readableListening,Ee(this,h)),h.paused=!1,this};function Ee(h,d){d.resumeScheduled||(d.resumeScheduled=!0,process.nextTick(Se,h,d))}function Se(h,d){f("resume",d.reading),d.reading||h.read(0),d.resumeScheduled=!1,h.emit("resume"),x(h),d.flowing&&!d.reading&&h.read(0)}P.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function x(h){var d=h._readableState;for(f("flow",d.flowing);d.flowing&&h.read()!==null;);}P.prototype.wrap=function(h){var d=this,C=this._readableState,k=!1;h.on("end",function(){if(f("wrapped end"),C.decoder&&!C.ended){var r=C.decoder.end();r&&r.length&&d.push(r)}d.push(null)}),h.on("data",function(r){if(f("wrapped data"),C.decoder&&(r=C.decoder.write(r)),!(C.objectMode&&r==null)&&!(!C.objectMode&&(!r||!r.length))){var i=d.push(r);i||(k=!0,h.pause())}});for(var K in h)this[K]===void 0&&typeof h[K]=="function"&&(this[K]=function(i){return function(){return h[i].apply(h,arguments)}}(K));for(var u=0;u<D.length;u++)h.on(D[u],this.emit.bind(this,D[u]));return this._read=function(r){f("wrapped _read",r),k&&(k=!1,h.resume())},this},typeof Symbol=="function"&&(P.prototype[Symbol.asyncIterator]=function(){return T===void 0&&(T=ls()),T(this)}),Object.defineProperty(P.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(P.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(P.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(d){this._readableState&&(this._readableState.flowing=d)}}),P._fromList=b,Object.defineProperty(P.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function b(h,d){if(d.length===0)return null;var C;return d.objectMode?C=d.buffer.shift():!h||h>=d.length?(d.decoder?C=d.buffer.join(""):d.buffer.length===1?C=d.buffer.first():C=d.buffer.concat(d.length),d.buffer.clear()):C=d.buffer.consume(h,d.decoder),C}function I(h){var d=h._readableState;f("endReadable",d.endEmitted),d.endEmitted||(d.ended=!0,process.nextTick(j,d,h))}function j(h,d){if(f("endReadableNT",h.endEmitted,h.length),!h.endEmitted&&h.length===0&&(h.endEmitted=!0,d.readable=!1,d.emit("end"),h.autoDestroy)){var C=d._writableState;(!C||C.autoDestroy&&C.finished)&&d.destroy()}}typeof Symbol=="function"&&(P.from=function(h,d){return M===void 0&&(M=fs()),M(P,h,d)});function U(h,d){for(var C=0,k=h.length;C<k;C++)if(h[C]===d)return C;return-1}return Bt}var Zr=pe,at=we.codes,us=at.ERR_METHOD_NOT_IMPLEMENTED,cs=at.ERR_MULTIPLE_CALLBACK,hs=at.ERR_TRANSFORM_ALREADY_TRANSFORMING,ds=at.ERR_TRANSFORM_WITH_LENGTH_0,lt=Te();Ie(pe,lt);function ps(e,t){var n=this._transformState;n.transforming=!1;var c=n.writecb;if(c===null)return this.emit("error",new cs);n.writechunk=null,n.writecb=null,t!=null&&this.push(t),c(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function pe(e){if(!(this instanceof pe))return new pe(e);lt.call(this,e),this._transformState={afterTransform:ps.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",gs)}function gs(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,n){xr(e,t,n)}):xr(this,null,null)}pe.prototype.push=function(e,t){return this._transformState.needTransform=!1,lt.prototype.push.call(this,e,t)};pe.prototype._transform=function(e,t,n){n(new us("_transform()"))};pe.prototype._write=function(e,t,n){var c=this._transformState;if(c.writecb=n,c.writechunk=e,c.writeencoding=t,!c.transforming){var o=this._readableState;(c.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}};pe.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};pe.prototype._destroy=function(e,t){lt.prototype._destroy.call(this,e,function(n){t(n)})};function xr(e,t,n){if(t)return e.emit("error",t);if(n!=null&&e.push(n),e._writableState.length)throw new ds;if(e._transformState.transforming)throw new hs;return e.push(null)}var ys=Ue,Qr=Zr;Ie(Ue,Qr);function Ue(e){if(!(this instanceof Ue))return new Ue(e);Qr.call(this,e)}Ue.prototype._transform=function(e,t,n){n(null,e)};var Tt;function _s(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var en=we.codes,vs=en.ERR_MISSING_ARGS,ws=en.ERR_STREAM_DESTROYED;function mr(e){if(e)throw e}function bs(e){return e.setHeader&&typeof e.abort=="function"}function xs(e,t,n,c){c=_s(c);var o=!1;e.on("close",function(){o=!0}),Tt===void 0&&(Tt=Yt),Tt(e,{readable:t,writable:n},function(a){if(a)return c(a);o=!0,c()});var l=!1;return function(a){if(!o&&!l){if(l=!0,bs(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();c(a||new ws("pipe"))}}}function Er(e){e()}function ms(e,t){return e.pipe(t)}function Es(e){return!e.length||typeof e[e.length-1]!="function"?mr:e.pop()}function Ss(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var c=Es(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new vs("streams");var o,l=t.map(function(a,s){var f=s<t.length-1,p=s>0;return xs(a,f,p,function(y){o||(o=y),y&&l.forEach(Er),!f&&(l.forEach(Er),c(o))})});return t.reduce(ms)}var Rs=Ss;(function(e,t){t=e.exports=Jr(),t.Stream=t,t.Readable=t,t.Writable=zr(),t.Duplex=Te(),t.Transform=Zr,t.PassThrough=ys,t.finished=Yt,t.pipeline=Rs})(kt,kt.exports);var Cs=kt.exports;const{Buffer:fe}=Le,tn=Symbol.for("BufferList");function V(e){if(!(this instanceof V))return new V(e);V._init.call(this,e)}V._init=function(t){Object.defineProperty(this,tn,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)};V.prototype._new=function(t){return new V(t)};V.prototype._offset=function(t){if(t===0)return[0,0];let n=0;for(let c=0;c<this._bufs.length;c++){const o=n+this._bufs[c].length;if(t<o||c===this._bufs.length-1)return[c,t-n];n=o}};V.prototype._reverseOffset=function(e){const t=e[0];let n=e[1];for(let c=0;c<t;c++)n+=this._bufs[c].length;return n};V.prototype.get=function(t){if(t>this.length||t<0)return;const n=this._offset(t);return this._bufs[n[0]][n[1]]};V.prototype.slice=function(t,n){return typeof t=="number"&&t<0&&(t+=this.length),typeof n=="number"&&n<0&&(n+=this.length),this.copy(null,0,t,n)};V.prototype.copy=function(t,n,c,o){if((typeof c!="number"||c<0)&&(c=0),(typeof o!="number"||o>this.length)&&(o=this.length),c>=this.length||o<=0)return t||fe.alloc(0);const l=!!t,a=this._offset(c),s=o-c;let f=s,p=l&&n||0,y=a[1];if(c===0&&o===this.length){if(!l)return this._bufs.length===1?this._bufs[0]:fe.concat(this._bufs,this.length);for(let _=0;_<this._bufs.length;_++)this._bufs[_].copy(t,p),p+=this._bufs[_].length;return t}if(f<=this._bufs[a[0]].length-y)return l?this._bufs[a[0]].copy(t,n,y,y+f):this._bufs[a[0]].slice(y,y+f);l||(t=fe.allocUnsafe(s));for(let _=a[0];_<this._bufs.length;_++){const m=this._bufs[_].length-y;if(f>m)this._bufs[_].copy(t,p,y),p+=m;else{this._bufs[_].copy(t,p,y,y+f),p+=m;break}f-=m,y&&(y=0)}return t.length>p?t.slice(0,p):t};V.prototype.shallowSlice=function(t,n){if(t=t||0,n=typeof n!="number"?this.length:n,t<0&&(t+=this.length),n<0&&(n+=this.length),t===n)return this._new();const c=this._offset(t),o=this._offset(n),l=this._bufs.slice(c[0],o[0]+1);return o[1]===0?l.pop():l[l.length-1]=l[l.length-1].slice(0,o[1]),c[1]!==0&&(l[0]=l[0].slice(c[1])),this._new(l)};V.prototype.toString=function(t,n,c){return this.slice(n,c).toString(t)};V.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this};V.prototype.duplicate=function(){const t=this._new();for(let n=0;n<this._bufs.length;n++)t.append(this._bufs[n]);return t};V.prototype.append=function(t){if(t==null)return this;if(t.buffer)this._appendBuffer(fe.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let n=0;n<t.length;n++)this.append(t[n]);else if(this._isBufferList(t))for(let n=0;n<t._bufs.length;n++)this.append(t._bufs[n]);else typeof t=="number"&&(t=t.toString()),this._appendBuffer(fe.from(t));return this};V.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length};V.prototype.indexOf=function(e,t,n){if(n===void 0&&typeof t=="string"&&(n=t,t=void 0),typeof e=="function"||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof e=="number"?e=fe.from([e]):typeof e=="string"?e=fe.from(e,n):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=fe.from(e.buffer,e.byteOffset,e.byteLength):fe.isBuffer(e)||(e=fe.from(e)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),e.length===0)return t>this.length?this.length:t;const c=this._offset(t);let o=c[0],l=c[1];for(;o<this._bufs.length;o++){const a=this._bufs[o];for(;l<a.length;)if(a.length-l>=e.length){const f=a.indexOf(e,l);if(f!==-1)return this._reverseOffset([o,f]);l=a.length-e.length+1}else{const f=this._reverseOffset([o,l]);if(this._match(f,e))return f;l++}l=0}return-1};V.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(let n=0;n<t.length;n++)if(this.get(e+n)!==t[n])return!1;return!0};(function(){const e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const t in e)(function(n){e[n]===null?V.prototype[n]=function(c,o){return this.slice(c,c+o)[n](0,o)}:V.prototype[n]=function(c=0){return this.slice(c,c+e[n])[n](0)}})(t)})();V.prototype._isBufferList=function(t){return t instanceof V||V.isBufferList(t)};V.isBufferList=function(t){return t!=null&&t[tn]};var As=V;const Vt=Cs.Duplex,Bs=Ie,qe=As;function re(e){if(!(this instanceof re))return new re(e);if(typeof e=="function"){this._callback=e;const t=(function(c){this._callback&&(this._callback(c),this._callback=null)}).bind(this);this.on("pipe",function(c){c.on("error",t)}),this.on("unpipe",function(c){c.removeListener("error",t)}),e=null}qe._init.call(this,e),Vt.call(this)}Bs(re,Vt);Object.assign(re.prototype,qe.prototype);re.prototype._new=function(t){return new re(t)};re.prototype._write=function(t,n,c){this._appendBuffer(t),typeof c=="function"&&c()};re.prototype._read=function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)};re.prototype.end=function(t){Vt.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)};re.prototype._destroy=function(t,n){this._bufs.length=0,this.length=0,n(t)};re.prototype._isBufferList=function(t){return t instanceof re||t instanceof qe||re.isBufferList(t)};re.isBufferList=qe.isBufferList;ot.exports=re;ot.exports.BufferListStream=re;ot.exports.BufferList=qe;var Ts=ot.exports;const Fs=Qe,Ls=Tn,Sr=Fr,Ge=So,He=Ro,Is=Bo,Ms=ko,Os=Do,{BufferListStream:ks}=Ts,Ft=Symbol("text"),Lt=Symbol("prefixText"),Ds=3,Ps=()=>process.platform!=="win32"||process.env.TERM_PROGRAM==="vscode"||!!process.env.WT_SESSION;class js{constructor(){this.requests=0,this.mutedStream=new ks,this.mutedStream.pipe(process.stdout);const t=this;this.ourEmit=function(n,c,...o){const{stdin:l}=process;if(t.requests>0||l.emit===t.ourEmit){if(n==="keypress")return;n==="data"&&c.includes(Ds)&&process.emit("SIGINT"),Reflect.apply(t.oldEmit,this,[n,c,...o])}else Reflect.apply(process.stdin.emit,this,[n,c,...o])}}start(){this.requests++,this.requests===1&&this.realStart()}stop(){if(this.requests<=0)throw new Error("`stop` called more times than `start`");this.requests--,this.requests===0&&this.realStop()}realStart(){process.platform!=="win32"&&(this.rl=Fs.createInterface({input:process.stdin,output:this.mutedStream}),this.rl.on("SIGINT",()=>{process.listenerCount("SIGINT")===0?process.emit("SIGINT"):(this.rl.close(),process.kill(process.pid,"SIGINT"))}))}realStop(){process.platform!=="win32"&&(this.rl.close(),this.rl=void 0)}}let Ye;class rn{constructor(t){Ye||(Ye=new js),typeof t=="string"&&(t={text:t}),this.options={text:"",color:"cyan",stream:process.stderr,discardStdin:!0,...t},this.spinner=this.options.spinner,this.color=this.options.color,this.hideCursor=this.options.hideCursor!==!1,this.interval=this.options.interval||this.spinner.interval||100,this.stream=this.options.stream,this.id=void 0,this.isEnabled=typeof this.options.isEnabled=="boolean"?this.options.isEnabled:Os({stream:this.stream}),this.isSilent=typeof this.options.isSilent=="boolean"?this.options.isSilent:!1,this.text=this.options.text,this.prefixText=this.options.prefixText,this.linesToClear=0,this.indent=this.options.indent,this.discardStdin=this.options.discardStdin,this.isDiscardingStdin=!1}get indent(){return this._indent}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this._indent=t}_updateInterval(t){t!==void 0&&(this.interval=t)}get spinner(){return this._spinner}set spinner(t){if(this.frameIndex=0,typeof t=="object"){if(t.frames===void 0)throw new Error("The given spinner must have a `frames` property");this._spinner=t}else if(!Ps())this._spinner=Ge.line;else if(t===void 0)this._spinner=Ge.dots;else if(Ge[t])this._spinner=Ge[t];else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/master/spinners.json for a full list.`);this._updateInterval(this._spinner.interval)}get text(){return this[Ft]}set text(t){this[Ft]=t,this.updateLineCount()}get prefixText(){return this[Lt]}set prefixText(t){this[Lt]=t,this.updateLineCount()}get isSpinning(){return this.id!==void 0}getFullPrefixText(t=this[Lt],n=" "){return typeof t=="string"?t+n:typeof t=="function"?t()+n:""}updateLineCount(){const t=this.stream.columns||80,n=this.getFullPrefixText(this.prefixText,"-");this.lineCount=0;for(const c of Is(n+"--"+this[Ft]).split(`
13
+ `))this.lineCount+=Math.max(1,Math.ceil(Ms(c)/t))}get isEnabled(){return this._isEnabled&&!this.isSilent}set isEnabled(t){if(typeof t!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this._isEnabled=t}get isSilent(){return this._isSilent}set isSilent(t){if(typeof t!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this._isSilent=t}frame(){const{frames:t}=this.spinner;let n=t[this.frameIndex];this.color&&(n=Ls[this.color](n)),this.frameIndex=++this.frameIndex%t.length;const c=typeof this.prefixText=="string"&&this.prefixText!==""?this.prefixText+" ":"",o=typeof this.text=="string"?" "+this.text:"";return c+n+o}clear(){if(!this.isEnabled||!this.stream.isTTY)return this;for(let t=0;t<this.linesToClear;t++)t>0&&this.stream.moveCursor(0,-1),this.stream.clearLine(),this.stream.cursorTo(this.indent);return this.linesToClear=0,this}render(){return this.isSilent?this:(this.clear(),this.stream.write(this.frame()),this.linesToClear=this.lineCount,this)}start(t){return t&&(this.text=t),this.isSilent?this:this.isEnabled?this.isSpinning?this:(this.hideCursor&&Sr.hide(this.stream),this.discardStdin&&process.stdin.isTTY&&(this.isDiscardingStdin=!0,Ye.start()),this.render(),this.id=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.stream.write(`- ${this.text}
14
+ `),this)}stop(){return this.isEnabled?(clearInterval(this.id),this.id=void 0,this.frameIndex=0,this.clear(),this.hideCursor&&Sr.show(this.stream),this.discardStdin&&process.stdin.isTTY&&this.isDiscardingStdin&&(Ye.stop(),this.isDiscardingStdin=!1),this):this}succeed(t){return this.stopAndPersist({symbol:He.success,text:t})}fail(t){return this.stopAndPersist({symbol:He.error,text:t})}warn(t){return this.stopAndPersist({symbol:He.warning,text:t})}info(t){return this.stopAndPersist({symbol:He.info,text:t})}stopAndPersist(t={}){if(this.isSilent)return this;const n=t.prefixText||this.prefixText,c=t.text||this.text,o=typeof c=="string"?" "+c:"";return this.stop(),this.stream.write(`${this.getFullPrefixText(n," ")}${t.symbol||" "}${o}
15
+ `),this}}const Ns=function(e){return new rn(e)};jt.exports=Ns;jt.exports.promise=(e,t)=>{if(typeof e.then!="function")throw new TypeError("Parameter `action` must be a Promise");const n=new rn(t);return n.start(),(async()=>{try{await e,n.succeed()}catch{n.fail()}})(),n};var Us=jt.exports;const qs=cn(Us),nn=e=>new Promise((t,n)=>{un.exec(e,c=>{if(c)return n(c);t()})}),It=async(...e)=>{const t=e.map(o=>o.replace("-D","").split("@").slice(0,-1).join("@").trim()),n=qs(`Installing packages: ${t.join(",")}`).start(),c=e.join(" ");await nn(`npm install ${c}`),n.succeed(`Installed packages: ${t.join(",")}`)},$s=()=>fn.existsSync(Q.join(process.cwd(),"node_modules",".bin","prettier"));async function Ve(e){try{if(!$s())return;await nn(`./node_modules/.bin/prettier --write "${e}"`),ie.info(`Formatted ${e} with Prettier`)}catch(t){ie.error(`Error formatting ${e} with Prettier:`,t)}}async function Ws(){const e=new on.Command;e.name("salty-css").description("Salty-CSS CLI tool to help with annoying configuration tasks.");const t={"salty.config.ts":Promise.resolve().then(()=>require("../salty.config-BupieCfE.cjs")),"saltygen/index.css":Promise.resolve().then(()=>require("../index-84Wroia-.cjs")),"react/react-styled-file.ts":Promise.resolve().then(()=>require("../react-styled-file-Dkubsz-U.cjs"))},n=async(p,y)=>{const{default:_}=await t[p],m=sn.render(_,y);return{fileName:p,content:m}},c=async()=>{const p=Q.join(process.cwd(),".saltyrc");return await ee.readFile(p,"utf-8").then(JSON.parse).catch(()=>({}))},o=async()=>{const p=new URL("../package.json",typeof document>"u"?require("url").pathToFileURL(__filename).href:ft&&ft.tagName.toUpperCase()==="SCRIPT"&&ft.src||new URL("bin/index.cjs",document.baseURI).href);return await ee.readFile(p,"utf-8").then(JSON.parse).catch(()=>({}))},a=await(async()=>(await c()).defaultProject)(),s=await o(),f={core:`@salty-css/core@${s.version}`,react:`@salty-css/react@${s.version}`,eslintPluginCore:`@salty-css/eslint-plugin-core@${s.version}`,vite:`@salty-css/vite@${s.version}`};e.command("init").description("Initialize a new Salty-CSS project.").requiredOption("-d, --dir <dir>","Project directory to initialize the project in.").option("--css-file <css-file>","Existing CSS file where to import the generated CSS. Path must be relative to the given project directory.").action(async function(){await It(f.core,f.react),await It(`-D ${f.eslintPluginCore}`),ie.info("Initializing a new Salty-CSS project...");const{dir:p,cssFile:y}=this.opts(),_=process.cwd(),m=Q.join(_,p),R=await Promise.all([n("salty.config.ts"),n("saltygen/index.css")]);await ee.mkdir(m,{recursive:!0});const B=R.map(async({fileName:D,content:$})=>{const N=Q.join(m,D);if(await ee.readFile(N,"utf-8").catch(()=>{})!==void 0){ie.debug("File already exists: "+N);return}const ne=D.split("/").slice(0,-1).join("/");ne&&await ee.mkdir(Q.join(m,ne),{recursive:!0}),ie.info("Writing file: "+N),await ee.writeFile(N,$),await Ve(N)});await Promise.all(B);const F=Q.relative(_,m),S=Q.join(_,".saltyrc"),v=await ee.readFile(S,"utf-8").catch(()=>{});if(v===void 0){ie.info("Creating file: "+S);const $=JSON.stringify({defaultProject:F,projects:[F]},null,2);await ee.writeFile(S,$)}else{ie.info("Edit file: "+S);const D=JSON.parse(v),$=new Set((D==null?void 0:D.projects)||[]);$.add(F),D.projects=[...$];const N=JSON.stringify(D,null,2);await ee.writeFile(S,N)}const E=Q.join(_,".gitignore"),T=await ee.readFile(E,"utf-8").catch(()=>{});if(T!==void 0&&(T.includes("saltygen")||(ie.info("Edit file: "+E),await ee.writeFile(E,T+`
3
16
 
4
17
  # Salty-CSS
5
18
  saltygen
6
- `))),l){const e=t.join(c,l),r=await n.readFile(e,"utf-8").catch(()=>{});if(r!==void 0&&!r.includes("saltygen")){const C=t.join(e,".."),N=`@import '${t.relative(C,t.join(c,"saltygen/index.css"))}';`;o.info("Edit file: "+e),await n.writeFile(e,N+`
7
- `+r),await F(e)}}const g=t.join(c,"vite.config.ts"),b=await n.readFile(g,"utf-8").catch(()=>{});if(b!==void 0&&!b.includes("saltyPlugin")){o.info("Edit file: "+g);const r=`import { saltyPlugin } from '@salty-css/vite';
8
- `,C=b.replace(/(plugins: \[)/,`$1
9
- saltyPlugin(__dirname),`);o.info("Installing @salty-css/vite"),await k(P.vite),o.info("Adding Salty-CSS plugin to Vite config..."),await n.writeFile(g,r+C),await F(g)}}),a.command("build").alias("b").description("Build the Salty-CSS project.").option("-d, --dir <dir>","Project directory to build the project in.",J).action(async function(){o.info("Building the Salty-CSS project...");const{dir:s}=this.opts(),l=t.join(process.cwd(),s);await O.generateCss(l)}),a.command("generate <file>").alias("g").description("Generate a new component file.").option("-d, --dir <dir>","Project directory to generate the file in.",J).option("-t, --tag <tag>","HTML tag of the component.","div").option("-n, --name <name>","Name of the component.").option("-c, --className <className>","CSS class of the component.").action(async function(s){const{dir:l,tag:p,name:c,className:x}=this.opts(),I=t.join(process.cwd(),l),y=t.join(I,s),i=t.parse(y);i.ext||(i.ext=".ts"),i.name.endsWith(".css")||(i.name=i.name+".css"),i.base=i.name+i.ext;const u=t.format(i);if(await n.readFile(u,"utf-8").catch(()=>{})!==void 0){o.error("File already exists:",u);return}o.info("Generating a new file: "+u);const w=R.pascalCase(c||i.base.replace(/\.css\.\w+$/,"")),{content:g}=await m("react/react-styled-file.ts",{tag:p,name:w,className:x});await n.writeFile(u,g),await F(u)}),a.parseAsync(process.argv)}A().catch(a=>console.error(a));
19
+ `))),y){const D=Q.join(m,y),$=await ee.readFile(D,"utf-8").catch(()=>{});if($!==void 0&&!$.includes("saltygen")){const P=Q.join(D,".."),he=`@import '${Q.relative(P,Q.join(m,"saltygen/index.css"))}';`;ie.info("Edit file: "+D),await ee.writeFile(D,he+`
20
+ `+$),await Ve(D)}}const M=Q.join(m,"vite.config.ts"),O=await ee.readFile(M,"utf-8").catch(()=>{});if(O!==void 0&&!O.includes("saltyPlugin")){ie.info("Edit file: "+M);const $=`import { saltyPlugin } from '@salty-css/vite';
21
+ `,P=O.replace(/(plugins: \[)/,`$1
22
+ saltyPlugin(__dirname),`);ie.info("Installing @salty-css/vite"),await It(f.vite),ie.info("Adding Salty-CSS plugin to Vite config..."),await ee.writeFile(M,$+P),await Ve(M)}}),e.command("build").alias("b").description("Build the Salty-CSS project.").option("-d, --dir <dir>","Project directory to build the project in.",a).action(async function(){ie.info("Building the Salty-CSS project...");const{dir:p}=this.opts(),y=Q.join(process.cwd(),p);await an.generateCss(y)}),e.command("generate <file>").alias("g").description("Generate a new component file.").option("-d, --dir <dir>","Project directory to generate the file in.",a).option("-t, --tag <tag>","HTML tag of the component.","div").option("-n, --name <name>","Name of the component.").option("-c, --className <className>","CSS class of the component.").action(async function(p){const{dir:y,tag:_,name:m,className:R}=this.opts(),B=Q.join(process.cwd(),y),F=Q.join(B,p),S=Q.parse(F);S.ext||(S.ext=".ts"),S.name.endsWith(".css")||(S.name=S.name+".css"),S.base=S.name+S.ext;const v=Q.format(S);if(await ee.readFile(v,"utf-8").catch(()=>{})!==void 0){ie.error("File already exists:",v);return}ie.info("Generating a new file: "+v);const T=ln.pascalCase(m||S.base.replace(/\.css\.\w+$/,"")),{content:M}=await n("react/react-styled-file.ts",{tag:_,name:T,className:R});await ee.writeFile(v,M),await Ve(v)}),e.parseAsync(process.argv)}Ws().catch(e=>console.error(e));