UNPKG

media-stream-library

Version:

Media stream library for Node & the Web.

1 lines 164 kB
"use strict";var mediaStreamLibrary=(()=>{var na=Object.create;var Rt=Object.defineProperty,ia=Object.defineProperties,oa=Object.getOwnPropertyDescriptor,sa=Object.getOwnPropertyDescriptors,aa=Object.getOwnPropertyNames,ai=Object.getOwnPropertySymbols,ua=Object.getPrototypeOf,ui=Object.prototype.hasOwnProperty,ca=Object.prototype.propertyIsEnumerable;var A=Math.pow,Xr=(r,e,t)=>e in r?Rt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Y=(r,e)=>{for(var t in e||(e={}))ui.call(e,t)&&Xr(r,t,e[t]);if(ai)for(var t of ai(e))ca.call(e,t)&&Xr(r,t,e[t]);return r},Ee=(r,e)=>ia(r,sa(e));var la=(r,e)=>()=>(r&&(e=r(r=0)),e);var T=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Ot=(r,e)=>{for(var t in e)Rt(r,t,{get:e[t],enumerable:!0})},ci=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of aa(e))!ui.call(r,i)&&i!==t&&Rt(r,i,{get:()=>e[i],enumerable:!(n=oa(e,i))||n.enumerable});return r};var I=(r,e,t)=>(t=r!=null?na(ua(r)):{},ci(e||!r||!r.__esModule?Rt(t,"default",{value:r,enumerable:!0}):t,r)),fa=r=>ci(Rt({},"__esModule",{value:!0}),r);var c=(r,e,t)=>Xr(r,typeof e!="symbol"?e+"":e,t);var X=(r,e,t)=>new Promise((n,i)=>{var o=u=>{try{a(t.next(u))}catch(f){i(f)}},s=u=>{try{a(t.throw(u))}catch(f){i(f)}},a=u=>u.done?n(u.value):Promise.resolve(u.value).then(o,s);a((t=t.apply(r,e)).next())});var di=T(Nt=>{"use strict";l();Nt.byteLength=pa;Nt.toByteArray=ma;Nt.fromByteArray=ba;var se=[],K=[],da=typeof Uint8Array!="undefined"?Uint8Array:Array,Kr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Ue=0,li=Kr.length;Ue<li;++Ue)se[Ue]=Kr[Ue],K[Kr.charCodeAt(Ue)]=Ue;var Ue,li;K[45]=62;K[95]=63;function fi(r){var e=r.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=r.indexOf("=");t===-1&&(t=e);var n=t===e?0:4-t%4;return[t,n]}function pa(r){var e=fi(r),t=e[0],n=e[1];return(t+n)*3/4-n}function ha(r,e,t){return(e+t)*3/4-t}function ma(r){var e,t=fi(r),n=t[0],i=t[1],o=new da(ha(r,n,i)),s=0,a=i>0?n-4:n,u;for(u=0;u<a;u+=4)e=K[r.charCodeAt(u)]<<18|K[r.charCodeAt(u+1)]<<12|K[r.charCodeAt(u+2)]<<6|K[r.charCodeAt(u+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=K[r.charCodeAt(u)]<<2|K[r.charCodeAt(u+1)]>>4,o[s++]=e&255),i===1&&(e=K[r.charCodeAt(u)]<<10|K[r.charCodeAt(u+1)]<<4|K[r.charCodeAt(u+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function ga(r){return se[r>>18&63]+se[r>>12&63]+se[r>>6&63]+se[r&63]}function ya(r,e,t){for(var n,i=[],o=e;o<t;o+=3)n=(r[o]<<16&16711680)+(r[o+1]<<8&65280)+(r[o+2]&255),i.push(ga(n));return i.join("")}function ba(r){for(var e,t=r.length,n=t%3,i=[],o=16383,s=0,a=t-n;s<a;s+=o)i.push(ya(r,s,s+o>a?a:s+o));return n===1?(e=r[t-1],i.push(se[e>>2]+se[e<<4&63]+"==")):n===2&&(e=(r[t-2]<<8)+r[t-1],i.push(se[e>>10]+se[e>>4&63]+se[e<<2&63]+"=")),i.join("")}});var pi=T(Jr=>{l();Jr.read=function(r,e,t,n,i){var o,s,a=i*8-n-1,u=(1<<a)-1,f=u>>1,d=-7,p=t?i-1:0,m=t?-1:1,g=r[e+p];for(p+=m,o=g&(1<<-d)-1,g>>=-d,d+=a;d>0;o=o*256+r[e+p],p+=m,d-=8);for(s=o&(1<<-d)-1,o>>=-d,d+=n;d>0;s=s*256+r[e+p],p+=m,d-=8);if(o===0)o=1-f;else{if(o===u)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-f}return(g?-1:1)*s*Math.pow(2,o-n)};Jr.write=function(r,e,t,n,i,o){var s,a,u,f=o*8-i-1,d=(1<<f)-1,p=d>>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:o-1,_=n?1:-1,b=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=d):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+p>=1?e+=m/u:e+=m*Math.pow(2,1-p),e*u>=2&&(s++,u/=2),s+p>=d?(a=0,s=d):s+p>=1?(a=(e*u-1)*Math.pow(2,i),s=s+p):(a=e*Math.pow(2,p-1)*Math.pow(2,i),s=0));i>=8;r[t+g]=a&255,g+=_,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;r[t+g]=s&255,g+=_,s/=256,f-=8);r[t+g-_]|=b*128}});var tt=T(et=>{"use strict";l();var Qr=di(),Qe=pi(),hi=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;et.Buffer=h;et.SlowBuffer=Sa;et.INSPECT_MAX_BYTES=50;var Ht=2147483647;et.kMaxLength=Ht;h.TYPED_ARRAY_SUPPORT=xa();!h.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&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 xa(){try{let r=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(r,e),r.foo()===42}catch(r){return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}});Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}});function ge(r){if(r>Ht)throw new RangeError('The value "'+r+'" is invalid for option "size"');let e=new Uint8Array(r);return Object.setPrototypeOf(e,h.prototype),e}function h(r,e,t){if(typeof r=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return rn(r)}return bi(r,e,t)}h.poolSize=8192;function bi(r,e,t){if(typeof r=="string")return wa(r,e);if(ArrayBuffer.isView(r))return Ea(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(ae(r,ArrayBuffer)||r&&ae(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ae(r,SharedArrayBuffer)||r&&ae(r.buffer,SharedArrayBuffer)))return en(r,e,t);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=r.valueOf&&r.valueOf();if(n!=null&&n!==r)return h.from(n,e,t);let i=va(r);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return h.from(r[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}h.from=function(r,e,t){return bi(r,e,t)};Object.setPrototypeOf(h.prototype,Uint8Array.prototype);Object.setPrototypeOf(h,Uint8Array);function xi(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function _a(r,e,t){return xi(r),r<=0?ge(r):e!==void 0?typeof t=="string"?ge(r).fill(e,t):ge(r).fill(e):ge(r)}h.alloc=function(r,e,t){return _a(r,e,t)};function rn(r){return xi(r),ge(r<0?0:nn(r)|0)}h.allocUnsafe=function(r){return rn(r)};h.allocUnsafeSlow=function(r){return rn(r)};function wa(r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!h.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let t=_i(r,e)|0,n=ge(t),i=n.write(r,e);return i!==t&&(n=n.slice(0,i)),n}function Zr(r){let e=r.length<0?0:nn(r.length)|0,t=ge(e);for(let n=0;n<e;n+=1)t[n]=r[n]&255;return t}function Ea(r){if(ae(r,Uint8Array)){let e=new Uint8Array(r);return en(e.buffer,e.byteOffset,e.byteLength)}return Zr(r)}function en(r,e,t){if(e<0||r.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<e+(t||0))throw new RangeError('"length" is outside of buffer bounds');let n;return e===void 0&&t===void 0?n=new Uint8Array(r):t===void 0?n=new Uint8Array(r,e):n=new Uint8Array(r,e,t),Object.setPrototypeOf(n,h.prototype),n}function va(r){if(h.isBuffer(r)){let e=nn(r.length)|0,t=ge(e);return t.length===0||r.copy(t,0,0,e),t}if(r.length!==void 0)return typeof r.length!="number"||sn(r.length)?ge(0):Zr(r);if(r.type==="Buffer"&&Array.isArray(r.data))return Zr(r.data)}function nn(r){if(r>=Ht)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ht.toString(16)+" bytes");return r|0}function Sa(r){return+r!=r&&(r=0),h.alloc(+r)}h.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==h.prototype};h.compare=function(e,t){if(ae(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),ae(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(e)||!h.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,i=t.length;for(let o=0,s=Math.min(n,i);o<s;++o)if(e[o]!==t[o]){n=e[o],i=t[o];break}return n<i?-1:i<n?1:0};h.isEncoding=function(e){switch(String(e).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}};h.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return h.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;let i=h.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){let s=e[n];if(ae(s,Uint8Array))o+s.length>i.length?(h.isBuffer(s)||(s=h.from(s)),s.copy(i,o)):Uint8Array.prototype.set.call(i,s,o);else if(h.isBuffer(s))s.copy(i,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=s.length}return i};function _i(r,e){if(h.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||ae(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);let t=r.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return tn(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Mi(r).length;default:if(i)return n?-1:tn(r).length;e=(""+e).toLowerCase(),i=!0}}h.byteLength=_i;function Ra(r,e,t){let n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return Pa(this,e,t);case"utf8":case"utf-8":return Ei(this,e,t);case"ascii":return Fa(this,e,t);case"latin1":case"binary":return ka(this,e,t);case"base64":return Aa(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Da(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}h.prototype._isBuffer=!0;function Oe(r,e,t){let n=r[e];r[e]=r[t],r[t]=n}h.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)Oe(this,t,t+1);return this};h.prototype.swap32=function(){let e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)Oe(this,t,t+3),Oe(this,t+1,t+2);return this};h.prototype.swap64=function(){let e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)Oe(this,t,t+7),Oe(this,t+1,t+6),Oe(this,t+2,t+5),Oe(this,t+3,t+4);return this};h.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?Ei(this,0,e):Ra.apply(this,arguments)};h.prototype.toLocaleString=h.prototype.toString;h.prototype.equals=function(e){if(!h.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:h.compare(this,e)===0};h.prototype.inspect=function(){let e="",t=et.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"};hi&&(h.prototype[hi]=h.prototype.inspect);h.prototype.compare=function(e,t,n,i,o){if(ae(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),t<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;let s=o-i,a=n-t,u=Math.min(s,a),f=this.slice(i,o),d=e.slice(t,n);for(let p=0;p<u;++p)if(f[p]!==d[p]){s=f[p],a=d[p];break}return s<a?-1:a<s?1:0};function wi(r,e,t,n,i){if(r.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,sn(t)&&(t=i?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(i)return-1;t=r.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof e=="string"&&(e=h.from(e,n)),h.isBuffer(e))return e.length===0?-1:mi(r,e,t,n,i);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):mi(r,[e],t,n,i);throw new TypeError("val must be string, number or Buffer")}function mi(r,e,t,n,i){let o=1,s=r.length,a=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||e.length<2)return-1;o=2,s/=2,a/=2,t/=2}function u(d,p){return o===1?d[p]:d.readUInt16BE(p*o)}let f;if(i){let d=-1;for(f=t;f<s;f++)if(u(r,f)===u(e,d===-1?0:f-d)){if(d===-1&&(d=f),f-d+1===a)return d*o}else d!==-1&&(f-=f-d),d=-1}else for(t+a>s&&(t=s-a),f=t;f>=0;f--){let d=!0;for(let p=0;p<a;p++)if(u(r,f+p)!==u(e,p)){d=!1;break}if(d)return f}return-1}h.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1};h.prototype.indexOf=function(e,t,n){return wi(this,e,t,n,!0)};h.prototype.lastIndexOf=function(e,t,n){return wi(this,e,t,n,!1)};function Ta(r,e,t,n){t=Number(t)||0;let i=r.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;let o=e.length;n>o/2&&(n=o/2);let s;for(s=0;s<n;++s){let a=parseInt(e.substr(s*2,2),16);if(sn(a))return s;r[t+s]=a}return s}function Ca(r,e,t,n){return qt(tn(e,r.length-t),r,t,n)}function Ba(r,e,t,n){return qt(Ha(e),r,t,n)}function Ma(r,e,t,n){return qt(Mi(e),r,t,n)}function Ia(r,e,t,n){return qt(qa(e,r.length-t),r,t,n)}h.prototype.write=function(e,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-t;if((n===void 0||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let s=!1;for(;;)switch(i){case"hex":return Ta(this,e,t,n);case"utf8":case"utf-8":return Ca(this,e,t,n);case"ascii":case"latin1":case"binary":return Ba(this,e,t,n);case"base64":return Ma(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ia(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Aa(r,e,t){return e===0&&t===r.length?Qr.fromByteArray(r):Qr.fromByteArray(r.slice(e,t))}function Ei(r,e,t){t=Math.min(r.length,t);let n=[],i=e;for(;i<t;){let o=r[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(i+a<=t){let u,f,d,p;switch(a){case 1:o<128&&(s=o);break;case 2:u=r[i+1],(u&192)===128&&(p=(o&31)<<6|u&63,p>127&&(s=p));break;case 3:u=r[i+1],f=r[i+2],(u&192)===128&&(f&192)===128&&(p=(o&15)<<12|(u&63)<<6|f&63,p>2047&&(p<55296||p>57343)&&(s=p));break;case 4:u=r[i+1],f=r[i+2],d=r[i+3],(u&192)===128&&(f&192)===128&&(d&192)===128&&(p=(o&15)<<18|(u&63)<<12|(f&63)<<6|d&63,p>65535&&p<1114112&&(s=p))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return La(n)}var gi=4096;function La(r){let e=r.length;if(e<=gi)return String.fromCharCode.apply(String,r);let t="",n=0;for(;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=gi));return t}function Fa(r,e,t){let n="";t=Math.min(r.length,t);for(let i=e;i<t;++i)n+=String.fromCharCode(r[i]&127);return n}function ka(r,e,t){let n="";t=Math.min(r.length,t);for(let i=e;i<t;++i)n+=String.fromCharCode(r[i]);return n}function Pa(r,e,t){let n=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);let i="";for(let o=e;o<t;++o)i+=ja[r[o]];return i}function Da(r,e,t){let n=r.slice(e,t),i="";for(let o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}h.prototype.slice=function(e,t){let n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);let i=this.subarray(e,t);return Object.setPrototypeOf(i,h.prototype),i};function O(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(e,t,n){e=e>>>0,t=t>>>0,n||O(e,t,this.length);let i=this[e],o=1,s=0;for(;++s<t&&(o*=256);)i+=this[e+s]*o;return i};h.prototype.readUintBE=h.prototype.readUIntBE=function(e,t,n){e=e>>>0,t=t>>>0,n||O(e,t,this.length);let i=this[e+--t],o=1;for(;t>0&&(o*=256);)i+=this[e+--t]*o;return i};h.prototype.readUint8=h.prototype.readUInt8=function(e,t){return e=e>>>0,t||O(e,1,this.length),this[e]};h.prototype.readUint16LE=h.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||O(e,2,this.length),this[e]|this[e+1]<<8};h.prototype.readUint16BE=h.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||O(e,2,this.length),this[e]<<8|this[e+1]};h.prototype.readUint32LE=h.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};h.prototype.readUint32BE=h.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||O(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};h.prototype.readBigUInt64LE=ve(function(e){e=e>>>0,Ze(e,"offset");let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&Tt(e,this.length-8);let i=t+this[++e]*A(2,8)+this[++e]*A(2,16)+this[++e]*A(2,24),o=this[++e]+this[++e]*A(2,8)+this[++e]*A(2,16)+n*A(2,24);return BigInt(i)+(BigInt(o)<<BigInt(32))});h.prototype.readBigUInt64BE=ve(function(e){e=e>>>0,Ze(e,"offset");let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&Tt(e,this.length-8);let i=t*A(2,24)+this[++e]*A(2,16)+this[++e]*A(2,8)+this[++e],o=this[++e]*A(2,24)+this[++e]*A(2,16)+this[++e]*A(2,8)+n;return(BigInt(i)<<BigInt(32))+BigInt(o)});h.prototype.readIntLE=function(e,t,n){e=e>>>0,t=t>>>0,n||O(e,t,this.length);let i=this[e],o=1,s=0;for(;++s<t&&(o*=256);)i+=this[e+s]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i};h.prototype.readIntBE=function(e,t,n){e=e>>>0,t=t>>>0,n||O(e,t,this.length);let i=t,o=1,s=this[e+--i];for(;i>0&&(o*=256);)s+=this[e+--i]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*t)),s};h.prototype.readInt8=function(e,t){return e=e>>>0,t||O(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};h.prototype.readInt16LE=function(e,t){e=e>>>0,t||O(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};h.prototype.readInt16BE=function(e,t){e=e>>>0,t||O(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};h.prototype.readInt32LE=function(e,t){return e=e>>>0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};h.prototype.readInt32BE=function(e,t){return e=e>>>0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};h.prototype.readBigInt64LE=ve(function(e){e=e>>>0,Ze(e,"offset");let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&Tt(e,this.length-8);let i=this[e+4]+this[e+5]*A(2,8)+this[e+6]*A(2,16)+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(t+this[++e]*A(2,8)+this[++e]*A(2,16)+this[++e]*A(2,24))});h.prototype.readBigInt64BE=ve(function(e){e=e>>>0,Ze(e,"offset");let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&Tt(e,this.length-8);let i=(t<<24)+this[++e]*A(2,16)+this[++e]*A(2,8)+this[++e];return(BigInt(i)<<BigInt(32))+BigInt(this[++e]*A(2,24)+this[++e]*A(2,16)+this[++e]*A(2,8)+n)});h.prototype.readFloatLE=function(e,t){return e=e>>>0,t||O(e,4,this.length),Qe.read(this,e,!0,23,4)};h.prototype.readFloatBE=function(e,t){return e=e>>>0,t||O(e,4,this.length),Qe.read(this,e,!1,23,4)};h.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||O(e,8,this.length),Qe.read(this,e,!0,52,8)};h.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||O(e,8,this.length),Qe.read(this,e,!1,52,8)};function j(r,e,t,n,i,o){if(!h.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(t+n>r.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t=t>>>0,n=n>>>0,!i){let a=Math.pow(2,8*n)-1;j(this,e,t,n,a,0)}let o=1,s=0;for(this[t]=e&255;++s<n&&(o*=256);)this[t+s]=e/o&255;return t+n};h.prototype.writeUintBE=h.prototype.writeUIntBE=function(e,t,n,i){if(e=+e,t=t>>>0,n=n>>>0,!i){let a=Math.pow(2,8*n)-1;j(this,e,t,n,a,0)}let o=n-1,s=1;for(this[t+o]=e&255;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+n};h.prototype.writeUint8=h.prototype.writeUInt8=function(e,t,n){return e=+e,t=t>>>0,n||j(this,e,t,1,255,0),this[t]=e&255,t+1};h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t>>>0,n||j(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t>>>0,n||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t>>>0,n||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t>>>0,n||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function vi(r,e,t,n,i){Bi(e,n,i,r,t,7);let o=Number(e&BigInt(4294967295));r[t++]=o,o=o>>8,r[t++]=o,o=o>>8,r[t++]=o,o=o>>8,r[t++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return r[t++]=s,s=s>>8,r[t++]=s,s=s>>8,r[t++]=s,s=s>>8,r[t++]=s,t}function Si(r,e,t,n,i){Bi(e,n,i,r,t,7);let o=Number(e&BigInt(4294967295));r[t+7]=o,o=o>>8,r[t+6]=o,o=o>>8,r[t+5]=o,o=o>>8,r[t+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return r[t+3]=s,s=s>>8,r[t+2]=s,s=s>>8,r[t+1]=s,s=s>>8,r[t]=s,t+8}h.prototype.writeBigUInt64LE=ve(function(e,t=0){return vi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});h.prototype.writeBigUInt64BE=ve(function(e,t=0){return Si(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});h.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t=t>>>0,!i){let u=Math.pow(2,8*n-1);j(this,e,t,n,u-1,-u)}let o=0,s=1,a=0;for(this[t]=e&255;++o<n&&(s*=256);)e<0&&a===0&&this[t+o-1]!==0&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n};h.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t=t>>>0,!i){let u=Math.pow(2,8*n-1);j(this,e,t,n,u-1,-u)}let o=n-1,s=1,a=0;for(this[t+o]=e&255;--o>=0&&(s*=256);)e<0&&a===0&&this[t+o+1]!==0&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n};h.prototype.writeInt8=function(e,t,n){return e=+e,t=t>>>0,n||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};h.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t>>>0,n||j(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};h.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t>>>0,n||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};h.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t>>>0,n||j(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};h.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t>>>0,n||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};h.prototype.writeBigInt64LE=ve(function(e,t=0){return vi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});h.prototype.writeBigInt64BE=ve(function(e,t=0){return Si(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ri(r,e,t,n,i,o){if(t+n>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Ti(r,e,t,n,i){return e=+e,t=t>>>0,i||Ri(r,e,t,4,34028234663852886e22,-34028234663852886e22),Qe.write(r,e,t,n,23,4),t+4}h.prototype.writeFloatLE=function(e,t,n){return Ti(this,e,t,!0,n)};h.prototype.writeFloatBE=function(e,t,n){return Ti(this,e,t,!1,n)};function Ci(r,e,t,n,i){return e=+e,t=t>>>0,i||Ri(r,e,t,8,17976931348623157e292,-17976931348623157e292),Qe.write(r,e,t,n,52,8),t+8}h.prototype.writeDoubleLE=function(e,t,n){return Ci(this,e,t,!0,n)};h.prototype.writeDoubleBE=function(e,t,n){return Ci(this,e,t,!1,n)};h.prototype.copy=function(e,t,n,i){if(!h.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);let o=i-n;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),t),o};h.prototype.fill=function(e,t,n,i){if(typeof e=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!h.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(e.length===1){let s=e.charCodeAt(0);(i==="utf8"&&s<128||i==="latin1")&&(e=s)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);let o;if(typeof e=="number")for(o=t;o<n;++o)this[o]=e;else{let s=h.isBuffer(e)?e:h.from(e,i),a=s.length;if(a===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var Je={};function on(r,e,t){Je[r]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name}get code(){return r}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${r}]: ${this.message}`}}}on("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);on("ERR_INVALID_ARG_TYPE",function(r,e){return`The "${r}" argument must be of type number. Received type ${typeof e}`},TypeError);on("ERR_OUT_OF_RANGE",function(r,e,t){let n=`The value of "${r}" is out of range.`,i=t;return Number.isInteger(t)&&Math.abs(t)>A(2,32)?i=yi(String(t)):typeof t=="bigint"&&(i=String(t),(t>A(BigInt(2),BigInt(32))||t<-A(BigInt(2),BigInt(32)))&&(i=yi(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);function yi(r){let e="",t=r.length,n=r[0]==="-"?1:0;for(;t>=n+4;t-=3)e=`_${r.slice(t-3,t)}${e}`;return`${r.slice(0,t)}${e}`}function Ua(r,e,t){Ze(e,"offset"),(r[e]===void 0||r[e+t]===void 0)&&Tt(e,r.length-(t+1))}function Bi(r,e,t,n,i,o){if(r>t||r<e){let s=typeof e=="bigint"?"n":"",a;throw o>3?e===0||e===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${e}${s} and <= ${t}${s}`,new Je.ERR_OUT_OF_RANGE("value",a,r)}Ua(n,i,o)}function Ze(r,e){if(typeof r!="number")throw new Je.ERR_INVALID_ARG_TYPE(e,"number",r)}function Tt(r,e,t){throw Math.floor(r)!==r?(Ze(r,t),new Je.ERR_OUT_OF_RANGE(t||"offset","an integer",r)):e<0?new Je.ERR_BUFFER_OUT_OF_BOUNDS:new Je.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${e}`,r)}var Oa=/[^+/0-9A-Za-z-_]/g;function Na(r){if(r=r.split("=")[0],r=r.trim().replace(Oa,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function tn(r,e){e=e||1/0;let t,n=r.length,i=null,o=[];for(let s=0;s<n;++s){if(t=r.charCodeAt(s),t>55295&&t<57344){if(!i){if(t>56319){(e-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=t;continue}if(t<56320){(e-=3)>-1&&o.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,t<128){if((e-=1)<0)break;o.push(t)}else if(t<2048){if((e-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return o}function Ha(r){let e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function qa(r,e){let t,n,i,o=[];for(let s=0;s<r.length&&!((e-=2)<0);++s)t=r.charCodeAt(s),n=t>>8,i=t%256,o.push(i),o.push(n);return o}function Mi(r){return Qr.toByteArray(Na(r))}function qt(r,e,t,n){let i;for(i=0;i<n&&!(i+t>=e.length||i>=r.length);++i)e[i+t]=r[i];return i}function ae(r,e){return r instanceof e||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===e.name}function sn(r){return r!==r}var ja=function(){let r="0123456789abcdef",e=new Array(256);for(let t=0;t<16;++t){let n=t*16;for(let i=0;i<16;++i)e[n+i]=r[t]+r[i]}return e}();function ve(r){return typeof BigInt=="undefined"?Wa:r}function Wa(){throw new Error("BigInt not supported")}});var ki=T((uf,Fi)=>{l();var k=Fi.exports={},ue,ce;function an(){throw new Error("setTimeout has not been defined")}function un(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?ue=setTimeout:ue=an}catch(r){ue=an}try{typeof clearTimeout=="function"?ce=clearTimeout:ce=un}catch(r){ce=un}})();function Ii(r){if(ue===setTimeout)return setTimeout(r,0);if((ue===an||!ue)&&setTimeout)return ue=setTimeout,setTimeout(r,0);try{return ue(r,0)}catch(e){try{return ue.call(null,r,0)}catch(t){return ue.call(this,r,0)}}}function $a(r){if(ce===clearTimeout)return clearTimeout(r);if((ce===un||!ce)&&clearTimeout)return ce=clearTimeout,clearTimeout(r);try{return ce(r)}catch(e){try{return ce.call(null,r)}catch(t){return ce.call(this,r)}}}var ye=[],rt=!1,Ne,jt=-1;function Ga(){!rt||!Ne||(rt=!1,Ne.length?ye=Ne.concat(ye):jt=-1,ye.length&&Ai())}function Ai(){if(!rt){var r=Ii(Ga);rt=!0;for(var e=ye.length;e;){for(Ne=ye,ye=[];++jt<e;)Ne&&Ne[jt].run();jt=-1,e=ye.length}Ne=null,rt=!1,$a(r)}}k.nextTick=function(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];ye.push(new Li(r,e)),ye.length===1&&!rt&&Ii(Ai)};function Li(r,e){this.fun=r,this.array=e}Li.prototype.run=function(){this.fun.apply(null,this.array)};k.title="browser";k.browser=!0;k.env={};k.argv=[];k.version="";k.versions={};function be(){}k.on=be;k.addListener=be;k.once=be;k.off=be;k.removeListener=be;k.removeAllListeners=be;k.emit=be;k.prependListener=be;k.prependOnceListener=be;k.listeners=function(r){return[]};k.binding=function(r){throw new Error("process.binding is not supported")};k.cwd=function(){return"/"};k.chdir=function(r){throw new Error("process.chdir is not supported")};k.umask=function(){return 0}});var Pi,za,l=la(()=>{"use strict";Pi=I(tt(),1),za=I(ki(),1);window.Buffer=Pi.Buffer;window.process_browser=za});var Gt=T((lf,cn)=>{"use strict";l();var nt=typeof Reflect=="object"?Reflect:null,Di=nt&&typeof nt.apply=="function"?nt.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},Wt;nt&&typeof nt.ownKeys=="function"?Wt=nt.ownKeys:Object.getOwnPropertySymbols?Wt=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Wt=function(e){return Object.getOwnPropertyNames(e)};function Va(r){console&&console.warn&&console.warn(r)}var Oi=Number.isNaN||function(e){return e!==e};function C(){C.init.call(this)}cn.exports=C;cn.exports.once=Ja;C.EventEmitter=C;C.prototype._events=void 0;C.prototype._eventsCount=0;C.prototype._maxListeners=void 0;var Ui=10;function $t(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(C,"defaultMaxListeners",{enumerable:!0,get:function(){return Ui},set:function(r){if(typeof r!="number"||r<0||Oi(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");Ui=r}});C.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};C.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||Oi(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Ni(r){return r._maxListeners===void 0?C.defaultMaxListeners:r._maxListeners}C.prototype.getMaxListeners=function(){return Ni(this)};C.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e==="error",o=this._events;if(o!==void 0)i=i&&o.error===void 0;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(u===void 0)return!1;if(typeof u=="function")Di(u,this,t);else for(var f=u.length,d=$i(u,f),n=0;n<f;++n)Di(d[n],this,t);return!0};function Hi(r,e,t,n){var i,o,s;if($t(t),o=r._events,o===void 0?(o=r._events=Object.create(null),r._eventsCount=0):(o.newListener!==void 0&&(r.emit("newListener",e,t.listener?t.listener:t),o=r._events),s=o[e]),s===void 0)s=o[e]=t,++r._eventsCount;else if(typeof s=="function"?s=o[e]=n?[t,s]:[s,t]:n?s.unshift(t):s.push(t),i=Ni(r),i>0&&s.length>i&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=r,a.type=e,a.count=s.length,Va(a)}return r}C.prototype.addListener=function(e,t){return Hi(this,e,t,!1)};C.prototype.on=C.prototype.addListener;C.prototype.prependListener=function(e,t){return Hi(this,e,t,!0)};function Ya(){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 qi(r,e,t){var n={fired:!1,wrapFn:void 0,target:r,type:e,listener:t},i=Ya.bind(n);return i.listener=t,n.wrapFn=i,i}C.prototype.once=function(e,t){return $t(t),this.on(e,qi(this,e,t)),this};C.prototype.prependOnceListener=function(e,t){return $t(t),this.prependListener(e,qi(this,e,t)),this};C.prototype.removeListener=function(e,t){var n,i,o,s,a;if($t(t),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(o=-1,s=n.length-1;s>=0;s--)if(n[s]===t||n[s].listener===t){a=n[s].listener,o=s;break}if(o<0)return this;o===0?n.shift():Xa(n,o),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,a||t)}return this};C.prototype.off=C.prototype.removeListener;C.prototype.removeAllListeners=function(e){var t,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var o=Object.keys(n),s;for(i=0;i<o.length;++i)s=o[i],s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this};function ji(r,e,t){var n=r._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?t?[i.listener||i]:[i]:t?Ka(i):$i(i,i.length)}C.prototype.listeners=function(e){return ji(this,e,!0)};C.prototype.rawListeners=function(e){return ji(this,e,!1)};C.listenerCount=function(r,e){return typeof r.listenerCount=="function"?r.listenerCount(e):Wi.call(r,e)};C.prototype.listenerCount=Wi;function Wi(r){var e=this._events;if(e!==void 0){var t=e[r];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}C.prototype.eventNames=function(){return this._eventsCount>0?Wt(this._events):[]};function $i(r,e){for(var t=new Array(e),n=0;n<e;++n)t[n]=r[n];return t}function Xa(r,e){for(;e+1<r.length;e++)r[e]=r[e+1];r.pop()}function Ka(r){for(var e=new Array(r.length),t=0;t<e.length;++t)e[t]=r[t].listener||r[t];return e}function Ja(r,e){return new Promise(function(t,n){function i(s){r.removeListener(e,o),n(s)}function o(){typeof r.removeListener=="function"&&r.removeListener("error",i),t([].slice.call(arguments))}Gi(r,e,o,{once:!0}),e!=="error"&&Qa(r,i,{once:!0})})}function Qa(r,e,t){typeof r.on=="function"&&Gi(r,"error",e,t)}function Gi(r,e,t,n){if(typeof r.on=="function")n.once?r.once(e,t):r.on(e,t);else if(typeof r.addEventListener=="function")r.addEventListener(e,function i(o){n.once&&r.removeEventListener(e,i),t(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof r)}});var He=T((df,ln)=>{l();typeof Object.create=="function"?ln.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:ln.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}});var fn=T((hf,zi)=>{l();zi.exports=Gt().EventEmitter});var dn=T(()=>{l()});var Qi=T((xf,Ji)=>{"use strict";l();function Vi(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Yi(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Vi(Object(t),!0).forEach(function(n){Za(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Vi(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Za(r,e,t){return e=Ki(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function eu(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Xi(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,Ki(n.key),n)}}function tu(r,e,t){return e&&Xi(r.prototype,e),t&&Xi(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function Ki(r){var e=ru(r,"string");return typeof e=="symbol"?e:String(e)}function ru(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var nu=tt(),zt=nu.Buffer,iu=dn(),pn=iu.inspect,ou=pn&&pn.custom||"inspect";function su(r,e,t){zt.prototype.copy.call(r,e,t)}Ji.exports=function(){function r(){eu(this,r),this.head=null,this.tail=null,this.length=0}return tu(r,[{key:"push",value:function(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(t){var n={data:t,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=t+n.data;return i}},{key:"concat",value:function(t){if(this.length===0)return zt.alloc(0);for(var n=zt.allocUnsafe(t>>>0),i=this.head,o=0;i;)su(i.data,n,o),o+=i.data.length,i=i.next;return n}},{key:"consume",value:function(t,n){var i;return t<this.head.data.length?(i=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):t===this.head.data.length?i=this.shift():i=n?this._getString(t):this._getBuffer(t),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var n=this.head,i=1,o=n.data;for(t-=o.length;n=n.next;){var s=n.data,a=t>s.length?s.length:t;if(a===s.length?o+=s:o+=s.slice(0,t),t-=a,t===0){a===s.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=s.slice(a));break}++i}return this.length-=i,o}},{key:"_getBuffer",value:function(t){var n=zt.allocUnsafe(t),i=this.head,o=1;for(i.data.copy(n),t-=i.data.length;i=i.next;){var s=i.data,a=t>s.length?s.length:t;if(s.copy(n,n.length-t,0,a),t-=a,t===0){a===s.length?(++o,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=s.slice(a));break}++o}return this.length-=o,n}},{key:ou,value:function(t,n){return pn(this,Yi(Yi({},n),{},{depth:0,customInspect:!1}))}}]),r}()});var mn=T((wf,eo)=>{"use strict";l();function au(r,e){var t=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process_browser.nextTick(hn,this,r)):process_browser.nextTick(hn,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(o){!e&&o?t._writableState?t._writableState.errorEmitted?process_browser.nextTick(Vt,t):(t._writableState.errorEmitted=!0,process_browser.nextTick(Zi,t,o)):process_browser.nextTick(Zi,t,o):e?(process_browser.nextTick(Vt,t),e(o)):process_browser.nextTick(Vt,t)}),this)}function Zi(r,e){hn(r,e),Vt(r)}function Vt(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function uu(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function hn(r,e){r.emit("error",e)}function cu(r,e){var t=r._readableState,n=r._writableState;t&&t.autoDestroy||n&&n.autoDestroy?r.destroy(e):r.emit("error",e)}eo.exports={destroy:au,undestroy:uu,errorOrDestroy:cu}});var qe=T((vf,no)=>{"use strict";l();function lu(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}var ro={};function J(r,e,t){t||(t=Error);function n(o,s,a){return typeof e=="string"?e:e(o,s,a)}var i=function(o){lu(s,o);function s(a,u,f){return o.call(this,n(a,u,f))||this}return s}(t);i.prototype.name=t.name,i.prototype.code=r,ro[r]=i}function to(r,e){if(Array.isArray(r)){var t=r.length;return r=r.map(function(n){return String(n)}),t>2?"one of ".concat(e," ").concat(r.slice(0,t-1).join(", "),", or ")+r[t-1]:t===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}else return"of ".concat(e," ").concat(String(r))}function fu(r,e,t){return r.substr(!t||t<0?0:+t,e.length)===e}function du(r,e,t){return(t===void 0||t>r.length)&&(t=r.length),r.substring(t-e.length,t)===e}function pu(r,e,t){return typeof t!="number"&&(t=0),t+e.length>r.length?!1:r.indexOf(e,t)!==-1}J("ERR_INVALID_OPT_VALUE",function(r,e){return'The value "'+e+'" is invalid for option "'+r+'"'},TypeError);J("ERR_INVALID_ARG_TYPE",function(r,e,t){var n;typeof e=="string"&&fu(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var i;if(du(r," argument"))i="The ".concat(r," ").concat(n," ").concat(to(e,"type"));else{var o=pu(r,".")?"property":"argument";i='The "'.concat(r,'" ').concat(o," ").concat(n," ").concat(to(e,"type"))}return i+=". Received type ".concat(typeof t),i},TypeError);J("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");J("ERR_METHOD_NOT_IMPLEMENTED",function(r){return"The "+r+" method is not implemented"});J("ERR_STREAM_PREMATURE_CLOSE","Premature close");J("ERR_STREAM_DESTROYED",function(r){return"Cannot call "+r+" after a stream was destroyed"});J("ERR_MULTIPLE_CALLBACK","Callback called multiple times");J("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");J("ERR_STREAM_WRITE_AFTER_END","write after end");J("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);J("ERR_UNKNOWN_ENCODING",function(r){return"Unknown encoding: "+r},TypeError);J("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");no.exports.codes=ro});var gn=T((Rf,io)=>{"use strict";l();var hu=qe().codes.ERR_INVALID_OPT_VALUE;function mu(r,e,t){return r.highWaterMark!=null?r.highWaterMark:e?r[t]:null}function gu(r,e,t,n){var i=mu(e,n,t);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var o=n?t:"highWaterMark";throw new hu(o,i)}return Math.floor(i)}return r.objectMode?16:16*1024}io.exports={getHighWaterMark:gu}});var so=T((Cf,oo)=>{l();oo.exports=yu;function yu(r,e){if(yn("noDeprecation"))return r;var t=!1;function n(){if(!t){if(yn("throwDeprecation"))throw new Error(e);yn("traceDeprecation")?console.trace(e):console.warn(e),t=!0}return r.apply(this,arguments)}return n}function yn(r){try{if(!window.localStorage)return!1}catch(t){return!1}var e=window.localStorage[r];return e==null?!1:String(e).toLowerCase()==="true"}});var _n=T((Mf,po)=>{"use strict";l();po.exports=F;function uo(r){var e=this;this.next=null,this.entry=null,this.finish=function(){$u(e,r)}}var it;F.WritableState=Bt;var bu={deprecate:so()},co=fn(),Xt=tt().Buffer,xu=(typeof window!="undefined"||typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function _u(r){return Xt.from(r)}function wu(r){return Xt.isBuffer(r)||r instanceof xu}var xn=mn(),Eu=gn(),vu=Eu.getHighWaterMark,Se=qe().codes,Su=Se.ERR_INVALID_ARG_TYPE,Ru=Se.ERR_METHOD_NOT_IMPLEMENTED,Tu=Se.ERR_MULTIPLE_CALLBACK,Cu=Se.ERR_STREAM_CANNOT_PIPE,Bu=Se.ERR_STREAM_DESTROYED,Mu=Se.ERR_STREAM_NULL_VALUES,Iu=Se.ERR_STREAM_WRITE_AFTER_END,Au=Se.ERR_UNKNOWN_ENCODING,ot=xn.errorOrDestroy;He()(F,co);function Lu(){}function Bt(r,e,t){it=it||je(),r=r||{},typeof t!="boolean"&&(t=e instanceof it),this.objectMode=!!r.objectMode,t&&(this.objectMode=this.objectMode||!!r.writableObjectMode),this.highWaterMark=vu(this,r,"writableHighWaterMark",t),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=r.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=r.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){Nu(e,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=r.emitClose!==!1,this.autoDestroy=!!r.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new uo(this)}Bt.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t};(function(){try{Object.defineProperty(Bt.prototype,"buffer",{get:bu.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(r){}})();var Yt;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Yt=Function.prototype[Symbol.hasInstance],Object.defineProperty(F,Symbol.hasInstance,{value:function(e){return Yt.call(this,e)?!0:this!==F?!1:e&&e._writableState instanceof Bt}})):Yt=function(e){return e instanceof this};function F(r){it=it||je();var e=this instanceof it;if(!e&&!Yt.call(F,this))return new F(r);this._writableState=new Bt(r,this,e),this.writable=!0,r&&(typeof r.write=="function"&&(this._write=r.write),typeof r.writev=="function"&&(this._writev=r.writev),typeof r.destroy=="function"&&(this._destroy=r.destroy),typeof r.final=="function"&&(this._final=r.final)),co.call(this)}F.prototype.pipe=function(){ot(this,new Cu)};function Fu(r,e){var t=new Iu;ot(r,t),process_browser.nextTick(e,t)}function ku(r,e,t,n){var i;return t===null?i=new Mu:typeof t!="string"&&!e.objectMode&&(i=new Su("chunk",["string","Buffer"],t)),i?(ot(r,i),process_browser.nextTick(n,i),!1):!0}F.prototype.write=function(r,e,t){var n=this._writableState,i=!1,o=!n.objectMode&&wu(r);return o&&!Xt.isBuffer(r)&&(r=_u(r)),typeof e=="function"&&(t=e,e=null),o?e="buffer":e||(e=n.defaultEncoding),typeof t!="function"&&(t=Lu),n.ending?Fu(this,t):(o||ku(this,n,r,t))&&(n.pendingcb++,i=Du(this,n,o,r,e,t)),i};F.prototype.cork=function(){this._writableState.corked++};F.prototype.uncork=function(){var r=this._writableState;r.corked&&(r.corked--,!r.writing&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&lo(this,r))};F.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new Au(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(F.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Pu(r,e,t){return!r.objectMode&&r.decodeStrings!==!1&&typeof e=="string"&&(e=Xt.from(e,t)),e}Object.defineProperty(F.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Du(r,e,t,n,i,o){if(!t){var s=Pu(e,n,i);n!==s&&(t=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:t,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else bn(r,e,!1,a,n,i,o);return u}funct