mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-10 00:40:30 +08:00
0c56a3e599
Made-with: Cursor Former-commit-id: 571c9a99ee26d90505e550c287eb8ad8d743ff8d
9 lines
255 KiB
JavaScript
9 lines
255 KiB
JavaScript
(window["webpackJsonp_security-control"]=window["webpackJsonp_security-control"]||[]).push([["chunk-92af1348"],{"05ee":function(t,e,n){"use strict";var r=n(8),i=n("34eb")("mqttjs:tcp");function o(t,e){var n,o;return e.port=e.port||1883,e.hostname=e.hostname||e.host||"localhost",n=e.port,o=e.hostname,i("port %d and host %s",n,o),r.createConnection(n,o)}t.exports=o},"06a2":function(t,e,n){"use strict";var r,i=n("a671"),o=n("2031"),s=n("1a94"),a=n("96ae"),u=n("f508"),c=n("986b"),l=n("1c4a"),f=Object.defineProperty,h=Object.defineProperties;t.exports=r=function(t,e){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");h(this,{__list__:u("w",a(t)),__context__:u("w",e),__nextIndex__:u("w",0)}),e&&(s(e.on),e.on("_add",this._onAdd),e.on("_delete",this._onDelete),e.on("_clear",this._onClear))},delete r.prototype.constructor,h(r.prototype,o({_next:u((function(){var t;if(this.__list__)return this.__redo__&&(t=this.__redo__.shift(),void 0!==t)?t:this.__nextIndex__<this.__list__.length?this.__nextIndex__++:void this._unBind()})),next:u((function(){return this._createResult(this._next())})),_createResult:u((function(t){return void 0===t?{done:!0,value:void 0}:{done:!1,value:this._resolve(t)}})),_resolve:u((function(t){return this.__list__[t]})),_unBind:u((function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off("_add",this._onAdd),this.__context__.off("_delete",this._onDelete),this.__context__.off("_clear",this._onClear),this.__context__=null)})),toString:u((function(){return"[object "+(this[l.toStringTag]||"Object")+"]"}))},c({_onAdd:u((function(t){t>=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(e,n){e>=t&&(this.__redo__[n]=++e)}),this),this.__redo__.push(t)):f(this,"__redo__",u("c",[t])))})),_onDelete:u((function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(e=this.__redo__.indexOf(t),-1!==e&&this.__redo__.splice(e,1),this.__redo__.forEach((function(e,n){e>t&&(this.__redo__[n]=--e)}),this)))})),_onClear:u((function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0}))}))),f(r.prototype,l.iterator,u((function(){return this})))},"09d9":function(t,e,n){"use strict";var r,i=n("e0f6"),o=n("f508"),s=n("1c4a"),a=n("06a2"),u=Object.defineProperty;r=t.exports=function(t){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");t=String(t),a.call(this,t),u(this,"__length__",o("",t.length))},i&&i(r,a),delete r.prototype.constructor,r.prototype=Object.create(a.prototype,{_next:o((function(){if(this.__list__)return this.__nextIndex__<this.__length__?this.__nextIndex__++:void this._unBind()})),_resolve:o((function(t){var e,n=this.__list__[t];return this.__nextIndex__===this.__length__?n:(e=n.charCodeAt(0),e>=55296&&e<=56319?n+this.__list__[this.__nextIndex__++]:n)}))}),u(r.prototype,s.toStringTag,o("c","String Iterator"))},"0b16":function(t,e,n){"use strict";var r=n("1985"),i=n("35e8");function o(){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}e.parse=w,e.resolve=k,e.resolveObject=E,e.format=S,e.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["<",">",'"',"`"," ","\r","\n","\t"],l=["{","}","|","\\","^","`"].concat(c),f=["'"].concat(l),h=["%","/","?",";","#"].concat(f),p=["/","?","#"],d=255,_=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=n("b383");function w(t,e,n){if(t&&i.isObject(t)&&t instanceof o)return t;var r=new o;return r.parse(t,e,n),r}function S(t){return i.isString(t)&&(t=w(t)),t instanceof o?t.format():o.prototype.format.call(t)}function k(t,e){return w(t,!1,!0).resolve(e)}function E(t,e){return t?w(t,!1,!0).resolveObject(e):e}o.prototype.parse=function(t,e,n){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),a=-1!==o&&o<t.indexOf("#")?"?":"#",c=t.split(a),l=/\\/g;c[0]=c[0].replace(l,"/"),t=c.join(a);var w=t;if(w=w.trim(),!n&&1===t.split("#").length){var S=u.exec(w);if(S)return this.path=w,this.href=w,this.pathname=S[1],S[2]?(this.search=S[2],this.query=e?m.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var k=s.exec(w);if(k){k=k[0];var E=k.toLowerCase();this.protocol=E,w=w.substr(k.length)}if(n||k||w.match(/^\/\/[^@\/]+@[^@\/]+/)){var x="//"===w.substr(0,2);!x||k&&v[k]||(w=w.substr(2),this.slashes=!0)}if(!v[k]&&(x||k&&!y[k])){for(var O,I,C=-1,R=0;R<p.length;R++){var j=w.indexOf(p[R]);-1!==j&&(-1===C||j<C)&&(C=j)}I=-1===C?w.lastIndexOf("@"):w.lastIndexOf("@",C),-1!==I&&(O=w.slice(0,I),w=w.slice(I+1),this.auth=decodeURIComponent(O)),C=-1;for(R=0;R<h.length;R++){j=w.indexOf(h[R]);-1!==j&&(-1===C||j<C)&&(C=j)}-1===C&&(C=w.length),this.host=w.slice(0,C),w=w.slice(C),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var T=this.hostname.split(/\./),P=(R=0,T.length);R<P;R++){var M=T[R];if(M&&!M.match(_)){for(var L="",N=0,B=M.length;N<B;N++)M.charCodeAt(N)>127?L+="x":L+=M[N];if(!L.match(_)){var U=T.slice(0,R),D=T.slice(R+1),q=M.match(g);q&&(U.push(q[1]),D.unshift(q[2])),D.length&&(w="/"+D.join(".")+w),this.hostname=U.join(".");break}}}this.hostname.length>d?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=r.toASCII(this.hostname));var F=this.port?":"+this.port:"",W=this.hostname||"";this.host=W+F,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==w[0]&&(w="/"+w))}if(!b[E])for(R=0,P=f.length;R<P;R++){var V=f[R];if(-1!==w.indexOf(V)){var z=encodeURIComponent(V);z===V&&(z=escape(V)),w=w.split(V).join(z)}}var H=w.indexOf("#");-1!==H&&(this.hash=w.substr(H),w=w.slice(0,H));var K=w.indexOf("?");if(-1!==K?(this.search=w.substr(K),this.query=w.substr(K+1),e&&(this.query=m.parse(this.query)),w=w.slice(0,K)):e&&(this.search="",this.query={}),w&&(this.pathname=w),y[E]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var $=this.search||"";this.path=F+$}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,s="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=m.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||y[e])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),n=n.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})),a=a.replace("#","%23"),e+o+n+a+r},o.prototype.resolve=function(t){return this.resolveObject(w(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(i.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var n=new o,r=Object.keys(this),s=0;s<r.length;s++){var a=r[s];n[a]=this[a]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var u=Object.keys(t),c=0;c<u.length;c++){var l=u[c];"protocol"!==l&&(n[l]=t[l])}return y[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!y[t.protocol]){for(var f=Object.keys(t),h=0;h<f.length;h++){var p=f[h];n[p]=t[p]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||v[t.protocol])n.pathname=t.pathname;else{var d=(t.pathname||"").split("/");while(d.length&&!(t.host=d.shift()));t.host||(t.host=""),t.hostname||(t.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),n.pathname=d.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var _=n.pathname||"",g=n.search||"";n.path=_+g}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var b=n.pathname&&"/"===n.pathname.charAt(0),m=t.host||t.pathname&&"/"===t.pathname.charAt(0),w=m||b||n.host&&t.pathname,S=w,k=n.pathname&&n.pathname.split("/")||[],E=(d=t.pathname&&t.pathname.split("/")||[],n.protocol&&!y[n.protocol]);if(E&&(n.hostname="",n.port=null,n.host&&(""===k[0]?k[0]=n.host:k.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===d[0]?d[0]=t.host:d.unshift(t.host)),t.host=null),w=w&&(""===d[0]||""===k[0])),m)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,k=d;else if(d.length)k||(k=[]),k.pop(),k=k.concat(d),n.search=t.search,n.query=t.query;else if(!i.isNullOrUndefined(t.search)){if(E){n.hostname=n.host=k.shift();var x=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");x&&(n.auth=x.shift(),n.host=n.hostname=x.shift())}return n.search=t.search,n.query=t.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!k.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var O=k.slice(-1)[0],I=(n.host||t.host||k.length>1)&&("."===O||".."===O)||""===O,C=0,R=k.length;R>=0;R--)O=k[R],"."===O?k.splice(R,1):".."===O?(k.splice(R,1),C++):C&&(k.splice(R,1),C--);if(!w&&!S)for(;C--;C)k.unshift("..");!w||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),I&&"/"!==k.join("/").substr(-1)&&k.push("");var j=""===k[0]||k[0]&&"/"===k[0].charAt(0);if(E){n.hostname=n.host=j?"":k.length?k.shift():"";x=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");x&&(n.auth=x.shift(),n.host=n.hostname=x.shift())}return w=w||n.host&&k.length,w&&!j&&k.unshift(""),k.length?n.pathname=k.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},"0b24":function(t,e,n){"use strict";var r,i=n("a671"),o=n("3527"),s=n("e0f6"),a=n("1a94"),u=n("96ae"),c=n("f508"),l=n("c9fc"),f=n("1c4a"),h=n("3473"),p=n("c351"),d=n("1195"),_=n("b779"),g=Function.prototype.call,b=Object.defineProperties,v=Object.getPrototypeOf;t.exports=r=function(){var t,e,n,i=arguments[0];if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");return n=_&&s&&Map!==r?s(new Map,v(this)):this,null!=i&&h(i),b(n,{__mapKeysData__:c("c",t=[]),__mapValuesData__:c("c",e=[])}),i?(p(i,(function(n){var r=u(n)[0];n=n[1],-1===o.call(t,r)&&(t.push(r),e.push(n))}),n),n):n},_&&(s&&s(r,Map),r.prototype=Object.create(Map.prototype,{constructor:c(r)})),l(b(r.prototype,{clear:c((function(){this.__mapKeysData__.length&&(i.call(this.__mapKeysData__),i.call(this.__mapValuesData__),this.emit("_clear"))})),delete:c((function(t){var e=o.call(this.__mapKeysData__,t);return-1!==e&&(this.__mapKeysData__.splice(e,1),this.__mapValuesData__.splice(e,1),this.emit("_delete",e,t),!0)})),entries:c((function(){return new d(this,"key+value")})),forEach:c((function(t){var e,n,r=arguments[1];a(t),e=this.entries(),n=e._next();while(void 0!==n)g.call(t,r,this.__mapValuesData__[n],this.__mapKeysData__[n],this),n=e._next()})),get:c((function(t){var e=o.call(this.__mapKeysData__,t);if(-1!==e)return this.__mapValuesData__[e]})),has:c((function(t){return-1!==o.call(this.__mapKeysData__,t)})),keys:c((function(){return new d(this,"key")})),set:c((function(t,e){var n,r=o.call(this.__mapKeysData__,t);return-1===r&&(r=this.__mapKeysData__.push(t)-1,n=!0),this.__mapValuesData__[r]=e,n&&this.emit("_add",r,t),this})),size:c.gs((function(){return this.__mapKeysData__.length})),values:c((function(){return new d(this,"value")})),toString:c((function(){return"[object Map]"}))})),Object.defineProperty(r.prototype,f.iterator,c((function(){return this.entries()}))),Object.defineProperty(r.prototype,f.toStringTag,c("c","Map"))},"0e8b":function(t,e,n){"use strict";(function(e,r){var i;t.exports=R,R.ReadableState=C;n("faa1").EventEmitter;var o=function(t,e){return t.listeners(e).length},s=n("b98b"),a=n("1c35").Buffer,u=e.Uint8Array||function(){};function c(t){return a.from(t)}function l(t){return a.isBuffer(t)||t instanceof u}var f,h=n(6);f=h&&h.debuglog?h.debuglog("stream"):function(){};var p,d,_,g=n("e937"),b=n("f482"),v=n("86c6"),y=v.getHighWaterMark,m=n("9bfc").codes,w=m.ERR_INVALID_ARG_TYPE,S=m.ERR_STREAM_PUSH_AFTER_EOF,k=m.ERR_METHOD_NOT_IMPLEMENTED,E=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n("3fb5")(R,s);var x=b.errorOrDestroy,O=["error","close","destroy","pause","resume"];function I(t,e,n){if("function"===typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}function C(t,e,r){i=i||n("a493"),t=t||{},"boolean"!==typeof r&&(r=e instanceof i),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=y(this,t,"readableHighWaterMark",r),this.buffer=new g,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=!1!==t.emitClose,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&&(p||(p=n("7d72").StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function R(t){if(i=i||n("a493"),!(this instanceof R))return new R(t);var e=this instanceof i;this._readableState=new C(t,this,e),this.readable=!0,t&&("function"===typeof t.read&&(this._read=t.read),"function"===typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function j(t,e,n,r,i){f("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,N(t,s);else if(i||(o=T(s,e)),o)x(t,o);else if(s.objectMode||e&&e.length>0)if("string"===typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=c(e)),r)s.endEmitted?x(t,new E):A(t,s,e,!0);else if(s.ended)x(t,new S);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!n?(e=s.decoder.write(e),s.objectMode||0!==e.length?A(t,s,e,!1):D(t,s)):A(t,s,e,!1)}else r||(s.reading=!1,D(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function A(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",n)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&B(t)),D(t,e)}function T(t,e){var n;return l(e)||"string"===typeof e||void 0===e||t.objectMode||(n=new w("chunk",["string","Buffer","Uint8Array"],e)),n}Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),R.prototype.destroy=b.destroy,R.prototype._undestroy=b.undestroy,R.prototype._destroy=function(t,e){e(t)},R.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"===typeof t&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=a.from(t,e),e=""),n=!0),j(this,t,e,!1,n)},R.prototype.unshift=function(t){return j(this,t,null,!0,!1)},R.prototype.isPaused=function(){return!1===this._readableState.flowing},R.prototype.setEncoding=function(t){p||(p=n("7d72").StringDecoder);var e=new p(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;var r=this._readableState.buffer.head,i="";while(null!==r)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var P=1073741824;function M(t){return t>=P?t=P:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function L(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=M(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function N(t,e){if(f("onEofChunk"),!e.ended){if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,e.sync?B(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,U(t)))}}function B(t){var e=t._readableState;f("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(f("emitReadable",e.flowing),e.emittedReadable=!0,r.nextTick(U,t))}function U(t){var e=t._readableState;f("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,K(t)}function D(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(q,t,e))}function q(t,e){while(!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length)){var n=e.length;if(f("maybeReadMore read 0"),t.read(0),n===e.length)break}e.readingMore=!1}function F(t){return function(){var e=t._readableState;f("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,K(t))}}function W(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function V(t){f("readable nexttick read 0"),t.read(0)}function z(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(H,t,e))}function H(t,e){f("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),K(t),e.flowing&&!e.reading&&t.read(0)}function K(t){var e=t._readableState;f("flow",e.flowing);while(e.flowing&&null!==t.read());}function $(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n);var n}function Q(t){var e=t._readableState;f("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(G,e,t))}function G(t,e){if(f("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var n=e._writableState;(!n||n.autoDestroy&&n.finished)&&e.destroy()}}function Z(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}R.prototype.read=function(t){f("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return f("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?Q(this):B(this),null;if(t=L(t,e),0===t&&e.ended)return 0===e.length&&Q(this),null;var r,i=e.needReadable;return f("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&(i=!0,f("length less than watermark",i)),e.ended||e.reading?(i=!1,f("reading or ended",i)):i&&(f("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=L(n,e))),r=t>0?$(t,e):null,null===r?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&Q(this)),null!==r&&this.emit("data",r),r},R.prototype._read=function(t){x(this,new k("_read()"))},R.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,f("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr,a=s?c:v;function u(t,e){f("onunpipe"),t===n&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,p())}function c(){f("onend"),t.end()}i.endEmitted?r.nextTick(a):n.once("end",a),t.on("unpipe",u);var l=F(n);t.on("drain",l);var h=!1;function p(){f("cleanup"),t.removeListener("close",g),t.removeListener("finish",b),t.removeListener("drain",l),t.removeListener("error",_),t.removeListener("unpipe",u),n.removeListener("end",c),n.removeListener("end",v),n.removeListener("data",d),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||l()}function d(e){f("ondata");var r=t.write(e);f("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==Z(i.pipes,t))&&!h&&(f("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function _(e){f("onerror",e),v(),t.removeListener("error",_),0===o(t,"error")&&x(t,e)}function g(){t.removeListener("finish",b),v()}function b(){f("onfinish"),t.removeListener("close",g),v()}function v(){f("unpipe"),n.unpipe(t)}return n.on("data",d),I(t,"error",_),t.once("close",g),t.once("finish",b),t.emit("pipe",n),i.flowing||(f("pipe resume"),n.resume()),t},R.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=Z(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n)),this},R.prototype.on=function(t,e){var n=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,f("on readable",i.length,i.reading),i.length?B(this):i.reading||r.nextTick(V,this))),n},R.prototype.addListener=R.prototype.on,R.prototype.removeListener=function(t,e){var n=s.prototype.removeListener.call(this,t,e);return"readable"===t&&r.nextTick(W,this),n},R.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||r.nextTick(W,this),e},R.prototype.resume=function(){var t=this._readableState;return t.flowing||(f("resume"),t.flowing=!t.readableListening,z(this,t)),t.paused=!1,this},R.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},R.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(f("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){if(f("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=e.push(i);o||(r=!0,t.pause())}})),t)void 0===this[i]&&"function"===typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<O.length;o++)t.on(O[o],this.emit.bind(this,O[o]));return this._read=function(e){f("wrapped _read",e),r&&(r=!1,t.resume())},this},"function"===typeof Symbol&&(R.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=n("782c")),d(this)}),Object.defineProperty(R.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(R.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(R.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),R._fromList=$,Object.defineProperty(R.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"===typeof Symbol&&(R.from=function(t,e){return void 0===_&&(_=n("a50f")),_(R,t,e)})}).call(this,n("c8ba"),n("4362"))},1126:function(t,e,n){"use strict";t.exports=function(t){return!!t&&("symbol"===typeof t||!!t.constructor&&("Symbol"===t.constructor.name&&"Symbol"===t[t.constructor.toStringTag]))}},1195:function(t,e,n){"use strict";var r,i=n("e0f6"),o=n("f508"),s=n("06a2"),a=n("1c4a").toStringTag,u=n("c682"),c=Object.defineProperties,l=s.prototype._unBind;r=t.exports=function(t,e){if(!(this instanceof r))return new r(t,e);s.call(this,t.__mapKeysData__,t),e&&u[e]||(e="key+value"),c(this,{__kind__:o("",e),__values__:o("w",t.__mapValuesData__)})},i&&i(r,s),r.prototype=Object.create(s.prototype,{constructor:o(r),_resolve:o((function(t){return"value"===this.__kind__?this.__values__[t]:"key"===this.__kind__?this.__list__[t]:[this.__list__[t],this.__values__[t]]})),_unBind:o((function(){this.__values__=null,l.call(this)})),toString:o((function(){return"[object Map Iterator]"}))}),Object.defineProperty(r.prototype,a,o("c","Map Iterator"))},1468:function(t,e){var n=1e3,r=60*n,i=60*r,o=24*i,s=7*o,a=365.25*o;function u(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var u=parseFloat(e[1]),c=(e[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return u*a;case"weeks":case"week":case"w":return u*s;case"days":case"day":case"d":return u*o;case"hours":case"hour":case"hrs":case"hr":case"h":return u*i;case"minutes":case"minute":case"mins":case"min":case"m":return u*r;case"seconds":case"second":case"secs":case"sec":case"s":return u*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}}}function c(t){var e=Math.abs(t);return e>=o?Math.round(t/o)+"d":e>=i?Math.round(t/i)+"h":e>=r?Math.round(t/r)+"m":e>=n?Math.round(t/n)+"s":t+"ms"}function l(t){var e=Math.abs(t);return e>=o?f(t,e,o,"day"):e>=i?f(t,e,i,"hour"):e>=r?f(t,e,r,"minute"):e>=n?f(t,e,n,"second"):t+" ms"}function f(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,e){e=e||{};var n=typeof t;if("string"===n&&t.length>0)return u(t);if("number"===n&&isFinite(t))return e.long?l(t):c(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},"14ab":function(t,e,n){"use strict";t.exports=function(){var t,e=Object.assign;return"function"===typeof e&&(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},"14cf":function(t,e,n){"use strict";t.exports=function(){var t,e,n=Array.from;return"function"===typeof n&&(t=["raz","dwa"],e=n(t),Boolean(e&&e!==t&&"dwa"===e[1]))}},1793:function(t,e,n){"use strict";var r=n("6321"),i=/^\s*class[\s{/}]/,o=Function.prototype.toString;t.exports=function(t){return!!r(t)&&!i.test(o.call(t))}},"18ec":function(t,e,n){"use strict";var r="razdwatrzy";t.exports=function(){return"function"===typeof r.contains&&(!0===r.contains("dwa")&&!1===r.contains("foo"))}},1985:function(t,e,n){(function(t,r){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */(function(o){e&&e.nodeType,t&&t.nodeType;var s="object"==typeof r&&r;s.global!==s&&s.window!==s&&s.self;var a,u=2147483647,c=36,l=1,f=26,h=38,p=700,d=72,_=128,g="-",b=/^xn--/,v=/[^\x20-\x7E]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=c-l,S=Math.floor,k=String.fromCharCode;function E(t){throw new RangeError(m[t])}function x(t,e){var n=t.length,r=[];while(n--)r[n]=e(t[n]);return r}function O(t,e){var n=t.split("@"),r="";n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(y,".");var i=t.split("."),o=x(i,e).join(".");return r+o}function I(t){var e,n,r=[],i=0,o=t.length;while(i<o)e=t.charCodeAt(i++),e>=55296&&e<=56319&&i<o?(n=t.charCodeAt(i++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),i--)):r.push(e);return r}function C(t){return x(t,(function(t){var e="";return t>65535&&(t-=65536,e+=k(t>>>10&1023|55296),t=56320|1023&t),e+=k(t),e})).join("")}function R(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:c}function j(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function A(t,e,n){var r=0;for(t=n?S(t/p):t>>1,t+=S(t/e);t>w*f>>1;r+=c)t=S(t/w);return S(r+(w+1)*t/(t+h))}function T(t){var e,n,r,i,o,s,a,h,p,b,v=[],y=t.length,m=0,w=_,k=d;for(n=t.lastIndexOf(g),n<0&&(n=0),r=0;r<n;++r)t.charCodeAt(r)>=128&&E("not-basic"),v.push(t.charCodeAt(r));for(i=n>0?n+1:0;i<y;){for(o=m,s=1,a=c;;a+=c){if(i>=y&&E("invalid-input"),h=R(t.charCodeAt(i++)),(h>=c||h>S((u-m)/s))&&E("overflow"),m+=h*s,p=a<=k?l:a>=k+f?f:a-k,h<p)break;b=c-p,s>S(u/b)&&E("overflow"),s*=b}e=v.length+1,k=A(m-o,e,0==o),S(m/e)>u-w&&E("overflow"),w+=S(m/e),m%=e,v.splice(m++,0,w)}return C(v)}function P(t){var e,n,r,i,o,s,a,h,p,b,v,y,m,w,x,O=[];for(t=I(t),y=t.length,e=_,n=0,o=d,s=0;s<y;++s)v=t[s],v<128&&O.push(k(v));r=i=O.length,i&&O.push(g);while(r<y){for(a=u,s=0;s<y;++s)v=t[s],v>=e&&v<a&&(a=v);for(m=r+1,a-e>S((u-n)/m)&&E("overflow"),n+=(a-e)*m,e=a,s=0;s<y;++s)if(v=t[s],v<e&&++n>u&&E("overflow"),v==e){for(h=n,p=c;;p+=c){if(b=p<=o?l:p>=o+f?f:p-o,h<b)break;x=h-b,w=c-b,O.push(k(j(b+x%w,0))),h=S(x/w)}O.push(k(j(h,0))),o=A(n,m,r==i),n=0,++r}++n,++e}return O.join("")}function M(t){return O(t,(function(t){return b.test(t)?T(t.slice(4).toLowerCase()):t}))}function L(t){return O(t,(function(t){return v.test(t)?"xn--"+P(t):t}))}a={version:"1.4.1",ucs2:{decode:I,encode:C},decode:T,encode:P,toASCII:L,toUnicode:M},i=function(){return a}.call(e,n,e,t),void 0===i||(t.exports=i)})()}).call(this,n("62e4")(t),n("c8ba"))},"1a94":function(t,e,n){"use strict";t.exports=function(t){if("function"!==typeof t)throw new TypeError(t+" is not a function");return t}},"1c4a":function(t,e,n){"use strict";t.exports=n("ba61")()?n("7c4a").Symbol:n("94ee")},"1e0a":function(t,e,n){"use strict";t.exports=function(t){try{return t.toString()}catch(e){try{return String(t)}catch(n){return null}}}},"1fad":function(t,e,n){const r=n("51e9"),i=n("faa1"),o=n("a7c9"),s=n("b289"),a=n("34eb")("mqtt-packet:parser");class u extends i{constructor(){super(),this.parser=this.constructor.parser}static parser(t){return this instanceof u?(this.settings=t||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):(new u).parser(t)}_resetState(){a("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new o,this.error=null,this._list=r(),this._stateCounter=0}parse(t){this.error&&this._resetState(),this._list.append(t),a("parse: current state: %s",this._states[this._stateCounter]);while((-1!==this.packet.length||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error)this._stateCounter++,a("parse: state complete. _stateCounter is now: %d",this._stateCounter),a("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return a("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){const t=this._list.readUInt8(0);return this.packet.cmd=s.types[t>>s.CMD_SHIFT],this.packet.retain=0!==(t&s.RETAIN_MASK),this.packet.qos=t>>s.QOS_SHIFT&s.QOS_MASK,this.packet.dup=0!==(t&s.DUP_MASK),a("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0}_parseLength(){const t=this._parseVarByteNum(!0);return t&&(this.packet.length=t.value,this._list.consume(t.bytes)),a("_parseLength %d",t.value),!!t}_parsePayload(){a("_parsePayload: payload %O",this._list);let t=!1;if(0===this.packet.length||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"))}t=!0}return a("_parsePayload complete result: %s",t),t}_parseConnect(){let t,e,n,r;a("_parseConnect");const i={},o=this.packet,u=this._parseString();if(null===u)return this._emitError(new Error("Cannot parse protocolId"));if("MQTT"!==u&&"MQIsdp"!==u)return this._emitError(new Error("Invalid protocolId"));if(o.protocolId=u,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(o.protocolVersion=this._list.readUInt8(this._pos),o.protocolVersion>=128&&(o.bridgeMode=!0,o.protocolVersion=o.protocolVersion-128),3!==o.protocolVersion&&4!==o.protocolVersion&&5!==o.protocolVersion)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(i.username=this._list.readUInt8(this._pos)&s.USERNAME_MASK,i.password=this._list.readUInt8(this._pos)&s.PASSWORD_MASK,i.will=this._list.readUInt8(this._pos)&s.WILL_FLAG_MASK,i.will&&(o.will={},o.will.retain=0!==(this._list.readUInt8(this._pos)&s.WILL_RETAIN_MASK),o.will.qos=(this._list.readUInt8(this._pos)&s.WILL_QOS_MASK)>>s.WILL_QOS_SHIFT),o.clean=0!==(this._list.readUInt8(this._pos)&s.CLEAN_SESSION_MASK),this._pos++,o.keepalive=this._parseNum(),-1===o.keepalive)return this._emitError(new Error("Packet too short"));if(5===o.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(o.properties=t)}const c=this._parseString();if(null===c)return this._emitError(new Error("Packet too short"));if(o.clientId=c,a("_parseConnect: packet.clientId: %s",o.clientId),i.will){if(5===o.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(o.will.properties=t)}if(t=this._parseString(),null===t)return this._emitError(new Error("Cannot parse will topic"));if(o.will.topic=t,a("_parseConnect: packet.will.topic: %s",o.will.topic),e=this._parseBuffer(),null===e)return this._emitError(new Error("Cannot parse will payload"));o.will.payload=e,a("_parseConnect: packet.will.paylaod: %s",o.will.payload)}if(i.username){if(r=this._parseString(),null===r)return this._emitError(new Error("Cannot parse username"));o.username=r,a("_parseConnect: packet.username: %s",o.username)}if(i.password){if(n=this._parseBuffer(),null===n)return this._emitError(new Error("Cannot parse password"));o.password=n}return this.settings=o,a("_parseConnect: complete"),o}_parseConnack(){a("_parseConnack");const t=this.packet;if(this._list.length<1)return null;if(t.sessionPresent=!!(this._list.readUInt8(this._pos++)&s.SESSIONPRESENT_MASK),5===this.settings.protocolVersion)this._list.length>=2?t.reasonCode=this._list.readUInt8(this._pos++):t.reasonCode=0;else{if(this._list.length<2)return null;t.returnCode=this._list.readUInt8(this._pos++)}if(-1===t.returnCode||-1===t.reasonCode)return this._emitError(new Error("Cannot parse return code"));if(5===this.settings.protocolVersion){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}a("_parseConnack: complete")}_parsePublish(){a("_parsePublish");const t=this.packet;if(t.topic=this._parseString(),null===t.topic)return this._emitError(new Error("Cannot parse topic"));if(!(t.qos>0)||this._parseMessageId()){if(5===this.settings.protocolVersion){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}t.payload=this._list.slice(this._pos,t.length),a("_parsePublish: payload from buffer list: %o",t.payload)}}_parseSubscribe(){a("_parseSubscribe");const t=this.packet;let e,n,r,i,o,u,c;if(1!==t.qos)return this._emitError(new Error("Wrong subscribe header"));if(t.subscriptions=[],this._parseMessageId()){if(5===this.settings.protocolVersion){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}while(this._pos<t.length){if(e=this._parseString(),null===e)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=t.length)return this._emitError(new Error("Malformed Subscribe Payload"));n=this._parseByte(),r=n&s.SUBSCRIBE_OPTIONS_QOS_MASK,u=0!==(n>>s.SUBSCRIBE_OPTIONS_NL_SHIFT&s.SUBSCRIBE_OPTIONS_NL_MASK),o=0!==(n>>s.SUBSCRIBE_OPTIONS_RAP_SHIFT&s.SUBSCRIBE_OPTIONS_RAP_MASK),i=n>>s.SUBSCRIBE_OPTIONS_RH_SHIFT&s.SUBSCRIBE_OPTIONS_RH_MASK,c={topic:e,qos:r},5===this.settings.protocolVersion?(c.nl=u,c.rap=o,c.rh=i):this.settings.bridgeMode&&(c.rh=0,c.rap=!0,c.nl=!0),a("_parseSubscribe: push subscription `%s` to subscription",c),t.subscriptions.push(c)}}}_parseSuback(){a("_parseSuback");const t=this.packet;if(this.packet.granted=[],this._parseMessageId()){if(5===this.settings.protocolVersion){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}while(this._pos<this.packet.length)this.packet.granted.push(this._list.readUInt8(this._pos++))}}_parseUnsubscribe(){a("_parseUnsubscribe");const t=this.packet;if(t.unsubscriptions=[],this._parseMessageId()){if(5===this.settings.protocolVersion){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}while(this._pos<t.length){const e=this._parseString();if(null===e)return this._emitError(new Error("Cannot parse topic"));a("_parseUnsubscribe: push topic `%s` to unsubscriptions",e),t.unsubscriptions.push(e)}}}_parseUnsuback(){a("_parseUnsuback");const t=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if(5===this.settings.protocolVersion){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e),t.granted=[];while(this._pos<this.packet.length)this.packet.granted.push(this._list.readUInt8(this._pos++))}}_parseConfirmation(){a("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);const t=this.packet;if(this._parseMessageId(),5===this.settings.protocolVersion&&(t.length>2?(t.reasonCode=this._parseByte(),a("_parseConfirmation: packet.reasonCode `%d`",t.reasonCode)):t.reasonCode=0,t.length>3)){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}return!0}_parseDisconnect(){const t=this.packet;if(a("_parseDisconnect"),5===this.settings.protocolVersion){this._list.length>0?t.reasonCode=this._parseByte():t.reasonCode=0;const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}return a("_parseDisconnect result: true"),!0}_parseAuth(){a("_parseAuth");const t=this.packet;if(5!==this.settings.protocolVersion)return this._emitError(new Error("Not supported auth packet for this version MQTT"));t.reasonCode=this._parseByte();const e=this._parseProperties();return Object.getOwnPropertyNames(e).length&&(t.properties=e),a("_parseAuth: result: true"),!0}_parseMessageId(){const t=this.packet;return t.messageId=this._parseNum(),null===t.messageId?(this._emitError(new Error("Cannot parse messageId")),!1):(a("_parseMessageId: packet.messageId %d",t.messageId),!0)}_parseString(t){const e=this._parseNum(),n=e+this._pos;if(-1===e||n>this._list.length||n>this.packet.length)return null;const r=this._list.toString("utf8",this._pos,n);return this._pos+=e,a("_parseString: result: %s",r),r}_parseStringPair(){return a("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){const t=this._parseNum(),e=t+this._pos;if(-1===t||e>this._list.length||e>this.packet.length)return null;const n=this._list.slice(this._pos,e);return this._pos+=t,a("_parseBuffer: result: %o",n),n}_parseNum(){if(this._list.length-this._pos<2)return-1;const t=this._list.readUInt16BE(this._pos);return this._pos+=2,a("_parseNum: result: %s",t),t}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;const t=this._list.readUInt32BE(this._pos);return this._pos+=4,a("_parse4ByteNum: result: %s",t),t}_parseVarByteNum(t){a("_parseVarByteNum");const e=4;let n,r=0,i=1,o=0,u=!1;const c=this._pos?this._pos:0;while(r<e&&c+r<this._list.length){if(n=this._list.readUInt8(c+r++),o+=i*(n&s.VARBYTEINT_MASK),i*=128,0===(n&s.VARBYTEINT_FIN_MASK)){u=!0;break}if(this._list.length<=r)break}return!u&&r===e&&this._list.length>=r&&this._emitError(new Error("Invalid variable byte integer")),c&&(this._pos+=r),u=!!u&&(t?{bytes:r,value:o}:o),a("_parseVarByteNum: result: %o",u),u}_parseByte(){let t;return this._pos<this._list.length&&(t=this._list.readUInt8(this._pos),this._pos++),a("_parseByte: result: %o",t),t}_parseByType(t){switch(a("_parseByType: type: %s",t),t){case"byte":return 0!==this._parseByte();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(){a("_parseProperties");const t=this._parseVarByteNum(),e=this._pos,n=e+t,r={};while(this._pos<n){const t=this._parseByte();if(!t)return this._emitError(new Error("Cannot parse property code type")),!1;const e=s.propertiesCodes[t];if(!e)return this._emitError(new Error("Unknown property")),!1;if("userProperties"!==e)r[e]?(Array.isArray(r[e])||(r[e]=[r[e]]),r[e].push(this._parseByType(s.propertiesTypes[e]))):r[e]=this._parseByType(s.propertiesTypes[e]);else{r[e]||(r[e]=Object.create(null));const t=this._parseByType(s.propertiesTypes[e]);if(r[e][t.name])if(Array.isArray(r[e][t.name]))r[e][t.name].push(t.value);else{const n=r[e][t.name];r[e][t.name]=[n],r[e][t.name].push(t.value)}else r[e][t.name]=t.value}}return r}_newPacket(){return a("_newPacket"),this.packet&&(this._list.consume(this.packet.length),a("_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)),a("_newPacket: new packet"),this.packet=new o,this._pos=0,!0}_emitError(t){a("_emitError"),this.error=t,this.emit("error",t)}}t.exports=u},2031:function(t,e,n){"use strict";t.exports=n("14ab")()?Object.assign:n("f60e")},2160:function(t,e,n){"use strict";var r=n("62c4"),i={function:!0,object:!0};t.exports=function(t){return r(t)&&i[typeof t]||!1}},"25be":function(t,e,n){"use strict";var r=n("f508"),i=n("b380"),o=Object.create(null);t.exports=function(t){return Object.defineProperties(t,{for:r((function(e){return o[e]?o[e]:o[e]=t(String(e))})),keyFor:r((function(t){var e;for(e in i(t),o)if(o[e]===t)return e}))})}},"262a":function(t,e,n){"use strict";var r=n("84d3"),i=n("936a");t.exports=function(t){return i(t)?t:r(t,"Cannot use %v",arguments[1])}},"27bf":function(t,e,n){"use strict";t.exports=s;var r=n("b19a"),i=Object.create(n("3a7c"));function o(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(t){if(!(this instanceof s))return new s(t);r.call(this,t),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"===typeof t.transform&&(this._transform=t.transform),"function"===typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",a)}function a(){var t=this;"function"===typeof this._flush?this._flush((function(e,n){u(t,e,n)})):u(this,null,null)}function u(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=n("3fb5"),i.inherits(s,r),s.prototype.push=function(t,e){return this._transformState.needTransform=!1,r.prototype.push.call(this,t,e)},s.prototype._transform=function(t,e,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},s.prototype._destroy=function(t,e){var n=this;r.prototype._destroy.call(this,t,(function(t){e(t),n.emit("close")}))}},"29a2":function(t,e,n){"use strict";function r(t,e,n){var r=this;this._callback=t,this._args=n,this._interval=setInterval(t,e,this._args),this.reschedule=function(t){t||(t=r._interval),r._interval&&clearInterval(r._interval),r._interval=setInterval(r._callback,t,r._args)},this.clear=function(){r._interval&&(clearInterval(r._interval),r._interval=void 0)},this.destroy=function(){r._interval&&clearInterval(r._interval),r._callback=void 0,r._interval=void 0,r._args=void 0}}function i(){if("function"!==typeof arguments[0])throw new Error("callback needed");if("number"!==typeof arguments[1])throw new Error("interval needed");var t;if(arguments.length>0){t=new Array(arguments.length-2);for(var e=0;e<t.length;e++)t[e]=arguments[e+2]}return new r(arguments[0],arguments[1],t)}t.exports=i},"29b0":function(t,e,n){"use strict";t.exports=function(){var t=Number.isNaN;return"function"===typeof t&&(!t({})&&t(NaN)&&!t(34))}},"2ef0":function(t,e,n){(function(t,r){var i;
|
||
/**
|
||
* @license
|
||
* Lodash <https://lodash.com/>
|
||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||
* Released under MIT license <https://lodash.com/license>
|
||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||
*/(function(){var o,s="4.17.19",a=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",l="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",p=1,d=2,_=4,g=1,b=2,v=1,y=2,m=4,w=8,S=16,k=32,E=64,x=128,O=256,I=512,C=30,R="...",j=800,A=16,T=1,P=2,M=3,L=1/0,N=9007199254740991,B=17976931348623157e292,U=NaN,D=4294967295,q=D-1,F=D>>>1,W=[["ary",x],["bind",v],["bindKey",y],["curry",w],["curryRight",S],["flip",I],["partial",k],["partialRight",E],["rearg",O]],V="[object Arguments]",z="[object Array]",H="[object AsyncFunction]",K="[object Boolean]",$="[object Date]",Q="[object DOMException]",G="[object Error]",Z="[object Function]",Y="[object GeneratorFunction]",J="[object Map]",X="[object Number]",tt="[object Null]",et="[object Object]",nt="[object Promise]",rt="[object Proxy]",it="[object RegExp]",ot="[object Set]",st="[object String]",at="[object Symbol]",ut="[object Undefined]",ct="[object WeakMap]",lt="[object WeakSet]",ft="[object ArrayBuffer]",ht="[object DataView]",pt="[object Float32Array]",dt="[object Float64Array]",_t="[object Int8Array]",gt="[object Int16Array]",bt="[object Int32Array]",vt="[object Uint8Array]",yt="[object Uint8ClampedArray]",mt="[object Uint16Array]",wt="[object Uint32Array]",St=/\b__p \+= '';/g,kt=/\b(__p \+=) '' \+/g,Et=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xt=/&(?:amp|lt|gt|quot|#39);/g,Ot=/[&<>"']/g,It=RegExp(xt.source),Ct=RegExp(Ot.source),Rt=/<%-([\s\S]+?)%>/g,jt=/<%([\s\S]+?)%>/g,At=/<%=([\s\S]+?)%>/g,Tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pt=/^\w*$/,Mt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Lt=/[\\^$.*+?()[\]{}|]/g,Nt=RegExp(Lt.source),Bt=/^\s+|\s+$/g,Ut=/^\s+/,Dt=/\s+$/,qt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ft=/\{\n\/\* \[wrapped with (.+)\] \*/,Wt=/,? & /,Vt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,zt=/\\(\\)?/g,Ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Kt=/\w*$/,$t=/^[-+]0x[0-9a-f]+$/i,Qt=/^0b[01]+$/i,Gt=/^\[object .+?Constructor\]$/,Zt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\d*)$/,Jt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xt=/($^)/,te=/['\n\r\u2028\u2029\\]/g,ee="\\ud800-\\udfff",ne="\\u0300-\\u036f",re="\\ufe20-\\ufe2f",ie="\\u20d0-\\u20ff",oe=ne+re+ie,se="\\u2700-\\u27bf",ae="a-z\\xdf-\\xf6\\xf8-\\xff",ue="\\xac\\xb1\\xd7\\xf7",ce="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",le="\\u2000-\\u206f",fe=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",he="A-Z\\xc0-\\xd6\\xd8-\\xde",pe="\\ufe0e\\ufe0f",de=ue+ce+le+fe,_e="['’]",ge="["+ee+"]",be="["+de+"]",ve="["+oe+"]",ye="\\d+",me="["+se+"]",we="["+ae+"]",Se="[^"+ee+de+ye+se+ae+he+"]",ke="\\ud83c[\\udffb-\\udfff]",Ee="(?:"+ve+"|"+ke+")",xe="[^"+ee+"]",Oe="(?:\\ud83c[\\udde6-\\uddff]){2}",Ie="[\\ud800-\\udbff][\\udc00-\\udfff]",Ce="["+he+"]",Re="\\u200d",je="(?:"+we+"|"+Se+")",Ae="(?:"+Ce+"|"+Se+")",Te="(?:"+_e+"(?:d|ll|m|re|s|t|ve))?",Pe="(?:"+_e+"(?:D|LL|M|RE|S|T|VE))?",Me=Ee+"?",Le="["+pe+"]?",Ne="(?:"+Re+"(?:"+[xe,Oe,Ie].join("|")+")"+Le+Me+")*",Be="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ue="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",De=Le+Me+Ne,qe="(?:"+[me,Oe,Ie].join("|")+")"+De,Fe="(?:"+[xe+ve+"?",ve,Oe,Ie,ge].join("|")+")",We=RegExp(_e,"g"),Ve=RegExp(ve,"g"),ze=RegExp(ke+"(?="+ke+")|"+Fe+De,"g"),He=RegExp([Ce+"?"+we+"+"+Te+"(?="+[be,Ce,"$"].join("|")+")",Ae+"+"+Pe+"(?="+[be,Ce+je,"$"].join("|")+")",Ce+"?"+je+"+"+Te,Ce+"+"+Pe,Ue,Be,ye,qe].join("|"),"g"),Ke=RegExp("["+Re+ee+oe+pe+"]"),$e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Qe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ge=-1,Ze={};Ze[pt]=Ze[dt]=Ze[_t]=Ze[gt]=Ze[bt]=Ze[vt]=Ze[yt]=Ze[mt]=Ze[wt]=!0,Ze[V]=Ze[z]=Ze[ft]=Ze[K]=Ze[ht]=Ze[$]=Ze[G]=Ze[Z]=Ze[J]=Ze[X]=Ze[et]=Ze[it]=Ze[ot]=Ze[st]=Ze[ct]=!1;var Ye={};Ye[V]=Ye[z]=Ye[ft]=Ye[ht]=Ye[K]=Ye[$]=Ye[pt]=Ye[dt]=Ye[_t]=Ye[gt]=Ye[bt]=Ye[J]=Ye[X]=Ye[et]=Ye[it]=Ye[ot]=Ye[st]=Ye[at]=Ye[vt]=Ye[yt]=Ye[mt]=Ye[wt]=!0,Ye[G]=Ye[Z]=Ye[ct]=!1;var Je={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},Xe={"&":"&","<":"<",">":">",'"':""","'":"'"},tn={"&":"&","<":"<",">":">",""":'"',"'":"'"},en={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nn=parseFloat,rn=parseInt,on="object"==typeof t&&t&&t.Object===Object&&t,sn="object"==typeof self&&self&&self.Object===Object&&self,an=on||sn||Function("return this")(),un=e&&!e.nodeType&&e,cn=un&&"object"==typeof r&&r&&!r.nodeType&&r,ln=cn&&cn.exports===un,fn=ln&&on.process,hn=function(){try{var t=cn&&cn.require&&cn.require("util").types;return t||fn&&fn.binding&&fn.binding("util")}catch(e){}}(),pn=hn&&hn.isArrayBuffer,dn=hn&&hn.isDate,_n=hn&&hn.isMap,gn=hn&&hn.isRegExp,bn=hn&&hn.isSet,vn=hn&&hn.isTypedArray;function yn(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function mn(t,e,n,r){var i=-1,o=null==t?0:t.length;while(++i<o){var s=t[i];e(r,s,n(s),t)}return r}function wn(t,e){var n=-1,r=null==t?0:t.length;while(++n<r)if(!1===e(t[n],n,t))break;return t}function Sn(t,e){var n=null==t?0:t.length;while(n--)if(!1===e(t[n],n,t))break;return t}function kn(t,e){var n=-1,r=null==t?0:t.length;while(++n<r)if(!e(t[n],n,t))return!1;return!0}function En(t,e){var n=-1,r=null==t?0:t.length,i=0,o=[];while(++n<r){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}function xn(t,e){var n=null==t?0:t.length;return!!n&&Bn(t,e,0)>-1}function On(t,e,n){var r=-1,i=null==t?0:t.length;while(++r<i)if(n(e,t[r]))return!0;return!1}function In(t,e){var n=-1,r=null==t?0:t.length,i=Array(r);while(++n<r)i[n]=e(t[n],n,t);return i}function Cn(t,e){var n=-1,r=e.length,i=t.length;while(++n<r)t[i+n]=e[n];return t}function Rn(t,e,n,r){var i=-1,o=null==t?0:t.length;r&&o&&(n=t[++i]);while(++i<o)n=e(n,t[i],i,t);return n}function jn(t,e,n,r){var i=null==t?0:t.length;r&&i&&(n=t[--i]);while(i--)n=e(n,t[i],i,t);return n}function An(t,e){var n=-1,r=null==t?0:t.length;while(++n<r)if(e(t[n],n,t))return!0;return!1}var Tn=Fn("length");function Pn(t){return t.split("")}function Mn(t){return t.match(Vt)||[]}function Ln(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function Nn(t,e,n,r){var i=t.length,o=n+(r?1:-1);while(r?o--:++o<i)if(e(t[o],o,t))return o;return-1}function Bn(t,e,n){return e===e?hr(t,e,n):Nn(t,Dn,n)}function Un(t,e,n,r){var i=n-1,o=t.length;while(++i<o)if(r(t[i],e))return i;return-1}function Dn(t){return t!==t}function qn(t,e){var n=null==t?0:t.length;return n?Hn(t,e)/n:U}function Fn(t){return function(e){return null==e?o:e[t]}}function Wn(t){return function(e){return null==t?o:t[e]}}function Vn(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function zn(t,e){var n=t.length;t.sort(e);while(n--)t[n]=t[n].value;return t}function Hn(t,e){var n,r=-1,i=t.length;while(++r<i){var s=e(t[r]);s!==o&&(n=n===o?s:n+s)}return n}function Kn(t,e){var n=-1,r=Array(t);while(++n<t)r[n]=e(n);return r}function $n(t,e){return In(e,(function(e){return[e,t[e]]}))}function Qn(t){return function(e){return t(e)}}function Gn(t,e){return In(e,(function(e){return t[e]}))}function Zn(t,e){return t.has(e)}function Yn(t,e){var n=-1,r=t.length;while(++n<r&&Bn(e,t[n],0)>-1);return n}function Jn(t,e){var n=t.length;while(n--&&Bn(e,t[n],0)>-1);return n}function Xn(t,e){var n=t.length,r=0;while(n--)t[n]===e&&++r;return r}var tr=Wn(Je),er=Wn(Xe);function nr(t){return"\\"+en[t]}function rr(t,e){return null==t?o:t[e]}function ir(t){return Ke.test(t)}function or(t){return $e.test(t)}function sr(t){var e,n=[];while(!(e=t.next()).done)n.push(e.value);return n}function ar(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function ur(t,e){return function(n){return t(e(n))}}function cr(t,e){var n=-1,r=t.length,i=0,o=[];while(++n<r){var s=t[n];s!==e&&s!==h||(t[n]=h,o[i++]=n)}return o}function lr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function fr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function hr(t,e,n){var r=n-1,i=t.length;while(++r<i)if(t[r]===e)return r;return-1}function pr(t,e,n){var r=n+1;while(r--)if(t[r]===e)return r;return r}function dr(t){return ir(t)?br(t):Tn(t)}function _r(t){return ir(t)?vr(t):Pn(t)}var gr=Wn(tn);function br(t){var e=ze.lastIndex=0;while(ze.test(t))++e;return e}function vr(t){return t.match(ze)||[]}function yr(t){return t.match(He)||[]}var mr=function t(e){e=null==e?an:wr.defaults(an.Object(),e,wr.pick(an,Qe));var n=e.Array,r=e.Date,i=e.Error,Vt=e.Function,ee=e.Math,ne=e.Object,re=e.RegExp,ie=e.String,oe=e.TypeError,se=n.prototype,ae=Vt.prototype,ue=ne.prototype,ce=e["__core-js_shared__"],le=ae.toString,fe=ue.hasOwnProperty,he=0,pe=function(){var t=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),de=ue.toString,_e=le.call(ne),ge=an._,be=re("^"+le.call(fe).replace(Lt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ve=ln?e.Buffer:o,ye=e.Symbol,me=e.Uint8Array,we=ve?ve.allocUnsafe:o,Se=ur(ne.getPrototypeOf,ne),ke=ne.create,Ee=ue.propertyIsEnumerable,xe=se.splice,Oe=ye?ye.isConcatSpreadable:o,Ie=ye?ye.iterator:o,Ce=ye?ye.toStringTag:o,Re=function(){try{var t=Hs(ne,"defineProperty");return t({},"",{}),t}catch(e){}}(),je=e.clearTimeout!==an.clearTimeout&&e.clearTimeout,Ae=r&&r.now!==an.Date.now&&r.now,Te=e.setTimeout!==an.setTimeout&&e.setTimeout,Pe=ee.ceil,Me=ee.floor,Le=ne.getOwnPropertySymbols,Ne=ve?ve.isBuffer:o,Be=e.isFinite,Ue=se.join,De=ur(ne.keys,ne),qe=ee.max,Fe=ee.min,ze=r.now,He=e.parseInt,Ke=ee.random,$e=se.reverse,Je=Hs(e,"DataView"),Xe=Hs(e,"Map"),tn=Hs(e,"Promise"),en=Hs(e,"Set"),on=Hs(e,"WeakMap"),sn=Hs(ne,"create"),un=on&&new on,cn={},fn=ja(Je),hn=ja(Xe),Tn=ja(tn),Pn=ja(en),Wn=ja(on),hr=ye?ye.prototype:o,br=hr?hr.valueOf:o,vr=hr?hr.toString:o;function mr(t){if(kl(t)&&!sl(t)&&!(t instanceof xr)){if(t instanceof Er)return t;if(fe.call(t,"__wrapped__"))return Ta(t)}return new Er(t)}var Sr=function(){function t(){}return function(e){if(!Sl(e))return{};if(ke)return ke(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function kr(){}function Er(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function xr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=D,this.__views__=[]}function Or(){var t=new xr(this.__wrapped__);return t.__actions__=ns(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ns(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ns(this.__views__),t}function Ir(){if(this.__filtered__){var t=new xr(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Cr(){var t=this.__wrapped__.value(),e=this.__dir__,n=sl(t),r=e<0,i=n?t.length:0,o=Zs(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=r?a:s-1,l=this.__iteratees__,f=l.length,h=0,p=Fe(u,this.__takeCount__);if(!n||!r&&i==u&&p==u)return Bo(t,this.__actions__);var d=[];t:while(u--&&h<p){c+=e;var _=-1,g=t[c];while(++_<f){var b=l[_],v=b.iteratee,y=b.type,m=v(g);if(y==P)g=m;else if(!m){if(y==T)continue t;break t}}d[h++]=g}return d}function Rr(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var r=t[e];this.set(r[0],r[1])}}function jr(){this.__data__=sn?sn(null):{},this.size=0}function Ar(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Tr(t){var e=this.__data__;if(sn){var n=e[t];return n===l?o:n}return fe.call(e,t)?e[t]:o}function Pr(t){var e=this.__data__;return sn?e[t]!==o:fe.call(e,t)}function Mr(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=sn&&e===o?l:e,this}function Lr(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var r=t[e];this.set(r[0],r[1])}}function Nr(){this.__data__=[],this.size=0}function Br(t){var e=this.__data__,n=ui(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():xe.call(e,n,1),--this.size,!0}function Ur(t){var e=this.__data__,n=ui(e,t);return n<0?o:e[n][1]}function Dr(t){return ui(this.__data__,t)>-1}function qr(t,e){var n=this.__data__,r=ui(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function Fr(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var r=t[e];this.set(r[0],r[1])}}function Wr(){this.size=0,this.__data__={hash:new Rr,map:new(Xe||Lr),string:new Rr}}function Vr(t){var e=Vs(this,t)["delete"](t);return this.size-=e?1:0,e}function zr(t){return Vs(this,t).get(t)}function Hr(t){return Vs(this,t).has(t)}function Kr(t,e){var n=Vs(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function $r(t){var e=-1,n=null==t?0:t.length;this.__data__=new Fr;while(++e<n)this.add(t[e])}function Qr(t){return this.__data__.set(t,l),this}function Gr(t){return this.__data__.has(t)}function Zr(t){var e=this.__data__=new Lr(t);this.size=e.size}function Yr(){this.__data__=new Lr,this.size=0}function Jr(t){var e=this.__data__,n=e["delete"](t);return this.size=e.size,n}function Xr(t){return this.__data__.get(t)}function ti(t){return this.__data__.has(t)}function ei(t,e){var n=this.__data__;if(n instanceof Lr){var r=n.__data__;if(!Xe||r.length<a-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Fr(r)}return n.set(t,e),this.size=n.size,this}function ni(t,e){var n=sl(t),r=!n&&ol(t),i=!n&&!r&&fl(t),o=!n&&!r&&!i&&Ul(t),s=n||r||i||o,a=s?Kn(t.length,ie):[],u=a.length;for(var c in t)!e&&!fe.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ia(c,u))||a.push(c);return a}function ri(t){var e=t.length;return e?t[go(0,e-1)]:o}function ii(t,e){return Ia(ns(t),di(e,0,t.length))}function oi(t){return Ia(ns(t))}function si(t,e,n){(n!==o&&!nl(t[e],n)||n===o&&!(e in t))&&hi(t,e,n)}function ai(t,e,n){var r=t[e];fe.call(t,e)&&nl(r,n)&&(n!==o||e in t)||hi(t,e,n)}function ui(t,e){var n=t.length;while(n--)if(nl(t[n][0],e))return n;return-1}function ci(t,e,n,r){return mi(t,(function(t,i,o){e(r,t,n(t),o)})),r}function li(t,e){return t&&rs(e,wf(e),t)}function fi(t,e){return t&&rs(e,Sf(e),t)}function hi(t,e,n){"__proto__"==e&&Re?Re(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function pi(t,e){var r=-1,i=e.length,s=n(i),a=null==t;while(++r<i)s[r]=a?o:_f(t,e[r]);return s}function di(t,e,n){return t===t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function _i(t,e,n,r,i,s){var a,u=e&p,c=e&d,l=e&_;if(n&&(a=i?n(t,r,i,s):n(t)),a!==o)return a;if(!Sl(t))return t;var f=sl(t);if(f){if(a=Xs(t),!u)return ns(t,a)}else{var h=Gs(t),g=h==Z||h==Y;if(fl(t))return Ko(t,u);if(h==et||h==V||g&&!i){if(a=c||g?{}:ta(t),!u)return c?os(t,fi(a,t)):is(t,li(a,t))}else{if(!Ye[h])return i?t:{};a=ea(t,h,u)}}s||(s=new Zr);var b=s.get(t);if(b)return b;s.set(t,a),Ll(t)?t.forEach((function(r){a.add(_i(r,e,n,r,t,s))})):El(t)&&t.forEach((function(r,i){a.set(i,_i(r,e,n,i,t,s))}));var v=l?c?Us:Bs:c?Sf:wf,y=f?o:v(t);return wn(y||t,(function(r,i){y&&(i=r,r=t[i]),ai(a,i,_i(r,e,n,i,t,s))})),a}function gi(t){var e=wf(t);return function(n){return bi(n,t,e)}}function bi(t,e,n){var r=n.length;if(null==t)return!r;t=ne(t);while(r--){var i=n[r],s=e[i],a=t[i];if(a===o&&!(i in t)||!s(a))return!1}return!0}function vi(t,e,n){if("function"!=typeof t)throw new oe(c);return ka((function(){t.apply(o,n)}),e)}function yi(t,e,n,r){var i=-1,o=xn,s=!0,u=t.length,c=[],l=e.length;if(!u)return c;n&&(e=In(e,Qn(n))),r?(o=On,s=!1):e.length>=a&&(o=Zn,s=!1,e=new $r(e));t:while(++i<u){var f=t[i],h=null==n?f:n(f);if(f=r||0!==f?f:0,s&&h===h){var p=l;while(p--)if(e[p]===h)continue t;c.push(f)}else o(e,h,r)||c.push(f)}return c}mr.templateSettings={escape:Rt,evaluate:jt,interpolate:At,variable:"",imports:{_:mr}},mr.prototype=kr.prototype,mr.prototype.constructor=mr,Er.prototype=Sr(kr.prototype),Er.prototype.constructor=Er,xr.prototype=Sr(kr.prototype),xr.prototype.constructor=xr,Rr.prototype.clear=jr,Rr.prototype["delete"]=Ar,Rr.prototype.get=Tr,Rr.prototype.has=Pr,Rr.prototype.set=Mr,Lr.prototype.clear=Nr,Lr.prototype["delete"]=Br,Lr.prototype.get=Ur,Lr.prototype.has=Dr,Lr.prototype.set=qr,Fr.prototype.clear=Wr,Fr.prototype["delete"]=Vr,Fr.prototype.get=zr,Fr.prototype.has=Hr,Fr.prototype.set=Kr,$r.prototype.add=$r.prototype.push=Qr,$r.prototype.has=Gr,Zr.prototype.clear=Yr,Zr.prototype["delete"]=Jr,Zr.prototype.get=Xr,Zr.prototype.has=ti,Zr.prototype.set=ei;var mi=us(Ri),wi=us(ji,!0);function Si(t,e){var n=!0;return mi(t,(function(t,r,i){return n=!!e(t,r,i),n})),n}function ki(t,e,n){var r=-1,i=t.length;while(++r<i){var s=t[r],a=e(s);if(null!=a&&(u===o?a===a&&!Bl(a):n(a,u)))var u=a,c=s}return c}function Ei(t,e,n,r){var i=t.length;n=Kl(n),n<0&&(n=-n>i?0:i+n),r=r===o||r>i?i:Kl(r),r<0&&(r+=i),r=n>r?0:$l(r);while(n<r)t[n++]=e;return t}function xi(t,e){var n=[];return mi(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function Oi(t,e,n,r,i){var o=-1,s=t.length;n||(n=ra),i||(i=[]);while(++o<s){var a=t[o];e>0&&n(a)?e>1?Oi(a,e-1,n,r,i):Cn(i,a):r||(i[i.length]=a)}return i}var Ii=cs(),Ci=cs(!0);function Ri(t,e){return t&&Ii(t,e,wf)}function ji(t,e){return t&&Ci(t,e,wf)}function Ai(t,e){return En(e,(function(e){return yl(t[e])}))}function Ti(t,e){e=Wo(e,t);var n=0,r=e.length;while(null!=t&&n<r)t=t[Ra(e[n++])];return n&&n==r?t:o}function Pi(t,e,n){var r=e(t);return sl(t)?r:Cn(r,n(t))}function Mi(t){return null==t?t===o?ut:tt:Ce&&Ce in ne(t)?Ks(t):ba(t)}function Li(t,e){return t>e}function Ni(t,e){return null!=t&&fe.call(t,e)}function Bi(t,e){return null!=t&&e in ne(t)}function Ui(t,e,n){return t>=Fe(e,n)&&t<qe(e,n)}function Di(t,e,r){var i=r?On:xn,s=t[0].length,a=t.length,u=a,c=n(a),l=1/0,f=[];while(u--){var h=t[u];u&&e&&(h=In(h,Qn(e))),l=Fe(h.length,l),c[u]=!r&&(e||s>=120&&h.length>=120)?new $r(u&&h):o}h=t[0];var p=-1,d=c[0];t:while(++p<s&&f.length<l){var _=h[p],g=e?e(_):_;if(_=r||0!==_?_:0,!(d?Zn(d,g):i(f,g,r))){u=a;while(--u){var b=c[u];if(!(b?Zn(b,g):i(t[u],g,r)))continue t}d&&d.push(g),f.push(_)}}return f}function qi(t,e,n,r){return Ri(t,(function(t,i,o){e(r,n(t),i,o)})),r}function Fi(t,e,n){e=Wo(e,t),t=ya(t,e);var r=null==t?t:t[Ra(ru(e))];return null==r?o:yn(r,t,n)}function Wi(t){return kl(t)&&Mi(t)==V}function Vi(t){return kl(t)&&Mi(t)==ft}function zi(t){return kl(t)&&Mi(t)==$}function Hi(t,e,n,r,i){return t===e||(null==t||null==e||!kl(t)&&!kl(e)?t!==t&&e!==e:Ki(t,e,n,r,Hi,i))}function Ki(t,e,n,r,i,o){var s=sl(t),a=sl(e),u=s?z:Gs(t),c=a?z:Gs(e);u=u==V?et:u,c=c==V?et:c;var l=u==et,f=c==et,h=u==c;if(h&&fl(t)){if(!fl(e))return!1;s=!0,l=!1}if(h&&!l)return o||(o=new Zr),s||Ul(t)?Ps(t,e,n,r,i,o):Ms(t,e,u,n,r,i,o);if(!(n&g)){var p=l&&fe.call(t,"__wrapped__"),d=f&&fe.call(e,"__wrapped__");if(p||d){var _=p?t.value():t,b=d?e.value():e;return o||(o=new Zr),i(_,b,n,r,o)}}return!!h&&(o||(o=new Zr),Ls(t,e,n,r,i,o))}function $i(t){return kl(t)&&Gs(t)==J}function Qi(t,e,n,r){var i=n.length,s=i,a=!r;if(null==t)return!s;t=ne(t);while(i--){var u=n[i];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}while(++i<s){u=n[i];var c=u[0],l=t[c],f=u[1];if(a&&u[2]){if(l===o&&!(c in t))return!1}else{var h=new Zr;if(r)var p=r(l,f,c,t,e,h);if(!(p===o?Hi(f,l,g|b,r,h):p))return!1}}return!0}function Gi(t){if(!Sl(t)||ca(t))return!1;var e=yl(t)?be:Gt;return e.test(ja(t))}function Zi(t){return kl(t)&&Mi(t)==it}function Yi(t){return kl(t)&&Gs(t)==ot}function Ji(t){return kl(t)&&wl(t.length)&&!!Ze[Mi(t)]}function Xi(t){return"function"==typeof t?t:null==t?Rh:"object"==typeof t?sl(t)?oo(t[0],t[1]):io(t):Wh(t)}function to(t){if(!fa(t))return De(t);var e=[];for(var n in ne(t))fe.call(t,n)&&"constructor"!=n&&e.push(n);return e}function eo(t){if(!Sl(t))return ga(t);var e=fa(t),n=[];for(var r in t)("constructor"!=r||!e&&fe.call(t,r))&&n.push(r);return n}function no(t,e){return t<e}function ro(t,e){var r=-1,i=ul(t)?n(t.length):[];return mi(t,(function(t,n,o){i[++r]=e(t,n,o)})),i}function io(t){var e=zs(t);return 1==e.length&&e[0][2]?pa(e[0][0],e[0][1]):function(n){return n===t||Qi(n,t,e)}}function oo(t,e){return sa(t)&&ha(e)?pa(Ra(t),e):function(n){var r=_f(n,t);return r===o&&r===e?bf(n,t):Hi(e,r,g|b)}}function so(t,e,n,r,i){t!==e&&Ii(e,(function(s,a){if(i||(i=new Zr),Sl(s))ao(t,e,a,n,so,r,i);else{var u=r?r(wa(t,a),s,a+"",t,e,i):o;u===o&&(u=s),si(t,a,u)}}),Sf)}function ao(t,e,n,r,i,s,a){var u=wa(t,n),c=wa(e,n),l=a.get(c);if(l)si(t,n,l);else{var f=s?s(u,c,n+"",t,e,a):o,h=f===o;if(h){var p=sl(c),d=!p&&fl(c),_=!p&&!d&&Ul(c);f=c,p||d||_?sl(u)?f=u:cl(u)?f=ns(u):d?(h=!1,f=Ko(c,!0)):_?(h=!1,f=Yo(c,!0)):f=[]:Tl(c)||ol(c)?(f=u,ol(u)?f=Gl(u):Sl(u)&&!yl(u)||(f=ta(c))):h=!1}h&&(a.set(c,f),i(f,c,r,s,a),a["delete"](c)),si(t,n,f)}}function uo(t,e){var n=t.length;if(n)return e+=e<0?n:0,ia(e,n)?t[e]:o}function co(t,e,n){e=e.length?In(e,(function(t){return sl(t)?function(e){return Ti(e,1===t.length?t[0]:t)}:t})):[Rh];var r=-1;e=In(e,Qn(Ws()));var i=ro(t,(function(t,n,i){var o=In(e,(function(e){return e(t)}));return{criteria:o,index:++r,value:t}}));return zn(i,(function(t,e){return Xo(t,e,n)}))}function lo(t,e){return fo(t,e,(function(e,n){return bf(t,n)}))}function fo(t,e,n){var r=-1,i=e.length,o={};while(++r<i){var s=e[r],a=Ti(t,s);n(a,s)&&So(o,Wo(s,t),a)}return o}function ho(t){return function(e){return Ti(e,t)}}function po(t,e,n,r){var i=r?Un:Bn,o=-1,s=e.length,a=t;t===e&&(e=ns(e)),n&&(a=In(t,Qn(n)));while(++o<s){var u=0,c=e[o],l=n?n(c):c;while((u=i(a,l,u,r))>-1)a!==t&&xe.call(a,u,1),xe.call(t,u,1)}return t}function _o(t,e){var n=t?e.length:0,r=n-1;while(n--){var i=e[n];if(n==r||i!==o){var o=i;ia(i)?xe.call(t,i,1):Mo(t,i)}}return t}function go(t,e){return t+Me(Ke()*(e-t+1))}function bo(t,e,r,i){var o=-1,s=qe(Pe((e-t)/(r||1)),0),a=n(s);while(s--)a[i?s:++o]=t,t+=r;return a}function vo(t,e){var n="";if(!t||e<1||e>N)return n;do{e%2&&(n+=t),e=Me(e/2),e&&(t+=t)}while(e);return n}function yo(t,e){return Ea(va(t,e,Rh),t+"")}function mo(t){return ri(qf(t))}function wo(t,e){var n=qf(t);return Ia(n,di(e,0,n.length))}function So(t,e,n,r){if(!Sl(t))return t;e=Wo(e,t);var i=-1,s=e.length,a=s-1,u=t;while(null!=u&&++i<s){var c=Ra(e[i]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(i!=a){var f=u[c];l=r?r(f,c,u):o,l===o&&(l=Sl(f)?f:ia(e[i+1])?[]:{})}ai(u,c,l),u=u[c]}return t}var ko=un?function(t,e){return un.set(t,e),t}:Rh,Eo=Re?function(t,e){return Re(t,"toString",{configurable:!0,enumerable:!1,value:xh(e),writable:!0})}:Rh;function xo(t){return Ia(qf(t))}function Oo(t,e,r){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;var s=n(o);while(++i<o)s[i]=t[i+e];return s}function Io(t,e){var n;return mi(t,(function(t,r,i){return n=e(t,r,i),!n})),!!n}function Co(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e===e&&i<=F){while(r<i){var o=r+i>>>1,s=t[o];null!==s&&!Bl(s)&&(n?s<=e:s<e)?r=o+1:i=o}return i}return Ro(t,e,Rh,n)}function Ro(t,e,n,r){var i=0,s=null==t?0:t.length;if(0===s)return 0;e=n(e);var a=e!==e,u=null===e,c=Bl(e),l=e===o;while(i<s){var f=Me((i+s)/2),h=n(t[f]),p=h!==o,d=null===h,_=h===h,g=Bl(h);if(a)var b=r||_;else b=l?_&&(r||p):u?_&&p&&(r||!d):c?_&&p&&!d&&(r||!g):!d&&!g&&(r?h<=e:h<e);b?i=f+1:s=f}return Fe(s,q)}function jo(t,e){var n=-1,r=t.length,i=0,o=[];while(++n<r){var s=t[n],a=e?e(s):s;if(!n||!nl(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function Ao(t){return"number"==typeof t?t:Bl(t)?U:+t}function To(t){if("string"==typeof t)return t;if(sl(t))return In(t,To)+"";if(Bl(t))return vr?vr.call(t):"";var e=t+"";return"0"==e&&1/t==-L?"-0":e}function Po(t,e,n){var r=-1,i=xn,o=t.length,s=!0,u=[],c=u;if(n)s=!1,i=On;else if(o>=a){var l=e?null:Is(t);if(l)return lr(l);s=!1,i=Zn,c=new $r}else c=e?[]:u;t:while(++r<o){var f=t[r],h=e?e(f):f;if(f=n||0!==f?f:0,s&&h===h){var p=c.length;while(p--)if(c[p]===h)continue t;e&&c.push(h),u.push(f)}else i(c,h,n)||(c!==u&&c.push(h),u.push(f))}return u}function Mo(t,e){return e=Wo(e,t),t=ya(t,e),null==t||delete t[Ra(ru(e))]}function Lo(t,e,n,r){return So(t,e,n(Ti(t,e)),r)}function No(t,e,n,r){var i=t.length,o=r?i:-1;while((r?o--:++o<i)&&e(t[o],o,t));return n?Oo(t,r?0:o,r?o+1:i):Oo(t,r?o+1:0,r?i:o)}function Bo(t,e){var n=t;return n instanceof xr&&(n=n.value()),Rn(e,(function(t,e){return e.func.apply(e.thisArg,Cn([t],e.args))}),n)}function Uo(t,e,r){var i=t.length;if(i<2)return i?Po(t[0]):[];var o=-1,s=n(i);while(++o<i){var a=t[o],u=-1;while(++u<i)u!=o&&(s[o]=yi(s[o]||a,t[u],e,r))}return Po(Oi(s,1),e,r)}function Do(t,e,n){var r=-1,i=t.length,s=e.length,a={};while(++r<i){var u=r<s?e[r]:o;n(a,t[r],u)}return a}function qo(t){return cl(t)?t:[]}function Fo(t){return"function"==typeof t?t:Rh}function Wo(t,e){return sl(t)?t:sa(t,e)?[t]:Ca(Yl(t))}var Vo=yo;function zo(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:Oo(t,e,n)}var Ho=je||function(t){return an.clearTimeout(t)};function Ko(t,e){if(e)return t.slice();var n=t.length,r=we?we(n):new t.constructor(n);return t.copy(r),r}function $o(t){var e=new t.constructor(t.byteLength);return new me(e).set(new me(t)),e}function Qo(t,e){var n=e?$o(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}function Go(t){var e=new t.constructor(t.source,Kt.exec(t));return e.lastIndex=t.lastIndex,e}function Zo(t){return br?ne(br.call(t)):{}}function Yo(t,e){var n=e?$o(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Jo(t,e){if(t!==e){var n=t!==o,r=null===t,i=t===t,s=Bl(t),a=e!==o,u=null===e,c=e===e,l=Bl(e);if(!u&&!l&&!s&&t>e||s&&a&&c&&!u&&!l||r&&a&&c||!n&&c||!i)return 1;if(!r&&!s&&!l&&t<e||l&&n&&i&&!r&&!s||u&&n&&i||!a&&i||!c)return-1}return 0}function Xo(t,e,n){var r=-1,i=t.criteria,o=e.criteria,s=i.length,a=n.length;while(++r<s){var u=Jo(i[r],o[r]);if(u){if(r>=a)return u;var c=n[r];return u*("desc"==c?-1:1)}}return t.index-e.index}function ts(t,e,r,i){var o=-1,s=t.length,a=r.length,u=-1,c=e.length,l=qe(s-a,0),f=n(c+l),h=!i;while(++u<c)f[u]=e[u];while(++o<a)(h||o<s)&&(f[r[o]]=t[o]);while(l--)f[u++]=t[o++];return f}function es(t,e,r,i){var o=-1,s=t.length,a=-1,u=r.length,c=-1,l=e.length,f=qe(s-u,0),h=n(f+l),p=!i;while(++o<f)h[o]=t[o];var d=o;while(++c<l)h[d+c]=e[c];while(++a<u)(p||o<s)&&(h[d+r[a]]=t[o++]);return h}function ns(t,e){var r=-1,i=t.length;e||(e=n(i));while(++r<i)e[r]=t[r];return e}function rs(t,e,n,r){var i=!n;n||(n={});var s=-1,a=e.length;while(++s<a){var u=e[s],c=r?r(n[u],t[u],u,n,t):o;c===o&&(c=t[u]),i?hi(n,u,c):ai(n,u,c)}return n}function is(t,e){return rs(t,$s(t),e)}function os(t,e){return rs(t,Qs(t),e)}function ss(t,e){return function(n,r){var i=sl(n)?mn:ci,o=e?e():{};return i(n,t,Ws(r,2),o)}}function as(t){return yo((function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:o,a=i>2?n[2]:o;s=t.length>3&&"function"==typeof s?(i--,s):o,a&&oa(n[0],n[1],a)&&(s=i<3?o:s,i=1),e=ne(e);while(++r<i){var u=n[r];u&&t(e,u,r,s)}return e}))}function us(t,e){return function(n,r){if(null==n)return n;if(!ul(n))return t(n,r);var i=n.length,o=e?i:-1,s=ne(n);while(e?o--:++o<i)if(!1===r(s[o],o,s))break;return n}}function cs(t){return function(e,n,r){var i=-1,o=ne(e),s=r(e),a=s.length;while(a--){var u=s[t?a:++i];if(!1===n(o[u],u,o))break}return e}}function ls(t,e,n){var r=e&v,i=ps(t);function o(){var e=this&&this!==an&&this instanceof o?i:t;return e.apply(r?n:this,arguments)}return o}function fs(t){return function(e){e=Yl(e);var n=ir(e)?_r(e):o,r=n?n[0]:e.charAt(0),i=n?zo(n,1).join(""):e.slice(1);return r[t]()+i}}function hs(t){return function(e){return Rn(mh($f(e).replace(We,"")),t,"")}}function ps(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Sr(t.prototype),r=t.apply(n,e);return Sl(r)?r:n}}function ds(t,e,r){var i=ps(t);function s(){var a=arguments.length,u=n(a),c=a,l=Fs(s);while(c--)u[c]=arguments[c];var f=a<3&&u[0]!==l&&u[a-1]!==l?[]:cr(u,l);if(a-=f.length,a<r)return xs(t,e,bs,s.placeholder,o,u,f,o,o,r-a);var h=this&&this!==an&&this instanceof s?i:t;return yn(h,this,u)}return s}function _s(t){return function(e,n,r){var i=ne(e);if(!ul(e)){var s=Ws(n,3);e=wf(e),n=function(t){return s(i[t],t,i)}}var a=t(e,n,r);return a>-1?i[s?e[a]:a]:o}}function gs(t){return Ns((function(e){var n=e.length,r=n,i=Er.prototype.thru;t&&e.reverse();while(r--){var s=e[r];if("function"!=typeof s)throw new oe(c);if(i&&!a&&"wrapper"==qs(s))var a=new Er([],!0)}r=a?r:n;while(++r<n){s=e[r];var u=qs(s),l="wrapper"==u?Ds(s):o;a=l&&ua(l[0])&&l[1]==(x|w|k|O)&&!l[4].length&&1==l[9]?a[qs(l[0])].apply(a,l[3]):1==s.length&&ua(s)?a[u]():a.thru(s)}return function(){var t=arguments,r=t[0];if(a&&1==t.length&&sl(r))return a.plant(r).value();var i=0,o=n?e[i].apply(this,t):r;while(++i<n)o=e[i].call(this,o);return o}}))}function bs(t,e,r,i,s,a,u,c,l,f){var h=e&x,p=e&v,d=e&y,_=e&(w|S),g=e&I,b=d?o:ps(t);function m(){var o=arguments.length,v=n(o),y=o;while(y--)v[y]=arguments[y];if(_)var w=Fs(m),S=Xn(v,w);if(i&&(v=ts(v,i,s,_)),a&&(v=es(v,a,u,_)),o-=S,_&&o<f){var k=cr(v,w);return xs(t,e,bs,m.placeholder,r,v,k,c,l,f-o)}var E=p?r:this,x=d?E[t]:t;return o=v.length,c?v=ma(v,c):g&&o>1&&v.reverse(),h&&l<o&&(v.length=l),this&&this!==an&&this instanceof m&&(x=b||ps(x)),x.apply(E,v)}return m}function vs(t,e){return function(n,r){return qi(n,t,e(r),{})}}function ys(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=To(n),r=To(r)):(n=Ao(n),r=Ao(r)),i=t(n,r)}return i}}function ms(t){return Ns((function(e){return e=In(e,Qn(Ws())),yo((function(n){var r=this;return t(e,(function(t){return yn(t,r,n)}))}))}))}function ws(t,e){e=e===o?" ":To(e);var n=e.length;if(n<2)return n?vo(e,t):e;var r=vo(e,Pe(t/dr(e)));return ir(e)?zo(_r(r),0,t).join(""):r.slice(0,t)}function Ss(t,e,r,i){var o=e&v,s=ps(t);function a(){var e=-1,u=arguments.length,c=-1,l=i.length,f=n(l+u),h=this&&this!==an&&this instanceof a?s:t;while(++c<l)f[c]=i[c];while(u--)f[c++]=arguments[++e];return yn(h,o?r:this,f)}return a}function ks(t){return function(e,n,r){return r&&"number"!=typeof r&&oa(e,n,r)&&(n=r=o),e=Hl(e),n===o?(n=e,e=0):n=Hl(n),r=r===o?e<n?1:-1:Hl(r),bo(e,n,r,t)}}function Es(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Ql(e),n=Ql(n)),t(e,n)}}function xs(t,e,n,r,i,s,a,u,c,l){var f=e&w,h=f?a:o,p=f?o:a,d=f?s:o,_=f?o:s;e|=f?k:E,e&=~(f?E:k),e&m||(e&=~(v|y));var g=[t,e,i,d,h,_,p,u,c,l],b=n.apply(o,g);return ua(t)&&Sa(b,g),b.placeholder=r,xa(b,t,e)}function Os(t){var e=ee[t];return function(t,n){if(t=Ql(t),n=null==n?0:Fe(Kl(n),292),n&&Be(t)){var r=(Yl(t)+"e").split("e"),i=e(r[0]+"e"+(+r[1]+n));return r=(Yl(i)+"e").split("e"),+(r[0]+"e"+(+r[1]-n))}return e(t)}}var Is=en&&1/lr(new en([,-0]))[1]==L?function(t){return new en(t)}:Bh;function Cs(t){return function(e){var n=Gs(e);return n==J?ar(e):n==ot?fr(e):$n(e,t(e))}}function Rs(t,e,n,r,i,s,a,u){var l=e&y;if(!l&&"function"!=typeof t)throw new oe(c);var f=r?r.length:0;if(f||(e&=~(k|E),r=i=o),a=a===o?a:qe(Kl(a),0),u=u===o?u:Kl(u),f-=i?i.length:0,e&E){var h=r,p=i;r=i=o}var d=l?o:Ds(t),_=[t,e,n,r,i,h,p,s,a,u];if(d&&_a(_,d),t=_[0],e=_[1],n=_[2],r=_[3],i=_[4],u=_[9]=_[9]===o?l?0:t.length:qe(_[9]-f,0),!u&&e&(w|S)&&(e&=~(w|S)),e&&e!=v)g=e==w||e==S?ds(t,e,u):e!=k&&e!=(v|k)||i.length?bs.apply(o,_):Ss(t,e,n,r);else var g=ls(t,e,n);var b=d?ko:Sa;return xa(b(g,_),t,e)}function js(t,e,n,r){return t===o||nl(t,ue[n])&&!fe.call(r,n)?e:t}function As(t,e,n,r,i,s){return Sl(t)&&Sl(e)&&(s.set(e,t),so(t,e,o,As,s),s["delete"](e)),t}function Ts(t){return Tl(t)?o:t}function Ps(t,e,n,r,i,s){var a=n&g,u=t.length,c=e.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(t),f=s.get(e);if(l&&f)return l==e&&f==t;var h=-1,p=!0,d=n&b?new $r:o;s.set(t,e),s.set(e,t);while(++h<u){var _=t[h],v=e[h];if(r)var y=a?r(v,_,h,e,t,s):r(_,v,h,t,e,s);if(y!==o){if(y)continue;p=!1;break}if(d){if(!An(e,(function(t,e){if(!Zn(d,e)&&(_===t||i(_,t,n,r,s)))return d.push(e)}))){p=!1;break}}else if(_!==v&&!i(_,v,n,r,s)){p=!1;break}}return s["delete"](t),s["delete"](e),p}function Ms(t,e,n,r,i,o,s){switch(n){case ht:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ft:return!(t.byteLength!=e.byteLength||!o(new me(t),new me(e)));case K:case $:case X:return nl(+t,+e);case G:return t.name==e.name&&t.message==e.message;case it:case st:return t==e+"";case J:var a=ar;case ot:var u=r&g;if(a||(a=lr),t.size!=e.size&&!u)return!1;var c=s.get(t);if(c)return c==e;r|=b,s.set(t,e);var l=Ps(a(t),a(e),r,i,o,s);return s["delete"](t),l;case at:if(br)return br.call(t)==br.call(e)}return!1}function Ls(t,e,n,r,i,s){var a=n&g,u=Bs(t),c=u.length,l=Bs(e),f=l.length;if(c!=f&&!a)return!1;var h=c;while(h--){var p=u[h];if(!(a?p in e:fe.call(e,p)))return!1}var d=s.get(t),_=s.get(e);if(d&&_)return d==e&&_==t;var b=!0;s.set(t,e),s.set(e,t);var v=a;while(++h<c){p=u[h];var y=t[p],m=e[p];if(r)var w=a?r(m,y,p,e,t,s):r(y,m,p,t,e,s);if(!(w===o?y===m||i(y,m,n,r,s):w)){b=!1;break}v||(v="constructor"==p)}if(b&&!v){var S=t.constructor,k=e.constructor;S==k||!("constructor"in t)||!("constructor"in e)||"function"==typeof S&&S instanceof S&&"function"==typeof k&&k instanceof k||(b=!1)}return s["delete"](t),s["delete"](e),b}function Ns(t){return Ea(va(t,o,Ka),t+"")}function Bs(t){return Pi(t,wf,$s)}function Us(t){return Pi(t,Sf,Qs)}var Ds=un?function(t){return un.get(t)}:Bh;function qs(t){var e=t.name+"",n=cn[e],r=fe.call(cn,e)?n.length:0;while(r--){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Fs(t){var e=fe.call(mr,"placeholder")?mr:t;return e.placeholder}function Ws(){var t=mr.iteratee||jh;return t=t===jh?Xi:t,arguments.length?t(arguments[0],arguments[1]):t}function Vs(t,e){var n=t.__data__;return aa(e)?n["string"==typeof e?"string":"hash"]:n.map}function zs(t){var e=wf(t),n=e.length;while(n--){var r=e[n],i=t[r];e[n]=[r,i,ha(i)]}return e}function Hs(t,e){var n=rr(t,e);return Gi(n)?n:o}function Ks(t){var e=fe.call(t,Ce),n=t[Ce];try{t[Ce]=o;var r=!0}catch(s){}var i=de.call(t);return r&&(e?t[Ce]=n:delete t[Ce]),i}var $s=Le?function(t){return null==t?[]:(t=ne(t),En(Le(t),(function(e){return Ee.call(t,e)})))}:Kh,Qs=Le?function(t){var e=[];while(t)Cn(e,$s(t)),t=Se(t);return e}:Kh,Gs=Mi;function Zs(t,e,n){var r=-1,i=n.length;while(++r<i){var o=n[r],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=Fe(e,t+s);break;case"takeRight":t=qe(t,e-s);break}}return{start:t,end:e}}function Ys(t){var e=t.match(Ft);return e?e[1].split(Wt):[]}function Js(t,e,n){e=Wo(e,t);var r=-1,i=e.length,o=!1;while(++r<i){var s=Ra(e[r]);if(!(o=null!=t&&n(t,s)))break;t=t[s]}return o||++r!=i?o:(i=null==t?0:t.length,!!i&&wl(i)&&ia(s,i)&&(sl(t)||ol(t)))}function Xs(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&fe.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function ta(t){return"function"!=typeof t.constructor||fa(t)?{}:Sr(Se(t))}function ea(t,e,n){var r=t.constructor;switch(e){case ft:return $o(t);case K:case $:return new r(+t);case ht:return Qo(t,n);case pt:case dt:case _t:case gt:case bt:case vt:case yt:case mt:case wt:return Yo(t,n);case J:return new r;case X:case st:return new r(t);case it:return Go(t);case ot:return new r;case at:return Zo(t)}}function na(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(qt,"{\n/* [wrapped with "+e+"] */\n")}function ra(t){return sl(t)||ol(t)||!!(Oe&&t&&t[Oe])}function ia(t,e){var n=typeof t;return e=null==e?N:e,!!e&&("number"==n||"symbol"!=n&&Yt.test(t))&&t>-1&&t%1==0&&t<e}function oa(t,e,n){if(!Sl(n))return!1;var r=typeof e;return!!("number"==r?ul(n)&&ia(e,n.length):"string"==r&&e in n)&&nl(n[e],t)}function sa(t,e){if(sl(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Bl(t))||(Pt.test(t)||!Tt.test(t)||null!=e&&t in ne(e))}function aa(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function ua(t){var e=qs(t),n=mr[e];if("function"!=typeof n||!(e in xr.prototype))return!1;if(t===n)return!0;var r=Ds(n);return!!r&&t===r[0]}function ca(t){return!!pe&&pe in t}(Je&&Gs(new Je(new ArrayBuffer(1)))!=ht||Xe&&Gs(new Xe)!=J||tn&&Gs(tn.resolve())!=nt||en&&Gs(new en)!=ot||on&&Gs(new on)!=ct)&&(Gs=function(t){var e=Mi(t),n=e==et?t.constructor:o,r=n?ja(n):"";if(r)switch(r){case fn:return ht;case hn:return J;case Tn:return nt;case Pn:return ot;case Wn:return ct}return e});var la=ce?yl:$h;function fa(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||ue;return t===n}function ha(t){return t===t&&!Sl(t)}function pa(t,e){return function(n){return null!=n&&(n[t]===e&&(e!==o||t in ne(n)))}}function da(t){var e=Uc(t,(function(t){return n.size===f&&n.clear(),t})),n=e.cache;return e}function _a(t,e){var n=t[1],r=e[1],i=n|r,o=i<(v|y|x),s=r==x&&n==w||r==x&&n==O&&t[7].length<=e[8]||r==(x|O)&&e[7].length<=e[8]&&n==w;if(!o&&!s)return t;r&v&&(t[2]=e[2],i|=n&v?0:m);var a=e[3];if(a){var u=t[3];t[3]=u?ts(u,a,e[4]):a,t[4]=u?cr(t[3],h):e[4]}return a=e[5],a&&(u=t[5],t[5]=u?es(u,a,e[6]):a,t[6]=u?cr(t[5],h):e[6]),a=e[7],a&&(t[7]=a),r&x&&(t[8]=null==t[8]?e[8]:Fe(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}function ga(t){var e=[];if(null!=t)for(var n in ne(t))e.push(n);return e}function ba(t){return de.call(t)}function va(t,e,r){return e=qe(e===o?t.length-1:e,0),function(){var i=arguments,o=-1,s=qe(i.length-e,0),a=n(s);while(++o<s)a[o]=i[e+o];o=-1;var u=n(e+1);while(++o<e)u[o]=i[o];return u[e]=r(a),yn(t,this,u)}}function ya(t,e){return e.length<2?t:Ti(t,Oo(e,0,-1))}function ma(t,e){var n=t.length,r=Fe(e.length,n),i=ns(t);while(r--){var s=e[r];t[r]=ia(s,n)?i[s]:o}return t}function wa(t,e){if(("constructor"!==e||"function"!==typeof t[e])&&"__proto__"!=e)return t[e]}var Sa=Oa(ko),ka=Te||function(t,e){return an.setTimeout(t,e)},Ea=Oa(Eo);function xa(t,e,n){var r=e+"";return Ea(t,na(r,Aa(Ys(r),n)))}function Oa(t){var e=0,n=0;return function(){var r=ze(),i=A-(r-n);if(n=r,i>0){if(++e>=j)return arguments[0]}else e=0;return t.apply(o,arguments)}}function Ia(t,e){var n=-1,r=t.length,i=r-1;e=e===o?r:e;while(++n<e){var s=go(n,i),a=t[s];t[s]=t[n],t[n]=a}return t.length=e,t}var Ca=da((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Mt,(function(t,n,r,i){e.push(r?i.replace(zt,"$1"):n||t)})),e}));function Ra(t){if("string"==typeof t||Bl(t))return t;var e=t+"";return"0"==e&&1/t==-L?"-0":e}function ja(t){if(null!=t){try{return le.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Aa(t,e){return wn(W,(function(n){var r="_."+n[0];e&n[1]&&!xn(t,r)&&t.push(r)})),t.sort()}function Ta(t){if(t instanceof xr)return t.clone();var e=new Er(t.__wrapped__,t.__chain__);return e.__actions__=ns(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function Pa(t,e,r){e=(r?oa(t,e,r):e===o)?1:qe(Kl(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];var s=0,a=0,u=n(Pe(i/e));while(s<i)u[a++]=Oo(t,s,s+=e);return u}function Ma(t){var e=-1,n=null==t?0:t.length,r=0,i=[];while(++e<n){var o=t[e];o&&(i[r++]=o)}return i}function La(){var t=arguments.length;if(!t)return[];var e=n(t-1),r=arguments[0],i=t;while(i--)e[i-1]=arguments[i];return Cn(sl(r)?ns(r):[r],Oi(e,1))}var Na=yo((function(t,e){return cl(t)?yi(t,Oi(e,1,cl,!0)):[]})),Ba=yo((function(t,e){var n=ru(e);return cl(n)&&(n=o),cl(t)?yi(t,Oi(e,1,cl,!0),Ws(n,2)):[]})),Ua=yo((function(t,e){var n=ru(e);return cl(n)&&(n=o),cl(t)?yi(t,Oi(e,1,cl,!0),o,n):[]}));function Da(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===o?1:Kl(e),Oo(t,e<0?0:e,r)):[]}function qa(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===o?1:Kl(e),e=r-e,Oo(t,0,e<0?0:e)):[]}function Fa(t,e){return t&&t.length?No(t,Ws(e,3),!0,!0):[]}function Wa(t,e){return t&&t.length?No(t,Ws(e,3),!0):[]}function Va(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&oa(t,e,n)&&(n=0,r=i),Ei(t,e,n,r)):[]}function za(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Kl(n);return i<0&&(i=qe(r+i,0)),Nn(t,Ws(e,3),i)}function Ha(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=Kl(n),i=n<0?qe(r+i,0):Fe(i,r-1)),Nn(t,Ws(e,3),i,!0)}function Ka(t){var e=null==t?0:t.length;return e?Oi(t,1):[]}function $a(t){var e=null==t?0:t.length;return e?Oi(t,L):[]}function Qa(t,e){var n=null==t?0:t.length;return n?(e=e===o?1:Kl(e),Oi(t,e)):[]}function Ga(t){var e=-1,n=null==t?0:t.length,r={};while(++e<n){var i=t[e];r[i[0]]=i[1]}return r}function Za(t){return t&&t.length?t[0]:o}function Ya(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Kl(n);return i<0&&(i=qe(r+i,0)),Bn(t,e,i)}function Ja(t){var e=null==t?0:t.length;return e?Oo(t,0,-1):[]}var Xa=yo((function(t){var e=In(t,qo);return e.length&&e[0]===t[0]?Di(e):[]})),tu=yo((function(t){var e=ru(t),n=In(t,qo);return e===ru(n)?e=o:n.pop(),n.length&&n[0]===t[0]?Di(n,Ws(e,2)):[]})),eu=yo((function(t){var e=ru(t),n=In(t,qo);return e="function"==typeof e?e:o,e&&n.pop(),n.length&&n[0]===t[0]?Di(n,o,e):[]}));function nu(t,e){return null==t?"":Ue.call(t,e)}function ru(t){var e=null==t?0:t.length;return e?t[e-1]:o}function iu(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=Kl(n),i=i<0?qe(r+i,0):Fe(i,r-1)),e===e?pr(t,e,i):Nn(t,Dn,i,!0)}function ou(t,e){return t&&t.length?uo(t,Kl(e)):o}var su=yo(au);function au(t,e){return t&&t.length&&e&&e.length?po(t,e):t}function uu(t,e,n){return t&&t.length&&e&&e.length?po(t,e,Ws(n,2)):t}function cu(t,e,n){return t&&t.length&&e&&e.length?po(t,e,o,n):t}var lu=Ns((function(t,e){var n=null==t?0:t.length,r=pi(t,e);return _o(t,In(e,(function(t){return ia(t,n)?+t:t})).sort(Jo)),r}));function fu(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;e=Ws(e,3);while(++r<o){var s=t[r];e(s,r,t)&&(n.push(s),i.push(r))}return _o(t,i),n}function hu(t){return null==t?t:$e.call(t)}function pu(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&oa(t,e,n)?(e=0,n=r):(e=null==e?0:Kl(e),n=n===o?r:Kl(n)),Oo(t,e,n)):[]}function du(t,e){return Co(t,e)}function _u(t,e,n){return Ro(t,e,Ws(n,2))}function gu(t,e){var n=null==t?0:t.length;if(n){var r=Co(t,e);if(r<n&&nl(t[r],e))return r}return-1}function bu(t,e){return Co(t,e,!0)}function vu(t,e,n){return Ro(t,e,Ws(n,2),!0)}function yu(t,e){var n=null==t?0:t.length;if(n){var r=Co(t,e,!0)-1;if(nl(t[r],e))return r}return-1}function mu(t){return t&&t.length?jo(t):[]}function wu(t,e){return t&&t.length?jo(t,Ws(e,2)):[]}function Su(t){var e=null==t?0:t.length;return e?Oo(t,1,e):[]}function ku(t,e,n){return t&&t.length?(e=n||e===o?1:Kl(e),Oo(t,0,e<0?0:e)):[]}function Eu(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===o?1:Kl(e),e=r-e,Oo(t,e<0?0:e,r)):[]}function xu(t,e){return t&&t.length?No(t,Ws(e,3),!1,!0):[]}function Ou(t,e){return t&&t.length?No(t,Ws(e,3)):[]}var Iu=yo((function(t){return Po(Oi(t,1,cl,!0))})),Cu=yo((function(t){var e=ru(t);return cl(e)&&(e=o),Po(Oi(t,1,cl,!0),Ws(e,2))})),Ru=yo((function(t){var e=ru(t);return e="function"==typeof e?e:o,Po(Oi(t,1,cl,!0),o,e)}));function ju(t){return t&&t.length?Po(t):[]}function Au(t,e){return t&&t.length?Po(t,Ws(e,2)):[]}function Tu(t,e){return e="function"==typeof e?e:o,t&&t.length?Po(t,o,e):[]}function Pu(t){if(!t||!t.length)return[];var e=0;return t=En(t,(function(t){if(cl(t))return e=qe(t.length,e),!0})),Kn(e,(function(e){return In(t,Fn(e))}))}function Mu(t,e){if(!t||!t.length)return[];var n=Pu(t);return null==e?n:In(n,(function(t){return yn(e,o,t)}))}var Lu=yo((function(t,e){return cl(t)?yi(t,e):[]})),Nu=yo((function(t){return Uo(En(t,cl))})),Bu=yo((function(t){var e=ru(t);return cl(e)&&(e=o),Uo(En(t,cl),Ws(e,2))})),Uu=yo((function(t){var e=ru(t);return e="function"==typeof e?e:o,Uo(En(t,cl),o,e)})),Du=yo(Pu);function qu(t,e){return Do(t||[],e||[],ai)}function Fu(t,e){return Do(t||[],e||[],So)}var Wu=yo((function(t){var e=t.length,n=e>1?t[e-1]:o;return n="function"==typeof n?(t.pop(),n):o,Mu(t,n)}));function Vu(t){var e=mr(t);return e.__chain__=!0,e}function zu(t,e){return e(t),t}function Hu(t,e){return e(t)}var Ku=Ns((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return pi(e,t)};return!(e>1||this.__actions__.length)&&r instanceof xr&&ia(n)?(r=r.slice(n,+n+(e?1:0)),r.__actions__.push({func:Hu,args:[i],thisArg:o}),new Er(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(o),t}))):this.thru(i)}));function $u(){return Vu(this)}function Qu(){return new Er(this.value(),this.__chain__)}function Gu(){this.__values__===o&&(this.__values__=zl(this.value()));var t=this.__index__>=this.__values__.length,e=t?o:this.__values__[this.__index__++];return{done:t,value:e}}function Zu(){return this}function Yu(t){var e,n=this;while(n instanceof kr){var r=Ta(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e}function Ju(){var t=this.__wrapped__;if(t instanceof xr){var e=t;return this.__actions__.length&&(e=new xr(this)),e=e.reverse(),e.__actions__.push({func:Hu,args:[hu],thisArg:o}),new Er(e,this.__chain__)}return this.thru(hu)}function Xu(){return Bo(this.__wrapped__,this.__actions__)}var tc=ss((function(t,e,n){fe.call(t,n)?++t[n]:hi(t,n,1)}));function ec(t,e,n){var r=sl(t)?kn:Si;return n&&oa(t,e,n)&&(e=o),r(t,Ws(e,3))}function nc(t,e){var n=sl(t)?En:xi;return n(t,Ws(e,3))}var rc=_s(za),ic=_s(Ha);function oc(t,e){return Oi(dc(t,e),1)}function sc(t,e){return Oi(dc(t,e),L)}function ac(t,e,n){return n=n===o?1:Kl(n),Oi(dc(t,e),n)}function uc(t,e){var n=sl(t)?wn:mi;return n(t,Ws(e,3))}function cc(t,e){var n=sl(t)?Sn:wi;return n(t,Ws(e,3))}var lc=ss((function(t,e,n){fe.call(t,n)?t[n].push(e):hi(t,n,[e])}));function fc(t,e,n,r){t=ul(t)?t:qf(t),n=n&&!r?Kl(n):0;var i=t.length;return n<0&&(n=qe(i+n,0)),Nl(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Bn(t,e,n)>-1}var hc=yo((function(t,e,r){var i=-1,o="function"==typeof e,s=ul(t)?n(t.length):[];return mi(t,(function(t){s[++i]=o?yn(e,t,r):Fi(t,e,r)})),s})),pc=ss((function(t,e,n){hi(t,n,e)}));function dc(t,e){var n=sl(t)?In:ro;return n(t,Ws(e,3))}function _c(t,e,n,r){return null==t?[]:(sl(e)||(e=null==e?[]:[e]),n=r?o:n,sl(n)||(n=null==n?[]:[n]),co(t,e,n))}var gc=ss((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));function bc(t,e,n){var r=sl(t)?Rn:Vn,i=arguments.length<3;return r(t,Ws(e,4),n,i,mi)}function vc(t,e,n){var r=sl(t)?jn:Vn,i=arguments.length<3;return r(t,Ws(e,4),n,i,wi)}function yc(t,e){var n=sl(t)?En:xi;return n(t,Dc(Ws(e,3)))}function mc(t){var e=sl(t)?ri:mo;return e(t)}function wc(t,e,n){e=(n?oa(t,e,n):e===o)?1:Kl(e);var r=sl(t)?ii:wo;return r(t,e)}function Sc(t){var e=sl(t)?oi:xo;return e(t)}function kc(t){if(null==t)return 0;if(ul(t))return Nl(t)?dr(t):t.length;var e=Gs(t);return e==J||e==ot?t.size:to(t).length}function Ec(t,e,n){var r=sl(t)?An:Io;return n&&oa(t,e,n)&&(e=o),r(t,Ws(e,3))}var xc=yo((function(t,e){if(null==t)return[];var n=e.length;return n>1&&oa(t,e[0],e[1])?e=[]:n>2&&oa(e[0],e[1],e[2])&&(e=[e[0]]),co(t,Oi(e,1),[])})),Oc=Ae||function(){return an.Date.now()};function Ic(t,e){if("function"!=typeof e)throw new oe(c);return t=Kl(t),function(){if(--t<1)return e.apply(this,arguments)}}function Cc(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,Rs(t,x,o,o,o,o,e)}function Rc(t,e){var n;if("function"!=typeof e)throw new oe(c);return t=Kl(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var jc=yo((function(t,e,n){var r=v;if(n.length){var i=cr(n,Fs(jc));r|=k}return Rs(t,r,e,n,i)})),Ac=yo((function(t,e,n){var r=v|y;if(n.length){var i=cr(n,Fs(Ac));r|=k}return Rs(e,r,t,n,i)}));function Tc(t,e,n){e=n?o:e;var r=Rs(t,w,o,o,o,o,o,e);return r.placeholder=Tc.placeholder,r}function Pc(t,e,n){e=n?o:e;var r=Rs(t,S,o,o,o,o,o,e);return r.placeholder=Pc.placeholder,r}function Mc(t,e,n){var r,i,s,a,u,l,f=0,h=!1,p=!1,d=!0;if("function"!=typeof t)throw new oe(c);function _(e){var n=r,s=i;return r=i=o,f=e,a=t.apply(s,n),a}function g(t){return f=t,u=ka(y,e),h?_(t):a}function b(t){var n=t-l,r=t-f,i=e-n;return p?Fe(i,s-r):i}function v(t){var n=t-l,r=t-f;return l===o||n>=e||n<0||p&&r>=s}function y(){var t=Oc();if(v(t))return m(t);u=ka(y,b(t))}function m(t){return u=o,d&&r?_(t):(r=i=o,a)}function w(){u!==o&&Ho(u),f=0,r=l=i=u=o}function S(){return u===o?a:m(Oc())}function k(){var t=Oc(),n=v(t);if(r=arguments,i=this,l=t,n){if(u===o)return g(l);if(p)return Ho(u),u=ka(y,e),_(l)}return u===o&&(u=ka(y,e)),a}return e=Ql(e)||0,Sl(n)&&(h=!!n.leading,p="maxWait"in n,s=p?qe(Ql(n.maxWait)||0,e):s,d="trailing"in n?!!n.trailing:d),k.cancel=w,k.flush=S,k}var Lc=yo((function(t,e){return vi(t,1,e)})),Nc=yo((function(t,e,n){return vi(t,Ql(e)||0,n)}));function Bc(t){return Rs(t,I)}function Uc(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new oe(c);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Uc.Cache||Fr),n}function Dc(t){if("function"!=typeof t)throw new oe(c);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function qc(t){return Rc(2,t)}Uc.Cache=Fr;var Fc=Vo((function(t,e){e=1==e.length&&sl(e[0])?In(e[0],Qn(Ws())):In(Oi(e,1),Qn(Ws()));var n=e.length;return yo((function(r){var i=-1,o=Fe(r.length,n);while(++i<o)r[i]=e[i].call(this,r[i]);return yn(t,this,r)}))})),Wc=yo((function(t,e){var n=cr(e,Fs(Wc));return Rs(t,k,o,e,n)})),Vc=yo((function(t,e){var n=cr(e,Fs(Vc));return Rs(t,E,o,e,n)})),zc=Ns((function(t,e){return Rs(t,O,o,o,o,e)}));function Hc(t,e){if("function"!=typeof t)throw new oe(c);return e=e===o?e:Kl(e),yo(t,e)}function Kc(t,e){if("function"!=typeof t)throw new oe(c);return e=null==e?0:qe(Kl(e),0),yo((function(n){var r=n[e],i=zo(n,0,e);return r&&Cn(i,r),yn(t,this,i)}))}function $c(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new oe(c);return Sl(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Mc(t,e,{leading:r,maxWait:e,trailing:i})}function Qc(t){return Cc(t,1)}function Gc(t,e){return Wc(Fo(e),t)}function Zc(){if(!arguments.length)return[];var t=arguments[0];return sl(t)?t:[t]}function Yc(t){return _i(t,_)}function Jc(t,e){return e="function"==typeof e?e:o,_i(t,_,e)}function Xc(t){return _i(t,p|_)}function tl(t,e){return e="function"==typeof e?e:o,_i(t,p|_,e)}function el(t,e){return null==e||bi(t,e,wf(e))}function nl(t,e){return t===e||t!==t&&e!==e}var rl=Es(Li),il=Es((function(t,e){return t>=e})),ol=Wi(function(){return arguments}())?Wi:function(t){return kl(t)&&fe.call(t,"callee")&&!Ee.call(t,"callee")},sl=n.isArray,al=pn?Qn(pn):Vi;function ul(t){return null!=t&&wl(t.length)&&!yl(t)}function cl(t){return kl(t)&&ul(t)}function ll(t){return!0===t||!1===t||kl(t)&&Mi(t)==K}var fl=Ne||$h,hl=dn?Qn(dn):zi;function pl(t){return kl(t)&&1===t.nodeType&&!Tl(t)}function dl(t){if(null==t)return!0;if(ul(t)&&(sl(t)||"string"==typeof t||"function"==typeof t.splice||fl(t)||Ul(t)||ol(t)))return!t.length;var e=Gs(t);if(e==J||e==ot)return!t.size;if(fa(t))return!to(t).length;for(var n in t)if(fe.call(t,n))return!1;return!0}function _l(t,e){return Hi(t,e)}function gl(t,e,n){n="function"==typeof n?n:o;var r=n?n(t,e):o;return r===o?Hi(t,e,o,n):!!r}function bl(t){if(!kl(t))return!1;var e=Mi(t);return e==G||e==Q||"string"==typeof t.message&&"string"==typeof t.name&&!Tl(t)}function vl(t){return"number"==typeof t&&Be(t)}function yl(t){if(!Sl(t))return!1;var e=Mi(t);return e==Z||e==Y||e==H||e==rt}function ml(t){return"number"==typeof t&&t==Kl(t)}function wl(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=N}function Sl(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function kl(t){return null!=t&&"object"==typeof t}var El=_n?Qn(_n):$i;function xl(t,e){return t===e||Qi(t,e,zs(e))}function Ol(t,e,n){return n="function"==typeof n?n:o,Qi(t,e,zs(e),n)}function Il(t){return Al(t)&&t!=+t}function Cl(t){if(la(t))throw new i(u);return Gi(t)}function Rl(t){return null===t}function jl(t){return null==t}function Al(t){return"number"==typeof t||kl(t)&&Mi(t)==X}function Tl(t){if(!kl(t)||Mi(t)!=et)return!1;var e=Se(t);if(null===e)return!0;var n=fe.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&le.call(n)==_e}var Pl=gn?Qn(gn):Zi;function Ml(t){return ml(t)&&t>=-N&&t<=N}var Ll=bn?Qn(bn):Yi;function Nl(t){return"string"==typeof t||!sl(t)&&kl(t)&&Mi(t)==st}function Bl(t){return"symbol"==typeof t||kl(t)&&Mi(t)==at}var Ul=vn?Qn(vn):Ji;function Dl(t){return t===o}function ql(t){return kl(t)&&Gs(t)==ct}function Fl(t){return kl(t)&&Mi(t)==lt}var Wl=Es(no),Vl=Es((function(t,e){return t<=e}));function zl(t){if(!t)return[];if(ul(t))return Nl(t)?_r(t):ns(t);if(Ie&&t[Ie])return sr(t[Ie]());var e=Gs(t),n=e==J?ar:e==ot?lr:qf;return n(t)}function Hl(t){if(!t)return 0===t?t:0;if(t=Ql(t),t===L||t===-L){var e=t<0?-1:1;return e*B}return t===t?t:0}function Kl(t){var e=Hl(t),n=e%1;return e===e?n?e-n:e:0}function $l(t){return t?di(Kl(t),0,D):0}function Ql(t){if("number"==typeof t)return t;if(Bl(t))return U;if(Sl(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Sl(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Bt,"");var n=Qt.test(t);return n||Zt.test(t)?rn(t.slice(2),n?2:8):$t.test(t)?U:+t}function Gl(t){return rs(t,Sf(t))}function Zl(t){return t?di(Kl(t),-N,N):0===t?t:0}function Yl(t){return null==t?"":To(t)}var Jl=as((function(t,e){if(fa(e)||ul(e))rs(e,wf(e),t);else for(var n in e)fe.call(e,n)&&ai(t,n,e[n])})),Xl=as((function(t,e){rs(e,Sf(e),t)})),tf=as((function(t,e,n,r){rs(e,Sf(e),t,r)})),ef=as((function(t,e,n,r){rs(e,wf(e),t,r)})),nf=Ns(pi);function rf(t,e){var n=Sr(t);return null==e?n:li(n,e)}var of=yo((function(t,e){t=ne(t);var n=-1,r=e.length,i=r>2?e[2]:o;i&&oa(e[0],e[1],i)&&(r=1);while(++n<r){var s=e[n],a=Sf(s),u=-1,c=a.length;while(++u<c){var l=a[u],f=t[l];(f===o||nl(f,ue[l])&&!fe.call(t,l))&&(t[l]=s[l])}}return t})),sf=yo((function(t){return t.push(o,As),yn(Of,o,t)}));function af(t,e){return Ln(t,Ws(e,3),Ri)}function uf(t,e){return Ln(t,Ws(e,3),ji)}function cf(t,e){return null==t?t:Ii(t,Ws(e,3),Sf)}function lf(t,e){return null==t?t:Ci(t,Ws(e,3),Sf)}function ff(t,e){return t&&Ri(t,Ws(e,3))}function hf(t,e){return t&&ji(t,Ws(e,3))}function pf(t){return null==t?[]:Ai(t,wf(t))}function df(t){return null==t?[]:Ai(t,Sf(t))}function _f(t,e,n){var r=null==t?o:Ti(t,e);return r===o?n:r}function gf(t,e){return null!=t&&Js(t,e,Ni)}function bf(t,e){return null!=t&&Js(t,e,Bi)}var vf=vs((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),t[e]=n}),xh(Rh)),yf=vs((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),fe.call(t,e)?t[e].push(n):t[e]=[n]}),Ws),mf=yo(Fi);function wf(t){return ul(t)?ni(t):to(t)}function Sf(t){return ul(t)?ni(t,!0):eo(t)}function kf(t,e){var n={};return e=Ws(e,3),Ri(t,(function(t,r,i){hi(n,e(t,r,i),t)})),n}function Ef(t,e){var n={};return e=Ws(e,3),Ri(t,(function(t,r,i){hi(n,r,e(t,r,i))})),n}var xf=as((function(t,e,n){so(t,e,n)})),Of=as((function(t,e,n,r){so(t,e,n,r)})),If=Ns((function(t,e){var n={};if(null==t)return n;var r=!1;e=In(e,(function(e){return e=Wo(e,t),r||(r=e.length>1),e})),rs(t,Us(t),n),r&&(n=_i(n,p|d|_,Ts));var i=e.length;while(i--)Mo(n,e[i]);return n}));function Cf(t,e){return jf(t,Dc(Ws(e)))}var Rf=Ns((function(t,e){return null==t?{}:lo(t,e)}));function jf(t,e){if(null==t)return{};var n=In(Us(t),(function(t){return[t]}));return e=Ws(e),fo(t,n,(function(t,n){return e(t,n[0])}))}function Af(t,e,n){e=Wo(e,t);var r=-1,i=e.length;i||(i=1,t=o);while(++r<i){var s=null==t?o:t[Ra(e[r])];s===o&&(r=i,s=n),t=yl(s)?s.call(t):s}return t}function Tf(t,e,n){return null==t?t:So(t,e,n)}function Pf(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:So(t,e,n,r)}var Mf=Cs(wf),Lf=Cs(Sf);function Nf(t,e,n){var r=sl(t),i=r||fl(t)||Ul(t);if(e=Ws(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Sl(t)&&yl(o)?Sr(Se(t)):{}}return(i?wn:Ri)(t,(function(t,r,i){return e(n,t,r,i)})),n}function Bf(t,e){return null==t||Mo(t,e)}function Uf(t,e,n){return null==t?t:Lo(t,e,Fo(n))}function Df(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Lo(t,e,Fo(n),r)}function qf(t){return null==t?[]:Gn(t,wf(t))}function Ff(t){return null==t?[]:Gn(t,Sf(t))}function Wf(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=Ql(n),n=n===n?n:0),e!==o&&(e=Ql(e),e=e===e?e:0),di(Ql(t),e,n)}function Vf(t,e,n){return e=Hl(e),n===o?(n=e,e=0):n=Hl(n),t=Ql(t),Ui(t,e,n)}function zf(t,e,n){if(n&&"boolean"!=typeof n&&oa(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=Hl(t),e===o?(e=t,t=0):e=Hl(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Ke();return Fe(t+i*(e-t+nn("1e-"+((i+"").length-1))),e)}return go(t,e)}var Hf=hs((function(t,e,n){return e=e.toLowerCase(),t+(n?Kf(e):e)}));function Kf(t){return yh(Yl(t).toLowerCase())}function $f(t){return t=Yl(t),t&&t.replace(Jt,tr).replace(Ve,"")}function Qf(t,e,n){t=Yl(t),e=To(e);var r=t.length;n=n===o?r:di(Kl(n),0,r);var i=n;return n-=e.length,n>=0&&t.slice(n,i)==e}function Gf(t){return t=Yl(t),t&&Ct.test(t)?t.replace(Ot,er):t}function Zf(t){return t=Yl(t),t&&Nt.test(t)?t.replace(Lt,"\\$&"):t}var Yf=hs((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Jf=hs((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Xf=fs("toLowerCase");function th(t,e,n){t=Yl(t),e=Kl(e);var r=e?dr(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return ws(Me(i),n)+t+ws(Pe(i),n)}function eh(t,e,n){t=Yl(t),e=Kl(e);var r=e?dr(t):0;return e&&r<e?t+ws(e-r,n):t}function nh(t,e,n){t=Yl(t),e=Kl(e);var r=e?dr(t):0;return e&&r<e?ws(e-r,n)+t:t}function rh(t,e,n){return n||null==e?e=0:e&&(e=+e),He(Yl(t).replace(Ut,""),e||0)}function ih(t,e,n){return e=(n?oa(t,e,n):e===o)?1:Kl(e),vo(Yl(t),e)}function oh(){var t=arguments,e=Yl(t[0]);return t.length<3?e:e.replace(t[1],t[2])}var sh=hs((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));function ah(t,e,n){return n&&"number"!=typeof n&&oa(t,e,n)&&(e=n=o),n=n===o?D:n>>>0,n?(t=Yl(t),t&&("string"==typeof e||null!=e&&!Pl(e))&&(e=To(e),!e&&ir(t))?zo(_r(t),0,n):t.split(e,n)):[]}var uh=hs((function(t,e,n){return t+(n?" ":"")+yh(e)}));function ch(t,e,n){return t=Yl(t),n=null==n?0:di(Kl(n),0,t.length),e=To(e),t.slice(n,n+e.length)==e}function lh(t,e,n){var r=mr.templateSettings;n&&oa(t,e,n)&&(e=o),t=Yl(t),e=tf({},e,r,js);var i,s,a=tf({},e.imports,r.imports,js),u=wf(a),c=Gn(a,u),l=0,f=e.interpolate||Xt,h="__p += '",p=re((e.escape||Xt).source+"|"+f.source+"|"+(f===At?Ht:Xt).source+"|"+(e.evaluate||Xt).source+"|$","g"),d="//# sourceURL="+(fe.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ge+"]")+"\n";t.replace(p,(function(e,n,r,o,a,u){return r||(r=o),h+=t.slice(l,u).replace(te,nr),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),a&&(s=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e})),h+="';\n";var _=fe.call(e,"variable")&&e.variable;_||(h="with (obj) {\n"+h+"\n}\n"),h=(s?h.replace(St,""):h).replace(kt,"$1").replace(Et,"$1;"),h="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=wh((function(){return Vt(u,d+"return "+h).apply(o,c)}));if(g.source=h,bl(g))throw g;return g}function fh(t){return Yl(t).toLowerCase()}function hh(t){return Yl(t).toUpperCase()}function ph(t,e,n){if(t=Yl(t),t&&(n||e===o))return t.replace(Bt,"");if(!t||!(e=To(e)))return t;var r=_r(t),i=_r(e),s=Yn(r,i),a=Jn(r,i)+1;return zo(r,s,a).join("")}function dh(t,e,n){if(t=Yl(t),t&&(n||e===o))return t.replace(Dt,"");if(!t||!(e=To(e)))return t;var r=_r(t),i=Jn(r,_r(e))+1;return zo(r,0,i).join("")}function _h(t,e,n){if(t=Yl(t),t&&(n||e===o))return t.replace(Ut,"");if(!t||!(e=To(e)))return t;var r=_r(t),i=Yn(r,_r(e));return zo(r,i).join("")}function gh(t,e){var n=C,r=R;if(Sl(e)){var i="separator"in e?e.separator:i;n="length"in e?Kl(e.length):n,r="omission"in e?To(e.omission):r}t=Yl(t);var s=t.length;if(ir(t)){var a=_r(t);s=a.length}if(n>=s)return t;var u=n-dr(r);if(u<1)return r;var c=a?zo(a,0,u).join(""):t.slice(0,u);if(i===o)return c+r;if(a&&(u+=c.length-u),Pl(i)){if(t.slice(u).search(i)){var l,f=c;i.global||(i=re(i.source,Yl(Kt.exec(i))+"g")),i.lastIndex=0;while(l=i.exec(f))var h=l.index;c=c.slice(0,h===o?u:h)}}else if(t.indexOf(To(i),u)!=u){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+r}function bh(t){return t=Yl(t),t&&It.test(t)?t.replace(xt,gr):t}var vh=hs((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),yh=fs("toUpperCase");function mh(t,e,n){return t=Yl(t),e=n?o:e,e===o?or(t)?yr(t):Mn(t):t.match(e)||[]}var wh=yo((function(t,e){try{return yn(t,o,e)}catch(n){return bl(n)?n:new i(n)}})),Sh=Ns((function(t,e){return wn(e,(function(e){e=Ra(e),hi(t,e,jc(t[e],t))})),t}));function kh(t){var e=null==t?0:t.length,n=Ws();return t=e?In(t,(function(t){if("function"!=typeof t[1])throw new oe(c);return[n(t[0]),t[1]]})):[],yo((function(n){var r=-1;while(++r<e){var i=t[r];if(yn(i[0],this,n))return yn(i[1],this,n)}}))}function Eh(t){return gi(_i(t,p))}function xh(t){return function(){return t}}function Oh(t,e){return null==t||t!==t?e:t}var Ih=gs(),Ch=gs(!0);function Rh(t){return t}function jh(t){return Xi("function"==typeof t?t:_i(t,p))}function Ah(t){return io(_i(t,p))}function Th(t,e){return oo(t,_i(e,p))}var Ph=yo((function(t,e){return function(n){return Fi(n,t,e)}})),Mh=yo((function(t,e){return function(n){return Fi(t,n,e)}}));function Lh(t,e,n){var r=wf(e),i=Ai(e,r);null!=n||Sl(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Ai(e,wf(e)));var o=!(Sl(n)&&"chain"in n)||!!n.chain,s=yl(t);return wn(i,(function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=ns(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Cn([this.value()],arguments))})})),t}function Nh(){return an._===this&&(an._=ge),this}function Bh(){}function Uh(t){return t=Kl(t),yo((function(e){return uo(e,t)}))}var Dh=ms(In),qh=ms(kn),Fh=ms(An);function Wh(t){return sa(t)?Fn(Ra(t)):ho(t)}function Vh(t){return function(e){return null==t?o:Ti(t,e)}}var zh=ks(),Hh=ks(!0);function Kh(){return[]}function $h(){return!1}function Qh(){return{}}function Gh(){return""}function Zh(){return!0}function Yh(t,e){if(t=Kl(t),t<1||t>N)return[];var n=D,r=Fe(t,D);e=Ws(e),t-=D;var i=Kn(r,e);while(++n<t)e(n);return i}function Jh(t){return sl(t)?In(t,Ra):Bl(t)?[t]:ns(Ca(Yl(t)))}function Xh(t){var e=++he;return Yl(t)+e}var tp=ys((function(t,e){return t+e}),0),ep=Os("ceil"),np=ys((function(t,e){return t/e}),1),rp=Os("floor");function ip(t){return t&&t.length?ki(t,Rh,Li):o}function op(t,e){return t&&t.length?ki(t,Ws(e,2),Li):o}function sp(t){return qn(t,Rh)}function ap(t,e){return qn(t,Ws(e,2))}function up(t){return t&&t.length?ki(t,Rh,no):o}function cp(t,e){return t&&t.length?ki(t,Ws(e,2),no):o}var lp=ys((function(t,e){return t*e}),1),fp=Os("round"),hp=ys((function(t,e){return t-e}),0);function pp(t){return t&&t.length?Hn(t,Rh):0}function dp(t,e){return t&&t.length?Hn(t,Ws(e,2)):0}return mr.after=Ic,mr.ary=Cc,mr.assign=Jl,mr.assignIn=Xl,mr.assignInWith=tf,mr.assignWith=ef,mr.at=nf,mr.before=Rc,mr.bind=jc,mr.bindAll=Sh,mr.bindKey=Ac,mr.castArray=Zc,mr.chain=Vu,mr.chunk=Pa,mr.compact=Ma,mr.concat=La,mr.cond=kh,mr.conforms=Eh,mr.constant=xh,mr.countBy=tc,mr.create=rf,mr.curry=Tc,mr.curryRight=Pc,mr.debounce=Mc,mr.defaults=of,mr.defaultsDeep=sf,mr.defer=Lc,mr.delay=Nc,mr.difference=Na,mr.differenceBy=Ba,mr.differenceWith=Ua,mr.drop=Da,mr.dropRight=qa,mr.dropRightWhile=Fa,mr.dropWhile=Wa,mr.fill=Va,mr.filter=nc,mr.flatMap=oc,mr.flatMapDeep=sc,mr.flatMapDepth=ac,mr.flatten=Ka,mr.flattenDeep=$a,mr.flattenDepth=Qa,mr.flip=Bc,mr.flow=Ih,mr.flowRight=Ch,mr.fromPairs=Ga,mr.functions=pf,mr.functionsIn=df,mr.groupBy=lc,mr.initial=Ja,mr.intersection=Xa,mr.intersectionBy=tu,mr.intersectionWith=eu,mr.invert=vf,mr.invertBy=yf,mr.invokeMap=hc,mr.iteratee=jh,mr.keyBy=pc,mr.keys=wf,mr.keysIn=Sf,mr.map=dc,mr.mapKeys=kf,mr.mapValues=Ef,mr.matches=Ah,mr.matchesProperty=Th,mr.memoize=Uc,mr.merge=xf,mr.mergeWith=Of,mr.method=Ph,mr.methodOf=Mh,mr.mixin=Lh,mr.negate=Dc,mr.nthArg=Uh,mr.omit=If,mr.omitBy=Cf,mr.once=qc,mr.orderBy=_c,mr.over=Dh,mr.overArgs=Fc,mr.overEvery=qh,mr.overSome=Fh,mr.partial=Wc,mr.partialRight=Vc,mr.partition=gc,mr.pick=Rf,mr.pickBy=jf,mr.property=Wh,mr.propertyOf=Vh,mr.pull=su,mr.pullAll=au,mr.pullAllBy=uu,mr.pullAllWith=cu,mr.pullAt=lu,mr.range=zh,mr.rangeRight=Hh,mr.rearg=zc,mr.reject=yc,mr.remove=fu,mr.rest=Hc,mr.reverse=hu,mr.sampleSize=wc,mr.set=Tf,mr.setWith=Pf,mr.shuffle=Sc,mr.slice=pu,mr.sortBy=xc,mr.sortedUniq=mu,mr.sortedUniqBy=wu,mr.split=ah,mr.spread=Kc,mr.tail=Su,mr.take=ku,mr.takeRight=Eu,mr.takeRightWhile=xu,mr.takeWhile=Ou,mr.tap=zu,mr.throttle=$c,mr.thru=Hu,mr.toArray=zl,mr.toPairs=Mf,mr.toPairsIn=Lf,mr.toPath=Jh,mr.toPlainObject=Gl,mr.transform=Nf,mr.unary=Qc,mr.union=Iu,mr.unionBy=Cu,mr.unionWith=Ru,mr.uniq=ju,mr.uniqBy=Au,mr.uniqWith=Tu,mr.unset=Bf,mr.unzip=Pu,mr.unzipWith=Mu,mr.update=Uf,mr.updateWith=Df,mr.values=qf,mr.valuesIn=Ff,mr.without=Lu,mr.words=mh,mr.wrap=Gc,mr.xor=Nu,mr.xorBy=Bu,mr.xorWith=Uu,mr.zip=Du,mr.zipObject=qu,mr.zipObjectDeep=Fu,mr.zipWith=Wu,mr.entries=Mf,mr.entriesIn=Lf,mr.extend=Xl,mr.extendWith=tf,Lh(mr,mr),mr.add=tp,mr.attempt=wh,mr.camelCase=Hf,mr.capitalize=Kf,mr.ceil=ep,mr.clamp=Wf,mr.clone=Yc,mr.cloneDeep=Xc,mr.cloneDeepWith=tl,mr.cloneWith=Jc,mr.conformsTo=el,mr.deburr=$f,mr.defaultTo=Oh,mr.divide=np,mr.endsWith=Qf,mr.eq=nl,mr.escape=Gf,mr.escapeRegExp=Zf,mr.every=ec,mr.find=rc,mr.findIndex=za,mr.findKey=af,mr.findLast=ic,mr.findLastIndex=Ha,mr.findLastKey=uf,mr.floor=rp,mr.forEach=uc,mr.forEachRight=cc,mr.forIn=cf,mr.forInRight=lf,mr.forOwn=ff,mr.forOwnRight=hf,mr.get=_f,mr.gt=rl,mr.gte=il,mr.has=gf,mr.hasIn=bf,mr.head=Za,mr.identity=Rh,mr.includes=fc,mr.indexOf=Ya,mr.inRange=Vf,mr.invoke=mf,mr.isArguments=ol,mr.isArray=sl,mr.isArrayBuffer=al,mr.isArrayLike=ul,mr.isArrayLikeObject=cl,mr.isBoolean=ll,mr.isBuffer=fl,mr.isDate=hl,mr.isElement=pl,mr.isEmpty=dl,mr.isEqual=_l,mr.isEqualWith=gl,mr.isError=bl,mr.isFinite=vl,mr.isFunction=yl,mr.isInteger=ml,mr.isLength=wl,mr.isMap=El,mr.isMatch=xl,mr.isMatchWith=Ol,mr.isNaN=Il,mr.isNative=Cl,mr.isNil=jl,mr.isNull=Rl,mr.isNumber=Al,mr.isObject=Sl,mr.isObjectLike=kl,mr.isPlainObject=Tl,mr.isRegExp=Pl,mr.isSafeInteger=Ml,mr.isSet=Ll,mr.isString=Nl,mr.isSymbol=Bl,mr.isTypedArray=Ul,mr.isUndefined=Dl,mr.isWeakMap=ql,mr.isWeakSet=Fl,mr.join=nu,mr.kebabCase=Yf,mr.last=ru,mr.lastIndexOf=iu,mr.lowerCase=Jf,mr.lowerFirst=Xf,mr.lt=Wl,mr.lte=Vl,mr.max=ip,mr.maxBy=op,mr.mean=sp,mr.meanBy=ap,mr.min=up,mr.minBy=cp,mr.stubArray=Kh,mr.stubFalse=$h,mr.stubObject=Qh,mr.stubString=Gh,mr.stubTrue=Zh,mr.multiply=lp,mr.nth=ou,mr.noConflict=Nh,mr.noop=Bh,mr.now=Oc,mr.pad=th,mr.padEnd=eh,mr.padStart=nh,mr.parseInt=rh,mr.random=zf,mr.reduce=bc,mr.reduceRight=vc,mr.repeat=ih,mr.replace=oh,mr.result=Af,mr.round=fp,mr.runInContext=t,mr.sample=mc,mr.size=kc,mr.snakeCase=sh,mr.some=Ec,mr.sortedIndex=du,mr.sortedIndexBy=_u,mr.sortedIndexOf=gu,mr.sortedLastIndex=bu,mr.sortedLastIndexBy=vu,mr.sortedLastIndexOf=yu,mr.startCase=uh,mr.startsWith=ch,mr.subtract=hp,mr.sum=pp,mr.sumBy=dp,mr.template=lh,mr.times=Yh,mr.toFinite=Hl,mr.toInteger=Kl,mr.toLength=$l,mr.toLower=fh,mr.toNumber=Ql,mr.toSafeInteger=Zl,mr.toString=Yl,mr.toUpper=hh,mr.trim=ph,mr.trimEnd=dh,mr.trimStart=_h,mr.truncate=gh,mr.unescape=bh,mr.uniqueId=Xh,mr.upperCase=vh,mr.upperFirst=yh,mr.each=uc,mr.eachRight=cc,mr.first=Za,Lh(mr,function(){var t={};return Ri(mr,(function(e,n){fe.call(mr.prototype,n)||(t[n]=e)})),t}(),{chain:!1}),mr.VERSION=s,wn(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){mr[t].placeholder=mr})),wn(["drop","take"],(function(t,e){xr.prototype[t]=function(n){n=n===o?1:qe(Kl(n),0);var r=this.__filtered__&&!e?new xr(this):this.clone();return r.__filtered__?r.__takeCount__=Fe(n,r.__takeCount__):r.__views__.push({size:Fe(n,D),type:t+(r.__dir__<0?"Right":"")}),r},xr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),wn(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=n==T||n==M;xr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Ws(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),wn(["head","last"],(function(t,e){var n="take"+(e?"Right":"");xr.prototype[t]=function(){return this[n](1).value()[0]}})),wn(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");xr.prototype[t]=function(){return this.__filtered__?new xr(this):this[n](1)}})),xr.prototype.compact=function(){return this.filter(Rh)},xr.prototype.find=function(t){return this.filter(t).head()},xr.prototype.findLast=function(t){return this.reverse().find(t)},xr.prototype.invokeMap=yo((function(t,e){return"function"==typeof t?new xr(this):this.map((function(n){return Fi(n,t,e)}))})),xr.prototype.reject=function(t){return this.filter(Dc(Ws(t)))},xr.prototype.slice=function(t,e){t=Kl(t);var n=this;return n.__filtered__&&(t>0||e<0)?new xr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(e=Kl(e),n=e<0?n.dropRight(-e):n.take(e-t)),n)},xr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},xr.prototype.toArray=function(){return this.take(D)},Ri(xr.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=mr[r?"take"+("last"==e?"Right":""):e],s=r||/^find/.test(e);i&&(mr.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,u=e instanceof xr,c=a[0],l=u||sl(e),f=function(t){var e=i.apply(mr,Cn([t],a));return r&&h?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,p=!!this.__actions__.length,d=s&&!h,_=u&&!p;if(!s&&l){e=_?e:new xr(this);var g=t.apply(e,a);return g.__actions__.push({func:Hu,args:[f],thisArg:o}),new Er(g,h)}return d&&_?t.apply(this,a):(g=this.thru(f),d?r?g.value()[0]:g.value():g)})})),wn(["pop","push","shift","sort","splice","unshift"],(function(t){var e=se[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);mr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(sl(i)?i:[],t)}return this[n]((function(n){return e.apply(sl(n)?n:[],t)}))}})),Ri(xr.prototype,(function(t,e){var n=mr[e];if(n){var r=n.name+"";fe.call(cn,r)||(cn[r]=[]),cn[r].push({name:e,func:n})}})),cn[bs(o,y).name]=[{name:"wrapper",func:o}],xr.prototype.clone=Or,xr.prototype.reverse=Ir,xr.prototype.value=Cr,mr.prototype.at=Ku,mr.prototype.chain=$u,mr.prototype.commit=Qu,mr.prototype.next=Gu,mr.prototype.plant=Yu,mr.prototype.reverse=Ju,mr.prototype.toJSON=mr.prototype.valueOf=mr.prototype.value=Xu,mr.prototype.first=mr.prototype.head,Ie&&(mr.prototype[Ie]=Zu),mr},wr=mr();an._=wr,i=function(){return wr}.call(e,n,e,r),i===o||(r.exports=i)}).call(this)}).call(this,n("c8ba"),n("62e4")(t))},3301:function(t,e,n){"use strict";const{Buffer:r}=n("1c35"),i=Symbol.for("BufferList");function o(t){if(!(this instanceof o))return new o(t);o._init.call(this,t)}o._init=function(t){Object.defineProperty(this,i,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)},o.prototype._new=function(t){return new o(t)},o.prototype._offset=function(t){if(0===t)return[0,0];let e=0;for(let n=0;n<this._bufs.length;n++){const r=e+this._bufs[n].length;if(t<r||n===this._bufs.length-1)return[n,t-e];e=r}},o.prototype._reverseOffset=function(t){const e=t[0];let n=t[1];for(let r=0;r<e;r++)n+=this._bufs[r].length;return n},o.prototype.get=function(t){if(t>this.length||t<0)return;const e=this._offset(t);return this._bufs[e[0]][e[1]]},o.prototype.slice=function(t,e){return"number"===typeof t&&t<0&&(t+=this.length),"number"===typeof e&&e<0&&(e+=this.length),this.copy(null,0,t,e)},o.prototype.copy=function(t,e,n,i){if(("number"!==typeof n||n<0)&&(n=0),("number"!==typeof i||i>this.length)&&(i=this.length),n>=this.length)return t||r.alloc(0);if(i<=0)return t||r.alloc(0);const o=!!t,s=this._offset(n),a=i-n;let u=a,c=o&&e||0,l=s[1];if(0===n&&i===this.length){if(!o)return 1===this._bufs.length?this._bufs[0]:r.concat(this._bufs,this.length);for(let e=0;e<this._bufs.length;e++)this._bufs[e].copy(t,c),c+=this._bufs[e].length;return t}if(u<=this._bufs[s[0]].length-l)return o?this._bufs[s[0]].copy(t,e,l,l+u):this._bufs[s[0]].slice(l,l+u);o||(t=r.allocUnsafe(a));for(let r=s[0];r<this._bufs.length;r++){const e=this._bufs[r].length-l;if(!(u>e)){this._bufs[r].copy(t,c,l,l+u),c+=e;break}this._bufs[r].copy(t,c,l),c+=e,u-=e,l&&(l=0)}return t.length>c?t.slice(0,c):t},o.prototype.shallowSlice=function(t,e){if(t=t||0,e="number"!==typeof e?this.length:e,t<0&&(t+=this.length),e<0&&(e+=this.length),t===e)return this._new();const n=this._offset(t),r=this._offset(e),i=this._bufs.slice(n[0],r[0]+1);return 0===r[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,r[1]),0!==n[1]&&(i[0]=i[0].slice(n[1])),this._new(i)},o.prototype.toString=function(t,e,n){return this.slice(e,n).toString(t)},o.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;while(this._bufs.length){if(!(t>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},o.prototype.duplicate=function(){const t=this._new();for(let e=0;e<this._bufs.length;e++)t.append(this._bufs[e]);return t},o.prototype.append=function(t){if(null==t)return this;if(t.buffer)this._appendBuffer(r.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let e=0;e<t.length;e++)this.append(t[e]);else if(this._isBufferList(t))for(let e=0;e<t._bufs.length;e++)this.append(t._bufs[e]);else"number"===typeof t&&(t=t.toString()),this._appendBuffer(r.from(t));return this},o.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length},o.prototype.indexOf=function(t,e,n){if(void 0===n&&"string"===typeof e&&(n=e,e=void 0),"function"===typeof t||Array.isArray(t))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"===typeof t?t=r.from([t]):"string"===typeof t?t=r.from(t,n):this._isBufferList(t)?t=t.slice():Array.isArray(t.buffer)?t=r.from(t.buffer,t.byteOffset,t.byteLength):r.isBuffer(t)||(t=r.from(t)),e=Number(e||0),isNaN(e)&&(e=0),e<0&&(e=this.length+e),e<0&&(e=0),0===t.length)return e>this.length?this.length:e;const i=this._offset(e);let o=i[0],s=i[1];for(;o<this._bufs.length;o++){const e=this._bufs[o];while(s<e.length){const n=e.length-s;if(n>=t.length){const n=e.indexOf(t,s);if(-1!==n)return this._reverseOffset([o,n]);s=e.length-t.length+1}else{const e=this._reverseOffset([o,s]);if(this._match(e,t))return e;s++}}s=0}return-1},o.prototype._match=function(t,e){if(this.length-t<e.length)return!1;for(let n=0;n<e.length;n++)if(this.get(t+n)!==e[n])return!1;return!0},function(){const t={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 e in t)(function(e){null===t[e]?o.prototype[e]=function(t,n){return this.slice(t,t+n)[e](0,n)}:o.prototype[e]=function(n=0){return this.slice(n,n+t[e])[e](0)}})(e)}(),o.prototype._isBufferList=function(t){return t instanceof o||o.isBufferList(t)},o.isBufferList=function(t){return null!=t&&t[i]},t.exports=o},3409:function(t,e,n){e.parser=n("1fad").parser,e.generate=n("7f0f"),e.writeToStream=n("7135")},3473:function(t,e,n){"use strict";var r=n("91e3");t.exports=function(t){if(!r(t))throw new TypeError(t+" is not iterable");return t}},"34eb":function(t,e,n){(function(r){function i(){return!("undefined"===typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"===typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))}),e.splice(i,0,n)}function s(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(n){}}function a(){let t;try{t=e.storage.getItem("debug")}catch(n){}return!t&&"undefined"!==typeof r&&"env"in r&&(t=Object({VUE_APP_BASE_API:"",VUE_APP_CWOS_SERVICE:"/cwos-portal",VUE_APP_BASE_SERVICE:"/ninca-qk-alarm-app",VUE_APP_DCS_URL:"./alarm-front/player/DCSPlugin-1.2.0.exe",NODE_ENV:"production",BASE_URL:""}).DEBUG),t}function u(){try{return localStorage}catch(t){}}e.formatArgs=o,e.save=s,e.load=a,e.useColors=i,e.storage=u(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0)}})(),e.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"],e.log=console.debug||console.log||(()=>{}),t.exports=n("dc90")(e);const{formatters:c}=t.exports;c.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n("4362"))},3527:function(t,e,n){"use strict";var r=n("724e"),i=n("d53b"),o=n("96ae"),s=Array.prototype.indexOf,a=Object.prototype.hasOwnProperty,u=Math.abs,c=Math.floor;t.exports=function(t){var e,n,l,f;if(!r(t))return s.apply(this,arguments);for(n=i(o(this).length),l=arguments[1],l=isNaN(l)?0:l>=0?c(l):i(this.length)-c(u(l)),e=l;e<n;++e)if(a.call(this,e)&&(f=this[e],r(f)))return e;return-1}},"35e8":function(t,e,n){"use strict";t.exports={isString:function(t){return"string"===typeof t},isObject:function(t){return"object"===typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},"386b":function(t,e,n){"use strict";var r;function i(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var o=n("9bfc").codes,s=o.ERR_MISSING_ARGS,a=o.ERR_STREAM_DESTROYED;function u(t){if(t)throw t}function c(t){return t.setHeader&&"function"===typeof t.abort}function l(t,e,o,s){s=i(s);var u=!1;t.on("close",(function(){u=!0})),void 0===r&&(r=n("bf09")),r(t,{readable:e,writable:o},(function(t){if(t)return s(t);u=!0,s()}));var l=!1;return function(e){if(!u&&!l)return l=!0,c(t)?t.abort():"function"===typeof t.destroy?t.destroy():void s(e||new a("pipe"))}}function f(t){t()}function h(t,e){return t.pipe(e)}function p(t){return t.length?"function"!==typeof t[t.length-1]?u:t.pop():u}function d(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=p(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new s("streams");var o=e.map((function(t,n){var s=n<e.length-1,a=n>0;return l(t,s,a,(function(t){r||(r=t),t&&o.forEach(f),s||(o.forEach(f),i(r))}))}));return e.reduce(h)}t.exports=d},"3a7c":function(t,e,n){function r(t){return Array.isArray?Array.isArray(t):"[object Array]"===b(t)}function i(t){return"boolean"===typeof t}function o(t){return null===t}function s(t){return null==t}function a(t){return"number"===typeof t}function u(t){return"string"===typeof t}function c(t){return"symbol"===typeof t}function l(t){return void 0===t}function f(t){return"[object RegExp]"===b(t)}function h(t){return"object"===typeof t&&null!==t}function p(t){return"[object Date]"===b(t)}function d(t){return"[object Error]"===b(t)||t instanceof Error}function _(t){return"function"===typeof t}function g(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t}function b(t){return Object.prototype.toString.call(t)}e.isArray=r,e.isBoolean=i,e.isNull=o,e.isNullOrUndefined=s,e.isNumber=a,e.isString=u,e.isSymbol=c,e.isUndefined=l,e.isRegExp=f,e.isObject=h,e.isDate=p,e.isError=d,e.isFunction=_,e.isPrimitive=g,e.isBuffer=n("1c35").Buffer.isBuffer},"3e15":function(t,e,n){"use strict";t.exports=function(){var t,e,n;if("function"!==typeof Map)return!1;try{t=new Map([["raz","one"],["dwa","two"],["trzy","three"]])}catch(r){return!1}return"[object Map]"===String(t)&&(3===t.size&&("function"===typeof t.clear&&("function"===typeof t.delete&&("function"===typeof t.entries&&("function"===typeof t.forEach&&("function"===typeof t.get&&("function"===typeof t.has&&("function"===typeof t.keys&&("function"===typeof t.set&&("function"===typeof t.values&&(e=t.entries(),n=e.next(),!1===n.done&&(!!n.value&&("raz"===n.value[0]&&"one"===n.value[1])))))))))))))}},"3fb5":function(t,e){"function"===typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},"429b":function(t,e,n){t.exports=n("faa1").EventEmitter},4665:function(t,e,n){"use strict";var r=n("1a94"),i=n("6858e"),o=Function.prototype.call;t.exports=function(t,e){var n={},s=arguments[2];return r(e),i(t,(function(t,r,i,a){n[r]=o.call(e,s,t,r,i,a)})),n}},4681:function(t,e,n){"use strict";var r=n("966d");function i(t,e){var n=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||r.nextTick(s,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(r.nextTick(s,n,t),n._writableState&&(n._writableState.errorEmitted=!0)):e&&e(t)})),this)}function o(){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.finished=!1,this._writableState.errorEmitted=!1)}function s(t,e){t.emit("error",e)}t.exports={destroy:i,undestroy:o}},"51e9":function(t,e,n){"use strict";const r=n("f214").Duplex,i=n("3fb5"),o=n("3301");function s(t){if(!(this instanceof s))return new s(t);if("function"===typeof t){this._callback=t;const e=function(t){this._callback&&(this._callback(t),this._callback=null)}.bind(this);this.on("pipe",(function(t){t.on("error",e)})),this.on("unpipe",(function(t){t.removeListener("error",e)})),t=null}o._init.call(this,t),r.call(this)}i(s,r),Object.assign(s.prototype,o.prototype),s.prototype._new=function(t){return new s(t)},s.prototype._write=function(t,e,n){this._appendBuffer(t),"function"===typeof n&&n()},s.prototype._read=function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)},s.prototype.end=function(t){r.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)},s.prototype._destroy=function(t,e){this._bufs.length=0,this.length=0,e(t)},s.prototype._isBufferList=function(t){return t instanceof s||t instanceof o||s.isBufferList(t)},s.isBufferList=o.isBufferList,t.exports=s,t.exports.BufferListStream=s,t.exports.BufferList=o},"53a8":function(t,e){t.exports=r;var n=Object.prototype.hasOwnProperty;function r(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var i in r)n.call(r,i)&&(t[i]=r[i])}return t}},"546b":function(t,e,n){"use strict";t.exports=n("3e15")()?Map:n("0b24")},"553e":function(t,e,n){"use strict";(function(e,r){var i=n("e372").Transform,o=n("fb12"),s=n("b41e"),a=n("8707").Buffer;function u(t,e,n){var r=new i({objectMode:t.objectMode});return r._write=e,r._flush=n,r}function c(t,n,i){var c,l,f="browser"===e.title,h=!!r.WebSocket,p=f?m:y;n&&!Array.isArray(n)&&"object"===typeof n&&(i=n,n=null,("string"===typeof i.protocol||Array.isArray(i.protocol))&&(n=i.protocol)),i||(i={}),void 0===i.objectMode&&(i.objectMode=!(!0===i.binary||void 0===i.binary));var d=u(i,p,w);i.objectMode||(d._writev=I);var _=i.browserBufferSize||524288,g=i.browserBufferTimeout||1e3;"object"===typeof t?l=t:(l=h&&f?new s(t,n):new s(t,n,i),l.binaryType="arraybuffer");var b="undefined"===typeof l.addEventListener;l.readyState===l.OPEN?c=d:(c=c=o(void 0,void 0,i),i.objectMode||(c._writev=I),b?l.addEventListener("open",S):l.onopen=S),c.socket=l,b?(l.addEventListener("close",k),l.addEventListener("error",E),l.addEventListener("message",x)):(l.onclose=k,l.onerror=E,l.onmessage=x),d.on("close",O);var v=!i.objectMode;function y(t,e,n){l.readyState===l.OPEN?(v&&"string"===typeof t&&(t=a.from(t,"utf8")),l.send(t,n)):n()}function m(t,e,n){if(l.bufferedAmount>_)setTimeout(m,g,t,e,n);else{v&&"string"===typeof t&&(t=a.from(t,"utf8"));try{l.send(t)}catch(r){return n(r)}n()}}function w(t){l.close(),t()}function S(){c.setReadable(d),c.setWritable(d),c.emit("connect")}function k(){c.end(),c.destroy()}function E(t){c.destroy(t)}function x(t){var e=t.data;e=e instanceof ArrayBuffer?a.from(e):a.from(e,"utf8"),d.push(e)}function O(){l.close()}function I(t,e){for(var n=new Array(t.length),r=0;r<t.length;r++)"string"===typeof t[r].chunk?n[r]=a.from(t[r],"utf8"):n[r]=t[r].chunk;this._write(a.concat(n),"binary",e)}return c}t.exports=c}).call(this,n("4362"),n("c8ba"))},"566b":function(t,e,n){var r=n("d633");function i(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function o(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},n=t.name||"Function wrapped with `once`";return e.onceError=n+" shouldn't be called more than once",e.called=!1,e}t.exports=r(i),t.exports.strict=r(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},"56c41":function(t,e,n){"use strict";t.exports=function(t){return t!==t}},"5a5c":function(t,e,n){"use strict";var r=Array.prototype.forEach,i=Object.create;t.exports=function(t){var e=i(null);return r.call(arguments,(function(t){e[t]=!0})),e}},"5e1a":function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n("8707").Buffer,o=n(5);function s(t,e,n){t.copy(e,n)}t.exports=function(){function t(){r(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";var e=this.head,n=""+e.data;while(e=e.next)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;var e=i.allocUnsafe(t>>>0),n=this.head,r=0;while(n)s(n.data,e,r),r+=n.data.length,n=n.next;return e},t}(),o&&o.inspect&&o.inspect.custom&&(t.exports.prototype[o.inspect.custom]=function(){var t=o.inspect({length:this.length});return this.constructor.name+" "+t})},"5edd":function(t,e,n){"use strict";var r=n("936a"),i={object:!0,function:!0,undefined:!0};t.exports=function(t){return!!r(t)&&hasOwnProperty.call(i,typeof t)}},6024:function(t,e,n){"use strict";var r,i=n("e0f6"),o=n("f973"),s=n("f508"),a=n("1c4a"),u=n("06a2"),c=Object.defineProperty;r=t.exports=function(t,e){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");u.call(this,t),e=e?o.call(e,"key+value")?"key+value":o.call(e,"key")?"key":"value":"value",c(this,"__kind__",s("",e))},i&&i(r,u),delete r.prototype.constructor,r.prototype=Object.create(u.prototype,{_resolve:s((function(t){return"value"===this.__kind__?this.__list__[t]:"key+value"===this.__kind__?[t,this.__list__[t]]:t}))}),c(r.prototype,a.toStringTag,s("c","Array Iterator"))},"62c4":function(t,e,n){"use strict";var r=n("e76c")();t.exports=function(t){return t!==r&&null!==t}},6321:function(t,e,n){"use strict";var r=n("9013");t.exports=function(t){if("function"!==typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!==typeof t.length)return!1;if("function"!==typeof t.call)return!1;if("function"!==typeof t.apply)return!1}catch(e){return!1}return!r(t)}},"6858e":function(t,e,n){"use strict";t.exports=n("cecf")("forEach")},"692b":function(t,e,n){"use strict";var r=Object.prototype.toString,i=r.call("");t.exports=function(t){return"string"===typeof t||t&&"object"===typeof t&&(t instanceof String||r.call(t)===i)||!1}},7045:function(t,e,n){"use strict";var r=Object.prototype.toString,i=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);t.exports=function(t){return"function"===typeof t&&i(r.call(t))}},7135:function(t,e,n){(function(e){const r=n("b289"),i=e.allocUnsafe(0),o=e.from([0]),s=n("f0cb"),a=n("966d").nextTick,u=n("34eb")("mqtt-packet:writeToStream"),c=s.cache,l=s.generateNumber,f=s.generateCache,h=s.genBufVariableByteInt,p=s.generate4ByteBuffer;let d=P,_=!0;function g(t,e,n){switch(u("generate called"),e.cork&&(e.cork(),a(b,e)),_&&(_=!1,f()),u("generate: packet.cmd: %s",t.cmd),t.cmd){case"connect":return v(t,e,n);case"connack":return y(t,e,n);case"publish":return m(t,e,n);case"puback":case"pubrec":case"pubrel":case"pubcomp":return w(t,e,n);case"subscribe":return S(t,e,n);case"suback":return k(t,e,n);case"unsubscribe":return E(t,e,n);case"unsuback":return x(t,e,n);case"pingreq":case"pingresp":return O(t,e,n);case"disconnect":return I(t,e,n);case"auth":return C(t,e,n);default:return e.emit("error",new Error("Unknown command")),!1}}function b(t){t.uncork()}function v(t,n,i){const o=t||{},s=o.protocolId||"MQTT";let a=o.protocolVersion||4;const u=o.will;let c=o.clean;const l=o.keepalive||0,f=o.clientId||"",h=o.username,p=o.password,_=o.properties;void 0===c&&(c=!0);let g=0;if(!s||"string"!==typeof s&&!e.isBuffer(s))return n.emit("error",new Error("Invalid protocolId")),!1;if(g+=s.length+2,3!==a&&4!==a&&5!==a)return n.emit("error",new Error("Invalid protocol version")),!1;if(g+=1,("string"===typeof f||e.isBuffer(f))&&(f||a>=4)&&(f||c))g+=e.byteLength(f)+2;else{if(a<4)return n.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(1*c===0)return n.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}if("number"!==typeof l||l<0||l>65535||l%1!==0)return n.emit("error",new Error("Invalid keepalive")),!1;if(g+=2,g+=1,5===a){var b=B(n,_);if(!b)return!1;g+=b.length}if(u){if("object"!==typeof u)return n.emit("error",new Error("Invalid will")),!1;if(!u.topic||"string"!==typeof u.topic)return n.emit("error",new Error("Invalid will topic")),!1;if(g+=e.byteLength(u.topic)+2,g+=2,u.payload){if(!(u.payload.length>=0))return n.emit("error",new Error("Invalid will payload")),!1;"string"===typeof u.payload?g+=e.byteLength(u.payload):g+=u.payload.length}var v={};if(5===a){if(v=B(n,u.properties),!v)return!1;g+=v.length}}let y=!1;if(null!=h){if(!W(h))return n.emit("error",new Error("Invalid username")),!1;y=!0,g+=e.byteLength(h)+2}if(null!=p){if(!y)return n.emit("error",new Error("Username is required to use password")),!1;if(!W(p))return n.emit("error",new Error("Invalid password")),!1;g+=F(p)+2}n.write(r.CONNECT_HEADER),j(n,g),N(n,s),o.bridgeMode&&(a+=128),n.write(131===a?r.VERSION131:132===a?r.VERSION132:4===a?r.VERSION4:5===a?r.VERSION5:r.VERSION3);let m=0;return m|=null!=h?r.USERNAME_MASK:0,m|=null!=p?r.PASSWORD_MASK:0,m|=u&&u.retain?r.WILL_RETAIN_MASK:0,m|=u&&u.qos?u.qos<<r.WILL_QOS_SHIFT:0,m|=u?r.WILL_FLAG_MASK:0,m|=c?r.CLEAN_SESSION_MASK:0,n.write(e.from([m])),d(n,l),5===a&&b.write(),N(n,f),u&&(5===a&&v.write(),A(n,u.topic),N(n,u.payload)),null!=h&&N(n,h),null!=p&&N(n,p),!0}function y(t,n,i){const s=i?i.protocolVersion:4,a=t||{},u=5===s?a.reasonCode:a.returnCode,c=a.properties;let l=2;if("number"!==typeof u)return n.emit("error",new Error("Invalid return code")),!1;let f=null;if(5===s){if(f=B(n,c),!f)return!1;l+=f.length}return n.write(r.CONNACK_HEADER),j(n,l),n.write(a.sessionPresent?r.SESSIONPRESENT_HEADER:o),n.write(e.from([u])),null!=f&&f.write(),!0}function m(t,n,o){u("publish: packet: %o",t);const s=o?o.protocolVersion:4,a=t||{},c=a.qos||0,l=a.retain?r.RETAIN_MASK:0,f=a.topic,h=a.payload||i,p=a.messageId,_=a.properties;let g=0;if("string"===typeof f)g+=e.byteLength(f)+2;else{if(!e.isBuffer(f))return n.emit("error",new Error("Invalid topic")),!1;g+=f.length+2}if(e.isBuffer(h)?g+=h.length:g+=e.byteLength(h),c&&"number"!==typeof p)return n.emit("error",new Error("Invalid messageId")),!1;c&&(g+=2);let b=null;if(5===s){if(b=B(n,_),!b)return!1;g+=b.length}return n.write(r.PUBLISH_HEADER[c][a.dup?1:0][l?1:0]),j(n,g),d(n,F(f)),n.write(f),c>0&&d(n,p),null!=b&&b.write(),u("publish: payload: %o",h),n.write(h)}function w(t,n,i){const o=i?i.protocolVersion:4,s=t||{},a=s.cmd||"puback",u=s.messageId,c=s.dup&&"pubrel"===a?r.DUP_MASK:0;let l=0;const f=s.reasonCode,h=s.properties;let p=5===o?3:2;if("pubrel"===a&&(l=1),"number"!==typeof u)return n.emit("error",new Error("Invalid messageId")),!1;let _=null;if(5===o&&"object"===typeof h){if(_=U(n,h,i,p),!_)return!1;p+=_.length}return n.write(r.ACKS[a][l][c][0]),j(n,p),d(n,u),5===o&&n.write(e.from([f])),null!==_&&_.write(),!0}function S(t,n,i){u("subscribe: packet: ");const o=i?i.protocolVersion:4,s=t||{},a=s.dup?r.DUP_MASK:0,c=s.messageId,l=s.subscriptions,f=s.properties;let h=0;if("number"!==typeof c)return n.emit("error",new Error("Invalid messageId")),!1;h+=2;let p=null;if(5===o){if(p=B(n,f),!p)return!1;h+=p.length}if("object"!==typeof l||!l.length)return n.emit("error",new Error("Invalid subscriptions")),!1;for(let r=0;r<l.length;r+=1){const t=l[r].topic,i=l[r].qos;if("string"!==typeof t)return n.emit("error",new Error("Invalid subscriptions - invalid topic")),!1;if("number"!==typeof i)return n.emit("error",new Error("Invalid subscriptions - invalid qos")),!1;if(5===o){const t=l[r].nl||!1;if("boolean"!==typeof t)return n.emit("error",new Error("Invalid subscriptions - invalid No Local")),!1;const e=l[r].rap||!1;if("boolean"!==typeof e)return n.emit("error",new Error("Invalid subscriptions - invalid Retain as Published")),!1;const i=l[r].rh||0;if("number"!==typeof i||i>2)return n.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}h+=e.byteLength(t)+2+1}u("subscribe: writing to stream: %o",r.SUBSCRIBE_HEADER),n.write(r.SUBSCRIBE_HEADER[1][a?1:0][0]),j(n,h),d(n,c),null!==p&&p.write();let _=!0;for(const u of l){const t=u.topic,i=u.qos,s=+u.nl,a=+u.rap,c=u.rh;let l;A(n,t),l=r.SUBSCRIBE_OPTIONS_QOS[i],5===o&&(l|=s?r.SUBSCRIBE_OPTIONS_NL:0,l|=a?r.SUBSCRIBE_OPTIONS_RAP:0,l|=c?r.SUBSCRIBE_OPTIONS_RH[c]:0),_=n.write(e.from([l]))}return _}function k(t,n,i){const o=i?i.protocolVersion:4,s=t||{},a=s.messageId,u=s.granted,c=s.properties;let l=0;if("number"!==typeof a)return n.emit("error",new Error("Invalid messageId")),!1;if(l+=2,"object"!==typeof u||!u.length)return n.emit("error",new Error("Invalid qos vector")),!1;for(let e=0;e<u.length;e+=1){if("number"!==typeof u[e])return n.emit("error",new Error("Invalid qos vector")),!1;l+=1}let f=null;if(5===o){if(f=U(n,c,i,l),!f)return!1;l+=f.length}return n.write(r.SUBACK_HEADER),j(n,l),d(n,a),null!==f&&f.write(),n.write(e.from(u))}function E(t,n,i){const o=i?i.protocolVersion:4,s=t||{},a=s.messageId,u=s.dup?r.DUP_MASK:0,c=s.unsubscriptions,l=s.properties;let f=0;if("number"!==typeof a)return n.emit("error",new Error("Invalid messageId")),!1;if(f+=2,"object"!==typeof c||!c.length)return n.emit("error",new Error("Invalid unsubscriptions")),!1;for(let r=0;r<c.length;r+=1){if("string"!==typeof c[r])return n.emit("error",new Error("Invalid unsubscriptions")),!1;f+=e.byteLength(c[r])+2}let h=null;if(5===o){if(h=B(n,l),!h)return!1;f+=h.length}n.write(r.UNSUBSCRIBE_HEADER[1][u?1:0][0]),j(n,f),d(n,a),null!==h&&h.write();let p=!0;for(let e=0;e<c.length;e++)p=A(n,c[e]);return p}function x(t,n,i){const o=i?i.protocolVersion:4,s=t||{},a=s.messageId,u=s.dup?r.DUP_MASK:0,c=s.granted,l=s.properties,f=s.cmd,h=0;let p=2;if("number"!==typeof a)return n.emit("error",new Error("Invalid messageId")),!1;if(5===o){if("object"!==typeof c||!c.length)return n.emit("error",new Error("Invalid qos vector")),!1;for(let t=0;t<c.length;t+=1){if("number"!==typeof c[t])return n.emit("error",new Error("Invalid qos vector")),!1;p+=1}}let _=null;if(5===o){if(_=U(n,l,i,p),!_)return!1;p+=_.length}return n.write(r.ACKS[f][h][u][0]),j(n,p),d(n,a),null!==_&&_.write(),5===o&&n.write(e.from(c)),!0}function O(t,e,n){return e.write(r.EMPTY[t.cmd])}function I(t,n,i){const o=i?i.protocolVersion:4,s=t||{},a=s.reasonCode,u=s.properties;let c=5===o?1:0,l=null;if(5===o){if(l=U(n,u,i,c),!l)return!1;c+=l.length}return n.write(e.from([r.codes.disconnect<<4])),j(n,c),5===o&&n.write(e.from([a])),null!==l&&l.write(),!0}function C(t,n,i){const o=i?i.protocolVersion:4,s=t||{},a=s.reasonCode,u=s.properties;let c=5===o?1:0;5!==o&&n.emit("error",new Error("Invalid mqtt version for auth packet"));const l=U(n,u,i,c);return!!l&&(c+=l.length,n.write(e.from([r.codes.auth<<4])),j(n,c),n.write(e.from([a])),null!==l&&l.write(),!0)}Object.defineProperty(g,"cacheNumbers",{get(){return d===P},set(t){t?(c&&0!==Object.keys(c).length||(_=!0),d=P):(_=!1,d=M)}});const R={};function j(t,e){if(e>r.VARBYTEINT_MAX)return t.emit("error",new Error("Invalid variable byte integer: "+e)),!1;let n=R[e];return n||(n=h(e),e<16384&&(R[e]=n)),u("writeVarByteInt: writing to stream: %o",n),t.write(n)}function A(t,n){const r=e.byteLength(n);return d(t,r),u("writeString: %s",n),t.write(n,"utf8")}function T(t,e,n){A(t,e),A(t,n)}function P(t,e){return u("writeNumberCached: number: %d",e),u("writeNumberCached: %o",c[e]),t.write(c[e])}function M(t,e){const n=l(e);return u("writeNumberGenerated: %o",n),t.write(n)}function L(t,e){const n=p(e);return u("write4ByteNumber: %o",n),t.write(n)}function N(t,e){"string"===typeof e?A(t,e):e?(d(t,e.length),t.write(e)):d(t,0)}function B(t,n){if("object"!==typeof n||null!=n.length)return{length:1,write(){q(t,{},0)}};let i=0;function o(n,i){const o=r.propertiesTypes[n];let s=0;switch(o){case"byte":if("boolean"!==typeof i)return t.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;s+=2;break;case"int8":if("number"!==typeof i||i<0||i>255)return t.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;s+=2;break;case"binary":if(i&&null===i)return t.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;s+=1+e.byteLength(i)+2;break;case"int16":if("number"!==typeof i||i<0||i>65535)return t.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;s+=3;break;case"int32":if("number"!==typeof i||i<0||i>4294967295)return t.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;s+=5;break;case"var":if("number"!==typeof i||i<0||i>268435455)return t.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;s+=1+e.byteLength(h(i));break;case"string":if("string"!==typeof i)return t.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;s+=3+e.byteLength(i.toString());break;case"pair":if("object"!==typeof i)return t.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;s+=Object.getOwnPropertyNames(i).reduce((t,n)=>{const r=i[n];return Array.isArray(r)?t+=r.reduce((t,r)=>(t+=3+e.byteLength(n.toString())+2+e.byteLength(r.toString()),t),0):t+=3+e.byteLength(n.toString())+2+e.byteLength(i[n].toString()),t},0);break;default:return t.emit("error",new Error(`Invalid property ${n}: ${i}`)),!1}return s}if(n)for(const e in n){let t=0,r=0;const s=n[e];if(Array.isArray(s))for(let n=0;n<s.length;n++){if(r=o(e,s[n]),!r)return!1;t+=r}else{if(r=o(e,s),!r)return!1;t=r}if(!t)return!1;i+=t}const s=e.byteLength(h(i));return{length:s+i,write(){q(t,n,i)}}}function U(t,e,n,r){const i=["reasonString","userProperties"],o=n&&n.properties&&n.properties.maximumPacketSize?n.properties.maximumPacketSize:0;let s=B(t,e);if(o)while(r+s.length>o){const n=i.shift();if(!n||!e[n])return!1;delete e[n],s=B(t,e)}return s}function D(t,n,i){const o=r.propertiesTypes[n];switch(o){case"byte":t.write(e.from([r.properties[n]])),t.write(e.from([+i]));break;case"int8":t.write(e.from([r.properties[n]])),t.write(e.from([i]));break;case"binary":t.write(e.from([r.properties[n]])),N(t,i);break;case"int16":t.write(e.from([r.properties[n]])),d(t,i);break;case"int32":t.write(e.from([r.properties[n]])),L(t,i);break;case"var":t.write(e.from([r.properties[n]])),j(t,i);break;case"string":t.write(e.from([r.properties[n]])),A(t,i);break;case"pair":Object.getOwnPropertyNames(i).forEach(o=>{const s=i[o];Array.isArray(s)?s.forEach(i=>{t.write(e.from([r.properties[n]])),T(t,o.toString(),i.toString())}):(t.write(e.from([r.properties[n]])),T(t,o.toString(),s.toString()))});break;default:return t.emit("error",new Error(`Invalid property ${n} value: ${i}`)),!1}}function q(t,e,n){j(t,n);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&null!==e[r]){const n=e[r];if(Array.isArray(n))for(let e=0;e<n.length;e++)D(t,r,n[e]);else D(t,r,n)}}function F(t){return t?t instanceof e?t.length:e.byteLength(t):0}function W(t){return"string"===typeof t||t instanceof e}t.exports=g}).call(this,n("1c35").Buffer)},"724e":function(t,e,n){"use strict";t.exports=n("29b0")()?Number.isNaN:n("56c41")},7373:function(t,e,n){"use strict";var r=n("62c4"),i=Object.keys;t.exports=function(t){return i(r(t)?Object(t):t)}},"780f":function(t,e,n){"use strict";t.exports=o;var r=n("27bf"),i=Object.create(n("3a7c"));function o(t){if(!(this instanceof o))return new o(t);r.call(this,t)}i.inherits=n("3fb5"),i.inherits(o,r),o.prototype._transform=function(t,e,n){n(null,t)}},"782c":function(t,e,n){"use strict";(function(e){var r;function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o=n("bf09"),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),f=Symbol("handlePromise"),h=Symbol("stream");function p(t,e){return{value:t,done:e}}function d(t){var e=t[s];if(null!==e){var n=t[h].read();null!==n&&(t[l]=null,t[s]=null,t[a]=null,e(p(n,!1)))}}function _(t){e.nextTick(d,t)}function g(t,e){return function(n,r){t.then((function(){e[c]?n(p(void 0,!0)):e[f](n,r)}),r)}}var b=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((r={get stream(){return this[h]},next:function(){var t=this,n=this[u];if(null!==n)return Promise.reject(n);if(this[c])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise((function(n,r){e.nextTick((function(){t[u]?r(t[u]):n(p(void 0,!0))}))}));var r,i=this[l];if(i)r=new Promise(g(i,this));else{var o=this[h].read();if(null!==o)return Promise.resolve(p(o,!1));r=new Promise(this[f])}return this[l]=r,r}},i(r,Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var t=this;return new Promise((function(e,n){t[h].destroy(null,(function(t){t?n(t):e(p(void 0,!0))}))}))})),r),b),y=function(t){var e,n=Object.create(v,(e={},i(e,h,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,f,{value:function(t,e){var r=n[h].read();r?(n[l]=null,n[s]=null,n[a]=null,t(p(r,!1))):(n[s]=t,n[a]=e)},writable:!0}),e));return n[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=n[a];return null!==e&&(n[l]=null,n[s]=null,n[a]=null,e(t)),void(n[u]=t)}var r=n[s];null!==r&&(n[l]=null,n[s]=null,n[a]=null,r(p(void 0,!0))),n[c]=!0})),t.on("readable",_.bind(null,n)),n};t.exports=y}).call(this,n("4362"))},"7bdf":function(t,e,n){"use strict";t.exports=n("ecf9")()?Object.keys:n("7373")},"7c4a":function(t,e,n){"use strict";t.exports=n("ff55")()?globalThis:n("c2c0")},"7d72":function(t,e,n){"use strict";var r=n("8707").Buffer,i=r.isEncoding||function(t){switch(t=""+t,t&&t.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 o(t){if(!t)return"utf8";var e;while(1)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function s(t){var e=o(t);if("string"!==typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}function a(t){var e;switch(this.encoding=s(t),this.encoding){case"utf16le":this.text=d,this.end=_,e=4;break;case"utf8":this.fillLast=f,e=4;break;case"base64":this.text=g,this.end=b,e=3;break;default:return this.write=v,void(this.end=y)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function u(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function c(t,e,n){var r=e.length-1;if(r<n)return 0;var i=u(e[r]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--r<n||-2===i?0:(i=u(e[r]),i>=0?(i>0&&(t.lastNeed=i-2),i):--r<n||-2===i?0:(i=u(e[r]),i>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0))}function l(t,e,n){if(128!==(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"�"}}function f(t){var e=this.lastTotal-this.lastNeed,n=l(this,t,e);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function h(t,e){var n=c(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)}function p(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function d(t,e){if((t.length-e)%2===0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function _(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function g(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function b(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function v(t){return t.toString(this.encoding)}function y(t){return t&&t.length?this.write(t):""}e.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(e=this.fillLast(t),void 0===e)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},a.prototype.end=p,a.prototype.text=h,a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},"7d88":function(t,e,n){"use strict";var r=n("1e0a"),i=/[\n\r\u2028\u2029]/g;t.exports=function(t){var e=r(t);return null===e?"<Non-coercible to string value>":(e.length>100&&(e=e.slice(0,99)+"…"),e=e.replace(i,(function(t){switch(t){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}})),e)}},"7dc8":function(t,e,n){"use strict";var r=n("84d3"),i=n("1793");t.exports=function(t){return i(t)?t:r(t,"%v is not a plain function",arguments[1])}},"7f0f":function(t,e,n){(function(e){const r=n("7135"),i=n("faa1");function o(t,e){const n=new s;return r(t,n,e),n.concat()}class s extends i{constructor(){super(),this._array=new Array(20),this._i=0}write(t){return this._array[this._i++]=t,!0}concat(){let t=0;const n=new Array(this._array.length),r=this._array;let i,o=0;for(i=0;i<r.length&&void 0!==r[i];i++)"string"!==typeof r[i]?n[i]=r[i].length:n[i]=e.byteLength(r[i]),t+=n[i];const s=e.allocUnsafe(t);for(i=0;i<r.length&&void 0!==r[i];i++)"string"!==typeof r[i]?(r[i].copy(s,o),o+=n[i]):(s.write(r[i],o),o+=n[i]);return s}}t.exports=o}).call(this,n("1c35").Buffer)},8311:function(t,e,n){"use strict";(function(e,r){var i,o,s,a=n("e372").Transform,u=n("fb12");function c(){var t=new a;return t._write=function(t,e,n){i.send({data:t.buffer,success:function(){n()},fail:function(t){n(new Error(t))}})},t._flush=function(t){i.close({success:function(){t()}})},t}function l(t){t.hostname||(t.hostname="localhost"),t.path||(t.path="/"),t.wsOptions||(t.wsOptions={})}function f(t,e){var n="wxs"===t.protocol?"wss":"ws",r=n+"://"+t.hostname+t.path;return t.port&&80!==t.port&&443!==t.port&&(r=n+"://"+t.hostname+":"+t.port+t.path),"function"===typeof t.transformWsUrl&&(r=t.transformWsUrl(r,t,e)),r}function h(){i.onOpen((function(){s.setReadable(o),s.setWritable(o),s.emit("connect")})),i.onMessage((function(t){var n=t.data;n=n instanceof ArrayBuffer?e.from(n):e.from(n,"utf8"),o.push(n)})),i.onClose((function(){s.end(),s.destroy()})),i.onError((function(t){s.destroy(new Error(t.errMsg))}))}function p(t,e){if(e.hostname=e.hostname||e.host,!e.hostname)throw new Error("Could not determine host. Specify host manually.");var n="MQIsdp"===e.protocolId&&3===e.protocolVersion?"mqttv3.1":"mqtt";l(e);var a=f(e,t);i=wx.connectSocket({url:a,protocols:[n]}),o=c(),s=u.obj(),s._destroy=function(t,e){i.close({success:function(){e&&e(t)}})};var p=s.destroy;return s.destroy=function(){s.destroy=p;var t=this;r.nextTick((function(){i.close({fail:function(){t._destroy(new Error)}})}))}.bind(s),h(),s}t.exports=p}).call(this,n("1c35").Buffer,n("4362"))},"84d3":function(t,e,n){"use strict";var r=n("936a"),i=n("5edd"),o=n("eae0"),s=n("7d88"),a=function(t,e){return t.replace("%v",s(e))};t.exports=function(t,e,n){if(!i(n))throw new TypeError(a(e,t));if(!r(t)){if("default"in n)return n["default"];if(n.isOptional)return null}var s=o(n.errorMessage);throw r(s)||(s=e),new TypeError(a(s,t))}},"86c6":function(t,e,n){"use strict";var r=n("9bfc").codes.ERR_INVALID_OPT_VALUE;function i(t,e,n){return null!=t.highWaterMark?t.highWaterMark:e?t[n]:null}function o(t,e,n,o){var s=i(e,o,n);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0){var a=o?n:"highWaterMark";throw new r(a,s)}return Math.floor(s)}return t.objectMode?16:16384}t.exports={getHighWaterMark:o}},8707:function(t,e,n){var r=n("1c35"),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function s(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=s),o(i,s),s.from=function(t,e,n){if("number"===typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},s.alloc=function(t,e,n){if("number"!==typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"===typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},s.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},"8a50":function(t,e,n){"use strict";var r=n("e9bd"),i=n("692b"),o=n("6024"),s=n("09d9"),a=n("3473"),u=n("1c4a").iterator;t.exports=function(t){return"function"===typeof a(t)[u]?t[u]():r(t)?new o(t):i(t)?new s(t):new o(t)}},"8fe5":function(t,e,n){"use strict";var r=n("1c4a").iterator,i=n("e9bd"),o=n("7045"),s=n("d53b"),a=n("1a94"),u=n("96ae"),c=n("62c4"),l=n("692b"),f=Array.isArray,h=Function.prototype.call,p={configurable:!0,enumerable:!0,writable:!0,value:null},d=Object.defineProperty;t.exports=function(t){var e,n,_,g,b,v,y,m,w,S,k=arguments[1],E=arguments[2];if(t=Object(u(t)),c(k)&&a(k),this&&this!==Array&&o(this))e=this;else{if(!k){if(i(t))return b=t.length,1!==b?Array.apply(null,t):(g=new Array(1),g[0]=t[0],g);if(f(t)){for(g=new Array(b=t.length),n=0;n<b;++n)g[n]=t[n];return g}}g=[]}if(!f(t))if(void 0!==(w=t[r])){y=a(w).call(t),e&&(g=new e),m=y.next(),n=0;while(!m.done)S=k?h.call(k,E,m.value,n):m.value,e?(p.value=S,d(g,n,p)):g[n]=S,m=y.next(),++n;b=n}else if(l(t)){for(b=t.length,e&&(g=new e),n=0,_=0;n<b;++n)S=t[n],n+1<b&&(v=S.charCodeAt(0),v>=55296&&v<=56319&&(S+=t[++n])),S=k?h.call(k,E,S,_):S,e?(p.value=S,d(g,_,p)):g[_]=S,++_;b=_}if(void 0===b)for(b=s(t.length),e&&(g=new e(b)),n=0;n<b;++n)S=k?h.call(k,E,t[n],n):t[n],e?(p.value=S,d(g,n,p)):g[n]=S;return e&&(p.value=null,g.length=b),g}},9013:function(t,e,n){"use strict";var r=n("5edd");t.exports=function(t){if(!r(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(e){return!1}}},"91dd":function(t,e,n){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,o){e=e||"&",n=n||"=";var s={};if("string"!==typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var u=1e3;o&&"number"===typeof o.maxKeys&&(u=o.maxKeys);var c=t.length;u>0&&c>u&&(c=u);for(var l=0;l<c;++l){var f,h,p,d,_=t[l].replace(a,"%20"),g=_.indexOf(n);g>=0?(f=_.substr(0,g),h=_.substr(g+1)):(f=_,h=""),p=decodeURIComponent(f),d=decodeURIComponent(h),r(s,p)?i(s[p])?s[p].push(d):s[p]=[s[p],d]:s[p]=d}return s};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},"91e3":function(t,e,n){"use strict";var r=n("e9bd"),i=n("62c4"),o=n("692b"),s=n("1c4a").iterator,a=Array.isArray;t.exports=function(t){return!!i(t)&&(!!a(t)||(!!o(t)||(!!r(t)||"function"===typeof t[s])))}},"936a":function(t,e,n){"use strict";var r=void 0;t.exports=function(t){return t!==r&&null!==t}},"94ee":function(t,e,n){"use strict";var r,i,o,s=n("f508"),a=n("b380"),u=n("7c4a").Symbol,c=n("964d"),l=n("e03f"),f=n("25be"),h=Object.create,p=Object.defineProperties,d=Object.defineProperty;if("function"===typeof u)try{String(u()),o=!0}catch(_){}else u=null;i=function(t){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return r(t)},t.exports=r=function t(e){var n;if(this instanceof t)throw new TypeError("Symbol is not a constructor");return o?u(e):(n=h(i.prototype),e=void 0===e?"":String(e),p(n,{__description__:s("",e),__name__:s("",c(e))}))},l(r),f(r),p(i.prototype,{constructor:s(r),toString:s("",(function(){return this.__name__}))}),p(r.prototype,{toString:s((function(){return"Symbol ("+a(this).__description__+")"})),valueOf:s((function(){return a(this)}))}),d(r.prototype,r.toPrimitive,s("",(function(){var t=a(this);return"symbol"===typeof t?t:t.toString()}))),d(r.prototype,r.toStringTag,s("c","Symbol")),d(i.prototype,r.toStringTag,s("c",r.prototype[r.toStringTag])),d(i.prototype,r.toPrimitive,s("c",r.prototype[r.toPrimitive]))},"964d":function(t,e,n){"use strict";var r=n("f508"),i=Object.create,o=Object.defineProperty,s=Object.prototype,a=i(null);t.exports=function(t){var e,n,i=0;while(a[t+(i||"")])++i;return t+=i||"",a[t]=!0,e="@@"+t,o(s,e,r.gs(null,(function(t){n||(n=!0,o(this,e,r(t)),n=!1)}))),e}},"966d":function(t,e,n){"use strict";(function(e){function n(t,n,r,i){if("function"!==typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,n)}));case 3:return e.nextTick((function(){t.call(null,n,r)}));case 4:return e.nextTick((function(){t.call(null,n,r,i)}));default:o=new Array(a-1),s=0;while(s<o.length)o[s++]=arguments[s];return e.nextTick((function(){t.apply(null,o)}))}}"undefined"===typeof e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:n}:t.exports=e}).call(this,n("4362"))},"96ae":function(t,e,n){"use strict";var r=n("62c4");t.exports=function(t){if(!r(t))throw new TypeError("Cannot use null or undefined");return t}},"986b":function(t,e,n){"use strict";var r,i=n("936a"),o=n("262a"),s=n("7dc8"),a=n("d66f"),u=n("f3a6"),c=n("4665"),l=Function.prototype.bind,f=Object.defineProperty,h=Object.prototype.hasOwnProperty;r=function(t,e,n){var r,i=o(e)&&s(e.value);return r=a(e),delete r.writable,delete r.value,r.get=function(){return!n.overwriteDefinition&&h.call(this,t)?i:(e.value=l.call(i,n.resolveContext?n.resolveContext(this):this),f(this,t,e),this[t])},r},t.exports=function(t){var e=u(arguments[1]);return i(e.resolveContext)&&s(e.resolveContext),c(t,(function(t,n){return r(n,t,e)}))}},"9bfc":function(t,e,n){"use strict";function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var i={};function o(t,e,n){function o(t,n,r){return"string"===typeof e?e:e(t,n,r)}n||(n=Error);var s=function(t){function e(e,n,r){return t.call(this,o(e,n,r))||this}return r(e,t),e}(n);s.prototype.name=n.name,s.prototype.code=t,i[t]=s}function s(t,e){if(Array.isArray(t)){var n=t.length;return t=t.map((function(t){return String(t)})),n>2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}function a(t,e,n){return t.substr(!n||n<0?0:+n,e.length)===e}function u(t,e,n){return(void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}function c(t,e,n){return"number"!==typeof n&&(n=0),!(n+e.length>t.length)&&-1!==t.indexOf(e,n)}o("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(t,e,n){var r,i;if("string"===typeof e&&a(e,"not ")?(r="must not be",e=e.replace(/^not /,"")):r="must be",u(t," argument"))i="The ".concat(t," ").concat(r," ").concat(s(e,"type"));else{var o=c(t,".")?"property":"argument";i='The "'.concat(t,'" ').concat(o," ").concat(r," ").concat(s(e,"type"))}return i+=". Received type ".concat(typeof n),i}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=i},"9d37":function(t,e,n){"use strict";t.exports=i;var r=n("fe34");function i(t){if(!(this instanceof i))return new i(t);r.call(this,t)}n("3fb5")(i,r),i.prototype._transform=function(t,e,n){n(null,t)}},"9df0":function(t,e,n){"use strict";var r=Object.create,i=Object.getPrototypeOf,o={};t.exports=function(){var t=Object.setPrototypeOf,e=arguments[0]||r;return"function"===typeof t&&i(t(e(null),o))===o}},a297:function(t,e,n){"use strict";t.exports=function(){var t=Math.sign;return"function"===typeof t&&(1===t(10)&&-1===t(-20))}},a493:function(t,e,n){"use strict";(function(e){var r=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=c;var i=n("0e8b"),o=n("f6ba");n("3fb5")(c,i);for(var s=r(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(f,this)}function f(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,n("4362"))},a50f:function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},a671:function(t,e,n){"use strict";var r=n("96ae");t.exports=function(){return r(this).length=0,this}},a7c9:function(t,e){class n{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}}t.exports=n},ab52:function(t,e,n){(function(e){var r=n("566b"),i=function(){},o=function(t){return t.setHeader&&"function"===typeof t.abort},s=function(t){return t.stdio&&Array.isArray(t.stdio)&&3===t.stdio.length},a=function(t,n,u){if("function"===typeof n)return a(t,null,n);n||(n={}),u=r(u||i);var c=t._writableState,l=t._readableState,f=n.readable||!1!==n.readable&&t.readable,h=n.writable||!1!==n.writable&&t.writable,p=!1,d=function(){t.writable||_()},_=function(){h=!1,f||u.call(t)},g=function(){f=!1,h||u.call(t)},b=function(e){u.call(t,e?new Error("exited with error code: "+e):null)},v=function(e){u.call(t,e)},y=function(){e.nextTick(m)},m=function(){if(!p)return(!f||l&&l.ended&&!l.destroyed)&&(!h||c&&c.ended&&!c.destroyed)?void 0:u.call(t,new Error("premature close"))},w=function(){t.req.on("finish",_)};return o(t)?(t.on("complete",_),t.on("abort",y),t.req?w():t.on("request",w)):h&&!c&&(t.on("end",d),t.on("close",d)),s(t)&&t.on("exit",b),t.on("end",g),t.on("finish",_),!1!==n.error&&t.on("error",v),t.on("close",y),function(){p=!0,t.removeListener("complete",_),t.removeListener("abort",y),t.removeListener("request",w),t.req&&t.req.removeListener("finish",_),t.removeListener("end",d),t.removeListener("close",d),t.removeListener("finish",_),t.removeListener("exit",b),t.removeListener("end",g),t.removeListener("error",v),t.removeListener("close",y)}};t.exports=a}).call(this,n("4362"))},ad71:function(t,e,n){"use strict";(function(e,r){var i=n("966d");t.exports=S;var o,s=n("e3db");S.ReadableState=w;n("faa1").EventEmitter;var a=function(t,e){return t.listeners(e).length},u=n("429b"),c=n("8707").Buffer,l=e.Uint8Array||function(){};function f(t){return c.from(t)}function h(t){return c.isBuffer(t)||t instanceof l}var p=Object.create(n("3a7c"));p.inherits=n("3fb5");var d=n(4),_=void 0;_=d&&d.debuglog?d.debuglog("stream"):function(){};var g,b=n("5e1a"),v=n("4681");p.inherits(S,u);var y=["error","close","destroy","pause","resume"];function m(t,e,n){if("function"===typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}function w(t,e){o=o||n("b19a"),t=t||{};var r=e instanceof o;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new b,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.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(g||(g=n("7d72").StringDecoder),this.decoder=new g(t.encoding),this.encoding=t.encoding)}function S(t){if(o=o||n("b19a"),!(this instanceof S))return new S(t);this._readableState=new w(t,this),this.readable=!0,t&&("function"===typeof t.read&&(this._read=t.read),"function"===typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function k(t,e,n,r,i){var o,s=t._readableState;null===e?(s.reading=!1,j(t,s)):(i||(o=x(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"===typeof e||s.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=f(e)),r?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):E(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(e=s.decoder.write(e),s.objectMode||0!==e.length?E(t,s,e,!1):P(t,s)):E(t,s,e,!1))):r||(s.reading=!1));return O(s)}function E(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&A(t)),P(t,e)}function x(t,e){var n;return h(e)||"string"===typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function O(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}Object.defineProperty(S.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),S.prototype.destroy=v.destroy,S.prototype._undestroy=v.undestroy,S.prototype._destroy=function(t,e){this.push(null),e(t)},S.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"===typeof t&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=c.from(t,e),e=""),n=!0),k(this,t,e,!1,n)},S.prototype.unshift=function(t){return k(this,t,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(t){return g||(g=n("7d72").StringDecoder),this._readableState.decoder=new g(t),this._readableState.encoding=t,this};var I=8388608;function C(t){return t>=I?t=I:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function R(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=C(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function j(t,e){if(!e.ended){if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,A(t)}}function A(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(_("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(T,t):T(t))}function T(t){_("emit readable"),t.emit("readable"),D(t)}function P(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(M,t,e))}function M(t,e){var n=e.length;while(!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark){if(_("maybeReadMore read 0"),t.read(0),n===e.length)break;n=e.length}e.readingMore=!1}function L(t){return function(){var e=t._readableState;_("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,D(t))}}function N(t){_("readable nexttick read 0"),t.read(0)}function B(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(U,t,e))}function U(t,e){e.reading||(_("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),D(t),e.flowing&&!e.reading&&t.read(0)}function D(t){var e=t._readableState;_("flow",e.flowing);while(e.flowing&&null!==t.read());}function q(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=F(t,e.buffer,e.decoder),n);var n}function F(t,e,n){var r;return t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():n?W(t,e):V(t,e),r}function W(t,e){var n=e.head,r=1,i=n.data;t-=i.length;while(n=n.next){var o=n.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),t-=s,0===t){s===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++r}return e.length-=r,i}function V(t,e){var n=c.allocUnsafe(t),r=e.head,i=1;r.data.copy(n),t-=r.data.length;while(r=r.next){var o=r.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),t-=s,0===t){s===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++i}return e.length-=i,n}function z(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(H,e,t))}function H(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function K(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}S.prototype.read=function(t){_("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return _("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?z(this):A(this),null;if(t=R(t,e),0===t&&e.ended)return 0===e.length&&z(this),null;var r,i=e.needReadable;return _("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&(i=!0,_("length less than watermark",i)),e.ended||e.reading?(i=!1,_("reading or ended",i)):i&&(_("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=R(n,e))),r=t>0?q(t,e):null,null===r?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&z(this)),null!==r&&this.emit("data",r),r},S.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(t,e){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t);break}o.pipesCount+=1,_("pipe count=%d opts=%j",o.pipesCount,e);var s=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr,u=s?l:w;function c(t,e){_("onunpipe"),t===n&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,p())}function l(){_("onend"),t.end()}o.endEmitted?i.nextTick(u):n.once("end",u),t.on("unpipe",c);var f=L(n);t.on("drain",f);var h=!1;function p(){_("cleanup"),t.removeListener("close",v),t.removeListener("finish",y),t.removeListener("drain",f),t.removeListener("error",b),t.removeListener("unpipe",c),n.removeListener("end",l),n.removeListener("end",w),n.removeListener("data",g),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||f()}var d=!1;function g(e){_("ondata"),d=!1;var r=t.write(e);!1!==r||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==K(o.pipes,t))&&!h&&(_("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function b(e){_("onerror",e),w(),t.removeListener("error",b),0===a(t,"error")&&t.emit("error",e)}function v(){t.removeListener("finish",y),w()}function y(){_("onfinish"),t.removeListener("close",v),w()}function w(){_("unpipe"),n.unpipe(t)}return n.on("data",g),m(t,"error",b),t.once("close",v),t.once("finish",y),t.emit("pipe",n),o.flowing||(_("pipe resume"),n.resume()),t},S.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var s=K(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n)),this},S.prototype.on=function(t,e){var n=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&A(this):i.nextTick(N,this))}return n},S.prototype.addListener=S.prototype.on,S.prototype.resume=function(){var t=this._readableState;return t.flowing||(_("resume"),t.flowing=!0,B(this,t)),this},S.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this},S.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(_("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){if(_("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=e.push(i);o||(r=!0,t.pause())}})),t)void 0===this[i]&&"function"===typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<y.length;o++)t.on(y[o],this.emit.bind(this,y[o]));return this._read=function(e){_("wrapped _read",e),r&&(r=!1,t.resume())},this},Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),S._fromList=q}).call(this,n("c8ba"),n("4362"))},ae84:function(t,e,n){"use strict";function r(t){for(var e=t.split("/"),n=0;n<e.length;n++)if("+"!==e[n]){if("#"===e[n])return n===e.length-1;if(-1!==e[n].indexOf("+")||-1!==e[n].indexOf("#"))return!1}return!0}function i(t){if(0===t.length)return"empty_topic_list";for(var e=0;e<t.length;e++)if(!r(t[e]))return t[e];return null}t.exports={validateTopics:i}},b185:function(t,e,n){"use strict";t.exports=n("14cf")()?Array.from:n("8fe5")},b19a:function(t,e,n){"use strict";var r=n("966d"),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=f;var o=Object.create(n("3a7c"));o.inherits=n("3fb5");var s=n("ad71"),a=n("dc14");o.inherits(f,s);for(var u=i(a.prototype),c=0;c<u.length;c++){var l=u[c];f.prototype[l]||(f.prototype[l]=a.prototype[l])}function f(t){if(!(this instanceof f))return new f(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(t){t.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),f.prototype._destroy=function(t,e){this.push(null),this.end(),r.nextTick(e,t)}},b289:function(t,e,n){(function(e){const n=t.exports;n.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"},n.codes={};for(const t in n.types){const e=n.types[t];n.codes[e]=t}n.CMD_SHIFT=4,n.CMD_MASK=240,n.DUP_MASK=8,n.QOS_MASK=3,n.QOS_SHIFT=1,n.RETAIN_MASK=1,n.VARBYTEINT_MASK=127,n.VARBYTEINT_FIN_MASK=128,n.VARBYTEINT_MAX=268435455,n.SESSIONPRESENT_MASK=1,n.SESSIONPRESENT_HEADER=e.from([n.SESSIONPRESENT_MASK]),n.CONNACK_HEADER=e.from([n.codes.connack<<n.CMD_SHIFT]),n.USERNAME_MASK=128,n.PASSWORD_MASK=64,n.WILL_RETAIN_MASK=32,n.WILL_QOS_MASK=24,n.WILL_QOS_SHIFT=3,n.WILL_FLAG_MASK=4,n.CLEAN_SESSION_MASK=2,n.CONNECT_HEADER=e.from([n.codes.connect<<n.CMD_SHIFT]),n.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},n.propertiesCodes={};for(const t in n.properties){const e=n.properties[t];n.propertiesCodes[e]=t}function r(t){return[0,1,2].map(r=>[0,1].map(i=>[0,1].map(o=>{const s=e.alloc(1);return s.writeUInt8(n.codes[t]<<n.CMD_SHIFT|(i?n.DUP_MASK:0)|r<<n.QOS_SHIFT|o,0,!0),s})))}n.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"},n.PUBLISH_HEADER=r("publish"),n.SUBSCRIBE_HEADER=r("subscribe"),n.SUBSCRIBE_OPTIONS_QOS_MASK=3,n.SUBSCRIBE_OPTIONS_NL_MASK=1,n.SUBSCRIBE_OPTIONS_NL_SHIFT=2,n.SUBSCRIBE_OPTIONS_RAP_MASK=1,n.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,n.SUBSCRIBE_OPTIONS_RH_MASK=3,n.SUBSCRIBE_OPTIONS_RH_SHIFT=4,n.SUBSCRIBE_OPTIONS_RH=[0,16,32],n.SUBSCRIBE_OPTIONS_NL=4,n.SUBSCRIBE_OPTIONS_RAP=8,n.SUBSCRIBE_OPTIONS_QOS=[0,1,2],n.UNSUBSCRIBE_HEADER=r("unsubscribe"),n.ACKS={unsuback:r("unsuback"),puback:r("puback"),pubcomp:r("pubcomp"),pubrel:r("pubrel"),pubrec:r("pubrec")},n.SUBACK_HEADER=e.from([n.codes.suback<<n.CMD_SHIFT]),n.VERSION3=e.from([3]),n.VERSION4=e.from([4]),n.VERSION5=e.from([5]),n.VERSION131=e.from([131]),n.VERSION132=e.from([132]),n.QOS=[0,1,2].map(t=>e.from([t])),n.EMPTY={pingreq:e.from([n.codes.pingreq<<4,0]),pingresp:e.from([n.codes.pingresp<<4,0]),disconnect:e.from([n.codes.disconnect<<4,0])}}).call(this,n("1c35").Buffer)},b380:function(t,e,n){"use strict";var r=n("1126");t.exports=function(t){if(!r(t))throw new TypeError(t+" is not a symbol");return t}},b383:function(t,e,n){"use strict";e.decode=e.parse=n("91dd"),e.encode=e.stringify=n("e099")},b41e:function(t,e){var n=null;"undefined"!==typeof WebSocket?n=WebSocket:"undefined"!==typeof MozWebSocket?n=MozWebSocket:"undefined"!==typeof window&&(n=window.WebSocket||window.MozWebSocket),t.exports=n},b779:function(t,e,n){"use strict";t.exports=function(){return"undefined"!==typeof Map&&"[object Map]"===Object.prototype.toString.call(new Map)}()},b7d1:function(t,e,n){(function(e){function n(t,e){if(r("noDeprecation"))return t;var n=!1;function i(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation"),n=!0}return t.apply(this,arguments)}return i}function r(t){try{if(!e.localStorage)return!1}catch(r){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=n}).call(this,n("c8ba"))},b98b:function(t,e,n){t.exports=n("faa1").EventEmitter},ba4b:function(t,e,n){"use strict";var r,i=Object.create;n("9df0")()||(r=n("e19c")),t.exports=function(){var t,e,n;return r?1!==r.level?i:(t={},e={},n={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach((function(t){e[t]="__proto__"!==t?n:{configurable:!0,enumerable:!1,writable:!0,value:void 0}})),Object.defineProperties(t,e),Object.defineProperty(r,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:t}),function(e,n){return i(null===e?t:e,n)}):i}()},ba61:function(t,e,n){"use strict";var r=n("7c4a"),i={object:!0,symbol:!0};t.exports=function(){var t,e=r.Symbol;if("function"!==typeof e)return!1;t=e("test symbol");try{String(t)}catch(n){return!1}return!!i[typeof e.iterator]&&(!!i[typeof e.toPrimitive]&&!!i[typeof e.toStringTag])}},bae6:function(t,e,n){"use strict";t.exports=n("a297")()?Math.sign:n("ef7a")},bf09:function(t,e,n){"use strict";var r=n("9bfc").codes.ERR_STREAM_PREMATURE_CLOSE;function i(t){var e=!1;return function(){if(!e){e=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t.apply(this,r)}}}function o(){}function s(t){return t.setHeader&&"function"===typeof t.abort}function a(t,e,n){if("function"===typeof e)return a(t,null,e);e||(e={}),n=i(n||o);var u=e.readable||!1!==e.readable&&t.readable,c=e.writable||!1!==e.writable&&t.writable,l=function(){t.writable||h()},f=t._writableState&&t._writableState.finished,h=function(){c=!1,f=!0,u||n.call(t)},p=t._readableState&&t._readableState.endEmitted,d=function(){u=!1,p=!0,c||n.call(t)},_=function(e){n.call(t,e)},g=function(){var e;return u&&!p?(t._readableState&&t._readableState.ended||(e=new r),n.call(t,e)):c&&!f?(t._writableState&&t._writableState.ended||(e=new r),n.call(t,e)):void 0},b=function(){t.req.on("finish",h)};return s(t)?(t.on("complete",h),t.on("abort",g),t.req?b():t.on("request",b)):c&&!t._writableState&&(t.on("end",l),t.on("close",l)),t.on("end",d),t.on("finish",h),!1!==e.error&&t.on("error",_),t.on("close",g),function(){t.removeListener("complete",h),t.removeListener("abort",g),t.removeListener("request",b),t.req&&t.req.removeListener("finish",h),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",h),t.removeListener("end",d),t.removeListener("error",_),t.removeListener("close",g)}}t.exports=a},c2c0:function(t,e){var n=function(){if("object"===typeof self&&self)return self;if("object"===typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};t.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(t){return n()}try{return __global__||n()}finally{delete Object.prototype.__global__}}()},c351:function(t,e,n){"use strict";var r=n("e9bd"),i=n("1a94"),o=n("692b"),s=n("8a50"),a=Array.isArray,u=Function.prototype.call,c=Array.prototype.some;t.exports=function(t,e){var n,l,f,h,p,d,_,g,b=arguments[2];if(a(t)||r(t)?n="array":o(t)?n="string":t=s(t),i(e),f=function(){h=!0},"array"!==n){if("string"!==n){l=t.next();while(!l.done){if(u.call(e,b,l.value,f),h)return;l=t.next()}}else for(d=t.length,p=0;p<d;++p)if(_=t[p],p+1<d&&(g=_.charCodeAt(0),g>=55296&&g<=56319&&(_+=t[++p])),u.call(e,b,_,f),h)break}else c.call(t,(function(t){return u.call(e,b,t,f),h}))}},c4c7:function(t,e,n){"use strict";(function(e){var r,i,o,s=n("e372").Transform,a=n("fb12"),u=n("1fb5"),c=!1;function l(){var t=new s;return t._write=function(t,e,n){r.sendSocketMessage({data:t.buffer,success:function(){n()},fail:function(){n(new Error)}})},t._flush=function(t){r.closeSocket({success:function(){t()}})},t}function f(t){t.hostname||(t.hostname="localhost"),t.path||(t.path="/"),t.wsOptions||(t.wsOptions={})}function h(t,e){var n="alis"===t.protocol?"wss":"ws",r=n+"://"+t.hostname+t.path;return t.port&&80!==t.port&&443!==t.port&&(r=n+"://"+t.hostname+":"+t.port+t.path),"function"===typeof t.transformWsUrl&&(r=t.transformWsUrl(r,t,e)),r}function p(){c||(c=!0,r.onSocketOpen((function(){o.setReadable(i),o.setWritable(i),o.emit("connect")})),r.onSocketMessage((function(t){if("string"===typeof t.data){var n=u.toByteArray(t.data),r=e.from(n);i.push(r)}else{var o=new FileReader;o.addEventListener("load",(function(){var t=o.result;t=t instanceof ArrayBuffer?e.from(t):e.from(t,"utf8"),i.push(t)})),o.readAsArrayBuffer(t.data)}})),r.onSocketClose((function(){o.end(),o.destroy()})),r.onSocketError((function(t){o.destroy(t)})))}function d(t,e){if(e.hostname=e.hostname||e.host,!e.hostname)throw new Error("Could not determine host. Specify host manually.");var n="MQIsdp"===e.protocolId&&3===e.protocolVersion?"mqttv3.1":"mqtt";f(e);var s=h(e,t);return r=e.my,r.connectSocket({url:s,protocols:n}),i=l(),o=a.obj(),p(),o}t.exports=d}).call(this,n("1c35").Buffer)},c5f4:function(t,e,n){"use strict";var r=n("bae6"),i=Math.abs,o=Math.floor;t.exports=function(t){return isNaN(t)?0:(t=Number(t),0!==t&&isFinite(t)?r(t)*o(i(t)):t)}},c682:function(t,e,n){"use strict";t.exports=n("5a5c")("key","value","key+value")},c9fc:function(t,e,n){"use strict";var r,i,o,s,a,u,c,l=n("f508"),f=n("1a94"),h=Function.prototype.apply,p=Function.prototype.call,d=Object.create,_=Object.defineProperty,g=Object.defineProperties,b=Object.prototype.hasOwnProperty,v={configurable:!0,enumerable:!1,writable:!0};r=function(t,e){var n;return f(e),b.call(this,"__ee__")?n=this.__ee__:(n=v.value=d(null),_(this,"__ee__",v),v.value=null),n[t]?"object"===typeof n[t]?n[t].push(e):n[t]=[n[t],e]:n[t]=e,this},i=function(t,e){var n,i;return f(e),i=this,r.call(this,t,n=function(){o.call(i,t,n),h.call(e,this,arguments)}),n.__eeOnceListener__=e,this},o=function(t,e){var n,r,i,o;if(f(e),!b.call(this,"__ee__"))return this;if(n=this.__ee__,!n[t])return this;if(r=n[t],"object"===typeof r)for(o=0;i=r[o];++o)i!==e&&i.__eeOnceListener__!==e||(2===r.length?n[t]=r[o?0:1]:r.splice(o,1));else r!==e&&r.__eeOnceListener__!==e||delete n[t];return this},s=function(t){var e,n,r,i,o;if(b.call(this,"__ee__")&&(i=this.__ee__[t],i))if("object"===typeof i){for(n=arguments.length,o=new Array(n-1),e=1;e<n;++e)o[e-1]=arguments[e];for(i=i.slice(),e=0;r=i[e];++e)h.call(r,this,o)}else switch(arguments.length){case 1:p.call(i,this);break;case 2:p.call(i,this,arguments[1]);break;case 3:p.call(i,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),e=1;e<n;++e)o[e-1]=arguments[e];h.call(i,this,o)}},a={on:r,once:i,off:o,emit:s},u={on:l(r),once:l(i),off:l(o),emit:l(s)},c=g({},u),t.exports=e=function(t){return null==t?d(c):g(Object(t),u)},e.methods=a},cecf:function(t,e,n){"use strict";var r=n("1a94"),i=n("96ae"),o=Function.prototype.bind,s=Function.prototype.call,a=Object.keys,u=Object.prototype.propertyIsEnumerable;t.exports=function(t,e){return function(n,c){var l,f=arguments[2],h=arguments[3];return n=Object(i(n)),r(c),l=a(n),h&&l.sort("function"===typeof h?o.call(h,n):void 0),"function"!==typeof t&&(t=l[t]),s.call(t,l,(function(t,r){return u.call(n,t)?s.call(c,f,n[t],t,n,r):e}))}}},d53b:function(t,e,n){"use strict";var r=n("c5f4"),i=Math.max;t.exports=function(t){return i(0,r(t))}},d633:function(t,e){function n(t,e){if(t&&e)return n(t)(e);if("function"!==typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),i=e[e.length-1];return"function"===typeof r&&r!==i&&Object.keys(i).forEach((function(t){r[t]=i[t]})),r}}t.exports=n},d66f:function(t,e,n){"use strict";var r=n("b185"),i=n("2031"),o=n("96ae");t.exports=function(t){var e=Object(o(t)),n=arguments[1],s=Object(arguments[2]);if(e!==t&&!n)return e;var a={};return n?r(n,(function(e){(s.ensure||e in t)&&(a[e]=t[e])})):i(a,t),a}},dc14:function(t,e,n){"use strict";(function(e,r){var i=n("966d");function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){N(e,t)}}t.exports=y;var s,a=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?setImmediate:i.nextTick;y.WritableState=v;var u=Object.create(n("3a7c"));u.inherits=n("3fb5");var c={deprecate:n("b7d1")},l=n("429b"),f=n("8707").Buffer,h=r.Uint8Array||function(){};function p(t){return f.from(t)}function d(t){return f.isBuffer(t)||t instanceof h}var _,g=n("4681");function b(){}function v(t,e){s=s||n("b19a"),t=t||{};var r=e instanceof s;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,a=t.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(a||0===a)?a:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===t.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){I(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function y(t){if(s=s||n("b19a"),!_.call(y,this)&&!(this instanceof s))return new y(t);this._writableState=new v(t,this),this.writable=!0,t&&("function"===typeof t.write&&(this._write=t.write),"function"===typeof t.writev&&(this._writev=t.writev),"function"===typeof t.destroy&&(this._destroy=t.destroy),"function"===typeof t.final&&(this._final=t.final)),l.call(this)}function m(t,e){var n=new Error("write after end");t.emit("error",n),i.nextTick(e,n)}function w(t,e,n,r){var o=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"===typeof n||void 0===n||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),i.nextTick(r,s),o=!1),o}function S(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!==typeof e||(e=f.from(e,n)),e}function k(t,e,n,r,i,o){if(!n){var s=S(e,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=e.objectMode?1:r.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else E(t,e,!1,a,r,i,o);return u}function E(t,e,n,r,i,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function x(t,e,n,r,o){--e.pendingcb,n?(i.nextTick(o,r),i.nextTick(M,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(o(r),t._writableState.errorEmitted=!0,t.emit("error",r),M(t,e))}function O(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function I(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(O(n),e)x(t,n,r,e,i);else{var o=A(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||j(t,n),r?a(C,t,n,o,i):C(t,n,o,i)}}function C(t,e,n,r){n||R(t,e),e.pendingcb--,r(),M(t,e)}function R(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function j(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),s=e.corkedRequestsFree;s.entry=n;var a=0,u=!0;while(n)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,E(t,e,!0,e.length,i,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{while(n){var c=n.chunk,l=n.encoding,f=n.callback,h=e.objectMode?1:c.length;if(E(t,e,!1,h,c,l,f),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function A(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function T(t,e){t._final((function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),M(t,e)}))}function P(t,e){e.prefinished||e.finalCalled||("function"===typeof t._final?(e.pendingcb++,e.finalCalled=!0,i.nextTick(T,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function M(t,e){var n=A(e);return n&&(P(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}function L(t,e,n){e.ending=!0,M(t,e),n&&(e.finished?i.nextTick(n):t.once("finish",n)),e.ended=!0,t.writable=!1}function N(t,e,n){var r=t.entry;t.entry=null;while(r){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}u.inherits(y,l),v.prototype.getBuffer=function(){var t=this.bufferedRequest,e=[];while(t)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(_=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(t){return!!_.call(this,t)||this===y&&(t&&t._writableState instanceof v)}})):_=function(t){return t instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(t,e,n){var r=this._writableState,i=!1,o=!r.objectMode&&d(t);return o&&!f.isBuffer(t)&&(t=p(t)),"function"===typeof e&&(n=e,e=null),o?e="buffer":e||(e=r.defaultEncoding),"function"!==typeof n&&(n=b),r.ended?m(this,n):(o||w(this,r,t,n))&&(r.pendingcb++,i=k(this,r,o,t,e,n)),i},y.prototype.cork=function(){var t=this._writableState;t.corked++},y.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||j(this,t))},y.prototype.setDefaultEncoding=function(t){if("string"===typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(t,e,n){var r=this._writableState;"function"===typeof t?(n=t,t=null,e=null):"function"===typeof e&&(n=e,e=null),null!==t&&void 0!==t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||L(this,r,n)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),y.prototype.destroy=g.destroy,y.prototype._undestroy=g.undestroy,y.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,n("4362"),n("c8ba"))},dc90:function(t,e,n){function r(t){function e(t){let e=0;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return r.colors[Math.abs(e)%r.colors.length]}function r(t){let e,n,o,s=null;function a(...t){if(!a.enabled)return;const n=a,i=Number(new Date),o=i-(e||i);n.diff=o,n.prev=e,n.curr=i,e=i,t[0]=r.coerce(t[0]),"string"!==typeof t[0]&&t.unshift("%O");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(e,i)=>{if("%%"===e)return"%";s++;const o=r.formatters[i];if("function"===typeof o){const r=t[s];e=o.call(n,r),t.splice(s,1),s--}return e}),r.formatArgs.call(n,t);const u=n.log||r.log;u.apply(n,t)}return a.namespace=t,a.useColors=r.useColors(),a.color=r.selectColor(t),a.extend=i,a.destroy=r.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(n!==r.namespaces&&(n=r.namespaces,o=r.enabled(t)),o),set:t=>{s=t}}),"function"===typeof r.init&&r.init(a),a}function i(t,e){const n=r(this.namespace+("undefined"===typeof e?":":e)+t);return n.log=this.log,n}function o(t){let e;r.save(t),r.namespaces=t,r.names=[],r.skips=[];const n=("string"===typeof t?t:"").split(/[\s,]+/),i=n.length;for(e=0;e<i;e++)n[e]&&(t=n[e].replace(/\*/g,".*?"),"-"===t[0]?r.skips.push(new RegExp("^"+t.substr(1)+"$")):r.names.push(new RegExp("^"+t+"$")))}function s(){const t=[...r.names.map(u),...r.skips.map(u).map(t=>"-"+t)].join(",");return r.enable(""),t}function a(t){if("*"===t[t.length-1])return!0;let e,n;for(e=0,n=r.skips.length;e<n;e++)if(r.skips[e].test(t))return!1;for(e=0,n=r.names.length;e<n;e++)if(r.names[e].test(t))return!0;return!1}function u(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}function c(t){return t instanceof Error?t.stack||t.message:t}function l(){}return r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=o,r.enabled=a,r.humanize=n("1468"),r.destroy=l,Object.keys(t).forEach(e=>{r[e]=t[e]}),r.names=[],r.skips=[],r.formatters={},r.selectColor=e,r.enable(r.load()),r}t.exports=r},df86:function(t,e,n){"use strict";(function(e,r){var i=n("faa1").EventEmitter,o=n("ea08"),s=n("3409"),a=n("e372").Writable,u=n("3fb5"),c=n("29a2"),l=n("ae84"),f=n("53a8"),h=n("34eb")("mqttjs:client"),p=e.setImmediate||function(t){r.nextTick(t)},d={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:3e4,clean:!0,resubscribe:!0},_=["ECONNREFUSED","EADDRINUSE","ECONNRESET","ENOTFOUND"],g={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 b(){return"mqttjs_"+Math.random().toString(16).substr(2,8)}function v(t,e,n){h("sendPacket :: packet: %O",e),h("sendPacket :: emitting `packetsend`"),t.emit("packetsend",e),h("sendPacket :: writing to stream");var r=s.writeToStream(e,t.stream,t.options);h("sendPacket :: writeToStream result %s",r),!r&&n?(h("sendPacket :: handle events on `drain` once through callback."),t.stream.once("drain",n)):n&&(h("sendPacket :: invoking cb"),n())}function y(t){t&&(h("flush: queue exists? %b",!!t),Object.keys(t).forEach((function(e){"function"===typeof t[e].cb&&(t[e].cb(new Error("Connection closed")),delete t[e])})))}function m(t){t&&(h("flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(t).forEach((function(e){t[e].volatile&&"function"===typeof t[e].cb&&(t[e].cb(new Error("Connection closed")),delete t[e])})))}function w(t,e,n,r){h("storeAndSend :: store packet with cmd %s to outgoingStore",e.cmd),t.outgoingStore.put(e,(function(i){if(i)return n&&n(i);r(),v(t,e,n)}))}function S(t){h("nop ::",t)}function k(t,e){var n,r=this;if(!(this instanceof k))return new k(t,e);for(n in this.options=e||{},d)"undefined"===typeof this.options[n]?this.options[n]=d[n]:this.options[n]=e[n];h("MqttClient :: options.protocol",e.protocol),h("MqttClient :: options.protocolVersion",e.protocolVersion),h("MqttClient :: options.username",e.username),h("MqttClient :: options.keepalive",e.keepalive),h("MqttClient :: options.reconnectPeriod",e.reconnectPeriod),h("MqttClient :: options.rejectUnauthorized",e.rejectUnauthorized),this.options.clientId="string"===typeof e.clientId?e.clientId:b(),h("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=5===e.protocolVersion&&e.customHandleAcks?e.customHandleAcks:function(){arguments[3](0)},this.streamBuilder=t,this.outgoingStore=e.outgoingStore||new o,this.incomingStore=e.incomingStore||new o,this.queueQoSZero=void 0===e.queueQoSZero||e.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.nextId=Math.max(1,Math.floor(65535*Math.random())),this.outgoing={},this._firstConnection=!0,this.on("connect",(function(){var t=this.queue;function e(){var n=t.shift();h("deliver :: entry %o",n);var i=null;n&&(i=n.packet,h("deliver :: call _sendPacket for %o",i),r._sendPacket(i,(function(t){n.cb&&n.cb(t),e()})))}h("connect :: sending queued packets"),e()})),this.on("close",(function(){h("close :: connected set to `false`"),this.connected=!1,h("close :: clearing connackTimer"),clearTimeout(this.connackTimer),h("close :: clearing ping timer"),null!==r.pingTimer&&(r.pingTimer.clear(),r.pingTimer=null),h("close :: calling _setupReconnect"),this._setupReconnect()})),i.call(this),h("MqttClient :: setting up stream"),this._setupStream()}u(k,i),k.prototype._setupStream=function(){var t,e=this,n=new a,i=s.parser(this.options),o=null,u=[];function c(){if(u.length)r.nextTick(l);else{var t=o;o=null,t()}}function l(){h("work :: getting next packet in queue");var t=u.shift();if(t)h("work :: packet pulled from queue"),e._handlePacket(t,c);else{h("work :: no packets in queue");var n=o;o=null,h("work :: done flag is %s",!!n),n&&n()}}function p(t){h("streamErrorHandler :: error",t.message),_.includes(t.code)?(h("streamErrorHandler :: emitting error"),e.emit("error",t)):S(t)}if(h("_setupStream :: calling method to clear reconnect"),this._clearReconnect(),h("_setupStream :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),i.on("packet",(function(t){h("parser :: on packet push to packets array."),u.push(t)})),n._write=function(t,e,n){o=n,h("writable stream :: parsing buffer"),i.parse(t),l()},h("_setupStream :: pipe stream to writable stream"),this.stream.pipe(n),this.stream.on("error",p),this.stream.on("close",(function(){h("(%s)stream :: on close",e.options.clientId),m(e.outgoing),h("stream: emit close to MqttClient"),e.emit("close")})),h("_setupStream: sending packet `connect`"),t=Object.create(this.options),t.cmd="connect",v(this,t),i.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return e.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&"object"===typeof this.options.authPacket){var d=f({cmd:"auth",reasonCode:0},this.options.authPacket);v(this,d)}}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout((function(){h("!!connectTimeout hit!! Calling _cleanUp with force `true`"),e._cleanUp(!0)}),this.options.connectTimeout)},k.prototype._handlePacket=function(t,e){var n=this.options;if(5===n.protocolVersion&&n.properties&&n.properties.maximumPacketSize&&n.properties.maximumPacketSize<t.length)return this.emit("error",new Error("exceeding packets size "+t.cmd)),this.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),this;switch(h("_handlePacket :: emitting packetreceive"),this.emit("packetreceive",t),t.cmd){case"publish":this._handlePublish(t,e);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":this._handleAck(t),e();break;case"pubrel":this._handlePubrel(t,e);break;case"connack":this._handleConnack(t),e();break;case"pingresp":this._handlePingresp(t),e();break;case"disconnect":this._handleDisconnect(t),e();break;default:break}},k.prototype._checkDisconnecting=function(t){return this.disconnecting&&(t?t(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting},k.prototype.publish=function(t,e,n,r){var i;h("publish :: message `%s` to topic `%s`",e,t);var o=this.options;"function"===typeof n&&(r=n,n=null);var s={qos:0,retain:!1,dup:!1};if(n=f(s,n),this._checkDisconnecting(r))return this;switch(i={cmd:"publish",topic:t,payload:e,qos:n.qos,retain:n.retain,messageId:this._nextId(),dup:n.dup},5===o.protocolVersion&&(i.properties=n.properties,(!o.properties&&i.properties&&i.properties.topicAlias||n.properties&&o.properties&&(n.properties.topicAlias&&o.properties.topicAliasMaximum&&n.properties.topicAlias>o.properties.topicAliasMaximum||!o.properties.topicAliasMaximum&&n.properties.topicAlias))&&delete i.properties.topicAlias),h("publish :: qos",n.qos),n.qos){case 1:case 2:this.outgoing[i.messageId]={volatile:!1,cb:r||S},this._storeProcessing?(h("_storeProcessing enabled"),this._packetIdsDuringStoreProcessing[i.messageId]=!1,this._storePacket(i,void 0,n.cbStorePut)):(h("MqttClient:publish: packet cmd: %s",i.cmd),this._sendPacket(i,void 0,n.cbStorePut));break;default:this._storeProcessing?(h("_storeProcessing enabled"),this._storePacket(i,r,n.cbStorePut)):(h("MqttClient:publish: packet cmd: %s",i.cmd),this._sendPacket(i,r,n.cbStorePut));break}return this},k.prototype.subscribe=function(){for(var t,e=new Array(arguments.length),n=0;n<arguments.length;n++)e[n]=arguments[n];var r,i=[],o=e.shift(),s=o.resubscribe,a=e.pop()||S,u=e.pop(),c=this,d=this.options.protocolVersion;if(delete o.resubscribe,"string"===typeof o&&(o=[o]),"function"!==typeof a&&(u=a,a=S),r=l.validateTopics(o),null!==r)return p(a,new Error("Invalid topic "+r)),this;if(this._checkDisconnecting(a))return h("subscribe: discconecting true"),this;var _={qos:0};if(5===d&&(_.nl=!1,_.rap=!1,_.rh=0),u=f(_,u),Array.isArray(o)?o.forEach((function(t){if(h("subscribe: array topic %s",t),!c._resubscribeTopics.hasOwnProperty(t)||c._resubscribeTopics[t].qos<u.qos||s){var e={topic:t,qos:u.qos};5===d&&(e.nl=u.nl,e.rap=u.rap,e.rh=u.rh,e.properties=u.properties),h("subscribe: pushing topic `%s` and qos `%s` to subs list",e.topic,e.qos),i.push(e)}})):Object.keys(o).forEach((function(t){if(h("subscribe: object topic %s",t),!c._resubscribeTopics.hasOwnProperty(t)||c._resubscribeTopics[t].qos<o[t].qos||s){var e={topic:t,qos:o[t].qos};5===d&&(e.nl=o[t].nl,e.rap=o[t].rap,e.rh=o[t].rh,e.properties=u.properties),h("subscribe: pushing `%s` to subs list",e),i.push(e)}})),t={cmd:"subscribe",subscriptions:i,qos:1,retain:!1,dup:!1,messageId:this._nextId()},u.properties&&(t.properties=u.properties),i.length){if(this.options.resubscribe){h("subscribe :: resubscribe true");var g=[];i.forEach((function(t){if(c.options.reconnectPeriod>0){var e={qos:t.qos};5===d&&(e.nl=t.nl||!1,e.rap=t.rap||!1,e.rh=t.rh||0,e.properties=t.properties),c._resubscribeTopics[t.topic]=e,g.push(t.topic)}})),c.messageIdToTopic[t.messageId]=g}return this.outgoing[t.messageId]={volatile:!0,cb:function(t,e){if(!t)for(var n=e.granted,r=0;r<n.length;r+=1)i[r].qos=n[r];a(t,i)}},h("subscribe :: call _sendPacket"),this._sendPacket(t),this}a(null,[])},k.prototype.unsubscribe=function(){for(var t={cmd:"unsubscribe",qos:1,messageId:this._nextId()},e=this,n=new Array(arguments.length),r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.shift(),o=n.pop()||S,s=n.pop();return"string"===typeof i&&(i=[i]),"function"!==typeof o&&(s=o,o=S),this._checkDisconnecting(o)||("string"===typeof i?t.unsubscriptions=[i]:Array.isArray(i)&&(t.unsubscriptions=i),this.options.resubscribe&&t.unsubscriptions.forEach((function(t){delete e._resubscribeTopics[t]})),"object"===typeof s&&s.properties&&(t.properties=s.properties),this.outgoing[t.messageId]={volatile:!0,cb:o},h("unsubscribe: call _sendPacket"),this._sendPacket(t)),this},k.prototype.end=function(t,e,n){var i=this;function o(){h("end :: closeStores: closing incoming and outgoing stores"),i.disconnected=!0,i.incomingStore.close((function(){i.outgoingStore.close((function(){h("end :: closeStores: emitting end"),i.emit("end"),n&&(h("end :: closeStores: invoking callback with args"),n())}))})),i._deferredReconnect&&i._deferredReconnect()}function s(){h("end :: (%s) :: finish :: calling _cleanUp with force %s",i.options.clientId,t),i._cleanUp(t,()=>{h("end :: finish :: calling process.nextTick on closeStores"),r.nextTick(o.bind(i))},e)}return h("end :: (%s)",this.options.clientId),null!=t&&"boolean"===typeof t||(n=e||S,e=t,t=!1,"object"!==typeof e&&(n=e,e=null,"function"!==typeof n&&(n=S))),"object"!==typeof e&&(n=e,e=null),h("end :: cb? %s",!!n),n=n||S,this.disconnecting?(n(),this):(this._clearReconnect(),this.disconnecting=!0,!t&&Object.keys(this.outgoing).length>0?(h("end :: (%s) :: calling finish in 10ms once outgoing is empty",i.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,s,10))):(h("end :: (%s) :: immediately calling finish",i.options.clientId),s()),this)},k.prototype.removeOutgoingMessage=function(t){var e=this.outgoing[t]?this.outgoing[t].cb:null;return delete this.outgoing[t],this.outgoingStore.del({messageId:t},(function(){e(new Error("Message removed"))})),this},k.prototype.reconnect=function(t){h("client reconnect");var e=this,n=function(){t?(e.options.incomingStore=t.incomingStore,e.options.outgoingStore=t.outgoingStore):(e.options.incomingStore=null,e.options.outgoingStore=null),e.incomingStore=e.options.incomingStore||new o,e.outgoingStore=e.options.outgoingStore||new o,e.disconnecting=!1,e.disconnected=!1,e._deferredReconnect=null,e._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=n:n(),this},k.prototype._reconnect=function(){h("_reconnect: emitting reconnect to client"),this.emit("reconnect"),h("_reconnect: calling _setupStream"),this._setupStream()},k.prototype._setupReconnect=function(){var t=this;!t.disconnecting&&!t.reconnectTimer&&t.options.reconnectPeriod>0?(this.reconnecting||(h("_setupReconnect :: emit `offline` state"),this.emit("offline"),h("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),h("_setupReconnect :: setting reconnectTimer for %d ms",t.options.reconnectPeriod),t.reconnectTimer=setInterval((function(){h("reconnectTimer :: reconnect triggered!"),t._reconnect()}),t.options.reconnectPeriod)):h("_setupReconnect :: doing nothing...")},k.prototype._clearReconnect=function(){h("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},k.prototype._cleanUp=function(t,e){var n=arguments[2];if(e&&(h("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",e)),h("_cleanUp :: forced? %s",t),t)0===this.options.reconnectPeriod&&this.options.clean&&y(this.outgoing),h("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{var r=f({cmd:"disconnect"},n);h("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(r,p.bind(null,this.stream.end.bind(this.stream)))}this.disconnecting||(h("_cleanUp :: client not disconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),null!==this.pingTimer&&(h("_cleanUp :: clearing pingTimer"),this.pingTimer.clear(),this.pingTimer=null),e&&!this.connected&&(h("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",e),e())},k.prototype._sendPacket=function(t,e,n){if(h("_sendPacket :: (%s) :: start",this.options.clientId),n=n||S,!this.connected)return h("_sendPacket :: client not connected. Storing packet offline."),void this._storePacket(t,e,n);switch(this._shiftPingInterval(),t.cmd){case"publish":break;case"pubrel":return void w(this,t,e,n);default:return void v(this,t,e)}switch(t.qos){case 2:case 1:w(this,t,e,n);break;case 0:default:v(this,t,e);break}h("_sendPacket :: (%s) :: end",this.options.clientId)},k.prototype._storePacket=function(t,e,n){h("_storePacket :: packet: %o",t),h("_storePacket :: cb? %s",!!e),n=n||S,0===(t.qos||0)&&this.queueQoSZero||"publish"!==t.cmd?this.queue.push({packet:t,cb:e}):t.qos>0?(e=this.outgoing[t.messageId]?this.outgoing[t.messageId].cb:null,this.outgoingStore.put(t,(function(t){if(t)return e&&e(t);n()}))):e&&e(new Error("No connection to broker"))},k.prototype._setupPingTimer=function(){h("_setupPingTimer :: keepalive %d (seconds)",this.options.keepalive);var t=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=c((function(){t._checkPing()}),1e3*this.options.keepalive))},k.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(1e3*this.options.keepalive)},k.prototype._checkPing=function(){h("_checkPing :: checking ping..."),this.pingResp?(h("_checkPing :: ping response received. Clearing flag and sending `pingreq`"),this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):(h("_checkPing :: calling _cleanUp with force true"),this._cleanUp(!0))},k.prototype._handlePingresp=function(){this.pingResp=!0},k.prototype._handleConnack=function(t){h("_handleConnack");var e=this.options,n=e.protocolVersion,r=5===n?t.reasonCode:t.returnCode;if(clearTimeout(this.connackTimer),t.properties&&(t.properties.topicAliasMaximum&&(e.properties||(e.properties={}),e.properties.topicAliasMaximum=t.properties.topicAliasMaximum),t.properties.serverKeepAlive&&e.keepalive&&(e.keepalive=t.properties.serverKeepAlive,this._shiftPingInterval()),t.properties.maximumPacketSize&&(e.properties||(e.properties={}),e.properties.maximumPacketSize=t.properties.maximumPacketSize)),0===r)this.reconnecting=!1,this._onConnect(t);else if(r>0){var i=new Error("Connection refused: "+g[r]);i.code=r,this.emit("error",i)}},k.prototype._handlePublish=function(t,e){h("_handlePublish: packet %o",t),e="undefined"!==typeof e?e:S;var n=t.topic.toString(),r=t.payload,i=t.qos,o=t.messageId,s=this,a=this.options,u=[0,16,128,131,135,144,145,151,153];switch(h("_handlePublish: qos %d",i),i){case 2:a.customHandleAcks(n,r,t,(function(n,r){return n instanceof Error||(r=n,n=null),n?s.emit("error",n):-1===u.indexOf(r)?s.emit("error",new Error("Wrong reason code for pubrec")):void(r?s._sendPacket({cmd:"pubrec",messageId:o,reasonCode:r},e):s.incomingStore.put(t,(function(){s._sendPacket({cmd:"pubrec",messageId:o},e)})))}));break;case 1:a.customHandleAcks(n,r,t,(function(i,a){return i instanceof Error||(a=i,i=null),i?s.emit("error",i):-1===u.indexOf(a)?s.emit("error",new Error("Wrong reason code for puback")):(a||s.emit("message",n,r,t),void s.handleMessage(t,(function(t){if(t)return e&&e(t);s._sendPacket({cmd:"puback",messageId:o,reasonCode:a},e)})))}));break;case 0:this.emit("message",n,r,t),this.handleMessage(t,e);break;default:h("_handlePublish: unknown QoS. Doing nothing.");break}},k.prototype.handleMessage=function(t,e){e()},k.prototype._handleAck=function(t){var e,n=t.messageId,r=t.cmd,i=null,o=this.outgoing[n]?this.outgoing[n].cb:null,s=this;if(o){switch(h("_handleAck :: packet type",r),r){case"pubcomp":case"puback":var a=t.reasonCode;a&&a>0&&16!==a&&(e=new Error("Publish error: "+g[a]),e.code=a,o(e,t)),delete this.outgoing[n],this.outgoingStore.del(t,o);break;case"pubrec":i={cmd:"pubrel",qos:2,messageId:n};var u=t.reasonCode;u&&u>0&&16!==u?(e=new Error("Publish error: "+g[u]),e.code=u,o(e,t)):this._sendPacket(i);break;case"suback":delete this.outgoing[n];for(var c=0;c<t.granted.length;c++)if(0!==(128&t.granted[c])){var l=this.messageIdToTopic[n];l&&l.forEach((function(t){delete s._resubscribeTopics[t]}))}o(null,t);break;case"unsuback":delete this.outgoing[n],o(null);break;default:s.emit("error",new Error("unrecognized packet type"))}this.disconnecting&&0===Object.keys(this.outgoing).length&&this.emit("outgoingEmpty")}else h("_handleAck :: Server sent an ack in error. Ignoring.")},k.prototype._handlePubrel=function(t,e){h("handling pubrel packet"),e="undefined"!==typeof e?e:S;var n=t.messageId,r=this,i={cmd:"pubcomp",messageId:n};r.incomingStore.get(t,(function(t,n){t?r._sendPacket(i,e):(r.emit("message",n.topic,n.payload,n),r.handleMessage(n,(function(t){if(t)return e(t);r.incomingStore.del(n,S),r._sendPacket(i,e)})))}))},k.prototype._handleDisconnect=function(t){this.emit("disconnect",t)},k.prototype._nextId=function(){var t=this.nextId++;return 65536===this.nextId&&(this.nextId=1),t},k.prototype.getLastMessageId=function(){return 1===this.nextId?65535:this.nextId-1},k.prototype._resubscribe=function(t){h("_resubscribe");var e=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||5===this.options.protocolVersion&&!t.sessionPresent)&&e.length>0)if(this.options.resubscribe)if(5===this.options.protocolVersion){h("_resubscribe: protocolVersion 5");for(var n=0;n<e.length;n++){var r={};r[e[n]]=this._resubscribeTopics[e[n]],r.resubscribe=!0,this.subscribe(r,{properties:r[e[n]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1},k.prototype._onConnect=function(t){if(this.disconnected)this.emit("connect",t);else{var e=this;this._setupPingTimer(),this._resubscribe(t),this.connected=!0,n()}function n(){var r=e.outgoingStore.createStream();function i(){e._storeProcessing=!1,e._packetIdsDuringStoreProcessing={}}function o(){r.destroy(),r=null,i()}function s(){if(r){e._storeProcessing=!0;var t,n=r.read(1);n?e._packetIdsDuringStoreProcessing[n.messageId]?s():e.disconnecting||e.reconnectTimer?r.destroy&&r.destroy():(t=e.outgoing[n.messageId]?e.outgoing[n.messageId].cb:null,e.outgoing[n.messageId]={volatile:!1,cb:function(e,n){t&&t(e,n),s()}},e._packetIdsDuringStoreProcessing[n.messageId]=!0,e._sendPacket(n)):r.once("readable",s)}}e.once("close",o),r.on("error",(function(t){i(),e.removeListener("close",o),e.emit("error",t)})),r.on("end",(function(){var r=!0;for(var s in e._packetIdsDuringStoreProcessing)if(!e._packetIdsDuringStoreProcessing[s]){r=!1;break}r?(i(),e.removeListener("close",o),e.emit("connect",t)):n()})),s()}},t.exports=k}).call(this,n("c8ba"),n("4362"))},e03f:function(t,e,n){"use strict";var r=n("f508"),i=n("7c4a").Symbol;t.exports=function(t){return Object.defineProperties(t,{hasInstance:r("",i&&i.hasInstance||t("hasInstance")),isConcatSpreadable:r("",i&&i.isConcatSpreadable||t("isConcatSpreadable")),iterator:r("",i&&i.iterator||t("iterator")),match:r("",i&&i.match||t("match")),replace:r("",i&&i.replace||t("replace")),search:r("",i&&i.search||t("search")),species:r("",i&&i.species||t("species")),split:r("",i&&i.split||t("split")),toPrimitive:r("",i&&i.toPrimitive||t("toPrimitive")),toStringTag:r("",i&&i.toStringTag||t("toStringTag")),unscopables:r("",i&&i.unscopables||t("unscopables"))})}},e099:function(t,e,n){"use strict";var r=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,a){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"===typeof t?o(s(t),(function(s){var a=encodeURIComponent(r(s))+n;return i(t[s])?o(t[s],(function(t){return a+encodeURIComponent(r(t))})).join(e):a+encodeURIComponent(r(t[s]))})).join(e):a?encodeURIComponent(r(a))+n+encodeURIComponent(r(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r));return n}var s=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},e0f6:function(t,e,n){"use strict";t.exports=n("9df0")()?Object.setPrototypeOf:n("e19c")},e19c:function(t,e,n){"use strict";var r,i=n("2160"),o=n("96ae"),s=Object.prototype.isPrototypeOf,a=Object.defineProperty,u={configurable:!0,enumerable:!1,writable:!0,value:void 0};r=function(t,e){if(o(t),null===e||i(e))return t;throw new TypeError("Prototype must be null or an object")},t.exports=function(t){var e,n;return t?(2===t.level?t.set?(n=t.set,e=function(t,e){return n.call(r(t,e),e),t}):e=function(t,e){return r(t,e).__proto__=e,t}:e=function t(e,n){var i;return r(e,n),i=s.call(t.nullPolyfill,e),i&&delete t.nullPolyfill.__proto__,null===n&&(n=t.nullPolyfill),e.__proto__=n,i&&a(t.nullPolyfill,"__proto__",u),e},Object.defineProperty(e,"level",{configurable:!1,enumerable:!1,writable:!1,value:t.level})):null}(function(){var t,e=Object.create(null),n={},r=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(r){try{t=r.set,t.call(e,n)}catch(i){}if(Object.getPrototypeOf(e)===n)return{set:t,level:2}}return e.__proto__=n,Object.getPrototypeOf(e)===n?{level:2}:(e={},e.__proto__=n,Object.getPrototypeOf(e)===n&&{level:1})}()),n("ba4b")},e372:function(t,e,n){e=t.exports=n("ad71"),e.Stream=e,e.Readable=e,e.Writable=n("dc14"),e.Duplex=n("b19a"),e.Transform=n("27bf"),e.PassThrough=n("780f")},e76c:function(t,e,n){"use strict";t.exports=function(){}},e7fc:function(t,e,n){"use strict";(function(e){var r=n("df86"),i=n("ea08"),o=n("0b16"),s=n("53a8"),a=n("34eb")("mqttjs"),u={};function c(t){var e;t.auth&&(e=t.auth.match(/^(.+):(.+)$/),e?(t.username=e[1],t.password=e[2]):t.username=t.auth)}function l(t,e){if(a("connecting to an MQTT broker..."),"object"!==typeof t||e||(e=t,t=null),e=e||{},t){var n=o.parse(t,!0);if(null!=n.port&&(n.port=Number(n.port)),e=s(n,e),null===e.protocol)throw new Error("Missing protocol");e.protocol=e.protocol.replace(/:$/,"")}if(c(e),e.query&&"string"===typeof e.query.clientId&&(e.clientId=e.query.clientId),e.cert&&e.key){if(!e.protocol)throw new Error("Missing secure protocol key");if(-1===["mqtts","wss","wxs","alis"].indexOf(e.protocol))switch(e.protocol){case"mqtt":e.protocol="mqtts";break;case"ws":e.protocol="wss";break;case"wx":e.protocol="wxs";break;case"ali":e.protocol="alis";break;default:throw new Error('Unknown protocol for secure connection: "'+e.protocol+'"!')}}if(!u[e.protocol]){var i=-1!==["mqtts","wss"].indexOf(e.protocol);e.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter((function(t,e){return(!i||e%2!==0)&&"function"===typeof u[t]}))[0]}if(!1===e.clean&&!e.clientId)throw new Error("Missing clientId for unclean clients");function l(t){return e.servers&&(t._reconnectCount&&t._reconnectCount!==e.servers.length||(t._reconnectCount=0),e.host=e.servers[t._reconnectCount].host,e.port=e.servers[t._reconnectCount].port,e.protocol=e.servers[t._reconnectCount].protocol?e.servers[t._reconnectCount].protocol:e.defaultProtocol,e.hostname=e.host,t._reconnectCount++),a("calling streambuilder for",e.protocol),u[e.protocol](t,e)}e.protocol&&(e.defaultProtocol=e.protocol);var f=new r(l,e);return f.on("error",(function(){})),f}"browser"!==e.title?(u.mqtt=n("05ee"),u.tcp=n("05ee"),u.ssl=n("fe3c"),u.tls=n("fe3c"),u.mqtts=n("fe3c")):(u.wx=n("8311"),u.wxs=n("8311"),u.ali=n("c4c7"),u.alis=n("c4c7")),u.ws=n("fcb9"),u.wss=n("fcb9"),t.exports=l,t.exports.connect=l,t.exports.MqttClient=r,t.exports.Store=i}).call(this,n("4362"))},e937:function(t,e,n){"use strict";function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),t}var c=n("1c35"),l=c.Buffer,f=n(7),h=f.inspect,p=h&&h.custom||"inspect";function d(t,e,n){l.prototype.copy.call(t,e,n)}t.exports=function(){function t(){s(this,t),this.head=null,this.tail=null,this.length=0}return u(t,[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";var e=this.head,n=""+e.data;while(e=e.next)n+=t+e.data;return n}},{key:"concat",value:function(t){if(0===this.length)return l.alloc(0);var e=l.allocUnsafe(t>>>0),n=this.head,r=0;while(n)d(n.data,e,r),r+=n.data.length,n=n.next;return e}},{key:"consume",value:function(t,e){var n;return t<this.head.data.length?(n=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):n=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,n=1,r=e.data;t-=r.length;while(e=e.next){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?r+=i:r+=i.slice(0,t),t-=o,0===t){o===i.length?(++n,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(t){var e=l.allocUnsafe(t),n=this.head,r=1;n.data.copy(e),t-=n.data.length;while(n=n.next){var i=n.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),t-=o,0===t){o===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(o));break}++r}return this.length-=r,e}},{key:p,value:function(t,e){return h(this,i({},e,{depth:0,customInspect:!1}))}}]),t}()},e9bd:function(t,e,n){"use strict";var r=Object.prototype.toString,i=r.call(function(){return arguments}());t.exports=function(t){return r.call(t)===i}},ea08:function(t,e,n){"use strict";(function(e){var r=n("53a8"),i=n("e372").Readable,o={objectMode:!0},s={clean:!0},a=n("546b");function u(t){if(!(this instanceof u))return new u(t);this.options=t||{},this.options=r(s,t),this._inflights=new a}u.prototype.put=function(t,e){return this._inflights.set(t.messageId,t),e&&e(),this},u.prototype.createStream=function(){var t=new i(o),n=!1,r=[],s=0;return this._inflights.forEach((function(t,e){r.push(t)})),t._read=function(){!n&&s<r.length?this.push(r[s++]):this.push(null)},t.destroy=function(){if(!n){var t=this;n=!0,e.nextTick((function(){t.emit("close")}))}},t},u.prototype.del=function(t,e){return t=this._inflights.get(t.messageId),t?(this._inflights.delete(t.messageId),e(null,t)):e&&e(new Error("missing packet")),this},u.prototype.get=function(t,e){return t=this._inflights.get(t.messageId),t?e(null,t):e&&e(new Error("missing packet")),this},u.prototype.close=function(t){this.options.clean&&(this._inflights=null),t&&t()},t.exports=u}).call(this,n("4362"))},eae0:function(t,e,n){"use strict";var r=n("936a"),i=n("5edd"),o=Object.prototype.toString;t.exports=function(t){if(!r(t))return null;if(i(t)){var e=t.toString;if("function"!==typeof e)return null;if(e===o)return null}try{return""+t}catch(n){return null}}},ecf9:function(t,e,n){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},ef7a:function(t,e,n){"use strict";t.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1}},f0cb:function(t,e,n){(function(e){const n=65536,r={},i=e.isBuffer(e.from([1,2]).subarray(0,1));function o(t){const n=e.allocUnsafe(2);return n.writeUInt8(t>>8,0),n.writeUInt8(255&t,1),n}function s(){for(let t=0;t<n;t++)r[t]=o(t)}function a(t){const n=4;let r=0,o=0;const s=e.allocUnsafe(n);do{r=t%128|0,t=t/128|0,t>0&&(r|=128),s.writeUInt8(r,o++)}while(t>0&&o<n);return t>0&&(o=0),i?s.subarray(0,o):s.slice(0,o)}function u(t){const n=e.allocUnsafe(4);return n.writeUInt32BE(t,0),n}t.exports={cache:r,generateCache:s,generateNumber:o,genBufVariableByteInt:a,generate4ByteBuffer:u}}).call(this,n("1c35").Buffer)},f214:function(t,e,n){e=t.exports=n("0e8b"),e.Stream=e,e.Readable=e,e.Writable=n("f6ba"),e.Duplex=n("a493"),e.Transform=n("fe34"),e.PassThrough=n("9d37"),e.finished=n("bf09"),e.pipeline=n("386b")},f3a6:function(t,e,n){"use strict";var r=n("62c4"),i=Array.prototype.forEach,o=Object.create,s=function(t,e){var n;for(n in t)e[n]=t[n]};t.exports=function(t){var e=o(null);return i.call(arguments,(function(t){r(t)&&s(Object(t),e)})),e}},f482:function(t,e,n){"use strict";(function(e){function n(t,n){var o=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(n?n(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(s,this,t)):e.nextTick(s,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!n&&t?o._writableState?o._writableState.errorEmitted?e.nextTick(i,o):(o._writableState.errorEmitted=!0,e.nextTick(r,o,t)):e.nextTick(r,o,t):n?(e.nextTick(i,o),n(t)):e.nextTick(i,o)})),this)}function r(t,e){s(t,e),i(t)}function i(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function o(){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 s(t,e){t.emit("error",e)}function a(t,e){var n=t._readableState,r=t._writableState;n&&n.autoDestroy||r&&r.autoDestroy?t.destroy(e):t.emit("error",e)}t.exports={destroy:n,undestroy:o,errorOrDestroy:a}}).call(this,n("4362"))},f508:function(t,e,n){"use strict";var r=n("936a"),i=n("1793"),o=n("2031"),s=n("f3a6"),a=n("f973"),u=t.exports=function(t,e){var n,i,u,c,l;return arguments.length<2||"string"!==typeof t?(c=e,e=t,t=null):c=arguments[2],r(t)?(n=a.call(t,"c"),i=a.call(t,"e"),u=a.call(t,"w")):(n=u=!0,i=!1),l={value:e,configurable:n,enumerable:i,writable:u},c?o(s(c),l):l};u.gs=function(t,e,n){var u,c,l,f;return"string"!==typeof t?(l=n,n=e,e=t,t=null):l=arguments[3],r(e)?i(e)?r(n)?i(n)||(l=n,n=void 0):n=void 0:(l=e,e=n=void 0):e=void 0,r(t)?(u=a.call(t,"c"),c=a.call(t,"e")):(u=!0,c=!1),f={get:e,set:n,configurable:u,enumerable:c},l?o(s(l),f):f}},f60e:function(t,e,n){"use strict";var r=n("7bdf"),i=n("96ae"),o=Math.max;t.exports=function(t,e){var n,s,a,u=o(arguments.length,2);for(t=Object(i(t)),a=function(r){try{t[r]=e[r]}catch(i){n||(n=i)}},s=1;s<u;++s)e=arguments[s],r(e).forEach(a);if(void 0!==n)throw n;return t}},f6ba:function(t,e,n){"use strict";(function(e,r){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){H(e,t)}}var o;t.exports=C,C.WritableState=I;var s={deprecate:n("b7d1")},a=n("b98b"),u=n("1c35").Buffer,c=e.Uint8Array||function(){};function l(t){return u.from(t)}function f(t){return u.isBuffer(t)||t instanceof c}var h,p=n("f482"),d=n("86c6"),_=d.getHighWaterMark,g=n("9bfc").codes,b=g.ERR_INVALID_ARG_TYPE,v=g.ERR_METHOD_NOT_IMPLEMENTED,y=g.ERR_MULTIPLE_CALLBACK,m=g.ERR_STREAM_CANNOT_PIPE,w=g.ERR_STREAM_DESTROYED,S=g.ERR_STREAM_NULL_VALUES,k=g.ERR_STREAM_WRITE_AFTER_END,E=g.ERR_UNKNOWN_ENCODING,x=p.errorOrDestroy;function O(){}function I(t,e,r){o=o||n("a493"),t=t||{},"boolean"!==typeof r&&(r=e instanceof o),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=_(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){N(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function C(t){o=o||n("a493");var e=this instanceof o;if(!e&&!h.call(C,this))return new C(t);this._writableState=new I(t,this,e),this.writable=!0,t&&("function"===typeof t.write&&(this._write=t.write),"function"===typeof t.writev&&(this._writev=t.writev),"function"===typeof t.destroy&&(this._destroy=t.destroy),"function"===typeof t.final&&(this._final=t.final)),a.call(this)}function R(t,e){var n=new k;x(t,n),r.nextTick(e,n)}function j(t,e,n,i){var o;return null===n?o=new S:"string"===typeof n||e.objectMode||(o=new b("chunk",["string","Buffer"],n)),!o||(x(t,o),r.nextTick(i,o),!1)}function A(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!==typeof e||(e=u.from(e,n)),e}function T(t,e,n,r,i,o){if(!n){var s=A(e,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=e.objectMode?1:r.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else P(t,e,!1,a,r,i,o);return u}function P(t,e,n,r,i,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new w("write")):n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function M(t,e,n,i,o){--e.pendingcb,n?(r.nextTick(o,i),r.nextTick(V,t,e),t._writableState.errorEmitted=!0,x(t,i)):(o(i),t._writableState.errorEmitted=!0,x(t,i),V(t,e))}function L(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function N(t,e){var n=t._writableState,i=n.sync,o=n.writecb;if("function"!==typeof o)throw new y;if(L(n),e)M(t,n,i,e,o);else{var s=q(n)||t.destroyed;s||n.corked||n.bufferProcessing||!n.bufferedRequest||D(t,n),i?r.nextTick(B,t,n,s,o):B(t,n,s,o)}}function B(t,e,n,r){n||U(t,e),e.pendingcb--,r(),V(t,e)}function U(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function D(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,o=new Array(r),s=e.corkedRequestsFree;s.entry=n;var a=0,u=!0;while(n)o[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;o.allBuffers=u,P(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{while(n){var c=n.chunk,l=n.encoding,f=n.callback,h=e.objectMode?1:c.length;if(P(t,e,!1,h,c,l,f),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function q(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function F(t,e){t._final((function(n){e.pendingcb--,n&&x(t,n),e.prefinished=!0,t.emit("prefinish"),V(t,e)}))}function W(t,e){e.prefinished||e.finalCalled||("function"!==typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,r.nextTick(F,t,e)))}function V(t,e){var n=q(e);if(n&&(W(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var r=t._readableState;(!r||r.autoDestroy&&r.endEmitted)&&t.destroy()}return n}function z(t,e,n){e.ending=!0,V(t,e),n&&(e.finished?r.nextTick(n):t.once("finish",n)),e.ended=!0,t.writable=!1}function H(t,e,n){var r=t.entry;t.entry=null;while(r){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree.next=t}n("3fb5")(C,a),I.prototype.getBuffer=function(){var t=this.bufferedRequest,e=[];while(t)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(I.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(C,Symbol.hasInstance,{value:function(t){return!!h.call(this,t)||this===C&&(t&&t._writableState instanceof I)}})):h=function(t){return t instanceof this},C.prototype.pipe=function(){x(this,new m)},C.prototype.write=function(t,e,n){var r=this._writableState,i=!1,o=!r.objectMode&&f(t);return o&&!u.isBuffer(t)&&(t=l(t)),"function"===typeof e&&(n=e,e=null),o?e="buffer":e||(e=r.defaultEncoding),"function"!==typeof n&&(n=O),r.ending?R(this,n):(o||j(this,r,t,n))&&(r.pendingcb++,i=T(this,r,o,t,e,n)),i},C.prototype.cork=function(){this._writableState.corked++},C.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||D(this,t))},C.prototype.setDefaultEncoding=function(t){if("string"===typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new E(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(C.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(C.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),C.prototype._write=function(t,e,n){n(new v("_write()"))},C.prototype._writev=null,C.prototype.end=function(t,e,n){var r=this._writableState;return"function"===typeof t?(n=t,t=null,e=null):"function"===typeof e&&(n=e,e=null),null!==t&&void 0!==t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||z(this,r,n),this},Object.defineProperty(C.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),C.prototype.destroy=p.destroy,C.prototype._undestroy=p.undestroy,C.prototype._destroy=function(t,e){e(t)}}).call(this,n("c8ba"),n("4362"))},f967:function(t,e,n){"use strict";var r=String.prototype.indexOf;t.exports=function(t){return r.call(this,t,arguments[1])>-1}},f973:function(t,e,n){"use strict";t.exports=n("18ec")()?String.prototype.contains:n("f967")},f9c1:function(t,e){function n(t){var e=t._readableState;return e?e.objectMode||"number"===typeof t._duplexState?t.read():t.read(r(e)):null}function r(t){return t.buffer.length?t.buffer.head?t.buffer.head.data.length:t.buffer[0].length:t.length}t.exports=n},faa1:function(t,e,n){"use strict";var r,i="object"===typeof Reflect?Reflect:null,o=i&&"function"===typeof i.apply?i.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};function s(t){console&&console.warn}r=i&&"function"===typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var a=Number.isNaN||function(t){return t!==t};function u(){u.init.call(this)}t.exports=u,t.exports.once=m,u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var c=10;function l(t){if("function"!==typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function f(t){return void 0===t._maxListeners?u.defaultMaxListeners:t._maxListeners}function h(t,e,n,r){var i,o,a;if(l(n),o=t._events,void 0===o?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),a=o[e]),void 0===a)a=o[e]=n,++t._eventsCount;else if("function"===typeof a?a=o[e]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),i=f(t),i>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,s(u)}return t}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=p.bind(r);return i.listener=n,r.wrapFn=i,i}function _(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"===typeof i?n?[i.listener||i]:[i]:n?y(i):b(i,i.length)}function g(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"===typeof n)return 1;if(void 0!==n)return n.length}return 0}function b(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function v(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function y(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}function m(t,e){return new Promise((function(n,r){function i(n){t.removeListener(e,o),r(n)}function o(){"function"===typeof t.removeListener&&t.removeListener("error",i),n([].slice.call(arguments))}S(t,e,o,{once:!0}),"error"!==e&&w(t,i,{once:!0})}))}function w(t,e,n){"function"===typeof t.on&&S(t,"error",e,n)}function S(t,e,n,r){if("function"===typeof t.on)r.once?t.once(e,n):t.on(e,n);else{if("function"!==typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){r.once&&t.removeEventListener(e,i),n(o)}))}}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(t){if("number"!==typeof t||t<0||a(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");c=t}}),u.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},u.prototype.setMaxListeners=function(t){if("number"!==typeof t||t<0||a(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},u.prototype.getMaxListeners=function(){return f(this)},u.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[t];if(void 0===u)return!1;if("function"===typeof u)o(u,this,e);else{var c=u.length,l=b(u,c);for(n=0;n<c;++n)o(l[n],this,e)}return!0},u.prototype.addListener=function(t,e){return h(this,t,e,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(t,e){return h(this,t,e,!0)},u.prototype.once=function(t,e){return l(e),this.on(t,d(this,t,e)),this},u.prototype.prependOnceListener=function(t,e){return l(e),this.prependListener(t,d(this,t,e)),this},u.prototype.removeListener=function(t,e){var n,r,i,o,s;if(l(e),r=this._events,void 0===r)return this;if(n=r[t],void 0===n)return this;if(n===e||n.listener===e)0===--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!==typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():v(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(t){var e,n,r;if(n=this._events,void 0===n)return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)i=o[r],"removeListener"!==i&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(e=n[t],"function"===typeof e)this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},u.prototype.listeners=function(t){return _(this,t,!0)},u.prototype.rawListeners=function(t){return _(this,t,!1)},u.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},u.prototype.listenerCount=g,u.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},fb12:function(t,e,n){(function(e,r){var i=n("e372"),o=n("ab52"),s=n("3fb5"),a=n("f9c1"),u=e.from&&e.from!==Uint8Array.from?e.from([0]):new e([0]),c=function(t,e){t._corked?t.once("uncork",e):e()},l=function(t,e){t._autoDestroy&&t.destroy(e)},f=function(t,e){return function(n){n?l(t,"premature close"===n.message?null:n):e&&!t._ended&&t.end()}},h=function(t,e){return t?t._writableState&&t._writableState.finished?e():t._writableState?t.end(e):(t.end(),void e()):e()},p=function(t){return new i.Readable({objectMode:!0,highWaterMark:16}).wrap(t)},d=function(t,e,n){if(!(this instanceof d))return new d(t,e,n);i.Duplex.call(this,n),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!n||!1!==n.autoDestroy,this._forwardDestroy=!n||!1!==n.destroy,this._forwardEnd=!n||!1!==n.end,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,t&&this.setWritable(t),e&&this.setReadable(e)};s(d,i.Duplex),d.obj=function(t,e,n){return n||(n={}),n.objectMode=!0,n.highWaterMark=16,new d(t,e,n)},d.prototype.cork=function(){1===++this._corked&&this.emit("cork")},d.prototype.uncork=function(){this._corked&&0===--this._corked&&this.emit("uncork")},d.prototype.setWritable=function(t){if(this._unwrite&&this._unwrite(),this.destroyed)t&&t.destroy&&t.destroy();else if(null!==t&&!1!==t){var e=this,n=o(t,{writable:!0,readable:!1},f(this,this._forwardEnd)),i=function(){var t=e._ondrain;e._ondrain=null,t&&t()},s=function(){e._writable.removeListener("drain",i),n()};this._unwrite&&r.nextTick(i),this._writable=t,this._writable.on("drain",i),this._unwrite=s,this.uncork()}else this.end()},d.prototype.setReadable=function(t){if(this._unread&&this._unread(),this.destroyed)t&&t.destroy&&t.destroy();else{if(null===t||!1===t)return this.push(null),void this.resume();var e=this,n=o(t,{writable:!1,readable:!0},f(this)),r=function(){e._forward()},i=function(){e.push(null)},s=function(){e._readable2.removeListener("readable",r),e._readable2.removeListener("end",i),n()};this._drained=!0,this._readable=t,this._readable2=t._readableState?t:p(t),this._readable2.on("readable",r),this._readable2.on("end",i),this._unread=s,this._forward()}},d.prototype._read=function(){this._drained=!0,this._forward()},d.prototype._forward=function(){if(!this._forwarding&&this._readable2&&this._drained){var t;this._forwarding=!0;while(this._drained&&null!==(t=a(this._readable2)))this.destroyed||(this._drained=this.push(t));this._forwarding=!1}},d.prototype.destroy=function(t){if(!this.destroyed){this.destroyed=!0;var e=this;r.nextTick((function(){e._destroy(t)}))}},d.prototype._destroy=function(t){if(t){var e=this._ondrain;this._ondrain=null,e?e(t):this.emit("error",t)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},d.prototype._write=function(t,e,n){return this.destroyed?n():this._corked?c(this,this._write.bind(this,t,e,n)):t===u?this._finish(n):this._writable?void(!1===this._writable.write(t)?this._ondrain=n:n()):n()},d.prototype._finish=function(t){var e=this;this.emit("preend"),c(this,(function(){h(e._forwardEnd&&e._writable,(function(){!1===e._writableState.prefinished&&(e._writableState.prefinished=!0),e.emit("prefinish"),c(e,t)}))}))},d.prototype.end=function(t,e,n){return"function"===typeof t?this.end(null,null,t):"function"===typeof e?this.end(t,null,e):(this._ended=!0,t&&this.write(t),this._writableState.ending||this.write(u),i.Writable.prototype.end.call(this,n))},t.exports=d}).call(this,n("1c35").Buffer,n("4362"))},fcb9:function(t,e,n){"use strict";(function(e){var r=n("34eb")("mqttjs:ws"),i=n("553e"),o=n("0b16"),s=["rejectUnauthorized","ca","cert","key","pfx","passphrase"],a="browser"===e.title;function u(t,e){var n=t.protocol+"://"+t.hostname+":"+t.port+t.path;return"function"===typeof t.transformWsUrl&&(n=t.transformWsUrl(n,t,e)),n}function c(t){t.hostname||(t.hostname="localhost"),t.port||("wss"===t.protocol?t.port=443:t.port=80),t.path||(t.path="/"),t.wsOptions||(t.wsOptions={}),a||"wss"!==t.protocol||s.forEach((function(e){t.hasOwnProperty(e)&&!t.wsOptions.hasOwnProperty(e)&&(t.wsOptions[e]=t[e])}))}function l(t,e){r("createWebSocket");var n="MQIsdp"===e.protocolId&&3===e.protocolVersion?"mqttv3.1":"mqtt";c(e);var o=u(e,t);return r("url %s protocol %s",o,n),i(o,[n],e.wsOptions)}function f(t,e){return l(t,e)}function h(t,e){if(r("browserStreamBuilder"),e.hostname||(e.hostname=e.host),!e.hostname){if("undefined"===typeof document)throw new Error("Could not determine host. Specify host manually.");var n=o.parse(document.URL);e.hostname=n.hostname,e.port||(e.port=n.port)}return l(t,e)}t.exports=a?h:f}).call(this,n("4362"))},fe34:function(t,e,n){"use strict";t.exports=l;var r=n("9bfc").codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,s=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n("a493");function c(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"===typeof t.transform&&(this._transform=t.transform),"function"===typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",f)}function f(){var t=this;"function"!==typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(e,n){h(t,e,n)}))}function h(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}n("3fb5")(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,n){n(new i("_transform()"))},l.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},fe3c:function(t,e,n){"use strict";var r=n(9),i=n("34eb")("mqttjs:tls");function o(t,e){var n;function o(r){e.rejectUnauthorized&&t.emit("error",r),n.end()}return e.port=e.port||8883,e.host=e.hostname||e.host||"localhost",e.servername=e.host,e.rejectUnauthorized=!1!==e.rejectUnauthorized,delete e.path,i("port %d host %s rejectUnauthorized %b",e.port,e.host,e.rejectUnauthorized),n=r.connect(e),n.on("secureConnect",(function(){e.rejectUnauthorized&&!n.authorized?n.emit("error",new Error("TLS not authorized")):n.removeListener("error",o)})),n.on("error",o),n}t.exports=o},ff55:function(t,e,n){"use strict";t.exports=function(){return"object"===typeof globalThis&&(!!globalThis&&globalThis.Array===Array)}}}]); |