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,GAED,OAAO+hB,CACR,C","sources":["webpack://smapac/./node_modules/ieee754/index.js","webpack://smapac/./node_modules/isarray/index.js","webpack://smapac/./node_modules/isomorphic-unfetch/browser.js","webpack://smapac/./node_modules/object-inspect/index.js","webpack://smapac/./node_modules/paho-mqtt/paho-mqtt.js","webpack://smapac/./node_modules/set-function-length/index.js","webpack://smapac/./node_modules/side-channel/index.js"],"sourcesContent":["/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","module.exports = self.fetch || (self.fetch = require('unfetch').default || require('unfetch'));\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other\n /* eslint-env browser */\n if (typeof window !== 'undefined' && obj === window) {\n return '{ [object Window] }';\n }\n if (\n (typeof globalThis !== 'undefined' && obj === globalThis)\n || (typeof global !== 'undefined' && obj === global)\n ) {\n return '{ [object globalThis] }';\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","/*******************************************************************************\n * Copyright (c) 2013 IBM Corp.\n *\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * and Eclipse Distribution License v1.0 which accompany this distribution.\n *\n * The Eclipse Public License is available at\n * http://www.eclipse.org/legal/epl-v10.html\n * and the Eclipse Distribution License is available at\n * http://www.eclipse.org/org/documents/edl-v10.php.\n *\n * Contributors:\n * Andrew Banks - initial API and implementation and initial documentation\n *******************************************************************************/\n\n\n// Only expose a single object name in the global namespace.\n// Everything must go through this module. Global Paho module\n// only has a single public function, client, which returns\n// a Paho client object given connection details.\n\n/**\n * Send and receive messages using web browsers.\n *

\n * This programming interface lets a JavaScript client application use the MQTT V3.1 or\n * V3.1.1 protocol to connect to an MQTT-supporting messaging server.\n *\n * The function supported includes:\n *

    \n *
  1. Connecting to and disconnecting from a server. The server is identified by its host name and port number.\n *
  2. Specifying options that relate to the communications link with the server,\n * for example the frequency of keep-alive heartbeats, and whether SSL/TLS is required.\n *
  3. Subscribing to and receiving messages from MQTT Topics.\n *
  4. Publishing messages to MQTT Topics.\n *
\n *

\n * The API consists of two main objects:\n *

\n *
{@link Paho.Client}
\n *
This contains methods that provide the functionality of the API,\n * including provision of callbacks that notify the application when a message\n * arrives from or is delivered to the messaging server,\n * or when the status of its connection to the messaging server changes.
\n *
{@link Paho.Message}
\n *
This encapsulates the payload of the message along with various attributes\n * associated with its delivery, in particular the destination to which it has\n * been (or is about to be) sent.
\n *
\n *

\n * The programming interface validates parameters passed to it, and will throw\n * an Error containing an error message intended for developer use, if it detects\n * an error with any parameter.\n *

\n * Example:\n *\n *

