create-ersn-app
Version:
A CLI for creating applications with personal starter templates I've set up. All templates are stored in separate repositories for easy cloning and use. More templates will be added over time as needed. Feel free to use it if it fits your needs!
2 lines • 245 kB
JavaScript
#!/usr/bin/env node
"use strict";var nc=Object.create;var Lu=Object.defineProperty;var sc=Object.getOwnPropertyDescriptor;var uc=Object.getOwnPropertyNames;var oc=Object.getPrototypeOf,ac=Object.prototype.hasOwnProperty;var Mt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var lc=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of uc(e))!ac.call(t,n)&&n!==r&&Lu(t,n,{get:()=>e[n],enumerable:!(i=sc(e,n))||i.enumerable});return t};var fe=(t,e,r)=>(r=t!=null?nc(oc(t)):{},lc(e||!t||!t.__esModule?Lu(r,"default",{value:t,enumerable:!0}):r,t));var gn=Mt((jm,Pu)=>{"use strict";var mn="\x1B",X=`${mn}[`,cc="\x07",pn={to(t,e){return e?`${X}${e+1};${t+1}H`:`${X}${t+1}G`},move(t,e){let r="";return t<0?r+=`${X}${-t}D`:t>0&&(r+=`${X}${t}C`),e<0?r+=`${X}${-e}A`:e>0&&(r+=`${X}${e}B`),r},up:(t=1)=>`${X}${t}A`,down:(t=1)=>`${X}${t}B`,forward:(t=1)=>`${X}${t}C`,backward:(t=1)=>`${X}${t}D`,nextLine:(t=1)=>`${X}E`.repeat(t),prevLine:(t=1)=>`${X}F`.repeat(t),left:`${X}G`,hide:`${X}?25l`,show:`${X}?25h`,save:`${mn}7`,restore:`${mn}8`},hc={up:(t=1)=>`${X}S`.repeat(t),down:(t=1)=>`${X}T`.repeat(t)},fc={screen:`${X}2J`,up:(t=1)=>`${X}1J`.repeat(t),down:(t=1)=>`${X}J`.repeat(t),line:`${X}2K`,lineEnd:`${X}K`,lineStart:`${X}1K`,lines(t){let e="";for(let r=0;r<t;r++)e+=this.line+(r<t-1?pn.up():"");return t&&(e+=pn.left),e}};Pu.exports={cursor:pn,scroll:hc,erase:fc,beep:cc}});var En=Mt((Um,yn)=>{var Jr=process||{},ju=Jr.argv||[],Qr=Jr.env||{},Dc=!(Qr.NO_COLOR||ju.includes("--no-color"))&&(!!Qr.FORCE_COLOR||ju.includes("--color")||Jr.platform==="win32"||(Jr.stdout||{}).isTTY&&Qr.TERM!=="dumb"||!!Qr.CI),dc=(t,e,r=t)=>i=>{let n=""+i,u=n.indexOf(e,t.length);return~u?t+mc(n,e,r,u)+e:t+n+e},mc=(t,e,r,i)=>{let n="",u=0;do n+=t.substring(u,i)+r,u=i+e.length,i=t.indexOf(e,u);while(~i);return n+t.substring(u)},Uu=(t=Dc)=>{let e=t?dc:()=>String;return{isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};yn.exports=Uu();yn.exports.createColors=Uu});var bo=Mt((In,Ln)=>{(function(t,e){typeof In=="object"&&typeof Ln<"u"?Ln.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.tinycolor=e())})(In,function(){"use strict";function t(f){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},t(f)}var e=/^\s+/,r=/\s+$/;function i(f,d){if(f=f||"",d=d||{},f instanceof i)return f;if(!(this instanceof i))return new i(f,d);var D=n(f);this._originalInput=f,this._r=D.r,this._g=D.g,this._b=D.b,this._a=D.a,this._roundA=Math.round(100*this._a)/100,this._format=d.format||D.format,this._gradientType=d.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=D.ok}i.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var d=this.toRgb();return(d.r*299+d.g*587+d.b*114)/1e3},getLuminance:function(){var d=this.toRgb(),D,v,_,w,U,W;return D=d.r/255,v=d.g/255,_=d.b/255,D<=.03928?w=D/12.92:w=Math.pow((D+.055)/1.055,2.4),v<=.03928?U=v/12.92:U=Math.pow((v+.055)/1.055,2.4),_<=.03928?W=_/12.92:W=Math.pow((_+.055)/1.055,2.4),.2126*w+.7152*U+.0722*W},setAlpha:function(d){return this._a=k(d),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var d=a(this._r,this._g,this._b);return{h:d.h*360,s:d.s,v:d.v,a:this._a}},toHsvString:function(){var d=a(this._r,this._g,this._b),D=Math.round(d.h*360),v=Math.round(d.s*100),_=Math.round(d.v*100);return this._a==1?"hsv("+D+", "+v+"%, "+_+"%)":"hsva("+D+", "+v+"%, "+_+"%, "+this._roundA+")"},toHsl:function(){var d=s(this._r,this._g,this._b);return{h:d.h*360,s:d.s,l:d.l,a:this._a}},toHslString:function(){var d=s(this._r,this._g,this._b),D=Math.round(d.h*360),v=Math.round(d.s*100),_=Math.round(d.l*100);return this._a==1?"hsl("+D+", "+v+"%, "+_+"%)":"hsla("+D+", "+v+"%, "+_+"%, "+this._roundA+")"},toHex:function(d){return l(this._r,this._g,this._b,d)},toHexString:function(d){return"#"+this.toHex(d)},toHex8:function(d){return c(this._r,this._g,this._b,this._a,d)},toHex8String:function(d){return"#"+this.toHex8(d)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(R(this._r,255)*100)+"%",g:Math.round(R(this._g,255)*100)+"%",b:Math.round(R(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(R(this._r,255)*100)+"%, "+Math.round(R(this._g,255)*100)+"%, "+Math.round(R(this._b,255)*100)+"%)":"rgba("+Math.round(R(this._r,255)*100)+"%, "+Math.round(R(this._g,255)*100)+"%, "+Math.round(R(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:ze[l(this._r,this._g,this._b,!0)]||!1},toFilter:function(d){var D="#"+m(this._r,this._g,this._b,this._a),v=D,_=this._gradientType?"GradientType = 1, ":"";if(d){var w=i(d);v="#"+m(w._r,w._g,w._b,w._a)}return"progid:DXImageTransform.Microsoft.gradient("+_+"startColorstr="+D+",endColorstr="+v+")"},toString:function(d){var D=!!d;d=d||this._format;var v=!1,_=this._a<1&&this._a>=0,w=!D&&_&&(d==="hex"||d==="hex6"||d==="hex3"||d==="hex4"||d==="hex8"||d==="name");return w?d==="name"&&this._a===0?this.toName():this.toRgbString():(d==="rgb"&&(v=this.toRgbString()),d==="prgb"&&(v=this.toPercentageRgbString()),(d==="hex"||d==="hex6")&&(v=this.toHexString()),d==="hex3"&&(v=this.toHexString(!0)),d==="hex4"&&(v=this.toHex8String(!0)),d==="hex8"&&(v=this.toHex8String()),d==="name"&&(v=this.toName()),d==="hsl"&&(v=this.toHslString()),d==="hsv"&&(v=this.toHsvString()),v||this.toHexString())},clone:function(){return i(this.toString())},_applyModification:function(d,D){var v=d.apply(null,[this].concat([].slice.call(D)));return this._r=v._r,this._g=v._g,this._b=v._b,this.setAlpha(v._a),this},lighten:function(){return this._applyModification(C,arguments)},brighten:function(){return this._applyModification(A,arguments)},darken:function(){return this._applyModification(B,arguments)},desaturate:function(){return this._applyModification(p,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(G,arguments)},_applyCombination:function(d,D){return d.apply(null,[this].concat([].slice.call(D)))},analogous:function(){return this._applyCombination(ee,arguments)},complement:function(){return this._applyCombination(T,arguments)},monochromatic:function(){return this._applyCombination(ge,arguments)},splitcomplement:function(){return this._applyCombination(P,arguments)},triad:function(){return this._applyCombination(N,[3])},tetrad:function(){return this._applyCombination(N,[4])}},i.fromRatio=function(f,d){if(t(f)=="object"){var D={};for(var v in f)f.hasOwnProperty(v)&&(v==="a"?D[v]=f[v]:D[v]=q(f[v]));f=D}return i(f,d)};function n(f){var d={r:0,g:0,b:0},D=1,v=null,_=null,w=null,U=!1,W=!1;return typeof f=="string"&&(f=rc(f)),t(f)=="object"&&(re(f.r)&&re(f.g)&&re(f.b)?(d=u(f.r,f.g,f.b),U=!0,W=String(f.r).substr(-1)==="%"?"prgb":"rgb"):re(f.h)&&re(f.s)&&re(f.v)?(v=q(f.s),_=q(f.v),d=h(f.h,v,_),U=!0,W="hsv"):re(f.h)&&re(f.s)&&re(f.l)&&(v=q(f.s),w=q(f.l),d=o(f.h,v,w),U=!0,W="hsl"),f.hasOwnProperty("a")&&(D=f.a)),D=k(D),{ok:U,format:f.format||W,r:Math.min(255,Math.max(d.r,0)),g:Math.min(255,Math.max(d.g,0)),b:Math.min(255,Math.max(d.b,0)),a:D}}function u(f,d,D){return{r:R(f,255)*255,g:R(d,255)*255,b:R(D,255)*255}}function s(f,d,D){f=R(f,255),d=R(d,255),D=R(D,255);var v=Math.max(f,d,D),_=Math.min(f,d,D),w,U,W=(v+_)/2;if(v==_)w=U=0;else{var ie=v-_;switch(U=W>.5?ie/(2-v-_):ie/(v+_),v){case f:w=(d-D)/ie+(d<D?6:0);break;case d:w=(D-f)/ie+2;break;case D:w=(f-d)/ie+4;break}w/=6}return{h:w,s:U,l:W}}function o(f,d,D){var v,_,w;f=R(f,360),d=R(d,100),D=R(D,100);function U(Be,pr,Pe){return Pe<0&&(Pe+=1),Pe>1&&(Pe-=1),Pe<1/6?Be+(pr-Be)*6*Pe:Pe<1/2?pr:Pe<2/3?Be+(pr-Be)*(2/3-Pe)*6:Be}if(d===0)v=_=w=D;else{var W=D<.5?D*(1+d):D+d-D*d,ie=2*D-W;v=U(ie,W,f+1/3),_=U(ie,W,f),w=U(ie,W,f-1/3)}return{r:v*255,g:_*255,b:w*255}}function a(f,d,D){f=R(f,255),d=R(d,255),D=R(D,255);var v=Math.max(f,d,D),_=Math.min(f,d,D),w,U,W=v,ie=v-_;if(U=v===0?0:ie/v,v==_)w=0;else{switch(v){case f:w=(d-D)/ie+(d<D?6:0);break;case d:w=(D-f)/ie+2;break;case D:w=(f-d)/ie+4;break}w/=6}return{h:w,s:U,v:W}}function h(f,d,D){f=R(f,360)*6,d=R(d,100),D=R(D,100);var v=Math.floor(f),_=f-v,w=D*(1-d),U=D*(1-_*d),W=D*(1-(1-_)*d),ie=v%6,Be=[D,U,w,w,W,D][ie],pr=[W,D,D,U,w,w][ie],Pe=[w,w,W,D,D,U][ie];return{r:Be*255,g:pr*255,b:Pe*255}}function l(f,d,D,v){var _=[M(Math.round(f).toString(16)),M(Math.round(d).toString(16)),M(Math.round(D).toString(16))];return v&&_[0].charAt(0)==_[0].charAt(1)&&_[1].charAt(0)==_[1].charAt(1)&&_[2].charAt(0)==_[2].charAt(1)?_[0].charAt(0)+_[1].charAt(0)+_[2].charAt(0):_.join("")}function c(f,d,D,v,_){var w=[M(Math.round(f).toString(16)),M(Math.round(d).toString(16)),M(Math.round(D).toString(16)),M(se(v))];return _&&w[0].charAt(0)==w[0].charAt(1)&&w[1].charAt(0)==w[1].charAt(1)&&w[2].charAt(0)==w[2].charAt(1)&&w[3].charAt(0)==w[3].charAt(1)?w[0].charAt(0)+w[1].charAt(0)+w[2].charAt(0)+w[3].charAt(0):w.join("")}function m(f,d,D,v){var _=[M(se(v)),M(Math.round(f).toString(16)),M(Math.round(d).toString(16)),M(Math.round(D).toString(16))];return _.join("")}i.equals=function(f,d){return!f||!d?!1:i(f).toRgbString()==i(d).toRgbString()},i.random=function(){return i.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function p(f,d){d=d===0?0:d||10;var D=i(f).toHsl();return D.s-=d/100,D.s=x(D.s),i(D)}function y(f,d){d=d===0?0:d||10;var D=i(f).toHsl();return D.s+=d/100,D.s=x(D.s),i(D)}function b(f){return i(f).desaturate(100)}function C(f,d){d=d===0?0:d||10;var D=i(f).toHsl();return D.l+=d/100,D.l=x(D.l),i(D)}function A(f,d){d=d===0?0:d||10;var D=i(f).toRgb();return D.r=Math.max(0,Math.min(255,D.r-Math.round(255*-(d/100)))),D.g=Math.max(0,Math.min(255,D.g-Math.round(255*-(d/100)))),D.b=Math.max(0,Math.min(255,D.b-Math.round(255*-(d/100)))),i(D)}function B(f,d){d=d===0?0:d||10;var D=i(f).toHsl();return D.l-=d/100,D.l=x(D.l),i(D)}function G(f,d){var D=i(f).toHsl(),v=(D.h+d)%360;return D.h=v<0?360+v:v,i(D)}function T(f){var d=i(f).toHsl();return d.h=(d.h+180)%360,i(d)}function N(f,d){if(isNaN(d)||d<=0)throw new Error("Argument to polyad must be a positive number");for(var D=i(f).toHsl(),v=[i(f)],_=360/d,w=1;w<d;w++)v.push(i({h:(D.h+w*_)%360,s:D.s,l:D.l}));return v}function P(f){var d=i(f).toHsl(),D=d.h;return[i(f),i({h:(D+72)%360,s:d.s,l:d.l}),i({h:(D+216)%360,s:d.s,l:d.l})]}function ee(f,d,D){d=d||6,D=D||30;var v=i(f).toHsl(),_=360/D,w=[i(f)];for(v.h=(v.h-(_*d>>1)+720)%360;--d;)v.h=(v.h+_)%360,w.push(i(v));return w}function ge(f,d){d=d||6;for(var D=i(f).toHsv(),v=D.h,_=D.s,w=D.v,U=[],W=1/d;d--;)U.push(i({h:v,s:_,v:w})),w=(w+W)%1;return U}i.mix=function(f,d,D){D=D===0?0:D||50;var v=i(f).toRgb(),_=i(d).toRgb(),w=D/100,U={r:(_.r-v.r)*w+v.r,g:(_.g-v.g)*w+v.g,b:(_.b-v.b)*w+v.b,a:(_.a-v.a)*w+v.a};return i(U)},i.readability=function(f,d){var D=i(f),v=i(d);return(Math.max(D.getLuminance(),v.getLuminance())+.05)/(Math.min(D.getLuminance(),v.getLuminance())+.05)},i.isReadable=function(f,d,D){var v=i.readability(f,d),_,w;switch(w=!1,_=ic(D),_.level+_.size){case"AAsmall":case"AAAlarge":w=v>=4.5;break;case"AAlarge":w=v>=3;break;case"AAAsmall":w=v>=7;break}return w},i.mostReadable=function(f,d,D){var v=null,_=0,w,U,W,ie;D=D||{},U=D.includeFallbackColors,W=D.level,ie=D.size;for(var Be=0;Be<d.length;Be++)w=i.readability(f,d[Be]),w>_&&(_=w,v=i(d[Be]));return i.isReadable(f,v,{level:W,size:ie})||!U?v:(D.includeFallbackColors=!1,i.mostReadable(f,["#fff","#000"],D))};var he=i.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},ze=i.hexNames=Re(he);function Re(f){var d={};for(var D in f)f.hasOwnProperty(D)&&(d[f[D]]=D);return d}function k(f){return f=parseFloat(f),(isNaN(f)||f<0||f>1)&&(f=1),f}function R(f,d){I(f)&&(f="100%");var D=L(f);return f=Math.min(d,Math.max(0,parseFloat(f))),D&&(f=parseInt(f*d,10)/100),Math.abs(f-d)<1e-6?1:f%d/parseFloat(d)}function x(f){return Math.min(1,Math.max(0,f))}function E(f){return parseInt(f,16)}function I(f){return typeof f=="string"&&f.indexOf(".")!=-1&&parseFloat(f)===1}function L(f){return typeof f=="string"&&f.indexOf("%")!=-1}function M(f){return f.length==1?"0"+f:""+f}function q(f){return f<=1&&(f=f*100+"%"),f}function se(f){return Math.round(parseFloat(f)*255).toString(16)}function Y(f){return E(f)/255}var te=function(){var f="[-\\+]?\\d+%?",d="[-\\+]?\\d*\\.\\d+%?",D="(?:"+d+")|(?:"+f+")",v="[\\s|\\(]+("+D+")[,|\\s]+("+D+")[,|\\s]+("+D+")\\s*\\)?",_="[\\s|\\(]+("+D+")[,|\\s]+("+D+")[,|\\s]+("+D+")[,|\\s]+("+D+")\\s*\\)?";return{CSS_UNIT:new RegExp(D),rgb:new RegExp("rgb"+v),rgba:new RegExp("rgba"+_),hsl:new RegExp("hsl"+v),hsla:new RegExp("hsla"+_),hsv:new RegExp("hsv"+v),hsva:new RegExp("hsva"+_),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function re(f){return!!te.CSS_UNIT.exec(f)}function rc(f){f=f.replace(e,"").replace(r,"").toLowerCase();var d=!1;if(he[f])f=he[f],d=!0;else if(f=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var D;return(D=te.rgb.exec(f))?{r:D[1],g:D[2],b:D[3]}:(D=te.rgba.exec(f))?{r:D[1],g:D[2],b:D[3],a:D[4]}:(D=te.hsl.exec(f))?{h:D[1],s:D[2],l:D[3]}:(D=te.hsla.exec(f))?{h:D[1],s:D[2],l:D[3],a:D[4]}:(D=te.hsv.exec(f))?{h:D[1],s:D[2],v:D[3]}:(D=te.hsva.exec(f))?{h:D[1],s:D[2],v:D[3],a:D[4]}:(D=te.hex8.exec(f))?{r:E(D[1]),g:E(D[2]),b:E(D[3]),a:Y(D[4]),format:d?"name":"hex8"}:(D=te.hex6.exec(f))?{r:E(D[1]),g:E(D[2]),b:E(D[3]),format:d?"name":"hex"}:(D=te.hex4.exec(f))?{r:E(D[1]+""+D[1]),g:E(D[2]+""+D[2]),b:E(D[3]+""+D[3]),a:Y(D[4]+""+D[4]),format:d?"name":"hex8"}:(D=te.hex3.exec(f))?{r:E(D[1]+""+D[1]),g:E(D[2]+""+D[2]),b:E(D[3]+""+D[3]),format:d?"name":"hex"}:!1}function ic(f){var d,D;return f=f||{level:"AA",size:"small"},d=(f.level||"AA").toUpperCase(),D=(f.size||"small").toLowerCase(),d!=="AA"&&d!=="AAA"&&(d="AA"),D!=="small"&&D!=="large"&&(D="small"),{level:d,size:D}}return i})});var Oo=Mt((Sp,Ao)=>{var Fr=bo(),_o={r:256,g:256,b:256,a:1},So={h:360,s:1,v:1,a:1};function Un(t,e,r){let i={};for(let n in t)t.hasOwnProperty(n)&&(i[n]=r===0?0:(e[n]-t[n])/r);return i}function Gn(t,e,r,i){let n={};for(let u in e)e.hasOwnProperty(u)&&(n[u]=t[u]*r+e[u],n[u]=n[u]<0?n[u]+i[u]:i[u]!==1?n[u]%i[u]:n[u]);return n}function Pn(t,e,r){let i=t.color.toRgb(),n=e.color.toRgb(),u=Un(i,n,r),s=[t.color];for(let o=1;o<r;o++){let a=Gn(u,i,o,_o);s.push(Fr(a))}return s}function Co(t,e,r,i){let n=t.color.toHsv(),u=e.color.toHsv();if(n.s===0||u.s===0)return Pn(t,e,r);let s;if(typeof i=="boolean")s=i;else{let l=n.h<u.h&&u.h-n.h<180||n.h>u.h&&n.h-u.h>180;s=i==="long"&&l||i==="short"&&!l}let o=Un(n,u,r),a=[t.color],h;n.h<=u.h&&!s||n.h>=u.h&&s?h=u.h-n.h:s?h=360-u.h+n.h:h=360-n.h+u.h,o.h=Math.pow(-1,s?1:0)*Math.abs(h)/r;for(let l=1;l<r;l++){let c=Gn(o,n,l,So);a.push(Fr(c))}return a}function Fo(t,e){let r=t.length;if(e=parseInt(e,10),isNaN(e)||e<2)throw new Error("Invalid number of steps (< 2)");if(e<r)throw new Error("Number of steps cannot be inferior to number of stops");let i=[];for(let u=1;u<r;u++){let s=(e-1)*(t[u].pos-t[u-1].pos);i.push(Math.max(1,Math.round(s)))}let n=1;for(let u=r-1;u--;)n+=i[u];for(;n!==e;)if(n<e){let u=Math.min.apply(null,i);i[i.indexOf(u)]++,n++}else{let u=Math.max.apply(null,i);i[i.indexOf(u)]--,n--}return i}function wo(t,e,r,i){if(e<0||e>1)throw new Error("Position must be between 0 and 1");let n,u;for(let a=0,h=t.length;a<h-1;a++)if(e>=t[a].pos&&e<t[a+1].pos){n=t[a],u=t[a+1];break}n||(n=u=t[t.length-1]);let s=Un(n.color[r](),u.color[r](),(u.pos-n.pos)*100),o=Gn(s,n.color[r](),(e-n.pos)*100,i);return Fr(o)}var jn=class t{constructor(e){if(e.length<2)throw new Error("Invalid number of stops (< 2)");let r=e[0].pos!==void 0,i=e.length,n=-1,u=!1;this.stops=e.map((s,o)=>{let a=s.pos!==void 0;if(r^a)throw new Error("Cannot mix positionned and not posionned color stops");if(a){let h=s.color!==void 0;if(!h&&(u||o===0||o===i-1))throw new Error("Cannot define two consecutive position-only stops");if(u=!h,s={color:h?Fr(s.color):null,colorLess:!h,pos:s.pos},s.pos<0||s.pos>1)throw new Error("Color stops positions must be between 0 and 1");if(s.pos<n)throw new Error("Color stops positions are not ordered");n=s.pos}else s={color:Fr(s.color!==void 0?s.color:s),pos:o/(i-1)};return s}),this.stops[0].pos!==0&&(this.stops.unshift({color:this.stops[0].color,pos:0}),i++),this.stops[i-1].pos!==1&&this.stops.push({color:this.stops[i-1].color,pos:1})}reverse(){let e=[];return this.stops.forEach(function(r){e.push({color:r.color,pos:1-r.pos})}),new t(e.reverse())}loop(){let e=[],r=[];return this.stops.forEach(i=>{e.push({color:i.color,pos:i.pos/2})}),this.stops.slice(0,-1).forEach(i=>{r.push({color:i.color,pos:1-i.pos/2})}),new t(e.concat(r.reverse()))}rgb(e){let r=Fo(this.stops,e),i=[];this.stops.forEach((n,u)=>{n.colorLess&&(n.color=Pn(this.stops[u-1],this.stops[u+1],2)[1])});for(let n=0,u=this.stops.length;n<u-1;n++){let s=Pn(this.stops[n],this.stops[n+1],r[n]);i.splice(i.length,0,...s)}return i.push(this.stops[this.stops.length-1].color),i}hsv(e,r){let i=Fo(this.stops,e),n=[];this.stops.forEach((u,s)=>{u.colorLess&&(u.color=Co(this.stops[s-1],this.stops[s+1],2,r)[1])});for(let u=0,s=this.stops.length;u<s-1;u++){let o=Co(this.stops[u],this.stops[u+1],i[u],r);n.splice(n.length,0,...o)}return n.push(this.stops[this.stops.length-1].color),n}css(e,r){e=e||"linear",r=r||(e==="linear"?"to right":"ellipse at center");let i=e+"-gradient("+r;return this.stops.forEach(function(n){i+=", "+(n.colorLess?"":n.color.toRgbString()+" ")+n.pos*100+"%"}),i+=")",i}rgbAt(e){return wo(this.stops,e,"toRgb",_o)}hsvAt(e){return wo(this.stops,e,"toHsv",So)}};Ao.exports=function(t){if(arguments.length===1){if(!Array.isArray(arguments[0]))throw new Error('"stops" is not an array');t=arguments[0]}else t=Array.prototype.slice.call(arguments);return new jn(t)}});var Yl=Mt(mr=>{"use strict";var wh=require("fs"),_h=require("path"),Sh=require("events"),Ah=require("stream"),Oh=require("string_decoder"),Rh=require("assert"),Bh=require("buffer"),Th=require("zlib"),xh=require("util"),$h=require("crypto"),kh=require("os"),Mh=require("tty"),Nh=require("constants"),Ih=require("https"),Lh=require("child_process"),Ph=require("url"),jh=require("net"),Uh=require("tls");function ce(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var g=ce(wh),F=ce(_h),ar=ce(Sh),Fs=ce(Ah),Gh=ce(Oh),$=ce(Rh),zh=ce(Bh),ws=ce(Th),Ye=ce(xh),_a=ce($h),_s=ce(kh),Ss=ce(Mh),ct=ce(Nh),Hh=ce(Ih),Wh=ce(Lh),Sa=ce(Ph),qh=ce(jh),Yh=ce(Uh),Le=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ge(t){var e={exports:{}};return t(e,e.exports),e.exports}var xo=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]),Yr=t=>t?Object.keys(t).map(e=>[xo.has(e)?xo.get(e):e,t[e]]).reduce((e,r)=>(e[r[0]]=r[1],e),Object.create(null)):{},Vh=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}},St=j;j.Node=Ot;j.create=j;function j(t){var e=this;if(e instanceof j||(e=new j),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(n){e.push(n)});else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)e.push(arguments[r]);return e}j.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};j.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};j.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};j.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)Zh(this,arguments[t]);return this.length};j.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)Xh(this,arguments[t]);return this.length};j.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};j.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};j.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,i=0;r!==null;i++)t.call(e,r.value,i,this),r=r.next};j.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,i=this.length-1;r!==null;i--)t.call(e,r.value,i,this),r=r.prev};j.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};j.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};j.prototype.map=function(t,e){e=e||this;for(var r=new j,i=this.head;i!==null;)r.push(t.call(e,i.value,this)),i=i.next;return r};j.prototype.mapReverse=function(t,e){e=e||this;for(var r=new j,i=this.tail;i!==null;)r.push(t.call(e,i.value,this)),i=i.prev;return r};j.prototype.reduce=function(t,e){var r,i=this.head;if(arguments.length>1)r=e;else if(this.head)i=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;i!==null;n++)r=t(r,i.value,n),i=i.next;return r};j.prototype.reduceReverse=function(t,e){var r,i=this.tail;if(arguments.length>1)r=e;else if(this.tail)i=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=this.length-1;i!==null;n--)r=t(r,i.value,n),i=i.prev;return r};j.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};j.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};j.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new j;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var i=0,n=this.head;n!==null&&i<t;i++)n=n.next;for(;n!==null&&i<e;i++,n=n.next)r.push(n.value);return r};j.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new j;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var i=this.length,n=this.tail;n!==null&&i>e;i--)n=n.prev;for(;n!==null&&i>t;i--,n=n.prev)r.push(n.value);return r};j.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var i=0,n=this.head;n!==null&&i<t;i++)n=n.next;for(var u=[],i=0;n&&i<e;i++)u.push(n.value),n=this.removeNode(n);n===null&&(n=this.tail),n!==this.head&&n!==this.tail&&(n=n.prev);for(var i=0;i<r.length;i++)n=Kh(this,n,r[i]);return u};j.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var i=r.prev;r.prev=r.next,r.next=i}return this.head=e,this.tail=t,this};function Kh(t,e,r){var i=e===t.head?new Ot(r,null,e,t):new Ot(r,e,e.next,t);return i.next===null&&(t.tail=i),i.prev===null&&(t.head=i),t.length++,i}function Zh(t,e){t.tail=new Ot(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function Xh(t,e){t.head=new Ot(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function Ot(t,e,r,i){if(!(this instanceof Ot))return new Ot(t,e,r,i);this.list=i,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{Vh(j)}catch{}var $o=Gh.default.StringDecoder,Ve=Symbol("EOF"),wr=Symbol("maybeEmitEnd"),nt=Symbol("emittedEnd"),Di=Symbol("emittingEnd"),di=Symbol("closed"),ko=Symbol("read"),Yn=Symbol("flush"),Mo=Symbol("flushChunk"),be=Symbol("encoding"),Ke=Symbol("decoder"),mi=Symbol("flowing"),_r=Symbol("paused"),Sr=Symbol("resume"),ye=Symbol("bufferLength"),No=Symbol("bufferPush"),Vn=Symbol("bufferShift"),me=Symbol("objectMode"),pe=Symbol("destroyed"),Aa=Le._MP_NO_ITERATOR_SYMBOLS_!=="1",Qh=Aa&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),Jh=Aa&&Symbol.iterator||Symbol("iterator not implemented"),Io=t=>t==="end"||t==="finish"||t==="prefinish",ef=t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,tf=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),lr=class Oa extends Fs.default{constructor(e){super(),this[mi]=!1,this[_r]=!1,this.pipes=new St,this.buffer=new St,this[me]=e&&e.objectMode||!1,this[me]?this[be]=null:this[be]=e&&e.encoding||null,this[be]==="buffer"&&(this[be]=null),this[Ke]=this[be]?new $o(this[be]):null,this[Ve]=!1,this[nt]=!1,this[Di]=!1,this[di]=!1,this.writable=!0,this.readable=!0,this[ye]=0,this[pe]=!1}get bufferLength(){return this[ye]}get encoding(){return this[be]}set encoding(e){if(this[me])throw new Error("cannot set encoding in objectMode");if(this[be]&&e!==this[be]&&(this[Ke]&&this[Ke].lastNeed||this[ye]))throw new Error("cannot change encoding");this[be]!==e&&(this[Ke]=e?new $o(e):null,this.buffer.length&&(this.buffer=this.buffer.map(r=>this[Ke].write(r)))),this[be]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[me]}set objectMode(e){this[me]=this[me]||!!e}write(e,r,i){if(this[Ve])throw new Error("write after end");return this[pe]?(this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0):(typeof r=="function"&&(i=r,r="utf8"),r||(r="utf8"),!this[me]&&!Buffer.isBuffer(e)&&(tf(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):ef(e)?e=Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),!this.objectMode&&!e.length?(this[ye]!==0&&this.emit("readable"),i&&i(),this.flowing):(typeof e=="string"&&!this[me]&&!(r===this[be]&&!this[Ke].lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[be]&&(e=this[Ke].write(e)),this.flowing?(this[ye]!==0&&this[Yn](!0),this.emit("data",e)):this[No](e),this[ye]!==0&&this.emit("readable"),i&&i(),this.flowing))}read(e){if(this[pe])return null;try{return this[ye]===0||e===0||e>this[ye]?null:(this[me]&&(e=null),this.buffer.length>1&&!this[me]&&(this.encoding?this.buffer=new St([Array.from(this.buffer).join("")]):this.buffer=new St([Buffer.concat(Array.from(this.buffer),this[ye])])),this[ko](e||null,this.buffer.head.value))}finally{this[wr]()}}[ko](e,r){return e===r.length||e===null?this[Vn]():(this.buffer.head.value=r.slice(e),r=r.slice(0,e),this[ye]-=e),this.emit("data",r),!this.buffer.length&&!this[Ve]&&this.emit("drain"),r}end(e,r,i){return typeof e=="function"&&(i=e,e=null),typeof r=="function"&&(i=r,r="utf8"),e&&this.write(e,r),i&&this.once("end",i),this[Ve]=!0,this.writable=!1,(this.flowing||!this[_r])&&this[wr](),this}[Sr](){this[pe]||(this[_r]=!1,this[mi]=!0,this.emit("resume"),this.buffer.length?this[Yn]():this[Ve]?this[wr]():this.emit("drain"))}resume(){return this[Sr]()}pause(){this[mi]=!1,this[_r]=!0}get destroyed(){return this[pe]}get flowing(){return this[mi]}get paused(){return this[_r]}[No](e){return this[me]?this[ye]+=1:this[ye]+=e.length,this.buffer.push(e)}[Vn](){return this.buffer.length&&(this[me]?this[ye]-=1:this[ye]-=this.buffer.head.value.length),this.buffer.shift()}[Yn](e){do;while(this[Mo](this[Vn]()));!e&&!this.buffer.length&&!this[Ve]&&this.emit("drain")}[Mo](e){return e?(this.emit("data",e),this.flowing):!1}pipe(e,r){if(this[pe])return;let i=this[nt];r=r||{},e===process.stdout||e===process.stderr?r.end=!1:r.end=r.end!==!1;let n={dest:e,opts:r,ondrain:u=>this[Sr]()};return this.pipes.push(n),e.on("drain",n.ondrain),this[Sr](),i&&n.opts.end&&n.dest.end(),e}addListener(e,r){return this.on(e,r)}on(e,r){try{return super.on(e,r)}finally{e==="data"&&!this.pipes.length&&!this.flowing?this[Sr]():Io(e)&&this[nt]&&(super.emit(e),this.removeAllListeners(e))}}get emittedEnd(){return this[nt]}[wr](){!this[Di]&&!this[nt]&&!this[pe]&&this.buffer.length===0&&this[Ve]&&(this[Di]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[di]&&this.emit("close"),this[Di]=!1)}emit(e,r){if(e!=="error"&&e!=="close"&&e!==pe&&this[pe])return;if(e==="data"){if(!r)return;this.pipes.length&&this.pipes.forEach(n=>n.dest.write(r)===!1&&this.pause())}else if(e==="end"){if(this[nt]===!0)return;this[nt]=!0,this.readable=!1,this[Ke]&&(r=this[Ke].end(),r&&(this.pipes.forEach(n=>n.dest.write(r)),super.emit("data",r))),this.pipes.forEach(n=>{n.dest.removeListener("drain",n.ondrain),n.opts.end&&n.dest.end()})}else if(e==="close"&&(this[di]=!0,!this[nt]&&!this[pe]))return;let i=new Array(arguments.length);if(i[0]=e,i[1]=r,arguments.length>2)for(let n=2;n<arguments.length;n++)i[n]=arguments[n];try{return super.emit.apply(this,i)}finally{Io(e)?this.removeAllListeners(e):this[wr]()}}collect(){let e=[];this[me]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[me]||(e.dataLength+=i.length)}),r.then(()=>e)}concat(){return this[me]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[me]?Promise.reject(new Error("cannot concat in objectMode")):this[be]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,r)=>{this.on(pe,()=>r(new Error("stream destroyed"))),this.on("end",()=>e()),this.on("error",i=>r(i))})}[Qh](){return{next:()=>{let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[Ve])return Promise.resolve({done:!0});let i=null,n=null,u=h=>{this.removeListener("data",s),this.removeListener("end",o),n(h)},s=h=>{this.removeListener("error",u),this.removeListener("end",o),this.pause(),i({value:h,done:!!this[Ve]})},o=()=>{this.removeListener("error",u),this.removeListener("data",s),i({done:!0})},a=()=>u(new Error("stream destroyed"));return new Promise((h,l)=>{n=l,i=h,this.once(pe,a),this.once("error",u),this.once("end",o),this.once("data",s)})}}}[Jh](){return{next:()=>{let r=this.read();return{value:r,done:r===null}}}}destroy(e){return this[pe]?(e?this.emit("error",e):this.emit(pe),this):(this[pe]=!0,this.buffer=new St,this[ye]=0,typeof this.close=="function"&&!this[di]&&this.close(),e?this.emit("error",e):this.emit(pe),this)}static isStream(e){return!!e&&(e instanceof Oa||e instanceof Fs.default||e instanceof ar.default&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}},rf=ws.default.constants||{ZLIB_VERNUM:4736},nf=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},rf)),Ra=Ge(function(t,e){let r=zh.default.Buffer,i=e.constants=nf,n=r.concat,u=Symbol("_superWrite");class s extends Error{constructor(E){super("zlib: "+E.message),this.code=E.code,this.errno=E.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+E.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}}let o=Symbol("opts"),a=Symbol("flushFlag"),h=Symbol("finishFlushFlag"),l=Symbol("fullFlushFlag"),c=Symbol("handle"),m=Symbol("onError"),p=Symbol("sawError"),y=Symbol("level"),b=Symbol("strategy"),C=Symbol("ended");class A extends lr{constructor(E,I){if(!E||typeof E!="object")throw new TypeError("invalid options for ZlibBase constructor");super(E),this[p]=!1,this[C]=!1,this[o]=E,this[a]=E.flush,this[h]=E.finishFlush;try{this[c]=new ws.default[I](E)}catch(L){throw new s(L)}this[m]=L=>{this[p]||(this[p]=!0,this.close(),this.emit("error",L))},this[c].on("error",L=>this[m](new s(L))),this.once("end",()=>this.close)}close(){this[c]&&(this[c].close(),this[c]=null,this.emit("close"))}reset(){if(!this[p])return $.default(this[c],"zlib binding closed"),this[c].reset()}flush(E){this.ended||(typeof E!="number"&&(E=this[l]),this.write(Object.assign(r.alloc(0),{[a]:E})))}end(E,I,L){return E&&this.write(E,I),this.flush(this[h]),this[C]=!0,super.end(null,null,L)}get ended(){return this[C]}write(E,I,L){if(typeof I=="function"&&(L=I,I="utf8"),typeof E=="string"&&(E=r.from(E,I)),this[p])return;$.default(this[c],"zlib binding closed");let M=this[c]._handle,q=M.close;M.close=()=>{};let se=this[c].close;this[c].close=()=>{},r.concat=re=>re;let Y;try{let re=typeof E[a]=="number"?E[a]:this[a];Y=this[c]._processChunk(E,re),r.concat=n}catch(re){r.concat=n,this[m](new s(re))}finally{this[c]&&(this[c]._handle=M,M.close=q,this[c].close=se,this[c].removeAllListeners("error"))}this[c]&&this[c].on("error",re=>this[m](new s(re)));let te;if(Y)if(Array.isArray(Y)&&Y.length>0){te=this[u](r.from(Y[0]));for(let re=1;re<Y.length;re++)te=this[u](Y[re])}else te=this[u](r.from(Y));return L&&L(),te}[u](E){return super.write(E)}}class B extends A{constructor(E,I){E=E||{},E.flush=E.flush||i.Z_NO_FLUSH,E.finishFlush=E.finishFlush||i.Z_FINISH,super(E,I),this[l]=i.Z_FULL_FLUSH,this[y]=E.level,this[b]=E.strategy}params(E,I){if(!this[p]){if(!this[c])throw new Error("cannot switch params when binding is closed");if(!this[c].params)throw new Error("not supported in this implementation");if(this[y]!==E||this[b]!==I){this.flush(i.Z_SYNC_FLUSH),$.default(this[c],"zlib binding closed");let L=this[c].flush;this[c].flush=(M,q)=>{this.flush(M),q()};try{this[c].params(E,I)}finally{this[c].flush=L}this[c]&&(this[y]=E,this[b]=I)}}}}class G extends B{constructor(E){super(E,"Deflate")}}class T extends B{constructor(E){super(E,"Inflate")}}let N=Symbol("_portable");class P extends B{constructor(E){super(E,"Gzip"),this[N]=E&&!!E.portable}[u](E){return this[N]?(this[N]=!1,E[9]=255,super[u](E)):super[u](E)}}class ee extends B{constructor(E){super(E,"Gunzip")}}class ge extends B{constructor(E){super(E,"DeflateRaw")}}class he extends B{constructor(E){super(E,"InflateRaw")}}class ze extends B{constructor(E){super(E,"Unzip")}}class Re extends A{constructor(E,I){E=E||{},E.flush=E.flush||i.BROTLI_OPERATION_PROCESS,E.finishFlush=E.finishFlush||i.BROTLI_OPERATION_FINISH,super(E,I),this[l]=i.BROTLI_OPERATION_FLUSH}}class k extends Re{constructor(E){super(E,"BrotliCompress")}}class R extends Re{constructor(E){super(E,"BrotliDecompress")}}e.Deflate=G,e.Inflate=T,e.Gzip=P,e.Gunzip=ee,e.DeflateRaw=ge,e.InflateRaw=he,e.Unzip=ze,typeof ws.default.BrotliCompress=="function"?(e.BrotliCompress=k,e.BrotliDecompress=R):e.BrotliCompress=e.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}}),Kn=Symbol("slurp"),gu=class extends lr{constructor(e,r,i){switch(super(),this.pause(),this.extended=r,this.globalExtended=i,this.header=e,this.startBlockSize=512*Math.ceil(e.size/512),this.blockRemain=this.startBlockSize,this.remain=e.size,this.type=e.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=e.path,this.mode=e.mode,this.mode&&(this.mode=this.mode&4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=e.size,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=e.linkpath,this.uname=e.uname,this.gname=e.gname,r&&this[Kn](r),i&&this[Kn](i,!0)}write(e){let r=e.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");let i=this.remain,n=this.blockRemain;return this.remain=Math.max(0,i-r),this.blockRemain=Math.max(0,n-r),this.ignore?!0:i>=r?super.write(e):super.write(e.slice(0,i))}[Kn](e,r){for(let i in e)e[i]!==null&&e[i]!==void 0&&!(r&&i==="path")&&(this[i]=e[i])}},Bi=Ge(function(t,e){e.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]),e.code=new Map(Array.from(e.name).map(r=>[r[1],r[0]]))}),sf=(t,e)=>{if(Number.isSafeInteger(t))t<0?of(t,e):uf(t,e);else throw Error("cannot encode number outside of javascript safe integer range");return e},uf=(t,e)=>{e[0]=128;for(var r=e.length;r>1;r--)e[r-1]=t&255,t=Math.floor(t/256)},of=(t,e)=>{e[0]=255;var r=!1;t=t*-1;for(var i=e.length;i>1;i--){var n=t&255;t=Math.floor(t/256),r?e[i-1]=Ba(n):n===0?e[i-1]=0:(r=!0,e[i-1]=Ta(n))}},af=t=>{let e=t[0],r=e===128?cf(t.slice(1,t.length)):e===255?lf(t):null;if(r===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(r))throw Error("parsed number outside of javascript safe integer range");return r},lf=t=>{for(var e=t.length,r=0,i=!1,n=e-1;n>-1;n--){var u=t[n],s;i?s=Ba(u):u===0?s=u:(i=!0,s=Ta(u)),s!==0&&(r-=s*Math.pow(256,e-n-1))}return r},cf=t=>{for(var e=t.length,r=0,i=e-1;i>-1;i--){var n=t[i];n!==0&&(r+=n*Math.pow(256,e-i-1))}return r},Ba=t=>(255^t)&255,Ta=t=>(255^t)+1&255,xa={encode:sf,parse:af},zt=F.default.posix,Zn=Symbol("slurp"),Ae=Symbol("type"),As=class{constructor(e,r,i,n){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[Ae]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(e)?this.decode(e,r||0,i,n):e&&this.set(e)}decode(e,r,i,n){if(r||(r=0),!e||!(e.length>=r+512))throw new Error("need 512 bytes for header");if(this.path=yt(e,r,100),this.mode=ot(e,r+100,8),this.uid=ot(e,r+108,8),this.gid=ot(e,r+116,8),this.size=ot(e,r+124,12),this.mtime=Xn(e,r+136,12),this.cksum=ot(e,r+148,12),this[Zn](i),this[Zn](n,!0),this[Ae]=yt(e,r+156,1),this[Ae]===""&&(this[Ae]="0"),this[Ae]==="0"&&this.path.substr(-1)==="/"&&(this[Ae]="5"),this[Ae]==="5"&&(this.size=0),this.linkpath=yt(e,r+157,100),e.slice(r+257,r+265).toString()==="ustar\x0000")if(this.uname=yt(e,r+265,32),this.gname=yt(e,r+297,32),this.devmaj=ot(e,r+329,8),this.devmin=ot(e,r+337,8),e[r+475]!==0){let s=yt(e,r+345,155);this.path=s+"/"+this.path}else{let s=yt(e,r+345,130);s&&(this.path=s+"/"+this.path),this.atime=Xn(e,r+476,12),this.ctime=Xn(e,r+488,12)}let u=8*32;for(let s=r;s<r+148;s++)u+=e[s];for(let s=r+156;s<r+512;s++)u+=e[s];this.cksumValid=u===this.cksum,this.cksum===null&&u===8*32&&(this.nullBlock=!0)}[Zn](e,r){for(let i in e)e[i]!==null&&e[i]!==void 0&&!(r&&i==="path")&&(this[i]=e[i])}encode(e,r){if(e||(e=this.block=Buffer.alloc(512),r=0),r||(r=0),!(e.length>=r+512))throw new Error("need 512 bytes for header");let i=this.ctime||this.atime?130:155,n=hf(this.path||"",i),u=n[0],s=n[1];this.needPax=n[2],this.needPax=Et(e,r,100,u)||this.needPax,this.needPax=at(e,r+100,8,this.mode)||this.needPax,this.needPax=at(e,r+108,8,this.uid)||this.needPax,this.needPax=at(e,r+116,8,this.gid)||this.needPax,this.needPax=at(e,r+124,12,this.size)||this.needPax,this.needPax=Qn(e,r+136,12,this.mtime)||this.needPax,e[r+156]=this[Ae].charCodeAt(0),this.needPax=Et(e,r+157,100,this.linkpath)||this.needPax,e.write("ustar\x0000",r+257,8),this.needPax=Et(e,r+265,32,this.uname)||this.needPax,this.needPax=Et(e,r+297,32,this.gname)||this.needPax,this.needPax=at(e,r+329,8,this.devmaj)||this.needPax,this.needPax=at(e,r+337,8,this.devmin)||this.needPax,this.needPax=Et(e,r+345,i,s)||this.needPax,e[r+475]!==0?this.needPax=Et(e,r+345,155,s)||this.needPax:(this.needPax=Et(e,r+345,130,s)||this.needPax,this.needPax=Qn(e,r+476,12,this.atime)||this.needPax,this.needPax=Qn(e,r+488,12,this.ctime)||this.needPax);let o=8*32;for(let a=r;a<r+148;a++)o+=e[a];for(let a=r+156;a<r+512;a++)o+=e[a];return this.cksum=o,at(e,r+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(e){for(let r in e)e[r]!==null&&e[r]!==void 0&&(this[r]=e[r])}get type(){return Bi.name.get(this[Ae])||this[Ae]}get typeKey(){return this[Ae]}set type(e){Bi.code.has(e)?this[Ae]=Bi.code.get(e):this[Ae]=e}},hf=(t,e)=>{let i=t,n="",u,s=zt.parse(t).root||".";if(Buffer.byteLength(i)<100)u=[i,n,!1];else{n=zt.dirname(i),i=zt.basename(i);do Buffer.byteLength(i)<=100&&Buffer.byteLength(n)<=e?u=[i,n,!1]:Buffer.byteLength(i)>100&&Buffer.byteLength(n)<=e?u=[i.substr(0,99),n,!0]:(i=zt.join(zt.basename(n),i),n=zt.dirname(n));while(n!==s&&!u);u||(u=[t.substr(0,99),"",!0])}return u},yt=(t,e,r)=>t.slice(e,e+r).toString("utf8").replace(/\0.*/,""),Xn=(t,e,r)=>ff(ot(t,e,r)),ff=t=>t===null?null:new Date(t*1e3),ot=(t,e,r)=>t[e]&128?xa.parse(t.slice(e,e+r)):df(t,e,r),Df=t=>isNaN(t)?null:t,df=(t,e,r)=>Df(parseInt(t.slice(e,e+r).toString("utf8").replace(/\0.*$/,"").trim(),8)),mf={12:8589934591,8:2097151},at=(t,e,r,i)=>i===null?!1:i>mf[r]||i<0?(xa.encode(i,t.slice(e,e+r)),!0):(pf(t,e,r,i),!1),pf=(t,e,r,i)=>t.write(gf(i,r),e,r,"ascii"),gf=(t,e)=>yf(Math.floor(t).toString(8),e),yf=(t,e)=>(t.length===e-1?t:new Array(e-t.length-1).join("0")+t+" ")+"\0",Qn=(t,e,r,i)=>i===null?!1:at(t,e,r,i.getTime()/1e3),Ef=new Array(156).join("\0"),Et=(t,e,r,i)=>i===null?!1:(t.write(i+Ef,e,r,"utf8"),i.length!==Buffer.byteLength(i)||i.length>r),xt=As,Lr=class{constructor(e,r){this.atime=e.atime||null,this.charset=e.charset||null,this.comment=e.comment||null,this.ctime=e.ctime||null,this.gid=e.gid||null,this.gname=e.gname||null,this.linkpath=e.linkpath||null,this.mtime=e.mtime||null,this.path=e.path||null,this.size=e.size||null,this.uid=e.uid||null,this.uname=e.uname||null,this.dev=e.dev||null,this.ino=e.ino||null,this.nlink=e.nlink||null,this.global=r||!1}encode(){let e=this.encodeBody();if(e==="")return null;let r=Buffer.byteLength(e),i=512*Math.ceil(1+r/512),n=Buffer.allocUnsafe(i);for(let u=0;u<512;u++)n[u]=0;new xt({path:("PaxHeader/"+F.default.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:r,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname