@gadgetinc/ggt 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-FTY6SEGW.js → add-HUMZSYPA.js} +2 -2
- package/dist/{chunk-P5UB5UJ6.js → chunk-2V7EFUWO.js} +2 -2
- package/dist/chunk-56W5U2JG.js +2 -0
- package/dist/{chunk-IOJ2LNUK.js.map → chunk-56W5U2JG.js.map} +4 -4
- package/dist/{chunk-KXSKHE3X.js → chunk-C4CHGCKD.js} +2 -2
- package/dist/{chunk-VF4CDM7R.js → chunk-DAFEHCX5.js} +2 -2
- package/dist/{chunk-LMY5YGE5.js → chunk-DNS7DZ7M.js} +2 -2
- package/dist/{chunk-SWVUOPJX.js → chunk-E3RC22HP.js} +2 -2
- package/dist/{chunk-O3D5GVFK.js → chunk-F3F5GSUN.js} +2 -2
- package/dist/{chunk-B2QVXD4S.js → chunk-GPJRJAHB.js} +2 -2
- package/dist/chunk-O63J4YN5.js +2 -0
- package/dist/{chunk-WCP5LTNQ.js → chunk-Q5CNYV3H.js} +3 -3
- package/dist/{chunk-ZZIIWV6T.js → chunk-U43YGCFP.js} +2 -2
- package/dist/{chunk-DKP76YB2.js → chunk-WGSJ2P6E.js} +2 -2
- package/dist/{chunk-FLX4WQHD.js → chunk-XGAPULF7.js} +2 -2
- package/dist/{chunk-YB7NQA2X.js → chunk-YLVZEUX7.js} +2 -2
- package/dist/chunk-ZCRXH55K.js +2 -0
- package/dist/chunk-ZCRXH55K.js.map +7 -0
- package/dist/{deploy-PQZW3X7G.js → deploy-HTVGCFPH.js} +2 -2
- package/dist/{dev-27YLA4GG.js → dev-MTMQ4VKF.js} +2 -2
- package/dist/esm-OUX6XF3H.js +37 -0
- package/dist/esm-OUX6XF3H.js.map +7 -0
- package/dist/{list-OTGSESA6.js → list-Q3ZPCSNL.js} +2 -2
- package/dist/login-5G4ANYDD.js +2 -0
- package/dist/logout-2U2LIOQ5.js +7 -0
- package/dist/main.js +2 -2
- package/dist/main.js.map +1 -1
- package/dist/{open-QPMDV7ZL.js → open-L5IB23E5.js} +2 -2
- package/dist/{pull-3DUIUAIP.js → pull-K5U5GMEP.js} +2 -2
- package/dist/push-ADPB3Y24.js +2 -0
- package/dist/{status-N3VF5MBE.js → status-HSABHX5Y.js} +2 -2
- package/dist/{version-EGM7PLFX.js → version-E5ZPB4IG.js} +2 -2
- package/dist/{whoami-ES6XN3RI.js → whoami-UFOCKGBK.js} +2 -2
- package/package.json +8 -8
- package/dist/chunk-6BALPDKR.js +0 -2
- package/dist/chunk-6BALPDKR.js.map +0 -7
- package/dist/chunk-IOJ2LNUK.js +0 -2
- package/dist/chunk-RLMEA3WE.js +0 -2
- package/dist/esm-RPCDY7LG.js +0 -36
- package/dist/esm-RPCDY7LG.js.map +0 -7
- package/dist/login-YOXXXAJN.js +0 -2
- package/dist/logout-5YOHPXGR.js +0 -7
- package/dist/push-RS6QHKDD.js +0 -2
- /package/dist/{add-FTY6SEGW.js.map → add-HUMZSYPA.js.map} +0 -0
- /package/dist/{chunk-P5UB5UJ6.js.map → chunk-2V7EFUWO.js.map} +0 -0
- /package/dist/{chunk-KXSKHE3X.js.map → chunk-C4CHGCKD.js.map} +0 -0
- /package/dist/{chunk-VF4CDM7R.js.map → chunk-DAFEHCX5.js.map} +0 -0
- /package/dist/{chunk-LMY5YGE5.js.map → chunk-DNS7DZ7M.js.map} +0 -0
- /package/dist/{chunk-SWVUOPJX.js.map → chunk-E3RC22HP.js.map} +0 -0
- /package/dist/{chunk-O3D5GVFK.js.map → chunk-F3F5GSUN.js.map} +0 -0
- /package/dist/{chunk-B2QVXD4S.js.map → chunk-GPJRJAHB.js.map} +0 -0
- /package/dist/{chunk-RLMEA3WE.js.map → chunk-O63J4YN5.js.map} +0 -0
- /package/dist/{chunk-WCP5LTNQ.js.map → chunk-Q5CNYV3H.js.map} +0 -0
- /package/dist/{chunk-ZZIIWV6T.js.map → chunk-U43YGCFP.js.map} +0 -0
- /package/dist/{chunk-DKP76YB2.js.map → chunk-WGSJ2P6E.js.map} +0 -0
- /package/dist/{chunk-FLX4WQHD.js.map → chunk-XGAPULF7.js.map} +0 -0
- /package/dist/{chunk-YB7NQA2X.js.map → chunk-YLVZEUX7.js.map} +0 -0
- /package/dist/{deploy-PQZW3X7G.js.map → deploy-HTVGCFPH.js.map} +0 -0
- /package/dist/{dev-27YLA4GG.js.map → dev-MTMQ4VKF.js.map} +0 -0
- /package/dist/{list-OTGSESA6.js.map → list-Q3ZPCSNL.js.map} +0 -0
- /package/dist/{login-YOXXXAJN.js.map → login-5G4ANYDD.js.map} +0 -0
- /package/dist/{logout-5YOHPXGR.js.map → logout-2U2LIOQ5.js.map} +0 -0
- /package/dist/{open-QPMDV7ZL.js.map → open-L5IB23E5.js.map} +0 -0
- /package/dist/{pull-3DUIUAIP.js.map → pull-K5U5GMEP.js.map} +0 -0
- /package/dist/{push-RS6QHKDD.js.map → push-ADPB3Y24.js.map} +0 -0
- /package/dist/{status-N3VF5MBE.js.map → status-HSABHX5Y.js.map} +0 -0
- /package/dist/{version-EGM7PLFX.js.map → version-E5ZPB4IG.js.map} +0 -0
- /package/dist/{whoami-ES6XN3RI.js.map → whoami-UFOCKGBK.js.map} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{d as un,e as fn,f as hn}from"./chunk-SWVUOPJX.js";import{$ as cn,A as Ve,B as on,E as ue,K as le,L as an,M as W,N as ln,P as G,T as Xt,U as er,Z as we,_ as Ot,a as Kr,b as Zr,c as Xr,d as ge,e as $,f as tn,g as Tt,h as We,i as Yt,j as Jt,k as Kt,m as Zt,o as rn,w as nn,x as sn}from"./chunk-KXSKHE3X.js";import{a as Qt,b as en}from"./chunk-B2QVXD4S.js";import{a as o,b as j,d as F,f as ae,h}from"./chunk-IOJ2LNUK.js";var yn=F((Ja,gn)=>{"use strict";h();var Bs=j("os"),mn=j("tty"),he=en(),{env:X}=process,Be;he("no-color")||he("no-colors")||he("color=false")||he("color=never")?Be=0:(he("color")||he("colors")||he("color=true")||he("color=always"))&&(Be=1);"FORCE_COLOR"in X&&(X.FORCE_COLOR==="true"?Be=1:X.FORCE_COLOR==="false"?Be=0:Be=X.FORCE_COLOR.length===0?1:Math.min(parseInt(X.FORCE_COLOR,10),3));function tr(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}o(tr,"translateLevel");function rr(t,e){if(Be===0)return 0;if(he("color=16m")||he("color=full")||he("color=truecolor"))return 3;if(he("color=256"))return 2;if(t&&!e&&Be===void 0)return 0;let r=Be||0;if(X.TERM==="dumb")return r;if(process.platform==="win32"){let n=Bs.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in X)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in X)||X.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in X)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(X.TEAMCITY_VERSION)?1:0;if(X.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in X){let n=parseInt((X.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(X.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(X.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(X.TERM)||"COLORTERM"in X?1:r}o(rr,"supportsColor");function Ds(t){let e=rr(t,t&&t.isTTY);return tr(e)}o(Ds,"getSupportLevel");gn.exports={supportsColor:Ds,stdout:tr(rr(!0,mn.isatty(1))),stderr:tr(rr(!0,mn.isatty(2)))}});var xn=F((Xa,_n)=>{"use strict";h();var $s=yn(),He=en();function bn(t){if(/^\d{3,4}$/.test(t)){let r=/(\d{1,2})(\d{2})/.exec(t);return{major:0,minor:parseInt(r[1],10),patch:parseInt(r[2],10)}}let e=(t||"").split(".").map(r=>parseInt(r,10));return{major:e[0],minor:e[1],patch:e[2]}}o(bn,"parseVersion");function nr(t){let{env:e}=process;if("FORCE_HYPERLINK"in e)return!(e.FORCE_HYPERLINK.length>0&&parseInt(e.FORCE_HYPERLINK,10)===0);if(He("no-hyperlink")||He("no-hyperlinks")||He("hyperlink=false")||He("hyperlink=never"))return!1;if(He("hyperlink=true")||He("hyperlink=always")||"NETLIFY"in e)return!0;if(!$s.supportsColor(t)||t&&!t.isTTY||process.platform==="win32"||"CI"in e||"TEAMCITY_VERSION"in e)return!1;if("TERM_PROGRAM"in e){let r=bn(e.TERM_PROGRAM_VERSION);switch(e.TERM_PROGRAM){case"iTerm.app":return r.major===3?r.minor>=1:r.major>3;case"WezTerm":return r.major>=20200620;case"vscode":return r.major>1||r.major===1&&r.minor>=72}}if("VTE_VERSION"in e){if(e.VTE_VERSION==="0.50.0")return!1;let r=bn(e.VTE_VERSION);return r.major>0||r.minor>=50}return!1}o(nr,"supportsHyperlink");_n.exports={supportsHyperlink:nr,stdout:nr(process.stdout),stderr:nr(process.stderr)}});var Rn=F((lr,cr)=>{h();(function(t,e){typeof lr=="object"&&typeof cr<"u"?cr.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(lr,function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",i="second",s="minute",a="hour",u="day",l="week",f="month",p="quarter",d="year",b="date",c="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,T={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:o(function(O){var E=["th","st","nd","rd"],w=O%100;return"["+O+(E[(w-20)%10]||E[w]||E[0])+"]"},"ordinal")},B=o(function(O,E,w){var y=String(O);return!y||y.length>=E?O:""+Array(E+1-y.length).join(w)+O},"m"),M={s:B,z:o(function(O){var E=-O.utcOffset(),w=Math.abs(E),y=Math.floor(w/60),g=w%60;return(E<=0?"+":"-")+B(y,2,"0")+":"+B(g,2,"0")},"z"),m:o(function O(E,w){if(E.date()<w.date())return-O(w,E);var y=12*(w.year()-E.year())+(w.month()-E.month()),g=E.clone().add(y,f),_=w-g<0,x=E.clone().add(y+(_?-1:1),f);return+(-(y+(w-g)/(_?g-x:x-g))||0)},"t"),a:o(function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},"a"),p:o(function(O){return{M:f,y:d,w:l,d:u,D:b,h:a,m:s,s:i,ms:n,Q:p}[O]||String(O||"").toLowerCase().replace(/s$/,"")},"p"),u:o(function(O){return O===void 0},"u")},J="en",k={};k[J]=T;var H="$isDayjsObject",K=o(function(O){return O instanceof re||!(!O||!O[H])},"S"),z=o(function O(E,w,y){var g;if(!E)return J;if(typeof E=="string"){var _=E.toLowerCase();k[_]&&(g=_),w&&(k[_]=w,g=_);var x=E.split("-");if(!g&&x.length>1)return O(x[0])}else{var S=E.name;k[S]=E,g=S}return!y&&g&&(J=g),g||!y&&J},"t"),N=o(function(O,E){if(K(O))return O.clone();var w=typeof E=="object"?E:{};return w.date=O,w.args=arguments,new re(w)},"O"),C=M;C.l=z,C.i=K,C.w=function(O,E){return N(O,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var re=function(){function O(w){this.$L=z(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[H]=!0}o(O,"M");var E=O.prototype;return E.parse=function(w){this.$d=function(y){var g=y.date,_=y.utc;if(g===null)return new Date(NaN);if(C.u(g))return new Date;if(g instanceof Date)return new Date(g);if(typeof g=="string"&&!/Z$/i.test(g)){var x=g.match(m);if(x){var S=x[2]-1||0,D=(x[7]||"0").substring(0,3);return _?new Date(Date.UTC(x[1],S,x[3]||1,x[4]||0,x[5]||0,x[6]||0,D)):new Date(x[1],S,x[3]||1,x[4]||0,x[5]||0,x[6]||0,D)}}return new Date(g)}(w),this.init()},E.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},E.$utils=function(){return C},E.isValid=function(){return this.$d.toString()!==c},E.isSame=function(w,y){var g=N(w);return this.startOf(y)<=g&&g<=this.endOf(y)},E.isAfter=function(w,y){return N(w)<this.startOf(y)},E.isBefore=function(w,y){return this.endOf(y)<N(w)},E.$g=function(w,y,g){return C.u(w)?this[y]:this.set(g,w)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(w,y){var g=this,_=!!C.u(y)||y,x=C.p(w),S=o(function(q,ne){var xe=C.w(g.$u?Date.UTC(g.$y,ne,q):new Date(g.$y,ne,q),g);return _?xe:xe.endOf(u)},"l"),D=o(function(q,ne){return C.w(g.toDate()[q].apply(g.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(ne)),g)},"$"),L=this.$W,U=this.$M,Z=this.$D,me="set"+(this.$u?"UTC":"");switch(x){case d:return _?S(1,0):S(31,11);case f:return _?S(1,U):S(0,U+1);case l:var oe=this.$locale().weekStart||0,Q=(L<oe?L+7:L)-oe;return S(_?Z-Q:Z+(6-Q),U);case u:case b:return D(me+"Hours",0);case a:return D(me+"Minutes",1);case s:return D(me+"Seconds",2);case i:return D(me+"Milliseconds",3);default:return this.clone()}},E.endOf=function(w){return this.startOf(w,!1)},E.$set=function(w,y){var g,_=C.p(w),x="set"+(this.$u?"UTC":""),S=(g={},g[u]=x+"Date",g[b]=x+"Date",g[f]=x+"Month",g[d]=x+"FullYear",g[a]=x+"Hours",g[s]=x+"Minutes",g[i]=x+"Seconds",g[n]=x+"Milliseconds",g)[_],D=_===u?this.$D+(y-this.$W):y;if(_===f||_===d){var L=this.clone().set(b,1);L.$d[S](D),L.init(),this.$d=L.set(b,Math.min(this.$D,L.daysInMonth())).$d}else S&&this.$d[S](D);return this.init(),this},E.set=function(w,y){return this.clone().$set(w,y)},E.get=function(w){return this[C.p(w)]()},E.add=function(w,y){var g,_=this;w=Number(w);var x=C.p(y),S=o(function(U){var Z=N(_);return C.w(Z.date(Z.date()+Math.round(U*w)),_)},"y");if(x===f)return this.set(f,this.$M+w);if(x===d)return this.set(d,this.$y+w);if(x===u)return S(1);if(x===l)return S(7);var D=(g={},g[s]=e,g[a]=r,g[i]=t,g)[x]||1,L=this.$d.getTime()+w*D;return C.w(L,this)},E.subtract=function(w,y){return this.add(-1*w,y)},E.format=function(w){var y=this,g=this.$locale();if(!this.isValid())return g.invalidDate||c;var _=w||"YYYY-MM-DDTHH:mm:ssZ",x=C.z(this),S=this.$H,D=this.$m,L=this.$M,U=g.weekdays,Z=g.months,me=g.meridiem,oe=o(function(ne,xe,it,St){return ne&&(ne[xe]||ne(y,_))||it[xe].slice(0,St)},"h"),Q=o(function(ne){return C.s(S%12||12,ne,"0")},"d"),q=me||function(ne,xe,it){var St=ne<12?"AM":"PM";return it?St.toLowerCase():St};return _.replace(v,function(ne,xe){return xe||function(it){switch(it){case"YY":return String(y.$y).slice(-2);case"YYYY":return C.s(y.$y,4,"0");case"M":return L+1;case"MM":return C.s(L+1,2,"0");case"MMM":return oe(g.monthsShort,L,Z,3);case"MMMM":return oe(Z,L);case"D":return y.$D;case"DD":return C.s(y.$D,2,"0");case"d":return String(y.$W);case"dd":return oe(g.weekdaysMin,y.$W,U,2);case"ddd":return oe(g.weekdaysShort,y.$W,U,3);case"dddd":return U[y.$W];case"H":return String(S);case"HH":return C.s(S,2,"0");case"h":return Q(1);case"hh":return Q(2);case"a":return q(S,D,!0);case"A":return q(S,D,!1);case"m":return String(D);case"mm":return C.s(D,2,"0");case"s":return String(y.$s);case"ss":return C.s(y.$s,2,"0");case"SSS":return C.s(y.$ms,3,"0");case"Z":return x}return null}(ne)||x.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(w,y,g){var _,x=this,S=C.p(y),D=N(w),L=(D.utcOffset()-this.utcOffset())*e,U=this-D,Z=o(function(){return C.m(x,D)},"D");switch(S){case d:_=Z()/12;break;case f:_=Z();break;case p:_=Z()/3;break;case l:_=(U-L)/6048e5;break;case u:_=(U-L)/864e5;break;case a:_=U/r;break;case s:_=U/e;break;case i:_=U/t;break;default:_=U}return g?_:C.a(_)},E.daysInMonth=function(){return this.endOf(f).$D},E.$locale=function(){return k[this.$L]},E.locale=function(w,y){if(!w)return this.$L;var g=this.clone(),_=z(w,y,!0);return _&&(g.$L=_),g},E.clone=function(){return C.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},O}(),nt=re.prototype;return N.prototype=nt,[["$ms",n],["$s",i],["$m",s],["$H",a],["$W",u],["$M",f],["$y",d],["$D",b]].forEach(function(O){nt[O[1]]=function(E){return this.$g(E,O[0],O[1])}}),N.extend=function(O,E){return O.$i||(O(E,re,N),O.$i=!0),N},N.locale=z,N.isDayjs=K,N.unix=function(O){return N(1e3*O)},N.en=k[J],N.Ls=k,N.p={},N})});var Dn=F(Qe=>{"use strict";h();Qe.__esModule=!0;Qe.distance=Qe.closest=void 0;var Se=new Uint32Array(65536),qs=o(function(t,e){for(var r=t.length,n=e.length,i=1<<r-1,s=-1,a=0,u=r,l=r;l--;)Se[t.charCodeAt(l)]|=1<<l;for(l=0;l<n;l++){var f=Se[e.charCodeAt(l)],p=f|a;f|=(f&s)+s^s,a|=~(f|s),s&=f,a&i&&u++,s&i&&u--,a=a<<1|1,s=s<<1|~(p|a),a&=p}for(l=r;l--;)Se[t.charCodeAt(l)]=0;return u},"myers_32"),Fs=o(function(t,e){for(var r=e.length,n=t.length,i=[],s=[],a=Math.ceil(r/32),u=Math.ceil(n/32),l=0;l<a;l++)s[l]=-1,i[l]=0;for(var f=0;f<u-1;f++){for(var p=0,d=-1,b=f*32,c=Math.min(32,n)+b,m=b;m<c;m++)Se[t.charCodeAt(m)]|=1<<m;for(var l=0;l<r;l++){var v=Se[e.charCodeAt(l)],T=s[l/32|0]>>>l&1,B=i[l/32|0]>>>l&1,M=v|p,J=((v|B)&d)+d^d|v|B,k=p|~(J|d),H=d&J;k>>>31^T&&(s[l/32|0]^=1<<l),H>>>31^B&&(i[l/32|0]^=1<<l),k=k<<1|T,H=H<<1|B,d=H|~(M|k),p=k&M}for(var m=b;m<c;m++)Se[t.charCodeAt(m)]=0}for(var K=0,z=-1,N=f*32,C=Math.min(32,n-N)+N,m=N;m<C;m++)Se[t.charCodeAt(m)]|=1<<m;for(var re=n,l=0;l<r;l++){var v=Se[e.charCodeAt(l)],T=s[l/32|0]>>>l&1,B=i[l/32|0]>>>l&1,M=v|K,J=((v|B)&z)+z^z|v|B,k=K|~(J|z),H=z&J;re+=k>>>n-1&1,re-=H>>>n-1&1,k>>>31^T&&(s[l/32|0]^=1<<l),H>>>31^B&&(i[l/32|0]^=1<<l),k=k<<1|T,H=H<<1|B,z=H|~(M|k),K=k&M}for(var m=N;m<C;m++)Se[t.charCodeAt(m)]=0;return re},"myers_x"),Bn=o(function(t,e){if(t.length<e.length){var r=e;e=t,t=r}return e.length===0?t.length:t.length<=32?qs(t,e):Fs(t,e)},"distance");Qe.distance=Bn;var Gs=o(function(t,e){for(var r=1/0,n=0,i=0;i<e.length;i++){var s=Bn(t,e[i]);s<r&&(r=s,n=i)}return e[n]},"closest");Qe.closest=Gs});var $n=F((ur,at)=>{h();(function(){"use strict";var t;try{t=typeof Intl<"u"&&typeof Intl.Collator<"u"?Intl.Collator("generic",{sensitivity:"base"}):null}catch{console.log("Collator could not be initialized and wouldn't be used")}var e=Dn(),r=[],n=[],i={get:o(function(s,a,u){var l=u&&t&&u.useCollator;if(l){var f=s.length,p=a.length;if(f===0)return p;if(p===0)return f;var d,b,c,m,v;for(c=0;c<p;++c)r[c]=c,n[c]=a.charCodeAt(c);r[p]=p;var T;for(c=0;c<f;++c){for(b=c+1,m=0;m<p;++m)d=b,T=t.compare(s.charAt(c),String.fromCharCode(n[m]))===0,b=r[m]+(T?0:1),v=d+1,b>v&&(b=v),v=r[m+1]+1,b>v&&(b=v),r[m]=d;r[m]=b}return b}return e.distance(s,a)},"get")};typeof define<"u"&&define!==null&&define.amd?define(function(){return i}):typeof at<"u"&&at!==null&&typeof ur<"u"&&at.exports===ur?at.exports=i:typeof self<"u"&&typeof self.postMessage=="function"&&typeof self.importScripts=="function"?self.Levenshtein=i:typeof window<"u"&&window!==null&&(window.Levenshtein=i)})()});var Nn=F((hr,dr)=>{h();(function(t,e){typeof j=="function"&&typeof hr=="object"&&typeof dr=="object"?dr.exports=e():typeof define=="function"&&define.amd?define(function(){return e()}):t.pluralize=e()})(hr,function(){var t=[],e=[],r={},n={},i={};function s(c){return typeof c=="string"?new RegExp("^"+c+"$","i"):c}o(s,"sanitizeRule");function a(c,m){return c===m?m:c===c.toLowerCase()?m.toLowerCase():c===c.toUpperCase()?m.toUpperCase():c[0]===c[0].toUpperCase()?m.charAt(0).toUpperCase()+m.substr(1).toLowerCase():m.toLowerCase()}o(a,"restoreCase");function u(c,m){return c.replace(/\$(\d{1,2})/g,function(v,T){return m[T]||""})}o(u,"interpolate");function l(c,m){return c.replace(m[0],function(v,T){var B=u(m[1],arguments);return a(v===""?c[T-1]:v,B)})}o(l,"replace");function f(c,m,v){if(!c.length||r.hasOwnProperty(c))return m;for(var T=v.length;T--;){var B=v[T];if(B[0].test(m))return l(m,B)}return m}o(f,"sanitizeWord");function p(c,m,v){return function(T){var B=T.toLowerCase();return m.hasOwnProperty(B)?a(T,B):c.hasOwnProperty(B)?a(T,c[B]):f(B,T,v)}}o(p,"replaceWord");function d(c,m,v,T){return function(B){var M=B.toLowerCase();return m.hasOwnProperty(M)?!0:c.hasOwnProperty(M)?!1:f(M,M,v)===M}}o(d,"checkWord");function b(c,m,v){var T=m===1?b.singular(c):b.plural(c);return(v?m+" ":"")+T}return o(b,"pluralize"),b.plural=p(i,n,t),b.isPlural=d(i,n,t),b.singular=p(n,i,e),b.isSingular=d(n,i,e),b.addPluralRule=function(c,m){t.push([s(c),m])},b.addSingularRule=function(c,m){e.push([s(c),m])},b.addUncountableRule=function(c){if(typeof c=="string"){r[c.toLowerCase()]=!0;return}b.addPluralRule(c,"$0"),b.addSingularRule(c,"$0")},b.addIrregularRule=function(c,m){m=m.toLowerCase(),c=c.toLowerCase(),i[c]=m,n[m]=c},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(c){return b.addIrregularRule(c[0],c[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(c){return b.addPluralRule(c[0],c[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(c){return b.addSingularRule(c[0],c[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(b.addUncountableRule),b})});var Wn=F((kc,jn)=>{"use strict";h();var Fn=12,Qs=0,mr=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,10,9,9,9,11,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,24,36,48,60,72,84,96,0,12,12,12,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,24,24,24,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,48,48,48,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,127,63,63,63,0,31,15,15,15,7,7,7];function Ys(t){var e=t.indexOf("%");if(e===-1)return t;for(var r=t.length,n="",i=0,s=0,a=e,u=Fn;e>-1&&e<r;){var l=Gn(t[e+1],4),f=Gn(t[e+2],0),p=l|f,d=mr[p];if(u=mr[256+u+d],s=s<<6|p&mr[364+d],u===Fn)n+=t.slice(i,a),n+=s<=65535?String.fromCharCode(s):String.fromCharCode(55232+(s>>10),56320+(s&1023)),s=0,i=e+3,e=a=t.indexOf("%",i);else{if(u===Qs)return null;if(e+=3,e<r&&t.charCodeAt(e)===37)continue;return null}}return n+t.slice(i)}o(Ys,"decodeURIComponent");var Js={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};function Gn(t,e){var r=Js[t];return r===void 0?255:r<<e}o(Gn,"hexCodeToInt");jn.exports=Ys});var Yn=F((Bc,Qn)=>{"use strict";h();var Vn=Wn(),zn=/\+/g,Hn=o(function(){},"Empty");Hn.prototype=Object.create(null);function Ks(t){let e=new Hn;if(typeof t!="string")return e;let r=t.length,n="",i="",s=-1,a=-1,u=!1,l=!1,f=!1,p=!1,d=!1,b=0;for(let c=0;c<r+1;c++)if(b=c!==r?t.charCodeAt(c):38,b===38){if(d=a>s,d||(a=c),n=t.slice(s+1,a),d||n.length>0){f&&(n=n.replace(zn," ")),u&&(n=Vn(n)||n),d&&(i=t.slice(a+1,c),p&&(i=i.replace(zn," ")),l&&(i=Vn(i)||i));let m=e[n];m===void 0?e[n]=i:m.pop?m.push(i):e[n]=[m,i]}i="",s=c,a=c,u=!1,l=!1,f=!1,p=!1}else b===61?a<=s?a=c:l=!0:b===43?a>s?p=!0:f=!0:b===37&&(a>s?l=!0:u=!0);return e}o(Ks,"parse");Qn.exports=Ks});var Kn=F((Ac,Jn)=>{h();var ve=Array.from({length:256},(t,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase()),Zs=new Int8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);function Xs(t){let e=t.length;if(e===0)return"";let r="",n=0,i=0;e:for(;i<e;i++){let s=t.charCodeAt(i);for(;s<128;){if(Zs[s]!==1&&(n<i&&(r+=t.slice(n,i)),n=i+1,r+=ve[s]),++i===e)break e;s=t.charCodeAt(i)}if(n<i&&(r+=t.slice(n,i)),s<2048){n=i+1,r+=ve[192|s>>6]+ve[128|s&63];continue}if(s<55296||s>=57344){n=i+1,r+=ve[224|s>>12]+ve[128|s>>6&63]+ve[128|s&63];continue}if(++i,i>=e)throw new Error("URI malformed");let a=t.charCodeAt(i)&1023;n=i+1,s=65536+((s&1023)<<10|a),r+=ve[240|s>>18]+ve[128|s>>12&63]+ve[128|s>>6&63]+ve[128|s&63]}return n===0?t:n<e?r+t.slice(n):r}o(Xs,"encodeString");Jn.exports={encodeString:Xs}});var ei=F((Pc,Xn)=>{"use strict";h();var{encodeString:gr}=Kn();function Zn(t){let e=typeof t;return e==="string"?gr(t):e==="bigint"?t.toString():e==="boolean"?t?"true":"false":e==="number"&&Number.isFinite(t)?t<1e21?""+t:gr(""+t):""}o(Zn,"getAsPrimitive");function eo(t){let e="";if(t===null||typeof t!="object")return e;let r="&",n=Object.keys(t),i=n.length,s=0;for(let a=0;a<i;a++){let u=n[a],l=t[u],f=gr(u)+"=";if(a&&(e+=r),Array.isArray(l)){s=l.length;for(let p=0;p<s;p++)p&&(e+=r),e+=f,e+=Zn(l[p])}else e+=f,e+=Zn(l)}return e}o(eo,"stringify");Xn.exports=eo});var ii=F((qc,ct)=>{"use strict";h();var ti=Yn(),ri=ei(),ni={parse:ti,stringify:ri};ct.exports=ni;ct.exports.default=ni;ct.exports.parse=ti;ct.exports.stringify=ri});var xi=F((gf,Sr)=>{"use strict";h();var _o=Object.prototype.hasOwnProperty,se="~";function ut(){}o(ut,"Events");Object.create&&(ut.prototype=Object.create(null),new ut().__proto__||(se=!1));function xo(t,e,r){this.fn=t,this.context=e,this.once=r||!1}o(xo,"EE");function _i(t,e,r,n,i){if(typeof r!="function")throw new TypeError("The listener must be a function");var s=new xo(r,n||t,i),a=se?se+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],s]:t._events[a].push(s):(t._events[a]=s,t._eventsCount++),t}o(_i,"addListener");function $t(t,e){--t._eventsCount===0?t._events=new ut:delete t._events[e]}o($t,"clearEvent");function te(){this._events=new ut,this._eventsCount=0}o(te,"EventEmitter");te.prototype.eventNames=o(function(){var e=[],r,n;if(this._eventsCount===0)return e;for(n in r=this._events)_o.call(r,n)&&e.push(se?n.slice(1):n);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(r)):e},"eventNames");te.prototype.listeners=o(function(e){var r=se?se+e:e,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,s=n.length,a=new Array(s);i<s;i++)a[i]=n[i].fn;return a},"listeners");te.prototype.listenerCount=o(function(e){var r=se?se+e:e,n=this._events[r];return n?n.fn?1:n.length:0},"listenerCount");te.prototype.emit=o(function(e,r,n,i,s,a){var u=se?se+e:e;if(!this._events[u])return!1;var l=this._events[u],f=arguments.length,p,d;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,r),!0;case 3:return l.fn.call(l.context,r,n),!0;case 4:return l.fn.call(l.context,r,n,i),!0;case 5:return l.fn.call(l.context,r,n,i,s),!0;case 6:return l.fn.call(l.context,r,n,i,s,a),!0}for(d=1,p=new Array(f-1);d<f;d++)p[d-1]=arguments[d];l.fn.apply(l.context,p)}else{var b=l.length,c;for(d=0;d<b;d++)switch(l[d].once&&this.removeListener(e,l[d].fn,void 0,!0),f){case 1:l[d].fn.call(l[d].context);break;case 2:l[d].fn.call(l[d].context,r);break;case 3:l[d].fn.call(l[d].context,r,n);break;case 4:l[d].fn.call(l[d].context,r,n,i);break;default:if(!p)for(c=1,p=new Array(f-1);c<f;c++)p[c-1]=arguments[c];l[d].fn.apply(l[d].context,p)}}return!0},"emit");te.prototype.on=o(function(e,r,n){return _i(this,e,r,n,!1)},"on");te.prototype.once=o(function(e,r,n){return _i(this,e,r,n,!0)},"once");te.prototype.removeListener=o(function(e,r,n,i){var s=se?se+e:e;if(!this._events[s])return this;if(!r)return $t(this,s),this;var a=this._events[s];if(a.fn)a.fn===r&&(!i||a.once)&&(!n||a.context===n)&&$t(this,s);else{for(var u=0,l=[],f=a.length;u<f;u++)(a[u].fn!==r||i&&!a[u].once||n&&a[u].context!==n)&&l.push(a[u]);l.length?this._events[s]=l.length===1?l[0]:l:$t(this,s)}return this},"removeListener");te.prototype.removeAllListeners=o(function(e){var r;return e?(r=se?se+e:e,this._events[r]&&$t(this,r)):(this._events=new ut,this._eventsCount=0),this},"removeAllListeners");te.prototype.off=te.prototype.removeListener;te.prototype.addListener=te.prototype.on;te.prefixed=se;te.EventEmitter=te;typeof Sr<"u"&&(Sr.exports=te)});var Oi=F((Pf,Ti)=>{"use strict";h();var{Duplex:wo}=j("stream");function Ei(t){t.emit("close")}o(Ei,"emitClose");function vo(){!this.destroyed&&this._writableState.finished&&this.destroy()}o(vo,"duplexOnEnd");function Si(t){this.removeListener("error",Si),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}o(Si,"duplexOnError");function Eo(t,e){let r=!0,n=new wo({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",o(function(s,a){let u=!a&&n._readableState.objectMode?s.toString():s;n.push(u)||t.pause()},"message")),t.once("error",o(function(s){n.destroyed||(r=!1,n.destroy(s))},"error")),t.once("close",o(function(){n.destroyed||n.push(null)},"close")),n._destroy=function(i,s){if(t.readyState===t.CLOSED){s(i),process.nextTick(Ei,n);return}let a=!1;t.once("error",o(function(l){a=!0,s(l)},"error")),t.once("close",o(function(){a||s(i),process.nextTick(Ei,n)},"close")),r&&t.terminate()},n._final=function(i){if(t.readyState===t.CONNECTING){t.once("open",o(function(){n._final(i)},"open"));return}t._socket!==null&&(t._socket._writableState.finished?(i(),n._readableState.endEmitted&&n.destroy()):(t._socket.once("finish",o(function(){i()},"finish")),t.close()))},n._read=function(){t.isPaused&&t.resume()},n._write=function(i,s,a){if(t.readyState===t.CONNECTING){t.once("open",o(function(){n._write(i,s,a)},"open"));return}t.send(i,a)},n.on("end",vo),n.on("error",Si),n}o(Eo,"createWebSocketStream");Ti.exports=Eo});var Le=F((qf,Ci)=>{"use strict";h();var Li=["nodebuffer","arraybuffer","fragments"],ki=typeof Blob<"u";ki&&Li.push("blob");Ci.exports={BINARY_TYPES:Li,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:ki,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:o(()=>{},"NOOP")}});var pt=F((jf,At)=>{"use strict";h();var{EMPTY_BUFFER:So}=Le(),Cr=Buffer[Symbol.species];function To(t,e){if(t.length===0)return So;if(t.length===1)return t[0];let r=Buffer.allocUnsafe(e),n=0;for(let i=0;i<t.length;i++){let s=t[i];r.set(s,n),n+=s.length}return n<e?new Cr(r.buffer,r.byteOffset,n):r}o(To,"concat");function Ri(t,e,r,n,i){for(let s=0;s<i;s++)r[n+s]=t[s]^e[s&3]}o(Ri,"_mask");function Bi(t,e){for(let r=0;r<t.length;r++)t[r]^=e[r&3]}o(Bi,"_unmask");function Oo(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)}o(Oo,"toArrayBuffer");function Rr(t){if(Rr.readOnly=!0,Buffer.isBuffer(t))return t;let e;return t instanceof ArrayBuffer?e=new Cr(t):ArrayBuffer.isView(t)?e=new Cr(t.buffer,t.byteOffset,t.byteLength):(e=Buffer.from(t),Rr.readOnly=!1),e}o(Rr,"toBuffer");At.exports={concat:To,mask:Ri,toArrayBuffer:Oo,toBuffer:Rr,unmask:Bi};if(!process.env.WS_NO_BUFFER_UTIL)try{let t=j("bufferutil");At.exports.mask=function(e,r,n,i,s){s<48?Ri(e,r,n,i,s):t.mask(e,r,n,i,s)},At.exports.unmask=function(e,r){e.length<32?Bi(e,r):t.unmask(e,r)}}catch{}});var Ai=F((zf,$i)=>{"use strict";h();var Di=Symbol("kDone"),Br=Symbol("kRun"),Dr=class{static{o(this,"Limiter")}constructor(e){this[Di]=()=>{this.pending--,this[Br]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Br]()}[Br](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Di])}}};$i.exports=Dr});var yt=F((Yf,Mi)=>{"use strict";h();var mt=j("zlib"),Ni=pt(),Lo=Ai(),{kStatusCode:Ii}=Le(),ko=Buffer[Symbol.species],Co=Buffer.from([0,0,255,255]),Pt=Symbol("permessage-deflate"),ke=Symbol("total-length"),gt=Symbol("callback"),Ne=Symbol("buffers"),It=Symbol("error"),Nt,$r=class{static{o(this,"PerMessageDeflate")}constructor(e,r,n){if(this._maxPayload=n|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!r,this._deflate=null,this._inflate=null,this.params=null,!Nt){let i=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Nt=new Lo(i)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[gt];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let r=this._options,n=e.find(i=>!(r.serverNoContextTakeover===!1&&i.server_no_context_takeover||i.server_max_window_bits&&(r.serverMaxWindowBits===!1||typeof r.serverMaxWindowBits=="number"&&r.serverMaxWindowBits>i.server_max_window_bits)||typeof r.clientMaxWindowBits=="number"&&!i.client_max_window_bits));if(!n)throw new Error("None of the extension offers can be accepted");return r.serverNoContextTakeover&&(n.server_no_context_takeover=!0),r.clientNoContextTakeover&&(n.client_no_context_takeover=!0),typeof r.serverMaxWindowBits=="number"&&(n.server_max_window_bits=r.serverMaxWindowBits),typeof r.clientMaxWindowBits=="number"?n.client_max_window_bits=r.clientMaxWindowBits:(n.client_max_window_bits===!0||r.clientMaxWindowBits===!1)&&delete n.client_max_window_bits,n}acceptAsClient(e){let r=e[0];if(this._options.clientNoContextTakeover===!1&&r.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!r.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(r.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&r.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return r}normalizeParams(e){return e.forEach(r=>{Object.keys(r).forEach(n=>{let i=r[n];if(i.length>1)throw new Error(`Parameter "${n}" must have only a single value`);if(i=i[0],n==="client_max_window_bits"){if(i!==!0){let s=+i;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${n}": ${i}`);i=s}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${n}": ${i}`)}else if(n==="server_max_window_bits"){let s=+i;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${n}": ${i}`);i=s}else if(n==="client_no_context_takeover"||n==="server_no_context_takeover"){if(i!==!0)throw new TypeError(`Invalid value for parameter "${n}": ${i}`)}else throw new Error(`Unknown parameter "${n}"`);r[n]=i})}),e}decompress(e,r,n){Nt.add(i=>{this._decompress(e,r,(s,a)=>{i(),n(s,a)})})}compress(e,r,n){Nt.add(i=>{this._compress(e,r,(s,a)=>{i(),n(s,a)})})}_decompress(e,r,n){let i=this._isServer?"client":"server";if(!this._inflate){let s=`${i}_max_window_bits`,a=typeof this.params[s]!="number"?mt.Z_DEFAULT_WINDOWBITS:this.params[s];this._inflate=mt.createInflateRaw({...this._options.zlibInflateOptions,windowBits:a}),this._inflate[Pt]=this,this._inflate[ke]=0,this._inflate[Ne]=[],this._inflate.on("error",Bo),this._inflate.on("data",Pi)}this._inflate[gt]=n,this._inflate.write(e),r&&this._inflate.write(Co),this._inflate.flush(()=>{let s=this._inflate[It];if(s){this._inflate.close(),this._inflate=null,n(s);return}let a=Ni.concat(this._inflate[Ne],this._inflate[ke]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[ke]=0,this._inflate[Ne]=[],r&&this.params[`${i}_no_context_takeover`]&&this._inflate.reset()),n(null,a)})}_compress(e,r,n){let i=this._isServer?"server":"client";if(!this._deflate){let s=`${i}_max_window_bits`,a=typeof this.params[s]!="number"?mt.Z_DEFAULT_WINDOWBITS:this.params[s];this._deflate=mt.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:a}),this._deflate[ke]=0,this._deflate[Ne]=[],this._deflate.on("data",Ro)}this._deflate[gt]=n,this._deflate.write(e),this._deflate.flush(mt.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let s=Ni.concat(this._deflate[Ne],this._deflate[ke]);r&&(s=new ko(s.buffer,s.byteOffset,s.length-4)),this._deflate[gt]=null,this._deflate[ke]=0,this._deflate[Ne]=[],r&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),n(null,s)})}};Mi.exports=$r;function Ro(t){this[Ne].push(t),this[ke]+=t.length}o(Ro,"deflateOnData");function Pi(t){if(this[ke]+=t.length,this[Pt]._maxPayload<1||this[ke]<=this[Pt]._maxPayload){this[Ne].push(t);return}this[It]=new RangeError("Max payload size exceeded"),this[It].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[It][Ii]=1009,this.removeListener("data",Pi),this.reset()}o(Pi,"inflateOnData");function Bo(t){this[Pt]._inflate=null,t[Ii]=1007,this[gt](t)}o(Bo,"inflateOnError")});var Ze=F((Zf,Mt)=>{"use strict";h();var{isUtf8:Ui}=j("buffer"),{hasBlob:Do}=Le(),$o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function Ao(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}o(Ao,"isValidStatusCode");function Ar(t){let e=t.length,r=0;for(;r<e;)if(!(t[r]&128))r++;else if((t[r]&224)===192){if(r+1===e||(t[r+1]&192)!==128||(t[r]&254)===192)return!1;r+=2}else if((t[r]&240)===224){if(r+2>=e||(t[r+1]&192)!==128||(t[r+2]&192)!==128||t[r]===224&&(t[r+1]&224)===128||t[r]===237&&(t[r+1]&224)===160)return!1;r+=3}else if((t[r]&248)===240){if(r+3>=e||(t[r+1]&192)!==128||(t[r+2]&192)!==128||(t[r+3]&192)!==128||t[r]===240&&(t[r+1]&240)===128||t[r]===244&&t[r+1]>143||t[r]>244)return!1;r+=4}else return!1;return!0}o(Ar,"_isValidUTF8");function No(t){return Do&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&(t[Symbol.toStringTag]==="Blob"||t[Symbol.toStringTag]==="File")}o(No,"isBlob");Mt.exports={isBlob:No,isValidStatusCode:Ao,isValidUTF8:Ar,tokenChars:$o};if(Ui)Mt.exports.isValidUTF8=function(t){return t.length<24?Ar(t):Ui(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=j("utf-8-validate");Mt.exports.isValidUTF8=function(e){return e.length<32?Ar(e):t(e)}}catch{}});var Ur=F((th,zi)=>{"use strict";h();var{Writable:Io}=j("stream"),qi=yt(),{BINARY_TYPES:Po,EMPTY_BUFFER:Fi,kStatusCode:Mo,kWebSocket:Uo}=Le(),{concat:Nr,toArrayBuffer:qo,unmask:Fo}=pt(),{isValidStatusCode:Go,isValidUTF8:Gi}=Ze(),Ut=Buffer[Symbol.species],de=0,ji=1,Wi=2,Vi=3,Ir=4,Pr=5,qt=6,Mr=class extends Io{static{o(this,"Receiver")}constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||Po[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[Uo]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=de}_write(e,r,n){if(this._opcode===8&&this._state==de)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let n=this._buffers[0];return this._buffers[0]=new Ut(n.buffer,n.byteOffset+e,n.length-e),new Ut(n.buffer,n.byteOffset,e)}let r=Buffer.allocUnsafe(e);do{let n=this._buffers[0],i=r.length-e;e>=n.length?r.set(this._buffers.shift(),i):(r.set(new Uint8Array(n.buffer,n.byteOffset,e),i),this._buffers[0]=new Ut(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return r}startLoop(e){this._loop=!0;do switch(this._state){case de:this.getInfo(e);break;case ji:this.getPayloadLength16(e);break;case Wi:this.getPayloadLength64(e);break;case Vi:this.getMask();break;case Ir:this.getData(e);break;case Pr:case qt:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let r=this.consume(2);if(r[0]&48){let i=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(i);return}let n=(r[0]&64)===64;if(n&&!this._extensions[qi.extensionName]){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._fin=(r[0]&128)===128,this._opcode=r[0]&15,this._payloadLength=r[1]&127,this._opcode===0){if(n){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(!this._fragmented){let i=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._compressed=n}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let i=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(i);return}if(n){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let i=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(i);return}}else{let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(r[1]&128)===128,this._isServer){if(!this._masked){let i=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(i);return}}else if(this._masked){let i=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(i);return}this._payloadLength===126?this._state=ji:this._payloadLength===127?this._state=Wi:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let r=this.consume(8),n=r.readUInt32BE(0);if(n>Math.pow(2,21)-1){let i=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(i);return}this._payloadLength=n*Math.pow(2,32)+r.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let r=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(r);return}this._masked?this._state=Vi:this._state=Ir}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Ir}getData(e){let r=Fi;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}r=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&Fo(r,this._mask)}if(this._opcode>7){this.controlMessage(r,e);return}if(this._compressed){this._state=Pr,this.decompress(r,e);return}r.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(r)),this.dataMessage(e)}decompress(e,r){this._extensions[qi.extensionName].decompress(e,this._fin,(i,s)=>{if(i)return r(i);if(s.length){if(this._messageLength+=s.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let a=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");r(a);return}this._fragments.push(s)}this.dataMessage(r),this._state===de&&this.startLoop(r)})}dataMessage(e){if(!this._fin){this._state=de;return}let r=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let i;this._binaryType==="nodebuffer"?i=Nr(n,r):this._binaryType==="arraybuffer"?i=qo(Nr(n,r)):this._binaryType==="blob"?i=new Blob(n):i=n,this._allowSynchronousEvents?(this.emit("message",i,!0),this._state=de):(this._state=qt,setImmediate(()=>{this.emit("message",i,!0),this._state=de,this.startLoop(e)}))}else{let i=Nr(n,r);if(!this._skipUTF8Validation&&!Gi(i)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(s);return}this._state===Pr||this._allowSynchronousEvents?(this.emit("message",i,!1),this._state=de):(this._state=qt,setImmediate(()=>{this.emit("message",i,!1),this._state=de,this.startLoop(e)}))}}controlMessage(e,r){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,Fi),this.end();else{let n=e.readUInt16BE(0);if(!Go(n)){let s=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");r(s);return}let i=new Ut(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Gi(i)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");r(s);return}this._loop=!1,this.emit("conclude",n,i),this.end()}this._state=de;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=de):(this._state=qt,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=de,this.startLoop(r)}))}createError(e,r,n,i,s){this._loop=!1,this._errored=!0;let a=new e(n?`Invalid WebSocket frame: ${r}`:r);return Error.captureStackTrace(a,this.createError),a.code=s,a[Mo]=i,a}};zi.exports=Mr});var Gr=F((sh,Yi)=>{"use strict";h();var{Duplex:ih}=j("stream"),{randomFillSync:jo}=j("crypto"),Hi=yt(),{EMPTY_BUFFER:Wo,kWebSocket:Vo,NOOP:zo}=Le(),{isBlob:Xe,isValidStatusCode:Ho}=Ze(),{mask:Qi,toBuffer:Ue}=pt(),pe=Symbol("kByteLength"),Qo=Buffer.alloc(4),Ft=8*1024,qe,et=Ft,_e=0,Yo=1,Jo=2,qr=class t{static{o(this,"Sender")}constructor(e,r,n){this._extensions=r||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=_e,this.onerror=zo,this[Vo]=void 0}static frame(e,r){let n,i=!1,s=2,a=!1;r.mask&&(n=r.maskBuffer||Qo,r.generateMask?r.generateMask(n):(et===Ft&&(qe===void 0&&(qe=Buffer.alloc(Ft)),jo(qe,0,Ft),et=0),n[0]=qe[et++],n[1]=qe[et++],n[2]=qe[et++],n[3]=qe[et++]),a=(n[0]|n[1]|n[2]|n[3])===0,s=6);let u;typeof e=="string"?(!r.mask||a)&&r[pe]!==void 0?u=r[pe]:(e=Buffer.from(e),u=e.length):(u=e.length,i=r.mask&&r.readOnly&&!a);let l=u;u>=65536?(s+=8,l=127):u>125&&(s+=2,l=126);let f=Buffer.allocUnsafe(i?u+s:s);return f[0]=r.fin?r.opcode|128:r.opcode,r.rsv1&&(f[0]|=64),f[1]=l,l===126?f.writeUInt16BE(u,2):l===127&&(f[2]=f[3]=0,f.writeUIntBE(u,4,6)),r.mask?(f[1]|=128,f[s-4]=n[0],f[s-3]=n[1],f[s-2]=n[2],f[s-1]=n[3],a?[f,e]:i?(Qi(e,n,f,s,u),[f]):(Qi(e,n,e,0,u),[f,e])):[f,e]}close(e,r,n,i){let s;if(e===void 0)s=Wo;else{if(typeof e!="number"||!Ho(e))throw new TypeError("First argument must be a valid error code number");if(r===void 0||!r.length)s=Buffer.allocUnsafe(2),s.writeUInt16BE(e,0);else{let u=Buffer.byteLength(r);if(u>123)throw new RangeError("The message must not be greater than 123 bytes");s=Buffer.allocUnsafe(2+u),s.writeUInt16BE(e,0),typeof r=="string"?s.write(r,2):s.set(r,2)}}let a={[pe]:s.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==_e?this.enqueue([this.dispatch,s,!1,a,i]):this.sendFrame(t.frame(s,a),i)}ping(e,r,n){let i,s;if(typeof e=="string"?(i=Buffer.byteLength(e),s=!1):Xe(e)?(i=e.size,s=!1):(e=Ue(e),i=e.length,s=Ue.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let a={[pe]:i,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:9,readOnly:s,rsv1:!1};Xe(e)?this._state!==_e?this.enqueue([this.getBlobData,e,!1,a,n]):this.getBlobData(e,!1,a,n):this._state!==_e?this.enqueue([this.dispatch,e,!1,a,n]):this.sendFrame(t.frame(e,a),n)}pong(e,r,n){let i,s;if(typeof e=="string"?(i=Buffer.byteLength(e),s=!1):Xe(e)?(i=e.size,s=!1):(e=Ue(e),i=e.length,s=Ue.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let a={[pe]:i,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:10,readOnly:s,rsv1:!1};Xe(e)?this._state!==_e?this.enqueue([this.getBlobData,e,!1,a,n]):this.getBlobData(e,!1,a,n):this._state!==_e?this.enqueue([this.dispatch,e,!1,a,n]):this.sendFrame(t.frame(e,a),n)}send(e,r,n){let i=this._extensions[Hi.extensionName],s=r.binary?2:1,a=r.compress,u,l;typeof e=="string"?(u=Buffer.byteLength(e),l=!1):Xe(e)?(u=e.size,l=!1):(e=Ue(e),u=e.length,l=Ue.readOnly),this._firstFragment?(this._firstFragment=!1,a&&i&&i.params[i._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(a=u>=i._threshold),this._compress=a):(a=!1,s=0),r.fin&&(this._firstFragment=!0);let f={[pe]:u,fin:r.fin,generateMask:this._generateMask,mask:r.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:l,rsv1:a};Xe(e)?this._state!==_e?this.enqueue([this.getBlobData,e,this._compress,f,n]):this.getBlobData(e,this._compress,f,n):this._state!==_e?this.enqueue([this.dispatch,e,this._compress,f,n]):this.dispatch(e,this._compress,f,n)}getBlobData(e,r,n,i){this._bufferedBytes+=n[pe],this._state=Jo,e.arrayBuffer().then(s=>{if(this._socket.destroyed){let u=new Error("The socket was closed while the blob was being read");process.nextTick(Fr,this,u,i);return}this._bufferedBytes-=n[pe];let a=Ue(s);r?this.dispatch(a,r,n,i):(this._state=_e,this.sendFrame(t.frame(a,n),i),this.dequeue())}).catch(s=>{process.nextTick(Ko,this,s,i)})}dispatch(e,r,n,i){if(!r){this.sendFrame(t.frame(e,n),i);return}let s=this._extensions[Hi.extensionName];this._bufferedBytes+=n[pe],this._state=Yo,s.compress(e,n.fin,(a,u)=>{if(this._socket.destroyed){let l=new Error("The socket was closed while data was being compressed");Fr(this,l,i);return}this._bufferedBytes-=n[pe],this._state=_e,n.readOnly=!1,this.sendFrame(t.frame(u,n),i),this.dequeue()})}dequeue(){for(;this._state===_e&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][pe],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][pe],this._queue.push(e)}sendFrame(e,r){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],r),this._socket.uncork()):this._socket.write(e[0],r)}};Yi.exports=qr;function Fr(t,e,r){typeof r=="function"&&r(e);for(let n=0;n<t._queue.length;n++){let i=t._queue[n],s=i[i.length-1];typeof s=="function"&&s(e)}}o(Fr,"callCallbacks");function Ko(t,e,r){Fr(t,e,r),t.onerror(e)}o(Ko,"onError")});var is=F((lh,ns)=>{"use strict";h();var{kForOnEventAttribute:bt,kListener:jr}=Le(),Ji=Symbol("kCode"),Ki=Symbol("kData"),Zi=Symbol("kError"),Xi=Symbol("kMessage"),es=Symbol("kReason"),tt=Symbol("kTarget"),ts=Symbol("kType"),rs=Symbol("kWasClean"),Ce=class{static{o(this,"Event")}constructor(e){this[tt]=null,this[ts]=e}get target(){return this[tt]}get type(){return this[ts]}};Object.defineProperty(Ce.prototype,"target",{enumerable:!0});Object.defineProperty(Ce.prototype,"type",{enumerable:!0});var Fe=class extends Ce{static{o(this,"CloseEvent")}constructor(e,r={}){super(e),this[Ji]=r.code===void 0?0:r.code,this[es]=r.reason===void 0?"":r.reason,this[rs]=r.wasClean===void 0?!1:r.wasClean}get code(){return this[Ji]}get reason(){return this[es]}get wasClean(){return this[rs]}};Object.defineProperty(Fe.prototype,"code",{enumerable:!0});Object.defineProperty(Fe.prototype,"reason",{enumerable:!0});Object.defineProperty(Fe.prototype,"wasClean",{enumerable:!0});var rt=class extends Ce{static{o(this,"ErrorEvent")}constructor(e,r={}){super(e),this[Zi]=r.error===void 0?null:r.error,this[Xi]=r.message===void 0?"":r.message}get error(){return this[Zi]}get message(){return this[Xi]}};Object.defineProperty(rt.prototype,"error",{enumerable:!0});Object.defineProperty(rt.prototype,"message",{enumerable:!0});var _t=class extends Ce{static{o(this,"MessageEvent")}constructor(e,r={}){super(e),this[Ki]=r.data===void 0?null:r.data}get data(){return this[Ki]}};Object.defineProperty(_t.prototype,"data",{enumerable:!0});var Zo={addEventListener(t,e,r={}){for(let i of this.listeners(t))if(!r[bt]&&i[jr]===e&&!i[bt])return;let n;if(t==="message")n=o(function(s,a){let u=new _t("message",{data:a?s:s.toString()});u[tt]=this,Gt(e,this,u)},"onMessage");else if(t==="close")n=o(function(s,a){let u=new Fe("close",{code:s,reason:a.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});u[tt]=this,Gt(e,this,u)},"onClose");else if(t==="error")n=o(function(s){let a=new rt("error",{error:s,message:s.message});a[tt]=this,Gt(e,this,a)},"onError");else if(t==="open")n=o(function(){let s=new Ce("open");s[tt]=this,Gt(e,this,s)},"onOpen");else return;n[bt]=!!r[bt],n[jr]=e,r.once?this.once(t,n):this.on(t,n)},removeEventListener(t,e){for(let r of this.listeners(t))if(r[jr]===e&&!r[bt]){this.removeListener(t,r);break}}};ns.exports={CloseEvent:Fe,ErrorEvent:rt,Event:Ce,EventTarget:Zo,MessageEvent:_t};function Gt(t,e,r){typeof t=="object"&&t.handleEvent?t.handleEvent.call(t,r):t.call(e,r)}o(Gt,"callListener")});var Wr=F((fh,ss)=>{"use strict";h();var{tokenChars:xt}=Ze();function Ee(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}o(Ee,"push");function Xo(t){let e=Object.create(null),r=Object.create(null),n=!1,i=!1,s=!1,a,u,l=-1,f=-1,p=-1,d=0;for(;d<t.length;d++)if(f=t.charCodeAt(d),a===void 0)if(p===-1&&xt[f]===1)l===-1&&(l=d);else if(d!==0&&(f===32||f===9))p===-1&&l!==-1&&(p=d);else if(f===59||f===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${d}`);p===-1&&(p=d);let c=t.slice(l,p);f===44?(Ee(e,c,r),r=Object.create(null)):a=c,l=p=-1}else throw new SyntaxError(`Unexpected character at index ${d}`);else if(u===void 0)if(p===-1&&xt[f]===1)l===-1&&(l=d);else if(f===32||f===9)p===-1&&l!==-1&&(p=d);else if(f===59||f===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${d}`);p===-1&&(p=d),Ee(r,t.slice(l,p),!0),f===44&&(Ee(e,a,r),r=Object.create(null),a=void 0),l=p=-1}else if(f===61&&l!==-1&&p===-1)u=t.slice(l,d),l=p=-1;else throw new SyntaxError(`Unexpected character at index ${d}`);else if(i){if(xt[f]!==1)throw new SyntaxError(`Unexpected character at index ${d}`);l===-1?l=d:n||(n=!0),i=!1}else if(s)if(xt[f]===1)l===-1&&(l=d);else if(f===34&&l!==-1)s=!1,p=d;else if(f===92)i=!0;else throw new SyntaxError(`Unexpected character at index ${d}`);else if(f===34&&t.charCodeAt(d-1)===61)s=!0;else if(p===-1&&xt[f]===1)l===-1&&(l=d);else if(l!==-1&&(f===32||f===9))p===-1&&(p=d);else if(f===59||f===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${d}`);p===-1&&(p=d);let c=t.slice(l,p);n&&(c=c.replace(/\\/g,""),n=!1),Ee(r,u,c),f===44&&(Ee(e,a,r),r=Object.create(null),a=void 0),u=void 0,l=p=-1}else throw new SyntaxError(`Unexpected character at index ${d}`);if(l===-1||s||f===32||f===9)throw new SyntaxError("Unexpected end of input");p===-1&&(p=d);let b=t.slice(l,p);return a===void 0?Ee(e,b,r):(u===void 0?Ee(r,b,!0):n?Ee(r,u,b.replace(/\\/g,"")):Ee(r,u,b),Ee(e,a,r)),e}o(Xo,"parse");function ea(t){return Object.keys(t).map(e=>{let r=t[e];return Array.isArray(r)||(r=[r]),r.map(n=>[e].concat(Object.keys(n).map(i=>{let s=n[i];return Array.isArray(s)||(s=[s]),s.map(a=>a===!0?i:`${i}=${a}`).join("; ")})).join("; ")).join(", ")}).join(", ")}o(ea,"format");ss.exports={format:ea,parse:Xo}});var Yr=F((gh,ys)=>{"use strict";h();var ta=j("events"),ra=j("https"),na=j("http"),ls=j("net"),ia=j("tls"),{randomBytes:sa,createHash:oa}=j("crypto"),{Duplex:ph,Readable:mh}=j("stream"),{URL:Vr}=j("url"),Ie=yt(),aa=Ur(),la=Gr(),{isBlob:ca}=Ze(),{BINARY_TYPES:os,EMPTY_BUFFER:jt,GUID:ua,kForOnEventAttribute:zr,kListener:fa,kStatusCode:ha,kWebSocket:ee,NOOP:cs}=Le(),{EventTarget:{addEventListener:da,removeEventListener:pa}}=is(),{format:ma,parse:ga}=Wr(),{toBuffer:ya}=pt(),ba=30*1e3,us=Symbol("kAborted"),Hr=[8,13],Re=["CONNECTING","OPEN","CLOSING","CLOSED"],_a=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,V=class t extends ta{static{o(this,"WebSocket")}constructor(e,r,n){super(),this._binaryType=os[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=jt,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=t.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,r===void 0?r=[]:Array.isArray(r)||(typeof r=="object"&&r!==null?(n=r,r=[]):r=[r]),fs(this,e,r,n)):(this._autoPong=n.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){os.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,r,n){let i=new aa({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation}),s=new la(e,this._extensions,n.generateMask);this._receiver=i,this._sender=s,this._socket=e,i[ee]=this,s[ee]=this,e[ee]=this,i.on("conclude",va),i.on("drain",Ea),i.on("error",Sa),i.on("message",Ta),i.on("ping",Oa),i.on("pong",La),s.onerror=ka,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),r.length>0&&e.unshift(r),e.on("close",ps),e.on("data",Vt),e.on("end",ms),e.on("error",gs),this._readyState=t.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Ie.extensionName]&&this._extensions[Ie.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,r){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){fe(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===t.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=t.CLOSING,this._sender.close(e,r,!this._isServer,n=>{n||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),ds(this)}}pause(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,r,n){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(n=e,e=r=void 0):typeof r=="function"&&(n=r,r=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Qr(this,e,n);return}r===void 0&&(r=!this._isServer),this._sender.ping(e||jt,r,n)}pong(e,r,n){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(n=e,e=r=void 0):typeof r=="function"&&(n=r,r=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Qr(this,e,n);return}r===void 0&&(r=!this._isServer),this._sender.pong(e||jt,r,n)}resume(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,r,n){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof r=="function"&&(n=r,r={}),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Qr(this,e,n);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...r};this._extensions[Ie.extensionName]||(i.compress=!1),this._sender.send(e||jt,i,n)}terminate(){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){fe(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=t.CLOSING,this._socket.destroy())}}};Object.defineProperty(V,"CONNECTING",{enumerable:!0,value:Re.indexOf("CONNECTING")});Object.defineProperty(V.prototype,"CONNECTING",{enumerable:!0,value:Re.indexOf("CONNECTING")});Object.defineProperty(V,"OPEN",{enumerable:!0,value:Re.indexOf("OPEN")});Object.defineProperty(V.prototype,"OPEN",{enumerable:!0,value:Re.indexOf("OPEN")});Object.defineProperty(V,"CLOSING",{enumerable:!0,value:Re.indexOf("CLOSING")});Object.defineProperty(V.prototype,"CLOSING",{enumerable:!0,value:Re.indexOf("CLOSING")});Object.defineProperty(V,"CLOSED",{enumerable:!0,value:Re.indexOf("CLOSED")});Object.defineProperty(V.prototype,"CLOSED",{enumerable:!0,value:Re.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(V.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(V.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[zr])return e[fa];return null},set(e){for(let r of this.listeners(t))if(r[zr]){this.removeListener(t,r);break}typeof e=="function"&&this.addEventListener(t,e,{[zr]:!0})}})});V.prototype.addEventListener=da;V.prototype.removeEventListener=pa;ys.exports=V;function fs(t,e,r,n){let i={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Hr[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...n,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=i.autoPong,!Hr.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Hr.join(", ")})`);let s;if(e instanceof Vr)s=e;else try{s=new Vr(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}s.protocol==="http:"?s.protocol="ws:":s.protocol==="https:"&&(s.protocol="wss:"),t._url=s.href;let a=s.protocol==="wss:",u=s.protocol==="ws+unix:",l;if(s.protocol!=="ws:"&&!a&&!u?l=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:u&&!s.pathname?l="The URL's pathname is empty":s.hash&&(l="The URL contains a fragment identifier"),l){let v=new SyntaxError(l);if(t._redirects===0)throw v;Wt(t,v);return}let f=a?443:80,p=sa(16).toString("base64"),d=a?ra.request:na.request,b=new Set,c;if(i.createConnection=i.createConnection||(a?wa:xa),i.defaultPort=i.defaultPort||f,i.port=s.port||f,i.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":p,Connection:"Upgrade",Upgrade:"websocket"},i.path=s.pathname+s.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(c=new Ie(i.perMessageDeflate!==!0?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=ma({[Ie.extensionName]:c.offer()})),r.length){for(let v of r){if(typeof v!="string"||!_a.test(v)||b.has(v))throw new SyntaxError("An invalid or duplicated subprotocol was specified");b.add(v)}i.headers["Sec-WebSocket-Protocol"]=r.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(s.username||s.password)&&(i.auth=`${s.username}:${s.password}`),u){let v=i.path.split(":");i.socketPath=v[0],i.path=v[1]}let m;if(i.followRedirects){if(t._redirects===0){t._originalIpc=u,t._originalSecure=a,t._originalHostOrSocketPath=u?i.socketPath:s.host;let v=n&&n.headers;if(n={...n,headers:{}},v)for(let[T,B]of Object.entries(v))n.headers[T.toLowerCase()]=B}else if(t.listenerCount("redirect")===0){let v=u?t._originalIpc?i.socketPath===t._originalHostOrSocketPath:!1:t._originalIpc?!1:s.host===t._originalHostOrSocketPath;(!v||t._originalSecure&&!a)&&(delete i.headers.authorization,delete i.headers.cookie,v||delete i.headers.host,i.auth=void 0)}i.auth&&!n.headers.authorization&&(n.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),m=t._req=d(i),t._redirects&&t.emit("redirect",t.url,m)}else m=t._req=d(i);i.timeout&&m.on("timeout",()=>{fe(t,m,"Opening handshake has timed out")}),m.on("error",v=>{m===null||m[us]||(m=t._req=null,Wt(t,v))}),m.on("response",v=>{let T=v.headers.location,B=v.statusCode;if(T&&i.followRedirects&&B>=300&&B<400){if(++t._redirects>i.maxRedirects){fe(t,m,"Maximum redirects exceeded");return}m.abort();let M;try{M=new Vr(T,e)}catch{let k=new SyntaxError(`Invalid URL: ${T}`);Wt(t,k);return}fs(t,M,r,n)}else t.emit("unexpected-response",m,v)||fe(t,m,`Unexpected server response: ${v.statusCode}`)}),m.on("upgrade",(v,T,B)=>{if(t.emit("upgrade",v),t.readyState!==V.CONNECTING)return;m=t._req=null;let M=v.headers.upgrade;if(M===void 0||M.toLowerCase()!=="websocket"){fe(t,T,"Invalid Upgrade header");return}let J=oa("sha1").update(p+ua).digest("base64");if(v.headers["sec-websocket-accept"]!==J){fe(t,T,"Invalid Sec-WebSocket-Accept header");return}let k=v.headers["sec-websocket-protocol"],H;if(k!==void 0?b.size?b.has(k)||(H="Server sent an invalid subprotocol"):H="Server sent a subprotocol but none was requested":b.size&&(H="Server sent no subprotocol"),H){fe(t,T,H);return}k&&(t._protocol=k);let K=v.headers["sec-websocket-extensions"];if(K!==void 0){if(!c){fe(t,T,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let z;try{z=ga(K)}catch{fe(t,T,"Invalid Sec-WebSocket-Extensions header");return}let N=Object.keys(z);if(N.length!==1||N[0]!==Ie.extensionName){fe(t,T,"Server indicated an extension that was not requested");return}try{c.accept(z[Ie.extensionName])}catch{fe(t,T,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[Ie.extensionName]=c}t.setSocket(T,B,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})}),i.finishRequest?i.finishRequest(m,t):m.end()}o(fs,"initAsClient");function Wt(t,e){t._readyState=V.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}o(Wt,"emitErrorAndClose");function xa(t){return t.path=t.socketPath,ls.connect(t)}o(xa,"netConnect");function wa(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=ls.isIP(t.host)?"":t.host),ia.connect(t)}o(wa,"tlsConnect");function fe(t,e,r){t._readyState=V.CLOSING;let n=new Error(r);Error.captureStackTrace(n,fe),e.setHeader?(e[us]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(Wt,t,n)):(e.destroy(n),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}o(fe,"abortHandshake");function Qr(t,e,r){if(e){let n=ca(e)?e.size:ya(e).length;t._socket?t._sender._bufferedBytes+=n:t._bufferedAmount+=n}if(r){let n=new Error(`WebSocket is not open: readyState ${t.readyState} (${Re[t.readyState]})`);process.nextTick(r,n)}}o(Qr,"sendAfterClose");function va(t,e){let r=this[ee];r._closeFrameReceived=!0,r._closeMessage=e,r._closeCode=t,r._socket[ee]!==void 0&&(r._socket.removeListener("data",Vt),process.nextTick(hs,r._socket),t===1005?r.close():r.close(t,e))}o(va,"receiverOnConclude");function Ea(){let t=this[ee];t.isPaused||t._socket.resume()}o(Ea,"receiverOnDrain");function Sa(t){let e=this[ee];e._socket[ee]!==void 0&&(e._socket.removeListener("data",Vt),process.nextTick(hs,e._socket),e.close(t[ha])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}o(Sa,"receiverOnError");function as(){this[ee].emitClose()}o(as,"receiverOnFinish");function Ta(t,e){this[ee].emit("message",t,e)}o(Ta,"receiverOnMessage");function Oa(t){let e=this[ee];e._autoPong&&e.pong(t,!this._isServer,cs),e.emit("ping",t)}o(Oa,"receiverOnPing");function La(t){this[ee].emit("pong",t)}o(La,"receiverOnPong");function hs(t){t.resume()}o(hs,"resume");function ka(t){let e=this[ee];e.readyState!==V.CLOSED&&(e.readyState===V.OPEN&&(e._readyState=V.CLOSING,ds(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}o(ka,"senderOnError");function ds(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),ba)}o(ds,"setCloseTimer");function ps(){let t=this[ee];this.removeListener("close",ps),this.removeListener("data",Vt),this.removeListener("end",ms),t._readyState=V.CLOSING;let e;!this._readableState.endEmitted&&!t._closeFrameReceived&&!t._receiver._writableState.errorEmitted&&(e=t._socket.read())!==null&&t._receiver.write(e),t._receiver.end(),this[ee]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",as),t._receiver.on("finish",as))}o(ps,"socketOnClose");function Vt(t){this[ee]._receiver.write(t)||this.pause()}o(Vt,"socketOnData");function ms(){let t=this[ee];t._readyState=V.CLOSING,t._receiver.end(),this.end()}o(ms,"socketOnEnd");function gs(){let t=this[ee];this.removeListener("error",gs),this.on("error",cs),t&&(t._readyState=V.CLOSING,this.destroy())}o(gs,"socketOnError")});var _s=F((_h,bs)=>{"use strict";h();var{tokenChars:Ca}=Ze();function Ra(t){let e=new Set,r=-1,n=-1,i=0;for(i;i<t.length;i++){let a=t.charCodeAt(i);if(n===-1&&Ca[a]===1)r===-1&&(r=i);else if(i!==0&&(a===32||a===9))n===-1&&r!==-1&&(n=i);else if(a===44){if(r===-1)throw new SyntaxError(`Unexpected character at index ${i}`);n===-1&&(n=i);let u=t.slice(r,n);if(e.has(u))throw new SyntaxError(`The "${u}" subprotocol is duplicated`);e.add(u),r=n=-1}else throw new SyntaxError(`Unexpected character at index ${i}`)}if(r===-1||n!==-1)throw new SyntaxError("Unexpected end of input");let s=t.slice(r,i);if(e.has(s))throw new SyntaxError(`The "${s}" subprotocol is duplicated`);return e.add(s),e}o(Ra,"parse");bs.exports={parse:Ra}});var Os=F((Eh,Ts)=>{"use strict";h();var Ba=j("events"),zt=j("http"),{Duplex:vh}=j("stream"),{createHash:Da}=j("crypto"),xs=Wr(),Ge=yt(),$a=_s(),Aa=Yr(),{GUID:Na,kWebSocket:Ia}=Le(),Pa=/^[+/0-9A-Za-z]{22}==$/,ws=0,vs=1,Ss=2,Jr=class extends Ba{static{o(this,"WebSocketServer")}constructor(e,r){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:Aa,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=zt.createServer((n,i)=>{let s=zt.STATUS_CODES[426];i.writeHead(426,{"Content-Length":s.length,"Content-Type":"text/plain"}),i.end(s)}),this._server.listen(e.port,e.host,e.backlog,r)):e.server&&(this._server=e.server),this._server){let n=this.emit.bind(this,"connection");this._removeListeners=Ma(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:o((i,s,a)=>{this.handleUpgrade(i,s,a,n)},"upgrade")})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=ws}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===Ss){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(wt,this);return}if(e&&this.once("close",e),this._state!==vs)if(this._state=vs,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(wt,this):process.nextTick(wt,this);else{let r=this._server;this._removeListeners(),this._removeListeners=this._server=null,r.close(()=>{wt(this)})}}shouldHandle(e){if(this.options.path){let r=e.url.indexOf("?");if((r!==-1?e.url.slice(0,r):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,r,n,i){r.on("error",Es);let s=e.headers["sec-websocket-key"],a=e.headers.upgrade,u=+e.headers["sec-websocket-version"];if(e.method!=="GET"){je(this,e,r,405,"Invalid HTTP method");return}if(a===void 0||a.toLowerCase()!=="websocket"){je(this,e,r,400,"Invalid Upgrade header");return}if(s===void 0||!Pa.test(s)){je(this,e,r,400,"Missing or invalid Sec-WebSocket-Key header");return}if(u!==8&&u!==13){je(this,e,r,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(e)){vt(r,400);return}let l=e.headers["sec-websocket-protocol"],f=new Set;if(l!==void 0)try{f=$a.parse(l)}catch{je(this,e,r,400,"Invalid Sec-WebSocket-Protocol header");return}let p=e.headers["sec-websocket-extensions"],d={};if(this.options.perMessageDeflate&&p!==void 0){let b=new Ge(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let c=xs.parse(p);c[Ge.extensionName]&&(b.accept(c[Ge.extensionName]),d[Ge.extensionName]=b)}catch{je(this,e,r,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let b={origin:e.headers[`${u===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(b,(c,m,v,T)=>{if(!c)return vt(r,m||401,v,T);this.completeUpgrade(d,s,f,e,r,n,i)});return}if(!this.options.verifyClient(b))return vt(r,401)}this.completeUpgrade(d,s,f,e,r,n,i)}completeUpgrade(e,r,n,i,s,a,u){if(!s.readable||!s.writable)return s.destroy();if(s[Ia])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>ws)return vt(s,503);let f=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${Da("sha1").update(r+Na).digest("base64")}`],p=new this.options.WebSocket(null,void 0,this.options);if(n.size){let d=this.options.handleProtocols?this.options.handleProtocols(n,i):n.values().next().value;d&&(f.push(`Sec-WebSocket-Protocol: ${d}`),p._protocol=d)}if(e[Ge.extensionName]){let d=e[Ge.extensionName].params,b=xs.format({[Ge.extensionName]:[d]});f.push(`Sec-WebSocket-Extensions: ${b}`),p._extensions=e}this.emit("headers",f,i),s.write(f.concat(`\r
|
|
1
|
+
import{d as un,e as fn,f as hn}from"./chunk-E3RC22HP.js";import{$ as cn,A as Ve,B as on,E as ue,K as le,L as an,M as W,N as ln,P as G,T as Xt,U as er,Z as we,_ as Ot,a as Kr,b as Zr,c as Xr,d as ge,e as $,f as tn,g as Tt,h as We,i as Yt,j as Jt,k as Kt,m as Zt,o as rn,w as nn,x as sn}from"./chunk-C4CHGCKD.js";import{a as Qt,b as en}from"./chunk-GPJRJAHB.js";import{a as o,b as j,d as F,f as ae,h}from"./chunk-56W5U2JG.js";var yn=F((Ja,gn)=>{"use strict";h();var Bs=j("os"),mn=j("tty"),he=en(),{env:X}=process,Be;he("no-color")||he("no-colors")||he("color=false")||he("color=never")?Be=0:(he("color")||he("colors")||he("color=true")||he("color=always"))&&(Be=1);"FORCE_COLOR"in X&&(X.FORCE_COLOR==="true"?Be=1:X.FORCE_COLOR==="false"?Be=0:Be=X.FORCE_COLOR.length===0?1:Math.min(parseInt(X.FORCE_COLOR,10),3));function tr(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}o(tr,"translateLevel");function rr(t,e){if(Be===0)return 0;if(he("color=16m")||he("color=full")||he("color=truecolor"))return 3;if(he("color=256"))return 2;if(t&&!e&&Be===void 0)return 0;let r=Be||0;if(X.TERM==="dumb")return r;if(process.platform==="win32"){let n=Bs.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in X)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in X)||X.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in X)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(X.TEAMCITY_VERSION)?1:0;if(X.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in X){let n=parseInt((X.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(X.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(X.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(X.TERM)||"COLORTERM"in X?1:r}o(rr,"supportsColor");function Ds(t){let e=rr(t,t&&t.isTTY);return tr(e)}o(Ds,"getSupportLevel");gn.exports={supportsColor:Ds,stdout:tr(rr(!0,mn.isatty(1))),stderr:tr(rr(!0,mn.isatty(2)))}});var xn=F((Xa,_n)=>{"use strict";h();var $s=yn(),He=en();function bn(t){if(/^\d{3,4}$/.test(t)){let r=/(\d{1,2})(\d{2})/.exec(t);return{major:0,minor:parseInt(r[1],10),patch:parseInt(r[2],10)}}let e=(t||"").split(".").map(r=>parseInt(r,10));return{major:e[0],minor:e[1],patch:e[2]}}o(bn,"parseVersion");function nr(t){let{env:e}=process;if("FORCE_HYPERLINK"in e)return!(e.FORCE_HYPERLINK.length>0&&parseInt(e.FORCE_HYPERLINK,10)===0);if(He("no-hyperlink")||He("no-hyperlinks")||He("hyperlink=false")||He("hyperlink=never"))return!1;if(He("hyperlink=true")||He("hyperlink=always")||"NETLIFY"in e)return!0;if(!$s.supportsColor(t)||t&&!t.isTTY||process.platform==="win32"||"CI"in e||"TEAMCITY_VERSION"in e)return!1;if("TERM_PROGRAM"in e){let r=bn(e.TERM_PROGRAM_VERSION);switch(e.TERM_PROGRAM){case"iTerm.app":return r.major===3?r.minor>=1:r.major>3;case"WezTerm":return r.major>=20200620;case"vscode":return r.major>1||r.major===1&&r.minor>=72}}if("VTE_VERSION"in e){if(e.VTE_VERSION==="0.50.0")return!1;let r=bn(e.VTE_VERSION);return r.major>0||r.minor>=50}return!1}o(nr,"supportsHyperlink");_n.exports={supportsHyperlink:nr,stdout:nr(process.stdout),stderr:nr(process.stderr)}});var Rn=F((lr,cr)=>{h();(function(t,e){typeof lr=="object"&&typeof cr<"u"?cr.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(lr,function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",i="second",s="minute",a="hour",u="day",l="week",f="month",p="quarter",d="year",b="date",c="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,T={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:o(function(O){var E=["th","st","nd","rd"],w=O%100;return"["+O+(E[(w-20)%10]||E[w]||E[0])+"]"},"ordinal")},B=o(function(O,E,w){var y=String(O);return!y||y.length>=E?O:""+Array(E+1-y.length).join(w)+O},"m"),M={s:B,z:o(function(O){var E=-O.utcOffset(),w=Math.abs(E),y=Math.floor(w/60),g=w%60;return(E<=0?"+":"-")+B(y,2,"0")+":"+B(g,2,"0")},"z"),m:o(function O(E,w){if(E.date()<w.date())return-O(w,E);var y=12*(w.year()-E.year())+(w.month()-E.month()),g=E.clone().add(y,f),_=w-g<0,x=E.clone().add(y+(_?-1:1),f);return+(-(y+(w-g)/(_?g-x:x-g))||0)},"t"),a:o(function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},"a"),p:o(function(O){return{M:f,y:d,w:l,d:u,D:b,h:a,m:s,s:i,ms:n,Q:p}[O]||String(O||"").toLowerCase().replace(/s$/,"")},"p"),u:o(function(O){return O===void 0},"u")},J="en",k={};k[J]=T;var H="$isDayjsObject",K=o(function(O){return O instanceof re||!(!O||!O[H])},"S"),z=o(function O(E,w,y){var g;if(!E)return J;if(typeof E=="string"){var _=E.toLowerCase();k[_]&&(g=_),w&&(k[_]=w,g=_);var x=E.split("-");if(!g&&x.length>1)return O(x[0])}else{var S=E.name;k[S]=E,g=S}return!y&&g&&(J=g),g||!y&&J},"t"),N=o(function(O,E){if(K(O))return O.clone();var w=typeof E=="object"?E:{};return w.date=O,w.args=arguments,new re(w)},"O"),C=M;C.l=z,C.i=K,C.w=function(O,E){return N(O,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var re=function(){function O(w){this.$L=z(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[H]=!0}o(O,"M");var E=O.prototype;return E.parse=function(w){this.$d=function(y){var g=y.date,_=y.utc;if(g===null)return new Date(NaN);if(C.u(g))return new Date;if(g instanceof Date)return new Date(g);if(typeof g=="string"&&!/Z$/i.test(g)){var x=g.match(m);if(x){var S=x[2]-1||0,D=(x[7]||"0").substring(0,3);return _?new Date(Date.UTC(x[1],S,x[3]||1,x[4]||0,x[5]||0,x[6]||0,D)):new Date(x[1],S,x[3]||1,x[4]||0,x[5]||0,x[6]||0,D)}}return new Date(g)}(w),this.init()},E.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},E.$utils=function(){return C},E.isValid=function(){return this.$d.toString()!==c},E.isSame=function(w,y){var g=N(w);return this.startOf(y)<=g&&g<=this.endOf(y)},E.isAfter=function(w,y){return N(w)<this.startOf(y)},E.isBefore=function(w,y){return this.endOf(y)<N(w)},E.$g=function(w,y,g){return C.u(w)?this[y]:this.set(g,w)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(w,y){var g=this,_=!!C.u(y)||y,x=C.p(w),S=o(function(q,ne){var xe=C.w(g.$u?Date.UTC(g.$y,ne,q):new Date(g.$y,ne,q),g);return _?xe:xe.endOf(u)},"l"),D=o(function(q,ne){return C.w(g.toDate()[q].apply(g.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(ne)),g)},"$"),L=this.$W,U=this.$M,Z=this.$D,me="set"+(this.$u?"UTC":"");switch(x){case d:return _?S(1,0):S(31,11);case f:return _?S(1,U):S(0,U+1);case l:var oe=this.$locale().weekStart||0,Q=(L<oe?L+7:L)-oe;return S(_?Z-Q:Z+(6-Q),U);case u:case b:return D(me+"Hours",0);case a:return D(me+"Minutes",1);case s:return D(me+"Seconds",2);case i:return D(me+"Milliseconds",3);default:return this.clone()}},E.endOf=function(w){return this.startOf(w,!1)},E.$set=function(w,y){var g,_=C.p(w),x="set"+(this.$u?"UTC":""),S=(g={},g[u]=x+"Date",g[b]=x+"Date",g[f]=x+"Month",g[d]=x+"FullYear",g[a]=x+"Hours",g[s]=x+"Minutes",g[i]=x+"Seconds",g[n]=x+"Milliseconds",g)[_],D=_===u?this.$D+(y-this.$W):y;if(_===f||_===d){var L=this.clone().set(b,1);L.$d[S](D),L.init(),this.$d=L.set(b,Math.min(this.$D,L.daysInMonth())).$d}else S&&this.$d[S](D);return this.init(),this},E.set=function(w,y){return this.clone().$set(w,y)},E.get=function(w){return this[C.p(w)]()},E.add=function(w,y){var g,_=this;w=Number(w);var x=C.p(y),S=o(function(U){var Z=N(_);return C.w(Z.date(Z.date()+Math.round(U*w)),_)},"y");if(x===f)return this.set(f,this.$M+w);if(x===d)return this.set(d,this.$y+w);if(x===u)return S(1);if(x===l)return S(7);var D=(g={},g[s]=e,g[a]=r,g[i]=t,g)[x]||1,L=this.$d.getTime()+w*D;return C.w(L,this)},E.subtract=function(w,y){return this.add(-1*w,y)},E.format=function(w){var y=this,g=this.$locale();if(!this.isValid())return g.invalidDate||c;var _=w||"YYYY-MM-DDTHH:mm:ssZ",x=C.z(this),S=this.$H,D=this.$m,L=this.$M,U=g.weekdays,Z=g.months,me=g.meridiem,oe=o(function(ne,xe,it,St){return ne&&(ne[xe]||ne(y,_))||it[xe].slice(0,St)},"h"),Q=o(function(ne){return C.s(S%12||12,ne,"0")},"d"),q=me||function(ne,xe,it){var St=ne<12?"AM":"PM";return it?St.toLowerCase():St};return _.replace(v,function(ne,xe){return xe||function(it){switch(it){case"YY":return String(y.$y).slice(-2);case"YYYY":return C.s(y.$y,4,"0");case"M":return L+1;case"MM":return C.s(L+1,2,"0");case"MMM":return oe(g.monthsShort,L,Z,3);case"MMMM":return oe(Z,L);case"D":return y.$D;case"DD":return C.s(y.$D,2,"0");case"d":return String(y.$W);case"dd":return oe(g.weekdaysMin,y.$W,U,2);case"ddd":return oe(g.weekdaysShort,y.$W,U,3);case"dddd":return U[y.$W];case"H":return String(S);case"HH":return C.s(S,2,"0");case"h":return Q(1);case"hh":return Q(2);case"a":return q(S,D,!0);case"A":return q(S,D,!1);case"m":return String(D);case"mm":return C.s(D,2,"0");case"s":return String(y.$s);case"ss":return C.s(y.$s,2,"0");case"SSS":return C.s(y.$ms,3,"0");case"Z":return x}return null}(ne)||x.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(w,y,g){var _,x=this,S=C.p(y),D=N(w),L=(D.utcOffset()-this.utcOffset())*e,U=this-D,Z=o(function(){return C.m(x,D)},"D");switch(S){case d:_=Z()/12;break;case f:_=Z();break;case p:_=Z()/3;break;case l:_=(U-L)/6048e5;break;case u:_=(U-L)/864e5;break;case a:_=U/r;break;case s:_=U/e;break;case i:_=U/t;break;default:_=U}return g?_:C.a(_)},E.daysInMonth=function(){return this.endOf(f).$D},E.$locale=function(){return k[this.$L]},E.locale=function(w,y){if(!w)return this.$L;var g=this.clone(),_=z(w,y,!0);return _&&(g.$L=_),g},E.clone=function(){return C.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},O}(),nt=re.prototype;return N.prototype=nt,[["$ms",n],["$s",i],["$m",s],["$H",a],["$W",u],["$M",f],["$y",d],["$D",b]].forEach(function(O){nt[O[1]]=function(E){return this.$g(E,O[0],O[1])}}),N.extend=function(O,E){return O.$i||(O(E,re,N),O.$i=!0),N},N.locale=z,N.isDayjs=K,N.unix=function(O){return N(1e3*O)},N.en=k[J],N.Ls=k,N.p={},N})});var Dn=F(Qe=>{"use strict";h();Qe.__esModule=!0;Qe.distance=Qe.closest=void 0;var Se=new Uint32Array(65536),qs=o(function(t,e){for(var r=t.length,n=e.length,i=1<<r-1,s=-1,a=0,u=r,l=r;l--;)Se[t.charCodeAt(l)]|=1<<l;for(l=0;l<n;l++){var f=Se[e.charCodeAt(l)],p=f|a;f|=(f&s)+s^s,a|=~(f|s),s&=f,a&i&&u++,s&i&&u--,a=a<<1|1,s=s<<1|~(p|a),a&=p}for(l=r;l--;)Se[t.charCodeAt(l)]=0;return u},"myers_32"),Fs=o(function(t,e){for(var r=e.length,n=t.length,i=[],s=[],a=Math.ceil(r/32),u=Math.ceil(n/32),l=0;l<a;l++)s[l]=-1,i[l]=0;for(var f=0;f<u-1;f++){for(var p=0,d=-1,b=f*32,c=Math.min(32,n)+b,m=b;m<c;m++)Se[t.charCodeAt(m)]|=1<<m;for(var l=0;l<r;l++){var v=Se[e.charCodeAt(l)],T=s[l/32|0]>>>l&1,B=i[l/32|0]>>>l&1,M=v|p,J=((v|B)&d)+d^d|v|B,k=p|~(J|d),H=d&J;k>>>31^T&&(s[l/32|0]^=1<<l),H>>>31^B&&(i[l/32|0]^=1<<l),k=k<<1|T,H=H<<1|B,d=H|~(M|k),p=k&M}for(var m=b;m<c;m++)Se[t.charCodeAt(m)]=0}for(var K=0,z=-1,N=f*32,C=Math.min(32,n-N)+N,m=N;m<C;m++)Se[t.charCodeAt(m)]|=1<<m;for(var re=n,l=0;l<r;l++){var v=Se[e.charCodeAt(l)],T=s[l/32|0]>>>l&1,B=i[l/32|0]>>>l&1,M=v|K,J=((v|B)&z)+z^z|v|B,k=K|~(J|z),H=z&J;re+=k>>>n-1&1,re-=H>>>n-1&1,k>>>31^T&&(s[l/32|0]^=1<<l),H>>>31^B&&(i[l/32|0]^=1<<l),k=k<<1|T,H=H<<1|B,z=H|~(M|k),K=k&M}for(var m=N;m<C;m++)Se[t.charCodeAt(m)]=0;return re},"myers_x"),Bn=o(function(t,e){if(t.length<e.length){var r=e;e=t,t=r}return e.length===0?t.length:t.length<=32?qs(t,e):Fs(t,e)},"distance");Qe.distance=Bn;var Gs=o(function(t,e){for(var r=1/0,n=0,i=0;i<e.length;i++){var s=Bn(t,e[i]);s<r&&(r=s,n=i)}return e[n]},"closest");Qe.closest=Gs});var $n=F((ur,at)=>{h();(function(){"use strict";var t;try{t=typeof Intl<"u"&&typeof Intl.Collator<"u"?Intl.Collator("generic",{sensitivity:"base"}):null}catch{console.log("Collator could not be initialized and wouldn't be used")}var e=Dn(),r=[],n=[],i={get:o(function(s,a,u){var l=u&&t&&u.useCollator;if(l){var f=s.length,p=a.length;if(f===0)return p;if(p===0)return f;var d,b,c,m,v;for(c=0;c<p;++c)r[c]=c,n[c]=a.charCodeAt(c);r[p]=p;var T;for(c=0;c<f;++c){for(b=c+1,m=0;m<p;++m)d=b,T=t.compare(s.charAt(c),String.fromCharCode(n[m]))===0,b=r[m]+(T?0:1),v=d+1,b>v&&(b=v),v=r[m+1]+1,b>v&&(b=v),r[m]=d;r[m]=b}return b}return e.distance(s,a)},"get")};typeof define<"u"&&define!==null&&define.amd?define(function(){return i}):typeof at<"u"&&at!==null&&typeof ur<"u"&&at.exports===ur?at.exports=i:typeof self<"u"&&typeof self.postMessage=="function"&&typeof self.importScripts=="function"?self.Levenshtein=i:typeof window<"u"&&window!==null&&(window.Levenshtein=i)})()});var Nn=F((hr,dr)=>{h();(function(t,e){typeof j=="function"&&typeof hr=="object"&&typeof dr=="object"?dr.exports=e():typeof define=="function"&&define.amd?define(function(){return e()}):t.pluralize=e()})(hr,function(){var t=[],e=[],r={},n={},i={};function s(c){return typeof c=="string"?new RegExp("^"+c+"$","i"):c}o(s,"sanitizeRule");function a(c,m){return c===m?m:c===c.toLowerCase()?m.toLowerCase():c===c.toUpperCase()?m.toUpperCase():c[0]===c[0].toUpperCase()?m.charAt(0).toUpperCase()+m.substr(1).toLowerCase():m.toLowerCase()}o(a,"restoreCase");function u(c,m){return c.replace(/\$(\d{1,2})/g,function(v,T){return m[T]||""})}o(u,"interpolate");function l(c,m){return c.replace(m[0],function(v,T){var B=u(m[1],arguments);return a(v===""?c[T-1]:v,B)})}o(l,"replace");function f(c,m,v){if(!c.length||r.hasOwnProperty(c))return m;for(var T=v.length;T--;){var B=v[T];if(B[0].test(m))return l(m,B)}return m}o(f,"sanitizeWord");function p(c,m,v){return function(T){var B=T.toLowerCase();return m.hasOwnProperty(B)?a(T,B):c.hasOwnProperty(B)?a(T,c[B]):f(B,T,v)}}o(p,"replaceWord");function d(c,m,v,T){return function(B){var M=B.toLowerCase();return m.hasOwnProperty(M)?!0:c.hasOwnProperty(M)?!1:f(M,M,v)===M}}o(d,"checkWord");function b(c,m,v){var T=m===1?b.singular(c):b.plural(c);return(v?m+" ":"")+T}return o(b,"pluralize"),b.plural=p(i,n,t),b.isPlural=d(i,n,t),b.singular=p(n,i,e),b.isSingular=d(n,i,e),b.addPluralRule=function(c,m){t.push([s(c),m])},b.addSingularRule=function(c,m){e.push([s(c),m])},b.addUncountableRule=function(c){if(typeof c=="string"){r[c.toLowerCase()]=!0;return}b.addPluralRule(c,"$0"),b.addSingularRule(c,"$0")},b.addIrregularRule=function(c,m){m=m.toLowerCase(),c=c.toLowerCase(),i[c]=m,n[m]=c},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(c){return b.addIrregularRule(c[0],c[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(c){return b.addPluralRule(c[0],c[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(c){return b.addSingularRule(c[0],c[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(b.addUncountableRule),b})});var Wn=F((kc,jn)=>{"use strict";h();var Fn=12,Qs=0,mr=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,10,9,9,9,11,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,24,36,48,60,72,84,96,0,12,12,12,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,24,24,24,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,48,48,48,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,127,63,63,63,0,31,15,15,15,7,7,7];function Ys(t){var e=t.indexOf("%");if(e===-1)return t;for(var r=t.length,n="",i=0,s=0,a=e,u=Fn;e>-1&&e<r;){var l=Gn(t[e+1],4),f=Gn(t[e+2],0),p=l|f,d=mr[p];if(u=mr[256+u+d],s=s<<6|p&mr[364+d],u===Fn)n+=t.slice(i,a),n+=s<=65535?String.fromCharCode(s):String.fromCharCode(55232+(s>>10),56320+(s&1023)),s=0,i=e+3,e=a=t.indexOf("%",i);else{if(u===Qs)return null;if(e+=3,e<r&&t.charCodeAt(e)===37)continue;return null}}return n+t.slice(i)}o(Ys,"decodeURIComponent");var Js={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};function Gn(t,e){var r=Js[t];return r===void 0?255:r<<e}o(Gn,"hexCodeToInt");jn.exports=Ys});var Yn=F((Bc,Qn)=>{"use strict";h();var Vn=Wn(),zn=/\+/g,Hn=o(function(){},"Empty");Hn.prototype=Object.create(null);function Ks(t){let e=new Hn;if(typeof t!="string")return e;let r=t.length,n="",i="",s=-1,a=-1,u=!1,l=!1,f=!1,p=!1,d=!1,b=0;for(let c=0;c<r+1;c++)if(b=c!==r?t.charCodeAt(c):38,b===38){if(d=a>s,d||(a=c),n=t.slice(s+1,a),d||n.length>0){f&&(n=n.replace(zn," ")),u&&(n=Vn(n)||n),d&&(i=t.slice(a+1,c),p&&(i=i.replace(zn," ")),l&&(i=Vn(i)||i));let m=e[n];m===void 0?e[n]=i:m.pop?m.push(i):e[n]=[m,i]}i="",s=c,a=c,u=!1,l=!1,f=!1,p=!1}else b===61?a<=s?a=c:l=!0:b===43?a>s?p=!0:f=!0:b===37&&(a>s?l=!0:u=!0);return e}o(Ks,"parse");Qn.exports=Ks});var Kn=F((Ac,Jn)=>{h();var ve=Array.from({length:256},(t,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase()),Zs=new Int8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);function Xs(t){let e=t.length;if(e===0)return"";let r="",n=0,i=0;e:for(;i<e;i++){let s=t.charCodeAt(i);for(;s<128;){if(Zs[s]!==1&&(n<i&&(r+=t.slice(n,i)),n=i+1,r+=ve[s]),++i===e)break e;s=t.charCodeAt(i)}if(n<i&&(r+=t.slice(n,i)),s<2048){n=i+1,r+=ve[192|s>>6]+ve[128|s&63];continue}if(s<55296||s>=57344){n=i+1,r+=ve[224|s>>12]+ve[128|s>>6&63]+ve[128|s&63];continue}if(++i,i>=e)throw new Error("URI malformed");let a=t.charCodeAt(i)&1023;n=i+1,s=65536+((s&1023)<<10|a),r+=ve[240|s>>18]+ve[128|s>>12&63]+ve[128|s>>6&63]+ve[128|s&63]}return n===0?t:n<e?r+t.slice(n):r}o(Xs,"encodeString");Jn.exports={encodeString:Xs}});var ei=F((Pc,Xn)=>{"use strict";h();var{encodeString:gr}=Kn();function Zn(t){let e=typeof t;return e==="string"?gr(t):e==="bigint"?t.toString():e==="boolean"?t?"true":"false":e==="number"&&Number.isFinite(t)?t<1e21?""+t:gr(""+t):""}o(Zn,"getAsPrimitive");function eo(t){let e="";if(t===null||typeof t!="object")return e;let r="&",n=Object.keys(t),i=n.length,s=0;for(let a=0;a<i;a++){let u=n[a],l=t[u],f=gr(u)+"=";if(a&&(e+=r),Array.isArray(l)){s=l.length;for(let p=0;p<s;p++)p&&(e+=r),e+=f,e+=Zn(l[p])}else e+=f,e+=Zn(l)}return e}o(eo,"stringify");Xn.exports=eo});var ii=F((qc,ct)=>{"use strict";h();var ti=Yn(),ri=ei(),ni={parse:ti,stringify:ri};ct.exports=ni;ct.exports.default=ni;ct.exports.parse=ti;ct.exports.stringify=ri});var xi=F((gf,Sr)=>{"use strict";h();var _o=Object.prototype.hasOwnProperty,se="~";function ut(){}o(ut,"Events");Object.create&&(ut.prototype=Object.create(null),new ut().__proto__||(se=!1));function xo(t,e,r){this.fn=t,this.context=e,this.once=r||!1}o(xo,"EE");function _i(t,e,r,n,i){if(typeof r!="function")throw new TypeError("The listener must be a function");var s=new xo(r,n||t,i),a=se?se+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],s]:t._events[a].push(s):(t._events[a]=s,t._eventsCount++),t}o(_i,"addListener");function $t(t,e){--t._eventsCount===0?t._events=new ut:delete t._events[e]}o($t,"clearEvent");function te(){this._events=new ut,this._eventsCount=0}o(te,"EventEmitter");te.prototype.eventNames=o(function(){var e=[],r,n;if(this._eventsCount===0)return e;for(n in r=this._events)_o.call(r,n)&&e.push(se?n.slice(1):n);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(r)):e},"eventNames");te.prototype.listeners=o(function(e){var r=se?se+e:e,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,s=n.length,a=new Array(s);i<s;i++)a[i]=n[i].fn;return a},"listeners");te.prototype.listenerCount=o(function(e){var r=se?se+e:e,n=this._events[r];return n?n.fn?1:n.length:0},"listenerCount");te.prototype.emit=o(function(e,r,n,i,s,a){var u=se?se+e:e;if(!this._events[u])return!1;var l=this._events[u],f=arguments.length,p,d;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,r),!0;case 3:return l.fn.call(l.context,r,n),!0;case 4:return l.fn.call(l.context,r,n,i),!0;case 5:return l.fn.call(l.context,r,n,i,s),!0;case 6:return l.fn.call(l.context,r,n,i,s,a),!0}for(d=1,p=new Array(f-1);d<f;d++)p[d-1]=arguments[d];l.fn.apply(l.context,p)}else{var b=l.length,c;for(d=0;d<b;d++)switch(l[d].once&&this.removeListener(e,l[d].fn,void 0,!0),f){case 1:l[d].fn.call(l[d].context);break;case 2:l[d].fn.call(l[d].context,r);break;case 3:l[d].fn.call(l[d].context,r,n);break;case 4:l[d].fn.call(l[d].context,r,n,i);break;default:if(!p)for(c=1,p=new Array(f-1);c<f;c++)p[c-1]=arguments[c];l[d].fn.apply(l[d].context,p)}}return!0},"emit");te.prototype.on=o(function(e,r,n){return _i(this,e,r,n,!1)},"on");te.prototype.once=o(function(e,r,n){return _i(this,e,r,n,!0)},"once");te.prototype.removeListener=o(function(e,r,n,i){var s=se?se+e:e;if(!this._events[s])return this;if(!r)return $t(this,s),this;var a=this._events[s];if(a.fn)a.fn===r&&(!i||a.once)&&(!n||a.context===n)&&$t(this,s);else{for(var u=0,l=[],f=a.length;u<f;u++)(a[u].fn!==r||i&&!a[u].once||n&&a[u].context!==n)&&l.push(a[u]);l.length?this._events[s]=l.length===1?l[0]:l:$t(this,s)}return this},"removeListener");te.prototype.removeAllListeners=o(function(e){var r;return e?(r=se?se+e:e,this._events[r]&&$t(this,r)):(this._events=new ut,this._eventsCount=0),this},"removeAllListeners");te.prototype.off=te.prototype.removeListener;te.prototype.addListener=te.prototype.on;te.prefixed=se;te.EventEmitter=te;typeof Sr<"u"&&(Sr.exports=te)});var Oi=F((Pf,Ti)=>{"use strict";h();var{Duplex:wo}=j("stream");function Ei(t){t.emit("close")}o(Ei,"emitClose");function vo(){!this.destroyed&&this._writableState.finished&&this.destroy()}o(vo,"duplexOnEnd");function Si(t){this.removeListener("error",Si),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}o(Si,"duplexOnError");function Eo(t,e){let r=!0,n=new wo({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",o(function(s,a){let u=!a&&n._readableState.objectMode?s.toString():s;n.push(u)||t.pause()},"message")),t.once("error",o(function(s){n.destroyed||(r=!1,n.destroy(s))},"error")),t.once("close",o(function(){n.destroyed||n.push(null)},"close")),n._destroy=function(i,s){if(t.readyState===t.CLOSED){s(i),process.nextTick(Ei,n);return}let a=!1;t.once("error",o(function(l){a=!0,s(l)},"error")),t.once("close",o(function(){a||s(i),process.nextTick(Ei,n)},"close")),r&&t.terminate()},n._final=function(i){if(t.readyState===t.CONNECTING){t.once("open",o(function(){n._final(i)},"open"));return}t._socket!==null&&(t._socket._writableState.finished?(i(),n._readableState.endEmitted&&n.destroy()):(t._socket.once("finish",o(function(){i()},"finish")),t.close()))},n._read=function(){t.isPaused&&t.resume()},n._write=function(i,s,a){if(t.readyState===t.CONNECTING){t.once("open",o(function(){n._write(i,s,a)},"open"));return}t.send(i,a)},n.on("end",vo),n.on("error",Si),n}o(Eo,"createWebSocketStream");Ti.exports=Eo});var Le=F((qf,Ci)=>{"use strict";h();var Li=["nodebuffer","arraybuffer","fragments"],ki=typeof Blob<"u";ki&&Li.push("blob");Ci.exports={BINARY_TYPES:Li,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:ki,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:o(()=>{},"NOOP")}});var pt=F((jf,At)=>{"use strict";h();var{EMPTY_BUFFER:So}=Le(),Cr=Buffer[Symbol.species];function To(t,e){if(t.length===0)return So;if(t.length===1)return t[0];let r=Buffer.allocUnsafe(e),n=0;for(let i=0;i<t.length;i++){let s=t[i];r.set(s,n),n+=s.length}return n<e?new Cr(r.buffer,r.byteOffset,n):r}o(To,"concat");function Ri(t,e,r,n,i){for(let s=0;s<i;s++)r[n+s]=t[s]^e[s&3]}o(Ri,"_mask");function Bi(t,e){for(let r=0;r<t.length;r++)t[r]^=e[r&3]}o(Bi,"_unmask");function Oo(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)}o(Oo,"toArrayBuffer");function Rr(t){if(Rr.readOnly=!0,Buffer.isBuffer(t))return t;let e;return t instanceof ArrayBuffer?e=new Cr(t):ArrayBuffer.isView(t)?e=new Cr(t.buffer,t.byteOffset,t.byteLength):(e=Buffer.from(t),Rr.readOnly=!1),e}o(Rr,"toBuffer");At.exports={concat:To,mask:Ri,toArrayBuffer:Oo,toBuffer:Rr,unmask:Bi};if(!process.env.WS_NO_BUFFER_UTIL)try{let t=j("bufferutil");At.exports.mask=function(e,r,n,i,s){s<48?Ri(e,r,n,i,s):t.mask(e,r,n,i,s)},At.exports.unmask=function(e,r){e.length<32?Bi(e,r):t.unmask(e,r)}}catch{}});var Ai=F((zf,$i)=>{"use strict";h();var Di=Symbol("kDone"),Br=Symbol("kRun"),Dr=class{static{o(this,"Limiter")}constructor(e){this[Di]=()=>{this.pending--,this[Br]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Br]()}[Br](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Di])}}};$i.exports=Dr});var yt=F((Yf,Mi)=>{"use strict";h();var mt=j("zlib"),Ni=pt(),Lo=Ai(),{kStatusCode:Ii}=Le(),ko=Buffer[Symbol.species],Co=Buffer.from([0,0,255,255]),Pt=Symbol("permessage-deflate"),ke=Symbol("total-length"),gt=Symbol("callback"),Ne=Symbol("buffers"),It=Symbol("error"),Nt,$r=class{static{o(this,"PerMessageDeflate")}constructor(e,r,n){if(this._maxPayload=n|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!r,this._deflate=null,this._inflate=null,this.params=null,!Nt){let i=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Nt=new Lo(i)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[gt];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let r=this._options,n=e.find(i=>!(r.serverNoContextTakeover===!1&&i.server_no_context_takeover||i.server_max_window_bits&&(r.serverMaxWindowBits===!1||typeof r.serverMaxWindowBits=="number"&&r.serverMaxWindowBits>i.server_max_window_bits)||typeof r.clientMaxWindowBits=="number"&&!i.client_max_window_bits));if(!n)throw new Error("None of the extension offers can be accepted");return r.serverNoContextTakeover&&(n.server_no_context_takeover=!0),r.clientNoContextTakeover&&(n.client_no_context_takeover=!0),typeof r.serverMaxWindowBits=="number"&&(n.server_max_window_bits=r.serverMaxWindowBits),typeof r.clientMaxWindowBits=="number"?n.client_max_window_bits=r.clientMaxWindowBits:(n.client_max_window_bits===!0||r.clientMaxWindowBits===!1)&&delete n.client_max_window_bits,n}acceptAsClient(e){let r=e[0];if(this._options.clientNoContextTakeover===!1&&r.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!r.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(r.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&r.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return r}normalizeParams(e){return e.forEach(r=>{Object.keys(r).forEach(n=>{let i=r[n];if(i.length>1)throw new Error(`Parameter "${n}" must have only a single value`);if(i=i[0],n==="client_max_window_bits"){if(i!==!0){let s=+i;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${n}": ${i}`);i=s}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${n}": ${i}`)}else if(n==="server_max_window_bits"){let s=+i;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${n}": ${i}`);i=s}else if(n==="client_no_context_takeover"||n==="server_no_context_takeover"){if(i!==!0)throw new TypeError(`Invalid value for parameter "${n}": ${i}`)}else throw new Error(`Unknown parameter "${n}"`);r[n]=i})}),e}decompress(e,r,n){Nt.add(i=>{this._decompress(e,r,(s,a)=>{i(),n(s,a)})})}compress(e,r,n){Nt.add(i=>{this._compress(e,r,(s,a)=>{i(),n(s,a)})})}_decompress(e,r,n){let i=this._isServer?"client":"server";if(!this._inflate){let s=`${i}_max_window_bits`,a=typeof this.params[s]!="number"?mt.Z_DEFAULT_WINDOWBITS:this.params[s];this._inflate=mt.createInflateRaw({...this._options.zlibInflateOptions,windowBits:a}),this._inflate[Pt]=this,this._inflate[ke]=0,this._inflate[Ne]=[],this._inflate.on("error",Bo),this._inflate.on("data",Pi)}this._inflate[gt]=n,this._inflate.write(e),r&&this._inflate.write(Co),this._inflate.flush(()=>{let s=this._inflate[It];if(s){this._inflate.close(),this._inflate=null,n(s);return}let a=Ni.concat(this._inflate[Ne],this._inflate[ke]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[ke]=0,this._inflate[Ne]=[],r&&this.params[`${i}_no_context_takeover`]&&this._inflate.reset()),n(null,a)})}_compress(e,r,n){let i=this._isServer?"server":"client";if(!this._deflate){let s=`${i}_max_window_bits`,a=typeof this.params[s]!="number"?mt.Z_DEFAULT_WINDOWBITS:this.params[s];this._deflate=mt.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:a}),this._deflate[ke]=0,this._deflate[Ne]=[],this._deflate.on("data",Ro)}this._deflate[gt]=n,this._deflate.write(e),this._deflate.flush(mt.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let s=Ni.concat(this._deflate[Ne],this._deflate[ke]);r&&(s=new ko(s.buffer,s.byteOffset,s.length-4)),this._deflate[gt]=null,this._deflate[ke]=0,this._deflate[Ne]=[],r&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),n(null,s)})}};Mi.exports=$r;function Ro(t){this[Ne].push(t),this[ke]+=t.length}o(Ro,"deflateOnData");function Pi(t){if(this[ke]+=t.length,this[Pt]._maxPayload<1||this[ke]<=this[Pt]._maxPayload){this[Ne].push(t);return}this[It]=new RangeError("Max payload size exceeded"),this[It].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[It][Ii]=1009,this.removeListener("data",Pi),this.reset()}o(Pi,"inflateOnData");function Bo(t){this[Pt]._inflate=null,t[Ii]=1007,this[gt](t)}o(Bo,"inflateOnError")});var Ze=F((Zf,Mt)=>{"use strict";h();var{isUtf8:Ui}=j("buffer"),{hasBlob:Do}=Le(),$o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function Ao(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}o(Ao,"isValidStatusCode");function Ar(t){let e=t.length,r=0;for(;r<e;)if(!(t[r]&128))r++;else if((t[r]&224)===192){if(r+1===e||(t[r+1]&192)!==128||(t[r]&254)===192)return!1;r+=2}else if((t[r]&240)===224){if(r+2>=e||(t[r+1]&192)!==128||(t[r+2]&192)!==128||t[r]===224&&(t[r+1]&224)===128||t[r]===237&&(t[r+1]&224)===160)return!1;r+=3}else if((t[r]&248)===240){if(r+3>=e||(t[r+1]&192)!==128||(t[r+2]&192)!==128||(t[r+3]&192)!==128||t[r]===240&&(t[r+1]&240)===128||t[r]===244&&t[r+1]>143||t[r]>244)return!1;r+=4}else return!1;return!0}o(Ar,"_isValidUTF8");function No(t){return Do&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&(t[Symbol.toStringTag]==="Blob"||t[Symbol.toStringTag]==="File")}o(No,"isBlob");Mt.exports={isBlob:No,isValidStatusCode:Ao,isValidUTF8:Ar,tokenChars:$o};if(Ui)Mt.exports.isValidUTF8=function(t){return t.length<24?Ar(t):Ui(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=j("utf-8-validate");Mt.exports.isValidUTF8=function(e){return e.length<32?Ar(e):t(e)}}catch{}});var Ur=F((th,zi)=>{"use strict";h();var{Writable:Io}=j("stream"),qi=yt(),{BINARY_TYPES:Po,EMPTY_BUFFER:Fi,kStatusCode:Mo,kWebSocket:Uo}=Le(),{concat:Nr,toArrayBuffer:qo,unmask:Fo}=pt(),{isValidStatusCode:Go,isValidUTF8:Gi}=Ze(),Ut=Buffer[Symbol.species],de=0,ji=1,Wi=2,Vi=3,Ir=4,Pr=5,qt=6,Mr=class extends Io{static{o(this,"Receiver")}constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||Po[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[Uo]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=de}_write(e,r,n){if(this._opcode===8&&this._state==de)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let n=this._buffers[0];return this._buffers[0]=new Ut(n.buffer,n.byteOffset+e,n.length-e),new Ut(n.buffer,n.byteOffset,e)}let r=Buffer.allocUnsafe(e);do{let n=this._buffers[0],i=r.length-e;e>=n.length?r.set(this._buffers.shift(),i):(r.set(new Uint8Array(n.buffer,n.byteOffset,e),i),this._buffers[0]=new Ut(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return r}startLoop(e){this._loop=!0;do switch(this._state){case de:this.getInfo(e);break;case ji:this.getPayloadLength16(e);break;case Wi:this.getPayloadLength64(e);break;case Vi:this.getMask();break;case Ir:this.getData(e);break;case Pr:case qt:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let r=this.consume(2);if(r[0]&48){let i=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(i);return}let n=(r[0]&64)===64;if(n&&!this._extensions[qi.extensionName]){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._fin=(r[0]&128)===128,this._opcode=r[0]&15,this._payloadLength=r[1]&127,this._opcode===0){if(n){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(!this._fragmented){let i=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._compressed=n}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let i=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(i);return}if(n){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let i=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(i);return}}else{let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(r[1]&128)===128,this._isServer){if(!this._masked){let i=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(i);return}}else if(this._masked){let i=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(i);return}this._payloadLength===126?this._state=ji:this._payloadLength===127?this._state=Wi:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let r=this.consume(8),n=r.readUInt32BE(0);if(n>Math.pow(2,21)-1){let i=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(i);return}this._payloadLength=n*Math.pow(2,32)+r.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let r=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(r);return}this._masked?this._state=Vi:this._state=Ir}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Ir}getData(e){let r=Fi;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}r=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&Fo(r,this._mask)}if(this._opcode>7){this.controlMessage(r,e);return}if(this._compressed){this._state=Pr,this.decompress(r,e);return}r.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(r)),this.dataMessage(e)}decompress(e,r){this._extensions[qi.extensionName].decompress(e,this._fin,(i,s)=>{if(i)return r(i);if(s.length){if(this._messageLength+=s.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let a=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");r(a);return}this._fragments.push(s)}this.dataMessage(r),this._state===de&&this.startLoop(r)})}dataMessage(e){if(!this._fin){this._state=de;return}let r=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let i;this._binaryType==="nodebuffer"?i=Nr(n,r):this._binaryType==="arraybuffer"?i=qo(Nr(n,r)):this._binaryType==="blob"?i=new Blob(n):i=n,this._allowSynchronousEvents?(this.emit("message",i,!0),this._state=de):(this._state=qt,setImmediate(()=>{this.emit("message",i,!0),this._state=de,this.startLoop(e)}))}else{let i=Nr(n,r);if(!this._skipUTF8Validation&&!Gi(i)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(s);return}this._state===Pr||this._allowSynchronousEvents?(this.emit("message",i,!1),this._state=de):(this._state=qt,setImmediate(()=>{this.emit("message",i,!1),this._state=de,this.startLoop(e)}))}}controlMessage(e,r){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,Fi),this.end();else{let n=e.readUInt16BE(0);if(!Go(n)){let s=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");r(s);return}let i=new Ut(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Gi(i)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");r(s);return}this._loop=!1,this.emit("conclude",n,i),this.end()}this._state=de;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=de):(this._state=qt,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=de,this.startLoop(r)}))}createError(e,r,n,i,s){this._loop=!1,this._errored=!0;let a=new e(n?`Invalid WebSocket frame: ${r}`:r);return Error.captureStackTrace(a,this.createError),a.code=s,a[Mo]=i,a}};zi.exports=Mr});var Gr=F((sh,Yi)=>{"use strict";h();var{Duplex:ih}=j("stream"),{randomFillSync:jo}=j("crypto"),Hi=yt(),{EMPTY_BUFFER:Wo,kWebSocket:Vo,NOOP:zo}=Le(),{isBlob:Xe,isValidStatusCode:Ho}=Ze(),{mask:Qi,toBuffer:Ue}=pt(),pe=Symbol("kByteLength"),Qo=Buffer.alloc(4),Ft=8*1024,qe,et=Ft,_e=0,Yo=1,Jo=2,qr=class t{static{o(this,"Sender")}constructor(e,r,n){this._extensions=r||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=_e,this.onerror=zo,this[Vo]=void 0}static frame(e,r){let n,i=!1,s=2,a=!1;r.mask&&(n=r.maskBuffer||Qo,r.generateMask?r.generateMask(n):(et===Ft&&(qe===void 0&&(qe=Buffer.alloc(Ft)),jo(qe,0,Ft),et=0),n[0]=qe[et++],n[1]=qe[et++],n[2]=qe[et++],n[3]=qe[et++]),a=(n[0]|n[1]|n[2]|n[3])===0,s=6);let u;typeof e=="string"?(!r.mask||a)&&r[pe]!==void 0?u=r[pe]:(e=Buffer.from(e),u=e.length):(u=e.length,i=r.mask&&r.readOnly&&!a);let l=u;u>=65536?(s+=8,l=127):u>125&&(s+=2,l=126);let f=Buffer.allocUnsafe(i?u+s:s);return f[0]=r.fin?r.opcode|128:r.opcode,r.rsv1&&(f[0]|=64),f[1]=l,l===126?f.writeUInt16BE(u,2):l===127&&(f[2]=f[3]=0,f.writeUIntBE(u,4,6)),r.mask?(f[1]|=128,f[s-4]=n[0],f[s-3]=n[1],f[s-2]=n[2],f[s-1]=n[3],a?[f,e]:i?(Qi(e,n,f,s,u),[f]):(Qi(e,n,e,0,u),[f,e])):[f,e]}close(e,r,n,i){let s;if(e===void 0)s=Wo;else{if(typeof e!="number"||!Ho(e))throw new TypeError("First argument must be a valid error code number");if(r===void 0||!r.length)s=Buffer.allocUnsafe(2),s.writeUInt16BE(e,0);else{let u=Buffer.byteLength(r);if(u>123)throw new RangeError("The message must not be greater than 123 bytes");s=Buffer.allocUnsafe(2+u),s.writeUInt16BE(e,0),typeof r=="string"?s.write(r,2):s.set(r,2)}}let a={[pe]:s.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==_e?this.enqueue([this.dispatch,s,!1,a,i]):this.sendFrame(t.frame(s,a),i)}ping(e,r,n){let i,s;if(typeof e=="string"?(i=Buffer.byteLength(e),s=!1):Xe(e)?(i=e.size,s=!1):(e=Ue(e),i=e.length,s=Ue.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let a={[pe]:i,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:9,readOnly:s,rsv1:!1};Xe(e)?this._state!==_e?this.enqueue([this.getBlobData,e,!1,a,n]):this.getBlobData(e,!1,a,n):this._state!==_e?this.enqueue([this.dispatch,e,!1,a,n]):this.sendFrame(t.frame(e,a),n)}pong(e,r,n){let i,s;if(typeof e=="string"?(i=Buffer.byteLength(e),s=!1):Xe(e)?(i=e.size,s=!1):(e=Ue(e),i=e.length,s=Ue.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let a={[pe]:i,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:10,readOnly:s,rsv1:!1};Xe(e)?this._state!==_e?this.enqueue([this.getBlobData,e,!1,a,n]):this.getBlobData(e,!1,a,n):this._state!==_e?this.enqueue([this.dispatch,e,!1,a,n]):this.sendFrame(t.frame(e,a),n)}send(e,r,n){let i=this._extensions[Hi.extensionName],s=r.binary?2:1,a=r.compress,u,l;typeof e=="string"?(u=Buffer.byteLength(e),l=!1):Xe(e)?(u=e.size,l=!1):(e=Ue(e),u=e.length,l=Ue.readOnly),this._firstFragment?(this._firstFragment=!1,a&&i&&i.params[i._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(a=u>=i._threshold),this._compress=a):(a=!1,s=0),r.fin&&(this._firstFragment=!0);let f={[pe]:u,fin:r.fin,generateMask:this._generateMask,mask:r.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:l,rsv1:a};Xe(e)?this._state!==_e?this.enqueue([this.getBlobData,e,this._compress,f,n]):this.getBlobData(e,this._compress,f,n):this._state!==_e?this.enqueue([this.dispatch,e,this._compress,f,n]):this.dispatch(e,this._compress,f,n)}getBlobData(e,r,n,i){this._bufferedBytes+=n[pe],this._state=Jo,e.arrayBuffer().then(s=>{if(this._socket.destroyed){let u=new Error("The socket was closed while the blob was being read");process.nextTick(Fr,this,u,i);return}this._bufferedBytes-=n[pe];let a=Ue(s);r?this.dispatch(a,r,n,i):(this._state=_e,this.sendFrame(t.frame(a,n),i),this.dequeue())}).catch(s=>{process.nextTick(Ko,this,s,i)})}dispatch(e,r,n,i){if(!r){this.sendFrame(t.frame(e,n),i);return}let s=this._extensions[Hi.extensionName];this._bufferedBytes+=n[pe],this._state=Yo,s.compress(e,n.fin,(a,u)=>{if(this._socket.destroyed){let l=new Error("The socket was closed while data was being compressed");Fr(this,l,i);return}this._bufferedBytes-=n[pe],this._state=_e,n.readOnly=!1,this.sendFrame(t.frame(u,n),i),this.dequeue()})}dequeue(){for(;this._state===_e&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][pe],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][pe],this._queue.push(e)}sendFrame(e,r){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],r),this._socket.uncork()):this._socket.write(e[0],r)}};Yi.exports=qr;function Fr(t,e,r){typeof r=="function"&&r(e);for(let n=0;n<t._queue.length;n++){let i=t._queue[n],s=i[i.length-1];typeof s=="function"&&s(e)}}o(Fr,"callCallbacks");function Ko(t,e,r){Fr(t,e,r),t.onerror(e)}o(Ko,"onError")});var is=F((lh,ns)=>{"use strict";h();var{kForOnEventAttribute:bt,kListener:jr}=Le(),Ji=Symbol("kCode"),Ki=Symbol("kData"),Zi=Symbol("kError"),Xi=Symbol("kMessage"),es=Symbol("kReason"),tt=Symbol("kTarget"),ts=Symbol("kType"),rs=Symbol("kWasClean"),Ce=class{static{o(this,"Event")}constructor(e){this[tt]=null,this[ts]=e}get target(){return this[tt]}get type(){return this[ts]}};Object.defineProperty(Ce.prototype,"target",{enumerable:!0});Object.defineProperty(Ce.prototype,"type",{enumerable:!0});var Fe=class extends Ce{static{o(this,"CloseEvent")}constructor(e,r={}){super(e),this[Ji]=r.code===void 0?0:r.code,this[es]=r.reason===void 0?"":r.reason,this[rs]=r.wasClean===void 0?!1:r.wasClean}get code(){return this[Ji]}get reason(){return this[es]}get wasClean(){return this[rs]}};Object.defineProperty(Fe.prototype,"code",{enumerable:!0});Object.defineProperty(Fe.prototype,"reason",{enumerable:!0});Object.defineProperty(Fe.prototype,"wasClean",{enumerable:!0});var rt=class extends Ce{static{o(this,"ErrorEvent")}constructor(e,r={}){super(e),this[Zi]=r.error===void 0?null:r.error,this[Xi]=r.message===void 0?"":r.message}get error(){return this[Zi]}get message(){return this[Xi]}};Object.defineProperty(rt.prototype,"error",{enumerable:!0});Object.defineProperty(rt.prototype,"message",{enumerable:!0});var _t=class extends Ce{static{o(this,"MessageEvent")}constructor(e,r={}){super(e),this[Ki]=r.data===void 0?null:r.data}get data(){return this[Ki]}};Object.defineProperty(_t.prototype,"data",{enumerable:!0});var Zo={addEventListener(t,e,r={}){for(let i of this.listeners(t))if(!r[bt]&&i[jr]===e&&!i[bt])return;let n;if(t==="message")n=o(function(s,a){let u=new _t("message",{data:a?s:s.toString()});u[tt]=this,Gt(e,this,u)},"onMessage");else if(t==="close")n=o(function(s,a){let u=new Fe("close",{code:s,reason:a.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});u[tt]=this,Gt(e,this,u)},"onClose");else if(t==="error")n=o(function(s){let a=new rt("error",{error:s,message:s.message});a[tt]=this,Gt(e,this,a)},"onError");else if(t==="open")n=o(function(){let s=new Ce("open");s[tt]=this,Gt(e,this,s)},"onOpen");else return;n[bt]=!!r[bt],n[jr]=e,r.once?this.once(t,n):this.on(t,n)},removeEventListener(t,e){for(let r of this.listeners(t))if(r[jr]===e&&!r[bt]){this.removeListener(t,r);break}}};ns.exports={CloseEvent:Fe,ErrorEvent:rt,Event:Ce,EventTarget:Zo,MessageEvent:_t};function Gt(t,e,r){typeof t=="object"&&t.handleEvent?t.handleEvent.call(t,r):t.call(e,r)}o(Gt,"callListener")});var Wr=F((fh,ss)=>{"use strict";h();var{tokenChars:xt}=Ze();function Ee(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}o(Ee,"push");function Xo(t){let e=Object.create(null),r=Object.create(null),n=!1,i=!1,s=!1,a,u,l=-1,f=-1,p=-1,d=0;for(;d<t.length;d++)if(f=t.charCodeAt(d),a===void 0)if(p===-1&&xt[f]===1)l===-1&&(l=d);else if(d!==0&&(f===32||f===9))p===-1&&l!==-1&&(p=d);else if(f===59||f===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${d}`);p===-1&&(p=d);let c=t.slice(l,p);f===44?(Ee(e,c,r),r=Object.create(null)):a=c,l=p=-1}else throw new SyntaxError(`Unexpected character at index ${d}`);else if(u===void 0)if(p===-1&&xt[f]===1)l===-1&&(l=d);else if(f===32||f===9)p===-1&&l!==-1&&(p=d);else if(f===59||f===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${d}`);p===-1&&(p=d),Ee(r,t.slice(l,p),!0),f===44&&(Ee(e,a,r),r=Object.create(null),a=void 0),l=p=-1}else if(f===61&&l!==-1&&p===-1)u=t.slice(l,d),l=p=-1;else throw new SyntaxError(`Unexpected character at index ${d}`);else if(i){if(xt[f]!==1)throw new SyntaxError(`Unexpected character at index ${d}`);l===-1?l=d:n||(n=!0),i=!1}else if(s)if(xt[f]===1)l===-1&&(l=d);else if(f===34&&l!==-1)s=!1,p=d;else if(f===92)i=!0;else throw new SyntaxError(`Unexpected character at index ${d}`);else if(f===34&&t.charCodeAt(d-1)===61)s=!0;else if(p===-1&&xt[f]===1)l===-1&&(l=d);else if(l!==-1&&(f===32||f===9))p===-1&&(p=d);else if(f===59||f===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${d}`);p===-1&&(p=d);let c=t.slice(l,p);n&&(c=c.replace(/\\/g,""),n=!1),Ee(r,u,c),f===44&&(Ee(e,a,r),r=Object.create(null),a=void 0),u=void 0,l=p=-1}else throw new SyntaxError(`Unexpected character at index ${d}`);if(l===-1||s||f===32||f===9)throw new SyntaxError("Unexpected end of input");p===-1&&(p=d);let b=t.slice(l,p);return a===void 0?Ee(e,b,r):(u===void 0?Ee(r,b,!0):n?Ee(r,u,b.replace(/\\/g,"")):Ee(r,u,b),Ee(e,a,r)),e}o(Xo,"parse");function ea(t){return Object.keys(t).map(e=>{let r=t[e];return Array.isArray(r)||(r=[r]),r.map(n=>[e].concat(Object.keys(n).map(i=>{let s=n[i];return Array.isArray(s)||(s=[s]),s.map(a=>a===!0?i:`${i}=${a}`).join("; ")})).join("; ")).join(", ")}).join(", ")}o(ea,"format");ss.exports={format:ea,parse:Xo}});var Yr=F((gh,ys)=>{"use strict";h();var ta=j("events"),ra=j("https"),na=j("http"),ls=j("net"),ia=j("tls"),{randomBytes:sa,createHash:oa}=j("crypto"),{Duplex:ph,Readable:mh}=j("stream"),{URL:Vr}=j("url"),Ie=yt(),aa=Ur(),la=Gr(),{isBlob:ca}=Ze(),{BINARY_TYPES:os,EMPTY_BUFFER:jt,GUID:ua,kForOnEventAttribute:zr,kListener:fa,kStatusCode:ha,kWebSocket:ee,NOOP:cs}=Le(),{EventTarget:{addEventListener:da,removeEventListener:pa}}=is(),{format:ma,parse:ga}=Wr(),{toBuffer:ya}=pt(),ba=30*1e3,us=Symbol("kAborted"),Hr=[8,13],Re=["CONNECTING","OPEN","CLOSING","CLOSED"],_a=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,V=class t extends ta{static{o(this,"WebSocket")}constructor(e,r,n){super(),this._binaryType=os[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=jt,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=t.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,r===void 0?r=[]:Array.isArray(r)||(typeof r=="object"&&r!==null?(n=r,r=[]):r=[r]),fs(this,e,r,n)):(this._autoPong=n.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){os.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,r,n){let i=new aa({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation}),s=new la(e,this._extensions,n.generateMask);this._receiver=i,this._sender=s,this._socket=e,i[ee]=this,s[ee]=this,e[ee]=this,i.on("conclude",va),i.on("drain",Ea),i.on("error",Sa),i.on("message",Ta),i.on("ping",Oa),i.on("pong",La),s.onerror=ka,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),r.length>0&&e.unshift(r),e.on("close",ps),e.on("data",Vt),e.on("end",ms),e.on("error",gs),this._readyState=t.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Ie.extensionName]&&this._extensions[Ie.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,r){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){fe(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===t.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=t.CLOSING,this._sender.close(e,r,!this._isServer,n=>{n||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),ds(this)}}pause(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,r,n){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(n=e,e=r=void 0):typeof r=="function"&&(n=r,r=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Qr(this,e,n);return}r===void 0&&(r=!this._isServer),this._sender.ping(e||jt,r,n)}pong(e,r,n){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(n=e,e=r=void 0):typeof r=="function"&&(n=r,r=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Qr(this,e,n);return}r===void 0&&(r=!this._isServer),this._sender.pong(e||jt,r,n)}resume(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,r,n){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof r=="function"&&(n=r,r={}),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Qr(this,e,n);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...r};this._extensions[Ie.extensionName]||(i.compress=!1),this._sender.send(e||jt,i,n)}terminate(){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){fe(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=t.CLOSING,this._socket.destroy())}}};Object.defineProperty(V,"CONNECTING",{enumerable:!0,value:Re.indexOf("CONNECTING")});Object.defineProperty(V.prototype,"CONNECTING",{enumerable:!0,value:Re.indexOf("CONNECTING")});Object.defineProperty(V,"OPEN",{enumerable:!0,value:Re.indexOf("OPEN")});Object.defineProperty(V.prototype,"OPEN",{enumerable:!0,value:Re.indexOf("OPEN")});Object.defineProperty(V,"CLOSING",{enumerable:!0,value:Re.indexOf("CLOSING")});Object.defineProperty(V.prototype,"CLOSING",{enumerable:!0,value:Re.indexOf("CLOSING")});Object.defineProperty(V,"CLOSED",{enumerable:!0,value:Re.indexOf("CLOSED")});Object.defineProperty(V.prototype,"CLOSED",{enumerable:!0,value:Re.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(V.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(V.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[zr])return e[fa];return null},set(e){for(let r of this.listeners(t))if(r[zr]){this.removeListener(t,r);break}typeof e=="function"&&this.addEventListener(t,e,{[zr]:!0})}})});V.prototype.addEventListener=da;V.prototype.removeEventListener=pa;ys.exports=V;function fs(t,e,r,n){let i={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Hr[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...n,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=i.autoPong,!Hr.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Hr.join(", ")})`);let s;if(e instanceof Vr)s=e;else try{s=new Vr(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}s.protocol==="http:"?s.protocol="ws:":s.protocol==="https:"&&(s.protocol="wss:"),t._url=s.href;let a=s.protocol==="wss:",u=s.protocol==="ws+unix:",l;if(s.protocol!=="ws:"&&!a&&!u?l=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:u&&!s.pathname?l="The URL's pathname is empty":s.hash&&(l="The URL contains a fragment identifier"),l){let v=new SyntaxError(l);if(t._redirects===0)throw v;Wt(t,v);return}let f=a?443:80,p=sa(16).toString("base64"),d=a?ra.request:na.request,b=new Set,c;if(i.createConnection=i.createConnection||(a?wa:xa),i.defaultPort=i.defaultPort||f,i.port=s.port||f,i.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":p,Connection:"Upgrade",Upgrade:"websocket"},i.path=s.pathname+s.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(c=new Ie(i.perMessageDeflate!==!0?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=ma({[Ie.extensionName]:c.offer()})),r.length){for(let v of r){if(typeof v!="string"||!_a.test(v)||b.has(v))throw new SyntaxError("An invalid or duplicated subprotocol was specified");b.add(v)}i.headers["Sec-WebSocket-Protocol"]=r.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(s.username||s.password)&&(i.auth=`${s.username}:${s.password}`),u){let v=i.path.split(":");i.socketPath=v[0],i.path=v[1]}let m;if(i.followRedirects){if(t._redirects===0){t._originalIpc=u,t._originalSecure=a,t._originalHostOrSocketPath=u?i.socketPath:s.host;let v=n&&n.headers;if(n={...n,headers:{}},v)for(let[T,B]of Object.entries(v))n.headers[T.toLowerCase()]=B}else if(t.listenerCount("redirect")===0){let v=u?t._originalIpc?i.socketPath===t._originalHostOrSocketPath:!1:t._originalIpc?!1:s.host===t._originalHostOrSocketPath;(!v||t._originalSecure&&!a)&&(delete i.headers.authorization,delete i.headers.cookie,v||delete i.headers.host,i.auth=void 0)}i.auth&&!n.headers.authorization&&(n.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),m=t._req=d(i),t._redirects&&t.emit("redirect",t.url,m)}else m=t._req=d(i);i.timeout&&m.on("timeout",()=>{fe(t,m,"Opening handshake has timed out")}),m.on("error",v=>{m===null||m[us]||(m=t._req=null,Wt(t,v))}),m.on("response",v=>{let T=v.headers.location,B=v.statusCode;if(T&&i.followRedirects&&B>=300&&B<400){if(++t._redirects>i.maxRedirects){fe(t,m,"Maximum redirects exceeded");return}m.abort();let M;try{M=new Vr(T,e)}catch{let k=new SyntaxError(`Invalid URL: ${T}`);Wt(t,k);return}fs(t,M,r,n)}else t.emit("unexpected-response",m,v)||fe(t,m,`Unexpected server response: ${v.statusCode}`)}),m.on("upgrade",(v,T,B)=>{if(t.emit("upgrade",v),t.readyState!==V.CONNECTING)return;m=t._req=null;let M=v.headers.upgrade;if(M===void 0||M.toLowerCase()!=="websocket"){fe(t,T,"Invalid Upgrade header");return}let J=oa("sha1").update(p+ua).digest("base64");if(v.headers["sec-websocket-accept"]!==J){fe(t,T,"Invalid Sec-WebSocket-Accept header");return}let k=v.headers["sec-websocket-protocol"],H;if(k!==void 0?b.size?b.has(k)||(H="Server sent an invalid subprotocol"):H="Server sent a subprotocol but none was requested":b.size&&(H="Server sent no subprotocol"),H){fe(t,T,H);return}k&&(t._protocol=k);let K=v.headers["sec-websocket-extensions"];if(K!==void 0){if(!c){fe(t,T,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let z;try{z=ga(K)}catch{fe(t,T,"Invalid Sec-WebSocket-Extensions header");return}let N=Object.keys(z);if(N.length!==1||N[0]!==Ie.extensionName){fe(t,T,"Server indicated an extension that was not requested");return}try{c.accept(z[Ie.extensionName])}catch{fe(t,T,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[Ie.extensionName]=c}t.setSocket(T,B,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})}),i.finishRequest?i.finishRequest(m,t):m.end()}o(fs,"initAsClient");function Wt(t,e){t._readyState=V.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}o(Wt,"emitErrorAndClose");function xa(t){return t.path=t.socketPath,ls.connect(t)}o(xa,"netConnect");function wa(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=ls.isIP(t.host)?"":t.host),ia.connect(t)}o(wa,"tlsConnect");function fe(t,e,r){t._readyState=V.CLOSING;let n=new Error(r);Error.captureStackTrace(n,fe),e.setHeader?(e[us]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(Wt,t,n)):(e.destroy(n),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}o(fe,"abortHandshake");function Qr(t,e,r){if(e){let n=ca(e)?e.size:ya(e).length;t._socket?t._sender._bufferedBytes+=n:t._bufferedAmount+=n}if(r){let n=new Error(`WebSocket is not open: readyState ${t.readyState} (${Re[t.readyState]})`);process.nextTick(r,n)}}o(Qr,"sendAfterClose");function va(t,e){let r=this[ee];r._closeFrameReceived=!0,r._closeMessage=e,r._closeCode=t,r._socket[ee]!==void 0&&(r._socket.removeListener("data",Vt),process.nextTick(hs,r._socket),t===1005?r.close():r.close(t,e))}o(va,"receiverOnConclude");function Ea(){let t=this[ee];t.isPaused||t._socket.resume()}o(Ea,"receiverOnDrain");function Sa(t){let e=this[ee];e._socket[ee]!==void 0&&(e._socket.removeListener("data",Vt),process.nextTick(hs,e._socket),e.close(t[ha])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}o(Sa,"receiverOnError");function as(){this[ee].emitClose()}o(as,"receiverOnFinish");function Ta(t,e){this[ee].emit("message",t,e)}o(Ta,"receiverOnMessage");function Oa(t){let e=this[ee];e._autoPong&&e.pong(t,!this._isServer,cs),e.emit("ping",t)}o(Oa,"receiverOnPing");function La(t){this[ee].emit("pong",t)}o(La,"receiverOnPong");function hs(t){t.resume()}o(hs,"resume");function ka(t){let e=this[ee];e.readyState!==V.CLOSED&&(e.readyState===V.OPEN&&(e._readyState=V.CLOSING,ds(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}o(ka,"senderOnError");function ds(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),ba)}o(ds,"setCloseTimer");function ps(){let t=this[ee];this.removeListener("close",ps),this.removeListener("data",Vt),this.removeListener("end",ms),t._readyState=V.CLOSING;let e;!this._readableState.endEmitted&&!t._closeFrameReceived&&!t._receiver._writableState.errorEmitted&&(e=t._socket.read())!==null&&t._receiver.write(e),t._receiver.end(),this[ee]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",as),t._receiver.on("finish",as))}o(ps,"socketOnClose");function Vt(t){this[ee]._receiver.write(t)||this.pause()}o(Vt,"socketOnData");function ms(){let t=this[ee];t._readyState=V.CLOSING,t._receiver.end(),this.end()}o(ms,"socketOnEnd");function gs(){let t=this[ee];this.removeListener("error",gs),this.on("error",cs),t&&(t._readyState=V.CLOSING,this.destroy())}o(gs,"socketOnError")});var _s=F((_h,bs)=>{"use strict";h();var{tokenChars:Ca}=Ze();function Ra(t){let e=new Set,r=-1,n=-1,i=0;for(i;i<t.length;i++){let a=t.charCodeAt(i);if(n===-1&&Ca[a]===1)r===-1&&(r=i);else if(i!==0&&(a===32||a===9))n===-1&&r!==-1&&(n=i);else if(a===44){if(r===-1)throw new SyntaxError(`Unexpected character at index ${i}`);n===-1&&(n=i);let u=t.slice(r,n);if(e.has(u))throw new SyntaxError(`The "${u}" subprotocol is duplicated`);e.add(u),r=n=-1}else throw new SyntaxError(`Unexpected character at index ${i}`)}if(r===-1||n!==-1)throw new SyntaxError("Unexpected end of input");let s=t.slice(r,i);if(e.has(s))throw new SyntaxError(`The "${s}" subprotocol is duplicated`);return e.add(s),e}o(Ra,"parse");bs.exports={parse:Ra}});var Os=F((Eh,Ts)=>{"use strict";h();var Ba=j("events"),zt=j("http"),{Duplex:vh}=j("stream"),{createHash:Da}=j("crypto"),xs=Wr(),Ge=yt(),$a=_s(),Aa=Yr(),{GUID:Na,kWebSocket:Ia}=Le(),Pa=/^[+/0-9A-Za-z]{22}==$/,ws=0,vs=1,Ss=2,Jr=class extends Ba{static{o(this,"WebSocketServer")}constructor(e,r){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:Aa,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=zt.createServer((n,i)=>{let s=zt.STATUS_CODES[426];i.writeHead(426,{"Content-Length":s.length,"Content-Type":"text/plain"}),i.end(s)}),this._server.listen(e.port,e.host,e.backlog,r)):e.server&&(this._server=e.server),this._server){let n=this.emit.bind(this,"connection");this._removeListeners=Ma(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:o((i,s,a)=>{this.handleUpgrade(i,s,a,n)},"upgrade")})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=ws}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===Ss){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(wt,this);return}if(e&&this.once("close",e),this._state!==vs)if(this._state=vs,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(wt,this):process.nextTick(wt,this);else{let r=this._server;this._removeListeners(),this._removeListeners=this._server=null,r.close(()=>{wt(this)})}}shouldHandle(e){if(this.options.path){let r=e.url.indexOf("?");if((r!==-1?e.url.slice(0,r):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,r,n,i){r.on("error",Es);let s=e.headers["sec-websocket-key"],a=e.headers.upgrade,u=+e.headers["sec-websocket-version"];if(e.method!=="GET"){je(this,e,r,405,"Invalid HTTP method");return}if(a===void 0||a.toLowerCase()!=="websocket"){je(this,e,r,400,"Invalid Upgrade header");return}if(s===void 0||!Pa.test(s)){je(this,e,r,400,"Missing or invalid Sec-WebSocket-Key header");return}if(u!==8&&u!==13){je(this,e,r,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(e)){vt(r,400);return}let l=e.headers["sec-websocket-protocol"],f=new Set;if(l!==void 0)try{f=$a.parse(l)}catch{je(this,e,r,400,"Invalid Sec-WebSocket-Protocol header");return}let p=e.headers["sec-websocket-extensions"],d={};if(this.options.perMessageDeflate&&p!==void 0){let b=new Ge(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let c=xs.parse(p);c[Ge.extensionName]&&(b.accept(c[Ge.extensionName]),d[Ge.extensionName]=b)}catch{je(this,e,r,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let b={origin:e.headers[`${u===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(b,(c,m,v,T)=>{if(!c)return vt(r,m||401,v,T);this.completeUpgrade(d,s,f,e,r,n,i)});return}if(!this.options.verifyClient(b))return vt(r,401)}this.completeUpgrade(d,s,f,e,r,n,i)}completeUpgrade(e,r,n,i,s,a,u){if(!s.readable||!s.writable)return s.destroy();if(s[Ia])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>ws)return vt(s,503);let f=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${Da("sha1").update(r+Na).digest("base64")}`],p=new this.options.WebSocket(null,void 0,this.options);if(n.size){let d=this.options.handleProtocols?this.options.handleProtocols(n,i):n.values().next().value;d&&(f.push(`Sec-WebSocket-Protocol: ${d}`),p._protocol=d)}if(e[Ge.extensionName]){let d=e[Ge.extensionName].params,b=xs.format({[Ge.extensionName]:[d]});f.push(`Sec-WebSocket-Extensions: ${b}`),p._extensions=e}this.emit("headers",f,i),s.write(f.concat(`\r
|
|
2
2
|
`).join(`\r
|
|
3
3
|
`)),s.removeListener("error",Es),p.setSocket(s,a,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(p),p.on("close",()=>{this.clients.delete(p),this._shouldEmitClose&&!this.clients.size&&process.nextTick(wt,this)})),u(p,i)}};Ts.exports=Jr;function Ma(t,e){for(let r of Object.keys(e))t.on(r,e[r]);return o(function(){for(let n of Object.keys(e))t.removeListener(n,e[n])},"removeListeners")}o(Ma,"addListeners");function wt(t){t._state=Ss,t.emit("close")}o(wt,"emitClose");function Es(){this.destroy()}o(Es,"socketOnError");function vt(t,e,r,n){r=r||zt.STATUS_CODES[e],n={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(r),...n},t.once("finish",t.destroy),t.end(`HTTP/1.1 ${e} ${zt.STATUS_CODES[e]}\r
|
|
4
4
|
`+Object.keys(n).map(i=>`${i}: ${n[i]}`).join(`\r
|
|
5
5
|
`)+`\r
|
|
6
6
|
\r
|
|
7
|
-
`+r)}o(vt,"abortHandshake");function je(t,e,r,n,i){if(t.listenerCount("wsClientError")){let s=new Error(i);Error.captureStackTrace(s,je),t.emit("wsClientError",s,r,e)}else vt(r,n,i)}o(je,"abortHandshakeOrEmitwsClientError")});h();h();var I="\x1B[",st="\x1B]",ze="\x07",Lt=";",dn=process.env.TERM_PROGRAM==="Apple_Terminal",A={};A.cursorTo=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");return typeof e!="number"?I+(t+1)+"G":I+(e+1)+";"+(t+1)+"H"};A.cursorMove=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");let r="";return t<0?r+=I+-t+"D":t>0&&(r+=I+t+"C"),e<0?r+=I+-e+"A":e>0&&(r+=I+e+"B"),r};A.cursorUp=(t=1)=>I+t+"A";A.cursorDown=(t=1)=>I+t+"B";A.cursorForward=(t=1)=>I+t+"C";A.cursorBackward=(t=1)=>I+t+"D";A.cursorLeft=I+"G";A.cursorSavePosition=dn?"\x1B7":I+"s";A.cursorRestorePosition=dn?"\x1B8":I+"u";A.cursorGetPosition=I+"6n";A.cursorNextLine=I+"E";A.cursorPrevLine=I+"F";A.cursorHide=I+"?25l";A.cursorShow=I+"?25h";A.eraseLines=t=>{let e="";for(let r=0;r<t;r++)e+=A.eraseLine+(r<t-1?A.cursorUp():"");return t&&(e+=A.cursorLeft),e};A.eraseEndLine=I+"K";A.eraseStartLine=I+"1K";A.eraseLine=I+"2K";A.eraseDown=I+"J";A.eraseUp=I+"1J";A.eraseScreen=I+"2J";A.scrollUp=I+"S";A.scrollDown=I+"T";A.clearScreen="\x1Bc";A.clearTerminal=process.platform==="win32"?`${A.eraseScreen}${I}0f`:`${A.eraseScreen}${I}3J${I}H`;A.beep=ze;A.link=(t,e)=>[st,"8",Lt,Lt,e,ze,t,st,"8",Lt,Lt,ze].join("");A.image=(t,e={})=>{let r=`${st}1337;File=inline=1`;return e.width&&(r+=`;width=${e.width}`),e.height&&(r+=`;height=${e.height}`),e.preserveAspectRatio===!1&&(r+=";preserveAspectRatio=0"),r+":"+t.toString("base64")+ze};A.iTerm={setCwd:o((t=process.cwd())=>`${st}50;CurrentDir=${t}${ze}`,"setCwd"),annotation:o((t,e={})=>{let r=`${st}1337;`,n=typeof e.x<"u",i=typeof e.y<"u";if((n||i)&&!(n&&i&&typeof e.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return t=t.replace(/\|/g,""),r+=e.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",e.length>0?r+=(n?[t,e.length,e.x,e.y]:[e.length,t]).join("|"):r+=t,r+ze},"annotation")};var pn=A;var kt=ae(xn(),1);function ye(t,e,{target:r="stdout",...n}={}){return kt.default[r]?pn.link(t,e):n.fallback===!1?t:typeof n.fallback=="function"?n.fallback(t,e):`${t} (\u200B${e}\u200B)`}o(ye,"terminalLink");ye.isSupported=kt.default.stdout;ye.stderr=(t,e,r={})=>ye(t,e,{target:"stderr",...r});ye.stderr.isSupported=kt.default.stderr;h();import{randomUUID as As}from"node:crypto";h();var wn=ae(Qt(),1);import ir from"node:os";var be,vn=o(async(t,e)=>{e["--telemetry"]&&(be=await import("./esm-
|
|
7
|
+
`+r)}o(vt,"abortHandshake");function je(t,e,r,n,i){if(t.listenerCount("wsClientError")){let s=new Error(i);Error.captureStackTrace(s,je),t.emit("wsClientError",s,r,e)}else vt(r,n,i)}o(je,"abortHandshakeOrEmitwsClientError")});h();h();var I="\x1B[",st="\x1B]",ze="\x07",Lt=";",dn=process.env.TERM_PROGRAM==="Apple_Terminal",A={};A.cursorTo=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");return typeof e!="number"?I+(t+1)+"G":I+(e+1)+";"+(t+1)+"H"};A.cursorMove=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");let r="";return t<0?r+=I+-t+"D":t>0&&(r+=I+t+"C"),e<0?r+=I+-e+"A":e>0&&(r+=I+e+"B"),r};A.cursorUp=(t=1)=>I+t+"A";A.cursorDown=(t=1)=>I+t+"B";A.cursorForward=(t=1)=>I+t+"C";A.cursorBackward=(t=1)=>I+t+"D";A.cursorLeft=I+"G";A.cursorSavePosition=dn?"\x1B7":I+"s";A.cursorRestorePosition=dn?"\x1B8":I+"u";A.cursorGetPosition=I+"6n";A.cursorNextLine=I+"E";A.cursorPrevLine=I+"F";A.cursorHide=I+"?25l";A.cursorShow=I+"?25h";A.eraseLines=t=>{let e="";for(let r=0;r<t;r++)e+=A.eraseLine+(r<t-1?A.cursorUp():"");return t&&(e+=A.cursorLeft),e};A.eraseEndLine=I+"K";A.eraseStartLine=I+"1K";A.eraseLine=I+"2K";A.eraseDown=I+"J";A.eraseUp=I+"1J";A.eraseScreen=I+"2J";A.scrollUp=I+"S";A.scrollDown=I+"T";A.clearScreen="\x1Bc";A.clearTerminal=process.platform==="win32"?`${A.eraseScreen}${I}0f`:`${A.eraseScreen}${I}3J${I}H`;A.beep=ze;A.link=(t,e)=>[st,"8",Lt,Lt,e,ze,t,st,"8",Lt,Lt,ze].join("");A.image=(t,e={})=>{let r=`${st}1337;File=inline=1`;return e.width&&(r+=`;width=${e.width}`),e.height&&(r+=`;height=${e.height}`),e.preserveAspectRatio===!1&&(r+=";preserveAspectRatio=0"),r+":"+t.toString("base64")+ze};A.iTerm={setCwd:o((t=process.cwd())=>`${st}50;CurrentDir=${t}${ze}`,"setCwd"),annotation:o((t,e={})=>{let r=`${st}1337;`,n=typeof e.x<"u",i=typeof e.y<"u";if((n||i)&&!(n&&i&&typeof e.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return t=t.replace(/\|/g,""),r+=e.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",e.length>0?r+=(n?[t,e.length,e.x,e.y]:[e.length,t]).join("|"):r+=t,r+ze},"annotation")};var pn=A;var kt=ae(xn(),1);function ye(t,e,{target:r="stdout",...n}={}){return kt.default[r]?pn.link(t,e):n.fallback===!1?t:typeof n.fallback=="function"?n.fallback(t,e):`${t} (\u200B${e}\u200B)`}o(ye,"terminalLink");ye.isSupported=kt.default.stdout;ye.stderr=(t,e,r={})=>ye(t,e,{target:"stderr",...r});ye.stderr.isSupported=kt.default.stderr;h();import{randomUUID as As}from"node:crypto";h();var wn=ae(Qt(),1);import ir from"node:os";var be,vn=o(async(t,e)=>{e["--telemetry"]&&(be=await import("./esm-OUX6XF3H.js"),be.init({dsn:"https://0c26e0d8afd94e77a88ee1c3aa9e7065@o250689.ingest.sentry.io/6703266",enabled:ge.productionLike&&(e["--telemetry"]??!1),release:Ve.version,environment:Ve.version.includes("experimental")?"experimental":"production"}))},"initSentry"),En=o(async t=>{be&&(be.captureException(t,{event_id:t.id,captureContext:{tags:{arch:G.arch,bug:t.isBug,environment:ge.value,platform:G.platform,shell:G.shell,version:Ve.version},contexts:{ctx:{argv:process.argv},cause:t.cause?ue(t.cause):void 0,app:{app_name:Ve.name,app_version:Ve.version},device:{name:ir.hostname(),family:ir.type(),arch:ir.arch()},runtime:{name:process.release.name,version:process.version}}}}),await be.flush((0,wn.default)("2s")))},"sendErrorToSentry"),Sn=o(t=>{be&&be.addBreadcrumb(t)},"addSentryBreadcrumb"),fl=o(t=>{be&&be.setUser(t)},"setSentryUser"),hl=o(t=>{be&&be.setTags(t)},"setSentryTags");var Ns=o(async(t,e)=>{if(rn(e))return t.log.debug("aborting without reporting error",{error:e}),process.exit(1);t.log.error("reporting error and exiting",{error:e});try{let r=Me.from(e);if(r.print(),r.isBug===Pe.NO)return;await En(r)}finally{process.exit(1)}},"reportErrorAndExit"),Ol=o(async(t,e)=>{t.log.debug("installing error handlers"),await vn(t,e);let r=o(n=>void Ns(t,n),"handleError");process.once("uncaughtException",r),process.once("unhandledRejection",r)},"installErrorHandlers"),Pe=Object.freeze({YES:"yes",NO:"no",MAYBE:"maybe"}),Me=class t extends Error{static{o(this,"GGTError")}id=ge.testLike?"00000000-0000-0000-0000-000000000000":As();cause;stack;constructor(e){super(e),Error.captureStackTrace(this,this.constructor),this.stack=Xr(this.stack,{pretty:!0,basePath:on})}static from(e){return e instanceof t?e:new sr(e)}sprint(){let e=this.render();if(this.isBug!==Pe.NO){e=Ot(e);let r=this.isBug===Pe.YES?"This is a bug":"If you think this is a bug",n=`https://github.com/gadget-inc/ggt/issues/new?template=bug_report.yml&error-id=${this.id}`;ye.isSupported?e+=Ot({ensureEmptyLineAbove:!0,content:we`
|
|
8
8
|
${r}, ${ye("click here",n)} to create an issue on GitHub.
|
|
9
9
|
`}):e+=Ot({ensureEmptyLineAbove:!0,content:we`
|
|
10
10
|
${r}, use the link below to create an issue on GitHub.
|
|
@@ -47,4 +47,4 @@ import{d as un,e as fn,f as hn}from"./chunk-SWVUOPJX.js";import{$ as cn,A as Ve,
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
`);var Wa=Object.freeze({Development:"development",Production:"production",Test:"test"}),Va=$.object({id:$.union([$.string(),$.number(),$.bigint()]).transform(t=>BigInt(t)),name:$.string().transform(t=>t.toLowerCase()),type:$.nativeEnum(Wa)}),za=$.object({id:$.union([$.string(),$.number(),$.bigint()]).transform(t=>BigInt(t)),slug:$.string(),primaryDomain:$.string(),hasSplitEnvironments:$.boolean(),multiEnvironmentEnabled:$.boolean(),environments:$.array(Va),team:$.object({id:$.union([$.string(),$.number(),$.bigint()]).transform(t=>BigInt(t)),name:$.string()})}),nd=$.object({apiIdentifier:$.string(),namespace:$.nullable($.array($.string())).optional()}),id=$.object({apiIdentifier:$.string(),namespace:$.nullable($.array($.string())).optional()}),sd=o(async t=>{let e=lt(t);if(!e)return[];let r=await Bt({context:{ctx:t},url:`https://${G.domains.services}/auth/api/apps`,headers:{...e},responseType:"json",resolveBodyOnly:!0});return $.array(za).parse(r)},"getApplications"),od=o(t=>t.reduce((e,r)=>(e.set(r.team.name,[...e.get(r.team.name)??[],r]),e),new Map),"parseAppListToTeamMap"),ad=o(async(t,e)=>{if(!lt(t))return[];let n=new Et(t,e),{gadgetMeta:i}=await n.query({query:Cs});return i.models},"getModels"),ld=o(async(t,e)=>{if(!lt(t))return[];let n=new Et(t,e),{gadgetMeta:i}=await n.query({query:Rs});return i.globalActions},"getGlobalActions");export{ye as a,fl as b,hl as c,Ns as d,Ol as e,Pe as f,Me as g,sr as h,Tn as i,ar as j,Rn as k,Nn as l,Xl as m,An as n,ec as o,De as p,dt as q,lt as r,_c as s,Ht as t,Wa as u,sd as v,od as w,ad as x,ld as y,P as z,Eu as A,Su as B,Au as C,Rt as D,Bt as E};
|
|
50
|
-
//# sourceMappingURL=chunk-
|
|
50
|
+
//# sourceMappingURL=chunk-Q5CNYV3H.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as bt,e as Et,h as xt,j as Ie,k as ne,l as Ct}from"./chunk-LMY5YGE5.js";import{a as ft,b as ht}from"./chunk-DKP76YB2.js";import{b as W}from"./chunk-O3D5GVFK.js";import{c as mt}from"./chunk-YB7NQA2X.js";import{c as Ae}from"./chunk-VF4CDM7R.js";import{B as _t,i as Me,j as B,k as vr,l as gt,q as Mt}from"./chunk-WCP5LTNQ.js";import{b as It,c as At}from"./chunk-SWVUOPJX.js";import{$ as O,E as ct,H as dt,I as G,L as xe,M as te,P as yt,S as St,Z as g,_ as V,b as E,d as ot,g as st,n as it,p as Ee,q as lt,r as ut,s as pt,z as Tr}from"./chunk-KXSKHE3X.js";import{a as Cr}from"./chunk-B2QVXD4S.js";import{a,b as F,d as x,f as w,h as p}from"./chunk-IOJ2LNUK.js";var $t=x((Cs,Ut)=>{p();Ut.exports=Ht;Ht.sync=Nr;var Gt=F("fs");function Br(e,t){var n=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var r=0;r<n.length;r++){var o=n[r].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}a(Br,"checkPathExt");function Vt(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:Br(t,n)}a(Vt,"checkStat");function Ht(e,t,n){Gt.stat(e,function(r,o){n(r,r?!1:Vt(o,e,t))})}a(Ht,"isexe");function Nr(e,t){return Vt(Gt.statSync(e),e,t)}a(Nr,"sync")});var qt=x((Fs,Wt)=>{p();Wt.exports=jt;jt.sync=kr;var Qt=F("fs");function jt(e,t,n){Qt.stat(e,function(r,o){n(r,r?!1:Jt(o,t))})}a(jt,"isexe");function kr(e,t){return Jt(Qt.statSync(e),t)}a(kr,"sync");function Jt(e,t){return e.isFile()&&Lr(e,t)}a(Jt,"checkStat");function Lr(e,t){var n=e.mode,r=e.uid,o=e.gid,s=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),i=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),l=parseInt("100",8),u=parseInt("010",8),c=parseInt("001",8),d=l|u,y=n&c||n&u&&o===i||n&l&&r===s||n&d&&s===0;return y}a(Lr,"checkMode")});var zt=x((Os,Yt)=>{p();var Ps=F("fs"),oe;process.platform==="win32"||global.TESTING_WINDOWS?oe=$t():oe=qt();Yt.exports=Te;Te.sync=Dr;function Te(e,t,n){if(typeof t=="function"&&(n=t,t={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,o){Te(e,t||{},function(s,i){s?o(s):r(i)})})}oe(e,t||{},function(r,o){r&&(r.code==="EACCES"||t&&t.ignoreErrors)&&(r=null,o=!1),n(r,o)})}a(Te,"isexe");function Dr(e,t){try{return oe.sync(e,t||{})}catch(n){if(t&&t.ignoreErrors||n.code==="EACCES")return!1;throw n}}a(Dr,"sync")});var rn=x((ks,nn)=>{p();var $=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Kt=F("path"),Gr=$?";":":",Xt=zt(),Zt=a(e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),"getNotFoundError"),en=a((e,t)=>{let n=t.colon||Gr,r=e.match(/\//)||$&&e.match(/\\/)?[""]:[...$?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],o=$?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=$?o.split(n):[""];return $&&e.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:r,pathExt:s,pathExtExe:o}},"getPathInfo"),tn=a((e,t,n)=>{typeof t=="function"&&(n=t,t={}),t||(t={});let{pathEnv:r,pathExt:o,pathExtExe:s}=en(e,t),i=[],l=a(c=>new Promise((d,y)=>{if(c===r.length)return t.all&&i.length?d(i):y(Zt(e));let S=r[c],m=/^".*"$/.test(S)?S.slice(1,-1):S,f=Kt.join(m,e),h=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+f:f;d(u(h,c,0))}),"step"),u=a((c,d,y)=>new Promise((S,m)=>{if(y===o.length)return S(l(d+1));let f=o[y];Xt(c+f,{pathExt:s},(h,b)=>{if(!h&&b)if(t.all)i.push(c+f);else return S(c+f);return S(u(c,d,y+1))})}),"subStep");return n?l(0).then(c=>n(null,c),n):l(0)},"which"),Vr=a((e,t)=>{t=t||{};let{pathEnv:n,pathExt:r,pathExtExe:o}=en(e,t),s=[];for(let i=0;i<n.length;i++){let l=n[i],u=/^".*"$/.test(l)?l.slice(1,-1):l,c=Kt.join(u,e),d=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+c:c;for(let y=0;y<r.length;y++){let S=d+r[y];try{if(Xt.sync(S,{pathExt:o}))if(t.all)s.push(S);else return S}catch{}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw Zt(e)},"whichSync");nn.exports=tn;tn.sync=Vr});var on=x((Gs,ve)=>{"use strict";p();var an=a((e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"},"pathKey");ve.exports=an;ve.exports.default=an});var pn=x((Us,un)=>{"use strict";p();var sn=F("path"),Hr=rn(),Ur=on();function ln(e,t){let n=e.options.env||process.env,r=process.cwd(),o=e.options.cwd!=null,s=o&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch{}let i;try{i=Hr.sync(e.command,{path:n[Ur({env:n})],pathExt:t?sn.delimiter:void 0})}catch{}finally{s&&process.chdir(r)}return i&&(i=sn.resolve(o?e.options.cwd:"",i)),i}a(ln,"resolveCommandAttempt");function $r(e){return ln(e)||ln(e,!0)}a($r,"resolveCommand");un.exports=$r});var cn=x((js,Re)=>{"use strict";p();var Fe=/([()\][%!^"`<>&|;, *?])/g;function Qr(e){return e=e.replace(Fe,"^$1"),e}a(Qr,"escapeCommand");function jr(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(Fe,"^$1"),t&&(e=e.replace(Fe,"^$1")),e}a(jr,"escapeArgument");Re.exports.command=Qr;Re.exports.argument=jr});var yn=x((qs,dn)=>{"use strict";p();dn.exports=/^#!(.*)/});var mn=x((zs,Sn)=>{"use strict";p();var Jr=yn();Sn.exports=(e="")=>{let t=e.match(Jr);if(!t)return null;let[n,r]=t[0].replace(/#! ?/,"").split(" "),o=n.split("/").pop();return o==="env"?r:r?`${o} ${r}`:o}});var fn=x((Xs,gn)=>{"use strict";p();var we=F("fs"),Wr=mn();function qr(e){let n=Buffer.alloc(150),r;try{r=we.openSync(e,"r"),we.readSync(r,n,0,150,0),we.closeSync(r)}catch{}return Wr(n.toString())}a(qr,"readShebang");gn.exports=qr});var xn=x((ti,En)=>{"use strict";p();var Yr=F("path"),hn=pn(),bn=cn(),zr=fn(),Kr=process.platform==="win32",Xr=/\.(?:com|exe)$/i,Zr=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function ea(e){e.file=hn(e);let t=e.file&&zr(e.file);return t?(e.args.unshift(e.file),e.command=t,hn(e)):e.file}a(ea,"detectShebang");function ta(e){if(!Kr)return e;let t=ea(e),n=!Xr.test(t);if(e.options.forceShell||n){let r=Zr.test(t);e.command=Yr.normalize(e.command),e.command=bn.command(e.command),e.args=e.args.map(s=>bn.argument(s,r));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}a(ta,"parseNonShell");function na(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:ta(r)}a(na,"parse");En.exports=na});var An=x((ai,In)=>{"use strict";p();var Pe=process.platform==="win32";function Oe(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}a(Oe,"notFoundError");function ra(e,t){if(!Pe)return;let n=e.emit;e.emit=function(r,o){if(r==="exit"){let s=Mn(o,t,"spawn");if(s)return n.call(e,"error",s)}return n.apply(e,arguments)}}a(ra,"hookChildProcess");function Mn(e,t){return Pe&&e===1&&!t.file?Oe(t.original,"spawn"):null}a(Mn,"verifyENOENT");function aa(e,t){return Pe&&e===1&&!t.file?Oe(t.original,"spawnSync"):null}a(aa,"verifyENOENTSync");In.exports={hookChildProcess:ra,verifyENOENT:Mn,verifyENOENTSync:aa,notFoundError:Oe}});var Tn=x((ii,Q)=>{"use strict";p();var _n=F("child_process"),Be=xn(),Ne=An();function Cn(e,t,n){let r=Be(e,t,n),o=_n.spawn(r.command,r.args,r.options);return Ne.hookChildProcess(o,r),o}a(Cn,"spawn");function oa(e,t,n){let r=Be(e,t,n),o=_n.spawnSync(r.command,r.args,r.options);return o.error=o.error||Ne.verifyENOENTSync(o.status,r),o}a(oa,"spawnSync");Q.exports=Cn;Q.exports.spawn=Cn;Q.exports.sync=oa;Q.exports._parse=Be;Q.exports._enoent=Ne});var Zn=x((Yl,Xn)=>{"use strict";p();var{PassThrough:to}=F("stream");Xn.exports=function(){var e=[],t=new to({objectMode:!0});return t.setMaxListeners(0),t.add=n,t.isEmpty=r,t.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),t;function n(s){return Array.isArray(s)?(s.forEach(n),this):(e.push(s),s.once("end",o.bind(null,s)),s.once("error",t.emit.bind(t,"error")),s.pipe(t,{end:!1}),this)}a(n,"add");function r(){return e.length==0}a(r,"isEmpty");function o(s){e=e.filter(function(i){return i!==s}),!e.length&&t.readable&&t.end()}a(o,"remove")}});var fr=x((Uu,gr)=>{p();function A(e,t){typeof t=="boolean"&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}a(A,"RetryOperation");gr.exports=A;A.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};A.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};A.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(n===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},n),this._options.unref&&this._timer.unref(),!0};A.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};A.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};A.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};A.prototype.start=A.prototype.try;A.prototype.errors=function(){return this._errors};A.prototype.attempts=function(){return this._attempts};A.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,n=0,r=0;r<this._errors.length;r++){var o=this._errors[r],s=o.message,i=(e[s]||0)+1;e[s]=i,i>=n&&(t=o,n=i)}return t}});var hr=x(L=>{p();var Co=fr();L.operation=function(e){var t=L.timeouts(e);return new Co(t,{forever:e&&(e.forever||e.retries===1/0),unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};L.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],o=0;o<t.retries;o++)r.push(this.createTimeout(o,t));return e&&e.forever&&!r.length&&r.push(this.createTimeout(o,t)),r.sort(function(s,i){return s-i}),r};L.createTimeout=function(e,t){var n=t.randomize?Math.random()+1:1,r=Math.round(n*Math.max(t.minTimeout,1)*Math.pow(t.factor,e));return r=Math.min(r,t.maxTimeout),r};L.wrap=function(e,t,n){if(t instanceof Array&&(n=t,t=null),!n){n=[];for(var r in e)typeof e[r]=="function"&&n.push(r)}for(var o=0;o<n.length;o++){var s=n[o],i=e[s];e[s]=a(function(u){var c=L.operation(t),d=Array.prototype.slice.call(arguments,1),y=d.pop();d.push(function(S){c.retry(S)||(S&&(arguments[0]=c.mainError()),y.apply(this,arguments))}),c.attempt(function(){u.apply(e,d)})},"retryWrapper").bind(e,i),e[s].options=t}}});var Er=x((qu,br)=>{p();br.exports=hr()});p();var q=w(gt(),1);var re=class extends Map{static{a(this,"Changes")}created=G(()=>Array.from(this.entries()).filter(([,t])=>t.type==="create").map(([t])=>t));updated=G(()=>Array.from(this.entries()).filter(([,t])=>t.type==="update").map(([t])=>t));deleted=G(()=>Array.from(this.entries()).filter(([,t])=>t.type==="delete").map(([t])=>t))},Fr=E.greenBright("+"),Rr=E.blueBright("\xB1"),wr=E.redBright("-"),Tt=E.yellowBright("\u2192"),Y=a((e,{changes:t,tense:n,limit:r=1/0,...o})=>{yt.logLevel<=te.TRACE&&(r=1/0);let s=Array.from(t.entries()).filter(([S])=>!S.startsWith(".gadget/"));if(s.length===0)return"";let i=E.yellowBright(n==="past"?"renamed":"rename"),l=E.greenBright(n==="past"?"created":"create"),u=E.blueBright(n==="past"?"updated":"update"),c=E.redBright(n==="past"?"deleted":"delete"),d=s.sort((S,m)=>S[0].localeCompare(m[0])).slice(0,r).map(([S,m])=>{switch(!0){case(m.type==="create"&&st(m.oldPath)):return[Tt,E.yellowBright(m.oldPath),i,Tt,E.yellowBright(S)];case m.type==="create":return[Fr,E.greenBright(S),l];case m.type==="update":return[Rr,E.blueBright(S),u];case m.type==="delete":return[wr,E.redBright(S),c];default:return it(m)}});s.length>r&&d.push([E.gray(B.ellipsis),g`{gray ${s.length-r} more}`,""]);let y;if(s.length>=5){let S=[],m=s.filter(([,b])=>b.type==="create").length;if(m>0){let b=n==="past"?`${m} created`:(0,q.default)("create",m,!0);S.push(g`{greenBright ${b}}`)}let f=s.filter(([,b])=>b.type==="update").length;if(f>0){let b=n==="past"?`${f} updated`:(0,q.default)("update",f,!0);S.push(g`{blueBright ${b}}`)}let h=s.filter(([,b])=>b.type==="delete").length;if(h>0){let b=n==="past"?`${h} deleted`:(0,q.default)("delete",h,!0);S.push(g`{redBright ${b}}`)}y=V`
|
|
1
|
+
import{b as bt,e as Et,h as xt,j as Ie,k as ne,l as Ct}from"./chunk-DNS7DZ7M.js";import{a as ft,b as ht}from"./chunk-WGSJ2P6E.js";import{b as W}from"./chunk-F3F5GSUN.js";import{c as mt}from"./chunk-YLVZEUX7.js";import{c as Ae}from"./chunk-DAFEHCX5.js";import{B as _t,i as Me,j as B,k as vr,l as gt,q as Mt}from"./chunk-Q5CNYV3H.js";import{b as It,c as At}from"./chunk-E3RC22HP.js";import{$ as O,E as ct,H as dt,I as G,L as xe,M as te,P as yt,S as St,Z as g,_ as V,b as E,d as ot,g as st,n as it,p as Ee,q as lt,r as ut,s as pt,z as Tr}from"./chunk-C4CHGCKD.js";import{a as Cr}from"./chunk-GPJRJAHB.js";import{a,b as F,d as x,f as w,h as p}from"./chunk-56W5U2JG.js";var $t=x((Cs,Ut)=>{p();Ut.exports=Ht;Ht.sync=Nr;var Gt=F("fs");function Br(e,t){var n=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var r=0;r<n.length;r++){var o=n[r].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}a(Br,"checkPathExt");function Vt(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:Br(t,n)}a(Vt,"checkStat");function Ht(e,t,n){Gt.stat(e,function(r,o){n(r,r?!1:Vt(o,e,t))})}a(Ht,"isexe");function Nr(e,t){return Vt(Gt.statSync(e),e,t)}a(Nr,"sync")});var qt=x((Fs,Wt)=>{p();Wt.exports=jt;jt.sync=kr;var Qt=F("fs");function jt(e,t,n){Qt.stat(e,function(r,o){n(r,r?!1:Jt(o,t))})}a(jt,"isexe");function kr(e,t){return Jt(Qt.statSync(e),t)}a(kr,"sync");function Jt(e,t){return e.isFile()&&Lr(e,t)}a(Jt,"checkStat");function Lr(e,t){var n=e.mode,r=e.uid,o=e.gid,s=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),i=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),l=parseInt("100",8),u=parseInt("010",8),c=parseInt("001",8),d=l|u,y=n&c||n&u&&o===i||n&l&&r===s||n&d&&s===0;return y}a(Lr,"checkMode")});var zt=x((Os,Yt)=>{p();var Ps=F("fs"),oe;process.platform==="win32"||global.TESTING_WINDOWS?oe=$t():oe=qt();Yt.exports=Te;Te.sync=Dr;function Te(e,t,n){if(typeof t=="function"&&(n=t,t={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,o){Te(e,t||{},function(s,i){s?o(s):r(i)})})}oe(e,t||{},function(r,o){r&&(r.code==="EACCES"||t&&t.ignoreErrors)&&(r=null,o=!1),n(r,o)})}a(Te,"isexe");function Dr(e,t){try{return oe.sync(e,t||{})}catch(n){if(t&&t.ignoreErrors||n.code==="EACCES")return!1;throw n}}a(Dr,"sync")});var rn=x((ks,nn)=>{p();var $=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Kt=F("path"),Gr=$?";":":",Xt=zt(),Zt=a(e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),"getNotFoundError"),en=a((e,t)=>{let n=t.colon||Gr,r=e.match(/\//)||$&&e.match(/\\/)?[""]:[...$?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],o=$?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=$?o.split(n):[""];return $&&e.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:r,pathExt:s,pathExtExe:o}},"getPathInfo"),tn=a((e,t,n)=>{typeof t=="function"&&(n=t,t={}),t||(t={});let{pathEnv:r,pathExt:o,pathExtExe:s}=en(e,t),i=[],l=a(c=>new Promise((d,y)=>{if(c===r.length)return t.all&&i.length?d(i):y(Zt(e));let S=r[c],m=/^".*"$/.test(S)?S.slice(1,-1):S,f=Kt.join(m,e),h=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+f:f;d(u(h,c,0))}),"step"),u=a((c,d,y)=>new Promise((S,m)=>{if(y===o.length)return S(l(d+1));let f=o[y];Xt(c+f,{pathExt:s},(h,b)=>{if(!h&&b)if(t.all)i.push(c+f);else return S(c+f);return S(u(c,d,y+1))})}),"subStep");return n?l(0).then(c=>n(null,c),n):l(0)},"which"),Vr=a((e,t)=>{t=t||{};let{pathEnv:n,pathExt:r,pathExtExe:o}=en(e,t),s=[];for(let i=0;i<n.length;i++){let l=n[i],u=/^".*"$/.test(l)?l.slice(1,-1):l,c=Kt.join(u,e),d=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+c:c;for(let y=0;y<r.length;y++){let S=d+r[y];try{if(Xt.sync(S,{pathExt:o}))if(t.all)s.push(S);else return S}catch{}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw Zt(e)},"whichSync");nn.exports=tn;tn.sync=Vr});var on=x((Gs,ve)=>{"use strict";p();var an=a((e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"},"pathKey");ve.exports=an;ve.exports.default=an});var pn=x((Us,un)=>{"use strict";p();var sn=F("path"),Hr=rn(),Ur=on();function ln(e,t){let n=e.options.env||process.env,r=process.cwd(),o=e.options.cwd!=null,s=o&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch{}let i;try{i=Hr.sync(e.command,{path:n[Ur({env:n})],pathExt:t?sn.delimiter:void 0})}catch{}finally{s&&process.chdir(r)}return i&&(i=sn.resolve(o?e.options.cwd:"",i)),i}a(ln,"resolveCommandAttempt");function $r(e){return ln(e)||ln(e,!0)}a($r,"resolveCommand");un.exports=$r});var cn=x((js,Re)=>{"use strict";p();var Fe=/([()\][%!^"`<>&|;, *?])/g;function Qr(e){return e=e.replace(Fe,"^$1"),e}a(Qr,"escapeCommand");function jr(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(Fe,"^$1"),t&&(e=e.replace(Fe,"^$1")),e}a(jr,"escapeArgument");Re.exports.command=Qr;Re.exports.argument=jr});var yn=x((qs,dn)=>{"use strict";p();dn.exports=/^#!(.*)/});var mn=x((zs,Sn)=>{"use strict";p();var Jr=yn();Sn.exports=(e="")=>{let t=e.match(Jr);if(!t)return null;let[n,r]=t[0].replace(/#! ?/,"").split(" "),o=n.split("/").pop();return o==="env"?r:r?`${o} ${r}`:o}});var fn=x((Xs,gn)=>{"use strict";p();var we=F("fs"),Wr=mn();function qr(e){let n=Buffer.alloc(150),r;try{r=we.openSync(e,"r"),we.readSync(r,n,0,150,0),we.closeSync(r)}catch{}return Wr(n.toString())}a(qr,"readShebang");gn.exports=qr});var xn=x((ti,En)=>{"use strict";p();var Yr=F("path"),hn=pn(),bn=cn(),zr=fn(),Kr=process.platform==="win32",Xr=/\.(?:com|exe)$/i,Zr=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function ea(e){e.file=hn(e);let t=e.file&&zr(e.file);return t?(e.args.unshift(e.file),e.command=t,hn(e)):e.file}a(ea,"detectShebang");function ta(e){if(!Kr)return e;let t=ea(e),n=!Xr.test(t);if(e.options.forceShell||n){let r=Zr.test(t);e.command=Yr.normalize(e.command),e.command=bn.command(e.command),e.args=e.args.map(s=>bn.argument(s,r));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}a(ta,"parseNonShell");function na(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:ta(r)}a(na,"parse");En.exports=na});var An=x((ai,In)=>{"use strict";p();var Pe=process.platform==="win32";function Oe(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}a(Oe,"notFoundError");function ra(e,t){if(!Pe)return;let n=e.emit;e.emit=function(r,o){if(r==="exit"){let s=Mn(o,t,"spawn");if(s)return n.call(e,"error",s)}return n.apply(e,arguments)}}a(ra,"hookChildProcess");function Mn(e,t){return Pe&&e===1&&!t.file?Oe(t.original,"spawn"):null}a(Mn,"verifyENOENT");function aa(e,t){return Pe&&e===1&&!t.file?Oe(t.original,"spawnSync"):null}a(aa,"verifyENOENTSync");In.exports={hookChildProcess:ra,verifyENOENT:Mn,verifyENOENTSync:aa,notFoundError:Oe}});var Tn=x((ii,Q)=>{"use strict";p();var _n=F("child_process"),Be=xn(),Ne=An();function Cn(e,t,n){let r=Be(e,t,n),o=_n.spawn(r.command,r.args,r.options);return Ne.hookChildProcess(o,r),o}a(Cn,"spawn");function oa(e,t,n){let r=Be(e,t,n),o=_n.spawnSync(r.command,r.args,r.options);return o.error=o.error||Ne.verifyENOENTSync(o.status,r),o}a(oa,"spawnSync");Q.exports=Cn;Q.exports.spawn=Cn;Q.exports.sync=oa;Q.exports._parse=Be;Q.exports._enoent=Ne});var Zn=x((Yl,Xn)=>{"use strict";p();var{PassThrough:to}=F("stream");Xn.exports=function(){var e=[],t=new to({objectMode:!0});return t.setMaxListeners(0),t.add=n,t.isEmpty=r,t.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),t;function n(s){return Array.isArray(s)?(s.forEach(n),this):(e.push(s),s.once("end",o.bind(null,s)),s.once("error",t.emit.bind(t,"error")),s.pipe(t,{end:!1}),this)}a(n,"add");function r(){return e.length==0}a(r,"isEmpty");function o(s){e=e.filter(function(i){return i!==s}),!e.length&&t.readable&&t.end()}a(o,"remove")}});var fr=x((Uu,gr)=>{p();function A(e,t){typeof t=="boolean"&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}a(A,"RetryOperation");gr.exports=A;A.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};A.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};A.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(n===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},n),this._options.unref&&this._timer.unref(),!0};A.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};A.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};A.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};A.prototype.start=A.prototype.try;A.prototype.errors=function(){return this._errors};A.prototype.attempts=function(){return this._attempts};A.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,n=0,r=0;r<this._errors.length;r++){var o=this._errors[r],s=o.message,i=(e[s]||0)+1;e[s]=i,i>=n&&(t=o,n=i)}return t}});var hr=x(L=>{p();var Co=fr();L.operation=function(e){var t=L.timeouts(e);return new Co(t,{forever:e&&(e.forever||e.retries===1/0),unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};L.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],o=0;o<t.retries;o++)r.push(this.createTimeout(o,t));return e&&e.forever&&!r.length&&r.push(this.createTimeout(o,t)),r.sort(function(s,i){return s-i}),r};L.createTimeout=function(e,t){var n=t.randomize?Math.random()+1:1,r=Math.round(n*Math.max(t.minTimeout,1)*Math.pow(t.factor,e));return r=Math.min(r,t.maxTimeout),r};L.wrap=function(e,t,n){if(t instanceof Array&&(n=t,t=null),!n){n=[];for(var r in e)typeof e[r]=="function"&&n.push(r)}for(var o=0;o<n.length;o++){var s=n[o],i=e[s];e[s]=a(function(u){var c=L.operation(t),d=Array.prototype.slice.call(arguments,1),y=d.pop();d.push(function(S){c.retry(S)||(S&&(arguments[0]=c.mainError()),y.apply(this,arguments))}),c.attempt(function(){u.apply(e,d)})},"retryWrapper").bind(e,i),e[s].options=t}}});var Er=x((qu,br)=>{p();br.exports=hr()});p();var q=w(gt(),1);var re=class extends Map{static{a(this,"Changes")}created=G(()=>Array.from(this.entries()).filter(([,t])=>t.type==="create").map(([t])=>t));updated=G(()=>Array.from(this.entries()).filter(([,t])=>t.type==="update").map(([t])=>t));deleted=G(()=>Array.from(this.entries()).filter(([,t])=>t.type==="delete").map(([t])=>t))},Fr=E.greenBright("+"),Rr=E.blueBright("\xB1"),wr=E.redBright("-"),Tt=E.yellowBright("\u2192"),Y=a((e,{changes:t,tense:n,limit:r=1/0,...o})=>{yt.logLevel<=te.TRACE&&(r=1/0);let s=Array.from(t.entries()).filter(([S])=>!S.startsWith(".gadget/"));if(s.length===0)return"";let i=E.yellowBright(n==="past"?"renamed":"rename"),l=E.greenBright(n==="past"?"created":"create"),u=E.blueBright(n==="past"?"updated":"update"),c=E.redBright(n==="past"?"deleted":"delete"),d=s.sort((S,m)=>S[0].localeCompare(m[0])).slice(0,r).map(([S,m])=>{switch(!0){case(m.type==="create"&&st(m.oldPath)):return[Tt,E.yellowBright(m.oldPath),i,Tt,E.yellowBright(S)];case m.type==="create":return[Fr,E.greenBright(S),l];case m.type==="update":return[Rr,E.blueBright(S),u];case m.type==="delete":return[wr,E.redBright(S),c];default:return it(m)}});s.length>r&&d.push([E.gray(B.ellipsis),g`{gray ${s.length-r} more}`,""]);let y;if(s.length>=5){let S=[],m=s.filter(([,b])=>b.type==="create").length;if(m>0){let b=n==="past"?`${m} created`:(0,q.default)("create",m,!0);S.push(g`{greenBright ${b}}`)}let f=s.filter(([,b])=>b.type==="update").length;if(f>0){let b=n==="past"?`${f} updated`:(0,q.default)("update",f,!0);S.push(g`{blueBright ${b}}`)}let h=s.filter(([,b])=>b.type==="delete").length;if(h>0){let b=n==="past"?`${h} deleted`:(0,q.default)("delete",h,!0);S.push(g`{redBright ${b}}`)}y=V`
|
|
2
2
|
${(0,q.default)("change",s.length,!0)} in total. ${S.join(", ")}.
|
|
3
3
|
`}return ft({rows:d,footer:y,ensureEmptyLineAbove:!0,ensureEmptyLineAboveBody:!1,ensureEmptyLineAboveFooter:!0,indent:0,...o})},"sprintChanges"),ae=a((e,t)=>{let n=Y(e,t);n&&O(n)},"printChanges");p();var vt=g(`
|
|
4
4
|
subscription EnvironmentLogs($query: String!, $start: DateTime, $limit: Int) {
|
|
@@ -184,4 +184,4 @@ ${r.message}`:b,T=[M,t,e].filter(Boolean).join(`
|
|
|
184
184
|
|
|
185
185
|
{red Your app will not be operational until all fatal errors are fixed.}
|
|
186
186
|
`})}catch(c){throw Ie(c)?u.clear():u.fail(),c}}};export{re as a,Rr as b,wr as c,rn as d,Jo as e,Wo as f,qo as g,Yo as h,zo as i,N as j,Lt as k,Dt as l,xs as m,Ms as n,Ir as o};
|
|
187
|
-
//# sourceMappingURL=chunk-
|
|
187
|
+
//# sourceMappingURL=chunk-U43YGCFP.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as et,V as Xt,X as tt,Y as Zt,_ as k}from"./chunk-
|
|
1
|
+
import{$ as et,V as Xt,X as tt,Y as Zt,_ as k}from"./chunk-C4CHGCKD.js";import{a as s,b as X,d as S,f as Z,h as g}from"./chunk-56W5U2JG.js";var $=S((qe,rt)=>{g();var D=[],it=0,C=s((i,t)=>{it>=t&&D.push(i)},"debug");C.WARN=1;C.INFO=2;C.DEBUG=3;C.reset=()=>{D=[]};C.setDebugLevel=i=>{it=i};C.warn=i=>C(i,C.WARN);C.info=i=>C(i,C.INFO);C.debug=i=>C(i,C.DEBUG);C.debugMessages=()=>D;rt.exports=C});var Y=S((Ge,lt)=>{g();var nt=Xt();function z(i){return i?/\u001b\[((?:\d*;){0,5}\d*)m/g:/\u001b\[(?:\d*;){0,5}\d*m/g}s(z,"codeRegex");function W(i){let t=z();return(""+i).replace(t,"").split(`
|
|
2
2
|
`).reduce(function(n,o){return nt(o)>n?nt(o):n},0)}s(W,"strlen");function _(i,t){return Array(t+1).join(i)}s(_,"repeat");function te(i,t,e,r){let n=W(i);if(t+1>=n){let o=t-n;switch(r){case"right":{i=_(e,o)+i;break}case"center":{let l=Math.ceil(o/2),d=o-l;i=_(e,d)+i+_(e,l);break}default:{i=i+_(e,o);break}}}return i}s(te,"pad");var B={};function I(i,t,e){t="\x1B["+t+"m",e="\x1B["+e+"m",B[t]={set:i,to:!0},B[e]={set:i,to:!1},B[i]={on:t,off:e}}s(I,"addToCodeCache");I("bold",1,22);I("italics",3,23);I("underline",4,24);I("inverse",7,27);I("strikethrough",9,29);function ot(i,t){let e=t[1]?parseInt(t[1].split(";")[0]):0;if(e>=30&&e<=39||e>=90&&e<=97){i.lastForegroundAdded=t[0];return}if(e>=40&&e<=49||e>=100&&e<=107){i.lastBackgroundAdded=t[0];return}if(e===0){for(let n in i)Object.prototype.hasOwnProperty.call(i,n)&&delete i[n];return}let r=B[t[0]];r&&(i[r.set]=r.to)}s(ot,"updateState");function ee(i){let t=z(!0),e=t.exec(i),r={};for(;e!==null;)ot(r,e),e=t.exec(i);return r}s(ee,"readState");function st(i,t){let e=i.lastBackgroundAdded,r=i.lastForegroundAdded;return delete i.lastBackgroundAdded,delete i.lastForegroundAdded,Object.keys(i).forEach(function(n){i[n]&&(t+=B[n].off)}),e&&e!="\x1B[49m"&&(t+="\x1B[49m"),r&&r!="\x1B[39m"&&(t+="\x1B[39m"),t}s(st,"unwindState");function ie(i,t){let e=i.lastBackgroundAdded,r=i.lastForegroundAdded;return delete i.lastBackgroundAdded,delete i.lastForegroundAdded,Object.keys(i).forEach(function(n){i[n]&&(t=B[n].on+t)}),e&&e!="\x1B[49m"&&(t=e+t),r&&r!="\x1B[39m"&&(t=r+t),t}s(ie,"rewindState");function re(i,t){if(i.length===W(i))return i.substr(0,t);for(;W(i)>t;)i=i.slice(0,-1);return i}s(re,"truncateWidth");function ne(i,t){let e=z(!0),r=i.split(z()),n=0,o=0,l="",d,m={};for(;o<t;){d=e.exec(i);let h=r[n];if(n++,o+W(h)>t&&(h=re(h,t-o)),l+=h,o+=W(h),o<t){if(!d)break;l+=d[0],ot(m,d)}}return st(m,l)}s(ne,"truncateWidthWithAnsi");function oe(i,t,e){if(e=e||"\u2026",W(i)<=t)return i;t-=W(e);let n=ne(i,t);n+=e;let o="\x1B]8;;\x07";return i.includes(o)&&!n.includes(o)&&(n+=o),n}s(oe,"truncate");function se(){return{chars:{top:"\u2500","top-mid":"\u252C","top-left":"\u250C","top-right":"\u2510",bottom:"\u2500","bottom-mid":"\u2534","bottom-left":"\u2514","bottom-right":"\u2518",left:"\u2502","left-mid":"\u251C",mid:"\u2500","mid-mid":"\u253C",right:"\u2502","right-mid":"\u2524",middle:"\u2502"},truncate:"\u2026",colWidths:[],rowHeights:[],colAligns:[],rowAligns:[],style:{"padding-left":1,"padding-right":1,head:["red"],border:["grey"],compact:!1},head:[]}}s(se,"defaultOptions");function le(i,t){i=i||{},t=t||se();let e=Object.assign({},t,i);return e.chars=Object.assign({},t.chars,i.chars),e.style=Object.assign({},t.style,i.style),e}s(le,"mergeOptions");function ue(i,t){let e=[],r=t.split(/(\s+)/g),n=[],o=0,l;for(let d=0;d<r.length;d+=2){let m=r[d],h=o+W(m);o>0&&l&&(h+=l.length),h>i?(o!==0&&e.push(n.join("")),n=[m],o=W(m)):(n.push(l||"",m),o=h),l=r[d+1]}return o&&e.push(n.join("")),e}s(ue,"wordWrap");function ae(i,t){let e=[],r="";function n(l,d){for(r.length&&d&&(r+=d),r+=l;r.length>i;)e.push(r.slice(0,i)),r=r.slice(i)}s(n,"pushLine");let o=t.split(/(\s+)/g);for(let l=0;l<o.length;l+=2)n(o[l],l&&o[l-1]);return r.length&&e.push(r),e}s(ae,"textWrap");function he(i,t,e=!0){let r=[];t=t.split(`
|
|
3
3
|
`);let n=e?ue:ae;for(let o=0;o<t.length;o++)r.push.apply(r,n(i,t[o]));return r}s(he,"multiLineWordWrap");function ce(i){let t={},e=[];for(let r=0;r<i.length;r++){let n=ie(t,i[r]);t=ee(n);let o=Object.assign({},t);e.push(st(o,n))}return e}s(ce,"colorizeLines");function fe(i,t){let e="\x1B]",r="\x07",n=";";return[e,"8",n,n,i||t,r,t,e,"8",n,n,r].join("")}s(fe,"hyperlink");lt.exports={strlen:W,repeat:_,pad:te,truncate:oe,mergeOptions:le,wordWrap:he,colorizeLines:ce,hyperlink:fe}});var ct=S((ze,ht)=>{g();var at={};ht.exports=at;var ut={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(ut).forEach(function(i){var t=ut[i],e=at[i]=[];e.open="\x1B["+t[0]+"m",e.close="\x1B["+t[1]+"m"})});var dt=S((He,ft)=>{"use strict";g();ft.exports=function(i,t){t=t||process.argv;var e=t.indexOf("--"),r=/^-{1,2}/.test(i)?"":"--",n=t.indexOf(r+i);return n!==-1&&(e===-1?!0:n<e)}});var gt=S((Ye,pt)=>{"use strict";g();var de=X("os"),M=dt(),R=process.env,j=void 0;M("no-color")||M("no-colors")||M("color=false")?j=!1:(M("color")||M("colors")||M("color=true")||M("color=always"))&&(j=!0);"FORCE_COLOR"in R&&(j=R.FORCE_COLOR.length===0||parseInt(R.FORCE_COLOR,10)!==0);function pe(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}s(pe,"translateLevel");function ge(i){if(j===!1)return 0;if(M("color=16m")||M("color=full")||M("color=truecolor"))return 3;if(M("color=256"))return 2;if(i&&!i.isTTY&&j!==!0)return 0;var t=j?1:0;if(process.platform==="win32"){var e=de.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in R)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(n){return n in R})||R.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in R)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(R.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in R){var r=parseInt((R.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(R.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(R.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(R.TERM)||"COLORTERM"in R?1:(R.TERM==="dumb",t)}s(ge,"supportsColor");function N(i){var t=ge(i);return pe(t)}s(N,"getSupportLevel");pt.exports={supportsColor:N,stdout:N(process.stdout),stderr:N(process.stderr)}});var mt=S((Ue,bt)=>{g();bt.exports=s(function(t,e){var r="";t=t||"Run the trap, drop the bass",t=t.split("");var n={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return t.forEach(function(o){o=o.toLowerCase();var l=n[o]||[" "],d=Math.floor(Math.random()*l.length);typeof n[o]<"u"?r+=n[o][d]:r+=o}),r},"runTheTrap")});var wt=S((Qe,yt)=>{g();yt.exports=s(function(t,e){t=t||" he is here ";var r={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},n=[].concat(r.up,r.down,r.mid);function o(m){var h=Math.floor(Math.random()*m);return h}s(o,"randomNumber");function l(m){var h=!1;return n.filter(function(w){h=w===m}),h}s(l,"isChar");function d(m,h){var w="",v,y;h=h||{},h.up=typeof h.up<"u"?h.up:!0,h.mid=typeof h.mid<"u"?h.mid:!0,h.down=typeof h.down<"u"?h.down:!0,h.size=typeof h.size<"u"?h.size:"maxi",m=m.split("");for(y in m)if(!l(y)){switch(w=w+m[y],v={up:0,down:0,mid:0},h.size){case"mini":v.up=o(8),v.mid=o(2),v.down=o(8);break;case"maxi":v.up=o(16)+3,v.mid=o(4)+1,v.down=o(64)+3;break;default:v.up=o(8)+1,v.mid=o(6)/2,v.down=o(8)+1;break}var a=["up","mid","down"];for(var u in a)for(var c=a[u],p=0;p<=v[c];p++)h[c]&&(w=w+r[c][o(r[c].length)])}return w}return s(d,"heComes"),d(t,e)},"zalgo")});var vt=S((ti,xt)=>{g();xt.exports=function(i){return function(t,e,r){if(t===" ")return t;switch(e%3){case 0:return i.red(t);case 1:return i.white(t);case 2:return i.blue(t)}}}});var Ct=S((ii,St)=>{g();St.exports=function(i){return function(t,e,r){return e%2===0?t:i.inverse(t)}}});var Rt=S((ni,Ot)=>{g();Ot.exports=function(i){var t=["red","yellow","green","blue","magenta"];return function(e,r,n){return e===" "?e:i[t[r++%t.length]](e)}}});var At=S((si,Et)=>{g();Et.exports=function(i){var t=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(e,r,n){return e===" "?e:i[t[Math.round(Math.random()*(t.length-2))]](e)}}});var Bt=S((ai,kt)=>{g();var f={};kt.exports=f;f.themes={};var be=X("util"),L=f.styles=ct(),Wt=Object.defineProperties,me=new RegExp(/[\r\n]+/g);f.supportsColor=gt().supportsColor;typeof f.enabled>"u"&&(f.enabled=f.supportsColor()!==!1);f.enable=function(){f.enabled=!0};f.disable=function(){f.enabled=!1};f.stripColors=f.strip=function(i){return(""+i).replace(/\x1B\[\d+m/g,"")};var ui=f.stylize=s(function(t,e){if(!f.enabled)return t+"";var r=L[e];return!r&&e in f?f[e](t):r.open+t+r.close},"stylize"),ye=/[|\\{}()[\]^$+*?.]/g,we=s(function(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(ye,"\\$&")},"escapeStringRegexp");function Tt(i){var t=s(function e(){return ve.apply(e,arguments)},"builder");return t._styles=i,t.__proto__=xe,t}s(Tt,"build");var Lt=function(){var i={};return L.grey=L.gray,Object.keys(L).forEach(function(t){L[t].closeRe=new RegExp(we(L[t].close),"g"),i[t]={get:s(function(){return Tt(this._styles.concat(t))},"get")}}),i}(),xe=Wt(s(function(){},"colors"),Lt);function ve(){var i=Array.prototype.slice.call(arguments),t=i.map(function(l){return l!=null&&l.constructor===String?l:be.inspect(l)}).join(" ");if(!f.enabled||!t)return t;for(var e=t.indexOf(`
|
|
4
4
|
`)!=-1,r=this._styles,n=r.length;n--;){var o=L[r[n]];t=o.open+t.replace(o.closeRe,o.open)+o.close,e&&(t=t.replace(me,function(l){return o.close+l+o.open}))}return t}s(ve,"applyStyle");f.setTheme=function(i){if(typeof i=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var t in i)(function(e){f[e]=function(r){if(typeof i[e]=="object"){var n=r;for(var o in i[e])n=f[i[e][o]](n);return n}return f[i[e]](r)}})(t)};function Se(){var i={};return Object.keys(Lt).forEach(function(t){i[t]={get:s(function(){return Tt([t])},"get")}}),i}s(Se,"init");var Ce=s(function(t,e){var r=e.split("");return r=r.map(t),r.join("")},"sequencer");f.trap=mt();f.zalgo=wt();f.maps={};f.maps.america=vt()(f);f.maps.zebra=Ct()(f);f.maps.rainbow=Rt()(f);f.maps.random=At()(f);for(Mt in f.maps)(function(i){f[i]=function(t){return Ce(f.maps[i],t)}})(Mt);var Mt;Wt(f,Se())});var qt=S((fi,jt)=>{g();var Oe=Bt();jt.exports=Oe});var Pt=S((pi,F)=>{g();var{info:Re,debug:Gt}=$(),A=Y(),U=class i{static{s(this,"Cell")}constructor(t){this.setOptions(t),this.x=null,this.y=null}setOptions(t){["boolean","number","bigint","string"].indexOf(typeof t)!==-1&&(t={content:""+t}),t=t||{},this.options=t;let e=t.content;if(["boolean","number","bigint","string"].indexOf(typeof e)!==-1)this.content=String(e);else if(!e)this.content=this.options.href||"";else throw new Error("Content needs to be a primitive, got: "+typeof e);this.colSpan=t.colSpan||1,this.rowSpan=t.rowSpan||1,this.options.href&&Object.defineProperty(this,"href",{get(){return this.options.href}})}mergeTableOptions(t,e){this.cells=e;let r=this.options.chars||{},n=t.chars,o=this.chars={};Ae.forEach(function(m){V(r,n,m,o)}),this.truncate=this.options.truncate||t.truncate;let l=this.options.style=this.options.style||{},d=t.style;V(l,d,"padding-left",this),V(l,d,"padding-right",this),this.head=l.head||d.head,this.border=l.border||d.border,this.fixedWidth=t.colWidths[this.x],this.lines=this.computeLines(t),this.desiredWidth=A.strlen(this.content)+this.paddingLeft+this.paddingRight,this.desiredHeight=this.lines.length}computeLines(t){let e=t.wordWrap||t.textWrap,{wordWrap:r=e}=this.options;if(this.fixedWidth&&r){if(this.fixedWidth-=this.paddingLeft+this.paddingRight,this.colSpan){let l=1;for(;l<this.colSpan;)this.fixedWidth+=t.colWidths[this.x+l],l++}let{wrapOnWordBoundary:n=!0}=t,{wrapOnWordBoundary:o=n}=this.options;return this.wrapLines(A.wordWrap(this.fixedWidth,this.content,o))}return this.wrapLines(this.content.split(`
|
|
@@ -8,4 +8,4 @@ import{$ as et,V as Xt,X as tt,Y as Zt,_ as k}from"./chunk-KXSKHE3X.js";import{a
|
|
|
8
8
|
`;return l==="none"&&(y=(0,Ut.dedent)(y).slice(1)),y=y.split(`
|
|
9
9
|
`).map(a=>a.trimEnd()).join(`
|
|
10
10
|
`),h&&(y=tt(y,h)),i&&(y=k(i)+k({content:y,ensureEmptyLineAbove:n})),r&&(y=k(y)+k({content:r,ensureEmptyLineAbove:o})),k({content:y,...w})},"sprintTable"),Mi=s(i=>{et(Be(i))},"printTable"),je={none:{"top-left":"",top:"","top-mid":"","top-right":"","left-mid":"",mid:"","mid-mid":"","right-mid":"",left:"",middle:"",right:"","bottom-left":"",bottom:"","bottom-mid":"","bottom-right":""},thin:{"top-left":"\u250C",top:"\u2500","top-mid":"\u252C","top-right":"\u2510","left-mid":"\u251C",mid:"\u2500","mid-mid":"\u253C","right-mid":"\u2524",left:"\u2502",middle:"\u2502",right:"\u2502","bottom-left":"\u2514",bottom:"\u2500","bottom-mid":"\u2534","bottom-right":"\u2518"},thick:{"top-left":"\u2554",top:"\u2550","top-mid":"\u2564","top-right":"\u2557",left:"\u2551",middle:"\u2502",right:"\u2551","left-mid":"\u255F",mid:"\u2500","mid-mid":"\u253C","right-mid":"\u2562","bottom-left":"\u255A",bottom:"\u2550","bottom-mid":"\u2567","bottom-right":"\u255D"}};export{Be as a,Mi as b};
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-WGSJ2P6E.js.map
|