\nvar client = new Paho.MQTT.Client(location.hostname, Number(location.port), \"clientId\");\nclient.onConnectionLost = onConnectionLost;\nclient.onMessageArrived = onMessageArrived;\nclient.connect({onSuccess:onConnect});\n\nfunction onConnect() {\n  // Once a connection has been made, make a subscription and send a message.\n  console.log(\"onConnect\");\n  client.subscribe(\"/World\");\n  var message = new Paho.MQTT.Message(\"Hello\");\n  message.destinationName = \"/World\";\n  client.send(message);\n};\nfunction onConnectionLost(responseObject) {\n  if (responseObject.errorCode !== 0)\n\tconsole.log(\"onConnectionLost:\"+responseObject.errorMessage);\n};\nfunction onMessageArrived(message) {\n  console.log(\"onMessageArrived:\"+message.payloadString);\n  client.disconnect();\n};\n * 
\n * @namespace Paho\n */\n\n/* jshint shadow:true */\n(function ExportLibrary(root, factory) {\n\tif(typeof exports === \"object\" && typeof module === \"object\"){\n\t\tmodule.exports = factory();\n\t} else if (typeof define === \"function\" && define.amd){\n\t\tdefine(factory);\n\t} else if (typeof exports === \"object\"){\n\t\texports = factory();\n\t} else {\n\t\t//if (typeof root.Paho === \"undefined\"){\n\t\t//\troot.Paho = {};\n\t\t//}\n\t\troot.Paho = factory();\n\t}\n})(this, function LibraryFactory(){\n\n\n\tvar PahoMQTT = (function (global) {\n\n\t// Private variables below, these are only visible inside the function closure\n\t// which is used to define the module.\n\tvar version = \"@VERSION@-@BUILDLEVEL@\";\n\n\t/**\n\t * @private\n\t */\n\tvar localStorage = global.localStorage || (function () {\n\t\tvar data = {};\n\n\t\treturn {\n\t\t\tsetItem: function (key, item) { data[key] = item; },\n\t\t\tgetItem: function (key) { return data[key]; },\n\t\t\tremoveItem: function (key) { delete data[key]; },\n\t\t};\n\t})();\n\n\t\t/**\n\t * Unique message type identifiers, with associated\n\t * associated integer values.\n\t * @private\n\t */\n\t\tvar MESSAGE_TYPE = {\n\t\t\tCONNECT: 1,\n\t\t\tCONNACK: 2,\n\t\t\tPUBLISH: 3,\n\t\t\tPUBACK: 4,\n\t\t\tPUBREC: 5,\n\t\t\tPUBREL: 6,\n\t\t\tPUBCOMP: 7,\n\t\t\tSUBSCRIBE: 8,\n\t\t\tSUBACK: 9,\n\t\t\tUNSUBSCRIBE: 10,\n\t\t\tUNSUBACK: 11,\n\t\t\tPINGREQ: 12,\n\t\t\tPINGRESP: 13,\n\t\t\tDISCONNECT: 14\n\t\t};\n\n\t\t// Collection of utility methods used to simplify module code\n\t\t// and promote the DRY pattern.\n\n\t\t/**\n\t * Validate an object's parameter names to ensure they\n\t * match a list of expected variables name for this option\n\t * type. Used to ensure option object passed into the API don't\n\t * contain erroneous parameters.\n\t * @param {Object} obj - User options object\n\t * @param {Object} keys - valid keys and types that may exist in obj.\n\t * @throws {Error} Invalid option parameter found.\n\t * @private\n\t */\n\t\tvar validate = function(obj, keys) {\n\t\t\tfor (var key in obj) {\n\t\t\t\tif (obj.hasOwnProperty(key)) {\n\t\t\t\t\tif (keys.hasOwnProperty(key)) {\n\t\t\t\t\t\tif (typeof obj[key] !== keys[key])\n\t\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_TYPE, [typeof obj[key], key]));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar errorStr = \"Unknown property, \" + key + \". Valid properties are:\";\n\t\t\t\t\t\tfor (var validKey in keys)\n\t\t\t\t\t\t\tif (keys.hasOwnProperty(validKey))\n\t\t\t\t\t\t\t\terrorStr = errorStr+\" \"+validKey;\n\t\t\t\t\t\tthrow new Error(errorStr);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t * Return a new function which runs the user function bound\n\t * to a fixed scope.\n\t * @param {function} User function\n\t * @param {object} Function scope\n\t * @return {function} User function bound to another scope\n\t * @private\n\t */\n\t\tvar scope = function (f, scope) {\n\t\t\treturn function () {\n\t\t\t\treturn f.apply(scope, arguments);\n\t\t\t};\n\t\t};\n\n\t\t/**\n\t * Unique message type identifiers, with associated\n\t * associated integer values.\n\t * @private\n\t */\n\t\tvar ERROR = {\n\t\t\tOK: {code:0, text:\"AMQJSC0000I OK.\"},\n\t\t\tCONNECT_TIMEOUT: {code:1, text:\"AMQJSC0001E Connect timed out.\"},\n\t\t\tSUBSCRIBE_TIMEOUT: {code:2, text:\"AMQJS0002E Subscribe timed out.\"},\n\t\t\tUNSUBSCRIBE_TIMEOUT: {code:3, text:\"AMQJS0003E Unsubscribe timed out.\"},\n\t\t\tPING_TIMEOUT: {code:4, text:\"AMQJS0004E Ping timed out.\"},\n\t\t\tINTERNAL_ERROR: {code:5, text:\"AMQJS0005E Internal error. Error Message: {0}, Stack trace: {1}\"},\n\t\t\tCONNACK_RETURNCODE: {code:6, text:\"AMQJS0006E Bad Connack return code:{0} {1}.\"},\n\t\t\tSOCKET_ERROR: {code:7, text:\"AMQJS0007E Socket error:{0}.\"},\n\t\t\tSOCKET_CLOSE: {code:8, text:\"AMQJS0008I Socket closed.\"},\n\t\t\tMALFORMED_UTF: {code:9, text:\"AMQJS0009E Malformed UTF data:{0} {1} {2}.\"},\n\t\t\tUNSUPPORTED: {code:10, text:\"AMQJS0010E {0} is not supported by this browser.\"},\n\t\t\tINVALID_STATE: {code:11, text:\"AMQJS0011E Invalid state {0}.\"},\n\t\t\tINVALID_TYPE: {code:12, text:\"AMQJS0012E Invalid type {0} for {1}.\"},\n\t\t\tINVALID_ARGUMENT: {code:13, text:\"AMQJS0013E Invalid argument {0} for {1}.\"},\n\t\t\tUNSUPPORTED_OPERATION: {code:14, text:\"AMQJS0014E Unsupported operation.\"},\n\t\t\tINVALID_STORED_DATA: {code:15, text:\"AMQJS0015E Invalid data in local storage key={0} value={1}.\"},\n\t\t\tINVALID_MQTT_MESSAGE_TYPE: {code:16, text:\"AMQJS0016E Invalid MQTT message type {0}.\"},\n\t\t\tMALFORMED_UNICODE: {code:17, text:\"AMQJS0017E Malformed Unicode string:{0} {1}.\"},\n\t\t\tBUFFER_FULL: {code:18, text:\"AMQJS0018E Message buffer is full, maximum buffer size: {0}.\"},\n\t\t};\n\n\t\t/** CONNACK RC Meaning. */\n\t\tvar CONNACK_RC = {\n\t\t\t0:\"Connection Accepted\",\n\t\t\t1:\"Connection Refused: unacceptable protocol version\",\n\t\t\t2:\"Connection Refused: identifier rejected\",\n\t\t\t3:\"Connection Refused: server unavailable\",\n\t\t\t4:\"Connection Refused: bad user name or password\",\n\t\t\t5:\"Connection Refused: not authorized\"\n\t\t};\n\n\t/**\n\t * Format an error message text.\n\t * @private\n\t * @param {error} ERROR value above.\n\t * @param {substitutions} [array] substituted into the text.\n\t * @return the text with the substitutions made.\n\t */\n\t\tvar format = function(error, substitutions) {\n\t\t\tvar text = error.text;\n\t\t\tif (substitutions) {\n\t\t\t\tvar field,start;\n\t\t\t\tfor (var i=0; i 0) {\n\t\t\t\t\t\tvar part1 = text.substring(0,start);\n\t\t\t\t\t\tvar part2 = text.substring(start+field.length);\n\t\t\t\t\t\ttext = part1+substitutions[i]+part2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn text;\n\t\t};\n\n\t\t//MQTT protocol and version 6 M Q I s d p 3\n\t\tvar MqttProtoIdentifierv3 = [0x00,0x06,0x4d,0x51,0x49,0x73,0x64,0x70,0x03];\n\t\t//MQTT proto/version for 311 4 M Q T T 4\n\t\tvar MqttProtoIdentifierv4 = [0x00,0x04,0x4d,0x51,0x54,0x54,0x04];\n\n\t\t/**\n\t * Construct an MQTT wire protocol message.\n\t * @param type MQTT packet type.\n\t * @param options optional wire message attributes.\n\t *\n\t * Optional properties\n\t *\n\t * messageIdentifier: message ID in the range [0..65535]\n\t * payloadMessage:\tApplication Message - PUBLISH only\n\t * connectStrings:\tarray of 0 or more Strings to be put into the CONNECT payload\n\t * topics:\t\t\tarray of strings (SUBSCRIBE, UNSUBSCRIBE)\n\t * requestQoS:\t\tarray of QoS values [0..2]\n\t *\n\t * \"Flag\" properties\n\t * cleanSession:\ttrue if present / false if absent (CONNECT)\n\t * willMessage: \ttrue if present / false if absent (CONNECT)\n\t * isRetained:\t\ttrue if present / false if absent (CONNECT)\n\t * userName:\t\ttrue if present / false if absent (CONNECT)\n\t * password:\t\ttrue if present / false if absent (CONNECT)\n\t * keepAliveInterval:\tinteger [0..65535] (CONNECT)\n\t *\n\t * @private\n\t * @ignore\n\t */\n\t\tvar WireMessage = function (type, options) {\n\t\t\tthis.type = type;\n\t\t\tfor (var name in options) {\n\t\t\t\tif (options.hasOwnProperty(name)) {\n\t\t\t\t\tthis[name] = options[name];\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tWireMessage.prototype.encode = function() {\n\t\t// Compute the first byte of the fixed header\n\t\t\tvar first = ((this.type & 0x0f) << 4);\n\n\t\t\t/*\n\t\t * Now calculate the length of the variable header + payload by adding up the lengths\n\t\t * of all the component parts\n\t\t */\n\n\t\t\tvar remLength = 0;\n\t\t\tvar topicStrLength = [];\n\t\t\tvar destinationNameLength = 0;\n\t\t\tvar willMessagePayloadBytes;\n\n\t\t\t// if the message contains a messageIdentifier then we need two bytes for that\n\t\t\tif (this.messageIdentifier !== undefined)\n\t\t\t\tremLength += 2;\n\n\t\t\tswitch(this.type) {\n\t\t\t// If this a Connect then we need to include 12 bytes for its header\n\t\t\tcase MESSAGE_TYPE.CONNECT:\n\t\t\t\tswitch(this.mqttVersion) {\n\t\t\t\tcase 3:\n\t\t\t\t\tremLength += MqttProtoIdentifierv3.length + 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tremLength += MqttProtoIdentifierv4.length + 3;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tremLength += UTF8Length(this.clientId) + 2;\n\t\t\t\tif (this.willMessage !== undefined) {\n\t\t\t\t\tremLength += UTF8Length(this.willMessage.destinationName) + 2;\n\t\t\t\t\t// Will message is always a string, sent as UTF-8 characters with a preceding length.\n\t\t\t\t\twillMessagePayloadBytes = this.willMessage.payloadBytes;\n\t\t\t\t\tif (!(willMessagePayloadBytes instanceof Uint8Array))\n\t\t\t\t\t\twillMessagePayloadBytes = new Uint8Array(payloadBytes);\n\t\t\t\t\tremLength += willMessagePayloadBytes.byteLength +2;\n\t\t\t\t}\n\t\t\t\tif (this.userName !== undefined)\n\t\t\t\t\tremLength += UTF8Length(this.userName) + 2;\n\t\t\t\tif (this.password !== undefined)\n\t\t\t\t\tremLength += UTF8Length(this.password) + 2;\n\t\t\t\tbreak;\n\n\t\t\t// Subscribe, Unsubscribe can both contain topic strings\n\t\t\tcase MESSAGE_TYPE.SUBSCRIBE:\n\t\t\t\tfirst |= 0x02; // Qos = 1;\n\t\t\t\tfor ( var i = 0; i < this.topics.length; i++) {\n\t\t\t\t\ttopicStrLength[i] = UTF8Length(this.topics[i]);\n\t\t\t\t\tremLength += topicStrLength[i] + 2;\n\t\t\t\t}\n\t\t\t\tremLength += this.requestedQos.length; // 1 byte for each topic's Qos\n\t\t\t\t// QoS on Subscribe only\n\t\t\t\tbreak;\n\n\t\t\tcase MESSAGE_TYPE.UNSUBSCRIBE:\n\t\t\t\tfirst |= 0x02; // Qos = 1;\n\t\t\t\tfor ( var i = 0; i < this.topics.length; i++) {\n\t\t\t\t\ttopicStrLength[i] = UTF8Length(this.topics[i]);\n\t\t\t\t\tremLength += topicStrLength[i] + 2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase MESSAGE_TYPE.PUBREL:\n\t\t\t\tfirst |= 0x02; // Qos = 1;\n\t\t\t\tbreak;\n\n\t\t\tcase MESSAGE_TYPE.PUBLISH:\n\t\t\t\tif (this.payloadMessage.duplicate) first |= 0x08;\n\t\t\t\tfirst = first |= (this.payloadMessage.qos << 1);\n\t\t\t\tif (this.payloadMessage.retained) first |= 0x01;\n\t\t\t\tdestinationNameLength = UTF8Length(this.payloadMessage.destinationName);\n\t\t\t\tremLength += destinationNameLength + 2;\n\t\t\t\tvar payloadBytes = this.payloadMessage.payloadBytes;\n\t\t\t\tremLength += payloadBytes.byteLength;\n\t\t\t\tif (payloadBytes instanceof ArrayBuffer)\n\t\t\t\t\tpayloadBytes = new Uint8Array(payloadBytes);\n\t\t\t\telse if (!(payloadBytes instanceof Uint8Array))\n\t\t\t\t\tpayloadBytes = new Uint8Array(payloadBytes.buffer);\n\t\t\t\tbreak;\n\n\t\t\tcase MESSAGE_TYPE.DISCONNECT:\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Now we can allocate a buffer for the message\n\n\t\t\tvar mbi = encodeMBI(remLength); // Convert the length to MQTT MBI format\n\t\t\tvar pos = mbi.length + 1; // Offset of start of variable header\n\t\t\tvar buffer = new ArrayBuffer(remLength + pos);\n\t\t\tvar byteStream = new Uint8Array(buffer); // view it as a sequence of bytes\n\n\t\t\t//Write the fixed header into the buffer\n\t\t\tbyteStream[0] = first;\n\t\t\tbyteStream.set(mbi,1);\n\n\t\t\t// If this is a PUBLISH then the variable header starts with a topic\n\t\t\tif (this.type == MESSAGE_TYPE.PUBLISH)\n\t\t\t\tpos = writeString(this.payloadMessage.destinationName, destinationNameLength, byteStream, pos);\n\t\t\t// If this is a CONNECT then the variable header contains the protocol name/version, flags and keepalive time\n\n\t\t\telse if (this.type == MESSAGE_TYPE.CONNECT) {\n\t\t\t\tswitch (this.mqttVersion) {\n\t\t\t\tcase 3:\n\t\t\t\t\tbyteStream.set(MqttProtoIdentifierv3, pos);\n\t\t\t\t\tpos += MqttProtoIdentifierv3.length;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tbyteStream.set(MqttProtoIdentifierv4, pos);\n\t\t\t\t\tpos += MqttProtoIdentifierv4.length;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tvar connectFlags = 0;\n\t\t\t\tif (this.cleanSession)\n\t\t\t\t\tconnectFlags = 0x02;\n\t\t\t\tif (this.willMessage !== undefined ) {\n\t\t\t\t\tconnectFlags |= 0x04;\n\t\t\t\t\tconnectFlags |= (this.willMessage.qos<<3);\n\t\t\t\t\tif (this.willMessage.retained) {\n\t\t\t\t\t\tconnectFlags |= 0x20;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (this.userName !== undefined)\n\t\t\t\t\tconnectFlags |= 0x80;\n\t\t\t\tif (this.password !== undefined)\n\t\t\t\t\tconnectFlags |= 0x40;\n\t\t\t\tbyteStream[pos++] = connectFlags;\n\t\t\t\tpos = writeUint16 (this.keepAliveInterval, byteStream, pos);\n\t\t\t}\n\n\t\t\t// Output the messageIdentifier - if there is one\n\t\t\tif (this.messageIdentifier !== undefined)\n\t\t\t\tpos = writeUint16 (this.messageIdentifier, byteStream, pos);\n\n\t\t\tswitch(this.type) {\n\t\t\tcase MESSAGE_TYPE.CONNECT:\n\t\t\t\tpos = writeString(this.clientId, UTF8Length(this.clientId), byteStream, pos);\n\t\t\t\tif (this.willMessage !== undefined) {\n\t\t\t\t\tpos = writeString(this.willMessage.destinationName, UTF8Length(this.willMessage.destinationName), byteStream, pos);\n\t\t\t\t\tpos = writeUint16(willMessagePayloadBytes.byteLength, byteStream, pos);\n\t\t\t\t\tbyteStream.set(willMessagePayloadBytes, pos);\n\t\t\t\t\tpos += willMessagePayloadBytes.byteLength;\n\n\t\t\t\t}\n\t\t\t\tif (this.userName !== undefined)\n\t\t\t\t\tpos = writeString(this.userName, UTF8Length(this.userName), byteStream, pos);\n\t\t\t\tif (this.password !== undefined)\n\t\t\t\t\tpos = writeString(this.password, UTF8Length(this.password), byteStream, pos);\n\t\t\t\tbreak;\n\n\t\t\tcase MESSAGE_TYPE.PUBLISH:\n\t\t\t\t// PUBLISH has a text or binary payload, if text do not add a 2 byte length field, just the UTF characters.\n\t\t\t\tbyteStream.set(payloadBytes, pos);\n\n\t\t\t\tbreak;\n\n\t\t\t\t// \t case MESSAGE_TYPE.PUBREC:\n\t\t\t\t// \t case MESSAGE_TYPE.PUBREL:\n\t\t\t\t// \t case MESSAGE_TYPE.PUBCOMP:\n\t\t\t\t// \t \tbreak;\n\n\t\t\tcase MESSAGE_TYPE.SUBSCRIBE:\n\t\t\t\t// SUBSCRIBE has a list of topic strings and request QoS\n\t\t\t\tfor (var i=0; i> 4;\n\t\t\tvar messageInfo = first &= 0x0f;\n\t\t\tpos += 1;\n\n\n\t\t\t// Decode the remaining length (MBI format)\n\n\t\t\tvar digit;\n\t\t\tvar remLength = 0;\n\t\t\tvar multiplier = 1;\n\t\t\tdo {\n\t\t\t\tif (pos == input.length) {\n\t\t\t\t\treturn [null,startingPos];\n\t\t\t\t}\n\t\t\t\tdigit = input[pos++];\n\t\t\t\tremLength += ((digit & 0x7F) * multiplier);\n\t\t\t\tmultiplier *= 128;\n\t\t\t} while ((digit & 0x80) !== 0);\n\n\t\t\tvar endPos = pos+remLength;\n\t\t\tif (endPos > input.length) {\n\t\t\t\treturn [null,startingPos];\n\t\t\t}\n\n\t\t\tvar wireMessage = new WireMessage(type);\n\t\t\tswitch(type) {\n\t\t\tcase MESSAGE_TYPE.CONNACK:\n\t\t\t\tvar connectAcknowledgeFlags = input[pos++];\n\t\t\t\tif (connectAcknowledgeFlags & 0x01)\n\t\t\t\t\twireMessage.sessionPresent = true;\n\t\t\t\twireMessage.returnCode = input[pos++];\n\t\t\t\tbreak;\n\n\t\t\tcase MESSAGE_TYPE.PUBLISH:\n\t\t\t\tvar qos = (messageInfo >> 1) & 0x03;\n\n\t\t\t\tvar len = readUint16(input, pos);\n\t\t\t\tpos += 2;\n\t\t\t\tvar topicName = parseUTF8(input, pos, len);\n\t\t\t\tpos += len;\n\t\t\t\t// If QoS 1 or 2 there will be a messageIdentifier\n\t\t\t\tif (qos > 0) {\n\t\t\t\t\twireMessage.messageIdentifier = readUint16(input, pos);\n\t\t\t\t\tpos += 2;\n\t\t\t\t}\n\n\t\t\t\tvar message = new Message(input.subarray(pos, endPos));\n\t\t\t\tif ((messageInfo & 0x01) == 0x01)\n\t\t\t\t\tmessage.retained = true;\n\t\t\t\tif ((messageInfo & 0x08) == 0x08)\n\t\t\t\t\tmessage.duplicate = true;\n\t\t\t\tmessage.qos = qos;\n\t\t\t\tmessage.destinationName = topicName;\n\t\t\t\twireMessage.payloadMessage = message;\n\t\t\t\tbreak;\n\n\t\t\tcase MESSAGE_TYPE.PUBACK:\n\t\t\tcase MESSAGE_TYPE.PUBREC:\n\t\t\tcase MESSAGE_TYPE.PUBREL:\n\t\t\tcase MESSAGE_TYPE.PUBCOMP:\n\t\t\tcase MESSAGE_TYPE.UNSUBACK:\n\t\t\t\twireMessage.messageIdentifier = readUint16(input, pos);\n\t\t\t\tbreak;\n\n\t\t\tcase MESSAGE_TYPE.SUBACK:\n\t\t\t\twireMessage.messageIdentifier = readUint16(input, pos);\n\t\t\t\tpos += 2;\n\t\t\t\twireMessage.returnCode = input.subarray(pos, endPos);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn [wireMessage,endPos];\n\t\t}\n\n\t\tfunction writeUint16(input, buffer, offset) {\n\t\t\tbuffer[offset++] = input >> 8; //MSB\n\t\t\tbuffer[offset++] = input % 256; //LSB\n\t\t\treturn offset;\n\t\t}\n\n\t\tfunction writeString(input, utf8Length, buffer, offset) {\n\t\t\toffset = writeUint16(utf8Length, buffer, offset);\n\t\t\tstringToUTF8(input, buffer, offset);\n\t\t\treturn offset + utf8Length;\n\t\t}\n\n\t\tfunction readUint16(buffer, offset) {\n\t\t\treturn 256*buffer[offset] + buffer[offset+1];\n\t\t}\n\n\t\t/**\n\t * Encodes an MQTT Multi-Byte Integer\n\t * @private\n\t */\n\t\tfunction encodeMBI(number) {\n\t\t\tvar output = new Array(1);\n\t\t\tvar numBytes = 0;\n\n\t\t\tdo {\n\t\t\t\tvar digit = number % 128;\n\t\t\t\tnumber = number >> 7;\n\t\t\t\tif (number > 0) {\n\t\t\t\t\tdigit |= 0x80;\n\t\t\t\t}\n\t\t\t\toutput[numBytes++] = digit;\n\t\t\t} while ( (number > 0) && (numBytes<4) );\n\n\t\t\treturn output;\n\t\t}\n\n\t\t/**\n\t * Takes a String and calculates its length in bytes when encoded in UTF8.\n\t * @private\n\t */\n\t\tfunction UTF8Length(input) {\n\t\t\tvar output = 0;\n\t\t\tfor (var i = 0; i 0x7FF)\n\t\t\t\t{\n\t\t\t\t\t// Surrogate pair means its a 4 byte character\n\t\t\t\t\tif (0xD800 <= charCode && charCode <= 0xDBFF)\n\t\t\t\t\t{\n\t\t\t\t\t\ti++;\n\t\t\t\t\t\toutput++;\n\t\t\t\t\t}\n\t\t\t\t\toutput +=3;\n\t\t\t\t}\n\t\t\t\telse if (charCode > 0x7F)\n\t\t\t\t\toutput +=2;\n\t\t\t\telse\n\t\t\t\t\toutput++;\n\t\t\t}\n\t\t\treturn output;\n\t\t}\n\n\t\t/**\n\t * Takes a String and writes it into an array as UTF8 encoded bytes.\n\t * @private\n\t */\n\t\tfunction stringToUTF8(input, output, start) {\n\t\t\tvar pos = start;\n\t\t\tfor (var i = 0; i>6 & 0x1F | 0xC0;\n\t\t\t\t\toutput[pos++] = charCode & 0x3F | 0x80;\n\t\t\t\t} else if (charCode <= 0xFFFF) {\n\t\t\t\t\toutput[pos++] = charCode>>12 & 0x0F | 0xE0;\n\t\t\t\t\toutput[pos++] = charCode>>6 & 0x3F | 0x80;\n\t\t\t\t\toutput[pos++] = charCode & 0x3F | 0x80;\n\t\t\t\t} else {\n\t\t\t\t\toutput[pos++] = charCode>>18 & 0x07 | 0xF0;\n\t\t\t\t\toutput[pos++] = charCode>>12 & 0x3F | 0x80;\n\t\t\t\t\toutput[pos++] = charCode>>6 & 0x3F | 0x80;\n\t\t\t\t\toutput[pos++] = charCode & 0x3F | 0x80;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn output;\n\t\t}\n\n\t\tfunction parseUTF8(input, offset, length) {\n\t\t\tvar output = \"\";\n\t\t\tvar utf16;\n\t\t\tvar pos = offset;\n\n\t\t\twhile (pos < offset+length)\n\t\t\t{\n\t\t\t\tvar byte1 = input[pos++];\n\t\t\t\tif (byte1 < 128)\n\t\t\t\t\tutf16 = byte1;\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar byte2 = input[pos++]-128;\n\t\t\t\t\tif (byte2 < 0)\n\t\t\t\t\t\tthrow new Error(format(ERROR.MALFORMED_UTF, [byte1.toString(16), byte2.toString(16),\"\"]));\n\t\t\t\t\tif (byte1 < 0xE0) // 2 byte character\n\t\t\t\t\t\tutf16 = 64*(byte1-0xC0) + byte2;\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tvar byte3 = input[pos++]-128;\n\t\t\t\t\t\tif (byte3 < 0)\n\t\t\t\t\t\t\tthrow new Error(format(ERROR.MALFORMED_UTF, [byte1.toString(16), byte2.toString(16), byte3.toString(16)]));\n\t\t\t\t\t\tif (byte1 < 0xF0) // 3 byte character\n\t\t\t\t\t\t\tutf16 = 4096*(byte1-0xE0) + 64*byte2 + byte3;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar byte4 = input[pos++]-128;\n\t\t\t\t\t\t\tif (byte4 < 0)\n\t\t\t\t\t\t\t\tthrow new Error(format(ERROR.MALFORMED_UTF, [byte1.toString(16), byte2.toString(16), byte3.toString(16), byte4.toString(16)]));\n\t\t\t\t\t\t\tif (byte1 < 0xF8) // 4 byte character\n\t\t\t\t\t\t\t\tutf16 = 262144*(byte1-0xF0) + 4096*byte2 + 64*byte3 + byte4;\n\t\t\t\t\t\t\telse // longer encodings are not supported\n\t\t\t\t\t\t\t\tthrow new Error(format(ERROR.MALFORMED_UTF, [byte1.toString(16), byte2.toString(16), byte3.toString(16), byte4.toString(16)]));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (utf16 > 0xFFFF) // 4 byte character - express as a surrogate pair\n\t\t\t\t{\n\t\t\t\t\tutf16 -= 0x10000;\n\t\t\t\t\toutput += String.fromCharCode(0xD800 + (utf16 >> 10)); // lead character\n\t\t\t\t\tutf16 = 0xDC00 + (utf16 & 0x3FF); // trail character\n\t\t\t\t}\n\t\t\t\toutput += String.fromCharCode(utf16);\n\t\t\t}\n\t\t\treturn output;\n\t\t}\n\n\t\t/**\n\t * Repeat keepalive requests, monitor responses.\n\t * @ignore\n\t */\n\t\tvar Pinger = function(client, keepAliveInterval) {\n\t\t\tthis._client = client;\n\t\t\tthis._keepAliveInterval = keepAliveInterval*1000;\n\t\t\tthis.isReset = false;\n\n\t\t\tvar pingReq = new WireMessage(MESSAGE_TYPE.PINGREQ).encode();\n\n\t\t\tvar doTimeout = function (pinger) {\n\t\t\t\treturn function () {\n\t\t\t\t\treturn doPing.apply(pinger);\n\t\t\t\t};\n\t\t\t};\n\n\t\t\t/** @ignore */\n\t\t\tvar doPing = function() {\n\t\t\t\tif (!this.isReset) {\n\t\t\t\t\tthis._client._trace(\"Pinger.doPing\", \"Timed out\");\n\t\t\t\t\tthis._client._disconnected( ERROR.PING_TIMEOUT.code , format(ERROR.PING_TIMEOUT));\n\t\t\t\t} else {\n\t\t\t\t\tthis.isReset = false;\n\t\t\t\t\tthis._client._trace(\"Pinger.doPing\", \"send PINGREQ\");\n\t\t\t\t\tthis._client.socket.send(pingReq);\n\t\t\t\t\tthis.timeout = setTimeout(doTimeout(this), this._keepAliveInterval);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis.reset = function() {\n\t\t\t\tthis.isReset = true;\n\t\t\t\tclearTimeout(this.timeout);\n\t\t\t\tif (this._keepAliveInterval > 0)\n\t\t\t\t\tthis.timeout = setTimeout(doTimeout(this), this._keepAliveInterval);\n\t\t\t};\n\n\t\t\tthis.cancel = function() {\n\t\t\t\tclearTimeout(this.timeout);\n\t\t\t};\n\t\t};\n\n\t\t/**\n\t * Monitor request completion.\n\t * @ignore\n\t */\n\t\tvar Timeout = function(client, timeoutSeconds, action, args) {\n\t\t\tif (!timeoutSeconds)\n\t\t\t\ttimeoutSeconds = 30;\n\n\t\t\tvar doTimeout = function (action, client, args) {\n\t\t\t\treturn function () {\n\t\t\t\t\treturn action.apply(client, args);\n\t\t\t\t};\n\t\t\t};\n\t\t\tthis.timeout = setTimeout(doTimeout(action, client, args), timeoutSeconds * 1000);\n\n\t\t\tthis.cancel = function() {\n\t\t\t\tclearTimeout(this.timeout);\n\t\t\t};\n\t\t};\n\n\t/**\n\t * Internal implementation of the Websockets MQTT V3.1 client.\n\t *\n\t * @name Paho.ClientImpl @constructor\n\t * @param {String} host the DNS nameof the webSocket host.\n\t * @param {Number} port the port number for that host.\n\t * @param {String} clientId the MQ client identifier.\n\t */\n\t\tvar ClientImpl = function (uri, host, port, path, clientId) {\n\t\t// Check dependencies are satisfied in this browser.\n\t\t\tif (!(\"WebSocket\" in global && global.WebSocket !== null)) {\n\t\t\t\tthrow new Error(format(ERROR.UNSUPPORTED, [\"WebSocket\"]));\n\t\t\t}\n\t\t\tif (!(\"ArrayBuffer\" in global && global.ArrayBuffer !== null)) {\n\t\t\t\tthrow new Error(format(ERROR.UNSUPPORTED, [\"ArrayBuffer\"]));\n\t\t\t}\n\t\t\tthis._trace(\"Paho.Client\", uri, host, port, path, clientId);\n\n\t\t\tthis.host = host;\n\t\t\tthis.port = port;\n\t\t\tthis.path = path;\n\t\t\tthis.uri = uri;\n\t\t\tthis.clientId = clientId;\n\t\t\tthis._wsuri = null;\n\n\t\t\t// Local storagekeys are qualified with the following string.\n\t\t\t// The conditional inclusion of path in the key is for backward\n\t\t\t// compatibility to when the path was not configurable and assumed to\n\t\t\t// be /mqtt\n\t\t\tthis._localKey=host+\":\"+port+(path!=\"/mqtt\"?\":\"+path:\"\")+\":\"+clientId+\":\";\n\n\t\t\t// Create private instance-only message queue\n\t\t\t// Internal queue of messages to be sent, in sending order.\n\t\t\tthis._msg_queue = [];\n\t\t\tthis._buffered_msg_queue = [];\n\n\t\t\t// Messages we have sent and are expecting a response for, indexed by their respective message ids.\n\t\t\tthis._sentMessages = {};\n\n\t\t\t// Messages we have received and acknowleged and are expecting a confirm message for\n\t\t\t// indexed by their respective message ids.\n\t\t\tthis._receivedMessages = {};\n\n\t\t\t// Internal list of callbacks to be executed when messages\n\t\t\t// have been successfully sent over web socket, e.g. disconnect\n\t\t\t// when it doesn't have to wait for ACK, just message is dispatched.\n\t\t\tthis._notify_msg_sent = {};\n\n\t\t\t// Unique identifier for SEND messages, incrementing\n\t\t\t// counter as messages are sent.\n\t\t\tthis._message_identifier = 1;\n\n\t\t\t// Used to determine the transmission sequence of stored sent messages.\n\t\t\tthis._sequence = 0;\n\n\n\t\t\t// Load the local state, if any, from the saved version, only restore state relevant to this client.\n\t\t\tfor (var key in localStorage)\n\t\t\t\tif ( key.indexOf(\"Sent:\"+this._localKey) === 0 || key.indexOf(\"Received:\"+this._localKey) === 0)\n\t\t\t\t\tthis.restore(key);\n\t\t};\n\n\t\t// Messaging Client public instance members.\n\t\tClientImpl.prototype.host = null;\n\t\tClientImpl.prototype.port = null;\n\t\tClientImpl.prototype.path = null;\n\t\tClientImpl.prototype.uri = null;\n\t\tClientImpl.prototype.clientId = null;\n\n\t\t// Messaging Client private instance members.\n\t\tClientImpl.prototype.socket = null;\n\t\t/* true once we have received an acknowledgement to a CONNECT packet. */\n\t\tClientImpl.prototype.connected = false;\n\t\t/* The largest message identifier allowed, may not be larger than 2**16 but\n\t\t * if set smaller reduces the maximum number of outbound messages allowed.\n\t\t */\n\t\tClientImpl.prototype.maxMessageIdentifier = 65536;\n\t\tClientImpl.prototype.connectOptions = null;\n\t\tClientImpl.prototype.hostIndex = null;\n\t\tClientImpl.prototype.onConnected = null;\n\t\tClientImpl.prototype.onConnectionLost = null;\n\t\tClientImpl.prototype.onMessageDelivered = null;\n\t\tClientImpl.prototype.onMessageArrived = null;\n\t\tClientImpl.prototype.traceFunction = null;\n\t\tClientImpl.prototype._msg_queue = null;\n\t\tClientImpl.prototype._buffered_msg_queue = null;\n\t\tClientImpl.prototype._connectTimeout = null;\n\t\t/* The sendPinger monitors how long we allow before we send data to prove to the server that we are alive. */\n\t\tClientImpl.prototype.sendPinger = null;\n\t\t/* The receivePinger monitors how long we allow before we require evidence that the server is alive. */\n\t\tClientImpl.prototype.receivePinger = null;\n\t\tClientImpl.prototype._reconnectInterval = 1; // Reconnect Delay, starts at 1 second\n\t\tClientImpl.prototype._reconnecting = false;\n\t\tClientImpl.prototype._reconnectTimeout = null;\n\t\tClientImpl.prototype.disconnectedPublishing = false;\n\t\tClientImpl.prototype.disconnectedBufferSize = 5000;\n\n\t\tClientImpl.prototype.receiveBuffer = null;\n\n\t\tClientImpl.prototype._traceBuffer = null;\n\t\tClientImpl.prototype._MAX_TRACE_ENTRIES = 100;\n\n\t\tClientImpl.prototype.connect = function (connectOptions) {\n\t\t\tvar connectOptionsMasked = this._traceMask(connectOptions, \"password\");\n\t\t\tthis._trace(\"Client.connect\", connectOptionsMasked, this.socket, this.connected);\n\n\t\t\tif (this.connected)\n\t\t\t\tthrow new Error(format(ERROR.INVALID_STATE, [\"already connected\"]));\n\t\t\tif (this.socket)\n\t\t\t\tthrow new Error(format(ERROR.INVALID_STATE, [\"already connected\"]));\n\n\t\t\tif (this._reconnecting) {\n\t\t\t// connect() function is called while reconnect is in progress.\n\t\t\t// Terminate the auto reconnect process to use new connect options.\n\t\t\t\tthis._reconnectTimeout.cancel();\n\t\t\t\tthis._reconnectTimeout = null;\n\t\t\t\tthis._reconnecting = false;\n\t\t\t}\n\n\t\t\tthis.connectOptions = connectOptions;\n\t\t\tthis._reconnectInterval = 1;\n\t\t\tthis._reconnecting = false;\n\t\t\tif (connectOptions.uris) {\n\t\t\t\tthis.hostIndex = 0;\n\t\t\t\tthis._doConnect(connectOptions.uris[0]);\n\t\t\t} else {\n\t\t\t\tthis._doConnect(this.uri);\n\t\t\t}\n\n\t\t};\n\n\t\tClientImpl.prototype.subscribe = function (filter, subscribeOptions) {\n\t\t\tthis._trace(\"Client.subscribe\", filter, subscribeOptions);\n\n\t\t\tif (!this.connected)\n\t\t\t\tthrow new Error(format(ERROR.INVALID_STATE, [\"not connected\"]));\n\n var wireMessage = new WireMessage(MESSAGE_TYPE.SUBSCRIBE);\n wireMessage.topics = filter.constructor === Array ? filter : [filter];\n if (subscribeOptions.qos === undefined)\n subscribeOptions.qos = 0;\n wireMessage.requestedQos = [];\n for (var i = 0; i < wireMessage.topics.length; i++)\n wireMessage.requestedQos[i] = subscribeOptions.qos;\n\n\t\t\tif (subscribeOptions.onSuccess) {\n\t\t\t\twireMessage.onSuccess = function(grantedQos) {subscribeOptions.onSuccess({invocationContext:subscribeOptions.invocationContext,grantedQos:grantedQos});};\n\t\t\t}\n\n\t\t\tif (subscribeOptions.onFailure) {\n\t\t\t\twireMessage.onFailure = function(errorCode) {subscribeOptions.onFailure({invocationContext:subscribeOptions.invocationContext,errorCode:errorCode, errorMessage:format(errorCode)});};\n\t\t\t}\n\n\t\t\tif (subscribeOptions.timeout) {\n\t\t\t\twireMessage.timeOut = new Timeout(this, subscribeOptions.timeout, subscribeOptions.onFailure,\n\t\t\t\t\t[{invocationContext:subscribeOptions.invocationContext,\n\t\t\t\t\t\terrorCode:ERROR.SUBSCRIBE_TIMEOUT.code,\n\t\t\t\t\t\terrorMessage:format(ERROR.SUBSCRIBE_TIMEOUT)}]);\n\t\t\t}\n\n\t\t\t// All subscriptions return a SUBACK.\n\t\t\tthis._requires_ack(wireMessage);\n\t\t\tthis._schedule_message(wireMessage);\n\t\t};\n\n\t\t/** @ignore */\n\t\tClientImpl.prototype.unsubscribe = function(filter, unsubscribeOptions) {\n\t\t\tthis._trace(\"Client.unsubscribe\", filter, unsubscribeOptions);\n\n\t\t\tif (!this.connected)\n\t\t\t\tthrow new Error(format(ERROR.INVALID_STATE, [\"not connected\"]));\n\n var wireMessage = new WireMessage(MESSAGE_TYPE.UNSUBSCRIBE);\n wireMessage.topics = filter.constructor === Array ? filter : [filter];\n\n\t\t\tif (unsubscribeOptions.onSuccess) {\n\t\t\t\twireMessage.callback = function() {unsubscribeOptions.onSuccess({invocationContext:unsubscribeOptions.invocationContext});};\n\t\t\t}\n\t\t\tif (unsubscribeOptions.timeout) {\n\t\t\t\twireMessage.timeOut = new Timeout(this, unsubscribeOptions.timeout, unsubscribeOptions.onFailure,\n\t\t\t\t\t[{invocationContext:unsubscribeOptions.invocationContext,\n\t\t\t\t\t\terrorCode:ERROR.UNSUBSCRIBE_TIMEOUT.code,\n\t\t\t\t\t\terrorMessage:format(ERROR.UNSUBSCRIBE_TIMEOUT)}]);\n\t\t\t}\n\n\t\t\t// All unsubscribes return a SUBACK.\n\t\t\tthis._requires_ack(wireMessage);\n\t\t\tthis._schedule_message(wireMessage);\n\t\t};\n\n\t\tClientImpl.prototype.send = function (message) {\n\t\t\tthis._trace(\"Client.send\", message);\n\n\t\t\tvar wireMessage = new WireMessage(MESSAGE_TYPE.PUBLISH);\n\t\t\twireMessage.payloadMessage = message;\n\n\t\t\tif (this.connected) {\n\t\t\t// Mark qos 1 & 2 message as \"ACK required\"\n\t\t\t// For qos 0 message, invoke onMessageDelivered callback if there is one.\n\t\t\t// Then schedule the message.\n\t\t\t\tif (message.qos > 0) {\n\t\t\t\t\tthis._requires_ack(wireMessage);\n\t\t\t\t} else if (this.onMessageDelivered) {\n\t\t\t\t\tthis._notify_msg_sent[wireMessage] = this.onMessageDelivered(wireMessage.payloadMessage);\n\t\t\t\t}\n\t\t\t\tthis._schedule_message(wireMessage);\n\t\t\t} else {\n\t\t\t// Currently disconnected, will not schedule this message\n\t\t\t// Check if reconnecting is in progress and disconnected publish is enabled.\n\t\t\t\tif (this._reconnecting && this.disconnectedPublishing) {\n\t\t\t\t// Check the limit which include the \"required ACK\" messages\n\t\t\t\t\tvar messageCount = Object.keys(this._sentMessages).length + this._buffered_msg_queue.length;\n\t\t\t\t\tif (messageCount > this.disconnectedBufferSize) {\n\t\t\t\t\t\tthrow new Error(format(ERROR.BUFFER_FULL, [this.disconnectedBufferSize]));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (message.qos > 0) {\n\t\t\t\t\t\t// Mark this message as \"ACK required\"\n\t\t\t\t\t\t\tthis._requires_ack(wireMessage);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twireMessage.sequence = ++this._sequence;\n\t\t\t\t\t\t\t// Add messages in fifo order to array, by adding to start\n\t\t\t\t\t\t\tthis._buffered_msg_queue.unshift(wireMessage);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(format(ERROR.INVALID_STATE, [\"not connected\"]));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tClientImpl.prototype.disconnect = function () {\n\t\t\tthis._trace(\"Client.disconnect\");\n\n\t\t\tif (this._reconnecting) {\n\t\t\t// disconnect() function is called while reconnect is in progress.\n\t\t\t// Terminate the auto reconnect process.\n\t\t\t\tthis._reconnectTimeout.cancel();\n\t\t\t\tthis._reconnectTimeout = null;\n\t\t\t\tthis._reconnecting = false;\n\t\t\t}\n\n\t\t\tif (!this.socket)\n\t\t\t\tthrow new Error(format(ERROR.INVALID_STATE, [\"not connecting or connected\"]));\n\n\t\t\tvar wireMessage = new WireMessage(MESSAGE_TYPE.DISCONNECT);\n\n\t\t\t// Run the disconnected call back as soon as the message has been sent,\n\t\t\t// in case of a failure later on in the disconnect processing.\n\t\t\t// as a consequence, the _disconected call back may be run several times.\n\t\t\tthis._notify_msg_sent[wireMessage] = scope(this._disconnected, this);\n\n\t\t\tthis._schedule_message(wireMessage);\n\t\t};\n\n\t\tClientImpl.prototype.getTraceLog = function () {\n\t\t\tif ( this._traceBuffer !== null ) {\n\t\t\t\tthis._trace(\"Client.getTraceLog\", new Date());\n\t\t\t\tthis._trace(\"Client.getTraceLog in flight messages\", this._sentMessages.length);\n\t\t\t\tfor (var key in this._sentMessages)\n\t\t\t\t\tthis._trace(\"_sentMessages \",key, this._sentMessages[key]);\n\t\t\t\tfor (var key in this._receivedMessages)\n\t\t\t\t\tthis._trace(\"_receivedMessages \",key, this._receivedMessages[key]);\n\n\t\t\t\treturn this._traceBuffer;\n\t\t\t}\n\t\t};\n\n\t\tClientImpl.prototype.startTrace = function () {\n\t\t\tif ( this._traceBuffer === null ) {\n\t\t\t\tthis._traceBuffer = [];\n\t\t\t}\n\t\t\tthis._trace(\"Client.startTrace\", new Date(), version);\n\t\t};\n\n\t\tClientImpl.prototype.stopTrace = function () {\n\t\t\tdelete this._traceBuffer;\n\t\t};\n\n\t\tClientImpl.prototype._doConnect = function (wsurl) {\n\t\t// When the socket is open, this client will send the CONNECT WireMessage using the saved parameters.\n\t\t\tif (this.connectOptions.useSSL) {\n\t\t\t\tvar uriParts = wsurl.split(\":\");\n\t\t\t\turiParts[0] = \"wss\";\n\t\t\t\twsurl = uriParts.join(\":\");\n\t\t\t}\n\t\t\tthis._wsuri = wsurl;\n\t\t\tthis.connected = false;\n\n\n\n\t\t\tif (this.connectOptions.mqttVersion < 4) {\n\t\t\t\tthis.socket = new WebSocket(wsurl, [\"mqttv3.1\"]);\n\t\t\t} else {\n\t\t\t\tthis.socket = new WebSocket(wsurl, [\"mqtt\"]);\n\t\t\t}\n\t\t\tthis.socket.binaryType = \"arraybuffer\";\n\t\t\tthis.socket.onopen = scope(this._on_socket_open, this);\n\t\t\tthis.socket.onmessage = scope(this._on_socket_message, this);\n\t\t\tthis.socket.onerror = scope(this._on_socket_error, this);\n\t\t\tthis.socket.onclose = scope(this._on_socket_close, this);\n\n\t\t\tthis.sendPinger = new Pinger(this, this.connectOptions.keepAliveInterval);\n\t\t\tthis.receivePinger = new Pinger(this, this.connectOptions.keepAliveInterval);\n\t\t\tif (this._connectTimeout) {\n\t\t\t\tthis._connectTimeout.cancel();\n\t\t\t\tthis._connectTimeout = null;\n\t\t\t}\n\t\t\tthis._connectTimeout = new Timeout(this, this.connectOptions.timeout, this._disconnected, [ERROR.CONNECT_TIMEOUT.code, format(ERROR.CONNECT_TIMEOUT)]);\n\t\t};\n\n\n\t\t// Schedule a new message to be sent over the WebSockets\n\t\t// connection. CONNECT messages cause WebSocket connection\n\t\t// to be started. All other messages are queued internally\n\t\t// until this has happened. When WS connection starts, process\n\t\t// all outstanding messages.\n\t\tClientImpl.prototype._schedule_message = function (message) {\n\t\t\t// Add messages in fifo order to array, by adding to start\n\t\t\tthis._msg_queue.unshift(message);\n\t\t\t// Process outstanding messages in the queue if we have an open socket, and have received CONNACK.\n\t\t\tif (this.connected) {\n\t\t\t\tthis._process_queue();\n\t\t\t}\n\t\t};\n\n\t\tClientImpl.prototype.store = function(prefix, wireMessage) {\n\t\t\tvar storedMessage = {type:wireMessage.type, messageIdentifier:wireMessage.messageIdentifier, version:1};\n\n\t\t\tswitch(wireMessage.type) {\n\t\t\tcase MESSAGE_TYPE.PUBLISH:\n\t\t\t\tif(wireMessage.pubRecReceived)\n\t\t\t\t\tstoredMessage.pubRecReceived = true;\n\n\t\t\t\t// Convert the payload to a hex string.\n\t\t\t\tstoredMessage.payloadMessage = {};\n\t\t\t\tvar hex = \"\";\n\t\t\t\tvar messageBytes = wireMessage.payloadMessage.payloadBytes;\n\t\t\t\tfor (var i=0; i= 2) {\n\t\t\t\t\tvar x = parseInt(hex.substring(0, 2), 16);\n\t\t\t\t\thex = hex.substring(2, hex.length);\n\t\t\t\t\tbyteStream[i++] = x;\n\t\t\t\t}\n\t\t\t\tvar payloadMessage = new Message(byteStream);\n\n\t\t\t\tpayloadMessage.qos = storedMessage.payloadMessage.qos;\n\t\t\t\tpayloadMessage.destinationName = storedMessage.payloadMessage.destinationName;\n\t\t\t\tif (storedMessage.payloadMessage.duplicate)\n\t\t\t\t\tpayloadMessage.duplicate = true;\n\t\t\t\tif (storedMessage.payloadMessage.retained)\n\t\t\t\t\tpayloadMessage.retained = true;\n\t\t\t\twireMessage.payloadMessage = payloadMessage;\n\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tthrow Error(format(ERROR.INVALID_STORED_DATA, [key, value]));\n\t\t\t}\n\n\t\t\tif (key.indexOf(\"Sent:\"+this._localKey) === 0) {\n\t\t\t\twireMessage.payloadMessage.duplicate = true;\n\t\t\t\tthis._sentMessages[wireMessage.messageIdentifier] = wireMessage;\n\t\t\t} else if (key.indexOf(\"Received:\"+this._localKey) === 0) {\n\t\t\t\tthis._receivedMessages[wireMessage.messageIdentifier] = wireMessage;\n\t\t\t}\n\t\t};\n\n\t\tClientImpl.prototype._process_queue = function () {\n\t\t\tvar message = null;\n\n\t\t\t// Send all queued messages down socket connection\n\t\t\twhile ((message = this._msg_queue.pop())) {\n\t\t\t\tthis._socket_send(message);\n\t\t\t\t// Notify listeners that message was successfully sent\n\t\t\t\tif (this._notify_msg_sent[message]) {\n\t\t\t\t\tthis._notify_msg_sent[message]();\n\t\t\t\t\tdelete this._notify_msg_sent[message];\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t * Expect an ACK response for this message. Add message to the set of in progress\n\t * messages and set an unused identifier in this message.\n\t * @ignore\n\t */\n\t\tClientImpl.prototype._requires_ack = function (wireMessage) {\n\t\t\tvar messageCount = Object.keys(this._sentMessages).length;\n\t\t\tif (messageCount > this.maxMessageIdentifier)\n\t\t\t\tthrow Error (\"Too many messages:\"+messageCount);\n\n\t\t\twhile(this._sentMessages[this._message_identifier] !== undefined) {\n\t\t\t\tthis._message_identifier++;\n\t\t\t}\n\t\t\twireMessage.messageIdentifier = this._message_identifier;\n\t\t\tthis._sentMessages[wireMessage.messageIdentifier] = wireMessage;\n\t\t\tif (wireMessage.type === MESSAGE_TYPE.PUBLISH) {\n\t\t\t\tthis.store(\"Sent:\", wireMessage);\n\t\t\t}\n\t\t\tif (this._message_identifier === this.maxMessageIdentifier) {\n\t\t\t\tthis._message_identifier = 1;\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t * Called when the underlying websocket has been opened.\n\t * @ignore\n\t */\n\t\tClientImpl.prototype._on_socket_open = function () {\n\t\t// Create the CONNECT message object.\n\t\t\tvar wireMessage = new WireMessage(MESSAGE_TYPE.CONNECT, this.connectOptions);\n\t\t\twireMessage.clientId = this.clientId;\n\t\t\tthis._socket_send(wireMessage);\n\t\t};\n\n\t\t/**\n\t * Called when the underlying websocket has received a complete packet.\n\t * @ignore\n\t */\n\t\tClientImpl.prototype._on_socket_message = function (event) {\n\t\t\tthis._trace(\"Client._on_socket_message\", event.data);\n\t\t\tvar messages = this._deframeMessages(event.data);\n\t\t\tfor (var i = 0; i < messages.length; i+=1) {\n\t\t\t\tthis._handleMessage(messages[i]);\n\t\t\t}\n\t\t};\n\n\t\tClientImpl.prototype._deframeMessages = function(data) {\n\t\t\tvar byteArray = new Uint8Array(data);\n\t\t\tvar messages = [];\n\t\t\tif (this.receiveBuffer) {\n\t\t\t\tvar newData = new Uint8Array(this.receiveBuffer.length+byteArray.length);\n\t\t\t\tnewData.set(this.receiveBuffer);\n\t\t\t\tnewData.set(byteArray,this.receiveBuffer.length);\n\t\t\t\tbyteArray = newData;\n\t\t\t\tdelete this.receiveBuffer;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tvar offset = 0;\n\t\t\t\twhile(offset < byteArray.length) {\n\t\t\t\t\tvar result = decodeMessage(byteArray,offset);\n\t\t\t\t\tvar wireMessage = result[0];\n\t\t\t\t\toffset = result[1];\n\t\t\t\t\tif (wireMessage !== null) {\n\t\t\t\t\t\tmessages.push(wireMessage);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (offset < byteArray.length) {\n\t\t\t\t\tthis.receiveBuffer = byteArray.subarray(offset);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tvar errorStack = ((error.hasOwnProperty(\"stack\") == \"undefined\") ? error.stack.toString() : \"No Error Stack Available\");\n\t\t\t\tthis._disconnected(ERROR.INTERNAL_ERROR.code , format(ERROR.INTERNAL_ERROR, [error.message,errorStack]));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn messages;\n\t\t};\n\n\t\tClientImpl.prototype._handleMessage = function(wireMessage) {\n\n\t\t\tthis._trace(\"Client._handleMessage\", wireMessage);\n\n\t\t\ttry {\n\t\t\t\tswitch(wireMessage.type) {\n\t\t\t\tcase MESSAGE_TYPE.CONNACK:\n\t\t\t\t\tthis._connectTimeout.cancel();\n\t\t\t\t\tif (this._reconnectTimeout)\n\t\t\t\t\t\tthis._reconnectTimeout.cancel();\n\n\t\t\t\t\t// If we have started using clean session then clear up the local state.\n\t\t\t\t\tif (this.connectOptions.cleanSession) {\n\t\t\t\t\t\tfor (var key in this._sentMessages) {\n\t\t\t\t\t\t\tvar sentMessage = this._sentMessages[key];\n\t\t\t\t\t\t\tlocalStorage.removeItem(\"Sent:\"+this._localKey+sentMessage.messageIdentifier);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._sentMessages = {};\n\n\t\t\t\t\t\tfor (var key in this._receivedMessages) {\n\t\t\t\t\t\t\tvar receivedMessage = this._receivedMessages[key];\n\t\t\t\t\t\t\tlocalStorage.removeItem(\"Received:\"+this._localKey+receivedMessage.messageIdentifier);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._receivedMessages = {};\n\t\t\t\t\t}\n\t\t\t\t\t// Client connected and ready for business.\n\t\t\t\t\tif (wireMessage.returnCode === 0) {\n\n\t\t\t\t\t\tthis.connected = true;\n\t\t\t\t\t\t// Jump to the end of the list of uris and stop looking for a good host.\n\n\t\t\t\t\t\tif (this.connectOptions.uris)\n\t\t\t\t\t\t\tthis.hostIndex = this.connectOptions.uris.length;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._disconnected(ERROR.CONNACK_RETURNCODE.code , format(ERROR.CONNACK_RETURNCODE, [wireMessage.returnCode, CONNACK_RC[wireMessage.returnCode]]));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Resend messages.\n\t\t\t\t\tvar sequencedMessages = [];\n\t\t\t\t\tfor (var msgId in this._sentMessages) {\n\t\t\t\t\t\tif (this._sentMessages.hasOwnProperty(msgId))\n\t\t\t\t\t\t\tsequencedMessages.push(this._sentMessages[msgId]);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Also schedule qos 0 buffered messages if any\n\t\t\t\t\tif (this._buffered_msg_queue.length > 0) {\n\t\t\t\t\t\tvar msg = null;\n\t\t\t\t\t\twhile ((msg = this._buffered_msg_queue.pop())) {\n\t\t\t\t\t\t\tsequencedMessages.push(msg);\n\t\t\t\t\t\t\tif (this.onMessageDelivered)\n\t\t\t\t\t\t\t\tthis._notify_msg_sent[msg] = this.onMessageDelivered(msg.payloadMessage);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Sort sentMessages into the original sent order.\n\t\t\t\t\tvar sequencedMessages = sequencedMessages.sort(function(a,b) {return a.sequence - b.sequence;} );\n\t\t\t\t\tfor (var i=0, len=sequencedMessages.length; i\n\t * Most applications will create just one Client object and then call its connect() method,\n\t * however applications can create more than one Client object if they wish.\n\t * In this case the combination of host, port and clientId attributes must be different for each Client object.\n\t *

\n\t * The send, subscribe and unsubscribe methods are implemented as asynchronous JavaScript methods\n\t * (even though the underlying protocol exchange might be synchronous in nature).\n\t * This means they signal their completion by calling back to the application,\n\t * via Success or Failure callback functions provided by the application on the method in question.\n\t * Such callbacks are called at most once per method invocation and do not persist beyond the lifetime\n\t * of the script that made the invocation.\n\t *

\n\t * In contrast there are some callback functions, most notably onMessageArrived,\n\t * that are defined on the {@link Paho.Client} object.\n\t * These may get called multiple times, and aren't directly related to specific method invocations made by the client.\n\t *\n\t * @name Paho.Client\n\t *\n\t * @constructor\n\t *\n\t * @param {string} host - the address of the messaging server, as a fully qualified WebSocket URI, as a DNS name or dotted decimal IP address.\n\t * @param {number} port - the port number to connect to - only required if host is not a URI\n\t * @param {string} path - the path on the host to connect to - only used if host is not a URI. Default: '/mqtt'.\n\t * @param {string} clientId - the Messaging client identifier, between 1 and 23 characters in length.\n\t *\n\t * @property {string} host - read only the server's DNS hostname or dotted decimal IP address.\n\t * @property {number} port - read only the server's port.\n\t * @property {string} path - read only the server's path.\n\t * @property {string} clientId - read only used when connecting to the server.\n\t * @property {function} onConnectionLost - called when a connection has been lost.\n\t * after a connect() method has succeeded.\n\t * Establish the call back used when a connection has been lost. The connection may be\n\t * lost because the client initiates a disconnect or because the server or network\n\t * cause the client to be disconnected. The disconnect call back may be called without\n\t * the connectionComplete call back being invoked if, for example the client fails to\n\t * connect.\n\t * A single response object parameter is passed to the onConnectionLost callback containing the following fields:\n\t *

    \n\t *
  1. errorCode\n\t *
  2. errorMessage\n\t *
\n\t * @property {function} onMessageDelivered - called when a message has been delivered.\n\t * All processing that this Client will ever do has been completed. So, for example,\n\t * in the case of a Qos=2 message sent by this client, the PubComp flow has been received from the server\n\t * and the message has been removed from persistent storage before this callback is invoked.\n\t * Parameters passed to the onMessageDelivered callback are:\n\t *
    \n\t *
  1. {@link Paho.Message} that was delivered.\n\t *
\n\t * @property {function} onMessageArrived - called when a message has arrived in this Paho.client.\n\t * Parameters passed to the onMessageArrived callback are:\n\t *
    \n\t *
  1. {@link Paho.Message} that has arrived.\n\t *
\n\t * @property {function} onConnected - called when a connection is successfully made to the server.\n\t * after a connect() method.\n\t * Parameters passed to the onConnected callback are:\n\t *
    \n\t *
  1. reconnect (boolean) - If true, the connection was the result of a reconnect.
  2. \n\t *
  3. URI (string) - The URI used to connect to the server.
  4. \n\t *
\n\t * @property {boolean} disconnectedPublishing - if set, will enable disconnected publishing in\n\t * in the event that the connection to the server is lost.\n\t * @property {number} disconnectedBufferSize - Used to set the maximum number of messages that the disconnected\n\t * buffer will hold before rejecting new messages. Default size: 5000 messages\n\t * @property {function} trace - called whenever trace is called. TODO\n\t */\n\t\tvar Client = function (host, port, path, clientId) {\n\n\t\t\tvar uri;\n\n\t\t\tif (typeof host !== \"string\")\n\t\t\t\tthrow new Error(format(ERROR.INVALID_TYPE, [typeof host, \"host\"]));\n\n\t\t\tif (arguments.length == 2) {\n\t\t\t// host: must be full ws:// uri\n\t\t\t// port: clientId\n\t\t\t\tclientId = port;\n\t\t\t\turi = host;\n\t\t\t\tvar match = uri.match(/^(wss?):\\/\\/((\\[(.+)\\])|([^\\/]+?))(:(\\d+))?(\\/.*)$/);\n\t\t\t\tif (match) {\n\t\t\t\t\thost = match[4]||match[2];\n\t\t\t\t\tport = parseInt(match[7]);\n\t\t\t\t\tpath = match[8];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT,[host,\"host\"]));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (arguments.length == 3) {\n\t\t\t\t\tclientId = path;\n\t\t\t\t\tpath = \"/mqtt\";\n\t\t\t\t}\n\t\t\t\tif (typeof port !== \"number\" || port < 0)\n\t\t\t\t\tthrow new Error(format(ERROR.INVALID_TYPE, [typeof port, \"port\"]));\n\t\t\t\tif (typeof path !== \"string\")\n\t\t\t\t\tthrow new Error(format(ERROR.INVALID_TYPE, [typeof path, \"path\"]));\n\n\t\t\t\tvar ipv6AddSBracket = (host.indexOf(\":\") !== -1 && host.slice(0,1) !== \"[\" && host.slice(-1) !== \"]\");\n\t\t\t\turi = \"ws://\"+(ipv6AddSBracket?\"[\"+host+\"]\":host)+\":\"+port+path;\n\t\t\t}\n\n\t\t\tvar clientIdLength = 0;\n\t\t\tfor (var i = 0; i 65535)\n\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT, [clientId, \"clientId\"]));\n\n\t\t\tvar client = new ClientImpl(uri, host, port, path, clientId);\n\n\t\t\t//Public Properties\n\t\t\tObject.defineProperties(this,{\n\t\t\t\t\"host\":{\n\t\t\t\t\tget: function() { return host; },\n\t\t\t\t\tset: function() { throw new Error(format(ERROR.UNSUPPORTED_OPERATION)); }\n\t\t\t\t},\n\t\t\t\t\"port\":{\n\t\t\t\t\tget: function() { return port; },\n\t\t\t\t\tset: function() { throw new Error(format(ERROR.UNSUPPORTED_OPERATION)); }\n\t\t\t\t},\n\t\t\t\t\"path\":{\n\t\t\t\t\tget: function() { return path; },\n\t\t\t\t\tset: function() { throw new Error(format(ERROR.UNSUPPORTED_OPERATION)); }\n\t\t\t\t},\n\t\t\t\t\"uri\":{\n\t\t\t\t\tget: function() { return uri; },\n\t\t\t\t\tset: function() { throw new Error(format(ERROR.UNSUPPORTED_OPERATION)); }\n\t\t\t\t},\n\t\t\t\t\"clientId\":{\n\t\t\t\t\tget: function() { return client.clientId; },\n\t\t\t\t\tset: function() { throw new Error(format(ERROR.UNSUPPORTED_OPERATION)); }\n\t\t\t\t},\n\t\t\t\t\"onConnected\":{\n\t\t\t\t\tget: function() { return client.onConnected; },\n\t\t\t\t\tset: function(newOnConnected) {\n\t\t\t\t\t\tif (typeof newOnConnected === \"function\")\n\t\t\t\t\t\t\tclient.onConnected = newOnConnected;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_TYPE, [typeof newOnConnected, \"onConnected\"]));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"disconnectedPublishing\":{\n\t\t\t\t\tget: function() { return client.disconnectedPublishing; },\n\t\t\t\t\tset: function(newDisconnectedPublishing) {\n\t\t\t\t\t\tclient.disconnectedPublishing = newDisconnectedPublishing;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"disconnectedBufferSize\":{\n\t\t\t\t\tget: function() { return client.disconnectedBufferSize; },\n\t\t\t\t\tset: function(newDisconnectedBufferSize) {\n\t\t\t\t\t\tclient.disconnectedBufferSize = newDisconnectedBufferSize;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"onConnectionLost\":{\n\t\t\t\t\tget: function() { return client.onConnectionLost; },\n\t\t\t\t\tset: function(newOnConnectionLost) {\n\t\t\t\t\t\tif (typeof newOnConnectionLost === \"function\")\n\t\t\t\t\t\t\tclient.onConnectionLost = newOnConnectionLost;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_TYPE, [typeof newOnConnectionLost, \"onConnectionLost\"]));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"onMessageDelivered\":{\n\t\t\t\t\tget: function() { return client.onMessageDelivered; },\n\t\t\t\t\tset: function(newOnMessageDelivered) {\n\t\t\t\t\t\tif (typeof newOnMessageDelivered === \"function\")\n\t\t\t\t\t\t\tclient.onMessageDelivered = newOnMessageDelivered;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_TYPE, [typeof newOnMessageDelivered, \"onMessageDelivered\"]));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"onMessageArrived\":{\n\t\t\t\t\tget: function() { return client.onMessageArrived; },\n\t\t\t\t\tset: function(newOnMessageArrived) {\n\t\t\t\t\t\tif (typeof newOnMessageArrived === \"function\")\n\t\t\t\t\t\t\tclient.onMessageArrived = newOnMessageArrived;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_TYPE, [typeof newOnMessageArrived, \"onMessageArrived\"]));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"trace\":{\n\t\t\t\t\tget: function() { return client.traceFunction; },\n\t\t\t\t\tset: function(trace) {\n\t\t\t\t\t\tif(typeof trace === \"function\"){\n\t\t\t\t\t\t\tclient.traceFunction = trace;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_TYPE, [typeof trace, \"onTrace\"]));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t});\n\n\t\t\t/**\n\t\t * Connect this Messaging client to its server.\n\t\t *\n\t\t * @name Paho.Client#connect\n\t\t * @function\n\t\t * @param {object} connectOptions - Attributes used with the connection.\n\t\t * @param {number} connectOptions.timeout - If the connect has not succeeded within this\n\t\t * number of seconds, it is deemed to have failed.\n\t\t * The default is 30 seconds.\n\t\t * @param {string} connectOptions.userName - Authentication username for this connection.\n\t\t * @param {string} connectOptions.password - Authentication password for this connection.\n\t\t * @param {Paho.Message} connectOptions.willMessage - sent by the server when the client\n\t\t * disconnects abnormally.\n\t\t * @param {number} connectOptions.keepAliveInterval - the server disconnects this client if\n\t\t * there is no activity for this number of seconds.\n\t\t * The default value of 60 seconds is assumed if not set.\n\t\t * @param {boolean} connectOptions.cleanSession - if true(default) the client and server\n\t\t * persistent state is deleted on successful connect.\n\t\t * @param {boolean} connectOptions.useSSL - if present and true, use an SSL Websocket connection.\n\t\t * @param {object} connectOptions.invocationContext - passed to the onSuccess callback or onFailure callback.\n\t\t * @param {function} connectOptions.onSuccess - called when the connect acknowledgement\n\t\t * has been received from the server.\n\t\t * A single response object parameter is passed to the onSuccess callback containing the following fields:\n\t\t *
    \n\t\t *
  1. invocationContext as passed in to the onSuccess method in the connectOptions.\n\t\t *
\n\t * @param {function} connectOptions.onFailure - called when the connect request has failed or timed out.\n\t\t * A single response object parameter is passed to the onFailure callback containing the following fields:\n\t\t *
    \n\t\t *
  1. invocationContext as passed in to the onFailure method in the connectOptions.\n\t\t *
  2. errorCode a number indicating the nature of the error.\n\t\t *
  3. errorMessage text describing the error.\n\t\t *
\n\t * @param {array} connectOptions.hosts - If present this contains either a set of hostnames or fully qualified\n\t\t * WebSocket URIs (ws://iot.eclipse.org:80/ws), that are tried in order in place\n\t\t * of the host and port paramater on the construtor. The hosts are tried one at at time in order until\n\t\t * one of then succeeds.\n\t * @param {array} connectOptions.ports - If present the set of ports matching the hosts. If hosts contains URIs, this property\n\t\t * is not used.\n\t * @param {boolean} connectOptions.reconnect - Sets whether the client will automatically attempt to reconnect\n\t * to the server if the connection is lost.\n\t *
    \n\t *
  • If set to false, the client will not attempt to automatically reconnect to the server in the event that the\n\t * connection is lost.
  • \n\t *
  • If set to true, in the event that the connection is lost, the client will attempt to reconnect to the server.\n\t * It will initially wait 1 second before it attempts to reconnect, for every failed reconnect attempt, the delay\n\t * will double until it is at 2 minutes at which point the delay will stay at 2 minutes.
  • \n\t *
\n\t * @param {number} connectOptions.mqttVersion - The version of MQTT to use to connect to the MQTT Broker.\n\t *
    \n\t *
  • 3 - MQTT V3.1
  • \n\t *
  • 4 - MQTT V3.1.1
  • \n\t *
\n\t * @param {boolean} connectOptions.mqttVersionExplicit - If set to true, will force the connection to use the\n\t * selected MQTT Version or will fail to connect.\n\t * @param {array} connectOptions.uris - If present, should contain a list of fully qualified WebSocket uris\n\t * (e.g. ws://iot.eclipse.org:80/ws), that are tried in order in place of the host and port parameter of the construtor.\n\t * The uris are tried one at a time in order until one of them succeeds. Do not use this in conjunction with hosts as\n\t * the hosts array will be converted to uris and will overwrite this property.\n\t\t * @throws {InvalidState} If the client is not in disconnected state. The client must have received connectionLost\n\t\t * or disconnected before calling connect for a second or subsequent time.\n\t\t */\n\t\t\tthis.connect = function (connectOptions) {\n\t\t\t\tconnectOptions = connectOptions || {} ;\n\t\t\t\tvalidate(connectOptions, {timeout:\"number\",\n\t\t\t\t\tuserName:\"string\",\n\t\t\t\t\tpassword:\"string\",\n\t\t\t\t\twillMessage:\"object\",\n\t\t\t\t\tkeepAliveInterval:\"number\",\n\t\t\t\t\tcleanSession:\"boolean\",\n\t\t\t\t\tuseSSL:\"boolean\",\n\t\t\t\t\tinvocationContext:\"object\",\n\t\t\t\t\tonSuccess:\"function\",\n\t\t\t\t\tonFailure:\"function\",\n\t\t\t\t\thosts:\"object\",\n\t\t\t\t\tports:\"object\",\n\t\t\t\t\treconnect:\"boolean\",\n\t\t\t\t\tmqttVersion:\"number\",\n\t\t\t\t\tmqttVersionExplicit:\"boolean\",\n\t\t\t\t\turis: \"object\"});\n\n\t\t\t\t// If no keep alive interval is set, assume 60 seconds.\n\t\t\t\tif (connectOptions.keepAliveInterval === undefined)\n\t\t\t\t\tconnectOptions.keepAliveInterval = 60;\n\n\t\t\t\tif (connectOptions.mqttVersion > 4 || connectOptions.mqttVersion < 3) {\n\t\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT, [connectOptions.mqttVersion, \"connectOptions.mqttVersion\"]));\n\t\t\t\t}\n\n\t\t\t\tif (connectOptions.mqttVersion === undefined) {\n\t\t\t\t\tconnectOptions.mqttVersionExplicit = false;\n\t\t\t\t\tconnectOptions.mqttVersion = 4;\n\t\t\t\t} else {\n\t\t\t\t\tconnectOptions.mqttVersionExplicit = true;\n\t\t\t\t}\n\n\t\t\t\t//Check that if password is set, so is username\n\t\t\t\tif (connectOptions.password !== undefined && connectOptions.userName === undefined)\n\t\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT, [connectOptions.password, \"connectOptions.password\"]));\n\n\t\t\t\tif (connectOptions.willMessage) {\n\t\t\t\t\tif (!(connectOptions.willMessage instanceof Message))\n\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_TYPE, [connectOptions.willMessage, \"connectOptions.willMessage\"]));\n\t\t\t\t\t// The will message must have a payload that can be represented as a string.\n\t\t\t\t\t// Cause the willMessage to throw an exception if this is not the case.\n\t\t\t\t\tconnectOptions.willMessage.stringPayload = null;\n\n\t\t\t\t\tif (typeof connectOptions.willMessage.destinationName === \"undefined\")\n\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_TYPE, [typeof connectOptions.willMessage.destinationName, \"connectOptions.willMessage.destinationName\"]));\n\t\t\t\t}\n\t\t\t\tif (typeof connectOptions.cleanSession === \"undefined\")\n\t\t\t\t\tconnectOptions.cleanSession = true;\n\t\t\t\tif (connectOptions.hosts) {\n\n\t\t\t\t\tif (!(connectOptions.hosts instanceof Array) )\n\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT, [connectOptions.hosts, \"connectOptions.hosts\"]));\n\t\t\t\t\tif (connectOptions.hosts.length <1 )\n\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT, [connectOptions.hosts, \"connectOptions.hosts\"]));\n\n\t\t\t\t\tvar usingURIs = false;\n\t\t\t\t\tfor (var i = 0; i\n\t\t * @param {object} subscribeOptions - used to control the subscription\n\t\t *\n\t\t * @param {number} subscribeOptions.qos - the maximum qos of any publications sent\n\t\t * as a result of making this subscription.\n\t\t * @param {object} subscribeOptions.invocationContext - passed to the onSuccess callback\n\t\t * or onFailure callback.\n\t\t * @param {function} subscribeOptions.onSuccess - called when the subscribe acknowledgement\n\t\t * has been received from the server.\n\t\t * A single response object parameter is passed to the onSuccess callback containing the following fields:\n\t\t *
    \n\t\t *
  1. invocationContext if set in the subscribeOptions.\n\t\t *
\n\t\t * @param {function} subscribeOptions.onFailure - called when the subscribe request has failed or timed out.\n\t\t * A single response object parameter is passed to the onFailure callback containing the following fields:\n\t\t *
    \n\t\t *
  1. invocationContext - if set in the subscribeOptions.\n\t\t *
  2. errorCode - a number indicating the nature of the error.\n\t\t *
  3. errorMessage - text describing the error.\n\t\t *
\n\t\t * @param {number} subscribeOptions.timeout - which, if present, determines the number of\n\t\t * seconds after which the onFailure calback is called.\n\t\t * The presence of a timeout does not prevent the onSuccess\n\t\t * callback from being called when the subscribe completes.\n\t\t * @throws {InvalidState} if the client is not in connected state.\n\t\t */\n\t\t\tthis.subscribe = function (filter, subscribeOptions) {\n\t\t\t\tif (typeof filter !== \"string\" && filter.constructor !== Array)\n\t\t\t\t\tthrow new Error(\"Invalid argument:\"+filter);\n\t\t\t\tsubscribeOptions = subscribeOptions || {} ;\n\t\t\t\tvalidate(subscribeOptions, {qos:\"number\",\n\t\t\t\t\tinvocationContext:\"object\",\n\t\t\t\t\tonSuccess:\"function\",\n\t\t\t\t\tonFailure:\"function\",\n\t\t\t\t\ttimeout:\"number\"\n\t\t\t\t});\n\t\t\t\tif (subscribeOptions.timeout && !subscribeOptions.onFailure)\n\t\t\t\t\tthrow new Error(\"subscribeOptions.timeout specified with no onFailure callback.\");\n\t\t\t\tif (typeof subscribeOptions.qos !== \"undefined\" && !(subscribeOptions.qos === 0 || subscribeOptions.qos === 1 || subscribeOptions.qos === 2 ))\n\t\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT, [subscribeOptions.qos, \"subscribeOptions.qos\"]));\n\t\t\t\tclient.subscribe(filter, subscribeOptions);\n\t\t\t};\n\n\t\t/**\n\t\t * Unsubscribe for messages, stop receiving messages sent to destinations described by the filter.\n\t\t *\n\t\t * @name Paho.Client#unsubscribe\n\t\t * @function\n\t\t * @param {string} filter - describing the destinations to receive messages from.\n\t\t * @param {object} unsubscribeOptions - used to control the subscription\n\t\t * @param {object} unsubscribeOptions.invocationContext - passed to the onSuccess callback\n\t\t\t\t\t\t\t\t\t\t\t or onFailure callback.\n\t\t * @param {function} unsubscribeOptions.onSuccess - called when the unsubscribe acknowledgement has been received from the server.\n\t\t * A single response object parameter is passed to the\n\t\t * onSuccess callback containing the following fields:\n\t\t *
    \n\t\t *
  1. invocationContext - if set in the unsubscribeOptions.\n\t\t *
\n\t\t * @param {function} unsubscribeOptions.onFailure called when the unsubscribe request has failed or timed out.\n\t\t * A single response object parameter is passed to the onFailure callback containing the following fields:\n\t\t *
    \n\t\t *
  1. invocationContext - if set in the unsubscribeOptions.\n\t\t *
  2. errorCode - a number indicating the nature of the error.\n\t\t *
  3. errorMessage - text describing the error.\n\t\t *
\n\t\t * @param {number} unsubscribeOptions.timeout - which, if present, determines the number of seconds\n\t\t * after which the onFailure callback is called. The presence of\n\t\t * a timeout does not prevent the onSuccess callback from being\n\t\t * called when the unsubscribe completes\n\t\t * @throws {InvalidState} if the client is not in connected state.\n\t\t */\n\t\t\tthis.unsubscribe = function (filter, unsubscribeOptions) {\n\t\t\t\tif (typeof filter !== \"string\" && filter.constructor !== Array)\n\t\t\t\t\tthrow new Error(\"Invalid argument:\"+filter);\n\t\t\t\tunsubscribeOptions = unsubscribeOptions || {} ;\n\t\t\t\tvalidate(unsubscribeOptions, {invocationContext:\"object\",\n\t\t\t\t\tonSuccess:\"function\",\n\t\t\t\t\tonFailure:\"function\",\n\t\t\t\t\ttimeout:\"number\"\n\t\t\t\t});\n\t\t\t\tif (unsubscribeOptions.timeout && !unsubscribeOptions.onFailure)\n\t\t\t\t\tthrow new Error(\"unsubscribeOptions.timeout specified with no onFailure callback.\");\n\t\t\t\tclient.unsubscribe(filter, unsubscribeOptions);\n\t\t\t};\n\n\t\t\t/**\n\t\t * Send a message to the consumers of the destination in the Message.\n\t\t *\n\t\t * @name Paho.Client#send\n\t\t * @function\n\t\t * @param {string|Paho.Message} topic - mandatory The name of the destination to which the message is to be sent.\n\t\t * \t\t\t\t\t - If it is the only parameter, used as Paho.Message object.\n\t\t * @param {String|ArrayBuffer} payload - The message data to be sent.\n\t\t * @param {number} qos The Quality of Service used to deliver the message.\n\t\t * \t\t
\n\t\t * \t\t\t
0 Best effort (default).\n\t\t * \t\t\t
1 At least once.\n\t\t * \t\t\t
2 Exactly once.\n\t\t * \t\t
\n\t\t * @param {Boolean} retained If true, the message is to be retained by the server and delivered\n\t\t * to both current and future subscriptions.\n\t\t * If false the server only delivers the message to current subscribers, this is the default for new Messages.\n\t\t * A received message has the retained boolean set to true if the message was published\n\t\t * with the retained boolean set to true\n\t\t * and the subscrption was made after the message has been published.\n\t\t * @throws {InvalidState} if the client is not connected.\n\t\t */\n\t\t\tthis.send = function (topic,payload,qos,retained) {\n\t\t\t\tvar message ;\n\n\t\t\t\tif(arguments.length === 0){\n\t\t\t\t\tthrow new Error(\"Invalid argument.\"+\"length\");\n\n\t\t\t\t}else if(arguments.length == 1) {\n\n\t\t\t\t\tif (!(topic instanceof Message) && (typeof topic !== \"string\"))\n\t\t\t\t\t\tthrow new Error(\"Invalid argument:\"+ typeof topic);\n\n\t\t\t\t\tmessage = topic;\n\t\t\t\t\tif (typeof message.destinationName === \"undefined\")\n\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT,[message.destinationName,\"Message.destinationName\"]));\n\t\t\t\t\tclient.send(message);\n\n\t\t\t\t}else {\n\t\t\t\t//parameter checking in Message object\n\t\t\t\t\tmessage = new Message(payload);\n\t\t\t\t\tmessage.destinationName = topic;\n\t\t\t\t\tif(arguments.length >= 3)\n\t\t\t\t\t\tmessage.qos = qos;\n\t\t\t\t\tif(arguments.length >= 4)\n\t\t\t\t\t\tmessage.retained = retained;\n\t\t\t\t\tclient.send(message);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t/**\n\t\t * Publish a message to the consumers of the destination in the Message.\n\t\t * Synonym for Paho.Mqtt.Client#send\n\t\t *\n\t\t * @name Paho.Client#publish\n\t\t * @function\n\t\t * @param {string|Paho.Message} topic - mandatory The name of the topic to which the message is to be published.\n\t\t * \t\t\t\t\t - If it is the only parameter, used as Paho.Message object.\n\t\t * @param {String|ArrayBuffer} payload - The message data to be published.\n\t\t * @param {number} qos The Quality of Service used to deliver the message.\n\t\t * \t\t
\n\t\t * \t\t\t
0 Best effort (default).\n\t\t * \t\t\t
1 At least once.\n\t\t * \t\t\t
2 Exactly once.\n\t\t * \t\t
\n\t\t * @param {Boolean} retained If true, the message is to be retained by the server and delivered\n\t\t * to both current and future subscriptions.\n\t\t * If false the server only delivers the message to current subscribers, this is the default for new Messages.\n\t\t * A received message has the retained boolean set to true if the message was published\n\t\t * with the retained boolean set to true\n\t\t * and the subscrption was made after the message has been published.\n\t\t * @throws {InvalidState} if the client is not connected.\n\t\t */\n\t\t\tthis.publish = function(topic,payload,qos,retained) {\n\t\t\t\tvar message ;\n\n\t\t\t\tif(arguments.length === 0){\n\t\t\t\t\tthrow new Error(\"Invalid argument.\"+\"length\");\n\n\t\t\t\t}else if(arguments.length == 1) {\n\n\t\t\t\t\tif (!(topic instanceof Message) && (typeof topic !== \"string\"))\n\t\t\t\t\t\tthrow new Error(\"Invalid argument:\"+ typeof topic);\n\n\t\t\t\t\tmessage = topic;\n\t\t\t\t\tif (typeof message.destinationName === \"undefined\")\n\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT,[message.destinationName,\"Message.destinationName\"]));\n\t\t\t\t\tclient.send(message);\n\n\t\t\t\t}else {\n\t\t\t\t\t//parameter checking in Message object\n\t\t\t\t\tmessage = new Message(payload);\n\t\t\t\t\tmessage.destinationName = topic;\n\t\t\t\t\tif(arguments.length >= 3)\n\t\t\t\t\t\tmessage.qos = qos;\n\t\t\t\t\tif(arguments.length >= 4)\n\t\t\t\t\t\tmessage.retained = retained;\n\t\t\t\t\tclient.send(message);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t/**\n\t\t * Normal disconnect of this Messaging client from its server.\n\t\t *\n\t\t * @name Paho.Client#disconnect\n\t\t * @function\n\t\t * @throws {InvalidState} if the client is already disconnected.\n\t\t */\n\t\t\tthis.disconnect = function () {\n\t\t\t\tclient.disconnect();\n\t\t\t};\n\n\t\t\t/**\n\t\t * Get the contents of the trace log.\n\t\t *\n\t\t * @name Paho.Client#getTraceLog\n\t\t * @function\n\t\t * @return {Object[]} tracebuffer containing the time ordered trace records.\n\t\t */\n\t\t\tthis.getTraceLog = function () {\n\t\t\t\treturn client.getTraceLog();\n\t\t\t};\n\n\t\t\t/**\n\t\t * Start tracing.\n\t\t *\n\t\t * @name Paho.Client#startTrace\n\t\t * @function\n\t\t */\n\t\t\tthis.startTrace = function () {\n\t\t\t\tclient.startTrace();\n\t\t\t};\n\n\t\t\t/**\n\t\t * Stop tracing.\n\t\t *\n\t\t * @name Paho.Client#stopTrace\n\t\t * @function\n\t\t */\n\t\t\tthis.stopTrace = function () {\n\t\t\t\tclient.stopTrace();\n\t\t\t};\n\n\t\t\tthis.isConnected = function() {\n\t\t\t\treturn client.connected;\n\t\t\t};\n\t\t};\n\n\t\t/**\n\t * An application message, sent or received.\n\t *

\n\t * All attributes may be null, which implies the default values.\n\t *\n\t * @name Paho.Message\n\t * @constructor\n\t * @param {String|ArrayBuffer} payload The message data to be sent.\n\t *

\n\t * @property {string} payloadString read only The payload as a string if the payload consists of valid UTF-8 characters.\n\t * @property {ArrayBuffer} payloadBytes read only The payload as an ArrayBuffer.\n\t *

\n\t * @property {string} destinationName mandatory The name of the destination to which the message is to be sent\n\t * (for messages about to be sent) or the name of the destination from which the message has been received.\n\t * (for messages received by the onMessage function).\n\t *

\n\t * @property {number} qos The Quality of Service used to deliver the message.\n\t *

\n\t *
0 Best effort (default).\n\t *
1 At least once.\n\t *
2 Exactly once.\n\t *
\n\t *

\n\t * @property {Boolean} retained If true, the message is to be retained by the server and delivered\n\t * to both current and future subscriptions.\n\t * If false the server only delivers the message to current subscribers, this is the default for new Messages.\n\t * A received message has the retained boolean set to true if the message was published\n\t * with the retained boolean set to true\n\t * and the subscrption was made after the message has been published.\n\t *

\n\t * @property {Boolean} duplicate read only If true, this message might be a duplicate of one which has already been received.\n\t * This is only set on messages received from the server.\n\t *\n\t */\n\t\tvar Message = function (newPayload) {\n\t\t\tvar payload;\n\t\t\tif ( typeof newPayload === \"string\" ||\n\t\tnewPayload instanceof ArrayBuffer ||\n\t\t(ArrayBuffer.isView(newPayload) && !(newPayload instanceof DataView))\n\t\t\t) {\n\t\t\t\tpayload = newPayload;\n\t\t\t} else {\n\t\t\t\tthrow (format(ERROR.INVALID_ARGUMENT, [newPayload, \"newPayload\"]));\n\t\t\t}\n\n\t\t\tvar destinationName;\n\t\t\tvar qos = 0;\n\t\t\tvar retained = false;\n\t\t\tvar duplicate = false;\n\n\t\t\tObject.defineProperties(this,{\n\t\t\t\t\"payloadString\":{\n\t\t\t\t\tenumerable : true,\n\t\t\t\t\tget : function () {\n\t\t\t\t\t\tif (typeof payload === \"string\")\n\t\t\t\t\t\t\treturn payload;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\treturn parseUTF8(payload, 0, payload.length);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"payloadBytes\":{\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tget: function() {\n\t\t\t\t\t\tif (typeof payload === \"string\") {\n\t\t\t\t\t\t\tvar buffer = new ArrayBuffer(UTF8Length(payload));\n\t\t\t\t\t\t\tvar byteStream = new Uint8Array(buffer);\n\t\t\t\t\t\t\tstringToUTF8(payload, byteStream, 0);\n\n\t\t\t\t\t\t\treturn byteStream;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn payload;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"destinationName\":{\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tget: function() { return destinationName; },\n\t\t\t\t\tset: function(newDestinationName) {\n\t\t\t\t\t\tif (typeof newDestinationName === \"string\")\n\t\t\t\t\t\t\tdestinationName = newDestinationName;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT, [newDestinationName, \"newDestinationName\"]));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"qos\":{\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tget: function() { return qos; },\n\t\t\t\t\tset: function(newQos) {\n\t\t\t\t\t\tif (newQos === 0 || newQos === 1 || newQos === 2 )\n\t\t\t\t\t\t\tqos = newQos;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthrow new Error(\"Invalid argument:\"+newQos);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"retained\":{\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tget: function() { return retained; },\n\t\t\t\t\tset: function(newRetained) {\n\t\t\t\t\t\tif (typeof newRetained === \"boolean\")\n\t\t\t\t\t\t\tretained = newRetained;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT, [newRetained, \"newRetained\"]));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"topic\":{\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tget: function() { return destinationName; },\n\t\t\t\t\tset: function(newTopic) {destinationName=newTopic;}\n\t\t\t\t},\n\t\t\t\t\"duplicate\":{\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tget: function() { return duplicate; },\n\t\t\t\t\tset: function(newDuplicate) {duplicate=newDuplicate;}\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\t// Module contents.\n\t\treturn {\n\t\t\tClient: Client,\n\t\t\tMessage: Message\n\t\t};\n\t// eslint-disable-next-line no-nested-ternary\n\t})(typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n\treturn PahoMQTT;\n});\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar gOPD = require('gopd');\n\nvar $TypeError = require('es-errors/type');\nvar $floor = GetIntrinsic('%Math.floor%');\n\n/** @type {import('.')} */\nmodule.exports = function setFunctionLength(fn, length) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tif (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {\n\t\tthrow new $TypeError('`length` must be a positive 32-bit integer');\n\t}\n\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\n\tvar functionLengthIsConfigurable = true;\n\tvar functionLengthIsWritable = true;\n\tif ('length' in fn && gOPD) {\n\t\tvar desc = gOPD(fn, 'length');\n\t\tif (desc && !desc.configurable) {\n\t\t\tfunctionLengthIsConfigurable = false;\n\t\t}\n\t\tif (desc && !desc.writable) {\n\t\t\tfunctionLengthIsWritable = false;\n\t\t}\n\t}\n\n\tif (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(/** @type {Parameters[0]} */ (fn), 'length', length, true, true);\n\t\t} else {\n\t\t\tdefine(/** @type {Parameters[0]} */ (fn), 'length', length);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = require('es-errors/type');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n* This function traverses the list returning the node corresponding to the given key.\n*\n* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. By doing so, all the recently used nodes can be accessed relatively quickly.\n*/\n/** @type {import('.').listGetNode} */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\t/** @type {typeof list | NonNullable<(typeof list)['next']>} */\n\tvar prev = list;\n\t/** @type {(typeof list)['next']} */\n\tvar curr;\n\tfor (; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\t// eslint-disable-next-line no-extra-parens\n\t\t\tcurr.next = /** @type {NonNullable} */ (list.next);\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\n/** @type {import('.').listGet} */\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\n/** @type {import('.').listSet} */\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = /** @type {import('.').ListNode} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t});\n\t}\n};\n/** @type {import('.').listHas} */\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\n/** @type {import('.')} */\nmodule.exports = function getSideChannel() {\n\t/** @type {WeakMap} */ var $wm;\n\t/** @type {Map} */ var $m;\n\t/** @type {import('.').RootNode} */ var $o;\n\n\t/** @type {import('.').Channel} */\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t// Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n"],"names":["exports","read","buffer","offset","isLE","mLen","nBytes","e","m","eLen","eMax","eBias","nBits","i","d","s","NaN","Infinity","Math","pow","write","value","c","rt","abs","isNaN","floor","log","LN2","toString","module","Array","isArray","arr","call","self","fetch","hasMap","Map","prototype","mapSizeDescriptor","Object","getOwnPropertyDescriptor","mapSize","get","mapForEach","forEach","hasSet","Set","setSizeDescriptor","setSize","setForEach","hasWeakMap","WeakMap","weakMapHas","has","hasWeakSet","WeakSet","weakSetHas","hasWeakRef","WeakRef","weakRefDeref","deref","booleanValueOf","Boolean","valueOf","objectToString","functionToString","Function","$match","String","match","$slice","slice","$replace","replace","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","RegExp","test","$concat","concat","$join","join","$arrSlice","$floor","bigIntValueOf","BigInt","gOPS","getOwnPropertySymbols","symToString","Symbol","iterator","hasShammedSymbols","toStringTag","isEnumerable","propertyIsEnumerable","gPO","Reflect","getPrototypeOf","__proto__","O","addNumericSeparator","num","str","sepRegex","int","intStr","dec","length","utilInspect","inspectCustom","custom","inspectSymbol","isSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","quote","obj","toStr","isDate","isRegExp","isError","isString","isNumber","isBoolean","isBigInt","inspect_","options","depth","seen","TypeError","maxStringLength","customInspect","indent","parseInt","numericSeparator","inspectString","bigIntStr","maxDepth","getIndent","indexOf","inspect","from","noIndent","push","newOpts","name","nameOf","keys","arrObjKeys","symString","markBoxed","isElement","nodeName","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","parts","Error","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","Number","window","globalThis","g","ys","isPlainObject","constructor","protoTag","stringTag","constructorTag","tag","hasOwn","hasOwnProperty","this","f","x","l","HTMLElement","getAttribute","remaining","trailer","lowbyte","n","charCodeAt","type","size","entries","joinedEntries","baseIndent","base","prev","lineJoiner","isArr","symMap","syms","k","j","root","factory","PahoMQTT","global","version","localStorage","data","setItem","item","getItem","removeItem","MESSAGE_TYPE","CONNECT","CONNACK","PUBLISH","PUBACK","PUBREC","PUBREL","PUBCOMP","SUBSCRIBE","SUBACK","UNSUBSCRIBE","UNSUBACK","PINGREQ","PINGRESP","DISCONNECT","validate","errorStr","validKey","format","ERROR","INVALID_TYPE","scope","apply","arguments","OK","code","text","CONNECT_TIMEOUT","SUBSCRIBE_TIMEOUT","UNSUBSCRIBE_TIMEOUT","PING_TIMEOUT","INTERNAL_ERROR","CONNACK_RETURNCODE","SOCKET_ERROR","SOCKET_CLOSE","MALFORMED_UTF","UNSUPPORTED","INVALID_STATE","INVALID_ARGUMENT","UNSUPPORTED_OPERATION","INVALID_STORED_DATA","INVALID_MQTT_MESSAGE_TYPE","MALFORMED_UNICODE","BUFFER_FULL","CONNACK_RC","error","substitutions","field","start","part1","substring","part2","MqttProtoIdentifierv3","MqttProtoIdentifierv4","WireMessage","decodeMessage","input","pos","digit","startingPos","first","messageInfo","remLength","multiplier","endPos","wireMessage","connectAcknowledgeFlags","sessionPresent","returnCode","qos","len","readUint16","topicName","parseUTF8","messageIdentifier","message","Message","subarray","retained","duplicate","destinationName","payloadMessage","writeUint16","writeString","utf8Length","stringToUTF8","encodeMBI","number","output","numBytes","UTF8Length","charCode","lowCharCode","utf16","byte1","byte2","byte3","byte4","fromCharCode","encode","willMessagePayloadBytes","topicStrLength","destinationNameLength","undefined","mqttVersion","clientId","willMessage","payloadBytes","Uint8Array","byteLength","userName","password","topics","requestedQos","ArrayBuffer","mbi","byteStream","set","connectFlags","cleanSession","keepAliveInterval","Pinger","client","_client","_keepAliveInterval","isReset","pingReq","doTimeout","pinger","doPing","_trace","socket","send","timeout","setTimeout","_disconnected","reset","clearTimeout","cancel","Timeout","timeoutSeconds","action","args","ClientImpl","uri","host","port","path","WebSocket","_wsuri","_localKey","_msg_queue","_buffered_msg_queue","_sentMessages","_receivedMessages","_notify_msg_sent","_message_identifier","_sequence","restore","connected","maxMessageIdentifier","connectOptions","hostIndex","onConnected","onConnectionLost","onMessageDelivered","onMessageArrived","traceFunction","_connectTimeout","sendPinger","receivePinger","_reconnectInterval","_reconnecting","_reconnectTimeout","disconnectedPublishing","disconnectedBufferSize","receiveBuffer","_traceBuffer","_MAX_TRACE_ENTRIES","connect","connectOptionsMasked","_traceMask","uris","_doConnect","subscribe","filter","subscribeOptions","onSuccess","grantedQos","invocationContext","onFailure","errorCode","errorMessage","timeOut","_requires_ack","_schedule_message","unsubscribe","unsubscribeOptions","callback","messageCount","sequence","unshift","disconnect","getTraceLog","Date","startTrace","stopTrace","wsurl","useSSL","uriParts","split","binaryType","onopen","_on_socket_open","onmessage","_on_socket_message","onerror","_on_socket_error","onclose","_on_socket_close","_process_queue","store","prefix","storedMessage","pubRecReceived","hex","messageBytes","payloadHex","JSON","stringify","parse","pop","_socket_send","event","messages","_deframeMessages","_handleMessage","byteArray","newData","result","errorStack","stack","sentMessage","receivedMessage","sequencedMessages","msgId","msg","sort","a","b","pubRelMessage","reconnected","_connected","_receivePublish","_receiveMessage","pubCompMessage","wireMessageMasked","pubAckMessage","pubRecMessage","reconnect","_reconnect","errorText","readyState","close","mqttVersionExplicit","splice","record","severity","max","shift","traceObject","masked","traceObjectMasked","attr","Client","ipv6AddSBracket","clientIdLength","defineProperties","newOnConnected","newDisconnectedPublishing","newDisconnectedBufferSize","newOnConnectionLost","newOnMessageDelivered","newOnMessageArrived","trace","hosts","ports","stringPayload","usingURIs","ipv6","topic","payload","publish","isConnected","newPayload","isView","DataView","enumerable","newDestinationName","newQos","newRetained","newTopic","newDuplicate","GetIntrinsic","define","hasDescriptors","gOPD","$TypeError","fn","loose","functionLengthIsConfigurable","functionLengthIsWritable","desc","configurable","writable","callBound","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","listGet","objects","node","listSet","listHas","$wm","$m","$o","channel","assert"],"sourceRoot":""}