Files
smartsites-www/616.2e79345f.async.js
2022-09-14 07:55:11 +00:00

13 lines
304 KiB
JavaScript

var ge=Object.assign;(self.webpackChunkgms_ui=self.webpackChunkgms_ui||[]).push([[616],{13129:function(Q,Y,_){var w=_(34155);Y.formatArgs=L,Y.save=C,Y.load=b,Y.useColors=x,Y.storage=o(),Y.destroy=function(){var l=!1;return function(){l||(l=!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`."))}}(),Y.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 x(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function L(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+Q.exports.humanize(this.diff),!!this.useColors){var E="color: "+this.color;l.splice(1,0,E,"color: inherit");var A=0,y=0;l[0].replace(/%[a-zA-Z%]/g,function(P){P!=="%%"&&(A++,P==="%c"&&(y=A))}),l.splice(y,0,E)}}Y.log=console.debug||console.log||function(){};function C(l){try{l?Y.storage.setItem("debug",l):Y.storage.removeItem("debug")}catch(E){}}function b(){var l;try{l=Y.storage.getItem("debug")}catch(E){}return!l&&typeof w!="undefined"&&"env"in w&&(l={NODE_ENV:"production"}.DEBUG),l}function o(){try{return localStorage}catch(l){}}Q.exports=_(40323)(Y);var s=Q.exports.formatters;s.j=function(l){try{return JSON.stringify(l)}catch(E){return"[UnexpectedJSONParseError]: "+E.message}}},40323:function(Q,Y,_){var w=_(30352);function x(L){b.debug=b,b.default=b,b.coerce=y,b.disable=l,b.enable=s,b.enabled=E,b.humanize=_(57824),b.destroy=P,Object.keys(L).forEach(function(g){b[g]=L[g]}),b.names=[],b.skips=[],b.formatters={};function C(g){for(var v=0,S=0;S<g.length;S++)v=(v<<5)-v+g.charCodeAt(S),v|=0;return b.colors[Math.abs(v)%b.colors.length]}b.selectColor=C;function b(g){var v,S=null,T,U;function N(){for(var H=arguments.length,V=new Array(H),k=0;k<H;k++)V[k]=arguments[k];if(!!N.enabled){var X=N,W=Number(new Date),ie=W-(v||W);X.diff=ie,X.prev=v,X.curr=W,v=W,V[0]=b.coerce(V[0]),typeof V[0]!="string"&&V.unshift("%O");var q=0;V[0]=V[0].replace(/%([a-zA-Z%])/g,function(ne,J){if(ne==="%%")return"%";q++;var z=b.formatters[J];if(typeof z=="function"){var F=V[q];ne=z.call(X,F),V.splice(q,1),q--}return ne}),b.formatArgs.call(X,V);var le=X.log||b.log;le.apply(X,V)}}return N.namespace=g,N.useColors=b.useColors(),N.color=b.selectColor(g),N.extend=o,N.destroy=b.destroy,Object.defineProperty(N,"enabled",{enumerable:!0,configurable:!1,get:function(){return S!==null?S:(T!==b.namespaces&&(T=b.namespaces,U=b.enabled(g)),U)},set:function(V){S=V}}),typeof b.init=="function"&&b.init(N),N}function o(g,v){var S=b(this.namespace+(typeof v=="undefined"?":":v)+g);return S.log=this.log,S}function s(g){b.save(g),b.namespaces=g,b.names=[],b.skips=[];var v,S=(typeof g=="string"?g:"").split(/[\s,]+/),T=S.length;for(v=0;v<T;v++)!S[v]||(g=S[v].replace(/\*/g,".*?"),g[0]==="-"?b.skips.push(new RegExp("^"+g.substr(1)+"$")):b.names.push(new RegExp("^"+g+"$")))}function l(){var g=[].concat(w(b.names.map(A)),w(b.skips.map(A).map(function(v){return"-"+v}))).join(",");return b.enable(""),g}function E(g){if(g[g.length-1]==="*")return!0;var v,S;for(v=0,S=b.skips.length;v<S;v++)if(b.skips[v].test(g))return!1;for(v=0,S=b.names.length;v<S;v++)if(b.names[v].test(g))return!0;return!1}function A(g){return g.toString().substring(2,g.toString().length-2).replace(/\.\*\?$/,"*")}function y(g){return g instanceof Error?g.stack||g.message:g}function P(){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 b.enable(b.load()),b}Q.exports=x},79742:function(Q,Y){"use strict";Y.byteLength=s,Y.toByteArray=E,Y.fromByteArray=P;for(var _=[],w=[],x=typeof Uint8Array!="undefined"?Uint8Array:Array,L="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",C=0,b=L.length;C<b;++C)_[C]=L[C],w[L.charCodeAt(C)]=C;w["-".charCodeAt(0)]=62,w["_".charCodeAt(0)]=63;function o(g){var v=g.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var S=g.indexOf("=");S===-1&&(S=v);var T=S===v?0:4-S%4;return[S,T]}function s(g){var v=o(g),S=v[0],T=v[1];return(S+T)*3/4-T}function l(g,v,S){return(v+S)*3/4-S}function E(g){var v,S=o(g),T=S[0],U=S[1],N=new x(l(g,T,U)),H=0,V=U>0?T-4:T,k;for(k=0;k<V;k+=4)v=w[g.charCodeAt(k)]<<18|w[g.charCodeAt(k+1)]<<12|w[g.charCodeAt(k+2)]<<6|w[g.charCodeAt(k+3)],N[H++]=v>>16&255,N[H++]=v>>8&255,N[H++]=v&255;return U===2&&(v=w[g.charCodeAt(k)]<<2|w[g.charCodeAt(k+1)]>>4,N[H++]=v&255),U===1&&(v=w[g.charCodeAt(k)]<<10|w[g.charCodeAt(k+1)]<<4|w[g.charCodeAt(k+2)]>>2,N[H++]=v>>8&255,N[H++]=v&255),N}function A(g){return _[g>>18&63]+_[g>>12&63]+_[g>>6&63]+_[g&63]}function y(g,v,S){for(var T,U=[],N=v;N<S;N+=3)T=(g[N]<<16&16711680)+(g[N+1]<<8&65280)+(g[N+2]&255),U.push(A(T));return U.join("")}function P(g){for(var v,S=g.length,T=S%3,U=[],N=16383,H=0,V=S-T;H<V;H+=N)U.push(y(g,H,H+N>V?V:H+N));return T===1?(v=g[S-1],U.push(_[v>>2]+_[v<<4&63]+"==")):T===2&&(v=(g[S-2]<<8)+g[S-1],U.push(_[v>>10]+_[v>>4&63]+_[v<<2&63]+"=")),U.join("")}},9668:function(Q,Y,_){"use strict";const{Buffer:w}=_(58478),x=Symbol.for("BufferList");function L(C){if(!(this instanceof L))return new L(C);L._init.call(this,C)}L._init=function(b){Object.defineProperty(this,x,{value:!0}),this._bufs=[],this.length=0,b&&this.append(b)},L.prototype._new=function(b){return new L(b)},L.prototype._offset=function(b){if(b===0)return[0,0];let o=0;for(let s=0;s<this._bufs.length;s++){const l=o+this._bufs[s].length;if(b<l||s===this._bufs.length-1)return[s,b-o];o=l}},L.prototype._reverseOffset=function(C){const b=C[0];let o=C[1];for(let s=0;s<b;s++)o+=this._bufs[s].length;return o},L.prototype.get=function(b){if(b>this.length||b<0)return;const o=this._offset(b);return this._bufs[o[0]][o[1]]},L.prototype.slice=function(b,o){return typeof b=="number"&&b<0&&(b+=this.length),typeof o=="number"&&o<0&&(o+=this.length),this.copy(null,0,b,o)},L.prototype.copy=function(b,o,s,l){if((typeof s!="number"||s<0)&&(s=0),(typeof l!="number"||l>this.length)&&(l=this.length),s>=this.length||l<=0)return b||w.alloc(0);const E=!!b,A=this._offset(s),y=l-s;let P=y,g=E&&o||0,v=A[1];if(s===0&&l===this.length){if(!E)return this._bufs.length===1?this._bufs[0]:w.concat(this._bufs,this.length);for(let S=0;S<this._bufs.length;S++)this._bufs[S].copy(b,g),g+=this._bufs[S].length;return b}if(P<=this._bufs[A[0]].length-v)return E?this._bufs[A[0]].copy(b,o,v,v+P):this._bufs[A[0]].slice(v,v+P);E||(b=w.allocUnsafe(y));for(let S=A[0];S<this._bufs.length;S++){const T=this._bufs[S].length-v;if(P>T)this._bufs[S].copy(b,g,v),g+=T;else{this._bufs[S].copy(b,g,v,v+P),g+=T;break}P-=T,v&&(v=0)}return b.length>g?b.slice(0,g):b},L.prototype.shallowSlice=function(b,o){if(b=b||0,o=typeof o!="number"?this.length:o,b<0&&(b+=this.length),o<0&&(o+=this.length),b===o)return this._new();const s=this._offset(b),l=this._offset(o),E=this._bufs.slice(s[0],l[0]+1);return l[1]===0?E.pop():E[E.length-1]=E[E.length-1].slice(0,l[1]),s[1]!==0&&(E[0]=E[0].slice(s[1])),this._new(E)},L.prototype.toString=function(b,o,s){return this.slice(o,s).toString(b)},L.prototype.consume=function(b){if(b=Math.trunc(b),Number.isNaN(b)||b<=0)return this;for(;this._bufs.length;)if(b>=this._bufs[0].length)b-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(b),this.length-=b;break}return this},L.prototype.duplicate=function(){const b=this._new();for(let o=0;o<this._bufs.length;o++)b.append(this._bufs[o]);return b},L.prototype.append=function(b){if(b==null)return this;if(b.buffer)this._appendBuffer(w.from(b.buffer,b.byteOffset,b.byteLength));else if(Array.isArray(b))for(let o=0;o<b.length;o++)this.append(b[o]);else if(this._isBufferList(b))for(let o=0;o<b._bufs.length;o++)this.append(b._bufs[o]);else typeof b=="number"&&(b=b.toString()),this._appendBuffer(w.from(b));return this},L.prototype._appendBuffer=function(b){this._bufs.push(b),this.length+=b.length},L.prototype.indexOf=function(C,b,o){if(o===void 0&&typeof b=="string"&&(o=b,b=void 0),typeof C=="function"||Array.isArray(C))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof C=="number"?C=w.from([C]):typeof C=="string"?C=w.from(C,o):this._isBufferList(C)?C=C.slice():Array.isArray(C.buffer)?C=w.from(C.buffer,C.byteOffset,C.byteLength):w.isBuffer(C)||(C=w.from(C)),b=Number(b||0),isNaN(b)&&(b=0),b<0&&(b=this.length+b),b<0&&(b=0),C.length===0)return b>this.length?this.length:b;const s=this._offset(b);let l=s[0],E=s[1];for(;l<this._bufs.length;l++){const A=this._bufs[l];for(;E<A.length;)if(A.length-E>=C.length){const P=A.indexOf(C,E);if(P!==-1)return this._reverseOffset([l,P]);E=A.length-C.length+1}else{const P=this._reverseOffset([l,E]);if(this._match(P,C))return P;E++}E=0}return-1},L.prototype._match=function(C,b){if(this.length-C<b.length)return!1;for(let o=0;o<b.length;o++)if(this.get(C+o)!==b[o])return!1;return!0},function(){const C={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,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(const b in C)(function(o){C[o]===null?L.prototype[o]=function(s,l){return this.slice(s,s+l)[o](0,l)}:L.prototype[o]=function(s=0){return this.slice(s,s+C[o])[o](0)}})(b)}(),L.prototype._isBufferList=function(b){return b instanceof L||L.isBufferList(b)},L.isBufferList=function(b){return b!=null&&b[x]},Q.exports=L},10022:function(Q,Y,_){"use strict";const w=_(28850).Duplex,x=_(35717),L=_(9668);function C(b){if(!(this instanceof C))return new C(b);if(typeof b=="function"){this._callback=b;const o=function(l){this._callback&&(this._callback(l),this._callback=null)}.bind(this);this.on("pipe",function(l){l.on("error",o)}),this.on("unpipe",function(l){l.removeListener("error",o)}),b=null}L._init.call(this,b),w.call(this)}x(C,w),Object.assign(C.prototype,L.prototype),C.prototype._new=function(o){return new C(o)},C.prototype._write=function(o,s,l){this._appendBuffer(o),typeof l=="function"&&l()},C.prototype._read=function(o){if(!this.length)return this.push(null);o=Math.min(o,this.length),this.push(this.slice(0,o)),this.consume(o)},C.prototype.end=function(o){w.prototype.end.call(this,o),this._callback&&(this._callback(null,this.slice()),this._callback=null)},C.prototype._destroy=function(o,s){this._bufs.length=0,this.length=0,s(o)},C.prototype._isBufferList=function(o){return o instanceof C||o instanceof L||C.isBufferList(o)},C.isBufferList=L.isBufferList,Q.exports=C,Q.exports.BufferListStream=C,Q.exports.BufferList=L},58478:function(Q,Y,_){"use strict";/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/var w=_(79742),x=_(80645),L=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Y.Buffer=s,Y.SlowBuffer=N,Y.INSPECT_MAX_BYTES=50;var C=2147483647;Y.kMaxLength=C,s.TYPED_ARRAY_SUPPORT=b(),!s.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 b(){try{var u=new Uint8Array(1),a={foo:function(){return 42}};return Object.setPrototypeOf(a,Uint8Array.prototype),Object.setPrototypeOf(u,a),u.foo()===42}catch(i){return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(!!s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(!!s.isBuffer(this))return this.byteOffset}});function o(u){if(u>C)throw new RangeError('The value "'+u+'" is invalid for option "size"');var a=new Uint8Array(u);return Object.setPrototypeOf(a,s.prototype),a}function s(u,a,i){if(typeof u=="number"){if(typeof a=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return y(u)}return l(u,a,i)}s.poolSize=8192;function l(u,a,i){if(typeof u=="string")return P(u,a);if(ArrayBuffer.isView(u))return v(u);if(u==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u);if(M(u,ArrayBuffer)||u&&M(u.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(M(u,SharedArrayBuffer)||u&&M(u.buffer,SharedArrayBuffer)))return S(u,a,i);if(typeof u=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var n=u.valueOf&&u.valueOf();if(n!=null&&n!==u)return s.from(n,a,i);var e=T(u);if(e)return e;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof u[Symbol.toPrimitive]=="function")return s.from(u[Symbol.toPrimitive]("string"),a,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u)}s.from=function(u,a,i){return l(u,a,i)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function E(u){if(typeof u!="number")throw new TypeError('"size" argument must be of type number');if(u<0)throw new RangeError('The value "'+u+'" is invalid for option "size"')}function A(u,a,i){return E(u),u<=0?o(u):a!==void 0?typeof i=="string"?o(u).fill(a,i):o(u).fill(a):o(u)}s.alloc=function(u,a,i){return A(u,a,i)};function y(u){return E(u),o(u<0?0:U(u)|0)}s.allocUnsafe=function(u){return y(u)},s.allocUnsafeSlow=function(u){return y(u)};function P(u,a){if((typeof a!="string"||a==="")&&(a="utf8"),!s.isEncoding(a))throw new TypeError("Unknown encoding: "+a);var i=H(u,a)|0,n=o(i),e=n.write(u,a);return e!==i&&(n=n.slice(0,e)),n}function g(u){for(var a=u.length<0?0:U(u.length)|0,i=o(a),n=0;n<a;n+=1)i[n]=u[n]&255;return i}function v(u){if(M(u,Uint8Array)){var a=new Uint8Array(u);return S(a.buffer,a.byteOffset,a.byteLength)}return g(u)}function S(u,a,i){if(a<0||u.byteLength<a)throw new RangeError('"offset" is outside of buffer bounds');if(u.byteLength<a+(i||0))throw new RangeError('"length" is outside of buffer bounds');var n;return a===void 0&&i===void 0?n=new Uint8Array(u):i===void 0?n=new Uint8Array(u,a):n=new Uint8Array(u,a,i),Object.setPrototypeOf(n,s.prototype),n}function T(u){if(s.isBuffer(u)){var a=U(u.length)|0,i=o(a);return i.length===0||u.copy(i,0,0,a),i}if(u.length!==void 0)return typeof u.length!="number"||t(u.length)?o(0):g(u);if(u.type==="Buffer"&&Array.isArray(u.data))return g(u.data)}function U(u){if(u>=C)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C.toString(16)+" bytes");return u|0}function N(u){return+u!=u&&(u=0),s.alloc(+u)}s.isBuffer=function(a){return a!=null&&a._isBuffer===!0&&a!==s.prototype},s.compare=function(a,i){if(M(a,Uint8Array)&&(a=s.from(a,a.offset,a.byteLength)),M(i,Uint8Array)&&(i=s.from(i,i.offset,i.byteLength)),!s.isBuffer(a)||!s.isBuffer(i))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(a===i)return 0;for(var n=a.length,e=i.length,c=0,R=Math.min(n,e);c<R;++c)if(a[c]!==i[c]){n=a[c],e=i[c];break}return n<e?-1:e<n?1:0},s.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(a,i){if(!Array.isArray(a))throw new TypeError('"list" argument must be an Array of Buffers');if(a.length===0)return s.alloc(0);var n;if(i===void 0)for(i=0,n=0;n<a.length;++n)i+=a[n].length;var e=s.allocUnsafe(i),c=0;for(n=0;n<a.length;++n){var R=a[n];if(M(R,Uint8Array))c+R.length>e.length?s.from(R).copy(e,c):Uint8Array.prototype.set.call(e,R,c);else if(s.isBuffer(R))R.copy(e,c);else throw new TypeError('"list" argument must be an Array of Buffers');c+=R.length}return e};function H(u,a){if(s.isBuffer(u))return u.length;if(ArrayBuffer.isView(u)||M(u,ArrayBuffer))return u.byteLength;if(typeof u!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof u);var i=u.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&i===0)return 0;for(var e=!1;;)switch(a){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return B(u).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return i*2;case"hex":return i>>>1;case"base64":return h(u).length;default:if(e)return n?-1:B(u).length;a=(""+a).toLowerCase(),e=!0}}s.byteLength=H;function V(u,a,i){var n=!1;if((a===void 0||a<0)&&(a=0),a>this.length||((i===void 0||i>this.length)&&(i=this.length),i<=0)||(i>>>=0,a>>>=0,i<=a))return"";for(u||(u="utf8");;)switch(u){case"hex":return oe(this,a,i);case"utf8":case"utf-8":return F(this,a,i);case"ascii":return fe(this,a,i);case"latin1":case"binary":return se(this,a,i);case"base64":return z(this,a,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,a,i);default:if(n)throw new TypeError("Unknown encoding: "+u);u=(u+"").toLowerCase(),n=!0}}s.prototype._isBuffer=!0;function k(u,a,i){var n=u[a];u[a]=u[i],u[i]=n}s.prototype.swap16=function(){var a=this.length;if(a%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<a;i+=2)k(this,i,i+1);return this},s.prototype.swap32=function(){var a=this.length;if(a%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<a;i+=4)k(this,i,i+3),k(this,i+1,i+2);return this},s.prototype.swap64=function(){var a=this.length;if(a%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<a;i+=8)k(this,i,i+7),k(this,i+1,i+6),k(this,i+2,i+5),k(this,i+3,i+4);return this},s.prototype.toString=function(){var a=this.length;return a===0?"":arguments.length===0?F(this,0,a):V.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(a){if(!s.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?!0:s.compare(this,a)===0},s.prototype.inspect=function(){var a="",i=Y.INSPECT_MAX_BYTES;return a=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(a+=" ... "),"<Buffer "+a+">"},L&&(s.prototype[L]=s.prototype.inspect),s.prototype.compare=function(a,i,n,e,c){if(M(a,Uint8Array)&&(a=s.from(a,a.offset,a.byteLength)),!s.isBuffer(a))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof a);if(i===void 0&&(i=0),n===void 0&&(n=a?a.length:0),e===void 0&&(e=0),c===void 0&&(c=this.length),i<0||n>a.length||e<0||c>this.length)throw new RangeError("out of range index");if(e>=c&&i>=n)return 0;if(e>=c)return-1;if(i>=n)return 1;if(i>>>=0,n>>>=0,e>>>=0,c>>>=0,this===a)return 0;for(var R=c-e,K=n-i,te=Math.min(R,K),ae=this.slice(e,c),he=a.slice(i,n),ue=0;ue<te;++ue)if(ae[ue]!==he[ue]){R=ae[ue],K=he[ue];break}return R<K?-1:K<R?1:0};function X(u,a,i,n,e){if(u.length===0)return-1;if(typeof i=="string"?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,t(i)&&(i=e?0:u.length-1),i<0&&(i=u.length+i),i>=u.length){if(e)return-1;i=u.length-1}else if(i<0)if(e)i=0;else return-1;if(typeof a=="string"&&(a=s.from(a,n)),s.isBuffer(a))return a.length===0?-1:W(u,a,i,n,e);if(typeof a=="number")return a=a&255,typeof Uint8Array.prototype.indexOf=="function"?e?Uint8Array.prototype.indexOf.call(u,a,i):Uint8Array.prototype.lastIndexOf.call(u,a,i):W(u,[a],i,n,e);throw new TypeError("val must be string, number or Buffer")}function W(u,a,i,n,e){var c=1,R=u.length,K=a.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(u.length<2||a.length<2)return-1;c=2,R/=2,K/=2,i/=2}function te(ce,pe){return c===1?ce[pe]:ce.readUInt16BE(pe*c)}var ae;if(e){var he=-1;for(ae=i;ae<R;ae++)if(te(u,ae)===te(a,he===-1?0:ae-he)){if(he===-1&&(he=ae),ae-he+1===K)return he*c}else he!==-1&&(ae-=ae-he),he=-1}else for(i+K>R&&(i=R-K),ae=i;ae>=0;ae--){for(var ue=!0,de=0;de<K;de++)if(te(u,ae+de)!==te(a,de)){ue=!1;break}if(ue)return ae}return-1}s.prototype.includes=function(a,i,n){return this.indexOf(a,i,n)!==-1},s.prototype.indexOf=function(a,i,n){return X(this,a,i,n,!0)},s.prototype.lastIndexOf=function(a,i,n){return X(this,a,i,n,!1)};function ie(u,a,i,n){i=Number(i)||0;var e=u.length-i;n?(n=Number(n),n>e&&(n=e)):n=e;var c=a.length;n>c/2&&(n=c/2);for(var R=0;R<n;++R){var K=parseInt(a.substr(R*2,2),16);if(t(K))return R;u[i+R]=K}return R}function q(u,a,i,n){return I(B(a,u.length-i),u,i,n)}function le(u,a,i,n){return I(d(a),u,i,n)}function ne(u,a,i,n){return I(h(a),u,i,n)}function J(u,a,i,n){return I(f(a,u.length-i),u,i,n)}s.prototype.write=function(a,i,n,e){if(i===void 0)e="utf8",n=this.length,i=0;else if(n===void 0&&typeof i=="string")e=i,n=this.length,i=0;else if(isFinite(i))i=i>>>0,isFinite(n)?(n=n>>>0,e===void 0&&(e="utf8")):(e=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var c=this.length-i;if((n===void 0||n>c)&&(n=c),a.length>0&&(n<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");e||(e="utf8");for(var R=!1;;)switch(e){case"hex":return ie(this,a,i,n);case"utf8":case"utf-8":return q(this,a,i,n);case"ascii":case"latin1":case"binary":return le(this,a,i,n);case"base64":return ne(this,a,i,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,a,i,n);default:if(R)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),R=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function z(u,a,i){return a===0&&i===u.length?w.fromByteArray(u):w.fromByteArray(u.slice(a,i))}function F(u,a,i){i=Math.min(u.length,i);for(var n=[],e=a;e<i;){var c=u[e],R=null,K=c>239?4:c>223?3:c>191?2:1;if(e+K<=i){var te,ae,he,ue;switch(K){case 1:c<128&&(R=c);break;case 2:te=u[e+1],(te&192)==128&&(ue=(c&31)<<6|te&63,ue>127&&(R=ue));break;case 3:te=u[e+1],ae=u[e+2],(te&192)==128&&(ae&192)==128&&(ue=(c&15)<<12|(te&63)<<6|ae&63,ue>2047&&(ue<55296||ue>57343)&&(R=ue));break;case 4:te=u[e+1],ae=u[e+2],he=u[e+3],(te&192)==128&&(ae&192)==128&&(he&192)==128&&(ue=(c&15)<<18|(te&63)<<12|(ae&63)<<6|he&63,ue>65535&&ue<1114112&&(R=ue))}}R===null?(R=65533,K=1):R>65535&&(R-=65536,n.push(R>>>10&1023|55296),R=56320|R&1023),n.push(R),e+=K}return Z(n)}var ee=4096;function Z(u){var a=u.length;if(a<=ee)return String.fromCharCode.apply(String,u);for(var i="",n=0;n<a;)i+=String.fromCharCode.apply(String,u.slice(n,n+=ee));return i}function fe(u,a,i){var n="";i=Math.min(u.length,i);for(var e=a;e<i;++e)n+=String.fromCharCode(u[e]&127);return n}function se(u,a,i){var n="";i=Math.min(u.length,i);for(var e=a;e<i;++e)n+=String.fromCharCode(u[e]);return n}function oe(u,a,i){var n=u.length;(!a||a<0)&&(a=0),(!i||i<0||i>n)&&(i=n);for(var e="",c=a;c<i;++c)e+=r[u[c]];return e}function $(u,a,i){for(var n=u.slice(a,i),e="",c=0;c<n.length-1;c+=2)e+=String.fromCharCode(n[c]+n[c+1]*256);return e}s.prototype.slice=function(a,i){var n=this.length;a=~~a,i=i===void 0?n:~~i,a<0?(a+=n,a<0&&(a=0)):a>n&&(a=n),i<0?(i+=n,i<0&&(i=0)):i>n&&(i=n),i<a&&(i=a);var e=this.subarray(a,i);return Object.setPrototypeOf(e,s.prototype),e};function re(u,a,i){if(u%1!=0||u<0)throw new RangeError("offset is not uint");if(u+a>i)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(a,i,n){a=a>>>0,i=i>>>0,n||re(a,i,this.length);for(var e=this[a],c=1,R=0;++R<i&&(c*=256);)e+=this[a+R]*c;return e},s.prototype.readUintBE=s.prototype.readUIntBE=function(a,i,n){a=a>>>0,i=i>>>0,n||re(a,i,this.length);for(var e=this[a+--i],c=1;i>0&&(c*=256);)e+=this[a+--i]*c;return e},s.prototype.readUint8=s.prototype.readUInt8=function(a,i){return a=a>>>0,i||re(a,1,this.length),this[a]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(a,i){return a=a>>>0,i||re(a,2,this.length),this[a]|this[a+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(a,i){return a=a>>>0,i||re(a,2,this.length),this[a]<<8|this[a+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(a,i){return a=a>>>0,i||re(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+this[a+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(a,i){return a=a>>>0,i||re(a,4,this.length),this[a]*16777216+(this[a+1]<<16|this[a+2]<<8|this[a+3])},s.prototype.readIntLE=function(a,i,n){a=a>>>0,i=i>>>0,n||re(a,i,this.length);for(var e=this[a],c=1,R=0;++R<i&&(c*=256);)e+=this[a+R]*c;return c*=128,e>=c&&(e-=Math.pow(2,8*i)),e},s.prototype.readIntBE=function(a,i,n){a=a>>>0,i=i>>>0,n||re(a,i,this.length);for(var e=i,c=1,R=this[a+--e];e>0&&(c*=256);)R+=this[a+--e]*c;return c*=128,R>=c&&(R-=Math.pow(2,8*i)),R},s.prototype.readInt8=function(a,i){return a=a>>>0,i||re(a,1,this.length),this[a]&128?(255-this[a]+1)*-1:this[a]},s.prototype.readInt16LE=function(a,i){a=a>>>0,i||re(a,2,this.length);var n=this[a]|this[a+1]<<8;return n&32768?n|4294901760:n},s.prototype.readInt16BE=function(a,i){a=a>>>0,i||re(a,2,this.length);var n=this[a+1]|this[a]<<8;return n&32768?n|4294901760:n},s.prototype.readInt32LE=function(a,i){return a=a>>>0,i||re(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},s.prototype.readInt32BE=function(a,i){return a=a>>>0,i||re(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},s.prototype.readFloatLE=function(a,i){return a=a>>>0,i||re(a,4,this.length),x.read(this,a,!0,23,4)},s.prototype.readFloatBE=function(a,i){return a=a>>>0,i||re(a,4,this.length),x.read(this,a,!1,23,4)},s.prototype.readDoubleLE=function(a,i){return a=a>>>0,i||re(a,8,this.length),x.read(this,a,!0,52,8)},s.prototype.readDoubleBE=function(a,i){return a=a>>>0,i||re(a,8,this.length),x.read(this,a,!1,52,8)};function j(u,a,i,n,e,c){if(!s.isBuffer(u))throw new TypeError('"buffer" argument must be a Buffer instance');if(a>e||a<c)throw new RangeError('"value" argument is out of bounds');if(i+n>u.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(a,i,n,e){if(a=+a,i=i>>>0,n=n>>>0,!e){var c=Math.pow(2,8*n)-1;j(this,a,i,n,c,0)}var R=1,K=0;for(this[i]=a&255;++K<n&&(R*=256);)this[i+K]=a/R&255;return i+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(a,i,n,e){if(a=+a,i=i>>>0,n=n>>>0,!e){var c=Math.pow(2,8*n)-1;j(this,a,i,n,c,0)}var R=n-1,K=1;for(this[i+R]=a&255;--R>=0&&(K*=256);)this[i+R]=a/K&255;return i+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(a,i,n){return a=+a,i=i>>>0,n||j(this,a,i,1,255,0),this[i]=a&255,i+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(a,i,n){return a=+a,i=i>>>0,n||j(this,a,i,2,65535,0),this[i]=a&255,this[i+1]=a>>>8,i+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(a,i,n){return a=+a,i=i>>>0,n||j(this,a,i,2,65535,0),this[i]=a>>>8,this[i+1]=a&255,i+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(a,i,n){return a=+a,i=i>>>0,n||j(this,a,i,4,4294967295,0),this[i+3]=a>>>24,this[i+2]=a>>>16,this[i+1]=a>>>8,this[i]=a&255,i+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(a,i,n){return a=+a,i=i>>>0,n||j(this,a,i,4,4294967295,0),this[i]=a>>>24,this[i+1]=a>>>16,this[i+2]=a>>>8,this[i+3]=a&255,i+4},s.prototype.writeIntLE=function(a,i,n,e){if(a=+a,i=i>>>0,!e){var c=Math.pow(2,8*n-1);j(this,a,i,n,c-1,-c)}var R=0,K=1,te=0;for(this[i]=a&255;++R<n&&(K*=256);)a<0&&te===0&&this[i+R-1]!==0&&(te=1),this[i+R]=(a/K>>0)-te&255;return i+n},s.prototype.writeIntBE=function(a,i,n,e){if(a=+a,i=i>>>0,!e){var c=Math.pow(2,8*n-1);j(this,a,i,n,c-1,-c)}var R=n-1,K=1,te=0;for(this[i+R]=a&255;--R>=0&&(K*=256);)a<0&&te===0&&this[i+R+1]!==0&&(te=1),this[i+R]=(a/K>>0)-te&255;return i+n},s.prototype.writeInt8=function(a,i,n){return a=+a,i=i>>>0,n||j(this,a,i,1,127,-128),a<0&&(a=255+a+1),this[i]=a&255,i+1},s.prototype.writeInt16LE=function(a,i,n){return a=+a,i=i>>>0,n||j(this,a,i,2,32767,-32768),this[i]=a&255,this[i+1]=a>>>8,i+2},s.prototype.writeInt16BE=function(a,i,n){return a=+a,i=i>>>0,n||j(this,a,i,2,32767,-32768),this[i]=a>>>8,this[i+1]=a&255,i+2},s.prototype.writeInt32LE=function(a,i,n){return a=+a,i=i>>>0,n||j(this,a,i,4,2147483647,-2147483648),this[i]=a&255,this[i+1]=a>>>8,this[i+2]=a>>>16,this[i+3]=a>>>24,i+4},s.prototype.writeInt32BE=function(a,i,n){return a=+a,i=i>>>0,n||j(this,a,i,4,2147483647,-2147483648),a<0&&(a=4294967295+a+1),this[i]=a>>>24,this[i+1]=a>>>16,this[i+2]=a>>>8,this[i+3]=a&255,i+4};function G(u,a,i,n,e,c){if(i+n>u.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function O(u,a,i,n,e){return a=+a,i=i>>>0,e||G(u,a,i,4,34028234663852886e22,-34028234663852886e22),x.write(u,a,i,n,23,4),i+4}s.prototype.writeFloatLE=function(a,i,n){return O(this,a,i,!0,n)},s.prototype.writeFloatBE=function(a,i,n){return O(this,a,i,!1,n)};function D(u,a,i,n,e){return a=+a,i=i>>>0,e||G(u,a,i,8,17976931348623157e292,-17976931348623157e292),x.write(u,a,i,n,52,8),i+8}s.prototype.writeDoubleLE=function(a,i,n){return D(this,a,i,!0,n)},s.prototype.writeDoubleBE=function(a,i,n){return D(this,a,i,!1,n)},s.prototype.copy=function(a,i,n,e){if(!s.isBuffer(a))throw new TypeError("argument should be a Buffer");if(n||(n=0),!e&&e!==0&&(e=this.length),i>=a.length&&(i=a.length),i||(i=0),e>0&&e<n&&(e=n),e===n||a.length===0||this.length===0)return 0;if(i<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length),a.length-i<e-n&&(e=a.length-i+n);var c=e-n;return this===a&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(i,n,e):Uint8Array.prototype.set.call(a,this.subarray(n,e),i),c},s.prototype.fill=function(a,i,n,e){if(typeof a=="string"){if(typeof i=="string"?(e=i,i=0,n=this.length):typeof n=="string"&&(e=n,n=this.length),e!==void 0&&typeof e!="string")throw new TypeError("encoding must be a string");if(typeof e=="string"&&!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);if(a.length===1){var c=a.charCodeAt(0);(e==="utf8"&&c<128||e==="latin1")&&(a=c)}}else typeof a=="number"?a=a&255:typeof a=="boolean"&&(a=Number(a));if(i<0||this.length<i||this.length<n)throw new RangeError("Out of range index");if(n<=i)return this;i=i>>>0,n=n===void 0?this.length:n>>>0,a||(a=0);var R;if(typeof a=="number")for(R=i;R<n;++R)this[R]=a;else{var K=s.isBuffer(a)?a:s.from(a,e),te=K.length;if(te===0)throw new TypeError('The value "'+a+'" is invalid for argument "value"');for(R=0;R<n-i;++R)this[R+i]=K[R%te]}return this};var m=/[^+/0-9A-Za-z-_]/g;function p(u){if(u=u.split("=")[0],u=u.trim().replace(m,""),u.length<2)return"";for(;u.length%4!=0;)u=u+"=";return u}function B(u,a){a=a||Infinity;for(var i,n=u.length,e=null,c=[],R=0;R<n;++R){if(i=u.charCodeAt(R),i>55295&&i<57344){if(!e){if(i>56319){(a-=3)>-1&&c.push(239,191,189);continue}else if(R+1===n){(a-=3)>-1&&c.push(239,191,189);continue}e=i;continue}if(i<56320){(a-=3)>-1&&c.push(239,191,189),e=i;continue}i=(e-55296<<10|i-56320)+65536}else e&&(a-=3)>-1&&c.push(239,191,189);if(e=null,i<128){if((a-=1)<0)break;c.push(i)}else if(i<2048){if((a-=2)<0)break;c.push(i>>6|192,i&63|128)}else if(i<65536){if((a-=3)<0)break;c.push(i>>12|224,i>>6&63|128,i&63|128)}else if(i<1114112){if((a-=4)<0)break;c.push(i>>18|240,i>>12&63|128,i>>6&63|128,i&63|128)}else throw new Error("Invalid code point")}return c}function d(u){for(var a=[],i=0;i<u.length;++i)a.push(u.charCodeAt(i)&255);return a}function f(u,a){for(var i,n,e,c=[],R=0;R<u.length&&!((a-=2)<0);++R)i=u.charCodeAt(R),n=i>>8,e=i%256,c.push(e),c.push(n);return c}function h(u){return w.toByteArray(p(u))}function I(u,a,i,n){for(var e=0;e<n&&!(e+i>=a.length||e>=u.length);++e)a[e+i]=u[e];return e}function M(u,a){return u instanceof a||u!=null&&u.constructor!=null&&u.constructor.name!=null&&u.constructor.name===a.name}function t(u){return u!==u}var r=function(){for(var u="0123456789abcdef",a=new Array(256),i=0;i<16;++i)for(var n=i*16,e=0;e<16;++e)a[n+e]=u[i]+u[e];return a}()},52898:function(Q){"use strict";function Y(o,s){o.prototype=Object.create(s.prototype),o.prototype.constructor=o,o.__proto__=s}var _={};function w(o,s,l){l||(l=Error);function E(y,P,g){return typeof s=="string"?s:s(y,P,g)}var A=function(y){Y(P,y);function P(g,v,S){return y.call(this,E(g,v,S))||this}return P}(l);A.prototype.name=l.name,A.prototype.code=o,_[o]=A}function x(o,s){if(Array.isArray(o)){var l=o.length;return o=o.map(function(E){return String(E)}),l>2?"one of ".concat(s," ").concat(o.slice(0,l-1).join(", "),", or ")+o[l-1]:l===2?"one of ".concat(s," ").concat(o[0]," or ").concat(o[1]):"of ".concat(s," ").concat(o[0])}else return"of ".concat(s," ").concat(String(o))}function L(o,s,l){return o.substr(!l||l<0?0:+l,s.length)===s}function C(o,s,l){return(l===void 0||l>o.length)&&(l=o.length),o.substring(l-s.length,l)===s}function b(o,s,l){return typeof l!="number"&&(l=0),l+s.length>o.length?!1:o.indexOf(s,l)!==-1}w("ERR_INVALID_OPT_VALUE",function(o,s){return'The value "'+s+'" is invalid for option "'+o+'"'},TypeError),w("ERR_INVALID_ARG_TYPE",function(o,s,l){var E;typeof s=="string"&&L(s,"not ")?(E="must not be",s=s.replace(/^not /,"")):E="must be";var A;if(C(o," argument"))A="The ".concat(o," ").concat(E," ").concat(x(s,"type"));else{var y=b(o,".")?"property":"argument";A='The "'.concat(o,'" ').concat(y," ").concat(E," ").concat(x(s,"type"))}return A+=". Received type ".concat(typeof l),A},TypeError),w("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),w("ERR_METHOD_NOT_IMPLEMENTED",function(o){return"The "+o+" method is not implemented"}),w("ERR_STREAM_PREMATURE_CLOSE","Premature close"),w("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" after a stream was destroyed"}),w("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),w("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),w("ERR_STREAM_WRITE_AFTER_END","write after end"),w("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),w("ERR_UNKNOWN_ENCODING",function(o){return"Unknown encoding: "+o},TypeError),w("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Q.exports.q=_},6510:function(Q,Y,_){"use strict";var w=_(34155),x=Object.keys||function(y){var P=[];for(var g in y)P.push(g);return P};Q.exports=l;var L=_(42813),C=_(79850);_(35717)(l,L);for(var b=x(C.prototype),o=0;o<b.length;o++){var s=b[o];l.prototype[s]||(l.prototype[s]=C.prototype[s])}function l(y){if(!(this instanceof l))return new l(y);L.call(this,y),C.call(this,y),this.allowHalfOpen=!0,y&&(y.readable===!1&&(this.readable=!1),y.writable===!1&&(this.writable=!1),y.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",E)))}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function E(){this._writableState.ended||w.nextTick(A,this)}function A(y){y.end()}Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(P){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=P,this._writableState.destroyed=P)}})},4586:function(Q,Y,_){"use strict";Q.exports=x;var w=_(14059);_(35717)(x,w);function x(L){if(!(this instanceof x))return new x(L);w.call(this,L)}x.prototype._transform=function(L,C,b){b(null,L)}},42813:function(Q,Y,_){"use strict";var w=_(34155);Q.exports=J;var x;J.ReadableState=ne;var L=_(17187).EventEmitter,C=function(r,u){return r.listeners(u).length},b=_(79853),o=_(58478).Buffer,s=_.g.Uint8Array||function(){};function l(t){return o.from(t)}function E(t){return o.isBuffer(t)||t instanceof s}var A=_(51379),y;A&&A.debuglog?y=A.debuglog("stream"):y=function(){};var P=_(35770),g=_(12214),v=_(48425),S=v.getHighWaterMark,T=_(52898).q,U=T.ERR_INVALID_ARG_TYPE,N=T.ERR_STREAM_PUSH_AFTER_EOF,H=T.ERR_METHOD_NOT_IMPLEMENTED,V=T.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,k,X,W;_(35717)(J,b);var ie=g.errorOrDestroy,q=["error","close","destroy","pause","resume"];function le(t,r,u){if(typeof t.prependListener=="function")return t.prependListener(r,u);!t._events||!t._events[r]?t.on(r,u):Array.isArray(t._events[r])?t._events[r].unshift(u):t._events[r]=[u,t._events[r]]}function ne(t,r,u){x=x||_(6510),t=t||{},typeof u!="boolean"&&(u=r instanceof x),this.objectMode=!!t.objectMode,u&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=S(this,t,"readableHighWaterMark",u),this.buffer=new P,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(k||(k=_(32553).s),this.decoder=new k(t.encoding),this.encoding=t.encoding)}function J(t){if(x=x||_(6510),!(this instanceof J))return new J(t);var r=this instanceof x;this._readableState=new ne(t,this,r),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),b.call(this)}Object.defineProperty(J.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(r){!this._readableState||(this._readableState.destroyed=r)}}),J.prototype.destroy=g.destroy,J.prototype._undestroy=g.undestroy,J.prototype._destroy=function(t,r){r(t)},J.prototype.push=function(t,r){var u=this._readableState,a;return u.objectMode?a=!0:typeof t=="string"&&(r=r||u.defaultEncoding,r!==u.encoding&&(t=o.from(t,r),r=""),a=!0),z(this,t,r,!1,a)},J.prototype.unshift=function(t){return z(this,t,null,!0,!1)};function z(t,r,u,a,i){y("readableAddChunk",r);var n=t._readableState;if(r===null)n.reading=!1,oe(t,n);else{var e;if(i||(e=ee(n,r)),e)ie(t,e);else if(n.objectMode||r&&r.length>0)if(typeof r!="string"&&!n.objectMode&&Object.getPrototypeOf(r)!==o.prototype&&(r=l(r)),a)n.endEmitted?ie(t,new V):F(t,n,r,!0);else if(n.ended)ie(t,new N);else{if(n.destroyed)return!1;n.reading=!1,n.decoder&&!u?(r=n.decoder.write(r),n.objectMode||r.length!==0?F(t,n,r,!1):j(t,n)):F(t,n,r,!1)}else a||(n.reading=!1,j(t,n))}return!n.ended&&(n.length<n.highWaterMark||n.length===0)}function F(t,r,u,a){r.flowing&&r.length===0&&!r.sync?(r.awaitDrain=0,t.emit("data",u)):(r.length+=r.objectMode?1:u.length,a?r.buffer.unshift(u):r.buffer.push(u),r.needReadable&&$(t)),j(t,r)}function ee(t,r){var u;return!E(r)&&typeof r!="string"&&r!==void 0&&!t.objectMode&&(u=new U("chunk",["string","Buffer","Uint8Array"],r)),u}J.prototype.isPaused=function(){return this._readableState.flowing===!1},J.prototype.setEncoding=function(t){k||(k=_(32553).s);var r=new k(t);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var u=this._readableState.buffer.head,a="";u!==null;)a+=r.write(u.data),u=u.next;return this._readableState.buffer.clear(),a!==""&&this._readableState.buffer.push(a),this._readableState.length=a.length,this};var Z=1073741824;function fe(t){return t>=Z?t=Z:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function se(t,r){return t<=0||r.length===0&&r.ended?0:r.objectMode?1:t!==t?r.flowing&&r.length?r.buffer.head.data.length:r.length:(t>r.highWaterMark&&(r.highWaterMark=fe(t)),t<=r.length?t:r.ended?r.length:(r.needReadable=!0,0))}J.prototype.read=function(t){y("read",t),t=parseInt(t,10);var r=this._readableState,u=t;if(t!==0&&(r.emittedReadable=!1),t===0&&r.needReadable&&((r.highWaterMark!==0?r.length>=r.highWaterMark:r.length>0)||r.ended))return y("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?h(this):$(this),null;if(t=se(t,r),t===0&&r.ended)return r.length===0&&h(this),null;var a=r.needReadable;y("need readable",a),(r.length===0||r.length-t<r.highWaterMark)&&(a=!0,y("length less than watermark",a)),r.ended||r.reading?(a=!1,y("reading or ended",a)):a&&(y("do read"),r.reading=!0,r.sync=!0,r.length===0&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(t=se(u,r)));var i;return t>0?i=f(t,r):i=null,i===null?(r.needReadable=r.length<=r.highWaterMark,t=0):(r.length-=t,r.awaitDrain=0),r.length===0&&(r.ended||(r.needReadable=!0),u!==t&&r.ended&&h(this)),i!==null&&this.emit("data",i),i};function oe(t,r){if(y("onEofChunk"),!r.ended){if(r.decoder){var u=r.decoder.end();u&&u.length&&(r.buffer.push(u),r.length+=r.objectMode?1:u.length)}r.ended=!0,r.sync?$(t):(r.needReadable=!1,r.emittedReadable||(r.emittedReadable=!0,re(t)))}}function $(t){var r=t._readableState;y("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(y("emitReadable",r.flowing),r.emittedReadable=!0,w.nextTick(re,t))}function re(t){var r=t._readableState;y("emitReadable_",r.destroyed,r.length,r.ended),!r.destroyed&&(r.length||r.ended)&&(t.emit("readable"),r.emittedReadable=!1),r.needReadable=!r.flowing&&!r.ended&&r.length<=r.highWaterMark,d(t)}function j(t,r){r.readingMore||(r.readingMore=!0,w.nextTick(G,t,r))}function G(t,r){for(;!r.reading&&!r.ended&&(r.length<r.highWaterMark||r.flowing&&r.length===0);){var u=r.length;if(y("maybeReadMore read 0"),t.read(0),u===r.length)break}r.readingMore=!1}J.prototype._read=function(t){ie(this,new H("_read()"))},J.prototype.pipe=function(t,r){var u=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t);break}a.pipesCount+=1,y("pipe count=%d opts=%j",a.pipesCount,r);var i=(!r||r.end!==!1)&&t!==w.stdout&&t!==w.stderr,n=i?c:ce;a.endEmitted?w.nextTick(n):u.once("end",n),t.on("unpipe",e);function e(pe,ye){y("onunpipe"),pe===u&&ye&&ye.hasUnpiped===!1&&(ye.hasUnpiped=!0,te())}function c(){y("onend"),t.end()}var R=O(u);t.on("drain",R);var K=!1;function te(){y("cleanup"),t.removeListener("close",ue),t.removeListener("finish",de),t.removeListener("drain",R),t.removeListener("error",he),t.removeListener("unpipe",e),u.removeListener("end",c),u.removeListener("end",ce),u.removeListener("data",ae),K=!0,a.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&R()}u.on("data",ae);function ae(pe){y("ondata");var ye=t.write(pe);y("dest.write",ye),ye===!1&&((a.pipesCount===1&&a.pipes===t||a.pipesCount>1&&M(a.pipes,t)!==-1)&&!K&&(y("false write response, pause",a.awaitDrain),a.awaitDrain++),u.pause())}function he(pe){y("onerror",pe),ce(),t.removeListener("error",he),C(t,"error")===0&&ie(t,pe)}le(t,"error",he);function ue(){t.removeListener("finish",de),ce()}t.once("close",ue);function de(){y("onfinish"),t.removeListener("close",ue),ce()}t.once("finish",de);function ce(){y("unpipe"),u.unpipe(t)}return t.emit("pipe",u),a.flowing||(y("pipe resume"),u.resume()),t};function O(t){return function(){var u=t._readableState;y("pipeOnDrain",u.awaitDrain),u.awaitDrain&&u.awaitDrain--,u.awaitDrain===0&&C(t,"data")&&(u.flowing=!0,d(t))}}J.prototype.unpipe=function(t){var r=this._readableState,u={hasUnpiped:!1};if(r.pipesCount===0)return this;if(r.pipesCount===1)return t&&t!==r.pipes?this:(t||(t=r.pipes),r.pipes=null,r.pipesCount=0,r.flowing=!1,t&&t.emit("unpipe",this,u),this);if(!t){var a=r.pipes,i=r.pipesCount;r.pipes=null,r.pipesCount=0,r.flowing=!1;for(var n=0;n<i;n++)a[n].emit("unpipe",this,{hasUnpiped:!1});return this}var e=M(r.pipes,t);return e===-1?this:(r.pipes.splice(e,1),r.pipesCount-=1,r.pipesCount===1&&(r.pipes=r.pipes[0]),t.emit("unpipe",this,u),this)},J.prototype.on=function(t,r){var u=b.prototype.on.call(this,t,r),a=this._readableState;return t==="data"?(a.readableListening=this.listenerCount("readable")>0,a.flowing!==!1&&this.resume()):t==="readable"&&!a.endEmitted&&!a.readableListening&&(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,y("on readable",a.length,a.reading),a.length?$(this):a.reading||w.nextTick(m,this)),u},J.prototype.addListener=J.prototype.on,J.prototype.removeListener=function(t,r){var u=b.prototype.removeListener.call(this,t,r);return t==="readable"&&w.nextTick(D,this),u},J.prototype.removeAllListeners=function(t){var r=b.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&w.nextTick(D,this),r};function D(t){var r=t._readableState;r.readableListening=t.listenerCount("readable")>0,r.resumeScheduled&&!r.paused?r.flowing=!0:t.listenerCount("data")>0&&t.resume()}function m(t){y("readable nexttick read 0"),t.read(0)}J.prototype.resume=function(){var t=this._readableState;return t.flowing||(y("resume"),t.flowing=!t.readableListening,p(this,t)),t.paused=!1,this};function p(t,r){r.resumeScheduled||(r.resumeScheduled=!0,w.nextTick(B,t,r))}function B(t,r){y("resume",r.reading),r.reading||t.read(0),r.resumeScheduled=!1,t.emit("resume"),d(t),r.flowing&&!r.reading&&t.read(0)}J.prototype.pause=function(){return y("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(y("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function d(t){var r=t._readableState;for(y("flow",r.flowing);r.flowing&&t.read()!==null;);}J.prototype.wrap=function(t){var r=this,u=this._readableState,a=!1;t.on("end",function(){if(y("wrapped end"),u.decoder&&!u.ended){var e=u.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),t.on("data",function(e){if(y("wrapped data"),u.decoder&&(e=u.decoder.write(e)),!(u.objectMode&&e==null)&&!(!u.objectMode&&(!e||!e.length))){var c=r.push(e);c||(a=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=function(c){return function(){return t[c].apply(t,arguments)}}(i));for(var n=0;n<q.length;n++)t.on(q[n],this.emit.bind(this,q[n]));return this._read=function(e){y("wrapped _read",e),a&&(a=!1,t.resume())},this},typeof Symbol=="function"&&(J.prototype[Symbol.asyncIterator]=function(){return X===void 0&&(X=_(15749)),X(this)}),Object.defineProperty(J.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(J.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(J.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(r){this._readableState&&(this._readableState.flowing=r)}}),J._fromList=f,Object.defineProperty(J.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function f(t,r){if(r.length===0)return null;var u;return r.objectMode?u=r.buffer.shift():!t||t>=r.length?(r.decoder?u=r.buffer.join(""):r.buffer.length===1?u=r.buffer.first():u=r.buffer.concat(r.length),r.buffer.clear()):u=r.buffer.consume(t,r.decoder),u}function h(t){var r=t._readableState;y("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,w.nextTick(I,r,t))}function I(t,r){if(y("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,r.readable=!1,r.emit("end"),t.autoDestroy)){var u=r._writableState;(!u||u.autoDestroy&&u.finished)&&r.destroy()}}typeof Symbol=="function"&&(J.from=function(t,r){return W===void 0&&(W=_(38869)),W(J,t,r)});function M(t,r){for(var u=0,a=t.length;u<a;u++)if(t[u]===r)return u;return-1}},14059:function(Q,Y,_){"use strict";Q.exports=l;var w=_(52898).q,x=w.ERR_METHOD_NOT_IMPLEMENTED,L=w.ERR_MULTIPLE_CALLBACK,C=w.ERR_TRANSFORM_ALREADY_TRANSFORMING,b=w.ERR_TRANSFORM_WITH_LENGTH_0,o=_(6510);_(35717)(l,o);function s(y,P){var g=this._transformState;g.transforming=!1;var v=g.writecb;if(v===null)return this.emit("error",new L);g.writechunk=null,g.writecb=null,P!=null&&this.push(P),v(y);var S=this._readableState;S.reading=!1,(S.needReadable||S.length<S.highWaterMark)&&this._read(S.highWaterMark)}function l(y){if(!(this instanceof l))return new l(y);o.call(this,y),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,y&&(typeof y.transform=="function"&&(this._transform=y.transform),typeof y.flush=="function"&&(this._flush=y.flush)),this.on("prefinish",E)}function E(){var y=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(P,g){A(y,P,g)}):A(this,null,null)}l.prototype.push=function(y,P){return this._transformState.needTransform=!1,o.prototype.push.call(this,y,P)},l.prototype._transform=function(y,P,g){g(new x("_transform()"))},l.prototype._write=function(y,P,g){var v=this._transformState;if(v.writecb=g,v.writechunk=y,v.writeencoding=P,!v.transforming){var S=this._readableState;(v.needTransform||S.needReadable||S.length<S.highWaterMark)&&this._read(S.highWaterMark)}},l.prototype._read=function(y){var P=this._transformState;P.writechunk!==null&&!P.transforming?(P.transforming=!0,this._transform(P.writechunk,P.writeencoding,P.afterTransform)):P.needTransform=!0},l.prototype._destroy=function(y,P){o.prototype._destroy.call(this,y,function(g){P(g)})};function A(y,P,g){if(P)return y.emit("error",P);if(g!=null&&y.push(g),y._writableState.length)throw new b;if(y._transformState.transforming)throw new C;return y.push(null)}},79850:function(Q,Y,_){"use strict";var w=_(34155);Q.exports=ne;function x(d,f,h){this.chunk=d,this.encoding=f,this.callback=h,this.next=null}function L(d){var f=this;this.next=null,this.entry=null,this.finish=function(){B(f,d)}}var C;ne.WritableState=q;var b={deprecate:_(94927)},o=_(79853),s=_(58478).Buffer,l=_.g.Uint8Array||function(){};function E(d){return s.from(d)}function A(d){return s.isBuffer(d)||d instanceof l}var y=_(12214),P=_(48425),g=P.getHighWaterMark,v=_(52898).q,S=v.ERR_INVALID_ARG_TYPE,T=v.ERR_METHOD_NOT_IMPLEMENTED,U=v.ERR_MULTIPLE_CALLBACK,N=v.ERR_STREAM_CANNOT_PIPE,H=v.ERR_STREAM_DESTROYED,V=v.ERR_STREAM_NULL_VALUES,k=v.ERR_STREAM_WRITE_AFTER_END,X=v.ERR_UNKNOWN_ENCODING,W=y.errorOrDestroy;_(35717)(ne,o);function ie(){}function q(d,f,h){C=C||_(6510),d=d||{},typeof h!="boolean"&&(h=f instanceof C),this.objectMode=!!d.objectMode,h&&(this.objectMode=this.objectMode||!!d.writableObjectMode),this.highWaterMark=g(this,d,"writableHighWaterMark",h),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var I=d.decodeStrings===!1;this.decodeStrings=!I,this.defaultEncoding=d.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(M){oe(f,M)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=d.emitClose!==!1,this.autoDestroy=!!d.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new L(this)}q.prototype.getBuffer=function(){for(var f=this.bufferedRequest,h=[];f;)h.push(f),f=f.next;return h},function(){try{Object.defineProperty(q.prototype,"buffer",{get:b.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(d){}}();var le;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(le=Function.prototype[Symbol.hasInstance],Object.defineProperty(ne,Symbol.hasInstance,{value:function(f){return le.call(this,f)?!0:this!==ne?!1:f&&f._writableState instanceof q}})):le=function(f){return f instanceof this};function ne(d){C=C||_(6510);var f=this instanceof C;if(!f&&!le.call(ne,this))return new ne(d);this._writableState=new q(d,this,f),this.writable=!0,d&&(typeof d.write=="function"&&(this._write=d.write),typeof d.writev=="function"&&(this._writev=d.writev),typeof d.destroy=="function"&&(this._destroy=d.destroy),typeof d.final=="function"&&(this._final=d.final)),o.call(this)}ne.prototype.pipe=function(){W(this,new N)};function J(d,f){var h=new k;W(d,h),w.nextTick(f,h)}function z(d,f,h,I){var M;return h===null?M=new V:typeof h!="string"&&!f.objectMode&&(M=new S("chunk",["string","Buffer"],h)),M?(W(d,M),w.nextTick(I,M),!1):!0}ne.prototype.write=function(d,f,h){var I=this._writableState,M=!1,t=!I.objectMode&&A(d);return t&&!s.isBuffer(d)&&(d=E(d)),typeof f=="function"&&(h=f,f=null),t?f="buffer":f||(f=I.defaultEncoding),typeof h!="function"&&(h=ie),I.ending?J(this,h):(t||z(this,I,d,h))&&(I.pendingcb++,M=ee(this,I,t,d,f,h)),M},ne.prototype.cork=function(){this._writableState.corked++},ne.prototype.uncork=function(){var d=this._writableState;d.corked&&(d.corked--,!d.writing&&!d.corked&&!d.bufferProcessing&&d.bufferedRequest&&j(this,d))},ne.prototype.setDefaultEncoding=function(f){if(typeof f=="string"&&(f=f.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((f+"").toLowerCase())>-1))throw new X(f);return this._writableState.defaultEncoding=f,this},Object.defineProperty(ne.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function F(d,f,h){return!d.objectMode&&d.decodeStrings!==!1&&typeof f=="string"&&(f=s.from(f,h)),f}Object.defineProperty(ne.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ee(d,f,h,I,M,t){if(!h){var r=F(f,I,M);I!==r&&(h=!0,M="buffer",I=r)}var u=f.objectMode?1:I.length;f.length+=u;var a=f.length<f.highWaterMark;if(a||(f.needDrain=!0),f.writing||f.corked){var i=f.lastBufferedRequest;f.lastBufferedRequest={chunk:I,encoding:M,isBuf:h,callback:t,next:null},i?i.next=f.lastBufferedRequest:f.bufferedRequest=f.lastBufferedRequest,f.bufferedRequestCount+=1}else Z(d,f,!1,u,I,M,t);return a}function Z(d,f,h,I,M,t,r){f.writelen=I,f.writecb=r,f.writing=!0,f.sync=!0,f.destroyed?f.onwrite(new H("write")):h?d._writev(M,f.onwrite):d._write(M,t,f.onwrite),f.sync=!1}function fe(d,f,h,I,M){--f.pendingcb,h?(w.nextTick(M,I),w.nextTick(m,d,f),d._writableState.errorEmitted=!0,W(d,I)):(M(I),d._writableState.errorEmitted=!0,W(d,I),m(d,f))}function se(d){d.writing=!1,d.writecb=null,d.length-=d.writelen,d.writelen=0}function oe(d,f){var h=d._writableState,I=h.sync,M=h.writecb;if(typeof M!="function")throw new U;if(se(h),f)fe(d,h,I,f,M);else{var t=G(h)||d.destroyed;!t&&!h.corked&&!h.bufferProcessing&&h.bufferedRequest&&j(d,h),I?w.nextTick($,d,h,t,M):$(d,h,t,M)}}function $(d,f,h,I){h||re(d,f),f.pendingcb--,I(),m(d,f)}function re(d,f){f.length===0&&f.needDrain&&(f.needDrain=!1,d.emit("drain"))}function j(d,f){f.bufferProcessing=!0;var h=f.bufferedRequest;if(d._writev&&h&&h.next){var I=f.bufferedRequestCount,M=new Array(I),t=f.corkedRequestsFree;t.entry=h;for(var r=0,u=!0;h;)M[r]=h,h.isBuf||(u=!1),h=h.next,r+=1;M.allBuffers=u,Z(d,f,!0,f.length,M,"",t.finish),f.pendingcb++,f.lastBufferedRequest=null,t.next?(f.corkedRequestsFree=t.next,t.next=null):f.corkedRequestsFree=new L(f),f.bufferedRequestCount=0}else{for(;h;){var a=h.chunk,i=h.encoding,n=h.callback,e=f.objectMode?1:a.length;if(Z(d,f,!1,e,a,i,n),h=h.next,f.bufferedRequestCount--,f.writing)break}h===null&&(f.lastBufferedRequest=null)}f.bufferedRequest=h,f.bufferProcessing=!1}ne.prototype._write=function(d,f,h){h(new T("_write()"))},ne.prototype._writev=null,ne.prototype.end=function(d,f,h){var I=this._writableState;return typeof d=="function"?(h=d,d=null,f=null):typeof f=="function"&&(h=f,f=null),d!=null&&this.write(d,f),I.corked&&(I.corked=1,this.uncork()),I.ending||p(this,I,h),this},Object.defineProperty(ne.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function G(d){return d.ending&&d.length===0&&d.bufferedRequest===null&&!d.finished&&!d.writing}function O(d,f){d._final(function(h){f.pendingcb--,h&&W(d,h),f.prefinished=!0,d.emit("prefinish"),m(d,f)})}function D(d,f){!f.prefinished&&!f.finalCalled&&(typeof d._final=="function"&&!f.destroyed?(f.pendingcb++,f.finalCalled=!0,w.nextTick(O,d,f)):(f.prefinished=!0,d.emit("prefinish")))}function m(d,f){var h=G(f);if(h&&(D(d,f),f.pendingcb===0&&(f.finished=!0,d.emit("finish"),f.autoDestroy))){var I=d._readableState;(!I||I.autoDestroy&&I.endEmitted)&&d.destroy()}return h}function p(d,f,h){f.ending=!0,m(d,f),h&&(f.finished?w.nextTick(h):d.once("finish",h)),f.ended=!0,d.writable=!1}function B(d,f,h){var I=d.entry;for(d.entry=null;I;){var M=I.callback;f.pendingcb--,M(h),I=I.next}f.corkedRequestsFree.next=d}Object.defineProperty(ne.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(f){!this._writableState||(this._writableState.destroyed=f)}}),ne.prototype.destroy=y.destroy,ne.prototype._undestroy=y.undestroy,ne.prototype._destroy=function(d,f){f(d)}},15749:function(Q,Y,_){"use strict";var w=_(34155),x;function L(H,V,k){return V in H?Object.defineProperty(H,V,{value:k,enumerable:!0,configurable:!0,writable:!0}):H[V]=k,H}var C=_(37810),b=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),l=Symbol("ended"),E=Symbol("lastPromise"),A=Symbol("handlePromise"),y=Symbol("stream");function P(H,V){return{value:H,done:V}}function g(H){var V=H[b];if(V!==null){var k=H[y].read();k!==null&&(H[E]=null,H[b]=null,H[o]=null,V(P(k,!1)))}}function v(H){w.nextTick(g,H)}function S(H,V){return function(k,X){H.then(function(){if(V[l]){k(P(void 0,!0));return}V[A](k,X)},X)}}var T=Object.getPrototypeOf(function(){}),U=Object.setPrototypeOf((x={get stream(){return this[y]},next:function(){var V=this,k=this[s];if(k!==null)return Promise.reject(k);if(this[l])return Promise.resolve(P(void 0,!0));if(this[y].destroyed)return new Promise(function(q,le){w.nextTick(function(){V[s]?le(V[s]):q(P(void 0,!0))})});var X=this[E],W;if(X)W=new Promise(S(X,this));else{var ie=this[y].read();if(ie!==null)return Promise.resolve(P(ie,!1));W=new Promise(this[A])}return this[E]=W,W}},L(x,Symbol.asyncIterator,function(){return this}),L(x,"return",function(){var V=this;return new Promise(function(k,X){V[y].destroy(null,function(W){if(W){X(W);return}k(P(void 0,!0))})})}),x),T),N=function(V){var k,X=Object.create(U,(k={},L(k,y,{value:V,writable:!0}),L(k,b,{value:null,writable:!0}),L(k,o,{value:null,writable:!0}),L(k,s,{value:null,writable:!0}),L(k,l,{value:V._readableState.endEmitted,writable:!0}),L(k,A,{value:function(ie,q){var le=X[y].read();le?(X[E]=null,X[b]=null,X[o]=null,ie(P(le,!1))):(X[b]=ie,X[o]=q)},writable:!0}),k));return X[E]=null,C(V,function(W){if(W&&W.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ie=X[o];ie!==null&&(X[E]=null,X[b]=null,X[o]=null,ie(W)),X[s]=W;return}var q=X[b];q!==null&&(X[E]=null,X[b]=null,X[o]=null,q(P(void 0,!0))),X[l]=!0}),V.on("readable",v.bind(null,X)),X};Q.exports=N},35770:function(Q,Y,_){"use strict";function w(g,v){var S=Object.keys(g);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(g);v&&(T=T.filter(function(U){return Object.getOwnPropertyDescriptor(g,U).enumerable})),S.push.apply(S,T)}return S}function x(g){for(var v=1;v<arguments.length;v++){var S=arguments[v]!=null?arguments[v]:{};v%2?w(Object(S),!0).forEach(function(T){L(g,T,S[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(S)):w(Object(S)).forEach(function(T){Object.defineProperty(g,T,Object.getOwnPropertyDescriptor(S,T))})}return g}function L(g,v,S){return v in g?Object.defineProperty(g,v,{value:S,enumerable:!0,configurable:!0,writable:!0}):g[v]=S,g}function C(g,v){if(!(g instanceof v))throw new TypeError("Cannot call a class as a function")}function b(g,v){for(var S=0;S<v.length;S++){var T=v[S];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(g,T.key,T)}}function o(g,v,S){return v&&b(g.prototype,v),S&&b(g,S),g}var s=_(58478),l=s.Buffer,E=_(40498),A=E.inspect,y=A&&A.custom||"inspect";function P(g,v,S){l.prototype.copy.call(g,v,S)}Q.exports=function(){function g(){C(this,g),this.head=null,this.tail=null,this.length=0}return o(g,[{key:"push",value:function(S){var T={data:S,next:null};this.length>0?this.tail.next=T:this.head=T,this.tail=T,++this.length}},{key:"unshift",value:function(S){var T={data:S,next:this.head};this.length===0&&(this.tail=T),this.head=T,++this.length}},{key:"shift",value:function(){if(this.length!==0){var S=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,S}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(S){if(this.length===0)return"";for(var T=this.head,U=""+T.data;T=T.next;)U+=S+T.data;return U}},{key:"concat",value:function(S){if(this.length===0)return l.alloc(0);for(var T=l.allocUnsafe(S>>>0),U=this.head,N=0;U;)P(U.data,T,N),N+=U.data.length,U=U.next;return T}},{key:"consume",value:function(S,T){var U;return S<this.head.data.length?(U=this.head.data.slice(0,S),this.head.data=this.head.data.slice(S)):S===this.head.data.length?U=this.shift():U=T?this._getString(S):this._getBuffer(S),U}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(S){var T=this.head,U=1,N=T.data;for(S-=N.length;T=T.next;){var H=T.data,V=S>H.length?H.length:S;if(V===H.length?N+=H:N+=H.slice(0,S),S-=V,S===0){V===H.length?(++U,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=H.slice(V));break}++U}return this.length-=U,N}},{key:"_getBuffer",value:function(S){var T=l.allocUnsafe(S),U=this.head,N=1;for(U.data.copy(T),S-=U.data.length;U=U.next;){var H=U.data,V=S>H.length?H.length:S;if(H.copy(T,T.length-S,0,V),S-=V,S===0){V===H.length?(++N,U.next?this.head=U.next:this.head=this.tail=null):(this.head=U,U.data=H.slice(V));break}++N}return this.length-=N,T}},{key:y,value:function(S,T){return A(this,x({},T,{depth:0,customInspect:!1}))}}]),g}()},12214:function(Q,Y,_){"use strict";var w=_(34155);function x(l,E){var A=this,y=this._readableState&&this._readableState.destroyed,P=this._writableState&&this._writableState.destroyed;return y||P?(E?E(l):l&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,w.nextTick(o,this,l)):w.nextTick(o,this,l)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(g){!E&&g?A._writableState?A._writableState.errorEmitted?w.nextTick(C,A):(A._writableState.errorEmitted=!0,w.nextTick(L,A,g)):w.nextTick(L,A,g):E?(w.nextTick(C,A),E(g)):w.nextTick(C,A)}),this)}function L(l,E){o(l,E),C(l)}function C(l){l._writableState&&!l._writableState.emitClose||l._readableState&&!l._readableState.emitClose||l.emit("close")}function b(){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 o(l,E){l.emit("error",E)}function s(l,E){var A=l._readableState,y=l._writableState;A&&A.autoDestroy||y&&y.autoDestroy?l.destroy(E):l.emit("error",E)}Q.exports={destroy:x,undestroy:b,errorOrDestroy:s}},37810:function(Q,Y,_){"use strict";var w=_(52898).q.ERR_STREAM_PREMATURE_CLOSE;function x(o){var s=!1;return function(){if(!s){s=!0;for(var l=arguments.length,E=new Array(l),A=0;A<l;A++)E[A]=arguments[A];o.apply(this,E)}}}function L(){}function C(o){return o.setHeader&&typeof o.abort=="function"}function b(o,s,l){if(typeof s=="function")return b(o,null,s);s||(s={}),l=x(l||L);var E=s.readable||s.readable!==!1&&o.readable,A=s.writable||s.writable!==!1&&o.writable,y=function(){o.writable||g()},P=o._writableState&&o._writableState.finished,g=function(){A=!1,P=!0,E||l.call(o)},v=o._readableState&&o._readableState.endEmitted,S=function(){E=!1,v=!0,A||l.call(o)},T=function(V){l.call(o,V)},U=function(){var V;if(E&&!v)return(!o._readableState||!o._readableState.ended)&&(V=new w),l.call(o,V);if(A&&!P)return(!o._writableState||!o._writableState.ended)&&(V=new w),l.call(o,V)},N=function(){o.req.on("finish",g)};return C(o)?(o.on("complete",g),o.on("abort",U),o.req?N():o.on("request",N)):A&&!o._writableState&&(o.on("end",y),o.on("close",y)),o.on("end",S),o.on("finish",g),s.error!==!1&&o.on("error",T),o.on("close",U),function(){o.removeListener("complete",g),o.removeListener("abort",U),o.removeListener("request",N),o.req&&o.req.removeListener("finish",g),o.removeListener("end",y),o.removeListener("close",y),o.removeListener("finish",g),o.removeListener("end",S),o.removeListener("error",T),o.removeListener("close",U)}}Q.exports=b},38869:function(Q){Q.exports=function(){throw new Error("Readable.from is not available in the browser")}},66300:function(Q,Y,_){"use strict";var w;function x(g){var v=!1;return function(){v||(v=!0,g.apply(void 0,arguments))}}var L=_(52898).q,C=L.ERR_MISSING_ARGS,b=L.ERR_STREAM_DESTROYED;function o(g){if(g)throw g}function s(g){return g.setHeader&&typeof g.abort=="function"}function l(g,v,S,T){T=x(T);var U=!1;g.on("close",function(){U=!0}),w===void 0&&(w=_(37810)),w(g,{readable:v,writable:S},function(H){if(H)return T(H);U=!0,T()});var N=!1;return function(H){if(!U&&!N){if(N=!0,s(g))return g.abort();if(typeof g.destroy=="function")return g.destroy();T(H||new b("pipe"))}}}function E(g){g()}function A(g,v){return g.pipe(v)}function y(g){return!g.length||typeof g[g.length-1]!="function"?o:g.pop()}function P(){for(var g=arguments.length,v=new Array(g),S=0;S<g;S++)v[S]=arguments[S];var T=y(v);if(Array.isArray(v[0])&&(v=v[0]),v.length<2)throw new C("streams");var U,N=v.map(function(H,V){var k=V<v.length-1,X=V>0;return l(H,k,X,function(W){U||(U=W),W&&N.forEach(E),!k&&(N.forEach(E),T(U))})});return v.reduce(A)}Q.exports=P},48425:function(Q,Y,_){"use strict";var w=_(52898).q.ERR_INVALID_OPT_VALUE;function x(C,b,o){return C.highWaterMark!=null?C.highWaterMark:b?C[o]:null}function L(C,b,o,s){var l=x(b,s,o);if(l!=null){if(!(isFinite(l)&&Math.floor(l)===l)||l<0){var E=s?o:"highWaterMark";throw new w(E,l)}return Math.floor(l)}return C.objectMode?16:16*1024}Q.exports={getHighWaterMark:L}},79853:function(Q,Y,_){Q.exports=_(17187).EventEmitter},28850:function(Q,Y,_){Y=Q.exports=_(42813),Y.Stream=Y,Y.Readable=Y,Y.Writable=_(79850),Y.Duplex=_(6510),Y.Transform=_(14059),Y.PassThrough=_(4586),Y.finished=_(37810),Y.pipeline=_(66300)},48764:function(Q,Y,_){"use strict";/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/var w=_(79742),x=_(80645),L=_(5826);Y.Buffer=s,Y.SlowBuffer=U,Y.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=_.g.TYPED_ARRAY_SUPPORT!==void 0?_.g.TYPED_ARRAY_SUPPORT:C(),Y.kMaxLength=b();function C(){try{var i=new Uint8Array(1);return i.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},i.foo()===42&&typeof i.subarray=="function"&&i.subarray(1,1).byteLength===0}catch(n){return!1}}function b(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(i,n){if(b()<n)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(i=new Uint8Array(n),i.__proto__=s.prototype):(i===null&&(i=new s(n)),i.length=n),i}function s(i,n,e){if(!s.TYPED_ARRAY_SUPPORT&&!(this instanceof s))return new s(i,n,e);if(typeof i=="number"){if(typeof n=="string")throw new Error("If encoding is specified then the first argument must be a string");return y(this,i)}return l(this,i,n,e)}s.poolSize=8192,s._augment=function(i){return i.__proto__=s.prototype,i};function l(i,n,e,c){if(typeof n=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&n instanceof ArrayBuffer?v(i,n,e,c):typeof n=="string"?P(i,n,e):S(i,n)}s.from=function(i,n,e){return l(null,i,n,e)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0}));function E(i){if(typeof i!="number")throw new TypeError('"size" argument must be a number');if(i<0)throw new RangeError('"size" argument must not be negative')}function A(i,n,e,c){return E(n),n<=0?o(i,n):e!==void 0?typeof c=="string"?o(i,n).fill(e,c):o(i,n).fill(e):o(i,n)}s.alloc=function(i,n,e){return A(null,i,n,e)};function y(i,n){if(E(n),i=o(i,n<0?0:T(n)|0),!s.TYPED_ARRAY_SUPPORT)for(var e=0;e<n;++e)i[e]=0;return i}s.allocUnsafe=function(i){return y(null,i)},s.allocUnsafeSlow=function(i){return y(null,i)};function P(i,n,e){if((typeof e!="string"||e==="")&&(e="utf8"),!s.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var c=N(n,e)|0;i=o(i,c);var R=i.write(n,e);return R!==c&&(i=i.slice(0,R)),i}function g(i,n){var e=n.length<0?0:T(n.length)|0;i=o(i,e);for(var c=0;c<e;c+=1)i[c]=n[c]&255;return i}function v(i,n,e,c){if(n.byteLength,e<0||n.byteLength<e)throw new RangeError("'offset' is out of bounds");if(n.byteLength<e+(c||0))throw new RangeError("'length' is out of bounds");return e===void 0&&c===void 0?n=new Uint8Array(n):c===void 0?n=new Uint8Array(n,e):n=new Uint8Array(n,e,c),s.TYPED_ARRAY_SUPPORT?(i=n,i.__proto__=s.prototype):i=g(i,n),i}function S(i,n){if(s.isBuffer(n)){var e=T(n.length)|0;return i=o(i,e),i.length===0||n.copy(i,0,0,e),i}if(n){if(typeof ArrayBuffer!="undefined"&&n.buffer instanceof ArrayBuffer||"length"in n)return typeof n.length!="number"||a(n.length)?o(i,0):g(i,n);if(n.type==="Buffer"&&L(n.data))return g(i,n.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function T(i){if(i>=b())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+b().toString(16)+" bytes");return i|0}function U(i){return+i!=i&&(i=0),s.alloc(+i)}s.isBuffer=function(n){return!!(n!=null&&n._isBuffer)},s.compare=function(n,e){if(!s.isBuffer(n)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(n===e)return 0;for(var c=n.length,R=e.length,K=0,te=Math.min(c,R);K<te;++K)if(n[K]!==e[K]){c=n[K],R=e[K];break}return c<R?-1:R<c?1:0},s.isEncoding=function(n){switch(String(n).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(n,e){if(!L(n))throw new TypeError('"list" argument must be an Array of Buffers');if(n.length===0)return s.alloc(0);var c;if(e===void 0)for(e=0,c=0;c<n.length;++c)e+=n[c].length;var R=s.allocUnsafe(e),K=0;for(c=0;c<n.length;++c){var te=n[c];if(!s.isBuffer(te))throw new TypeError('"list" argument must be an Array of Buffers');te.copy(R,K),K+=te.length}return R};function N(i,n){if(s.isBuffer(i))return i.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(i)||i instanceof ArrayBuffer))return i.byteLength;typeof i!="string"&&(i=""+i);var e=i.length;if(e===0)return 0;for(var c=!1;;)switch(n){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return I(i).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return r(i).length;default:if(c)return I(i).length;n=(""+n).toLowerCase(),c=!0}}s.byteLength=N;function H(i,n,e){var c=!1;if((n===void 0||n<0)&&(n=0),n>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,n>>>=0,e<=n))return"";for(i||(i="utf8");;)switch(i){case"hex":return oe(this,n,e);case"utf8":case"utf-8":return F(this,n,e);case"ascii":return fe(this,n,e);case"latin1":case"binary":return se(this,n,e);case"base64":return z(this,n,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,n,e);default:if(c)throw new TypeError("Unknown encoding: "+i);i=(i+"").toLowerCase(),c=!0}}s.prototype._isBuffer=!0;function V(i,n,e){var c=i[n];i[n]=i[e],i[e]=c}s.prototype.swap16=function(){var n=this.length;if(n%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<n;e+=2)V(this,e,e+1);return this},s.prototype.swap32=function(){var n=this.length;if(n%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<n;e+=4)V(this,e,e+3),V(this,e+1,e+2);return this},s.prototype.swap64=function(){var n=this.length;if(n%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<n;e+=8)V(this,e,e+7),V(this,e+1,e+6),V(this,e+2,e+5),V(this,e+3,e+4);return this},s.prototype.toString=function(){var n=this.length|0;return n===0?"":arguments.length===0?F(this,0,n):H.apply(this,arguments)},s.prototype.equals=function(n){if(!s.isBuffer(n))throw new TypeError("Argument must be a Buffer");return this===n?!0:s.compare(this,n)===0},s.prototype.inspect=function(){var n="",e=Y.INSPECT_MAX_BYTES;return this.length>0&&(n=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(n+=" ... ")),"<Buffer "+n+">"},s.prototype.compare=function(n,e,c,R,K){if(!s.isBuffer(n))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),c===void 0&&(c=n?n.length:0),R===void 0&&(R=0),K===void 0&&(K=this.length),e<0||c>n.length||R<0||K>this.length)throw new RangeError("out of range index");if(R>=K&&e>=c)return 0;if(R>=K)return-1;if(e>=c)return 1;if(e>>>=0,c>>>=0,R>>>=0,K>>>=0,this===n)return 0;for(var te=K-R,ae=c-e,he=Math.min(te,ae),ue=this.slice(R,K),de=n.slice(e,c),ce=0;ce<he;++ce)if(ue[ce]!==de[ce]){te=ue[ce],ae=de[ce];break}return te<ae?-1:ae<te?1:0};function k(i,n,e,c,R){if(i.length===0)return-1;if(typeof e=="string"?(c=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=R?0:i.length-1),e<0&&(e=i.length+e),e>=i.length){if(R)return-1;e=i.length-1}else if(e<0)if(R)e=0;else return-1;if(typeof n=="string"&&(n=s.from(n,c)),s.isBuffer(n))return n.length===0?-1:X(i,n,e,c,R);if(typeof n=="number")return n=n&255,s.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?R?Uint8Array.prototype.indexOf.call(i,n,e):Uint8Array.prototype.lastIndexOf.call(i,n,e):X(i,[n],e,c,R);throw new TypeError("val must be string, number or Buffer")}function X(i,n,e,c,R){var K=1,te=i.length,ae=n.length;if(c!==void 0&&(c=String(c).toLowerCase(),c==="ucs2"||c==="ucs-2"||c==="utf16le"||c==="utf-16le")){if(i.length<2||n.length<2)return-1;K=2,te/=2,ae/=2,e/=2}function he(ye,ve){return K===1?ye[ve]:ye.readUInt16BE(ve*K)}var ue;if(R){var de=-1;for(ue=e;ue<te;ue++)if(he(i,ue)===he(n,de===-1?0:ue-de)){if(de===-1&&(de=ue),ue-de+1===ae)return de*K}else de!==-1&&(ue-=ue-de),de=-1}else for(e+ae>te&&(e=te-ae),ue=e;ue>=0;ue--){for(var ce=!0,pe=0;pe<ae;pe++)if(he(i,ue+pe)!==he(n,pe)){ce=!1;break}if(ce)return ue}return-1}s.prototype.includes=function(n,e,c){return this.indexOf(n,e,c)!==-1},s.prototype.indexOf=function(n,e,c){return k(this,n,e,c,!0)},s.prototype.lastIndexOf=function(n,e,c){return k(this,n,e,c,!1)};function W(i,n,e,c){e=Number(e)||0;var R=i.length-e;c?(c=Number(c),c>R&&(c=R)):c=R;var K=n.length;if(K%2!=0)throw new TypeError("Invalid hex string");c>K/2&&(c=K/2);for(var te=0;te<c;++te){var ae=parseInt(n.substr(te*2,2),16);if(isNaN(ae))return te;i[e+te]=ae}return te}function ie(i,n,e,c){return u(I(n,i.length-e),i,e,c)}function q(i,n,e,c){return u(M(n),i,e,c)}function le(i,n,e,c){return q(i,n,e,c)}function ne(i,n,e,c){return u(r(n),i,e,c)}function J(i,n,e,c){return u(t(n,i.length-e),i,e,c)}s.prototype.write=function(n,e,c,R){if(e===void 0)R="utf8",c=this.length,e=0;else if(c===void 0&&typeof e=="string")R=e,c=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(c)?(c=c|0,R===void 0&&(R="utf8")):(R=c,c=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var K=this.length-e;if((c===void 0||c>K)&&(c=K),n.length>0&&(c<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");R||(R="utf8");for(var te=!1;;)switch(R){case"hex":return W(this,n,e,c);case"utf8":case"utf-8":return ie(this,n,e,c);case"ascii":return q(this,n,e,c);case"latin1":case"binary":return le(this,n,e,c);case"base64":return ne(this,n,e,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,n,e,c);default:if(te)throw new TypeError("Unknown encoding: "+R);R=(""+R).toLowerCase(),te=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function z(i,n,e){return n===0&&e===i.length?w.fromByteArray(i):w.fromByteArray(i.slice(n,e))}function F(i,n,e){e=Math.min(i.length,e);for(var c=[],R=n;R<e;){var K=i[R],te=null,ae=K>239?4:K>223?3:K>191?2:1;if(R+ae<=e){var he,ue,de,ce;switch(ae){case 1:K<128&&(te=K);break;case 2:he=i[R+1],(he&192)==128&&(ce=(K&31)<<6|he&63,ce>127&&(te=ce));break;case 3:he=i[R+1],ue=i[R+2],(he&192)==128&&(ue&192)==128&&(ce=(K&15)<<12|(he&63)<<6|ue&63,ce>2047&&(ce<55296||ce>57343)&&(te=ce));break;case 4:he=i[R+1],ue=i[R+2],de=i[R+3],(he&192)==128&&(ue&192)==128&&(de&192)==128&&(ce=(K&15)<<18|(he&63)<<12|(ue&63)<<6|de&63,ce>65535&&ce<1114112&&(te=ce))}}te===null?(te=65533,ae=1):te>65535&&(te-=65536,c.push(te>>>10&1023|55296),te=56320|te&1023),c.push(te),R+=ae}return Z(c)}var ee=4096;function Z(i){var n=i.length;if(n<=ee)return String.fromCharCode.apply(String,i);for(var e="",c=0;c<n;)e+=String.fromCharCode.apply(String,i.slice(c,c+=ee));return e}function fe(i,n,e){var c="";e=Math.min(i.length,e);for(var R=n;R<e;++R)c+=String.fromCharCode(i[R]&127);return c}function se(i,n,e){var c="";e=Math.min(i.length,e);for(var R=n;R<e;++R)c+=String.fromCharCode(i[R]);return c}function oe(i,n,e){var c=i.length;(!n||n<0)&&(n=0),(!e||e<0||e>c)&&(e=c);for(var R="",K=n;K<e;++K)R+=h(i[K]);return R}function $(i,n,e){for(var c=i.slice(n,e),R="",K=0;K<c.length;K+=2)R+=String.fromCharCode(c[K]+c[K+1]*256);return R}s.prototype.slice=function(n,e){var c=this.length;n=~~n,e=e===void 0?c:~~e,n<0?(n+=c,n<0&&(n=0)):n>c&&(n=c),e<0?(e+=c,e<0&&(e=0)):e>c&&(e=c),e<n&&(e=n);var R;if(s.TYPED_ARRAY_SUPPORT)R=this.subarray(n,e),R.__proto__=s.prototype;else{var K=e-n;R=new s(K,void 0);for(var te=0;te<K;++te)R[te]=this[te+n]}return R};function re(i,n,e){if(i%1!=0||i<0)throw new RangeError("offset is not uint");if(i+n>e)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUIntLE=function(n,e,c){n=n|0,e=e|0,c||re(n,e,this.length);for(var R=this[n],K=1,te=0;++te<e&&(K*=256);)R+=this[n+te]*K;return R},s.prototype.readUIntBE=function(n,e,c){n=n|0,e=e|0,c||re(n,e,this.length);for(var R=this[n+--e],K=1;e>0&&(K*=256);)R+=this[n+--e]*K;return R},s.prototype.readUInt8=function(n,e){return e||re(n,1,this.length),this[n]},s.prototype.readUInt16LE=function(n,e){return e||re(n,2,this.length),this[n]|this[n+1]<<8},s.prototype.readUInt16BE=function(n,e){return e||re(n,2,this.length),this[n]<<8|this[n+1]},s.prototype.readUInt32LE=function(n,e){return e||re(n,4,this.length),(this[n]|this[n+1]<<8|this[n+2]<<16)+this[n+3]*16777216},s.prototype.readUInt32BE=function(n,e){return e||re(n,4,this.length),this[n]*16777216+(this[n+1]<<16|this[n+2]<<8|this[n+3])},s.prototype.readIntLE=function(n,e,c){n=n|0,e=e|0,c||re(n,e,this.length);for(var R=this[n],K=1,te=0;++te<e&&(K*=256);)R+=this[n+te]*K;return K*=128,R>=K&&(R-=Math.pow(2,8*e)),R},s.prototype.readIntBE=function(n,e,c){n=n|0,e=e|0,c||re(n,e,this.length);for(var R=e,K=1,te=this[n+--R];R>0&&(K*=256);)te+=this[n+--R]*K;return K*=128,te>=K&&(te-=Math.pow(2,8*e)),te},s.prototype.readInt8=function(n,e){return e||re(n,1,this.length),this[n]&128?(255-this[n]+1)*-1:this[n]},s.prototype.readInt16LE=function(n,e){e||re(n,2,this.length);var c=this[n]|this[n+1]<<8;return c&32768?c|4294901760:c},s.prototype.readInt16BE=function(n,e){e||re(n,2,this.length);var c=this[n+1]|this[n]<<8;return c&32768?c|4294901760:c},s.prototype.readInt32LE=function(n,e){return e||re(n,4,this.length),this[n]|this[n+1]<<8|this[n+2]<<16|this[n+3]<<24},s.prototype.readInt32BE=function(n,e){return e||re(n,4,this.length),this[n]<<24|this[n+1]<<16|this[n+2]<<8|this[n+3]},s.prototype.readFloatLE=function(n,e){return e||re(n,4,this.length),x.read(this,n,!0,23,4)},s.prototype.readFloatBE=function(n,e){return e||re(n,4,this.length),x.read(this,n,!1,23,4)},s.prototype.readDoubleLE=function(n,e){return e||re(n,8,this.length),x.read(this,n,!0,52,8)},s.prototype.readDoubleBE=function(n,e){return e||re(n,8,this.length),x.read(this,n,!1,52,8)};function j(i,n,e,c,R,K){if(!s.isBuffer(i))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>R||n<K)throw new RangeError('"value" argument is out of bounds');if(e+c>i.length)throw new RangeError("Index out of range")}s.prototype.writeUIntLE=function(n,e,c,R){if(n=+n,e=e|0,c=c|0,!R){var K=Math.pow(2,8*c)-1;j(this,n,e,c,K,0)}var te=1,ae=0;for(this[e]=n&255;++ae<c&&(te*=256);)this[e+ae]=n/te&255;return e+c},s.prototype.writeUIntBE=function(n,e,c,R){if(n=+n,e=e|0,c=c|0,!R){var K=Math.pow(2,8*c)-1;j(this,n,e,c,K,0)}var te=c-1,ae=1;for(this[e+te]=n&255;--te>=0&&(ae*=256);)this[e+te]=n/ae&255;return e+c},s.prototype.writeUInt8=function(n,e,c){return n=+n,e=e|0,c||j(this,n,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(n=Math.floor(n)),this[e]=n&255,e+1};function G(i,n,e,c){n<0&&(n=65535+n+1);for(var R=0,K=Math.min(i.length-e,2);R<K;++R)i[e+R]=(n&255<<8*(c?R:1-R))>>>(c?R:1-R)*8}s.prototype.writeUInt16LE=function(n,e,c){return n=+n,e=e|0,c||j(this,n,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=n&255,this[e+1]=n>>>8):G(this,n,e,!0),e+2},s.prototype.writeUInt16BE=function(n,e,c){return n=+n,e=e|0,c||j(this,n,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=n>>>8,this[e+1]=n&255):G(this,n,e,!1),e+2};function O(i,n,e,c){n<0&&(n=4294967295+n+1);for(var R=0,K=Math.min(i.length-e,4);R<K;++R)i[e+R]=n>>>(c?R:3-R)*8&255}s.prototype.writeUInt32LE=function(n,e,c){return n=+n,e=e|0,c||j(this,n,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=n>>>24,this[e+2]=n>>>16,this[e+1]=n>>>8,this[e]=n&255):O(this,n,e,!0),e+4},s.prototype.writeUInt32BE=function(n,e,c){return n=+n,e=e|0,c||j(this,n,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=n>>>24,this[e+1]=n>>>16,this[e+2]=n>>>8,this[e+3]=n&255):O(this,n,e,!1),e+4},s.prototype.writeIntLE=function(n,e,c,R){if(n=+n,e=e|0,!R){var K=Math.pow(2,8*c-1);j(this,n,e,c,K-1,-K)}var te=0,ae=1,he=0;for(this[e]=n&255;++te<c&&(ae*=256);)n<0&&he===0&&this[e+te-1]!==0&&(he=1),this[e+te]=(n/ae>>0)-he&255;return e+c},s.prototype.writeIntBE=function(n,e,c,R){if(n=+n,e=e|0,!R){var K=Math.pow(2,8*c-1);j(this,n,e,c,K-1,-K)}var te=c-1,ae=1,he=0;for(this[e+te]=n&255;--te>=0&&(ae*=256);)n<0&&he===0&&this[e+te+1]!==0&&(he=1),this[e+te]=(n/ae>>0)-he&255;return e+c},s.prototype.writeInt8=function(n,e,c){return n=+n,e=e|0,c||j(this,n,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(n=Math.floor(n)),n<0&&(n=255+n+1),this[e]=n&255,e+1},s.prototype.writeInt16LE=function(n,e,c){return n=+n,e=e|0,c||j(this,n,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=n&255,this[e+1]=n>>>8):G(this,n,e,!0),e+2},s.prototype.writeInt16BE=function(n,e,c){return n=+n,e=e|0,c||j(this,n,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=n>>>8,this[e+1]=n&255):G(this,n,e,!1),e+2},s.prototype.writeInt32LE=function(n,e,c){return n=+n,e=e|0,c||j(this,n,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=n&255,this[e+1]=n>>>8,this[e+2]=n>>>16,this[e+3]=n>>>24):O(this,n,e,!0),e+4},s.prototype.writeInt32BE=function(n,e,c){return n=+n,e=e|0,c||j(this,n,e,4,2147483647,-2147483648),n<0&&(n=4294967295+n+1),s.TYPED_ARRAY_SUPPORT?(this[e]=n>>>24,this[e+1]=n>>>16,this[e+2]=n>>>8,this[e+3]=n&255):O(this,n,e,!1),e+4};function D(i,n,e,c,R,K){if(e+c>i.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function m(i,n,e,c,R){return R||D(i,n,e,4,34028234663852886e22,-34028234663852886e22),x.write(i,n,e,c,23,4),e+4}s.prototype.writeFloatLE=function(n,e,c){return m(this,n,e,!0,c)},s.prototype.writeFloatBE=function(n,e,c){return m(this,n,e,!1,c)};function p(i,n,e,c,R){return R||D(i,n,e,8,17976931348623157e292,-17976931348623157e292),x.write(i,n,e,c,52,8),e+8}s.prototype.writeDoubleLE=function(n,e,c){return p(this,n,e,!0,c)},s.prototype.writeDoubleBE=function(n,e,c){return p(this,n,e,!1,c)},s.prototype.copy=function(n,e,c,R){if(c||(c=0),!R&&R!==0&&(R=this.length),e>=n.length&&(e=n.length),e||(e=0),R>0&&R<c&&(R=c),R===c||n.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(c<0||c>=this.length)throw new RangeError("sourceStart out of bounds");if(R<0)throw new RangeError("sourceEnd out of bounds");R>this.length&&(R=this.length),n.length-e<R-c&&(R=n.length-e+c);var K=R-c,te;if(this===n&&c<e&&e<R)for(te=K-1;te>=0;--te)n[te+e]=this[te+c];else if(K<1e3||!s.TYPED_ARRAY_SUPPORT)for(te=0;te<K;++te)n[te+e]=this[te+c];else Uint8Array.prototype.set.call(n,this.subarray(c,c+K),e);return K},s.prototype.fill=function(n,e,c,R){if(typeof n=="string"){if(typeof e=="string"?(R=e,e=0,c=this.length):typeof c=="string"&&(R=c,c=this.length),n.length===1){var K=n.charCodeAt(0);K<256&&(n=K)}if(R!==void 0&&typeof R!="string")throw new TypeError("encoding must be a string");if(typeof R=="string"&&!s.isEncoding(R))throw new TypeError("Unknown encoding: "+R)}else typeof n=="number"&&(n=n&255);if(e<0||this.length<e||this.length<c)throw new RangeError("Out of range index");if(c<=e)return this;e=e>>>0,c=c===void 0?this.length:c>>>0,n||(n=0);var te;if(typeof n=="number")for(te=e;te<c;++te)this[te]=n;else{var ae=s.isBuffer(n)?n:I(new s(n,R).toString()),he=ae.length;for(te=0;te<c-e;++te)this[te+e]=ae[te%he]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function d(i){if(i=f(i).replace(B,""),i.length<2)return"";for(;i.length%4!=0;)i=i+"=";return i}function f(i){return i.trim?i.trim():i.replace(/^\s+|\s+$/g,"")}function h(i){return i<16?"0"+i.toString(16):i.toString(16)}function I(i,n){n=n||Infinity;for(var e,c=i.length,R=null,K=[],te=0;te<c;++te){if(e=i.charCodeAt(te),e>55295&&e<57344){if(!R){if(e>56319){(n-=3)>-1&&K.push(239,191,189);continue}else if(te+1===c){(n-=3)>-1&&K.push(239,191,189);continue}R=e;continue}if(e<56320){(n-=3)>-1&&K.push(239,191,189),R=e;continue}e=(R-55296<<10|e-56320)+65536}else R&&(n-=3)>-1&&K.push(239,191,189);if(R=null,e<128){if((n-=1)<0)break;K.push(e)}else if(e<2048){if((n-=2)<0)break;K.push(e>>6|192,e&63|128)}else if(e<65536){if((n-=3)<0)break;K.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((n-=4)<0)break;K.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return K}function M(i){for(var n=[],e=0;e<i.length;++e)n.push(i.charCodeAt(e)&255);return n}function t(i,n){for(var e,c,R,K=[],te=0;te<i.length&&!((n-=2)<0);++te)e=i.charCodeAt(te),c=e>>8,R=e%256,K.push(R),K.push(c);return K}function r(i){return w.toByteArray(d(i))}function u(i,n,e,c){for(var R=0;R<c&&!(R+e>=n.length||R>=i.length);++R)n[R+e]=i[R];return R}function a(i){return i!==i}},25981:function(Q,Y,_){var w=_(48764).Buffer,x=_(34155),L=_(45723),C=_(12840),b=_(35717),o=_(31852),s=w.from&&w.from!==Uint8Array.from?w.from([0]):new w([0]),l=function(S,T){S._corked?S.once("uncork",T):T()},E=function(S,T){S._autoDestroy&&S.destroy(T)},A=function(S,T){return function(U){U?E(S,U.message==="premature close"?null:U):T&&!S._ended&&S.end()}},y=function(S,T){if(!S||S._writableState&&S._writableState.finished)return T();if(S._writableState)return S.end(T);S.end(),T()},P=function(){},g=function(S){return new L.Readable({objectMode:!0,highWaterMark:16}).wrap(S)},v=function(S,T,U){if(!(this instanceof v))return new v(S,T,U);L.Duplex.call(this,U),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!U||U.autoDestroy!==!1,this._forwardDestroy=!U||U.destroy!==!1,this._forwardEnd=!U||U.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,S&&this.setWritable(S),T&&this.setReadable(T)};b(v,L.Duplex),v.obj=function(S,T,U){return U||(U={}),U.objectMode=!0,U.highWaterMark=16,new v(S,T,U)},v.prototype.cork=function(){++this._corked==1&&this.emit("cork")},v.prototype.uncork=function(){this._corked&&--this._corked==0&&this.emit("uncork")},v.prototype.setWritable=function(S){if(this._unwrite&&this._unwrite(),this.destroyed){S&&S.destroy&&S.destroy();return}if(S===null||S===!1){this.end();return}var T=this,U=C(S,{writable:!0,readable:!1},A(this,this._forwardEnd)),N=function(){var V=T._ondrain;T._ondrain=null,V&&V()},H=function(){T._writable.removeListener("drain",N),U()};this._unwrite&&x.nextTick(N),this._writable=S,this._writable.on("drain",N),this._unwrite=H,this.uncork()},v.prototype.setReadable=function(S){if(this._unread&&this._unread(),this.destroyed){S&&S.destroy&&S.destroy();return}if(S===null||S===!1){this.push(null),this.resume();return}var T=this,U=C(S,{writable:!1,readable:!0},A(this)),N=function(){T._forward()},H=function(){T.push(null)},V=function(){T._readable2.removeListener("readable",N),T._readable2.removeListener("end",H),U()};this._drained=!0,this._readable=S,this._readable2=S._readableState?S:g(S),this._readable2.on("readable",N),this._readable2.on("end",H),this._unread=V,this._forward()},v.prototype._read=function(){this._drained=!0,this._forward()},v.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var S;this._drained&&(S=o(this._readable2))!==null;)this.destroyed||(this._drained=this.push(S));this._forwarding=!1}},v.prototype.destroy=function(S,T){if(T||(T=P),this.destroyed)return T(null);this.destroyed=!0;var U=this;x.nextTick(function(){U._destroy(S),T(null)})},v.prototype._destroy=function(S){if(S){var T=this._ondrain;this._ondrain=null,T?T(S):this.emit("error",S)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},v.prototype._write=function(S,T,U){if(!this.destroyed){if(this._corked)return l(this,this._write.bind(this,S,T,U));if(S===s)return this._finish(U);if(!this._writable)return U();this._writable.write(S)===!1?this._ondrain=U:this.destroyed||U()}},v.prototype._finish=function(S){var T=this;this.emit("preend"),l(this,function(){y(T._forwardEnd&&T._writable,function(){T._writableState.prefinished===!1&&(T._writableState.prefinished=!0),T.emit("prefinish"),l(T,S)})})},v.prototype.end=function(S,T,U){return typeof S=="function"?this.end(null,null,S):typeof T=="function"?this.end(S,null,T):(this._ended=!0,S&&this.write(S),!this._writableState.ending&&!this._writableState.destroyed&&this.write(s),L.Writable.prototype.end.call(this,U))},Q.exports=v},98965:function(Q){"use strict";function Y(o,s){o.prototype=Object.create(s.prototype),o.prototype.constructor=o,o.__proto__=s}var _={};function w(o,s,l){l||(l=Error);function E(y,P,g){return typeof s=="string"?s:s(y,P,g)}var A=function(y){Y(P,y);function P(g,v,S){return y.call(this,E(g,v,S))||this}return P}(l);A.prototype.name=l.name,A.prototype.code=o,_[o]=A}function x(o,s){if(Array.isArray(o)){var l=o.length;return o=o.map(function(E){return String(E)}),l>2?"one of ".concat(s," ").concat(o.slice(0,l-1).join(", "),", or ")+o[l-1]:l===2?"one of ".concat(s," ").concat(o[0]," or ").concat(o[1]):"of ".concat(s," ").concat(o[0])}else return"of ".concat(s," ").concat(String(o))}function L(o,s,l){return o.substr(!l||l<0?0:+l,s.length)===s}function C(o,s,l){return(l===void 0||l>o.length)&&(l=o.length),o.substring(l-s.length,l)===s}function b(o,s,l){return typeof l!="number"&&(l=0),l+s.length>o.length?!1:o.indexOf(s,l)!==-1}w("ERR_INVALID_OPT_VALUE",function(o,s){return'The value "'+s+'" is invalid for option "'+o+'"'},TypeError),w("ERR_INVALID_ARG_TYPE",function(o,s,l){var E;typeof s=="string"&&L(s,"not ")?(E="must not be",s=s.replace(/^not /,"")):E="must be";var A;if(C(o," argument"))A="The ".concat(o," ").concat(E," ").concat(x(s,"type"));else{var y=b(o,".")?"property":"argument";A='The "'.concat(o,'" ').concat(y," ").concat(E," ").concat(x(s,"type"))}return A+=". Received type ".concat(typeof l),A},TypeError),w("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),w("ERR_METHOD_NOT_IMPLEMENTED",function(o){return"The "+o+" method is not implemented"}),w("ERR_STREAM_PREMATURE_CLOSE","Premature close"),w("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" after a stream was destroyed"}),w("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),w("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),w("ERR_STREAM_WRITE_AFTER_END","write after end"),w("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),w("ERR_UNKNOWN_ENCODING",function(o){return"Unknown encoding: "+o},TypeError),w("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Q.exports.q=_},15227:function(Q,Y,_){"use strict";var w=_(34155),x=Object.keys||function(y){var P=[];for(var g in y)P.push(g);return P};Q.exports=l;var L=_(1372),C=_(89083);_(35717)(l,L);for(var b=x(C.prototype),o=0;o<b.length;o++){var s=b[o];l.prototype[s]||(l.prototype[s]=C.prototype[s])}function l(y){if(!(this instanceof l))return new l(y);L.call(this,y),C.call(this,y),this.allowHalfOpen=!0,y&&(y.readable===!1&&(this.readable=!1),y.writable===!1&&(this.writable=!1),y.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",E)))}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function E(){this._writableState.ended||w.nextTick(A,this)}function A(y){y.end()}Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(P){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=P,this._writableState.destroyed=P)}})},95688:function(Q,Y,_){"use strict";Q.exports=x;var w=_(34670);_(35717)(x,w);function x(L){if(!(this instanceof x))return new x(L);w.call(this,L)}x.prototype._transform=function(L,C,b){b(null,L)}},1372:function(Q,Y,_){"use strict";var w=_(34155);Q.exports=J;var x;J.ReadableState=ne;var L=_(17187).EventEmitter,C=function(r,u){return r.listeners(u).length},b=_(85483),o=_(48764).Buffer,s=_.g.Uint8Array||function(){};function l(t){return o.from(t)}function E(t){return o.isBuffer(t)||t instanceof s}var A=_(94835),y;A&&A.debuglog?y=A.debuglog("stream"):y=function(){};var P=_(54791),g=_(35296),v=_(81342),S=v.getHighWaterMark,T=_(98965).q,U=T.ERR_INVALID_ARG_TYPE,N=T.ERR_STREAM_PUSH_AFTER_EOF,H=T.ERR_METHOD_NOT_IMPLEMENTED,V=T.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,k,X,W;_(35717)(J,b);var ie=g.errorOrDestroy,q=["error","close","destroy","pause","resume"];function le(t,r,u){if(typeof t.prependListener=="function")return t.prependListener(r,u);!t._events||!t._events[r]?t.on(r,u):Array.isArray(t._events[r])?t._events[r].unshift(u):t._events[r]=[u,t._events[r]]}function ne(t,r,u){x=x||_(15227),t=t||{},typeof u!="boolean"&&(u=r instanceof x),this.objectMode=!!t.objectMode,u&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=S(this,t,"readableHighWaterMark",u),this.buffer=new P,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(k||(k=_(32553).s),this.decoder=new k(t.encoding),this.encoding=t.encoding)}function J(t){if(x=x||_(15227),!(this instanceof J))return new J(t);var r=this instanceof x;this._readableState=new ne(t,this,r),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),b.call(this)}Object.defineProperty(J.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(r){!this._readableState||(this._readableState.destroyed=r)}}),J.prototype.destroy=g.destroy,J.prototype._undestroy=g.undestroy,J.prototype._destroy=function(t,r){r(t)},J.prototype.push=function(t,r){var u=this._readableState,a;return u.objectMode?a=!0:typeof t=="string"&&(r=r||u.defaultEncoding,r!==u.encoding&&(t=o.from(t,r),r=""),a=!0),z(this,t,r,!1,a)},J.prototype.unshift=function(t){return z(this,t,null,!0,!1)};function z(t,r,u,a,i){y("readableAddChunk",r);var n=t._readableState;if(r===null)n.reading=!1,oe(t,n);else{var e;if(i||(e=ee(n,r)),e)ie(t,e);else if(n.objectMode||r&&r.length>0)if(typeof r!="string"&&!n.objectMode&&Object.getPrototypeOf(r)!==o.prototype&&(r=l(r)),a)n.endEmitted?ie(t,new V):F(t,n,r,!0);else if(n.ended)ie(t,new N);else{if(n.destroyed)return!1;n.reading=!1,n.decoder&&!u?(r=n.decoder.write(r),n.objectMode||r.length!==0?F(t,n,r,!1):j(t,n)):F(t,n,r,!1)}else a||(n.reading=!1,j(t,n))}return!n.ended&&(n.length<n.highWaterMark||n.length===0)}function F(t,r,u,a){r.flowing&&r.length===0&&!r.sync?(r.awaitDrain=0,t.emit("data",u)):(r.length+=r.objectMode?1:u.length,a?r.buffer.unshift(u):r.buffer.push(u),r.needReadable&&$(t)),j(t,r)}function ee(t,r){var u;return!E(r)&&typeof r!="string"&&r!==void 0&&!t.objectMode&&(u=new U("chunk",["string","Buffer","Uint8Array"],r)),u}J.prototype.isPaused=function(){return this._readableState.flowing===!1},J.prototype.setEncoding=function(t){k||(k=_(32553).s);var r=new k(t);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var u=this._readableState.buffer.head,a="";u!==null;)a+=r.write(u.data),u=u.next;return this._readableState.buffer.clear(),a!==""&&this._readableState.buffer.push(a),this._readableState.length=a.length,this};var Z=1073741824;function fe(t){return t>=Z?t=Z:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function se(t,r){return t<=0||r.length===0&&r.ended?0:r.objectMode?1:t!==t?r.flowing&&r.length?r.buffer.head.data.length:r.length:(t>r.highWaterMark&&(r.highWaterMark=fe(t)),t<=r.length?t:r.ended?r.length:(r.needReadable=!0,0))}J.prototype.read=function(t){y("read",t),t=parseInt(t,10);var r=this._readableState,u=t;if(t!==0&&(r.emittedReadable=!1),t===0&&r.needReadable&&((r.highWaterMark!==0?r.length>=r.highWaterMark:r.length>0)||r.ended))return y("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?h(this):$(this),null;if(t=se(t,r),t===0&&r.ended)return r.length===0&&h(this),null;var a=r.needReadable;y("need readable",a),(r.length===0||r.length-t<r.highWaterMark)&&(a=!0,y("length less than watermark",a)),r.ended||r.reading?(a=!1,y("reading or ended",a)):a&&(y("do read"),r.reading=!0,r.sync=!0,r.length===0&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(t=se(u,r)));var i;return t>0?i=f(t,r):i=null,i===null?(r.needReadable=r.length<=r.highWaterMark,t=0):(r.length-=t,r.awaitDrain=0),r.length===0&&(r.ended||(r.needReadable=!0),u!==t&&r.ended&&h(this)),i!==null&&this.emit("data",i),i};function oe(t,r){if(y("onEofChunk"),!r.ended){if(r.decoder){var u=r.decoder.end();u&&u.length&&(r.buffer.push(u),r.length+=r.objectMode?1:u.length)}r.ended=!0,r.sync?$(t):(r.needReadable=!1,r.emittedReadable||(r.emittedReadable=!0,re(t)))}}function $(t){var r=t._readableState;y("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(y("emitReadable",r.flowing),r.emittedReadable=!0,w.nextTick(re,t))}function re(t){var r=t._readableState;y("emitReadable_",r.destroyed,r.length,r.ended),!r.destroyed&&(r.length||r.ended)&&(t.emit("readable"),r.emittedReadable=!1),r.needReadable=!r.flowing&&!r.ended&&r.length<=r.highWaterMark,d(t)}function j(t,r){r.readingMore||(r.readingMore=!0,w.nextTick(G,t,r))}function G(t,r){for(;!r.reading&&!r.ended&&(r.length<r.highWaterMark||r.flowing&&r.length===0);){var u=r.length;if(y("maybeReadMore read 0"),t.read(0),u===r.length)break}r.readingMore=!1}J.prototype._read=function(t){ie(this,new H("_read()"))},J.prototype.pipe=function(t,r){var u=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t);break}a.pipesCount+=1,y("pipe count=%d opts=%j",a.pipesCount,r);var i=(!r||r.end!==!1)&&t!==w.stdout&&t!==w.stderr,n=i?c:ce;a.endEmitted?w.nextTick(n):u.once("end",n),t.on("unpipe",e);function e(pe,ye){y("onunpipe"),pe===u&&ye&&ye.hasUnpiped===!1&&(ye.hasUnpiped=!0,te())}function c(){y("onend"),t.end()}var R=O(u);t.on("drain",R);var K=!1;function te(){y("cleanup"),t.removeListener("close",ue),t.removeListener("finish",de),t.removeListener("drain",R),t.removeListener("error",he),t.removeListener("unpipe",e),u.removeListener("end",c),u.removeListener("end",ce),u.removeListener("data",ae),K=!0,a.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&R()}u.on("data",ae);function ae(pe){y("ondata");var ye=t.write(pe);y("dest.write",ye),ye===!1&&((a.pipesCount===1&&a.pipes===t||a.pipesCount>1&&M(a.pipes,t)!==-1)&&!K&&(y("false write response, pause",a.awaitDrain),a.awaitDrain++),u.pause())}function he(pe){y("onerror",pe),ce(),t.removeListener("error",he),C(t,"error")===0&&ie(t,pe)}le(t,"error",he);function ue(){t.removeListener("finish",de),ce()}t.once("close",ue);function de(){y("onfinish"),t.removeListener("close",ue),ce()}t.once("finish",de);function ce(){y("unpipe"),u.unpipe(t)}return t.emit("pipe",u),a.flowing||(y("pipe resume"),u.resume()),t};function O(t){return function(){var u=t._readableState;y("pipeOnDrain",u.awaitDrain),u.awaitDrain&&u.awaitDrain--,u.awaitDrain===0&&C(t,"data")&&(u.flowing=!0,d(t))}}J.prototype.unpipe=function(t){var r=this._readableState,u={hasUnpiped:!1};if(r.pipesCount===0)return this;if(r.pipesCount===1)return t&&t!==r.pipes?this:(t||(t=r.pipes),r.pipes=null,r.pipesCount=0,r.flowing=!1,t&&t.emit("unpipe",this,u),this);if(!t){var a=r.pipes,i=r.pipesCount;r.pipes=null,r.pipesCount=0,r.flowing=!1;for(var n=0;n<i;n++)a[n].emit("unpipe",this,{hasUnpiped:!1});return this}var e=M(r.pipes,t);return e===-1?this:(r.pipes.splice(e,1),r.pipesCount-=1,r.pipesCount===1&&(r.pipes=r.pipes[0]),t.emit("unpipe",this,u),this)},J.prototype.on=function(t,r){var u=b.prototype.on.call(this,t,r),a=this._readableState;return t==="data"?(a.readableListening=this.listenerCount("readable")>0,a.flowing!==!1&&this.resume()):t==="readable"&&!a.endEmitted&&!a.readableListening&&(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,y("on readable",a.length,a.reading),a.length?$(this):a.reading||w.nextTick(m,this)),u},J.prototype.addListener=J.prototype.on,J.prototype.removeListener=function(t,r){var u=b.prototype.removeListener.call(this,t,r);return t==="readable"&&w.nextTick(D,this),u},J.prototype.removeAllListeners=function(t){var r=b.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&w.nextTick(D,this),r};function D(t){var r=t._readableState;r.readableListening=t.listenerCount("readable")>0,r.resumeScheduled&&!r.paused?r.flowing=!0:t.listenerCount("data")>0&&t.resume()}function m(t){y("readable nexttick read 0"),t.read(0)}J.prototype.resume=function(){var t=this._readableState;return t.flowing||(y("resume"),t.flowing=!t.readableListening,p(this,t)),t.paused=!1,this};function p(t,r){r.resumeScheduled||(r.resumeScheduled=!0,w.nextTick(B,t,r))}function B(t,r){y("resume",r.reading),r.reading||t.read(0),r.resumeScheduled=!1,t.emit("resume"),d(t),r.flowing&&!r.reading&&t.read(0)}J.prototype.pause=function(){return y("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(y("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function d(t){var r=t._readableState;for(y("flow",r.flowing);r.flowing&&t.read()!==null;);}J.prototype.wrap=function(t){var r=this,u=this._readableState,a=!1;t.on("end",function(){if(y("wrapped end"),u.decoder&&!u.ended){var e=u.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),t.on("data",function(e){if(y("wrapped data"),u.decoder&&(e=u.decoder.write(e)),!(u.objectMode&&e==null)&&!(!u.objectMode&&(!e||!e.length))){var c=r.push(e);c||(a=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=function(c){return function(){return t[c].apply(t,arguments)}}(i));for(var n=0;n<q.length;n++)t.on(q[n],this.emit.bind(this,q[n]));return this._read=function(e){y("wrapped _read",e),a&&(a=!1,t.resume())},this},typeof Symbol=="function"&&(J.prototype[Symbol.asyncIterator]=function(){return X===void 0&&(X=_(86684)),X(this)}),Object.defineProperty(J.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(J.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(J.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(r){this._readableState&&(this._readableState.flowing=r)}}),J._fromList=f,Object.defineProperty(J.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function f(t,r){if(r.length===0)return null;var u;return r.objectMode?u=r.buffer.shift():!t||t>=r.length?(r.decoder?u=r.buffer.join(""):r.buffer.length===1?u=r.buffer.first():u=r.buffer.concat(r.length),r.buffer.clear()):u=r.buffer.consume(t,r.decoder),u}function h(t){var r=t._readableState;y("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,w.nextTick(I,r,t))}function I(t,r){if(y("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,r.readable=!1,r.emit("end"),t.autoDestroy)){var u=r._writableState;(!u||u.autoDestroy&&u.finished)&&r.destroy()}}typeof Symbol=="function"&&(J.from=function(t,r){return W===void 0&&(W=_(34935)),W(J,t,r)});function M(t,r){for(var u=0,a=t.length;u<a;u++)if(t[u]===r)return u;return-1}},34670:function(Q,Y,_){"use strict";Q.exports=l;var w=_(98965).q,x=w.ERR_METHOD_NOT_IMPLEMENTED,L=w.ERR_MULTIPLE_CALLBACK,C=w.ERR_TRANSFORM_ALREADY_TRANSFORMING,b=w.ERR_TRANSFORM_WITH_LENGTH_0,o=_(15227);_(35717)(l,o);function s(y,P){var g=this._transformState;g.transforming=!1;var v=g.writecb;if(v===null)return this.emit("error",new L);g.writechunk=null,g.writecb=null,P!=null&&this.push(P),v(y);var S=this._readableState;S.reading=!1,(S.needReadable||S.length<S.highWaterMark)&&this._read(S.highWaterMark)}function l(y){if(!(this instanceof l))return new l(y);o.call(this,y),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,y&&(typeof y.transform=="function"&&(this._transform=y.transform),typeof y.flush=="function"&&(this._flush=y.flush)),this.on("prefinish",E)}function E(){var y=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(P,g){A(y,P,g)}):A(this,null,null)}l.prototype.push=function(y,P){return this._transformState.needTransform=!1,o.prototype.push.call(this,y,P)},l.prototype._transform=function(y,P,g){g(new x("_transform()"))},l.prototype._write=function(y,P,g){var v=this._transformState;if(v.writecb=g,v.writechunk=y,v.writeencoding=P,!v.transforming){var S=this._readableState;(v.needTransform||S.needReadable||S.length<S.highWaterMark)&&this._read(S.highWaterMark)}},l.prototype._read=function(y){var P=this._transformState;P.writechunk!==null&&!P.transforming?(P.transforming=!0,this._transform(P.writechunk,P.writeencoding,P.afterTransform)):P.needTransform=!0},l.prototype._destroy=function(y,P){o.prototype._destroy.call(this,y,function(g){P(g)})};function A(y,P,g){if(P)return y.emit("error",P);if(g!=null&&y.push(g),y._writableState.length)throw new b;if(y._transformState.transforming)throw new C;return y.push(null)}},89083:function(Q,Y,_){"use strict";var w=_(34155);Q.exports=ne;function x(d,f,h){this.chunk=d,this.encoding=f,this.callback=h,this.next=null}function L(d){var f=this;this.next=null,this.entry=null,this.finish=function(){B(f,d)}}var C;ne.WritableState=q;var b={deprecate:_(94927)},o=_(85483),s=_(48764).Buffer,l=_.g.Uint8Array||function(){};function E(d){return s.from(d)}function A(d){return s.isBuffer(d)||d instanceof l}var y=_(35296),P=_(81342),g=P.getHighWaterMark,v=_(98965).q,S=v.ERR_INVALID_ARG_TYPE,T=v.ERR_METHOD_NOT_IMPLEMENTED,U=v.ERR_MULTIPLE_CALLBACK,N=v.ERR_STREAM_CANNOT_PIPE,H=v.ERR_STREAM_DESTROYED,V=v.ERR_STREAM_NULL_VALUES,k=v.ERR_STREAM_WRITE_AFTER_END,X=v.ERR_UNKNOWN_ENCODING,W=y.errorOrDestroy;_(35717)(ne,o);function ie(){}function q(d,f,h){C=C||_(15227),d=d||{},typeof h!="boolean"&&(h=f instanceof C),this.objectMode=!!d.objectMode,h&&(this.objectMode=this.objectMode||!!d.writableObjectMode),this.highWaterMark=g(this,d,"writableHighWaterMark",h),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var I=d.decodeStrings===!1;this.decodeStrings=!I,this.defaultEncoding=d.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(M){oe(f,M)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=d.emitClose!==!1,this.autoDestroy=!!d.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new L(this)}q.prototype.getBuffer=function(){for(var f=this.bufferedRequest,h=[];f;)h.push(f),f=f.next;return h},function(){try{Object.defineProperty(q.prototype,"buffer",{get:b.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(d){}}();var le;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(le=Function.prototype[Symbol.hasInstance],Object.defineProperty(ne,Symbol.hasInstance,{value:function(f){return le.call(this,f)?!0:this!==ne?!1:f&&f._writableState instanceof q}})):le=function(f){return f instanceof this};function ne(d){C=C||_(15227);var f=this instanceof C;if(!f&&!le.call(ne,this))return new ne(d);this._writableState=new q(d,this,f),this.writable=!0,d&&(typeof d.write=="function"&&(this._write=d.write),typeof d.writev=="function"&&(this._writev=d.writev),typeof d.destroy=="function"&&(this._destroy=d.destroy),typeof d.final=="function"&&(this._final=d.final)),o.call(this)}ne.prototype.pipe=function(){W(this,new N)};function J(d,f){var h=new k;W(d,h),w.nextTick(f,h)}function z(d,f,h,I){var M;return h===null?M=new V:typeof h!="string"&&!f.objectMode&&(M=new S("chunk",["string","Buffer"],h)),M?(W(d,M),w.nextTick(I,M),!1):!0}ne.prototype.write=function(d,f,h){var I=this._writableState,M=!1,t=!I.objectMode&&A(d);return t&&!s.isBuffer(d)&&(d=E(d)),typeof f=="function"&&(h=f,f=null),t?f="buffer":f||(f=I.defaultEncoding),typeof h!="function"&&(h=ie),I.ending?J(this,h):(t||z(this,I,d,h))&&(I.pendingcb++,M=ee(this,I,t,d,f,h)),M},ne.prototype.cork=function(){this._writableState.corked++},ne.prototype.uncork=function(){var d=this._writableState;d.corked&&(d.corked--,!d.writing&&!d.corked&&!d.bufferProcessing&&d.bufferedRequest&&j(this,d))},ne.prototype.setDefaultEncoding=function(f){if(typeof f=="string"&&(f=f.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((f+"").toLowerCase())>-1))throw new X(f);return this._writableState.defaultEncoding=f,this},Object.defineProperty(ne.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function F(d,f,h){return!d.objectMode&&d.decodeStrings!==!1&&typeof f=="string"&&(f=s.from(f,h)),f}Object.defineProperty(ne.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ee(d,f,h,I,M,t){if(!h){var r=F(f,I,M);I!==r&&(h=!0,M="buffer",I=r)}var u=f.objectMode?1:I.length;f.length+=u;var a=f.length<f.highWaterMark;if(a||(f.needDrain=!0),f.writing||f.corked){var i=f.lastBufferedRequest;f.lastBufferedRequest={chunk:I,encoding:M,isBuf:h,callback:t,next:null},i?i.next=f.lastBufferedRequest:f.bufferedRequest=f.lastBufferedRequest,f.bufferedRequestCount+=1}else Z(d,f,!1,u,I,M,t);return a}function Z(d,f,h,I,M,t,r){f.writelen=I,f.writecb=r,f.writing=!0,f.sync=!0,f.destroyed?f.onwrite(new H("write")):h?d._writev(M,f.onwrite):d._write(M,t,f.onwrite),f.sync=!1}function fe(d,f,h,I,M){--f.pendingcb,h?(w.nextTick(M,I),w.nextTick(m,d,f),d._writableState.errorEmitted=!0,W(d,I)):(M(I),d._writableState.errorEmitted=!0,W(d,I),m(d,f))}function se(d){d.writing=!1,d.writecb=null,d.length-=d.writelen,d.writelen=0}function oe(d,f){var h=d._writableState,I=h.sync,M=h.writecb;if(typeof M!="function")throw new U;if(se(h),f)fe(d,h,I,f,M);else{var t=G(h)||d.destroyed;!t&&!h.corked&&!h.bufferProcessing&&h.bufferedRequest&&j(d,h),I?w.nextTick($,d,h,t,M):$(d,h,t,M)}}function $(d,f,h,I){h||re(d,f),f.pendingcb--,I(),m(d,f)}function re(d,f){f.length===0&&f.needDrain&&(f.needDrain=!1,d.emit("drain"))}function j(d,f){f.bufferProcessing=!0;var h=f.bufferedRequest;if(d._writev&&h&&h.next){var I=f.bufferedRequestCount,M=new Array(I),t=f.corkedRequestsFree;t.entry=h;for(var r=0,u=!0;h;)M[r]=h,h.isBuf||(u=!1),h=h.next,r+=1;M.allBuffers=u,Z(d,f,!0,f.length,M,"",t.finish),f.pendingcb++,f.lastBufferedRequest=null,t.next?(f.corkedRequestsFree=t.next,t.next=null):f.corkedRequestsFree=new L(f),f.bufferedRequestCount=0}else{for(;h;){var a=h.chunk,i=h.encoding,n=h.callback,e=f.objectMode?1:a.length;if(Z(d,f,!1,e,a,i,n),h=h.next,f.bufferedRequestCount--,f.writing)break}h===null&&(f.lastBufferedRequest=null)}f.bufferedRequest=h,f.bufferProcessing=!1}ne.prototype._write=function(d,f,h){h(new T("_write()"))},ne.prototype._writev=null,ne.prototype.end=function(d,f,h){var I=this._writableState;return typeof d=="function"?(h=d,d=null,f=null):typeof f=="function"&&(h=f,f=null),d!=null&&this.write(d,f),I.corked&&(I.corked=1,this.uncork()),I.ending||p(this,I,h),this},Object.defineProperty(ne.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function G(d){return d.ending&&d.length===0&&d.bufferedRequest===null&&!d.finished&&!d.writing}function O(d,f){d._final(function(h){f.pendingcb--,h&&W(d,h),f.prefinished=!0,d.emit("prefinish"),m(d,f)})}function D(d,f){!f.prefinished&&!f.finalCalled&&(typeof d._final=="function"&&!f.destroyed?(f.pendingcb++,f.finalCalled=!0,w.nextTick(O,d,f)):(f.prefinished=!0,d.emit("prefinish")))}function m(d,f){var h=G(f);if(h&&(D(d,f),f.pendingcb===0&&(f.finished=!0,d.emit("finish"),f.autoDestroy))){var I=d._readableState;(!I||I.autoDestroy&&I.endEmitted)&&d.destroy()}return h}function p(d,f,h){f.ending=!0,m(d,f),h&&(f.finished?w.nextTick(h):d.once("finish",h)),f.ended=!0,d.writable=!1}function B(d,f,h){var I=d.entry;for(d.entry=null;I;){var M=I.callback;f.pendingcb--,M(h),I=I.next}f.corkedRequestsFree.next=d}Object.defineProperty(ne.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(f){!this._writableState||(this._writableState.destroyed=f)}}),ne.prototype.destroy=y.destroy,ne.prototype._undestroy=y.undestroy,ne.prototype._destroy=function(d,f){f(d)}},86684:function(Q,Y,_){"use strict";var w=_(34155),x;function L(H,V,k){return V in H?Object.defineProperty(H,V,{value:k,enumerable:!0,configurable:!0,writable:!0}):H[V]=k,H}var C=_(75716),b=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),l=Symbol("ended"),E=Symbol("lastPromise"),A=Symbol("handlePromise"),y=Symbol("stream");function P(H,V){return{value:H,done:V}}function g(H){var V=H[b];if(V!==null){var k=H[y].read();k!==null&&(H[E]=null,H[b]=null,H[o]=null,V(P(k,!1)))}}function v(H){w.nextTick(g,H)}function S(H,V){return function(k,X){H.then(function(){if(V[l]){k(P(void 0,!0));return}V[A](k,X)},X)}}var T=Object.getPrototypeOf(function(){}),U=Object.setPrototypeOf((x={get stream(){return this[y]},next:function(){var V=this,k=this[s];if(k!==null)return Promise.reject(k);if(this[l])return Promise.resolve(P(void 0,!0));if(this[y].destroyed)return new Promise(function(q,le){w.nextTick(function(){V[s]?le(V[s]):q(P(void 0,!0))})});var X=this[E],W;if(X)W=new Promise(S(X,this));else{var ie=this[y].read();if(ie!==null)return Promise.resolve(P(ie,!1));W=new Promise(this[A])}return this[E]=W,W}},L(x,Symbol.asyncIterator,function(){return this}),L(x,"return",function(){var V=this;return new Promise(function(k,X){V[y].destroy(null,function(W){if(W){X(W);return}k(P(void 0,!0))})})}),x),T),N=function(V){var k,X=Object.create(U,(k={},L(k,y,{value:V,writable:!0}),L(k,b,{value:null,writable:!0}),L(k,o,{value:null,writable:!0}),L(k,s,{value:null,writable:!0}),L(k,l,{value:V._readableState.endEmitted,writable:!0}),L(k,A,{value:function(ie,q){var le=X[y].read();le?(X[E]=null,X[b]=null,X[o]=null,ie(P(le,!1))):(X[b]=ie,X[o]=q)},writable:!0}),k));return X[E]=null,C(V,function(W){if(W&&W.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ie=X[o];ie!==null&&(X[E]=null,X[b]=null,X[o]=null,ie(W)),X[s]=W;return}var q=X[b];q!==null&&(X[E]=null,X[b]=null,X[o]=null,q(P(void 0,!0))),X[l]=!0}),V.on("readable",v.bind(null,X)),X};Q.exports=N},54791:function(Q,Y,_){"use strict";function w(g,v){var S=Object.keys(g);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(g);v&&(T=T.filter(function(U){return Object.getOwnPropertyDescriptor(g,U).enumerable})),S.push.apply(S,T)}return S}function x(g){for(var v=1;v<arguments.length;v++){var S=arguments[v]!=null?arguments[v]:{};v%2?w(Object(S),!0).forEach(function(T){L(g,T,S[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(S)):w(Object(S)).forEach(function(T){Object.defineProperty(g,T,Object.getOwnPropertyDescriptor(S,T))})}return g}function L(g,v,S){return v in g?Object.defineProperty(g,v,{value:S,enumerable:!0,configurable:!0,writable:!0}):g[v]=S,g}function C(g,v){if(!(g instanceof v))throw new TypeError("Cannot call a class as a function")}function b(g,v){for(var S=0;S<v.length;S++){var T=v[S];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(g,T.key,T)}}function o(g,v,S){return v&&b(g.prototype,v),S&&b(g,S),g}var s=_(48764),l=s.Buffer,E=_(43094),A=E.inspect,y=A&&A.custom||"inspect";function P(g,v,S){l.prototype.copy.call(g,v,S)}Q.exports=function(){function g(){C(this,g),this.head=null,this.tail=null,this.length=0}return o(g,[{key:"push",value:function(S){var T={data:S,next:null};this.length>0?this.tail.next=T:this.head=T,this.tail=T,++this.length}},{key:"unshift",value:function(S){var T={data:S,next:this.head};this.length===0&&(this.tail=T),this.head=T,++this.length}},{key:"shift",value:function(){if(this.length!==0){var S=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,S}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(S){if(this.length===0)return"";for(var T=this.head,U=""+T.data;T=T.next;)U+=S+T.data;return U}},{key:"concat",value:function(S){if(this.length===0)return l.alloc(0);for(var T=l.allocUnsafe(S>>>0),U=this.head,N=0;U;)P(U.data,T,N),N+=U.data.length,U=U.next;return T}},{key:"consume",value:function(S,T){var U;return S<this.head.data.length?(U=this.head.data.slice(0,S),this.head.data=this.head.data.slice(S)):S===this.head.data.length?U=this.shift():U=T?this._getString(S):this._getBuffer(S),U}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(S){var T=this.head,U=1,N=T.data;for(S-=N.length;T=T.next;){var H=T.data,V=S>H.length?H.length:S;if(V===H.length?N+=H:N+=H.slice(0,S),S-=V,S===0){V===H.length?(++U,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=H.slice(V));break}++U}return this.length-=U,N}},{key:"_getBuffer",value:function(S){var T=l.allocUnsafe(S),U=this.head,N=1;for(U.data.copy(T),S-=U.data.length;U=U.next;){var H=U.data,V=S>H.length?H.length:S;if(H.copy(T,T.length-S,0,V),S-=V,S===0){V===H.length?(++N,U.next?this.head=U.next:this.head=this.tail=null):(this.head=U,U.data=H.slice(V));break}++N}return this.length-=N,T}},{key:y,value:function(S,T){return A(this,x({},T,{depth:0,customInspect:!1}))}}]),g}()},35296:function(Q,Y,_){"use strict";var w=_(34155);function x(l,E){var A=this,y=this._readableState&&this._readableState.destroyed,P=this._writableState&&this._writableState.destroyed;return y||P?(E?E(l):l&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,w.nextTick(o,this,l)):w.nextTick(o,this,l)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(g){!E&&g?A._writableState?A._writableState.errorEmitted?w.nextTick(C,A):(A._writableState.errorEmitted=!0,w.nextTick(L,A,g)):w.nextTick(L,A,g):E?(w.nextTick(C,A),E(g)):w.nextTick(C,A)}),this)}function L(l,E){o(l,E),C(l)}function C(l){l._writableState&&!l._writableState.emitClose||l._readableState&&!l._readableState.emitClose||l.emit("close")}function b(){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 o(l,E){l.emit("error",E)}function s(l,E){var A=l._readableState,y=l._writableState;A&&A.autoDestroy||y&&y.autoDestroy?l.destroy(E):l.emit("error",E)}Q.exports={destroy:x,undestroy:b,errorOrDestroy:s}},75716:function(Q,Y,_){"use strict";var w=_(98965).q.ERR_STREAM_PREMATURE_CLOSE;function x(o){var s=!1;return function(){if(!s){s=!0;for(var l=arguments.length,E=new Array(l),A=0;A<l;A++)E[A]=arguments[A];o.apply(this,E)}}}function L(){}function C(o){return o.setHeader&&typeof o.abort=="function"}function b(o,s,l){if(typeof s=="function")return b(o,null,s);s||(s={}),l=x(l||L);var E=s.readable||s.readable!==!1&&o.readable,A=s.writable||s.writable!==!1&&o.writable,y=function(){o.writable||g()},P=o._writableState&&o._writableState.finished,g=function(){A=!1,P=!0,E||l.call(o)},v=o._readableState&&o._readableState.endEmitted,S=function(){E=!1,v=!0,A||l.call(o)},T=function(V){l.call(o,V)},U=function(){var V;if(E&&!v)return(!o._readableState||!o._readableState.ended)&&(V=new w),l.call(o,V);if(A&&!P)return(!o._writableState||!o._writableState.ended)&&(V=new w),l.call(o,V)},N=function(){o.req.on("finish",g)};return C(o)?(o.on("complete",g),o.on("abort",U),o.req?N():o.on("request",N)):A&&!o._writableState&&(o.on("end",y),o.on("close",y)),o.on("end",S),o.on("finish",g),s.error!==!1&&o.on("error",T),o.on("close",U),function(){o.removeListener("complete",g),o.removeListener("abort",U),o.removeListener("request",N),o.req&&o.req.removeListener("finish",g),o.removeListener("end",y),o.removeListener("close",y),o.removeListener("finish",g),o.removeListener("end",S),o.removeListener("error",T),o.removeListener("close",U)}}Q.exports=b},34935:function(Q){Q.exports=function(){throw new Error("Readable.from is not available in the browser")}},16398:function(Q,Y,_){"use strict";var w;function x(g){var v=!1;return function(){v||(v=!0,g.apply(void 0,arguments))}}var L=_(98965).q,C=L.ERR_MISSING_ARGS,b=L.ERR_STREAM_DESTROYED;function o(g){if(g)throw g}function s(g){return g.setHeader&&typeof g.abort=="function"}function l(g,v,S,T){T=x(T);var U=!1;g.on("close",function(){U=!0}),w===void 0&&(w=_(75716)),w(g,{readable:v,writable:S},function(H){if(H)return T(H);U=!0,T()});var N=!1;return function(H){if(!U&&!N){if(N=!0,s(g))return g.abort();if(typeof g.destroy=="function")return g.destroy();T(H||new b("pipe"))}}}function E(g){g()}function A(g,v){return g.pipe(v)}function y(g){return!g.length||typeof g[g.length-1]!="function"?o:g.pop()}function P(){for(var g=arguments.length,v=new Array(g),S=0;S<g;S++)v[S]=arguments[S];var T=y(v);if(Array.isArray(v[0])&&(v=v[0]),v.length<2)throw new C("streams");var U,N=v.map(function(H,V){var k=V<v.length-1,X=V>0;return l(H,k,X,function(W){U||(U=W),W&&N.forEach(E),!k&&(N.forEach(E),T(U))})});return v.reduce(A)}Q.exports=P},81342:function(Q,Y,_){"use strict";var w=_(98965).q.ERR_INVALID_OPT_VALUE;function x(C,b,o){return C.highWaterMark!=null?C.highWaterMark:b?C[o]:null}function L(C,b,o,s){var l=x(b,s,o);if(l!=null){if(!(isFinite(l)&&Math.floor(l)===l)||l<0){var E=s?o:"highWaterMark";throw new w(E,l)}return Math.floor(l)}return C.objectMode?16:16*1024}Q.exports={getHighWaterMark:L}},85483:function(Q,Y,_){Q.exports=_(17187).EventEmitter},45723:function(Q,Y,_){Y=Q.exports=_(1372),Y.Stream=Y,Y.Readable=Y,Y.Writable=_(89083),Y.Duplex=_(15227),Y.Transform=_(34670),Y.PassThrough=_(95688),Y.finished=_(75716),Y.pipeline=_(16398)},12840:function(Q,Y,_){var w=_(34155),x=_(30778),L=function(){},C=function(s){return s.setHeader&&typeof s.abort=="function"},b=function(s){return s.stdio&&Array.isArray(s.stdio)&&s.stdio.length===3},o=function(s,l,E){if(typeof l=="function")return o(s,null,l);l||(l={}),E=x(E||L);var A=s._writableState,y=s._readableState,P=l.readable||l.readable!==!1&&s.readable,g=l.writable||l.writable!==!1&&s.writable,v=!1,S=function(){s.writable||T()},T=function(){g=!1,P||E.call(s)},U=function(){P=!1,g||E.call(s)},N=function(W){E.call(s,W?new Error("exited with error code: "+W):null)},H=function(W){E.call(s,W)},V=function(){w.nextTick(k)},k=function(){if(!v){if(P&&!(y&&y.ended&&!y.destroyed))return E.call(s,new Error("premature close"));if(g&&!(A&&A.ended&&!A.destroyed))return E.call(s,new Error("premature close"))}},X=function(){s.req.on("finish",T)};return C(s)?(s.on("complete",T),s.on("abort",V),s.req?X():s.on("request",X)):g&&!A&&(s.on("end",S),s.on("close",S)),b(s)&&s.on("exit",N),s.on("end",U),s.on("finish",T),l.error!==!1&&s.on("error",H),s.on("close",V),function(){v=!0,s.removeListener("complete",T),s.removeListener("abort",V),s.removeListener("request",X),s.req&&s.req.removeListener("finish",T),s.removeListener("end",S),s.removeListener("close",S),s.removeListener("finish",T),s.removeListener("exit",N),s.removeListener("end",U),s.removeListener("error",H),s.removeListener("close",V)}};Q.exports=o},80645:function(Q,Y){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Y.read=function(_,w,x,L,C){var b,o,s=C*8-L-1,l=(1<<s)-1,E=l>>1,A=-7,y=x?C-1:0,P=x?-1:1,g=_[w+y];for(y+=P,b=g&(1<<-A)-1,g>>=-A,A+=s;A>0;b=b*256+_[w+y],y+=P,A-=8);for(o=b&(1<<-A)-1,b>>=-A,A+=L;A>0;o=o*256+_[w+y],y+=P,A-=8);if(b===0)b=1-E;else{if(b===l)return o?NaN:(g?-1:1)*Infinity;o=o+Math.pow(2,L),b=b-E}return(g?-1:1)*o*Math.pow(2,b-L)},Y.write=function(_,w,x,L,C,b){var o,s,l,E=b*8-C-1,A=(1<<E)-1,y=A>>1,P=C===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=L?0:b-1,v=L?1:-1,S=w<0||w===0&&1/w<0?1:0;for(w=Math.abs(w),isNaN(w)||w===Infinity?(s=isNaN(w)?1:0,o=A):(o=Math.floor(Math.log(w)/Math.LN2),w*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+y>=1?w+=P/l:w+=P*Math.pow(2,1-y),w*l>=2&&(o++,l/=2),o+y>=A?(s=0,o=A):o+y>=1?(s=(w*l-1)*Math.pow(2,C),o=o+y):(s=w*Math.pow(2,y-1)*Math.pow(2,C),o=0));C>=8;_[x+g]=s&255,g+=v,s/=256,C-=8);for(o=o<<C|s,E+=C;E>0;_[x+g]=o&255,g+=v,o/=256,E-=8);_[x+g-v]|=S*128}},35717:function(Q){typeof Object.create=="function"?Q.exports=function(_,w){w&&(_.super_=w,_.prototype=Object.create(w.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}))}:Q.exports=function(_,w){if(w){_.super_=w;var x=function(){};x.prototype=w.prototype,_.prototype=new x,_.prototype.constructor=_}}},5826:function(Q){var Y={}.toString;Q.exports=Array.isArray||function(_){return Y.call(_)=="[object Array]"}},89246:function(Q,Y,_){"use strict";_.d(Y,{l4:function(){return q}});var w=function(j,G){var O={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},D,m,p,B;return B={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(B[Symbol.iterator]=function(){return this}),B;function d(h){return function(I){return f([h,I])}}function f(h){if(D)throw new TypeError("Generator is already executing.");for(;O;)try{if(D=1,m&&(p=h[0]&2?m.return:h[0]?m.throw||((p=m.return)&&p.call(m),0):m.next)&&!(p=p.call(m,h[1])).done)return p;switch(m=0,p&&(h=[h[0]&2,p.value]),h[0]){case 0:case 1:p=h;break;case 4:return O.label++,{value:h[1],done:!1};case 5:O.label++,m=h[1],h=[0];continue;case 7:h=O.ops.pop(),O.trys.pop();continue;default:if(p=O.trys,!(p=p.length>0&&p[p.length-1])&&(h[0]===6||h[0]===2)){O=0;continue}if(h[0]===3&&(!p||h[1]>p[0]&&h[1]<p[3])){O.label=h[1];break}if(h[0]===6&&O.label<p[1]){O.label=p[1],p=h;break}if(p&&O.label<p[2]){O.label=p[2],O.ops.push(h);break}p[2]&&O.ops.pop(),O.trys.pop();continue}h=G.call(j,O)}catch(I){h=[6,I],m=0}finally{D=p=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}},x=function(j,G){var O=typeof Symbol=="function"&&j[Symbol.iterator];if(!O)return j;var D=O.call(j),m,p=[],B;try{for(;(G===void 0||G-- >0)&&!(m=D.next()).done;)p.push(m.value)}catch(d){B={error:d}}finally{try{m&&!m.done&&(O=D.return)&&O.call(D)}finally{if(B)throw B.error}}return p},L=function(j,G,O){if(O||arguments.length===2)for(var D=0,m=G.length,p;D<m;D++)(p||!(D in G))&&(p||(p=Array.prototype.slice.call(G,0,D)),p[D]=G[D]);return j.concat(p||Array.prototype.slice.call(G))},C=function(j){var G=typeof Symbol=="function"&&Symbol.iterator,O=G&&j[G],D=0;if(O)return O.call(j);if(j&&typeof j.length=="number")return{next:function(){return j&&D>=j.length&&(j=void 0),{value:j&&j[D++],done:!j}}};throw new TypeError(G?"Object is not iterable.":"Symbol.iterator is not defined.")};function b(j){var G=this;j===void 0&&(j=[]);var O=0,D=[];this.size=function(){return O},this.empty=function(){return O===0},this.clear=function(){O=0,D.length=0},this.front=function(){if(!this.empty())return D[0]},this.back=function(){if(!this.empty())return D[O-1]},this.forEach=function(m){D.forEach(m)},this.getElementByPos=function(m){if(m<0||m>=O)throw new Error("pos must more than 0 and less than vector's size");return D[m]},this.eraseElementByPos=function(m){if(m<0||m>=O)throw new Error("pos must more than 0 and less than vector's size");for(var p=m;p<O-1;++p)D[p]=D[p+1];this.popBack()},this.eraseElementByValue=function(m){var p=[];this.forEach(function(d){d!==m&&p.push(d)}),p.forEach(function(d,f){D[f]=d});for(var B=p.length;O>B;)this.popBack()},this.pushBack=function(m){D.push(m),++O},this.popBack=function(){D.pop(),O>0&&--O},this.setElementByPos=function(m,p){if(m<0||m>=O)throw new Error("pos must more than 0 and less than vector's size");D[m]=p},this.insert=function(m,p,B){if(B===void 0&&(B=1),m<0||m>O)throw new Error("pos must more than 0 and less than or equal to vector's size");D.splice.apply(D,L([m,0],x(new Array(B).fill(p)),!1)),O+=B},this.find=function(m){return D.includes(m)},this.reverse=function(){D.reverse()},this.unique=function(){var m,p=[];this.forEach(function(d,f){(f===0||d!==m)&&(p.push(d),m=d)}),p.forEach(function(d,f){D[f]=d});for(var B=p.length;O>B;)this.popBack()},this.sort=function(m){D.sort(m)},this[Symbol.iterator]=function(){return function(){return w(this,function(m){switch(m.label){case 0:return[5,C(D)];case 1:return[2,m.sent()]}})}()},j.forEach(function(m){return G.pushBack(m)}),Object.freeze(this)}Object.freeze(b);var o=null;function s(j){var G=this;j===void 0&&(j=[]);var O=0,D=[];this.size=function(){return O},this.empty=function(){return O===0},this.clear=function(){O=0,D.length=0},this.push=function(m){D.push(m),++O},this.pop=function(){D.pop(),O>0&&--O},this.top=function(){return D[O-1]},j.forEach(function(m){return G.push(m)}),Object.freeze(this)}Object.freeze(s);var l=null,E=function(j,G){var O={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},D,m,p,B;return B={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(B[Symbol.iterator]=function(){return this}),B;function d(h){return function(I){return f([h,I])}}function f(h){if(D)throw new TypeError("Generator is already executing.");for(;O;)try{if(D=1,m&&(p=h[0]&2?m.return:h[0]?m.throw||((p=m.return)&&p.call(m),0):m.next)&&!(p=p.call(m,h[1])).done)return p;switch(m=0,p&&(h=[h[0]&2,p.value]),h[0]){case 0:case 1:p=h;break;case 4:return O.label++,{value:h[1],done:!1};case 5:O.label++,m=h[1],h=[0];continue;case 7:h=O.ops.pop(),O.trys.pop();continue;default:if(p=O.trys,!(p=p.length>0&&p[p.length-1])&&(h[0]===6||h[0]===2)){O=0;continue}if(h[0]===3&&(!p||h[1]>p[0]&&h[1]<p[3])){O.label=h[1];break}if(h[0]===6&&O.label<p[1]){O.label=p[1],p=h;break}if(p&&O.label<p[2]){O.label=p[2],O.ops.push(h);break}p[2]&&O.ops.pop(),O.trys.pop();continue}h=G.call(j,O)}catch(I){h=[6,I],m=0}finally{D=p=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}},A=function(){function j(G){this.value=void 0,this.pre=void 0,this.next=void 0,this.value=G}return j}();function y(j){var G=this;j===void 0&&(j=[]);var O=0,D=void 0,m=void 0;this.size=function(){return O},this.empty=function(){return O===0},this.clear=function(){D=m=void 0,O=0},this.front=function(){return D==null?void 0:D.value},this.back=function(){return m==null?void 0:m.value},this.forEach=function(p){for(var B=D,d=0;B;){if(B.value===void 0)throw new Error("unknown error");p(B.value,d++),B=B.next}},this.getElementByPos=function(p){if(p<0||p>=O)throw new Error("pos must more then 0 and less then the list length");for(var B=D;p--&&B;)B=B.next;if(!B||B.value===void 0)throw new Error("unknown error");return B.value},this.eraseElementByPos=function(p){if(p<0||p>=O)throw new Error("erase pos must more then 0 and less then the list length");if(p===0)this.popFront();else if(p===O-1)this.popBack();else{for(var B=D;p--;){if(!(B==null?void 0:B.next))throw new Error("unknown error");B=B.next}if(!B||!B.pre||!B.next)throw new Error("unknown error");var d=B.pre,f=B.next;f.pre=d,d.next=f,O>0&&--O}},this.eraseElementByValue=function(p){for(;D&&D.value===p;)this.popFront();for(;m&&m.value===p;)this.popBack();if(!!D)for(var B=D;B;){if(B.value===p){var d=B.pre,f=B.next;f&&(f.pre=d),d&&(d.next=f),O>0&&--O}B=B.next}},this.pushBack=function(p){if(p==null)throw new Error("you can't push null or undefined here");++O;var B=new A(p);m?(m.next=B,B.pre=m,m=B):D=m=B},this.popBack=function(){!m||(O>0&&--O,!!m&&(D===m?D=m=void 0:(m=m.pre,m&&(m.next=void 0))))},this.setElementByPos=function(p,B){if(B==null)throw new Error("you can't set null or undefined here");if(p<0||p>=O)throw new Error("pos must more then 0 and less then the list length");for(var d=D;p--;){if(!d)throw new Error("unknown error");d=d.next}d&&(d.value=B)},this.insert=function(p,B,d){if(d===void 0&&(d=1),B==null)throw new Error("you can't insert null or undefined here");if(p<0||p>O)throw new Error("insert pos must more then 0 and less then or equal to the list length");if(d<0)throw new Error("insert size must more than 0");if(p===0)for(;d--;)this.pushFront(B);else if(p===O)for(;d--;)this.pushBack(B);else{for(var f=D,h=1;h<p;++h){if(!(f==null?void 0:f.next))throw new Error("unknown error");f=f==null?void 0:f.next}if(!f)throw new Error("unknown error");var I=f.next;for(O+=d;d--;)f.next=new A(B),f.next.pre=f,f=f.next;f.next=I,I&&(I.pre=f)}},this.find=function(p){for(var B=D;B;){if(B.value===p)return!0;B=B.next}return!1},this.reverse=function(){for(var p=D,B=m,d=0;p&&B&&d*2<O;){var f=p.value;p.value=B.value,B.value=f,p=p.next,B=B.pre,++d}},this.unique=function(){for(var p=D;p;){for(var B=p;B&&B.next&&B.value===B.next.value;)B=B.next,O>0&&--O;p.next=B.next,p.next&&(p.next.pre=p),p=p.next}},this.sort=function(p){var B=[];this.forEach(function(f){B.push(f)}),B.sort(p);var d=D;B.forEach(function(f){d&&(d.value=f,d=d.next)})},this.pushFront=function(p){if(p==null)throw new Error("you can't push null or undefined here");++O;var B=new A(p);D?(B.next=D,D.pre=B,D=B):D=m=B},this.popFront=function(){!D||(O>0&&--O,!!D&&(D===m?D=m=void 0:(D=D.next,D&&(D.pre=void 0))))},this.merge=function(p){var B=this,d=D;p.forEach(function(f){for(;d&&d.value!==void 0&&d.value<=f;)d=d.next;if(d===void 0)B.pushBack(f),d=m;else if(d===D)B.pushFront(f),d=D;else{++O;var h=d.pre;h&&(h.next=new A(f),h.next.pre=h,h.next.next=d,d&&(d.pre=h.next))}})},this[Symbol.iterator]=function(){return function(){var p;return E(this,function(B){switch(B.label){case 0:p=D,B.label=1;case 1:if(p===void 0)return[3,3];if(!p.value)throw new Error("unknown error");return[4,p.value];case 2:return B.sent(),p=p.next,[3,1];case 3:return[2]}})}()},j.forEach(function(p){return G.pushBack(p)}),Object.freeze(this)}Object.freeze(y);var P=y;function g(j){j===void 0&&(j=[]);var G=new P(j);this.size=function(){return G.size()},this.empty=function(){return G.empty()},this.clear=function(){G.clear()},this.push=function(O){G.pushBack(O)},this.pop=function(){G.popFront()},this.front=function(){return G.front()},Object.freeze(this)}Object.freeze(g);var v=null,S=function(j,G){var O={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},D,m,p,B;return B={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(B[Symbol.iterator]=function(){return this}),B;function d(h){return function(I){return f([h,I])}}function f(h){if(D)throw new TypeError("Generator is already executing.");for(;O;)try{if(D=1,m&&(p=h[0]&2?m.return:h[0]?m.throw||((p=m.return)&&p.call(m),0):m.next)&&!(p=p.call(m,h[1])).done)return p;switch(m=0,p&&(h=[h[0]&2,p.value]),h[0]){case 0:case 1:p=h;break;case 4:return O.label++,{value:h[1],done:!1};case 5:O.label++,m=h[1],h=[0];continue;case 7:h=O.ops.pop(),O.trys.pop();continue;default:if(p=O.trys,!(p=p.length>0&&p[p.length-1])&&(h[0]===6||h[0]===2)){O=0;continue}if(h[0]===3&&(!p||h[1]>p[0]&&h[1]<p[3])){O.label=h[1];break}if(h[0]===6&&O.label<p[1]){O.label=p[1],p=h;break}if(p&&O.label<p[2]){O.label=p[2],O.ops.push(h);break}p[2]&&O.ops.pop(),O.trys.pop();continue}h=G.call(j,O)}catch(I){h=[6,I],m=0}finally{D=p=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}};T.sigma=3,T.bucketSize=5e3;function T(j){var G=this;j===void 0&&(j=[]);var O=[],D=0,m=0,p=0,B=0,d=0,f=0;this.size=function(){return f},this.empty=function(){return f===0},this.clear=function(){D=p=m=B=d=f=0,I.call(this,T.bucketSize),f=0},this.front=function(){return O[D][m]},this.back=function(){return O[p][B]},this.forEach=function(M){if(!this.empty()){var t=0;if(D===p){for(var r=m;r<=B;++r)M(O[D][r],t++);return}for(var r=m;r<T.bucketSize;++r)M(O[D][r],t++);for(var r=D+1;r<p;++r)for(var u=0;u<T.bucketSize;++u)M(O[r][u],t++);for(var r=0;r<=B;++r)M(O[p][r],t++)}};var h=function(M){var t=D*T.bucketSize+m,r=t+M,u=p*T.bucketSize+B;if(r<t||r>u)throw new Error("pos should more than 0 and less than queue's size");var a=Math.floor(r/T.bucketSize),i=r%T.bucketSize;return{curNodeBucketIndex:a,curNodePointerIndex:i}};this.getElementByPos=function(M){var t=h(M),r=t.curNodeBucketIndex,u=t.curNodePointerIndex;return O[r][u]},this.eraseElementByPos=function(M){var t=this;if(M<0||M>f)throw new Error("pos should more than 0 and less than queue's size");if(M===0)this.popFront();else if(M===this.size())this.popBack();else{for(var r=[],u=M+1;u<f;++u)r.push(this.getElementByPos(u));this.cut(M),this.popBack(),r.forEach(function(a){return t.pushBack(a)})}},this.eraseElementByValue=function(M){if(!this.empty()){var t=[];this.forEach(function(a){a!==M&&t.push(a)});for(var r=t.length,u=0;u<r;++u)this.setElementByPos(u,t[u]);this.cut(r-1)}};var I=function(M){for(var t=[],r=M*T.sigma,u=Math.max(Math.ceil(r/T.bucketSize),2),a=0;a<u;++a)t.push(new Array(T.bucketSize));var i=Math.ceil(M/T.bucketSize),n=Math.floor(u/2)-Math.floor(i/2),e=n,c=0;if(this.size())for(var a=0;a<i;++a){for(var R=0;R<T.bucketSize;++R)if(t[n+a][R]=this.front(),this.popFront(),this.empty()){e=n+a,c=R;break}if(this.empty())break}O=t,D=n,m=0,p=e,B=c,d=u,f=M};this.pushBack=function(M){this.empty()||(p===d-1&&B===T.bucketSize-1&&I.call(this,this.size()),B<T.bucketSize-1?++B:p<d-1&&(++p,B=0)),++f,O[p][B]=M},this.popBack=function(){this.empty()||(this.size()!==1&&(B>0?--B:D<p&&(--p,B=T.bucketSize-1)),f>0&&--f)},this.setElementByPos=function(M,t){var r=h(M),u=r.curNodeBucketIndex,a=r.curNodePointerIndex;O[u][a]=t},this.insert=function(M,t,r){var u=this;if(r===void 0&&(r=1),M===0)for(;r--;)this.pushFront(t);else if(M===this.size())for(;r--;)this.pushBack(t);else{for(var a=[],i=M;i<f;++i)a.push(this.getElementByPos(i));this.cut(M-1);for(var i=0;i<r;++i)this.pushBack(t);a.forEach(function(n){return u.pushBack(n)})}},this.find=function(M){if(D===p){for(var t=m;t<=B;++t)if(O[D][t]===M)return!0;return!1}for(var t=m;t<T.bucketSize;++t)if(O[D][t]===M)return!0;for(var t=D+1;t<p;++t)for(var r=0;r<T.bucketSize;++r)if(O[t][r]===M)return!0;for(var t=0;t<=B;++t)if(O[p][t]===M)return!0;return!1},this.reverse=function(){for(var M=0,t=f-1;M<t;){var r=this.getElementByPos(M);this.setElementByPos(M,this.getElementByPos(t)),this.setElementByPos(t,r),++M,--t}},this.unique=function(){if(!this.empty()){var M=[],t=this.front();this.forEach(function(u,a){(a===0||u!==t)&&(M.push(u),t=u)});for(var r=0;r<f;++r)this.setElementByPos(r,M[r]);this.cut(M.length-1)}},this.sort=function(M){var t=[];this.forEach(function(u){t.push(u)}),t.sort(M);for(var r=0;r<f;++r)this.setElementByPos(r,t[r])},this.pushFront=function(M){this.empty()||(D===0&&m===0&&I.call(this,this.size()),m>0?--m:D>0&&(--D,m=T.bucketSize-1)),++f,O[D][m]=M},this.popFront=function(){this.empty()||(this.size()!==1&&(m<T.bucketSize-1?++m:D<p&&(++D,m=0)),f>0&&--f)},this.shrinkToFit=function(){var M=this,t=[];this.forEach(function(i){t.push(i)});var r=t.length;O=[];for(var u=Math.ceil(r/T.bucketSize),a=0;a<u;++a)O.push(new Array(T.bucketSize));this.clear(),t.forEach(function(i){return M.pushBack(i)})},this.cut=function(M){if(M<0){this.clear();return}var t=h(M),r=t.curNodeBucketIndex,u=t.curNodePointerIndex;p=r,B=u,f=M+1},this[Symbol.iterator]=function(){return function(){var M,M,M,t,M;return S(this,function(r){switch(r.label){case 0:if(f===0)return[2];if(D!==p)return[3,5];M=m,r.label=1;case 1:return M<=B?[4,O[D][M]]:[3,4];case 2:r.sent(),r.label=3;case 3:return++M,[3,1];case 4:return[2];case 5:M=m,r.label=6;case 6:return M<T.bucketSize?[4,O[D][M]]:[3,9];case 7:r.sent(),r.label=8;case 8:return++M,[3,6];case 9:M=D+1,r.label=10;case 10:if(!(M<p))return[3,15];t=0,r.label=11;case 11:return t<T.bucketSize?[4,O[M][t]]:[3,14];case 12:r.sent(),r.label=13;case 13:return++t,[3,11];case 14:return++M,[3,10];case 15:M=0,r.label=16;case 16:return M<=B?[4,O[p][M]]:[3,19];case 17:r.sent(),r.label=18;case 18:return++M,[3,16];case 19:return[2]}})}()},function(){var M=T.bucketSize;j.size?M=j.size():j.length&&(M=j.length);var t=M*T.sigma;d=Math.ceil(t/T.bucketSize),d=Math.max(d,3);for(var r=0;r<d;++r)O.push(new Array(T.bucketSize));var u=Math.ceil(M/T.bucketSize);D=Math.floor(d/2)-Math.floor(u/2),p=D,j.forEach(function(a){return G.pushBack(a)})}(),Object.freeze(this)}Object.freeze(T);var U=null;function N(j,G){j===void 0&&(j=[]),G=G||function(B,d){return B>d?-1:B<d?1:0};var O=[];j.forEach(function(B){return O.push(B)});var D=O.length,m=function(B,d){if(B<0||B>=D)throw new Error("unknown error");if(d<0||d>=D)throw new Error("unknown error");var f=O[B];O[B]=O[d],O[d]=f},p=function(B){if(B<0||B>=D)throw new Error("unknown error");var d=B*2+1,f=B*2+2;d<D&&G(O[B],O[d])>0&&m(B,d),f<D&&G(O[B],O[f])>0&&m(B,f)};(function(){for(var B=Math.floor((D-1)/2);B>=0;--B)for(var d=B,f=d*2+1;f<D;){var h=f,I=h+1,M=h;if(I<D&&G(O[h],O[I])>0&&(M=I),G(O[d],O[M])<=0)break;m(d,M),d=M,f=d*2+1}})(),this.size=function(){return D},this.empty=function(){return D===0},this.clear=function(){D=0,O.length=0},this.push=function(B){if(O.push(B),++D,D!==1)for(var d=D-1;d>0;){var f=Math.floor((d-1)/2);if(G(O[f],B)<=0)break;p(f),d=f}},this.pop=function(){if(!this.empty()){if(this.size()===1){--D;return}var B=O[D-1];--D;for(var d=0;d<this.size();){var f=d*2+1,h=d*2+2;if(f>=this.size())break;var I=f;if(h<this.size()&&G(O[f],O[h])>0&&(I=h),G(O[I],B)>=0)break;O[d]=O[I],d=I}O[d]=B}},this.top=function(){return O[0]},Object.freeze(this)}Object.freeze(N);var H=null,V=function(){function j(G,O){this.color=!0,this.key=void 0,this.value=void 0,this.parent=void 0,this.brother=void 0,this.leftChild=void 0,this.rightChild=void 0,this.key=G,this.value=O}return j.prototype.rotateLeft=function(){var G=this.parent,O=this.brother,D=this.leftChild,m=this.rightChild;if(!m)throw new Error("unknown error");var p=m.leftChild,B=m.rightChild;return G&&(G.leftChild===this?G.leftChild=m:G.rightChild===this&&(G.rightChild=m)),m.parent=G,m.brother=O,m.leftChild=this,m.rightChild=B,O&&(O.brother=m),this.parent=m,this.brother=B,this.leftChild=D,this.rightChild=p,B&&(B.parent=m,B.brother=this),D&&(D.parent=this,D.brother=p),p&&(p.parent=this,p.brother=D),m},j.prototype.rotateRight=function(){var G=this.parent,O=this.brother,D=this.leftChild;if(!D)throw new Error("unknown error");var m=this.rightChild,p=D.leftChild,B=D.rightChild;return G&&(G.leftChild===this?G.leftChild=D:G.rightChild===this&&(G.rightChild=D)),D.parent=G,D.brother=O,D.leftChild=p,D.rightChild=this,O&&(O.brother=D),p&&(p.parent=D,p.brother=this),this.parent=D,this.brother=p,this.leftChild=B,this.rightChild=m,B&&(B.parent=this,B.brother=m),m&&(m.parent=this,m.brother=B),D},j.prototype.remove=function(){if(this.leftChild||this.rightChild)throw new Error("can only remove leaf node");this.parent&&(this===this.parent.leftChild?this.parent.leftChild=void 0:this===this.parent.rightChild&&(this.parent.rightChild=void 0)),this.brother&&(this.brother.brother=void 0),this.key=void 0,this.value=void 0,this.parent=void 0,this.brother=void 0},j.TreeNodeColorType={red:!0,black:!1},j}();Object.freeze(V);var k=V,X=function(j,G){var O={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},D,m,p,B;return B={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(B[Symbol.iterator]=function(){return this}),B;function d(h){return function(I){return f([h,I])}}function f(h){if(D)throw new TypeError("Generator is already executing.");for(;O;)try{if(D=1,m&&(p=h[0]&2?m.return:h[0]?m.throw||((p=m.return)&&p.call(m),0):m.next)&&!(p=p.call(m,h[1])).done)return p;switch(m=0,p&&(h=[h[0]&2,p.value]),h[0]){case 0:case 1:p=h;break;case 4:return O.label++,{value:h[1],done:!1};case 5:O.label++,m=h[1],h=[0];continue;case 7:h=O.ops.pop(),O.trys.pop();continue;default:if(p=O.trys,!(p=p.length>0&&p[p.length-1])&&(h[0]===6||h[0]===2)){O=0;continue}if(h[0]===3&&(!p||h[1]>p[0]&&h[1]<p[3])){O.label=h[1];break}if(h[0]===6&&O.label<p[1]){O.label=p[1],p=h;break}if(p&&O.label<p[2]){O.label=p[2],O.ops.push(h);break}p[2]&&O.ops.pop(),O.trys.pop();continue}h=G.call(j,O)}catch(I){h=[6,I],m=0}finally{D=p=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}},W=function(j){var G=typeof Symbol=="function"&&Symbol.iterator,O=G&&j[G],D=0;if(O)return O.call(j);if(j&&typeof j.length=="number")return{next:function(){return j&&D>=j.length&&(j=void 0),{value:j&&j[D++],done:!j}}};throw new TypeError(G?"Object is not iterable.":"Symbol.iterator is not defined.")};function ie(j,G){var O=this;j===void 0&&(j=[]),G=G||function(e,c){return e<c?-1:e>c?1:0};var D=0,m=new k;m.color=k.TreeNodeColorType.black,this.size=function(){return D},this.empty=function(){return D===0},this.clear=function(){D=0,m.key=void 0,m.leftChild=m.rightChild=m.brother=m.parent=void 0,m.color=k.TreeNodeColorType.black};var p=function(e){if(!e||e.key===void 0)throw new Error("unknown error");return e.leftChild?p(e.leftChild):e},B=function(e){if(!e||e.key===void 0)throw new Error("unknown error");return e.rightChild?B(e.rightChild):e};this.front=function(){if(!this.empty()){var e=p(m);return e.key}},this.back=function(){if(!this.empty()){var e=B(m);return e.key}},this.forEach=function(e){var c,R,K=0;try{for(var te=W(this),ae=te.next();!ae.done;ae=te.next()){var he=ae.value;e(he,K++)}}catch(ue){c={error:ue}}finally{try{ae&&!ae.done&&(R=te.return)&&R.call(te)}finally{if(c)throw c.error}}},this.getElementByPos=function(e){var c,R;if(e<0||e>=this.size())throw new Error("pos must more than 0 and less than set's size");var K=0;try{for(var te=W(this),ae=te.next();!ae.done;ae=te.next()){var he=ae.value;if(K===e)return he;++K}}catch(ue){c={error:ue}}finally{try{ae&&!ae.done&&(R=te.return)&&R.call(te)}finally{if(c)throw c.error}}throw new Error("unknown error")};var d=function(e){var c=e.parent;if(!c){if(e===m)return;throw new Error("unknown error")}if(e.color===k.TreeNodeColorType.red){e.color=k.TreeNodeColorType.black;return}var R=e.brother;if(!R)throw new Error("unknown error");if(e===c.leftChild){if(R.color===k.TreeNodeColorType.red){R.color=k.TreeNodeColorType.black,c.color=k.TreeNodeColorType.red;var K=c.rotateLeft();m===c&&(m=K),d(e)}else if(R.color===k.TreeNodeColorType.black)if(R.rightChild&&R.rightChild.color===k.TreeNodeColorType.red){R.color=c.color,c.color=k.TreeNodeColorType.black,R.rightChild&&(R.rightChild.color=k.TreeNodeColorType.black);var K=c.rotateLeft();m===c&&(m=K),e.color=k.TreeNodeColorType.black}else if((!R.rightChild||R.rightChild.color===k.TreeNodeColorType.black)&&R.leftChild&&R.leftChild.color===k.TreeNodeColorType.red){R.color=k.TreeNodeColorType.red,R.leftChild&&(R.leftChild.color=k.TreeNodeColorType.black);var K=R.rotateRight();m===R&&(m=K),d(e)}else(!R.leftChild||R.leftChild.color===k.TreeNodeColorType.black)&&(!R.rightChild||R.rightChild.color===k.TreeNodeColorType.black)&&(R.color=k.TreeNodeColorType.red,d(c))}else if(e===c.rightChild){if(R.color===k.TreeNodeColorType.red){R.color=k.TreeNodeColorType.black,c.color=k.TreeNodeColorType.red;var K=c.rotateRight();m===c&&(m=K),d(e)}else if(R.color===k.TreeNodeColorType.black)if(R.leftChild&&R.leftChild.color===k.TreeNodeColorType.red){R.color=c.color,c.color=k.TreeNodeColorType.black,R.leftChild&&(R.leftChild.color=k.TreeNodeColorType.black);var K=c.rotateRight();m===c&&(m=K),e.color=k.TreeNodeColorType.black}else if((!R.leftChild||R.leftChild.color===k.TreeNodeColorType.black)&&R.rightChild&&R.rightChild.color===k.TreeNodeColorType.red){R.color=k.TreeNodeColorType.red,R.rightChild&&(R.rightChild.color=k.TreeNodeColorType.black);var K=R.rotateLeft();m===R&&(m=K),d(e)}else(!R.leftChild||R.leftChild.color===k.TreeNodeColorType.black)&&(!R.rightChild||R.rightChild.color===k.TreeNodeColorType.black)&&(R.color=k.TreeNodeColorType.red,d(c))}},f=function(e){for(var c=e;c.leftChild||c.rightChild;){if(c.rightChild){c=p(c.rightChild);var R=e.key;e.key=c.key,c.key=R,e=c}if(c.leftChild){c=B(c.leftChild);var R=e.key;e.key=c.key,c.key=R,e=c}}d(c),c&&c.remove(),--D,m.color=k.TreeNodeColorType.black},h=function(e,c){if(!e||e.key===void 0)return!1;var R=h(e.leftChild,c);return R||c(e)?!0:h(e.rightChild,c)};this.eraseElementByPos=function(e){if(e<0||e>=D)throw new Error("pos must more than 0 and less than set's size");var c=0;h(m,function(R){return e===c?(f(R),!0):(++c,!1)})},this.eraseElementByValue=function(e){if(!this.empty()){var c=t(m,e);c===void 0||c.key===void 0||G(c.key,e)!==0||f(c)}};var I=function(e,c){if(!e||e.key===void 0)throw new Error("unknown error");var R=G(c,e.key);return R<0?e.leftChild?I(e.leftChild,c):(e.leftChild=new k,e.leftChild.parent=e,e.leftChild.brother=e.rightChild,e.rightChild&&(e.rightChild.brother=e.leftChild),e.leftChild):R>0?e.rightChild?I(e.rightChild,c):(e.rightChild=new k,e.rightChild.parent=e,e.rightChild.brother=e.leftChild,e.leftChild&&(e.leftChild.brother=e.rightChild),e.rightChild):e},M=function(e){var c=e.parent;if(!c){if(e===m)return;throw new Error("unknown error")}if(c.color!==k.TreeNodeColorType.black&&c.color===k.TreeNodeColorType.red){var R=c.brother,K=c.parent;if(!K)throw new Error("unknown error");if(R&&R.color===k.TreeNodeColorType.red)R.color=c.color=k.TreeNodeColorType.black,K.color=k.TreeNodeColorType.red,M(K);else if(!R||R.color===k.TreeNodeColorType.black){if(c===K.leftChild){if(e===c.leftChild){c.color=k.TreeNodeColorType.black,K.color=k.TreeNodeColorType.red;var te=K.rotateRight();K===m&&(m=te)}else if(e===c.rightChild){var te=c.rotateLeft();K===m&&(m=te),M(c)}}else if(c===K.rightChild){if(e===c.leftChild){var te=c.rotateRight();K===m&&(m=te),M(c)}else if(e===c.rightChild){c.color=k.TreeNodeColorType.black,K.color=k.TreeNodeColorType.red;var te=K.rotateLeft();K===m&&(m=te)}}}}};this.insert=function(e){if(e==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(this.empty()){++D,m.key=e,m.color=k.TreeNodeColorType.black;return}var c=I(m,e);c.key!==void 0&&G(c.key,e)===0||(++D,c.key=e,M(c),m.color=k.TreeNodeColorType.black)};var t=function(e,c){if(!(!e||e.key===void 0)){var R=G(c,e.key);return R<0?t(e.leftChild,c):R>0?t(e.rightChild,c):e}};this.find=function(e){var c=t(m,e);return c!==void 0&&c.key!==void 0&&G(c.key,e)===0};var r=function(e,c){if(!(!e||e.key===void 0)){var R=G(e.key,c);if(R===0)return e.key;if(R<0)return r(e.rightChild,c);var K=r(e.leftChild,c);return K!==void 0?K:e.key}};this.lowerBound=function(e){return r(m,e)};var u=function(e,c){if(!(!e||e.key===void 0)){var R=G(e.key,c);if(R<=0)return u(e.rightChild,c);var K=u(e.leftChild,c);return K!==void 0?K:e.key}};this.upperBound=function(e){return u(m,e)};var a=function(e,c){if(!(!e||e.key===void 0)){var R=G(e.key,c);if(R===0)return e.key;if(R>0)return a(e.leftChild,c);var K=a(e.rightChild,c);return K!==void 0?K:e.key}};this.reverseLowerBound=function(e){return a(m,e)};var i=function(e,c){if(!(!e||e.key===void 0)){var R=G(e.key,c);if(R>=0)return i(e.leftChild,c);var K=i(e.rightChild,c);return K!==void 0?K:e.key}};this.reverseUpperBound=function(e){return i(m,e)},this.union=function(e){var c=this;e.forEach(function(R){return c.insert(R)})},this.getHeight=function(){if(this.empty())return 0;var e=function(c){return c?Math.max(e(c.leftChild),e(c.rightChild))+1:1};return e(m)};var n=function(e){return X(this,function(c){switch(c.label){case 0:return!e||e.key===void 0?[2]:[5,W(n(e.leftChild))];case 1:return c.sent(),[4,e.key];case 2:return c.sent(),[5,W(n(e.rightChild))];case 3:return c.sent(),[2]}})};this[Symbol.iterator]=function(){return n(m)},j.forEach(function(e){return O.insert(e)}),Object.freeze(this)}Object.freeze(ie);var q=ie,le=function(j,G){var O={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},D,m,p,B;return B={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(B[Symbol.iterator]=function(){return this}),B;function d(h){return function(I){return f([h,I])}}function f(h){if(D)throw new TypeError("Generator is already executing.");for(;O;)try{if(D=1,m&&(p=h[0]&2?m.return:h[0]?m.throw||((p=m.return)&&p.call(m),0):m.next)&&!(p=p.call(m,h[1])).done)return p;switch(m=0,p&&(h=[h[0]&2,p.value]),h[0]){case 0:case 1:p=h;break;case 4:return O.label++,{value:h[1],done:!1};case 5:O.label++,m=h[1],h=[0];continue;case 7:h=O.ops.pop(),O.trys.pop();continue;default:if(p=O.trys,!(p=p.length>0&&p[p.length-1])&&(h[0]===6||h[0]===2)){O=0;continue}if(h[0]===3&&(!p||h[1]>p[0]&&h[1]<p[3])){O.label=h[1];break}if(h[0]===6&&O.label<p[1]){O.label=p[1],p=h;break}if(p&&O.label<p[2]){O.label=p[2],O.ops.push(h);break}p[2]&&O.ops.pop(),O.trys.pop();continue}h=G.call(j,O)}catch(I){h=[6,I],m=0}finally{D=p=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}},ne=function(j){var G=typeof Symbol=="function"&&Symbol.iterator,O=G&&j[G],D=0;if(O)return O.call(j);if(j&&typeof j.length=="number")return{next:function(){return j&&D>=j.length&&(j=void 0),{value:j&&j[D++],done:!j}}};throw new TypeError(G?"Object is not iterable.":"Symbol.iterator is not defined.")};function J(j,G){var O=this;j===void 0&&(j=[]),G=G||function(e,c){return e<c?-1:e>c?1:0};var D=0,m=new k;m.color=k.TreeNodeColorType.black,this.size=function(){return D},this.empty=function(){return D===0},this.clear=function(){D=0,m.key=m.value=void 0,m.leftChild=m.rightChild=m.brother=void 0};var p=function(e){if(!e||e.key===void 0)throw new Error("unknown error");return e.leftChild?p(e.leftChild):e},B=function(e){if(!e||e.key===void 0)throw new Error("unknown error");return e.rightChild?B(e.rightChild):e};this.front=function(){if(!this.empty()){var e=p(m);if(e.key===void 0||e.value===void 0)throw new Error("unknown error");return{key:e.key,value:e.value}}},this.back=function(){if(!this.empty()){var e=B(m);if(e.key===void 0||e.value===void 0)throw new Error("unknown error");return{key:e.key,value:e.value}}},this.forEach=function(e){var c,R,K=0;try{for(var te=ne(this),ae=te.next();!ae.done;ae=te.next()){var he=ae.value;e(he,K++)}}catch(ue){c={error:ue}}finally{try{ae&&!ae.done&&(R=te.return)&&R.call(te)}finally{if(c)throw c.error}}},this.getElementByPos=function(e){var c,R;if(e<0||e>=this.size())throw new Error("pos must more than 0 and less than set's size");var K=0;try{for(var te=ne(this),ae=te.next();!ae.done;ae=te.next()){var he=ae.value;if(K===e)return he;++K}}catch(ue){c={error:ue}}finally{try{ae&&!ae.done&&(R=te.return)&&R.call(te)}finally{if(c)throw c.error}}throw new Error("unknown Error")};var d=function(e,c){if(!(!e||e.key===void 0||e.value===void 0)){var R=G(e.key,c);return R===0?{key:e.key,value:e.value}:R<0?d(e.rightChild,c):d(e.leftChild,c)||{key:e.key,value:e.value}}};this.lowerBound=function(e){return d(m,e)};var f=function(e,c){if(!(!e||e.key===void 0||e.value===void 0)){var R=G(e.key,c);return R<=0?f(e.rightChild,c):f(e.leftChild,c)||{key:e.key,value:e.value}}};this.upperBound=function(e){return f(m,e)};var h=function(e,c){if(!(!e||e.key===void 0||e.value===void 0)){var R=G(e.key,c);return R===0?{key:e.key,value:e.value}:R>0?h(e.leftChild,c):h(e.rightChild,c)||{key:e.key,value:e.value}}};this.reverseLowerBound=function(e){return h(m,e)};var I=function(e,c){if(!(!e||e.key===void 0||e.value===void 0)){var R=G(e.key,c);return R>=0?I(e.leftChild,c):I(e.rightChild,c)||{key:e.key,value:e.value}}};this.reverseUpperBound=function(e){return I(m,e)};var M=function(e){var c=e.parent;if(!c){if(e===m)return;throw new Error("unknown error")}if(e.color===k.TreeNodeColorType.red){e.color=k.TreeNodeColorType.black;return}var R=e.brother;if(!R)throw new Error("unknown error");if(e===c.leftChild){if(R.color===k.TreeNodeColorType.red){R.color=k.TreeNodeColorType.black,c.color=k.TreeNodeColorType.red;var K=c.rotateLeft();m===c&&(m=K),M(e)}else if(R.color===k.TreeNodeColorType.black)if(R.rightChild&&R.rightChild.color===k.TreeNodeColorType.red){R.color=c.color,c.color=k.TreeNodeColorType.black,R.rightChild&&(R.rightChild.color=k.TreeNodeColorType.black);var K=c.rotateLeft();m===c&&(m=K),e.color=k.TreeNodeColorType.black}else if((!R.rightChild||R.rightChild.color===k.TreeNodeColorType.black)&&R.leftChild&&R.leftChild.color===k.TreeNodeColorType.red){R.color=k.TreeNodeColorType.red,R.leftChild&&(R.leftChild.color=k.TreeNodeColorType.black);var K=R.rotateRight();m===R&&(m=K),M(e)}else(!R.leftChild||R.leftChild.color===k.TreeNodeColorType.black)&&(!R.rightChild||R.rightChild.color===k.TreeNodeColorType.black)&&(R.color=k.TreeNodeColorType.red,M(c))}else if(e===c.rightChild){if(R.color===k.TreeNodeColorType.red){R.color=k.TreeNodeColorType.black,c.color=k.TreeNodeColorType.red;var K=c.rotateRight();m===c&&(m=K),M(e)}else if(R.color===k.TreeNodeColorType.black)if(R.leftChild&&R.leftChild.color===k.TreeNodeColorType.red){R.color=c.color,c.color=k.TreeNodeColorType.black,R.leftChild&&(R.leftChild.color=k.TreeNodeColorType.black);var K=c.rotateRight();m===c&&(m=K),e.color=k.TreeNodeColorType.black}else if((!R.leftChild||R.leftChild.color===k.TreeNodeColorType.black)&&R.rightChild&&R.rightChild.color===k.TreeNodeColorType.red){R.color=k.TreeNodeColorType.red,R.rightChild&&(R.rightChild.color=k.TreeNodeColorType.black);var K=R.rotateLeft();m===R&&(m=K),M(e)}else(!R.leftChild||R.leftChild.color===k.TreeNodeColorType.black)&&(!R.rightChild||R.rightChild.color===k.TreeNodeColorType.black)&&(R.color=k.TreeNodeColorType.red,M(c))}},t=function(e){for(var c=e;c.leftChild||c.rightChild;){if(c.rightChild){c=p(c.rightChild);var R=e.key;e.key=c.key,c.key=R;var K=e.value;e.value=c.value,c.value=K,e=c}if(c.leftChild){c=B(c.leftChild);var R=e.key;e.key=c.key,c.key=R;var K=e.value;e.value=c.value,c.value=K,e=c}}M(c),c&&c.remove(),--D,m.color=k.TreeNodeColorType.black},r=function(e,c){if(!e||e.key===void 0)return!1;var R=r(e.leftChild,c);return R||c(e)?!0:r(e.rightChild,c)};this.eraseElementByPos=function(e){if(e<0||e>=D)throw new Error("pos must more than 0 and less than set's size");var c=0;r(m,function(R){return e===c?(t(R),!0):(++c,!1)})},this.eraseElementByKey=function(e){if(!this.empty()){var c=i(m,e);c===void 0||c.key===void 0||G(c.key,e)!==0||t(c)}};var u=function(e,c){if(!e||e.key===void 0)throw new Error("unknown error");var R=G(c,e.key);return R<0?e.leftChild?u(e.leftChild,c):(e.leftChild=new k,e.leftChild.parent=e,e.leftChild.brother=e.rightChild,e.rightChild&&(e.rightChild.brother=e.leftChild),e.leftChild):R>0?e.rightChild?u(e.rightChild,c):(e.rightChild=new k,e.rightChild.parent=e,e.rightChild.brother=e.leftChild,e.leftChild&&(e.leftChild.brother=e.rightChild),e.rightChild):e},a=function(e){var c=e.parent;if(!c){if(e===m)return;throw new Error("unknown error")}if(c.color!==k.TreeNodeColorType.black&&c.color===k.TreeNodeColorType.red){var R=c.brother,K=c.parent;if(!K)throw new Error("unknown error");if(R&&R.color===k.TreeNodeColorType.red)R.color=c.color=k.TreeNodeColorType.black,K.color=k.TreeNodeColorType.red,a(K);else if(!R||R.color===k.TreeNodeColorType.black){if(c===K.leftChild){if(e===c.leftChild){c.color=k.TreeNodeColorType.black,K.color=k.TreeNodeColorType.red;var te=K.rotateRight();K===m&&(m=te)}else if(e===c.rightChild){var te=c.rotateLeft();K===m&&(m=te),a(c)}}else if(c===K.rightChild){if(e===c.leftChild){var te=c.rotateRight();K===m&&(m=te),a(c)}else if(e===c.rightChild){c.color=k.TreeNodeColorType.black,K.color=k.TreeNodeColorType.red;var te=K.rotateLeft();K===m&&(m=te)}}}}};this.setElement=function(e,c){if(e==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(c==null){this.eraseElementByKey(e);return}if(this.empty()){++D,m.key=e,m.value=c,m.color=k.TreeNodeColorType.black;return}var R=u(m,e);if(R.key!==void 0&&G(R.key,e)===0){R.value=c;return}++D,R.key=e,R.value=c,a(R),m.color=k.TreeNodeColorType.black};var i=function(e,c){if(!(!e||e.key===void 0)){var R=G(c,e.key);return R<0?i(e.leftChild,c):R>0?i(e.rightChild,c):e}};this.find=function(e){return!!i(m,e)},this.getElementByKey=function(e){var c=i(m,e);if((c==null?void 0:c.key)===void 0||(c==null?void 0:c.value)===void 0)throw new Error("unknown error");return c.value},this.union=function(e){var c=this;e.forEach(function(R){var K=R.key,te=R.value;return c.setElement(K,te)})},this.getHeight=function(){if(this.empty())return 0;var e=function(c){return c?Math.max(e(c.leftChild),e(c.rightChild))+1:1};return e(m)};var n=function(e){return le(this,function(c){switch(c.label){case 0:return!e||e.key===void 0||e.value===void 0?[2]:[5,ne(n(e.leftChild))];case 1:return c.sent(),[4,{key:e.key,value:e.value}];case 2:return c.sent(),[5,ne(n(e.rightChild))];case 3:return c.sent(),[2]}})};this[Symbol.iterator]=function(){return n(m)},j.forEach(function(e){var c=e.key,R=e.value;return O.setElement(c,R)}),Object.freeze(this)}Object.freeze(J);var z=J,F=function(j,G){var O={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},D,m,p,B;return B={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(B[Symbol.iterator]=function(){return this}),B;function d(h){return function(I){return f([h,I])}}function f(h){if(D)throw new TypeError("Generator is already executing.");for(;O;)try{if(D=1,m&&(p=h[0]&2?m.return:h[0]?m.throw||((p=m.return)&&p.call(m),0):m.next)&&!(p=p.call(m,h[1])).done)return p;switch(m=0,p&&(h=[h[0]&2,p.value]),h[0]){case 0:case 1:p=h;break;case 4:return O.label++,{value:h[1],done:!1};case 5:O.label++,m=h[1],h=[0];continue;case 7:h=O.ops.pop(),O.trys.pop();continue;default:if(p=O.trys,!(p=p.length>0&&p[p.length-1])&&(h[0]===6||h[0]===2)){O=0;continue}if(h[0]===3&&(!p||h[1]>p[0]&&h[1]<p[3])){O.label=h[1];break}if(h[0]===6&&O.label<p[1]){O.label=p[1],p=h;break}if(p&&O.label<p[2]){O.label=p[2],O.ops.push(h);break}p[2]&&O.ops.pop(),O.trys.pop();continue}h=G.call(j,O)}catch(I){h=[6,I],m=0}finally{D=p=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}},ee=function(j){var G=typeof Symbol=="function"&&Symbol.iterator,O=G&&j[G],D=0;if(O)return O.call(j);if(j&&typeof j.length=="number")return{next:function(){return j&&D>=j.length&&(j=void 0),{value:j&&j[D++],done:!j}}};throw new TypeError(G?"Object is not iterable.":"Symbol.iterator is not defined.")};Z.initSize=1<<4,Z.maxSize=1<<30,Z.sigma=.75,Z.treeifyThreshold=8,Z.untreeifyThreshold=6,Z.minTreeifySize=64;function Z(j,G,O){var D=this;if(j===void 0&&(j=[]),G===void 0&&(G=Z.initSize),O=O||function(f){var h=0,I="";if(typeof f=="number")h=Math.floor(f),h=(h<<5)-h,h=h&h;else{typeof f!="string"?I=JSON.stringify(f):I=f;for(var M=0;M<I.length;M++){var t=I.charCodeAt(M);h=(h<<5)-h+t,h=h&h}}return h^=h>>>16,h},(G&G-1)!=0)throw new Error("initBucketNum must be 2 to the power of n");var m=0,p=[],B=Math.max(Z.initSize,Math.min(Z.maxSize,G));this.size=function(){return m},this.empty=function(){return m===0},this.clear=function(){m=0,B=G,p=[]},this.forEach=function(f){var h=0;p.forEach(function(I){I.forEach(function(M){f(M,h++)})})};var d=function(f){if(!(f>=Z.maxSize)){B=f*2;var h=[];p.forEach(function(I,M){if(!I.empty()){if(I instanceof P&&I.size()===1){var t=I.front();if(t===void 0)throw new Error("unknown error");h[O(t)&B-1]=new P([t])}else if(I instanceof q){var r=new P,u=new P;I.forEach(function(n){var e=O(n);(e&f)==0?r.pushBack(n):u.pushBack(n)}),r.size()>Z.untreeifyThreshold?h[M]=new q(r):r.size()&&(h[M]=r),u.size()>Z.untreeifyThreshold?h[M+f]=new q(u):u.size()&&(h[M+f]=u)}else{var a=new P,i=new P;I.forEach(function(n){var e=O(n);(e&f)==0?a.pushBack(n):i.pushBack(n)}),a.size()&&(h[M]=a),i.size()&&(h[M+f]=i)}p[M].clear()}}),p=h}};this.insert=function(f){if(f==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");var h=O(f)&B-1;if(!p[h])p[h]=new P([f]),++m;else{var I=p[h].size();if(p[h]instanceof P){if(p[h].find(f))return;p[h].pushBack(f),p[h].size()>=Z.treeifyThreshold&&(p[h]=new q(p[h]))}else p[h].insert(f);var M=p[h].size();m+=M-I}m>B*Z.sigma&&d.call(this,B)},this.eraseElementByValue=function(f){var h=O(f)&B-1;if(!!p[h]){var I=p[h].size();p[h].eraseElementByValue(f),p[h]instanceof q&&p[h].size()<=Z.untreeifyThreshold&&(p[h]=new P(p[h]));var M=p[h].size();m+=M-I}},this.find=function(f){var h=O(f)&B-1;return p[h]?p[h].find(f):!1},this[Symbol.iterator]=function(){return function(){var f,h,I,M,t,r,u;return F(this,function(a){switch(a.label){case 0:f=0,a.label=1;case 1:if(!(f<B))return[3,10];for(;f<B&&!p[f];)++f;if(f>=B)return[3,10];a.label=2;case 2:a.trys.push([2,7,8,9]),h=(r=void 0,ee(p[f])),I=h.next(),a.label=3;case 3:return I.done?[3,6]:(M=I.value,[4,M]);case 4:a.sent(),a.label=5;case 5:return I=h.next(),[3,3];case 6:return[3,9];case 7:return t=a.sent(),r={error:t},[3,9];case 8:try{I&&!I.done&&(u=h.return)&&u.call(h)}finally{if(r)throw r.error}return[7];case 9:return++f,[3,1];case 10:return[2]}})}()},j.forEach(function(f){return D.insert(f)}),Object.freeze(this)}Object.freeze(Z);var fe=null,se=function(j,G){var O={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},D,m,p,B;return B={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(B[Symbol.iterator]=function(){return this}),B;function d(h){return function(I){return f([h,I])}}function f(h){if(D)throw new TypeError("Generator is already executing.");for(;O;)try{if(D=1,m&&(p=h[0]&2?m.return:h[0]?m.throw||((p=m.return)&&p.call(m),0):m.next)&&!(p=p.call(m,h[1])).done)return p;switch(m=0,p&&(h=[h[0]&2,p.value]),h[0]){case 0:case 1:p=h;break;case 4:return O.label++,{value:h[1],done:!1};case 5:O.label++,m=h[1],h=[0];continue;case 7:h=O.ops.pop(),O.trys.pop();continue;default:if(p=O.trys,!(p=p.length>0&&p[p.length-1])&&(h[0]===6||h[0]===2)){O=0;continue}if(h[0]===3&&(!p||h[1]>p[0]&&h[1]<p[3])){O.label=h[1];break}if(h[0]===6&&O.label<p[1]){O.label=p[1],p=h;break}if(p&&O.label<p[2]){O.label=p[2],O.ops.push(h);break}p[2]&&O.ops.pop(),O.trys.pop();continue}h=G.call(j,O)}catch(I){h=[6,I],m=0}finally{D=p=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}},oe=function(j){var G=typeof Symbol=="function"&&Symbol.iterator,O=G&&j[G],D=0;if(O)return O.call(j);if(j&&typeof j.length=="number")return{next:function(){return j&&D>=j.length&&(j=void 0),{value:j&&j[D++],done:!j}}};throw new TypeError(G?"Object is not iterable.":"Symbol.iterator is not defined.")};$.initSize=1<<4,$.maxSize=1<<30,$.sigma=.75,$.treeifyThreshold=8,$.untreeifyThreshold=6,$.minTreeifySize=64;function $(j,G,O){var D=this;if(j===void 0&&(j=[]),G===void 0&&(G=$.initSize),O=O||function(f){var h,I,M=0,t="";if(typeof f=="number")M=Math.floor(f),M=(M<<5)-M,M=M&M;else{typeof f!="string"?t=JSON.stringify(f):t=f;try{for(var r=oe(t),u=r.next();!u.done;u=r.next()){var a=u.value,i=a.charCodeAt(0);M=(M<<5)-M+i,M=M&M}}catch(n){h={error:n}}finally{try{u&&!u.done&&(I=r.return)&&I.call(r)}finally{if(h)throw h.error}}}return M^=M>>>16,M},(G&G-1)!=0)throw new Error("initBucketNum must be 2 to the power of n");var m=0,p=[],B=Math.max($.initSize,Math.min($.maxSize,G));this.size=function(){return m},this.empty=function(){return m===0},this.clear=function(){m=0,B=G,p=[]},this.forEach=function(f){var h=0;p.forEach(function(I){I.forEach(function(M){f(M,h++)})})};var d=function(f){if(!(f>=$.maxSize)){B=f*2;var h=[];p.forEach(function(I,M){if(!I.empty()){if(I instanceof P&&I.size()===1){var t=I.front(),r=t.key,u=t.value;h[O(r)&B-1]=new P([{key:r,value:u}])}else if(I instanceof z){var a=new P,i=new P;I.forEach(function(c){var R=O(c.key);(R&f)==0?a.pushBack(c):i.pushBack(c)}),a.size()>$.untreeifyThreshold?h[M]=new z(a):a.size()&&(h[M]=a),i.size()>$.untreeifyThreshold?h[M+f]=new z(i):i.size()&&(h[M+f]=i)}else{var n=new P,e=new P;I.forEach(function(c){var R=O(c.key);(R&f)==0?n.pushBack(c):e.pushBack(c)}),n.size()&&(h[M]=n),e.size()&&(h[M+f]=e)}p[M].clear()}}),p=h}};this.setElement=function(f,h){var I,M;if(f==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(h==null){this.eraseElementByKey(f);return}var t=O(f)&B-1;if(!p[t])++m,p[t]=new P([{key:f,value:h}]);else{var r=p[t].size();if(p[t]instanceof P){try{for(var u=oe(p[t]),a=u.next();!a.done;a=u.next()){var i=a.value;if(i.key===f){i.value=h;return}}}catch(e){I={error:e}}finally{try{a&&!a.done&&(M=u.return)&&M.call(u)}finally{if(I)throw I.error}}p[t].pushBack({key:f,value:h}),p[t].size()>=$.treeifyThreshold&&(p[t]=new z(p[t]))}else p[t].setElement(f,h);var n=p[t].size();m+=n-r}m>B*$.sigma&&d.call(this,B)},this.getElementByKey=function(f){var h,I,M=O(f)&B-1;if(!!p[M]){if(p[M]instanceof z)return p[M].getElementByKey(f);try{for(var t=oe(p[M]),r=t.next();!r.done;r=t.next()){var u=r.value;if(u.key===f)return u.value}}catch(a){h={error:a}}finally{try{r&&!r.done&&(I=t.return)&&I.call(t)}finally{if(h)throw h.error}}}},this.eraseElementByKey=function(f){var h,I,M=O(f)&B-1;if(!!p[M]){var t=p[M].size();if(p[M]instanceof z)p[M].eraseElementByKey(f),p[M].size()<=$.untreeifyThreshold&&(p[M]=new P(p[M]));else{var r=-1;try{for(var u=oe(p[M]),a=u.next();!a.done;a=u.next()){var i=a.value;if(++r,i.key===f){p[M].eraseElementByPos(r);break}}}catch(e){h={error:e}}finally{try{a&&!a.done&&(I=u.return)&&I.call(u)}finally{if(h)throw h.error}}}var n=p[M].size();m+=n-t}},this.find=function(f){var h,I,M=O(f)&B-1;if(!p[M])return!1;if(p[M]instanceof z)return p[M].find(f);try{for(var t=oe(p[M]),r=t.next();!r.done;r=t.next()){var u=r.value;if(u.key===f)return!0}}catch(a){h={error:a}}finally{try{r&&!r.done&&(I=t.return)&&I.call(t)}finally{if(h)throw h.error}}return!1},this[Symbol.iterator]=function(){return function(){var f,h,I,M,t,r,u;return se(this,function(a){switch(a.label){case 0:f=0,a.label=1;case 1:if(!(f<B))return[3,10];for(;f<B&&!p[f];)++f;if(f>=B)return[3,10];a.label=2;case 2:a.trys.push([2,7,8,9]),h=(r=void 0,oe(p[f])),I=h.next(),a.label=3;case 3:return I.done?[3,6]:(M=I.value,[4,M]);case 4:a.sent(),a.label=5;case 5:return I=h.next(),[3,3];case 6:return[3,9];case 7:return t=a.sent(),r={error:t},[3,9];case 8:try{I&&!I.done&&(u=h.return)&&u.call(h)}finally{if(r)throw r.error}return[7];case 9:return++f,[3,1];case 10:return[2]}})}()},j.forEach(function(f){var h=f.key,I=f.value;return D.setElement(h,I)}),Object.freeze(this)}Object.freeze($);var re=null},9990:function(Q,Y,_){var w=_(48764).Buffer;const x=Q.exports;x.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"},x.codes={};for(const C in x.types){const b=x.types[C];x.codes[b]=C}x.CMD_SHIFT=4,x.CMD_MASK=240,x.DUP_MASK=8,x.QOS_MASK=3,x.QOS_SHIFT=1,x.RETAIN_MASK=1,x.VARBYTEINT_MASK=127,x.VARBYTEINT_FIN_MASK=128,x.VARBYTEINT_MAX=268435455,x.SESSIONPRESENT_MASK=1,x.SESSIONPRESENT_HEADER=w.from([x.SESSIONPRESENT_MASK]),x.CONNACK_HEADER=w.from([x.codes.connack<<x.CMD_SHIFT]),x.USERNAME_MASK=128,x.PASSWORD_MASK=64,x.WILL_RETAIN_MASK=32,x.WILL_QOS_MASK=24,x.WILL_QOS_SHIFT=3,x.WILL_FLAG_MASK=4,x.CLEAN_SESSION_MASK=2,x.CONNECT_HEADER=w.from([x.codes.connect<<x.CMD_SHIFT]),x.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},x.propertiesCodes={};for(const C in x.properties){const b=x.properties[C];x.propertiesCodes[b]=C}x.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 L(C){return[0,1,2].map(b=>[0,1].map(o=>[0,1].map(s=>{const l=w.alloc(1);return l.writeUInt8(x.codes[C]<<x.CMD_SHIFT|(o?x.DUP_MASK:0)|b<<x.QOS_SHIFT|s,0,!0),l})))}x.PUBLISH_HEADER=L("publish"),x.SUBSCRIBE_HEADER=L("subscribe"),x.SUBSCRIBE_OPTIONS_QOS_MASK=3,x.SUBSCRIBE_OPTIONS_NL_MASK=1,x.SUBSCRIBE_OPTIONS_NL_SHIFT=2,x.SUBSCRIBE_OPTIONS_RAP_MASK=1,x.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,x.SUBSCRIBE_OPTIONS_RH_MASK=3,x.SUBSCRIBE_OPTIONS_RH_SHIFT=4,x.SUBSCRIBE_OPTIONS_RH=[0,16,32],x.SUBSCRIBE_OPTIONS_NL=4,x.SUBSCRIBE_OPTIONS_RAP=8,x.SUBSCRIBE_OPTIONS_QOS=[0,1,2],x.UNSUBSCRIBE_HEADER=L("unsubscribe"),x.ACKS={unsuback:L("unsuback"),puback:L("puback"),pubcomp:L("pubcomp"),pubrel:L("pubrel"),pubrec:L("pubrec")},x.SUBACK_HEADER=w.from([x.codes.suback<<x.CMD_SHIFT]),x.VERSION3=w.from([3]),x.VERSION4=w.from([4]),x.VERSION5=w.from([5]),x.VERSION131=w.from([131]),x.VERSION132=w.from([132]),x.QOS=[0,1,2].map(C=>w.from([C])),x.EMPTY={pingreq:w.from([x.codes.pingreq<<4,0]),pingresp:w.from([x.codes.pingresp<<4,0]),disconnect:w.from([x.codes.disconnect<<4,0])}},27721:function(Q,Y,_){var w=_(48764).Buffer;const x=_(19371),L=_(17187);function C(o,s){const l=new b;return x(o,l,s),l.concat()}class b extends L{constructor(){super();this._array=new Array(20),this._i=0}write(s){return this._array[this._i++]=s,!0}concat(){let s=0;const l=new Array(this._array.length),E=this._array;let A=0,y;for(y=0;y<E.length&&E[y]!==void 0;y++)typeof E[y]!="string"?l[y]=E[y].length:l[y]=w.byteLength(E[y]),s+=l[y];const P=w.allocUnsafe(s);for(y=0;y<E.length&&E[y]!==void 0;y++)typeof E[y]!="string"?(E[y].copy(P,A),A+=l[y]):(P.write(E[y],A),A+=l[y]);return P}}Q.exports=C},21772:function(Q,Y,_){Y.parser=_(84575).parser,Y.generate=_(27721),Y.writeToStream=_(19371)},83903:function(Q,Y,_){var w=_(48764).Buffer;const x=65536,L={},C=w.isBuffer(w.from([1,2]).subarray(0,1));function b(E){const A=w.allocUnsafe(2);return A.writeUInt8(E>>8,0),A.writeUInt8(E&255,0+1),A}function o(){for(let E=0;E<x;E++)L[E]=b(E)}function s(E){const A=4;let y=0,P=0;const g=w.allocUnsafe(A);do y=E%128|0,E=E/128|0,E>0&&(y=y|128),g.writeUInt8(y,P++);while(E>0&&P<A);return E>0&&(P=0),C?g.subarray(0,P):g.slice(0,P)}function l(E){const A=w.allocUnsafe(4);return A.writeUInt32BE(E,0),A}Q.exports={cache:L,generateCache:o,generateNumber:b,genBufVariableByteInt:s,generate4ByteBuffer:l}},89695:function(Q){class Y{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}}Q.exports=Y},84575:function(Q,Y,_){const w=_(10022),x=_(17187),L=_(89695),C=_(9990),b=_(13129)("mqtt-packet:parser");class o extends x{constructor(){super();this.parser=this.constructor.parser}static parser(l){return this instanceof o?(this.settings=l||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):new o().parser(l)}_resetState(){b("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new L,this.error=null,this._list=w(),this._stateCounter=0}parse(l){for(this.error&&this._resetState(),this._list.append(l),b("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++,b("parse: state complete. _stateCounter is now: %d",this._stateCounter),b("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return b("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){const l=this._list.readUInt8(0);return this.packet.cmd=C.types[l>>C.CMD_SHIFT],this.packet.retain=(l&C.RETAIN_MASK)!=0,this.packet.qos=l>>C.QOS_SHIFT&C.QOS_MASK,this.packet.dup=(l&C.DUP_MASK)!=0,b("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0}_parseLength(){const l=this._parseVarByteNum(!0);return l&&(this.packet.length=l.value,this._list.consume(l.bytes)),b("_parseLength %d",l.value),!!l}_parsePayload(){b("_parsePayload: payload %O",this._list);let l=!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"))}l=!0}return b("_parsePayload complete result: %s",l),l}_parseConnect(){b("_parseConnect");let l,E,A,y;const P={},g=this.packet,v=this._parseString();if(v===null)return this._emitError(new Error("Cannot parse protocolId"));if(v!=="MQTT"&&v!=="MQIsdp")return this._emitError(new Error("Invalid protocolId"));if(g.protocolId=v,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(g.protocolVersion=this._list.readUInt8(this._pos),g.protocolVersion>=128&&(g.bridgeMode=!0,g.protocolVersion=g.protocolVersion-128),g.protocolVersion!==3&&g.protocolVersion!==4&&g.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(P.username=this._list.readUInt8(this._pos)&C.USERNAME_MASK,P.password=this._list.readUInt8(this._pos)&C.PASSWORD_MASK,P.will=this._list.readUInt8(this._pos)&C.WILL_FLAG_MASK,P.will&&(g.will={},g.will.retain=(this._list.readUInt8(this._pos)&C.WILL_RETAIN_MASK)!=0,g.will.qos=(this._list.readUInt8(this._pos)&C.WILL_QOS_MASK)>>C.WILL_QOS_SHIFT),g.clean=(this._list.readUInt8(this._pos)&C.CLEAN_SESSION_MASK)!=0,this._pos++,g.keepalive=this._parseNum(),g.keepalive===-1)return this._emitError(new Error("Packet too short"));if(g.protocolVersion===5){const T=this._parseProperties();Object.getOwnPropertyNames(T).length&&(g.properties=T)}const S=this._parseString();if(S===null)return this._emitError(new Error("Packet too short"));if(g.clientId=S,b("_parseConnect: packet.clientId: %s",g.clientId),P.will){if(g.protocolVersion===5){const T=this._parseProperties();Object.getOwnPropertyNames(T).length&&(g.will.properties=T)}if(l=this._parseString(),l===null)return this._emitError(new Error("Cannot parse will topic"));if(g.will.topic=l,b("_parseConnect: packet.will.topic: %s",g.will.topic),E=this._parseBuffer(),E===null)return this._emitError(new Error("Cannot parse will payload"));g.will.payload=E,b("_parseConnect: packet.will.paylaod: %s",g.will.payload)}if(P.username){if(y=this._parseString(),y===null)return this._emitError(new Error("Cannot parse username"));g.username=y,b("_parseConnect: packet.username: %s",g.username)}if(P.password){if(A=this._parseBuffer(),A===null)return this._emitError(new Error("Cannot parse password"));g.password=A}return this.settings=g,b("_parseConnect: complete"),g}_parseConnack(){b("_parseConnack");const l=this.packet;if(this._list.length<1)return null;if(l.sessionPresent=!!(this._list.readUInt8(this._pos++)&C.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?l.reasonCode=this._list.readUInt8(this._pos++):l.reasonCode=0;else{if(this._list.length<2)return null;l.returnCode=this._list.readUInt8(this._pos++)}if(l.returnCode===-1||l.reasonCode===-1)return this._emitError(new Error("Cannot parse return code"));if(this.settings.protocolVersion===5){const E=this._parseProperties();Object.getOwnPropertyNames(E).length&&(l.properties=E)}b("_parseConnack: complete")}_parsePublish(){b("_parsePublish");const l=this.packet;if(l.topic=this._parseString(),l.topic===null)return this._emitError(new Error("Cannot parse topic"));if(!(l.qos>0&&!this._parseMessageId())){if(this.settings.protocolVersion===5){const E=this._parseProperties();Object.getOwnPropertyNames(E).length&&(l.properties=E)}l.payload=this._list.slice(this._pos,l.length),b("_parsePublish: payload from buffer list: %o",l.payload)}}_parseSubscribe(){b("_parseSubscribe");const l=this.packet;let E,A,y,P,g,v,S;if(l.qos!==1)return this._emitError(new Error("Wrong subscribe header"));if(l.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){const T=this._parseProperties();Object.getOwnPropertyNames(T).length&&(l.properties=T)}for(;this._pos<l.length;){if(E=this._parseString(),E===null)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=l.length)return this._emitError(new Error("Malformed Subscribe Payload"));A=this._parseByte(),y=A&C.SUBSCRIBE_OPTIONS_QOS_MASK,v=(A>>C.SUBSCRIBE_OPTIONS_NL_SHIFT&C.SUBSCRIBE_OPTIONS_NL_MASK)!=0,g=(A>>C.SUBSCRIBE_OPTIONS_RAP_SHIFT&C.SUBSCRIBE_OPTIONS_RAP_MASK)!=0,P=A>>C.SUBSCRIBE_OPTIONS_RH_SHIFT&C.SUBSCRIBE_OPTIONS_RH_MASK,S={topic:E,qos:y},this.settings.protocolVersion===5?(S.nl=v,S.rap=g,S.rh=P):this.settings.bridgeMode&&(S.rh=0,S.rap=!0,S.nl=!0),b("_parseSubscribe: push subscription `%s` to subscription",S),l.subscriptions.push(S)}}}_parseSuback(){b("_parseSuback");const l=this.packet;if(this.packet.granted=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){const E=this._parseProperties();Object.getOwnPropertyNames(E).length&&(l.properties=E)}for(;this._pos<this.packet.length;)this.packet.granted.push(this._list.readUInt8(this._pos++))}}_parseUnsubscribe(){b("_parseUnsubscribe");const l=this.packet;if(l.unsubscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){const E=this._parseProperties();Object.getOwnPropertyNames(E).length&&(l.properties=E)}for(;this._pos<l.length;){const E=this._parseString();if(E===null)return this._emitError(new Error("Cannot parse topic"));b("_parseUnsubscribe: push topic `%s` to unsubscriptions",E),l.unsubscriptions.push(E)}}}_parseUnsuback(){b("_parseUnsuback");const l=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if(this.settings.protocolVersion===5){const E=this._parseProperties();for(Object.getOwnPropertyNames(E).length&&(l.properties=E),l.granted=[];this._pos<this.packet.length;)this.packet.granted.push(this._list.readUInt8(this._pos++))}}_parseConfirmation(){b("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);const l=this.packet;if(this._parseMessageId(),this.settings.protocolVersion===5&&(l.length>2?(l.reasonCode=this._parseByte(),b("_parseConfirmation: packet.reasonCode `%d`",l.reasonCode)):l.reasonCode=0,l.length>3)){const E=this._parseProperties();Object.getOwnPropertyNames(E).length&&(l.properties=E)}return!0}_parseDisconnect(){const l=this.packet;if(b("_parseDisconnect"),this.settings.protocolVersion===5){this._list.length>0?l.reasonCode=this._parseByte():l.reasonCode=0;const E=this._parseProperties();Object.getOwnPropertyNames(E).length&&(l.properties=E)}return b("_parseDisconnect result: true"),!0}_parseAuth(){b("_parseAuth");const l=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error("Not supported auth packet for this version MQTT"));l.reasonCode=this._parseByte();const E=this._parseProperties();return Object.getOwnPropertyNames(E).length&&(l.properties=E),b("_parseAuth: result: true"),!0}_parseMessageId(){const l=this.packet;return l.messageId=this._parseNum(),l.messageId===null?(this._emitError(new Error("Cannot parse messageId")),!1):(b("_parseMessageId: packet.messageId %d",l.messageId),!0)}_parseString(l){const E=this._parseNum(),A=E+this._pos;if(E===-1||A>this._list.length||A>this.packet.length)return null;const y=this._list.toString("utf8",this._pos,A);return this._pos+=E,b("_parseString: result: %s",y),y}_parseStringPair(){return b("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){const l=this._parseNum(),E=l+this._pos;if(l===-1||E>this._list.length||E>this.packet.length)return null;const A=this._list.slice(this._pos,E);return this._pos+=l,b("_parseBuffer: result: %o",A),A}_parseNum(){if(this._list.length-this._pos<2)return-1;const l=this._list.readUInt16BE(this._pos);return this._pos+=2,b("_parseNum: result: %s",l),l}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;const l=this._list.readUInt32BE(this._pos);return this._pos+=4,b("_parse4ByteNum: result: %s",l),l}_parseVarByteNum(l){b("_parseVarByteNum");const E=4;let A=0,y=1,P=0,g=!1,v;const S=this._pos?this._pos:0;for(;A<E&&S+A<this._list.length;){if(v=this._list.readUInt8(S+A++),P+=y*(v&C.VARBYTEINT_MASK),y*=128,(v&C.VARBYTEINT_FIN_MASK)==0){g=!0;break}if(this._list.length<=A)break}return!g&&A===E&&this._list.length>=A&&this._emitError(new Error("Invalid variable byte integer")),S&&(this._pos+=A),g=g?l?{bytes:A,value:P}:P:!1,b("_parseVarByteNum: result: %o",g),g}_parseByte(){let l;return this._pos<this._list.length&&(l=this._list.readUInt8(this._pos),this._pos++),b("_parseByte: result: %o",l),l}_parseByType(l){switch(b("_parseByType: type: %s",l),l){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(){b("_parseProperties");const l=this._parseVarByteNum(),A=this._pos+l,y={};for(;this._pos<A;){const P=this._parseByte();if(!P)return this._emitError(new Error("Cannot parse property code type")),!1;const g=C.propertiesCodes[P];if(!g)return this._emitError(new Error("Unknown property")),!1;if(g==="userProperties"){y[g]||(y[g]=Object.create(null));const v=this._parseByType(C.propertiesTypes[g]);if(y[g][v.name])if(Array.isArray(y[g][v.name]))y[g][v.name].push(v.value);else{const S=y[g][v.name];y[g][v.name]=[S],y[g][v.name].push(v.value)}else y[g][v.name]=v.value;continue}y[g]?Array.isArray(y[g])?y[g].push(this._parseByType(C.propertiesTypes[g])):(y[g]=[y[g]],y[g].push(this._parseByType(C.propertiesTypes[g]))):y[g]=this._parseByType(C.propertiesTypes[g])}return y}_newPacket(){return b("_newPacket"),this.packet&&(this._list.consume(this.packet.length),b("_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)),b("_newPacket: new packet"),this.packet=new L,this._pos=0,!0}_emitError(l){b("_emitError"),this.error=l,this.emit("error",l)}}Q.exports=o},19371:function(Q,Y,_){var w=_(48764).Buffer;const x=_(9990),L=w.allocUnsafe(0),C=w.from([0]),b=_(83903),o=_(88212).nextTick,s=_(13129)("mqtt-packet:writeToStream"),l=b.cache,E=b.generateNumber,A=b.generateCache,y=b.genBufVariableByteInt,P=b.generate4ByteBuffer;let g=Z,v=!0;function S(m,p,B){switch(s("generate called"),p.cork&&(p.cork(),o(T,p)),v&&(v=!1,A()),s("generate: packet.cmd: %s",m.cmd),m.cmd){case"connect":return U(m,p,B);case"connack":return N(m,p,B);case"publish":return H(m,p,B);case"puback":case"pubrec":case"pubrel":case"pubcomp":return V(m,p,B);case"subscribe":return k(m,p,B);case"suback":return X(m,p,B);case"unsubscribe":return W(m,p,B);case"unsuback":return ie(m,p,B);case"pingreq":case"pingresp":return q(m,p,B);case"disconnect":return le(m,p,B);case"auth":return ne(m,p,B);default:return p.emit("error",new Error("Unknown command")),!1}}Object.defineProperty(S,"cacheNumbers",{get(){return g===Z},set(m){m?((!l||Object.keys(l).length===0)&&(v=!0),g=Z):(v=!1,g=fe)}});function T(m){m.uncork()}function U(m,p,B){const d=m||{},f=d.protocolId||"MQTT";let h=d.protocolVersion||4;const I=d.will;let M=d.clean;const t=d.keepalive||0,r=d.clientId||"",u=d.username,a=d.password,i=d.properties;M===void 0&&(M=!0);let n=0;if(!f||typeof f!="string"&&!w.isBuffer(f))return p.emit("error",new Error("Invalid protocolId")),!1;if(n+=f.length+2,h!==3&&h!==4&&h!==5)return p.emit("error",new Error("Invalid protocol version")),!1;if(n+=1,(typeof r=="string"||w.isBuffer(r))&&(r||h>=4)&&(r||M))n+=w.byteLength(r)+2;else{if(h<4)return p.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(M*1==0)return p.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof t!="number"||t<0||t>65535||t%1!=0)return p.emit("error",new Error("Invalid keepalive")),!1;if(n+=2,n+=1,h===5){var e=$(p,i);if(!e)return!1;n+=e.length}if(I){if(typeof I!="object")return p.emit("error",new Error("Invalid will")),!1;if(!I.topic||typeof I.topic!="string")return p.emit("error",new Error("Invalid will topic")),!1;if(n+=w.byteLength(I.topic)+2,n+=2,I.payload)if(I.payload.length>=0)typeof I.payload=="string"?n+=w.byteLength(I.payload):n+=I.payload.length;else return p.emit("error",new Error("Invalid will payload")),!1;var c={};if(h===5){if(c=$(p,I.properties),!c)return!1;n+=c.length}}let R=!1;if(u!=null)if(D(u))R=!0,n+=w.byteLength(u)+2;else return p.emit("error",new Error("Invalid username")),!1;if(a!=null){if(!R)return p.emit("error",new Error("Username is required to use password")),!1;if(D(a))n+=O(a)+2;else return p.emit("error",new Error("Invalid password")),!1}p.write(x.CONNECT_HEADER),z(p,n),oe(p,f),d.bridgeMode&&(h+=128),p.write(h===131?x.VERSION131:h===132?x.VERSION132:h===4?x.VERSION4:h===5?x.VERSION5:x.VERSION3);let K=0;return K|=u!=null?x.USERNAME_MASK:0,K|=a!=null?x.PASSWORD_MASK:0,K|=I&&I.retain?x.WILL_RETAIN_MASK:0,K|=I&&I.qos?I.qos<<x.WILL_QOS_SHIFT:0,K|=I?x.WILL_FLAG_MASK:0,K|=M?x.CLEAN_SESSION_MASK:0,p.write(w.from([K])),g(p,t),h===5&&e.write(),oe(p,r),I&&(h===5&&c.write(),F(p,I.topic),oe(p,I.payload)),u!=null&&oe(p,u),a!=null&&oe(p,a),!0}function N(m,p,B){const d=B?B.protocolVersion:4,f=m||{},h=d===5?f.reasonCode:f.returnCode,I=f.properties;let M=2;if(typeof h!="number")return p.emit("error",new Error("Invalid return code")),!1;let t=null;if(d===5){if(t=$(p,I),!t)return!1;M+=t.length}return p.write(x.CONNACK_HEADER),z(p,M),p.write(f.sessionPresent?x.SESSIONPRESENT_HEADER:C),p.write(w.from([h])),t!=null&&t.write(),!0}function H(m,p,B){s("publish: packet: %o",m);const d=B?B.protocolVersion:4,f=m||{},h=f.qos||0,I=f.retain?x.RETAIN_MASK:0,M=f.topic,t=f.payload||L,r=f.messageId,u=f.properties;let a=0;if(typeof M=="string")a+=w.byteLength(M)+2;else if(w.isBuffer(M))a+=M.length+2;else return p.emit("error",new Error("Invalid topic")),!1;if(w.isBuffer(t)?a+=t.length:a+=w.byteLength(t),h&&typeof r!="number")return p.emit("error",new Error("Invalid messageId")),!1;h&&(a+=2);let i=null;if(d===5){if(i=$(p,u),!i)return!1;a+=i.length}return p.write(x.PUBLISH_HEADER[h][f.dup?1:0][I?1:0]),z(p,a),g(p,O(M)),p.write(M),h>0&&g(p,r),i!=null&&i.write(),s("publish: payload: %o",t),p.write(t)}function V(m,p,B){const d=B?B.protocolVersion:4,f=m||{},h=f.cmd||"puback",I=f.messageId,M=f.dup&&h==="pubrel"?x.DUP_MASK:0;let t=0;const r=f.reasonCode,u=f.properties;let a=d===5?3:2;if(h==="pubrel"&&(t=1),typeof I!="number")return p.emit("error",new Error("Invalid messageId")),!1;let i=null;if(d===5&&typeof u=="object"){if(i=re(p,u,B,a),!i)return!1;a+=i.length}return p.write(x.ACKS[h][t][M][0]),z(p,a),g(p,I),d===5&&p.write(w.from([r])),i!==null&&i.write(),!0}function k(m,p,B){s("subscribe: packet: ");const d=B?B.protocolVersion:4,f=m||{},h=f.dup?x.DUP_MASK:0,I=f.messageId,M=f.subscriptions,t=f.properties;let r=0;if(typeof I!="number")return p.emit("error",new Error("Invalid messageId")),!1;r+=2;let u=null;if(d===5){if(u=$(p,t),!u)return!1;r+=u.length}if(typeof M=="object"&&M.length)for(let i=0;i<M.length;i+=1){const n=M[i].topic,e=M[i].qos;if(typeof n!="string")return p.emit("error",new Error("Invalid subscriptions - invalid topic")),!1;if(typeof e!="number")return p.emit("error",new Error("Invalid subscriptions - invalid qos")),!1;if(d===5){if(typeof(M[i].nl||!1)!="boolean")return p.emit("error",new Error("Invalid subscriptions - invalid No Local")),!1;if(typeof(M[i].rap||!1)!="boolean")return p.emit("error",new Error("Invalid subscriptions - invalid Retain as Published")),!1;const K=M[i].rh||0;if(typeof K!="number"||K>2)return p.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}r+=w.byteLength(n)+2+1}else return p.emit("error",new Error("Invalid subscriptions")),!1;s("subscribe: writing to stream: %o",x.SUBSCRIBE_HEADER),p.write(x.SUBSCRIBE_HEADER[1][h?1:0][0]),z(p,r),g(p,I),u!==null&&u.write();let a=!0;for(const i of M){const n=i.topic,e=i.qos,c=+i.nl,R=+i.rap,K=i.rh;let te;F(p,n),te=x.SUBSCRIBE_OPTIONS_QOS[e],d===5&&(te|=c?x.SUBSCRIBE_OPTIONS_NL:0,te|=R?x.SUBSCRIBE_OPTIONS_RAP:0,te|=K?x.SUBSCRIBE_OPTIONS_RH[K]:0),a=p.write(w.from([te]))}return a}function X(m,p,B){const d=B?B.protocolVersion:4,f=m||{},h=f.messageId,I=f.granted,M=f.properties;let t=0;if(typeof h!="number")return p.emit("error",new Error("Invalid messageId")),!1;if(t+=2,typeof I=="object"&&I.length)for(let u=0;u<I.length;u+=1){if(typeof I[u]!="number")return p.emit("error",new Error("Invalid qos vector")),!1;t+=1}else return p.emit("error",new Error("Invalid qos vector")),!1;let r=null;if(d===5){if(r=re(p,M,B,t),!r)return!1;t+=r.length}return p.write(x.SUBACK_HEADER),z(p,t),g(p,h),r!==null&&r.write(),p.write(w.from(I))}function W(m,p,B){const d=B?B.protocolVersion:4,f=m||{},h=f.messageId,I=f.dup?x.DUP_MASK:0,M=f.unsubscriptions,t=f.properties;let r=0;if(typeof h!="number")return p.emit("error",new Error("Invalid messageId")),!1;if(r+=2,typeof M=="object"&&M.length)for(let i=0;i<M.length;i+=1){if(typeof M[i]!="string")return p.emit("error",new Error("Invalid unsubscriptions")),!1;r+=w.byteLength(M[i])+2}else return p.emit("error",new Error("Invalid unsubscriptions")),!1;let u=null;if(d===5){if(u=$(p,t),!u)return!1;r+=u.length}p.write(x.UNSUBSCRIBE_HEADER[1][I?1:0][0]),z(p,r),g(p,h),u!==null&&u.write();let a=!0;for(let i=0;i<M.length;i++)a=F(p,M[i]);return a}function ie(m,p,B){const d=B?B.protocolVersion:4,f=m||{},h=f.messageId,I=f.dup?x.DUP_MASK:0,M=f.granted,t=f.properties,r=f.cmd,u=0;let a=2;if(typeof h!="number")return p.emit("error",new Error("Invalid messageId")),!1;if(d===5)if(typeof M=="object"&&M.length)for(let n=0;n<M.length;n+=1){if(typeof M[n]!="number")return p.emit("error",new Error("Invalid qos vector")),!1;a+=1}else return p.emit("error",new Error("Invalid qos vector")),!1;let i=null;if(d===5){if(i=re(p,t,B,a),!i)return!1;a+=i.length}return p.write(x.ACKS[r][u][I][0]),z(p,a),g(p,h),i!==null&&i.write(),d===5&&p.write(w.from(M)),!0}function q(m,p,B){return p.write(x.EMPTY[m.cmd])}function le(m,p,B){const d=B?B.protocolVersion:4,f=m||{},h=f.reasonCode,I=f.properties;let M=d===5?1:0,t=null;if(d===5){if(t=re(p,I,B,M),!t)return!1;M+=t.length}return p.write(w.from([x.codes.disconnect<<4])),z(p,M),d===5&&p.write(w.from([h])),t!==null&&t.write(),!0}function ne(m,p,B){const d=B?B.protocolVersion:4,f=m||{},h=f.reasonCode,I=f.properties;let M=d===5?1:0;d!==5&&p.emit("error",new Error("Invalid mqtt version for auth packet"));const t=re(p,I,B,M);return t?(M+=t.length,p.write(w.from([x.codes.auth<<4])),z(p,M),p.write(w.from([h])),t!==null&&t.write(),!0):!1}const J={};function z(m,p){if(p>x.VARBYTEINT_MAX)return m.emit("error",new Error(`Invalid variable byte integer: ${p}`)),!1;let B=J[p];return B||(B=y(p),p<16384&&(J[p]=B)),s("writeVarByteInt: writing to stream: %o",B),m.write(B)}function F(m,p){const B=w.byteLength(p);return g(m,B),s("writeString: %s",p),m.write(p,"utf8")}function ee(m,p,B){F(m,p),F(m,B)}function Z(m,p){return s("writeNumberCached: number: %d",p),s("writeNumberCached: %o",l[p]),m.write(l[p])}function fe(m,p){const B=E(p);return s("writeNumberGenerated: %o",B),m.write(B)}function se(m,p){const B=P(p);return s("write4ByteNumber: %o",B),m.write(B)}function oe(m,p){typeof p=="string"?F(m,p):p?(g(m,p.length),m.write(p)):g(m,0)}function $(m,p){if(typeof p!="object"||p.length!=null)return{length:1,write(){G(m,{},0)}};let B=0;function d(h,I){const M=x.propertiesTypes[h];let t=0;switch(M){case"byte":{if(typeof I!="boolean")return m.emit("error",new Error(`Invalid ${h}: ${I}`)),!1;t+=1+1;break}case"int8":{if(typeof I!="number"||I<0||I>255)return m.emit("error",new Error(`Invalid ${h}: ${I}`)),!1;t+=1+1;break}case"binary":{if(I&&I===null)return m.emit("error",new Error(`Invalid ${h}: ${I}`)),!1;t+=1+w.byteLength(I)+2;break}case"int16":{if(typeof I!="number"||I<0||I>65535)return m.emit("error",new Error(`Invalid ${h}: ${I}`)),!1;t+=1+2;break}case"int32":{if(typeof I!="number"||I<0||I>4294967295)return m.emit("error",new Error(`Invalid ${h}: ${I}`)),!1;t+=1+4;break}case"var":{if(typeof I!="number"||I<0||I>268435455)return m.emit("error",new Error(`Invalid ${h}: ${I}`)),!1;t+=1+w.byteLength(y(I));break}case"string":{if(typeof I!="string")return m.emit("error",new Error(`Invalid ${h}: ${I}`)),!1;t+=1+2+w.byteLength(I.toString());break}case"pair":{if(typeof I!="object")return m.emit("error",new Error(`Invalid ${h}: ${I}`)),!1;t+=Object.getOwnPropertyNames(I).reduce((r,u)=>{const a=I[u];return Array.isArray(a)?r+=a.reduce((i,n)=>(i+=1+2+w.byteLength(u.toString())+2+w.byteLength(n.toString()),i),0):r+=1+2+w.byteLength(u.toString())+2+w.byteLength(I[u].toString()),r},0);break}default:return m.emit("error",new Error(`Invalid property ${h}: ${I}`)),!1}return t}if(p)for(const h in p){let I=0,M=0;const t=p[h];if(Array.isArray(t))for(let r=0;r<t.length;r++){if(M=d(h,t[r]),!M)return!1;I+=M}else{if(M=d(h,t),!M)return!1;I=M}if(!I)return!1;B+=I}return{length:w.byteLength(y(B))+B,write(){G(m,p,B)}}}function re(m,p,B,d){const f=["reasonString","userProperties"],h=B&&B.properties&&B.properties.maximumPacketSize?B.properties.maximumPacketSize:0;let I=$(m,p);if(h)for(;d+I.length>h;){const M=f.shift();if(M&&p[M])delete p[M],I=$(m,p);else return!1}return I}function j(m,p,B){switch(x.propertiesTypes[p]){case"byte":{m.write(w.from([x.properties[p]])),m.write(w.from([+B]));break}case"int8":{m.write(w.from([x.properties[p]])),m.write(w.from([B]));break}case"binary":{m.write(w.from([x.properties[p]])),oe(m,B);break}case"int16":{m.write(w.from([x.properties[p]])),g(m,B);break}case"int32":{m.write(w.from([x.properties[p]])),se(m,B);break}case"var":{m.write(w.from([x.properties[p]])),z(m,B);break}case"string":{m.write(w.from([x.properties[p]])),F(m,B);break}case"pair":{Object.getOwnPropertyNames(B).forEach(f=>{const h=B[f];Array.isArray(h)?h.forEach(I=>{m.write(w.from([x.properties[p]])),ee(m,f.toString(),I.toString())}):(m.write(w.from([x.properties[p]])),ee(m,f.toString(),h.toString()))});break}default:return m.emit("error",new Error(`Invalid property ${p} value: ${B}`)),!1}}function G(m,p,B){z(m,B);for(const d in p)if(Object.prototype.hasOwnProperty.call(p,d)&&p[d]!==null){const f=p[d];if(Array.isArray(f))for(let h=0;h<f.length;h++)j(m,d,f[h]);else j(m,d,f)}}function O(m){return m?m instanceof w?m.length:w.byteLength(m):0}function D(m){return typeof m=="string"||m instanceof w}Q.exports=S},41455:function(Q,Y,_){"use strict";var w=_(34155);const x=_(17187).EventEmitter,L=_(77431),C=_(26565),b=_(73744),o=_(21772),s=_(86156),l=_(92750).Writable,E=_(35717),A=_(45408),y=_(1697),P=_(4028),g=_(47529),v=_(13129)("mqttjs:client"),S=w?w.nextTick:function(z){setTimeout(z,0)},T=_.g.setImmediate||function(z){S(z)},U={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0},N=["ECONNREFUSED","EADDRINUSE","ECONNRESET","ENOTFOUND"],H={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"};function V(){return"mqttjs_"+Math.random().toString(16).substr(2,8)}function k(z,F){if(z.options.protocolVersion===5&&F.cmd==="publish"){let ee;F.properties&&(ee=F.properties.topicAlias);const Z=F.topic.toString();if(z.topicAliasSend)if(ee){if(Z.length!==0&&(v("applyTopicAlias :: register topic: %s - alias: %d",Z,ee),!z.topicAliasSend.put(Z,ee)))return v("applyTopicAlias :: error out of range. topic: %s - alias: %d",Z,ee),new Error("Sending Topic Alias out of range")}else Z.length!==0&&(z.options.autoAssignTopicAlias?(ee=z.topicAliasSend.getAliasByTopic(Z),ee?(F.topic="",F.properties=ge(ge({},F.properties),{topicAlias:ee}),v("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",Z,ee)):(ee=z.topicAliasSend.getLruAlias(),z.topicAliasSend.put(Z,ee),F.properties=ge(ge({},F.properties),{topicAlias:ee}),v("applyTopicAlias :: auto assign topic: %s - alias: %d",Z,ee))):z.options.autoUseTopicAlias&&(ee=z.topicAliasSend.getAliasByTopic(Z),ee&&(F.topic="",F.properties=ge(ge({},F.properties),{topicAlias:ee}),v("applyTopicAlias :: auto use topic: %s - alias: %d",Z,ee))));else if(ee)return v("applyTopicAlias :: error out of range. topic: %s - alias: %d",Z,ee),new Error("Sending Topic Alias out of range")}}function X(z,F){let ee;F.properties&&(ee=F.properties.topicAlias);let Z=F.topic.toString();if(Z.length===0){if(typeof ee=="undefined")return new Error("Unregistered Topic Alias");if(Z=z.topicAliasSend.getTopicByAlias(ee),typeof Z=="undefined")return new Error("Unregistered Topic Alias");F.topic=Z}ee&&delete F.properties.topicAlias}function W(z,F,ee){v("sendPacket :: packet: %O",F),v("sendPacket :: emitting `packetsend`"),z.emit("packetsend",F),v("sendPacket :: writing to stream");const Z=o.writeToStream(F,z.stream,z.options);v("sendPacket :: writeToStream result %s",Z),!Z&&ee&&ee!==ne?(v("sendPacket :: handle events on `drain` once through callback."),z.stream.once("drain",ee)):ee&&(v("sendPacket :: invoking cb"),ee())}function ie(z){z&&(v("flush: queue exists? %b",!!z),Object.keys(z).forEach(function(F){typeof z[F].cb=="function"&&(z[F].cb(new Error("Connection closed")),delete z[F])}))}function q(z){z&&(v("flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(z).forEach(function(F){z[F].volatile&&typeof z[F].cb=="function"&&(z[F].cb(new Error("Connection closed")),delete z[F])}))}function le(z,F,ee,Z){v("storeAndSend :: store packet with cmd %s to outgoingStore",F.cmd);let fe=F,se;if(fe.cmd==="publish"&&(fe=y(F),se=X(z,fe),se))return ee&&ee(se);z.outgoingStore.put(fe,function($){if($)return ee&&ee($);Z(),W(z,F,ee)})}function ne(z){v("nop ::",z)}function J(z,F){let ee;const Z=this;if(!(this instanceof J))return new J(z,F);this.options=F||{};for(ee in U)typeof this.options[ee]=="undefined"?this.options[ee]=U[ee]:this.options[ee]=F[ee];v("MqttClient :: options.protocol",F.protocol),v("MqttClient :: options.protocolVersion",F.protocolVersion),v("MqttClient :: options.username",F.username),v("MqttClient :: options.keepalive",F.keepalive),v("MqttClient :: options.reconnectPeriod",F.reconnectPeriod),v("MqttClient :: options.rejectUnauthorized",F.rejectUnauthorized),v("MqttClient :: options.topicAliasMaximum",F.topicAliasMaximum),this.options.clientId=typeof F.clientId=="string"?F.clientId:V(),v("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=F.protocolVersion===5&&F.customHandleAcks?F.customHandleAcks:function(){arguments[3](0)},this.streamBuilder=z,this.messageIdProvider=typeof this.options.messageIdProvider=="undefined"?new s:this.options.messageIdProvider,this.outgoingStore=F.outgoingStore||new L,this.incomingStore=F.incomingStore||new L,this.queueQoSZero=F.queueQoSZero===void 0?!0:F.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,F.topicAliasMaximum>0&&(F.topicAliasMaximum>65535?v("MqttClient :: options.topicAliasMaximum is out of range"):this.topicAliasRecv=new C(F.topicAliasMaximum)),this.on("connect",function(){const fe=this.queue;function se(){const oe=fe.shift();v("deliver :: entry %o",oe);let $=null;if(!oe){Z._resubscribe();return}$=oe.packet,v("deliver :: call _sendPacket for %o",$);let re=!0;$.messageId&&$.messageId!==0&&(Z.messageIdProvider.register($.messageId)||(re=!1)),re?Z._sendPacket($,function(j){oe.cb&&oe.cb(j),se()}):(v("messageId: %d has already used. The message is skipped and removed.",$.messageId),se())}v("connect :: sending queued packets"),se()}),this.on("close",function(){v("close :: connected set to `false`"),this.connected=!1,v("close :: clearing connackTimer"),clearTimeout(this.connackTimer),v("close :: clearing ping timer"),Z.pingTimer!==null&&(Z.pingTimer.clear(),Z.pingTimer=null),this.topicAliasRecv&&this.topicAliasRecv.clear(),v("close :: calling _setupReconnect"),this._setupReconnect()}),x.call(this),v("MqttClient :: setting up stream"),this._setupStream()}E(J,x),J.prototype._setupStream=function(){const z=this,F=new l,ee=o.parser(this.options);let Z=null;const fe=[];v("_setupStream :: calling method to clear reconnect"),this._clearReconnect(),v("_setupStream :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),ee.on("packet",function(j){v("parser :: on packet push to packets array."),fe.push(j)});function se(){if(fe.length)S(oe);else{const j=Z;Z=null,j()}}function oe(){v("work :: getting next packet in queue");const j=fe.shift();if(j)v("work :: packet pulled from queue"),z._handlePacket(j,se);else{v("work :: no packets in queue");const G=Z;Z=null,v("work :: done flag is %s",!!G),G&&G()}}F._write=function(j,G,O){Z=O,v("writable stream :: parsing buffer"),ee.parse(j),oe()};function $(j){v("streamErrorHandler :: error",j.message),N.includes(j.code)?(v("streamErrorHandler :: emitting error"),z.emit("error",j)):ne(j)}v("_setupStream :: pipe stream to writable stream"),this.stream.pipe(F),this.stream.on("error",$),this.stream.on("close",function(){v("(%s)stream :: on close",z.options.clientId),q(z.outgoing),v("stream: emit close to MqttClient"),z.emit("close")}),v("_setupStream: sending packet `connect`");const re=Object.create(this.options);if(re.cmd="connect",this.topicAliasRecv&&(re.properties||(re.properties={}),this.topicAliasRecv&&(re.properties.topicAliasMaximum=this.topicAliasRecv.max)),W(this,re),ee.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return z.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"){const j=g({cmd:"auth",reasonCode:0},this.options.authPacket);W(this,j)}}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(function(){v("!!connectTimeout hit!! Calling _cleanUp with force `true`"),z._cleanUp(!0)},this.options.connectTimeout)},J.prototype._handlePacket=function(z,F){const ee=this.options;if(ee.protocolVersion===5&&ee.properties&&ee.properties.maximumPacketSize&&ee.properties.maximumPacketSize<z.length)return this.emit("error",new Error("exceeding packets size "+z.cmd)),this.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),this;switch(v("_handlePacket :: emitting packetreceive"),this.emit("packetreceive",z),z.cmd){case"publish":this._handlePublish(z,F);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":this._handleAck(z),F();break;case"pubrel":this._handlePubrel(z,F);break;case"connack":this._handleConnack(z),F();break;case"auth":this._handleAuth(z),F();break;case"pingresp":this._handlePingresp(z),F();break;case"disconnect":this._handleDisconnect(z),F();break;default:break}},J.prototype._checkDisconnecting=function(z){return this.disconnecting&&(z&&z!==ne?z(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting},J.prototype.publish=function(z,F,ee,Z){v("publish :: message `%s` to topic `%s`",F,z);const fe=this.options;if(typeof ee=="function"&&(Z=ee,ee=null),ee=g({qos:0,retain:!1,dup:!1},ee),this._checkDisconnecting(Z))return this;const oe=this,$=function(){let re=0;if((ee.qos===1||ee.qos===2)&&(re=oe._nextId(),re===null))return v("No messageId left"),!1;const j={cmd:"publish",topic:z,payload:F,qos:ee.qos,retain:ee.retain,messageId:re,dup:ee.dup};switch(fe.protocolVersion===5&&(j.properties=ee.properties),v("publish :: qos",ee.qos),ee.qos){case 1:case 2:oe.outgoing[j.messageId]={volatile:!1,cb:Z||ne},v("MqttClient:publish: packet cmd: %s",j.cmd),oe._sendPacket(j,void 0,ee.cbStorePut);break;default:v("MqttClient:publish: packet cmd: %s",j.cmd),oe._sendPacket(j,Z,ee.cbStorePut);break}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!$())&&this._storeProcessingQueue.push({invoke:$,cbStorePut:ee.cbStorePut,callback:Z}),this},J.prototype.subscribe=function(){const z=this,F=new Array(arguments.length);for(let O=0;O<arguments.length;O++)F[O]=arguments[O];const ee=[];let Z=F.shift();const fe=Z.resubscribe;let se=F.pop()||ne,oe=F.pop();const $=this.options.protocolVersion;delete Z.resubscribe,typeof Z=="string"&&(Z=[Z]),typeof se!="function"&&(oe=se,se=ne);const re=P.validateTopics(Z);if(re!==null)return T(se,new Error("Invalid topic "+re)),this;if(this._checkDisconnecting(se))return v("subscribe: discconecting true"),this;const j={qos:0};if($===5&&(j.nl=!1,j.rap=!1,j.rh=0),oe=g(j,oe),Array.isArray(Z)?Z.forEach(function(O){if(v("subscribe: array topic %s",O),!Object.prototype.hasOwnProperty.call(z._resubscribeTopics,O)||z._resubscribeTopics[O].qos<oe.qos||fe){const D={topic:O,qos:oe.qos};$===5&&(D.nl=oe.nl,D.rap=oe.rap,D.rh=oe.rh,D.properties=oe.properties),v("subscribe: pushing topic `%s` and qos `%s` to subs list",D.topic,D.qos),ee.push(D)}}):Object.keys(Z).forEach(function(O){if(v("subscribe: object topic %s",O),!Object.prototype.hasOwnProperty.call(z._resubscribeTopics,O)||z._resubscribeTopics[O].qos<Z[O].qos||fe){const D={topic:O,qos:Z[O].qos};$===5&&(D.nl=Z[O].nl,D.rap=Z[O].rap,D.rh=Z[O].rh,D.properties=oe.properties),v("subscribe: pushing `%s` to subs list",D),ee.push(D)}}),!ee.length)return se(null,[]),this;const G=function(){const O=z._nextId();if(O===null)return v("No messageId left"),!1;const D={cmd:"subscribe",subscriptions:ee,qos:1,retain:!1,dup:!1,messageId:O};if(oe.properties&&(D.properties=oe.properties),z.options.resubscribe){v("subscribe :: resubscribe true");const m=[];ee.forEach(function(p){if(z.options.reconnectPeriod>0){const B={qos:p.qos};$===5&&(B.nl=p.nl||!1,B.rap=p.rap||!1,B.rh=p.rh||0,B.properties=p.properties),z._resubscribeTopics[p.topic]=B,m.push(p.topic)}}),z.messageIdToTopic[D.messageId]=m}return z.outgoing[D.messageId]={volatile:!0,cb:function(m,p){if(!m){const B=p.granted;for(let d=0;d<B.length;d+=1)ee[d].qos=B[d]}se(m,ee)}},v("subscribe :: call _sendPacket"),z._sendPacket(D),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!G())&&this._storeProcessingQueue.push({invoke:G,callback:se}),this},J.prototype.unsubscribe=function(){const z=this,F=new Array(arguments.length);for(let $=0;$<arguments.length;$++)F[$]=arguments[$];let ee=F.shift(),Z=F.pop()||ne,fe=F.pop();typeof ee=="string"&&(ee=[ee]),typeof Z!="function"&&(fe=Z,Z=ne);const se=P.validateTopics(ee);if(se!==null)return T(Z,new Error("Invalid topic "+se)),this;if(z._checkDisconnecting(Z))return this;const oe=function(){const $=z._nextId();if($===null)return v("No messageId left"),!1;const re={cmd:"unsubscribe",qos:1,messageId:$};return typeof ee=="string"?re.unsubscriptions=[ee]:Array.isArray(ee)&&(re.unsubscriptions=ee),z.options.resubscribe&&re.unsubscriptions.forEach(function(j){delete z._resubscribeTopics[j]}),typeof fe=="object"&&fe.properties&&(re.properties=fe.properties),z.outgoing[re.messageId]={volatile:!0,cb:Z},v("unsubscribe: call _sendPacket"),z._sendPacket(re),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!oe())&&this._storeProcessingQueue.push({invoke:oe,callback:Z}),this},J.prototype.end=function(z,F,ee){const Z=this;v("end :: (%s)",this.options.clientId),(z==null||typeof z!="boolean")&&(ee=F||ne,F=z,z=!1,typeof F!="object"&&(ee=F,F=null,typeof ee!="function"&&(ee=ne))),typeof F!="object"&&(ee=F,F=null),v("end :: cb? %s",!!ee),ee=ee||ne;function fe(){v("end :: closeStores: closing incoming and outgoing stores"),Z.disconnected=!0,Z.incomingStore.close(function(oe){Z.outgoingStore.close(function($){if(v("end :: closeStores: emitting end"),Z.emit("end"),ee){const re=oe||$;v("end :: closeStores: invoking callback with args"),ee(re)}})}),Z._deferredReconnect&&Z._deferredReconnect()}function se(){v("end :: (%s) :: finish :: calling _cleanUp with force %s",Z.options.clientId,z),Z._cleanUp(z,()=>{v("end :: finish :: calling process.nextTick on closeStores"),S(fe.bind(Z))},F)}return this.disconnecting?(ee(),this):(this._clearReconnect(),this.disconnecting=!0,!z&&Object.keys(this.outgoing).length>0?(v("end :: (%s) :: calling finish in 10ms once outgoing is empty",Z.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,se,10))):(v("end :: (%s) :: immediately calling finish",Z.options.clientId),se()),this)},J.prototype.removeOutgoingMessage=function(z){const F=this.outgoing[z]?this.outgoing[z].cb:null;return delete this.outgoing[z],this.outgoingStore.del({messageId:z},function(){F(new Error("Message removed"))}),this},J.prototype.reconnect=function(z){v("client reconnect");const F=this,ee=function(){z?(F.options.incomingStore=z.incomingStore,F.options.outgoingStore=z.outgoingStore):(F.options.incomingStore=null,F.options.outgoingStore=null),F.incomingStore=F.options.incomingStore||new L,F.outgoingStore=F.options.outgoingStore||new L,F.disconnecting=!1,F.disconnected=!1,F._deferredReconnect=null,F._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=ee:ee(),this},J.prototype._reconnect=function(){v("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this._setupStream()}),v("client already connected. disconnecting first.")):(v("_reconnect: calling _setupStream"),this._setupStream())},J.prototype._setupReconnect=function(){const z=this;!z.disconnecting&&!z.reconnectTimer&&z.options.reconnectPeriod>0?(this.reconnecting||(v("_setupReconnect :: emit `offline` state"),this.emit("offline"),v("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),v("_setupReconnect :: setting reconnectTimer for %d ms",z.options.reconnectPeriod),z.reconnectTimer=setInterval(function(){v("reconnectTimer :: reconnect triggered!"),z._reconnect()},z.options.reconnectPeriod)):v("_setupReconnect :: doing nothing...")},J.prototype._clearReconnect=function(){v("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},J.prototype._cleanUp=function(z,F){const ee=arguments[2];if(F&&(v("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",F)),v("_cleanUp :: forced? %s",z),z)this.options.reconnectPeriod===0&&this.options.clean&&ie(this.outgoing),v("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{const Z=g({cmd:"disconnect"},ee);v("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(Z,T.bind(null,this.stream.end.bind(this.stream)))}this.disconnecting||(v("_cleanUp :: client not disconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),this.pingTimer!==null&&(v("_cleanUp :: clearing pingTimer"),this.pingTimer.clear(),this.pingTimer=null),F&&!this.connected&&(v("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",F),F())},J.prototype._sendPacket=function(z,F,ee){v("_sendPacket :: (%s) :: start",this.options.clientId),ee=ee||ne,F=F||ne;const Z=k(this,z);if(Z){F(Z);return}if(!this.connected){if(z.cmd==="auth"){this._shiftPingInterval(),W(this,z,F);return}v("_sendPacket :: client not connected. Storing packet offline."),this._storePacket(z,F,ee);return}switch(this._shiftPingInterval(),z.cmd){case"publish":break;case"pubrel":le(this,z,F,ee);return;default:W(this,z,F);return}switch(z.qos){case 2:case 1:le(this,z,F,ee);break;case 0:default:W(this,z,F);break}v("_sendPacket :: (%s) :: end",this.options.clientId)},J.prototype._storePacket=function(z,F,ee){v("_storePacket :: packet: %o",z),v("_storePacket :: cb? %s",!!F),ee=ee||ne;let Z=z;if(Z.cmd==="publish"){Z=y(z);const fe=X(this,Z);if(fe)return F&&F(fe)}(Z.qos||0)===0&&this.queueQoSZero||Z.cmd!=="publish"?this.queue.push({packet:Z,cb:F}):Z.qos>0?(F=this.outgoing[Z.messageId]?this.outgoing[Z.messageId].cb:null,this.outgoingStore.put(Z,function(fe){if(fe)return F&&F(fe);ee()})):F&&F(new Error("No connection to broker"))},J.prototype._setupPingTimer=function(){v("_setupPingTimer :: keepalive %d (seconds)",this.options.keepalive);const z=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=A(function(){z._checkPing()},this.options.keepalive*1e3))},J.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(this.options.keepalive*1e3)},J.prototype._checkPing=function(){v("_checkPing :: checking ping..."),this.pingResp?(v("_checkPing :: ping response received. Clearing flag and sending `pingreq`"),this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):(v("_checkPing :: calling _cleanUp with force true"),this._cleanUp(!0))},J.prototype._handlePingresp=function(){this.pingResp=!0},J.prototype._handleConnack=function(z){v("_handleConnack");const F=this.options,Z=F.protocolVersion===5?z.reasonCode:z.returnCode;if(clearTimeout(this.connackTimer),delete this.topicAliasSend,z.properties){if(z.properties.topicAliasMaximum){if(z.properties.topicAliasMaximum>65535){this.emit("error",new Error("topicAliasMaximum from broker is out of range"));return}z.properties.topicAliasMaximum>0&&(this.topicAliasSend=new b(z.properties.topicAliasMaximum))}z.properties.serverKeepAlive&&F.keepalive&&(F.keepalive=z.properties.serverKeepAlive,this._shiftPingInterval()),z.properties.maximumPacketSize&&(F.properties||(F.properties={}),F.properties.maximumPacketSize=z.properties.maximumPacketSize)}if(Z===0)this.reconnecting=!1,this._onConnect(z);else if(Z>0){const fe=new Error("Connection refused: "+H[Z]);fe.code=Z,this.emit("error",fe)}},J.prototype._handleAuth=function(z){const ee=this.options.protocolVersion,Z=ee===5?z.reasonCode:z.returnCode;if(ee!==5){const se=new Error("Protocol error: Auth packets are only supported in MQTT 5. Your version:"+ee);se.code=Z,this.emit("error",se);return}const fe=this;this.handleAuth(z,function(se,oe){if(se){fe.emit("error",se);return}if(Z===24)fe.reconnecting=!1,fe._sendPacket(oe);else{const $=new Error("Connection refused: "+H[Z]);se.code=Z,fe.emit("error",$)}})},J.prototype.handleAuth=function(z,F){F()},J.prototype._handlePublish=function(z,F){v("_handlePublish: packet %o",z),F=typeof F!="undefined"?F:ne;let ee=z.topic.toString();const Z=z.payload,fe=z.qos,se=z.messageId,oe=this,$=this.options,re=[0,16,128,131,135,144,145,151,153];if(this.options.protocolVersion===5){let j;if(z.properties&&(j=z.properties.topicAlias),typeof j!="undefined")if(ee.length===0)if(j>0&&j<=65535){const G=this.topicAliasRecv.getTopicByAlias(j);if(G)ee=G,v("_handlePublish :: topic complemented by alias. topic: %s - alias: %d",ee,j);else{v("_handlePublish :: unregistered topic alias. alias: %d",j),this.emit("error",new Error("Received unregistered Topic Alias"));return}}else{v("_handlePublish :: topic alias out of range. alias: %d",j),this.emit("error",new Error("Received Topic Alias is out of range"));return}else if(this.topicAliasRecv.put(ee,j))v("_handlePublish :: registered topic: %s - alias: %d",ee,j);else{v("_handlePublish :: topic alias out of range. alias: %d",j),this.emit("error",new Error("Received Topic Alias is out of range"));return}}switch(v("_handlePublish: qos %d",fe),fe){case 2:{$.customHandleAcks(ee,Z,z,function(j,G){if(j instanceof Error||(G=j,j=null),j)return oe.emit("error",j);if(re.indexOf(G)===-1)return oe.emit("error",new Error("Wrong reason code for pubrec"));G?oe._sendPacket({cmd:"pubrec",messageId:se,reasonCode:G},F):oe.incomingStore.put(z,function(){oe._sendPacket({cmd:"pubrec",messageId:se},F)})});break}case 1:{$.customHandleAcks(ee,Z,z,function(j,G){if(j instanceof Error||(G=j,j=null),j)return oe.emit("error",j);if(re.indexOf(G)===-1)return oe.emit("error",new Error("Wrong reason code for puback"));G||oe.emit("message",ee,Z,z),oe.handleMessage(z,function(O){if(O)return F&&F(O);oe._sendPacket({cmd:"puback",messageId:se,reasonCode:G},F)})});break}case 0:this.emit("message",ee,Z,z),this.handleMessage(z,F);break;default:v("_handlePublish: unknown QoS. Doing nothing.");break}},J.prototype.handleMessage=function(z,F){F()},J.prototype._handleAck=function(z){const F=z.messageId,ee=z.cmd;let Z=null;const fe=this.outgoing[F]?this.outgoing[F].cb:null,se=this;let oe;if(!fe){v("_handleAck :: Server sent an ack in error. Ignoring.");return}switch(v("_handleAck :: packet type",ee),ee){case"pubcomp":case"puback":{const $=z.reasonCode;$&&$>0&&$!==16&&(oe=new Error("Publish error: "+H[$]),oe.code=$,fe(oe,z)),delete this.outgoing[F],this.outgoingStore.del(z,fe),this.messageIdProvider.deallocate(F),this._invokeStoreProcessingQueue();break}case"pubrec":{Z={cmd:"pubrel",qos:2,messageId:F};const $=z.reasonCode;$&&$>0&&$!==16?(oe=new Error("Publish error: "+H[$]),oe.code=$,fe(oe,z)):this._sendPacket(Z);break}case"suback":{delete this.outgoing[F],this.messageIdProvider.deallocate(F);for(let $=0;$<z.granted.length;$++)if((z.granted[$]&128)!=0){const re=this.messageIdToTopic[F];re&&re.forEach(function(j){delete se._resubscribeTopics[j]})}this._invokeStoreProcessingQueue(),fe(null,z);break}case"unsuback":{delete this.outgoing[F],this.messageIdProvider.deallocate(F),this._invokeStoreProcessingQueue(),fe(null);break}default:se.emit("error",new Error("unrecognized packet type"))}this.disconnecting&&Object.keys(this.outgoing).length===0&&this.emit("outgoingEmpty")},J.prototype._handlePubrel=function(z,F){v("handling pubrel packet"),F=typeof F!="undefined"?F:ne;const ee=z.messageId,Z=this,fe={cmd:"pubcomp",messageId:ee};Z.incomingStore.get(z,function(se,oe){se?Z._sendPacket(fe,F):(Z.emit("message",oe.topic,oe.payload,oe),Z.handleMessage(oe,function($){if($)return F($);Z.incomingStore.del(oe,ne),Z._sendPacket(fe,F)}))})},J.prototype._handleDisconnect=function(z){this.emit("disconnect",z)},J.prototype._nextId=function(){return this.messageIdProvider.allocate()},J.prototype.getLastMessageId=function(){return this.messageIdProvider.getLastAllocated()},J.prototype._resubscribe=function(){v("_resubscribe");const z=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion===5&&!this.connackPacket.sessionPresent)&&z.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){v("_resubscribe: protocolVersion 5");for(let F=0;F<z.length;F++){const ee={};ee[z[F]]=this._resubscribeTopics[z[F]],ee.resubscribe=!0,this.subscribe(ee,{properties:ee[z[F]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1},J.prototype._onConnect=function(z){if(this.disconnected){this.emit("connect",z);return}const F=this;this.connackPacket=z,this.messageIdProvider.clear(),this._setupPingTimer(),this.connected=!0;function ee(){let Z=F.outgoingStore.createStream();function fe(){F._storeProcessing=!1,F._packetIdsDuringStoreProcessing={}}F.once("close",se),Z.on("error",function($){fe(),F._flushStoreProcessingQueue(),F.removeListener("close",se),F.emit("error",$)});function se(){Z.destroy(),Z=null,F._flushStoreProcessingQueue(),fe()}function oe(){if(!Z)return;F._storeProcessing=!0;const $=Z.read(1);let re;if(!$){Z.once("readable",oe);return}if(F._packetIdsDuringStoreProcessing[$.messageId]){oe();return}!F.disconnecting&&!F.reconnectTimer?(re=F.outgoing[$.messageId]?F.outgoing[$.messageId].cb:null,F.outgoing[$.messageId]={volatile:!1,cb:function(j,G){re&&re(j,G),oe()}},F._packetIdsDuringStoreProcessing[$.messageId]=!0,F.messageIdProvider.register($.messageId)?F._sendPacket($):v("messageId: %d has already used.",$.messageId)):Z.destroy&&Z.destroy()}Z.on("end",function(){let $=!0;for(const re in F._packetIdsDuringStoreProcessing)if(!F._packetIdsDuringStoreProcessing[re]){$=!1;break}$?(fe(),F.removeListener("close",se),F._invokeAllStoreProcessingQueue(),F.emit("connect",z)):ee()}),oe()}ee()},J.prototype._invokeStoreProcessingQueue=function(){if(this._storeProcessingQueue.length>0){const z=this._storeProcessingQueue[0];if(z&&z.invoke())return this._storeProcessingQueue.shift(),!0}return!1},J.prototype._invokeAllStoreProcessingQueue=function(){for(;this._invokeStoreProcessingQueue(););},J.prototype._flushStoreProcessingQueue=function(){for(const z of this._storeProcessingQueue)z.cbStorePut&&z.cbStorePut(new Error("Connection closed")),z.callback&&z.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)},Q.exports=J},36191:function(Q,Y,_){"use strict";const{Buffer:w}=_(48764),x=_(92750).Transform,L=_(25981);let C,b,o,s=!1;function l(){const g=new x;return g._write=function(v,S,T){C.sendSocketMessage({data:v.buffer,success:function(){T()},fail:function(){T(new Error)}})},g._flush=function(S){C.closeSocket({success:function(){S()}})},g}function E(g){g.hostname||(g.hostname="localhost"),g.path||(g.path="/"),g.wsOptions||(g.wsOptions={})}function A(g,v){const S=g.protocol==="alis"?"wss":"ws";let T=S+"://"+g.hostname+g.path;return g.port&&g.port!==80&&g.port!==443&&(T=S+"://"+g.hostname+":"+g.port+g.path),typeof g.transformWsUrl=="function"&&(T=g.transformWsUrl(T,g,v)),T}function y(){s||(s=!0,C.onSocketOpen(function(){o.setReadable(b),o.setWritable(b),o.emit("connect")}),C.onSocketMessage(function(g){if(typeof g.data=="string"){const v=w.from(g.data,"base64");b.push(v)}else{const v=new FileReader;v.addEventListener("load",function(){let S=v.result;S instanceof ArrayBuffer?S=w.from(S):S=w.from(S,"utf8"),b.push(S)}),v.readAsArrayBuffer(g.data)}}),C.onSocketClose(function(){o.end(),o.destroy()}),C.onSocketError(function(g){o.destroy(g)}))}function P(g,v){if(v.hostname=v.hostname||v.host,!v.hostname)throw new Error("Could not determine host. Specify host manually.");const S=v.protocolId==="MQIsdp"&&v.protocolVersion===3?"mqttv3.1":"mqtt";E(v);const T=A(v,g);return C=v.my,C.connectSocket({url:T,protocols:S}),b=l(),o=L.obj(),y(),o}Q.exports=P},31616:function(Q,Y,_){"use strict";var w=_(34155);const x=_(41455),L=_(77431),C=_(8575),b=_(47529),o=_(13129)("mqttjs"),s={};typeof w!="undefined"&&w.title!=="browser"||typeof _!="function"?(s.mqtt=_(71849),s.tcp=_(71849),s.ssl=_(85473),s.tls=_(85473),s.mqtts=_(85473)):(s.wx=_(18098),s.wxs=_(18098),s.ali=_(36191),s.alis=_(36191)),s.ws=_(26908),s.wss=_(26908);function l(A){let y;A.auth&&(y=A.auth.match(/^(.+):(.+)$/),y?(A.username=y[1],A.password=y[2]):A.username=A.auth)}function E(A,y){if(o("connecting to an MQTT broker..."),typeof A=="object"&&!y&&(y=A,A=null),y=y||{},A){const v=C.parse(A,!0);if(v.port!=null&&(v.port=Number(v.port)),y=b(v,y),y.protocol===null)throw new Error("Missing protocol");y.protocol=y.protocol.replace(/:$/,"")}if(l(y),y.query&&typeof y.query.clientId=="string"&&(y.clientId=y.query.clientId),y.cert&&y.key)if(y.protocol){if(["mqtts","wss","wxs","alis"].indexOf(y.protocol)===-1)switch(y.protocol){case"mqtt":y.protocol="mqtts";break;case"ws":y.protocol="wss";break;case"wx":y.protocol="wxs";break;case"ali":y.protocol="alis";break;default:throw new Error('Unknown protocol for secure connection: "'+y.protocol+'"!')}}else throw new Error("Missing secure protocol key");if(!s[y.protocol]){const v=["mqtts","wss"].indexOf(y.protocol)!==-1;y.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter(function(S,T){return v&&T%2==0?!1:typeof s[S]=="function"})[0]}if(y.clean===!1&&!y.clientId)throw new Error("Missing clientId for unclean clients");y.protocol&&(y.defaultProtocol=y.protocol);function P(v){return y.servers&&((!v._reconnectCount||v._reconnectCount===y.servers.length)&&(v._reconnectCount=0),y.host=y.servers[v._reconnectCount].host,y.port=y.servers[v._reconnectCount].port,y.protocol=y.servers[v._reconnectCount].protocol?y.servers[v._reconnectCount].protocol:y.defaultProtocol,y.hostname=y.host,v._reconnectCount++),o("calling streambuilder for",y.protocol),s[y.protocol](v,y)}const g=new x(P,y);return g.on("error",function(){}),g}Q.exports=E,Q.exports.connect=E,Q.exports.MqttClient=x,Q.exports.Store=L},71849:function(Q,Y,_){"use strict";const w=_(87294),x=_(13129)("mqttjs:tcp");function L(C,b){b.port=b.port||1883,b.hostname=b.hostname||b.host||"localhost";const o=b.port,s=b.hostname;return x("port %d and host %s",o,s),w.createConnection(o,s)}Q.exports=L},85473:function(Q,Y,_){"use strict";const w=_(95036),x=_(87294),L=_(13129)("mqttjs:tls");function C(b,o){o.port=o.port||8883,o.host=o.hostname||o.host||"localhost",x.isIP(o.host)===0&&(o.servername=o.host),o.rejectUnauthorized=o.rejectUnauthorized!==!1,delete o.path,L("port %d host %s rejectUnauthorized %b",o.port,o.host,o.rejectUnauthorized);const s=w.connect(o);s.on("secureConnect",function(){o.rejectUnauthorized&&!s.authorized?s.emit("error",new Error("TLS not authorized")):s.removeListener("error",l)});function l(E){o.rejectUnauthorized&&b.emit("error",E),s.end()}return s.on("error",l),s}Q.exports=C},26908:function(Q,Y,_){"use strict";var w=_(34155);const{Buffer:x}=_(48764),L=_(15124),C=_(13129)("mqttjs:ws"),b=_(25981),o=_(92750).Transform,s=["rejectUnauthorized","ca","cert","key","pfx","passphrase"],l=typeof w!="undefined"&&w.title==="browser"||typeof _=="function";function E(T,U){let N=T.protocol+"://"+T.hostname+":"+T.port+T.path;return typeof T.transformWsUrl=="function"&&(N=T.transformWsUrl(N,T,U)),N}function A(T){const U=T;return T.hostname||(U.hostname="localhost"),T.port||(T.protocol==="wss"?U.port=443:U.port=80),T.path||(U.path="/"),T.wsOptions||(U.wsOptions={}),!l&&T.protocol==="wss"&&s.forEach(function(N){Object.prototype.hasOwnProperty.call(T,N)&&!Object.prototype.hasOwnProperty.call(T.wsOptions,N)&&(U.wsOptions[N]=T[N])}),U}function y(T){const U=A(T);if(U.hostname||(U.hostname=U.host),!U.hostname){if(typeof document=="undefined")throw new Error("Could not determine host. Specify host manually.");const N=new URL(document.URL);U.hostname=N.hostname,U.port||(U.port=N.port)}return U.objectMode===void 0&&(U.objectMode=!(U.binary===!0||U.binary===void 0)),U}function P(T,U,N){C("createWebSocket"),C("protocol: "+N.protocolId+" "+N.protocolVersion);const H=N.protocolId==="MQIsdp"&&N.protocolVersion===3?"mqttv3.1":"mqtt";return C("creating new Websocket for url: "+U+" and protocol: "+H),new L(U,[H],N.wsOptions)}function g(T,U){const N=U.protocolId==="MQIsdp"&&U.protocolVersion===3?"mqttv3.1":"mqtt",H=E(U,T),V=new WebSocket(H,[N]);return V.binaryType="arraybuffer",V}function v(T,U){C("streamBuilder");const N=A(U),H=E(N,T),V=P(T,H,N),k=L.createWebSocketStream(V,N.wsOptions);return k.url=H,V.on("close",()=>{k.destroy()}),k}function S(T,U){C("browserStreamBuilder");let N;const V=y(U).browserBufferSize||1024*512,k=U.browserBufferTimeout||1e3,X=!U.objectMode,W=g(T,U),ie=le(U,Z,fe);U.objectMode||(ie._writev=ee),ie.on("close",()=>{W.close()});const q=typeof W.addEventListener!="undefined";W.readyState===W.OPEN?N=ie:(N=N=b(void 0,void 0,U),U.objectMode||(N._writev=ee),q?W.addEventListener("open",ne):W.onopen=ne),N.socket=W,q?(W.addEventListener("close",J),W.addEventListener("error",z),W.addEventListener("message",F)):(W.onclose=J,W.onerror=z,W.onmessage=F);function le(se,oe,$){const re=new o({objectModeMode:se.objectMode});return re._write=oe,re._flush=$,re}function ne(){N.setReadable(ie),N.setWritable(ie),N.emit("connect")}function J(){N.end(),N.destroy()}function z(se){N.destroy(se)}function F(se){let oe=se.data;oe instanceof ArrayBuffer?oe=x.from(oe):oe=x.from(oe,"utf8"),ie.push(oe)}function ee(se,oe){const $=new Array(se.length);for(let re=0;re<se.length;re++)typeof se[re].chunk=="string"?$[re]=x.from(se[re],"utf8"):$[re]=se[re].chunk;this._write(x.concat($),"binary",oe)}function Z(se,oe,$){W.bufferedAmount>V&&setTimeout(Z,k,se,oe,$),X&&typeof se=="string"&&(se=x.from(se,"utf8"));try{W.send(se)}catch(re){return $(re)}$()}function fe(se){W.close(),se()}return N}l?Q.exports=S:Q.exports=v},18098:function(Q,Y,_){"use strict";const{Buffer:w}=_(48764),x=_(92750).Transform,L=_(25981);let C,b,o;function s(){const P=new x;return P._write=function(g,v,S){C.send({data:g.buffer,success:function(){S()},fail:function(T){S(new Error(T))}})},P._flush=function(v){C.close({success:function(){v()}})},P}function l(P){P.hostname||(P.hostname="localhost"),P.path||(P.path="/"),P.wsOptions||(P.wsOptions={})}function E(P,g){const v=P.protocol==="wxs"?"wss":"ws";let S=v+"://"+P.hostname+P.path;return P.port&&P.port!==80&&P.port!==443&&(S=v+"://"+P.hostname+":"+P.port+P.path),typeof P.transformWsUrl=="function"&&(S=P.transformWsUrl(S,P,g)),S}function A(){C.onOpen(function(){o.setReadable(b),o.setWritable(b),o.emit("connect")}),C.onMessage(function(P){let g=P.data;g instanceof ArrayBuffer?g=w.from(g):g=w.from(g,"utf8"),b.push(g)}),C.onClose(function(){o.end(),o.destroy()}),C.onError(function(P){o.destroy(new Error(P.errMsg))})}function y(P,g){if(g.hostname=g.hostname||g.host,!g.hostname)throw new Error("Could not determine host. Specify host manually.");const v=g.protocolId==="MQIsdp"&&g.protocolVersion===3?"mqttv3.1":"mqtt";l(g);const S=E(g,P);C=wx.connectSocket({url:S,protocols:[v]}),b=s(),o=L.obj(),o._destroy=function(U,N){C.close({success:function(){N&&N(U)}})};const T=o.destroy;return o.destroy=function(){o.destroy=T;const U=this;setTimeout(function(){C.close({fail:function(){U._destroy(new Error)}})},0)}.bind(o),A(),o}Q.exports=y},86156:function(Q){"use strict";function Y(){if(!(this instanceof Y))return new Y;this.nextId=Math.max(1,Math.floor(Math.random()*65535))}Y.prototype.allocate=function(){const _=this.nextId++;return this.nextId===65536&&(this.nextId=1),_},Y.prototype.getLastAllocated=function(){return this.nextId===1?65535:this.nextId-1},Y.prototype.register=function(_){return!0},Y.prototype.deallocate=function(_){},Y.prototype.clear=function(){},Q.exports=Y},77431:function(Q,Y,_){"use strict";const w=_(47529),x=_(92750).Readable,L={objectMode:!0},C={clean:!0};function b(o){if(!(this instanceof b))return new b(o);this.options=o||{},this.options=w(C,o),this._inflights=new Map}b.prototype.put=function(o,s){return this._inflights.set(o.messageId,o),s&&s(),this},b.prototype.createStream=function(){const o=new x(L),s=[];let l=!1,E=0;return this._inflights.forEach(function(A,y){s.push(A)}),o._read=function(){!l&&E<s.length?this.push(s[E++]):this.push(null)},o.destroy=function(){if(l)return;const A=this;l=!0,setTimeout(function(){A.emit("close")},0)},o},b.prototype.del=function(o,s){return o=this._inflights.get(o.messageId),o?(this._inflights.delete(o.messageId),s(null,o)):s&&s(new Error("missing packet")),this},b.prototype.get=function(o,s){return o=this._inflights.get(o.messageId),o?s(null,o):s&&s(new Error("missing packet")),this},b.prototype.close=function(o){this.options.clean&&(this._inflights=null),o&&o()},Q.exports=b},26565:function(Q){"use strict";function Y(_){if(!(this instanceof Y))return new Y(_);this.aliasToTopic={},this.max=_}Y.prototype.put=function(_,w){return w===0||w>this.max?!1:(this.aliasToTopic[w]=_,this.length=Object.keys(this.aliasToTopic).length,!0)},Y.prototype.getTopicByAlias=function(_){return this.aliasToTopic[_]},Y.prototype.clear=function(){this.aliasToTopic={}},Q.exports=Y},73744:function(Q,Y,_){"use strict";const w=_(83938),x=_(70423).Q;function L(C){if(!(this instanceof L))return new L(C);C>0&&(this.aliasToTopic=new w({max:C}),this.topicToAlias={},this.numberAllocator=new x(1,C),this.max=C,this.length=0)}L.prototype.put=function(C,b){if(b===0||b>this.max)return!1;const o=this.aliasToTopic.get(b);return o&&delete this.topicToAlias[o],this.aliasToTopic.set(b,C),this.topicToAlias[C]=b,this.numberAllocator.use(b),this.length=this.aliasToTopic.length,!0},L.prototype.getTopicByAlias=function(C){return this.aliasToTopic.get(C)},L.prototype.getAliasByTopic=function(C){const b=this.topicToAlias[C];return typeof b!="undefined"&&this.aliasToTopic.get(b),b},L.prototype.clear=function(){this.aliasToTopic.reset(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0},L.prototype.getLruAlias=function(){const C=this.numberAllocator.firstVacant();return C||this.aliasToTopic.keys()[this.aliasToTopic.length-1]},Q.exports=L},4028:function(Q){"use strict";function Y(w){const x=w.split("/");for(let L=0;L<x.length;L++)if(x[L]!=="+"){if(x[L]==="#")return L===x.length-1;if(x[L].indexOf("+")!==-1||x[L].indexOf("#")!==-1)return!1}return!0}function _(w){if(w.length===0)return"empty_topic_list";for(let x=0;x<w.length;x++)if(!Y(w[x]))return w[x];return null}Q.exports={validateTopics:_}},83938:function(Q,Y,_){"use strict";const w=_(94462),x=Symbol("max"),L=Symbol("length"),C=Symbol("lengthCalculator"),b=Symbol("allowStale"),o=Symbol("maxAge"),s=Symbol("dispose"),l=Symbol("noDisposeOnSet"),E=Symbol("lruList"),A=Symbol("cache"),y=Symbol("updateAgeOnGet"),P=()=>1;class g{constructor(k){if(typeof k=="number"&&(k={max:k}),k||(k={}),k.max&&(typeof k.max!="number"||k.max<0))throw new TypeError("max must be a non-negative number");const X=this[x]=k.max||Infinity,W=k.length||P;if(this[C]=typeof W!="function"?P:W,this[b]=k.stale||!1,k.maxAge&&typeof k.maxAge!="number")throw new TypeError("maxAge must be a number");this[o]=k.maxAge||0,this[s]=k.dispose,this[l]=k.noDisposeOnSet||!1,this[y]=k.updateAgeOnGet||!1,this.reset()}set max(k){if(typeof k!="number"||k<0)throw new TypeError("max must be a non-negative number");this[x]=k||Infinity,T(this)}get max(){return this[x]}set allowStale(k){this[b]=!!k}get allowStale(){return this[b]}set maxAge(k){if(typeof k!="number")throw new TypeError("maxAge must be a non-negative number");this[o]=k,T(this)}get maxAge(){return this[o]}set lengthCalculator(k){typeof k!="function"&&(k=P),k!==this[C]&&(this[C]=k,this[L]=0,this[E].forEach(X=>{X.length=this[C](X.value,X.key),this[L]+=X.length})),T(this)}get lengthCalculator(){return this[C]}get length(){return this[L]}get itemCount(){return this[E].length}rforEach(k,X){X=X||this;for(let W=this[E].tail;W!==null;){const ie=W.prev;H(this,k,W,X),W=ie}}forEach(k,X){X=X||this;for(let W=this[E].head;W!==null;){const ie=W.next;H(this,k,W,X),W=ie}}keys(){return this[E].toArray().map(k=>k.key)}values(){return this[E].toArray().map(k=>k.value)}reset(){this[s]&&this[E]&&this[E].length&&this[E].forEach(k=>this[s](k.key,k.value)),this[A]=new Map,this[E]=new w,this[L]=0}dump(){return this[E].map(k=>S(this,k)?!1:{k:k.key,v:k.value,e:k.now+(k.maxAge||0)}).toArray().filter(k=>k)}dumpLru(){return this[E]}set(k,X,W){if(W=W||this[o],W&&typeof W!="number")throw new TypeError("maxAge must be a number");const ie=W?Date.now():0,q=this[C](X,k);if(this[A].has(k)){if(q>this[x])return U(this,this[A].get(k)),!1;const J=this[A].get(k).value;return this[s]&&(this[l]||this[s](k,J.value)),J.now=ie,J.maxAge=W,J.value=X,this[L]+=q-J.length,J.length=q,this.get(k),T(this),!0}const le=new N(k,X,q,ie,W);return le.length>this[x]?(this[s]&&this[s](k,X),!1):(this[L]+=le.length,this[E].unshift(le),this[A].set(k,this[E].head),T(this),!0)}has(k){if(!this[A].has(k))return!1;const X=this[A].get(k).value;return!S(this,X)}get(k){return v(this,k,!0)}peek(k){return v(this,k,!1)}pop(){const k=this[E].tail;return k?(U(this,k),k.value):null}del(k){U(this,this[A].get(k))}load(k){this.reset();const X=Date.now();for(let W=k.length-1;W>=0;W--){const ie=k[W],q=ie.e||0;if(q===0)this.set(ie.k,ie.v);else{const le=q-X;le>0&&this.set(ie.k,ie.v,le)}}}prune(){this[A].forEach((k,X)=>v(this,X,!1))}}const v=(V,k,X)=>{const W=V[A].get(k);if(W){const ie=W.value;if(S(V,ie)){if(U(V,W),!V[b])return}else X&&(V[y]&&(W.value.now=Date.now()),V[E].unshiftNode(W));return ie.value}},S=(V,k)=>{if(!k||!k.maxAge&&!V[o])return!1;const X=Date.now()-k.now;return k.maxAge?X>k.maxAge:V[o]&&X>V[o]},T=V=>{if(V[L]>V[x])for(let k=V[E].tail;V[L]>V[x]&&k!==null;){const X=k.prev;U(V,k),k=X}},U=(V,k)=>{if(k){const X=k.value;V[s]&&V[s](X.key,X.value),V[L]-=X.length,V[A].delete(X.key),V[E].removeNode(k)}};class N{constructor(k,X,W,ie,q){this.key=k,this.value=X,this.length=W,this.now=ie,this.maxAge=q||0}}const H=(V,k,X,W)=>{let ie=X.value;S(V,ie)&&(U(V,X),V[b]||(ie=void 0)),ie&&k.call(W,ie.value,ie.key,V)};Q.exports=g},99629:function(Q){"use strict";function Y(o,s){o.prototype=Object.create(s.prototype),o.prototype.constructor=o,o.__proto__=s}var _={};function w(o,s,l){l||(l=Error);function E(y,P,g){return typeof s=="string"?s:s(y,P,g)}var A=function(y){Y(P,y);function P(g,v,S){return y.call(this,E(g,v,S))||this}return P}(l);A.prototype.name=l.name,A.prototype.code=o,_[o]=A}function x(o,s){if(Array.isArray(o)){var l=o.length;return o=o.map(function(E){return String(E)}),l>2?"one of ".concat(s," ").concat(o.slice(0,l-1).join(", "),", or ")+o[l-1]:l===2?"one of ".concat(s," ").concat(o[0]," or ").concat(o[1]):"of ".concat(s," ").concat(o[0])}else return"of ".concat(s," ").concat(String(o))}function L(o,s,l){return o.substr(!l||l<0?0:+l,s.length)===s}function C(o,s,l){return(l===void 0||l>o.length)&&(l=o.length),o.substring(l-s.length,l)===s}function b(o,s,l){return typeof l!="number"&&(l=0),l+s.length>o.length?!1:o.indexOf(s,l)!==-1}w("ERR_INVALID_OPT_VALUE",function(o,s){return'The value "'+s+'" is invalid for option "'+o+'"'},TypeError),w("ERR_INVALID_ARG_TYPE",function(o,s,l){var E;typeof s=="string"&&L(s,"not ")?(E="must not be",s=s.replace(/^not /,"")):E="must be";var A;if(C(o," argument"))A="The ".concat(o," ").concat(E," ").concat(x(s,"type"));else{var y=b(o,".")?"property":"argument";A='The "'.concat(o,'" ').concat(y," ").concat(E," ").concat(x(s,"type"))}return A+=". Received type ".concat(typeof l),A},TypeError),w("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),w("ERR_METHOD_NOT_IMPLEMENTED",function(o){return"The "+o+" method is not implemented"}),w("ERR_STREAM_PREMATURE_CLOSE","Premature close"),w("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" after a stream was destroyed"}),w("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),w("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),w("ERR_STREAM_WRITE_AFTER_END","write after end"),w("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),w("ERR_UNKNOWN_ENCODING",function(o){return"Unknown encoding: "+o},TypeError),w("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Q.exports.q=_},48671:function(Q,Y,_){"use strict";var w=_(34155),x=Object.keys||function(y){var P=[];for(var g in y)P.push(g);return P};Q.exports=l;var L=_(54421),C=_(27497);_(35717)(l,L);for(var b=x(C.prototype),o=0;o<b.length;o++){var s=b[o];l.prototype[s]||(l.prototype[s]=C.prototype[s])}function l(y){if(!(this instanceof l))return new l(y);L.call(this,y),C.call(this,y),this.allowHalfOpen=!0,y&&(y.readable===!1&&(this.readable=!1),y.writable===!1&&(this.writable=!1),y.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",E)))}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function E(){this._writableState.ended||w.nextTick(A,this)}function A(y){y.end()}Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(P){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=P,this._writableState.destroyed=P)}})},41433:function(Q,Y,_){"use strict";Q.exports=x;var w=_(49022);_(35717)(x,w);function x(L){if(!(this instanceof x))return new x(L);w.call(this,L)}x.prototype._transform=function(L,C,b){b(null,L)}},54421:function(Q,Y,_){"use strict";var w=_(34155);Q.exports=J;var x;J.ReadableState=ne;var L=_(17187).EventEmitter,C=function(r,u){return r.listeners(u).length},b=_(97351),o=_(48764).Buffer,s=_.g.Uint8Array||function(){};function l(t){return o.from(t)}function E(t){return o.isBuffer(t)||t instanceof s}var A=_(82282),y;A&&A.debuglog?y=A.debuglog("stream"):y=function(){};var P=_(44488),g=_(77739),v=_(65322),S=v.getHighWaterMark,T=_(99629).q,U=T.ERR_INVALID_ARG_TYPE,N=T.ERR_STREAM_PUSH_AFTER_EOF,H=T.ERR_METHOD_NOT_IMPLEMENTED,V=T.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,k,X,W;_(35717)(J,b);var ie=g.errorOrDestroy,q=["error","close","destroy","pause","resume"];function le(t,r,u){if(typeof t.prependListener=="function")return t.prependListener(r,u);!t._events||!t._events[r]?t.on(r,u):Array.isArray(t._events[r])?t._events[r].unshift(u):t._events[r]=[u,t._events[r]]}function ne(t,r,u){x=x||_(48671),t=t||{},typeof u!="boolean"&&(u=r instanceof x),this.objectMode=!!t.objectMode,u&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=S(this,t,"readableHighWaterMark",u),this.buffer=new P,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(k||(k=_(32553).s),this.decoder=new k(t.encoding),this.encoding=t.encoding)}function J(t){if(x=x||_(48671),!(this instanceof J))return new J(t);var r=this instanceof x;this._readableState=new ne(t,this,r),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),b.call(this)}Object.defineProperty(J.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(r){!this._readableState||(this._readableState.destroyed=r)}}),J.prototype.destroy=g.destroy,J.prototype._undestroy=g.undestroy,J.prototype._destroy=function(t,r){r(t)},J.prototype.push=function(t,r){var u=this._readableState,a;return u.objectMode?a=!0:typeof t=="string"&&(r=r||u.defaultEncoding,r!==u.encoding&&(t=o.from(t,r),r=""),a=!0),z(this,t,r,!1,a)},J.prototype.unshift=function(t){return z(this,t,null,!0,!1)};function z(t,r,u,a,i){y("readableAddChunk",r);var n=t._readableState;if(r===null)n.reading=!1,oe(t,n);else{var e;if(i||(e=ee(n,r)),e)ie(t,e);else if(n.objectMode||r&&r.length>0)if(typeof r!="string"&&!n.objectMode&&Object.getPrototypeOf(r)!==o.prototype&&(r=l(r)),a)n.endEmitted?ie(t,new V):F(t,n,r,!0);else if(n.ended)ie(t,new N);else{if(n.destroyed)return!1;n.reading=!1,n.decoder&&!u?(r=n.decoder.write(r),n.objectMode||r.length!==0?F(t,n,r,!1):j(t,n)):F(t,n,r,!1)}else a||(n.reading=!1,j(t,n))}return!n.ended&&(n.length<n.highWaterMark||n.length===0)}function F(t,r,u,a){r.flowing&&r.length===0&&!r.sync?(r.awaitDrain=0,t.emit("data",u)):(r.length+=r.objectMode?1:u.length,a?r.buffer.unshift(u):r.buffer.push(u),r.needReadable&&$(t)),j(t,r)}function ee(t,r){var u;return!E(r)&&typeof r!="string"&&r!==void 0&&!t.objectMode&&(u=new U("chunk",["string","Buffer","Uint8Array"],r)),u}J.prototype.isPaused=function(){return this._readableState.flowing===!1},J.prototype.setEncoding=function(t){k||(k=_(32553).s);var r=new k(t);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var u=this._readableState.buffer.head,a="";u!==null;)a+=r.write(u.data),u=u.next;return this._readableState.buffer.clear(),a!==""&&this._readableState.buffer.push(a),this._readableState.length=a.length,this};var Z=1073741824;function fe(t){return t>=Z?t=Z:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function se(t,r){return t<=0||r.length===0&&r.ended?0:r.objectMode?1:t!==t?r.flowing&&r.length?r.buffer.head.data.length:r.length:(t>r.highWaterMark&&(r.highWaterMark=fe(t)),t<=r.length?t:r.ended?r.length:(r.needReadable=!0,0))}J.prototype.read=function(t){y("read",t),t=parseInt(t,10);var r=this._readableState,u=t;if(t!==0&&(r.emittedReadable=!1),t===0&&r.needReadable&&((r.highWaterMark!==0?r.length>=r.highWaterMark:r.length>0)||r.ended))return y("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?h(this):$(this),null;if(t=se(t,r),t===0&&r.ended)return r.length===0&&h(this),null;var a=r.needReadable;y("need readable",a),(r.length===0||r.length-t<r.highWaterMark)&&(a=!0,y("length less than watermark",a)),r.ended||r.reading?(a=!1,y("reading or ended",a)):a&&(y("do read"),r.reading=!0,r.sync=!0,r.length===0&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(t=se(u,r)));var i;return t>0?i=f(t,r):i=null,i===null?(r.needReadable=r.length<=r.highWaterMark,t=0):(r.length-=t,r.awaitDrain=0),r.length===0&&(r.ended||(r.needReadable=!0),u!==t&&r.ended&&h(this)),i!==null&&this.emit("data",i),i};function oe(t,r){if(y("onEofChunk"),!r.ended){if(r.decoder){var u=r.decoder.end();u&&u.length&&(r.buffer.push(u),r.length+=r.objectMode?1:u.length)}r.ended=!0,r.sync?$(t):(r.needReadable=!1,r.emittedReadable||(r.emittedReadable=!0,re(t)))}}function $(t){var r=t._readableState;y("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(y("emitReadable",r.flowing),r.emittedReadable=!0,w.nextTick(re,t))}function re(t){var r=t._readableState;y("emitReadable_",r.destroyed,r.length,r.ended),!r.destroyed&&(r.length||r.ended)&&(t.emit("readable"),r.emittedReadable=!1),r.needReadable=!r.flowing&&!r.ended&&r.length<=r.highWaterMark,d(t)}function j(t,r){r.readingMore||(r.readingMore=!0,w.nextTick(G,t,r))}function G(t,r){for(;!r.reading&&!r.ended&&(r.length<r.highWaterMark||r.flowing&&r.length===0);){var u=r.length;if(y("maybeReadMore read 0"),t.read(0),u===r.length)break}r.readingMore=!1}J.prototype._read=function(t){ie(this,new H("_read()"))},J.prototype.pipe=function(t,r){var u=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t);break}a.pipesCount+=1,y("pipe count=%d opts=%j",a.pipesCount,r);var i=(!r||r.end!==!1)&&t!==w.stdout&&t!==w.stderr,n=i?c:ce;a.endEmitted?w.nextTick(n):u.once("end",n),t.on("unpipe",e);function e(pe,ye){y("onunpipe"),pe===u&&ye&&ye.hasUnpiped===!1&&(ye.hasUnpiped=!0,te())}function c(){y("onend"),t.end()}var R=O(u);t.on("drain",R);var K=!1;function te(){y("cleanup"),t.removeListener("close",ue),t.removeListener("finish",de),t.removeListener("drain",R),t.removeListener("error",he),t.removeListener("unpipe",e),u.removeListener("end",c),u.removeListener("end",ce),u.removeListener("data",ae),K=!0,a.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&R()}u.on("data",ae);function ae(pe){y("ondata");var ye=t.write(pe);y("dest.write",ye),ye===!1&&((a.pipesCount===1&&a.pipes===t||a.pipesCount>1&&M(a.pipes,t)!==-1)&&!K&&(y("false write response, pause",a.awaitDrain),a.awaitDrain++),u.pause())}function he(pe){y("onerror",pe),ce(),t.removeListener("error",he),C(t,"error")===0&&ie(t,pe)}le(t,"error",he);function ue(){t.removeListener("finish",de),ce()}t.once("close",ue);function de(){y("onfinish"),t.removeListener("close",ue),ce()}t.once("finish",de);function ce(){y("unpipe"),u.unpipe(t)}return t.emit("pipe",u),a.flowing||(y("pipe resume"),u.resume()),t};function O(t){return function(){var u=t._readableState;y("pipeOnDrain",u.awaitDrain),u.awaitDrain&&u.awaitDrain--,u.awaitDrain===0&&C(t,"data")&&(u.flowing=!0,d(t))}}J.prototype.unpipe=function(t){var r=this._readableState,u={hasUnpiped:!1};if(r.pipesCount===0)return this;if(r.pipesCount===1)return t&&t!==r.pipes?this:(t||(t=r.pipes),r.pipes=null,r.pipesCount=0,r.flowing=!1,t&&t.emit("unpipe",this,u),this);if(!t){var a=r.pipes,i=r.pipesCount;r.pipes=null,r.pipesCount=0,r.flowing=!1;for(var n=0;n<i;n++)a[n].emit("unpipe",this,{hasUnpiped:!1});return this}var e=M(r.pipes,t);return e===-1?this:(r.pipes.splice(e,1),r.pipesCount-=1,r.pipesCount===1&&(r.pipes=r.pipes[0]),t.emit("unpipe",this,u),this)},J.prototype.on=function(t,r){var u=b.prototype.on.call(this,t,r),a=this._readableState;return t==="data"?(a.readableListening=this.listenerCount("readable")>0,a.flowing!==!1&&this.resume()):t==="readable"&&!a.endEmitted&&!a.readableListening&&(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,y("on readable",a.length,a.reading),a.length?$(this):a.reading||w.nextTick(m,this)),u},J.prototype.addListener=J.prototype.on,J.prototype.removeListener=function(t,r){var u=b.prototype.removeListener.call(this,t,r);return t==="readable"&&w.nextTick(D,this),u},J.prototype.removeAllListeners=function(t){var r=b.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&w.nextTick(D,this),r};function D(t){var r=t._readableState;r.readableListening=t.listenerCount("readable")>0,r.resumeScheduled&&!r.paused?r.flowing=!0:t.listenerCount("data")>0&&t.resume()}function m(t){y("readable nexttick read 0"),t.read(0)}J.prototype.resume=function(){var t=this._readableState;return t.flowing||(y("resume"),t.flowing=!t.readableListening,p(this,t)),t.paused=!1,this};function p(t,r){r.resumeScheduled||(r.resumeScheduled=!0,w.nextTick(B,t,r))}function B(t,r){y("resume",r.reading),r.reading||t.read(0),r.resumeScheduled=!1,t.emit("resume"),d(t),r.flowing&&!r.reading&&t.read(0)}J.prototype.pause=function(){return y("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(y("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function d(t){var r=t._readableState;for(y("flow",r.flowing);r.flowing&&t.read()!==null;);}J.prototype.wrap=function(t){var r=this,u=this._readableState,a=!1;t.on("end",function(){if(y("wrapped end"),u.decoder&&!u.ended){var e=u.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),t.on("data",function(e){if(y("wrapped data"),u.decoder&&(e=u.decoder.write(e)),!(u.objectMode&&e==null)&&!(!u.objectMode&&(!e||!e.length))){var c=r.push(e);c||(a=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=function(c){return function(){return t[c].apply(t,arguments)}}(i));for(var n=0;n<q.length;n++)t.on(q[n],this.emit.bind(this,q[n]));return this._read=function(e){y("wrapped _read",e),a&&(a=!1,t.resume())},this},typeof Symbol=="function"&&(J.prototype[Symbol.asyncIterator]=function(){return X===void 0&&(X=_(36936)),X(this)}),Object.defineProperty(J.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(J.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(J.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(r){this._readableState&&(this._readableState.flowing=r)}}),J._fromList=f,Object.defineProperty(J.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function f(t,r){if(r.length===0)return null;var u;return r.objectMode?u=r.buffer.shift():!t||t>=r.length?(r.decoder?u=r.buffer.join(""):r.buffer.length===1?u=r.buffer.first():u=r.buffer.concat(r.length),r.buffer.clear()):u=r.buffer.consume(t,r.decoder),u}function h(t){var r=t._readableState;y("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,w.nextTick(I,r,t))}function I(t,r){if(y("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,r.readable=!1,r.emit("end"),t.autoDestroy)){var u=r._writableState;(!u||u.autoDestroy&&u.finished)&&r.destroy()}}typeof Symbol=="function"&&(J.from=function(t,r){return W===void 0&&(W=_(33401)),W(J,t,r)});function M(t,r){for(var u=0,a=t.length;u<a;u++)if(t[u]===r)return u;return-1}},49022:function(Q,Y,_){"use strict";Q.exports=l;var w=_(99629).q,x=w.ERR_METHOD_NOT_IMPLEMENTED,L=w.ERR_MULTIPLE_CALLBACK,C=w.ERR_TRANSFORM_ALREADY_TRANSFORMING,b=w.ERR_TRANSFORM_WITH_LENGTH_0,o=_(48671);_(35717)(l,o);function s(y,P){var g=this._transformState;g.transforming=!1;var v=g.writecb;if(v===null)return this.emit("error",new L);g.writechunk=null,g.writecb=null,P!=null&&this.push(P),v(y);var S=this._readableState;S.reading=!1,(S.needReadable||S.length<S.highWaterMark)&&this._read(S.highWaterMark)}function l(y){if(!(this instanceof l))return new l(y);o.call(this,y),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,y&&(typeof y.transform=="function"&&(this._transform=y.transform),typeof y.flush=="function"&&(this._flush=y.flush)),this.on("prefinish",E)}function E(){var y=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(P,g){A(y,P,g)}):A(this,null,null)}l.prototype.push=function(y,P){return this._transformState.needTransform=!1,o.prototype.push.call(this,y,P)},l.prototype._transform=function(y,P,g){g(new x("_transform()"))},l.prototype._write=function(y,P,g){var v=this._transformState;if(v.writecb=g,v.writechunk=y,v.writeencoding=P,!v.transforming){var S=this._readableState;(v.needTransform||S.needReadable||S.length<S.highWaterMark)&&this._read(S.highWaterMark)}},l.prototype._read=function(y){var P=this._transformState;P.writechunk!==null&&!P.transforming?(P.transforming=!0,this._transform(P.writechunk,P.writeencoding,P.afterTransform)):P.needTransform=!0},l.prototype._destroy=function(y,P){o.prototype._destroy.call(this,y,function(g){P(g)})};function A(y,P,g){if(P)return y.emit("error",P);if(g!=null&&y.push(g),y._writableState.length)throw new b;if(y._transformState.transforming)throw new C;return y.push(null)}},27497:function(Q,Y,_){"use strict";var w=_(34155);Q.exports=ne;function x(d,f,h){this.chunk=d,this.encoding=f,this.callback=h,this.next=null}function L(d){var f=this;this.next=null,this.entry=null,this.finish=function(){B(f,d)}}var C;ne.WritableState=q;var b={deprecate:_(94927)},o=_(97351),s=_(48764).Buffer,l=_.g.Uint8Array||function(){};function E(d){return s.from(d)}function A(d){return s.isBuffer(d)||d instanceof l}var y=_(77739),P=_(65322),g=P.getHighWaterMark,v=_(99629).q,S=v.ERR_INVALID_ARG_TYPE,T=v.ERR_METHOD_NOT_IMPLEMENTED,U=v.ERR_MULTIPLE_CALLBACK,N=v.ERR_STREAM_CANNOT_PIPE,H=v.ERR_STREAM_DESTROYED,V=v.ERR_STREAM_NULL_VALUES,k=v.ERR_STREAM_WRITE_AFTER_END,X=v.ERR_UNKNOWN_ENCODING,W=y.errorOrDestroy;_(35717)(ne,o);function ie(){}function q(d,f,h){C=C||_(48671),d=d||{},typeof h!="boolean"&&(h=f instanceof C),this.objectMode=!!d.objectMode,h&&(this.objectMode=this.objectMode||!!d.writableObjectMode),this.highWaterMark=g(this,d,"writableHighWaterMark",h),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var I=d.decodeStrings===!1;this.decodeStrings=!I,this.defaultEncoding=d.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(M){oe(f,M)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=d.emitClose!==!1,this.autoDestroy=!!d.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new L(this)}q.prototype.getBuffer=function(){for(var f=this.bufferedRequest,h=[];f;)h.push(f),f=f.next;return h},function(){try{Object.defineProperty(q.prototype,"buffer",{get:b.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(d){}}();var le;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(le=Function.prototype[Symbol.hasInstance],Object.defineProperty(ne,Symbol.hasInstance,{value:function(f){return le.call(this,f)?!0:this!==ne?!1:f&&f._writableState instanceof q}})):le=function(f){return f instanceof this};function ne(d){C=C||_(48671);var f=this instanceof C;if(!f&&!le.call(ne,this))return new ne(d);this._writableState=new q(d,this,f),this.writable=!0,d&&(typeof d.write=="function"&&(this._write=d.write),typeof d.writev=="function"&&(this._writev=d.writev),typeof d.destroy=="function"&&(this._destroy=d.destroy),typeof d.final=="function"&&(this._final=d.final)),o.call(this)}ne.prototype.pipe=function(){W(this,new N)};function J(d,f){var h=new k;W(d,h),w.nextTick(f,h)}function z(d,f,h,I){var M;return h===null?M=new V:typeof h!="string"&&!f.objectMode&&(M=new S("chunk",["string","Buffer"],h)),M?(W(d,M),w.nextTick(I,M),!1):!0}ne.prototype.write=function(d,f,h){var I=this._writableState,M=!1,t=!I.objectMode&&A(d);return t&&!s.isBuffer(d)&&(d=E(d)),typeof f=="function"&&(h=f,f=null),t?f="buffer":f||(f=I.defaultEncoding),typeof h!="function"&&(h=ie),I.ending?J(this,h):(t||z(this,I,d,h))&&(I.pendingcb++,M=ee(this,I,t,d,f,h)),M},ne.prototype.cork=function(){this._writableState.corked++},ne.prototype.uncork=function(){var d=this._writableState;d.corked&&(d.corked--,!d.writing&&!d.corked&&!d.bufferProcessing&&d.bufferedRequest&&j(this,d))},ne.prototype.setDefaultEncoding=function(f){if(typeof f=="string"&&(f=f.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((f+"").toLowerCase())>-1))throw new X(f);return this._writableState.defaultEncoding=f,this},Object.defineProperty(ne.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function F(d,f,h){return!d.objectMode&&d.decodeStrings!==!1&&typeof f=="string"&&(f=s.from(f,h)),f}Object.defineProperty(ne.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ee(d,f,h,I,M,t){if(!h){var r=F(f,I,M);I!==r&&(h=!0,M="buffer",I=r)}var u=f.objectMode?1:I.length;f.length+=u;var a=f.length<f.highWaterMark;if(a||(f.needDrain=!0),f.writing||f.corked){var i=f.lastBufferedRequest;f.lastBufferedRequest={chunk:I,encoding:M,isBuf:h,callback:t,next:null},i?i.next=f.lastBufferedRequest:f.bufferedRequest=f.lastBufferedRequest,f.bufferedRequestCount+=1}else Z(d,f,!1,u,I,M,t);return a}function Z(d,f,h,I,M,t,r){f.writelen=I,f.writecb=r,f.writing=!0,f.sync=!0,f.destroyed?f.onwrite(new H("write")):h?d._writev(M,f.onwrite):d._write(M,t,f.onwrite),f.sync=!1}function fe(d,f,h,I,M){--f.pendingcb,h?(w.nextTick(M,I),w.nextTick(m,d,f),d._writableState.errorEmitted=!0,W(d,I)):(M(I),d._writableState.errorEmitted=!0,W(d,I),m(d,f))}function se(d){d.writing=!1,d.writecb=null,d.length-=d.writelen,d.writelen=0}function oe(d,f){var h=d._writableState,I=h.sync,M=h.writecb;if(typeof M!="function")throw new U;if(se(h),f)fe(d,h,I,f,M);else{var t=G(h)||d.destroyed;!t&&!h.corked&&!h.bufferProcessing&&h.bufferedRequest&&j(d,h),I?w.nextTick($,d,h,t,M):$(d,h,t,M)}}function $(d,f,h,I){h||re(d,f),f.pendingcb--,I(),m(d,f)}function re(d,f){f.length===0&&f.needDrain&&(f.needDrain=!1,d.emit("drain"))}function j(d,f){f.bufferProcessing=!0;var h=f.bufferedRequest;if(d._writev&&h&&h.next){var I=f.bufferedRequestCount,M=new Array(I),t=f.corkedRequestsFree;t.entry=h;for(var r=0,u=!0;h;)M[r]=h,h.isBuf||(u=!1),h=h.next,r+=1;M.allBuffers=u,Z(d,f,!0,f.length,M,"",t.finish),f.pendingcb++,f.lastBufferedRequest=null,t.next?(f.corkedRequestsFree=t.next,t.next=null):f.corkedRequestsFree=new L(f),f.bufferedRequestCount=0}else{for(;h;){var a=h.chunk,i=h.encoding,n=h.callback,e=f.objectMode?1:a.length;if(Z(d,f,!1,e,a,i,n),h=h.next,f.bufferedRequestCount--,f.writing)break}h===null&&(f.lastBufferedRequest=null)}f.bufferedRequest=h,f.bufferProcessing=!1}ne.prototype._write=function(d,f,h){h(new T("_write()"))},ne.prototype._writev=null,ne.prototype.end=function(d,f,h){var I=this._writableState;return typeof d=="function"?(h=d,d=null,f=null):typeof f=="function"&&(h=f,f=null),d!=null&&this.write(d,f),I.corked&&(I.corked=1,this.uncork()),I.ending||p(this,I,h),this},Object.defineProperty(ne.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function G(d){return d.ending&&d.length===0&&d.bufferedRequest===null&&!d.finished&&!d.writing}function O(d,f){d._final(function(h){f.pendingcb--,h&&W(d,h),f.prefinished=!0,d.emit("prefinish"),m(d,f)})}function D(d,f){!f.prefinished&&!f.finalCalled&&(typeof d._final=="function"&&!f.destroyed?(f.pendingcb++,f.finalCalled=!0,w.nextTick(O,d,f)):(f.prefinished=!0,d.emit("prefinish")))}function m(d,f){var h=G(f);if(h&&(D(d,f),f.pendingcb===0&&(f.finished=!0,d.emit("finish"),f.autoDestroy))){var I=d._readableState;(!I||I.autoDestroy&&I.endEmitted)&&d.destroy()}return h}function p(d,f,h){f.ending=!0,m(d,f),h&&(f.finished?w.nextTick(h):d.once("finish",h)),f.ended=!0,d.writable=!1}function B(d,f,h){var I=d.entry;for(d.entry=null;I;){var M=I.callback;f.pendingcb--,M(h),I=I.next}f.corkedRequestsFree.next=d}Object.defineProperty(ne.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(f){!this._writableState||(this._writableState.destroyed=f)}}),ne.prototype.destroy=y.destroy,ne.prototype._undestroy=y.undestroy,ne.prototype._destroy=function(d,f){f(d)}},36936:function(Q,Y,_){"use strict";var w=_(34155),x;function L(H,V,k){return V in H?Object.defineProperty(H,V,{value:k,enumerable:!0,configurable:!0,writable:!0}):H[V]=k,H}var C=_(59171),b=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),l=Symbol("ended"),E=Symbol("lastPromise"),A=Symbol("handlePromise"),y=Symbol("stream");function P(H,V){return{value:H,done:V}}function g(H){var V=H[b];if(V!==null){var k=H[y].read();k!==null&&(H[E]=null,H[b]=null,H[o]=null,V(P(k,!1)))}}function v(H){w.nextTick(g,H)}function S(H,V){return function(k,X){H.then(function(){if(V[l]){k(P(void 0,!0));return}V[A](k,X)},X)}}var T=Object.getPrototypeOf(function(){}),U=Object.setPrototypeOf((x={get stream(){return this[y]},next:function(){var V=this,k=this[s];if(k!==null)return Promise.reject(k);if(this[l])return Promise.resolve(P(void 0,!0));if(this[y].destroyed)return new Promise(function(q,le){w.nextTick(function(){V[s]?le(V[s]):q(P(void 0,!0))})});var X=this[E],W;if(X)W=new Promise(S(X,this));else{var ie=this[y].read();if(ie!==null)return Promise.resolve(P(ie,!1));W=new Promise(this[A])}return this[E]=W,W}},L(x,Symbol.asyncIterator,function(){return this}),L(x,"return",function(){var V=this;return new Promise(function(k,X){V[y].destroy(null,function(W){if(W){X(W);return}k(P(void 0,!0))})})}),x),T),N=function(V){var k,X=Object.create(U,(k={},L(k,y,{value:V,writable:!0}),L(k,b,{value:null,writable:!0}),L(k,o,{value:null,writable:!0}),L(k,s,{value:null,writable:!0}),L(k,l,{value:V._readableState.endEmitted,writable:!0}),L(k,A,{value:function(ie,q){var le=X[y].read();le?(X[E]=null,X[b]=null,X[o]=null,ie(P(le,!1))):(X[b]=ie,X[o]=q)},writable:!0}),k));return X[E]=null,C(V,function(W){if(W&&W.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ie=X[o];ie!==null&&(X[E]=null,X[b]=null,X[o]=null,ie(W)),X[s]=W;return}var q=X[b];q!==null&&(X[E]=null,X[b]=null,X[o]=null,q(P(void 0,!0))),X[l]=!0}),V.on("readable",v.bind(null,X)),X};Q.exports=N},44488:function(Q,Y,_){"use strict";function w(g,v){var S=Object.keys(g);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(g);v&&(T=T.filter(function(U){return Object.getOwnPropertyDescriptor(g,U).enumerable})),S.push.apply(S,T)}return S}function x(g){for(var v=1;v<arguments.length;v++){var S=arguments[v]!=null?arguments[v]:{};v%2?w(Object(S),!0).forEach(function(T){L(g,T,S[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(S)):w(Object(S)).forEach(function(T){Object.defineProperty(g,T,Object.getOwnPropertyDescriptor(S,T))})}return g}function L(g,v,S){return v in g?Object.defineProperty(g,v,{value:S,enumerable:!0,configurable:!0,writable:!0}):g[v]=S,g}function C(g,v){if(!(g instanceof v))throw new TypeError("Cannot call a class as a function")}function b(g,v){for(var S=0;S<v.length;S++){var T=v[S];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(g,T.key,T)}}function o(g,v,S){return v&&b(g.prototype,v),S&&b(g,S),g}var s=_(48764),l=s.Buffer,E=_(25313),A=E.inspect,y=A&&A.custom||"inspect";function P(g,v,S){l.prototype.copy.call(g,v,S)}Q.exports=function(){function g(){C(this,g),this.head=null,this.tail=null,this.length=0}return o(g,[{key:"push",value:function(S){var T={data:S,next:null};this.length>0?this.tail.next=T:this.head=T,this.tail=T,++this.length}},{key:"unshift",value:function(S){var T={data:S,next:this.head};this.length===0&&(this.tail=T),this.head=T,++this.length}},{key:"shift",value:function(){if(this.length!==0){var S=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,S}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(S){if(this.length===0)return"";for(var T=this.head,U=""+T.data;T=T.next;)U+=S+T.data;return U}},{key:"concat",value:function(S){if(this.length===0)return l.alloc(0);for(var T=l.allocUnsafe(S>>>0),U=this.head,N=0;U;)P(U.data,T,N),N+=U.data.length,U=U.next;return T}},{key:"consume",value:function(S,T){var U;return S<this.head.data.length?(U=this.head.data.slice(0,S),this.head.data=this.head.data.slice(S)):S===this.head.data.length?U=this.shift():U=T?this._getString(S):this._getBuffer(S),U}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(S){var T=this.head,U=1,N=T.data;for(S-=N.length;T=T.next;){var H=T.data,V=S>H.length?H.length:S;if(V===H.length?N+=H:N+=H.slice(0,S),S-=V,S===0){V===H.length?(++U,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=H.slice(V));break}++U}return this.length-=U,N}},{key:"_getBuffer",value:function(S){var T=l.allocUnsafe(S),U=this.head,N=1;for(U.data.copy(T),S-=U.data.length;U=U.next;){var H=U.data,V=S>H.length?H.length:S;if(H.copy(T,T.length-S,0,V),S-=V,S===0){V===H.length?(++N,U.next?this.head=U.next:this.head=this.tail=null):(this.head=U,U.data=H.slice(V));break}++N}return this.length-=N,T}},{key:y,value:function(S,T){return A(this,x({},T,{depth:0,customInspect:!1}))}}]),g}()},77739:function(Q,Y,_){"use strict";var w=_(34155);function x(l,E){var A=this,y=this._readableState&&this._readableState.destroyed,P=this._writableState&&this._writableState.destroyed;return y||P?(E?E(l):l&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,w.nextTick(o,this,l)):w.nextTick(o,this,l)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(g){!E&&g?A._writableState?A._writableState.errorEmitted?w.nextTick(C,A):(A._writableState.errorEmitted=!0,w.nextTick(L,A,g)):w.nextTick(L,A,g):E?(w.nextTick(C,A),E(g)):w.nextTick(C,A)}),this)}function L(l,E){o(l,E),C(l)}function C(l){l._writableState&&!l._writableState.emitClose||l._readableState&&!l._readableState.emitClose||l.emit("close")}function b(){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 o(l,E){l.emit("error",E)}function s(l,E){var A=l._readableState,y=l._writableState;A&&A.autoDestroy||y&&y.autoDestroy?l.destroy(E):l.emit("error",E)}Q.exports={destroy:x,undestroy:b,errorOrDestroy:s}},59171:function(Q,Y,_){"use strict";var w=_(99629).q.ERR_STREAM_PREMATURE_CLOSE;function x(o){var s=!1;return function(){if(!s){s=!0;for(var l=arguments.length,E=new Array(l),A=0;A<l;A++)E[A]=arguments[A];o.apply(this,E)}}}function L(){}function C(o){return o.setHeader&&typeof o.abort=="function"}function b(o,s,l){if(typeof s=="function")return b(o,null,s);s||(s={}),l=x(l||L);var E=s.readable||s.readable!==!1&&o.readable,A=s.writable||s.writable!==!1&&o.writable,y=function(){o.writable||g()},P=o._writableState&&o._writableState.finished,g=function(){A=!1,P=!0,E||l.call(o)},v=o._readableState&&o._readableState.endEmitted,S=function(){E=!1,v=!0,A||l.call(o)},T=function(V){l.call(o,V)},U=function(){var V;if(E&&!v)return(!o._readableState||!o._readableState.ended)&&(V=new w),l.call(o,V);if(A&&!P)return(!o._writableState||!o._writableState.ended)&&(V=new w),l.call(o,V)},N=function(){o.req.on("finish",g)};return C(o)?(o.on("complete",g),o.on("abort",U),o.req?N():o.on("request",N)):A&&!o._writableState&&(o.on("end",y),o.on("close",y)),o.on("end",S),o.on("finish",g),s.error!==!1&&o.on("error",T),o.on("close",U),function(){o.removeListener("complete",g),o.removeListener("abort",U),o.removeListener("request",N),o.req&&o.req.removeListener("finish",g),o.removeListener("end",y),o.removeListener("close",y),o.removeListener("finish",g),o.removeListener("end",S),o.removeListener("error",T),o.removeListener("close",U)}}Q.exports=b},33401:function(Q){Q.exports=function(){throw new Error("Readable.from is not available in the browser")}},70481:function(Q,Y,_){"use strict";var w;function x(g){var v=!1;return function(){v||(v=!0,g.apply(void 0,arguments))}}var L=_(99629).q,C=L.ERR_MISSING_ARGS,b=L.ERR_STREAM_DESTROYED;function o(g){if(g)throw g}function s(g){return g.setHeader&&typeof g.abort=="function"}function l(g,v,S,T){T=x(T);var U=!1;g.on("close",function(){U=!0}),w===void 0&&(w=_(59171)),w(g,{readable:v,writable:S},function(H){if(H)return T(H);U=!0,T()});var N=!1;return function(H){if(!U&&!N){if(N=!0,s(g))return g.abort();if(typeof g.destroy=="function")return g.destroy();T(H||new b("pipe"))}}}function E(g){g()}function A(g,v){return g.pipe(v)}function y(g){return!g.length||typeof g[g.length-1]!="function"?o:g.pop()}function P(){for(var g=arguments.length,v=new Array(g),S=0;S<g;S++)v[S]=arguments[S];var T=y(v);if(Array.isArray(v[0])&&(v=v[0]),v.length<2)throw new C("streams");var U,N=v.map(function(H,V){var k=V<v.length-1,X=V>0;return l(H,k,X,function(W){U||(U=W),W&&N.forEach(E),!k&&(N.forEach(E),T(U))})});return v.reduce(A)}Q.exports=P},65322:function(Q,Y,_){"use strict";var w=_(99629).q.ERR_INVALID_OPT_VALUE;function x(C,b,o){return C.highWaterMark!=null?C.highWaterMark:b?C[o]:null}function L(C,b,o,s){var l=x(b,s,o);if(l!=null){if(!(isFinite(l)&&Math.floor(l)===l)||l<0){var E=s?o:"highWaterMark";throw new w(E,l)}return Math.floor(l)}return C.objectMode?16:16*1024}Q.exports={getHighWaterMark:L}},97351:function(Q,Y,_){Q.exports=_(17187).EventEmitter},92750:function(Q,Y,_){Y=Q.exports=_(54421),Y.Stream=Y,Y.Readable=Y,Y.Writable=_(27497),Y.Duplex=_(48671),Y.Transform=_(49022),Y.PassThrough=_(41433),Y.finished=_(59171),Y.pipeline=_(70481)},15124:function(Q){"use strict";Q.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},73641:function(Q){"use strict";Q.exports=function(Y){Y.prototype[Symbol.iterator]=function*(){for(let _=this.head;_;_=_.next)yield _.value}}},94462:function(Q,Y,_){"use strict";Q.exports=w,w.Node=b,w.create=w;function w(o){var s=this;if(s instanceof w||(s=new w),s.tail=null,s.head=null,s.length=0,o&&typeof o.forEach=="function")o.forEach(function(A){s.push(A)});else if(arguments.length>0)for(var l=0,E=arguments.length;l<E;l++)s.push(arguments[l]);return s}w.prototype.removeNode=function(o){if(o.list!==this)throw new Error("removing node which does not belong to this list");var s=o.next,l=o.prev;return s&&(s.prev=l),l&&(l.next=s),o===this.head&&(this.head=s),o===this.tail&&(this.tail=l),o.list.length--,o.next=null,o.prev=null,o.list=null,s},w.prototype.unshiftNode=function(o){if(o!==this.head){o.list&&o.list.removeNode(o);var s=this.head;o.list=this,o.next=s,s&&(s.prev=o),this.head=o,this.tail||(this.tail=o),this.length++}},w.prototype.pushNode=function(o){if(o!==this.tail){o.list&&o.list.removeNode(o);var s=this.tail;o.list=this,o.prev=s,s&&(s.next=o),this.tail=o,this.head||(this.head=o),this.length++}},w.prototype.push=function(){for(var o=0,s=arguments.length;o<s;o++)L(this,arguments[o]);return this.length},w.prototype.unshift=function(){for(var o=0,s=arguments.length;o<s;o++)C(this,arguments[o]);return this.length},w.prototype.pop=function(){if(!!this.tail){var o=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,o}},w.prototype.shift=function(){if(!!this.head){var o=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,o}},w.prototype.forEach=function(o,s){s=s||this;for(var l=this.head,E=0;l!==null;E++)o.call(s,l.value,E,this),l=l.next},w.prototype.forEachReverse=function(o,s){s=s||this;for(var l=this.tail,E=this.length-1;l!==null;E--)o.call(s,l.value,E,this),l=l.prev},w.prototype.get=function(o){for(var s=0,l=this.head;l!==null&&s<o;s++)l=l.next;if(s===o&&l!==null)return l.value},w.prototype.getReverse=function(o){for(var s=0,l=this.tail;l!==null&&s<o;s++)l=l.prev;if(s===o&&l!==null)return l.value},w.prototype.map=function(o,s){s=s||this;for(var l=new w,E=this.head;E!==null;)l.push(o.call(s,E.value,this)),E=E.next;return l},w.prototype.mapReverse=function(o,s){s=s||this;for(var l=new w,E=this.tail;E!==null;)l.push(o.call(s,E.value,this)),E=E.prev;return l},w.prototype.reduce=function(o,s){var l,E=this.head;if(arguments.length>1)l=s;else if(this.head)E=this.head.next,l=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var A=0;E!==null;A++)l=o(l,E.value,A),E=E.next;return l},w.prototype.reduceReverse=function(o,s){var l,E=this.tail;if(arguments.length>1)l=s;else if(this.tail)E=this.tail.prev,l=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var A=this.length-1;E!==null;A--)l=o(l,E.value,A),E=E.prev;return l},w.prototype.toArray=function(){for(var o=new Array(this.length),s=0,l=this.head;l!==null;s++)o[s]=l.value,l=l.next;return o},w.prototype.toArrayReverse=function(){for(var o=new Array(this.length),s=0,l=this.tail;l!==null;s++)o[s]=l.value,l=l.prev;return o},w.prototype.slice=function(o,s){s=s||this.length,s<0&&(s+=this.length),o=o||0,o<0&&(o+=this.length);var l=new w;if(s<o||s<0)return l;o<0&&(o=0),s>this.length&&(s=this.length);for(var E=0,A=this.head;A!==null&&E<o;E++)A=A.next;for(;A!==null&&E<s;E++,A=A.next)l.push(A.value);return l},w.prototype.sliceReverse=function(o,s){s=s||this.length,s<0&&(s+=this.length),o=o||0,o<0&&(o+=this.length);var l=new w;if(s<o||s<0)return l;o<0&&(o=0),s>this.length&&(s=this.length);for(var E=this.length,A=this.tail;A!==null&&E>s;E--)A=A.prev;for(;A!==null&&E>o;E--,A=A.prev)l.push(A.value);return l},w.prototype.splice=function(o,s,...l){o>this.length&&(o=this.length-1),o<0&&(o=this.length+o);for(var E=0,A=this.head;A!==null&&E<o;E++)A=A.next;for(var y=[],E=0;A&&E<s;E++)y.push(A.value),A=this.removeNode(A);A===null&&(A=this.tail),A!==this.head&&A!==this.tail&&(A=A.prev);for(var E=0;E<l.length;E++)A=x(this,A,l[E]);return y},w.prototype.reverse=function(){for(var o=this.head,s=this.tail,l=o;l!==null;l=l.prev){var E=l.prev;l.prev=l.next,l.next=E}return this.head=s,this.tail=o,this};function x(o,s,l){var E=s===o.head?new b(l,null,s,o):new b(l,s,s.next,o);return E.next===null&&(o.tail=E),E.prev===null&&(o.head=E),o.length++,E}function L(o,s){o.tail=new b(s,o.tail,null,o),o.head||(o.head=o.tail),o.length++}function C(o,s){o.head=new b(s,null,o.head,o),o.tail||(o.tail=o.head),o.length++}function b(o,s,l,E){if(!(this instanceof b))return new b(o,s,l,E);this.list=E,this.value=o,s?(s.next=this,this.prev=s):this.prev=null,l?(l.prev=this,this.next=l):this.next=null}try{_(73641)(w)}catch(o){}},57824:function(Q){var Y=1e3,_=Y*60,w=_*60,x=w*24,L=x*7,C=x*365.25;Q.exports=function(E,A){A=A||{};var y=typeof E;if(y==="string"&&E.length>0)return b(E);if(y==="number"&&isFinite(E))return A.long?s(E):o(E);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(E))};function b(E){if(E=String(E),!(E.length>100)){var A=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(E);if(!!A){var y=parseFloat(A[1]),P=(A[2]||"ms").toLowerCase();switch(P){case"years":case"year":case"yrs":case"yr":case"y":return y*C;case"weeks":case"week":case"w":return y*L;case"days":case"day":case"d":return y*x;case"hours":case"hour":case"hrs":case"hr":case"h":return y*w;case"minutes":case"minute":case"mins":case"min":case"m":return y*_;case"seconds":case"second":case"secs":case"sec":case"s":return y*Y;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return y;default:return}}}}function o(E){var A=Math.abs(E);return A>=x?Math.round(E/x)+"d":A>=w?Math.round(E/w)+"h":A>=_?Math.round(E/_)+"m":A>=Y?Math.round(E/Y)+"s":E+"ms"}function s(E){var A=Math.abs(E);return A>=x?l(E,A,x,"day"):A>=w?l(E,A,w,"hour"):A>=_?l(E,A,_,"minute"):A>=Y?l(E,A,Y,"second"):E+" ms"}function l(E,A,y,P){var g=A>=y*1.5;return Math.round(E/y)+" "+P+(g?"s":"")}},70423:function(Q,Y,_){const w=_(29759);Q.exports.Q=w},29759:function(Q,Y,_){"use strict";const w=_(89246).l4,x=_(13129)("number-allocator:trace"),L=_(13129)("number-allocator:error");function C(o,s){this.low=o,this.high=s}C.prototype.equals=function(o){return this.low===o.low&&this.high===o.high},C.prototype.compare=function(o){return this.low<o.low&&this.high<o.low?-1:o.low<this.low&&o.high<this.low?1:0};function b(o,s){if(!(this instanceof b))return new b(o,s);this.min=o,this.max=s,this.ss=new w([],(l,E)=>l.compare(E)),x("Create"),this.clear()}b.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low},b.prototype.alloc=function(){if(this.ss.size()===0)return x("alloc():empty"),null;const o=this.ss.front(),s=o.low;return s+1<=o.high?++o.low:this.ss.eraseElementByPos(0),x("alloc():"+s),s},b.prototype.use=function(o){const s=new C(o,o),l=this.ss.lowerBound(s);if(l){if(l.equals(s))return this.ss.eraseElementByValue(l),x("use():"+o),!0;if(l.low>o)return!1;if(l.low===o)return++l.low,x("use():"+o),!0;if(l.high===o)return--l.high,x("use():"+o),!0;const E=l.low;return l.low=o+1,this.ss.insert(new C(E,o-1)),x("use():"+o),!0}return x("use():failed"),!1},b.prototype.free=function(o){if(o<this.min||o>this.max){L("free():"+o+" is out of range");return}const s=new C(o,o),l=this.ss.lowerBound(s);if(l){if(l.low<=o&&o<=l.high){L("free():"+o+" has already been vacant");return}if(l===this.ss.front())o+1===l.low?--l.low:this.ss.insert(s);else{const E=this.ss.reverseLowerBound(s);E.high+1===o?o+1===l.low?(this.ss.eraseElementByValue(E),l.low=E.low):E.high=o:o+1===l.low?l.low=o:this.ss.insert(s)}}else{if(l===this.ss.front()){this.ss.insert(s);return}const E=this.ss.reverseLowerBound(s);E.high+1===o?E.high=o:this.ss.insert(s)}x("free():"+o)},b.prototype.clear=function(){x("clear()"),this.ss.clear(),this.ss.insert(new C(this.min,this.max))},b.prototype.intervalCount=function(){return this.ss.size()},b.prototype.dump=function(){console.log("length:"+this.ss.size());for(const o of this.ss)console.log(o)},Q.exports=b},30778:function(Q,Y,_){var w=_(52479);Q.exports=w(x),Q.exports.strict=w(L),x.proto=x(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return x(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return L(this)},configurable:!0})});function x(C){var b=function(){return b.called?b.value:(b.called=!0,b.value=C.apply(this,arguments))};return b.called=!1,b}function L(C){var b=function(){if(b.called)throw new Error(b.onceError);return b.called=!0,b.value=C.apply(this,arguments)},o=C.name||"Function wrapped with `once`";return b.onceError=o+" shouldn't be called more than once",b.called=!1,b}},88212:function(Q,Y,_){"use strict";var w=_(34155);typeof w=="undefined"||!w.version||w.version.indexOf("v0.")===0||w.version.indexOf("v1.")===0&&w.version.indexOf("v1.8.")!==0?Q.exports={nextTick:x}:Q.exports=w;function x(L,C,b,o){if(typeof L!="function")throw new TypeError('"callback" argument must be a function');var s=arguments.length,l,E;switch(s){case 0:case 1:return w.nextTick(L);case 2:return w.nextTick(function(){L.call(null,C)});case 3:return w.nextTick(function(){L.call(null,C,b)});case 4:return w.nextTick(function(){L.call(null,C,b,o)});default:for(l=new Array(s-1),E=0;E<l.length;)l[E++]=arguments[E];return w.nextTick(function(){L.apply(null,l)})}}},45408:function(Q){"use strict";function Y(w,x,L){var C=this;this._callback=w,this._args=L,this._interval=setInterval(w,x,this._args),this.reschedule=function(b){b||(b=C._interval),C._interval&&clearInterval(C._interval),C._interval=setInterval(C._callback,b,C._args)},this.clear=function(){C._interval&&(clearInterval(C._interval),C._interval=void 0)},this.destroy=function(){C._interval&&clearInterval(C._interval),C._callback=void 0,C._interval=void 0,C._args=void 0}}function _(){if(typeof arguments[0]!="function")throw new Error("callback needed");if(typeof arguments[1]!="number")throw new Error("interval needed");var w;if(arguments.length>0){w=new Array(arguments.length-2);for(var x=0;x<w.length;x++)w[x]=arguments[x+2]}return new Y(arguments[0],arguments[1],w)}Q.exports=_},1697:function(Q,Y,_){"use strict";Q.exports=_(43188)()},43188:function(Q,Y,_){"use strict";var w=_(48764).Buffer;Q.exports=L;function x(b){return b instanceof w?w.from(b):new b.constructor(b.buffer.slice(),b.byteOffset,b.length)}function L(b){if(b=b||{},b.circles)return C(b);return b.proto?l:s;function o(E,A){for(var y=Object.keys(E),P=new Array(y.length),g=0;g<y.length;g++){var v=y[g],S=E[v];typeof S!="object"||S===null?P[v]=S:S instanceof Date?P[v]=new Date(S):ArrayBuffer.isView(S)?P[v]=x(S):P[v]=A(S)}return P}function s(E){if(typeof E!="object"||E===null)return E;if(E instanceof Date)return new Date(E);if(Array.isArray(E))return o(E,s);if(E instanceof Map)return new Map(o(Array.from(E),s));if(E instanceof Set)return new Set(o(Array.from(E),s));var A={};for(var y in E)if(Object.hasOwnProperty.call(E,y)!==!1){var P=E[y];typeof P!="object"||P===null?A[y]=P:P instanceof Date?A[y]=new Date(P):P instanceof Map?A[y]=new Map(o(Array.from(P),s)):P instanceof Set?A[y]=new Set(o(Array.from(P),s)):ArrayBuffer.isView(P)?A[y]=x(P):A[y]=s(P)}return A}function l(E){if(typeof E!="object"||E===null)return E;if(E instanceof Date)return new Date(E);if(Array.isArray(E))return o(E,l);if(E instanceof Map)return new Map(o(Array.from(E),l));if(E instanceof Set)return new Set(o(Array.from(E),l));var A={};for(var y in E){var P=E[y];typeof P!="object"||P===null?A[y]=P:P instanceof Date?A[y]=new Date(P):P instanceof Map?A[y]=new Map(o(Array.from(P),l)):P instanceof Set?A[y]=new Set(o(Array.from(P),l)):ArrayBuffer.isView(P)?A[y]=x(P):A[y]=l(P)}return A}}function C(b){var o=[],s=[];return b.proto?A:E;function l(y,P){for(var g=Object.keys(y),v=new Array(g.length),S=0;S<g.length;S++){var T=g[S],U=y[T];if(typeof U!="object"||U===null)v[T]=U;else if(U instanceof Date)v[T]=new Date(U);else if(ArrayBuffer.isView(U))v[T]=x(U);else{var N=o.indexOf(U);N!==-1?v[T]=s[N]:v[T]=P(U)}}return v}function E(y){if(typeof y!="object"||y===null)return y;if(y instanceof Date)return new Date(y);if(Array.isArray(y))return l(y,E);if(y instanceof Map)return new Map(l(Array.from(y),E));if(y instanceof Set)return new Set(l(Array.from(y),E));var P={};o.push(y),s.push(P);for(var g in y)if(Object.hasOwnProperty.call(y,g)!==!1){var v=y[g];if(typeof v!="object"||v===null)P[g]=v;else if(v instanceof Date)P[g]=new Date(v);else if(v instanceof Map)P[g]=new Map(l(Array.from(v),E));else if(v instanceof Set)P[g]=new Set(l(Array.from(v),E));else if(ArrayBuffer.isView(v))P[g]=x(v);else{var S=o.indexOf(v);S!==-1?P[g]=s[S]:P[g]=E(v)}}return o.pop(),s.pop(),P}function A(y){if(typeof y!="object"||y===null)return y;if(y instanceof Date)return new Date(y);if(Array.isArray(y))return l(y,A);if(y instanceof Map)return new Map(l(Array.from(y),A));if(y instanceof Set)return new Set(l(Array.from(y),A));var P={};o.push(y),s.push(P);for(var g in y){var v=y[g];if(typeof v!="object"||v===null)P[g]=v;else if(v instanceof Date)P[g]=new Date(v);else if(v instanceof Map)P[g]=new Map(l(Array.from(v),A));else if(v instanceof Set)P[g]=new Set(l(Array.from(v),A));else if(ArrayBuffer.isView(v))P[g]=x(v);else{var S=o.indexOf(v);S!==-1?P[g]=s[S]:P[g]=A(v)}}return o.pop(),s.pop(),P}}},31852:function(Q){Q.exports=Y;function Y(w){var x=w._readableState;return x?x.objectMode||typeof w._duplexState=="number"?w.read():w.read(_(x)):null}function _(w){return w.buffer.length?w.buffer.head?w.buffer.head.data.length:w.buffer[0].length:w.length}},32553:function(Q,Y,_){"use strict";var w=_(40396).Buffer,x=w.isEncoding||function(N){switch(N=""+N,N&&N.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 L(N){if(!N)return"utf8";for(var H;;)switch(N){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 N;default:if(H)return;N=(""+N).toLowerCase(),H=!0}}function C(N){var H=L(N);if(typeof H!="string"&&(w.isEncoding===x||!x(N)))throw new Error("Unknown encoding: "+N);return H||N}Y.s=b;function b(N){this.encoding=C(N);var H;switch(this.encoding){case"utf16le":this.text=P,this.end=g,H=4;break;case"utf8":this.fillLast=E,H=4;break;case"base64":this.text=v,this.end=S,H=3;break;default:this.write=T,this.end=U;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=w.allocUnsafe(H)}b.prototype.write=function(N){if(N.length===0)return"";var H,V;if(this.lastNeed){if(H=this.fillLast(N),H===void 0)return"";V=this.lastNeed,this.lastNeed=0}else V=0;return V<N.length?H?H+this.text(N,V):this.text(N,V):H||""},b.prototype.end=y,b.prototype.text=A,b.prototype.fillLast=function(N){if(this.lastNeed<=N.length)return N.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);N.copy(this.lastChar,this.lastTotal-this.lastNeed,0,N.length),this.lastNeed-=N.length};function o(N){return N<=127?0:N>>5==6?2:N>>4==14?3:N>>3==30?4:N>>6==2?-1:-2}function s(N,H,V){var k=H.length-1;if(k<V)return 0;var X=o(H[k]);return X>=0?(X>0&&(N.lastNeed=X-1),X):--k<V||X===-2?0:(X=o(H[k]),X>=0?(X>0&&(N.lastNeed=X-2),X):--k<V||X===-2?0:(X=o(H[k]),X>=0?(X>0&&(X===2?X=0:N.lastNeed=X-3),X):0))}function l(N,H,V){if((H[0]&192)!=128)return N.lastNeed=0,"\uFFFD";if(N.lastNeed>1&&H.length>1){if((H[1]&192)!=128)return N.lastNeed=1,"\uFFFD";if(N.lastNeed>2&&H.length>2&&(H[2]&192)!=128)return N.lastNeed=2,"\uFFFD"}}function E(N){var H=this.lastTotal-this.lastNeed,V=l(this,N,H);if(V!==void 0)return V;if(this.lastNeed<=N.length)return N.copy(this.lastChar,H,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);N.copy(this.lastChar,H,0,N.length),this.lastNeed-=N.length}function A(N,H){var V=s(this,N,H);if(!this.lastNeed)return N.toString("utf8",H);this.lastTotal=V;var k=N.length-(V-this.lastNeed);return N.copy(this.lastChar,0,k),N.toString("utf8",H,k)}function y(N){var H=N&&N.length?this.write(N):"";return this.lastNeed?H+"\uFFFD":H}function P(N,H){if((N.length-H)%2==0){var V=N.toString("utf16le",H);if(V){var k=V.charCodeAt(V.length-1);if(k>=55296&&k<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=N[N.length-2],this.lastChar[1]=N[N.length-1],V.slice(0,-1)}return V}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=N[N.length-1],N.toString("utf16le",H,N.length-1)}function g(N){var H=N&&N.length?this.write(N):"";if(this.lastNeed){var V=this.lastTotal-this.lastNeed;return H+this.lastChar.toString("utf16le",0,V)}return H}function v(N,H){var V=(N.length-H)%3;return V===0?N.toString("base64",H):(this.lastNeed=3-V,this.lastTotal=3,V===1?this.lastChar[0]=N[N.length-1]:(this.lastChar[0]=N[N.length-2],this.lastChar[1]=N[N.length-1]),N.toString("base64",H,N.length-V))}function S(N){var H=N&&N.length?this.write(N):"";return this.lastNeed?H+this.lastChar.toString("base64",0,3-this.lastNeed):H}function T(N){return N.toString(this.encoding)}function U(N){return N&&N.length?this.write(N):""}},40396:function(Q,Y,_){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var w=_(48764),x=w.Buffer;function L(b,o){for(var s in b)o[s]=b[s]}x.from&&x.alloc&&x.allocUnsafe&&x.allocUnsafeSlow?Q.exports=w:(L(w,Y),Y.Buffer=C);function C(b,o,s){return x(b,o,s)}C.prototype=Object.create(x.prototype),L(x,C),C.from=function(b,o,s){if(typeof b=="number")throw new TypeError("Argument must not be a number");return x(b,o,s)},C.alloc=function(b,o,s){if(typeof b!="number")throw new TypeError("Argument must be a number");var l=x(b);return o!==void 0?typeof s=="string"?l.fill(o,s):l.fill(o):l.fill(0),l},C.allocUnsafe=function(b){if(typeof b!="number")throw new TypeError("Argument must be a number");return x(b)},C.allocUnsafeSlow=function(b){if(typeof b!="number")throw new TypeError("Argument must be a number");return w.SlowBuffer(b)}},52511:function(Q,Y,_){Q=_.nmd(Q);var w;/*! https://mths.be/punycode v1.3.2 by @mathias */(function(x){var L=Y&&!Y.nodeType&&Y,C=Q&&!Q.nodeType&&Q,b=typeof _.g=="object"&&_.g;(b.global===b||b.window===b||b.self===b)&&(x=b);var o,s=2147483647,l=36,E=1,A=26,y=38,P=700,g=72,v=128,S="-",T=/^xn--/,U=/[^\x20-\x7E]/,N=/[\x2E\u3002\uFF0E\uFF61]/g,H={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},V=l-E,k=Math.floor,X=String.fromCharCode,W;function ie($){throw RangeError(H[$])}function q($,re){for(var j=$.length,G=[];j--;)G[j]=re($[j]);return G}function le($,re){var j=$.split("@"),G="";j.length>1&&(G=j[0]+"@",$=j[1]),$=$.replace(N,".");var O=$.split("."),D=q(O,re).join(".");return G+D}function ne($){for(var re=[],j=0,G=$.length,O,D;j<G;)O=$.charCodeAt(j++),O>=55296&&O<=56319&&j<G?(D=$.charCodeAt(j++),(D&64512)==56320?re.push(((O&1023)<<10)+(D&1023)+65536):(re.push(O),j--)):re.push(O);return re}function J($){return q($,function(re){var j="";return re>65535&&(re-=65536,j+=X(re>>>10&1023|55296),re=56320|re&1023),j+=X(re),j}).join("")}function z($){return $-48<10?$-22:$-65<26?$-65:$-97<26?$-97:l}function F($,re){return $+22+75*($<26)-((re!=0)<<5)}function ee($,re,j){var G=0;for($=j?k($/P):$>>1,$+=k($/re);$>V*A>>1;G+=l)$=k($/V);return k(G+(V+1)*$/($+y))}function Z($){var re=[],j=$.length,G,O=0,D=v,m=g,p,B,d,f,h,I,M,t,r;for(p=$.lastIndexOf(S),p<0&&(p=0),B=0;B<p;++B)$.charCodeAt(B)>=128&&ie("not-basic"),re.push($.charCodeAt(B));for(d=p>0?p+1:0;d<j;){for(f=O,h=1,I=l;d>=j&&ie("invalid-input"),M=z($.charCodeAt(d++)),(M>=l||M>k((s-O)/h))&&ie("overflow"),O+=M*h,t=I<=m?E:I>=m+A?A:I-m,!(M<t);I+=l)r=l-t,h>k(s/r)&&ie("overflow"),h*=r;G=re.length+1,m=ee(O-f,G,f==0),k(O/G)>s-D&&ie("overflow"),D+=k(O/G),O%=G,re.splice(O++,0,D)}return J(re)}function fe($){var re,j,G,O,D,m,p,B,d,f,h,I=[],M,t,r,u;for($=ne($),M=$.length,re=v,j=0,D=g,m=0;m<M;++m)h=$[m],h<128&&I.push(X(h));for(G=O=I.length,O&&I.push(S);G<M;){for(p=s,m=0;m<M;++m)h=$[m],h>=re&&h<p&&(p=h);for(t=G+1,p-re>k((s-j)/t)&&ie("overflow"),j+=(p-re)*t,re=p,m=0;m<M;++m)if(h=$[m],h<re&&++j>s&&ie("overflow"),h==re){for(B=j,d=l;f=d<=D?E:d>=D+A?A:d-D,!(B<f);d+=l)u=B-f,r=l-f,I.push(X(F(f+u%r,0))),B=k(u/r);I.push(X(F(B,0))),D=ee(j,t,G==O),j=0,++G}++j,++re}return I.join("")}function se($){return le($,function(re){return T.test(re)?Z(re.slice(4).toLowerCase()):re})}function oe($){return le($,function(re){return U.test(re)?"xn--"+fe(re):re})}o={version:"1.3.2",ucs2:{decode:ne,encode:J},decode:Z,encode:fe,toASCII:oe,toUnicode:se},w=function(){return o}.call(Y,_,Y,Q),w!==void 0&&(Q.exports=w)})(this)},27225:function(Q){"use strict";function Y(_,w){return Object.prototype.hasOwnProperty.call(_,w)}Q.exports=function(_,w,x,L){w=w||"&",x=x||"=";var C={};if(typeof _!="string"||_.length===0)return C;var b=/\+/g;_=_.split(w);var o=1e3;L&&typeof L.maxKeys=="number"&&(o=L.maxKeys);var s=_.length;o>0&&s>o&&(s=o);for(var l=0;l<s;++l){var E=_[l].replace(b,"%20"),A=E.indexOf(x),y,P,g,v;A>=0?(y=E.substr(0,A),P=E.substr(A+1)):(y=E,P=""),g=decodeURIComponent(y),v=decodeURIComponent(P),Y(C,g)?Array.isArray(C[g])?C[g].push(v):C[g]=[C[g],v]:C[g]=v}return C}},44066:function(Q){"use strict";var Y=function(_){switch(typeof _){case"string":return _;case"boolean":return _?"true":"false";case"number":return isFinite(_)?_:"";default:return""}};Q.exports=function(_,w,x,L){return w=w||"&",x=x||"=",_===null&&(_=void 0),typeof _=="object"?Object.keys(_).map(function(C){var b=encodeURIComponent(Y(C))+x;return Array.isArray(_[C])?_[C].map(function(o){return b+encodeURIComponent(Y(o))}).join(w):b+encodeURIComponent(Y(_[C]))}).join(w):L?encodeURIComponent(Y(L))+x+encodeURIComponent(Y(_)):""}},36254:function(Q,Y,_){"use strict";Y.decode=Y.parse=_(27225),Y.encode=Y.stringify=_(44066)},8575:function(Q,Y,_){"use strict";var w=_(52511),x=_(62502);Y.parse=H,Y.resolve=k,Y.resolveObject=X,Y.format=V,Y.Url=L;function L(){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 C=/^([a-z0-9.+-]+:)/i,b=/:[0-9]*$/,o=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,s=["<",">",'"',"`"," ","\r",`
`," "],l=["{","}","|","\\","^","`"].concat(s),E=["'"].concat(l),A=["%","/","?",";","#"].concat(E),y=["/","?","#"],P=255,g=/^[+a-z0-9A-Z_-]{0,63}$/,v=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,S={javascript:!0,"javascript:":!0},T={javascript:!0,"javascript:":!0},U={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},N=_(36254);function H(W,ie,q){if(W&&x.isObject(W)&&W instanceof L)return W;var le=new L;return le.parse(W,ie,q),le}L.prototype.parse=function(W,ie,q){if(!x.isString(W))throw new TypeError("Parameter 'url' must be a string, not "+typeof W);var le=W.indexOf("?"),ne=le!==-1&&le<W.indexOf("#")?"?":"#",J=W.split(ne),z=/\\/g;J[0]=J[0].replace(z,"/"),W=J.join(ne);var F=W;if(F=F.trim(),!q&&W.split("#").length===1){var ee=o.exec(F);if(ee)return this.path=F,this.href=F,this.pathname=ee[1],ee[2]?(this.search=ee[2],ie?this.query=N.parse(this.search.substr(1)):this.query=this.search.substr(1)):ie&&(this.search="",this.query={}),this}var Z=C.exec(F);if(Z){Z=Z[0];var fe=Z.toLowerCase();this.protocol=fe,F=F.substr(Z.length)}if(q||Z||F.match(/^\/\/[^@\/]+@[^@\/]+/)){var se=F.substr(0,2)==="//";se&&!(Z&&T[Z])&&(F=F.substr(2),this.slashes=!0)}if(!T[Z]&&(se||Z&&!U[Z])){for(var oe=-1,$=0;$<y.length;$++){var re=F.indexOf(y[$]);re!==-1&&(oe===-1||re<oe)&&(oe=re)}var j,G;oe===-1?G=F.lastIndexOf("@"):G=F.lastIndexOf("@",oe),G!==-1&&(j=F.slice(0,G),F=F.slice(G+1),this.auth=decodeURIComponent(j)),oe=-1;for(var $=0;$<A.length;$++){var re=F.indexOf(A[$]);re!==-1&&(oe===-1||re<oe)&&(oe=re)}oe===-1&&(oe=F.length),this.host=F.slice(0,oe),F=F.slice(oe),this.parseHost(),this.hostname=this.hostname||"";var O=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!O)for(var D=this.hostname.split(/\./),$=0,m=D.length;$<m;$++){var p=D[$];if(!!p&&!p.match(g)){for(var B="",d=0,f=p.length;d<f;d++)p.charCodeAt(d)>127?B+="x":B+=p[d];if(!B.match(g)){var h=D.slice(0,$),I=D.slice($+1),M=p.match(v);M&&(h.push(M[1]),I.unshift(M[2])),I.length&&(F="/"+I.join(".")+F),this.hostname=h.join(".");break}}}this.hostname.length>P?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=w.toASCII(this.hostname));var t=this.port?":"+this.port:"",r=this.hostname||"";this.host=r+t,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),F[0]!=="/"&&(F="/"+F))}if(!S[fe])for(var $=0,m=E.length;$<m;$++){var u=E[$];if(F.indexOf(u)!==-1){var a=encodeURIComponent(u);a===u&&(a=escape(u)),F=F.split(u).join(a)}}var i=F.indexOf("#");i!==-1&&(this.hash=F.substr(i),F=F.slice(0,i));var n=F.indexOf("?");if(n!==-1?(this.search=F.substr(n),this.query=F.substr(n+1),ie&&(this.query=N.parse(this.query)),F=F.slice(0,n)):ie&&(this.search="",this.query={}),F&&(this.pathname=F),U[fe]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var t=this.pathname||"",e=this.search||"";this.path=t+e}return this.href=this.format(),this};function V(W){return x.isString(W)&&(W=H(W)),W instanceof L?W.format():L.prototype.format.call(W)}L.prototype.format=function(){var W=this.auth||"";W&&(W=encodeURIComponent(W),W=W.replace(/%3A/i,":"),W+="@");var ie=this.protocol||"",q=this.pathname||"",le=this.hash||"",ne=!1,J="";this.host?ne=W+this.host:this.hostname&&(ne=W+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(ne+=":"+this.port)),this.query&&x.isObject(this.query)&&Object.keys(this.query).length&&(J=N.stringify(this.query));var z=this.search||J&&"?"+J||"";return ie&&ie.substr(-1)!==":"&&(ie+=":"),this.slashes||(!ie||U[ie])&&ne!==!1?(ne="//"+(ne||""),q&&q.charAt(0)!=="/"&&(q="/"+q)):ne||(ne=""),le&&le.charAt(0)!=="#"&&(le="#"+le),z&&z.charAt(0)!=="?"&&(z="?"+z),q=q.replace(/[?#]/g,function(F){return encodeURIComponent(F)}),z=z.replace("#","%23"),ie+ne+q+z+le};function k(W,ie){return H(W,!1,!0).resolve(ie)}L.prototype.resolve=function(W){return this.resolveObject(H(W,!1,!0)).format()};function X(W,ie){return W?H(W,!1,!0).resolveObject(ie):ie}L.prototype.resolveObject=function(W){if(x.isString(W)){var ie=new L;ie.parse(W,!1,!0),W=ie}for(var q=new L,le=Object.keys(this),ne=0;ne<le.length;ne++){var J=le[ne];q[J]=this[J]}if(q.hash=W.hash,W.href==="")return q.href=q.format(),q;if(W.slashes&&!W.protocol){for(var z=Object.keys(W),F=0;F<z.length;F++){var ee=z[F];ee!=="protocol"&&(q[ee]=W[ee])}return U[q.protocol]&&q.hostname&&!q.pathname&&(q.path=q.pathname="/"),q.href=q.format(),q}if(W.protocol&&W.protocol!==q.protocol){if(!U[W.protocol]){for(var Z=Object.keys(W),fe=0;fe<Z.length;fe++){var se=Z[fe];q[se]=W[se]}return q.href=q.format(),q}if(q.protocol=W.protocol,!W.host&&!T[W.protocol]){for(var m=(W.pathname||"").split("/");m.length&&!(W.host=m.shift()););W.host||(W.host=""),W.hostname||(W.hostname=""),m[0]!==""&&m.unshift(""),m.length<2&&m.unshift(""),q.pathname=m.join("/")}else q.pathname=W.pathname;if(q.search=W.search,q.query=W.query,q.host=W.host||"",q.auth=W.auth,q.hostname=W.hostname||W.host,q.port=W.port,q.pathname||q.search){var oe=q.pathname||"",$=q.search||"";q.path=oe+$}return q.slashes=q.slashes||W.slashes,q.href=q.format(),q}var re=q.pathname&&q.pathname.charAt(0)==="/",j=W.host||W.pathname&&W.pathname.charAt(0)==="/",G=j||re||q.host&&W.pathname,O=G,D=q.pathname&&q.pathname.split("/")||[],m=W.pathname&&W.pathname.split("/")||[],p=q.protocol&&!U[q.protocol];if(p&&(q.hostname="",q.port=null,q.host&&(D[0]===""?D[0]=q.host:D.unshift(q.host)),q.host="",W.protocol&&(W.hostname=null,W.port=null,W.host&&(m[0]===""?m[0]=W.host:m.unshift(W.host)),W.host=null),G=G&&(m[0]===""||D[0]==="")),j)q.host=W.host||W.host===""?W.host:q.host,q.hostname=W.hostname||W.hostname===""?W.hostname:q.hostname,q.search=W.search,q.query=W.query,D=m;else if(m.length)D||(D=[]),D.pop(),D=D.concat(m),q.search=W.search,q.query=W.query;else if(!x.isNullOrUndefined(W.search)){if(p){q.hostname=q.host=D.shift();var B=q.host&&q.host.indexOf("@")>0?q.host.split("@"):!1;B&&(q.auth=B.shift(),q.host=q.hostname=B.shift())}return q.search=W.search,q.query=W.query,(!x.isNull(q.pathname)||!x.isNull(q.search))&&(q.path=(q.pathname?q.pathname:"")+(q.search?q.search:"")),q.href=q.format(),q}if(!D.length)return q.pathname=null,q.search?q.path="/"+q.search:q.path=null,q.href=q.format(),q;for(var d=D.slice(-1)[0],f=(q.host||W.host||D.length>1)&&(d==="."||d==="..")||d==="",h=0,I=D.length;I>=0;I--)d=D[I],d==="."?D.splice(I,1):d===".."?(D.splice(I,1),h++):h&&(D.splice(I,1),h--);if(!G&&!O)for(;h--;h)D.unshift("..");G&&D[0]!==""&&(!D[0]||D[0].charAt(0)!=="/")&&D.unshift(""),f&&D.join("/").substr(-1)!=="/"&&D.push("");var M=D[0]===""||D[0]&&D[0].charAt(0)==="/";if(p){q.hostname=q.host=M?"":D.length?D.shift():"";var B=q.host&&q.host.indexOf("@")>0?q.host.split("@"):!1;B&&(q.auth=B.shift(),q.host=q.hostname=B.shift())}return G=G||q.host&&D.length,G&&!M&&D.unshift(""),D.length?q.pathname=D.join("/"):(q.pathname=null,q.path=null),(!x.isNull(q.pathname)||!x.isNull(q.search))&&(q.path=(q.pathname?q.pathname:"")+(q.search?q.search:"")),q.auth=W.auth||q.auth,q.slashes=q.slashes||W.slashes,q.href=q.format(),q},L.prototype.parseHost=function(){var W=this.host,ie=b.exec(W);ie&&(ie=ie[0],ie!==":"&&(this.port=ie.substr(1)),W=W.substr(0,W.length-ie.length)),W&&(this.hostname=W)}},62502:function(Q){"use strict";Q.exports={isString:function(Y){return typeof Y=="string"},isObject:function(Y){return typeof Y=="object"&&Y!==null},isNull:function(Y){return Y===null},isNullOrUndefined:function(Y){return Y==null}}},94927:function(Q,Y,_){Q.exports=w;function w(L,C){if(x("noDeprecation"))return L;var b=!1;function o(){if(!b){if(x("throwDeprecation"))throw new Error(C);x("traceDeprecation")?console.trace(C):console.warn(C),b=!0}return L.apply(this,arguments)}return o}function x(L){try{if(!_.g.localStorage)return!1}catch(b){return!1}var C=_.g.localStorage[L];return C==null?!1:String(C).toLowerCase()==="true"}},52479:function(Q){Q.exports=Y;function Y(_,w){if(_&&w)return Y(_)(w);if(typeof _!="function")throw new TypeError("need wrapper function");return Object.keys(_).forEach(function(L){x[L]=_[L]}),x;function x(){for(var L=new Array(arguments.length),C=0;C<L.length;C++)L[C]=arguments[C];var b=_.apply(this,L),o=L[L.length-1];return typeof b=="function"&&b!==o&&Object.keys(o).forEach(function(s){b[s]=o[s]}),b}}},47529:function(Q){Q.exports=_;var Y=Object.prototype.hasOwnProperty;function _(){for(var w={},x=0;x<arguments.length;x++){var L=arguments[x];for(var C in L)Y.call(L,C)&&(w[C]=L[C])}return w}}}]);