UNPKG

mqtt

Version:

A library for the MQTT protocol

2 lines 312 kB
var hs=Object.defineProperty;var $g=Object.getOwnPropertyDescriptor;var Hg=Object.getOwnPropertyNames;var Vg=Object.prototype.hasOwnProperty;var Ae=(t,e)=>()=>(t&&(e=t(t=0)),e);var O=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ir=(t,e)=>{for(var r in e)hs(t,r,{get:e[r],enumerable:!0})},zg=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Hg(e))!Vg.call(t,n)&&n!==r&&hs(t,n,{get:()=>e[n],enumerable:!(i=$g(e,n))||i.enumerable});return t};var Q=t=>zg(hs({},"__esModule",{value:!0}),t);var _=Ae(()=>{});var R={};Ir(R,{_debugEnd:()=>fu,_debugProcess:()=>cu,_events:()=>Ru,_eventsCount:()=>Cu,_exiting:()=>Vl,_fatalExceptions:()=>ou,_getActiveHandles:()=>Ql,_getActiveRequests:()=>Gl,_kill:()=>Jl,_linkedBinding:()=>$l,_maxListeners:()=>Tu,_preload_modules:()=>Su,_rawDebug:()=>Fl,_startProfilerIdleNotifier:()=>hu,_stopProfilerIdleNotifier:()=>du,_tickCallback:()=>uu,abort:()=>yu,addListener:()=>Pu,allowedNodeEnvironmentFlags:()=>iu,arch:()=>Cl,argv:()=>Bl,argv0:()=>Eu,assert:()=>nu,binding:()=>ql,chdir:()=>Dl,config:()=>zl,cpuUsage:()=>ji,cwd:()=>Nl,debugPort:()=>vu,default:()=>Nu,dlopen:()=>Kl,domain:()=>Hl,emit:()=>Mu,emitWarning:()=>Ll,env:()=>kl,execArgv:()=>xl,execPath:()=>mu,exit:()=>tu,features:()=>su,hasUncaughtExceptionCaptureCallback:()=>lu,hrtime:()=>Di,kill:()=>eu,listeners:()=>Uu,memoryUsage:()=>Zl,moduleLoadList:()=>Wl,nextTick:()=>Il,off:()=>Bu,on:()=>bt,once:()=>ku,openStdin:()=>ru,pid:()=>wu,platform:()=>Pl,ppid:()=>_u,prependListener:()=>Lu,prependOnceListener:()=>qu,reallyExit:()=>Yl,release:()=>jl,removeAllListeners:()=>Ou,removeListener:()=>xu,resourceUsage:()=>Xl,setSourceMapsEnabled:()=>Au,setUncaughtExceptionCaptureCallback:()=>au,stderr:()=>gu,stdin:()=>bu,stdout:()=>pu,title:()=>Rl,umask:()=>Ul,uptime:()=>Iu,version:()=>Ol,versions:()=>Ml});function gs(t){throw new Error("Node.js process "+t+" is not supported by JSPM core outside of Node.js")}function Kg(){!Tr||!Gt||(Tr=!1,Gt.length?gt=Gt.concat(gt):Ni=-1,gt.length&&Al())}function Al(){if(!Tr){var t=setTimeout(Kg,0);Tr=!0;for(var e=gt.length;e;){for(Gt=gt,gt=[];++Ni<e;)Gt&&Gt[Ni].run();Ni=-1,e=gt.length}Gt=null,Tr=!1,clearTimeout(t)}}function Il(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];gt.push(new Tl(t,e)),gt.length===1&&!Tr&&setTimeout(Al,0)}function Tl(t,e){this.fun=t,this.array=e}function _e(){}function $l(t){gs("_linkedBinding")}function Kl(t){gs("dlopen")}function Gl(){return[]}function Ql(){return[]}function nu(t,e){if(!t)throw new Error(e||"assertion error")}function lu(){return!1}function Iu(){return kt.now()/1e3}function Di(t){var e=Math.floor((Date.now()-kt.now())*.001),r=kt.now()*.001,i=Math.floor(r)+e,n=Math.floor(r%1*1e9);return t&&(i=i-t[0],n=n-t[1],n<0&&(i--,n+=ps)),[i,n]}function bt(){return Nu}function Uu(t){return[]}var gt,Tr,Gt,Ni,Rl,Cl,Pl,kl,Bl,xl,Ol,Ml,Ll,ql,Ul,Nl,Dl,jl,Fl,Wl,Hl,Vl,zl,Yl,Jl,ji,Xl,Zl,eu,tu,ru,iu,su,ou,au,uu,cu,fu,hu,du,pu,gu,bu,yu,wu,_u,mu,vu,Eu,Su,Au,kt,ds,ps,Tu,Ru,Cu,Pu,ku,Bu,xu,Ou,Mu,Lu,qu,Nu,Du=Ae(()=>{_();v();m();gt=[],Tr=!1,Ni=-1;Tl.prototype.run=function(){this.fun.apply(null,this.array)};Rl="browser",Cl="x64",Pl="browser",kl={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},Bl=["/usr/bin/node"],xl=[],Ol="v16.8.0",Ml={},Ll=function(t,e){console.warn((e?e+": ":"")+t)},ql=function(t){gs("binding")},Ul=function(t){return 0},Nl=function(){return"/"},Dl=function(t){},jl={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};Fl=_e,Wl=[];Hl={},Vl=!1,zl={};Yl=_e,Jl=_e,ji=function(){return{}},Xl=ji,Zl=ji,eu=_e,tu=_e,ru=_e,iu={};su={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},ou=_e,au=_e;uu=_e,cu=_e,fu=_e,hu=_e,du=_e,pu=void 0,gu=void 0,bu=void 0,yu=_e,wu=2,_u=1,mu="/bin/usr/node",vu=9229,Eu="node",Su=[],Au=_e,kt={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};kt.now===void 0&&(ds=Date.now(),kt.timing&&kt.timing.navigationStart&&(ds=kt.timing.navigationStart),kt.now=()=>Date.now()-ds);ps=1e9;Di.bigint=function(t){var e=Di(t);return typeof BigInt>"u"?e[0]*ps+e[1]:BigInt(e[0]*ps)+BigInt(e[1])};Tu=10,Ru={},Cu=0;Pu=bt,ku=bt,Bu=bt,xu=bt,Ou=bt,Mu=_e,Lu=bt,qu=bt;Nu={version:Ol,versions:Ml,arch:Cl,platform:Pl,release:jl,_rawDebug:Fl,moduleLoadList:Wl,binding:ql,_linkedBinding:$l,_events:Ru,_eventsCount:Cu,_maxListeners:Tu,on:bt,addListener:Pu,once:ku,off:Bu,removeListener:xu,removeAllListeners:Ou,emit:Mu,prependListener:Lu,prependOnceListener:qu,listeners:Uu,domain:Hl,_exiting:Vl,config:zl,dlopen:Kl,uptime:Iu,_getActiveRequests:Gl,_getActiveHandles:Ql,reallyExit:Yl,_kill:Jl,cpuUsage:ji,resourceUsage:Xl,memoryUsage:Zl,kill:eu,exit:tu,openStdin:ru,allowedNodeEnvironmentFlags:iu,assert:nu,features:su,_fatalExceptions:ou,setUncaughtExceptionCaptureCallback:au,hasUncaughtExceptionCaptureCallback:lu,emitWarning:Ll,nextTick:Il,_tickCallback:uu,_debugProcess:cu,_debugEnd:fu,_startProfilerIdleNotifier:hu,_stopProfilerIdleNotifier:du,stdout:pu,stdin:bu,stderr:gu,abort:yu,umask:Ul,chdir:Dl,cwd:Nl,env:kl,title:Rl,argv:Bl,execArgv:xl,pid:wu,ppid:_u,execPath:mu,debugPort:vu,hrtime:Di,argv0:Eu,_preload_modules:Su,setSourceMapsEnabled:Au}});var m=Ae(()=>{Du()});var ye={};Ir(ye,{Buffer:()=>x,INSPECT_MAX_BYTES:()=>Jg,default:()=>Bt,kMaxLength:()=>Xg});function Gg(){if(ju)return oi;ju=!0,oi.byteLength=a,oi.toByteArray=f,oi.fromByteArray=g;for(var t=[],e=[],r=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,o=i.length;n<o;++n)t[n]=i[n],e[i.charCodeAt(n)]=n;e[45]=62,e[95]=63;function s(b){var E=b.length;if(E%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var w=b.indexOf("=");w===-1&&(w=E);var S=w===E?0:4-w%4;return[w,S]}function a(b){var E=s(b),w=E[0],S=E[1];return(w+S)*3/4-S}function u(b,E,w){return(E+w)*3/4-w}function f(b){var E,w=s(b),S=w[0],I=w[1],P=new r(u(b,S,I)),C=0,M=I>0?S-4:S,q;for(q=0;q<M;q+=4)E=e[b.charCodeAt(q)]<<18|e[b.charCodeAt(q+1)]<<12|e[b.charCodeAt(q+2)]<<6|e[b.charCodeAt(q+3)],P[C++]=E>>16&255,P[C++]=E>>8&255,P[C++]=E&255;return I===2&&(E=e[b.charCodeAt(q)]<<2|e[b.charCodeAt(q+1)]>>4,P[C++]=E&255),I===1&&(E=e[b.charCodeAt(q)]<<10|e[b.charCodeAt(q+1)]<<4|e[b.charCodeAt(q+2)]>>2,P[C++]=E>>8&255,P[C++]=E&255),P}function d(b){return t[b>>18&63]+t[b>>12&63]+t[b>>6&63]+t[b&63]}function h(b,E,w){for(var S,I=[],P=E;P<w;P+=3)S=(b[P]<<16&16711680)+(b[P+1]<<8&65280)+(b[P+2]&255),I.push(d(S));return I.join("")}function g(b){for(var E,w=b.length,S=w%3,I=[],P=16383,C=0,M=w-S;C<M;C+=P)I.push(h(b,C,C+P>M?M:C+P));return S===1?(E=b[w-1],I.push(t[E>>2]+t[E<<4&63]+"==")):S===2&&(E=(b[w-2]<<8)+b[w-1],I.push(t[E>>10]+t[E>>4&63]+t[E<<2&63]+"=")),I.join("")}return oi}function Qg(){if(Fu)return Fi;Fu=!0;return Fi.read=function(t,e,r,i,n){var o,s,a=n*8-i-1,u=(1<<a)-1,f=u>>1,d=-7,h=r?n-1:0,g=r?-1:1,b=t[e+h];for(h+=g,o=b&(1<<-d)-1,b>>=-d,d+=a;d>0;o=o*256+t[e+h],h+=g,d-=8);for(s=o&(1<<-d)-1,o>>=-d,d+=i;d>0;s=s*256+t[e+h],h+=g,d-=8);if(o===0)o=1-f;else{if(o===u)return s?NaN:(b?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-f}return(b?-1:1)*s*Math.pow(2,o-i)},Fi.write=function(t,e,r,i,n,o){var s,a,u,f=o*8-n-1,d=(1<<f)-1,h=d>>1,g=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=i?0:o-1,E=i?1:-1,w=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=d):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+h>=1?e+=g/u:e+=g*Math.pow(2,1-h),e*u>=2&&(s++,u/=2),s+h>=d?(a=0,s=d):s+h>=1?(a=(e*u-1)*Math.pow(2,n),s=s+h):(a=e*Math.pow(2,h-1)*Math.pow(2,n),s=0));n>=8;t[r+b]=a&255,b+=E,a/=256,n-=8);for(s=s<<n|a,f+=n;f>0;t[r+b]=s&255,b+=E,s/=256,f-=8);t[r+b-E]|=w*128},Fi}function Yg(){if(Wu)return Qt;Wu=!0;let t=Gg(),e=Qg(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Qt.Buffer=s,Qt.SlowBuffer=I,Qt.INSPECT_MAX_BYTES=50;let i=2147483647;Qt.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=n(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function n(){try{let p=new Uint8Array(1),l={foo:function(){return 42}};return Object.setPrototypeOf(l,Uint8Array.prototype),Object.setPrototypeOf(p,l),p.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(p){if(p>i)throw new RangeError('The value "'+p+'" is invalid for option "size"');let l=new Uint8Array(p);return Object.setPrototypeOf(l,s.prototype),l}function s(p,l,c){if(typeof p=="number"){if(typeof l=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(p)}return a(p,l,c)}s.poolSize=8192;function a(p,l,c){if(typeof p=="string")return h(p,l);if(ArrayBuffer.isView(p))return b(p);if(p==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p);if(Qe(p,ArrayBuffer)||p&&Qe(p.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Qe(p,SharedArrayBuffer)||p&&Qe(p.buffer,SharedArrayBuffer)))return E(p,l,c);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let y=p.valueOf&&p.valueOf();if(y!=null&&y!==p)return s.from(y,l,c);let A=w(p);if(A)return A;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return s.from(p[Symbol.toPrimitive]("string"),l,c);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p)}s.from=function(p,l,c){return a(p,l,c)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function u(p){if(typeof p!="number")throw new TypeError('"size" argument must be of type number');if(p<0)throw new RangeError('The value "'+p+'" is invalid for option "size"')}function f(p,l,c){return u(p),p<=0?o(p):l!==void 0?typeof c=="string"?o(p).fill(l,c):o(p).fill(l):o(p)}s.alloc=function(p,l,c){return f(p,l,c)};function d(p){return u(p),o(p<0?0:S(p)|0)}s.allocUnsafe=function(p){return d(p)},s.allocUnsafeSlow=function(p){return d(p)};function h(p,l){if((typeof l!="string"||l==="")&&(l="utf8"),!s.isEncoding(l))throw new TypeError("Unknown encoding: "+l);let c=P(p,l)|0,y=o(c),A=y.write(p,l);return A!==c&&(y=y.slice(0,A)),y}function g(p){let l=p.length<0?0:S(p.length)|0,c=o(l);for(let y=0;y<l;y+=1)c[y]=p[y]&255;return c}function b(p){if(Qe(p,Uint8Array)){let l=new Uint8Array(p);return E(l.buffer,l.byteOffset,l.byteLength)}return g(p)}function E(p,l,c){if(l<0||p.byteLength<l)throw new RangeError('"offset" is outside of buffer bounds');if(p.byteLength<l+(c||0))throw new RangeError('"length" is outside of buffer bounds');let y;return l===void 0&&c===void 0?y=new Uint8Array(p):c===void 0?y=new Uint8Array(p,l):y=new Uint8Array(p,l,c),Object.setPrototypeOf(y,s.prototype),y}function w(p){if(s.isBuffer(p)){let l=S(p.length)|0,c=o(l);return c.length===0||p.copy(c,0,0,l),c}if(p.length!==void 0)return typeof p.length!="number"||fs(p.length)?o(0):g(p);if(p.type==="Buffer"&&Array.isArray(p.data))return g(p.data)}function S(p){if(p>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return p|0}function I(p){return+p!=p&&(p=0),s.alloc(+p)}s.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==s.prototype},s.compare=function(l,c){if(Qe(l,Uint8Array)&&(l=s.from(l,l.offset,l.byteLength)),Qe(c,Uint8Array)&&(c=s.from(c,c.offset,c.byteLength)),!s.isBuffer(l)||!s.isBuffer(c))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(l===c)return 0;let y=l.length,A=c.length;for(let T=0,k=Math.min(y,A);T<k;++T)if(l[T]!==c[T]){y=l[T],A=c[T];break}return y<A?-1:A<y?1:0},s.isEncoding=function(l){switch(String(l).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(l,c){if(!Array.isArray(l))throw new TypeError('"list" argument must be an Array of Buffers');if(l.length===0)return s.alloc(0);let y;if(c===void 0)for(c=0,y=0;y<l.length;++y)c+=l[y].length;let A=s.allocUnsafe(c),T=0;for(y=0;y<l.length;++y){let k=l[y];if(Qe(k,Uint8Array))T+k.length>A.length?(s.isBuffer(k)||(k=s.from(k)),k.copy(A,T)):Uint8Array.prototype.set.call(A,k,T);else if(s.isBuffer(k))k.copy(A,T);else throw new TypeError('"list" argument must be an Array of Buffers');T+=k.length}return A};function P(p,l){if(s.isBuffer(p))return p.length;if(ArrayBuffer.isView(p)||Qe(p,ArrayBuffer))return p.byteLength;if(typeof p!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof p);let c=p.length,y=arguments.length>2&&arguments[2]===!0;if(!y&&c===0)return 0;let A=!1;for(;;)switch(l){case"ascii":case"latin1":case"binary":return c;case"utf8":case"utf-8":return cs(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c*2;case"hex":return c>>>1;case"base64":return Sl(p).length;default:if(A)return y?-1:cs(p).length;l=(""+l).toLowerCase(),A=!0}}s.byteLength=P;function C(p,l,c){let y=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((c===void 0||c>this.length)&&(c=this.length),c<=0)||(c>>>=0,l>>>=0,c<=l))return"";for(p||(p="utf8");;)switch(p){case"hex":return Mg(this,l,c);case"utf8":case"utf-8":return Se(this,l,c);case"ascii":return ls(this,l,c);case"latin1":case"binary":return Og(this,l,c);case"base64":return Fe(this,l,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Lg(this,l,c);default:if(y)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),y=!0}}s.prototype._isBuffer=!0;function M(p,l,c){let y=p[l];p[l]=p[c],p[c]=y}s.prototype.swap16=function(){let l=this.length;if(l%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let c=0;c<l;c+=2)M(this,c,c+1);return this},s.prototype.swap32=function(){let l=this.length;if(l%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let c=0;c<l;c+=4)M(this,c,c+3),M(this,c+1,c+2);return this},s.prototype.swap64=function(){let l=this.length;if(l%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let c=0;c<l;c+=8)M(this,c,c+7),M(this,c+1,c+6),M(this,c+2,c+5),M(this,c+3,c+4);return this},s.prototype.toString=function(){let l=this.length;return l===0?"":arguments.length===0?Se(this,0,l):C.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(l){if(!s.isBuffer(l))throw new TypeError("Argument must be a Buffer");return this===l?!0:s.compare(this,l)===0},s.prototype.inspect=function(){let l="",c=Qt.INSPECT_MAX_BYTES;return l=this.toString("hex",0,c).replace(/(.{2})/g,"$1 ").trim(),this.length>c&&(l+=" ... "),"<Buffer "+l+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(l,c,y,A,T){if(Qe(l,Uint8Array)&&(l=s.from(l,l.offset,l.byteLength)),!s.isBuffer(l))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof l);if(c===void 0&&(c=0),y===void 0&&(y=l?l.length:0),A===void 0&&(A=0),T===void 0&&(T=this.length),c<0||y>l.length||A<0||T>this.length)throw new RangeError("out of range index");if(A>=T&&c>=y)return 0;if(A>=T)return-1;if(c>=y)return 1;if(c>>>=0,y>>>=0,A>>>=0,T>>>=0,this===l)return 0;let k=T-A,W=y-c,ae=Math.min(k,W),re=this.slice(A,T),le=l.slice(c,y);for(let J=0;J<ae;++J)if(re[J]!==le[J]){k=re[J],W=le[J];break}return k<W?-1:W<k?1:0};function q(p,l,c,y,A){if(p.length===0)return-1;if(typeof c=="string"?(y=c,c=0):c>2147483647?c=2147483647:c<-2147483648&&(c=-2147483648),c=+c,fs(c)&&(c=A?0:p.length-1),c<0&&(c=p.length+c),c>=p.length){if(A)return-1;c=p.length-1}else if(c<0)if(A)c=0;else return-1;if(typeof l=="string"&&(l=s.from(l,y)),s.isBuffer(l))return l.length===0?-1:z(p,l,c,y,A);if(typeof l=="number")return l=l&255,typeof Uint8Array.prototype.indexOf=="function"?A?Uint8Array.prototype.indexOf.call(p,l,c):Uint8Array.prototype.lastIndexOf.call(p,l,c):z(p,[l],c,y,A);throw new TypeError("val must be string, number or Buffer")}function z(p,l,c,y,A){let T=1,k=p.length,W=l.length;if(y!==void 0&&(y=String(y).toLowerCase(),y==="ucs2"||y==="ucs-2"||y==="utf16le"||y==="utf-16le")){if(p.length<2||l.length<2)return-1;T=2,k/=2,W/=2,c/=2}function ae(le,J){return T===1?le[J]:le.readUInt16BE(J*T)}let re;if(A){let le=-1;for(re=c;re<k;re++)if(ae(p,re)===ae(l,le===-1?0:re-le)){if(le===-1&&(le=re),re-le+1===W)return le*T}else le!==-1&&(re-=re-le),le=-1}else for(c+W>k&&(c=k-W),re=c;re>=0;re--){let le=!0;for(let J=0;J<W;J++)if(ae(p,re+J)!==ae(l,J)){le=!1;break}if(le)return re}return-1}s.prototype.includes=function(l,c,y){return this.indexOf(l,c,y)!==-1},s.prototype.indexOf=function(l,c,y){return q(this,l,c,y,!0)},s.prototype.lastIndexOf=function(l,c,y){return q(this,l,c,y,!1)};function j(p,l,c,y){c=Number(c)||0;let A=p.length-c;y?(y=Number(y),y>A&&(y=A)):y=A;let T=l.length;y>T/2&&(y=T/2);let k;for(k=0;k<y;++k){let W=parseInt(l.substr(k*2,2),16);if(fs(W))return k;p[c+k]=W}return k}function G(p,l,c,y){return Ui(cs(l,p.length-c),p,c,y)}function $(p,l,c,y){return Ui(Dg(l),p,c,y)}function te(p,l,c,y){return Ui(Sl(l),p,c,y)}function pt(p,l,c,y){return Ui(jg(l,p.length-c),p,c,y)}s.prototype.write=function(l,c,y,A){if(c===void 0)A="utf8",y=this.length,c=0;else if(y===void 0&&typeof c=="string")A=c,y=this.length,c=0;else if(isFinite(c))c=c>>>0,isFinite(y)?(y=y>>>0,A===void 0&&(A="utf8")):(A=y,y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let T=this.length-c;if((y===void 0||y>T)&&(y=T),l.length>0&&(y<0||c<0)||c>this.length)throw new RangeError("Attempt to write outside buffer bounds");A||(A="utf8");let k=!1;for(;;)switch(A){case"hex":return j(this,l,c,y);case"utf8":case"utf-8":return G(this,l,c,y);case"ascii":case"latin1":case"binary":return $(this,l,c,y);case"base64":return te(this,l,c,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pt(this,l,c,y);default:if(k)throw new TypeError("Unknown encoding: "+A);A=(""+A).toLowerCase(),k=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Fe(p,l,c){return l===0&&c===p.length?t.fromByteArray(p):t.fromByteArray(p.slice(l,c))}function Se(p,l,c){c=Math.min(p.length,c);let y=[],A=l;for(;A<c;){let T=p[A],k=null,W=T>239?4:T>223?3:T>191?2:1;if(A+W<=c){let ae,re,le,J;switch(W){case 1:T<128&&(k=T);break;case 2:ae=p[A+1],(ae&192)===128&&(J=(T&31)<<6|ae&63,J>127&&(k=J));break;case 3:ae=p[A+1],re=p[A+2],(ae&192)===128&&(re&192)===128&&(J=(T&15)<<12|(ae&63)<<6|re&63,J>2047&&(J<55296||J>57343)&&(k=J));break;case 4:ae=p[A+1],re=p[A+2],le=p[A+3],(ae&192)===128&&(re&192)===128&&(le&192)===128&&(J=(T&15)<<18|(ae&63)<<12|(re&63)<<6|le&63,J>65535&&J<1114112&&(k=J))}}k===null?(k=65533,W=1):k>65535&&(k-=65536,y.push(k>>>10&1023|55296),k=56320|k&1023),y.push(k),A+=W}return Er(y)}let vr=4096;function Er(p){let l=p.length;if(l<=vr)return String.fromCharCode.apply(String,p);let c="",y=0;for(;y<l;)c+=String.fromCharCode.apply(String,p.slice(y,y+=vr));return c}function ls(p,l,c){let y="";c=Math.min(p.length,c);for(let A=l;A<c;++A)y+=String.fromCharCode(p[A]&127);return y}function Og(p,l,c){let y="";c=Math.min(p.length,c);for(let A=l;A<c;++A)y+=String.fromCharCode(p[A]);return y}function Mg(p,l,c){let y=p.length;(!l||l<0)&&(l=0),(!c||c<0||c>y)&&(c=y);let A="";for(let T=l;T<c;++T)A+=Fg[p[T]];return A}function Lg(p,l,c){let y=p.slice(l,c),A="";for(let T=0;T<y.length-1;T+=2)A+=String.fromCharCode(y[T]+y[T+1]*256);return A}s.prototype.slice=function(l,c){let y=this.length;l=~~l,c=c===void 0?y:~~c,l<0?(l+=y,l<0&&(l=0)):l>y&&(l=y),c<0?(c+=y,c<0&&(c=0)):c>y&&(c=y),c<l&&(c=l);let A=this.subarray(l,c);return Object.setPrototypeOf(A,s.prototype),A};function be(p,l,c){if(p%1!==0||p<0)throw new RangeError("offset is not uint");if(p+l>c)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(l,c,y){l=l>>>0,c=c>>>0,y||be(l,c,this.length);let A=this[l],T=1,k=0;for(;++k<c&&(T*=256);)A+=this[l+k]*T;return A},s.prototype.readUintBE=s.prototype.readUIntBE=function(l,c,y){l=l>>>0,c=c>>>0,y||be(l,c,this.length);let A=this[l+--c],T=1;for(;c>0&&(T*=256);)A+=this[l+--c]*T;return A},s.prototype.readUint8=s.prototype.readUInt8=function(l,c){return l=l>>>0,c||be(l,1,this.length),this[l]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(l,c){return l=l>>>0,c||be(l,2,this.length),this[l]|this[l+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(l,c){return l=l>>>0,c||be(l,2,this.length),this[l]<<8|this[l+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(l,c){return l=l>>>0,c||be(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(l,c){return l=l>>>0,c||be(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},s.prototype.readBigUInt64LE=Pt(function(l){l=l>>>0,Ar(l,"offset");let c=this[l],y=this[l+7];(c===void 0||y===void 0)&&si(l,this.length-8);let A=c+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24,T=this[++l]+this[++l]*2**8+this[++l]*2**16+y*2**24;return BigInt(A)+(BigInt(T)<<BigInt(32))}),s.prototype.readBigUInt64BE=Pt(function(l){l=l>>>0,Ar(l,"offset");let c=this[l],y=this[l+7];(c===void 0||y===void 0)&&si(l,this.length-8);let A=c*2**24+this[++l]*2**16+this[++l]*2**8+this[++l],T=this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+y;return(BigInt(A)<<BigInt(32))+BigInt(T)}),s.prototype.readIntLE=function(l,c,y){l=l>>>0,c=c>>>0,y||be(l,c,this.length);let A=this[l],T=1,k=0;for(;++k<c&&(T*=256);)A+=this[l+k]*T;return T*=128,A>=T&&(A-=Math.pow(2,8*c)),A},s.prototype.readIntBE=function(l,c,y){l=l>>>0,c=c>>>0,y||be(l,c,this.length);let A=c,T=1,k=this[l+--A];for(;A>0&&(T*=256);)k+=this[l+--A]*T;return T*=128,k>=T&&(k-=Math.pow(2,8*c)),k},s.prototype.readInt8=function(l,c){return l=l>>>0,c||be(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},s.prototype.readInt16LE=function(l,c){l=l>>>0,c||be(l,2,this.length);let y=this[l]|this[l+1]<<8;return y&32768?y|4294901760:y},s.prototype.readInt16BE=function(l,c){l=l>>>0,c||be(l,2,this.length);let y=this[l+1]|this[l]<<8;return y&32768?y|4294901760:y},s.prototype.readInt32LE=function(l,c){return l=l>>>0,c||be(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},s.prototype.readInt32BE=function(l,c){return l=l>>>0,c||be(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},s.prototype.readBigInt64LE=Pt(function(l){l=l>>>0,Ar(l,"offset");let c=this[l],y=this[l+7];(c===void 0||y===void 0)&&si(l,this.length-8);let A=this[l+4]+this[l+5]*2**8+this[l+6]*2**16+(y<<24);return(BigInt(A)<<BigInt(32))+BigInt(c+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24)}),s.prototype.readBigInt64BE=Pt(function(l){l=l>>>0,Ar(l,"offset");let c=this[l],y=this[l+7];(c===void 0||y===void 0)&&si(l,this.length-8);let A=(c<<24)+this[++l]*2**16+this[++l]*2**8+this[++l];return(BigInt(A)<<BigInt(32))+BigInt(this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+y)}),s.prototype.readFloatLE=function(l,c){return l=l>>>0,c||be(l,4,this.length),e.read(this,l,!0,23,4)},s.prototype.readFloatBE=function(l,c){return l=l>>>0,c||be(l,4,this.length),e.read(this,l,!1,23,4)},s.prototype.readDoubleLE=function(l,c){return l=l>>>0,c||be(l,8,this.length),e.read(this,l,!0,52,8)},s.prototype.readDoubleBE=function(l,c){return l=l>>>0,c||be(l,8,this.length),e.read(this,l,!1,52,8)};function Ce(p,l,c,y,A,T){if(!s.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(l>A||l<T)throw new RangeError('"value" argument is out of bounds');if(c+y>p.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(l,c,y,A){if(l=+l,c=c>>>0,y=y>>>0,!A){let W=Math.pow(2,8*y)-1;Ce(this,l,c,y,W,0)}let T=1,k=0;for(this[c]=l&255;++k<y&&(T*=256);)this[c+k]=l/T&255;return c+y},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(l,c,y,A){if(l=+l,c=c>>>0,y=y>>>0,!A){let W=Math.pow(2,8*y)-1;Ce(this,l,c,y,W,0)}let T=y-1,k=1;for(this[c+T]=l&255;--T>=0&&(k*=256);)this[c+T]=l/k&255;return c+y},s.prototype.writeUint8=s.prototype.writeUInt8=function(l,c,y){return l=+l,c=c>>>0,y||Ce(this,l,c,1,255,0),this[c]=l&255,c+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(l,c,y){return l=+l,c=c>>>0,y||Ce(this,l,c,2,65535,0),this[c]=l&255,this[c+1]=l>>>8,c+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(l,c,y){return l=+l,c=c>>>0,y||Ce(this,l,c,2,65535,0),this[c]=l>>>8,this[c+1]=l&255,c+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(l,c,y){return l=+l,c=c>>>0,y||Ce(this,l,c,4,4294967295,0),this[c+3]=l>>>24,this[c+2]=l>>>16,this[c+1]=l>>>8,this[c]=l&255,c+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(l,c,y){return l=+l,c=c>>>0,y||Ce(this,l,c,4,4294967295,0),this[c]=l>>>24,this[c+1]=l>>>16,this[c+2]=l>>>8,this[c+3]=l&255,c+4};function bl(p,l,c,y,A){El(l,y,A,p,c,7);let T=Number(l&BigInt(4294967295));p[c++]=T,T=T>>8,p[c++]=T,T=T>>8,p[c++]=T,T=T>>8,p[c++]=T;let k=Number(l>>BigInt(32)&BigInt(4294967295));return p[c++]=k,k=k>>8,p[c++]=k,k=k>>8,p[c++]=k,k=k>>8,p[c++]=k,c}function yl(p,l,c,y,A){El(l,y,A,p,c,7);let T=Number(l&BigInt(4294967295));p[c+7]=T,T=T>>8,p[c+6]=T,T=T>>8,p[c+5]=T,T=T>>8,p[c+4]=T;let k=Number(l>>BigInt(32)&BigInt(4294967295));return p[c+3]=k,k=k>>8,p[c+2]=k,k=k>>8,p[c+1]=k,k=k>>8,p[c]=k,c+8}s.prototype.writeBigUInt64LE=Pt(function(l,c=0){return bl(this,l,c,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Pt(function(l,c=0){return yl(this,l,c,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(l,c,y,A){if(l=+l,c=c>>>0,!A){let ae=Math.pow(2,8*y-1);Ce(this,l,c,y,ae-1,-ae)}let T=0,k=1,W=0;for(this[c]=l&255;++T<y&&(k*=256);)l<0&&W===0&&this[c+T-1]!==0&&(W=1),this[c+T]=(l/k>>0)-W&255;return c+y},s.prototype.writeIntBE=function(l,c,y,A){if(l=+l,c=c>>>0,!A){let ae=Math.pow(2,8*y-1);Ce(this,l,c,y,ae-1,-ae)}let T=y-1,k=1,W=0;for(this[c+T]=l&255;--T>=0&&(k*=256);)l<0&&W===0&&this[c+T+1]!==0&&(W=1),this[c+T]=(l/k>>0)-W&255;return c+y},s.prototype.writeInt8=function(l,c,y){return l=+l,c=c>>>0,y||Ce(this,l,c,1,127,-128),l<0&&(l=255+l+1),this[c]=l&255,c+1},s.prototype.writeInt16LE=function(l,c,y){return l=+l,c=c>>>0,y||Ce(this,l,c,2,32767,-32768),this[c]=l&255,this[c+1]=l>>>8,c+2},s.prototype.writeInt16BE=function(l,c,y){return l=+l,c=c>>>0,y||Ce(this,l,c,2,32767,-32768),this[c]=l>>>8,this[c+1]=l&255,c+2},s.prototype.writeInt32LE=function(l,c,y){return l=+l,c=c>>>0,y||Ce(this,l,c,4,2147483647,-2147483648),this[c]=l&255,this[c+1]=l>>>8,this[c+2]=l>>>16,this[c+3]=l>>>24,c+4},s.prototype.writeInt32BE=function(l,c,y){return l=+l,c=c>>>0,y||Ce(this,l,c,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[c]=l>>>24,this[c+1]=l>>>16,this[c+2]=l>>>8,this[c+3]=l&255,c+4},s.prototype.writeBigInt64LE=Pt(function(l,c=0){return bl(this,l,c,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Pt(function(l,c=0){return yl(this,l,c,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function wl(p,l,c,y,A,T){if(c+y>p.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("Index out of range")}function _l(p,l,c,y,A){return l=+l,c=c>>>0,A||wl(p,l,c,4),e.write(p,l,c,y,23,4),c+4}s.prototype.writeFloatLE=function(l,c,y){return _l(this,l,c,!0,y)},s.prototype.writeFloatBE=function(l,c,y){return _l(this,l,c,!1,y)};function ml(p,l,c,y,A){return l=+l,c=c>>>0,A||wl(p,l,c,8),e.write(p,l,c,y,52,8),c+8}s.prototype.writeDoubleLE=function(l,c,y){return ml(this,l,c,!0,y)},s.prototype.writeDoubleBE=function(l,c,y){return ml(this,l,c,!1,y)},s.prototype.copy=function(l,c,y,A){if(!s.isBuffer(l))throw new TypeError("argument should be a Buffer");if(y||(y=0),!A&&A!==0&&(A=this.length),c>=l.length&&(c=l.length),c||(c=0),A>0&&A<y&&(A=y),A===y||l.length===0||this.length===0)return 0;if(c<0)throw new RangeError("targetStart out of bounds");if(y<0||y>=this.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("sourceEnd out of bounds");A>this.length&&(A=this.length),l.length-c<A-y&&(A=l.length-c+y);let T=A-y;return this===l&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(c,y,A):Uint8Array.prototype.set.call(l,this.subarray(y,A),c),T},s.prototype.fill=function(l,c,y,A){if(typeof l=="string"){if(typeof c=="string"?(A=c,c=0,y=this.length):typeof y=="string"&&(A=y,y=this.length),A!==void 0&&typeof A!="string")throw new TypeError("encoding must be a string");if(typeof A=="string"&&!s.isEncoding(A))throw new TypeError("Unknown encoding: "+A);if(l.length===1){let k=l.charCodeAt(0);(A==="utf8"&&k<128||A==="latin1")&&(l=k)}}else typeof l=="number"?l=l&255:typeof l=="boolean"&&(l=Number(l));if(c<0||this.length<c||this.length<y)throw new RangeError("Out of range index");if(y<=c)return this;c=c>>>0,y=y===void 0?this.length:y>>>0,l||(l=0);let T;if(typeof l=="number")for(T=c;T<y;++T)this[T]=l;else{let k=s.isBuffer(l)?l:s.from(l,A),W=k.length;if(W===0)throw new TypeError('The value "'+l+'" is invalid for argument "value"');for(T=0;T<y-c;++T)this[T+c]=k[T%W]}return this};let Sr={};function us(p,l,c){Sr[p]=class extends c{constructor(){super(),Object.defineProperty(this,"message",{value:l.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${p}]`,this.stack,delete this.name}get code(){return p}set code(A){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:A,writable:!0})}toString(){return`${this.name} [${p}]: ${this.message}`}}}us("ERR_BUFFER_OUT_OF_BOUNDS",function(p){return p?`${p} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),us("ERR_INVALID_ARG_TYPE",function(p,l){return`The "${p}" argument must be of type number. Received type ${typeof l}`},TypeError),us("ERR_OUT_OF_RANGE",function(p,l,c){let y=`The value of "${p}" is out of range.`,A=c;return Number.isInteger(c)&&Math.abs(c)>2**32?A=vl(String(c)):typeof c=="bigint"&&(A=String(c),(c>BigInt(2)**BigInt(32)||c<-(BigInt(2)**BigInt(32)))&&(A=vl(A)),A+="n"),y+=` It must be ${l}. Received ${A}`,y},RangeError);function vl(p){let l="",c=p.length,y=p[0]==="-"?1:0;for(;c>=y+4;c-=3)l=`_${p.slice(c-3,c)}${l}`;return`${p.slice(0,c)}${l}`}function qg(p,l,c){Ar(l,"offset"),(p[l]===void 0||p[l+c]===void 0)&&si(l,p.length-(c+1))}function El(p,l,c,y,A,T){if(p>c||p<l){let k=typeof l=="bigint"?"n":"",W;throw T>3?l===0||l===BigInt(0)?W=`>= 0${k} and < 2${k} ** ${(T+1)*8}${k}`:W=`>= -(2${k} ** ${(T+1)*8-1}${k}) and < 2 ** ${(T+1)*8-1}${k}`:W=`>= ${l}${k} and <= ${c}${k}`,new Sr.ERR_OUT_OF_RANGE("value",W,p)}qg(y,A,T)}function Ar(p,l){if(typeof p!="number")throw new Sr.ERR_INVALID_ARG_TYPE(l,"number",p)}function si(p,l,c){throw Math.floor(p)!==p?(Ar(p,c),new Sr.ERR_OUT_OF_RANGE(c||"offset","an integer",p)):l<0?new Sr.ERR_BUFFER_OUT_OF_BOUNDS:new Sr.ERR_OUT_OF_RANGE(c||"offset",`>= ${c?1:0} and <= ${l}`,p)}let Ug=/[^+/0-9A-Za-z-_]/g;function Ng(p){if(p=p.split("=")[0],p=p.trim().replace(Ug,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function cs(p,l){l=l||1/0;let c,y=p.length,A=null,T=[];for(let k=0;k<y;++k){if(c=p.charCodeAt(k),c>55295&&c<57344){if(!A){if(c>56319){(l-=3)>-1&&T.push(239,191,189);continue}else if(k+1===y){(l-=3)>-1&&T.push(239,191,189);continue}A=c;continue}if(c<56320){(l-=3)>-1&&T.push(239,191,189),A=c;continue}c=(A-55296<<10|c-56320)+65536}else A&&(l-=3)>-1&&T.push(239,191,189);if(A=null,c<128){if((l-=1)<0)break;T.push(c)}else if(c<2048){if((l-=2)<0)break;T.push(c>>6|192,c&63|128)}else if(c<65536){if((l-=3)<0)break;T.push(c>>12|224,c>>6&63|128,c&63|128)}else if(c<1114112){if((l-=4)<0)break;T.push(c>>18|240,c>>12&63|128,c>>6&63|128,c&63|128)}else throw new Error("Invalid code point")}return T}function Dg(p){let l=[];for(let c=0;c<p.length;++c)l.push(p.charCodeAt(c)&255);return l}function jg(p,l){let c,y,A,T=[];for(let k=0;k<p.length&&!((l-=2)<0);++k)c=p.charCodeAt(k),y=c>>8,A=c%256,T.push(A),T.push(y);return T}function Sl(p){return t.toByteArray(Ng(p))}function Ui(p,l,c,y){let A;for(A=0;A<y&&!(A+c>=l.length||A>=p.length);++A)l[A+c]=p[A];return A}function Qe(p,l){return p instanceof l||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===l.name}function fs(p){return p!==p}let Fg=function(){let p="0123456789abcdef",l=new Array(256);for(let c=0;c<16;++c){let y=c*16;for(let A=0;A<16;++A)l[y+A]=p[c]+p[A]}return l}();function Pt(p){return typeof BigInt>"u"?Wg:p}function Wg(){throw new Error("BigInt not supported")}return Qt}var oi,ju,Fi,Fu,Qt,Wu,Bt,x,Jg,Xg,he=Ae(()=>{_();v();m();oi={},ju=!1;Fi={},Fu=!1;Qt={},Wu=!1;Bt=Yg();Bt.Buffer;Bt.SlowBuffer;Bt.INSPECT_MAX_BYTES;Bt.kMaxLength;x=Bt.Buffer,Jg=Bt.INSPECT_MAX_BYTES,Xg=Bt.kMaxLength});var v=Ae(()=>{he()});var $u=O(ys=>{"use strict";_();v();m();Object.defineProperty(ys,"__esModule",{value:!0});var bs=class{constructor(e){this.aliasToTopic={},this.max=e}put(e,r){return r===0||r>this.max?!1:(this.aliasToTopic[r]=e,this.length=Object.keys(this.aliasToTopic).length,!0)}getTopicByAlias(e){return this.aliasToTopic[e]}clear(){this.aliasToTopic={}}};ys.default=bs});var ie=O((zA,Hu)=>{"use strict";_();v();m();var ws=class extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError(`Expected input to be an Array, got ${typeof e}`);let r="";for(let i=0;i<e.length;i++)r+=` ${e[i].stack} `;super(r),this.name="AggregateError",this.errors=e}};Hu.exports={AggregateError:ws,ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,r){return t.slice(e,r)},Error,FunctionPrototypeCall(t,e,...r){return t.call(e,...r)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,r){return Object.defineProperty(t,e,r)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,r){return t.then(e,r)},PromiseReject(t){return Promise.reject(t)},PromiseResolve(t){return Promise.resolve(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,r){return t.slice(e,r)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(t,e,r){return t.set(e,r)},Boolean,Uint8Array}});var _s=O((rI,Vu)=>{"use strict";_();v();m();Vu.exports={format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,i]){let n=e.shift();return i==="f"?n.toFixed(6):i==="j"?JSON.stringify(n):i==="s"&&typeof n=="object"?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})},inspect(t){switch(typeof t){case"string":if(t.includes("'"))if(t.includes('"')){if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}else return`"${t}"`;return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}}}});var me=O((hI,Gu)=>{"use strict";_();v();m();var{format:Zg,inspect:Wi}=_s(),{AggregateError:eb}=ie(),tb=globalThis.AggregateError||eb,rb=Symbol("kIsNodeError"),ib=["string","function","number","object","Function","Object","boolean","bigint","symbol"],nb=/^([A-Z][a-z0-9]*)+$/,sb="__node_internal_",$i={};function Yt(t,e){if(!t)throw new $i.ERR_INTERNAL_ASSERTION(e)}function zu(t){let e="",r=t.length,i=t[0]==="-"?1:0;for(;r>=i+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function ob(t,e,r){if(typeof e=="function")return Yt(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);let i=(e.match(/%[dfijoOs]/g)||[]).length;return Yt(i===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),r.length===0?e:Zg(e,...r)}function we(t,e,r){r||(r=Error);class i extends r{constructor(...o){super(ob(t,e,o))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=t,i.prototype[rb]=!0,$i[t]=i}function Ku(t){let e=sb+t.name;return Object.defineProperty(t,"name",{value:e}),t}function ab(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let r=new tb([e,t],e.message);return r.code=e.code,r}return t||e}var ms=class extends Error{constructor(e="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new $i.ERR_INVALID_ARG_TYPE("options","Object",r);super(e,r),this.code="ABORT_ERR",this.name="AbortError"}};we("ERR_ASSERTION","%s",Error);we("ERR_INVALID_ARG_TYPE",(t,e,r)=>{Yt(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let i="The ";t.endsWith(" argument")?i+=`${t} `:i+=`"${t}" ${t.includes(".")?"property":"argument"} `,i+="must be ";let n=[],o=[],s=[];for(let u of e)Yt(typeof u=="string","All expected entries have to be of type string"),ib.includes(u)?n.push(u.toLowerCase()):nb.test(u)?o.push(u):(Yt(u!=="object",'The value "object" should be written as "Object"'),s.push(u));if(o.length>0){let u=n.indexOf("object");u!==-1&&(n.splice(n,u,1),o.push("Object"))}if(n.length>0){switch(n.length){case 1:i+=`of type ${n[0]}`;break;case 2:i+=`one of type ${n[0]} or ${n[1]}`;break;default:{let u=n.pop();i+=`one of type ${n.join(", ")}, or ${u}`}}(o.length>0||s.length>0)&&(i+=" or ")}if(o.length>0){switch(o.length){case 1:i+=`an instance of ${o[0]}`;break;case 2:i+=`an instance of ${o[0]} or ${o[1]}`;break;default:{let u=o.pop();i+=`an instance of ${o.join(", ")}, or ${u}`}}s.length>0&&(i+=" or ")}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(i+="an "),i+=`${s[0]}`;break;case 2:i+=`one of ${s[0]} or ${s[1]}`;break;default:{let u=s.pop();i+=`one of ${s.join(", ")}, or ${u}`}}if(r==null)i+=`. Received ${r}`;else if(typeof r=="function"&&r.name)i+=`. Received function ${r.name}`;else if(typeof r=="object"){var a;if((a=r.constructor)!==null&&a!==void 0&&a.name)i+=`. Received an instance of ${r.constructor.name}`;else{let u=Wi(r,{depth:-1});i+=`. Received ${u}`}}else{let u=Wi(r,{colors:!1});u.length>25&&(u=`${u.slice(0,25)}...`),i+=`. Received type ${typeof r} (${u})`}return i},TypeError);we("ERR_INVALID_ARG_VALUE",(t,e,r="is invalid")=>{let i=Wi(e);return i.length>128&&(i=i.slice(0,128)+"..."),`The ${t.includes(".")?"property":"argument"} '${t}' ${r}. Received ${i}`},TypeError);we("ERR_INVALID_RETURN_VALUE",(t,e,r)=>{var i;let n=r!=null&&(i=r.constructor)!==null&&i!==void 0&&i.name?`instance of ${r.constructor.name}`:`type ${typeof r}`;return`Expected ${t} to be returned from the "${e}" function but got ${n}.`},TypeError);we("ERR_MISSING_ARGS",(...t)=>{Yt(t.length>0,"At least one arg needs to be specified");let e,r=t.length;switch(t=(Array.isArray(t)?t:[t]).map(i=>`"${i}"`).join(" or "),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{let i=t.pop();e+=`The ${t.join(", ")}, and ${i} arguments`}break}return`${e} must be specified`},TypeError);we("ERR_OUT_OF_RANGE",(t,e,r)=>{Yt(e,'Missing "range" argument');let i;if(Number.isInteger(r)&&Math.abs(r)>2**32)i=zu(String(r));else if(typeof r=="bigint"){i=String(r);let n=BigInt(2)**BigInt(32);(r>n||r<-n)&&(i=zu(i)),i+="n"}else i=Wi(r);return`The value of "${t}" is out of range. It must be ${e}. Received ${i}`},RangeError);we("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);we("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);we("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);we("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);we("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);we("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);we("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);we("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);we("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);we("ERR_STREAM_WRITE_AFTER_END","write after end",Error);we("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);Gu.exports={AbortError:ms,aggregateTwoErrors:Ku(ab),hideStackFrames:Ku,codes:$i}});var Rr=O((EI,Hi)=>{"use strict";_();v();m();var{AbortController:Qu,AbortSignal:lb}=typeof self<"u"?self:typeof window<"u"?window:void 0;Hi.exports=Qu;Hi.exports.AbortSignal=lb;Hi.exports.default=Qu});function Y(){Y.init.call(this)}function Vi(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function sc(t){return t._maxListeners===void 0?Y.defaultMaxListeners:t._maxListeners}function Zu(t,e,r,i){var n,o,s,a;if(Vi(r),(o=t._events)===void 0?(o=t._events=Object.create(null),t._eventsCount=0):(o.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),s===void 0)s=o[e]=r,++t._eventsCount;else if(typeof s=="function"?s=o[e]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),(n=sc(t))>0&&s.length>n&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return t}function ub(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function ec(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=ub.bind(i);return n.listener=r,i.wrapFn=n,n}function tc(t,e,r){var i=t._events;if(i===void 0)return[];var n=i[e];return n===void 0?[]:typeof n=="function"?r?[n.listener||n]:[n]:r?function(o){for(var s=new Array(o.length),a=0;a<s.length;++a)s[a]=o[a].listener||o[a];return s}(n):oc(n,n.length)}function rc(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}function oc(t,e){for(var r=new Array(e),i=0;i<e;++i)r[i]=t[i];return r}var ic,nc,Cr,Yu,Ju,Xu,Pe,vs=Ae(()=>{_();v();m();Cr=typeof Reflect=="object"?Reflect:null,Yu=Cr&&typeof Cr.apply=="function"?Cr.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};nc=Cr&&typeof Cr.ownKeys=="function"?Cr.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};Ju=Number.isNaN||function(t){return t!=t};ic=Y,Y.EventEmitter=Y,Y.prototype._events=void 0,Y.prototype._eventsCount=0,Y.prototype._maxListeners=void 0;Xu=10;Object.defineProperty(Y,"defaultMaxListeners",{enumerable:!0,get:function(){return Xu},set:function(t){if(typeof t!="number"||t<0||Ju(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");Xu=t}}),Y.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Y.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Ju(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},Y.prototype.getMaxListeners=function(){return sc(this)},Y.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i=t==="error",n=this._events;if(n!==void 0)i=i&&n.error===void 0;else if(!i)return!1;if(i){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var a=n[t];if(a===void 0)return!1;if(typeof a=="function")Yu(a,this,e);else{var u=a.length,f=oc(a,u);for(r=0;r<u;++r)Yu(f[r],this,e)}return!0},Y.prototype.addListener=function(t,e){return Zu(this,t,e,!1)},Y.prototype.on=Y.prototype.addListener,Y.prototype.prependListener=function(t,e){return Zu(this,t,e,!0)},Y.prototype.once=function(t,e){return Vi(e),this.on(t,ec(this,t,e)),this},Y.prototype.prependOnceListener=function(t,e){return Vi(e),this.prependListener(t,ec(this,t,e)),this},Y.prototype.removeListener=function(t,e){var r,i,n,o,s;if(Vi(e),(i=this._events)===void 0)return this;if((r=i[t])===void 0)return this;if(r===e||r.listener===e)--this._eventsCount==0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||e));else if(typeof r!="function"){for(n=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,n=o;break}if(n<0)return this;n===0?r.shift():function(a,u){for(;u+1<a.length;u++)a[u]=a[u+1];a.pop()}(r,n),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||e)}return this},Y.prototype.off=Y.prototype.removeListener,Y.prototype.removeAllListeners=function(t){var e,r,i;if((r=this._events)===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var n,o=Object.keys(r);for(i=0;i<o.length;++i)(n=o[i])!=="removeListener"&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(e=r[t])=="function")this.removeListener(t,e);else if(e!==void 0)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this},Y.prototype.listeners=function(t){return tc(this,t,!0)},Y.prototype.rawListeners=function(t){return tc(this,t,!1)},Y.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):rc.call(t,e)},Y.prototype.listenerCount=rc,Y.prototype.eventNames=function(){return this._eventsCount>0?nc(this._events):[]};Pe=ic;Pe.EventEmitter;Pe.defaultMaxListeners;Pe.init;Pe.listenerCount;Pe.EventEmitter;Pe.defaultMaxListeners;Pe.init;Pe.listenerCount});var xt={};Ir(xt,{EventEmitter:()=>cb,default:()=>Pe,defaultMaxListeners:()=>fb,init:()=>hb,listenerCount:()=>db,on:()=>pb,once:()=>gb});var cb,fb,hb,db,pb,gb,Ot=Ae(()=>{_();v();m();vs();vs();Pe.once=function(t,e){return new Promise((r,i)=>{function n(...s){o!==void 0&&t.removeListener("error",o),r(s)}let o;e!=="error"&&(o=s=>{t.removeListener(name,n),i(s)},t.once("error",o)),t.once(e,n)})};Pe.on=function(t,e){let r=[],i=[],n=null,o=!1,s={async next(){let f=r.shift();if(f)return createIterResult(f,!1);if(n){let d=Promise.reject(n);return n=null,d}return o?createIterResult(void 0,!0):new Promise((d,h)=>i.push({resolve:d,reject:h}))},async return(){t.removeListener(e,a),t.removeListener("error",u),o=!0;for(let f of i)f.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(f){n=f,t.removeListener(e,a),t.removeListener("error",u)},[Symbol.asyncIterator](){return this}};return t.on(e,a),t.on("error",u),s;function a(...f){let d=i.shift();d?d.resolve(createIterResult(f,!1)):r.push(f)}function u(f){o=!0;let d=i.shift();d?d.reject(f):n=f,s.return()}};({EventEmitter:cb,defaultMaxListeners:fb,init:hb,listenerCount:db,on:pb,once:gb}=Pe)});var Ie=O((ZI,Ss)=>{"use strict";_();v();m();var bb=(he(),Q(ye)),{format:yb,inspect:wb}=_s(),{codes:{ERR_INVALID_ARG_TYPE:Es}}=me(),{kResistStopPropagation:_b,AggregateError:mb,SymbolDispose:vb}=ie(),Eb=globalThis.AbortSignal||Rr().AbortSignal,Sb=globalThis.AbortController||Rr().AbortController,Ab=Object.getPrototypeOf(async function(){}).constructor,ac=globalThis.Blob||bb.Blob,Ib=typeof ac<"u"?function(e){return e instanceof ac}:function(e){return!1},lc=(t,e)=>{if(t!==void 0&&(t===null||typeof t!="object"||!("aborted"in t)))throw new Es(e,"AbortSignal",t)},Tb=(t,e)=>{if(typeof t!="function")throw new Es(e,"Function",t)};Ss.exports={AggregateError:mb,kEmptyObject:Object.freeze({}),once(t){let e=!1;return function(...r){e||(e=!0,t.apply(this,r))}},createDeferredPromise:function(){let t,e;return{promise:new Promise((i,n)=>{t=i,e=n}),resolve:t,reject:e}},promisify(t){return new Promise((e,r)=>{t((i,...n)=>i?r(i):e(...n))})},debuglog(){return function(){}},format:yb,inspect:wb,types:{isAsyncFunction(t){return t instanceof Ab},isArrayBufferView(t){return ArrayBuffer.isView(t)}},isBlob:Ib,deprecate(t,e){return t},addAbortListener:(Ot(),Q(xt)).addAbortListener||function(e,r){if(e===void 0)throw new Es("signal","AbortSignal",e);lc(e,"signal"),Tb(r,"listener");let i;return e.aborted?queueMicrotask(()=>r()):(e.addEventListener("abort",r,{__prot