1(self.webpackChunkvirtual_guide=self.webpackChunkvirtual_guide||[]).push([[2235],{15644:(e,t,n)=>{"use strict";var s=n(35183);e.exports=function(e){var t,n=0;function i(){return n||(n=1,t=e.apply(this,arguments),e=null),t}return i.displayName=s(e),i}},38826:function(e,t,n){var s;s=function(){var e=function(e){var t=e.localStorage||function(){var e={};return{setItem:function(t,n){e[t]=n},getItem:function(t){return e[t]},removeItem:function(t){delete e[t]}}}(),n=1,s=2,i=3,o=4,r=5,c=6,a=7,h=8,u=9,d=10,f=11,l=12,_=13,p=14,g=function(e,t){for(var n in e)if(e.hasOwnProperty(n)){if(!t.hasOwnProperty(n)){var s="Unknown property, "+n+". Valid properties are:";for(var i in t)t.hasOwnProperty(i)&&(s=s+" "+i);throw new Error(s)}if(typeof e[n]!==t[n])throw new Error(I(v.INVALID_TYPE,[typeof e[n],n]))}},m=function(e,t){return function(){return e.apply(t,arguments)}},v={OK:{code:0,text:"AMQJSC0000I OK."},CONNECT_TIMEOUT:{code:1,text:"AMQJSC0001E Connect timed out."},SUBSCRIBE_TIMEOUT:{code:2,text:"AMQJS0002E Subscribe timed out."},UNSUBSCRIBE_TIMEOUT:{code:3,text:"AMQJS0003E Unsubscribe timed out."},PING_TIMEOUT:{code:4,text:"AMQJS0004E Ping timed out."},INTERNAL_ERROR:{code:5,text:"AMQJS0005E Internal error. Error Message: {0}, Stack trace: {1}"},CONNACK_RETURNCODE:{code:6,text:"AMQJS0006E Bad Connack return code:{0} {1}."},SOCKET_ERROR:{code:7,text:"AMQJS0007E Socket error:{0}."},SOCKET_CLOSE:{code:8,text:"AMQJS0008I Socket closed."},MALFORMED_UTF:{code:9,text:"AMQJS0009E Malformed UTF data:{0} {1} {2}."},UNSUPPORTED:{code:10,text:"AMQJS0010E {0} is not supported by this browser."},INVALID_STATE:{code:11,text:"AMQJS0011E Invalid state {0}."},INVALID_TYPE:{code:12,text:"AMQJS0012E Invalid type {0} for {1}."},INVALID_ARGUMENT:{code:13,text:"AMQJS0013E Invalid argument {0} for {1}."},UNSUPPORTED_OPERATION:{code:14,text:"AMQJS0014E Unsupported operation."},INVALID_STORED_DATA:{code:15,text:"AMQJS0015E Invalid data in local storage key={0} value={1}."},INVALID_MQTT_MESSAGE_TYPE:{code:16,text:"AMQJS0016E Invalid MQTT message type {0}."},MALFORMED_UNICODE:{code:17,text:"AMQJS0017E Malformed Unicode string:{0} {1}."},BUFFER_FULL:{code:18,text:"AMQJS0018E Message buffer is full, maximum buffer size: {0}."}},y={0:"Connection Accepted",1:"Connection Refused: unacceptable protocol version",2:"Connection Refused: identifier rejected",3:"Connection Refused: server unavailable",4:"Connection Refused: bad user name or password",5:"Connection Refused: not authorized"},I=function(e,t){var n=e.text;if(t)for(var s,i,o=0;o<t.length;o++)if(s="{"+o+"}",(i=n.indexOf(s))>0){var r=n.substring(0,i),c=n.substring(i+s.length);n=r+t[o]+c}return n},w=[0,6,77,81,73,115,100,112,3],E=[0,4,77,81,84,84,4],M=function(e,t){for(var n in this.type=e,t)t.hasOwnProperty(n)&&(this[n]=t[n])};function A(e,t){var n,h=t,d=e[t],l=d>>4,_=d&=15;t+=1;var p=0,g=1;do{if(t==e.length)return[null,h];p+=(127&(n=e[t++]))*g,g*=128}while(0!==(128&n));var m=t+p;if(m>e.length)return[null,h];var v=new M(l);switch(l){case s:1&e[t++]&&(v.sessionPresent=!0),v.returnCode=e[t++];break;case i:var y=_>>1&3,I=O(e,t),w=C(e,t+=2,I);t+=I,y>0&&(v.messageIdentifier=O(e,t),t+=2);var E=new L(e.subarray(t,m));1==(1&_)&&(E.retained=!0),8==(8&_)&&(E.duplicate=!0),E.qos=y,E.destinationName=w,v.payloadMessage=E;break;case o:case r:case c:case a:case f:v.messageIdentifier=O(e,t);break;case u:v.messageIdentifier=O(e,t),t+=2,v.returnCode=e.subarray(t,m)}return[v,m]}function T(e,t,n){return t[n++]=e>>8,t[n++]=e%256,n}function N(e,t,n,s){return S(e,n,s=T(t,n,s)),s+t}function O(e,t){return 256*e[t]+e[t+1]}function b(e){for(var t=0,n=0;n<e.length;n++){var s=e.charCodeAt(n);s>2047?(55296<=s&&s<=56319&&(n++,t++),t+=3):s>127?t+=2:t++}return t}function S(e,t,n){for(var s=n,i=0;i<e.length;i++){var o=e.charCodeAt(i);if(55296<=o&&o<=56319){var r=e.charCodeAt(++i);if(isNaN(r))throw new Error(I(v.MALFORMED_UNICODE,[o,r]));o=r-56320+(o-55296<<10)+65536}o<=127?t[s++]=o:o<=2047?(t[s++]=o>>6&31|192,t[s++]=63&o|128):o<=65535?(t[s++]=o>>12&15|224,t[s++]=o>>6&63|128,t[s++]=63&o|128):(t[s++]=o>>18&7|240,t[s++]=o>>12&63|128,t[s++]=o>>6&63|128,t[s++]=63&o|128)}return t}
1function C(e,t,n){for(var s,i="",o=t;o<t+n;){var r=e[o++];if(r<128)s=r;else{var c=e[o++]-128;if(c<0)throw new Error(I(v.MALFORMED_UTF,[r.toString(16),c.toString(16),""]));if(r<224)s=64*(r-192)+c;else{var a=e[o++]-128;if(a<0)throw new Error(I(v.MALFORMED_UTF,[r.toString(16),c.toString(16),a.toString(16)]));if(r<240)s=4096*(r-224)+64*c+a;else{var h=e[o++]-128;if(h<0)throw new Error(I(v.MALFORMED_UTF,[r.toString(16),c.toString(16),a.toString(16),h.toString(16)]));if(!(r<248))throw new Error(I(v.MALFORMED_UTF,[r.toString(16),c.toString(16),a.toString(16),h.toString(16)]));s=262144*(r-240)+4096*c+64*a+h}}}s>65535&&(s-=65536,i+=String.fromCharCode(55296+(s>>10)),s=56320+(1023&s)),i+=String.fromCharCode(s)}return i}M.prototype.encode=function(){var e,t=(15&this.type)<<4,s=0,o=[],r=0;switch(void 0!==this.messageIdentifier&&(s+=2),this.type){case n:switch(this.mqttVersion){case 3:s+=w.length+3;break;case 4:s+=E.length+3}s+=b(this.clientId)+2,void 0!==this.willMessage&&(s+=b(this.willMessage.destinationName)+2,(e=this.willMessage.payloadBytes)instanceof Uint8Array||(e=new Uint8Array(u)),s+=e.byteLength+2),void 0!==this.userName&&(s+=b(this.userName)+2),void 0!==this.password&&(s+=b(this.password)+2);break;case h:t|=2;for(var a=0;a<this.topics.length;a++)o[a]=b(this.topics[a]),s+=o[a]+2;s+=this.requestedQos.length;break;case d:for(t|=2,a=0;a<this.topics.length;a++)o[a]=b(this.topics[a]),s+=o[a]+2;break;case c:t|=2;break;case i:this.payloadMessage.duplicate&&(t|=8),t=t|=this.payloadMessage.qos<<1,this.payloadMessage.retained&&(t|=1),s+=(r=b(this.payloadMessage.destinationName))+2;var u=this.payloadMessage.payloadBytes;s+=u.byteLength,u instanceof ArrayBuffer?u=new Uint8Array(u):u instanceof Uint8Array||(u=new Uint8Array(u.buffer))}var f=function(e){var t=new Array(1),n=0;do{var s=e%128;(e>>=7)>0&&(s|=128),t[n++]=s}while(e>0&&n<4);return t}(s),l=f.length+1,_=new ArrayBuffer(s+l),p=new Uint8Array(_);if(p[0]=t,p.set(f,1),this.type==i)l=N(this.payloadMessage.destinationName,r,p,l);else if(this.type==n){switch(this.mqttVersion){case 3:p.set(w,l),l+=w.length;break;case 4:p.set(E,l),l+=E.length}var g=0;this.cleanSession&&(g=2),void 0!==this.willMessage&&(g|=4,g|=this.willMessage.qos<<3,this.willMessage.retained&&(g|=32)),void 0!==this.userName&&(g|=128),void 0!==this.password&&(g|=64),p[l++]=g,l=T(this.keepAliveInterval,p,l)}switch(void 0!==this.messageIdentifier&&(l=T(this.messageIdentifier,p,l)),this.type){case n:l=N(this.clientId,b(this.clientId),p,l),void 0!==this.willMessage&&(l=N(this.willMessage.destinationName,b(this.willMessage.destinationName),p,l),l=T(e.byteLength,p,l),p.set(e,l),l+=e.byteLength),void 0!==this.userName&&(l=N(this.userName,b(this.userName),p,l)),void 0!==this.password&&(l=N(this.password,b(this.password),p,l));break;case i:p.set(u,l);break;case h:for(a=0;a<this.topics.length;a++)l=N(this.topics[a],o[a],p,l),p[l++]=this.requestedQos[a];break;case d:for(a=0;a<this.topics.length;a++)l=N(this.topics[a],o[a],p,l)}return _};var R=function(e,t){this._client=e,this._keepAliveInterval=1e3*t,this.isReset=!1;var n=new M(l).encode(),s=function(e){return function(){return i.apply(e)}},i=function(){this.isReset?(this.isReset=!1,this._client._trace("Pinger.doPing","send PINGREQ"),this._client.socket.send(n),this.timeout=setTimeout(s(this),this._keepAliveInterval)):(this._client._trace("Pinger.doPing","Timed out"),this._client._disconnected(v.PING_TIMEOUT.code,I(v.PING_TIMEOUT)))};this.reset=function(){this.isReset=!0,clearTimeout(this.timeout),this._keepAliveInterval>0&&(this.timeout=setTimeout(s(this),this._keepAliveInterval))},this.cancel=function(){clearTimeout(this.timeout)}},k=function(e,t,n,s){t||(t=30),this.timeout=setTimeout(function(e,t,n){return function(){return e.apply(t,n)}}(n,e,s),1e3*t),this.cancel=function(){clearTimeout(this.timeout)}},D=function(n,s,i,o,r){if(!("WebSocket"in e)||null===e.WebSocket)throw new Error(I(v.UNSUPPORTED,["WebSocket"]));if(!("ArrayBuffer"in e)||null===e.ArrayBuffer)throw new Error(I(v.UNSUPPORTED,["ArrayBuffer"]));for(var c in this._trace("Paho.Client",n,s,i,o,r),this.host=s,this.port=i,this.path=o,this.uri=n,this.clientId=r,this._wsuri=null,this._localKey=s+":"+i+("/mqtt"!=o?":"+o:"")+":"+r+":",this._msg_queue=[],this._buffered_msg_queue=[],this._sentMessages={},this._receivedMessages={},this._notify_msg_sent={},this._message_identifier=1,this._sequence=0,t)0!==c.indexOf("Sent:"+this._localKey)&&0!==c.indexOf("Received:"+this._localKey)||this.restore(c)};D.prototype.host=null,D.prototype.port=null,D.prototype.path=null,D.prototype.uri=null,D.prototype.clientId=null,D.prototype.socket=null,D.prototype.connected=!1,D.prototype.maxMessageIdentifier=65536,D.prototype.connectOptions=null,D.prototype.hostIndex=null,D.prototype.onConnected=null,D.prototype.onConnectionLost=null,D.prototype.onMessageDelivered=null,D.prototype.onMessageArrived=null,D.prototype.traceFunction=null,D.prototype._msg_queue=null,D.prototype._buffered_msg_queue=null,D.prototype._connectTimeout=null,D.prototype.sendPinger=null,D.prototype.receivePinger=null,D.prototype._reconnectInterval=1,D.prototype._reconnecting=!1,D.prototype._reconnectTimeout=null,D.prototype.disconnectedPublishing=!1,D.prototype.disconnectedBufferSize=5e3,D.prototype.receiveBuffer=null,D.prototype._traceBuffer=null,D.prototype._MAX_TRACE_ENTRIES=100,D.prototype.connect=function(e){var t=this._traceMask(e,"password");if(this._trace("Client.connect",t,this.socket,this.connected),this.connected)throw new Error(I(v.INVA
1LID_STATE,["already connected"]));if(this.socket)throw new Error(I(v.INVALID_STATE,["already connected"]));this._reconnecting&&(this._reconnectTimeout.cancel(),this._reconnectTimeout=null,this._reconnecting=!1),this.connectOptions=e,this._reconnectInterval=1,this._reconnecting=!1,e.uris?(this.hostIndex=0,this._doConnect(e.uris[0])):this._doConnect(this.uri)},D.prototype.subscribe=function(e,t){if(this._trace("Client.subscribe",e,t),!this.connected)throw new Error(I(v.INVALID_STATE,["not connected"]));var n=new M(h);n.topics=e.constructor===Array?e:[e],void 0===t.qos&&(t.qos=0),n.requestedQos=[];for(var s=0;s<n.topics.length;s++)n.requestedQos[s]=t.qos;t.onSuccess&&(n.onSuccess=function(e){t.onSuccess({invocationContext:t.invocationContext,grantedQos:e})}),t.onFailure&&(n.onFailure=function(e){t.onFailure({invocationContext:t.invocationContext,errorCode:e,errorMessage:I(e)})}),t.timeout&&(n.timeOut=new k(this,t.timeout,t.onFailure,[{invocationContext:t.invocationContext,errorCode:v.SUBSCRIBE_TIMEOUT.code,errorMessage:I(v.SUBSCRIBE_TIMEOUT)}])),this._requires_ack(n),this._schedule_message(n)},D.prototype.unsubscribe=function(e,t){if(this._trace("Client.unsubscribe",e,t),!this.connected)throw new Error(I(v.INVALID_STATE,["not connected"]));var n=new M(d);n.topics=e.constructor===Array?e:[e],t.onSuccess&&(n.callback=function(){t.onSuccess({invocationContext:t.invocationContext})}),t.timeout&&(n.timeOut=new k(this,t.timeout,t.onFailure,[{invocationContext:t.invocationContext,errorCode:v.UNSUBSCRIBE_TIMEOUT.code,errorMessage:I(v.UNSUBSCRIBE_TIMEOUT)}])),this._requires_ack(n),this._schedule_message(n)},D.prototype.send=function(e){this._trace("Client.send",e);var t=new M(i);if(t.payloadMessage=e,this.connected)e.qos>0?this._requires_ack(t):this.onMessageDelivered&&(this._notify_msg_sent[t]=this.onMessageDelivered(t.payloadMessage)),this._schedule_message(t);else{if(!this._reconnecting||!this.disconnectedPublishing)throw new Error(I(v.INVALID_STATE,["not connected"]));if(Object.keys(this._sentMessages).length+this._buffered_msg_queue.length>this.disconnectedBufferSize)throw new Error(I(v.BUFFER_FULL,[this.disconnectedBufferSize]));e.qos>0?this._requires_ack(t):(t.sequence=++this._sequence,this._buffered_msg_queue.unshift(t))}},D.prototype.disconnect=function(){if(this._trace("Client.disconnect"),this._reconnecting&&(this._reconnectTimeout.cancel(),this._reconnectTimeout=null,this._reconnecting=!1),!this.socket)throw new Error(I(v.INVALID_STATE,["not connecting or connected"]));var e=new M(p);this._notify_msg_sent[e]=m(this._disconnected,this),this._schedule_message(e)},D.prototype.getTraceLog=function(){if(null!==this._traceBuffer){for(var e in this._trace("Client.getTraceLog",new Date),this._trace("Client.getTraceLog in flight messages",this._sentMessages.length),this._sentMessages)this._trace("_sentMessages ",e,this._sentMessages[e]);for(var e in this._receivedMessages)this._trace("_receivedMessages ",e,this._receivedMessages[e]);return this._traceBuffer}},D.prototype.startTrace=function(){null===this._traceBuffer&&(this._traceBuffer=[]),this._trace("Client.startTrace",new Date,"@VERSION@-@BUILDLEVEL@")},D.prototype.stopTrace=function(){delete this._traceBuffer},D.prototype._doConnect=function(e){if(this.connectOptions.useSSL){var t=e.split(":");t[0]="wss",e=t.join(":")}this._wsuri=e,this.connected=!1,this.connectOptions.mqttVersion<4?this.socket=new WebSocket(e,["mqttv3.1"]):this.socket=new WebSocket(e,["mqtt"]),this.socket.binaryType="arraybuffer",this.socket.onopen=m(this._on_socket_open,this),this.socket.onmessage=m(this._on_socket_message,this),this.socket.onerror=m(this._on_socket_error,this),this.socket.onclose=m(this._on_socket_close,this),this.sendPinger=new R(this,this.connectOptions.keepAliveInterval),this.receivePinger=new R(this,this.connectOptions.keepAliveInterval),this._connectTimeout&&(this._connectTimeout.cancel(),this._connectTimeout=null),this._connectTimeout=new k(this,this.connectOptions.timeout,this._disconnected,[v.CONNECT_TIMEOUT.code,I(v.CONNECT_TIMEOUT)])},D.prototype._schedule_message=function(e){this._msg_queue.unshift(e),this.connected&&this._process_queue()},D.prototype.store=function(e,n){var s={type:n.type,messageIdentifier:n.messageIdentifier,version:1};
1if(n.type!==i)throw Error(I(v.INVALID_STORED_DATA,[e+this._localKey+n.messageIdentifier,s]));n.pubRecReceived&&(s.pubRecReceived=!0),s.payloadMessage={};for(var o="",r=n.payloadMessage.payloadBytes,c=0;c<r.length;c++)r[c]<=15?o=o+"0"+r[c].toString(16):o+=r[c].toString(16);s.payloadMessage.payloadHex=o,s.payloadMessage.qos=n.payloadMessage.qos,s.payloadMessage.destinationName=n.payloadMessage.destinationName,n.payloadMessage.duplicate&&(s.payloadMessage.duplicate=!0),n.payloadMessage.retained&&(s.payloadMessage.retained=!0),0===e.indexOf("Sent:")&&(void 0===n.sequence&&(n.sequence=++this._sequence),s.sequence=n.sequence),t.setItem(e+this._localKey+n.messageIdentifier,JSON.stringify(s))},D.prototype.restore=function(e){var n=t.getItem(e),s=JSON.parse(n),o=new M(s.type,s);if(s.type!==i)throw Error(I(v.INVALID_STORED_DATA,[e,n]));for(var r=s.payloadMessage.payloadHex,c=new ArrayBuffer(r.length/2),a=new Uint8Array(c),h=0;r.length>=2;){var u=parseInt(r.substring(0,2),16);r=r.substring(2,r.length),a[h++]=u}var d=new L(a);d.qos=s.payloadMessage.qos,d.destinationName=s.payloadMessage.destinationName,s.payloadMessage.duplicate&&(d.duplicate=!0),s.payloadMessage.retained&&(d.retained=!0),o.payloadMessage=d,0===e.indexOf("Sent:"+this._localKey)?(o.payloadMessage.duplicate=!0,this._sentMessages[o.messageIdentifier]=o):0===e.indexOf("Received:"+this._localKey)&&(this._receivedMessages[o.messageIdentifier]=o)},D.prototype._process_queue=function(){for(var e=null;e=this._msg_queue.pop();)this._socket_send(e),this._notify_msg_sent[e]&&(this._notify_msg_sent[e](),delete this._notify_msg_sent[e])},D.prototype._requires_ack=function(e){var t=Object.keys(this._sentMessages).length;if(t>this.maxMessageIdentifier)throw Error("Too many messages:"+t);for(;void 0!==this._sentMessages[this._message_identifier];)this._message_identifier++;e.messageIdentifier=this._message_identifier,this._sentMessages[e.messageIdentifier]=e,e.type===i&&this.store("Sent:",e),this._message_identifier===this.maxMessageIdentifier&&(this._message_identifier=1)},D.prototype._on_socket_open=function(){var e=new M(n,this.connectOptions);e.clientId=this.clientId,this._socket_send(e)},D.prototype._on_socket_message=function(e){this._trace("Client._on_socket_message",e.data);for(var t=this._deframeMessages(e.data),n=0;n<t.length;n+=1)this._handleMessage(t[n])},D.prototype._deframeMessages=function(e){var t=new Uint8Array(e),n=[];if(this.receiveBuffer){var s=new Uint8Array(this.receiveBuffer.length+t.length);s.set(this.receiveBuffer),s.set(t,this.receiveBuffer.length),t=s,delete this.receiveBuffer}try{for(var i=0;i<t.length;){var o=A(t,i),r=o[0];if(i=o[1],null===r)break;n.push(r)}i<t.length&&(this.receiveBuffer=t.subarray(i))}catch(a){var c="undefined"==a.hasOwnProperty("stack")?a.stack.toString():"No Error Stack Available";return void this._disconnected(v.INTERNAL_ERROR.code,I(v.INTERNAL_ERROR,[a.message,c]))}return n},D.prototype._handleMessage=function(e){this._trace("Client._handleMessage",e);
1try{switch(e.type){case s:if(this._connectTimeout.cancel(),this._reconnectTimeout&&this._reconnectTimeout.cancel(),this.connectOptions.cleanSession){for(var n in this._sentMessages){var h=this._sentMessages[n];t.removeItem("Sent:"+this._localKey+h.messageIdentifier)}for(var n in this._sentMessages={},this._receivedMessages){var d=this._receivedMessages[n];t.removeItem("Received:"+this._localKey+d.messageIdentifier)}this._receivedMessages={}}if(0!==e.returnCode){this._disconnected(v.CONNACK_RETURNCODE.code,I(v.CONNACK_RETURNCODE,[e.returnCode,y[e.returnCode]]));break}this.connected=!0,this.connectOptions.uris&&(this.hostIndex=this.connectOptions.uris.length);var l=[];for(var p in this._sentMessages)this._sentMessages.hasOwnProperty(p)&&l.push(this._sentMessages[p]);if(this._buffered_msg_queue.length>0)for(var g=null;g=this._buffered_msg_queue.pop();)l.push(g),this.onMessageDelivered&&(this._notify_msg_sent[g]=this.onMessageDelivered(g.payloadMessage));l=l.sort(function(e,t){return e.sequence-t.sequence});for(var m=0,w=l.length;m<w;m++)if((h=l[m]).type==i&&h.pubRecReceived){var E=new M(c,{messageIdentifier:h.messageIdentifier});this._schedule_message(E)}else this._schedule_message(h);this.connectOptions.onSuccess&&this.connectOptions.onSuccess({invocationContext:this.connectOptions.invocationContext});var A=!1;this._reconnecting&&(A=!0,this._reconnectInterval=1,this._reconnecting=!1),this._connected(A,this._wsuri),this._process_queue();break;case i:this._receivePublish(e);break;case o:(h=this._sentMessages[e.messageIdentifier])&&(delete this._sentMessages[e.messageIdentifier],t.removeItem("Sent:"+this._localKey+e.messageIdentifier),this.onMessageDelivered&&this.onMessageDelivered(h.payloadMessage));break;case r:(h=this._sentMessages[e.messageIdentifier])&&(h.pubRecReceived=!0,E=new M(c,{messageIdentifier:e.messageIdentifier}),this.store("Sent:",h),this._schedule_message(E));break;case c:d=this._receivedMessages[e.messageIdentifier],t.removeItem("Received:"+this._localKey+e.messageIdentifier),d&&(this._receiveMessage(d),delete this._receivedMessages[e.messageIdentifier]);var T=new M(a,{messageIdentifier:e.messageIdentifier});this._schedule_message(T);break;case a:h=this._sentMessages[e.messageIdentifier],delete this._sentMessages[e.messageIdentifier],t.removeItem("Sent:"+this._localKey+e.messageIdentifier),this.onMessageDelivered&&this.onMessageDelivered(h.payloadMessage);break;case u:(h=this._sentMessages[e.messageIdentifier])&&(h.timeOut&&h.timeOut.cancel(),128===e.returnCode[0]?h.onFailure&&h.onFailure(e.returnCode):h.onSuccess&&h.onSuccess(e.returnCode),delete this._sentMessages[e.messageIdentifier]);break;case f:(h=this._sentMessages[e.messageIdentifier])&&(h.timeOut&&h.timeOut.cancel(),h.callback&&h.callback(),delete this._sentMessages[e.messageIdentifier]);break;case _:this.sendPinger.reset();break;default:this._disconnected(v.INVALID_MQTT_MESSAGE_TYPE.code,I(v.INVALID_MQTT_MESSAGE_TYPE,[e.type]))}}catch(O){var N="undefined"==O.hasOwnProperty("stack")?O.stack.toString():"No Error Stack Available";return void this._disconnected(v.INTERNAL_ERROR.code,I(v.INTERNAL_ERROR,[O.message,N]))}},D.prototype._on_socket_error=function(e){this._reconnecting||this._disconnected(v.SOCKET_ERROR.code,I(v.SOCKET_ERROR,[e.data]))},D.prototype._on_socket_close=function(){this._reconnecting||this._disconnected(v.SOCKET_CLOSE.code,I(v.SOCKET_CLOSE))},D.prototype._socket_send=function(e){if(1==e.type){var t=this._traceMask(e,"password");this._trace("Client._socket_send",t)}else this._trace("Client._socket_send",e);this.socket.send(e.encode()),this.sendPinger.reset()},D.prototype._receivePublish=function(e){switch(e.payloadMessage.qos){case"undefined":case 0:this._receiveMessage(e);break;case 1:var t=new M(o,{messageIdentifier:e.messageIdentifier});this._schedule_message(t),this._receiveMessage(e);break;case 2:this._receivedMessages[e.messageIdentifier]=e,this.store("Received:",e);var n=new M(r,{messageIdentifier:e.messageIdentifier});this._schedule_message(n);break;default:throw Error("Invaild qos="+e.payloadMessage.qos)}},D.prototype._receiveMessage=function(e){this.onMessageArrived&&this.onMessageArrived(e.payloadMessage)},D.prototype._connected=function(e,t){this.onConnected&&this.onConnected(e,t)},D.prototype._reconnect=function(){this._trace("Client._reconnect"),this.connected||(this._reconnecting=!0,this.sendPinger.cancel(),this.receivePinger.cancel(),this._reconnectInterval<128&&(this._reconnectInterval=2*this._reconnectInterval),this.connectOptions.uris?(this.hostIndex=0,this._doConnect(this.connectOptions.uris[0])):this._doConnect(this.uri))},D.prototype._disconnected=function(e,t){if(this._trace("Client._disconnected",e,t),void 0!==e&&this._reconnecting)this._reconnectTimeout=new k(this,this._reconnectInterval,this._reconnect);else if(this.sendPinger.cancel(),this.receivePinger.cancel(),this._connectTimeout&&(this._connectTimeout.cancel(),this._connectTimeout=null),this._msg_queue=[],this._buffered_msg_queue=[],this._notify_msg_sent={},this.socket&&(this.socket.onopen=null,this.socket.onmessage=null,this.socket.onerror=null,this.socket.onclose=null,1===this.socket.readyState&&this.socket.close(),delete this.socket),this.connectOptions.uris&&this.hostIndex<this.connectOptions.uris.length-1)this.hostIndex++,this._doConnect(this.connectOptions.uris[this.hostIndex]);else if(void 0===e&&(e=v.OK.code,t=I(v.OK)),this.connected){if(this.connected=!1,this.onConnectionLost&&this.onConnectionLost({errorCode:e,errorMessage:t,reconnect:this.connectOptions.reconnect,uri:this._wsuri}),e!==v.OK.code&&this.connectOptions.reconnect)return this._reconnectInterval=1,void this._reconnect()}else 4===this.connectOptions.mqttVersion&&!1===this.connectOptions.mqttVersionExplicit?(this._trace("Failed to connect V4, dropping back to V3"),this.connectOptions.mqttVersion=3,this.connectOptions.uris?(this.hostIndex=0,this._doConnect(this.connectOptions.uris[0])):this._doConnect(this.uri)):this.connectOptions.onFailure&&this.connectOptions.onFailure({invocationContext:this.connectOptions.invocationContext,errorCode:e,errorMessage:t})},D.prototype._trace=function(){if(this.traceFunction){var e=Array.prototype.slice.call(arguments);for(var t in e)"undefined"!==typeof e[t]&&e.splice(t,1,JSON.stringify(e[t]));var n=e.join("");this.traceFunction({severity:"Debug",message:n})}if(null!==this._traceBuffer){t=0;for(var s=arguments.length;t<s;t++)this._traceBuffer.length==this._MAX_TRACE_ENTRIES&&this._traceBuffer.shift(),0===t||"undefined"===typeof arguments[t]?this._traceBuffer.push(arguments[t]):this._traceBuffer.push(" "+JSON.stringify(arguments[t]))}},D.prototype._traceMask=function(e,t){var n={};for(var s in e)e.hasOwnProperty(s)&&(n[s]=s==t?"******":e[s]);return n};var L=function(e){var t,n;if(!("string"===typeof e||e instanceof ArrayBuffer||ArrayBuffer.isView(e)&&!(e instanceof DataView)))throw I(v.INVALID_ARGUMENT,[e,"newPayload"]);t=e;var s=0,i=!1,o=!1;Object.defineProperties(this,{payloadString:{enumerable:!0,get:function(){return"string"===typeof t?t:C(t,0,t.length)}},payloadBytes:{enumerable:!0,get:function(){if("string"===typeof t){var e=new ArrayBuffer(b(t)),n=new Uint8Array(e);return S(t,n,0),n}return t}},destinationName:{enumerable:!0,get:function(){return n},set:function(e){if("string"!==typeof e)throw new Error(I(v.INVA
1LID_ARGUMENT,[e,"newDestinationName"]));n=e}},qos:{enumerable:!0,get:function(){return s},set:function(e){if(0!==e&&1!==e&&2!==e)throw new Error("Invalid argument:"+e);s=e}},retained:{enumerable:!0,get:function(){return i},set:function(e){if("boolean"!==typeof e)throw new Error(I(v.INVALID_ARGUMENT,[e,"newRetained"]));i=e}},topic:{enumerable:!0,get:function(){return n},set:function(e){n=e}},duplicate:{enumerable:!0,get:function(){return o},set:function(e){o=e}}})};return{Client:function(e,t,n,s){var i;if("string"!==typeof e)throw new Error(I(v.INVALID_TYPE,[typeof e,"host"]));if(2==arguments.length){s=t;var o=(i=e).match(/^(wss?):\/\/((\[(.+)\])|([^\/]+?))(:(\d+))?(\/.*)$/);if(!o)throw new Error(I(v.INVALID_ARGUMENT,[e,"host"]));e=o[4]||o[2],t=parseInt(o[7]),n=o[8]}else{if(3==arguments.length&&(s=n,n="/mqtt"),"number"!==typeof t||t<0)throw new Error(I(v.INVALID_TYPE,[typeof t,"port"]));if("string"!==typeof n)throw new Error(I(v.INVALID_TYPE,[typeof n,"path"]));var r=-1!==e.indexOf(":")&&"["!==e.slice(0,1)&&"]"!==e.slice(-1);i="ws://"+(r?"["+e+"]":e)+":"+t+n}for(var c=0,a=0;a<s.length;a++){var h=s.charCodeAt(a);55296<=h&&h<=56319&&a++,c++}if("string"!==typeof s||c>65535)throw new Error(I(v.INVALID_ARGUMENT,[s,"clientId"]));var u=new D(i,e,t,n,s);Object.defineProperties(this,{host:{get:function(){return e},set:function(){throw new Error(I(v.UNSUPPORTED_OPERATION))}},port:{get:function(){return t},set:function(){throw new Error(I(v.UNSUPPORTED_OPERATION))}},path:{get:function(){return n},set:function(){throw new Error(I(v.UNSUPPORTED_OPERATION))}},uri:{get:function(){return i},set:function(){throw new Error(I(v.UNSUPPORTED_OPERATION))}},clientId:{get:function(){return u.clientId},set:function(){throw new Error(I(v.UNSUPPORTED_OPERATION))}},onConnected:{get:function(){return u.onConnected},set:function(e){if("function"!==typeof e)throw new Error(I(v.INVALID_TYPE,[typeof e,"onConnected"]));u.onConnected=e}},disconnectedPublishing:{get:function(){return u.disconnectedPublishing},set:function(e){u.disconnectedPublishing=e}},disconnectedBufferSize:{get:function(){return u.disconnectedBufferSize},set:function(e){u.disconnectedBufferSize=e}},onConnectionLost:{get:function(){return u.onConnectionLost},set:function(e){if("function"!==typeof e)throw new Error(I(v.INVALID_TYPE,[typeof e,"onConnectionLost"]));u.onConnectionLost=e}},onMessageDelivered:{get:function(){return u.onMessageDelivered},set:function(e){if("function"!==typeof e)throw new Error(I(v.INVALID_TYPE,[typeof e,"onMessageDelivered"]));u.onMessageDelivered=e}},onMessageArrived:{get:function(){return u.onMessageArrived},set:function(e){if("function"!==typeof e)throw new Error(I(v.INVALID_TYPE,[typeof e,"onMessageArrived"]));u.onMessageArrived=e}},trace:{get:function(){return u.traceFunction},set:function(e){if("function"!==typeof e)throw new Error(I(v.INVALID_TYPE,[typeof e,"onTrace"]));u.traceFunction=e}}}),this.connect=function(e){if(g(e=e||{},{timeout:"number",userName:"string",password:"string",willMessage:"object",keepAliveInterval:"number",cleanSession:"boolean",useSSL:"boolean",invocationContext:"object",onSuccess:"function",onFailure:"function",hosts:"object",ports:"object",reconnect:"boolean",mqttVersion:"number",mqttVersionExplicit:"boolean",uris:"object"}),void 0===e.keepAliveInterval&&(e.keepAliveInterval=60),e.mqttVersion>4||e.mqttVersion<3)throw new Error(I(v.INVALID_ARGUMENT,[e.mqttVersion,"connectOptions.mqttVersion"]));if(void 0===e.mqttVersion?(e.mqttVersionExplicit=!1,e.mqttVersion=4):e.mqttVersionExplicit=!0,void 0!==e.password&&void 0===e.userName)throw new Error(I(v.INVALID_ARGUMENT,[e.password,"connectOptions.password"]));if(e.willMessage){if(!(e.willMessage instanceof L))throw new Error(I(v.INVALID_TYPE,[e.willMessage,"connectOptions.willMessage"]));if(e.willMessage.stringPayload=null,"undefined"===typeof e.willMessage.destinationName)throw new Error(I(v.INVALID_TYPE,[typeof e.willMessage.destinationName,"connectOptions.willMessage.destinationName"]))}if("undefined"===typeof e.cleanSession&&(e.cleanSession=!0),e.hosts){if(!(e.hosts instanceof Array))throw new Error(I(v.INVA
1LID_ARGUMENT,[e.hosts,"connectOptions.hosts"]));if(e.hosts.length<1)throw new Error(I(v.INVALID_ARGUMENT,[e.hosts,"connectOptions.hosts"]));for(var t=!1,s=0;s<e.hosts.length;s++){if("string"!==typeof e.hosts[s])throw new Error(I(v.INVALID_TYPE,[typeof e.hosts[s],"connectOptions.hosts["+s+"]"]));if(/^(wss?):\/\/((\[(.+)\])|([^\/]+?))(:(\d+))?(\/.*)$/.test(e.hosts[s])){if(0===s)t=!0;else if(!t)throw new Error(I(v.INVALID_ARGUMENT,[e.hosts[s],"connectOptions.hosts["+s+"]"]))}else if(t)throw new Error(I(v.INVALID_ARGUMENT,[e.hosts[s],"connectOptions.hosts["+s+"]"]))}if(t)e.uris=e.hosts;else{if(!e.ports)throw new Error(I(v.INVALID_ARGUMENT,[e.ports,"connectOptions.ports"]));if(!(e.ports instanceof Array))throw new Error(I(v.INVALID_ARGUMENT,[e.ports,"connectOptions.ports"]));if(e.hosts.length!==e.ports.length)throw new Error(I(v.INVALID_ARGUMENT,[e.ports,"connectOptions.ports"]));for(e.uris=[],s=0;s<e.hosts.length;s++){if("number"!==typeof e.ports[s]||e.ports[s]<0)throw new Error(I(v.INVALID_TYPE,[typeof e.ports[s],"connectOptions.ports["+s+"]"]));var o=e.hosts[s],r=e.ports[s],c=-1!==o.indexOf(":");i="ws://"+(c?"["+o+"]":o)+":"+r+n,e.uris.push(i)}}}u.connect(e)},this.subscribe=function(e,t){if("string"!==typeof e&&e.constructor!==Array)throw new Error("Invalid argument:"+e);if(g(t=t||{},{qos:"number",invocationContext:"object",onSuccess:"function",onFailure:"function",timeout:"number"}),t.timeout&&!t.onFailure)throw new Error("subscribeOptions.timeout specified with no onFailure callback.");if("undefined"!==typeof t.qos&&0!==t.qos&&1!==t.qos&&2!==t.qos)throw new Error(I(v.INVALID_ARGUMENT,[t.qos,"subscribeOptions.qos"]));u.subscribe(e,t)},this.unsubscribe=function(e,t){if("string"!==typeof e&&e.constructor!==Array)throw new Error("Invalid argument:"+e);if(g(t=t||{},{invocationContext:"object",onSuccess:"function",onFailure:"function",timeout:"number"}),t.timeout&&!t.onFailure)throw new Error("unsubscribeOptions.timeout specified with no onFailure callback.");u.unsubscribe(e,t)},this.send=function(e,t,n,s){var i;if(0===arguments.length)throw new Error("Invalid argument.length");if(1==arguments.length){if(!(e instanceof L)&&"string"!==typeof e)throw new Error("Invalid argument:"+typeof e);if("undefined"===typeof(i=e).destinationName)throw new Error(I(v.INVALID_ARGUMENT,[i.destinationName,"Message.destinationName"]));u.send(i)}else(i=new L(t)).destinationName=e,arguments.length>=3&&(i.qos=n),arguments.length>=4&&(i.retained=s),u.send(i)},this.publish=function(e,t,n,s){var i;if(0===arguments.length)throw new Error("Invalid argument.length");if(1==arguments.length){if(!(e instanceof L)&&"string"!==typeof e)throw new Error("Invalid argument:"+typeof e);if("undefined"===typeof(i=e).destinationName)throw new Error(I(v.INVALID_ARGUMENT,[i.destinationName,"Message.destinationName"]));u.send(i)}else(i=new L(t)).destinationName=e,arguments.length>=3&&(i.qos=n),arguments.length>=4&&(i.retained=s),u.send(i)},this.disconnect=function(){u.disconnect()},this.getTraceLog=function(){return u.getTraceLog()},this.startTrace=function(){u.startTrace()},this.stopTrace=function(){u.stopTrace()},this.isConnected=function(){return u.connected}},Message:L}}("undefined"!==typeof n.g?n.g:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{});return e},e.exports=s()},95809:(e,t)=>{t.endianness=function(){return"LE"},t.hostname=function(){return"undefined"!==typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"undefined"!==typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.