mqtt-crypto-client 0.2.1 → 0.2.3
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/README.md +32 -7
- package/dist/index.browser.js +9 -0
- package/dist/index.browser.js.map +7 -0
- package/dist/index.cjs +66 -1
- package/dist/index.cjs.map +3 -3
- package/dist/index.iife.js +6 -6
- package/dist/index.iife.js.map +4 -4
- package/package.json +6 -2
- package/src/config-string.js +117 -0
- package/src/index.js +2 -0
- package/src/options.js +6 -1
- package/types/index.d.ts +33 -4
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var ju=Object.create;var ao=Object.defineProperty;var Nu=Object.getOwnPropertyDescriptor;var Mu=Object.getOwnPropertyNames;var Lu=Object.getPrototypeOf,Uu=Object.prototype.hasOwnProperty;var Us=o=>{throw TypeError(o)};var qu=(o,e,r)=>e in o?ao(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r;var qs=(o=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(o,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):o)(function(o){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+o+'" is not supported')});var Ws=(o,e)=>()=>(o&&(e=o(o=0)),e);var Ue=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var Wu=(o,e,r,h)=>{if(e&&typeof e=="object"||typeof e=="function")for(let d of Mu(e))!Uu.call(o,d)&&d!==r&&ao(o,d,{get:()=>e[d],enumerable:!(h=Nu(e,d))||h.enumerable});return o};var Hu=(o,e,r)=>(r=o!=null?ju(Lu(o)):{},Wu(e||!o||!o.__esModule?ao(r,"default",{value:o,enumerable:!0}):r,o));var Se=(o,e,r)=>qu(o,typeof e!="symbol"?e+"":e,r),lo=(o,e,r)=>e.has(o)||Us("Cannot "+r);var V=(o,e,r)=>(lo(o,e,"read from private field"),r?r.call(o):e.get(o)),ze=(o,e,r)=>e.has(o)?Us("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,r),Re=(o,e,r,h)=>(lo(o,e,"write to private field"),h?h.call(o,r):e.set(o,r),r),Te=(o,e,r)=>(lo(o,e,"access private method"),r);var Ir=(o,e,r,h)=>({set _(d){Re(o,e,d,r)},get _(){return V(o,e,h)}});var Ee=Ws(()=>{});function $u(o,...e){queueMicrotask(()=>o(...e))}var zu,Ne,Ae=Ws(()=>{"use strict";zu=Object.freeze({NODE_ENV:"production"});Ne=Object.freeze({env:zu,browser:!0,version:"0.0.0",platform:"browser",nextTick:$u})});var _l=Ue(()=>{Ee();Ae()});var We=Ue((gn,wl)=>{Ee();Ae();(function(o,e){typeof gn=="object"?wl.exports=gn=e():typeof define=="function"&&define.amd?define([],e):o.CryptoJS=e()})(gn,function(){var o=o||(function(e,r){var h;if(typeof window<"u"&&window.crypto&&(h=window.crypto),typeof self<"u"&&self.crypto&&(h=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(h=globalThis.crypto),!h&&typeof window<"u"&&window.msCrypto&&(h=window.msCrypto),!h&&typeof globalThis<"u"&&globalThis.crypto&&(h=globalThis.crypto),!h&&typeof qs=="function")try{h=_l()}catch{}var d=function(){if(h){if(typeof h.getRandomValues=="function")try{return h.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof h.randomBytes=="function")try{return h.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},t=Object.create||(function(){function y(){}return function(a){var m;return y.prototype=a,m=new y,y.prototype=null,m}})(),n={},i=n.lib={},f=i.Base=(function(){return{extend:function(y){var a=t(this);return y&&a.mixIn(y),(!a.hasOwnProperty("init")||this.init===a.init)&&(a.init=function(){a.$super.init.apply(this,arguments)}),a.init.prototype=a,a.$super=this,a},create:function(){var y=this.extend();return y.init.apply(y,arguments),y},init:function(){},mixIn:function(y){for(var a in y)y.hasOwnProperty(a)&&(this[a]=y[a]);y.hasOwnProperty("toString")&&(this.toString=y.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),c=i.WordArray=f.extend({init:function(y,a){y=this.words=y||[],a!=r?this.sigBytes=a:this.sigBytes=y.length*4},toString:function(y){return(y||g).stringify(this)},concat:function(y){var a=this.words,m=y.words,_=this.sigBytes,w=y.sigBytes;if(this.clamp(),_%4)for(var B=0;B<w;B++){var k=m[B>>>2]>>>24-B%4*8&255;a[_+B>>>2]|=k<<24-(_+B)%4*8}else for(var R=0;R<w;R+=4)a[_+R>>>2]=m[R>>>2];return this.sigBytes+=w,this},clamp:function(){var y=this.words,a=this.sigBytes;y[a>>>2]&=4294967295<<32-a%4*8,y.length=e.ceil(a/4)},clone:function(){var y=f.clone.call(this);return y.words=this.words.slice(0),y},random:function(y){for(var a=[],m=0;m<y;m+=4)a.push(d());return new c.init(a,y)}}),l=n.enc={},g=l.Hex={stringify:function(y){for(var a=y.words,m=y.sigBytes,_=[],w=0;w<m;w++){var B=a[w>>>2]>>>24-w%4*8&255;_.push((B>>>4).toString(16)),_.push((B&15).toString(16))}return _.join("")},parse:function(y){for(var a=y.length,m=[],_=0;_<a;_+=2)m[_>>>3]|=parseInt(y.substr(_,2),16)<<24-_%8*4;return new c.init(m,a/2)}},u=l.Latin1={stringify:function(y){for(var a=y.words,m=y.sigBytes,_=[],w=0;w<m;w++){var B=a[w>>>2]>>>24-w%4*8&255;_.push(String.fromCharCode(B))}return _.join("")},parse:function(y){for(var a=y.length,m=[],_=0;_<a;_++)m[_>>>2]|=(y.charCodeAt(_)&255)<<24-_%4*8;return new c.init(m,a)}},s=l.Utf8={stringify:function(y){try{return decodeURIComponent(escape(u.stringify(y)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(y){return u.parse(unescape(encodeURIComponent(y)))}},x=i.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(y){typeof y=="string"&&(y=s.parse(y)),this._data.concat(y),this._nDataBytes+=y.sigBytes},_process:function(y){var a,m=this._data,_=m.words,w=m.sigBytes,B=this.blockSize,k=B*4,R=w/k;y?R=e.ceil(R):R=e.max((R|0)-this._minBufferSize,0);var M=R*B,O=e.min(M*4,w);if(M){for(var C=0;C<M;C+=B)this._doProcessBlock(_,C);a=_.splice(0,M),m.sigBytes-=O}return new c.init(a,O)},clone:function(){var y=f.clone.call(this);return y._data=this._data.clone(),y},_minBufferSize:0}),E=i.Hasher=x.extend({cfg:f.extend(),init:function(y){this.cfg=this.cfg.extend(y),this.reset()},reset:function(){x.reset.call(this),this._doReset()},update:function(y){return this._append(y),this._process(),this},finalize:function(y){y&&this._append(y);var a=this._doFinalize();return a},blockSize:512/32,_createHelper:function(y){return function(a,m){return new y.init(m).finalize(a)}},_createHmacHelper:function(y){return function(a,m){return new v.HMAC.init(y,m).finalize(a)}}}),v=n.algo={};return n})(Math);return o})});var Sr=Ue((xn,El)=>{Ee();Ae();(function(o,e){typeof xn=="object"?El.exports=xn=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(o.CryptoJS)})(xn,function(o){return(function(e){var r=o,h=r.lib,d=h.Base,t=h.WordArray,n=r.x64={},i=n.Word=d.extend({init:function(c,l){this.high=c,this.low=l}}),f=n.WordArray=d.extend({init:function(c,l){c=this.words=c||[],l!=e?this.sigBytes=l:this.sigBytes=c.length*8},toX32:function(){for(var c=this.words,l=c.length,g=[],u=0;u<l;u++){var s=c[u];g.push(s.high),g.push(s.low)}return t.create(g,this.sigBytes)},clone:function(){for(var c=d.clone.call(this),l=c.words=this.words.slice(0),g=l.length,u=0;u<g;u++)l[u]=l[u].clone();return c}})})(),o})});var Sl=Ue((yn,Al)=>{Ee();Ae();(function(o,e){typeof yn=="object"?Al.exports=yn=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(o.CryptoJS)})(yn,function(o){return(function(){if(typeof ArrayBuffer=="function"){var e=o,r=e.lib,h=r.WordArray,d=h.init,t=h.init=function(n){if(n instanceof ArrayBuffer&&(n=new Uint8Array(n)),(n instanceof Int8Array||typeof Uint8ClampedArray<"u"&&n instanceof Uint8ClampedArray||n instanceof Int16Array||n instanceof Uint16Array||n instanceof Int32Array||n instanceof Uint32Array||n instanceof Float32Array||n instanceof Float64Array)&&(n=new Uint8Array(n.buffer,n.byteOffset,n.byteLength)),n instanceof Uint8Array){for(var i=n.byteLength,f=[],c=0;c<i;c++)f[c>>>2]|=n[c]<<24-c%4*8;d.call(this,f,i)}else d.apply(this,arguments)};t.prototype=h}})(),o.lib.WordArray})});var Bl=Ue((bn,Cl)=>{Ee();Ae();(function(o,e){typeof bn=="object"?Cl.exports=bn=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(o.CryptoJS)})(bn,function(o){return(function(){var e=o,r=e.lib,h=r.WordArray,d=e.enc,t=d.Utf16=d.Utf16BE={stringify:function(i){for(var f=i.words,c=i.sigBytes,l=[],g=0;g<c;g+=2){var u=f[g>>>2]>>>16-g%4*8&65535;l.push(String.fromCharCode(u))}return l.join("")},parse:function(i){for(var f=i.length,c=[],l=0;l<f;l++)c[l>>>1]|=i.charCodeAt(l)<<16-l%2*16;return h.create(c,f*2)}};d.Utf16LE={stringify:function(i){for(var f=i.words,c=i.sigBytes,l=[],g=0;g<c;g+=2){var u=n(f[g>>>2]>>>16-g%4*8&65535);l.push(String.fromCharCode(u))}return l.join("")},parse:function(i){for(var f=i.length,c=[],l=0;l<f;l++)c[l>>>1]|=n(i.charCodeAt(l)<<16-l%2*16);return h.create(c,f*2)}};function n(i){return i<<8&4278255360|i>>>8&16711935}})(),o.enc.Utf16})});var $t=Ue((mn,kl)=>{Ee();Ae();(function(o,e){typeof mn=="object"?kl.exports=mn=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(o.CryptoJS)})(mn,function(o){return(function(){var e=o,r=e.lib,h=r.WordArray,d=e.enc,t=d.Base64={stringify:function(i){var f=i.words,c=i.sigBytes,l=this._map;i.clamp();for(var g=[],u=0;u<c;u+=3)for(var s=f[u>>>2]>>>24-u%4*8&255,x=f[u+1>>>2]>>>24-(u+1)%4*8&255,E=f[u+2>>>2]>>>24-(u+2)%4*8&255,v=s<<16|x<<8|E,y=0;y<4&&u+y*.75<c;y++)g.push(l.charAt(v>>>6*(3-y)&63));var a=l.charAt(64);if(a)for(;g.length%4;)g.push(a);return g.join("")},parse:function(i){var f=i.length,c=this._map,l=this._reverseMap;if(!l){l=this._reverseMap=[];for(var g=0;g<c.length;g++)l[c.charCodeAt(g)]=g}var u=c.charAt(64);if(u){var s=i.indexOf(u);s!==-1&&(f=s)}return n(i,f,l)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function n(i,f,c){for(var l=[],g=0,u=0;u<f;u++)if(u%4){var s=c[i.charCodeAt(u-1)]<<u%4*2,x=c[i.charCodeAt(u)]>>>6-u%4*2,E=s|x;l[g>>>2]|=E<<24-g%4*8,g++}return h.create(l,g)}})(),o.enc.Base64})});var Dl=Ue((vn,Il)=>{Ee();Ae();(function(o,e){typeof vn=="object"?Il.exports=vn=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(o.CryptoJS)})(vn,function(o){return(function(){var e=o,r=e.lib,h=r.WordArray,d=e.enc,t=d.Base64url={stringify:function(i,f){f===void 0&&(f=!0);var c=i.words,l=i.sigBytes,g=f?this._safe_map:this._map;i.clamp();for(var u=[],s=0;s<l;s+=3)for(var x=c[s>>>2]>>>24-s%4*8&255,E=c[s+1>>>2]>>>24-(s+1)%4*8&255,v=c[s+2>>>2]>>>24-(s+2)%4*8&255,y=x<<16|E<<8|v,a=0;a<4&&s+a*.75<l;a++)u.push(g.charAt(y>>>6*(3-a)&63));var m=g.charAt(64);if(m)for(;u.length%4;)u.push(m);return u.join("")},parse:function(i,f){f===void 0&&(f=!0);var c=i.length,l=f?this._safe_map:this._map,g=this._reverseMap;if(!g){g=this._reverseMap=[];for(var u=0;u<l.length;u++)g[l.charCodeAt(u)]=u}var s=l.charAt(64);if(s){var x=i.indexOf(s);x!==-1&&(c=x)}return n(i,c,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function n(i,f,c){for(var l=[],g=0,u=0;u<f;u++)if(u%4){var s=c[i.charCodeAt(u-1)]<<u%4*2,x=c[i.charCodeAt(u)]>>>6-u%4*2,E=s|x;l[g>>>2]|=E<<24-g%4*8,g++}return h.create(l,g)}})(),o.enc.Base64url})});var Vt=Ue((_n,Fl)=>{Ee();Ae();(function(o,e){typeof _n=="object"?Fl.exports=_n=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(o.CryptoJS)})(_n,function(o){return(function(e){var r=o,h=r.lib,d=h.WordArray,t=h.Hasher,n=r.algo,i=[];(function(){for(var s=0;s<64;s++)i[s]=e.abs(e.sin(s+1))*4294967296|0})();var f=n.MD5=t.extend({_doReset:function(){this._hash=new d.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(s,x){for(var E=0;E<16;E++){var v=x+E,y=s[v];s[v]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}var a=this._hash.words,m=s[x+0],_=s[x+1],w=s[x+2],B=s[x+3],k=s[x+4],R=s[x+5],M=s[x+6],O=s[x+7],C=s[x+8],A=s[x+9],I=s[x+10],T=s[x+11],N=s[x+12],Y=s[x+13],K=s[x+14],Q=s[x+15],L=a[0],P=a[1],W=a[2],D=a[3];L=c(L,P,W,D,m,7,i[0]),D=c(D,L,P,W,_,12,i[1]),W=c(W,D,L,P,w,17,i[2]),P=c(P,W,D,L,B,22,i[3]),L=c(L,P,W,D,k,7,i[4]),D=c(D,L,P,W,R,12,i[5]),W=c(W,D,L,P,M,17,i[6]),P=c(P,W,D,L,O,22,i[7]),L=c(L,P,W,D,C,7,i[8]),D=c(D,L,P,W,A,12,i[9]),W=c(W,D,L,P,I,17,i[10]),P=c(P,W,D,L,T,22,i[11]),L=c(L,P,W,D,N,7,i[12]),D=c(D,L,P,W,Y,12,i[13]),W=c(W,D,L,P,K,17,i[14]),P=c(P,W,D,L,Q,22,i[15]),L=l(L,P,W,D,_,5,i[16]),D=l(D,L,P,W,M,9,i[17]),W=l(W,D,L,P,T,14,i[18]),P=l(P,W,D,L,m,20,i[19]),L=l(L,P,W,D,R,5,i[20]),D=l(D,L,P,W,I,9,i[21]),W=l(W,D,L,P,Q,14,i[22]),P=l(P,W,D,L,k,20,i[23]),L=l(L,P,W,D,A,5,i[24]),D=l(D,L,P,W,K,9,i[25]),W=l(W,D,L,P,B,14,i[26]),P=l(P,W,D,L,C,20,i[27]),L=l(L,P,W,D,Y,5,i[28]),D=l(D,L,P,W,w,9,i[29]),W=l(W,D,L,P,O,14,i[30]),P=l(P,W,D,L,N,20,i[31]),L=g(L,P,W,D,R,4,i[32]),D=g(D,L,P,W,C,11,i[33]),W=g(W,D,L,P,T,16,i[34]),P=g(P,W,D,L,K,23,i[35]),L=g(L,P,W,D,_,4,i[36]),D=g(D,L,P,W,k,11,i[37]),W=g(W,D,L,P,O,16,i[38]),P=g(P,W,D,L,I,23,i[39]),L=g(L,P,W,D,Y,4,i[40]),D=g(D,L,P,W,m,11,i[41]),W=g(W,D,L,P,B,16,i[42]),P=g(P,W,D,L,M,23,i[43]),L=g(L,P,W,D,A,4,i[44]),D=g(D,L,P,W,N,11,i[45]),W=g(W,D,L,P,Q,16,i[46]),P=g(P,W,D,L,w,23,i[47]),L=u(L,P,W,D,m,6,i[48]),D=u(D,L,P,W,O,10,i[49]),W=u(W,D,L,P,K,15,i[50]),P=u(P,W,D,L,R,21,i[51]),L=u(L,P,W,D,N,6,i[52]),D=u(D,L,P,W,B,10,i[53]),W=u(W,D,L,P,I,15,i[54]),P=u(P,W,D,L,_,21,i[55]),L=u(L,P,W,D,C,6,i[56]),D=u(D,L,P,W,Q,10,i[57]),W=u(W,D,L,P,M,15,i[58]),P=u(P,W,D,L,Y,21,i[59]),L=u(L,P,W,D,k,6,i[60]),D=u(D,L,P,W,T,10,i[61]),W=u(W,D,L,P,w,15,i[62]),P=u(P,W,D,L,A,21,i[63]),a[0]=a[0]+L|0,a[1]=a[1]+P|0,a[2]=a[2]+W|0,a[3]=a[3]+D|0},_doFinalize:function(){var s=this._data,x=s.words,E=this._nDataBytes*8,v=s.sigBytes*8;x[v>>>5]|=128<<24-v%32;var y=e.floor(E/4294967296),a=E;x[(v+64>>>9<<4)+15]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,x[(v+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,s.sigBytes=(x.length+1)*4,this._process();for(var m=this._hash,_=m.words,w=0;w<4;w++){var B=_[w];_[w]=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360}return m},clone:function(){var s=t.clone.call(this);return s._hash=this._hash.clone(),s}});function c(s,x,E,v,y,a,m){var _=s+(x&E|~x&v)+y+m;return(_<<a|_>>>32-a)+x}function l(s,x,E,v,y,a,m){var _=s+(x&v|E&~v)+y+m;return(_<<a|_>>>32-a)+x}function g(s,x,E,v,y,a,m){var _=s+(x^E^v)+y+m;return(_<<a|_>>>32-a)+x}function u(s,x,E,v,y,a,m){var _=s+(E^(x|~v))+y+m;return(_<<a|_>>>32-a)+x}r.MD5=t._createHelper(f),r.HmacMD5=t._createHmacHelper(f)})(Math),o.MD5})});var Cs=Ue((wn,Pl)=>{Ee();Ae();(function(o,e){typeof wn=="object"?Pl.exports=wn=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(o.CryptoJS)})(wn,function(o){return(function(){var e=o,r=e.lib,h=r.WordArray,d=r.Hasher,t=e.algo,n=[],i=t.SHA1=d.extend({_doReset:function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(f,c){for(var l=this._hash.words,g=l[0],u=l[1],s=l[2],x=l[3],E=l[4],v=0;v<80;v++){if(v<16)n[v]=f[c+v]|0;else{var y=n[v-3]^n[v-8]^n[v-14]^n[v-16];n[v]=y<<1|y>>>31}var a=(g<<5|g>>>27)+E+n[v];v<20?a+=(u&s|~u&x)+1518500249:v<40?a+=(u^s^x)+1859775393:v<60?a+=(u&s|u&x|s&x)-1894007588:a+=(u^s^x)-899497514,E=x,x=s,s=u<<30|u>>>2,u=g,g=a}l[0]=l[0]+g|0,l[1]=l[1]+u|0,l[2]=l[2]+s|0,l[3]=l[3]+x|0,l[4]=l[4]+E|0},_doFinalize:function(){var f=this._data,c=f.words,l=this._nDataBytes*8,g=f.sigBytes*8;return c[g>>>5]|=128<<24-g%32,c[(g+64>>>9<<4)+14]=Math.floor(l/4294967296),c[(g+64>>>9<<4)+15]=l,f.sigBytes=c.length*4,this._process(),this._hash},clone:function(){var f=d.clone.call(this);return f._hash=this._hash.clone(),f}});e.SHA1=d._createHelper(i),e.HmacSHA1=d._createHmacHelper(i)})(),o.SHA1})});var An=Ue((En,Tl)=>{Ee();Ae();(function(o,e){typeof En=="object"?Tl.exports=En=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(o.CryptoJS)})(En,function(o){return(function(e){var r=o,h=r.lib,d=h.WordArray,t=h.Hasher,n=r.algo,i=[],f=[];(function(){function g(E){for(var v=e.sqrt(E),y=2;y<=v;y++)if(!(E%y))return!1;return!0}function u(E){return(E-(E|0))*4294967296|0}for(var s=2,x=0;x<64;)g(s)&&(x<8&&(i[x]=u(e.pow(s,1/2))),f[x]=u(e.pow(s,1/3)),x++),s++})();var c=[],l=n.SHA256=t.extend({_doReset:function(){this._hash=new d.init(i.slice(0))},_doProcessBlock:function(g,u){for(var s=this._hash.words,x=s[0],E=s[1],v=s[2],y=s[3],a=s[4],m=s[5],_=s[6],w=s[7],B=0;B<64;B++){if(B<16)c[B]=g[u+B]|0;else{var k=c[B-15],R=(k<<25|k>>>7)^(k<<14|k>>>18)^k>>>3,M=c[B-2],O=(M<<15|M>>>17)^(M<<13|M>>>19)^M>>>10;c[B]=R+c[B-7]+O+c[B-16]}var C=a&m^~a&_,A=x&E^x&v^E&v,I=(x<<30|x>>>2)^(x<<19|x>>>13)^(x<<10|x>>>22),T=(a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25),N=w+T+C+f[B]+c[B],Y=I+A;w=_,_=m,m=a,a=y+N|0,y=v,v=E,E=x,x=N+Y|0}s[0]=s[0]+x|0,s[1]=s[1]+E|0,s[2]=s[2]+v|0,s[3]=s[3]+y|0,s[4]=s[4]+a|0,s[5]=s[5]+m|0,s[6]=s[6]+_|0,s[7]=s[7]+w|0},_doFinalize:function(){var g=this._data,u=g.words,s=this._nDataBytes*8,x=g.sigBytes*8;return u[x>>>5]|=128<<24-x%32,u[(x+64>>>9<<4)+14]=e.floor(s/4294967296),u[(x+64>>>9<<4)+15]=s,g.sigBytes=u.length*4,this._process(),this._hash},clone:function(){var g=t.clone.call(this);return g._hash=this._hash.clone(),g}});r.SHA256=t._createHelper(l),r.HmacSHA256=t._createHmacHelper(l)})(Math),o.SHA256})});var Rl=Ue((Sn,Ol)=>{Ee();Ae();(function(o,e,r){typeof Sn=="object"?Ol.exports=Sn=e(We(),An()):typeof define=="function"&&define.amd?define(["./core","./sha256"],e):e(o.CryptoJS)})(Sn,function(o){return(function(){var e=o,r=e.lib,h=r.WordArray,d=e.algo,t=d.SHA256,n=d.SHA224=t.extend({_doReset:function(){this._hash=new h.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var i=t._doFinalize.call(this);return i.sigBytes-=4,i}});e.SHA224=t._createHelper(n),e.HmacSHA224=t._createHmacHelper(n)})(),o.SHA224})});var Bs=Ue((Cn,jl)=>{Ee();Ae();(function(o,e,r){typeof Cn=="object"?jl.exports=Cn=e(We(),Sr()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],e):e(o.CryptoJS)})(Cn,function(o){return(function(){var e=o,r=e.lib,h=r.Hasher,d=e.x64,t=d.Word,n=d.WordArray,i=e.algo;function f(){return t.create.apply(t,arguments)}var c=[f(1116352408,3609767458),f(1899447441,602891725),f(3049323471,3964484399),f(3921009573,2173295548),f(961987163,4081628472),f(1508970993,3053834265),f(2453635748,2937671579),f(2870763221,3664609560),f(3624381080,2734883394),f(310598401,1164996542),f(607225278,1323610764),f(1426881987,3590304994),f(1925078388,4068182383),f(2162078206,991336113),f(2614888103,633803317),f(3248222580,3479774868),f(3835390401,2666613458),f(4022224774,944711139),f(264347078,2341262773),f(604807628,2007800933),f(770255983,1495990901),f(1249150122,1856431235),f(1555081692,3175218132),f(1996064986,2198950837),f(2554220882,3999719339),f(2821834349,766784016),f(2952996808,2566594879),f(3210313671,3203337956),f(3336571891,1034457026),f(3584528711,2466948901),f(113926993,3758326383),f(338241895,168717936),f(666307205,1188179964),f(773529912,1546045734),f(1294757372,1522805485),f(1396182291,2643833823),f(1695183700,2343527390),f(1986661051,1014477480),f(2177026350,1206759142),f(2456956037,344077627),f(2730485921,1290863460),f(2820302411,3158454273),f(3259730800,3505952657),f(3345764771,106217008),f(3516065817,3606008344),f(3600352804,1432725776),f(4094571909,1467031594),f(275423344,851169720),f(430227734,3100823752),f(506948616,1363258195),f(659060556,3750685593),f(883997877,3785050280),f(958139571,3318307427),f(1322822218,3812723403),f(1537002063,2003034995),f(1747873779,3602036899),f(1955562222,1575990012),f(2024104815,1125592928),f(2227730452,2716904306),f(2361852424,442776044),f(2428436474,593698344),f(2756734187,3733110249),f(3204031479,2999351573),f(3329325298,3815920427),f(3391569614,3928383900),f(3515267271,566280711),f(3940187606,3454069534),f(4118630271,4000239992),f(116418474,1914138554),f(174292421,2731055270),f(289380356,3203993006),f(460393269,320620315),f(685471733,587496836),f(852142971,1086792851),f(1017036298,365543100),f(1126000580,2618297676),f(1288033470,3409855158),f(1501505948,4234509866),f(1607167915,987167468),f(1816402316,1246189591)],l=[];(function(){for(var u=0;u<80;u++)l[u]=f()})();var g=i.SHA512=h.extend({_doReset:function(){this._hash=new n.init([new t.init(1779033703,4089235720),new t.init(3144134277,2227873595),new t.init(1013904242,4271175723),new t.init(2773480762,1595750129),new t.init(1359893119,2917565137),new t.init(2600822924,725511199),new t.init(528734635,4215389547),new t.init(1541459225,327033209)])},_doProcessBlock:function(u,s){for(var x=this._hash.words,E=x[0],v=x[1],y=x[2],a=x[3],m=x[4],_=x[5],w=x[6],B=x[7],k=E.high,R=E.low,M=v.high,O=v.low,C=y.high,A=y.low,I=a.high,T=a.low,N=m.high,Y=m.low,K=_.high,Q=_.low,L=w.high,P=w.low,W=B.high,D=B.low,ee=k,le=R,$=M,ce=O,ie=C,H=A,ae=I,Z=T,ne=N,re=Y,pe=K,fe=Q,z=L,J=P,ue=W,de=D,he=0;he<80;he++){var ge,te,xe=l[he];if(he<16)te=xe.high=u[s+he*2]|0,ge=xe.low=u[s+he*2+1]|0;else{var Ce=l[he-15],ye=Ce.high,Ie=Ce.low,p=(ye>>>1|Ie<<31)^(ye>>>8|Ie<<24)^ye>>>7,b=(Ie>>>1|ye<<31)^(Ie>>>8|ye<<24)^(Ie>>>7|ye<<25),S=l[he-2],F=S.high,U=S.low,X=(F>>>19|U<<13)^(F<<3|U>>>29)^F>>>6,se=(U>>>19|F<<13)^(U<<3|F>>>29)^(U>>>6|F<<26),G=l[he-7],oe=G.high,Be=G.low,De=l[he-16],Fe=De.high,Oe=De.low;ge=b+Be,te=p+oe+(ge>>>0<b>>>0?1:0),ge=ge+se,te=te+X+(ge>>>0<se>>>0?1:0),ge=ge+Oe,te=te+Fe+(ge>>>0<Oe>>>0?1:0),xe.high=te,xe.low=ge}var Ge=ne&pe^~ne&z,Xe=re&fe^~re&J,je=ee&$^ee&ie^$&ie,qe=le&ce^le&H^ce&H,Le=(ee>>>28|le<<4)^(ee<<30|le>>>2)^(ee<<25|le>>>7),Qe=(le>>>28|ee<<4)^(le<<30|ee>>>2)^(le<<25|ee>>>7),Ke=(ne>>>14|re<<18)^(ne>>>18|re<<14)^(ne<<23|re>>>9),Je=(re>>>14|ne<<18)^(re>>>18|ne<<14)^(re<<23|ne>>>9),tt=c[he],gt=tt.high,j=tt.low,q=de+Je,_e=ue+Ke+(q>>>0<de>>>0?1:0),q=q+Xe,_e=_e+Ge+(q>>>0<Xe>>>0?1:0),q=q+j,_e=_e+gt+(q>>>0<j>>>0?1:0),q=q+ge,_e=_e+te+(q>>>0<ge>>>0?1:0),ke=Qe+qe,Pe=Le+je+(ke>>>0<Qe>>>0?1:0);ue=z,de=J,z=pe,J=fe,pe=ne,fe=re,re=Z+q|0,ne=ae+_e+(re>>>0<Z>>>0?1:0)|0,ae=ie,Z=H,ie=$,H=ce,$=ee,ce=le,le=q+ke|0,ee=_e+Pe+(le>>>0<q>>>0?1:0)|0}R=E.low=R+le,E.high=k+ee+(R>>>0<le>>>0?1:0),O=v.low=O+ce,v.high=M+$+(O>>>0<ce>>>0?1:0),A=y.low=A+H,y.high=C+ie+(A>>>0<H>>>0?1:0),T=a.low=T+Z,a.high=I+ae+(T>>>0<Z>>>0?1:0),Y=m.low=Y+re,m.high=N+ne+(Y>>>0<re>>>0?1:0),Q=_.low=Q+fe,_.high=K+pe+(Q>>>0<fe>>>0?1:0),P=w.low=P+J,w.high=L+z+(P>>>0<J>>>0?1:0),D=B.low=D+de,B.high=W+ue+(D>>>0<de>>>0?1:0)},_doFinalize:function(){var u=this._data,s=u.words,x=this._nDataBytes*8,E=u.sigBytes*8;s[E>>>5]|=128<<24-E%32,s[(E+128>>>10<<5)+30]=Math.floor(x/4294967296),s[(E+128>>>10<<5)+31]=x,u.sigBytes=s.length*4,this._process();var v=this._hash.toX32();return v},clone:function(){var u=h.clone.call(this);return u._hash=this._hash.clone(),u},blockSize:1024/32});e.SHA512=h._createHelper(g),e.HmacSHA512=h._createHmacHelper(g)})(),o.SHA512})});var Ml=Ue((Bn,Nl)=>{Ee();Ae();(function(o,e,r){typeof Bn=="object"?Nl.exports=Bn=e(We(),Sr(),Bs()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./sha512"],e):e(o.CryptoJS)})(Bn,function(o){return(function(){var e=o,r=e.x64,h=r.Word,d=r.WordArray,t=e.algo,n=t.SHA512,i=t.SHA384=n.extend({_doReset:function(){this._hash=new d.init([new h.init(3418070365,3238371032),new h.init(1654270250,914150663),new h.init(2438529370,812702999),new h.init(355462360,4144912697),new h.init(1731405415,4290775857),new h.init(2394180231,1750603025),new h.init(3675008525,1694076839),new h.init(1203062813,3204075428)])},_doFinalize:function(){var f=n._doFinalize.call(this);return f.sigBytes-=16,f}});e.SHA384=n._createHelper(i),e.HmacSHA384=n._createHmacHelper(i)})(),o.SHA384})});var Ul=Ue((kn,Ll)=>{Ee();Ae();(function(o,e,r){typeof kn=="object"?Ll.exports=kn=e(We(),Sr()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],e):e(o.CryptoJS)})(kn,function(o){return(function(e){var r=o,h=r.lib,d=h.WordArray,t=h.Hasher,n=r.x64,i=n.Word,f=r.algo,c=[],l=[],g=[];(function(){for(var x=1,E=0,v=0;v<24;v++){c[x+5*E]=(v+1)*(v+2)/2%64;var y=E%5,a=(2*x+3*E)%5;x=y,E=a}for(var x=0;x<5;x++)for(var E=0;E<5;E++)l[x+5*E]=E+(2*x+3*E)%5*5;for(var m=1,_=0;_<24;_++){for(var w=0,B=0,k=0;k<7;k++){if(m&1){var R=(1<<k)-1;R<32?B^=1<<R:w^=1<<R-32}m&128?m=m<<1^113:m<<=1}g[_]=i.create(w,B)}})();var u=[];(function(){for(var x=0;x<25;x++)u[x]=i.create()})();var s=f.SHA3=t.extend({cfg:t.cfg.extend({outputLength:512}),_doReset:function(){for(var x=this._state=[],E=0;E<25;E++)x[E]=new i.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(x,E){for(var v=this._state,y=this.blockSize/2,a=0;a<y;a++){var m=x[E+2*a],_=x[E+2*a+1];m=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360,_=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360;var w=v[a];w.high^=_,w.low^=m}for(var B=0;B<24;B++){for(var k=0;k<5;k++){for(var R=0,M=0,O=0;O<5;O++){var w=v[k+5*O];R^=w.high,M^=w.low}var C=u[k];C.high=R,C.low=M}for(var k=0;k<5;k++)for(var A=u[(k+4)%5],I=u[(k+1)%5],T=I.high,N=I.low,R=A.high^(T<<1|N>>>31),M=A.low^(N<<1|T>>>31),O=0;O<5;O++){var w=v[k+5*O];w.high^=R,w.low^=M}for(var Y=1;Y<25;Y++){var R,M,w=v[Y],K=w.high,Q=w.low,L=c[Y];L<32?(R=K<<L|Q>>>32-L,M=Q<<L|K>>>32-L):(R=Q<<L-32|K>>>64-L,M=K<<L-32|Q>>>64-L);var P=u[l[Y]];P.high=R,P.low=M}var W=u[0],D=v[0];W.high=D.high,W.low=D.low;for(var k=0;k<5;k++)for(var O=0;O<5;O++){var Y=k+5*O,w=v[Y],ee=u[Y],le=u[(k+1)%5+5*O],$=u[(k+2)%5+5*O];w.high=ee.high^~le.high&$.high,w.low=ee.low^~le.low&$.low}var w=v[0],ce=g[B];w.high^=ce.high,w.low^=ce.low}},_doFinalize:function(){var x=this._data,E=x.words,v=this._nDataBytes*8,y=x.sigBytes*8,a=this.blockSize*32;E[y>>>5]|=1<<24-y%32,E[(e.ceil((y+1)/a)*a>>>5)-1]|=128,x.sigBytes=E.length*4,this._process();for(var m=this._state,_=this.cfg.outputLength/8,w=_/8,B=[],k=0;k<w;k++){var R=m[k],M=R.high,O=R.low;M=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360,O=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,B.push(O),B.push(M)}return new d.init(B,_)},clone:function(){for(var x=t.clone.call(this),E=x._state=this._state.slice(0),v=0;v<25;v++)E[v]=E[v].clone();return x}});r.SHA3=t._createHelper(s),r.HmacSHA3=t._createHmacHelper(s)})(Math),o.SHA3})});var Wl=Ue((In,ql)=>{Ee();Ae();(function(o,e){typeof In=="object"?ql.exports=In=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(o.CryptoJS)})(In,function(o){return(function(e){var r=o,h=r.lib,d=h.WordArray,t=h.Hasher,n=r.algo,i=d.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),f=d.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=d.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=d.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),g=d.create([0,1518500249,1859775393,2400959708,2840853838]),u=d.create([1352829926,1548603684,1836072691,2053994217,0]),s=n.RIPEMD160=t.extend({_doReset:function(){this._hash=d.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(_,w){for(var B=0;B<16;B++){var k=w+B,R=_[k];_[k]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360}var M=this._hash.words,O=g.words,C=u.words,A=i.words,I=f.words,T=c.words,N=l.words,Y,K,Q,L,P,W,D,ee,le,$;W=Y=M[0],D=K=M[1],ee=Q=M[2],le=L=M[3],$=P=M[4];for(var ce,B=0;B<80;B+=1)ce=Y+_[w+A[B]]|0,B<16?ce+=x(K,Q,L)+O[0]:B<32?ce+=E(K,Q,L)+O[1]:B<48?ce+=v(K,Q,L)+O[2]:B<64?ce+=y(K,Q,L)+O[3]:ce+=a(K,Q,L)+O[4],ce=ce|0,ce=m(ce,T[B]),ce=ce+P|0,Y=P,P=L,L=m(Q,10),Q=K,K=ce,ce=W+_[w+I[B]]|0,B<16?ce+=a(D,ee,le)+C[0]:B<32?ce+=y(D,ee,le)+C[1]:B<48?ce+=v(D,ee,le)+C[2]:B<64?ce+=E(D,ee,le)+C[3]:ce+=x(D,ee,le)+C[4],ce=ce|0,ce=m(ce,N[B]),ce=ce+$|0,W=$,$=le,le=m(ee,10),ee=D,D=ce;ce=M[1]+Q+le|0,M[1]=M[2]+L+$|0,M[2]=M[3]+P+W|0,M[3]=M[4]+Y+D|0,M[4]=M[0]+K+ee|0,M[0]=ce},_doFinalize:function(){var _=this._data,w=_.words,B=this._nDataBytes*8,k=_.sigBytes*8;w[k>>>5]|=128<<24-k%32,w[(k+64>>>9<<4)+14]=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,_.sigBytes=(w.length+1)*4,this._process();for(var R=this._hash,M=R.words,O=0;O<5;O++){var C=M[O];M[O]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}return R},clone:function(){var _=t.clone.call(this);return _._hash=this._hash.clone(),_}});function x(_,w,B){return _^w^B}function E(_,w,B){return _&w|~_&B}function v(_,w,B){return(_|~w)^B}function y(_,w,B){return _&B|w&~B}function a(_,w,B){return _^(w|~B)}function m(_,w){return _<<w|_>>>32-w}r.RIPEMD160=t._createHelper(s),r.HmacRIPEMD160=t._createHmacHelper(s)})(Math),o.RIPEMD160})});var Fn=Ue((Dn,Hl)=>{Ee();Ae();(function(o,e){typeof Dn=="object"?Hl.exports=Dn=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(o.CryptoJS)})(Dn,function(o){(function(){var e=o,r=e.lib,h=r.Base,d=e.enc,t=d.Utf8,n=e.algo,i=n.HMAC=h.extend({init:function(f,c){f=this._hasher=new f.init,typeof c=="string"&&(c=t.parse(c));var l=f.blockSize,g=l*4;c.sigBytes>g&&(c=f.finalize(c)),c.clamp();for(var u=this._oKey=c.clone(),s=this._iKey=c.clone(),x=u.words,E=s.words,v=0;v<l;v++)x[v]^=1549556828,E[v]^=909522486;u.sigBytes=s.sigBytes=g,this.reset()},reset:function(){var f=this._hasher;f.reset(),f.update(this._iKey)},update:function(f){return this._hasher.update(f),this},finalize:function(f){var c=this._hasher,l=c.finalize(f);c.reset();var g=c.finalize(this._oKey.clone().concat(l));return g}})})()})});var $l=Ue((Pn,zl)=>{Ee();Ae();(function(o,e,r){typeof Pn=="object"?zl.exports=Pn=e(We(),An(),Fn()):typeof define=="function"&&define.amd?define(["./core","./sha256","./hmac"],e):e(o.CryptoJS)})(Pn,function(o){return(function(){var e=o,r=e.lib,h=r.Base,d=r.WordArray,t=e.algo,n=t.SHA256,i=t.HMAC,f=t.PBKDF2=h.extend({cfg:h.extend({keySize:128/32,hasher:n,iterations:25e4}),init:function(c){this.cfg=this.cfg.extend(c)},compute:function(c,l){for(var g=this.cfg,u=i.create(g.hasher,c),s=d.create(),x=d.create([1]),E=s.words,v=x.words,y=g.keySize,a=g.iterations;E.length<y;){var m=u.update(l).finalize(x);u.reset();for(var _=m.words,w=_.length,B=m,k=1;k<a;k++){B=u.finalize(B),u.reset();for(var R=B.words,M=0;M<w;M++)_[M]^=R[M]}s.concat(m),v[0]++}return s.sigBytes=y*4,s}});e.PBKDF2=function(c,l,g){return f.create(g).compute(c,l)}})(),o.PBKDF2})});var Pt=Ue((Tn,Vl)=>{Ee();Ae();(function(o,e,r){typeof Tn=="object"?Vl.exports=Tn=e(We(),Cs(),Fn()):typeof define=="function"&&define.amd?define(["./core","./sha1","./hmac"],e):e(o.CryptoJS)})(Tn,function(o){return(function(){var e=o,r=e.lib,h=r.Base,d=r.WordArray,t=e.algo,n=t.MD5,i=t.EvpKDF=h.extend({cfg:h.extend({keySize:128/32,hasher:n,iterations:1}),init:function(f){this.cfg=this.cfg.extend(f)},compute:function(f,c){for(var l,g=this.cfg,u=g.hasher.create(),s=d.create(),x=s.words,E=g.keySize,v=g.iterations;x.length<E;){l&&u.update(l),l=u.update(f).finalize(c),u.reset();for(var y=1;y<v;y++)l=u.finalize(l),u.reset();s.concat(l)}return s.sigBytes=E*4,s}});e.EvpKDF=function(f,c,l){return i.create(l).compute(f,c)}})(),o.EvpKDF})});var ot=Ue((On,Kl)=>{Ee();Ae();(function(o,e,r){typeof On=="object"?Kl.exports=On=e(We(),Pt()):typeof define=="function"&&define.amd?define(["./core","./evpkdf"],e):e(o.CryptoJS)})(On,function(o){o.lib.Cipher||(function(e){var r=o,h=r.lib,d=h.Base,t=h.WordArray,n=h.BufferedBlockAlgorithm,i=r.enc,f=i.Utf8,c=i.Base64,l=r.algo,g=l.EvpKDF,u=h.Cipher=n.extend({cfg:d.extend(),createEncryptor:function(C,A){return this.create(this._ENC_XFORM_MODE,C,A)},createDecryptor:function(C,A){return this.create(this._DEC_XFORM_MODE,C,A)},init:function(C,A,I){this.cfg=this.cfg.extend(I),this._xformMode=C,this._key=A,this.reset()},reset:function(){n.reset.call(this),this._doReset()},process:function(C){return this._append(C),this._process()},finalize:function(C){C&&this._append(C);var A=this._doFinalize();return A},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:(function(){function C(A){return typeof A=="string"?O:k}return function(A){return{encrypt:function(I,T,N){return C(T).encrypt(A,I,T,N)},decrypt:function(I,T,N){return C(T).decrypt(A,I,T,N)}}}})()}),s=h.StreamCipher=u.extend({_doFinalize:function(){var C=this._process(!0);return C},blockSize:1}),x=r.mode={},E=h.BlockCipherMode=d.extend({createEncryptor:function(C,A){return this.Encryptor.create(C,A)},createDecryptor:function(C,A){return this.Decryptor.create(C,A)},init:function(C,A){this._cipher=C,this._iv=A}}),v=x.CBC=(function(){var C=E.extend();C.Encryptor=C.extend({processBlock:function(I,T){var N=this._cipher,Y=N.blockSize;A.call(this,I,T,Y),N.encryptBlock(I,T),this._prevBlock=I.slice(T,T+Y)}}),C.Decryptor=C.extend({processBlock:function(I,T){var N=this._cipher,Y=N.blockSize,K=I.slice(T,T+Y);N.decryptBlock(I,T),A.call(this,I,T,Y),this._prevBlock=K}});function A(I,T,N){var Y,K=this._iv;K?(Y=K,this._iv=e):Y=this._prevBlock;for(var Q=0;Q<N;Q++)I[T+Q]^=Y[Q]}return C})(),y=r.pad={},a=y.Pkcs7={pad:function(C,A){for(var I=A*4,T=I-C.sigBytes%I,N=T<<24|T<<16|T<<8|T,Y=[],K=0;K<T;K+=4)Y.push(N);var Q=t.create(Y,T);C.concat(Q)},unpad:function(C){var A=C.words[C.sigBytes-1>>>2]&255;C.sigBytes-=A}},m=h.BlockCipher=u.extend({cfg:u.cfg.extend({mode:v,padding:a}),reset:function(){var C;u.reset.call(this);var A=this.cfg,I=A.iv,T=A.mode;this._xformMode==this._ENC_XFORM_MODE?C=T.createEncryptor:(C=T.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==C?this._mode.init(this,I&&I.words):(this._mode=C.call(T,this,I&&I.words),this._mode.__creator=C)},_doProcessBlock:function(C,A){this._mode.processBlock(C,A)},_doFinalize:function(){var C,A=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(A.pad(this._data,this.blockSize),C=this._process(!0)):(C=this._process(!0),A.unpad(C)),C},blockSize:128/32}),_=h.CipherParams=d.extend({init:function(C){this.mixIn(C)},toString:function(C){return(C||this.formatter).stringify(this)}}),w=r.format={},B=w.OpenSSL={stringify:function(C){var A,I=C.ciphertext,T=C.salt;return T?A=t.create([1398893684,1701076831]).concat(T).concat(I):A=I,A.toString(c)},parse:function(C){var A,I=c.parse(C),T=I.words;return T[0]==1398893684&&T[1]==1701076831&&(A=t.create(T.slice(2,4)),T.splice(0,4),I.sigBytes-=16),_.create({ciphertext:I,salt:A})}},k=h.SerializableCipher=d.extend({cfg:d.extend({format:B}),encrypt:function(C,A,I,T){T=this.cfg.extend(T);var N=C.createEncryptor(I,T),Y=N.finalize(A),K=N.cfg;return _.create({ciphertext:Y,key:I,iv:K.iv,algorithm:C,mode:K.mode,padding:K.padding,blockSize:C.blockSize,formatter:T.format})},decrypt:function(C,A,I,T){T=this.cfg.extend(T),A=this._parse(A,T.format);var N=C.createDecryptor(I,T).finalize(A.ciphertext);return N},_parse:function(C,A){return typeof C=="string"?A.parse(C,this):C}}),R=r.kdf={},M=R.OpenSSL={execute:function(C,A,I,T,N){if(T||(T=t.random(64/8)),N)var Y=g.create({keySize:A+I,hasher:N}).compute(C,T);else var Y=g.create({keySize:A+I}).compute(C,T);var K=t.create(Y.words.slice(A),I*4);return Y.sigBytes=A*4,_.create({key:Y,iv:K,salt:T})}},O=h.PasswordBasedCipher=k.extend({cfg:k.cfg.extend({kdf:M}),encrypt:function(C,A,I,T){T=this.cfg.extend(T);var N=T.kdf.execute(I,C.keySize,C.ivSize,T.salt,T.hasher);T.iv=N.iv;var Y=k.encrypt.call(this,C,A,N.key,T);return Y.mixIn(N),Y},decrypt:function(C,A,I,T){T=this.cfg.extend(T),A=this._parse(A,T.format);var N=T.kdf.execute(I,C.keySize,C.ivSize,A.salt,T.hasher);T.iv=N.iv;var Y=k.decrypt.call(this,C,A,N.key,T);return Y}})})()})});var Gl=Ue((Rn,Ql)=>{Ee();Ae();(function(o,e,r){typeof Rn=="object"?Ql.exports=Rn=e(We(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(o.CryptoJS)})(Rn,function(o){return o.mode.CFB=(function(){var e=o.lib.BlockCipherMode.extend();e.Encryptor=e.extend({processBlock:function(h,d){var t=this._cipher,n=t.blockSize;r.call(this,h,d,n,t),this._prevBlock=h.slice(d,d+n)}}),e.Decryptor=e.extend({processBlock:function(h,d){var t=this._cipher,n=t.blockSize,i=h.slice(d,d+n);r.call(this,h,d,n,t),this._prevBlock=i}});function r(h,d,t,n){var i,f=this._iv;f?(i=f.slice(0),this._iv=void 0):i=this._prevBlock,n.encryptBlock(i,0);for(var c=0;c<t;c++)h[d+c]^=i[c]}return e})(),o.mode.CFB})});var Xl=Ue((jn,Yl)=>{Ee();Ae();(function(o,e,r){typeof jn=="object"?Yl.exports=jn=e(We(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(o.CryptoJS)})(jn,function(o){return o.mode.CTR=(function(){var e=o.lib.BlockCipherMode.extend(),r=e.Encryptor=e.extend({processBlock:function(h,d){var t=this._cipher,n=t.blockSize,i=this._iv,f=this._counter;i&&(f=this._counter=i.slice(0),this._iv=void 0);var c=f.slice(0);t.encryptBlock(c,0),f[n-1]=f[n-1]+1|0;for(var l=0;l<n;l++)h[d+l]^=c[l]}});return e.Decryptor=r,e})(),o.mode.CTR})});var Zl=Ue((Nn,Jl)=>{Ee();Ae();(function(o,e,r){typeof Nn=="object"?Jl.exports=Nn=e(We(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(o.CryptoJS)})(Nn,function(o){return o.mode.CTRGladman=(function(){var e=o.lib.BlockCipherMode.extend();function r(t){if((t>>24&255)===255){var n=t>>16&255,i=t>>8&255,f=t&255;n===255?(n=0,i===255?(i=0,f===255?f=0:++f):++i):++n,t=0,t+=n<<16,t+=i<<8,t+=f}else t+=1<<24;return t}function h(t){return(t[0]=r(t[0]))===0&&(t[1]=r(t[1])),t}var d=e.Encryptor=e.extend({processBlock:function(t,n){var i=this._cipher,f=i.blockSize,c=this._iv,l=this._counter;c&&(l=this._counter=c.slice(0),this._iv=void 0),h(l);var g=l.slice(0);i.encryptBlock(g,0);for(var u=0;u<f;u++)t[n+u]^=g[u]}});return e.Decryptor=d,e})(),o.mode.CTRGladman})});var tu=Ue((Mn,eu)=>{Ee();Ae();(function(o,e,r){typeof Mn=="object"?eu.exports=Mn=e(We(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(o.CryptoJS)})(Mn,function(o){return o.mode.OFB=(function(){var e=o.lib.BlockCipherMode.extend(),r=e.Encryptor=e.extend({processBlock:function(h,d){var t=this._cipher,n=t.blockSize,i=this._iv,f=this._keystream;i&&(f=this._keystream=i.slice(0),this._iv=void 0),t.encryptBlock(f,0);for(var c=0;c<n;c++)h[d+c]^=f[c]}});return e.Decryptor=r,e})(),o.mode.OFB})});var nu=Ue((Ln,ru)=>{Ee();Ae();(function(o,e,r){typeof Ln=="object"?ru.exports=Ln=e(We(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(o.CryptoJS)})(Ln,function(o){return o.mode.ECB=(function(){var e=o.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(r,h){this._cipher.encryptBlock(r,h)}}),e.Decryptor=e.extend({processBlock:function(r,h){this._cipher.decryptBlock(r,h)}}),e})(),o.mode.ECB})});var iu=Ue((Un,ou)=>{Ee();Ae();(function(o,e,r){typeof Un=="object"?ou.exports=Un=e(We(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(o.CryptoJS)})(Un,function(o){return o.pad.AnsiX923={pad:function(e,r){var h=e.sigBytes,d=r*4,t=d-h%d,n=h+t-1;e.clamp(),e.words[n>>>2]|=t<<24-n%4*8,e.sigBytes+=t},unpad:function(e){var r=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=r}},o.pad.Ansix923})});var au=Ue((qn,su)=>{Ee();Ae();(function(o,e,r){typeof qn=="object"?su.exports=qn=e(We(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(o.CryptoJS)})(qn,function(o){return o.pad.Iso10126={pad:function(e,r){var h=r*4,d=h-e.sigBytes%h;e.concat(o.lib.WordArray.random(d-1)).concat(o.lib.WordArray.create([d<<24],1))},unpad:function(e){var r=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=r}},o.pad.Iso10126})});var uu=Ue((Wn,lu)=>{Ee();Ae();(function(o,e,r){typeof Wn=="object"?lu.exports=Wn=e(We(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(o.CryptoJS)})(Wn,function(o){return o.pad.Iso97971={pad:function(e,r){e.concat(o.lib.WordArray.create([2147483648],1)),o.pad.ZeroPadding.pad(e,r)},unpad:function(e){o.pad.ZeroPadding.unpad(e),e.sigBytes--}},o.pad.Iso97971})});var fu=Ue((Hn,cu)=>{Ee();Ae();(function(o,e,r){typeof Hn=="object"?cu.exports=Hn=e(We(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(o.CryptoJS)})(Hn,function(o){return o.pad.ZeroPadding={pad:function(e,r){var h=r*4;e.clamp(),e.sigBytes+=h-(e.sigBytes%h||h)},unpad:function(e){for(var r=e.words,h=e.sigBytes-1,h=e.sigBytes-1;h>=0;h--)if(r[h>>>2]>>>24-h%4*8&255){e.sigBytes=h+1;break}}},o.pad.ZeroPadding})});var pu=Ue((zn,hu)=>{Ee();Ae();(function(o,e,r){typeof zn=="object"?hu.exports=zn=e(We(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(o.CryptoJS)})(zn,function(o){return o.pad.NoPadding={pad:function(){},unpad:function(){}},o.pad.NoPadding})});var gu=Ue(($n,du)=>{Ee();Ae();(function(o,e,r){typeof $n=="object"?du.exports=$n=e(We(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(o.CryptoJS)})($n,function(o){return(function(e){var r=o,h=r.lib,d=h.CipherParams,t=r.enc,n=t.Hex,i=r.format,f=i.Hex={stringify:function(c){return c.ciphertext.toString(n)},parse:function(c){var l=n.parse(c);return d.create({ciphertext:l})}}})(),o.format.Hex})});var yu=Ue((Vn,xu)=>{Ee();Ae();(function(o,e,r){typeof Vn=="object"?xu.exports=Vn=e(We(),$t(),Vt(),Pt(),ot()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(o.CryptoJS)})(Vn,function(o){return(function(){var e=o,r=e.lib,h=r.BlockCipher,d=e.algo,t=[],n=[],i=[],f=[],c=[],l=[],g=[],u=[],s=[],x=[];(function(){for(var y=[],a=0;a<256;a++)a<128?y[a]=a<<1:y[a]=a<<1^283;for(var m=0,_=0,a=0;a<256;a++){var w=_^_<<1^_<<2^_<<3^_<<4;w=w>>>8^w&255^99,t[m]=w,n[w]=m;var B=y[m],k=y[B],R=y[k],M=y[w]*257^w*16843008;i[m]=M<<24|M>>>8,f[m]=M<<16|M>>>16,c[m]=M<<8|M>>>24,l[m]=M;var M=R*16843009^k*65537^B*257^m*16843008;g[w]=M<<24|M>>>8,u[w]=M<<16|M>>>16,s[w]=M<<8|M>>>24,x[w]=M,m?(m=B^y[y[y[R^B]]],_^=y[y[_]]):m=_=1}})();var E=[0,1,2,4,8,16,32,64,128,27,54],v=d.AES=h.extend({_doReset:function(){var y;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var a=this._keyPriorReset=this._key,m=a.words,_=a.sigBytes/4,w=this._nRounds=_+6,B=(w+1)*4,k=this._keySchedule=[],R=0;R<B;R++)R<_?k[R]=m[R]:(y=k[R-1],R%_?_>6&&R%_==4&&(y=t[y>>>24]<<24|t[y>>>16&255]<<16|t[y>>>8&255]<<8|t[y&255]):(y=y<<8|y>>>24,y=t[y>>>24]<<24|t[y>>>16&255]<<16|t[y>>>8&255]<<8|t[y&255],y^=E[R/_|0]<<24),k[R]=k[R-_]^y);for(var M=this._invKeySchedule=[],O=0;O<B;O++){var R=B-O;if(O%4)var y=k[R];else var y=k[R-4];O<4||R<=4?M[O]=y:M[O]=g[t[y>>>24]]^u[t[y>>>16&255]]^s[t[y>>>8&255]]^x[t[y&255]]}}},encryptBlock:function(y,a){this._doCryptBlock(y,a,this._keySchedule,i,f,c,l,t)},decryptBlock:function(y,a){var m=y[a+1];y[a+1]=y[a+3],y[a+3]=m,this._doCryptBlock(y,a,this._invKeySchedule,g,u,s,x,n);var m=y[a+1];y[a+1]=y[a+3],y[a+3]=m},_doCryptBlock:function(y,a,m,_,w,B,k,R){for(var M=this._nRounds,O=y[a]^m[0],C=y[a+1]^m[1],A=y[a+2]^m[2],I=y[a+3]^m[3],T=4,N=1;N<M;N++){var Y=_[O>>>24]^w[C>>>16&255]^B[A>>>8&255]^k[I&255]^m[T++],K=_[C>>>24]^w[A>>>16&255]^B[I>>>8&255]^k[O&255]^m[T++],Q=_[A>>>24]^w[I>>>16&255]^B[O>>>8&255]^k[C&255]^m[T++],L=_[I>>>24]^w[O>>>16&255]^B[C>>>8&255]^k[A&255]^m[T++];O=Y,C=K,A=Q,I=L}var Y=(R[O>>>24]<<24|R[C>>>16&255]<<16|R[A>>>8&255]<<8|R[I&255])^m[T++],K=(R[C>>>24]<<24|R[A>>>16&255]<<16|R[I>>>8&255]<<8|R[O&255])^m[T++],Q=(R[A>>>24]<<24|R[I>>>16&255]<<16|R[O>>>8&255]<<8|R[C&255])^m[T++],L=(R[I>>>24]<<24|R[O>>>16&255]<<16|R[C>>>8&255]<<8|R[A&255])^m[T++];y[a]=Y,y[a+1]=K,y[a+2]=Q,y[a+3]=L},keySize:256/32});e.AES=h._createHelper(v)})(),o.AES})});var mu=Ue((Kn,bu)=>{Ee();Ae();(function(o,e,r){typeof Kn=="object"?bu.exports=Kn=e(We(),$t(),Vt(),Pt(),ot()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(o.CryptoJS)})(Kn,function(o){return(function(){var e=o,r=e.lib,h=r.WordArray,d=r.BlockCipher,t=e.algo,n=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],i=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],f=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],g=t.DES=d.extend({_doReset:function(){for(var E=this._key,v=E.words,y=[],a=0;a<56;a++){var m=n[a]-1;y[a]=v[m>>>5]>>>31-m%32&1}for(var _=this._subKeys=[],w=0;w<16;w++){for(var B=_[w]=[],k=f[w],a=0;a<24;a++)B[a/6|0]|=y[(i[a]-1+k)%28]<<31-a%6,B[4+(a/6|0)]|=y[28+(i[a+24]-1+k)%28]<<31-a%6;B[0]=B[0]<<1|B[0]>>>31;for(var a=1;a<7;a++)B[a]=B[a]>>>(a-1)*4+3;B[7]=B[7]<<5|B[7]>>>27}for(var R=this._invSubKeys=[],a=0;a<16;a++)R[a]=_[15-a]},encryptBlock:function(E,v){this._doCryptBlock(E,v,this._subKeys)},decryptBlock:function(E,v){this._doCryptBlock(E,v,this._invSubKeys)},_doCryptBlock:function(E,v,y){this._lBlock=E[v],this._rBlock=E[v+1],u.call(this,4,252645135),u.call(this,16,65535),s.call(this,2,858993459),s.call(this,8,16711935),u.call(this,1,1431655765);for(var a=0;a<16;a++){for(var m=y[a],_=this._lBlock,w=this._rBlock,B=0,k=0;k<8;k++)B|=c[k][((w^m[k])&l[k])>>>0];this._lBlock=w,this._rBlock=_^B}var R=this._lBlock;this._lBlock=this._rBlock,this._rBlock=R,u.call(this,1,1431655765),s.call(this,8,16711935),s.call(this,2,858993459),u.call(this,16,65535),u.call(this,4,252645135),E[v]=this._lBlock,E[v+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function u(E,v){var y=(this._lBlock>>>E^this._rBlock)&v;this._rBlock^=y,this._lBlock^=y<<E}function s(E,v){var y=(this._rBlock>>>E^this._lBlock)&v;this._lBlock^=y,this._rBlock^=y<<E}e.DES=d._createHelper(g);var x=t.TripleDES=d.extend({_doReset:function(){var E=this._key,v=E.words;if(v.length!==2&&v.length!==4&&v.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var y=v.slice(0,2),a=v.length<4?v.slice(0,2):v.slice(2,4),m=v.length<6?v.slice(0,2):v.slice(4,6);this._des1=g.createEncryptor(h.create(y)),this._des2=g.createEncryptor(h.create(a)),this._des3=g.createEncryptor(h.create(m))},encryptBlock:function(E,v){this._des1.encryptBlock(E,v),this._des2.decryptBlock(E,v),this._des3.encryptBlock(E,v)},decryptBlock:function(E,v){this._des3.decryptBlock(E,v),this._des2.encryptBlock(E,v),this._des1.decryptBlock(E,v)},keySize:192/32,ivSize:64/32,blockSize:64/32});e.TripleDES=d._createHelper(x)})(),o.TripleDES})});var _u=Ue((Qn,vu)=>{Ee();Ae();(function(o,e,r){typeof Qn=="object"?vu.exports=Qn=e(We(),$t(),Vt(),Pt(),ot()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(o.CryptoJS)})(Qn,function(o){return(function(){var e=o,r=e.lib,h=r.StreamCipher,d=e.algo,t=d.RC4=h.extend({_doReset:function(){for(var f=this._key,c=f.words,l=f.sigBytes,g=this._S=[],u=0;u<256;u++)g[u]=u;for(var u=0,s=0;u<256;u++){var x=u%l,E=c[x>>>2]>>>24-x%4*8&255;s=(s+g[u]+E)%256;var v=g[u];g[u]=g[s],g[s]=v}this._i=this._j=0},_doProcessBlock:function(f,c){f[c]^=n.call(this)},keySize:256/32,ivSize:0});function n(){for(var f=this._S,c=this._i,l=this._j,g=0,u=0;u<4;u++){c=(c+1)%256,l=(l+f[c])%256;var s=f[c];f[c]=f[l],f[l]=s,g|=f[(f[c]+f[l])%256]<<24-u*8}return this._i=c,this._j=l,g}e.RC4=h._createHelper(t);var i=d.RC4Drop=t.extend({cfg:t.cfg.extend({drop:192}),_doReset:function(){t._doReset.call(this);for(var f=this.cfg.drop;f>0;f--)n.call(this)}});e.RC4Drop=h._createHelper(i)})(),o.RC4})});var Eu=Ue((Gn,wu)=>{Ee();Ae();(function(o,e,r){typeof Gn=="object"?wu.exports=Gn=e(We(),$t(),Vt(),Pt(),ot()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(o.CryptoJS)})(Gn,function(o){return(function(){var e=o,r=e.lib,h=r.StreamCipher,d=e.algo,t=[],n=[],i=[],f=d.Rabbit=h.extend({_doReset:function(){for(var l=this._key.words,g=this.cfg.iv,u=0;u<4;u++)l[u]=(l[u]<<8|l[u]>>>24)&16711935|(l[u]<<24|l[u]>>>8)&4278255360;var s=this._X=[l[0],l[3]<<16|l[2]>>>16,l[1],l[0]<<16|l[3]>>>16,l[2],l[1]<<16|l[0]>>>16,l[3],l[2]<<16|l[1]>>>16],x=this._C=[l[2]<<16|l[2]>>>16,l[0]&4294901760|l[1]&65535,l[3]<<16|l[3]>>>16,l[1]&4294901760|l[2]&65535,l[0]<<16|l[0]>>>16,l[2]&4294901760|l[3]&65535,l[1]<<16|l[1]>>>16,l[3]&4294901760|l[0]&65535];this._b=0;for(var u=0;u<4;u++)c.call(this);for(var u=0;u<8;u++)x[u]^=s[u+4&7];if(g){var E=g.words,v=E[0],y=E[1],a=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,m=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,_=a>>>16|m&4294901760,w=m<<16|a&65535;x[0]^=a,x[1]^=_,x[2]^=m,x[3]^=w,x[4]^=a,x[5]^=_,x[6]^=m,x[7]^=w;for(var u=0;u<4;u++)c.call(this)}},_doProcessBlock:function(l,g){var u=this._X;c.call(this),t[0]=u[0]^u[5]>>>16^u[3]<<16,t[1]=u[2]^u[7]>>>16^u[5]<<16,t[2]=u[4]^u[1]>>>16^u[7]<<16,t[3]=u[6]^u[3]>>>16^u[1]<<16;for(var s=0;s<4;s++)t[s]=(t[s]<<8|t[s]>>>24)&16711935|(t[s]<<24|t[s]>>>8)&4278255360,l[g+s]^=t[s]},blockSize:128/32,ivSize:64/32});function c(){for(var l=this._X,g=this._C,u=0;u<8;u++)n[u]=g[u];g[0]=g[0]+1295307597+this._b|0,g[1]=g[1]+3545052371+(g[0]>>>0<n[0]>>>0?1:0)|0,g[2]=g[2]+886263092+(g[1]>>>0<n[1]>>>0?1:0)|0,g[3]=g[3]+1295307597+(g[2]>>>0<n[2]>>>0?1:0)|0,g[4]=g[4]+3545052371+(g[3]>>>0<n[3]>>>0?1:0)|0,g[5]=g[5]+886263092+(g[4]>>>0<n[4]>>>0?1:0)|0,g[6]=g[6]+1295307597+(g[5]>>>0<n[5]>>>0?1:0)|0,g[7]=g[7]+3545052371+(g[6]>>>0<n[6]>>>0?1:0)|0,this._b=g[7]>>>0<n[7]>>>0?1:0;for(var u=0;u<8;u++){var s=l[u]+g[u],x=s&65535,E=s>>>16,v=((x*x>>>17)+x*E>>>15)+E*E,y=((s&4294901760)*s|0)+((s&65535)*s|0);i[u]=v^y}l[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,l[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,l[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,l[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,l[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,l[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,l[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,l[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}e.Rabbit=h._createHelper(f)})(),o.Rabbit})});var Su=Ue((Yn,Au)=>{Ee();Ae();(function(o,e,r){typeof Yn=="object"?Au.exports=Yn=e(We(),$t(),Vt(),Pt(),ot()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(o.CryptoJS)})(Yn,function(o){return(function(){var e=o,r=e.lib,h=r.StreamCipher,d=e.algo,t=[],n=[],i=[],f=d.RabbitLegacy=h.extend({_doReset:function(){var l=this._key.words,g=this.cfg.iv,u=this._X=[l[0],l[3]<<16|l[2]>>>16,l[1],l[0]<<16|l[3]>>>16,l[2],l[1]<<16|l[0]>>>16,l[3],l[2]<<16|l[1]>>>16],s=this._C=[l[2]<<16|l[2]>>>16,l[0]&4294901760|l[1]&65535,l[3]<<16|l[3]>>>16,l[1]&4294901760|l[2]&65535,l[0]<<16|l[0]>>>16,l[2]&4294901760|l[3]&65535,l[1]<<16|l[1]>>>16,l[3]&4294901760|l[0]&65535];this._b=0;for(var x=0;x<4;x++)c.call(this);for(var x=0;x<8;x++)s[x]^=u[x+4&7];if(g){var E=g.words,v=E[0],y=E[1],a=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,m=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,_=a>>>16|m&4294901760,w=m<<16|a&65535;s[0]^=a,s[1]^=_,s[2]^=m,s[3]^=w,s[4]^=a,s[5]^=_,s[6]^=m,s[7]^=w;for(var x=0;x<4;x++)c.call(this)}},_doProcessBlock:function(l,g){var u=this._X;c.call(this),t[0]=u[0]^u[5]>>>16^u[3]<<16,t[1]=u[2]^u[7]>>>16^u[5]<<16,t[2]=u[4]^u[1]>>>16^u[7]<<16,t[3]=u[6]^u[3]>>>16^u[1]<<16;for(var s=0;s<4;s++)t[s]=(t[s]<<8|t[s]>>>24)&16711935|(t[s]<<24|t[s]>>>8)&4278255360,l[g+s]^=t[s]},blockSize:128/32,ivSize:64/32});function c(){for(var l=this._X,g=this._C,u=0;u<8;u++)n[u]=g[u];g[0]=g[0]+1295307597+this._b|0,g[1]=g[1]+3545052371+(g[0]>>>0<n[0]>>>0?1:0)|0,g[2]=g[2]+886263092+(g[1]>>>0<n[1]>>>0?1:0)|0,g[3]=g[3]+1295307597+(g[2]>>>0<n[2]>>>0?1:0)|0,g[4]=g[4]+3545052371+(g[3]>>>0<n[3]>>>0?1:0)|0,g[5]=g[5]+886263092+(g[4]>>>0<n[4]>>>0?1:0)|0,g[6]=g[6]+1295307597+(g[5]>>>0<n[5]>>>0?1:0)|0,g[7]=g[7]+3545052371+(g[6]>>>0<n[6]>>>0?1:0)|0,this._b=g[7]>>>0<n[7]>>>0?1:0;for(var u=0;u<8;u++){var s=l[u]+g[u],x=s&65535,E=s>>>16,v=((x*x>>>17)+x*E>>>15)+E*E,y=((s&4294901760)*s|0)+((s&65535)*s|0);i[u]=v^y}l[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,l[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,l[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,l[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,l[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,l[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,l[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,l[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}e.RabbitLegacy=h._createHelper(f)})(),o.RabbitLegacy})});var Bu=Ue((Xn,Cu)=>{Ee();Ae();(function(o,e,r){typeof Xn=="object"?Cu.exports=Xn=e(We(),$t(),Vt(),Pt(),ot()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(o.CryptoJS)})(Xn,function(o){return(function(){var e=o,r=e.lib,h=r.BlockCipher,d=e.algo;let t=16,n=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],i=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var f={pbox:[],sbox:[]};function c(x,E){let v=E>>24&255,y=E>>16&255,a=E>>8&255,m=E&255,_=x.sbox[0][v]+x.sbox[1][y];return _=_^x.sbox[2][a],_=_+x.sbox[3][m],_}function l(x,E,v){let y=E,a=v,m;for(let _=0;_<t;++_)y=y^x.pbox[_],a=c(x,y)^a,m=y,y=a,a=m;return m=y,y=a,a=m,a=a^x.pbox[t],y=y^x.pbox[t+1],{left:y,right:a}}function g(x,E,v){let y=E,a=v,m;for(let _=t+1;_>1;--_)y=y^x.pbox[_],a=c(x,y)^a,m=y,y=a,a=m;return m=y,y=a,a=m,a=a^x.pbox[1],y=y^x.pbox[0],{left:y,right:a}}function u(x,E,v){for(let w=0;w<4;w++){x.sbox[w]=[];for(let B=0;B<256;B++)x.sbox[w][B]=i[w][B]}let y=0;for(let w=0;w<t+2;w++)x.pbox[w]=n[w]^E[y],y++,y>=v&&(y=0);let a=0,m=0,_=0;for(let w=0;w<t+2;w+=2)_=l(x,a,m),a=_.left,m=_.right,x.pbox[w]=a,x.pbox[w+1]=m;for(let w=0;w<4;w++)for(let B=0;B<256;B+=2)_=l(x,a,m),a=_.left,m=_.right,x.sbox[w][B]=a,x.sbox[w][B+1]=m;return!0}var s=d.Blowfish=h.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var x=this._keyPriorReset=this._key,E=x.words,v=x.sigBytes/4;u(f,E,v)}},encryptBlock:function(x,E){var v=l(f,x[E],x[E+1]);x[E]=v.left,x[E+1]=v.right},decryptBlock:function(x,E){var v=g(f,x[E],x[E+1]);x[E]=v.left,x[E+1]=v.right},blockSize:64/32,keySize:128/32,ivSize:64/32});e.Blowfish=h._createHelper(s)})(),o.Blowfish})});var Iu=Ue((Jn,ku)=>{Ee();Ae();(function(o,e,r){typeof Jn=="object"?ku.exports=Jn=e(We(),Sr(),Sl(),Bl(),$t(),Dl(),Vt(),Cs(),An(),Rl(),Bs(),Ml(),Ul(),Wl(),Fn(),$l(),Pt(),ot(),Gl(),Xl(),Zl(),tu(),nu(),iu(),au(),uu(),fu(),pu(),gu(),yu(),mu(),_u(),Eu(),Su(),Bu()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./enc-base64url","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy","./blowfish"],e):o.CryptoJS=e(o.CryptoJS)})(Jn,function(o){return o})});Ee();Ae();Ee();Ae();Ee();Ae();Ee();Ae();var Dr=class{constructor(){this._listeners=new Map}on(e,r){if(typeof r!="function")throw new TypeError("listener \u5FC5\u987B\u662F\u51FD\u6570");let h=this._listeners.get(e);return h||(h=new Set,this._listeners.set(e,h)),h.add(r),this}addListener(e,r){return this.on(e,r)}once(e,r){let h=(...d)=>{this.off(e,h),r(...d)};return h.listener=r,this.on(e,h)}off(e,r){let h=this._listeners.get(e);if(!h)return this;for(let d of h){let t=d.listener;(d===r||t===r)&&h.delete(d)}return h.size===0&&this._listeners.delete(e),this}removeListener(e,r){return this.off(e,r)}removeAllListeners(e){return e===void 0?this._listeners.clear():this._listeners.delete(e),this}listenerCount(e){return this._listeners.get(e)?.size??0}emit(e,...r){let h=this._listeners.get(e);if(!h||h.size===0){if(e==="error")throw r[0]instanceof Error?r[0]:new Error(String(r[0]));return!1}for(let d of[...h])d(...r);return!0}};Ee();Ae();var ps=Object.defineProperty,Vu=Object.getOwnPropertyDescriptor,Ku=Object.getOwnPropertyNames,Qu=Object.prototype.hasOwnProperty,ft=(o,e)=>()=>(o&&(e=o(o=0)),e),we=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),lr=(o,e)=>{for(var r in e)ps(o,r,{get:e[r],enumerable:!0})},Gu=(o,e,r,h)=>{if(e&&typeof e=="object"||typeof e=="function")for(let d of Ku(e))!Qu.call(o,d)&&d!==r&&ps(o,d,{get:()=>e[d],enumerable:!(h=Vu(e,d))||h.enumerable});return o},He=o=>Gu(ps({},"__esModule",{value:!0}),o),be=ft(()=>{});function ds(o){throw new Error("Node.js process "+o+" is not supported by JSPM core outside of Node.js")}function Yu(){!Jt||!Yt||(Jt=!1,Yt.length?vt=Yt.concat(vt):vr=-1,vt.length&&Za())}function Za(){if(!Jt){var o=setTimeout(Yu,0);Jt=!0;for(var e=vt.length;e;){for(Yt=vt,vt=[];++vr<e;)Yt&&Yt[vr].run();vr=-1,e=vt.length}Yt=null,Jt=!1,clearTimeout(o)}}function Xu(o){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];vt.push(new e0(o,e)),vt.length===1&&!Jt&&setTimeout(Za,0)}function e0(o,e){this.fun=o,this.array=e}function at(){}function t0(o){ds("_linkedBinding")}function r0(o){ds("dlopen")}function n0(){return[]}function o0(){return[]}function i0(o,e){if(!o)throw new Error(e||"assertion error")}function s0(){return!1}function a0(){return kt.now()/1e3}function Tr(o){var e=Math.floor((Date.now()-kt.now())*.001),r=kt.now()*.001,h=Math.floor(r)+e,d=Math.floor(r%1*1e9);return o&&(h=h-o[0],d=d-o[1],d<0&&(h--,d+=Or)),[h,d]}function Ct(){return gs}function l0(o){return[]}var vt,Jt,Yt,vr,ho,po,go,xo,yo,bo,mo,vo,_o,wo,Eo,Ao,So,Co,Bo,ko,Io,Do,Fo,Po,To,Oo,xr,Ro,jo,No,Mo,Lo,Uo,qo,Wo,Ho,zo,$o,Vo,Ko,Qo,Go,Yo,Xo,Jo,Zo,ei,ti,ri,ni,oi,ii,kt,uo,Or,si,ai,li,ui,ci,fi,hi,pi,di,gi,xi,gs,Hs=ft(()=>{be(),ve(),me(),vt=[],Jt=!1,vr=-1,e0.prototype.run=function(){this.fun.apply(null,this.array)},ho="browser",po="x64",go="browser",xo={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},yo=["/usr/bin/node"],bo=[],mo="v16.8.0",vo={},_o=function(o,e){console.warn((e?e+": ":"")+o)},wo=function(o){ds("binding")},Eo=function(o){return 0},Ao=function(){return"/"},So=function(o){},Co={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},Bo=!0,ko=at,Io=[],Do={},Fo=!1,Po={},To=at,Oo=at,xr=function(){return{}},Ro=xr,jo=xr,No=at,Mo=at,Lo=at,Uo={},qo={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},Wo=at,Ho=at,zo=at,$o=at,Vo=at,Ko=at,Qo=at,Go=void 0,Yo=void 0,Xo=void 0,Jo=at,Zo=2,ei=1,ti="/bin/usr/node",ri=9229,ni="node",oi=[],ii=at,kt={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},kt.now===void 0&&(uo=Date.now(),kt.timing&&kt.timing.navigationStart&&(uo=kt.timing.navigationStart),kt.now=()=>Date.now()-uo),Or=1e9,Tr.bigint=function(o){var e=Tr(o);return typeof BigInt>"u"?e[0]*Or+e[1]:BigInt(e[0]*Or)+BigInt(e[1])},si=10,ai={},li=0,ui=Ct,ci=Ct,fi=Ct,hi=Ct,pi=Ct,di=at,gi=Ct,xi=Ct,gs={version:mo,versions:vo,arch:po,platform:go,browser:Bo,release:Co,_rawDebug:ko,moduleLoadList:Io,binding:wo,_linkedBinding:t0,_events:ai,_eventsCount:li,_maxListeners:si,on:Ct,addListener:ui,once:ci,off:fi,removeListener:hi,removeAllListeners:pi,emit:di,prependListener:gi,prependOnceListener:xi,listeners:l0,domain:Do,_exiting:Fo,config:Po,dlopen:r0,uptime:a0,_getActiveRequests:n0,_getActiveHandles:o0,reallyExit:To,_kill:Oo,cpuUsage:xr,resourceUsage:Ro,memoryUsage:jo,kill:No,exit:Mo,openStdin:Lo,allowedNodeEnvironmentFlags:Uo,assert:i0,features:qo,_fatalExceptions:Wo,setUncaughtExceptionCaptureCallback:Ho,hasUncaughtExceptionCaptureCallback:s0,emitWarning:_o,nextTick:Xu,_tickCallback:zo,_debugProcess:$o,_debugEnd:Vo,_startProfilerIdleNotifier:Ko,_stopProfilerIdleNotifier:Qo,stdout:Go,stdin:Xo,stderr:Yo,abort:Jo,umask:Eo,chdir:So,cwd:Ao,env:xo,title:ho,argv:yo,execArgv:bo,pid:Zo,ppid:ei,execPath:ti,debugPort:ri,hrtime:Tr,argv0:ni,_preload_modules:oi,setSourceMapsEnabled:ii}}),$e={};lr($e,{_debugEnd:()=>Vo,_debugProcess:()=>$o,_events:()=>ai,_eventsCount:()=>li,_exiting:()=>Fo,_fatalExceptions:()=>Wo,_getActiveHandles:()=>o0,_getActiveRequests:()=>n0,_kill:()=>Oo,_linkedBinding:()=>t0,_maxListeners:()=>si,_preload_modules:()=>oi,_rawDebug:()=>ko,_startProfilerIdleNotifier:()=>Ko,_stopProfilerIdleNotifier:()=>Qo,_tickCallback:()=>zo,abort:()=>Jo,addListener:()=>ui,allowedNodeEnvironmentFlags:()=>Uo,arch:()=>po,argv:()=>yo,argv0:()=>ni,assert:()=>i0,binding:()=>wo,browser:()=>Bo,chdir:()=>So,config:()=>Po,cpuUsage:()=>xr,cwd:()=>Ao,debugPort:()=>ri,default:()=>f0,dlopen:()=>r0,domain:()=>Do,emit:()=>di,emitWarning:()=>_o,env:()=>xo,execArgv:()=>bo,execPath:()=>ti,exit:()=>Mo,features:()=>qo,hasUncaughtExceptionCaptureCallback:()=>s0,hrtime:()=>Tr,kill:()=>No,listeners:()=>l0,memoryUsage:()=>jo,moduleLoadList:()=>Io,nextTick:()=>u0,off:()=>fi,on:()=>Ct,once:()=>ci,openStdin:()=>Lo,pid:()=>Zo,platform:()=>go,ppid:()=>ei,prependListener:()=>gi,prependOnceListener:()=>xi,reallyExit:()=>To,release:()=>Co,removeAllListeners:()=>pi,removeListener:()=>hi,resourceUsage:()=>Ro,setSourceMapsEnabled:()=>ii,setUncaughtExceptionCaptureCallback:()=>Ho,stderr:()=>Yo,stdin:()=>Xo,stdout:()=>Go,title:()=>ho,umask:()=>Eo,uptime:()=>a0,version:()=>mo,versions:()=>vo});function u0(o,...e){c0(()=>o(...e))}var c0,f0,qt=ft(()=>{be(),ve(),me(),Hs(),Hs(),c0=typeof queueMicrotask=="function"?queueMicrotask:o=>setTimeout(o,0),f0={...gs,nextTick:u0}}),me=ft(()=>{qt()});function Ju(){if(yi)return ir;yi=!0,ir.byteLength=i,ir.toByteArray=c,ir.fromByteArray=u;for(var o=[],e=[],r=typeof Uint8Array<"u"?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,t=h.length;d<t;++d)o[d]=h[d],e[h.charCodeAt(d)]=d;e[45]=62,e[95]=63;function n(s){var x=s.length;if(x%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var E=s.indexOf("=");E===-1&&(E=x);var v=E===x?0:4-E%4;return[E,v]}function i(s){var x=n(s),E=x[0],v=x[1];return(E+v)*3/4-v}function f(s,x,E){return(x+E)*3/4-E}function c(s){var x,E=n(s),v=E[0],y=E[1],a=new r(f(s,v,y)),m=0,_=y>0?v-4:v,w;for(w=0;w<_;w+=4)x=e[s.charCodeAt(w)]<<18|e[s.charCodeAt(w+1)]<<12|e[s.charCodeAt(w+2)]<<6|e[s.charCodeAt(w+3)],a[m++]=x>>16&255,a[m++]=x>>8&255,a[m++]=x&255;return y===2&&(x=e[s.charCodeAt(w)]<<2|e[s.charCodeAt(w+1)]>>4,a[m++]=x&255),y===1&&(x=e[s.charCodeAt(w)]<<10|e[s.charCodeAt(w+1)]<<4|e[s.charCodeAt(w+2)]>>2,a[m++]=x>>8&255,a[m++]=x&255),a}function l(s){return o[s>>18&63]+o[s>>12&63]+o[s>>6&63]+o[s&63]}function g(s,x,E){for(var v,y=[],a=x;a<E;a+=3)v=(s[a]<<16&16711680)+(s[a+1]<<8&65280)+(s[a+2]&255),y.push(l(v));return y.join("")}function u(s){for(var x,E=s.length,v=E%3,y=[],a=16383,m=0,_=E-v;m<_;m+=a)y.push(g(s,m,m+a>_?_:m+a));return v===1?(x=s[E-1],y.push(o[x>>2]+o[x<<4&63]+"==")):v===2&&(x=(s[E-2]<<8)+s[E-1],y.push(o[x>>10]+o[x>>4&63]+o[x<<2&63]+"=")),y.join("")}return ir}function Zu(){return bi?yr:(bi=!0,yr.read=function(o,e,r,h,d){var t,n,i=d*8-h-1,f=(1<<i)-1,c=f>>1,l=-7,g=r?d-1:0,u=r?-1:1,s=o[e+g];for(g+=u,t=s&(1<<-l)-1,s>>=-l,l+=i;l>0;t=t*256+o[e+g],g+=u,l-=8);for(n=t&(1<<-l)-1,t>>=-l,l+=h;l>0;n=n*256+o[e+g],g+=u,l-=8);if(t===0)t=1-c;else{if(t===f)return n?NaN:(s?-1:1)*(1/0);n=n+Math.pow(2,h),t=t-c}return(s?-1:1)*n*Math.pow(2,t-h)},yr.write=function(o,e,r,h,d,t){var n,i,f,c=t*8-d-1,l=(1<<c)-1,g=l>>1,u=d===23?Math.pow(2,-24)-Math.pow(2,-77):0,s=h?0:t-1,x=h?1:-1,E=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(i=isNaN(e)?1:0,n=l):(n=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-n))<1&&(n--,f*=2),n+g>=1?e+=u/f:e+=u*Math.pow(2,1-g),e*f>=2&&(n++,f/=2),n+g>=l?(i=0,n=l):n+g>=1?(i=(e*f-1)*Math.pow(2,d),n=n+g):(i=e*Math.pow(2,g-1)*Math.pow(2,d),n=0));d>=8;o[r+s]=i&255,s+=x,i/=256,d-=8);for(n=n<<d|i,c+=d;c>0;o[r+s]=n&255,s+=x,n/=256,c-=8);o[r+s-x]|=E*128},yr)}function ec(){if(mi)return Rt;mi=!0;let o=Ju(),e=Zu(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Rt.Buffer=n,Rt.SlowBuffer=y,Rt.INSPECT_MAX_BYTES=50;let h=2147483647;Rt.kMaxLength=h,n.TYPED_ARRAY_SUPPORT=d(),!n.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 d(){try{let p=new Uint8Array(1),b={foo:function(){return 42}};return Object.setPrototypeOf(b,Uint8Array.prototype),Object.setPrototypeOf(p,b),p.foo()===42}catch{return!1}}Object.defineProperty(n.prototype,"parent",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.buffer}}),Object.defineProperty(n.prototype,"offset",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.byteOffset}});function t(p){if(p>h)throw new RangeError('The value "'+p+'" is invalid for option "size"');let b=new Uint8Array(p);return Object.setPrototypeOf(b,n.prototype),b}function n(p,b,S){if(typeof p=="number"){if(typeof b=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return l(p)}return i(p,b,S)}n.poolSize=8192;function i(p,b,S){if(typeof p=="string")return g(p,b);if(ArrayBuffer.isView(p))return s(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(te(p,ArrayBuffer)||p&&te(p.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(te(p,SharedArrayBuffer)||p&&te(p.buffer,SharedArrayBuffer)))return x(p,b,S);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let F=p.valueOf&&p.valueOf();if(F!=null&&F!==p)return n.from(F,b,S);let U=E(p);if(U)return U;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return n.from(p[Symbol.toPrimitive]("string"),b,S);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p)}n.from=function(p,b,S){return i(p,b,S)},Object.setPrototypeOf(n.prototype,Uint8Array.prototype),Object.setPrototypeOf(n,Uint8Array);function f(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 c(p,b,S){return f(p),p<=0?t(p):b!==void 0?typeof S=="string"?t(p).fill(b,S):t(p).fill(b):t(p)}n.alloc=function(p,b,S){return c(p,b,S)};function l(p){return f(p),t(p<0?0:v(p)|0)}n.allocUnsafe=function(p){return l(p)},n.allocUnsafeSlow=function(p){return l(p)};function g(p,b){if((typeof b!="string"||b==="")&&(b="utf8"),!n.isEncoding(b))throw new TypeError("Unknown encoding: "+b);let S=a(p,b)|0,F=t(S),U=F.write(p,b);return U!==S&&(F=F.slice(0,U)),F}function u(p){let b=p.length<0?0:v(p.length)|0,S=t(b);for(let F=0;F<b;F+=1)S[F]=p[F]&255;return S}function s(p){if(te(p,Uint8Array)){let b=new Uint8Array(p);return x(b.buffer,b.byteOffset,b.byteLength)}return u(p)}function x(p,b,S){if(b<0||p.byteLength<b)throw new RangeError('"offset" is outside of buffer bounds');if(p.byteLength<b+(S||0))throw new RangeError('"length" is outside of buffer bounds');let F;return b===void 0&&S===void 0?F=new Uint8Array(p):S===void 0?F=new Uint8Array(p,b):F=new Uint8Array(p,b,S),Object.setPrototypeOf(F,n.prototype),F}function E(p){if(n.isBuffer(p)){let b=v(p.length)|0,S=t(b);return S.length===0||p.copy(S,0,0,b),S}if(p.length!==void 0)return typeof p.length!="number"||xe(p.length)?t(0):u(p);if(p.type==="Buffer"&&Array.isArray(p.data))return u(p.data)}function v(p){if(p>=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return p|0}function y(p){return+p!=p&&(p=0),n.alloc(+p)}n.isBuffer=function(p){return p!=null&&p._isBuffer===!0&&p!==n.prototype},n.compare=function(p,b){if(te(p,Uint8Array)&&(p=n.from(p,p.offset,p.byteLength)),te(b,Uint8Array)&&(b=n.from(b,b.offset,b.byteLength)),!n.isBuffer(p)||!n.isBuffer(b))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(p===b)return 0;let S=p.length,F=b.length;for(let U=0,X=Math.min(S,F);U<X;++U)if(p[U]!==b[U]){S=p[U],F=b[U];break}return S<F?-1:F<S?1:0},n.isEncoding=function(p){switch(String(p).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}},n.concat=function(p,b){if(!Array.isArray(p))throw new TypeError('"list" argument must be an Array of Buffers');if(p.length===0)return n.alloc(0);let S;if(b===void 0)for(b=0,S=0;S<p.length;++S)b+=p[S].length;let F=n.allocUnsafe(b),U=0;for(S=0;S<p.length;++S){let X=p[S];if(te(X,Uint8Array))U+X.length>F.length?(n.isBuffer(X)||(X=n.from(X)),X.copy(F,U)):Uint8Array.prototype.set.call(F,X,U);else if(n.isBuffer(X))X.copy(F,U);else throw new TypeError('"list" argument must be an Array of Buffers');U+=X.length}return F};function a(p,b){if(n.isBuffer(p))return p.length;if(ArrayBuffer.isView(p)||te(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 S=p.length,F=arguments.length>2&&arguments[2]===!0;if(!F&&S===0)return 0;let U=!1;for(;;)switch(b){case"ascii":case"latin1":case"binary":return S;case"utf8":case"utf-8":return J(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S*2;case"hex":return S>>>1;case"base64":return he(p).length;default:if(U)return F?-1:J(p).length;b=(""+b).toLowerCase(),U=!0}}n.byteLength=a;function m(p,b,S){let F=!1;if((b===void 0||b<0)&&(b=0),b>this.length||((S===void 0||S>this.length)&&(S=this.length),S<=0)||(S>>>=0,b>>>=0,S<=b))return"";for(p||(p="utf8");;)switch(p){case"hex":return Q(this,b,S);case"utf8":case"utf-8":return I(this,b,S);case"ascii":return Y(this,b,S);case"latin1":case"binary":return K(this,b,S);case"base64":return A(this,b,S);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,b,S);default:if(F)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),F=!0}}n.prototype._isBuffer=!0;function _(p,b,S){let F=p[b];p[b]=p[S],p[S]=F}n.prototype.swap16=function(){let p=this.length;if(p%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let b=0;b<p;b+=2)_(this,b,b+1);return this},n.prototype.swap32=function(){let p=this.length;if(p%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let b=0;b<p;b+=4)_(this,b,b+3),_(this,b+1,b+2);return this},n.prototype.swap64=function(){let p=this.length;if(p%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let b=0;b<p;b+=8)_(this,b,b+7),_(this,b+1,b+6),_(this,b+2,b+5),_(this,b+3,b+4);return this},n.prototype.toString=function(){let p=this.length;return p===0?"":arguments.length===0?I(this,0,p):m.apply(this,arguments)},n.prototype.toLocaleString=n.prototype.toString,n.prototype.equals=function(p){if(!n.isBuffer(p))throw new TypeError("Argument must be a Buffer");return this===p?!0:n.compare(this,p)===0},n.prototype.inspect=function(){let p="",b=Rt.INSPECT_MAX_BYTES;return p=this.toString("hex",0,b).replace(/(.{2})/g,"$1 ").trim(),this.length>b&&(p+=" ... "),"<Buffer "+p+">"},r&&(n.prototype[r]=n.prototype.inspect),n.prototype.compare=function(p,b,S,F,U){if(te(p,Uint8Array)&&(p=n.from(p,p.offset,p.byteLength)),!n.isBuffer(p))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof p);if(b===void 0&&(b=0),S===void 0&&(S=p?p.length:0),F===void 0&&(F=0),U===void 0&&(U=this.length),b<0||S>p.length||F<0||U>this.length)throw new RangeError("out of range index");if(F>=U&&b>=S)return 0;if(F>=U)return-1;if(b>=S)return 1;if(b>>>=0,S>>>=0,F>>>=0,U>>>=0,this===p)return 0;let X=U-F,se=S-b,G=Math.min(X,se),oe=this.slice(F,U),Be=p.slice(b,S);for(let De=0;De<G;++De)if(oe[De]!==Be[De]){X=oe[De],se=Be[De];break}return X<se?-1:se<X?1:0};function w(p,b,S,F,U){if(p.length===0)return-1;if(typeof S=="string"?(F=S,S=0):S>2147483647?S=2147483647:S<-2147483648&&(S=-2147483648),S=+S,xe(S)&&(S=U?0:p.length-1),S<0&&(S=p.length+S),S>=p.length){if(U)return-1;S=p.length-1}else if(S<0)if(U)S=0;else return-1;if(typeof b=="string"&&(b=n.from(b,F)),n.isBuffer(b))return b.length===0?-1:B(p,b,S,F,U);if(typeof b=="number")return b=b&255,typeof Uint8Array.prototype.indexOf=="function"?U?Uint8Array.prototype.indexOf.call(p,b,S):Uint8Array.prototype.lastIndexOf.call(p,b,S):B(p,[b],S,F,U);throw new TypeError("val must be string, number or Buffer")}function B(p,b,S,F,U){let X=1,se=p.length,G=b.length;if(F!==void 0&&(F=String(F).toLowerCase(),F==="ucs2"||F==="ucs-2"||F==="utf16le"||F==="utf-16le")){if(p.length<2||b.length<2)return-1;X=2,se/=2,G/=2,S/=2}function oe(De,Fe){return X===1?De[Fe]:De.readUInt16BE(Fe*X)}let Be;if(U){let De=-1;for(Be=S;Be<se;Be++)if(oe(p,Be)===oe(b,De===-1?0:Be-De)){if(De===-1&&(De=Be),Be-De+1===G)return De*X}else De!==-1&&(Be-=Be-De),De=-1}else for(S+G>se&&(S=se-G),Be=S;Be>=0;Be--){let De=!0;for(let Fe=0;Fe<G;Fe++)if(oe(p,Be+Fe)!==oe(b,Fe)){De=!1;break}if(De)return Be}return-1}n.prototype.includes=function(p,b,S){return this.indexOf(p,b,S)!==-1},n.prototype.indexOf=function(p,b,S){return w(this,p,b,S,!0)},n.prototype.lastIndexOf=function(p,b,S){return w(this,p,b,S,!1)};function k(p,b,S,F){S=Number(S)||0;let U=p.length-S;F?(F=Number(F),F>U&&(F=U)):F=U;let X=b.length;F>X/2&&(F=X/2);let se;for(se=0;se<F;++se){let G=parseInt(b.substr(se*2,2),16);if(xe(G))return se;p[S+se]=G}return se}function R(p,b,S,F){return ge(J(b,p.length-S),p,S,F)}function M(p,b,S,F){return ge(ue(b),p,S,F)}function O(p,b,S,F){return ge(he(b),p,S,F)}function C(p,b,S,F){return ge(de(b,p.length-S),p,S,F)}n.prototype.write=function(p,b,S,F){if(b===void 0)F="utf8",S=this.length,b=0;else if(S===void 0&&typeof b=="string")F=b,S=this.length,b=0;else if(isFinite(b))b=b>>>0,isFinite(S)?(S=S>>>0,F===void 0&&(F="utf8")):(F=S,S=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let U=this.length-b;if((S===void 0||S>U)&&(S=U),p.length>0&&(S<0||b<0)||b>this.length)throw new RangeError("Attempt to write outside buffer bounds");F||(F="utf8");let X=!1;for(;;)switch(F){case"hex":return k(this,p,b,S);case"utf8":case"utf-8":return R(this,p,b,S);case"ascii":case"latin1":case"binary":return M(this,p,b,S);case"base64":return O(this,p,b,S);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,p,b,S);default:if(X)throw new TypeError("Unknown encoding: "+F);F=(""+F).toLowerCase(),X=!0}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function A(p,b,S){return b===0&&S===p.length?o.fromByteArray(p):o.fromByteArray(p.slice(b,S))}function I(p,b,S){S=Math.min(p.length,S);let F=[],U=b;for(;U<S;){let X=p[U],se=null,G=X>239?4:X>223?3:X>191?2:1;if(U+G<=S){let oe,Be,De,Fe;switch(G){case 1:X<128&&(se=X);break;case 2:oe=p[U+1],(oe&192)===128&&(Fe=(X&31)<<6|oe&63,Fe>127&&(se=Fe));break;case 3:oe=p[U+1],Be=p[U+2],(oe&192)===128&&(Be&192)===128&&(Fe=(X&15)<<12|(oe&63)<<6|Be&63,Fe>2047&&(Fe<55296||Fe>57343)&&(se=Fe));break;case 4:oe=p[U+1],Be=p[U+2],De=p[U+3],(oe&192)===128&&(Be&192)===128&&(De&192)===128&&(Fe=(X&15)<<18|(oe&63)<<12|(Be&63)<<6|De&63,Fe>65535&&Fe<1114112&&(se=Fe))}}se===null?(se=65533,G=1):se>65535&&(se-=65536,F.push(se>>>10&1023|55296),se=56320|se&1023),F.push(se),U+=G}return N(F)}let T=4096;function N(p){let b=p.length;if(b<=T)return String.fromCharCode.apply(String,p);let S="",F=0;for(;F<b;)S+=String.fromCharCode.apply(String,p.slice(F,F+=T));return S}function Y(p,b,S){let F="";S=Math.min(p.length,S);for(let U=b;U<S;++U)F+=String.fromCharCode(p[U]&127);return F}function K(p,b,S){let F="";S=Math.min(p.length,S);for(let U=b;U<S;++U)F+=String.fromCharCode(p[U]);return F}function Q(p,b,S){let F=p.length;(!b||b<0)&&(b=0),(!S||S<0||S>F)&&(S=F);let U="";for(let X=b;X<S;++X)U+=Ce[p[X]];return U}function L(p,b,S){let F=p.slice(b,S),U="";for(let X=0;X<F.length-1;X+=2)U+=String.fromCharCode(F[X]+F[X+1]*256);return U}n.prototype.slice=function(p,b){let S=this.length;p=~~p,b=b===void 0?S:~~b,p<0?(p+=S,p<0&&(p=0)):p>S&&(p=S),b<0?(b+=S,b<0&&(b=0)):b>S&&(b=S),b<p&&(b=p);let F=this.subarray(p,b);return Object.setPrototypeOf(F,n.prototype),F};function P(p,b,S){if(p%1!==0||p<0)throw new RangeError("offset is not uint");if(p+b>S)throw new RangeError("Trying to access beyond buffer length")}n.prototype.readUintLE=n.prototype.readUIntLE=function(p,b,S){p=p>>>0,b=b>>>0,S||P(p,b,this.length);let F=this[p],U=1,X=0;for(;++X<b&&(U*=256);)F+=this[p+X]*U;return F},n.prototype.readUintBE=n.prototype.readUIntBE=function(p,b,S){p=p>>>0,b=b>>>0,S||P(p,b,this.length);let F=this[p+--b],U=1;for(;b>0&&(U*=256);)F+=this[p+--b]*U;return F},n.prototype.readUint8=n.prototype.readUInt8=function(p,b){return p=p>>>0,b||P(p,1,this.length),this[p]},n.prototype.readUint16LE=n.prototype.readUInt16LE=function(p,b){return p=p>>>0,b||P(p,2,this.length),this[p]|this[p+1]<<8},n.prototype.readUint16BE=n.prototype.readUInt16BE=function(p,b){return p=p>>>0,b||P(p,2,this.length),this[p]<<8|this[p+1]},n.prototype.readUint32LE=n.prototype.readUInt32LE=function(p,b){return p=p>>>0,b||P(p,4,this.length),(this[p]|this[p+1]<<8|this[p+2]<<16)+this[p+3]*16777216},n.prototype.readUint32BE=n.prototype.readUInt32BE=function(p,b){return p=p>>>0,b||P(p,4,this.length),this[p]*16777216+(this[p+1]<<16|this[p+2]<<8|this[p+3])},n.prototype.readBigUInt64LE=ye(function(p){p=p>>>0,re(p,"offset");let b=this[p],S=this[p+7];(b===void 0||S===void 0)&&pe(p,this.length-8);let F=b+this[++p]*2**8+this[++p]*2**16+this[++p]*2**24,U=this[++p]+this[++p]*2**8+this[++p]*2**16+S*2**24;return BigInt(F)+(BigInt(U)<<BigInt(32))}),n.prototype.readBigUInt64BE=ye(function(p){p=p>>>0,re(p,"offset");let b=this[p],S=this[p+7];(b===void 0||S===void 0)&&pe(p,this.length-8);let F=b*2**24+this[++p]*2**16+this[++p]*2**8+this[++p],U=this[++p]*2**24+this[++p]*2**16+this[++p]*2**8+S;return(BigInt(F)<<BigInt(32))+BigInt(U)}),n.prototype.readIntLE=function(p,b,S){p=p>>>0,b=b>>>0,S||P(p,b,this.length);let F=this[p],U=1,X=0;for(;++X<b&&(U*=256);)F+=this[p+X]*U;return U*=128,F>=U&&(F-=Math.pow(2,8*b)),F},n.prototype.readIntBE=function(p,b,S){p=p>>>0,b=b>>>0,S||P(p,b,this.length);let F=b,U=1,X=this[p+--F];for(;F>0&&(U*=256);)X+=this[p+--F]*U;return U*=128,X>=U&&(X-=Math.pow(2,8*b)),X},n.prototype.readInt8=function(p,b){return p=p>>>0,b||P(p,1,this.length),this[p]&128?(255-this[p]+1)*-1:this[p]},n.prototype.readInt16LE=function(p,b){p=p>>>0,b||P(p,2,this.length);let S=this[p]|this[p+1]<<8;return S&32768?S|4294901760:S},n.prototype.readInt16BE=function(p,b){p=p>>>0,b||P(p,2,this.length);let S=this[p+1]|this[p]<<8;return S&32768?S|4294901760:S},n.prototype.readInt32LE=function(p,b){return p=p>>>0,b||P(p,4,this.length),this[p]|this[p+1]<<8|this[p+2]<<16|this[p+3]<<24},n.prototype.readInt32BE=function(p,b){return p=p>>>0,b||P(p,4,this.length),this[p]<<24|this[p+1]<<16|this[p+2]<<8|this[p+3]},n.prototype.readBigInt64LE=ye(function(p){p=p>>>0,re(p,"offset");let b=this[p],S=this[p+7];(b===void 0||S===void 0)&&pe(p,this.length-8);let F=this[p+4]+this[p+5]*2**8+this[p+6]*2**16+(S<<24);return(BigInt(F)<<BigInt(32))+BigInt(b+this[++p]*2**8+this[++p]*2**16+this[++p]*2**24)}),n.prototype.readBigInt64BE=ye(function(p){p=p>>>0,re(p,"offset");let b=this[p],S=this[p+7];(b===void 0||S===void 0)&&pe(p,this.length-8);let F=(b<<24)+this[++p]*2**16+this[++p]*2**8+this[++p];return(BigInt(F)<<BigInt(32))+BigInt(this[++p]*2**24+this[++p]*2**16+this[++p]*2**8+S)}),n.prototype.readFloatLE=function(p,b){return p=p>>>0,b||P(p,4,this.length),e.read(this,p,!0,23,4)},n.prototype.readFloatBE=function(p,b){return p=p>>>0,b||P(p,4,this.length),e.read(this,p,!1,23,4)},n.prototype.readDoubleLE=function(p,b){return p=p>>>0,b||P(p,8,this.length),e.read(this,p,!0,52,8)},n.prototype.readDoubleBE=function(p,b){return p=p>>>0,b||P(p,8,this.length),e.read(this,p,!1,52,8)};function W(p,b,S,F,U,X){if(!n.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(b>U||b<X)throw new RangeError('"value" argument is out of bounds');if(S+F>p.length)throw new RangeError("Index out of range")}n.prototype.writeUintLE=n.prototype.writeUIntLE=function(p,b,S,F){if(p=+p,b=b>>>0,S=S>>>0,!F){let se=Math.pow(2,8*S)-1;W(this,p,b,S,se,0)}let U=1,X=0;for(this[b]=p&255;++X<S&&(U*=256);)this[b+X]=p/U&255;return b+S},n.prototype.writeUintBE=n.prototype.writeUIntBE=function(p,b,S,F){if(p=+p,b=b>>>0,S=S>>>0,!F){let se=Math.pow(2,8*S)-1;W(this,p,b,S,se,0)}let U=S-1,X=1;for(this[b+U]=p&255;--U>=0&&(X*=256);)this[b+U]=p/X&255;return b+S},n.prototype.writeUint8=n.prototype.writeUInt8=function(p,b,S){return p=+p,b=b>>>0,S||W(this,p,b,1,255,0),this[b]=p&255,b+1},n.prototype.writeUint16LE=n.prototype.writeUInt16LE=function(p,b,S){return p=+p,b=b>>>0,S||W(this,p,b,2,65535,0),this[b]=p&255,this[b+1]=p>>>8,b+2},n.prototype.writeUint16BE=n.prototype.writeUInt16BE=function(p,b,S){return p=+p,b=b>>>0,S||W(this,p,b,2,65535,0),this[b]=p>>>8,this[b+1]=p&255,b+2},n.prototype.writeUint32LE=n.prototype.writeUInt32LE=function(p,b,S){return p=+p,b=b>>>0,S||W(this,p,b,4,4294967295,0),this[b+3]=p>>>24,this[b+2]=p>>>16,this[b+1]=p>>>8,this[b]=p&255,b+4},n.prototype.writeUint32BE=n.prototype.writeUInt32BE=function(p,b,S){return p=+p,b=b>>>0,S||W(this,p,b,4,4294967295,0),this[b]=p>>>24,this[b+1]=p>>>16,this[b+2]=p>>>8,this[b+3]=p&255,b+4};function D(p,b,S,F,U){ne(b,F,U,p,S,7);let X=Number(b&BigInt(4294967295));p[S++]=X,X=X>>8,p[S++]=X,X=X>>8,p[S++]=X,X=X>>8,p[S++]=X;let se=Number(b>>BigInt(32)&BigInt(4294967295));return p[S++]=se,se=se>>8,p[S++]=se,se=se>>8,p[S++]=se,se=se>>8,p[S++]=se,S}function ee(p,b,S,F,U){ne(b,F,U,p,S,7);let X=Number(b&BigInt(4294967295));p[S+7]=X,X=X>>8,p[S+6]=X,X=X>>8,p[S+5]=X,X=X>>8,p[S+4]=X;let se=Number(b>>BigInt(32)&BigInt(4294967295));return p[S+3]=se,se=se>>8,p[S+2]=se,se=se>>8,p[S+1]=se,se=se>>8,p[S]=se,S+8}n.prototype.writeBigUInt64LE=ye(function(p,b=0){return D(this,p,b,BigInt(0),BigInt("0xffffffffffffffff"))}),n.prototype.writeBigUInt64BE=ye(function(p,b=0){return ee(this,p,b,BigInt(0),BigInt("0xffffffffffffffff"))}),n.prototype.writeIntLE=function(p,b,S,F){if(p=+p,b=b>>>0,!F){let G=Math.pow(2,8*S-1);W(this,p,b,S,G-1,-G)}let U=0,X=1,se=0;for(this[b]=p&255;++U<S&&(X*=256);)p<0&&se===0&&this[b+U-1]!==0&&(se=1),this[b+U]=(p/X>>0)-se&255;return b+S},n.prototype.writeIntBE=function(p,b,S,F){if(p=+p,b=b>>>0,!F){let G=Math.pow(2,8*S-1);W(this,p,b,S,G-1,-G)}let U=S-1,X=1,se=0;for(this[b+U]=p&255;--U>=0&&(X*=256);)p<0&&se===0&&this[b+U+1]!==0&&(se=1),this[b+U]=(p/X>>0)-se&255;return b+S},n.prototype.writeInt8=function(p,b,S){return p=+p,b=b>>>0,S||W(this,p,b,1,127,-128),p<0&&(p=255+p+1),this[b]=p&255,b+1},n.prototype.writeInt16LE=function(p,b,S){return p=+p,b=b>>>0,S||W(this,p,b,2,32767,-32768),this[b]=p&255,this[b+1]=p>>>8,b+2},n.prototype.writeInt16BE=function(p,b,S){return p=+p,b=b>>>0,S||W(this,p,b,2,32767,-32768),this[b]=p>>>8,this[b+1]=p&255,b+2},n.prototype.writeInt32LE=function(p,b,S){return p=+p,b=b>>>0,S||W(this,p,b,4,2147483647,-2147483648),this[b]=p&255,this[b+1]=p>>>8,this[b+2]=p>>>16,this[b+3]=p>>>24,b+4},n.prototype.writeInt32BE=function(p,b,S){return p=+p,b=b>>>0,S||W(this,p,b,4,2147483647,-2147483648),p<0&&(p=4294967295+p+1),this[b]=p>>>24,this[b+1]=p>>>16,this[b+2]=p>>>8,this[b+3]=p&255,b+4},n.prototype.writeBigInt64LE=ye(function(p,b=0){return D(this,p,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),n.prototype.writeBigInt64BE=ye(function(p,b=0){return ee(this,p,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function le(p,b,S,F,U,X){if(S+F>p.length)throw new RangeError("Index out of range");if(S<0)throw new RangeError("Index out of range")}function $(p,b,S,F,U){return b=+b,S=S>>>0,U||le(p,b,S,4),e.write(p,b,S,F,23,4),S+4}n.prototype.writeFloatLE=function(p,b,S){return $(this,p,b,!0,S)},n.prototype.writeFloatBE=function(p,b,S){return $(this,p,b,!1,S)};function ce(p,b,S,F,U){return b=+b,S=S>>>0,U||le(p,b,S,8),e.write(p,b,S,F,52,8),S+8}n.prototype.writeDoubleLE=function(p,b,S){return ce(this,p,b,!0,S)},n.prototype.writeDoubleBE=function(p,b,S){return ce(this,p,b,!1,S)},n.prototype.copy=function(p,b,S,F){if(!n.isBuffer(p))throw new TypeError("argument should be a Buffer");if(S||(S=0),!F&&F!==0&&(F=this.length),b>=p.length&&(b=p.length),b||(b=0),F>0&&F<S&&(F=S),F===S||p.length===0||this.length===0)return 0;if(b<0)throw new RangeError("targetStart out of bounds");if(S<0||S>=this.length)throw new RangeError("Index out of range");if(F<0)throw new RangeError("sourceEnd out of bounds");F>this.length&&(F=this.length),p.length-b<F-S&&(F=p.length-b+S);let U=F-S;return this===p&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(b,S,F):Uint8Array.prototype.set.call(p,this.subarray(S,F),b),U},n.prototype.fill=function(p,b,S,F){if(typeof p=="string"){if(typeof b=="string"?(F=b,b=0,S=this.length):typeof S=="string"&&(F=S,S=this.length),F!==void 0&&typeof F!="string")throw new TypeError("encoding must be a string");if(typeof F=="string"&&!n.isEncoding(F))throw new TypeError("Unknown encoding: "+F);if(p.length===1){let X=p.charCodeAt(0);(F==="utf8"&&X<128||F==="latin1")&&(p=X)}}else typeof p=="number"?p=p&255:typeof p=="boolean"&&(p=Number(p));if(b<0||this.length<b||this.length<S)throw new RangeError("Out of range index");if(S<=b)return this;b=b>>>0,S=S===void 0?this.length:S>>>0,p||(p=0);let U;if(typeof p=="number")for(U=b;U<S;++U)this[U]=p;else{let X=n.isBuffer(p)?p:n.from(p,F),se=X.length;if(se===0)throw new TypeError('The value "'+p+'" is invalid for argument "value"');for(U=0;U<S-b;++U)this[U+b]=X[U%se]}return this};let ie={};function H(p,b,S){ie[p]=class extends S{constructor(){super(),Object.defineProperty(this,"message",{value:b.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${p}]`,this.stack,delete this.name}get code(){return p}set code(F){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:F,writable:!0})}toString(){return`${this.name} [${p}]: ${this.message}`}}}H("ERR_BUFFER_OUT_OF_BOUNDS",function(p){return p?`${p} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),H("ERR_INVALID_ARG_TYPE",function(p,b){return`The "${p}" argument must be of type number. Received type ${typeof b}`},TypeError),H("ERR_OUT_OF_RANGE",function(p,b,S){let F=`The value of "${p}" is out of range.`,U=S;return Number.isInteger(S)&&Math.abs(S)>2**32?U=ae(String(S)):typeof S=="bigint"&&(U=String(S),(S>BigInt(2)**BigInt(32)||S<-(BigInt(2)**BigInt(32)))&&(U=ae(U)),U+="n"),F+=` It must be ${b}. Received ${U}`,F},RangeError);function ae(p){let b="",S=p.length,F=p[0]==="-"?1:0;for(;S>=F+4;S-=3)b=`_${p.slice(S-3,S)}${b}`;return`${p.slice(0,S)}${b}`}function Z(p,b,S){re(b,"offset"),(p[b]===void 0||p[b+S]===void 0)&&pe(b,p.length-(S+1))}function ne(p,b,S,F,U,X){if(p>S||p<b){let se=typeof b=="bigint"?"n":"",G;throw b===0||b===BigInt(0)?G=`>= 0${se} and < 2${se} ** ${(X+1)*8}${se}`:G=`>= -(2${se} ** ${(X+1)*8-1}${se}) and < 2 ** ${(X+1)*8-1}${se}`,new ie.ERR_OUT_OF_RANGE("value",G,p)}Z(F,U,X)}function re(p,b){if(typeof p!="number")throw new ie.ERR_INVALID_ARG_TYPE(b,"number",p)}function pe(p,b,S){throw Math.floor(p)!==p?(re(p,S),new ie.ERR_OUT_OF_RANGE("offset","an integer",p)):b<0?new ie.ERR_BUFFER_OUT_OF_BOUNDS:new ie.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${b}`,p)}let fe=/[^+/0-9A-Za-z-_]/g;function z(p){if(p=p.split("=")[0],p=p.trim().replace(fe,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function J(p,b){b=b||1/0;let S,F=p.length,U=null,X=[];for(let se=0;se<F;++se){if(S=p.charCodeAt(se),S>55295&&S<57344){if(!U){if(S>56319){(b-=3)>-1&&X.push(239,191,189);continue}else if(se+1===F){(b-=3)>-1&&X.push(239,191,189);continue}U=S;continue}if(S<56320){(b-=3)>-1&&X.push(239,191,189),U=S;continue}S=(U-55296<<10|S-56320)+65536}else U&&(b-=3)>-1&&X.push(239,191,189);if(U=null,S<128){if((b-=1)<0)break;X.push(S)}else if(S<2048){if((b-=2)<0)break;X.push(S>>6|192,S&63|128)}else if(S<65536){if((b-=3)<0)break;X.push(S>>12|224,S>>6&63|128,S&63|128)}else if(S<1114112){if((b-=4)<0)break;X.push(S>>18|240,S>>12&63|128,S>>6&63|128,S&63|128)}else throw new Error("Invalid code point")}return X}function ue(p){let b=[];for(let S=0;S<p.length;++S)b.push(p.charCodeAt(S)&255);return b}function de(p,b){let S,F,U,X=[];for(let se=0;se<p.length&&!((b-=2)<0);++se)S=p.charCodeAt(se),F=S>>8,U=S%256,X.push(U),X.push(F);return X}function he(p){return o.toByteArray(z(p))}function ge(p,b,S,F){let U;for(U=0;U<F&&!(U+S>=b.length||U>=p.length);++U)b[U+S]=p[U];return U}function te(p,b){return p instanceof b||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===b.name}function xe(p){return p!==p}let Ce=(function(){let p="0123456789abcdef",b=new Array(256);for(let S=0;S<16;++S){let F=S*16;for(let U=0;U<16;++U)b[F+U]=p[S]+p[U]}return b})();function ye(p){return typeof BigInt>"u"?Ie:p}function Ie(){throw new Error("BigInt not supported")}return Rt}var ir,yi,yr,bi,Rt,mi,tc=ft(()=>{be(),ve(),me(),ir={},yi=!1,yr={},bi=!1,Rt={},mi=!1}),it={};lr(it,{Buffer:()=>an,INSPECT_MAX_BYTES:()=>h0,default:()=>Bt,kMaxLength:()=>p0});var Bt,an,h0,p0,st=ft(()=>{be(),ve(),me(),tc(),Bt=ec(),Bt.Buffer,Bt.SlowBuffer,Bt.INSPECT_MAX_BYTES,Bt.kMaxLength,an=Bt.Buffer,h0=Bt.INSPECT_MAX_BYTES,p0=Bt.kMaxLength}),ve=ft(()=>{st()}),et=we((o,e)=>{"use strict";be(),ve(),me();var r=class extends Error{constructor(h){if(!Array.isArray(h))throw new TypeError(`Expected input to be an Array, got ${typeof h}`);let d="";for(let t=0;t<h.length;t++)d+=` ${h[t].stack}
|
|
2
|
+
`;super(d),this.name="AggregateError",this.errors=h}};e.exports={AggregateError:r,ArrayIsArray(h){return Array.isArray(h)},ArrayPrototypeIncludes(h,d){return h.includes(d)},ArrayPrototypeIndexOf(h,d){return h.indexOf(d)},ArrayPrototypeJoin(h,d){return h.join(d)},ArrayPrototypeMap(h,d){return h.map(d)},ArrayPrototypePop(h,d){return h.pop(d)},ArrayPrototypePush(h,d){return h.push(d)},ArrayPrototypeSlice(h,d,t){return h.slice(d,t)},Error,FunctionPrototypeCall(h,d,...t){return h.call(d,...t)},FunctionPrototypeSymbolHasInstance(h,d){return Function.prototype[Symbol.hasInstance].call(h,d)},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(h,d){return Object.defineProperties(h,d)},ObjectDefineProperty(h,d,t){return Object.defineProperty(h,d,t)},ObjectGetOwnPropertyDescriptor(h,d){return Object.getOwnPropertyDescriptor(h,d)},ObjectKeys(h){return Object.keys(h)},ObjectSetPrototypeOf(h,d){return Object.setPrototypeOf(h,d)},Promise,PromisePrototypeCatch(h,d){return h.catch(d)},PromisePrototypeThen(h,d,t){return h.then(d,t)},PromiseReject(h){return Promise.reject(h)},PromiseResolve(h){return Promise.resolve(h)},ReflectApply:Reflect.apply,RegExpPrototypeTest(h,d){return h.test(d)},SafeSet:Set,String,StringPrototypeSlice(h,d,t){return h.slice(d,t)},StringPrototypeToLowerCase(h){return h.toLowerCase()},StringPrototypeToUpperCase(h){return h.toUpperCase()},StringPrototypeTrim(h){return h.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(h,d,t){return h.set(d,t)},Boolean,Uint8Array}}),d0=we((o,e)=>{"use strict";be(),ve(),me(),e.exports={format(r,...h){return r.replace(/%([sdifj])/g,function(...[d,t]){let n=h.shift();return t==="f"?n.toFixed(6):t==="j"?JSON.stringify(n):t==="s"&&typeof n=="object"?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})},inspect(r){switch(typeof r){case"string":if(r.includes("'"))if(r.includes('"')){if(!r.includes("`")&&!r.includes("${"))return`\`${r}\``}else return`"${r}"`;return`'${r}'`;case"number":return isNaN(r)?"NaN":Object.is(r,-0)?String(r):r;case"bigint":return`${String(r)}n`;case"boolean":case"undefined":return String(r);case"object":return"{}"}}}}),ht=we((o,e)=>{"use strict";be(),ve(),me();var{format:r,inspect:h}=d0(),{AggregateError:d}=et(),t=globalThis.AggregateError||d,n=Symbol("kIsNodeError"),i=["string","function","number","object","Function","Object","boolean","bigint","symbol"],f=/^([A-Z][a-z0-9]*)+$/,c="__node_internal_",l={};function g(a,m){if(!a)throw new l.ERR_INTERNAL_ASSERTION(m)}function u(a){let m="",_=a.length,w=a[0]==="-"?1:0;for(;_>=w+4;_-=3)m=`_${a.slice(_-3,_)}${m}`;return`${a.slice(0,_)}${m}`}function s(a,m,_){if(typeof m=="function")return g(m.length<=_.length,`Code: ${a}; The provided arguments length (${_.length}) does not match the required ones (${m.length}).`),m(..._);let w=(m.match(/%[dfijoOs]/g)||[]).length;return g(w===_.length,`Code: ${a}; The provided arguments length (${_.length}) does not match the required ones (${w}).`),_.length===0?m:r(m,..._)}function x(a,m,_){_||(_=Error);class w extends _{constructor(...k){super(s(a,m,k))}toString(){return`${this.name} [${a}]: ${this.message}`}}Object.defineProperties(w.prototype,{name:{value:_.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${a}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),w.prototype.code=a,w.prototype[n]=!0,l[a]=w}function E(a){let m=c+a.name;return Object.defineProperty(a,"name",{value:m}),a}function v(a,m){if(a&&m&&a!==m){if(Array.isArray(m.errors))return m.errors.push(a),m;let _=new t([m,a],m.message);return _.code=m.code,_}return a||m}var y=class extends Error{constructor(a="The operation was aborted",m=void 0){if(m!==void 0&&typeof m!="object")throw new l.ERR_INVALID_ARG_TYPE("options","Object",m);super(a,m),this.code="ABORT_ERR",this.name="AbortError"}};x("ERR_ASSERTION","%s",Error),x("ERR_INVALID_ARG_TYPE",(a,m,_)=>{g(typeof a=="string","'name' must be a string"),Array.isArray(m)||(m=[m]);let w="The ";a.endsWith(" argument")?w+=`${a} `:w+=`"${a}" ${a.includes(".")?"property":"argument"} `,w+="must be ";let B=[],k=[],R=[];for(let O of m)g(typeof O=="string","All expected entries have to be of type string"),i.includes(O)?B.push(O.toLowerCase()):f.test(O)?k.push(O):(g(O!=="object",'The value "object" should be written as "Object"'),R.push(O));if(k.length>0){let O=B.indexOf("object");O!==-1&&(B.splice(B,O,1),k.push("Object"))}if(B.length>0){switch(B.length){case 1:w+=`of type ${B[0]}`;break;case 2:w+=`one of type ${B[0]} or ${B[1]}`;break;default:{let O=B.pop();w+=`one of type ${B.join(", ")}, or ${O}`}}(k.length>0||R.length>0)&&(w+=" or ")}if(k.length>0){switch(k.length){case 1:w+=`an instance of ${k[0]}`;break;case 2:w+=`an instance of ${k[0]} or ${k[1]}`;break;default:{let O=k.pop();w+=`an instance of ${k.join(", ")}, or ${O}`}}R.length>0&&(w+=" or ")}switch(R.length){case 0:break;case 1:R[0].toLowerCase()!==R[0]&&(w+="an "),w+=`${R[0]}`;break;case 2:w+=`one of ${R[0]} or ${R[1]}`;break;default:{let O=R.pop();w+=`one of ${R.join(", ")}, or ${O}`}}if(_==null)w+=`. Received ${_}`;else if(typeof _=="function"&&_.name)w+=`. Received function ${_.name}`;else if(typeof _=="object"){var M;if((M=_.constructor)!==null&&M!==void 0&&M.name)w+=`. Received an instance of ${_.constructor.name}`;else{let O=h(_,{depth:-1});w+=`. Received ${O}`}}else{let O=h(_,{colors:!1});O.length>25&&(O=`${O.slice(0,25)}...`),w+=`. Received type ${typeof _} (${O})`}return w},TypeError),x("ERR_INVALID_ARG_VALUE",(a,m,_="is invalid")=>{let w=h(m);return w.length>128&&(w=w.slice(0,128)+"..."),`The ${a.includes(".")?"property":"argument"} '${a}' ${_}. Received ${w}`},TypeError),x("ERR_INVALID_RETURN_VALUE",(a,m,_)=>{var w;let B=_!=null&&(w=_.constructor)!==null&&w!==void 0&&w.name?`instance of ${_.constructor.name}`:`type ${typeof _}`;return`Expected ${a} to be returned from the "${m}" function but got ${B}.`},TypeError),x("ERR_MISSING_ARGS",(...a)=>{g(a.length>0,"At least one arg needs to be specified");let m,_=a.length;switch(a=(Array.isArray(a)?a:[a]).map(w=>`"${w}"`).join(" or "),_){case 1:m+=`The ${a[0]} argument`;break;case 2:m+=`The ${a[0]} and ${a[1]} arguments`;break;default:{let w=a.pop();m+=`The ${a.join(", ")}, and ${w} arguments`}break}return`${m} must be specified`},TypeError),x("ERR_OUT_OF_RANGE",(a,m,_)=>{g(m,'Missing "range" argument');let w;if(Number.isInteger(_)&&Math.abs(_)>2**32)w=u(String(_));else if(typeof _=="bigint"){w=String(_);let B=BigInt(2)**BigInt(32);(_>B||_<-B)&&(w=u(w)),w+="n"}else w=h(_);return`The value of "${a}" is out of range. It must be ${m}. Received ${w}`},RangeError),x("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),x("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),x("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),x("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),x("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),x("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),x("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),x("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),x("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),x("ERR_STREAM_WRITE_AFTER_END","write after end",Error),x("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:y,aggregateTwoErrors:E(v),hideStackFrames:E,codes:l}}),wr=we((o,e)=>{"use strict";be(),ve(),me();var{AbortController:r,AbortSignal:h}=typeof self<"u"?self:typeof window<"u"?window:void 0;e.exports=r,e.exports.AbortSignal=h,e.exports.default=r}),Wt={};lr(Wt,{EventEmitter:()=>g0,default:()=>sr,defaultMaxListeners:()=>x0,init:()=>y0,listenerCount:()=>b0,on:()=>m0,once:()=>v0});function rc(){if(vi)return br;vi=!0;var o=typeof Reflect=="object"?Reflect:null,e=o&&typeof o.apply=="function"?o.apply:function(_,w,B){return Function.prototype.apply.call(_,w,B)},r;o&&typeof o.ownKeys=="function"?r=o.ownKeys:Object.getOwnPropertySymbols?r=function(_){return Object.getOwnPropertyNames(_).concat(Object.getOwnPropertySymbols(_))}:r=function(_){return Object.getOwnPropertyNames(_)};function h(_){console&&console.warn&&console.warn(_)}var d=Number.isNaN||function(_){return _!==_};function t(){t.init.call(this)}br=t,br.once=y,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._eventsCount=0,t.prototype._maxListeners=void 0;var n=10;function i(_){if(typeof _!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof _)}Object.defineProperty(t,"defaultMaxListeners",{enumerable:!0,get:function(){return n},set:function(_){if(typeof _!="number"||_<0||d(_))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+_+".");n=_}}),t.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},t.prototype.setMaxListeners=function(_){if(typeof _!="number"||_<0||d(_))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+_+".");return this._maxListeners=_,this};function f(_){return _._maxListeners===void 0?t.defaultMaxListeners:_._maxListeners}t.prototype.getMaxListeners=function(){return f(this)},t.prototype.emit=function(_){for(var w=[],B=1;B<arguments.length;B++)w.push(arguments[B]);var k=_==="error",R=this._events;if(R!==void 0)k=k&&R.error===void 0;else if(!k)return!1;if(k){var M;if(w.length>0&&(M=w[0]),M instanceof Error)throw M;var O=new Error("Unhandled error."+(M?" ("+M.message+")":""));throw O.context=M,O}var C=R[_];if(C===void 0)return!1;if(typeof C=="function")e(C,this,w);else for(var A=C.length,I=x(C,A),B=0;B<A;++B)e(I[B],this,w);return!0};function c(_,w,B,k){var R,M,O;if(i(B),M=_._events,M===void 0?(M=_._events=Object.create(null),_._eventsCount=0):(M.newListener!==void 0&&(_.emit("newListener",w,B.listener?B.listener:B),M=_._events),O=M[w]),O===void 0)O=M[w]=B,++_._eventsCount;else if(typeof O=="function"?O=M[w]=k?[B,O]:[O,B]:k?O.unshift(B):O.push(B),R=f(_),R>0&&O.length>R&&!O.warned){O.warned=!0;var C=new Error("Possible EventEmitter memory leak detected. "+O.length+" "+String(w)+" listeners added. Use emitter.setMaxListeners() to increase limit");C.name="MaxListenersExceededWarning",C.emitter=_,C.type=w,C.count=O.length,h(C)}return _}t.prototype.addListener=function(_,w){return c(this,_,w,!1)},t.prototype.on=t.prototype.addListener,t.prototype.prependListener=function(_,w){return c(this,_,w,!0)};function l(){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 g(_,w,B){var k={fired:!1,wrapFn:void 0,target:_,type:w,listener:B},R=l.bind(k);return R.listener=B,k.wrapFn=R,R}t.prototype.once=function(_,w){return i(w),this.on(_,g(this,_,w)),this},t.prototype.prependOnceListener=function(_,w){return i(w),this.prependListener(_,g(this,_,w)),this},t.prototype.removeListener=function(_,w){var B,k,R,M,O;if(i(w),k=this._events,k===void 0)return this;if(B=k[_],B===void 0)return this;if(B===w||B.listener===w)--this._eventsCount===0?this._events=Object.create(null):(delete k[_],k.removeListener&&this.emit("removeListener",_,B.listener||w));else if(typeof B!="function"){for(R=-1,M=B.length-1;M>=0;M--)if(B[M]===w||B[M].listener===w){O=B[M].listener,R=M;break}if(R<0)return this;R===0?B.shift():E(B,R),B.length===1&&(k[_]=B[0]),k.removeListener!==void 0&&this.emit("removeListener",_,O||w)}return this},t.prototype.off=t.prototype.removeListener,t.prototype.removeAllListeners=function(_){var w,B,k;if(B=this._events,B===void 0)return this;if(B.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):B[_]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete B[_]),this;if(arguments.length===0){var R=Object.keys(B),M;for(k=0;k<R.length;++k)M=R[k],M!=="removeListener"&&this.removeAllListeners(M);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(w=B[_],typeof w=="function")this.removeListener(_,w);else if(w!==void 0)for(k=w.length-1;k>=0;k--)this.removeListener(_,w[k]);return this};function u(_,w,B){var k=_._events;if(k===void 0)return[];var R=k[w];return R===void 0?[]:typeof R=="function"?B?[R.listener||R]:[R]:B?v(R):x(R,R.length)}t.prototype.listeners=function(_){return u(this,_,!0)},t.prototype.rawListeners=function(_){return u(this,_,!1)},t.listenerCount=function(_,w){return typeof _.listenerCount=="function"?_.listenerCount(w):s.call(_,w)},t.prototype.listenerCount=s;function s(_){var w=this._events;if(w!==void 0){var B=w[_];if(typeof B=="function")return 1;if(B!==void 0)return B.length}return 0}t.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};function x(_,w){for(var B=new Array(w),k=0;k<w;++k)B[k]=_[k];return B}function E(_,w){for(;w+1<_.length;w++)_[w]=_[w+1];_.pop()}function v(_){for(var w=new Array(_.length),B=0;B<w.length;++B)w[B]=_[B].listener||_[B];return w}function y(_,w){return new Promise(function(B,k){function R(O){_.removeListener(w,M),k(O)}function M(){typeof _.removeListener=="function"&&_.removeListener("error",R),B([].slice.call(arguments))}m(_,w,M,{once:!0}),w!=="error"&&a(_,R,{once:!0})})}function a(_,w,B){typeof _.on=="function"&&m(_,"error",w,B)}function m(_,w,B,k){if(typeof _.on=="function")k.once?_.once(w,B):_.on(w,B);else if(typeof _.addEventListener=="function")_.addEventListener(w,function R(M){k.once&&_.removeEventListener(w,R),B(M)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof _)}return br}var br,vi,sr,g0,x0,y0,b0,m0,v0,er=ft(()=>{be(),ve(),me(),br={},vi=!1,sr=rc(),sr.once,sr.once=function(o,e){return new Promise((r,h)=>{function d(...n){t!==void 0&&o.removeListener("error",t),r(n)}let t;e!=="error"&&(t=n=>{o.removeListener(name,d),h(n)},o.once("error",t)),o.once(e,d)})},sr.on=function(o,e){let r=[],h=[],d=null,t=!1,n={async next(){let c=r.shift();if(c)return createIterResult(c,!1);if(d){let l=Promise.reject(d);return d=null,l}return t?createIterResult(void 0,!0):new Promise((l,g)=>h.push({resolve:l,reject:g}))},async return(){o.removeListener(e,i),o.removeListener("error",f),t=!0;for(let c of h)c.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(c){d=c,o.removeListener(e,i),o.removeListener("error",f)},[Symbol.asyncIterator](){return this}};return o.on(e,i),o.on("error",f),n;function i(...c){let l=h.shift();l?l.resolve(createIterResult(c,!1)):r.push(c)}function f(c){t=!0;let l=h.shift();l?l.reject(c):d=c,n.return()}},{EventEmitter:g0,defaultMaxListeners:x0,init:y0,listenerCount:b0,on:m0,once:v0}=sr}),dt=we((o,e)=>{"use strict";be(),ve(),me();var r=(st(),He(it)),{format:h,inspect:d}=d0(),{codes:{ERR_INVALID_ARG_TYPE:t}}=ht(),{kResistStopPropagation:n,AggregateError:i,SymbolDispose:f}=et(),c=globalThis.AbortSignal||wr().AbortSignal,l=globalThis.AbortController||wr().AbortController,g=Object.getPrototypeOf(async function(){}).constructor,u=globalThis.Blob||r.Blob,s=typeof u<"u"?function(v){return v instanceof u}:function(v){return!1},x=(v,y)=>{if(v!==void 0&&(v===null||typeof v!="object"||!("aborted"in v)))throw new t(y,"AbortSignal",v)},E=(v,y)=>{if(typeof v!="function")throw new t(y,"Function",v)};e.exports={AggregateError:i,kEmptyObject:Object.freeze({}),once(v){let y=!1;return function(...a){y||(y=!0,v.apply(this,a))}},createDeferredPromise:function(){let v,y;return{promise:new Promise((a,m)=>{v=a,y=m}),resolve:v,reject:y}},promisify(v){return new Promise((y,a)=>{v((m,..._)=>m?a(m):y(..._))})},debuglog(){return function(){}},format:h,inspect:d,types:{isAsyncFunction(v){return v instanceof g},isArrayBufferView(v){return ArrayBuffer.isView(v)}},isBlob:s,deprecate(v,y){return v},addAbortListener:(er(),He(Wt)).addAbortListener||function(v,y){if(v===void 0)throw new t("signal","AbortSignal",v);x(v,"signal"),E(y,"listener");let a;return v.aborted?queueMicrotask(()=>y()):(v.addEventListener("abort",y,{__proto__:null,once:!0,[n]:!0}),a=()=>{v.removeEventListener("abort",y)}),{__proto__:null,[f](){var m;(m=a)===null||m===void 0||m()}}},AbortSignalAny:c.any||function(v){if(v.length===1)return v[0];let y=new l,a=()=>y.abort();return v.forEach(m=>{x(m,"signals"),m.addEventListener("abort",a,{once:!0})}),y.signal.addEventListener("abort",()=>{v.forEach(m=>m.removeEventListener("abort",a))},{once:!0}),y.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),Er=we((o,e)=>{"use strict";be(),ve(),me();var{ArrayIsArray:r,ArrayPrototypeIncludes:h,ArrayPrototypeJoin:d,ArrayPrototypeMap:t,NumberIsInteger:n,NumberIsNaN:i,NumberMAX_SAFE_INTEGER:f,NumberMIN_SAFE_INTEGER:c,NumberParseInt:l,ObjectPrototypeHasOwnProperty:g,RegExpPrototypeExec:u,String:s,StringPrototypeToUpperCase:x,StringPrototypeTrim:E}=et(),{hideStackFrames:v,codes:{ERR_SOCKET_BAD_PORT:y,ERR_INVALID_ARG_TYPE:a,ERR_INVALID_ARG_VALUE:m,ERR_OUT_OF_RANGE:_,ERR_UNKNOWN_SIGNAL:w}}=ht(),{normalizeEncoding:B}=dt(),{isAsyncFunction:k,isArrayBufferView:R}=dt().types,M={};function O(te){return te===(te|0)}function C(te){return te===te>>>0}var A=/^[0-7]+$/,I="must be a 32-bit unsigned integer or an octal string";function T(te,xe,Ce){if(typeof te>"u"&&(te=Ce),typeof te=="string"){if(u(A,te)===null)throw new m(xe,te,I);te=l(te,8)}return K(te,xe),te}var N=v((te,xe,Ce=c,ye=f)=>{if(typeof te!="number")throw new a(xe,"number",te);if(!n(te))throw new _(xe,"an integer",te);if(te<Ce||te>ye)throw new _(xe,`>= ${Ce} && <= ${ye}`,te)}),Y=v((te,xe,Ce=-2147483648,ye=2147483647)=>{if(typeof te!="number")throw new a(xe,"number",te);if(!n(te))throw new _(xe,"an integer",te);if(te<Ce||te>ye)throw new _(xe,`>= ${Ce} && <= ${ye}`,te)}),K=v((te,xe,Ce=!1)=>{if(typeof te!="number")throw new a(xe,"number",te);if(!n(te))throw new _(xe,"an integer",te);let ye=Ce?1:0,Ie=4294967295;if(te<ye||te>Ie)throw new _(xe,`>= ${ye} && <= ${Ie}`,te)});function Q(te,xe){if(typeof te!="string")throw new a(xe,"string",te)}function L(te,xe,Ce=void 0,ye){if(typeof te!="number")throw new a(xe,"number",te);if(Ce!=null&&te<Ce||ye!=null&&te>ye||(Ce!=null||ye!=null)&&i(te))throw new _(xe,`${Ce!=null?`>= ${Ce}`:""}${Ce!=null&&ye!=null?" && ":""}${ye!=null?`<= ${ye}`:""}`,te)}var P=v((te,xe,Ce)=>{if(!h(Ce,te)){let ye="must be one of: "+d(t(Ce,Ie=>typeof Ie=="string"?`'${Ie}'`:s(Ie)),", ");throw new m(xe,te,ye)}});function W(te,xe){if(typeof te!="boolean")throw new a(xe,"boolean",te)}function D(te,xe,Ce){return te==null||!g(te,xe)?Ce:te[xe]}var ee=v((te,xe,Ce=null)=>{let ye=D(Ce,"allowArray",!1),Ie=D(Ce,"allowFunction",!1);if(!D(Ce,"nullable",!1)&&te===null||!ye&&r(te)||typeof te!="object"&&(!Ie||typeof te!="function"))throw new a(xe,"Object",te)}),le=v((te,xe)=>{if(te!=null&&typeof te!="object"&&typeof te!="function")throw new a(xe,"a dictionary",te)}),$=v((te,xe,Ce=0)=>{if(!r(te))throw new a(xe,"Array",te);if(te.length<Ce){let ye=`must be longer than ${Ce}`;throw new m(xe,te,ye)}});function ce(te,xe){$(te,xe);for(let Ce=0;Ce<te.length;Ce++)Q(te[Ce],`${xe}[${Ce}]`)}function ie(te,xe){$(te,xe);for(let Ce=0;Ce<te.length;Ce++)W(te[Ce],`${xe}[${Ce}]`)}function H(te,xe){$(te,xe);for(let Ce=0;Ce<te.length;Ce++){let ye=te[Ce],Ie=`${xe}[${Ce}]`;if(ye==null)throw new a(Ie,"AbortSignal",ye);pe(ye,Ie)}}function ae(te,xe="signal"){if(Q(te,xe),M[te]===void 0)throw M[x(te)]!==void 0?new w(te+" (signals must use all capital letters)"):new w(te)}var Z=v((te,xe="buffer")=>{if(!R(te))throw new a(xe,["Buffer","TypedArray","DataView"],te)});function ne(te,xe){let Ce=B(xe),ye=te.length;if(Ce==="hex"&&ye%2!==0)throw new m("encoding",xe,`is invalid for data of length ${ye}`)}function re(te,xe="Port",Ce=!0){if(typeof te!="number"&&typeof te!="string"||typeof te=="string"&&E(te).length===0||+te!==+te>>>0||te>65535||te===0&&!Ce)throw new y(xe,te,Ce);return te|0}var pe=v((te,xe)=>{if(te!==void 0&&(te===null||typeof te!="object"||!("aborted"in te)))throw new a(xe,"AbortSignal",te)}),fe=v((te,xe)=>{if(typeof te!="function")throw new a(xe,"Function",te)}),z=v((te,xe)=>{if(typeof te!="function"||k(te))throw new a(xe,"Function",te)}),J=v((te,xe)=>{if(te!==void 0)throw new a(xe,"undefined",te)});function ue(te,xe,Ce){if(!h(Ce,te))throw new a(xe,`('${d(Ce,"|")}')`,te)}var de=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function he(te,xe){if(typeof te>"u"||!u(de,te))throw new m(xe,te,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function ge(te){if(typeof te=="string")return he(te,"hints"),te;if(r(te)){let xe=te.length,Ce="";if(xe===0)return Ce;for(let ye=0;ye<xe;ye++){let Ie=te[ye];he(Ie,"hints"),Ce+=Ie,ye!==xe-1&&(Ce+=", ")}return Ce}throw new m("hints",te,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}e.exports={isInt32:O,isUint32:C,parseFileMode:T,validateArray:$,validateStringArray:ce,validateBooleanArray:ie,validateAbortSignalArray:H,validateBoolean:W,validateBuffer:Z,validateDictionary:le,validateEncoding:ne,validateFunction:fe,validateInt32:Y,validateInteger:N,validateNumber:L,validateObject:ee,validateOneOf:P,validatePlainFunction:z,validatePort:re,validateSignalName:ae,validateString:Q,validateUint32:K,validateUndefined:J,validateUnion:ue,validateAbortSignal:pe,validateLinkHeaderValue:ge}}),Ft=we((o,e)=>{"use strict";be(),ve(),me();var{SymbolAsyncIterator:r,SymbolIterator:h,SymbolFor:d}=et(),t=d("nodejs.stream.destroyed"),n=d("nodejs.stream.errored"),i=d("nodejs.stream.readable"),f=d("nodejs.stream.writable"),c=d("nodejs.stream.disturbed"),l=d("nodejs.webstream.isClosedPromise"),g=d("nodejs.webstream.controllerErrorFunction");function u(D,ee=!1){var le;return!!(D&&typeof D.pipe=="function"&&typeof D.on=="function"&&(!ee||typeof D.pause=="function"&&typeof D.resume=="function")&&(!D._writableState||((le=D._readableState)===null||le===void 0?void 0:le.readable)!==!1)&&(!D._writableState||D._readableState))}function s(D){var ee;return!!(D&&typeof D.write=="function"&&typeof D.on=="function"&&(!D._readableState||((ee=D._writableState)===null||ee===void 0?void 0:ee.writable)!==!1))}function x(D){return!!(D&&typeof D.pipe=="function"&&D._readableState&&typeof D.on=="function"&&typeof D.write=="function")}function E(D){return D&&(D._readableState||D._writableState||typeof D.write=="function"&&typeof D.on=="function"||typeof D.pipe=="function"&&typeof D.on=="function")}function v(D){return!!(D&&!E(D)&&typeof D.pipeThrough=="function"&&typeof D.getReader=="function"&&typeof D.cancel=="function")}function y(D){return!!(D&&!E(D)&&typeof D.getWriter=="function"&&typeof D.abort=="function")}function a(D){return!!(D&&!E(D)&&typeof D.readable=="object"&&typeof D.writable=="object")}function m(D){return v(D)||y(D)||a(D)}function _(D,ee){return D==null?!1:ee===!0?typeof D[r]=="function":ee===!1?typeof D[h]=="function":typeof D[r]=="function"||typeof D[h]=="function"}function w(D){if(!E(D))return null;let ee=D._writableState,le=D._readableState,$=ee||le;return!!(D.destroyed||D[t]||$!=null&&$.destroyed)}function B(D){if(!s(D))return null;if(D.writableEnded===!0)return!0;let ee=D._writableState;return ee!=null&&ee.errored?!1:typeof ee?.ended!="boolean"?null:ee.ended}function k(D,ee){if(!s(D))return null;if(D.writableFinished===!0)return!0;let le=D._writableState;return le!=null&&le.errored?!1:typeof le?.finished!="boolean"?null:!!(le.finished||ee===!1&&le.ended===!0&&le.length===0)}function R(D){if(!u(D))return null;if(D.readableEnded===!0)return!0;let ee=D._readableState;return!ee||ee.errored?!1:typeof ee?.ended!="boolean"?null:ee.ended}function M(D,ee){if(!u(D))return null;let le=D._readableState;return le!=null&&le.errored?!1:typeof le?.endEmitted!="boolean"?null:!!(le.endEmitted||ee===!1&&le.ended===!0&&le.length===0)}function O(D){return D&&D[i]!=null?D[i]:typeof D?.readable!="boolean"?null:w(D)?!1:u(D)&&D.readable&&!M(D)}function C(D){return D&&D[f]!=null?D[f]:typeof D?.writable!="boolean"?null:w(D)?!1:s(D)&&D.writable&&!B(D)}function A(D,ee){return E(D)?w(D)?!0:!(ee?.readable!==!1&&O(D)||ee?.writable!==!1&&C(D)):null}function I(D){var ee,le;return E(D)?D.writableErrored?D.writableErrored:(ee=(le=D._writableState)===null||le===void 0?void 0:le.errored)!==null&&ee!==void 0?ee:null:null}function T(D){var ee,le;return E(D)?D.readableErrored?D.readableErrored:(ee=(le=D._readableState)===null||le===void 0?void 0:le.errored)!==null&&ee!==void 0?ee:null:null}function N(D){if(!E(D))return null;if(typeof D.closed=="boolean")return D.closed;let ee=D._writableState,le=D._readableState;return typeof ee?.closed=="boolean"||typeof le?.closed=="boolean"?ee?.closed||le?.closed:typeof D._closed=="boolean"&&Y(D)?D._closed:null}function Y(D){return typeof D._closed=="boolean"&&typeof D._defaultKeepAlive=="boolean"&&typeof D._removedConnection=="boolean"&&typeof D._removedContLen=="boolean"}function K(D){return typeof D._sent100=="boolean"&&Y(D)}function Q(D){var ee;return typeof D._consuming=="boolean"&&typeof D._dumped=="boolean"&&((ee=D.req)===null||ee===void 0?void 0:ee.upgradeOrConnect)===void 0}function L(D){if(!E(D))return null;let ee=D._writableState,le=D._readableState,$=ee||le;return!$&&K(D)||!!($&&$.autoDestroy&&$.emitClose&&$.closed===!1)}function P(D){var ee;return!!(D&&((ee=D[c])!==null&&ee!==void 0?ee:D.readableDidRead||D.readableAborted))}function W(D){var ee,le,$,ce,ie,H,ae,Z,ne,re;return!!(D&&((ee=(le=($=(ce=(ie=(H=D[n])!==null&&H!==void 0?H:D.readableErrored)!==null&&ie!==void 0?ie:D.writableErrored)!==null&&ce!==void 0?ce:(ae=D._readableState)===null||ae===void 0?void 0:ae.errorEmitted)!==null&&$!==void 0?$:(Z=D._writableState)===null||Z===void 0?void 0:Z.errorEmitted)!==null&&le!==void 0?le:(ne=D._readableState)===null||ne===void 0?void 0:ne.errored)!==null&&ee!==void 0?ee:!((re=D._writableState)===null||re===void 0)&&re.errored))}e.exports={isDestroyed:w,kIsDestroyed:t,isDisturbed:P,kIsDisturbed:c,isErrored:W,kIsErrored:n,isReadable:O,kIsReadable:i,kIsClosedPromise:l,kControllerErrorFunction:g,kIsWritable:f,isClosed:N,isDuplexNodeStream:x,isFinished:A,isIterable:_,isReadableNodeStream:u,isReadableStream:v,isReadableEnded:R,isReadableFinished:M,isReadableErrored:T,isNodeStream:E,isWebStream:m,isWritable:C,isWritableNodeStream:s,isWritableStream:y,isWritableEnded:B,isWritableFinished:k,isWritableErrored:I,isServerRequest:Q,isServerResponse:K,willEmitClose:L,isTransformStream:a}}),Ht=we((o,e)=>{"use strict";be(),ve(),me();var r=(qt(),He($e)),{AbortError:h,codes:d}=ht(),{ERR_INVALID_ARG_TYPE:t,ERR_STREAM_PREMATURE_CLOSE:n}=d,{kEmptyObject:i,once:f}=dt(),{validateAbortSignal:c,validateFunction:l,validateObject:g,validateBoolean:u}=Er(),{Promise:s,PromisePrototypeThen:x,SymbolDispose:E}=et(),{isClosed:v,isReadable:y,isReadableNodeStream:a,isReadableStream:m,isReadableFinished:_,isReadableErrored:w,isWritable:B,isWritableNodeStream:k,isWritableStream:R,isWritableFinished:M,isWritableErrored:O,isNodeStream:C,willEmitClose:A,kIsClosedPromise:I}=Ft(),T;function N(P){return P.setHeader&&typeof P.abort=="function"}var Y=()=>{};function K(P,W,D){var ee,le;if(arguments.length===2?(D=W,W=i):W==null?W=i:g(W,"options"),l(D,"callback"),c(W.signal,"options.signal"),D=f(D),m(P)||R(P))return Q(P,W,D);if(!C(P))throw new t("stream",["ReadableStream","WritableStream","Stream"],P);let $=(ee=W.readable)!==null&&ee!==void 0?ee:a(P),ce=(le=W.writable)!==null&&le!==void 0?le:k(P),ie=P._writableState,H=P._readableState,ae=()=>{P.writable||re()},Z=A(P)&&a(P)===$&&k(P)===ce,ne=M(P,!1),re=()=>{ne=!0,P.destroyed&&(Z=!1),!(Z&&(!P.readable||$))&&(!$||pe)&&D.call(P)},pe=_(P,!1),fe=()=>{pe=!0,P.destroyed&&(Z=!1),!(Z&&(!P.writable||ce))&&(!ce||ne)&&D.call(P)},z=te=>{D.call(P,te)},J=v(P),ue=()=>{J=!0;let te=O(P)||w(P);if(te&&typeof te!="boolean")return D.call(P,te);if($&&!pe&&a(P,!0)&&!_(P,!1))return D.call(P,new n);if(ce&&!ne&&!M(P,!1))return D.call(P,new n);D.call(P)},de=()=>{J=!0;let te=O(P)||w(P);if(te&&typeof te!="boolean")return D.call(P,te);D.call(P)},he=()=>{P.req.on("finish",re)};N(P)?(P.on("complete",re),Z||P.on("abort",ue),P.req?he():P.on("request",he)):ce&&!ie&&(P.on("end",ae),P.on("close",ae)),!Z&&typeof P.aborted=="boolean"&&P.on("aborted",ue),P.on("end",fe),P.on("finish",re),W.error!==!1&&P.on("error",z),P.on("close",ue),J?r.nextTick(ue):ie!=null&&ie.errorEmitted||H!=null&&H.errorEmitted?Z||r.nextTick(de):(!$&&(!Z||y(P))&&(ne||B(P)===!1)||!ce&&(!Z||B(P))&&(pe||y(P)===!1)||H&&P.req&&P.aborted)&&r.nextTick(de);let ge=()=>{D=Y,P.removeListener("aborted",ue),P.removeListener("complete",re),P.removeListener("abort",ue),P.removeListener("request",he),P.req&&P.req.removeListener("finish",re),P.removeListener("end",ae),P.removeListener("close",ae),P.removeListener("finish",re),P.removeListener("end",fe),P.removeListener("error",z),P.removeListener("close",ue)};if(W.signal&&!J){let te=()=>{let xe=D;ge(),xe.call(P,new h(void 0,{cause:W.signal.reason}))};if(W.signal.aborted)r.nextTick(te);else{T=T||dt().addAbortListener;let xe=T(W.signal,te),Ce=D;D=f((...ye)=>{xe[E](),Ce.apply(P,ye)})}}return ge}function Q(P,W,D){let ee=!1,le=Y;if(W.signal)if(le=()=>{ee=!0,D.call(P,new h(void 0,{cause:W.signal.reason}))},W.signal.aborted)r.nextTick(le);else{T=T||dt().addAbortListener;let ce=T(W.signal,le),ie=D;D=f((...H)=>{ce[E](),ie.apply(P,H)})}let $=(...ce)=>{ee||r.nextTick(()=>D.apply(P,ce))};return x(P[I].promise,$,$),Y}function L(P,W){var D;let ee=!1;return W===null&&(W=i),(D=W)!==null&&D!==void 0&&D.cleanup&&(u(W.cleanup,"cleanup"),ee=W.cleanup),new s((le,$)=>{let ce=K(P,W,ie=>{ee&&ce(),ie?$(ie):le()})})}e.exports=K,e.exports.finished=L}),ur=we((o,e)=>{"use strict";be(),ve(),me();var r=(qt(),He($e)),{aggregateTwoErrors:h,codes:{ERR_MULTIPLE_CALLBACK:d},AbortError:t}=ht(),{Symbol:n}=et(),{kIsDestroyed:i,isDestroyed:f,isFinished:c,isServerRequest:l}=Ft(),g=n("kDestroy"),u=n("kConstruct");function s(A,I,T){A&&(A.stack,I&&!I.errored&&(I.errored=A),T&&!T.errored&&(T.errored=A))}function x(A,I){let T=this._readableState,N=this._writableState,Y=N||T;return N!=null&&N.destroyed||T!=null&&T.destroyed?(typeof I=="function"&&I(),this):(s(A,N,T),N&&(N.destroyed=!0),T&&(T.destroyed=!0),Y.constructed?E(this,A,I):this.once(g,function(K){E(this,h(K,A),I)}),this)}function E(A,I,T){let N=!1;function Y(K){if(N)return;N=!0;let Q=A._readableState,L=A._writableState;s(K,L,Q),L&&(L.closed=!0),Q&&(Q.closed=!0),typeof T=="function"&&T(K),K?r.nextTick(v,A,K):r.nextTick(y,A)}try{A._destroy(I||null,Y)}catch(K){Y(K)}}function v(A,I){a(A,I),y(A)}function y(A){let I=A._readableState,T=A._writableState;T&&(T.closeEmitted=!0),I&&(I.closeEmitted=!0),(T!=null&&T.emitClose||I!=null&&I.emitClose)&&A.emit("close")}function a(A,I){let T=A._readableState,N=A._writableState;N!=null&&N.errorEmitted||T!=null&&T.errorEmitted||(N&&(N.errorEmitted=!0),T&&(T.errorEmitted=!0),A.emit("error",I))}function m(){let A=this._readableState,I=this._writableState;A&&(A.constructed=!0,A.closed=!1,A.closeEmitted=!1,A.destroyed=!1,A.errored=null,A.errorEmitted=!1,A.reading=!1,A.ended=A.readable===!1,A.endEmitted=A.readable===!1),I&&(I.constructed=!0,I.destroyed=!1,I.closed=!1,I.closeEmitted=!1,I.errored=null,I.errorEmitted=!1,I.finalCalled=!1,I.prefinished=!1,I.ended=I.writable===!1,I.ending=I.writable===!1,I.finished=I.writable===!1)}function _(A,I,T){let N=A._readableState,Y=A._writableState;if(Y!=null&&Y.destroyed||N!=null&&N.destroyed)return this;N!=null&&N.autoDestroy||Y!=null&&Y.autoDestroy?A.destroy(I):I&&(I.stack,Y&&!Y.errored&&(Y.errored=I),N&&!N.errored&&(N.errored=I),T?r.nextTick(a,A,I):a(A,I))}function w(A,I){if(typeof A._construct!="function")return;let T=A._readableState,N=A._writableState;T&&(T.constructed=!1),N&&(N.constructed=!1),A.once(u,I),!(A.listenerCount(u)>1)&&r.nextTick(B,A)}function B(A){let I=!1;function T(N){if(I){_(A,N??new d);return}I=!0;let Y=A._readableState,K=A._writableState,Q=K||Y;Y&&(Y.constructed=!0),K&&(K.constructed=!0),Q.destroyed?A.emit(g,N):N?_(A,N,!0):r.nextTick(k,A)}try{A._construct(N=>{r.nextTick(T,N)})}catch(N){r.nextTick(T,N)}}function k(A){A.emit(u)}function R(A){return A?.setHeader&&typeof A.abort=="function"}function M(A){A.emit("close")}function O(A,I){A.emit("error",I),r.nextTick(M,A)}function C(A,I){!A||f(A)||(!I&&!c(A)&&(I=new t),l(A)?(A.socket=null,A.destroy(I)):R(A)?A.abort():R(A.req)?A.req.abort():typeof A.destroy=="function"?A.destroy(I):typeof A.close=="function"?A.close():I?r.nextTick(O,A,I):r.nextTick(M,A),A.destroyed||(A[i]=!0))}e.exports={construct:w,destroyer:C,destroy:x,undestroy:m,errorOrDestroy:_}}),xs=we((o,e)=>{"use strict";be(),ve(),me();var{ArrayIsArray:r,ObjectSetPrototypeOf:h}=et(),{EventEmitter:d}=(er(),He(Wt));function t(i){d.call(this,i)}h(t.prototype,d.prototype),h(t,d),t.prototype.pipe=function(i,f){let c=this;function l(y){i.writable&&i.write(y)===!1&&c.pause&&c.pause()}c.on("data",l);function g(){c.readable&&c.resume&&c.resume()}i.on("drain",g),!i._isStdio&&(!f||f.end!==!1)&&(c.on("end",s),c.on("close",x));let u=!1;function s(){u||(u=!0,i.end())}function x(){u||(u=!0,typeof i.destroy=="function"&&i.destroy())}function E(y){v(),d.listenerCount(this,"error")===0&&this.emit("error",y)}n(c,"error",E),n(i,"error",E);function v(){c.removeListener("data",l),i.removeListener("drain",g),c.removeListener("end",s),c.removeListener("close",x),c.removeListener("error",E),i.removeListener("error",E),c.removeListener("end",v),c.removeListener("close",v),i.removeListener("close",v)}return c.on("end",v),c.on("close",v),i.on("close",v),i.emit("pipe",c),i};function n(i,f,c){if(typeof i.prependListener=="function")return i.prependListener(f,c);!i._events||!i._events[f]?i.on(f,c):r(i._events[f])?i._events[f].unshift(c):i._events[f]=[c,i._events[f]]}e.exports={Stream:t,prependListener:n}}),un=we((o,e)=>{"use strict";be(),ve(),me();var{SymbolDispose:r}=et(),{AbortError:h,codes:d}=ht(),{isNodeStream:t,isWebStream:n,kControllerErrorFunction:i}=Ft(),f=Ht(),{ERR_INVALID_ARG_TYPE:c}=d,l,g=(u,s)=>{if(typeof u!="object"||!("aborted"in u))throw new c(s,"AbortSignal",u)};e.exports.addAbortSignal=function(u,s){if(g(u,"signal"),!t(s)&&!n(s))throw new c("stream",["ReadableStream","WritableStream","Stream"],s);return e.exports.addAbortSignalNoValidate(u,s)},e.exports.addAbortSignalNoValidate=function(u,s){if(typeof u!="object"||!("aborted"in u))return s;let x=t(s)?()=>{s.destroy(new h(void 0,{cause:u.reason}))}:()=>{s[i](new h(void 0,{cause:u.reason}))};if(u.aborted)x();else{l=l||dt().addAbortListener;let E=l(u,x);f(s,E[r])}return s}}),nc=we((o,e)=>{"use strict";be(),ve(),me();var{StringPrototypeSlice:r,SymbolIterator:h,TypedArrayPrototypeSet:d,Uint8Array:t}=et(),{Buffer:n}=(st(),He(it)),{inspect:i}=dt();e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(f){let c={data:f,next:null};this.length>0?this.tail.next=c:this.head=c,this.tail=c,++this.length}unshift(f){let c={data:f,next:this.head};this.length===0&&(this.tail=c),this.head=c,++this.length}shift(){if(this.length===0)return;let f=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,f}clear(){this.head=this.tail=null,this.length=0}join(f){if(this.length===0)return"";let c=this.head,l=""+c.data;for(;(c=c.next)!==null;)l+=f+c.data;return l}concat(f){if(this.length===0)return n.alloc(0);let c=n.allocUnsafe(f>>>0),l=this.head,g=0;for(;l;)d(c,l.data,g),g+=l.data.length,l=l.next;return c}consume(f,c){let l=this.head.data;if(f<l.length){let g=l.slice(0,f);return this.head.data=l.slice(f),g}return f===l.length?this.shift():c?this._getString(f):this._getBuffer(f)}first(){return this.head.data}*[h](){for(let f=this.head;f;f=f.next)yield f.data}_getString(f){let c="",l=this.head,g=0;do{let u=l.data;if(f>u.length)c+=u,f-=u.length;else{f===u.length?(c+=u,++g,l.next?this.head=l.next:this.head=this.tail=null):(c+=r(u,0,f),this.head=l,l.data=r(u,f));break}++g}while((l=l.next)!==null);return this.length-=g,c}_getBuffer(f){let c=n.allocUnsafe(f),l=f,g=this.head,u=0;do{let s=g.data;if(f>s.length)d(c,s,l-f),f-=s.length;else{f===s.length?(d(c,s,l-f),++u,g.next?this.head=g.next:this.head=this.tail=null):(d(c,new t(s.buffer,s.byteOffset,f),l-f),this.head=g,g.data=s.slice(f));break}++u}while((g=g.next)!==null);return this.length-=u,c}[Symbol.for("nodejs.util.inspect.custom")](f,c){return i(this,{...c,depth:0,customInspect:!1})}}}),cn=we((o,e)=>{"use strict";be(),ve(),me();var{MathFloor:r,NumberIsInteger:h}=et(),{validateInteger:d}=Er(),{ERR_INVALID_ARG_VALUE:t}=ht().codes,n=16*1024,i=16;function f(u,s,x){return u.highWaterMark!=null?u.highWaterMark:s?u[x]:null}function c(u){return u?i:n}function l(u,s){d(s,"value",0),u?i=s:n=s}function g(u,s,x,E){let v=f(s,E,x);if(v!=null){if(!h(v)||v<0){let y=E?`options.${x}`:"options.highWaterMark";throw new t(y,v)}return r(v)}return c(u.objectMode)}e.exports={getHighWaterMark:g,getDefaultHighWaterMark:c,setDefaultHighWaterMark:l}}),oc=we((o,e)=>{be(),ve(),me();var r=(st(),He(it)),h=r.Buffer;function d(n,i){for(var f in n)i[f]=n[f]}h.from&&h.alloc&&h.allocUnsafe&&h.allocUnsafeSlow?e.exports=r:(d(r,o),o.Buffer=t);function t(n,i,f){return h(n,i,f)}t.prototype=Object.create(h.prototype),d(h,t),t.from=function(n,i,f){if(typeof n=="number")throw new TypeError("Argument must not be a number");return h(n,i,f)},t.alloc=function(n,i,f){if(typeof n!="number")throw new TypeError("Argument must be a number");var c=h(n);return i!==void 0?typeof f=="string"?c.fill(i,f):c.fill(i):c.fill(0),c},t.allocUnsafe=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return h(n)},t.allocUnsafeSlow=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(n)}}),ic=we(o=>{"use strict";be(),ve(),me();var e=oc().Buffer,r=e.isEncoding||function(a){switch(a=""+a,a&&a.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function h(a){if(!a)return"utf8";for(var m;;)switch(a){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return a;default:if(m)return;a=(""+a).toLowerCase(),m=!0}}function d(a){var m=h(a);if(typeof m!="string"&&(e.isEncoding===r||!r(a)))throw new Error("Unknown encoding: "+a);return m||a}o.StringDecoder=t;function t(a){this.encoding=d(a);var m;switch(this.encoding){case"utf16le":this.text=u,this.end=s,m=4;break;case"utf8":this.fillLast=c,m=4;break;case"base64":this.text=x,this.end=E,m=3;break;default:this.write=v,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(m)}t.prototype.write=function(a){if(a.length===0)return"";var m,_;if(this.lastNeed){if(m=this.fillLast(a),m===void 0)return"";_=this.lastNeed,this.lastNeed=0}else _=0;return _<a.length?m?m+this.text(a,_):this.text(a,_):m||""},t.prototype.end=g,t.prototype.text=l,t.prototype.fillLast=function(a){if(this.lastNeed<=a.length)return a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,a.length),this.lastNeed-=a.length};function n(a){return a<=127?0:a>>5===6?2:a>>4===14?3:a>>3===30?4:a>>6===2?-1:-2}function i(a,m,_){var w=m.length-1;if(w<_)return 0;var B=n(m[w]);return B>=0?(B>0&&(a.lastNeed=B-1),B):--w<_||B===-2?0:(B=n(m[w]),B>=0?(B>0&&(a.lastNeed=B-2),B):--w<_||B===-2?0:(B=n(m[w]),B>=0?(B>0&&(B===2?B=0:a.lastNeed=B-3),B):0))}function f(a,m,_){if((m[0]&192)!==128)return a.lastNeed=0,"\uFFFD";if(a.lastNeed>1&&m.length>1){if((m[1]&192)!==128)return a.lastNeed=1,"\uFFFD";if(a.lastNeed>2&&m.length>2&&(m[2]&192)!==128)return a.lastNeed=2,"\uFFFD"}}function c(a){var m=this.lastTotal-this.lastNeed,_=f(this,a,m);if(_!==void 0)return _;if(this.lastNeed<=a.length)return a.copy(this.lastChar,m,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);a.copy(this.lastChar,m,0,a.length),this.lastNeed-=a.length}function l(a,m){var _=i(this,a,m);if(!this.lastNeed)return a.toString("utf8",m);this.lastTotal=_;var w=a.length-(_-this.lastNeed);return a.copy(this.lastChar,0,w),a.toString("utf8",m,w)}function g(a){var m=a&&a.length?this.write(a):"";return this.lastNeed?m+"\uFFFD":m}function u(a,m){if((a.length-m)%2===0){var _=a.toString("utf16le",m);if(_){var w=_.charCodeAt(_.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1],_.slice(0,-1)}return _}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=a[a.length-1],a.toString("utf16le",m,a.length-1)}function s(a){var m=a&&a.length?this.write(a):"";if(this.lastNeed){var _=this.lastTotal-this.lastNeed;return m+this.lastChar.toString("utf16le",0,_)}return m}function x(a,m){var _=(a.length-m)%3;return _===0?a.toString("base64",m):(this.lastNeed=3-_,this.lastTotal=3,_===1?this.lastChar[0]=a[a.length-1]:(this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1]),a.toString("base64",m,a.length-_))}function E(a){var m=a&&a.length?this.write(a):"";return this.lastNeed?m+this.lastChar.toString("base64",0,3-this.lastNeed):m}function v(a){return a.toString(this.encoding)}function y(a){return a&&a.length?this.write(a):""}}),_0=we((o,e)=>{"use strict";be(),ve(),me();var r=(qt(),He($e)),{PromisePrototypeThen:h,SymbolAsyncIterator:d,SymbolIterator:t}=et(),{Buffer:n}=(st(),He(it)),{ERR_INVALID_ARG_TYPE:i,ERR_STREAM_NULL_VALUES:f}=ht().codes;function c(l,g,u){let s;if(typeof g=="string"||g instanceof n)return new l({objectMode:!0,...u,read(){this.push(g),this.push(null)}});let x;if(g&&g[d])x=!0,s=g[d]();else if(g&&g[t])x=!1,s=g[t]();else throw new i("iterable",["Iterable"],g);let E=new l({objectMode:!0,highWaterMark:1,...u}),v=!1;E._read=function(){v||(v=!0,a())},E._destroy=function(m,_){h(y(m),()=>r.nextTick(_,m),w=>r.nextTick(_,w||m))};async function y(m){let _=m!=null,w=typeof s.throw=="function";if(_&&w){let{value:B,done:k}=await s.throw(m);if(await B,k)return}if(typeof s.return=="function"){let{value:B}=await s.return();await B}}async function a(){for(;;){try{let{value:m,done:_}=x?await s.next():s.next();if(_)E.push(null);else{let w=m&&typeof m.then=="function"?await m:m;if(w===null)throw v=!1,new f;if(E.push(w))continue;v=!1}}catch(m){E.destroy(m)}break}}return E}e.exports=c}),fn=we((o,e)=>{"use strict";be(),ve(),me();var r=(qt(),He($e)),{ArrayPrototypeIndexOf:h,NumberIsInteger:d,NumberIsNaN:t,NumberParseInt:n,ObjectDefineProperties:i,ObjectKeys:f,ObjectSetPrototypeOf:c,Promise:l,SafeSet:g,SymbolAsyncDispose:u,SymbolAsyncIterator:s,Symbol:x}=et();e.exports=ye,ye.ReadableState=Ce;var{EventEmitter:E}=(er(),He(Wt)),{Stream:v,prependListener:y}=xs(),{Buffer:a}=(st(),He(it)),{addAbortSignal:m}=un(),_=Ht(),w=dt().debuglog("stream",j=>{w=j}),B=nc(),k=ur(),{getHighWaterMark:R,getDefaultHighWaterMark:M}=cn(),{aggregateTwoErrors:O,codes:{ERR_INVALID_ARG_TYPE:C,ERR_METHOD_NOT_IMPLEMENTED:A,ERR_OUT_OF_RANGE:I,ERR_STREAM_PUSH_AFTER_EOF:T,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:N},AbortError:Y}=ht(),{validateObject:K}=Er(),Q=x("kPaused"),{StringDecoder:L}=ic(),P=_0();c(ye.prototype,v.prototype),c(ye,v);var W=()=>{},{errorOrDestroy:D}=k,ee=1,le=2,$=4,ce=8,ie=16,H=32,ae=64,Z=128,ne=256,re=512,pe=1024,fe=2048,z=4096,J=8192,ue=16384,de=32768,he=65536,ge=1<<17,te=1<<18;function xe(j){return{enumerable:!1,get(){return(this.state&j)!==0},set(q){q?this.state|=j:this.state&=~j}}}i(Ce.prototype,{objectMode:xe(ee),ended:xe(le),endEmitted:xe($),reading:xe(ce),constructed:xe(ie),sync:xe(H),needReadable:xe(ae),emittedReadable:xe(Z),readableListening:xe(ne),resumeScheduled:xe(re),errorEmitted:xe(pe),emitClose:xe(fe),autoDestroy:xe(z),destroyed:xe(J),closed:xe(ue),closeEmitted:xe(de),multiAwaitDrain:xe(he),readingMore:xe(ge),dataEmitted:xe(te)});function Ce(j,q,_e){typeof _e!="boolean"&&(_e=q instanceof Dt()),this.state=fe|z|ie|H,j&&j.objectMode&&(this.state|=ee),_e&&j&&j.readableObjectMode&&(this.state|=ee),this.highWaterMark=j?R(this,j,"readableHighWaterMark",_e):M(!1),this.buffer=new B,this.length=0,this.pipes=[],this.flowing=null,this[Q]=null,j&&j.emitClose===!1&&(this.state&=~fe),j&&j.autoDestroy===!1&&(this.state&=~z),this.errored=null,this.defaultEncoding=j&&j.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,j&&j.encoding&&(this.decoder=new L(j.encoding),this.encoding=j.encoding)}function ye(j){if(!(this instanceof ye))return new ye(j);let q=this instanceof Dt();this._readableState=new Ce(j,this,q),j&&(typeof j.read=="function"&&(this._read=j.read),typeof j.destroy=="function"&&(this._destroy=j.destroy),typeof j.construct=="function"&&(this._construct=j.construct),j.signal&&!q&&m(j.signal,this)),v.call(this,j),k.construct(this,()=>{this._readableState.needReadable&&G(this,this._readableState)})}ye.prototype.destroy=k.destroy,ye.prototype._undestroy=k.undestroy,ye.prototype._destroy=function(j,q){q(j)},ye.prototype[E.captureRejectionSymbol]=function(j){this.destroy(j)},ye.prototype[u]=function(){let j;return this.destroyed||(j=this.readableEnded?null:new Y,this.destroy(j)),new l((q,_e)=>_(this,ke=>ke&&ke!==j?_e(ke):q(null)))},ye.prototype.push=function(j,q){return Ie(this,j,q,!1)},ye.prototype.unshift=function(j,q){return Ie(this,j,q,!0)};function Ie(j,q,_e,ke){w("readableAddChunk",q);let Pe=j._readableState,nt;if((Pe.state&ee)===0&&(typeof q=="string"?(_e=_e||Pe.defaultEncoding,Pe.encoding!==_e&&(ke&&Pe.encoding?q=a.from(q,_e).toString(Pe.encoding):(q=a.from(q,_e),_e=""))):q instanceof a?_e="":v._isUint8Array(q)?(q=v._uint8ArrayToBuffer(q),_e=""):q!=null&&(nt=new C("chunk",["string","Buffer","Uint8Array"],q))),nt)D(j,nt);else if(q===null)Pe.state&=~ce,U(j,Pe);else if((Pe.state&ee)!==0||q&&q.length>0)if(ke)if((Pe.state&$)!==0)D(j,new N);else{if(Pe.destroyed||Pe.errored)return!1;p(j,Pe,q,!0)}else if(Pe.ended)D(j,new T);else{if(Pe.destroyed||Pe.errored)return!1;Pe.state&=~ce,Pe.decoder&&!_e?(q=Pe.decoder.write(q),Pe.objectMode||q.length!==0?p(j,Pe,q,!1):G(j,Pe)):p(j,Pe,q,!1)}else ke||(Pe.state&=~ce,G(j,Pe));return!Pe.ended&&(Pe.length<Pe.highWaterMark||Pe.length===0)}function p(j,q,_e,ke){q.flowing&&q.length===0&&!q.sync&&j.listenerCount("data")>0?((q.state&he)!==0?q.awaitDrainWriters.clear():q.awaitDrainWriters=null,q.dataEmitted=!0,j.emit("data",_e)):(q.length+=q.objectMode?1:_e.length,ke?q.buffer.unshift(_e):q.buffer.push(_e),(q.state&ae)!==0&&X(j)),G(j,q)}ye.prototype.isPaused=function(){let j=this._readableState;return j[Q]===!0||j.flowing===!1},ye.prototype.setEncoding=function(j){let q=new L(j);this._readableState.decoder=q,this._readableState.encoding=this._readableState.decoder.encoding;let _e=this._readableState.buffer,ke="";for(let Pe of _e)ke+=q.write(Pe);return _e.clear(),ke!==""&&_e.push(ke),this._readableState.length=ke.length,this};var b=1073741824;function S(j){if(j>b)throw new I("size","<= 1GiB",j);return j--,j|=j>>>1,j|=j>>>2,j|=j>>>4,j|=j>>>8,j|=j>>>16,j++,j}function F(j,q){return j<=0||q.length===0&&q.ended?0:(q.state&ee)!==0?1:t(j)?q.flowing&&q.length?q.buffer.first().length:q.length:j<=q.length?j:q.ended?q.length:0}ye.prototype.read=function(j){w("read",j),j===void 0?j=NaN:d(j)||(j=n(j,10));let q=this._readableState,_e=j;if(j>q.highWaterMark&&(q.highWaterMark=S(j)),j!==0&&(q.state&=~Z),j===0&&q.needReadable&&((q.highWaterMark!==0?q.length>=q.highWaterMark:q.length>0)||q.ended))return w("read: emitReadable",q.length,q.ended),q.length===0&&q.ended?Qe(this):X(this),null;if(j=F(j,q),j===0&&q.ended)return q.length===0&&Qe(this),null;let ke=(q.state&ae)!==0;if(w("need readable",ke),(q.length===0||q.length-j<q.highWaterMark)&&(ke=!0,w("length less than watermark",ke)),q.ended||q.reading||q.destroyed||q.errored||!q.constructed)ke=!1,w("reading, ended or constructing",ke);else if(ke){w("do read"),q.state|=ce|H,q.length===0&&(q.state|=ae);try{this._read(q.highWaterMark)}catch(nt){D(this,nt)}q.state&=~H,q.reading||(j=F(_e,q))}let Pe;return j>0?Pe=Le(j,q):Pe=null,Pe===null?(q.needReadable=q.length<=q.highWaterMark,j=0):(q.length-=j,q.multiAwaitDrain?q.awaitDrainWriters.clear():q.awaitDrainWriters=null),q.length===0&&(q.ended||(q.needReadable=!0),_e!==j&&q.ended&&Qe(this)),Pe!==null&&!q.errorEmitted&&!q.closeEmitted&&(q.dataEmitted=!0,this.emit("data",Pe)),Pe};function U(j,q){if(w("onEofChunk"),!q.ended){if(q.decoder){let _e=q.decoder.end();_e&&_e.length&&(q.buffer.push(_e),q.length+=q.objectMode?1:_e.length)}q.ended=!0,q.sync?X(j):(q.needReadable=!1,q.emittedReadable=!0,se(j))}}function X(j){let q=j._readableState;w("emitReadable",q.needReadable,q.emittedReadable),q.needReadable=!1,q.emittedReadable||(w("emitReadable",q.flowing),q.emittedReadable=!0,r.nextTick(se,j))}function se(j){let q=j._readableState;w("emitReadable_",q.destroyed,q.length,q.ended),!q.destroyed&&!q.errored&&(q.length||q.ended)&&(j.emit("readable"),q.emittedReadable=!1),q.needReadable=!q.flowing&&!q.ended&&q.length<=q.highWaterMark,Xe(j)}function G(j,q){!q.readingMore&&q.constructed&&(q.readingMore=!0,r.nextTick(oe,j,q))}function oe(j,q){for(;!q.reading&&!q.ended&&(q.length<q.highWaterMark||q.flowing&&q.length===0);){let _e=q.length;if(w("maybeReadMore read 0"),j.read(0),_e===q.length)break}q.readingMore=!1}ye.prototype._read=function(j){throw new A("_read()")},ye.prototype.pipe=function(j,q){let _e=this,ke=this._readableState;ke.pipes.length===1&&(ke.multiAwaitDrain||(ke.multiAwaitDrain=!0,ke.awaitDrainWriters=new g(ke.awaitDrainWriters?[ke.awaitDrainWriters]:[]))),ke.pipes.push(j),w("pipe count=%d opts=%j",ke.pipes.length,q);let Pe=(!q||q.end!==!1)&&j!==r.stdout&&j!==r.stderr?ct:Gt;ke.endEmitted?r.nextTick(Pe):_e.once("end",Pe),j.on("unpipe",nt);function nt(mt,St){w("onunpipe"),mt===_e&&St&&St.hasUnpiped===!1&&(St.hasUnpiped=!0,dr())}function ct(){w("onend"),j.end()}let xt,pr=!1;function dr(){w("cleanup"),j.removeListener("close",bt),j.removeListener("finish",Tt),xt&&j.removeListener("drain",xt),j.removeListener("error",Qt),j.removeListener("unpipe",nt),_e.removeListener("end",ct),_e.removeListener("end",Gt),_e.removeListener("data",kr),pr=!0,xt&&ke.awaitDrainWriters&&(!j._writableState||j._writableState.needDrain)&&xt()}function gr(){pr||(ke.pipes.length===1&&ke.pipes[0]===j?(w("false write response, pause",0),ke.awaitDrainWriters=j,ke.multiAwaitDrain=!1):ke.pipes.length>1&&ke.pipes.includes(j)&&(w("false write response, pause",ke.awaitDrainWriters.size),ke.awaitDrainWriters.add(j)),_e.pause()),xt||(xt=Be(_e,j),j.on("drain",xt))}_e.on("data",kr);function kr(mt){w("ondata");let St=j.write(mt);w("dest.write",St),St===!1&&gr()}function Qt(mt){if(w("onerror",mt),Gt(),j.removeListener("error",Qt),j.listenerCount("error")===0){let St=j._writableState||j._readableState;St&&!St.errorEmitted?D(j,mt):j.emit("error",mt)}}y(j,"error",Qt);function bt(){j.removeListener("finish",Tt),Gt()}j.once("close",bt);function Tt(){w("onfinish"),j.removeListener("close",bt),Gt()}j.once("finish",Tt);function Gt(){w("unpipe"),_e.unpipe(j)}return j.emit("pipe",_e),j.writableNeedDrain===!0?gr():ke.flowing||(w("pipe resume"),_e.resume()),j};function Be(j,q){return function(){let _e=j._readableState;_e.awaitDrainWriters===q?(w("pipeOnDrain",1),_e.awaitDrainWriters=null):_e.multiAwaitDrain&&(w("pipeOnDrain",_e.awaitDrainWriters.size),_e.awaitDrainWriters.delete(q)),(!_e.awaitDrainWriters||_e.awaitDrainWriters.size===0)&&j.listenerCount("data")&&j.resume()}}ye.prototype.unpipe=function(j){let q=this._readableState,_e={hasUnpiped:!1};if(q.pipes.length===0)return this;if(!j){let Pe=q.pipes;q.pipes=[],this.pause();for(let nt=0;nt<Pe.length;nt++)Pe[nt].emit("unpipe",this,{hasUnpiped:!1});return this}let ke=h(q.pipes,j);return ke===-1?this:(q.pipes.splice(ke,1),q.pipes.length===0&&this.pause(),j.emit("unpipe",this,_e),this)},ye.prototype.on=function(j,q){let _e=v.prototype.on.call(this,j,q),ke=this._readableState;return j==="data"?(ke.readableListening=this.listenerCount("readable")>0,ke.flowing!==!1&&this.resume()):j==="readable"&&!ke.endEmitted&&!ke.readableListening&&(ke.readableListening=ke.needReadable=!0,ke.flowing=!1,ke.emittedReadable=!1,w("on readable",ke.length,ke.reading),ke.length?X(this):ke.reading||r.nextTick(Fe,this)),_e},ye.prototype.addListener=ye.prototype.on,ye.prototype.removeListener=function(j,q){let _e=v.prototype.removeListener.call(this,j,q);return j==="readable"&&r.nextTick(De,this),_e},ye.prototype.off=ye.prototype.removeListener,ye.prototype.removeAllListeners=function(j){let q=v.prototype.removeAllListeners.apply(this,arguments);return(j==="readable"||j===void 0)&&r.nextTick(De,this),q};function De(j){let q=j._readableState;q.readableListening=j.listenerCount("readable")>0,q.resumeScheduled&&q[Q]===!1?q.flowing=!0:j.listenerCount("data")>0?j.resume():q.readableListening||(q.flowing=null)}function Fe(j){w("readable nexttick read 0"),j.read(0)}ye.prototype.resume=function(){let j=this._readableState;return j.flowing||(w("resume"),j.flowing=!j.readableListening,Oe(this,j)),j[Q]=!1,this};function Oe(j,q){q.resumeScheduled||(q.resumeScheduled=!0,r.nextTick(Ge,j,q))}function Ge(j,q){w("resume",q.reading),q.reading||j.read(0),q.resumeScheduled=!1,j.emit("resume"),Xe(j),q.flowing&&!q.reading&&j.read(0)}ye.prototype.pause=function(){return w("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(w("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[Q]=!0,this};function Xe(j){let q=j._readableState;for(w("flow",q.flowing);q.flowing&&j.read()!==null;);}ye.prototype.wrap=function(j){let q=!1;j.on("data",ke=>{!this.push(ke)&&j.pause&&(q=!0,j.pause())}),j.on("end",()=>{this.push(null)}),j.on("error",ke=>{D(this,ke)}),j.on("close",()=>{this.destroy()}),j.on("destroy",()=>{this.destroy()}),this._read=()=>{q&&j.resume&&(q=!1,j.resume())};let _e=f(j);for(let ke=1;ke<_e.length;ke++){let Pe=_e[ke];this[Pe]===void 0&&typeof j[Pe]=="function"&&(this[Pe]=j[Pe].bind(j))}return this},ye.prototype[s]=function(){return je(this)},ye.prototype.iterator=function(j){return j!==void 0&&K(j,"options"),je(this,j)};function je(j,q){typeof j.read!="function"&&(j=ye.wrap(j,{objectMode:!0}));let _e=qe(j,q);return _e.stream=j,_e}async function*qe(j,q){let _e=W;function ke(ct){this===j?(_e(),_e=W):_e=ct}j.on("readable",ke);let Pe,nt=_(j,{writable:!1},ct=>{Pe=ct?O(Pe,ct):null,_e(),_e=W});try{for(;;){let ct=j.destroyed?null:j.read();if(ct!==null)yield ct;else{if(Pe)throw Pe;if(Pe===null)return;await new l(ke)}}}catch(ct){throw Pe=O(Pe,ct),Pe}finally{(Pe||q?.destroyOnReturn!==!1)&&(Pe===void 0||j._readableState.autoDestroy)?k.destroyer(j,null):(j.off("readable",ke),nt())}}i(ye.prototype,{readable:{__proto__:null,get(){let j=this._readableState;return!!j&&j.readable!==!1&&!j.destroyed&&!j.errorEmitted&&!j.endEmitted},set(j){this._readableState&&(this._readableState.readable=!!j)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(j){this._readableState&&(this._readableState.flowing=j)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(j){this._readableState&&(this._readableState.destroyed=j)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),i(Ce.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[Q]!==!1},set(j){this[Q]=!!j}}}),ye._fromList=Le;function Le(j,q){if(q.length===0)return null;let _e;return q.objectMode?_e=q.buffer.shift():!j||j>=q.length?(q.decoder?_e=q.buffer.join(""):q.buffer.length===1?_e=q.buffer.first():_e=q.buffer.concat(q.length),q.buffer.clear()):_e=q.buffer.consume(j,q.decoder),_e}function Qe(j){let q=j._readableState;w("endReadable",q.endEmitted),q.endEmitted||(q.ended=!0,r.nextTick(Ke,q,j))}function Ke(j,q){if(w("endReadableNT",j.endEmitted,j.length),!j.errored&&!j.closeEmitted&&!j.endEmitted&&j.length===0){if(j.endEmitted=!0,q.emit("end"),q.writable&&q.allowHalfOpen===!1)r.nextTick(Je,q);else if(j.autoDestroy){let _e=q._writableState;(!_e||_e.autoDestroy&&(_e.finished||_e.writable===!1))&&q.destroy()}}}function Je(j){j.writable&&!j.writableEnded&&!j.destroyed&&j.end()}ye.from=function(j,q){return P(ye,j,q)};var tt;function gt(){return tt===void 0&&(tt={}),tt}ye.fromWeb=function(j,q){return gt().newStreamReadableFromReadableStream(j,q)},ye.toWeb=function(j,q){return gt().newReadableStreamFromStreamReadable(j,q)},ye.wrap=function(j,q){var _e,ke;return new ye({objectMode:(_e=(ke=j.readableObjectMode)!==null&&ke!==void 0?ke:j.objectMode)!==null&&_e!==void 0?_e:!0,...q,destroy(Pe,nt){k.destroyer(j,Pe),nt(Pe)}}).wrap(j)}}),ys=we((o,e)=>{"use strict";be(),ve(),me();var r=(qt(),He($e)),{ArrayPrototypeSlice:h,Error:d,FunctionPrototypeSymbolHasInstance:t,ObjectDefineProperty:n,ObjectDefineProperties:i,ObjectSetPrototypeOf:f,StringPrototypeToLowerCase:c,Symbol:l,SymbolHasInstance:g}=et();e.exports=K,K.WritableState=N;var{EventEmitter:u}=(er(),He(Wt)),s=xs().Stream,{Buffer:x}=(st(),He(it)),E=ur(),{addAbortSignal:v}=un(),{getHighWaterMark:y,getDefaultHighWaterMark:a}=cn(),{ERR_INVALID_ARG_TYPE:m,ERR_METHOD_NOT_IMPLEMENTED:_,ERR_MULTIPLE_CALLBACK:w,ERR_STREAM_CANNOT_PIPE:B,ERR_STREAM_DESTROYED:k,ERR_STREAM_ALREADY_FINISHED:R,ERR_STREAM_NULL_VALUES:M,ERR_STREAM_WRITE_AFTER_END:O,ERR_UNKNOWN_ENCODING:C}=ht().codes,{errorOrDestroy:A}=E;f(K.prototype,s.prototype),f(K,s);function I(){}var T=l("kOnFinished");function N(z,J,ue){typeof ue!="boolean"&&(ue=J instanceof Dt()),this.objectMode=!!(z&&z.objectMode),ue&&(this.objectMode=this.objectMode||!!(z&&z.writableObjectMode)),this.highWaterMark=z?y(this,z,"writableHighWaterMark",ue):a(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let de=!!(z&&z.decodeStrings===!1);this.decodeStrings=!de,this.defaultEncoding=z&&z.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=D.bind(void 0,J),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,Y(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!z||z.emitClose!==!1,this.autoDestroy=!z||z.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[T]=[]}function Y(z){z.buffered=[],z.bufferedIndex=0,z.allBuffers=!0,z.allNoop=!0}N.prototype.getBuffer=function(){return h(this.buffered,this.bufferedIndex)},n(N.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function K(z){let J=this instanceof Dt();if(!J&&!t(K,this))return new K(z);this._writableState=new N(z,this,J),z&&(typeof z.write=="function"&&(this._write=z.write),typeof z.writev=="function"&&(this._writev=z.writev),typeof z.destroy=="function"&&(this._destroy=z.destroy),typeof z.final=="function"&&(this._final=z.final),typeof z.construct=="function"&&(this._construct=z.construct),z.signal&&v(z.signal,this)),s.call(this,z),E.construct(this,()=>{let ue=this._writableState;ue.writing||ce(this,ue),Z(this,ue)})}n(K,g,{__proto__:null,value:function(z){return t(this,z)?!0:this!==K?!1:z&&z._writableState instanceof N}}),K.prototype.pipe=function(){A(this,new B)};function Q(z,J,ue,de){let he=z._writableState;if(typeof ue=="function")de=ue,ue=he.defaultEncoding;else{if(!ue)ue=he.defaultEncoding;else if(ue!=="buffer"&&!x.isEncoding(ue))throw new C(ue);typeof de!="function"&&(de=I)}if(J===null)throw new M;if(!he.objectMode)if(typeof J=="string")he.decodeStrings!==!1&&(J=x.from(J,ue),ue="buffer");else if(J instanceof x)ue="buffer";else if(s._isUint8Array(J))J=s._uint8ArrayToBuffer(J),ue="buffer";else throw new m("chunk",["string","Buffer","Uint8Array"],J);let ge;return he.ending?ge=new O:he.destroyed&&(ge=new k("write")),ge?(r.nextTick(de,ge),A(z,ge,!0),ge):(he.pendingcb++,L(z,he,J,ue,de))}K.prototype.write=function(z,J,ue){return Q(this,z,J,ue)===!0},K.prototype.cork=function(){this._writableState.corked++},K.prototype.uncork=function(){let z=this._writableState;z.corked&&(z.corked--,z.writing||ce(this,z))},K.prototype.setDefaultEncoding=function(z){if(typeof z=="string"&&(z=c(z)),!x.isEncoding(z))throw new C(z);return this._writableState.defaultEncoding=z,this};function L(z,J,ue,de,he){let ge=J.objectMode?1:ue.length;J.length+=ge;let te=J.length<J.highWaterMark;return te||(J.needDrain=!0),J.writing||J.corked||J.errored||!J.constructed?(J.buffered.push({chunk:ue,encoding:de,callback:he}),J.allBuffers&&de!=="buffer"&&(J.allBuffers=!1),J.allNoop&&he!==I&&(J.allNoop=!1)):(J.writelen=ge,J.writecb=he,J.writing=!0,J.sync=!0,z._write(ue,de,J.onwrite),J.sync=!1),te&&!J.errored&&!J.destroyed}function P(z,J,ue,de,he,ge,te){J.writelen=de,J.writecb=te,J.writing=!0,J.sync=!0,J.destroyed?J.onwrite(new k("write")):ue?z._writev(he,J.onwrite):z._write(he,ge,J.onwrite),J.sync=!1}function W(z,J,ue,de){--J.pendingcb,de(ue),$(J),A(z,ue)}function D(z,J){let ue=z._writableState,de=ue.sync,he=ue.writecb;if(typeof he!="function"){A(z,new w);return}ue.writing=!1,ue.writecb=null,ue.length-=ue.writelen,ue.writelen=0,J?(J.stack,ue.errored||(ue.errored=J),z._readableState&&!z._readableState.errored&&(z._readableState.errored=J),de?r.nextTick(W,z,ue,J,he):W(z,ue,J,he)):(ue.buffered.length>ue.bufferedIndex&&ce(z,ue),de?ue.afterWriteTickInfo!==null&&ue.afterWriteTickInfo.cb===he?ue.afterWriteTickInfo.count++:(ue.afterWriteTickInfo={count:1,cb:he,stream:z,state:ue},r.nextTick(ee,ue.afterWriteTickInfo)):le(z,ue,1,he))}function ee({stream:z,state:J,count:ue,cb:de}){return J.afterWriteTickInfo=null,le(z,J,ue,de)}function le(z,J,ue,de){for(!J.ending&&!z.destroyed&&J.length===0&&J.needDrain&&(J.needDrain=!1,z.emit("drain"));ue-- >0;)J.pendingcb--,de();J.destroyed&&$(J),Z(z,J)}function $(z){if(z.writing)return;for(let he=z.bufferedIndex;he<z.buffered.length;++he){var J;let{chunk:ge,callback:te}=z.buffered[he],xe=z.objectMode?1:ge.length;z.length-=xe,te((J=z.errored)!==null&&J!==void 0?J:new k("write"))}let ue=z[T].splice(0);for(let he=0;he<ue.length;he++){var de;ue[he]((de=z.errored)!==null&&de!==void 0?de:new k("end"))}Y(z)}function ce(z,J){if(J.corked||J.bufferProcessing||J.destroyed||!J.constructed)return;let{buffered:ue,bufferedIndex:de,objectMode:he}=J,ge=ue.length-de;if(!ge)return;let te=de;if(J.bufferProcessing=!0,ge>1&&z._writev){J.pendingcb-=ge-1;let xe=J.allNoop?I:ye=>{for(let Ie=te;Ie<ue.length;++Ie)ue[Ie].callback(ye)},Ce=J.allNoop&&te===0?ue:h(ue,te);Ce.allBuffers=J.allBuffers,P(z,J,!0,J.length,Ce,"",xe),Y(J)}else{do{let{chunk:xe,encoding:Ce,callback:ye}=ue[te];ue[te++]=null;let Ie=he?1:xe.length;P(z,J,!1,Ie,xe,Ce,ye)}while(te<ue.length&&!J.writing);te===ue.length?Y(J):te>256?(ue.splice(0,te),J.bufferedIndex=0):J.bufferedIndex=te}J.bufferProcessing=!1}K.prototype._write=function(z,J,ue){if(this._writev)this._writev([{chunk:z,encoding:J}],ue);else throw new _("_write()")},K.prototype._writev=null,K.prototype.end=function(z,J,ue){let de=this._writableState;typeof z=="function"?(ue=z,z=null,J=null):typeof J=="function"&&(ue=J,J=null);let he;if(z!=null){let ge=Q(this,z,J);ge instanceof d&&(he=ge)}return de.corked&&(de.corked=1,this.uncork()),he||(!de.errored&&!de.ending?(de.ending=!0,Z(this,de,!0),de.ended=!0):de.finished?he=new R("end"):de.destroyed&&(he=new k("end"))),typeof ue=="function"&&(he||de.finished?r.nextTick(ue,he):de[T].push(ue)),this};function ie(z){return z.ending&&!z.destroyed&&z.constructed&&z.length===0&&!z.errored&&z.buffered.length===0&&!z.finished&&!z.writing&&!z.errorEmitted&&!z.closeEmitted}function H(z,J){let ue=!1;function de(he){if(ue){A(z,he??w());return}if(ue=!0,J.pendingcb--,he){let ge=J[T].splice(0);for(let te=0;te<ge.length;te++)ge[te](he);A(z,he,J.sync)}else ie(J)&&(J.prefinished=!0,z.emit("prefinish"),J.pendingcb++,r.nextTick(ne,z,J))}J.sync=!0,J.pendingcb++;try{z._final(de)}catch(he){de(he)}J.sync=!1}function ae(z,J){!J.prefinished&&!J.finalCalled&&(typeof z._final=="function"&&!J.destroyed?(J.finalCalled=!0,H(z,J)):(J.prefinished=!0,z.emit("prefinish")))}function Z(z,J,ue){ie(J)&&(ae(z,J),J.pendingcb===0&&(ue?(J.pendingcb++,r.nextTick((de,he)=>{ie(he)?ne(de,he):he.pendingcb--},z,J)):ie(J)&&(J.pendingcb++,ne(z,J))))}function ne(z,J){J.pendingcb--,J.finished=!0;let ue=J[T].splice(0);for(let de=0;de<ue.length;de++)ue[de]();if(z.emit("finish"),J.autoDestroy){let de=z._readableState;(!de||de.autoDestroy&&(de.endEmitted||de.readable===!1))&&z.destroy()}}i(K.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(z){this._writableState&&(this._writableState.destroyed=z)}},writable:{__proto__:null,get(){let z=this._writableState;return!!z&&z.writable!==!1&&!z.destroyed&&!z.errored&&!z.ending&&!z.ended},set(z){this._writableState&&(this._writableState.writable=!!z)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let z=this._writableState;return z?!z.destroyed&&!z.ending&&z.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var re=E.destroy;K.prototype.destroy=function(z,J){let ue=this._writableState;return!ue.destroyed&&(ue.bufferedIndex<ue.buffered.length||ue[T].length)&&r.nextTick($,ue),re.call(this,z,J),this},K.prototype._undestroy=E.undestroy,K.prototype._destroy=function(z,J){J(z)},K.prototype[u.captureRejectionSymbol]=function(z){this.destroy(z)};var pe;function fe(){return pe===void 0&&(pe={}),pe}K.fromWeb=function(z,J){return fe().newStreamWritableFromWritableStream(z,J)},K.toWeb=function(z){return fe().newWritableStreamFromStreamWritable(z)}}),sc=we((o,e)=>{be(),ve(),me();var r=(qt(),He($e)),h=(st(),He(it)),{isReadable:d,isWritable:t,isIterable:n,isNodeStream:i,isReadableNodeStream:f,isWritableNodeStream:c,isDuplexNodeStream:l,isReadableStream:g,isWritableStream:u}=Ft(),s=Ht(),{AbortError:x,codes:{ERR_INVALID_ARG_TYPE:E,ERR_INVALID_RETURN_VALUE:v}}=ht(),{destroyer:y}=ur(),a=Dt(),m=fn(),_=ys(),{createDeferredPromise:w}=dt(),B=_0(),k=globalThis.Blob||h.Blob,R=typeof k<"u"?function(T){return T instanceof k}:function(T){return!1},M=globalThis.AbortController||wr().AbortController,{FunctionPrototypeCall:O}=et(),C=class extends a{constructor(T){super(T),T?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),T?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};e.exports=function T(N,Y){if(l(N))return N;if(f(N))return I({readable:N});if(c(N))return I({writable:N});if(i(N))return I({writable:!1,readable:!1});if(g(N))return I({readable:m.fromWeb(N)});if(u(N))return I({writable:_.fromWeb(N)});if(typeof N=="function"){let{value:Q,write:L,final:P,destroy:W}=A(N);if(n(Q))return B(C,Q,{objectMode:!0,write:L,final:P,destroy:W});let D=Q?.then;if(typeof D=="function"){let ee,le=O(D,Q,$=>{if($!=null)throw new v("nully","body",$)},$=>{y(ee,$)});return ee=new C({objectMode:!0,readable:!1,write:L,final($){P(async()=>{try{await le,r.nextTick($,null)}catch(ce){r.nextTick($,ce)}})},destroy:W})}throw new v("Iterable, AsyncIterable or AsyncFunction",Y,Q)}if(R(N))return T(N.arrayBuffer());if(n(N))return B(C,N,{objectMode:!0,writable:!1});if(g(N?.readable)&&u(N?.writable))return C.fromWeb(N);if(typeof N?.writable=="object"||typeof N?.readable=="object"){let Q=N!=null&&N.readable?f(N?.readable)?N?.readable:T(N.readable):void 0,L=N!=null&&N.writable?c(N?.writable)?N?.writable:T(N.writable):void 0;return I({readable:Q,writable:L})}let K=N?.then;if(typeof K=="function"){let Q;return O(K,N,L=>{L!=null&&Q.push(L),Q.push(null)},L=>{y(Q,L)}),Q=new C({objectMode:!0,writable:!1,read(){}})}throw new E(Y,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],N)};function A(T){let{promise:N,resolve:Y}=w(),K=new M,Q=K.signal;return{value:T((async function*(){for(;;){let L=N;N=null;let{chunk:P,done:W,cb:D}=await L;if(r.nextTick(D),W)return;if(Q.aborted)throw new x(void 0,{cause:Q.reason});({promise:N,resolve:Y}=w()),yield P}})(),{signal:Q}),write(L,P,W){let D=Y;Y=null,D({chunk:L,done:!1,cb:W})},final(L){let P=Y;Y=null,P({done:!0,cb:L})},destroy(L,P){K.abort(),P(L)}}}function I(T){let N=T.readable&&typeof T.readable.read!="function"?m.wrap(T.readable):T.readable,Y=T.writable,K=!!d(N),Q=!!t(Y),L,P,W,D,ee;function le($){let ce=D;D=null,ce?ce($):$&&ee.destroy($)}return ee=new C({readableObjectMode:!!(N!=null&&N.readableObjectMode),writableObjectMode:!!(Y!=null&&Y.writableObjectMode),readable:K,writable:Q}),Q&&(s(Y,$=>{Q=!1,$&&y(N,$),le($)}),ee._write=function($,ce,ie){Y.write($,ce)?ie():L=ie},ee._final=function($){Y.end(),P=$},Y.on("drain",function(){if(L){let $=L;L=null,$()}}),Y.on("finish",function(){if(P){let $=P;P=null,$()}})),K&&(s(N,$=>{K=!1,$&&y(N,$),le($)}),N.on("readable",function(){if(W){let $=W;W=null,$()}}),N.on("end",function(){ee.push(null)}),ee._read=function(){for(;;){let $=N.read();if($===null){W=ee._read;return}if(!ee.push($))return}}),ee._destroy=function($,ce){!$&&D!==null&&($=new x),W=null,L=null,P=null,D===null?ce($):(D=ce,y(Y,$),y(N,$))},ee}}),Dt=we((o,e)=>{"use strict";be(),ve(),me();var{ObjectDefineProperties:r,ObjectGetOwnPropertyDescriptor:h,ObjectKeys:d,ObjectSetPrototypeOf:t}=et();e.exports=f;var n=fn(),i=ys();t(f.prototype,n.prototype),t(f,n);{let u=d(i.prototype);for(let s=0;s<u.length;s++){let x=u[s];f.prototype[x]||(f.prototype[x]=i.prototype[x])}}function f(u){if(!(this instanceof f))return new f(u);n.call(this,u),i.call(this,u),u?(this.allowHalfOpen=u.allowHalfOpen!==!1,u.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),u.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}r(f.prototype,{writable:{__proto__:null,...h(i.prototype,"writable")},writableHighWaterMark:{__proto__:null,...h(i.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...h(i.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...h(i.prototype,"writableBuffer")},writableLength:{__proto__:null,...h(i.prototype,"writableLength")},writableFinished:{__proto__:null,...h(i.prototype,"writableFinished")},writableCorked:{__proto__:null,...h(i.prototype,"writableCorked")},writableEnded:{__proto__:null,...h(i.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...h(i.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(u){this._readableState&&this._writableState&&(this._readableState.destroyed=u,this._writableState.destroyed=u)}}});var c;function l(){return c===void 0&&(c={}),c}f.fromWeb=function(u,s){return l().newStreamDuplexFromReadableWritablePair(u,s)},f.toWeb=function(u){return l().newReadableWritablePairFromDuplex(u)};var g;f.from=function(u){return g||(g=sc()),g(u,"body")}}),w0=we((o,e)=>{"use strict";be(),ve(),me();var{ObjectSetPrototypeOf:r,Symbol:h}=et();e.exports=f;var{ERR_METHOD_NOT_IMPLEMENTED:d}=ht().codes,t=Dt(),{getHighWaterMark:n}=cn();r(f.prototype,t.prototype),r(f,t);var i=h("kCallback");function f(g){if(!(this instanceof f))return new f(g);let u=g?n(this,g,"readableHighWaterMark",!0):null;u===0&&(g={...g,highWaterMark:null,readableHighWaterMark:u,writableHighWaterMark:g.writableHighWaterMark||0}),t.call(this,g),this._readableState.sync=!1,this[i]=null,g&&(typeof g.transform=="function"&&(this._transform=g.transform),typeof g.flush=="function"&&(this._flush=g.flush)),this.on("prefinish",l)}function c(g){typeof this._flush=="function"&&!this.destroyed?this._flush((u,s)=>{if(u){g?g(u):this.destroy(u);return}s!=null&&this.push(s),this.push(null),g&&g()}):(this.push(null),g&&g())}function l(){this._final!==c&&c.call(this)}f.prototype._final=c,f.prototype._transform=function(g,u,s){throw new d("_transform()")},f.prototype._write=function(g,u,s){let x=this._readableState,E=this._writableState,v=x.length;this._transform(g,u,(y,a)=>{if(y){s(y);return}a!=null&&this.push(a),E.ended||v===x.length||x.length<x.highWaterMark?s():this[i]=s})},f.prototype._read=function(){if(this[i]){let g=this[i];this[i]=null,g()}}}),E0=we((o,e)=>{"use strict";be(),ve(),me();var{ObjectSetPrototypeOf:r}=et();e.exports=d;var h=w0();r(d.prototype,h.prototype),r(d,h);function d(t){if(!(this instanceof d))return new d(t);h.call(this,t)}d.prototype._transform=function(t,n,i){i(null,t)}}),bs=we((o,e)=>{be(),ve(),me();var r=(qt(),He($e)),{ArrayIsArray:h,Promise:d,SymbolAsyncIterator:t,SymbolDispose:n}=et(),i=Ht(),{once:f}=dt(),c=ur(),l=Dt(),{aggregateTwoErrors:g,codes:{ERR_INVALID_ARG_TYPE:u,ERR_INVALID_RETURN_VALUE:s,ERR_MISSING_ARGS:x,ERR_STREAM_DESTROYED:E,ERR_STREAM_PREMATURE_CLOSE:v},AbortError:y}=ht(),{validateFunction:a,validateAbortSignal:m}=Er(),{isIterable:_,isReadable:w,isReadableNodeStream:B,isNodeStream:k,isTransformStream:R,isWebStream:M,isReadableStream:O,isReadableFinished:C}=Ft(),A=globalThis.AbortController||wr().AbortController,I,T,N;function Y($,ce,ie){let H=!1;$.on("close",()=>{H=!0});let ae=i($,{readable:ce,writable:ie},Z=>{H=!Z});return{destroy:Z=>{H||(H=!0,c.destroyer($,Z||new E("pipe")))},cleanup:ae}}function K($){return a($[$.length-1],"streams[stream.length - 1]"),$.pop()}function Q($){if(_($))return $;if(B($))return L($);throw new u("val",["Readable","Iterable","AsyncIterable"],$)}async function*L($){T||(T=fn()),yield*T.prototype[t].call($)}async function P($,ce,ie,{end:H}){let ae,Z=null,ne=fe=>{if(fe&&(ae=fe),Z){let z=Z;Z=null,z()}},re=()=>new d((fe,z)=>{ae?z(ae):Z=()=>{ae?z(ae):fe()}});ce.on("drain",ne);let pe=i(ce,{readable:!1},ne);try{ce.writableNeedDrain&&await re();for await(let fe of $)ce.write(fe)||await re();H&&(ce.end(),await re()),ie()}catch(fe){ie(ae!==fe?g(ae,fe):fe)}finally{pe(),ce.off("drain",ne)}}async function W($,ce,ie,{end:H}){R(ce)&&(ce=ce.writable);let ae=ce.getWriter();try{for await(let Z of $)await ae.ready,ae.write(Z).catch(()=>{});await ae.ready,H&&await ae.close(),ie()}catch(Z){try{await ae.abort(Z),ie(Z)}catch(ne){ie(ne)}}}function D(...$){return ee($,f(K($)))}function ee($,ce,ie){if($.length===1&&h($[0])&&($=$[0]),$.length<2)throw new x("streams");let H=new A,ae=H.signal,Z=ie?.signal,ne=[];m(Z,"options.signal");function re(){he(new y)}N=N||dt().addAbortListener;let pe;Z&&(pe=N(Z,re));let fe,z,J=[],ue=0;function de(ye){he(ye,--ue===0)}function he(ye,Ie){var p;if(ye&&(!fe||fe.code==="ERR_STREAM_PREMATURE_CLOSE")&&(fe=ye),!(!fe&&!Ie)){for(;J.length;)J.shift()(fe);(p=pe)===null||p===void 0||p[n](),H.abort(),Ie&&(fe||ne.forEach(b=>b()),r.nextTick(ce,fe,z))}}let ge;for(let ye=0;ye<$.length;ye++){let Ie=$[ye],p=ye<$.length-1,b=ye>0,S=p||ie?.end!==!1,F=ye===$.length-1;if(k(Ie)){let U=function(X){X&&X.name!=="AbortError"&&X.code!=="ERR_STREAM_PREMATURE_CLOSE"&&de(X)};var te=U;if(S){let{destroy:X,cleanup:se}=Y(Ie,p,b);J.push(X),w(Ie)&&F&&ne.push(se)}Ie.on("error",U),w(Ie)&&F&&ne.push(()=>{Ie.removeListener("error",U)})}if(ye===0)if(typeof Ie=="function"){if(ge=Ie({signal:ae}),!_(ge))throw new s("Iterable, AsyncIterable or Stream","source",ge)}else _(Ie)||B(Ie)||R(Ie)?ge=Ie:ge=l.from(Ie);else if(typeof Ie=="function"){if(R(ge)){var xe;ge=Q((xe=ge)===null||xe===void 0?void 0:xe.readable)}else ge=Q(ge);if(ge=Ie(ge,{signal:ae}),p){if(!_(ge,!0))throw new s("AsyncIterable",`transform[${ye-1}]`,ge)}else{var Ce;I||(I=E0());let U=new I({objectMode:!0}),X=(Ce=ge)===null||Ce===void 0?void 0:Ce.then;if(typeof X=="function")ue++,X.call(ge,oe=>{z=oe,oe!=null&&U.write(oe),S&&U.end(),r.nextTick(de)},oe=>{U.destroy(oe),r.nextTick(de,oe)});else if(_(ge,!0))ue++,P(ge,U,de,{end:S});else if(O(ge)||R(ge)){let oe=ge.readable||ge;ue++,P(oe,U,de,{end:S})}else throw new s("AsyncIterable or Promise","destination",ge);ge=U;let{destroy:se,cleanup:G}=Y(ge,!1,!0);J.push(se),F&&ne.push(G)}}else if(k(Ie)){if(B(ge)){ue+=2;let U=le(ge,Ie,de,{end:S});w(Ie)&&F&&ne.push(U)}else if(R(ge)||O(ge)){let U=ge.readable||ge;ue++,P(U,Ie,de,{end:S})}else if(_(ge))ue++,P(ge,Ie,de,{end:S});else throw new u("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],ge);ge=Ie}else if(M(Ie)){if(B(ge))ue++,W(Q(ge),Ie,de,{end:S});else if(O(ge)||_(ge))ue++,W(ge,Ie,de,{end:S});else if(R(ge))ue++,W(ge.readable,Ie,de,{end:S});else throw new u("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],ge);ge=Ie}else ge=l.from(Ie)}return(ae!=null&&ae.aborted||Z!=null&&Z.aborted)&&r.nextTick(re),ge}function le($,ce,ie,{end:H}){let ae=!1;if(ce.on("close",()=>{ae||ie(new v)}),$.pipe(ce,{end:!1}),H){let ne=function(){ae=!0,ce.end()};var Z=ne;C($)?r.nextTick(ne):$.once("end",ne)}else ie();return i($,{readable:!0,writable:!1},ne=>{let re=$._readableState;ne&&ne.code==="ERR_STREAM_PREMATURE_CLOSE"&&re&&re.ended&&!re.errored&&!re.errorEmitted?$.once("end",ie).once("error",ie):ie(ne)}),i(ce,{readable:!1,writable:!0},ie)}e.exports={pipelineImpl:ee,pipeline:D}}),A0=we((o,e)=>{"use strict";be(),ve(),me();var{pipeline:r}=bs(),h=Dt(),{destroyer:d}=ur(),{isNodeStream:t,isReadable:n,isWritable:i,isWebStream:f,isTransformStream:c,isWritableStream:l,isReadableStream:g}=Ft(),{AbortError:u,codes:{ERR_INVALID_ARG_VALUE:s,ERR_MISSING_ARGS:x}}=ht(),E=Ht();e.exports=function(...v){if(v.length===0)throw new x("streams");if(v.length===1)return h.from(v[0]);let y=[...v];if(typeof v[0]=="function"&&(v[0]=h.from(v[0])),typeof v[v.length-1]=="function"){let A=v.length-1;v[A]=h.from(v[A])}for(let A=0;A<v.length;++A)if(!(!t(v[A])&&!f(v[A]))){if(A<v.length-1&&!(n(v[A])||g(v[A])||c(v[A])))throw new s(`streams[${A}]`,y[A],"must be readable");if(A>0&&!(i(v[A])||l(v[A])||c(v[A])))throw new s(`streams[${A}]`,y[A],"must be writable")}let a,m,_,w,B;function k(A){let I=w;w=null,I?I(A):A?B.destroy(A):!C&&!O&&B.destroy()}let R=v[0],M=r(v,k),O=!!(i(R)||l(R)||c(R)),C=!!(n(M)||g(M)||c(M));if(B=new h({writableObjectMode:!!(R!=null&&R.writableObjectMode),readableObjectMode:!!(M!=null&&M.readableObjectMode),writable:O,readable:C}),O){if(t(R))B._write=function(I,T,N){R.write(I,T)?N():a=N},B._final=function(I){R.end(),m=I},R.on("drain",function(){if(a){let I=a;a=null,I()}});else if(f(R)){let I=(c(R)?R.writable:R).getWriter();B._write=async function(T,N,Y){try{await I.ready,I.write(T).catch(()=>{}),Y()}catch(K){Y(K)}},B._final=async function(T){try{await I.ready,I.close().catch(()=>{}),m=T}catch(N){T(N)}}}let A=c(M)?M.readable:M;E(A,()=>{if(m){let I=m;m=null,I()}})}if(C){if(t(M))M.on("readable",function(){if(_){let A=_;_=null,A()}}),M.on("end",function(){B.push(null)}),B._read=function(){for(;;){let A=M.read();if(A===null){_=B._read;return}if(!B.push(A))return}};else if(f(M)){let A=(c(M)?M.readable:M).getReader();B._read=async function(){for(;;)try{let{value:I,done:T}=await A.read();if(!B.push(I))return;if(T){B.push(null);return}}catch{return}}}}return B._destroy=function(A,I){!A&&w!==null&&(A=new u),_=null,a=null,m=null,w===null?I(A):(w=I,t(M)&&d(M,A))},B}}),ac=we((o,e)=>{"use strict";be(),ve(),me();var r=globalThis.AbortController||wr().AbortController,{codes:{ERR_INVALID_ARG_VALUE:h,ERR_INVALID_ARG_TYPE:d,ERR_MISSING_ARGS:t,ERR_OUT_OF_RANGE:n},AbortError:i}=ht(),{validateAbortSignal:f,validateInteger:c,validateObject:l}=Er(),g=et().Symbol("kWeak"),u=et().Symbol("kResistStopPropagation"),{finished:s}=Ht(),x=A0(),{addAbortSignalNoValidate:E}=un(),{isWritable:v,isNodeStream:y}=Ft(),{deprecate:a}=dt(),{ArrayPrototypePush:m,Boolean:_,MathFloor:w,Number:B,NumberIsNaN:k,Promise:R,PromiseReject:M,PromiseResolve:O,PromisePrototypeThen:C,Symbol:A}=et(),I=A("kEmpty"),T=A("kEof");function N(Z,ne){if(ne!=null&&l(ne,"options"),ne?.signal!=null&&f(ne.signal,"options.signal"),y(Z)&&!v(Z))throw new h("stream",Z,"must be writable");let re=x(this,Z);return ne!=null&&ne.signal&&E(ne.signal,re),re}function Y(Z,ne){if(typeof Z!="function")throw new d("fn",["Function","AsyncFunction"],Z);ne!=null&&l(ne,"options"),ne?.signal!=null&&f(ne.signal,"options.signal");let re=1;ne?.concurrency!=null&&(re=w(ne.concurrency));let pe=re-1;return ne?.highWaterMark!=null&&(pe=w(ne.highWaterMark)),c(re,"options.concurrency",1),c(pe,"options.highWaterMark",0),pe+=re,async function*(){let fe=dt().AbortSignalAny([ne?.signal].filter(_)),z=this,J=[],ue={signal:fe},de,he,ge=!1,te=0;function xe(){ge=!0,Ce()}function Ce(){te-=1,ye()}function ye(){he&&!ge&&te<re&&J.length<pe&&(he(),he=null)}async function Ie(){try{for await(let p of z){if(ge)return;if(fe.aborted)throw new i;try{if(p=Z(p,ue),p===I)continue;p=O(p)}catch(b){p=M(b)}te+=1,C(p,Ce,xe),J.push(p),de&&(de(),de=null),!ge&&(J.length>=pe||te>=re)&&await new R(b=>{he=b})}J.push(T)}catch(p){let b=M(p);C(b,Ce,xe),J.push(b)}finally{ge=!0,de&&(de(),de=null)}}Ie();try{for(;;){for(;J.length>0;){let p=await J[0];if(p===T)return;if(fe.aborted)throw new i;p!==I&&(yield p),J.shift(),ye()}await new R(p=>{de=p})}}finally{ge=!0,he&&(he(),he=null)}}.call(this)}function K(Z=void 0){return Z!=null&&l(Z,"options"),Z?.signal!=null&&f(Z.signal,"options.signal"),async function*(){let ne=0;for await(let pe of this){var re;if(Z!=null&&(re=Z.signal)!==null&&re!==void 0&&re.aborted)throw new i({cause:Z.signal.reason});yield[ne++,pe]}}.call(this)}async function Q(Z,ne=void 0){for await(let re of D.call(this,Z,ne))return!0;return!1}async function L(Z,ne=void 0){if(typeof Z!="function")throw new d("fn",["Function","AsyncFunction"],Z);return!await Q.call(this,async(...re)=>!await Z(...re),ne)}async function P(Z,ne){for await(let re of D.call(this,Z,ne))return re}async function W(Z,ne){if(typeof Z!="function")throw new d("fn",["Function","AsyncFunction"],Z);async function re(pe,fe){return await Z(pe,fe),I}for await(let pe of Y.call(this,re,ne));}function D(Z,ne){if(typeof Z!="function")throw new d("fn",["Function","AsyncFunction"],Z);async function re(pe,fe){return await Z(pe,fe)?pe:I}return Y.call(this,re,ne)}var ee=class extends t{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function le(Z,ne,re){var pe;if(typeof Z!="function")throw new d("reducer",["Function","AsyncFunction"],Z);re!=null&&l(re,"options"),re?.signal!=null&&f(re.signal,"options.signal");let fe=arguments.length>1;if(re!=null&&(pe=re.signal)!==null&&pe!==void 0&&pe.aborted){let he=new i(void 0,{cause:re.signal.reason});throw this.once("error",()=>{}),await s(this.destroy(he)),he}let z=new r,J=z.signal;if(re!=null&&re.signal){let he={once:!0,[g]:this,[u]:!0};re.signal.addEventListener("abort",()=>z.abort(),he)}let ue=!1;try{for await(let he of this){var de;if(ue=!0,re!=null&&(de=re.signal)!==null&&de!==void 0&&de.aborted)throw new i;fe?ne=await Z(ne,he,{signal:J}):(ne=he,fe=!0)}if(!ue&&!fe)throw new ee}finally{z.abort()}return ne}async function $(Z){Z!=null&&l(Z,"options"),Z?.signal!=null&&f(Z.signal,"options.signal");let ne=[];for await(let pe of this){var re;if(Z!=null&&(re=Z.signal)!==null&&re!==void 0&&re.aborted)throw new i(void 0,{cause:Z.signal.reason});m(ne,pe)}return ne}function ce(Z,ne){let re=Y.call(this,Z,ne);return async function*(){for await(let pe of re)yield*pe}.call(this)}function ie(Z){if(Z=B(Z),k(Z))return 0;if(Z<0)throw new n("number",">= 0",Z);return Z}function H(Z,ne=void 0){return ne!=null&&l(ne,"options"),ne?.signal!=null&&f(ne.signal,"options.signal"),Z=ie(Z),async function*(){var re;if(ne!=null&&(re=ne.signal)!==null&&re!==void 0&&re.aborted)throw new i;for await(let fe of this){var pe;if(ne!=null&&(pe=ne.signal)!==null&&pe!==void 0&&pe.aborted)throw new i;Z--<=0&&(yield fe)}}.call(this)}function ae(Z,ne=void 0){return ne!=null&&l(ne,"options"),ne?.signal!=null&&f(ne.signal,"options.signal"),Z=ie(Z),async function*(){var re;if(ne!=null&&(re=ne.signal)!==null&&re!==void 0&&re.aborted)throw new i;for await(let fe of this){var pe;if(ne!=null&&(pe=ne.signal)!==null&&pe!==void 0&&pe.aborted)throw new i;if(Z-- >0&&(yield fe),Z<=0)return}}.call(this)}e.exports.streamReturningOperators={asIndexedPairs:a(K,"readable.asIndexedPairs will be removed in a future version."),drop:H,filter:D,flatMap:ce,map:Y,take:ae,compose:N},e.exports.promiseReturningOperators={every:L,forEach:W,reduce:le,toArray:$,some:Q,find:P}}),S0=we((o,e)=>{"use strict";be(),ve(),me();var{ArrayPrototypePop:r,Promise:h}=et(),{isIterable:d,isNodeStream:t,isWebStream:n}=Ft(),{pipelineImpl:i}=bs(),{finished:f}=Ht();C0();function c(...l){return new h((g,u)=>{let s,x,E=l[l.length-1];if(E&&typeof E=="object"&&!t(E)&&!d(E)&&!n(E)){let v=r(l);s=v.signal,x=v.end}i(l,(v,y)=>{v?u(v):g(y)},{signal:s,end:x})})}e.exports={finished:f,pipeline:c}}),C0=we((o,e)=>{"use strict";be(),ve(),me();var{Buffer:r}=(st(),He(it)),{ObjectDefineProperty:h,ObjectKeys:d,ReflectApply:t}=et(),{promisify:{custom:n}}=dt(),{streamReturningOperators:i,promiseReturningOperators:f}=ac(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:c}}=ht(),l=A0(),{setDefaultHighWaterMark:g,getDefaultHighWaterMark:u}=cn(),{pipeline:s}=bs(),{destroyer:x}=ur(),E=Ht(),v=S0(),y=Ft(),a=e.exports=xs().Stream;a.isDestroyed=y.isDestroyed,a.isDisturbed=y.isDisturbed,a.isErrored=y.isErrored,a.isReadable=y.isReadable,a.isWritable=y.isWritable,a.Readable=fn();for(let _ of d(i)){let w=function(...k){if(new.target)throw c();return a.Readable.from(t(B,this,k))},B=i[_];h(w,"name",{__proto__:null,value:B.name}),h(w,"length",{__proto__:null,value:B.length}),h(a.Readable.prototype,_,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}for(let _ of d(f)){let w=function(...k){if(new.target)throw c();return t(B,this,k)},B=f[_];h(w,"name",{__proto__:null,value:B.name}),h(w,"length",{__proto__:null,value:B.length}),h(a.Readable.prototype,_,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}a.Writable=ys(),a.Duplex=Dt(),a.Transform=w0(),a.PassThrough=E0(),a.pipeline=s;var{addAbortSignal:m}=un();a.addAbortSignal=m,a.finished=E,a.destroy=x,a.compose=l,a.setDefaultHighWaterMark=g,a.getDefaultHighWaterMark=u,h(a,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return v}}),h(s,n,{__proto__:null,enumerable:!0,get(){return v.pipeline}}),h(E,n,{__proto__:null,enumerable:!0,get(){return v.finished}}),a.Stream=a,a._isUint8Array=function(_){return _ instanceof Uint8Array},a._uint8ArrayToBuffer=function(_){return r.from(_.buffer,_.byteOffset,_.byteLength)}}),tr=we((o,e)=>{"use strict";be(),ve(),me();var r=C0(),h=S0(),d=r.Readable.destroy;e.exports=r.Readable,e.exports._uint8ArrayToBuffer=r._uint8ArrayToBuffer,e.exports._isUint8Array=r._isUint8Array,e.exports.isDisturbed=r.isDisturbed,e.exports.isErrored=r.isErrored,e.exports.isReadable=r.isReadable,e.exports.Readable=r.Readable,e.exports.Writable=r.Writable,e.exports.Duplex=r.Duplex,e.exports.Transform=r.Transform,e.exports.PassThrough=r.PassThrough,e.exports.addAbortSignal=r.addAbortSignal,e.exports.finished=r.finished,e.exports.destroy=r.destroy,e.exports.destroy=d,e.exports.pipeline=r.pipeline,e.exports.compose=r.compose,Object.defineProperty(r,"promises",{configurable:!0,enumerable:!0,get(){return h}}),e.exports.Stream=r.Stream,e.exports.default=e.exports}),lc=we((o,e)=>{be(),ve(),me(),typeof Object.create=="function"?e.exports=function(r,h){h&&(r.super_=h,r.prototype=Object.create(h.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(r,h){if(h){r.super_=h;var d=function(){};d.prototype=h.prototype,r.prototype=new d,r.prototype.constructor=r}}}),uc=we((o,e)=>{"use strict";be(),ve(),me();var{Buffer:r}=(st(),He(it)),h=Symbol.for("BufferList");function d(t){if(!(this instanceof d))return new d(t);d._init.call(this,t)}d._init=function(t){Object.defineProperty(this,h,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)},d.prototype._new=function(t){return new d(t)},d.prototype._offset=function(t){if(t===0)return[0,0];let n=0;for(let i=0;i<this._bufs.length;i++){let f=n+this._bufs[i].length;if(t<f||i===this._bufs.length-1)return[i,t-n];n=f}},d.prototype._reverseOffset=function(t){let n=t[0],i=t[1];for(let f=0;f<n;f++)i+=this._bufs[f].length;return i},d.prototype.getBuffers=function(){return this._bufs},d.prototype.get=function(t){if(t>this.length||t<0)return;let n=this._offset(t);return this._bufs[n[0]][n[1]]},d.prototype.slice=function(t,n){return typeof t=="number"&&t<0&&(t+=this.length),typeof n=="number"&&n<0&&(n+=this.length),this.copy(null,0,t,n)},d.prototype.copy=function(t,n,i,f){if((typeof i!="number"||i<0)&&(i=0),(typeof f!="number"||f>this.length)&&(f=this.length),i>=this.length||f<=0)return t||r.alloc(0);let c=!!t,l=this._offset(i),g=f-i,u=g,s=c&&n||0,x=l[1];if(i===0&&f===this.length){if(!c)return this._bufs.length===1?this._bufs[0]:r.concat(this._bufs,this.length);for(let E=0;E<this._bufs.length;E++)this._bufs[E].copy(t,s),s+=this._bufs[E].length;return t}if(u<=this._bufs[l[0]].length-x)return c?this._bufs[l[0]].copy(t,n,x,x+u):this._bufs[l[0]].slice(x,x+u);c||(t=r.allocUnsafe(g));for(let E=l[0];E<this._bufs.length;E++){let v=this._bufs[E].length-x;if(u>v)this._bufs[E].copy(t,s,x),s+=v;else{this._bufs[E].copy(t,s,x,x+u),s+=v;break}u-=v,x&&(x=0)}return t.length>s?t.slice(0,s):t},d.prototype.shallowSlice=function(t,n){if(t=t||0,n=typeof n!="number"?this.length:n,t<0&&(t+=this.length),n<0&&(n+=this.length),t===n)return this._new();let i=this._offset(t),f=this._offset(n),c=this._bufs.slice(i[0],f[0]+1);return f[1]===0?c.pop():c[c.length-1]=c[c.length-1].slice(0,f[1]),i[1]!==0&&(c[0]=c[0].slice(i[1])),this._new(c)},d.prototype.toString=function(t,n,i){return this.slice(n,i).toString(t)},d.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this},d.prototype.duplicate=function(){let t=this._new();for(let n=0;n<this._bufs.length;n++)t.append(this._bufs[n]);return t},d.prototype.append=function(t){return this._attach(t,d.prototype._appendBuffer)},d.prototype.prepend=function(t){return this._attach(t,d.prototype._prependBuffer,!0)},d.prototype._attach=function(t,n,i){if(t==null)return this;if(t.buffer)n.call(this,r.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t)){let[f,c]=i?[t.length-1,-1]:[0,1];for(let l=f;l>=0&&l<t.length;l+=c)this._attach(t[l],n,i)}else if(this._isBufferList(t)){let[f,c]=i?[t._bufs.length-1,-1]:[0,1];for(let l=f;l>=0&&l<t._bufs.length;l+=c)this._attach(t._bufs[l],n,i)}else typeof t=="number"&&(t=t.toString()),n.call(this,r.from(t));return this},d.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length},d.prototype._prependBuffer=function(t){this._bufs.unshift(t),this.length+=t.length},d.prototype.indexOf=function(t,n,i){if(i===void 0&&typeof n=="string"&&(i=n,n=void 0),typeof t=="function"||Array.isArray(t))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof t=="number"?t=r.from([t]):typeof t=="string"?t=r.from(t,i):this._isBufferList(t)?t=t.slice():Array.isArray(t.buffer)?t=r.from(t.buffer,t.byteOffset,t.byteLength):r.isBuffer(t)||(t=r.from(t)),n=Number(n||0),isNaN(n)&&(n=0),n<0&&(n=this.length+n),n<0&&(n=0),t.length===0)return n>this.length?this.length:n;let f=this._offset(n),c=f[0],l=f[1];for(;c<this._bufs.length;c++){let g=this._bufs[c];for(;l<g.length;)if(g.length-l>=t.length){let u=g.indexOf(t,l);if(u!==-1)return this._reverseOffset([c,u]);l=g.length-t.length+1}else{let u=this._reverseOffset([c,l]);if(this._match(u,t))return u;l++}l=0}return-1},d.prototype._match=function(t,n){if(this.length-t<n.length)return!1;for(let i=0;i<n.length;i++)if(this.get(t+i)!==n[i])return!1;return!0},(function(){let t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readBigInt64BE:8,readBigInt64LE:8,readBigUInt64BE:8,readBigUInt64LE:8,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let n in t)(function(i){t[i]===null?d.prototype[i]=function(f,c){return this.slice(f,f+c)[i](0,c)}:d.prototype[i]=function(f=0){return this.slice(f,f+t[i])[i](0)}})(n)})(),d.prototype._isBufferList=function(t){return t instanceof d||d.isBufferList(t)},d.isBufferList=function(t){return t!=null&&t[h]},e.exports=d}),cc=we((o,e)=>{"use strict";be(),ve(),me();var r=tr().Duplex,h=lc(),d=uc();function t(n){if(!(this instanceof t))return new t(n);if(typeof n=="function"){this._callback=n;let i=function(f){this._callback&&(this._callback(f),this._callback=null)}.bind(this);this.on("pipe",function(f){f.on("error",i)}),this.on("unpipe",function(f){f.removeListener("error",i)}),n=null}d._init.call(this,n),r.call(this)}h(t,r),Object.assign(t.prototype,d.prototype),t.prototype._new=function(n){return new t(n)},t.prototype._write=function(n,i,f){this._appendBuffer(n),typeof f=="function"&&f()},t.prototype._read=function(n){if(!this.length)return this.push(null);n=Math.min(n,this.length),this.push(this.slice(0,n)),this.consume(n)},t.prototype.end=function(n){r.prototype.end.call(this,n),this._callback&&(this._callback(null,this.slice()),this._callback=null)},t.prototype._destroy=function(n,i){this._bufs.length=0,this.length=0,i(n)},t.prototype._isBufferList=function(n){return n instanceof t||n instanceof d||t.isBufferList(n)},t.isBufferList=d.isBufferList,e.exports=t,e.exports.BufferListStream=t,e.exports.BufferList=d}),fc=we((o,e)=>{be(),ve(),me();var r=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}};e.exports=r}),B0=we((o,e)=>{be(),ve(),me();var r=e.exports,{Buffer:h}=(st(),He(it));r.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},r.requiredHeaderFlags={1:0,2:0,4:0,5:0,6:2,7:0,8:2,9:0,10:2,11:0,12:0,13:0,14:0,15:0},r.requiredHeaderFlagsErrors={};for(let t in r.requiredHeaderFlags){let n=r.requiredHeaderFlags[t];r.requiredHeaderFlagsErrors[t]="Invalid header flag bits, must be 0x"+n.toString(16)+" for "+r.types[t]+" packet"}r.codes={};for(let t in r.types){let n=r.types[t];r.codes[n]=t}r.CMD_SHIFT=4,r.CMD_MASK=240,r.DUP_MASK=8,r.QOS_MASK=3,r.QOS_SHIFT=1,r.RETAIN_MASK=1,r.VARBYTEINT_MASK=127,r.VARBYTEINT_FIN_MASK=128,r.VARBYTEINT_MAX=268435455,r.SESSIONPRESENT_MASK=1,r.SESSIONPRESENT_HEADER=h.from([r.SESSIONPRESENT_MASK]),r.CONNACK_HEADER=h.from([r.codes.connack<<r.CMD_SHIFT]),r.USERNAME_MASK=128,r.PASSWORD_MASK=64,r.WILL_RETAIN_MASK=32,r.WILL_QOS_MASK=24,r.WILL_QOS_SHIFT=3,r.WILL_FLAG_MASK=4,r.CLEAN_SESSION_MASK=2,r.CONNECT_HEADER=h.from([r.codes.connect<<r.CMD_SHIFT]),r.properties={sessionExpiryInterval:17,willDelayInterval:24,receiveMaximum:33,maximumPacketSize:39,topicAliasMaximum:34,requestResponseInformation:25,requestProblemInformation:23,userProperties:38,authenticationMethod:21,authenticationData:22,payloadFormatIndicator:1,messageExpiryInterval:2,contentType:3,responseTopic:8,correlationData:9,maximumQoS:36,retainAvailable:37,assignedClientIdentifier:18,reasonString:31,wildcardSubscriptionAvailable:40,subscriptionIdentifiersAvailable:41,sharedSubscriptionAvailable:42,serverKeepAlive:19,responseInformation:26,serverReference:28,topicAlias:35,subscriptionIdentifier:11},r.propertiesCodes={};for(let t in r.properties){let n=r.properties[t];r.propertiesCodes[n]=t}r.propertiesTypes={sessionExpiryInterval:"int32",willDelayInterval:"int32",receiveMaximum:"int16",maximumPacketSize:"int32",topicAliasMaximum:"int16",requestResponseInformation:"byte",requestProblemInformation:"byte",userProperties:"pair",authenticationMethod:"string",authenticationData:"binary",payloadFormatIndicator:"byte",messageExpiryInterval:"int32",contentType:"string",responseTopic:"string",correlationData:"binary",maximumQoS:"int8",retainAvailable:"byte",assignedClientIdentifier:"string",reasonString:"string",wildcardSubscriptionAvailable:"byte",subscriptionIdentifiersAvailable:"byte",sharedSubscriptionAvailable:"byte",serverKeepAlive:"int16",responseInformation:"string",serverReference:"string",topicAlias:"int16",subscriptionIdentifier:"var"};function d(t){return[0,1,2].map(n=>[0,1].map(i=>[0,1].map(f=>{let c=h.alloc(1);return c.writeUInt8(r.codes[t]<<r.CMD_SHIFT|(i?r.DUP_MASK:0)|n<<r.QOS_SHIFT|f,0,!0),c})))}r.PUBLISH_HEADER=d("publish"),r.SUBSCRIBE_HEADER=d("subscribe"),r.SUBSCRIBE_OPTIONS_QOS_MASK=3,r.SUBSCRIBE_OPTIONS_NL_MASK=1,r.SUBSCRIBE_OPTIONS_NL_SHIFT=2,r.SUBSCRIBE_OPTIONS_RAP_MASK=1,r.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,r.SUBSCRIBE_OPTIONS_RH_MASK=3,r.SUBSCRIBE_OPTIONS_RH_SHIFT=4,r.SUBSCRIBE_OPTIONS_RH=[0,16,32],r.SUBSCRIBE_OPTIONS_NL=4,r.SUBSCRIBE_OPTIONS_RAP=8,r.SUBSCRIBE_OPTIONS_QOS=[0,1,2],r.UNSUBSCRIBE_HEADER=d("unsubscribe"),r.ACKS={unsuback:d("unsuback"),puback:d("puback"),pubcomp:d("pubcomp"),pubrel:d("pubrel"),pubrec:d("pubrec")},r.SUBACK_HEADER=h.from([r.codes.suback<<r.CMD_SHIFT]),r.VERSION3=h.from([3]),r.VERSION4=h.from([4]),r.VERSION5=h.from([5]),r.VERSION131=h.from([131]),r.VERSION132=h.from([132]),r.QOS=[0,1,2].map(t=>h.from([t])),r.EMPTY={pingreq:h.from([r.codes.pingreq<<4,0]),pingresp:h.from([r.codes.pingresp<<4,0]),disconnect:h.from([r.codes.disconnect<<4,0])},r.MQTT5_PUBACK_PUBREC_CODES={0:"Success",16:"No matching subscribers",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",144:"Topic Name invalid",145:"Packet identifier in use",151:"Quota exceeded",153:"Payload format invalid"},r.MQTT5_PUBREL_PUBCOMP_CODES={0:"Success",146:"Packet Identifier not found"},r.MQTT5_SUBACK_CODES={0:"Granted QoS 0",1:"Granted QoS 1",2:"Granted QoS 2",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",143:"Topic Filter invalid",145:"Packet Identifier in use",151:"Quota exceeded",158:"Shared Subscriptions not supported",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"},r.MQTT5_UNSUBACK_CODES={0:"Success",17:"No subscription existed",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",143:"Topic Filter invalid",145:"Packet Identifier in use"},r.MQTT5_DISCONNECT_CODES={0:"Normal disconnection",4:"Disconnect with Will Message",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",135:"Not authorized",137:"Server busy",139:"Server shutting down",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"},r.MQTT5_AUTH_CODES={0:"Success",24:"Continue authentication",25:"Re-authenticate"}}),hc=we((o,e)=>{be(),ve(),me();var r=1e3,h=r*60,d=h*60,t=d*24,n=t*7,i=t*365.25;e.exports=function(u,s){s=s||{};var x=typeof u;if(x==="string"&&u.length>0)return f(u);if(x==="number"&&isFinite(u))return s.long?l(u):c(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function f(u){if(u=String(u),!(u.length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(s){var x=parseFloat(s[1]),E=(s[2]||"ms").toLowerCase();switch(E){case"years":case"year":case"yrs":case"yr":case"y":return x*i;case"weeks":case"week":case"w":return x*n;case"days":case"day":case"d":return x*t;case"hours":case"hour":case"hrs":case"hr":case"h":return x*d;case"minutes":case"minute":case"mins":case"min":case"m":return x*h;case"seconds":case"second":case"secs":case"sec":case"s":return x*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return x;default:return}}}}function c(u){var s=Math.abs(u);return s>=t?Math.round(u/t)+"d":s>=d?Math.round(u/d)+"h":s>=h?Math.round(u/h)+"m":s>=r?Math.round(u/r)+"s":u+"ms"}function l(u){var s=Math.abs(u);return s>=t?g(u,s,t,"day"):s>=d?g(u,s,d,"hour"):s>=h?g(u,s,h,"minute"):s>=r?g(u,s,r,"second"):u+" ms"}function g(u,s,x,E){var v=s>=x*1.5;return Math.round(u/x)+" "+E+(v?"s":"")}}),pc=we((o,e)=>{be(),ve(),me();function r(h){t.debug=t,t.default=t,t.coerce=g,t.disable=c,t.enable=i,t.enabled=l,t.humanize=hc(),t.destroy=u,Object.keys(h).forEach(s=>{t[s]=h[s]}),t.names=[],t.skips=[],t.formatters={};function d(s){let x=0;for(let E=0;E<s.length;E++)x=(x<<5)-x+s.charCodeAt(E),x|=0;return t.colors[Math.abs(x)%t.colors.length]}t.selectColor=d;function t(s){let x,E=null,v,y;function a(...m){if(!a.enabled)return;let _=a,w=Number(new Date),B=w-(x||w);_.diff=B,_.prev=x,_.curr=w,x=w,m[0]=t.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let k=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(R,M)=>{if(R==="%%")return"%";k++;let O=t.formatters[M];if(typeof O=="function"){let C=m[k];R=O.call(_,C),m.splice(k,1),k--}return R}),t.formatArgs.call(_,m),(_.log||t.log).apply(_,m)}return a.namespace=s,a.useColors=t.useColors(),a.color=t.selectColor(s),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>E!==null?E:(v!==t.namespaces&&(v=t.namespaces,y=t.enabled(s)),y),set:m=>{E=m}}),typeof t.init=="function"&&t.init(a),a}function n(s,x){let E=t(this.namespace+(typeof x>"u"?":":x)+s);return E.log=this.log,E}function i(s){t.save(s),t.namespaces=s,t.names=[],t.skips=[];let x=(typeof s=="string"?s:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let E of x)E[0]==="-"?t.skips.push(E.slice(1)):t.names.push(E)}function f(s,x){let E=0,v=0,y=-1,a=0;for(;E<s.length;)if(v<x.length&&(x[v]===s[E]||x[v]==="*"))x[v]==="*"?(y=v,a=E,v++):(E++,v++);else if(y!==-1)v=y+1,a++,E=a;else return!1;for(;v<x.length&&x[v]==="*";)v++;return v===x.length}function c(){let s=[...t.names,...t.skips.map(x=>"-"+x)].join(",");return t.enable(""),s}function l(s){for(let x of t.skips)if(f(s,x))return!1;for(let x of t.names)if(f(s,x))return!0;return!1}function g(s){return s instanceof Error?s.stack||s.message:s}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}e.exports=r}),rr=we((o,e)=>{be(),ve(),me(),o.formatArgs=h,o.save=d,o.load=t,o.useColors=r,o.storage=n(),o.destroy=(()=>{let f=!1;return()=>{f||(f=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),o.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let f;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(f=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(f[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function h(f){if(f[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+f[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;let c="color: "+this.color;f.splice(1,0,c,"color: inherit");let l=0,g=0;f[0].replace(/%[a-zA-Z%]/g,u=>{u!=="%%"&&(l++,u==="%c"&&(g=l))}),f.splice(g,0,c)}o.log=console.debug||console.log||(()=>{});function d(f){try{f?o.storage.setItem("debug",f):o.storage.removeItem("debug")}catch{}}function t(){let f;try{f=o.storage.getItem("debug")||o.storage.getItem("DEBUG")}catch{}return!f&&typeof $e<"u"&&"env"in $e&&(f=$e.env.DEBUG),f}function n(){try{return localStorage}catch{}}e.exports=pc()(o);var{formatters:i}=e.exports;i.j=function(f){try{return JSON.stringify(f)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}}),dc=we((o,e)=>{be(),ve(),me();var r=cc(),{EventEmitter:h}=(er(),He(Wt)),d=fc(),t=B0(),n=rr()("mqtt-packet:parser"),i=class _i extends h{constructor(){super(),this.parser=this.constructor.parser}static parser(c){return this instanceof _i?(this.settings=c||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):new _i().parser(c)}_resetState(){n("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new d,this.error=null,this._list=r(),this._stateCounter=0}parse(c){for(this.error&&this._resetState(),this._list.append(c),n("parse: current state: %s",this._states[this._stateCounter]);(this.packet.length!==-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,n("parse: state complete. _stateCounter is now: %d",this._stateCounter),n("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return n("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){let c=this._list.readUInt8(0),l=c>>t.CMD_SHIFT;this.packet.cmd=t.types[l];let g=c&15,u=t.requiredHeaderFlags[l];return u!=null&&g!==u?this._emitError(new Error(t.requiredHeaderFlagsErrors[l])):(this.packet.retain=(c&t.RETAIN_MASK)!==0,this.packet.qos=c>>t.QOS_SHIFT&t.QOS_MASK,this.packet.qos>2?this._emitError(new Error("Packet must not have both QoS bits set to 1")):(this.packet.dup=(c&t.DUP_MASK)!==0,n("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0))}_parseLength(){let c=this._parseVarByteNum(!0);return c&&(this.packet.length=c.value,this._list.consume(c.bytes)),n("_parseLength %d",c.value),!!c}_parsePayload(){n("_parsePayload: payload %O",this._list);let c=!1;if(this.packet.length===0||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}c=!0}return n("_parsePayload complete result: %s",c),c}_parseConnect(){n("_parseConnect");let c,l,g,u,s={},x=this.packet,E=this._parseString();if(E===null)return this._emitError(new Error("Cannot parse protocolId"));if(E!=="MQTT"&&E!=="MQIsdp")return this._emitError(new Error("Invalid protocolId"));if(x.protocolId=E,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(x.protocolVersion=this._list.readUInt8(this._pos),x.protocolVersion>=128&&(x.bridgeMode=!0,x.protocolVersion=x.protocolVersion-128),x.protocolVersion!==3&&x.protocolVersion!==4&&x.protocolVersion!==5)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(this._list.readUInt8(this._pos)&1)return this._emitError(new Error("Connect flag bit 0 must be 0, but got 1"));s.username=this._list.readUInt8(this._pos)&t.USERNAME_MASK,s.password=this._list.readUInt8(this._pos)&t.PASSWORD_MASK,s.will=this._list.readUInt8(this._pos)&t.WILL_FLAG_MASK;let v=!!(this._list.readUInt8(this._pos)&t.WILL_RETAIN_MASK),y=(this._list.readUInt8(this._pos)&t.WILL_QOS_MASK)>>t.WILL_QOS_SHIFT;if(s.will)x.will={},x.will.retain=v,x.will.qos=y;else{if(v)return this._emitError(new Error("Will Retain Flag must be set to zero when Will Flag is set to 0"));if(y)return this._emitError(new Error("Will QoS must be set to zero when Will Flag is set to 0"))}if(x.clean=(this._list.readUInt8(this._pos)&t.CLEAN_SESSION_MASK)!==0,this._pos++,x.keepalive=this._parseNum(),x.keepalive===-1)return this._emitError(new Error("Packet too short"));if(x.protocolVersion===5){let m=this._parseProperties();Object.getOwnPropertyNames(m).length&&(x.properties=m)}let a=this._parseString();if(a===null)return this._emitError(new Error("Packet too short"));if(x.clientId=a,n("_parseConnect: packet.clientId: %s",x.clientId),s.will){if(x.protocolVersion===5){let m=this._parseProperties();Object.getOwnPropertyNames(m).length&&(x.will.properties=m)}if(c=this._parseString(),c===null)return this._emitError(new Error("Cannot parse will topic"));if(x.will.topic=c,n("_parseConnect: packet.will.topic: %s",x.will.topic),l=this._parseBuffer(),l===null)return this._emitError(new Error("Cannot parse will payload"));x.will.payload=l,n("_parseConnect: packet.will.paylaod: %s",x.will.payload)}if(s.username){if(u=this._parseString(),u===null)return this._emitError(new Error("Cannot parse username"));x.username=u,n("_parseConnect: packet.username: %s",x.username)}if(s.password){if(g=this._parseBuffer(),g===null)return this._emitError(new Error("Cannot parse password"));x.password=g}return this.settings=x,n("_parseConnect: complete"),x}_parseConnack(){n("_parseConnack");let c=this.packet;if(this._list.length<1)return null;let l=this._list.readUInt8(this._pos++);if(l>1)return this._emitError(new Error("Invalid connack flags, bits 7-1 must be set to 0"));if(c.sessionPresent=!!(l&t.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?c.reasonCode=this._list.readUInt8(this._pos++):c.reasonCode=0;else{if(this._list.length<2)return null;c.returnCode=this._list.readUInt8(this._pos++)}if(c.returnCode===-1||c.reasonCode===-1)return this._emitError(new Error("Cannot parse return code"));if(this.settings.protocolVersion===5){let g=this._parseProperties();Object.getOwnPropertyNames(g).length&&(c.properties=g)}n("_parseConnack: complete")}_parsePublish(){n("_parsePublish");let c=this.packet;if(c.topic=this._parseString(),c.topic===null)return this._emitError(new Error("Cannot parse topic"));if(!(c.qos>0&&!this._parseMessageId())){if(this.settings.protocolVersion===5){let l=this._parseProperties();Object.getOwnPropertyNames(l).length&&(c.properties=l)}c.payload=this._list.slice(this._pos,c.length),n("_parsePublish: payload from buffer list: %o",c.payload)}}_parseSubscribe(){n("_parseSubscribe");let c=this.packet,l,g,u,s,x,E,v;if(c.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let y=this._parseProperties();Object.getOwnPropertyNames(y).length&&(c.properties=y)}if(c.length<=0)return this._emitError(new Error("Malformed subscribe, no payload specified"));for(;this._pos<c.length;){if(l=this._parseString(),l===null)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=c.length)return this._emitError(new Error("Malformed Subscribe Payload"));if(g=this._parseByte(),this.settings.protocolVersion===5){if(g&192)return this._emitError(new Error("Invalid subscribe topic flag bits, bits 7-6 must be 0"))}else if(g&252)return this._emitError(new Error("Invalid subscribe topic flag bits, bits 7-2 must be 0"));if(u=g&t.SUBSCRIBE_OPTIONS_QOS_MASK,u>2)return this._emitError(new Error("Invalid subscribe QoS, must be <= 2"));if(E=(g>>t.SUBSCRIBE_OPTIONS_NL_SHIFT&t.SUBSCRIBE_OPTIONS_NL_MASK)!==0,x=(g>>t.SUBSCRIBE_OPTIONS_RAP_SHIFT&t.SUBSCRIBE_OPTIONS_RAP_MASK)!==0,s=g>>t.SUBSCRIBE_OPTIONS_RH_SHIFT&t.SUBSCRIBE_OPTIONS_RH_MASK,s>2)return this._emitError(new Error("Invalid retain handling, must be <= 2"));v={topic:l,qos:u},this.settings.protocolVersion===5?(v.nl=E,v.rap=x,v.rh=s):this.settings.bridgeMode&&(v.rh=0,v.rap=!0,v.nl=!0),n("_parseSubscribe: push subscription `%s` to subscription",v),c.subscriptions.push(v)}}}_parseSuback(){n("_parseSuback");let c=this.packet;if(this.packet.granted=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let l=this._parseProperties();Object.getOwnPropertyNames(l).length&&(c.properties=l)}if(c.length<=0)return this._emitError(new Error("Malformed suback, no payload specified"));for(;this._pos<this.packet.length;){let l=this._list.readUInt8(this._pos++);if(this.settings.protocolVersion===5){if(!t.MQTT5_SUBACK_CODES[l])return this._emitError(new Error("Invalid suback code"))}else if(l>2&&l!==128)return this._emitError(new Error("Invalid suback QoS, must be 0, 1, 2 or 128"));this.packet.granted.push(l)}}}_parseUnsubscribe(){n("_parseUnsubscribe");let c=this.packet;if(c.unsubscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let l=this._parseProperties();Object.getOwnPropertyNames(l).length&&(c.properties=l)}if(c.length<=0)return this._emitError(new Error("Malformed unsubscribe, no payload specified"));for(;this._pos<c.length;){let l=this._parseString();if(l===null)return this._emitError(new Error("Cannot parse topic"));n("_parseUnsubscribe: push topic `%s` to unsubscriptions",l),c.unsubscriptions.push(l)}}}_parseUnsuback(){n("_parseUnsuback");let c=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if((this.settings.protocolVersion===3||this.settings.protocolVersion===4)&&c.length!==2)return this._emitError(new Error("Malformed unsuback, payload length must be 2"));if(c.length<=0)return this._emitError(new Error("Malformed unsuback, no payload specified"));if(this.settings.protocolVersion===5){let l=this._parseProperties();for(Object.getOwnPropertyNames(l).length&&(c.properties=l),c.granted=[];this._pos<this.packet.length;){let g=this._list.readUInt8(this._pos++);if(!t.MQTT5_UNSUBACK_CODES[g])return this._emitError(new Error("Invalid unsuback code"));this.packet.granted.push(g)}}}_parseConfirmation(){n("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);let c=this.packet;if(this._parseMessageId(),this.settings.protocolVersion===5){if(c.length>2){switch(c.reasonCode=this._parseByte(),this.packet.cmd){case"puback":case"pubrec":if(!t.MQTT5_PUBACK_PUBREC_CODES[c.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break;case"pubrel":case"pubcomp":if(!t.MQTT5_PUBREL_PUBCOMP_CODES[c.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break}n("_parseConfirmation: packet.reasonCode `%d`",c.reasonCode)}else c.reasonCode=0;if(c.length>3){let l=this._parseProperties();Object.getOwnPropertyNames(l).length&&(c.properties=l)}}return!0}_parseDisconnect(){let c=this.packet;if(n("_parseDisconnect"),this.settings.protocolVersion===5){this._list.length>0?(c.reasonCode=this._parseByte(),t.MQTT5_DISCONNECT_CODES[c.reasonCode]||this._emitError(new Error("Invalid disconnect reason code"))):c.reasonCode=0;let l=this._parseProperties();Object.getOwnPropertyNames(l).length&&(c.properties=l)}return n("_parseDisconnect result: true"),!0}_parseAuth(){n("_parseAuth");let c=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error("Not supported auth packet for this version MQTT"));if(c.reasonCode=this._parseByte(),!t.MQTT5_AUTH_CODES[c.reasonCode])return this._emitError(new Error("Invalid auth reason code"));let l=this._parseProperties();return Object.getOwnPropertyNames(l).length&&(c.properties=l),n("_parseAuth: result: true"),!0}_parseMessageId(){let c=this.packet;return c.messageId=this._parseNum(),c.messageId===null?(this._emitError(new Error("Cannot parse messageId")),!1):(n("_parseMessageId: packet.messageId %d",c.messageId),!0)}_parseString(c){let l=this._parseNum(),g=l+this._pos;if(l===-1||g>this._list.length||g>this.packet.length)return null;let u=this._list.toString("utf8",this._pos,g);return this._pos+=l,n("_parseString: result: %s",u),u}_parseStringPair(){return n("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){let c=this._parseNum(),l=c+this._pos;if(c===-1||l>this._list.length||l>this.packet.length)return null;let g=this._list.slice(this._pos,l);return this._pos+=c,n("_parseBuffer: result: %o",g),g}_parseNum(){if(this._list.length-this._pos<2)return-1;let c=this._list.readUInt16BE(this._pos);return this._pos+=2,n("_parseNum: result: %s",c),c}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;let c=this._list.readUInt32BE(this._pos);return this._pos+=4,n("_parse4ByteNum: result: %s",c),c}_parseVarByteNum(c){n("_parseVarByteNum");let l=4,g=0,u=1,s=0,x=!1,E,v=this._pos?this._pos:0;for(;g<l&&v+g<this._list.length;){if(E=this._list.readUInt8(v+g++),s+=u*(E&t.VARBYTEINT_MASK),u*=128,(E&t.VARBYTEINT_FIN_MASK)===0){x=!0;break}if(this._list.length<=g)break}return!x&&g===l&&this._list.length>=g&&this._emitError(new Error("Invalid variable byte integer")),v&&(this._pos+=g),x?c?x={bytes:g,value:s}:x=s:x=!1,n("_parseVarByteNum: result: %o",x),x}_parseByte(){let c;return this._pos<this._list.length&&(c=this._list.readUInt8(this._pos),this._pos++),n("_parseByte: result: %o",c),c}_parseByType(c){switch(n("_parseByType: type: %s",c),c){case"byte":return this._parseByte()!==0;case"int8":return this._parseByte();case"int16":return this._parseNum();case"int32":return this._parse4ByteNum();case"var":return this._parseVarByteNum();case"string":return this._parseString();case"pair":return this._parseStringPair();case"binary":return this._parseBuffer()}}_parseProperties(){n("_parseProperties");let c=this._parseVarByteNum(),l=this._pos+c,g={};for(;this._pos<l;){let u=this._parseByte();if(!u)return this._emitError(new Error("Cannot parse property code type")),!1;let s=t.propertiesCodes[u];if(!s)return this._emitError(new Error("Unknown property")),!1;if(s==="userProperties"){g[s]||(g[s]=Object.create(null));let x=this._parseByType(t.propertiesTypes[s]);if(g[s][x.name])if(Array.isArray(g[s][x.name]))g[s][x.name].push(x.value);else{let E=g[s][x.name];g[s][x.name]=[E],g[s][x.name].push(x.value)}else g[s][x.name]=x.value;continue}g[s]?Array.isArray(g[s])?g[s].push(this._parseByType(t.propertiesTypes[s])):(g[s]=[g[s]],g[s].push(this._parseByType(t.propertiesTypes[s]))):g[s]=this._parseByType(t.propertiesTypes[s])}return g}_newPacket(){return n("_newPacket"),this.packet&&(this._list.consume(this.packet.length),n("_newPacket: parser emit packet: packet.cmd: %s, packet.payload: %s, packet.length: %d",this.packet.cmd,this.packet.payload,this.packet.length),this.emit("packet",this.packet)),n("_newPacket: new packet"),this.packet=new d,this._pos=0,!0}_emitError(c){n("_emitError",c),this.error=c,this.emit("error",c)}};e.exports=i}),gc=we((o,e)=>{be(),ve(),me();var{Buffer:r}=(st(),He(it)),h=65536,d={},t=r.isBuffer(r.from([1,2]).subarray(0,1));function n(l){let g=r.allocUnsafe(2);return g.writeUInt8(l>>8,0),g.writeUInt8(l&255,1),g}function i(){for(let l=0;l<h;l++)d[l]=n(l)}function f(l){let g=0,u=0,s=r.allocUnsafe(4);do g=l%128|0,l=l/128|0,l>0&&(g=g|128),s.writeUInt8(g,u++);while(l>0&&u<4);return l>0&&(u=0),t?s.subarray(0,u):s.slice(0,u)}function c(l){let g=r.allocUnsafe(4);return g.writeUInt32BE(l,0),g}e.exports={cache:d,generateCache:i,generateNumber:n,genBufVariableByteInt:f,generate4ByteBuffer:c}}),xc=we((o,e)=>{"use strict";be(),ve(),me(),typeof $e>"u"||!$e.version||$e.version.indexOf("v0.")===0||$e.version.indexOf("v1.")===0&&$e.version.indexOf("v1.8.")!==0?e.exports={nextTick:r}:e.exports=$e;function r(h,d,t,n){if(typeof h!="function")throw new TypeError('"callback" argument must be a function');var i=arguments.length,f,c;switch(i){case 0:case 1:return $e.nextTick(h);case 2:return $e.nextTick(function(){h.call(null,d)});case 3:return $e.nextTick(function(){h.call(null,d,t)});case 4:return $e.nextTick(function(){h.call(null,d,t,n)});default:for(f=new Array(i-1),c=0;c<f.length;)f[c++]=arguments[c];return $e.nextTick(function(){h.apply(null,f)})}}}),k0=we((o,e)=>{be(),ve(),me();var r=B0(),{Buffer:h}=(st(),He(it)),d=h.allocUnsafe(0),t=h.from([0]),n=gc(),i=xc().nextTick,f=rr()("mqtt-packet:writeToStream"),c=n.cache,l=n.generateNumber,g=n.generateCache,u=n.genBufVariableByteInt,s=n.generate4ByteBuffer,x=K,E=!0;function v(ie,H,ae){switch(f("generate called"),H.cork&&(H.cork(),i(y,H)),E&&(E=!1,g()),f("generate: packet.cmd: %s",ie.cmd),ie.cmd){case"connect":return a(ie,H,ae);case"connack":return m(ie,H,ae);case"publish":return _(ie,H,ae);case"puback":case"pubrec":case"pubrel":case"pubcomp":return w(ie,H,ae);case"subscribe":return B(ie,H,ae);case"suback":return k(ie,H,ae);case"unsubscribe":return R(ie,H,ae);case"unsuback":return M(ie,H,ae);case"pingreq":case"pingresp":return O(ie,H,ae);case"disconnect":return C(ie,H,ae);case"auth":return A(ie,H,ae);default:return H.destroy(new Error("Unknown command")),!1}}Object.defineProperty(v,"cacheNumbers",{get(){return x===K},set(ie){ie?((!c||Object.keys(c).length===0)&&(E=!0),x=K):(E=!1,x=Q)}});function y(ie){ie.uncork()}function a(ie,H,ae){let Z=ie||{},ne=Z.protocolId||"MQTT",re=Z.protocolVersion||4,pe=Z.will,fe=Z.clean,z=Z.keepalive||0,J=Z.clientId||"",ue=Z.username,de=Z.password,he=Z.properties;fe===void 0&&(fe=!0);let ge=0;if(!ne||typeof ne!="string"&&!h.isBuffer(ne))return H.destroy(new Error("Invalid protocolId")),!1;if(ge+=ne.length+2,re!==3&&re!==4&&re!==5)return H.destroy(new Error("Invalid protocol version")),!1;if(ge+=1,(typeof J=="string"||h.isBuffer(J))&&(J||re>=4)&&(J||fe))ge+=h.byteLength(J)+2;else{if(re<4)return H.destroy(new Error("clientId must be supplied before 3.1.1")),!1;if(fe*1===0)return H.destroy(new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof z!="number"||z<0||z>65535||z%1!==0)return H.destroy(new Error("Invalid keepalive")),!1;ge+=2,ge+=1;let te,xe;if(re===5){if(te=W(H,he),!te)return!1;ge+=te.length}if(pe){if(typeof pe!="object")return H.destroy(new Error("Invalid will")),!1;if(!pe.topic||typeof pe.topic!="string")return H.destroy(new Error("Invalid will topic")),!1;if(ge+=h.byteLength(pe.topic)+2,ge+=2,pe.payload)if(pe.payload.length>=0)typeof pe.payload=="string"?ge+=h.byteLength(pe.payload):ge+=pe.payload.length;else return H.destroy(new Error("Invalid will payload")),!1;if(xe={},re===5){if(xe=W(H,pe.properties),!xe)return!1;ge+=xe.length}}let Ce=!1;if(ue!=null)if(ce(ue))Ce=!0,ge+=h.byteLength(ue)+2;else return H.destroy(new Error("Invalid username")),!1;if(de!=null){if(!Ce)return H.destroy(new Error("Username is required to use password")),!1;if(ce(de))ge+=$(de)+2;else return H.destroy(new Error("Invalid password")),!1}H.write(r.CONNECT_HEADER),T(H,ge),P(H,ne),Z.bridgeMode&&(re+=128),H.write(re===131?r.VERSION131:re===132?r.VERSION132:re===4?r.VERSION4:re===5?r.VERSION5:r.VERSION3);let ye=0;return ye|=ue!=null?r.USERNAME_MASK:0,ye|=de!=null?r.PASSWORD_MASK:0,ye|=pe&&pe.retain?r.WILL_RETAIN_MASK:0,ye|=pe&&pe.qos?pe.qos<<r.WILL_QOS_SHIFT:0,ye|=pe?r.WILL_FLAG_MASK:0,ye|=fe?r.CLEAN_SESSION_MASK:0,H.write(h.from([ye])),x(H,z),re===5&&te.write(),P(H,J),pe&&(re===5&&xe.write(),N(H,pe.topic),P(H,pe.payload)),ue!=null&&P(H,ue),de!=null&&P(H,de),!0}function m(ie,H,ae){let Z=ae?ae.protocolVersion:4,ne=ie||{},re=Z===5?ne.reasonCode:ne.returnCode,pe=ne.properties,fe=2;if(typeof re!="number")return H.destroy(new Error("Invalid return code")),!1;let z=null;if(Z===5){if(z=W(H,pe),!z)return!1;fe+=z.length}return H.write(r.CONNACK_HEADER),T(H,fe),H.write(ne.sessionPresent?r.SESSIONPRESENT_HEADER:t),H.write(h.from([re])),z?.write(),!0}function _(ie,H,ae){f("publish: packet: %o",ie);let Z=ae?ae.protocolVersion:4,ne=ie||{},re=ne.qos||0,pe=ne.retain?r.RETAIN_MASK:0,fe=ne.topic,z=ne.payload||d,J=ne.messageId,ue=ne.properties,de=0;if(typeof fe=="string")de+=h.byteLength(fe)+2;else if(h.isBuffer(fe))de+=fe.length+2;else return H.destroy(new Error("Invalid topic")),!1;if(h.isBuffer(z)?de+=z.length:de+=h.byteLength(z),re&&typeof J!="number")return H.destroy(new Error("Invalid messageId")),!1;re&&(de+=2);let he=null;if(Z===5){if(he=W(H,ue),!he)return!1;de+=he.length}return H.write(r.PUBLISH_HEADER[re][ne.dup?1:0][pe?1:0]),T(H,de),x(H,$(fe)),H.write(fe),re>0&&x(H,J),he?.write(),f("publish: payload: %o",z),H.write(z)}function w(ie,H,ae){let Z=ae?ae.protocolVersion:4,ne=ie||{},re=ne.cmd||"puback",pe=ne.messageId,fe=ne.dup&&re==="pubrel"?r.DUP_MASK:0,z=0,J=ne.reasonCode,ue=ne.properties,de=Z===5?3:2;if(re==="pubrel"&&(z=1),typeof pe!="number")return H.destroy(new Error("Invalid messageId")),!1;let he=null;if(Z===5&&typeof ue=="object"){if(he=D(H,ue,ae,de),!he)return!1;de+=he.length}return H.write(r.ACKS[re][z][fe][0]),de===3&&(de+=J!==0?1:-1),T(H,de),x(H,pe),Z===5&&de!==2&&H.write(h.from([J])),he!==null?he.write():de===4&&H.write(h.from([0])),!0}function B(ie,H,ae){f("subscribe: packet: ");let Z=ae?ae.protocolVersion:4,ne=ie||{},re=ne.dup?r.DUP_MASK:0,pe=ne.messageId,fe=ne.subscriptions,z=ne.properties,J=0;if(typeof pe!="number")return H.destroy(new Error("Invalid messageId")),!1;J+=2;let ue=null;if(Z===5){if(ue=W(H,z),!ue)return!1;J+=ue.length}if(typeof fe=="object"&&fe.length)for(let he=0;he<fe.length;he+=1){let ge=fe[he].topic,te=fe[he].qos;if(typeof ge!="string")return H.destroy(new Error("Invalid subscriptions - invalid topic")),!1;if(typeof te!="number")return H.destroy(new Error("Invalid subscriptions - invalid qos")),!1;if(Z===5){if(typeof(fe[he].nl||!1)!="boolean")return H.destroy(new Error("Invalid subscriptions - invalid No Local")),!1;if(typeof(fe[he].rap||!1)!="boolean")return H.destroy(new Error("Invalid subscriptions - invalid Retain as Published")),!1;let xe=fe[he].rh||0;if(typeof xe!="number"||xe>2)return H.destroy(new Error("Invalid subscriptions - invalid Retain Handling")),!1}J+=h.byteLength(ge)+2+1}else return H.destroy(new Error("Invalid subscriptions")),!1;f("subscribe: writing to stream: %o",r.SUBSCRIBE_HEADER),H.write(r.SUBSCRIBE_HEADER[1][re?1:0][0]),T(H,J),x(H,pe),ue!==null&&ue.write();let de=!0;for(let he of fe){let ge=he.topic,te=he.qos,xe=+he.nl,Ce=+he.rap,ye=he.rh,Ie;N(H,ge),Ie=r.SUBSCRIBE_OPTIONS_QOS[te],Z===5&&(Ie|=xe?r.SUBSCRIBE_OPTIONS_NL:0,Ie|=Ce?r.SUBSCRIBE_OPTIONS_RAP:0,Ie|=ye?r.SUBSCRIBE_OPTIONS_RH[ye]:0),de=H.write(h.from([Ie]))}return de}function k(ie,H,ae){let Z=ae?ae.protocolVersion:4,ne=ie||{},re=ne.messageId,pe=ne.granted,fe=ne.properties,z=0;if(typeof re!="number")return H.destroy(new Error("Invalid messageId")),!1;if(z+=2,typeof pe=="object"&&pe.length)for(let ue=0;ue<pe.length;ue+=1){if(typeof pe[ue]!="number")return H.destroy(new Error("Invalid qos vector")),!1;z+=1}else return H.destroy(new Error("Invalid qos vector")),!1;let J=null;if(Z===5){if(J=D(H,fe,ae,z),!J)return!1;z+=J.length}return H.write(r.SUBACK_HEADER),T(H,z),x(H,re),J!==null&&J.write(),H.write(h.from(pe))}function R(ie,H,ae){let Z=ae?ae.protocolVersion:4,ne=ie||{},re=ne.messageId,pe=ne.dup?r.DUP_MASK:0,fe=ne.unsubscriptions,z=ne.properties,J=0;if(typeof re!="number")return H.destroy(new Error("Invalid messageId")),!1;if(J+=2,typeof fe=="object"&&fe.length)for(let he=0;he<fe.length;he+=1){if(typeof fe[he]!="string")return H.destroy(new Error("Invalid unsubscriptions")),!1;J+=h.byteLength(fe[he])+2}else return H.destroy(new Error("Invalid unsubscriptions")),!1;let ue=null;if(Z===5){if(ue=W(H,z),!ue)return!1;J+=ue.length}H.write(r.UNSUBSCRIBE_HEADER[1][pe?1:0][0]),T(H,J),x(H,re),ue!==null&&ue.write();let de=!0;for(let he=0;he<fe.length;he++)de=N(H,fe[he]);return de}function M(ie,H,ae){let Z=ae?ae.protocolVersion:4,ne=ie||{},re=ne.messageId,pe=ne.dup?r.DUP_MASK:0,fe=ne.granted,z=ne.properties,J=ne.cmd,ue=0,de=2;if(typeof re!="number")return H.destroy(new Error("Invalid messageId")),!1;if(Z===5)if(typeof fe=="object"&&fe.length)for(let ge=0;ge<fe.length;ge+=1){if(typeof fe[ge]!="number")return H.destroy(new Error("Invalid qos vector")),!1;de+=1}else return H.destroy(new Error("Invalid qos vector")),!1;let he=null;if(Z===5){if(he=D(H,z,ae,de),!he)return!1;de+=he.length}return H.write(r.ACKS[J][ue][pe][0]),T(H,de),x(H,re),he!==null&&he.write(),Z===5&&H.write(h.from(fe)),!0}function O(ie,H,ae){return H.write(r.EMPTY[ie.cmd])}function C(ie,H,ae){let Z=ae?ae.protocolVersion:4,ne=ie||{},re=ne.reasonCode,pe=ne.properties,fe=Z===5?1:0,z=null;if(Z===5){if(z=D(H,pe,ae,fe),!z)return!1;fe+=z.length}return H.write(h.from([r.codes.disconnect<<4])),T(H,fe),Z===5&&H.write(h.from([re])),z!==null&&z.write(),!0}function A(ie,H,ae){let Z=ae?ae.protocolVersion:4,ne=ie||{},re=ne.reasonCode,pe=ne.properties,fe=Z===5?1:0;Z!==5&&H.destroy(new Error("Invalid mqtt version for auth packet"));let z=D(H,pe,ae,fe);return z?(fe+=z.length,H.write(h.from([r.codes.auth<<4])),T(H,fe),H.write(h.from([re])),z!==null&&z.write(),!0):!1}var I={};function T(ie,H){if(H>r.VARBYTEINT_MAX)return ie.destroy(new Error(`Invalid variable byte integer: ${H}`)),!1;let ae=I[H];return ae||(ae=u(H),H<16384&&(I[H]=ae)),f("writeVarByteInt: writing to stream: %o",ae),ie.write(ae)}function N(ie,H){let ae=h.byteLength(H);return x(ie,ae),f("writeString: %s",H),ie.write(H,"utf8")}function Y(ie,H,ae){N(ie,H),N(ie,ae)}function K(ie,H){return f("writeNumberCached: number: %d",H),f("writeNumberCached: %o",c[H]),ie.write(c[H])}function Q(ie,H){let ae=l(H);return f("writeNumberGenerated: %o",ae),ie.write(ae)}function L(ie,H){let ae=s(H);return f("write4ByteNumber: %o",ae),ie.write(ae)}function P(ie,H){typeof H=="string"?N(ie,H):H?(x(ie,H.length),ie.write(H)):x(ie,0)}function W(ie,H){if(typeof H!="object"||H.length!=null)return{length:1,write(){le(ie,{},0)}};let ae=0;function Z(ne,re){let pe=r.propertiesTypes[ne],fe=0;switch(pe){case"byte":{if(typeof re!="boolean")return ie.destroy(new Error(`Invalid ${ne}: ${re}`)),!1;fe+=2;break}case"int8":{if(typeof re!="number"||re<0||re>255)return ie.destroy(new Error(`Invalid ${ne}: ${re}`)),!1;fe+=2;break}case"binary":{if(re&&re===null)return ie.destroy(new Error(`Invalid ${ne}: ${re}`)),!1;fe+=1+h.byteLength(re)+2;break}case"int16":{if(typeof re!="number"||re<0||re>65535)return ie.destroy(new Error(`Invalid ${ne}: ${re}`)),!1;fe+=3;break}case"int32":{if(typeof re!="number"||re<0||re>4294967295)return ie.destroy(new Error(`Invalid ${ne}: ${re}`)),!1;fe+=5;break}case"var":{if(typeof re!="number"||re<0||re>268435455)return ie.destroy(new Error(`Invalid ${ne}: ${re}`)),!1;fe+=1+h.byteLength(u(re));break}case"string":{if(typeof re!="string")return ie.destroy(new Error(`Invalid ${ne}: ${re}`)),!1;fe+=3+h.byteLength(re.toString());break}case"pair":{if(typeof re!="object")return ie.destroy(new Error(`Invalid ${ne}: ${re}`)),!1;fe+=Object.getOwnPropertyNames(re).reduce((z,J)=>{let ue=re[J];return Array.isArray(ue)?z+=ue.reduce((de,he)=>(de+=3+h.byteLength(J.toString())+2+h.byteLength(he.toString()),de),0):z+=3+h.byteLength(J.toString())+2+h.byteLength(re[J].toString()),z},0);break}default:return ie.destroy(new Error(`Invalid property ${ne}: ${re}`)),!1}return fe}if(H)for(let ne in H){let re=0,pe=0,fe=H[ne];if(fe!==void 0){if(Array.isArray(fe))for(let z=0;z<fe.length;z++){if(pe=Z(ne,fe[z]),!pe)return!1;re+=pe}else{if(pe=Z(ne,fe),!pe)return!1;re=pe}if(!re)return!1;ae+=re}}return{length:h.byteLength(u(ae))+ae,write(){le(ie,H,ae)}}}function D(ie,H,ae,Z){let ne=["reasonString","userProperties"],re=ae&&ae.properties&&ae.properties.maximumPacketSize?ae.properties.maximumPacketSize:0,pe=W(ie,H);if(re)for(;Z+pe.length>re;){let fe=ne.shift();if(fe&&H[fe])delete H[fe],pe=W(ie,H);else return!1}return pe}function ee(ie,H,ae){switch(r.propertiesTypes[H]){case"byte":{ie.write(h.from([r.properties[H]])),ie.write(h.from([+ae]));break}case"int8":{ie.write(h.from([r.properties[H]])),ie.write(h.from([ae]));break}case"binary":{ie.write(h.from([r.properties[H]])),P(ie,ae);break}case"int16":{ie.write(h.from([r.properties[H]])),x(ie,ae);break}case"int32":{ie.write(h.from([r.properties[H]])),L(ie,ae);break}case"var":{ie.write(h.from([r.properties[H]])),T(ie,ae);break}case"string":{ie.write(h.from([r.properties[H]])),N(ie,ae);break}case"pair":{Object.getOwnPropertyNames(ae).forEach(Z=>{let ne=ae[Z];Array.isArray(ne)?ne.forEach(re=>{ie.write(h.from([r.properties[H]])),Y(ie,Z.toString(),re.toString())}):(ie.write(h.from([r.properties[H]])),Y(ie,Z.toString(),ne.toString()))});break}default:return ie.destroy(new Error(`Invalid property ${H} value: ${ae}`)),!1}}function le(ie,H,ae){T(ie,ae);for(let Z in H)if(Object.prototype.hasOwnProperty.call(H,Z)&&H[Z]!=null){let ne=H[Z];if(Array.isArray(ne))for(let re=0;re<ne.length;re++)ee(ie,Z,ne[re]);else ee(ie,Z,ne)}}function $(ie){return ie?ie instanceof h?ie.length:h.byteLength(ie):0}function ce(ie){return typeof ie=="string"||ie instanceof h}e.exports=v}),yc=we((o,e)=>{be(),ve(),me();var r=k0(),{EventEmitter:h}=(er(),He(Wt)),{Buffer:d}=(st(),He(it));function t(i,f){let c=new n;return r(i,c,f),c.concat()}var n=class extends h{constructor(){super(),this._array=new Array(20),this._i=0}write(i){return this._array[this._i++]=i,!0}concat(){let i=0,f=new Array(this._array.length),c=this._array,l=0,g;for(g=0;g<c.length&&c[g]!==void 0;g++)typeof c[g]!="string"?f[g]=c[g].length:f[g]=d.byteLength(c[g]),i+=f[g];let u=d.allocUnsafe(i);for(g=0;g<c.length&&c[g]!==void 0;g++)typeof c[g]!="string"?(c[g].copy(u,l),l+=f[g]):(u.write(c[g],l),l+=f[g]);return u}destroy(i){i&&this.emit("error",i)}};e.exports=t}),bc=we(o=>{be(),ve(),me(),o.parser=dc().parser,o.generate=yc(),o.writeToStream=k0()}),mc=we((o,e)=>{"use strict";be(),ve(),me(),e.exports=h;function r(t){return t instanceof an?an.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function h(t){if(t=t||{},t.circles)return d(t);let n=new Map;if(n.set(Date,g=>new Date(g)),n.set(Map,(g,u)=>new Map(f(Array.from(g),u))),n.set(Set,(g,u)=>new Set(f(Array.from(g),u))),t.constructorHandlers)for(let g of t.constructorHandlers)n.set(g[0],g[1]);let i=null;return t.proto?l:c;function f(g,u){let s=Object.keys(g),x=new Array(s.length);for(let E=0;E<s.length;E++){let v=s[E],y=g[v];typeof y!="object"||y===null?x[v]=y:y.constructor!==Object&&(i=n.get(y.constructor))?x[v]=i(y,u):ArrayBuffer.isView(y)?x[v]=r(y):x[v]=u(y)}return x}function c(g){if(typeof g!="object"||g===null)return g;if(Array.isArray(g))return f(g,c);if(g.constructor!==Object&&(i=n.get(g.constructor)))return i(g,c);let u={};for(let s in g){if(Object.hasOwnProperty.call(g,s)===!1)continue;let x=g[s];typeof x!="object"||x===null?u[s]=x:x.constructor!==Object&&(i=n.get(x.constructor))?u[s]=i(x,c):ArrayBuffer.isView(x)?u[s]=r(x):u[s]=c(x)}return u}function l(g){if(typeof g!="object"||g===null)return g;if(Array.isArray(g))return f(g,l);if(g.constructor!==Object&&(i=n.get(g.constructor)))return i(g,l);let u={};for(let s in g){let x=g[s];typeof x!="object"||x===null?u[s]=x:x.constructor!==Object&&(i=n.get(x.constructor))?u[s]=i(x,l):ArrayBuffer.isView(x)?u[s]=r(x):u[s]=l(x)}return u}}function d(t){let n=[],i=[],f=new Map;if(f.set(Date,s=>new Date(s)),f.set(Map,(s,x)=>new Map(l(Array.from(s),x))),f.set(Set,(s,x)=>new Set(l(Array.from(s),x))),t.constructorHandlers)for(let s of t.constructorHandlers)f.set(s[0],s[1]);let c=null;return t.proto?u:g;function l(s,x){let E=Object.keys(s),v=new Array(E.length);for(let y=0;y<E.length;y++){let a=E[y],m=s[a];if(typeof m!="object"||m===null)v[a]=m;else if(m.constructor!==Object&&(c=f.get(m.constructor)))v[a]=c(m,x);else if(ArrayBuffer.isView(m))v[a]=r(m);else{let _=n.indexOf(m);_!==-1?v[a]=i[_]:v[a]=x(m)}}return v}function g(s){if(typeof s!="object"||s===null)return s;if(Array.isArray(s))return l(s,g);if(s.constructor!==Object&&(c=f.get(s.constructor)))return c(s,g);let x={};n.push(s),i.push(x);for(let E in s){if(Object.hasOwnProperty.call(s,E)===!1)continue;let v=s[E];if(typeof v!="object"||v===null)x[E]=v;else if(v.constructor!==Object&&(c=f.get(v.constructor)))x[E]=c(v,g);else if(ArrayBuffer.isView(v))x[E]=r(v);else{let y=n.indexOf(v);y!==-1?x[E]=i[y]:x[E]=g(v)}}return n.pop(),i.pop(),x}function u(s){if(typeof s!="object"||s===null)return s;if(Array.isArray(s))return l(s,u);if(s.constructor!==Object&&(c=f.get(s.constructor)))return c(s,u);let x={};n.push(s),i.push(x);for(let E in s){let v=s[E];if(typeof v!="object"||v===null)x[E]=v;else if(v.constructor!==Object&&(c=f.get(v.constructor)))x[E]=c(v,u);else if(ArrayBuffer.isView(v))x[E]=r(v);else{let y=n.indexOf(v);y!==-1?x[E]=i[y]:x[E]=u(v)}}return n.pop(),i.pop(),x}}}),vc=we((o,e)=>{"use strict";be(),ve(),me(),e.exports=mc()()}),I0=we(o=>{"use strict";be(),ve(),me(),Object.defineProperty(o,"__esModule",{value:!0}),o.validateTopic=e,o.validateTopics=r;function e(h){let d=h.split("/");for(let t=0;t<d.length;t++)if(d[t]!=="+"){if(d[t]==="#")return t===d.length-1;if(d[t].indexOf("+")!==-1||d[t].indexOf("#")!==-1)return!1}return!0}function r(h){if(h.length===0)return"empty_topic_list";for(let d=0;d<h.length;d++)if(!e(h[d]))return h[d];return null}}),D0=we(o=>{"use strict";be(),ve(),me(),Object.defineProperty(o,"__esModule",{value:!0});var e=tr(),r={objectMode:!0},h={clean:!0},d=class{constructor(t){Se(this,"options");Se(this,"_inflights");this.options=t||{},this.options={...h,...t},this._inflights=new Map}put(t,n){return this._inflights.set(t.messageId,t),n&&n(),this}createStream(){let t=new e.Readable(r),n=[],i=!1,f=0;return this._inflights.forEach((c,l)=>{n.push(c)}),t._read=()=>{!i&&f<n.length?t.push(n[f++]):t.push(null)},t.destroy=c=>{if(!i)return i=!0,setTimeout(()=>{t.emit("close")},0),t},t}del(t,n){let i=this._inflights.get(t.messageId);return i?(this._inflights.delete(t.messageId),n(null,i)):n&&n(new Error("missing packet")),this}get(t,n){let i=this._inflights.get(t.messageId);return i?n(null,i):n&&n(new Error("missing packet")),this}close(t){this.options.clean&&(this._inflights=null),t&&t()}};o.default=d}),_c=we((o,e)=>{e.exports={version:"5.16.1"}}),zt=we(o=>{"use strict";be(),ve(),me(),Object.defineProperty(o,"__esModule",{value:!0}),o.MQTTJS_VERSION=o.nextTick=o.ErrorWithSubackPacket=o.ErrorWithReasonCode=void 0,o.applyMixin=h;var e=class F0 extends Error{constructor(n,i){super(n);Se(this,"code");this.code=i,Object.setPrototypeOf(this,F0.prototype),Object.getPrototypeOf(this).name="ErrorWithReasonCode"}};o.ErrorWithReasonCode=e;var r=class P0 extends Error{constructor(n,i){super(n);Se(this,"packet");this.packet=i,Object.setPrototypeOf(this,P0.prototype),Object.getPrototypeOf(this).name="ErrorWithSubackPacket"}};o.ErrorWithSubackPacket=r;function h(d,t,n=!1){let i=[t];for(;;){let f=i[0],c=Object.getPrototypeOf(f);if(c?.prototype)i.unshift(c);else break}for(let f of i)for(let c of Object.getOwnPropertyNames(f.prototype))(n||c!=="constructor")&&Object.defineProperty(d.prototype,c,Object.getOwnPropertyDescriptor(f.prototype,c)??Object.create(null))}o.nextTick=typeof $e?.nextTick=="function"?$e.nextTick:d=>{setTimeout(d,0)},o.MQTTJS_VERSION=_c().version}),wc=we(o=>{"use strict";be(),ve(),me(),Object.defineProperty(o,"__esModule",{value:!0});var e=zt(),r=[0,16,128,131,135,144,145,151,153],h=148,d=130,t=(f,c,l,g,u=h)=>{g?.discardParsedPackets(),(!g||g.isCurrent())&&f._cleanUp(!0),l(),f.emit("error",new e.ErrorWithReasonCode(c,u))},n=(f,c,l)=>{l(),f.emit("error",c)},i=(f,c,l,g)=>{f.log("handlePublish: packet %o",c),l=typeof l<"u"?l:f.noop;let u=c.topic.toString(),s=c.payload,{qos:x}=c,{messageId:E}=c,{options:v}=f;if(f.options.protocolVersion===5){let y;if(c.properties&&(y=c.properties.topicAlias),typeof y<"u"){let a=f.topicAliasRecv;if(!a){f.log("handlePublish :: received unexpected topic alias. alias: %d",y),t(f,"Received a PUBLISH Topic Alias but no Topic Alias Maximum was advertised",l,g);return}if(u.length===0)if(y>0&&y<=65535){let m=a.getTopicByAlias(y);if(m)u=m,f.log("handlePublish :: topic complemented by alias. topic: %s - alias: %d",u,y);else{f.log("handlePublish :: unregistered topic alias. alias: %d",y),t(f,"Received unregistered Topic Alias",l,g,d);return}}else{f.log("handlePublish :: topic alias out of range. alias: %d",y),t(f,`Received Topic Alias ${y} is outside the valid range 1-65535`,l,g);return}else if(a.put(u,y))f.log("handlePublish :: registered topic: %s - alias: %d",u,y);else{f.log("handlePublish :: topic alias outside the advertised maximum. alias: %d - max: %d",y,a.max),t(f,`Received Topic Alias ${y} is outside the advertised Topic Alias Maximum range 1-${a.max}`,l,g);return}}}switch(f.log("handlePublish: qos %d",x),x){case 2:{v.customHandleAcks(u,s,c,(y,a)=>{if(typeof y=="number"&&(a=y,y=null),y)return n(f,y,l);if(r.indexOf(a)===-1)return n(f,new Error("Wrong reason code for pubrec"),l);if(a)f._sendPacket({cmd:"pubrec",messageId:E,reasonCode:a},l);else{if(!f._trackIncomingQoS2Publish(E,l,g))return;f.incomingStore.put(c,()=>{f._sendPacket({cmd:"pubrec",messageId:E},l)})}});break}case 1:{v.customHandleAcks(u,s,c,(y,a)=>{if(typeof y=="number"&&(a=y,y=null),y)return n(f,y,l);if(r.indexOf(a)===-1)return n(f,new Error("Wrong reason code for puback"),l);a||f.emit("message",u,s,c),f.handleMessage(c,m=>{if(m)return l&&l(m);f._sendPacket({cmd:"puback",messageId:E,reasonCode:a},l)})});break}case 0:f.emit("message",u,s,c),f.handleMessage(c,l);break;default:f.log("handlePublish: unknown QoS. Doing nothing.");break}};o.default=i}),Ec=we(o=>{"use strict";be(),ve(),me(),Object.defineProperty(o,"__esModule",{value:!0});var e=zt(),r=130,h=(t,n,i)=>{t.log("handleAuth :: %s",n.message),i?.discardParsedPackets(),(!i||i.isCurrent())&&t._cleanUp(!0),t.emit("error",n)},d=(t,n,i)=>{let{options:f}=t,c=f.protocolVersion,l=c===5?n.reasonCode:n.returnCode;if(c!==5){h(t,new e.ErrorWithReasonCode(`Protocol error: Auth packets are only supported in MQTT 5. Your version:${c}`,r),i);return}let g=t._authenticationMethod;if(!g){h(t,new e.ErrorWithReasonCode("Protocol error: Auth packet received but enhanced authentication was not requested",r),i);return}if(n.properties?.authenticationMethod!==g){h(t,new e.ErrorWithReasonCode(`Protocol error: Auth packet Authentication Method does not match the "${g}" sent in CONNECT`,r),i);return}t.handleAuth(n,(u,s)=>{if(u){h(t,u,i);return}if(l===0){t.log("handleAuth :: authentication exchange completed successfully");return}if(l===24){if(!s){h(t,new e.ErrorWithReasonCode("Protocol error: No auth packet to continue the authentication exchange",r),i);return}t.reconnecting=!1,t._sendPacket(s);return}h(t,new e.ErrorWithReasonCode(`Protocol error: Auth packet reason code ${l} is not one a broker may send`,r),i)})};o.default=d}),hn=we(o=>{"use strict";be(),ve(),me(),Object.defineProperty(o,"__esModule",{value:!0}),o.ReasonCodes=void 0;var e=zt();o.ReasonCodes={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};var r={publish:["puback","pubrec","pubcomp"],pubrel:["pubcomp"],subscribe:["suback"],unsubscribe:["unsuback"]},h=(d,t)=>{let{messageId:n}=t,i=t.cmd,f=null,c=d.outgoing[n],l=c?c.cb:null,g=null;if(!l){d.log("_handleAck :: Server sent an ack in error. Ignoring.");return}if(!r[c.cmd]?.includes(i)){d.log("_handleAck :: %s does not answer the pending %s on message id %d. Ignoring.",i,c.cmd,n),d.emit("error",new Error(`Protocol error: ${i} does not answer the ${c.cmd} pending on message id ${n}`));return}switch(d.log("_handleAck :: packet type",i),i){case"pubcomp":case"puback":{let u=t.reasonCode;u&&u>0&&u!==16?(g=new e.ErrorWithReasonCode(`Publish error: ${o.ReasonCodes[u]}`,u),d._removeOutgoingAndStoreMessage(n,()=>{l(g,t)})):d._removeOutgoingAndStoreMessage(n,l);break}case"pubrec":{f={cmd:"pubrel",qos:2,messageId:n};let u=t.reasonCode;u&&u>0&&u!==16?(g=new e.ErrorWithReasonCode(`Publish error: ${o.ReasonCodes[u]}`,u),d._removeOutgoingAndStoreMessage(n,()=>{l(g,t)})):d._sendPacket(f);break}case"suback":{delete d.outgoing[n],d.messageIdProvider.deallocate(n);let u=t.granted;for(let s=0;s<u.length;s++){let x=u[s];if((x&128)!==0){g=new Error(`Subscribe error: ${o.ReasonCodes[x]}`),g.code=x;let E=d.messageIdToTopic[n];E&&E.forEach(v=>{delete d._resubscribeTopics[v]})}}delete d.messageIdToTopic[n],d._invokeStoreProcessingQueue(),l(g,t);break}case"unsuback":{delete d.outgoing[n],d.messageIdProvider.deallocate(n),d._invokeStoreProcessingQueue(),l(null,t);break}default:d.emit("error",new Error("unrecognized packet type"))}d.disconnecting&&Object.keys(d.outgoing).length===0&&d.emit("outgoingEmpty")};o.default=h}),Ac=we(o=>{"use strict";var x,E,v,y,a,m,_,w,B,k,R,M,O,C,A,I,T,N,Y,K,Q,L,P,W,D,ee,le,$,wi,ie,H,ae,Z,T0,re,pe,fe,jt,Nt,Ei,Rr,jr,Ye,Ai,mr,Mt,Si,Ie;be(),ve(),me(),Object.defineProperty(o,"__esModule",{value:!0}),o.LRUCache=void 0;var e=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,r=new Set,h=typeof $e=="object"&&$e?$e:{},d=(p,b,S,F)=>{typeof h.emitWarning=="function"?h.emitWarning(p,b,S,F):console.error(`[${S}] ${b}: ${p}`)},t=globalThis.AbortController,n=globalThis.AbortSignal;if(typeof t>"u"){n=class{constructor(){Se(this,"onabort");Se(this,"_onabort",[]);Se(this,"reason");Se(this,"aborted",!1)}addEventListener(S,F){this._onabort.push(F)}},t=class{constructor(){Se(this,"signal",new n);b()}abort(S){if(!this.signal.aborted){this.signal.reason=S,this.signal.aborted=!0;for(let F of this.signal._onabort)F(S);this.signal.onabort?.(S)}}};let p=h.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",b=()=>{p&&(p=!1,d("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",b))}}var i=p=>!r.has(p),f=Symbol("type"),c=p=>p&&p===Math.floor(p)&&p>0&&isFinite(p),l=p=>c(p)?p<=Math.pow(2,8)?Uint8Array:p<=Math.pow(2,16)?Uint16Array:p<=Math.pow(2,32)?Uint32Array:p<=Number.MAX_SAFE_INTEGER?g:null:null,g=class extends Array{constructor(p){super(p),this.fill(0)}},u=(x=class{constructor(b,S){Se(this,"heap");Se(this,"length");if(!V(x,E))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new S(b),this.length=0}static create(b){let S=l(b);if(!S)return[];Re(x,E,!0);let F=new x(b,S);return Re(x,E,!1),F}push(b){this.heap[this.length++]=b}pop(){return this.heap[--this.length]}},E=new WeakMap,ze(x,E,!1),x),s=(Ie=class{constructor(b){ze(this,$);ze(this,a);ze(this,m);ze(this,_);ze(this,w);ze(this,B);ze(this,k);Se(this,"ttl");Se(this,"ttlResolution");Se(this,"ttlAutopurge");Se(this,"updateAgeOnGet");Se(this,"updateAgeOnHas");Se(this,"allowStale");Se(this,"noDisposeOnSet");Se(this,"noUpdateTTL");Se(this,"maxEntrySize");Se(this,"sizeCalculation");Se(this,"noDeleteOnFetchRejection");Se(this,"noDeleteOnStaleGet");Se(this,"allowStaleOnFetchAbort");Se(this,"allowStaleOnFetchRejection");Se(this,"ignoreFetchAbort");ze(this,R);ze(this,M);ze(this,O);ze(this,C);ze(this,A);ze(this,I);ze(this,T);ze(this,N);ze(this,Y);ze(this,K);ze(this,Q);ze(this,L);ze(this,P);ze(this,W);ze(this,D);ze(this,ee);ze(this,le);ze(this,ie,()=>{});ze(this,H,()=>{});ze(this,ae,()=>{});ze(this,Z,()=>!1);ze(this,re,b=>{});ze(this,pe,(b,S,F)=>{});ze(this,fe,(b,S,F,U)=>{if(F||U)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});Se(this,v,"LRUCache");let{max:S=0,ttl:F,ttlResolution:U=1,ttlAutopurge:X,updateAgeOnGet:se,updateAgeOnHas:G,allowStale:oe,dispose:Be,disposeAfter:De,noDisposeOnSet:Fe,noUpdateTTL:Oe,maxSize:Ge=0,maxEntrySize:Xe=0,sizeCalculation:je,fetchMethod:qe,memoMethod:Le,noDeleteOnFetchRejection:Qe,noDeleteOnStaleGet:Ke,allowStaleOnFetchRejection:Je,allowStaleOnFetchAbort:tt,ignoreFetchAbort:gt}=b;if(S!==0&&!c(S))throw new TypeError("max option must be a nonnegative integer");let j=S?l(S):Array;if(!j)throw new Error("invalid max value: "+S);if(Re(this,a,S),Re(this,m,Ge),this.maxEntrySize=Xe||V(this,m),this.sizeCalculation=je,this.sizeCalculation){if(!V(this,m)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(Le!==void 0&&typeof Le!="function")throw new TypeError("memoMethod must be a function if defined");if(Re(this,k,Le),qe!==void 0&&typeof qe!="function")throw new TypeError("fetchMethod must be a function if specified");if(Re(this,B,qe),Re(this,ee,!!qe),Re(this,O,new Map),Re(this,C,new Array(S).fill(void 0)),Re(this,A,new Array(S).fill(void 0)),Re(this,I,new j(S)),Re(this,T,new j(S)),Re(this,N,0),Re(this,Y,0),Re(this,K,u.create(S)),Re(this,R,0),Re(this,M,0),typeof Be=="function"&&Re(this,_,Be),typeof De=="function"?(Re(this,w,De),Re(this,Q,[])):(Re(this,w,void 0),Re(this,Q,void 0)),Re(this,D,!!V(this,_)),Re(this,le,!!V(this,w)),this.noDisposeOnSet=!!Fe,this.noUpdateTTL=!!Oe,this.noDeleteOnFetchRejection=!!Qe,this.allowStaleOnFetchRejection=!!Je,this.allowStaleOnFetchAbort=!!tt,this.ignoreFetchAbort=!!gt,this.maxEntrySize!==0){if(V(this,m)!==0&&!c(V(this,m)))throw new TypeError("maxSize must be a positive integer if specified");if(!c(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");Te(this,$,T0).call(this)}if(this.allowStale=!!oe,this.noDeleteOnStaleGet=!!Ke,this.updateAgeOnGet=!!se,this.updateAgeOnHas=!!G,this.ttlResolution=c(U)||U===0?U:1,this.ttlAutopurge=!!X,this.ttl=F||0,this.ttl){if(!c(this.ttl))throw new TypeError("ttl must be a positive integer if specified");Te(this,$,wi).call(this)}if(V(this,a)===0&&this.ttl===0&&V(this,m)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!V(this,a)&&!V(this,m)){let q="LRU_CACHE_UNBOUNDED";i(q)&&(r.add(q),d("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",q,Ie))}}static unsafeExposeInternals(b){return{starts:V(b,P),ttls:V(b,W),sizes:V(b,L),keyMap:V(b,O),keyList:V(b,C),valList:V(b,A),next:V(b,I),prev:V(b,T),get head(){return V(b,N)},get tail(){return V(b,Y)},free:V(b,K),isBackgroundFetch:S=>{var F;return Te(F=b,$,Ye).call(F,S)},backgroundFetch:(S,F,U,X)=>{var se;return Te(se=b,$,jr).call(se,S,F,U,X)},moveToTail:S=>{var F;return Te(F=b,$,mr).call(F,S)},indexes:S=>{var F;return Te(F=b,$,jt).call(F,S)},rindexes:S=>{var F;return Te(F=b,$,Nt).call(F,S)},isStale:S=>{var F;return V(F=b,Z).call(F,S)}}}get max(){return V(this,a)}get maxSize(){return V(this,m)}get calculatedSize(){return V(this,M)}get size(){return V(this,R)}get fetchMethod(){return V(this,B)}get memoMethod(){return V(this,k)}get dispose(){return V(this,_)}get disposeAfter(){return V(this,w)}getRemainingTTL(b){return V(this,O).has(b)?1/0:0}*entries(){for(let b of Te(this,$,jt).call(this))V(this,A)[b]!==void 0&&V(this,C)[b]!==void 0&&!Te(this,$,Ye).call(this,V(this,A)[b])&&(yield[V(this,C)[b],V(this,A)[b]])}*rentries(){for(let b of Te(this,$,Nt).call(this))V(this,A)[b]!==void 0&&V(this,C)[b]!==void 0&&!Te(this,$,Ye).call(this,V(this,A)[b])&&(yield[V(this,C)[b],V(this,A)[b]])}*keys(){for(let b of Te(this,$,jt).call(this)){let S=V(this,C)[b];S!==void 0&&!Te(this,$,Ye).call(this,V(this,A)[b])&&(yield S)}}*rkeys(){for(let b of Te(this,$,Nt).call(this)){let S=V(this,C)[b];S!==void 0&&!Te(this,$,Ye).call(this,V(this,A)[b])&&(yield S)}}*values(){for(let b of Te(this,$,jt).call(this))V(this,A)[b]!==void 0&&!Te(this,$,Ye).call(this,V(this,A)[b])&&(yield V(this,A)[b])}*rvalues(){for(let b of Te(this,$,Nt).call(this))V(this,A)[b]!==void 0&&!Te(this,$,Ye).call(this,V(this,A)[b])&&(yield V(this,A)[b])}[(y=Symbol.iterator,v=Symbol.toStringTag,y)](){return this.entries()}find(b,S={}){for(let F of Te(this,$,jt).call(this)){let U=V(this,A)[F],X=Te(this,$,Ye).call(this,U)?U.__staleWhileFetching:U;if(X!==void 0&&b(X,V(this,C)[F],this))return this.get(V(this,C)[F],S)}}forEach(b,S=this){for(let F of Te(this,$,jt).call(this)){let U=V(this,A)[F],X=Te(this,$,Ye).call(this,U)?U.__staleWhileFetching:U;X!==void 0&&b.call(S,X,V(this,C)[F],this)}}rforEach(b,S=this){for(let F of Te(this,$,Nt).call(this)){let U=V(this,A)[F],X=Te(this,$,Ye).call(this,U)?U.__staleWhileFetching:U;X!==void 0&&b.call(S,X,V(this,C)[F],this)}}purgeStale(){let b=!1;for(let S of Te(this,$,Nt).call(this,{allowStale:!0}))V(this,Z).call(this,S)&&(Te(this,$,Mt).call(this,V(this,C)[S],"expire"),b=!0);return b}info(b){let S=V(this,O).get(b);if(S===void 0)return;let F=V(this,A)[S],U=Te(this,$,Ye).call(this,F)?F.__staleWhileFetching:F;if(U===void 0)return;let X={value:U};if(V(this,W)&&V(this,P)){let se=V(this,W)[S],G=V(this,P)[S];if(se&&G){let oe=se-(e.now()-G);X.ttl=oe,X.start=Date.now()}}return V(this,L)&&(X.size=V(this,L)[S]),X}dump(){let b=[];for(let S of Te(this,$,jt).call(this,{allowStale:!0})){let F=V(this,C)[S],U=V(this,A)[S],X=Te(this,$,Ye).call(this,U)?U.__staleWhileFetching:U;if(X===void 0||F===void 0)continue;let se={value:X};if(V(this,W)&&V(this,P)){se.ttl=V(this,W)[S];let G=e.now()-V(this,P)[S];se.start=Math.floor(Date.now()-G)}V(this,L)&&(se.size=V(this,L)[S]),b.unshift([F,se])}return b}load(b){this.clear();for(let[S,F]of b){if(F.start){let U=Date.now()-F.start;F.start=e.now()-U}this.set(S,F.value,F)}}set(b,S,F={}){var Oe,Ge,Xe;if(S===void 0)return this.delete(b),this;let{ttl:U=this.ttl,start:X,noDisposeOnSet:se=this.noDisposeOnSet,sizeCalculation:G=this.sizeCalculation,status:oe}=F,{noUpdateTTL:Be=this.noUpdateTTL}=F,De=V(this,fe).call(this,b,S,F.size||0,G);if(this.maxEntrySize&&De>this.maxEntrySize)return oe&&(oe.set="miss",oe.maxEntrySizeExceeded=!0),Te(this,$,Mt).call(this,b,"set"),this;let Fe=V(this,R)===0?void 0:V(this,O).get(b);if(Fe===void 0)Fe=V(this,R)===0?V(this,Y):V(this,K).length!==0?V(this,K).pop():V(this,R)===V(this,a)?Te(this,$,Rr).call(this,!1):V(this,R),V(this,C)[Fe]=b,V(this,A)[Fe]=S,V(this,O).set(b,Fe),V(this,I)[V(this,Y)]=Fe,V(this,T)[Fe]=V(this,Y),Re(this,Y,Fe),Ir(this,R)._++,V(this,pe).call(this,Fe,De,oe),oe&&(oe.set="add"),Be=!1;else{Te(this,$,mr).call(this,Fe);let je=V(this,A)[Fe];if(S!==je){if(V(this,ee)&&Te(this,$,Ye).call(this,je)){je.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:qe}=je;qe!==void 0&&!se&&(V(this,D)&&((Oe=V(this,_))==null||Oe.call(this,qe,b,"set")),V(this,le)&&V(this,Q)?.push([qe,b,"set"]))}else se||(V(this,D)&&((Ge=V(this,_))==null||Ge.call(this,je,b,"set")),V(this,le)&&V(this,Q)?.push([je,b,"set"]));if(V(this,re).call(this,Fe),V(this,pe).call(this,Fe,De,oe),V(this,A)[Fe]=S,oe){oe.set="replace";let qe=je&&Te(this,$,Ye).call(this,je)?je.__staleWhileFetching:je;qe!==void 0&&(oe.oldValue=qe)}}else oe&&(oe.set="update")}if(U!==0&&!V(this,W)&&Te(this,$,wi).call(this),V(this,W)&&(Be||V(this,ae).call(this,Fe,U,X),oe&&V(this,H).call(this,oe,Fe)),!se&&V(this,le)&&V(this,Q)){let je=V(this,Q),qe;for(;qe=je?.shift();)(Xe=V(this,w))==null||Xe.call(this,...qe)}return this}pop(){var b;try{for(;V(this,R);){let S=V(this,A)[V(this,N)];if(Te(this,$,Rr).call(this,!0),Te(this,$,Ye).call(this,S)){if(S.__staleWhileFetching)return S.__staleWhileFetching}else if(S!==void 0)return S}}finally{if(V(this,le)&&V(this,Q)){let S=V(this,Q),F;for(;F=S?.shift();)(b=V(this,w))==null||b.call(this,...F)}}}has(b,S={}){let{updateAgeOnHas:F=this.updateAgeOnHas,status:U}=S,X=V(this,O).get(b);if(X!==void 0){let se=V(this,A)[X];if(Te(this,$,Ye).call(this,se)&&se.__staleWhileFetching===void 0)return!1;if(V(this,Z).call(this,X))U&&(U.has="stale",V(this,H).call(this,U,X));else return F&&V(this,ie).call(this,X),U&&(U.has="hit",V(this,H).call(this,U,X)),!0}else U&&(U.has="miss");return!1}peek(b,S={}){let{allowStale:F=this.allowStale}=S,U=V(this,O).get(b);if(U===void 0||!F&&V(this,Z).call(this,U))return;let X=V(this,A)[U];return Te(this,$,Ye).call(this,X)?X.__staleWhileFetching:X}async fetch(b,S={}){let{allowStale:F=this.allowStale,updateAgeOnGet:U=this.updateAgeOnGet,noDeleteOnStaleGet:X=this.noDeleteOnStaleGet,ttl:se=this.ttl,noDisposeOnSet:G=this.noDisposeOnSet,size:oe=0,sizeCalculation:Be=this.sizeCalculation,noUpdateTTL:De=this.noUpdateTTL,noDeleteOnFetchRejection:Fe=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:Oe=this.allowStaleOnFetchRejection,ignoreFetchAbort:Ge=this.ignoreFetchAbort,allowStaleOnFetchAbort:Xe=this.allowStaleOnFetchAbort,context:je,forceRefresh:qe=!1,status:Le,signal:Qe}=S;if(!V(this,ee))return Le&&(Le.fetch="get"),this.get(b,{allowStale:F,updateAgeOnGet:U,noDeleteOnStaleGet:X,status:Le});let Ke={allowStale:F,updateAgeOnGet:U,noDeleteOnStaleGet:X,ttl:se,noDisposeOnSet:G,size:oe,sizeCalculation:Be,noUpdateTTL:De,noDeleteOnFetchRejection:Fe,allowStaleOnFetchRejection:Oe,allowStaleOnFetchAbort:Xe,ignoreFetchAbort:Ge,status:Le,signal:Qe},Je=V(this,O).get(b);if(Je===void 0){Le&&(Le.fetch="miss");let tt=Te(this,$,jr).call(this,b,Je,Ke,je);return tt.__returned=tt}else{let tt=V(this,A)[Je];if(Te(this,$,Ye).call(this,tt)){let _e=F&&tt.__staleWhileFetching!==void 0;return Le&&(Le.fetch="inflight",_e&&(Le.returnedStale=!0)),_e?tt.__staleWhileFetching:tt.__returned=tt}let gt=V(this,Z).call(this,Je);if(!qe&&!gt)return Le&&(Le.fetch="hit"),Te(this,$,mr).call(this,Je),U&&V(this,ie).call(this,Je),Le&&V(this,H).call(this,Le,Je),tt;let j=Te(this,$,jr).call(this,b,Je,Ke,je),q=j.__staleWhileFetching!==void 0&&F;return Le&&(Le.fetch=gt?"stale":"refresh",q&>&&(Le.returnedStale=!0)),q?j.__staleWhileFetching:j.__returned=j}}async forceFetch(b,S={}){let F=await this.fetch(b,S);if(F===void 0)throw new Error("fetch() returned undefined");return F}memo(b,S={}){let F=V(this,k);if(!F)throw new Error("no memoMethod provided to constructor");let{context:U,forceRefresh:X,...se}=S,G=this.get(b,se);if(!X&&G!==void 0)return G;let oe=F(b,G,{options:se,context:U});return this.set(b,oe,se),oe}get(b,S={}){let{allowStale:F=this.allowStale,updateAgeOnGet:U=this.updateAgeOnGet,noDeleteOnStaleGet:X=this.noDeleteOnStaleGet,status:se}=S,G=V(this,O).get(b);if(G!==void 0){let oe=V(this,A)[G],Be=Te(this,$,Ye).call(this,oe);return se&&V(this,H).call(this,se,G),V(this,Z).call(this,G)?(se&&(se.get="stale"),Be?(se&&F&&oe.__staleWhileFetching!==void 0&&(se.returnedStale=!0),F?oe.__staleWhileFetching:void 0):(X||Te(this,$,Mt).call(this,b,"expire"),se&&F&&(se.returnedStale=!0),F?oe:void 0)):(se&&(se.get="hit"),Be?oe.__staleWhileFetching:(Te(this,$,mr).call(this,G),U&&V(this,ie).call(this,G),oe))}else se&&(se.get="miss")}delete(b){return Te(this,$,Mt).call(this,b,"delete")}clear(){return Te(this,$,Si).call(this,"delete")}},a=new WeakMap,m=new WeakMap,_=new WeakMap,w=new WeakMap,B=new WeakMap,k=new WeakMap,R=new WeakMap,M=new WeakMap,O=new WeakMap,C=new WeakMap,A=new WeakMap,I=new WeakMap,T=new WeakMap,N=new WeakMap,Y=new WeakMap,K=new WeakMap,Q=new WeakMap,L=new WeakMap,P=new WeakMap,W=new WeakMap,D=new WeakMap,ee=new WeakMap,le=new WeakMap,$=new WeakSet,wi=function(){let b=new g(V(this,a)),S=new g(V(this,a));Re(this,W,b),Re(this,P,S),Re(this,ae,(X,se,G=e.now())=>{if(S[X]=se!==0?G:0,b[X]=se,se!==0&&this.ttlAutopurge){let oe=setTimeout(()=>{V(this,Z).call(this,X)&&Te(this,$,Mt).call(this,V(this,C)[X],"expire")},se+1);oe.unref&&oe.unref()}}),Re(this,ie,X=>{S[X]=b[X]!==0?e.now():0}),Re(this,H,(X,se)=>{if(b[se]){let G=b[se],oe=S[se];if(!G||!oe)return;X.ttl=G,X.start=oe,X.now=F||U();let Be=X.now-oe;X.remainingTTL=G-Be}});let F=0,U=()=>{let X=e.now();if(this.ttlResolution>0){F=X;let se=setTimeout(()=>F=0,this.ttlResolution);se.unref&&se.unref()}return X};this.getRemainingTTL=X=>{let se=V(this,O).get(X);if(se===void 0)return 0;let G=b[se],oe=S[se];if(!G||!oe)return 1/0;let Be=(F||U())-oe;return G-Be},Re(this,Z,X=>{let se=S[X],G=b[X];return!!G&&!!se&&(F||U())-se>G})},ie=new WeakMap,H=new WeakMap,ae=new WeakMap,Z=new WeakMap,T0=function(){let b=new g(V(this,a));Re(this,M,0),Re(this,L,b),Re(this,re,S=>{Re(this,M,V(this,M)-b[S]),b[S]=0}),Re(this,fe,(S,F,U,X)=>{if(Te(this,$,Ye).call(this,F))return 0;if(!c(U))if(X){if(typeof X!="function")throw new TypeError("sizeCalculation must be a function");if(U=X(F,S),!c(U))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return U}),Re(this,pe,(S,F,U)=>{if(b[S]=F,V(this,m)){let X=V(this,m)-b[S];for(;V(this,M)>X;)Te(this,$,Rr).call(this,!0)}Re(this,M,V(this,M)+b[S]),U&&(U.entrySize=F,U.totalCalculatedSize=V(this,M))})},re=new WeakMap,pe=new WeakMap,fe=new WeakMap,jt=function*({allowStale:b=this.allowStale}={}){if(V(this,R))for(let S=V(this,Y);!(!Te(this,$,Ei).call(this,S)||((b||!V(this,Z).call(this,S))&&(yield S),S===V(this,N)));)S=V(this,T)[S]},Nt=function*({allowStale:b=this.allowStale}={}){if(V(this,R))for(let S=V(this,N);!(!Te(this,$,Ei).call(this,S)||((b||!V(this,Z).call(this,S))&&(yield S),S===V(this,Y)));)S=V(this,I)[S]},Ei=function(b){return b!==void 0&&V(this,O).get(V(this,C)[b])===b},Rr=function(b){var X;let S=V(this,N),F=V(this,C)[S],U=V(this,A)[S];return V(this,ee)&&Te(this,$,Ye).call(this,U)?U.__abortController.abort(new Error("evicted")):(V(this,D)||V(this,le))&&(V(this,D)&&((X=V(this,_))==null||X.call(this,U,F,"evict")),V(this,le)&&V(this,Q)?.push([U,F,"evict"])),V(this,re).call(this,S),b&&(V(this,C)[S]=void 0,V(this,A)[S]=void 0,V(this,K).push(S)),V(this,R)===1?(Re(this,N,Re(this,Y,0)),V(this,K).length=0):Re(this,N,V(this,I)[S]),V(this,O).delete(F),Ir(this,R)._--,S},jr=function(b,S,F,U){let X=S===void 0?void 0:V(this,A)[S];if(Te(this,$,Ye).call(this,X))return X;let se=new t,{signal:G}=F;G?.addEventListener("abort",()=>se.abort(G.reason),{signal:se.signal});let oe={signal:se.signal,options:F,context:U},Be=(je,qe=!1)=>{let{aborted:Le}=se.signal,Qe=F.ignoreFetchAbort&&je!==void 0;if(F.status&&(Le&&!qe?(F.status.fetchAborted=!0,F.status.fetchError=se.signal.reason,Qe&&(F.status.fetchAbortIgnored=!0)):F.status.fetchResolved=!0),Le&&!Qe&&!qe)return Fe(se.signal.reason);let Ke=Ge;return V(this,A)[S]===Ge&&(je===void 0?Ke.__staleWhileFetching?V(this,A)[S]=Ke.__staleWhileFetching:Te(this,$,Mt).call(this,b,"fetch"):(F.status&&(F.status.fetchUpdated=!0),this.set(b,je,oe.options))),je},De=je=>(F.status&&(F.status.fetchRejected=!0,F.status.fetchError=je),Fe(je)),Fe=je=>{let{aborted:qe}=se.signal,Le=qe&&F.allowStaleOnFetchAbort,Qe=Le||F.allowStaleOnFetchRejection,Ke=Qe||F.noDeleteOnFetchRejection,Je=Ge;if(V(this,A)[S]===Ge&&(!Ke||Je.__staleWhileFetching===void 0?Te(this,$,Mt).call(this,b,"fetch"):Le||(V(this,A)[S]=Je.__staleWhileFetching)),Qe)return F.status&&Je.__staleWhileFetching!==void 0&&(F.status.returnedStale=!0),Je.__staleWhileFetching;if(Je.__returned===Je)throw je},Oe=(je,qe)=>{var Qe;let Le=(Qe=V(this,B))==null?void 0:Qe.call(this,b,X,oe);Le&&Le instanceof Promise&&Le.then(Ke=>je(Ke===void 0?void 0:Ke),qe),se.signal.addEventListener("abort",()=>{(!F.ignoreFetchAbort||F.allowStaleOnFetchAbort)&&(je(void 0),F.allowStaleOnFetchAbort&&(je=Ke=>Be(Ke,!0)))})};F.status&&(F.status.fetchDispatched=!0);let Ge=new Promise(Oe).then(Be,De),Xe=Object.assign(Ge,{__abortController:se,__staleWhileFetching:X,__returned:void 0});return S===void 0?(this.set(b,Xe,{...oe.options,status:void 0}),S=V(this,O).get(b)):V(this,A)[S]=Xe,Xe},Ye=function(b){if(!V(this,ee))return!1;let S=b;return!!S&&S instanceof Promise&&S.hasOwnProperty("__staleWhileFetching")&&S.__abortController instanceof t},Ai=function(b,S){V(this,T)[S]=b,V(this,I)[b]=S},mr=function(b){b!==V(this,Y)&&(b===V(this,N)?Re(this,N,V(this,I)[b]):Te(this,$,Ai).call(this,V(this,T)[b],V(this,I)[b]),Te(this,$,Ai).call(this,V(this,Y),b),Re(this,Y,b))},Mt=function(b,S){var U,X;let F=!1;if(V(this,R)!==0){let se=V(this,O).get(b);if(se!==void 0)if(F=!0,V(this,R)===1)Te(this,$,Si).call(this,S);else{V(this,re).call(this,se);let G=V(this,A)[se];if(Te(this,$,Ye).call(this,G)?G.__abortController.abort(new Error("deleted")):(V(this,D)||V(this,le))&&(V(this,D)&&((U=V(this,_))==null||U.call(this,G,b,S)),V(this,le)&&V(this,Q)?.push([G,b,S])),V(this,O).delete(b),V(this,C)[se]=void 0,V(this,A)[se]=void 0,se===V(this,Y))Re(this,Y,V(this,T)[se]);else if(se===V(this,N))Re(this,N,V(this,I)[se]);else{let oe=V(this,T)[se];V(this,I)[oe]=V(this,I)[se];let Be=V(this,I)[se];V(this,T)[Be]=V(this,T)[se]}Ir(this,R)._--,V(this,K).push(se)}}if(V(this,le)&&V(this,Q)?.length){let se=V(this,Q),G;for(;G=se?.shift();)(X=V(this,w))==null||X.call(this,...G)}return F},Si=function(b){var S,F;for(let U of Te(this,$,Nt).call(this,{allowStale:!0})){let X=V(this,A)[U];if(Te(this,$,Ye).call(this,X))X.__abortController.abort(new Error("deleted"));else{let se=V(this,C)[U];V(this,D)&&((S=V(this,_))==null||S.call(this,X,se,b)),V(this,le)&&V(this,Q)?.push([X,se,b])}}if(V(this,O).clear(),V(this,A).fill(void 0),V(this,C).fill(void 0),V(this,W)&&V(this,P)&&(V(this,W).fill(0),V(this,P).fill(0)),V(this,L)&&V(this,L).fill(0),Re(this,N,0),Re(this,Y,0),V(this,K).length=0,Re(this,M,0),Re(this,R,0),V(this,le)&&V(this,Q)){let U=V(this,Q),X;for(;X=U?.shift();)(F=V(this,w))==null||F.call(this,...X)}},Ie);o.LRUCache=s}),O0=we(o=>{"use strict";be(),ve(),me(),Object.defineProperty(o,"__esModule",{value:!0}),o.NumberAllocator=void 0;var e=class{constructor(r,h){Se(this,"used");Se(this,"min");Se(this,"max");Se(this,"lowWaterMark");this.min=r,this.max=h,this.used=new Set,this.lowWaterMark=r}firstVacant(){if(this.used.size===this.max-this.min+1)return null;for(let r=this.lowWaterMark;r<=this.max;r++)if(!this.used.has(r))return r;return null}alloc(){if(this.used.size===this.max-this.min+1)return null;for(let r=this.lowWaterMark;r<=this.max;r++)if(!this.used.has(r))return this.used.add(r),this.lowWaterMark=r+1,r;return null}use(r){return r<this.min||r>this.max||this.used.has(r)?!1:(this.used.add(r),!0)}free(r){r<this.min||r>this.max||(this.used.delete(r),r<this.lowWaterMark&&(this.lowWaterMark=r))}clear(){this.used.clear(),this.lowWaterMark=this.min}};o.NumberAllocator=e}),Sc=we(o=>{"use strict";be(),ve(),me(),Object.defineProperty(o,"__esModule",{value:!0});var e=Ac(),r=O0(),h=class{constructor(d){Se(this,"aliasToTopic");Se(this,"topicToAlias");Se(this,"max");Se(this,"numberAllocator");Se(this,"length");d>0&&(this.aliasToTopic=new e.LRUCache({max:d}),this.topicToAlias={},this.numberAllocator=new r.NumberAllocator(1,d),this.max=d,this.length=0)}put(d,t){if(t===0||t>this.max)return!1;let n=this.aliasToTopic.get(t);return n&&delete this.topicToAlias[n],this.aliasToTopic.set(t,d),this.topicToAlias[d]=t,this.numberAllocator.use(t),this.length=this.aliasToTopic.size,!0}getTopicByAlias(d){return this.aliasToTopic.get(d)}getAliasByTopic(d){let t=this.topicToAlias[d];return typeof t<"u"&&this.aliasToTopic.get(t),t}clear(){this.aliasToTopic.clear(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0}getLruAlias(){return this.numberAllocator.firstVacant()||[...this.aliasToTopic.keys()][this.aliasToTopic.size-1]}};o.default=h}),Cc=we(o=>{"use strict";be(),ve(),me();var e=o&&o.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(o,"__esModule",{value:!0});var r=hn(),h=e(Sc()),d=zt(),t=(n,i,f)=>{n.log("_handleConnack");let{options:c}=n,l=c.protocolVersion===5?i.reasonCode:i.returnCode;if(n.connackReceived){let g=new d.ErrorWithReasonCode("Protocol error: duplicate CONNACK on the same network connection",130);f?.discardParsedPackets(),n._cleanUp(!0),n.emit("error",g);return}if(n.connackReceived=!0,clearTimeout(n.connackTimer),delete n.topicAliasSend,n._serverProperties=i.properties,i.properties&&i.properties.topicAliasMaximum){if(i.properties.topicAliasMaximum>65535){f?.discardParsedPackets(),n._cleanUp(!0),n.emit("error",new Error("topicAliasMaximum from broker is out of range"));return}i.properties.topicAliasMaximum>0&&(n.topicAliasSend=new h.default(i.properties.topicAliasMaximum))}if(l===0)n.reconnecting=!1,n._onConnect(i);else if(l>0){n.log("_handleConnack :: connection refused with reason code %d",l);let g=new d.ErrorWithReasonCode(`Connection refused: ${r.ReasonCodes[l]}`,l);f?.discardParsedPackets(),n.reconnectSuppressed=!0,n._cleanUp(!0);try{n.emit("error",g)}finally{c.reconnectOnConnackError&&(n.reconnectSuppressed=!1,n._setupReconnect())}}};o.default=t}),Bc=we(o=>{"use strict";be(),ve(),me(),Object.defineProperty(o,"__esModule",{value:!0});var e=(r,h,d)=>{r.log("handling pubrel packet");let t=typeof d<"u"?d:r.noop,{messageId:n}=h,i={cmd:"pubcomp",messageId:n};r.incomingStore.get(h,(f,c)=>{f?r._sendPacket(i,t):(r.emit("message",c.topic,c.payload,c),r.handleMessage(c,l=>{if(l)return t(l);r.incomingStore.del(c,r.noop),r._releaseIncomingQoS2Publish(n),r._sendPacket(i,t)}))})};o.default=e}),kc=we(o=>{"use strict";be(),ve(),me();var e=o&&o.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(o,"__esModule",{value:!0});var r=e(wc()),h=e(Ec()),d=e(Cc()),t=e(hn()),n=e(Bc()),i=zt(),f=g=>g<128?1:g<16384?2:g<2097152?3:4,c=g=>1+f(g)+g,l=(g,u,s,x)=>{let{options:E}=g,v=E.properties?.maximumPacketSize,y=c(u.length);if(E.protocolVersion===5&&v&&v<y)return g.log("_handlePacket :: %s packet of %d bytes exceeds the advertised maximumPacketSize %d",u.cmd,y,v),x?.discardParsedPackets(),g._cleanUp(!0),s(),g.emit("error",new i.ErrorWithReasonCode(`exceeding packets size ${u.cmd}: ${y} bytes, maximumPacketSize is ${v}`,149)),g;switch(g.log("_handlePacket :: emitting packetreceive"),g.emit("packetreceive",u),u.cmd){case"publish":(0,r.default)(g,u,s,x);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":g.reschedulePing();try{(0,t.default)(g,u)}finally{s()}break;case"pubrel":g.reschedulePing(),(0,n.default)(g,u,s);break;case"connack":try{(0,d.default)(g,u,x)}finally{s()}break;case"auth":g.reschedulePing();try{(0,h.default)(g,u,x)}finally{s()}break;case"pingresp":g.log("_handlePacket :: received pingresp"),g.reschedulePing(!0),s();break;case"disconnect":g.emit("disconnect",u),s();break;default:g.log("_handlePacket :: unknown command"),s();break}};o.default=l}),R0=we(o=>{"use strict";be(),ve(),me(),Object.defineProperty(o,"__esModule",{value:!0});var e=class{constructor(){Se(this,"nextId");this.nextId=Math.max(1,Math.floor(Math.random()*65535))}allocate(){let r=this.nextId++;return this.nextId===65536&&(this.nextId=1),r}getLastAllocated(){return this.nextId===1?65535:this.nextId-1}register(r){return!0}deallocate(r){}clear(){}};o.default=e}),Ic=we(o=>{"use strict";be(),ve(),me(),Object.defineProperty(o,"__esModule",{value:!0});var e=class{constructor(r){Se(this,"aliasToTopic");Se(this,"max");Se(this,"length");this.aliasToTopic={},this.max=r}put(r,h){return h===0||h>this.max?!1:(this.aliasToTopic[h]=r,this.length=Object.keys(this.aliasToTopic).length,!0)}getTopicByAlias(r){return this.aliasToTopic[r]}clear(){this.aliasToTopic={}}};o.default=e}),Dc=we(o=>{"use strict";be(),ve(),me();var e=o&&o.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(o,"__esModule",{value:!0}),o.TypedEventEmitter=void 0;var r=e((er(),He(Wt))),h=zt(),d=class{};o.TypedEventEmitter=d,(0,h.applyMixin)(d,r.default)}),j0=we((o,e)=>{be(),ve(),me(),(function(r,h){typeof o=="object"&&typeof e<"u"?h(o):typeof define=="function"&&define.amd?define(["exports"],h):(r=typeof globalThis<"u"?globalThis:r||self,h(r.fastUniqueNumbers={}))})(o,(function(r){"use strict";var h=function(s){return function(x){var E=s(x);return x.add(E),E}},d=function(s){return function(x,E){return s.set(x,E),E}},t=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,n=536870912,i=n*2,f=function(s,x){return function(E){var v=x.get(E),y=v===void 0?E.size:v<i?v+1:0;if(!E.has(y))return s(E,y);if(E.size<n){for(;E.has(y);)y=Math.floor(Math.random()*i);return s(E,y)}if(E.size>t)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;E.has(y);)y=Math.floor(Math.random()*t);return s(E,y)}},c=new WeakMap,l=d(c),g=f(l,c),u=h(g);r.addUniqueNumber=u,r.generateUniqueNumber=g}))}),pn=we((o,e)=>{be(),ve(),me();function r(h){"@babel/helpers - typeof";return e.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},e.exports.__esModule=!0,e.exports.default=e.exports,r(h)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}),Fc=we((o,e)=>{be(),ve(),me();var r=pn().default;function h(d,t){if(r(d)!="object"||!d)return d;var n=d[Symbol.toPrimitive];if(n!==void 0){var i=n.call(d,t||"default");if(r(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(d)}e.exports=h,e.exports.__esModule=!0,e.exports.default=e.exports}),Pc=we((o,e)=>{be(),ve(),me();var r=pn().default,h=Fc();function d(t){var n=h(t,"string");return r(n)=="symbol"?n:n+""}e.exports=d,e.exports.__esModule=!0,e.exports.default=e.exports}),Tc=we((o,e)=>{be(),ve(),me();var r=Pc();function h(d,t,n){return(t=r(t))in d?Object.defineProperty(d,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):d[t]=n,d}e.exports=h,e.exports.__esModule=!0,e.exports.default=e.exports}),Oc=we((o,e)=>{be(),ve(),me();function r(h){if(Array.isArray(h))return h}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}),Rc=we((o,e)=>{be(),ve(),me();function r(h,d){var t=h==null?null:typeof Symbol<"u"&&h[Symbol.iterator]||h["@@iterator"];if(t!=null){var n,i,f,c,l=[],g=!0,u=!1;try{if(f=(t=t.call(h)).next,d===0){if(Object(t)!==t)return;g=!1}else for(;!(g=(n=f.call(t)).done)&&(l.push(n.value),l.length!==d);g=!0);}catch(s){u=!0,i=s}finally{try{if(!g&&t.return!=null&&(c=t.return(),Object(c)!==c))return}finally{if(u)throw i}}return l}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}),jc=we((o,e)=>{be(),ve(),me();function r(h,d){(d==null||d>h.length)&&(d=h.length);for(var t=0,n=Array(d);t<d;t++)n[t]=h[t];return n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}),Nc=we((o,e)=>{be(),ve(),me();var r=jc();function h(d,t){if(d){if(typeof d=="string")return r(d,t);var n={}.toString.call(d).slice(8,-1);return n==="Object"&&d.constructor&&(n=d.constructor.name),n==="Map"||n==="Set"?Array.from(d):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(d,t):void 0}}e.exports=h,e.exports.__esModule=!0,e.exports.default=e.exports}),Mc=we((o,e)=>{be(),ve(),me();function r(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}),Lc=we((o,e)=>{be(),ve(),me();var r=Oc(),h=Rc(),d=Nc(),t=Mc();function n(i,f){return r(i)||h(i,f)||d(i,f)||t()}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}),Uc=we((o,e)=>{be(),ve(),me();function r(d,t,n,i,f,c,l){try{var g=d[c](l),u=g.value}catch(s){return void n(s)}g.done?t(u):Promise.resolve(u).then(i,f)}function h(d){return function(){var t=this,n=arguments;return new Promise(function(i,f){var c=d.apply(t,n);function l(u){r(c,i,f,l,g,"next",u)}function g(u){r(c,i,f,l,g,"throw",u)}l(void 0)})}}e.exports=h,e.exports.__esModule=!0,e.exports.default=e.exports}),N0=we((o,e)=>{be(),ve(),me();function r(h,d){this.v=h,this.k=d}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}),M0=we((o,e)=>{be(),ve(),me();function r(h,d,t,n){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}e.exports=r=function(f,c,l,g){function u(s,x){r(f,s,function(E){return this._invoke(s,x,E)})}c?i?i(f,c,{value:l,enumerable:!g,configurable:!g,writable:!g}):f[c]=l:(u("next",0),u("throw",1),u("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,r(h,d,t,n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}),L0=we((o,e)=>{be(),ve(),me();var r=M0();function h(){var d,t,n=typeof Symbol=="function"?Symbol:{},i=n.iterator||"@@iterator",f=n.toStringTag||"@@toStringTag";function c(y,a,m,_){var w=a&&a.prototype instanceof g?a:g,B=Object.create(w.prototype);return r(B,"_invoke",(function(k,R,M){var O,C,A,I=0,T=M||[],N=!1,Y={p:0,n:0,v:d,a:K,f:K.bind(d,4),d:function(Q,L){return O=Q,C=0,A=d,Y.n=L,l}};function K(Q,L){for(C=Q,A=L,t=0;!N&&I&&!P&&t<T.length;t++){var P,W=T[t],D=Y.p,ee=W[2];Q>3?(P=ee===L)&&(A=W[(C=W[4])?5:(C=3,3)],W[4]=W[5]=d):W[0]<=D&&((P=Q<2&&D<W[1])?(C=0,Y.v=L,Y.n=W[1]):D<ee&&(P=Q<3||W[0]>L||L>ee)&&(W[4]=Q,W[5]=L,Y.n=ee,C=0))}if(P||Q>1)return l;throw N=!0,L}return function(Q,L,P){if(I>1)throw TypeError("Generator is already running");for(N&&L===1&&K(L,P),C=L,A=P;(t=C<2?d:A)||!N;){O||(C?C<3?(C>1&&(Y.n=-1),K(C,A)):Y.n=A:Y.v=A);try{if(I=2,O){if(C||(Q="next"),t=O[Q]){if(!(t=t.call(O,A)))throw TypeError("iterator result is not an object");if(!t.done)return t;A=t.value,C<2&&(C=0)}else C===1&&(t=O.return)&&t.call(O),C<2&&(A=TypeError("The iterator does not provide a '"+Q+"' method"),C=1);O=d}else if((t=(N=Y.n<0)?A:k.call(R,Y))!==l)break}catch(W){O=d,C=1,A=W}finally{I=1}}return{value:t,done:N}}})(y,m,_),!0),B}var l={};function g(){}function u(){}function s(){}t=Object.getPrototypeOf;var x=[][i]?t(t([][i]())):(r(t={},i,function(){return this}),t),E=s.prototype=g.prototype=Object.create(x);function v(y){return Object.setPrototypeOf?Object.setPrototypeOf(y,s):(y.__proto__=s,r(y,f,"GeneratorFunction")),y.prototype=Object.create(E),y}return u.prototype=s,r(E,"constructor",s),r(s,"constructor",u),u.displayName="GeneratorFunction",r(s,f,"GeneratorFunction"),r(E),r(E,f,"Generator"),r(E,i,function(){return this}),r(E,"toString",function(){return"[object Generator]"}),(e.exports=h=function(){return{w:c,m:v}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=h,e.exports.__esModule=!0,e.exports.default=e.exports}),U0=we((o,e)=>{be(),ve(),me();var r=N0(),h=M0();function d(t,n){function i(c,l,g,u){try{var s=t[c](l),x=s.value;return x instanceof r?n.resolve(x.v).then(function(E){i("next",E,g,u)},function(E){i("throw",E,g,u)}):n.resolve(x).then(function(E){s.value=E,g(s)},function(E){return i("throw",E,g,u)})}catch(E){u(E)}}var f;this.next||(h(d.prototype),h(d.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),h(this,"_invoke",function(c,l,g){function u(){return new n(function(s,x){i(c,g,s,x)})}return f=f?f.then(u,u):u()},!0)}e.exports=d,e.exports.__esModule=!0,e.exports.default=e.exports}),q0=we((o,e)=>{be(),ve(),me();var r=L0(),h=U0();function d(t,n,i,f,c){return new h(r().w(t,n,i,f),c||Promise)}e.exports=d,e.exports.__esModule=!0,e.exports.default=e.exports}),qc=we((o,e)=>{be(),ve(),me();var r=q0();function h(d,t,n,i,f){var c=r(d,t,n,i,f);return c.next().then(function(l){return l.done?l.value:c.next()})}e.exports=h,e.exports.__esModule=!0,e.exports.default=e.exports}),Wc=we((o,e)=>{be(),ve(),me();function r(h){var d=Object(h),t=[];for(var n in d)t.unshift(n);return function i(){for(;t.length;)if((n=t.pop())in d)return i.value=n,i.done=!1,i;return i.done=!0,i}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}),Hc=we((o,e)=>{be(),ve(),me();var r=pn().default;function h(d){if(d!=null){var t=d[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(d);if(typeof d.next=="function")return d;if(!isNaN(d.length))return{next:function(){return d&&n>=d.length&&(d=void 0),{value:d&&d[n++],done:!d}}}}throw new TypeError(r(d)+" is not iterable")}e.exports=h,e.exports.__esModule=!0,e.exports.default=e.exports}),zc=we((o,e)=>{be(),ve(),me();var r=N0(),h=L0(),d=qc(),t=q0(),n=U0(),i=Wc(),f=Hc();function c(){"use strict";var l=h(),g=l.m(c),u=(Object.getPrototypeOf?Object.getPrototypeOf(g):g.__proto__).constructor;function s(v){var y=typeof v=="function"&&v.constructor;return!!y&&(y===u||(y.displayName||y.name)==="GeneratorFunction")}var x={throw:1,return:2,break:3,continue:3};function E(v){var y,a;return function(m){y||(y={stop:function(){return a(m.a,2)},catch:function(){return m.v},abrupt:function(_,w){return a(m.a,x[_],w)},delegateYield:function(_,w,B){return y.resultName=w,a(m.d,f(_),B)},finish:function(_){return a(m.f,_)}},a=function(_,w,B){m.p=y.prev,m.n=y.next;try{return _(w,B)}finally{y.next=m.n}}),y.resultName&&(y[y.resultName]=m.v,y.resultName=void 0),y.sent=m.v,y.next=m.n;try{return v.call(this,y)}finally{m.p=y.prev,m.n=y.next}}}return(e.exports=c=function(){return{wrap:function(v,y,a,m){return l.w(E(v),y,a,m&&m.reverse())},isGeneratorFunction:s,mark:l.m,awrap:function(v,y){return new r(v,y)},AsyncIterator:n,async:function(v,y,a,m,_){return(s(y)?t:d)(E(v),y,a,m,_)},keys:i,values:f}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=c,e.exports.__esModule=!0,e.exports.default=e.exports}),$c=we((o,e)=>{be(),ve(),me();var r=zc()();e.exports=r;try{regeneratorRuntime=r}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}),Vc=we((o,e)=>{be(),ve(),me(),(function(r,h){typeof o=="object"&&typeof e<"u"?h(o,j0(),Tc(),Lc(),Uc(),$c()):typeof define=="function"&&define.amd?define(["exports","fast-unique-numbers","@babel/runtime/helpers/defineProperty","@babel/runtime/helpers/slicedToArray","@babel/runtime/helpers/asyncToGenerator","@babel/runtime/regenerator"],h):(r=typeof globalThis<"u"?globalThis:r||self,h(r.brokerFactory={},r.fastUniqueNumbers,r._defineProperty,r._slicedToArray,r._asyncToGenerator,r._regeneratorRuntime))})(o,(function(r,h,d,t,n,i){"use strict";function f(y,a){var m=Object.keys(y);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(y);a&&(_=_.filter(function(w){return Object.getOwnPropertyDescriptor(y,w).enumerable})),m.push.apply(m,_)}return m}function c(y){for(var a=1;a<arguments.length;a++){var m=arguments[a]!=null?arguments[a]:{};a%2?f(Object(m),!0).forEach(function(_){d(y,_,m[_])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(m)):f(Object(m)).forEach(function(_){Object.defineProperty(y,_,Object.getOwnPropertyDescriptor(m,_))})}return y}var l=function(y,a,m,_){return function(w){var B=a(w);return function(k){var R=y(k);k.addEventListener("message",function(K){var Q=K.data,L=Q.id;if(L!==null&&R.has(L)){var P=R.get(L),W=P.reject,D=P.resolve;R.delete(L),Q.error===void 0?D(Q.result):W(new Error(Q.error.message))}}),_(k)&&k.start();for(var M=function(K){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return new Promise(function(P,W){var D=m(R);R.set(D,{reject:W,resolve:P}),Q===null?k.postMessage({id:D,method:K},L):k.postMessage({id:D,method:K,params:Q},L)})},O=function(K,Q){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];k.postMessage({id:null,method:K,params:Q},L)},C={},A=0,I=Object.entries(B);A<I.length;A++){var T=t(I[A],2),N=T[0],Y=T[1];C=c(c({},C),{},d({},N,Y({call:M,notify:O})))}return c({},C)}}},g=function(y){return function(a){if(y.has(a))return y.get(a);var m=new Map;return y.set(a,m),m}};function u(y,a){var m=Object.keys(y);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(y);a&&(_=_.filter(function(w){return Object.getOwnPropertyDescriptor(y,w).enumerable})),m.push.apply(m,_)}return m}function s(y){for(var a=1;a<arguments.length;a++){var m=arguments[a]!=null?arguments[a]:{};a%2?u(Object(m),!0).forEach(function(_){d(y,_,m[_])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(m)):u(Object(m)).forEach(function(_){Object.defineProperty(y,_,Object.getOwnPropertyDescriptor(m,_))})}return y}var x=function(y){return function(a){return s(s({},a),{},{connect:function(m){var _=m.call;return n(i.mark(function w(){var B,k,R,M;return i.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return B=new MessageChannel,k=B.port1,R=B.port2,O.next=1,_("connect",{port:k},[k]);case 1:return M=O.sent,y.set(R,M),O.abrupt("return",R);case 2:case"end":return O.stop()}},w)}))},disconnect:function(m){var _=m.call;return(function(){var w=n(i.mark(function B(k){var R;return i.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(R=y.get(k),R!==void 0){M.next=1;break}throw new Error("The given port is not connected.");case 1:return M.next=2,_("disconnect",{portId:R});case 2:case"end":return M.stop()}},B)}));return function(B){return w.apply(this,arguments)}})()},isSupported:function(m){var _=m.call;return function(){return _("isSupported")}}})}},E=function(y){return typeof y.start=="function"},v=l(g(new WeakMap),x(new WeakMap),h.generateUniqueNumber,E);r.createBroker=v}))}),Kc=we((o,e)=>{be(),ve(),me(),(function(r,h){typeof o=="object"&&typeof e<"u"?h(o,Vc(),j0(),pn()):typeof define=="function"&&define.amd?define(["exports","broker-factory","fast-unique-numbers","@babel/runtime/helpers/typeof"],h):(r=typeof globalThis<"u"?globalThis:r||self,h(r.workerTimersBroker={},r.brokerFactory,r.fastUniqueNumbers,r._typeof))})(o,(function(r,h,d,t){"use strict";var n=function(a){return function(m){return function(_){t(a.get(_))==="symbol"&&(a.set(_,null),m(_).then(function(){a.delete(_)}))}}},i=function(a){return function(m){return function(_){t(a.get(_))==="symbol"&&(a.set(_,null),m(_).then(function(){a.delete(_)}))}}},f=function(a,m){return function(_){return function(w){for(var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,k=arguments.length,R=new Array(k>2?k-2:0),M=2;M<k;M++)R[M-2]=arguments[M];var O=Symbol(),C=a(m);m.set(C,O);var A=function(){return _(B,C).then(function(){var I=m.get(C);if(I===void 0)throw new Error("The timer is in an undefined state.");I===O&&(w.apply(void 0,R),m.get(C)===O&&A())})};return A(),C}}},c=function(a,m){return function(_){return function(w){for(var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,k=arguments.length,R=new Array(k>2?k-2:0),M=2;M<k;M++)R[M-2]=arguments[M];var O=Symbol(),C=a(m);return m.set(C,O),_(B,C).then(function(){var A=m.get(C);if(A===void 0)throw new Error("The timer is in an undefined state.");A===O&&(m.delete(C),w.apply(void 0,R))}),C}}},l=new Map([[0,null]]),g=new Map([[0,null]]),u=n(l),s=i(g),x=f(d.generateUniqueNumber,l),E=c(d.generateUniqueNumber,g),v=h.createBroker({clearInterval:function(a){var m=a.call;return u(function(_){return m("clear",{timerId:_,timerType:"interval"})})},clearTimeout:function(a){var m=a.call;return s(function(_){return m("clear",{timerId:_,timerType:"timeout"})})},setInterval:function(a){var m=a.call;return x(function(_,w){return m("set",{delay:_,now:performance.timeOrigin+performance.now(),timerId:w,timerType:"interval"})})},setTimeout:function(a){var m=a.call;return E(function(_,w){return m("set",{delay:_,now:performance.timeOrigin+performance.now(),timerId:w,timerType:"timeout"})})}}),y=function(a){var m=new Worker(a);return v(m)};r.load=y,r.wrap=v}))}),Qc=we((o,e)=>{be(),ve(),me(),(function(r,h){typeof o=="object"&&typeof e<"u"?h(o,Kc()):typeof define=="function"&&define.amd?define(["exports","worker-timers-broker"],h):(r=typeof globalThis<"u"?globalThis:r||self,h(r.workerTimers={},r.workerTimersBroker))})(o,(function(r,h){"use strict";var d=function(g,u){var s=null;return function(){if(s!==null)return s;var x=new Blob([u],{type:"application/javascript; charset=utf-8"}),E=URL.createObjectURL(x);return s=g(E),setTimeout(function(){return URL.revokeObjectURL(E)}),s}},t=`(()=>{var e={389(e,t){!function(e){"use strict";var t=function(e){return function(t){var r=e(t);return t.add(r),r}},r=function(e){return function(t,r){return e.set(t,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,u=2*o,a=function(e,t){return function(r){var a=t.get(r),i=void 0===a?r.size:a<u?a+1:0;if(!r.has(i))return e(r,i);if(r.size<o){for(;r.has(i);)i=Math.floor(Math.random()*u);return e(r,i)}if(r.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;r.has(i);)i=Math.floor(Math.random()*n);return e(r,i)}},i=new WeakMap,s=r(i),c=a(s,i),f=t(c);e.addUniqueNumber=f,e.generateUniqueNumber=c}(t)},623(e,t,r){!function(e,t,r,n,o){"use strict";var u={INTERNAL_ERROR:-32603,INVALID_PARAMS:-32602,METHOD_NOT_FOUND:-32601},a=function(e,t){return Object.assign(new Error(e),{status:t})},i=function(e){return a('The requested method called "'.concat(e,'" is not supported.'),u.METHOD_NOT_FOUND)},s=function(e){return a('The handler of the method called "'.concat(e,'" returned no required result.'),u.INTERNAL_ERROR)},c=function(e){return a('The handler of the method called "'.concat(e,'" returned an unexpected result.'),u.INTERNAL_ERROR)},f=function(e){return a('The specified parameter called "portId" with the given value "'.concat(e,'" does not identify a port connected to this worker.'),u.INVALID_PARAMS)},l=function(e,n){return function(){var o=t(r.mark(function t(o){var u,a,f,l,p,d,v,x,y,b,h,m,_,g,w;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(u=o.data,a=u.id,f=u.method,l=u.params,p=n[f],t.prev=1,void 0!==p){t.next=2;break}throw i(f);case 2:if(void 0!==(d=void 0===l?p():p(l))){t.next=3;break}throw s(f);case 3:if(!(d instanceof Promise)){t.next=5;break}return t.next=4,d;case 4:g=t.sent,t.next=6;break;case 5:g=d;case 6:if(v=g,null!==a){t.next=8;break}if(void 0===v.result){t.next=7;break}throw c(f);case 7:t.next=10;break;case 8:if(void 0!==v.result){t.next=9;break}throw c(f);case 9:x=v.result,y=v.transferables,b=void 0===y?[]:y,e.postMessage({id:a,result:x},b);case 10:t.next=12;break;case 11:t.prev=11,w=t.catch(1),h=w.message,m=w.status,_=void 0===m?-32603:m,e.postMessage({error:{code:_,message:h},id:a});case 12:case"end":return t.stop()}},t,null,[[1,11]])}));return function(e){return o.apply(this,arguments)}}()},p=function(){return new Promise(function(e){var t=new ArrayBuffer(0),r=new MessageChannel,n=r.port1,o=r.port2;n.onmessage=function(t){var r=t.data;return e(null!==r)},o.postMessage(t,[t])})};function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var x=new Map,y=function(e,n,u){return v(v({},n),{},{connect:function(t){var r=t.port;r.start();var u=e(r,n),a=o.generateUniqueNumber(x);return x.set(a,function(){u(),r.close(),x.delete(a)}),{result:a}},disconnect:function(e){var t=e.portId,r=x.get(t);if(void 0===r)throw f(t);return r(),{result:null}},isSupported:function(){var e=t(r.mark(function e(){var t,n,o;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,p();case 1:if(!e.sent){e.next=5;break}if(!((t=u())instanceof Promise)){e.next=3;break}return e.next=2,t;case 2:o=e.sent,e.next=4;break;case 3:o=t;case 4:return n=o,e.abrupt("return",{result:n});case 5:return e.abrupt("return",{result:!1});case 6:case"end":return e.stop()}},e)}));function n(){return e.apply(this,arguments)}return n}()})},b=function(e,t){var r=y(b,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0}),n=l(e,r);return e.addEventListener("message",n),function(){return e.removeEventListener("message",n)}};e.createWorker=b,e.isSupported=p}(t,r(293),r(756),r(693),r(389))},472(e,t,r){!function(e,t,r,n){"use strict";var o=function(e,t){return function(r){var o=t.get(r);if(void 0===o)return Promise.resolve(!1);var u=n(o,2),a=u[0],i=u[1];return e(a),t.delete(r),i(!1),Promise.resolve(!0)}},u=function(e,t){var r=function(n,o,u,a){var i=n-e.now();i>0?o.set(a,[t(r,i,n,o,u,a),u]):(o.delete(a),u(!0))};return r},a=function(e,t,r,n){return function(o,u,a){var i=o+u-t.timeOrigin,s=i-t.now();return new Promise(function(t){e.set(a,[r(n,s,i,e,t,a),t])})}},i=new Map,s=o(globalThis.clearTimeout,i),c=new Map,f=o(globalThis.clearTimeout,c),l=u(performance,globalThis.setTimeout),p=a(i,performance,globalThis.setTimeout,l),d=a(c,performance,globalThis.setTimeout,l);r.createWorker(self,{clear:function(){var r=e(t.mark(function e(r){var n,o,u;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.timerId,o=r.timerType,e.next=1,"interval"===o?s(n):f(n);case 1:return u=e.sent,e.abrupt("return",{result:u});case 2:case"end":return e.stop()}},e)}));function n(e){return r.apply(this,arguments)}return n}(),set:function(){var r=e(t.mark(function e(r){var n,o,u,a,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.delay,o=r.now,u=r.timerId,a=r.timerType,e.next=1,("interval"===a?p:d)(n,o,u);case 1:return i=e.sent,e.abrupt("return",{result:i});case 2:case"end":return e.stop()}},e)}));function n(e){return r.apply(this,arguments)}return n}()})}(r(293),r(756),r(623),r(715))},172(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},79(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},987(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},293(e){function t(e,t,r,n,o,u,a){try{var i=e[u](a),s=i.value}catch(e){return void r(e)}i.done?t(s):Promise.resolve(s).then(n,o)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise(function(o,u){var a=e.apply(r,n);function i(e){t(a,o,u,i,s,"next",e)}function s(e){t(a,o,u,i,s,"throw",e)}i(void 0)})}},e.exports.__esModule=!0,e.exports.default=e.exports},693(e,t,r){var n=r(736);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},156(e){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,u,a,i=[],s=!0,c=!1;try{if(u=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=u.call(r)).done)&&(i.push(n.value),i.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return i}},e.exports.__esModule=!0,e.exports.default=e.exports},752(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},993(e,t,r){var n=r(546);function o(){var t,r,u="function"==typeof Symbol?Symbol:{},a=u.iterator||"@@iterator",i=u.toStringTag||"@@toStringTag";function s(e,o,u,a){var i=o&&o.prototype instanceof f?o:f,s=Object.create(i.prototype);return n(s,"_invoke",function(e,n,o){var u,a,i,s=0,f=o||[],l=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,r){return u=e,a=0,i=t,p.n=r,c}};function d(e,n){for(a=e,i=n,r=0;!l&&s&&!o&&r<f.length;r++){var o,u=f[r],d=p.p,v=u[2];e>3?(o=v===n)&&(i=u[(a=u[4])?5:(a=3,3)],u[4]=u[5]=t):u[0]<=d&&((o=e<2&&d<u[1])?(a=0,p.v=n,p.n=u[1]):d<v&&(o=e<3||u[0]>n||n>v)&&(u[4]=e,u[5]=n,p.n=v,a=0))}if(o||e>1)return c;throw l=!0,n}return function(o,f,v){if(s>1)throw TypeError("Generator is already running");for(l&&1===f&&d(f,v),a=f,i=v;(r=a<2?t:i)||!l;){u||(a?a<3?(a>1&&(p.n=-1),d(a,i)):p.n=i:p.v=i);try{if(s=2,u){if(a||(o="next"),r=u[o]){if(!(r=r.call(u,i)))throw TypeError("iterator result is not an object");if(!r.done)return r;i=r.value,a<2&&(a=0)}else 1===a&&(r=u.return)&&r.call(u),a<2&&(i=TypeError("The iterator does not provide a '"+o+"' method"),a=1);u=t}else if((r=(l=p.n<0)?i:e.call(n,p))!==c)break}catch(e){u=t,a=1,i=e}finally{s=1}}return{value:r,done:l}}}(e,u,a),!0),s}var c={};function f(){}function l(){}function p(){}r=Object.getPrototypeOf;var d=[][a]?r(r([][a]())):(n(r={},a,function(){return this}),r),v=p.prototype=f.prototype=Object.create(d);function x(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,n(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e}return l.prototype=p,n(v,"constructor",p),n(p,"constructor",l),l.displayName="GeneratorFunction",n(p,i,"GeneratorFunction"),n(v),n(v,i,"Generator"),n(v,a,function(){return this}),n(v,"toString",function(){return"[object Generator]"}),(e.exports=o=function(){return{w:s,m:x}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},869(e,t,r){var n=r(887);e.exports=function(e,t,r,o,u){var a=n(e,t,r,o,u);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},887(e,t,r){var n=r(993),o=r(791);e.exports=function(e,t,r,u,a){return new o(n().w(e,t,r,u),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},791(e,t,r){var n=r(172),o=r(546);e.exports=function e(t,r){function u(e,o,a,i){try{var s=t[e](o),c=s.value;return c instanceof n?r.resolve(c.v).then(function(e){u("next",e,a,i)},function(e){u("throw",e,a,i)}):r.resolve(c).then(function(e){s.value=e,a(s)},function(e){return u("throw",e,a,i)})}catch(e){i(e)}}var a;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(e,t,n){function o(){return new r(function(t,r){u(e,n,t,r)})}return a=a?a.then(o,o):o()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},546(e){function t(r,n,o,u){var a=Object.defineProperty;try{a({},"",{})}catch(r){a=0}e.exports=t=function(e,r,n,o){function u(r,n){t(e,r,function(e){return this._invoke(r,n,e)})}r?a?a(e,r,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[r]=n:(u("next",0),u("throw",1),u("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n,o,u)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},373(e){e.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},633(e,t,r){var n=r(172),o=r(993),u=r(869),a=r(887),i=r(791),s=r(373),c=r(579);function f(){"use strict";var t=o(),r=t.m(f),l=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function p(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===l||"GeneratorFunction"===(t.displayName||t.name))}var d={throw:1,return:2,break:3,continue:3};function v(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,d[e],t)},delegateYield:function(e,o,u){return t.resultName=o,r(n.d,c(e),u)},finish:function(e){return r(n.f,e)}},r=function(e,r,o){n.p=t.prev,n.n=t.next;try{return e(r,o)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(e.exports=f=function(){return{wrap:function(e,r,n,o){return t.w(v(e),r,n,o&&o.reverse())},isGeneratorFunction:p,mark:t.m,awrap:function(e,t){return new n(e,t)},AsyncIterator:i,async:function(e,t,r,n,o){return(p(t)?a:u)(v(e),t,r,n,o)},keys:s,values:c}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=f,e.exports.__esModule=!0,e.exports.default=e.exports},579(e,t,r){var n=r(738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(n(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},715(e,t,r){var n=r(987),o=r(156),u=r(122),a=r(752);e.exports=function(e,t){return n(e)||o(e,t)||u(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},45(e,t,r){var n=r(738).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},736(e,t,r){var n=r(738).default,o=r(45);e.exports=function(e){var t=o(e,"string");return"symbol"==n(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},738(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},122(e,t,r){var n=r(79);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},756(e,t,r){var n=r(633)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var u=t[n]={exports:{}};return e[n].call(u.exports,u,u.exports,r),u.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";r(472)})()})();`,n=d(h.load,t),i=function(g){return n().clearInterval(g)},f=function(g){return n().clearTimeout(g)},c=function(){var g;return(g=n()).setInterval.apply(g,arguments)},l=function(){var g;return(g=n()).setTimeout.apply(g,arguments)};r.clearInterval=i,r.clearTimeout=f,r.setInterval=c,r.setTimeout=l}))}),dn=we(o=>{"use strict";be(),ve(),me(),Object.defineProperty(o,"__esModule",{value:!0}),o.isReactNativeBrowser=o.isWebWorker=void 0;var e=()=>typeof window<"u"?typeof navigator<"u"&&navigator.userAgent?.toLowerCase().indexOf(" electron/")>-1&&$e?.versions?!Object.prototype.hasOwnProperty.call($e.versions,"electron"):typeof window.document<"u":!1,r=()=>!!(typeof self=="object"&&self?.constructor?.name?.includes("WorkerGlobalScope")&&typeof Deno>"u"),h=()=>typeof navigator<"u"&&navigator.product==="ReactNative",d=e()||r()||h();o.isWebWorker=r(),o.isReactNativeBrowser=h(),o.default=d}),Gc=we(o=>{"use strict";be(),ve(),me();var e=o&&o.__createBinding||(Object.create?(function(c,l,g,u){u===void 0&&(u=g);var s=Object.getOwnPropertyDescriptor(l,g);(!s||("get"in s?!l.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return l[g]}}),Object.defineProperty(c,u,s)}):(function(c,l,g,u){u===void 0&&(u=g),c[u]=l[g]})),r=o&&o.__setModuleDefault||(Object.create?(function(c,l){Object.defineProperty(c,"default",{enumerable:!0,value:l})}):function(c,l){c.default=l}),h=o&&o.__importStar||(function(){var c=function(l){return c=Object.getOwnPropertyNames||function(g){var u=[];for(var s in g)Object.prototype.hasOwnProperty.call(g,s)&&(u[u.length]=s);return u},c(l)};return function(l){if(l&&l.__esModule)return l;var g={};if(l!=null)for(var u=c(l),s=0;s<u.length;s++)u[s]!=="default"&&e(g,l,u[s]);return r(g,l),g}})();Object.defineProperty(o,"__esModule",{value:!0});var d=Qc(),t=h(dn()),n={set:d.setInterval,clear:d.clearInterval},i={set:(c,l)=>setInterval(c,l),clear:c=>clearInterval(c)},f=c=>{switch(c){case"native":return i;case"worker":return n;case"auto":default:return t.default&&!t.isWebWorker&&!t.isReactNativeBrowser?n:i}};o.default=f}),W0=we(o=>{"use strict";be(),ve(),me();var e=o&&o.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(o,"__esModule",{value:!0});var r=e(Gc()),h=class{constructor(d,t){Se(this,"_keepalive");Se(this,"timerId");Se(this,"timer");Se(this,"destroyed",!1);Se(this,"counter");Se(this,"client");Se(this,"_keepaliveTimeoutTimestamp");Se(this,"_intervalEvery");this.client=d,this.timer=typeof t=="object"&&"set"in t&&"clear"in t?t:(0,r.default)(t),this.setKeepalive(d.keepalive)}get keepaliveTimeoutTimestamp(){return this._keepaliveTimeoutTimestamp}get intervalEvery(){return this._intervalEvery}get keepalive(){return this._keepalive}clear(){this.timerId&&(this.timer.clear(this.timerId),this.timerId=null)}setKeepalive(d){if(d*=1e3,isNaN(d)||d<=0||d>2147483647)throw new Error(`Keepalive value must be an integer between 0 and 2147483647. Provided value is ${d}`);this._keepalive=d,this.reschedule(),this.client.log(`KeepaliveManager: set keepalive to ${d}ms`)}destroy(){this.clear(),this.destroyed=!0}reschedule(){if(this.destroyed)return;this.clear(),this.counter=0;let d=Math.ceil(this._keepalive*1.5);this._keepaliveTimeoutTimestamp=Date.now()+d,this._intervalEvery=Math.ceil(this._keepalive/2),this.timerId=this.timer.set(()=>{this.destroyed||(this.counter+=1,this.counter===2?this.client.sendPing():this.counter>2&&this.client.onKeepaliveTimeout())},this._intervalEvery)}};o.default=h}),Ci=we(o=>{"use strict";var R;be(),ve(),me();var e=o&&o.__createBinding||(Object.create?(function(M,O,C,A){A===void 0&&(A=C);var I=Object.getOwnPropertyDescriptor(O,C);(!I||("get"in I?!O.__esModule:I.writable||I.configurable))&&(I={enumerable:!0,get:function(){return O[C]}}),Object.defineProperty(M,A,I)}):(function(M,O,C,A){A===void 0&&(A=C),M[A]=O[C]})),r=o&&o.__setModuleDefault||(Object.create?(function(M,O){Object.defineProperty(M,"default",{enumerable:!0,value:O})}):function(M,O){M.default=O}),h=o&&o.__importStar||(function(){var M=function(O){return M=Object.getOwnPropertyNames||function(C){var A=[];for(var I in C)Object.prototype.hasOwnProperty.call(C,I)&&(A[A.length]=I);return A},M(O)};return function(O){if(O&&O.__esModule)return O;var C={};if(O!=null)for(var A=M(O),I=0;I<A.length;I++)A[I]!=="default"&&e(C,O,A[I]);return r(C,O),C}})(),d=o&&o.__importDefault||function(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(o,"__esModule",{value:!0});var t=d(bc()),n=tr(),i=d(vc()),f=d(rr()),c=h(I0()),l=d(D0()),g=d(kc()),u=hn(),s=d(R0()),x=d(Ic()),E=zt(),v=Dc(),y=d(W0()),a=h(dn()),m=globalThis.setImmediate||((...M)=>{let O=M.shift();(0,E.nextTick)(()=>{O(...M)})}),_=65535,w=147,B={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0,subscribeBatchSize:null,writeCache:!0,timerVariant:"auto"},k=(R=class extends v.TypedEventEmitter{constructor(C,A){super();Se(this,"connected");Se(this,"disconnecting");Se(this,"disconnected");Se(this,"reconnecting");Se(this,"incomingStore");Se(this,"outgoingStore");Se(this,"options");Se(this,"queueQoSZero");Se(this,"_reconnectCount");Se(this,"log");Se(this,"messageIdProvider");Se(this,"outgoing");Se(this,"messageIdToTopic");Se(this,"noop");Se(this,"keepaliveManager");Se(this,"stream");Se(this,"queue");Se(this,"streamBuilder");Se(this,"_resubscribeTopics");Se(this,"connackTimer");Se(this,"reconnectTimer");Se(this,"_storeProcessing");Se(this,"_packetIdsDuringStoreProcessing");Se(this,"_storeProcessingQueue");Se(this,"_firstConnection");Se(this,"topicAliasRecv");Se(this,"topicAliasSend");Se(this,"_incomingQoS2Ids");Se(this,"_receiveMaximum");Se(this,"_deferredReconnect");Se(this,"_currentPump");Se(this,"connackReceived");Se(this,"reconnectSuppressed");Se(this,"_authenticationMethod");Se(this,"connackPacket");Se(this,"_serverProperties");this.options=A||{};for(let T in B)typeof this.options[T]>"u"?this.options[T]=B[T]:this.options[T]=A[T];this.log=this.options.log||(0,f.default)("mqttjs:client"),this.noop=this._noop.bind(this),this.log("MqttClient :: version:",R.VERSION),a.isWebWorker?this.log("MqttClient :: environment","webworker"):this.log("MqttClient :: environment",a.default?"browser":"node"),this.log("MqttClient :: options.protocol",A.protocol),this.log("MqttClient :: options.protocolVersion",A.protocolVersion),this.log("MqttClient :: options.username",A.username),this.log("MqttClient :: options.keepalive",A.keepalive),this.log("MqttClient :: options.reconnectPeriod",A.reconnectPeriod),this.log("MqttClient :: options.rejectUnauthorized",A.rejectUnauthorized),this.log("MqttClient :: options.properties.topicAliasMaximum",A.properties?A.properties.topicAliasMaximum:void 0),this.options.clientId=typeof A.clientId=="string"?A.clientId:R.defaultId(),this.log("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=A.protocolVersion===5&&A.customHandleAcks?A.customHandleAcks:(...T)=>{T[3](null,0)},this.options.writeCache||(t.default.writeToStream.cacheNumbers=!1),this.streamBuilder=C,this.messageIdProvider=typeof this.options.messageIdProvider>"u"?new s.default:this.options.messageIdProvider,this.outgoingStore=A.outgoingStore||new l.default,this.incomingStore=A.incomingStore||new l.default,this._incomingQoS2Ids=new Set,this._receiveMaximum=_;let I=A.properties?.receiveMaximum;I!==void 0&&(Number.isInteger(I)&&I>=1&&I<=_?this._receiveMaximum=I:this.log("MqttClient :: options.properties.receiveMaximum %o is not an integer between 1 and %d, enforcing and advertising %d instead",I,_,_)),this.queueQoSZero=A.queueQoSZero===void 0?!0:A.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.keepaliveManager=null,this.connected=!1,this.disconnecting=!1,this.reconnecting=!1,this.queue=[],this.connackTimer=null,this.connackReceived=!1,this.reconnectSuppressed=!1,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,A.properties&&A.properties.topicAliasMaximum>0&&(A.properties.topicAliasMaximum>65535?this.log("MqttClient :: options.properties.topicAliasMaximum is out of range"):this.topicAliasRecv=new x.default(A.properties.topicAliasMaximum)),this.on("connect",()=>{let{queue:T}=this,N=()=>{let Y=T.shift();this.log("deliver :: entry %o",Y);let K=null;if(!Y){this._resubscribe();return}K=Y.packet,this.log("deliver :: call _sendPacket for %o",K);let Q=!0;K.messageId&&K.messageId!==0&&(this.messageIdProvider.register(K.messageId)||(Q=!1)),Q?this._sendPacket(K,L=>{Y.cb&&Y.cb(L),N()}):(this.log("messageId: %d has already used. The message is skipped and removed.",K.messageId),N())};this.log("connect :: sending queued packets"),N()}),this.on("close",()=>{this.log("close :: connected set to `false`"),this.connected=!1,this.log("close :: clearing connackTimer"),clearTimeout(this.connackTimer),this._destroyKeepaliveManager(),this._serverProperties=void 0,this.topicAliasRecv&&this.topicAliasRecv.clear(),this.log("close :: calling _setupReconnect"),this._setupReconnect()}),this.options.manualConnect||(this.log("MqttClient :: setting up stream"),this.connect())}static defaultId(){return`mqttjs_${Math.random().toString(16).substr(2,8)}`}handleAuth(C,A){A()}handleMessage(C,A){A()}_nextId(){return this.messageIdProvider.allocate()}getLastMessageId(){return this.messageIdProvider.getLastAllocated()}_trackIncomingQoS2Publish(C,A,I){return this._incomingQoS2Ids.has(C)?!0:this.options.protocolVersion===5&&this._incomingQoS2Ids.size>=this._receiveMaximum?(this.log("_trackIncomingQoS2Publish :: inbound QoS 2 messages exceeded receiveMaximum %d",this._receiveMaximum),I?.discardParsedPackets(),(!I||I.isCurrent())&&this._cleanUp(!0),A(),this.emit("error",new E.ErrorWithReasonCode(`${u.ReasonCodes[w]}: ${this._incomingQoS2Ids.size+1} inbound QoS 2 messages in flight, receiveMaximum is ${this._receiveMaximum}`,w)),!1):(this._incomingQoS2Ids.add(C),!0)}_releaseIncomingQoS2Publish(C){this._incomingQoS2Ids.delete(C)}_discardIncomingQoS2State(){if(this._incomingQoS2Ids.size!==0){this.log("_discardIncomingQoS2State :: session not resumed, dropping %d inbound QoS 2 message(s)",this._incomingQoS2Ids.size);for(let C of this._incomingQoS2Ids)this.incomingStore.del({messageId:C},this.noop);this._incomingQoS2Ids.clear()}}connect(){let C=new n.Writable,A=t.default.parser(this.options),I=null,T=[],N={discardParsedPackets:()=>{T.length=0},isCurrent:()=>this._currentPump===N};this._currentPump=N,this.connackReceived=!1,this.reconnectSuppressed=!1,this.log("connect :: calling method to clear reconnect"),this._clearReconnect(),this._serverProperties=void 0,this.disconnected&&!this.reconnecting&&(this.incomingStore=this.options.incomingStore||new l.default,this.outgoingStore=this.options.outgoingStore||new l.default,this._incomingQoS2Ids.clear(),this.disconnecting=!1,this.disconnected=!1),this.log("connect :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),A.on("packet",P=>{this.log("parser :: on packet push to packets array."),T.push(P)});let Y=()=>{this.log("work :: getting next packet in queue"),this._currentPump!==N&&(this.log("work :: pump superseded, dropping %d queued packets",T.length),T.length=0);let P=T.shift();if(P)this.log("work :: packet pulled from queue"),(0,g.default)(this,P,K,N);else{this.log("work :: no packets in queue");let W=I;I=null,this.log("work :: done flag is %s",!!W),W&&W()}},K=()=>{if(T.length)(0,E.nextTick)(Y);else{let P=I;I=null,P&&P()}};C._write=(P,W,D)=>{I=D,this.log("writable stream :: parsing buffer"),A.parse(P),Y()};let Q=P=>{this.log("streamErrorHandler :: error",P.message),P.code?(this.log("streamErrorHandler :: emitting error"),this.emit("error",P)):this.noop(P)};this.log("connect :: pipe stream to writable stream"),this.stream.pipe(C),this.stream.on("error",Q),this.stream.on("close",()=>{this.log("(%s)stream :: on close",this.options.clientId),this._flushVolatile(),this.log("stream: emit close to MqttClient"),this.emit("close")}),this.log("connect: sending packet `connect`");let L={cmd:"connect",protocolId:this.options.protocolId,protocolVersion:this.options.protocolVersion,clean:this.options.clean,clientId:this.options.clientId,keepalive:this.options.keepalive,username:this.options.username,password:this.options.password,properties:this.options.properties?{...this.options.properties}:void 0};if(L.properties?.receiveMaximum!==void 0&&(L.properties.receiveMaximum=this._receiveMaximum),this.options.will&&(L.will={...this.options.will,payload:this.options.will?.payload}),this.topicAliasRecv&&(L.properties||(L.properties={}),this.topicAliasRecv&&(L.properties.topicAliasMaximum=this.topicAliasRecv.max)),this._authenticationMethod=L.properties?.authenticationMethod,this._writePacket(L),A.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return this.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&typeof this.options.authPacket=="object"){let P={cmd:"auth",reasonCode:0,...this.options.authPacket};this._writePacket(P)}}return this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(()=>this._onConnackTimeout(),this.options.connectTimeout),this}_onConnackTimeout(){this.log("!!connectTimeout hit!! Calling _cleanUp with force `true`"),this._cleanUp(!0),this.emit("error",new Error("connack timeout"))}publish(C,A,I,T){this.log("publish :: message `%s` to topic `%s`",A,C);let{options:N}=this;typeof I=="function"&&(T=I,I=null),I=I||{},I={qos:0,retain:!1,dup:!1,...I};let{qos:Y,retain:K,dup:Q,properties:L,cbStorePut:P}=I;if(this._checkDisconnecting(T))return this;let W=()=>{let D=0;if((Y===1||Y===2)&&(D=this._nextId(),D===null))return this.log("No messageId left"),!1;let ee={cmd:"publish",topic:C,payload:A,qos:Y,retain:K,messageId:D,dup:Q};switch(N.protocolVersion===5&&(ee.properties=L),this.log("publish :: qos",Y),Y){case 1:case 2:this.outgoing[ee.messageId]={volatile:!1,cmd:"publish",cb:T||this.noop},this.log("MqttClient:publish: packet cmd: %s",ee.cmd),this._sendPacket(ee,void 0,P);break;default:this.log("MqttClient:publish: packet cmd: %s",ee.cmd),this._sendPacket(ee,T,P);break}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!W())&&this._storeProcessingQueue.push({invoke:W,cbStorePut:I.cbStorePut,callback:T}),this}publishAsync(C,A,I){return new Promise((T,N)=>{this.publish(C,A,I,(Y,K)=>{Y?N(Y):T(K)})})}subscribe(C,A,I){let T=this.options.protocolVersion;typeof A=="function"&&(I=A),I=I||this.noop;let N=!1,Y=[];typeof C=="string"?(C=[C],Y=C):Array.isArray(C)?Y=C:typeof C=="object"&&(N=C.resubscribe,delete C.resubscribe,Y=Object.keys(C));let K=c.validateTopics(Y);if(K!==null)return m(I,new Error(`Invalid topic ${K}`)),this;if(this._checkDisconnecting(I))return this.log("subscribe: discconecting true"),this;let Q={qos:0};T===5&&(Q.nl=!1,Q.rap=!1,Q.rh=0),A={...Q,...A};let{properties:L}=A,P=[],W=(le,$)=>{if($=$||A,!Object.prototype.hasOwnProperty.call(this._resubscribeTopics,le)||this._resubscribeTopics[le].qos<$.qos||N){let ce={topic:le,qos:$.qos};T===5&&(ce.nl=$.nl,ce.rap=$.rap,ce.rh=$.rh,ce.properties=L),this.log("subscribe: pushing topic `%s` and qos `%s` to subs list",ce.topic,ce.qos),P.push(ce)}};if(Array.isArray(C)?C.forEach(le=>{this.log("subscribe: array topic %s",le),W(le)}):Object.keys(C).forEach(le=>{this.log("subscribe: object topic %s, %o",le,C[le]),W(le,C[le])}),!P.length)return I(null,[]),this;let D=(le,$)=>{let ce={cmd:"subscribe",subscriptions:le,messageId:$};if(L&&(ce.properties=L),this.options.resubscribe){this.log("subscribe :: resubscribe true");let H=[];le.forEach(ae=>{if(this.options.reconnectPeriod>0){let Z={qos:ae.qos};T===5&&(Z.nl=ae.nl||!1,Z.rap=ae.rap||!1,Z.rh=ae.rh||0,Z.properties=ae.properties),this._resubscribeTopics[ae.topic]=Z,H.push(ae.topic)}}),this.messageIdToTopic[ce.messageId]=H}let ie=new Promise((H,ae)=>{this.outgoing[ce.messageId]={volatile:!0,cmd:"subscribe",cb:(Z,ne)=>{if(Z){ae(new E.ErrorWithSubackPacket(Z.message,ne));return}let{granted:re}=ne;if(re.length!==le.length){ae(new E.ErrorWithSubackPacket(`Protocol error: suback granted ${re.length} reason code(s) for ${le.length} subscription(s)`,ne)),this._cleanUp(!0);return}for(let pe=0;pe<re.length;pe+=1)le[pe].qos=re[pe];H(ne)}}});return this.log("subscribe :: call _sendPacket"),this._sendPacket(ce),ie},ee=()=>{let le=this.options.subscribeBatchSize??P.length,$=[];for(let ce=0;ce<P.length;ce+=le){let ie=P.slice(ce,ce+le),H=this._nextId();if(H===null)return this.log("No messageId left"),!1;$.push(D(ie,H))}return Promise.all($).then(ce=>{I(null,P,ce.at(-1))}).catch(ce=>{I(ce,P,ce.packet)}),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!ee())&&this._storeProcessingQueue.push({invoke:ee,callback:I}),this}subscribeAsync(C,A){return new Promise((I,T)=>{this.subscribe(C,A,(N,Y)=>{N?T(N):I(Y)})})}unsubscribe(C,A,I){typeof C=="string"&&(C=[C]),typeof A=="function"&&(I=A),I=I||this.noop;let T=c.validateTopics(C);if(T!==null)return m(I,new Error(`Invalid topic ${T}`)),this;if(this._checkDisconnecting(I))return this;let N=()=>{let Y=this._nextId();if(Y===null)return this.log("No messageId left"),!1;let K={cmd:"unsubscribe",messageId:Y,unsubscriptions:[]};return typeof C=="string"?K.unsubscriptions=[C]:Array.isArray(C)&&(K.unsubscriptions=C),this.options.resubscribe&&K.unsubscriptions.forEach(Q=>{delete this._resubscribeTopics[Q]}),typeof A=="object"&&A.properties&&(K.properties=A.properties),this.outgoing[K.messageId]={volatile:!0,cmd:"unsubscribe",cb:I},this.log("unsubscribe: call _sendPacket"),this._sendPacket(K),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!N())&&this._storeProcessingQueue.push({invoke:N,callback:I}),this}unsubscribeAsync(C,A){return new Promise((I,T)=>{this.unsubscribe(C,A,(N,Y)=>{N?T(N):I(Y)})})}end(C,A,I){this.log("end :: (%s)",this.options.clientId),(C==null||typeof C!="boolean")&&(I=I||A,A=C,C=!1),typeof A!="object"&&(I=I||A,A=null),this.log("end :: cb? %s",!!I),(!I||typeof I!="function")&&(I=this.noop);let T=()=>{this.log("end :: closeStores: closing incoming and outgoing stores"),this.disconnected=!0,this._incomingQoS2Ids.clear(),this.incomingStore.close(Y=>{this.outgoingStore.close(K=>{if(this.log("end :: closeStores: emitting end"),this.emit("end"),I){let Q=Y||K;this.log("end :: closeStores: invoking callback with args"),I(Q)}})}),this._deferredReconnect?this._deferredReconnect():(this.options.reconnectPeriod===0||this.options.manualConnect)&&(this.disconnecting=!1)},N=()=>{this.log("end :: (%s) :: finish :: calling _cleanUp with force %s",this.options.clientId,C),this._cleanUp(C,()=>{this.log("end :: finish :: calling process.nextTick on closeStores"),(0,E.nextTick)(T)},A)};return this.disconnecting?(I(),this):(this._clearReconnect(),this.disconnecting=!0,!C&&Object.keys(this.outgoing).length>0?(this.log("end :: (%s) :: calling finish in 10ms once outgoing is empty",this.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,N,10))):(this.log("end :: (%s) :: immediately calling finish",this.options.clientId),N()),this)}endAsync(C,A){return new Promise((I,T)=>{this.end(C,A,N=>{N?T(N):I()})})}removeOutgoingMessage(C){if(this.outgoing[C]){let{cb:A}=this.outgoing[C];this._removeOutgoingAndStoreMessage(C,()=>{A(new Error("Message removed"))})}return this}reconnect(C){this.log("client reconnect");let A=()=>{C?(this.options.incomingStore=C.incomingStore,this.options.outgoingStore=C.outgoingStore):(this.options.incomingStore=null,this.options.outgoingStore=null),this.incomingStore=this.options.incomingStore||new l.default,this.outgoingStore=this.options.outgoingStore||new l.default,this._incomingQoS2Ids.clear(),this.disconnecting=!1,this.disconnected=!1,this._deferredReconnect=null,this._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=A:A(),this}_flushVolatile(){this.outgoing&&(this.log("_flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(this.outgoing).forEach(C=>{this.outgoing[C].volatile&&typeof this.outgoing[C].cb=="function"&&(this.outgoing[C].cb(new Error("Connection closed")),delete this.outgoing[C])}))}_flush(){this.outgoing&&(this.log("_flush: queue exists? %b",!!this.outgoing),Object.keys(this.outgoing).forEach(C=>{typeof this.outgoing[C].cb=="function"&&(this.outgoing[C].cb(new Error("Connection closed")),delete this.outgoing[C])}))}_removeTopicAliasAndRecoverTopicName(C){let A;C.properties&&(A=C.properties.topicAlias);let I=C.topic.toString();if(this.log("_removeTopicAliasAndRecoverTopicName :: alias %d, topic %o",A,I),I.length===0){if(typeof A>"u")return new Error("Unregistered Topic Alias");if(I=this.topicAliasSend.getTopicByAlias(A),typeof I>"u")return new Error("Unregistered Topic Alias");C.topic=I}A&&delete C.properties.topicAlias}_checkDisconnecting(C){return this.disconnecting&&(C&&C!==this.noop?C(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting}_reconnect(){this.log("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected&&!this.stream.destroyed?(this.end(()=>{this.connect()}),this.log("client already connected. disconnecting first.")):(this.log("_reconnect: calling connect"),this.connect())}_setupReconnect(){!this.disconnecting&&!this.reconnectSuppressed&&!this.reconnectTimer&&this.options.reconnectPeriod>0?(this.reconnecting||(this.log("_setupReconnect :: emit `offline` state"),this.emit("offline"),this.log("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),this.log("_setupReconnect :: setting reconnectTimer for %d ms",this.options.reconnectPeriod),this.reconnectTimer=setInterval(()=>{this.log("reconnectTimer :: reconnect triggered!"),this._reconnect()},this.options.reconnectPeriod)):this.log("_setupReconnect :: doing nothing...")}_clearReconnect(){this.log("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)}_cleanUp(C,A,I={}){if(A&&(this.log("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",A)),this.log("_cleanUp :: forced? %s",C),C)this.options.reconnectPeriod===0&&this.options.clean&&this._flush(),this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{let T={cmd:"disconnect",...I};this.log("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(T,()=>{this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),m(()=>{this.stream.end(()=>{this.log("_cleanUp :: (%s) :: stream destroyed",this.options.clientId)})})})}!this.disconnecting&&!this.reconnecting&&(this.log("_cleanUp :: client not disconnecting/reconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),this._destroyKeepaliveManager(),A&&!this.connected&&(this.log("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",A),A())}_storeAndSend(C,A,I){this.log("storeAndSend :: store packet with cmd %s to outgoingStore",C.cmd);let T=C,N;if(T.cmd==="publish"&&(T=(0,i.default)(C),N=this._removeTopicAliasAndRecoverTopicName(T),N))return A&&A(N);this.outgoingStore.put(T,Y=>{if(Y)return A&&A(Y);I(),this._writePacket(C,A)})}_applyTopicAlias(C){if(this.options.protocolVersion===5&&C.cmd==="publish"){let A;C.properties&&(A=C.properties.topicAlias);let I=C.topic.toString();if(this.topicAliasSend)if(A){if(I.length!==0&&(this.log("applyTopicAlias :: register topic: %s - alias: %d",I,A),!this.topicAliasSend.put(I,A)))return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",I,A),new Error("Sending Topic Alias out of range")}else I.length!==0&&(this.options.autoAssignTopicAlias?(A=this.topicAliasSend.getAliasByTopic(I),A?(C.topic="",C.properties={...C.properties,topicAlias:A},this.log("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",I,A)):(A=this.topicAliasSend.getLruAlias(),this.topicAliasSend.put(I,A),C.properties={...C.properties,topicAlias:A},this.log("applyTopicAlias :: auto assign topic: %s - alias: %d",I,A))):this.options.autoUseTopicAlias&&(A=this.topicAliasSend.getAliasByTopic(I),A&&(C.topic="",C.properties={...C.properties,topicAlias:A},this.log("applyTopicAlias :: auto use topic: %s - alias: %d",I,A))));else if(A)return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",I,A),new Error("Sending Topic Alias out of range")}}_noop(C){this.log("noop ::",C)}_writePacket(C,A){this.log("_writePacket :: packet: %O",C),this.log("_writePacket :: emitting `packetsend`"),this.emit("packetsend",C),this.log("_writePacket :: writing to stream");let I=t.default.writeToStream(C,this.stream,this.options);this.log("_writePacket :: writeToStream result %s",I),!I&&A&&A!==this.noop?(this.log("_writePacket :: handle events on `drain` once through callback."),this.stream.once("drain",A)):A&&(this.log("_writePacket :: invoking cb"),A())}_sendPacket(C,A,I,T){this.log("_sendPacket :: (%s) :: start",this.options.clientId),I=I||this.noop,A=A||this.noop;let N=this._applyTopicAlias(C);if(N){A(N);return}if(!this.connected){if(C.cmd==="auth"){this._writePacket(C,A);return}this.log("_sendPacket :: client not connected. Storing packet offline."),this._storePacket(C,A,I);return}if(T){this._writePacket(C,A);return}switch(C.cmd){case"publish":break;case"pubrel":this._storeAndSend(C,A,I);return;default:this._writePacket(C,A);return}switch(C.qos){case 2:case 1:this._storeAndSend(C,A,I);break;case 0:default:this._writePacket(C,A);break}this.log("_sendPacket :: (%s) :: end",this.options.clientId)}_storePacket(C,A,I){this.log("_storePacket :: packet: %o",C),this.log("_storePacket :: cb? %s",!!A),I=I||this.noop;let T=C;if(T.cmd==="publish"){T=(0,i.default)(C);let Y=this._removeTopicAliasAndRecoverTopicName(T);if(Y)return A&&A(Y)}let N=T.qos||0;N===0&&this.queueQoSZero||T.cmd!=="publish"?this.queue.push({packet:T,cb:A}):N>0?(A=this.outgoing[T.messageId]?this.outgoing[T.messageId].cb:null,this.outgoingStore.put(T,Y=>{if(Y)return A&&A(Y);I()})):A&&A(new Error("No connection to broker"))}get serverProperties(){return this._serverProperties}get keepalive(){let C=this.connected?this._serverProperties?.serverKeepAlive:void 0;return C&&this.options.keepalive?C:this.options.keepalive}_setupKeepaliveManager(){this.log("_setupKeepaliveManager :: keepalive %d (seconds)",this.keepalive),!this.keepaliveManager&&this.keepalive&&(this.keepaliveManager=new y.default(this,this.options.timerVariant))}_destroyKeepaliveManager(){this.keepaliveManager&&(this.log("_destroyKeepaliveManager :: destroying keepalive manager"),this.keepaliveManager.destroy(),this.keepaliveManager=null)}reschedulePing(C=!1){this.keepaliveManager&&this.keepalive&&(C||this.options.reschedulePings)&&this._reschedulePing()}_reschedulePing(){this.log("_reschedulePing :: rescheduling ping"),this.keepaliveManager.reschedule()}sendPing(){this.log("_sendPing :: sending pingreq"),this._sendPacket({cmd:"pingreq"})}onKeepaliveTimeout(){this.log("onKeepaliveTimeout :: calling _cleanUp with force true"),this._cleanUp(!0),this.emit("error",new Error("Keepalive timeout"))}_resubscribe(){this.log("_resubscribe");let C=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion>=4&&!this.connackPacket.sessionPresent)&&C.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){this.log("_resubscribe: protocolVersion 5");for(let A=0;A<C.length;A++){let I={};I[C[A]]=this._resubscribeTopics[C[A]],I.resubscribe=!0,this.subscribe(I,{properties:I[C[A]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1}_onConnect(C){if(this.disconnected){this.emit("connect",C);return}this.connackPacket=C,!this.options.clean&&(this.options.protocolVersion<4||C.sessionPresent===!0)||this._discardIncomingQoS2State(),this.messageIdProvider.clear(),this.connected=!0,this._setupKeepaliveManager();let A=()=>{let I=this.outgoingStore.createStream(),T=()=>{I.destroy(),I=null,this._flushStoreProcessingQueue(),N()},N=()=>{this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={}};this.once("close",T),I.on("error",K=>{N(),this._flushStoreProcessingQueue(),this.removeListener("close",T),this.emit("error",K)});let Y=()=>{if(!I)return;let K=I.read(1),Q;if(!K){I.once("readable",Y);return}if(this._storeProcessing=!0,this._packetIdsDuringStoreProcessing[K.messageId]){Y();return}!this.disconnecting&&!this.reconnectTimer?(Q=this.outgoing[K.messageId]?this.outgoing[K.messageId].cb:null,this.outgoing[K.messageId]={volatile:!1,cmd:K.cmd,cb(L,P){Q&&Q(L,P),Y()}},this._packetIdsDuringStoreProcessing[K.messageId]=!0,this.messageIdProvider.register(K.messageId)?this._sendPacket(K,void 0,void 0,!0):this.log("messageId: %d has already used.",K.messageId)):I.destroy&&I.destroy()};I.on("end",()=>{let K=!0;for(let Q in this._packetIdsDuringStoreProcessing)if(!this._packetIdsDuringStoreProcessing[Q]){K=!1;break}this.removeListener("close",T),K?(N(),this._invokeAllStoreProcessingQueue(),this.emit("connect",C)):A()}),Y()};A()}_invokeStoreProcessingQueue(){if(!this._storeProcessing&&this._storeProcessingQueue.length>0){let C=this._storeProcessingQueue[0];if(C&&C.invoke())return this._storeProcessingQueue.shift(),!0}return!1}_invokeAllStoreProcessingQueue(){for(;this._invokeStoreProcessingQueue(););}_flushStoreProcessingQueue(){for(let C of this._storeProcessingQueue)C.cbStorePut&&C.cbStorePut(new Error("Connection closed")),C.callback&&C.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)}_removeOutgoingAndStoreMessage(C,A){delete this.outgoing[C],this.outgoingStore.del({messageId:C},(I,T)=>{A(I,T),this.messageIdProvider.deallocate(C),this._invokeStoreProcessingQueue()})}},Se(R,"VERSION",E.MQTTJS_VERSION),R);o.default=k}),Yc=we(o=>{"use strict";be(),ve(),me(),Object.defineProperty(o,"__esModule",{value:!0});var e=O0(),r=class{constructor(){Se(this,"numberAllocator");Se(this,"lastId");this.numberAllocator=new e.NumberAllocator(1,65535)}allocate(){return this.lastId=this.numberAllocator.alloc(),this.lastId}getLastAllocated(){return this.lastId}register(h){return this.numberAllocator.use(h)}deallocate(h){this.numberAllocator.free(h)}clear(){this.numberAllocator.clear()}};o.default=r});function Xc(){if(Bi)return Nr;Bi=!0;let o=2147483647,e=36,r=1,h=26,d=38,t=700,n=72,i=128,f="-",c=/^xn--/,l=/[^\0-\x7F]/,g=/[\x2E\u3002\uFF0E\uFF61]/g,u={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},s=e-r,x=Math.floor,E=String.fromCharCode;function v(O){throw new RangeError(u[O])}function y(O,C){let A=[],I=O.length;for(;I--;)A[I]=C(O[I]);return A}function a(O,C){let A=O.split("@"),I="";A.length>1&&(I=A[0]+"@",O=A[1]),O=O.replace(g,".");let T=O.split("."),N=y(T,C).join(".");return I+N}function m(O){let C=[],A=0,I=O.length;for(;A<I;){let T=O.charCodeAt(A++);if(T>=55296&&T<=56319&&A<I){let N=O.charCodeAt(A++);(N&64512)==56320?C.push(((T&1023)<<10)+(N&1023)+65536):(C.push(T),A--)}else C.push(T)}return C}let _=O=>String.fromCodePoint(...O),w=function(O){return O>=48&&O<58?26+(O-48):O>=65&&O<91?O-65:O>=97&&O<123?O-97:e},B=function(O,C){return O+22+75*(O<26)-((C!=0)<<5)},k=function(O,C,A){let I=0;for(O=A?x(O/t):O>>1,O+=x(O/C);O>s*h>>1;I+=e)O=x(O/s);return x(I+(s+1)*O/(O+d))},R=function(O){let C=[],A=O.length,I=0,T=i,N=n,Y=O.lastIndexOf(f);Y<0&&(Y=0);for(let K=0;K<Y;++K)O.charCodeAt(K)>=128&&v("not-basic"),C.push(O.charCodeAt(K));for(let K=Y>0?Y+1:0;K<A;){let Q=I;for(let P=1,W=e;;W+=e){K>=A&&v("invalid-input");let D=w(O.charCodeAt(K++));D>=e&&v("invalid-input"),D>x((o-I)/P)&&v("overflow"),I+=D*P;let ee=W<=N?r:W>=N+h?h:W-N;if(D<ee)break;let le=e-ee;P>x(o/le)&&v("overflow"),P*=le}let L=C.length+1;N=k(I-Q,L,Q==0),x(I/L)>o-T&&v("overflow"),T+=x(I/L),I%=L,C.splice(I++,0,T)}return String.fromCodePoint(...C)},M=function(O){let C=[];O=m(O);let A=O.length,I=i,T=0,N=n;for(let Q of O)Q<128&&C.push(E(Q));let Y=C.length,K=Y;for(Y&&C.push(f);K<A;){let Q=o;for(let P of O)P>=I&&P<Q&&(Q=P);let L=K+1;Q-I>x((o-T)/L)&&v("overflow"),T+=(Q-I)*L,I=Q;for(let P of O)if(P<I&&++T>o&&v("overflow"),P===I){let W=T;for(let D=e;;D+=e){let ee=D<=N?r:D>=N+h?h:D-N;if(W<ee)break;let le=W-ee,$=e-ee;C.push(E(B(ee+le%$,0))),W=x(le/$)}C.push(E(B(W,0))),N=k(T,L,K===Y),T=0,++K}++T,++I}return C.join("")};return Nr={version:"2.3.1",ucs2:{decode:m,encode:_},decode:R,encode:M,toASCII:function(O){return a(O,function(C){return l.test(C)?"xn--"+M(C):C})},toUnicode:function(O){return a(O,function(C){return c.test(C)?R(C.slice(4).toLowerCase()):C})}},Nr}var Nr,Bi,Lt,Jc,Zc,ef,tf,rf,nf,of=ft(()=>{be(),ve(),me(),Nr={},Bi=!1,Lt=Xc(),Jc=Lt.decode,Zc=Lt.encode,ef=Lt.toASCII,tf=Lt.toUnicode,rf=Lt.ucs2,nf=Lt.version});function sf(){return Ii||(Ii=!0,ki=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var o={},e=Symbol("test"),r=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var h=42;o[e]=h;for(e in o)return!1;if(typeof Object.keys=="function"&&Object.keys(o).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(o).length!==0)return!1;var d=Object.getOwnPropertySymbols(o);if(d.length!==1||d[0]!==e||!Object.prototype.propertyIsEnumerable.call(o,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var t=Object.getOwnPropertyDescriptor(o,e);if(t.value!==h||t.enumerable!==!0)return!1}return!0}),ki}function af(){return Fi||(Fi=!0,Di=Error),Di}function lf(){return Ti||(Ti=!0,Pi=EvalError),Pi}function uf(){return Ri||(Ri=!0,Oi=RangeError),Oi}function cf(){return Ni||(Ni=!0,ji=ReferenceError),ji}function H0(){return Li||(Li=!0,Mi=SyntaxError),Mi}function Ar(){return qi||(qi=!0,Ui=TypeError),Ui}function ff(){return Hi||(Hi=!0,Wi=URIError),Wi}function hf(){if(zi)return Mr;zi=!0;var o=typeof Symbol<"u"&&Symbol,e=sf();return Mr=function(){return typeof o!="function"||typeof Symbol!="function"||typeof o("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},Mr}function pf(){if($i)return Lr;$i=!0;var o={__proto__:null,foo:{}},e=Object;return Lr=function(){return{__proto__:o}.foo===o.foo&&!(o instanceof e)},Lr}function df(){if(Vi)return Ur;Vi=!0;var o="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,r=Math.max,h="[object Function]",d=function(i,f){for(var c=[],l=0;l<i.length;l+=1)c[l]=i[l];for(var g=0;g<f.length;g+=1)c[g+i.length]=f[g];return c},t=function(i,f){for(var c=[],l=f,g=0;l<i.length;l+=1,g+=1)c[g]=i[l];return c},n=function(i,f){for(var c="",l=0;l<i.length;l+=1)c+=i[l],l+1<i.length&&(c+=f);return c};return Ur=function(i){var f=this;if(typeof f!="function"||e.apply(f)!==h)throw new TypeError(o+f);for(var c=t(arguments,1),l,g=function(){if(this instanceof l){var v=f.apply(this,d(c,arguments));return Object(v)===v?v:this}return f.apply(i,d(c,arguments))},u=r(0,f.length-c.length),s=[],x=0;x<u;x++)s[x]="$"+x;if(l=Function("binder","return function ("+n(s,",")+"){ return binder.apply(this,arguments); }")(g),f.prototype){var E=function(){};E.prototype=f.prototype,l.prototype=new E,E.prototype=null}return l},Ur}function ms(){if(Ki)return qr;Ki=!0;var o=df();return qr=Function.prototype.bind||o,qr}function gf(){if(Qi)return Wr;Qi=!0;var o=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=ms();return Wr=r.call(o,e),Wr}function cr(){if(Gi)return Hr;Gi=!0;var o,e=af(),r=lf(),h=uf(),d=cf(),t=H0(),n=Ar(),i=ff(),f=Function,c=function(K){try{return f('"use strict"; return ('+K+").constructor;")()}catch{}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch{l=null}var g=function(){throw new n},u=l?(function(){try{return arguments.callee,g}catch{try{return l(arguments,"callee").get}catch{return g}}})():g,s=hf()(),x=pf()(),E=Object.getPrototypeOf||(x?function(K){return K.__proto__}:null),v={},y=typeof Uint8Array>"u"||!E?o:E(Uint8Array),a={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?o:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?o:ArrayBuffer,"%ArrayIteratorPrototype%":s&&E?E([][Symbol.iterator]()):o,"%AsyncFromSyncIteratorPrototype%":o,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":typeof Atomics>"u"?o:Atomics,"%BigInt%":typeof BigInt>"u"?o:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?o:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?o:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?o:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":e,"%eval%":eval,"%EvalError%":r,"%Float32Array%":typeof Float32Array>"u"?o:Float32Array,"%Float64Array%":typeof Float64Array>"u"?o:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?o:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":v,"%Int8Array%":typeof Int8Array>"u"?o:Int8Array,"%Int16Array%":typeof Int16Array>"u"?o:Int16Array,"%Int32Array%":typeof Int32Array>"u"?o:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":s&&E?E(E([][Symbol.iterator]())):o,"%JSON%":typeof JSON=="object"?JSON:o,"%Map%":typeof Map>"u"?o:Map,"%MapIteratorPrototype%":typeof Map>"u"||!s||!E?o:E(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?o:Promise,"%Proxy%":typeof Proxy>"u"?o:Proxy,"%RangeError%":h,"%ReferenceError%":d,"%Reflect%":typeof Reflect>"u"?o:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?o:Set,"%SetIteratorPrototype%":typeof Set>"u"||!s||!E?o:E(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?o:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":s&&E?E(""[Symbol.iterator]()):o,"%Symbol%":s?Symbol:o,"%SyntaxError%":t,"%ThrowTypeError%":u,"%TypedArray%":y,"%TypeError%":n,"%Uint8Array%":typeof Uint8Array>"u"?o:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?o:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?o:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?o:Uint32Array,"%URIError%":i,"%WeakMap%":typeof WeakMap>"u"?o:WeakMap,"%WeakRef%":typeof WeakRef>"u"?o:WeakRef,"%WeakSet%":typeof WeakSet>"u"?o:WeakSet};if(E)try{null.error}catch(K){var m=E(E(K));a["%Error.prototype%"]=m}var _=function K(Q){var L;if(Q==="%AsyncFunction%")L=c("async function () {}");else if(Q==="%GeneratorFunction%")L=c("function* () {}");else if(Q==="%AsyncGeneratorFunction%")L=c("async function* () {}");else if(Q==="%AsyncGenerator%"){var P=K("%AsyncGeneratorFunction%");P&&(L=P.prototype)}else if(Q==="%AsyncIteratorPrototype%"){var W=K("%AsyncGenerator%");W&&E&&(L=E(W.prototype))}return a[Q]=L,L},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},B=ms(),k=gf(),R=B.call(Function.call,Array.prototype.concat),M=B.call(Function.apply,Array.prototype.splice),O=B.call(Function.call,String.prototype.replace),C=B.call(Function.call,String.prototype.slice),A=B.call(Function.call,RegExp.prototype.exec),I=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,N=function(K){var Q=C(K,0,1),L=C(K,-1);if(Q==="%"&&L!=="%")throw new t("invalid intrinsic syntax, expected closing `%`");if(L==="%"&&Q!=="%")throw new t("invalid intrinsic syntax, expected opening `%`");var P=[];return O(K,I,function(W,D,ee,le){P[P.length]=ee?O(le,T,"$1"):D||W}),P},Y=function(K,Q){var L=K,P;if(k(w,L)&&(P=w[L],L="%"+P[0]+"%"),k(a,L)){var W=a[L];if(W===v&&(W=_(L)),typeof W>"u"&&!Q)throw new n("intrinsic "+K+" exists, but is not available. Please file an issue!");return{alias:P,name:L,value:W}}throw new t("intrinsic "+K+" does not exist!")};return Hr=function(K,Q){if(typeof K!="string"||K.length===0)throw new n("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Q!="boolean")throw new n('"allowMissing" argument must be a boolean');if(A(/^%?[^%]*%?$/,K)===null)throw new t("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var L=N(K),P=L.length>0?L[0]:"",W=Y("%"+P+"%",Q),D=W.name,ee=W.value,le=!1,$=W.alias;$&&(P=$[0],M(L,R([0,1],$)));for(var ce=1,ie=!0;ce<L.length;ce+=1){var H=L[ce],ae=C(H,0,1),Z=C(H,-1);if((ae==='"'||ae==="'"||ae==="`"||Z==='"'||Z==="'"||Z==="`")&&ae!==Z)throw new t("property names with quotes must have matching quotes");if((H==="constructor"||!ie)&&(le=!0),P+="."+H,D="%"+P+"%",k(a,D))ee=a[D];else if(ee!=null){if(!(H in ee)){if(!Q)throw new n("base intrinsic for "+K+" exists, but the property is not available.");return}if(l&&ce+1>=L.length){var ne=l(ee,H);ie=!!ne,ie&&"get"in ne&&!("originalValue"in ne.get)?ee=ne.get:ee=ee[H]}else ie=k(ee,H),ee=ee[H];ie&&!le&&(a[D]=ee)}}return ee},Hr}function vs(){if(Yi)return zr;Yi=!0;var o=cr(),e=o("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return zr=e,zr}function z0(){if(Xi)return $r;Xi=!0;var o=cr(),e=o("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch{e=null}return $r=e,$r}function xf(){if(Ji)return Vr;Ji=!0;var o=vs(),e=H0(),r=Ar(),h=z0();return Vr=function(d,t,n){if(!d||typeof d!="object"&&typeof d!="function")throw new r("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new r("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new r("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new r("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new r("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new r("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,f=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,g=!!h&&h(d,t);if(o)o(d,t,{configurable:c===null&&g?g.configurable:!c,enumerable:i===null&&g?g.enumerable:!i,value:n,writable:f===null&&g?g.writable:!f});else if(l||!i&&!f&&!c)d[t]=n;else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Vr}function yf(){if(Zi)return Kr;Zi=!0;var o=vs(),e=function(){return!!o};return e.hasArrayLengthDefineBug=function(){if(!o)return null;try{return o([],"length",{value:1}).length!==1}catch{return!0}},Kr=e,Kr}function bf(){if(es)return Qr;es=!0;var o=cr(),e=xf(),r=yf()(),h=z0(),d=Ar(),t=o("%Math.floor%");return Qr=function(n,i){if(typeof n!="function")throw new d("`fn` is not a function");if(typeof i!="number"||i<0||i>4294967295||t(i)!==i)throw new d("`length` must be a positive 32-bit integer");var f=arguments.length>2&&!!arguments[2],c=!0,l=!0;if("length"in n&&h){var g=h(n,"length");g&&!g.configurable&&(c=!1),g&&!g.writable&&(l=!1)}return(c||l||!f)&&(r?e(n,"length",i,!0,!0):e(n,"length",i)),n},Qr}function mf(){if(ts)return ar;ts=!0;var o=ms(),e=cr(),r=bf(),h=Ar(),d=e("%Function.prototype.apply%"),t=e("%Function.prototype.call%"),n=e("%Reflect.apply%",!0)||o.call(t,d),i=vs(),f=e("%Math.max%");ar=function(l){if(typeof l!="function")throw new h("a function is required");var g=n(o,t,arguments);return r(g,1+f(0,l.length-(arguments.length-1)),!0)};var c=function(){return n(o,d,arguments)};return i?i(ar,"apply",{value:c}):ar.apply=c,ar}function vf(){if(rs)return Gr;rs=!0;var o=cr(),e=mf(),r=e(o("String.prototype.indexOf"));return Gr=function(h,d){var t=o(h,!!d);return typeof t=="function"&&r(h,".prototype.")>-1?e(t):t},Gr}var ki,Ii,Di,Fi,Pi,Ti,Oi,Ri,ji,Ni,Mi,Li,Ui,qi,Wi,Hi,Mr,zi,Lr,$i,Ur,Vi,qr,Ki,Wr,Qi,Hr,Gi,zr,Yi,$r,Xi,Vr,Ji,Kr,Zi,Qr,es,ar,ts,Gr,rs,_f=ft(()=>{be(),ve(),me(),ki={},Ii=!1,Di={},Fi=!1,Pi={},Ti=!1,Oi={},Ri=!1,ji={},Ni=!1,Mi={},Li=!1,Ui={},qi=!1,Wi={},Hi=!1,Mr={},zi=!1,Lr={},$i=!1,Ur={},Vi=!1,qr={},Ki=!1,Wr={},Qi=!1,Hr={},Gi=!1,zr={},Yi=!1,$r={},Xi=!1,Vr={},Ji=!1,Kr={},Zi=!1,Qr={},es=!1,ar={},ts=!1,Gr={},rs=!1});function _s(o){throw new Error("Node.js process "+o+" is not supported by JSPM core outside of Node.js")}function wf(){!Zt||!Xt||(Zt=!1,Xt.length?_t=Xt.concat(_t):_r=-1,_t.length&&$0())}function $0(){if(!Zt){var o=setTimeout(wf,0);Zt=!0;for(var e=_t.length;e;){for(Xt=_t,_t=[];++_r<e;)Xt&&Xt[_r].run();_r=-1,e=_t.length}Xt=null,Zt=!1,clearTimeout(o)}}function Ef(o){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];_t.push(new V0(o,e)),_t.length===1&&!Zt&&setTimeout($0,0)}function V0(o,e){this.fun=o,this.array=e}function lt(){}function Af(o){_s("_linkedBinding")}function Sf(o){_s("dlopen")}function Cf(){return[]}function Bf(){return[]}function kf(o,e){if(!o)throw new Error(e||"assertion error")}function If(){return!1}function Df(){return It.now()/1e3}function co(o){var e=Math.floor((Date.now()-It.now())*.001),r=It.now()*.001,h=Math.floor(r)+e,d=Math.floor(r%1*1e9);return o&&(h=h-o[0],d=d-o[1],d<0&&(h--,d+=Yr)),[h,d]}function Ot(){return ws}function Ff(o){return[]}var _t,Zt,Xt,_r,zs,$s,Vs,Ks,Qs,Gs,Ys,Xs,Js,Zs,ea,ta,ra,na,oa,ia,sa,aa,la,ua,ca,Fr,fa,ha,pa,da,ga,xa,ya,ba,ma,va,_a,wa,Ea,Aa,Sa,Ca,Ba,ka,Ia,Da,Fa,Pa,Ta,Oa,Ra,It,fo,Yr,ja,Na,Ma,La,Ua,qa,Wa,Ha,za,$a,Va,ws,K0=ft(()=>{be(),ve(),me(),_t=[],Zt=!1,_r=-1,V0.prototype.run=function(){this.fun.apply(null,this.array)},zs="browser",$s="x64",Vs="browser",Ks={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},Qs=["/usr/bin/node"],Gs=[],Ys="v16.8.0",Xs={},Js=function(o,e){console.warn((e?e+": ":"")+o)},Zs=function(o){_s("binding")},ea=function(o){return 0},ta=function(){return"/"},ra=function(o){},na={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},oa=lt,ia=[],sa={},aa=!1,la={},ua=lt,ca=lt,Fr=function(){return{}},fa=Fr,ha=Fr,pa=lt,da=lt,ga=lt,xa={},ya={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},ba=lt,ma=lt,va=lt,_a=lt,wa=lt,Ea=lt,Aa=lt,Sa=void 0,Ca=void 0,Ba=void 0,ka=lt,Ia=2,Da=1,Fa="/bin/usr/node",Pa=9229,Ta="node",Oa=[],Ra=lt,It={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},It.now===void 0&&(fo=Date.now(),It.timing&&It.timing.navigationStart&&(fo=It.timing.navigationStart),It.now=()=>Date.now()-fo),Yr=1e9,co.bigint=function(o){var e=co(o);return typeof BigInt>"u"?e[0]*Yr+e[1]:BigInt(e[0]*Yr)+BigInt(e[1])},ja=10,Na={},Ma=0,La=Ot,Ua=Ot,qa=Ot,Wa=Ot,Ha=Ot,za=lt,$a=Ot,Va=Ot,ws={version:Ys,versions:Xs,arch:$s,platform:Vs,release:na,_rawDebug:oa,moduleLoadList:ia,binding:Zs,_linkedBinding:Af,_events:Na,_eventsCount:Ma,_maxListeners:ja,on:Ot,addListener:La,once:Ua,off:qa,removeListener:Wa,removeAllListeners:Ha,emit:za,prependListener:$a,prependOnceListener:Va,listeners:Ff,domain:sa,_exiting:aa,config:la,dlopen:Sf,uptime:Df,_getActiveRequests:Cf,_getActiveHandles:Bf,reallyExit:ua,_kill:ca,cpuUsage:Fr,resourceUsage:fa,memoryUsage:ha,kill:pa,exit:da,openStdin:ga,allowedNodeEnvironmentFlags:xa,assert:kf,features:ya,_fatalExceptions:ba,setUncaughtExceptionCaptureCallback:ma,hasUncaughtExceptionCaptureCallback:If,emitWarning:Js,nextTick:Ef,_tickCallback:va,_debugProcess:_a,_debugEnd:wa,_startProfilerIdleNotifier:Ea,_stopProfilerIdleNotifier:Aa,stdout:Sa,stdin:Ba,stderr:Ca,abort:ka,umask:ea,chdir:ra,cwd:ta,env:Ks,title:zs,argv:Qs,execArgv:Gs,pid:Ia,ppid:Da,execPath:Fa,debugPort:Pa,hrtime:co,argv0:Ta,_preload_modules:Oa,setSourceMapsEnabled:Ra}});function Pf(){if(ns)return Xr;ns=!0;var o=ws;function e(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function r(t,n){for(var i="",f=0,c=-1,l=0,g,u=0;u<=t.length;++u){if(u<t.length)g=t.charCodeAt(u);else{if(g===47)break;g=47}if(g===47){if(!(c===u-1||l===1))if(c!==u-1&&l===2){if(i.length<2||f!==2||i.charCodeAt(i.length-1)!==46||i.charCodeAt(i.length-2)!==46){if(i.length>2){var s=i.lastIndexOf("/");if(s!==i.length-1){s===-1?(i="",f=0):(i=i.slice(0,s),f=i.length-1-i.lastIndexOf("/")),c=u,l=0;continue}}else if(i.length===2||i.length===1){i="",f=0,c=u,l=0;continue}}n&&(i.length>0?i+="/..":i="..",f=2)}else i.length>0?i+="/"+t.slice(c+1,u):i=t.slice(c+1,u),f=u-c-1;c=u,l=0}else g===46&&l!==-1?++l:l=-1}return i}function h(t,n){var i=n.dir||n.root,f=n.base||(n.name||"")+(n.ext||"");return i?i===n.root?i+f:i+t+f:f}var d={resolve:function(){for(var t="",n=!1,i,f=arguments.length-1;f>=-1&&!n;f--){var c;f>=0?c=arguments[f]:(i===void 0&&(i=o.cwd()),c=i),e(c),c.length!==0&&(t=c+"/"+t,n=c.charCodeAt(0)===47)}return t=r(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(t){if(e(t),t.length===0)return".";var n=t.charCodeAt(0)===47,i=t.charCodeAt(t.length-1)===47;return t=r(t,!n),t.length===0&&!n&&(t="."),t.length>0&&i&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var t,n=0;n<arguments.length;++n){var i=arguments[n];e(i),i.length>0&&(t===void 0?t=i:t+="/"+i)}return t===void 0?".":d.normalize(t)},relative:function(t,n){if(e(t),e(n),t===n||(t=d.resolve(t),n=d.resolve(n),t===n))return"";for(var i=1;i<t.length&&t.charCodeAt(i)===47;++i);for(var f=t.length,c=f-i,l=1;l<n.length&&n.charCodeAt(l)===47;++l);for(var g=n.length,u=g-l,s=c<u?c:u,x=-1,E=0;E<=s;++E){if(E===s){if(u>s){if(n.charCodeAt(l+E)===47)return n.slice(l+E+1);if(E===0)return n.slice(l+E)}else c>s&&(t.charCodeAt(i+E)===47?x=E:E===0&&(x=0));break}var v=t.charCodeAt(i+E),y=n.charCodeAt(l+E);if(v!==y)break;v===47&&(x=E)}var a="";for(E=i+x+1;E<=f;++E)(E===f||t.charCodeAt(E)===47)&&(a.length===0?a+="..":a+="/..");return a.length>0?a+n.slice(l+x):(l+=x,n.charCodeAt(l)===47&&++l,n.slice(l))},_makeLong:function(t){return t},dirname:function(t){if(e(t),t.length===0)return".";for(var n=t.charCodeAt(0),i=n===47,f=-1,c=!0,l=t.length-1;l>=1;--l)if(n=t.charCodeAt(l),n===47){if(!c){f=l;break}}else c=!1;return f===-1?i?"/":".":i&&f===1?"//":t.slice(0,f)},basename:function(t,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');e(t);var i=0,f=-1,c=!0,l;if(n!==void 0&&n.length>0&&n.length<=t.length){if(n.length===t.length&&n===t)return"";var g=n.length-1,u=-1;for(l=t.length-1;l>=0;--l){var s=t.charCodeAt(l);if(s===47){if(!c){i=l+1;break}}else u===-1&&(c=!1,u=l+1),g>=0&&(s===n.charCodeAt(g)?--g===-1&&(f=l):(g=-1,f=u))}return i===f?f=u:f===-1&&(f=t.length),t.slice(i,f)}else{for(l=t.length-1;l>=0;--l)if(t.charCodeAt(l)===47){if(!c){i=l+1;break}}else f===-1&&(c=!1,f=l+1);return f===-1?"":t.slice(i,f)}},extname:function(t){e(t);for(var n=-1,i=0,f=-1,c=!0,l=0,g=t.length-1;g>=0;--g){var u=t.charCodeAt(g);if(u===47){if(!c){i=g+1;break}continue}f===-1&&(c=!1,f=g+1),u===46?n===-1?n=g:l!==1&&(l=1):n!==-1&&(l=-1)}return n===-1||f===-1||l===0||l===1&&n===f-1&&n===i+1?"":t.slice(n,f)},format:function(t){if(t===null||typeof t!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return h("/",t)},parse:function(t){e(t);var n={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return n;var i=t.charCodeAt(0),f=i===47,c;f?(n.root="/",c=1):c=0;for(var l=-1,g=0,u=-1,s=!0,x=t.length-1,E=0;x>=c;--x){if(i=t.charCodeAt(x),i===47){if(!s){g=x+1;break}continue}u===-1&&(s=!1,u=x+1),i===46?l===-1?l=x:E!==1&&(E=1):l!==-1&&(E=-1)}return l===-1||u===-1||E===0||E===1&&l===u-1&&l===g+1?u!==-1&&(g===0&&f?n.base=n.name=t.slice(1,u):n.base=n.name=t.slice(g,u)):(g===0&&f?(n.name=t.slice(1,l),n.base=t.slice(1,u)):(n.name=t.slice(g,l),n.base=t.slice(g,u)),n.ext=t.slice(l,u)),g>0?n.dir=t.slice(0,g-1):f&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};return d.posix=d,Xr=d,Xr}var Xr,ns,os,Tf=ft(()=>{be(),ve(),me(),K0(),Xr={},ns=!1,os=Pf()}),Q0={};lr(Q0,{URL:()=>ol,Url:()=>Z0,default:()=>ut,fileURLToPath:()=>Y0,format:()=>el,parse:()=>nl,pathToFileURL:()=>X0,resolve:()=>tl,resolveObject:()=>rl});function Of(){if(is)return Jr;is=!0;var o=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=o&&e&&typeof e.get=="function"?e.get:null,h=o&&Map.prototype.forEach,d=typeof Set=="function"&&Set.prototype,t=Object.getOwnPropertyDescriptor&&d?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,n=d&&t&&typeof t.get=="function"?t.get:null,i=d&&Set.prototype.forEach,f=typeof WeakMap=="function"&&WeakMap.prototype,c=f?WeakMap.prototype.has:null,l=typeof WeakSet=="function"&&WeakSet.prototype,g=l?WeakSet.prototype.has:null,u=typeof WeakRef=="function"&&WeakRef.prototype,s=u?WeakRef.prototype.deref:null,x=Boolean.prototype.valueOf,E=Object.prototype.toString,v=Function.prototype.toString,y=String.prototype.match,a=String.prototype.slice,m=String.prototype.replace,_=String.prototype.toUpperCase,w=String.prototype.toLowerCase,B=RegExp.prototype.test,k=Array.prototype.concat,R=Array.prototype.join,M=Array.prototype.slice,O=Math.floor,C=typeof BigInt=="function"?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,I=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,T=typeof Symbol=="function"&&typeof Symbol.iterator=="object",N=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===T||!0)?Symbol.toStringTag:null,Y=Object.prototype.propertyIsEnumerable,K=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(G){return G.__proto__}:null);function Q(G,oe){if(G===1/0||G===-1/0||G!==G||G&&G>-1e3&&G<1e3||B.call(/e/,oe))return oe;var Be=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof G=="number"){var De=G<0?-O(-G):O(G);if(De!==G){var Fe=String(De),Oe=a.call(oe,Fe.length+1);return m.call(Fe,Be,"$&_")+"."+m.call(m.call(Oe,/([0-9]{3})/g,"$&_"),/_$/,"")}}return m.call(oe,Be,"$&_")}var L=J0,P=L.custom,W=ne(P)?P:null;Jr=function G(oe,Be,De,Fe){var Oe=Be||{};if(fe(Oe,"quoteStyle")&&Oe.quoteStyle!=="single"&&Oe.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(fe(Oe,"maxStringLength")&&(typeof Oe.maxStringLength=="number"?Oe.maxStringLength<0&&Oe.maxStringLength!==1/0:Oe.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Ge=fe(Oe,"customInspect")?Oe.customInspect:!0;if(typeof Ge!="boolean"&&Ge!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(fe(Oe,"indent")&&Oe.indent!==null&&Oe.indent!==" "&&!(parseInt(Oe.indent,10)===Oe.indent&&Oe.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(fe(Oe,"numericSeparator")&&typeof Oe.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Xe=Oe.numericSeparator;if(typeof oe>"u")return"undefined";if(oe===null)return"null";if(typeof oe=="boolean")return oe?"true":"false";if(typeof oe=="string")return ye(oe,Oe);if(typeof oe=="number"){if(oe===0)return 1/0/oe>0?"0":"-0";var je=String(oe);return Xe?Q(oe,je):je}if(typeof oe=="bigint"){var qe=String(oe)+"n";return Xe?Q(oe,qe):qe}var Le=typeof Oe.depth>"u"?5:Oe.depth;if(typeof De>"u"&&(De=0),De>=Le&&Le>0&&typeof oe=="object")return le(oe)?"[Array]":"[Object]";var Qe=U(Oe,De);if(typeof Fe>"u")Fe=[];else if(ue(Fe,oe)>=0)return"[Circular]";function Ke(bt,Tt,Gt){if(Tt&&(Fe=M.call(Fe),Fe.push(Tt)),Gt){var mt={depth:Oe.depth};return fe(Oe,"quoteStyle")&&(mt.quoteStyle=Oe.quoteStyle),G(bt,mt,De+1,Fe)}return G(bt,Oe,De+1,Fe)}if(typeof oe=="function"&&!ce(oe)){var Je=J(oe),tt=se(oe,Ke);return"[Function"+(Je?": "+Je:" (anonymous)")+"]"+(tt.length>0?" { "+R.call(tt,", ")+" }":"")}if(ne(oe)){var gt=T?m.call(String(oe),/^(Symbol\(.*\))_[^)]*$/,"$1"):I.call(oe);return typeof oe=="object"&&!T?p(gt):gt}if(Ce(oe)){for(var j="<"+w.call(String(oe.nodeName)),q=oe.attributes||[],_e=0;_e<q.length;_e++)j+=" "+q[_e].name+"="+D(ee(q[_e].value),"double",Oe);return j+=">",oe.childNodes&&oe.childNodes.length&&(j+="..."),j+="</"+w.call(String(oe.nodeName))+">",j}if(le(oe)){if(oe.length===0)return"[]";var ke=se(oe,Ke);return Qe&&!F(ke)?"["+X(ke,Qe)+"]":"[ "+R.call(ke,", ")+" ]"}if(ie(oe)){var Pe=se(oe,Ke);return!("cause"in Error.prototype)&&"cause"in oe&&!Y.call(oe,"cause")?"{ ["+String(oe)+"] "+R.call(k.call("[cause]: "+Ke(oe.cause),Pe),", ")+" }":Pe.length===0?"["+String(oe)+"]":"{ ["+String(oe)+"] "+R.call(Pe,", ")+" }"}if(typeof oe=="object"&&Ge){if(W&&typeof oe[W]=="function"&&L)return L(oe,{depth:Le-De});if(Ge!=="symbol"&&typeof oe.inspect=="function")return oe.inspect()}if(de(oe)){var nt=[];return h&&h.call(oe,function(bt,Tt){nt.push(Ke(Tt,oe,!0)+" => "+Ke(bt,oe))}),S("Map",r.call(oe),nt,Qe)}if(te(oe)){var ct=[];return i&&i.call(oe,function(bt){ct.push(Ke(bt,oe))}),S("Set",n.call(oe),ct,Qe)}if(he(oe))return b("WeakMap");if(xe(oe))return b("WeakSet");if(ge(oe))return b("WeakRef");if(ae(oe))return p(Ke(Number(oe)));if(re(oe))return p(Ke(C.call(oe)));if(Z(oe))return p(x.call(oe));if(H(oe))return p(Ke(String(oe)));if(typeof window<"u"&&oe===window)return"{ [object Window] }";if(typeof globalThis<"u"&&oe===globalThis||typeof Zr<"u"&&oe===Zr)return"{ [object globalThis] }";if(!$(oe)&&!ce(oe)){var xt=se(oe,Ke),pr=K?K(oe)===Object.prototype:oe instanceof Object||oe.constructor===Object,dr=oe instanceof Object?"":"null prototype",gr=!pr&&N&&Object(oe)===oe&&N in oe?a.call(z(oe),8,-1):dr?"Object":"",kr=pr||typeof oe.constructor!="function"?"":oe.constructor.name?oe.constructor.name+" ":"",Qt=kr+(gr||dr?"["+R.call(k.call([],gr||[],dr||[]),": ")+"] ":"");return xt.length===0?Qt+"{}":Qe?Qt+"{"+X(xt,Qe)+"}":Qt+"{ "+R.call(xt,", ")+" }"}return String(oe)};function D(G,oe,Be){var De=(Be.quoteStyle||oe)==="double"?'"':"'";return De+G+De}function ee(G){return m.call(String(G),/"/g,""")}function le(G){return z(G)==="[object Array]"&&(!N||!(typeof G=="object"&&N in G))}function $(G){return z(G)==="[object Date]"&&(!N||!(typeof G=="object"&&N in G))}function ce(G){return z(G)==="[object RegExp]"&&(!N||!(typeof G=="object"&&N in G))}function ie(G){return z(G)==="[object Error]"&&(!N||!(typeof G=="object"&&N in G))}function H(G){return z(G)==="[object String]"&&(!N||!(typeof G=="object"&&N in G))}function ae(G){return z(G)==="[object Number]"&&(!N||!(typeof G=="object"&&N in G))}function Z(G){return z(G)==="[object Boolean]"&&(!N||!(typeof G=="object"&&N in G))}function ne(G){if(T)return G&&typeof G=="object"&&G instanceof Symbol;if(typeof G=="symbol")return!0;if(!G||typeof G!="object"||!I)return!1;try{return I.call(G),!0}catch{}return!1}function re(G){if(!G||typeof G!="object"||!C)return!1;try{return C.call(G),!0}catch{}return!1}var pe=Object.prototype.hasOwnProperty||function(G){return G in(this||Zr)};function fe(G,oe){return pe.call(G,oe)}function z(G){return E.call(G)}function J(G){if(G.name)return G.name;var oe=y.call(v.call(G),/^function\s*([\w$]+)/);return oe?oe[1]:null}function ue(G,oe){if(G.indexOf)return G.indexOf(oe);for(var Be=0,De=G.length;Be<De;Be++)if(G[Be]===oe)return Be;return-1}function de(G){if(!r||!G||typeof G!="object")return!1;try{r.call(G);try{n.call(G)}catch{return!0}return G instanceof Map}catch{}return!1}function he(G){if(!c||!G||typeof G!="object")return!1;try{c.call(G,c);try{g.call(G,g)}catch{return!0}return G instanceof WeakMap}catch{}return!1}function ge(G){if(!s||!G||typeof G!="object")return!1;try{return s.call(G),!0}catch{}return!1}function te(G){if(!n||!G||typeof G!="object")return!1;try{n.call(G);try{r.call(G)}catch{return!0}return G instanceof Set}catch{}return!1}function xe(G){if(!g||!G||typeof G!="object")return!1;try{g.call(G,g);try{c.call(G,c)}catch{return!0}return G instanceof WeakSet}catch{}return!1}function Ce(G){return!G||typeof G!="object"?!1:typeof HTMLElement<"u"&&G instanceof HTMLElement?!0:typeof G.nodeName=="string"&&typeof G.getAttribute=="function"}function ye(G,oe){if(G.length>oe.maxStringLength){var Be=G.length-oe.maxStringLength,De="... "+Be+" more character"+(Be>1?"s":"");return ye(a.call(G,0,oe.maxStringLength),oe)+De}var Fe=m.call(m.call(G,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Ie);return D(Fe,"single",oe)}function Ie(G){var oe=G.charCodeAt(0),Be={8:"b",9:"t",10:"n",12:"f",13:"r"}[oe];return Be?"\\"+Be:"\\x"+(oe<16?"0":"")+_.call(oe.toString(16))}function p(G){return"Object("+G+")"}function b(G){return G+" { ? }"}function S(G,oe,Be,De){var Fe=De?X(Be,De):R.call(Be,", ");return G+" ("+oe+") {"+Fe+"}"}function F(G){for(var oe=0;oe<G.length;oe++)if(ue(G[oe],`
|
|
4
|
+
`)>=0)return!1;return!0}function U(G,oe){var Be;if(G.indent===" ")Be=" ";else if(typeof G.indent=="number"&&G.indent>0)Be=R.call(Array(G.indent+1)," ");else return null;return{base:Be,prev:R.call(Array(oe+1),Be)}}function X(G,oe){if(G.length===0)return"";var Be=`
|
|
5
|
+
`+oe.prev+oe.base;return Be+R.call(G,","+Be)+`
|
|
6
|
+
`+oe.prev}function se(G,oe){var Be=le(G),De=[];if(Be){De.length=G.length;for(var Fe=0;Fe<G.length;Fe++)De[Fe]=fe(G,Fe)?oe(G[Fe],G):""}var Oe=typeof A=="function"?A(G):[],Ge;if(T){Ge={};for(var Xe=0;Xe<Oe.length;Xe++)Ge["$"+Oe[Xe]]=Oe[Xe]}for(var je in G)fe(G,je)&&(Be&&String(Number(je))===je&&je<G.length||T&&Ge["$"+je]instanceof Symbol||(B.call(/[^\w$]/,je)?De.push(oe(je,G)+": "+oe(G[je],G)):De.push(je+": "+oe(G[je],G))));if(typeof A=="function")for(var qe=0;qe<Oe.length;qe++)Y.call(G,Oe[qe])&&De.push("["+oe(Oe[qe])+"]: "+oe(G[Oe[qe]],G));return De}return Jr}function Rf(){if(ss)return en;ss=!0;var o=cr(),e=vf(),r=Of(),h=Ar(),d=o("%WeakMap%",!0),t=o("%Map%",!0),n=e("WeakMap.prototype.get",!0),i=e("WeakMap.prototype.set",!0),f=e("WeakMap.prototype.has",!0),c=e("Map.prototype.get",!0),l=e("Map.prototype.set",!0),g=e("Map.prototype.has",!0),u=function(v,y){for(var a=v,m;(m=a.next)!==null;a=m)if(m.key===y)return a.next=m.next,m.next=v.next,v.next=m,m},s=function(v,y){var a=u(v,y);return a&&a.value},x=function(v,y,a){var m=u(v,y);m?m.value=a:v.next={key:y,next:v.next,value:a}},E=function(v,y){return!!u(v,y)};return en=function(){var v,y,a,m={assert:function(_){if(!m.has(_))throw new h("Side channel does not contain "+r(_))},get:function(_){if(d&&_&&(typeof _=="object"||typeof _=="function")){if(v)return n(v,_)}else if(t){if(y)return c(y,_)}else if(a)return s(a,_)},has:function(_){if(d&&_&&(typeof _=="object"||typeof _=="function")){if(v)return f(v,_)}else if(t){if(y)return g(y,_)}else if(a)return E(a,_);return!1},set:function(_,w){d&&_&&(typeof _=="object"||typeof _=="function")?(v||(v=new d),i(v,_,w)):t?(y||(y=new t),l(y,_,w)):(a||(a={key:{},next:null}),x(a,_,w))}};return m},en}function Es(){if(as)return tn;as=!0;var o=String.prototype.replace,e=/%20/g,r={RFC1738:"RFC1738",RFC3986:"RFC3986"};return tn={default:r.RFC3986,formatters:{RFC1738:function(h){return o.call(h,e,"+")},RFC3986:function(h){return String(h)}},RFC1738:r.RFC1738,RFC3986:r.RFC3986},tn}function G0(){if(ls)return rn;ls=!0;var o=Es(),e=Object.prototype.hasOwnProperty,r=Array.isArray,h=(function(){for(var v=[],y=0;y<256;++y)v.push("%"+((y<16?"0":"")+y.toString(16)).toUpperCase());return v})(),d=function(v){for(;v.length>1;){var y=v.pop(),a=y.obj[y.prop];if(r(a)){for(var m=[],_=0;_<a.length;++_)typeof a[_]<"u"&&m.push(a[_]);y.obj[y.prop]=m}}},t=function(v,y){for(var a=y&&y.plainObjects?Object.create(null):{},m=0;m<v.length;++m)typeof v[m]<"u"&&(a[m]=v[m]);return a},n=function v(y,a,m){if(!a)return y;if(typeof a!="object"){if(r(y))y.push(a);else if(y&&typeof y=="object")(m&&(m.plainObjects||m.allowPrototypes)||!e.call(Object.prototype,a))&&(y[a]=!0);else return[y,a];return y}if(!y||typeof y!="object")return[y].concat(a);var _=y;return r(y)&&!r(a)&&(_=t(y,m)),r(y)&&r(a)?(a.forEach(function(w,B){if(e.call(y,B)){var k=y[B];k&&typeof k=="object"&&w&&typeof w=="object"?y[B]=v(k,w,m):y.push(w)}else y[B]=w}),y):Object.keys(a).reduce(function(w,B){var k=a[B];return e.call(w,B)?w[B]=v(w[B],k,m):w[B]=k,w},_)},i=function(v,y){return Object.keys(y).reduce(function(a,m){return a[m]=y[m],a},v)},f=function(v,y,a){var m=v.replace(/\+/g," ");if(a==="iso-8859-1")return m.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(m)}catch{return m}},c=1024,l=function(v,y,a,m,_){if(v.length===0)return v;var w=v;if(typeof v=="symbol"?w=Symbol.prototype.toString.call(v):typeof v!="string"&&(w=String(v)),a==="iso-8859-1")return escape(w).replace(/%u[0-9a-f]{4}/gi,function(A){return"%26%23"+parseInt(A.slice(2),16)+"%3B"});for(var B="",k=0;k<w.length;k+=c){for(var R=w.length>=c?w.slice(k,k+c):w,M=[],O=0;O<R.length;++O){var C=R.charCodeAt(O);if(C===45||C===46||C===95||C===126||C>=48&&C<=57||C>=65&&C<=90||C>=97&&C<=122||_===o.RFC1738&&(C===40||C===41)){M[M.length]=R.charAt(O);continue}if(C<128){M[M.length]=h[C];continue}if(C<2048){M[M.length]=h[192|C>>6]+h[128|C&63];continue}if(C<55296||C>=57344){M[M.length]=h[224|C>>12]+h[128|C>>6&63]+h[128|C&63];continue}O+=1,C=65536+((C&1023)<<10|R.charCodeAt(O)&1023),M[M.length]=h[240|C>>18]+h[128|C>>12&63]+h[128|C>>6&63]+h[128|C&63]}B+=M.join("")}return B},g=function(v){for(var y=[{obj:{o:v},prop:"o"}],a=[],m=0;m<y.length;++m)for(var _=y[m],w=_.obj[_.prop],B=Object.keys(w),k=0;k<B.length;++k){var R=B[k],M=w[R];typeof M=="object"&&M!==null&&a.indexOf(M)===-1&&(y.push({obj:w,prop:R}),a.push(M))}return d(y),v},u=function(v){return Object.prototype.toString.call(v)==="[object RegExp]"},s=function(v){return!v||typeof v!="object"?!1:!!(v.constructor&&v.constructor.isBuffer&&v.constructor.isBuffer(v))},x=function(v,y){return[].concat(v,y)},E=function(v,y){if(r(v)){for(var a=[],m=0;m<v.length;m+=1)a.push(y(v[m]));return a}return y(v)};return rn={arrayToObject:t,assign:i,combine:x,compact:g,decode:f,encode:l,isBuffer:s,isRegExp:u,maybeMap:E,merge:n},rn}function jf(){if(us)return nn;us=!0;var o=Rf(),e=G0(),r=Es(),h=Object.prototype.hasOwnProperty,d={brackets:function(E){return E+"[]"},comma:"comma",indices:function(E,v){return E+"["+v+"]"},repeat:function(E){return E}},t=Array.isArray,n=Array.prototype.push,i=function(E,v){n.apply(E,t(v)?v:[v])},f=Date.prototype.toISOString,c=r.default,l={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:e.encode,encodeValuesOnly:!1,format:c,formatter:r.formatters[c],indices:!1,serializeDate:function(E){return f.call(E)},skipNulls:!1,strictNullHandling:!1},g=function(E){return typeof E=="string"||typeof E=="number"||typeof E=="boolean"||typeof E=="symbol"||typeof E=="bigint"},u={},s=function E(v,y,a,m,_,w,B,k,R,M,O,C,A,I,T,N,Y,K){for(var Q=v,L=K,P=0,W=!1;(L=L.get(u))!==void 0&&!W;){var D=L.get(v);if(P+=1,typeof D<"u"){if(D===P)throw new RangeError("Cyclic object value");W=!0}typeof L.get(u)>"u"&&(P=0)}if(typeof M=="function"?Q=M(y,Q):Q instanceof Date?Q=A(Q):a==="comma"&&t(Q)&&(Q=e.maybeMap(Q,function(z){return z instanceof Date?A(z):z})),Q===null){if(w)return R&&!N?R(y,l.encoder,Y,"key",I):y;Q=""}if(g(Q)||e.isBuffer(Q)){if(R){var ee=N?y:R(y,l.encoder,Y,"key",I);return[T(ee)+"="+T(R(Q,l.encoder,Y,"value",I))]}return[T(y)+"="+T(String(Q))]}var le=[];if(typeof Q>"u")return le;var $;if(a==="comma"&&t(Q))N&&R&&(Q=e.maybeMap(Q,R)),$=[{value:Q.length>0?Q.join(",")||null:void 0}];else if(t(M))$=M;else{var ce=Object.keys(Q);$=O?ce.sort(O):ce}var ie=k?y.replace(/\./g,"%2E"):y,H=m&&t(Q)&&Q.length===1?ie+"[]":ie;if(_&&t(Q)&&Q.length===0)return H+"[]";for(var ae=0;ae<$.length;++ae){var Z=$[ae],ne=typeof Z=="object"&&typeof Z.value<"u"?Z.value:Q[Z];if(!(B&&ne===null)){var re=C&&k?Z.replace(/\./g,"%2E"):Z,pe=t(Q)?typeof a=="function"?a(H,re):H:H+(C?"."+re:"["+re+"]");K.set(v,P);var fe=o();fe.set(u,K),i(le,E(ne,pe,a,m,_,w,B,k,a==="comma"&&N&&t(Q)?null:R,M,O,C,A,I,T,N,Y,fe))}}return le},x=function(E){if(!E)return l;if(typeof E.allowEmptyArrays<"u"&&typeof E.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof E.encodeDotInKeys<"u"&&typeof E.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(E.encoder!==null&&typeof E.encoder<"u"&&typeof E.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=E.charset||l.charset;if(typeof E.charset<"u"&&E.charset!=="utf-8"&&E.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var y=r.default;if(typeof E.format<"u"){if(!h.call(r.formatters,E.format))throw new TypeError("Unknown format option provided.");y=E.format}var a=r.formatters[y],m=l.filter;(typeof E.filter=="function"||t(E.filter))&&(m=E.filter);var _;if(E.arrayFormat in d?_=E.arrayFormat:"indices"in E?_=E.indices?"indices":"repeat":_=l.arrayFormat,"commaRoundTrip"in E&&typeof E.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var w=typeof E.allowDots>"u"?E.encodeDotInKeys===!0?!0:l.allowDots:!!E.allowDots;return{addQueryPrefix:typeof E.addQueryPrefix=="boolean"?E.addQueryPrefix:l.addQueryPrefix,allowDots:w,allowEmptyArrays:typeof E.allowEmptyArrays=="boolean"?!!E.allowEmptyArrays:l.allowEmptyArrays,arrayFormat:_,charset:v,charsetSentinel:typeof E.charsetSentinel=="boolean"?E.charsetSentinel:l.charsetSentinel,commaRoundTrip:E.commaRoundTrip,delimiter:typeof E.delimiter>"u"?l.delimiter:E.delimiter,encode:typeof E.encode=="boolean"?E.encode:l.encode,encodeDotInKeys:typeof E.encodeDotInKeys=="boolean"?E.encodeDotInKeys:l.encodeDotInKeys,encoder:typeof E.encoder=="function"?E.encoder:l.encoder,encodeValuesOnly:typeof E.encodeValuesOnly=="boolean"?E.encodeValuesOnly:l.encodeValuesOnly,filter:m,format:y,formatter:a,serializeDate:typeof E.serializeDate=="function"?E.serializeDate:l.serializeDate,skipNulls:typeof E.skipNulls=="boolean"?E.skipNulls:l.skipNulls,sort:typeof E.sort=="function"?E.sort:null,strictNullHandling:typeof E.strictNullHandling=="boolean"?E.strictNullHandling:l.strictNullHandling}};return nn=function(E,v){var y=E,a=x(v),m,_;typeof a.filter=="function"?(_=a.filter,y=_("",y)):t(a.filter)&&(_=a.filter,m=_);var w=[];if(typeof y!="object"||y===null)return"";var B=d[a.arrayFormat],k=B==="comma"&&a.commaRoundTrip;m||(m=Object.keys(y)),a.sort&&m.sort(a.sort);for(var R=o(),M=0;M<m.length;++M){var O=m[M];a.skipNulls&&y[O]===null||i(w,s(y[O],O,B,k,a.allowEmptyArrays,a.strictNullHandling,a.skipNulls,a.encodeDotInKeys,a.encode?a.encoder:null,a.filter,a.sort,a.allowDots,a.serializeDate,a.format,a.formatter,a.encodeValuesOnly,a.charset,R))}var C=w.join(a.delimiter),A=a.addQueryPrefix===!0?"?":"";return a.charsetSentinel&&(a.charset==="iso-8859-1"?A+="utf8=%26%2310003%3B&":A+="utf8=%E2%9C%93&"),C.length>0?A+C:""},nn}function Nf(){if(cs)return on;cs=!0;var o=G0(),e=Object.prototype.hasOwnProperty,r=Array.isArray,h={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:o.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},d=function(u){return u.replace(/&#(\d+);/g,function(s,x){return String.fromCharCode(parseInt(x,10))})},t=function(u,s){return u&&typeof u=="string"&&s.comma&&u.indexOf(",")>-1?u.split(","):u},n="utf8=%26%2310003%3B",i="utf8=%E2%9C%93",f=function(u,s){var x={__proto__:null},E=s.ignoreQueryPrefix?u.replace(/^\?/,""):u;E=E.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=s.parameterLimit===1/0?void 0:s.parameterLimit,y=E.split(s.delimiter,v),a=-1,m,_=s.charset;if(s.charsetSentinel)for(m=0;m<y.length;++m)y[m].indexOf("utf8=")===0&&(y[m]===i?_="utf-8":y[m]===n&&(_="iso-8859-1"),a=m,m=y.length);for(m=0;m<y.length;++m)if(m!==a){var w=y[m],B=w.indexOf("]="),k=B===-1?w.indexOf("="):B+1,R,M;k===-1?(R=s.decoder(w,h.decoder,_,"key"),M=s.strictNullHandling?null:""):(R=s.decoder(w.slice(0,k),h.decoder,_,"key"),M=o.maybeMap(t(w.slice(k+1),s),function(C){return s.decoder(C,h.decoder,_,"value")})),M&&s.interpretNumericEntities&&_==="iso-8859-1"&&(M=d(M)),w.indexOf("[]=")>-1&&(M=r(M)?[M]:M);var O=e.call(x,R);O&&s.duplicates==="combine"?x[R]=o.combine(x[R],M):(!O||s.duplicates==="last")&&(x[R]=M)}return x},c=function(u,s,x,E){for(var v=E?s:t(s,x),y=u.length-1;y>=0;--y){var a,m=u[y];if(m==="[]"&&x.parseArrays)a=x.allowEmptyArrays&&(v===""||x.strictNullHandling&&v===null)?[]:[].concat(v);else{a=x.plainObjects?Object.create(null):{};var _=m.charAt(0)==="["&&m.charAt(m.length-1)==="]"?m.slice(1,-1):m,w=x.decodeDotInKeys?_.replace(/%2E/g,"."):_,B=parseInt(w,10);!x.parseArrays&&w===""?a={0:v}:!isNaN(B)&&m!==w&&String(B)===w&&B>=0&&x.parseArrays&&B<=x.arrayLimit?(a=[],a[B]=v):w!=="__proto__"&&(a[w]=v)}v=a}return v},l=function(u,s,x,E){if(u){var v=x.allowDots?u.replace(/\.([^.[]+)/g,"[$1]"):u,y=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,m=x.depth>0&&y.exec(v),_=m?v.slice(0,m.index):v,w=[];if(_){if(!x.plainObjects&&e.call(Object.prototype,_)&&!x.allowPrototypes)return;w.push(_)}for(var B=0;x.depth>0&&(m=a.exec(v))!==null&&B<x.depth;){if(B+=1,!x.plainObjects&&e.call(Object.prototype,m[1].slice(1,-1))&&!x.allowPrototypes)return;w.push(m[1])}if(m){if(x.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+x.depth+" and strictDepth is true");w.push("["+v.slice(m.index)+"]")}return c(w,s,x,E)}},g=function(u){if(!u)return h;if(typeof u.allowEmptyArrays<"u"&&typeof u.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof u.decodeDotInKeys<"u"&&typeof u.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(u.decoder!==null&&typeof u.decoder<"u"&&typeof u.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof u.charset<"u"&&u.charset!=="utf-8"&&u.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var s=typeof u.charset>"u"?h.charset:u.charset,x=typeof u.duplicates>"u"?h.duplicates:u.duplicates;if(x!=="combine"&&x!=="first"&&x!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var E=typeof u.allowDots>"u"?u.decodeDotInKeys===!0?!0:h.allowDots:!!u.allowDots;return{allowDots:E,allowEmptyArrays:typeof u.allowEmptyArrays=="boolean"?!!u.allowEmptyArrays:h.allowEmptyArrays,allowPrototypes:typeof u.allowPrototypes=="boolean"?u.allowPrototypes:h.allowPrototypes,allowSparse:typeof u.allowSparse=="boolean"?u.allowSparse:h.allowSparse,arrayLimit:typeof u.arrayLimit=="number"?u.arrayLimit:h.arrayLimit,charset:s,charsetSentinel:typeof u.charsetSentinel=="boolean"?u.charsetSentinel:h.charsetSentinel,comma:typeof u.comma=="boolean"?u.comma:h.comma,decodeDotInKeys:typeof u.decodeDotInKeys=="boolean"?u.decodeDotInKeys:h.decodeDotInKeys,decoder:typeof u.decoder=="function"?u.decoder:h.decoder,delimiter:typeof u.delimiter=="string"||o.isRegExp(u.delimiter)?u.delimiter:h.delimiter,depth:typeof u.depth=="number"||u.depth===!1?+u.depth:h.depth,duplicates:x,ignoreQueryPrefix:u.ignoreQueryPrefix===!0,interpretNumericEntities:typeof u.interpretNumericEntities=="boolean"?u.interpretNumericEntities:h.interpretNumericEntities,parameterLimit:typeof u.parameterLimit=="number"?u.parameterLimit:h.parameterLimit,parseArrays:u.parseArrays!==!1,plainObjects:typeof u.plainObjects=="boolean"?u.plainObjects:h.plainObjects,strictDepth:typeof u.strictDepth=="boolean"?!!u.strictDepth:h.strictDepth,strictNullHandling:typeof u.strictNullHandling=="boolean"?u.strictNullHandling:h.strictNullHandling}};return on=function(u,s){var x=g(s);if(u===""||u===null||typeof u>"u")return x.plainObjects?Object.create(null):{};for(var E=typeof u=="string"?f(u,x):u,v=x.plainObjects?Object.create(null):{},y=Object.keys(E),a=0;a<y.length;++a){var m=y[a],_=l(m,E[m],x,typeof u=="string");v=o.merge(v,_,x)}return x.allowSparse===!0?v:o.compact(v)},on}function Mf(){if(fs)return sn;fs=!0;var o=jf(),e=Nf(),r=Es();return sn={formats:r,parse:e,stringify:o},sn}function Lf(){if(hs)return Ut;hs=!0;var o=Lt;function e(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var r=/^([a-z0-9.+-]+:)/i,h=/:[0-9]*$/,d=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,t=["<",">",'"',"`"," ","\r",`
|
|
7
|
+
`," "],n=["{","}","|","\\","^","`"].concat(t),i=["'"].concat(n),f=["%","/","?",";","#"].concat(i),c=["/","?","#"],l=255,g=/^[+a-z0-9A-Z_-]{0,63}$/,u=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,s={javascript:!0,"javascript:":!0},x={javascript:!0,"javascript:":!0},E={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=Mf();function y(w,B,k){if(w&&typeof w=="object"&&w instanceof e)return w;var R=new e;return R.parse(w,B,k),R}e.prototype.parse=function(w,B,k){if(typeof w!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof w);var R=w.indexOf("?"),M=R!==-1&&R<w.indexOf("#")?"?":"#",O=w.split(M),C=/\\/g;O[0]=O[0].replace(C,"/"),w=O.join(M);var A=w;if(A=A.trim(),!k&&w.split("#").length===1){var I=d.exec(A);if(I)return this.path=A,this.href=A,this.pathname=I[1],I[2]?(this.search=I[2],B?this.query=v.parse(this.search.substr(1)):this.query=this.search.substr(1)):B&&(this.search="",this.query={}),this}var T=r.exec(A);if(T){T=T[0];var N=T.toLowerCase();this.protocol=N,A=A.substr(T.length)}if(k||T||A.match(/^\/\/[^@/]+@[^@/]+/)){var Y=A.substr(0,2)==="//";Y&&!(T&&x[T])&&(A=A.substr(2),this.slashes=!0)}if(!x[T]&&(Y||T&&!E[T])){for(var K=-1,Q=0;Q<c.length;Q++){var L=A.indexOf(c[Q]);L!==-1&&(K===-1||L<K)&&(K=L)}var P,W;K===-1?W=A.lastIndexOf("@"):W=A.lastIndexOf("@",K),W!==-1&&(P=A.slice(0,W),A=A.slice(W+1),this.auth=decodeURIComponent(P)),K=-1;for(var Q=0;Q<f.length;Q++){var L=A.indexOf(f[Q]);L!==-1&&(K===-1||L<K)&&(K=L)}K===-1&&(K=A.length),this.host=A.slice(0,K),A=A.slice(K),this.parseHost(),this.hostname=this.hostname||"";var D=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!D)for(var ee=this.hostname.split(/\./),Q=0,le=ee.length;Q<le;Q++){var $=ee[Q];if($&&!$.match(g)){for(var ce="",ie=0,H=$.length;ie<H;ie++)$.charCodeAt(ie)>127?ce+="x":ce+=$[ie];if(!ce.match(g)){var ae=ee.slice(0,Q),Z=ee.slice(Q+1),ne=$.match(u);ne&&(ae.push(ne[1]),Z.unshift(ne[2])),Z.length&&(A="/"+Z.join(".")+A),this.hostname=ae.join(".");break}}}this.hostname.length>l?this.hostname="":this.hostname=this.hostname.toLowerCase(),D||(this.hostname=o.toASCII(this.hostname));var re=this.port?":"+this.port:"",pe=this.hostname||"";this.host=pe+re,this.href+=this.host,D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),A[0]!=="/"&&(A="/"+A))}if(!s[N])for(var Q=0,le=i.length;Q<le;Q++){var fe=i[Q];if(A.indexOf(fe)!==-1){var z=encodeURIComponent(fe);z===fe&&(z=escape(fe)),A=A.split(fe).join(z)}}var J=A.indexOf("#");J!==-1&&(this.hash=A.substr(J),A=A.slice(0,J));var ue=A.indexOf("?");if(ue!==-1?(this.search=A.substr(ue),this.query=A.substr(ue+1),B&&(this.query=v.parse(this.query)),A=A.slice(0,ue)):B&&(this.search="",this.query={}),A&&(this.pathname=A),E[N]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var re=this.pathname||"",de=this.search||"";this.path=re+de}return this.href=this.format(),this};function a(w){return typeof w=="string"&&(w=y(w)),w instanceof e?w.format():e.prototype.format.call(w)}e.prototype.format=function(){var w=this.auth||"";w&&(w=encodeURIComponent(w),w=w.replace(/%3A/i,":"),w+="@");var B=this.protocol||"",k=this.pathname||"",R=this.hash||"",M=!1,O="";this.host?M=w+this.host:this.hostname&&(M=w+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(M+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(O=v.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var C=this.search||O&&"?"+O||"";return B&&B.substr(-1)!==":"&&(B+=":"),this.slashes||(!B||E[B])&&M!==!1?(M="//"+(M||""),k&&k.charAt(0)!=="/"&&(k="/"+k)):M||(M=""),R&&R.charAt(0)!=="#"&&(R="#"+R),C&&C.charAt(0)!=="?"&&(C="?"+C),k=k.replace(/[?#]/g,function(A){return encodeURIComponent(A)}),C=C.replace("#","%23"),B+M+k+C+R};function m(w,B){return y(w,!1,!0).resolve(B)}e.prototype.resolve=function(w){return this.resolveObject(y(w,!1,!0)).format()};function _(w,B){return w?y(w,!1,!0).resolveObject(B):B}return e.prototype.resolveObject=function(w){if(typeof w=="string"){var B=new e;B.parse(w,!1,!0),w=B}for(var k=new e,R=Object.keys(this),M=0;M<R.length;M++){var O=R[M];k[O]=this[O]}if(k.hash=w.hash,w.href==="")return k.href=k.format(),k;if(w.slashes&&!w.protocol){for(var C=Object.keys(w),A=0;A<C.length;A++){var I=C[A];I!=="protocol"&&(k[I]=w[I])}return E[k.protocol]&&k.hostname&&!k.pathname&&(k.pathname="/",k.path=k.pathname),k.href=k.format(),k}if(w.protocol&&w.protocol!==k.protocol){if(!E[w.protocol]){for(var T=Object.keys(w),N=0;N<T.length;N++){var Y=T[N];k[Y]=w[Y]}return k.href=k.format(),k}if(k.protocol=w.protocol,!w.host&&!x[w.protocol]){for(var le=(w.pathname||"").split("/");le.length&&!(w.host=le.shift()););w.host||(w.host=""),w.hostname||(w.hostname=""),le[0]!==""&&le.unshift(""),le.length<2&&le.unshift(""),k.pathname=le.join("/")}else k.pathname=w.pathname;if(k.search=w.search,k.query=w.query,k.host=w.host||"",k.auth=w.auth,k.hostname=w.hostname||w.host,k.port=w.port,k.pathname||k.search){var K=k.pathname||"",Q=k.search||"";k.path=K+Q}return k.slashes=k.slashes||w.slashes,k.href=k.format(),k}var L=k.pathname&&k.pathname.charAt(0)==="/",P=w.host||w.pathname&&w.pathname.charAt(0)==="/",W=P||L||k.host&&w.pathname,D=W,ee=k.pathname&&k.pathname.split("/")||[],le=w.pathname&&w.pathname.split("/")||[],$=k.protocol&&!E[k.protocol];if($&&(k.hostname="",k.port=null,k.host&&(ee[0]===""?ee[0]=k.host:ee.unshift(k.host)),k.host="",w.protocol&&(w.hostname=null,w.port=null,w.host&&(le[0]===""?le[0]=w.host:le.unshift(w.host)),w.host=null),W=W&&(le[0]===""||ee[0]==="")),P)k.host=w.host||w.host===""?w.host:k.host,k.hostname=w.hostname||w.hostname===""?w.hostname:k.hostname,k.search=w.search,k.query=w.query,ee=le;else if(le.length)ee||(ee=[]),ee.pop(),ee=ee.concat(le),k.search=w.search,k.query=w.query;else if(w.search!=null){if($){k.host=ee.shift(),k.hostname=k.host;var ce=k.host&&k.host.indexOf("@")>0?k.host.split("@"):!1;ce&&(k.auth=ce.shift(),k.hostname=ce.shift(),k.host=k.hostname)}return k.search=w.search,k.query=w.query,(k.pathname!==null||k.search!==null)&&(k.path=(k.pathname?k.pathname:"")+(k.search?k.search:"")),k.href=k.format(),k}if(!ee.length)return k.pathname=null,k.search?k.path="/"+k.search:k.path=null,k.href=k.format(),k;for(var ie=ee.slice(-1)[0],H=(k.host||w.host||ee.length>1)&&(ie==="."||ie==="..")||ie==="",ae=0,Z=ee.length;Z>=0;Z--)ie=ee[Z],ie==="."?ee.splice(Z,1):ie===".."?(ee.splice(Z,1),ae++):ae&&(ee.splice(Z,1),ae--);if(!W&&!D)for(;ae--;ae)ee.unshift("..");W&&ee[0]!==""&&(!ee[0]||ee[0].charAt(0)!=="/")&&ee.unshift(""),H&&ee.join("/").substr(-1)!=="/"&&ee.push("");var ne=ee[0]===""||ee[0]&&ee[0].charAt(0)==="/";if($){k.hostname=ne?"":ee.length?ee.shift():"",k.host=k.hostname;var ce=k.host&&k.host.indexOf("@")>0?k.host.split("@"):!1;ce&&(k.auth=ce.shift(),k.hostname=ce.shift(),k.host=k.hostname)}return W=W||k.host&&ee.length,W&&!ne&&ee.unshift(""),ee.length>0?k.pathname=ee.join("/"):(k.pathname=null,k.path=null),(k.pathname!==null||k.search!==null)&&(k.path=(k.pathname?k.pathname:"")+(k.search?k.search:"")),k.auth=w.auth||k.auth,k.slashes=k.slashes||w.slashes,k.href=k.format(),k},e.prototype.parseHost=function(){var w=this.host,B=h.exec(w);B&&(B=B[0],B!==":"&&(this.port=B.substr(1)),w=w.substr(0,w.length-B.length)),w&&(this.hostname=w)},Ut.parse=y,Ut.resolve=m,Ut.resolveObject=_,Ut.format=a,Ut.Url=e,Ut}function Y0(o){if(typeof o=="string")o=new URL(o);else if(!(o instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(o.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return ln?Uf(o):qf(o)}function Uf(o){let e=o.hostname,r=o.pathname;for(let h=0;h<r.length;h++)if(r[h]==="%"){let d=r.codePointAt(h+2)||32;if(r[h+1]==="2"&&d===102||r[h+1]==="5"&&d===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(r=r.replace(ul,"\\"),r=decodeURIComponent(r),e!=="")return`\\\\${e}${r}`;{let h=r.codePointAt(1)|32,d=r[2];if(h<al||h>ll||d!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return r.slice(1)}}function qf(o){if(o.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let e=o.pathname;for(let r=0;r<e.length;r++)if(e[r]==="%"){let h=e.codePointAt(r+2)||32;if(e[r+1]==="2"&&h===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(e)}function X0(o){let e=os.resolve(o),r=o.charCodeAt(o.length-1);(r===sl||ln&&r===il)&&e[e.length-1]!==os.sep&&(e+="/");let h=new URL("file://");return e.includes("%")&&(e=e.replace(cl,"%25")),!ln&&e.includes("\\")&&(e=e.replace(fl,"%5C")),e.includes(`
|
|
8
|
+
`)&&(e=e.replace(hl,"%0A")),e.includes("\r")&&(e=e.replace(pl,"%0D")),e.includes(" ")&&(e=e.replace(dl,"%09")),h.pathname=e,h}var J0,Jr,is,Zr,en,ss,tn,as,rn,ls,nn,us,on,cs,sn,fs,Ut,hs,ut,Ka,Z0,el,tl,rl,nl,ol,il,sl,al,ll,ln,ul,cl,fl,hl,pl,dl,Wf=ft(()=>{be(),ve(),me(),of(),_f(),Tf(),K0(),J0=Object.freeze(Object.create(null)),Jr={},is=!1,Zr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,en={},ss=!1,tn={},as=!1,rn={},ls=!1,nn={},us=!1,on={},cs=!1,sn={},fs=!1,Ut={},hs=!1,ut=Lf(),ut.parse,ut.resolve,ut.resolveObject,ut.format,ut.Url,Ka=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,ut.URL=typeof URL<"u"?URL:null,ut.pathToFileURL=X0,ut.fileURLToPath=Y0,Z0=ut.Url,el=ut.format,tl=ut.resolve,rl=ut.resolveObject,nl=ut.parse,ol=ut.URL,il=92,sl=47,al=97,ll=122,ln=Ka==="win32",ul=/\//g,cl=/%/g,fl=/\\/g,hl=/\n/g,pl=/\r/g,dl=/\t/g}),Hf=we((o,e)=>{"use strict";be(),ve(),me(),e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}}),As=we(o=>{"use strict";be(),ve(),me(),Object.defineProperty(o,"__esModule",{value:!0}),o.BufferedDuplex=void 0,o.writev=h;var e=tr(),r=(st(),He(it));function h(t,n){let i=new Array(t.length);for(let f=0;f<t.length;f++)typeof t[f].chunk=="string"?i[f]=r.Buffer.from(t[f].chunk,"utf8"):i[f]=t[f].chunk;this._write(r.Buffer.concat(i),"binary",n)}var d=class extends e.Duplex{constructor(n,i,f){super({objectMode:!0});Se(this,"socket");Se(this,"proxy");Se(this,"isSocketOpen");Se(this,"writeQueue");this.proxy=i,this.socket=f,this.writeQueue=[],n.objectMode||(this._writev=h.bind(this)),this.isSocketOpen=!1,this.proxy.on("data",c=>{!this.destroyed&&this.readable&&this.push(c)})}_read(n){this.proxy.read(n)}_write(n,i,f){this.isSocketOpen?this.writeToProxy(n,i,f):this.writeQueue.push({chunk:n,encoding:i,cb:f})}_final(n){this.writeQueue=[],this.proxy.end(n)}_destroy(n,i){this.writeQueue=[],this.proxy.destroy(),i(n)}socketReady(){this.emit("connect"),this.isSocketOpen=!0,this.processWriteQueue()}writeToProxy(n,i,f){this.proxy.write(n,i)===!1?this.proxy.once("drain",f):f()}processWriteQueue(){for(;this.writeQueue.length>0;){let{chunk:n,encoding:i,cb:f}=this.writeQueue.shift();this.writeToProxy(n,i,f)}}};o.BufferedDuplex=d}),Pr=we(o=>{"use strict";be(),ve(),me();var e=o&&o.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(o,"__esModule",{value:!0}),o.streamBuilder=o.browserStreamBuilder=void 0;var r=(st(),He(it)),h=e(Hf()),d=e(rr()),t=tr(),n=e(dn()),i=As(),f=(0,d.default)("mqttjs:ws"),c=["rejectUnauthorized","ca","cert","key","pfx","passphrase"];function l(y,a){let m=`${y.protocol}://${y.hostname}:${y.port}${y.path}`;return typeof y.transformWsUrl=="function"&&(m=y.transformWsUrl(m,y,a)),m}function g(y){let a=y;return y.port||(y.protocol==="wss"?a.port=443:a.port=80),y.path||(a.path="/"),y.wsOptions||(a.wsOptions={}),!n.default&&!y.forceNativeWebSocket&&y.protocol==="wss"&&c.forEach(m=>{Object.prototype.hasOwnProperty.call(y,m)&&!Object.prototype.hasOwnProperty.call(y.wsOptions,m)&&(a.wsOptions[m]=y[m])}),a}function u(y){let a=g(y);if(a.hostname||(a.hostname=a.host),!a.hostname){if(typeof document>"u")throw new Error("Could not determine host. Specify host manually.");let m=new URL(document.URL);a.hostname=m.hostname,a.port||(a.port=Number(m.port))}return a.objectMode===void 0&&(a.objectMode=!(a.binary===!0||a.binary===void 0)),a}function s(y,a,m){f("createWebSocket"),f(`protocol: ${m.protocolId} ${m.protocolVersion}`);let _=m.protocolId==="MQIsdp"&&m.protocolVersion===3?"mqttv3.1":"mqtt";f(`creating new Websocket for url: ${a} and protocol: ${_}`);let w;return m.createWebsocket?w=m.createWebsocket(a,[_],m):w=new h.default(a,[_],m.wsOptions),w}function x(y,a){let m=a.protocolId==="MQIsdp"&&a.protocolVersion===3?"mqttv3.1":"mqtt",_=l(a,y),w;return a.createWebsocket?w=a.createWebsocket(_,[m],a):w=new WebSocket(_,[m]),w.binaryType="arraybuffer",w}var E=(y,a)=>{f("streamBuilder");let m=g(a);m.hostname=m.hostname||m.host||"localhost";let _=l(m,y),w=s(y,_,m),B=h.default.createWebSocketStream(w,m.wsOptions);return B.url=_,w.on("close",()=>{B.destroy()}),B};o.streamBuilder=E;var v=(y,a)=>{f("browserStreamBuilder");let m,_=u(a).browserBufferSize||1024*512,w=a.browserBufferTimeout||1e3,B=!a.objectMode,k=x(y,a),R=O(a,N,Y);a.objectMode||(R._writev=i.writev.bind(R)),R.on("close",()=>{k.close()});let M=typeof k.addEventListener<"u";k.readyState===k.OPEN?(m=R,m.socket=k):(m=new i.BufferedDuplex(a,R,k),M?k.addEventListener("open",C):k.onopen=C),M?(k.addEventListener("close",A),k.addEventListener("error",I),k.addEventListener("message",T)):(k.onclose=A,k.onerror=I,k.onmessage=T);function O(K,Q,L){let P=new t.Transform({objectMode:K.objectMode});return P._write=Q,P._flush=L,P}function C(){f("WebSocket onOpen"),m instanceof i.BufferedDuplex&&m.socketReady()}function A(K){f("WebSocket onClose",K),m.end(),m.destroy()}function I(K){f("WebSocket onError",K);let Q=new Error("WebSocket error");Q.event=K,m.destroy(Q)}async function T(K){if(!R||!R.readable||!R.writable)return;let{data:Q}=K;Q instanceof ArrayBuffer?Q=r.Buffer.from(Q):Q instanceof Blob?Q=r.Buffer.from(await new Response(Q).arrayBuffer()):Q=r.Buffer.from(Q,"utf8"),R.push(Q)}function N(K,Q,L){if(k.bufferedAmount>_){setTimeout(N,w,K,Q,L);return}B&&typeof K=="string"&&(K=r.Buffer.from(K,"utf8"));try{k.send(K)}catch(P){return L(P)}L()}function Y(K){k.close(),K()}return m};o.browserStreamBuilder=v}),Ss={};lr(Ss,{Server:()=>Ze,Socket:()=>Ze,Stream:()=>Ze,_createServerHandle:()=>Ze,_normalizeArgs:()=>Ze,_setSimultaneousAccepts:()=>Ze,connect:()=>Ze,createConnection:()=>Ze,createServer:()=>Ze,default:()=>gl,isIP:()=>Ze,isIPv4:()=>Ze,isIPv6:()=>Ze});function Ze(){throw new Error("Node.js net module is not supported by JSPM core outside of Node.js")}var gl,xl=ft(()=>{be(),ve(),me(),gl={_createServerHandle:Ze,_normalizeArgs:Ze,_setSimultaneousAccepts:Ze,connect:Ze,createConnection:Ze,createServer:Ze,isIP:Ze,isIPv4:Ze,isIPv6:Ze,Server:Ze,Socket:Ze,Stream:Ze}}),yl=we((o,e)=>{be(),ve(),me(),e.exports={}}),Qa=we(o=>{"use strict";be(),ve(),me();var e=o&&o.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(o,"__esModule",{value:!0});var r=e((xl(),He(Ss))),h=e(rr()),d=e(yl()),t=(0,h.default)("mqttjs:tcp"),n=(i,f)=>{if(f.port=f.port||1883,f.hostname=f.hostname||f.host||"localhost",f.socksProxy)return(0,d.default)(f.hostname,f.port,f.socksProxy,{timeout:f.socksTimeout});let{port:c,path:l}=f,g=f.hostname;return t("port %d and host %s",c,g),r.default.createConnection({port:c,host:g,path:l})};o.default=n}),bl={};lr(bl,{default:()=>ml});var ml,zf=ft(()=>{be(),ve(),me(),ml={}}),Ga=we(o=>{"use strict";be(),ve(),me();var e=o&&o.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(o,"__esModule",{value:!0});var r=(zf(),He(bl)),h=e((xl(),He(Ss))),d=e(rr()),t=e(yl()),n=(0,d.default)("mqttjs:tls");function i(c){let{host:l,port:g,socksProxy:u,...s}=c;if(u!==void 0){let x=(0,t.default)(l,g,u,{timeout:c.socksTimeout});return(0,r.connect)({...s,socket:x})}return(0,r.connect)(c)}var f=(c,l)=>{l.port=l.port||8883,l.host=l.hostname||l.host||"localhost",h.default.isIP(l.host)===0&&!l.servername&&(l.servername=l.host),l.rejectUnauthorized=l.rejectUnauthorized!==!1,delete l.path,n("port %d host %s rejectUnauthorized %b",l.port,l.host,l.rejectUnauthorized);let g=i(l);g.on("secureConnect",()=>{l.rejectUnauthorized&&!g.authorized?g.emit("error",new Error("TLS not authorized")):g.removeListener("error",u)});function u(s){l.rejectUnauthorized&&c.emit("error",s),g.end()}return g.on("error",u),g};o.default=f}),Ya=we(o=>{"use strict";be(),ve(),me(),Object.defineProperty(o,"__esModule",{value:!0});var e=(st(),He(it)),r=tr(),h=As(),d,t,n;function i(){let u=new r.Transform;return u._write=(s,x,E)=>{d.send({data:s.buffer,success(){E()},fail(v){E(new Error(v))}})},u._flush=s=>{d.close({success(){s()}})},u}function f(u){u.hostname||(u.hostname="localhost"),u.path||(u.path="/"),u.wsOptions||(u.wsOptions={})}function c(u,s){let x=u.protocol==="wxs"?"wss":"ws",E=`${x}://${u.hostname}${u.path}`;return u.port&&u.port!==80&&u.port!==443&&(E=`${x}://${u.hostname}:${u.port}${u.path}`),typeof u.transformWsUrl=="function"&&(E=u.transformWsUrl(E,u,s)),E}function l(){d.onOpen(()=>{n.socketReady()}),d.onMessage(u=>{let{data:s}=u;s instanceof ArrayBuffer?s=e.Buffer.from(s):s=e.Buffer.from(s,"utf8"),t.push(s)}),d.onClose(()=>{n.emit("close"),n.end(),n.destroy()}),d.onError(u=>{let s=new Error(u.errMsg);n.destroy(s)})}var g=(u,s)=>{if(s.hostname=s.hostname||s.host,!s.hostname)throw new Error("Could not determine host. Specify host manually.");let x=s.protocolId==="MQIsdp"&&s.protocolVersion===3?"mqttv3.1":"mqtt";f(s);let E=c(s,u);d=wx.connectSocket({url:E,protocols:[x]}),t=i(),n=new h.BufferedDuplex(s,t,d),n._destroy=(y,a)=>{d.close({success(){a&&a(y)}})};let v=n.destroy;return n.destroy=(y,a)=>(n.destroy=v,setTimeout(()=>{d.close({fail(){n._destroy(y,a)}})},0),n),l(),n};o.default=g}),Xa=we(o=>{"use strict";be(),ve(),me(),Object.defineProperty(o,"__esModule",{value:!0});var e=(st(),He(it)),r=tr(),h=As(),d,t,n,i=!1;function f(){let s=new r.Transform;return s._write=(x,E,v)=>{d.sendSocketMessage({data:x.buffer,success(){v()},fail(){v(new Error)}})},s._flush=x=>{d.closeSocket({success(){x()}})},s}function c(s){s.hostname||(s.hostname="localhost"),s.path||(s.path="/"),s.wsOptions||(s.wsOptions={})}function l(s,x){let E=s.protocol==="alis"?"wss":"ws",v=`${E}://${s.hostname}${s.path}`;return s.port&&s.port!==80&&s.port!==443&&(v=`${E}://${s.hostname}:${s.port}${s.path}`),typeof s.transformWsUrl=="function"&&(v=s.transformWsUrl(v,s,x)),v}function g(){i||(i=!0,d.onSocketOpen(()=>{n.socketReady()}),d.onSocketMessage(s=>{if(typeof s.data=="string"){let x=e.Buffer.from(s.data,"base64");t.push(x)}else{let x=new FileReader;x.addEventListener("load",()=>{if(x.result instanceof ArrayBuffer){t.push(e.Buffer.from(x.result));return}t.push(e.Buffer.from(x.result,"utf-8"))}),x.readAsArrayBuffer(s.data)}}),d.onSocketClose(()=>{n.end(),n.destroy()}),d.onSocketError(s=>{n.destroy(s)}))}var u=(s,x)=>{if(x.hostname=x.hostname||x.host,!x.hostname)throw new Error("Could not determine host. Specify host manually.");let E=x.protocolId==="MQIsdp"&&x.protocolVersion===3?"mqttv3.1":"mqtt";c(x);let v=l(x,s);return d=x.my,d.connectSocket({url:v,protocols:E}),t=f(),n=new h.BufferedDuplex(x,t,d),g(),n};o.default=u}),$f=we(o=>{"use strict";be(),ve(),me();var e=o&&o.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(o,"__esModule",{value:!0}),o.connectAsync=g;var r=e(rr()),h=e((Wf(),He(Q0))),d=e(Ci()),t=e(dn());typeof $e?.nextTick!="function"&&($e.nextTick=setImmediate);var n=(0,r.default)("mqttjs"),i=null;function f(){return typeof location<"u"?location.protocol==="https:"?"wss":"ws":typeof document<"u"&&new URL(document.URL).protocol==="https:"?"wss":"ws"}function c(u){let s;if(u.auth)if(s=u.auth.match(/^(.+):(.+)$/),s){let[,x,E]=s;u.username=x,u.password=E}else u.username=u.auth}function l(u,s){if(n("connecting to an MQTT broker..."),typeof u=="object"&&!s&&(s=u,u=""),s=s||{},u&&typeof u=="string"){let v=h.default.parse(u,!0),y={},a=!v.protocol&&!v.hostname&&v.path?.startsWith("/")&&(t.default||s.forceNativeWebSocket);if(v.port!=null&&(y.port=Number(v.port)),y.host=v.hostname,y.query=v.query,y.auth=v.auth,y.protocol=v.protocol,y.path=v.path,s={...y,...s},!s.protocol&&!a)throw new Error("Missing protocol");s.protocol=(s.protocol||f()).replace(/:$/,"")}if(s.unixSocket=s.unixSocket||s.protocol?.includes("+unix"),s.unixSocket?s.protocol=s.protocol.replace("+unix",""):!s.protocol?.startsWith("ws")&&!s.protocol?.startsWith("wx")&&delete s.path,c(s),s.query&&typeof s.query.clientId=="string"&&(s.clientId=s.query.clientId),t.default||s.unixSocket?s.socksProxy=void 0:s.socksProxy===void 0&&typeof $e<"u"&&(s.socksProxy=$e.env.MQTTJS_SOCKS_PROXY),s.cert&&s.key)if(s.protocol){if(["mqtts","wss","wxs","alis"].indexOf(s.protocol)===-1)switch(s.protocol){case"mqtt":s.protocol="mqtts";break;case"ws":s.protocol="wss";break;case"wx":s.protocol="wxs";break;case"ali":s.protocol="alis";break;default:throw new Error(`Unknown protocol for secure connection: "${s.protocol}"!`)}}else throw new Error("Missing secure protocol key");if(i||(i={},!t.default&&!s.forceNativeWebSocket?(i.ws=Pr().streamBuilder,i.wss=Pr().streamBuilder,i.mqtt=Qa().default,i.tcp=Qa().default,i.ssl=Ga().default,i.tls=i.ssl,i.mqtts=Ga().default):(i.ws=Pr().browserStreamBuilder,i.wss=Pr().browserStreamBuilder,i.wx=Ya().default,i.wxs=Ya().default,i.ali=Xa().default,i.alis=Xa().default)),!i[s.protocol]){let v=["mqtts","wss"].indexOf(s.protocol)!==-1;s.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter((y,a)=>v&&a%2===0?!1:typeof i[y]=="function")[0]}if(s.clean===!1&&!s.clientId)throw new Error("Missing clientId for unclean clients");s.protocol&&(s.defaultProtocol=s.protocol);function x(v){return s.servers&&((!v._reconnectCount||v._reconnectCount===s.servers.length)&&(v._reconnectCount=0),s.host=s.servers[v._reconnectCount].host,s.port=s.servers[v._reconnectCount].port,s.protocol=s.servers[v._reconnectCount].protocol?s.servers[v._reconnectCount].protocol:s.defaultProtocol,s.hostname=s.host,v._reconnectCount++),n("calling streambuilder for",s.protocol),i[s.protocol](v,s)}let E=new d.default(x,s);return E.on("error",()=>{}),E}function g(u,s,x=!0){return new Promise((E,v)=>{let y=l(u,s),a={connect:_=>{m(),E(y)},end:()=>{m(),E(y)},error:_=>{m(),y.end(),v(_)}};x===!1&&(a.close=()=>{a.error(new Error("Couldn't connect to server"))});function m(){Object.keys(a).forEach(_=>{y.off(_,a[_])})}Object.keys(a).forEach(_=>{y.on(_,a[_])})})}o.default=l}),Ja=we(o=>{"use strict";be(),ve(),me();var e=o&&o.__createBinding||(Object.create?(function(s,x,E,v){v===void 0&&(v=E);var y=Object.getOwnPropertyDescriptor(x,E);(!y||("get"in y?!x.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return x[E]}}),Object.defineProperty(s,v,y)}):(function(s,x,E,v){v===void 0&&(v=E),s[v]=x[E]})),r=o&&o.__setModuleDefault||(Object.create?(function(s,x){Object.defineProperty(s,"default",{enumerable:!0,value:x})}):function(s,x){s.default=x}),h=o&&o.__importStar||(function(){var s=function(x){return s=Object.getOwnPropertyNames||function(E){var v=[];for(var y in E)Object.prototype.hasOwnProperty.call(E,y)&&(v[v.length]=y);return v},s(x)};return function(x){if(x&&x.__esModule)return x;var E={};if(x!=null)for(var v=s(x),y=0;y<v.length;y++)v[y]!=="default"&&e(E,x,v[y]);return r(E,x),E}})(),d=o&&o.__exportStar||function(s,x){for(var E in s)E!=="default"&&!Object.prototype.hasOwnProperty.call(x,E)&&e(x,s,E)},t=o&&o.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(o,"__esModule",{value:!0}),o.ReasonCodes=o.KeepaliveManager=o.UniqueMessageIdProvider=o.DefaultMessageIdProvider=o.Store=o.MqttClient=o.connectAsync=o.connect=o.Client=void 0;var n=t(Ci());o.MqttClient=n.default;var i=t(R0());o.DefaultMessageIdProvider=i.default;var f=t(Yc());o.UniqueMessageIdProvider=f.default;var c=t(D0());o.Store=c.default;var l=h($f());o.connect=l.default,Object.defineProperty(o,"connectAsync",{enumerable:!0,get:function(){return l.connectAsync}});var g=t(W0());o.KeepaliveManager=g.default,o.Client=n.default,d(Ci(),o),d(zt(),o),d(I0(),o);var u=hn();Object.defineProperty(o,"ReasonCodes",{enumerable:!0,get:function(){return u.ReasonCodes}})}),Vf=we(o=>{be(),ve(),me();var e=o&&o.__createBinding||(Object.create?(function(n,i,f,c){c===void 0&&(c=f);var l=Object.getOwnPropertyDescriptor(i,f);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[f]}}),Object.defineProperty(n,c,l)}):(function(n,i,f,c){c===void 0&&(c=f),n[c]=i[f]})),r=o&&o.__setModuleDefault||(Object.create?(function(n,i){Object.defineProperty(n,"default",{enumerable:!0,value:i})}):function(n,i){n.default=i}),h=o&&o.__importStar||(function(){var n=function(i){return n=Object.getOwnPropertyNames||function(f){var c=[];for(var l in f)Object.prototype.hasOwnProperty.call(f,l)&&(c[c.length]=l);return c},n(i)};return function(i){if(i&&i.__esModule)return i;var f={};if(i!=null)for(var c=n(i),l=0;l<c.length;l++)c[l]!=="default"&&e(f,i,c[l]);return r(f,i),f}})(),d=o&&o.__exportStar||function(n,i){for(var f in n)f!=="default"&&!Object.prototype.hasOwnProperty.call(i,f)&&e(i,n,f)};Object.defineProperty(o,"__esModule",{value:!0});var t=h(Ja());o.default=t,d(Ja(),o)}),vl=Vf();Ee();Ae();var pt=Hu(Iu());Ee();Ae();var wt=class extends Error{constructor(e,r="MQTT_CRYPTO_ERROR",h){super(e,h?{cause:h}:void 0),this.name="MqttCryptoError",this.code=r}},Ve=class extends wt{constructor(e){super(e,"INVALID_CONFIG"),this.name="InvalidConfigError"}},nr=class extends wt{constructor(e="MQTT \u5BA2\u6237\u7AEF\u5C1A\u672A\u8FDE\u63A5"){super(e,"NOT_CONNECTED"),this.name="NotConnectedError"}},Cr=class extends wt{constructor(e,r){super(`\u8BF7\u6C42 ${e} \u5728 ${r}ms \u5185\u6CA1\u6709\u6536\u5230\u54CD\u5E94`,"REQUEST_TIMEOUT"),this.name="RequestTimeoutError",this.msgId=e,this.timeout=r}},Br=class extends wt{constructor(e){super(`MQTT \u8FDE\u63A5\u5728 ${e}ms \u5185\u672A\u5C31\u7EEA`,"CONNECT_TIMEOUT"),this.name="ConnectTimeoutError",this.timeout=e}},yt=class extends wt{constructor(e){super(e,"INVALID_TOPIC"),this.name="TopicError"}},rt=class extends wt{constructor(e,r="CRYPTO_ERROR",h){super(e,r,h),this.name="CryptoError"}},Et=class extends wt{constructor(e,r="INVALID_ENVELOPE",h){super(e,r,h),this.name="EnvelopeError"}};var At=new Uint8Array([83,97,108,116,101,100,95,95]),Du=32,Fu=16,Zn=8,eo=16,Pu=/^[A-Za-z0-9+/]+={0,2}$/,Kf=new TextDecoder("utf-8",{fatal:!0});function ks(o){if(typeof o!="string"||o.length===0)throw new rt("secret \u5FC5\u987B\u662F\u975E\u7A7A\u5B57\u7B26\u4E32","MISSING_SECRET")}function Qf(o){return ArrayBuffer.isView(o)&&o.BYTES_PER_ELEMENT===1}function Gf(o){return!!(o&&typeof o=="object"&&Array.isArray(o.words)&&typeof o.sigBytes=="number")}function or(o){let e=new Uint8Array(o.sigBytes);for(let r=0;r<o.sigBytes;r+=1)e[r]=o.words[r>>>2]>>>24-r%4*8&255;return e}function to(o){let e=[];for(let r=0;r<o.length;r+=1)e[r>>>2]=(e[r>>>2]??0)|o[r]<<24-r%4*8;return pt.default.lib.WordArray.create(e,o.length)}function Tu(o,e){if(Qf(o))return new Uint8Array(o);if(Gf(o))return or(o);throw new rt(`${e} \u5FC5\u987B\u662F Uint8Array \u6216 crypto-js WordArray`,"INVALID_SALT")}function Is(o,e,r=Du,h=Fu){if(!Number.isInteger(r)||r<=0||r%4!==0)throw new rt("keyLength \u5FC5\u987B\u662F 4 \u7684\u6B63\u6574\u6570\u500D","INVALID_ARGUMENT");if(!Number.isInteger(h)||h<=0||h%4!==0)throw new rt("ivLength \u5FC5\u987B\u662F 4 \u7684\u6B63\u6574\u6570\u500D","INVALID_ARGUMENT");let d=pt.default.kdf.OpenSSL.execute(o,r/4,h/4,to(e));return{key:d.key,iv:d.iv}}function Yf(o,e,r=Du,h=Fu){ks(o);let d=Tu(e,"salt"),{key:t,iv:n}=Is(o,d,r,h);return{key:or(t),iv:or(n)}}function Xf(o){let e=eo-o.length%eo,r=new Uint8Array(o.length+e);return r.set(o,0),r.fill(e,o.length),r}function Jf(o){let e=o[o.length-1];if(e===void 0||e<1||e>eo||e>o.length)throw new rt("\u89E3\u5BC6\u5931\u8D25\uFF08PKCS#7 \u586B\u5145\u975E\u6CD5\uFF09","DECRYPT_FAILED");for(let r=o.length-e;r<o.length;r+=1)if(o[r]!==e)throw new rt("\u89E3\u5BC6\u5931\u8D25\uFF08PKCS#7 \u586B\u5145\u975E\u6CD5\uFF09","DECRYPT_FAILED");return o.subarray(0,o.length-e)}function Ds(o,e,r={}){if(typeof o!="string")throw new rt("plaintext \u5FC5\u987B\u662F\u5B57\u7B26\u4E32","INVALID_PLAINTEXT");ks(e);let h=r.saltLength??Zn;if(!Number.isInteger(h)||h<0)throw new rt("saltLength \u5FC5\u987B\u662F\u975E\u8D1F\u6574\u6570","INVALID_SALT");let d=r.salt!==void 0?Tu(r.salt,"salt"):or(pt.default.lib.WordArray.random(h));try{let{key:t,iv:n}=Is(e,d),i=new TextEncoder().encode(o),f=pt.default.AES.encrypt(to(Xf(i)),t,{iv:n,mode:pt.default.mode.CBC,padding:pt.default.pad.NoPadding});return pt.default.lib.WordArray.create([1398893684,1701076831],At.length).concat(to(d)).concat(f.ciphertext).toString(pt.default.enc.Base64)}catch(t){throw t instanceof rt?t:new rt("\u52A0\u5BC6\u5931\u8D25","ENCRYPT_FAILED",t)}}function Zf(o){if(o.length>=At.length&&At.every((r,h)=>o[h]===r)){if(o.length<At.length+Zn)throw new rt("\u5BC6\u6587\u7F3A\u5C11 salt","INVALID_CIPHERTEXT");return{salt:o.subarray(At.length,At.length+Zn),ciphertext:o.subarray(At.length+Zn)}}return{salt:new Uint8Array(0),ciphertext:o}}function Ou(o,e){if(typeof o!="string")throw new rt("\u5BC6\u6587\u5FC5\u987B\u662F\u5B57\u7B26\u4E32","INVALID_CIPHERTEXT");ks(e);let r=o.trim();if(!r||r.length%4!==0||!Pu.test(r))throw new rt("\u5BC6\u6587\u4E0D\u662F\u5408\u6CD5\u7684 base64","INVALID_CIPHERTEXT");let h=or(pt.default.enc.Base64.parse(r));if(h.length<At.length)throw new rt("\u5BC6\u6587\u957F\u5EA6\u4E0D\u8DB3","INVALID_CIPHERTEXT");let{salt:d,ciphertext:t}=Zf(h);if(t.length===0||t.length%eo!==0)throw new rt("\u5BC6\u6587\u5757\u957F\u5EA6\u975E\u6CD5","INVALID_CIPHERTEXT");try{let{key:n,iv:i}=Is(e,d),f=pt.default.AES.decrypt(pt.default.lib.CipherParams.create({ciphertext:to(t)}),n,{iv:i,mode:pt.default.mode.CBC,padding:pt.default.pad.NoPadding}),c=Jf(or(f));return Kf.decode(c)}catch(n){throw n instanceof rt?n:new rt("\u89E3\u5BC6\u5931\u8D25\uFF08\u53E3\u4EE4\u9519\u8BEF\u3001\u5BC6\u6587\u635F\u574F\u6216\u4E0D\u662F UTF-8\uFF09","DECRYPT_FAILED",n)}}function Fs(o,e){if(typeof o!="string"||!o||!e)return null;try{let r=Ou(o,e);return r.length>0?r:null}catch{return null}}function eh(o){if(typeof o!="string")return!1;let e=o.trim();if(!e||e.length%4!==0||!Pu.test(e))return!1;let r=or(pt.default.enc.Base64.parse(e));return r.length>=At.length&&At.every((h,d)=>r[d]===h)}Ee();Ae();var ro="fangzheng-agent",no="vue_";function Ps(o=no,e=Math.random){return`${o}${e().toString(16).slice(2,8)}`}function fr(o={}){let{now:e=Date.now(),suffix:r="",random:h=Math.random}=o,d=`${e}_${h().toString(16).slice(2,6)}`;return r?`${d}_${r}`:d}function Kt(o){let{id:e,user:r=ro,userSuffix:h="",msgId:d,time:t=Date.now()}=o;if(typeof e!="string"||e.length===0)throw new Et("\u4FE1\u5C01 id \u5FC5\u987B\u662F\u975E\u7A7A\u5B57\u7B26\u4E32","INVALID_ENVELOPE_ID");if(typeof r!="string"||typeof h!="string")throw new Et("user/userSuffix \u5FC5\u987B\u662F\u5B57\u7B26\u4E32","INVALID_ENVELOPE_USER");let n;if(typeof o.msg=="string")n=o.msg;else if(o.msg&&typeof o.msg=="object")n=JSON.stringify(o.msg);else throw new Et("\u4FE1\u5C01 msg \u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u6216\u5BF9\u8C61","INVALID_ENVELOPE_MSG");return{id:e,msgId:d||fr({now:t}),user:`${r}${h}`,msg:n,time:t}}function oo(o){let e;if(typeof o=="string")try{e=JSON.parse(o)}catch(t){throw new Et("\u4FE1\u5C01\u4E0D\u662F\u5408\u6CD5 JSON","INVALID_JSON",t)}else e=o;if(!e||typeof e!="object"||Array.isArray(e))throw new Et("\u4FE1\u5C01\u5FC5\u987B\u662F\u5BF9\u8C61","INVALID_ENVELOPE");let r=null,h=null,{msg:d}=e;if(typeof d=="string"){if(d!=="ping"&&d!=="pong")try{r=JSON.parse(d)}catch(t){r=null,h=new Et("\u4FE1\u5C01 msg \u4E0D\u662F\u5408\u6CD5 JSON","INVALID_COMMAND_JSON",t)}}else d&&typeof d=="object"&&(r=d);return{data:e,command:r,commandError:h}}function Ts(o,e){return!!(o&&typeof o.id=="string"&&e&&o.id.startsWith(e))}function Os(o){return o?o.action==="response"||!o.action&&!!o.type:!1}Ee();Ae();function Rs(o,e){if(typeof o!="string")return{text:String(o),decrypted:!1};if(!e)return{text:o,decrypted:!1};let r=Fs(o,e);return r===null?{text:o,decrypted:!1}:{text:r,decrypted:!0}}Ee();Ae();Ee();Ae();var js="secure/stock-condition-order",th=Object.freeze(["wss://broker.emqx.io:8084/mqtt","wss://test.mosquitto.org:8081/mqtt","wss://broker.hivemq.com:8884/mqtt"]);function io(o,e={}){let{allowWildcards:r=!1}=e;if(typeof o!="string"||o.length===0)throw new yt("topic \u5FC5\u987B\u662F\u975E\u7A7A\u5B57\u7B26\u4E32");if(o.length>65535)throw new yt("topic \u957F\u5EA6\u8D85\u8FC7 65535 \u5B57\u8282\u4E0A\u9650");if(o.includes("\0"))throw new yt("topic \u4E0D\u80FD\u5305\u542B\u7A7A\u5B57\u7B26");if(!r&&/[+#]/.test(o))throw new yt("\u4E1A\u52A1 topic \u4E0D\u80FD\u5305\u542B\u901A\u914D\u7B26 + \u6216 #");return o}function rh(...o){if(o.length===0)throw new yt("\u81F3\u5C11\u9700\u8981\u4E00\u4E2A topic \u7247\u6BB5");let e=o.map((r,h)=>{if(typeof r!="string"||r.length===0)throw new yt(`\u7B2C ${h+1} \u4E2A topic \u7247\u6BB5\u5FC5\u987B\u662F\u975E\u7A7A\u5B57\u7B26\u4E32`);if(r.startsWith("/")||r.endsWith("/"))throw new yt(`topic \u7247\u6BB5\u4E0D\u80FD\u4EE5 / \u5F00\u5934\u6216\u7ED3\u5C3E: "${r}"`);return r});return io(e.join("/"))}Ee();Ae();var nh=new Set(["name","broker","topic","password"]);function Ns(o){if(typeof o!="string"||o.trim().length===0)throw new Ve("\u914D\u7F6E\u5B57\u7B26\u4E32\u4E3A\u7A7A");let e={};for(let n of o.trim().split("&")){if(n.length===0)continue;let i=n.indexOf("=");if(i<0)continue;let f=n.slice(0,i).trim();if(f.length===0)continue;let c=decodeURIComponent(n.slice(i+1));e[f]=c}let r=e.broker,h=e.topic;if(!r||!h)throw new Ve("\u914D\u7F6E\u5B57\u7B26\u4E32\u7F3A\u5C11\u5FC5\u586B\u5B57\u6BB5 broker \u6216 topic");let d=e.password||"",t={broker:r,topic:h,secret:d,encrypt:d.length>0};e.name!==void 0&&(t.name=e.name);for(let n of Object.keys(e))nh.has(n)||(t[n]=e[n]);return t}function oh(o){if(!o||typeof o!="object"||Array.isArray(o))throw new Ve("serializeConfigString \u9700\u8981\u914D\u7F6E\u5BF9\u8C61");let e=[],r=(d,t)=>{t!=null&&e.push(`${d}=${encodeURIComponent(String(t))}`)};o.name!==void 0&&r("name",o.name),r("broker",o.broker),r("topic",o.topic);let h=o.encrypt===!1?"":o.secret??"";r("password",h);for(let d of Object.keys(o))["broker","topic","secret","encrypt","name"].includes(d)||r(d,o[d]);return e.join("&")}var ih=new Set(["ws:","wss:","mqtt:","mqtts:","tcp:","tls:"]),Ru=Object.freeze({broker:"wss://broker.emqx.io:8084/mqtt",topic:js,secret:"",encrypt:!0,clientId:"",clientIdPrefix:no,clientIdSuffix:"",user:ro,userSuffix:"",qos:1,reconnectPeriod:5e3,connectTimeout:3e4,clean:!0,resubscribe:!0,heartbeatInterval:3e4,pongTimeout:0,dedupeTtl:5e3,requestTimeout:5e3,auth:null,protocolVersion:void 0});function hr(o,e,r={}){let{min:h=0,allowZero:d=!0}=r;if(!(typeof o=="number"&&Number.isFinite(o)&&(d?o>=h:o>h)))throw new Ve(`${e} \u5FC5\u987B\u662F${d?" >= ":" > "}${h} \u7684\u6570\u5B57`);return o}function sh(o){if(typeof o!="string"||o.length===0)throw new Ve("broker \u5FC5\u987B\u662F\u975E\u7A7A\u5B57\u7B26\u4E32");let e;try{e=new URL(o)}catch{throw new Ve(`broker \u4E0D\u662F\u5408\u6CD5 URL: ${o}`)}if(!ih.has(e.protocol))throw new Ve(`\u4E0D\u652F\u6301\u7684 broker \u534F\u8BAE: ${e.protocol}\uFF08\u652F\u6301 ws/wss/mqtt/mqtts/tcp/tls\uFF09`);if(!e.hostname)throw new Ve("broker \u7F3A\u5C11\u4E3B\u673A\u540D");return o}function Ms(o={}){if(typeof o=="string"&&(o=Ns(o)),!o||typeof o!="object"||Array.isArray(o))throw new Ve("options \u5FC5\u987B\u662F\u5BF9\u8C61\u6216\u914D\u7F6E\u5B57\u7B26\u4E32");let e={...Ru,...o};if(e.broker=sh(e.broker),e.topic=io(e.topic),typeof e.secret!="string")throw new Ve("secret \u5FC5\u987B\u662F\u5B57\u7B26\u4E32");if(e.encrypt!==!1&&e.secret.length===0)throw new Ve("encrypt \u4E3A true \u65F6\u5FC5\u987B\u63D0\u4F9B\u975E\u7A7A secret");if(typeof e.encrypt!="boolean")throw new Ve("encrypt \u5FC5\u987B\u662F\u5E03\u5C14\u503C");if(e.clientId!==""&&typeof e.clientId!="string")throw new Ve("clientId \u5FC5\u987B\u662F\u5B57\u7B26\u4E32");if(typeof e.clientIdPrefix!="string")throw new Ve("clientIdPrefix \u5FC5\u987B\u662F\u5B57\u7B26\u4E32");if(typeof e.clientIdSuffix!="string")throw new Ve("clientIdSuffix \u5FC5\u987B\u662F\u5B57\u7B26\u4E32");if(e.clientId||(e.clientId=Ps(e.clientIdPrefix)),!e.clientId)throw new Ve("clientId \u4E0D\u80FD\u4E3A\u7A7A");if(typeof e.user!="string"||e.user.length===0)throw new Ve("user \u5FC5\u987B\u662F\u975E\u7A7A\u5B57\u7B26\u4E32");if(typeof e.userSuffix!="string")throw new Ve("userSuffix \u5FC5\u987B\u662F\u5B57\u7B26\u4E32");if(![0,1,2].includes(e.qos))throw new Ve("qos \u53EA\u80FD\u662F 0\u30011 \u6216 2");if(e.reconnectPeriod=hr(e.reconnectPeriod,"reconnectPeriod"),e.connectTimeout=hr(e.connectTimeout,"connectTimeout",{allowZero:!1}),e.heartbeatInterval=hr(e.heartbeatInterval,"heartbeatInterval"),e.pongTimeout=hr(e.pongTimeout,"pongTimeout"),e.dedupeTtl=hr(e.dedupeTtl,"dedupeTtl"),e.requestTimeout=hr(e.requestTimeout,"requestTimeout",{allowZero:!1}),typeof e.clean!="boolean")throw new Ve("clean \u5FC5\u987B\u662F\u5E03\u5C14\u503C");if(typeof e.resubscribe!="boolean")throw new Ve("resubscribe \u5FC5\u987B\u662F\u5E03\u5C14\u503C");if(e.protocolVersion!==void 0&&![4,5].includes(e.protocolVersion))throw new Ve("protocolVersion \u53EA\u80FD\u662F 4 \u6216 5");if(e.auth!==null&&e.auth!==void 0){let{username:r,password:h}=e.auth;if(typeof e.auth!="object"||Array.isArray(e.auth))throw new Ve("auth \u5FC5\u987B\u662F\u5BF9\u8C61");if(r!==void 0&&typeof r!="string")throw new Ve("auth.username \u5FC5\u987B\u662F\u5B57\u7B26\u4E32");if(h!==void 0&&typeof h!="string")throw new Ve("auth.password \u5FC5\u987B\u662F\u5B57\u7B26\u4E32");e.auth={username:r,password:h}}else e.auth=null;return Object.freeze(e)}function Ls(o){if(!o||typeof o!="object")throw new Ve("buildMqttOptions \u9700\u8981 resolveOptions \u7684\u7ED3\u679C");let e={clientId:`${o.clientId}${o.clientIdSuffix}`,reconnectPeriod:o.reconnectPeriod,connectTimeout:o.connectTimeout,clean:o.clean,resubscribe:o.resubscribe};return o.protocolVersion!==void 0&&(e.protocolVersion=o.protocolVersion),o.auth&&(o.auth.username!==void 0&&(e.username=o.auth.username),o.auth.password!==void 0&&(e.password=o.auth.password)),e}var so=class extends Dr{constructor(e={}){super(),this.options=Ms(e),this.broker=this.options.broker,this.topic=this.options.topic,this.clientId=this.options.clientId,this.qos=this.options.qos,this.secret=this.options.secret,this.encrypt=this.options.encrypt,this._client=null,this._connected=!1,this._agentOnline=!1,this._pendingMessages=new Map,this._pendingRequests=new Map,this._heartbeatTimer=null,this._pongTimer=null,this.lastError=null}get mqttClient(){return this._client}isConnected(){return this._connected}isAgentOnline(){return this._agentOnline}connect(e=this.options.connectTimeout){if(this._connected)return Promise.resolve(this);try{this._client||this._createClient()}catch(r){return Promise.reject(r)}return new Promise((r,h)=>{let d=!1,t=f=>{this.lastError=f},n=setTimeout(()=>{d||(d=!0,this.off("connect",i),this.off("error",t),h(new Br(e)))},e),i=()=>{d||(d=!0,clearTimeout(n),this.off("error",t),r(this))};this.once("connect",i),this.on("error",t)})}async disconnect(e={}){let{force:r=!0}=e;this._stopHeartbeat(),this._clearPendingMessages(),this._rejectPendingRequests(new nr("\u5BA2\u6237\u7AEF\u5DF2\u65AD\u5F00")),this._connected=!1,this._agentOnline=!1;let h=this._client;if(this._client=null,!h){this._emitStatus();return}await new Promise(d=>{let t=!1,n=()=>{t||(t=!0,d())};setTimeout(n,1e3).unref?.();try{h.end(r,{},n)}catch{n()}}),h.removeAllListeners(),this._emitStatus()}async subscribe(e=this.topic,r={}){let h=r.qos??this.qos,d=this._client;if(!d||!this._connected)throw new nr;return new Promise((t,n)=>{d.subscribe(e,{qos:h},(i,f)=>{i?n(i):t(f)})})}async publish(e,r={}){let h=this._requireConnected(),{qos:d=this.qos,track:t=!0}=r,n=this._completeEnvelope(e),i=this._encode(n);return t&&this._trackMessage(n.msgId),await new Promise((f,c)=>{h.publish(this.topic,i,{qos:d},l=>{if(l){t&&this._untrackMessage(n.msgId),this._emitError(l),c(l);return}f(void 0)})}),n.msgId}async sendCommand(e,r={},h={}){if(typeof e!="string"||e.length===0)throw new TypeError("action \u5FC5\u987B\u662F\u975E\u7A7A\u5B57\u7B26\u4E32");let{qos:d=this.qos,msgId:t,track:n=!0}=h;return this.publish(Kt({id:this.clientId,user:this.options.user,userSuffix:this.options.userSuffix,msg:JSON.stringify({action:e,data:r}),msgId:t}),{qos:d,track:n})}async reply(e,r,h={},d={}){let n=this._normalizeEnvelopeInput(e).msgId,{qos:i=this.qos,track:f=!!n}=d;return this.publish(Kt({id:this.clientId,user:this.options.user,userSuffix:this.options.userSuffix,msg:JSON.stringify({action:r,data:h}),msgId:n}),{qos:i,track:f})}async request(e,r={},h={}){this._requireConnected();let{qos:d=this.qos,timeout:t=this.options.requestTimeout}=h,n=fr(),i=new Promise((f,c)=>{let l=setTimeout(()=>{this._pendingRequests.delete(n),c(new Cr(n,t))},t);this._pendingRequests.set(n,{resolve:f,reject:c,timer:l})});try{await this.publish(Kt({id:this.clientId,user:this.options.user,userSuffix:this.options.userSuffix,msg:JSON.stringify({action:e,data:r}),msgId:n}),{qos:d,track:!1})}catch(f){let c=this._pendingRequests.get(n);throw c&&(clearTimeout(c.timer),this._pendingRequests.delete(n)),f}return i}_createClient(){let e=vl.connect(this.broker,Ls(this.options));return this._client=e,e.on("connect",()=>this._handleConnect()),e.on("reconnect",()=>this._handleReconnect()),e.on("close",()=>this._handleClose()),e.on("offline",()=>this._handleOffline()),e.on("error",r=>{this.lastError=r,this._emitError(r)}),e}_handleConnect(){this._connected=!0,this._emitStatus(),this.emit("connect"),this.subscribe(this.topic,{qos:this.qos}).catch(e=>this._emitError(e)),this._startHeartbeat()}_handleReconnect(){this._connected=!1,this._agentOnline=!1,this._stopHeartbeat(),this._emitStatus(),this.emit("reconnect")}_handleClose(){this._connected=!1,this._agentOnline=!1,this._stopHeartbeat(),this._emitStatus(),this.emit("close")}_handleOffline(){this._connected=!1,this._emitStatus(),this.emit("offline")}_handleMessage(e,r){let h=r.toString(),d=Rs(h,this.secret),t;try{t=oo(d.text)}catch(c){this._emitMessageError(c);return}let{data:n,command:i,commandError:f}=t;if(!Ts(n,this.clientId)){if(n.msg==="ping"){this._sendPong();return}if(n.msg==="pong"){this._agentOnline=!0,this._clearPongTimer(),this.emit("agentStatus",!0);return}if(f){this._emitMessageError(f);return}if(Os(i)){this._resolveRequest(n.msgId,{command:i,envelope:n,topic:e}),this.emit("response",{command:i,envelope:n,topic:e});return}typeof n.msgId=="string"&&this._pendingMessages.has(n.msgId)||this.emit("message",{command:i,envelope:n,topic:e,decrypted:d.decrypted})}}_completeEnvelope(e){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError("envelope \u5FC5\u987B\u662F\u5BF9\u8C61");return Kt({id:e.id??this.clientId,user:e.user??this.options.user,userSuffix:e.userSuffix??this.options.userSuffix,msg:e.msg,msgId:e.msgId,time:e.time})}_encode(e){let r=JSON.stringify(e);return this.encrypt?Ds(r,this.secret):r}_normalizeEnvelopeInput(e){if(typeof e=="string")return oo(e).data;if(!e||typeof e!="object")throw new TypeError("requestEnvelope \u5FC5\u987B\u662F\u5BF9\u8C61\u6216 JSON \u5B57\u7B26\u4E32");return e}_requireConnected(){if(!this._connected||!this._client)throw new nr;return this._client}_startHeartbeat(){if(this._stopHeartbeat(),!this._connected)return;this._sendPing();let e=this.options.heartbeatInterval;e>0&&(this._heartbeatTimer=setInterval(()=>this._sendPing(),e),this._heartbeatTimer.unref?.())}_stopHeartbeat(){this._heartbeatTimer&&(clearInterval(this._heartbeatTimer),this._heartbeatTimer=null),this._clearPongTimer()}_clearPongTimer(){this._pongTimer&&(clearTimeout(this._pongTimer),this._pongTimer=null)}_sendPing(){this._connected&&(this.publish(Kt({id:this.clientId,user:this.options.user,userSuffix:this.options.userSuffix,msg:"ping",msgId:fr({suffix:"ping"})}),{track:!1}).catch(e=>this._emitError(e)),this.options.pongTimeout>0&&(this._clearPongTimer(),this._pongTimer=setTimeout(()=>{this._agentOnline=!1,this.emit("agentStatus",!1)},this.options.pongTimeout),this._pongTimer.unref?.()))}_sendPong(){this._connected&&this.publish(Kt({id:this.clientId,user:this.options.user,userSuffix:this.options.userSuffix,msg:"pong",msgId:fr({suffix:"pong"})}),{track:!1}).catch(e=>this._emitError(e))}_trackMessage(e){if(this.options.dedupeTtl<=0)return;this._untrackMessage(e);let r=setTimeout(()=>{this._pendingMessages.delete(e)},this.options.dedupeTtl);r.unref?.(),this._pendingMessages.set(e,r)}_untrackMessage(e){let r=this._pendingMessages.get(e);r&&(clearTimeout(r),this._pendingMessages.delete(e))}_clearPendingMessages(){for(let e of this._pendingMessages.values())clearTimeout(e);this._pendingMessages.clear()}_resolveRequest(e,r){if(typeof e!="string")return!1;let h=this._pendingRequests.get(e);return h?(clearTimeout(h.timer),this._pendingRequests.delete(e),h.resolve(r),!0):!1}_rejectPendingRequests(e){for(let r of this._pendingRequests.values())clearTimeout(r.timer),r.reject(e);this._pendingRequests.clear()}_emitError(e){this.lastError=e,this.listenerCount("error")>0&&this.emit("error",e)}_emitMessageError(e){this.listenerCount("messageError")>0&&this.emit("messageError",e)}_emitStatus(){this.emit("status",{connected:this._connected,agentOnline:this._agentOnline})}};function ah(o={}){return new so(o)}export{Br as ConnectTimeoutError,rt as CryptoError,no as DEFAULT_CLIENT_ID_PREFIX,Ru as DEFAULT_OPTIONS,js as DEFAULT_TOPIC,ro as DEFAULT_USER,Et as EnvelopeError,Ve as InvalidConfigError,so as MqttCryptoClient,wt as MqttCryptoError,nr as NotConnectedError,th as PRESET_BROKERS,Cr as RequestTimeoutError,yt as TopicError,Kt as buildEnvelope,Ls as buildMqttOptions,rh as buildTopic,ah as createClient,Ps as createClientId,Rs as decodeIncoming,Ou as decryptPayload,Yf as deriveKeyAndIv,Ds as encryptPayload,fr as generateMsgId,eh as isEncryptedPayload,Ts as isOwnMessage,Os as isResponseCommand,Ns as parseConfigString,oo as parseEnvelope,Ms as resolveOptions,oh as serializeConfigString,Fs as tryDecrypt,io as validateTopic};
|
|
9
|
+
//# sourceMappingURL=index.browser.js.map
|