From 5ad813100706e0ff333c5f39b56a9e01419af938 Mon Sep 17 00:00:00 2001 From: Edward Choi Date: Wed, 16 Mar 2022 19:45:22 -0700 Subject: [PATCH] Add dist to gitignore (#157) --- .gitignore | 1 + dist/main.js | 409 --------------------------------------------------- 2 files changed, 1 insertion(+), 409 deletions(-) delete mode 100644 dist/main.js diff --git a/.gitignore b/.gitignore index 00232510..49206379 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ node_modules # Dawn build build/ dawn-packaged/ +dist/ diff --git a/dist/main.js b/dist/main.js deleted file mode 100644 index 966ebfcc..00000000 --- a/dist/main.js +++ /dev/null @@ -1,409 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = "./fake-runtime/FakeRuntime.ts"); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "./fake-runtime/FakeRuntime.ts": -/*!*************************************!*\ - !*** ./fake-runtime/FakeRuntime.ts ***! - \*************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony import */ var _protos_main__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../protos-main */ \"./protos-main/index.ts\");\n/* harmony import */ var net__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! net */ \"./node_modules/node-libs-browser/mock/empty.js\");\n/* harmony import */ var net__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(net__WEBPACK_IMPORTED_MODULE_1__);\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\r\n/*\r\n * Fake Runtime is run as a child-process of the rest of the application.\r\n * See DebugMenu.js for handling FakeRuntime within Dawn.\r\n */\r\n/* eslint-disable camelcase */\r\n\r\n\r\nconst TCP_PORT = 8101;\r\nconst MSG_INTERVAL_MSEC = 50;\r\nconst randomFloat = (min, max) => (max - min) * Math.random() + min;\r\nconst sensor = (name, type, params, uid) => ({\r\n name,\r\n type,\r\n params,\r\n uid\r\n});\r\nconst param = (name, type, value) => ({\r\n // eslint-disable-line no-shadow\r\n name,\r\n fval: type === 'float' ? value : undefined,\r\n ival: type === 'int' ? value : undefined,\r\n bval: type === 'bool' ? value : undefined,\r\n});\r\nconst print = (output) => {\r\n console.log(`Fake Runtime: ${output}`);\r\n};\r\nclass FakeRuntime {\r\n constructor() {\r\n this.generateFakeData = () => {\r\n return {\r\n devices: [\r\n sensor('MOTOR_SCALAR', 0, [param('Val', 'float', randomFloat(-100, 100))], 100),\r\n sensor('MOTOR_SCALAR', 0, [param('Val', 'float', randomFloat(-100, 100))], 101),\r\n sensor('LimitSwitch', 3, [param('Val', 'int', Math.round(randomFloat(0, 1)))], 102),\r\n sensor('SENSOR_SCALAR', 2, [param('Val', 'float', randomFloat(-100, 100))], 103),\r\n sensor('SENSOR_SCALAR', 2, [\r\n param('Val 1', 'float', randomFloat(-100, 100)),\r\n param('Val 2', 'float', randomFloat(-100, 100)),\r\n param('Val 3', 'float', randomFloat(-100, 100))\r\n ], 104),\r\n sensor('SENSOR_BOOLEAN', 1, [param('Val', 'bool', Math.random() < 0.5)], 105),\r\n ]\r\n };\r\n };\r\n this.sendDeviceData = (socket) => {\r\n const fakeData = this.generateFakeData();\r\n const encodedPayload = _protos_main__WEBPACK_IMPORTED_MODULE_0__[\"DevData\"].encode(fakeData).finish();\r\n const msgLength = Buffer.byteLength(encodedPayload);\r\n const msgLengthArr = new Uint8Array([msgLength & 0x00ff, msgLength & 0xff00]); // Assuming little-endian byte order, since runs on x64\r\n const msgTypeArr = new Uint8Array([3]); // msg type 3 for DevData\r\n const packet = Buffer.concat([msgTypeArr, msgLengthArr, encodedPayload], msgLength + 3);\r\n socket.write(packet, (err) => {\r\n if (err !== undefined) {\r\n console.log('Err', err);\r\n }\r\n });\r\n // TODO: Handle TCP writes to console\r\n };\r\n this.tcpServer = Object(net__WEBPACK_IMPORTED_MODULE_1__[\"createServer\"])((_c) => {\r\n print('client connected');\r\n });\r\n this.tcpServer.listen(TCP_PORT, () => {\r\n print('server bound');\r\n });\r\n this.tcpServer.on('connection', (socket) => {\r\n setInterval(() => this.sendDeviceData(socket), MSG_INTERVAL_MSEC);\r\n });\r\n }\r\n}\r\nnew FakeRuntime();\r\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node_modules/buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack:///./fake-runtime/FakeRuntime.ts?"); - -/***/ }), - -/***/ "./node_modules/@protobufjs/aspromise/index.js": -/*!*****************************************************!*\ - !*** ./node_modules/@protobufjs/aspromise/index.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/@protobufjs/aspromise/index.js?"); - -/***/ }), - -/***/ "./node_modules/@protobufjs/base64/index.js": -/*!**************************************************!*\ - !*** ./node_modules/@protobufjs/base64/index.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/@protobufjs/base64/index.js?"); - -/***/ }), - -/***/ "./node_modules/@protobufjs/eventemitter/index.js": -/*!********************************************************!*\ - !*** ./node_modules/@protobufjs/eventemitter/index.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/@protobufjs/eventemitter/index.js?"); - -/***/ }), - -/***/ "./node_modules/@protobufjs/float/index.js": -/*!*************************************************!*\ - !*** ./node_modules/@protobufjs/float/index.js ***! - \*************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/@protobufjs/float/index.js?"); - -/***/ }), - -/***/ "./node_modules/@protobufjs/inquire/index.js": -/*!***************************************************!*\ - !*** ./node_modules/@protobufjs/inquire/index.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/@protobufjs/inquire/index.js?"); - -/***/ }), - -/***/ "./node_modules/@protobufjs/pool/index.js": -/*!************************************************!*\ - !*** ./node_modules/@protobufjs/pool/index.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/@protobufjs/pool/index.js?"); - -/***/ }), - -/***/ "./node_modules/@protobufjs/utf8/index.js": -/*!************************************************!*\ - !*** ./node_modules/@protobufjs/utf8/index.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports;\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null,\r\n chunk = [],\r\n i = 0, // char offset\r\n t; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128)\r\n chunk[i++] = t;\r\n else if (t > 191 && t < 224)\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n } else\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/@protobufjs/utf8/index.js?"); - -/***/ }), - -/***/ "./node_modules/base64-js/index.js": -/*!*****************************************!*\ - !*** ./node_modules/base64-js/index.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n for (var i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n\n//# sourceURL=webpack:///./node_modules/base64-js/index.js?"); - -/***/ }), - -/***/ "./node_modules/buffer/index.js": -/*!**************************************!*\ - !*** ./node_modules/buffer/index.js ***! - \**************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("/* WEBPACK VAR INJECTION */(function(global) {/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\n\nvar base64 = __webpack_require__(/*! base64-js */ \"./node_modules/base64-js/index.js\")\nvar ieee754 = __webpack_require__(/*! ieee754 */ \"./node_modules/ieee754/index.js\")\nvar isArray = __webpack_require__(/*! isarray */ \"./node_modules/isarray/index.js\")\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/buffer/index.js?"); - -/***/ }), - -/***/ "./node_modules/ieee754/index.js": -/*!***************************************!*\ - !*** ./node_modules/ieee754/index.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("exports.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\n\n//# sourceURL=webpack:///./node_modules/ieee754/index.js?"); - -/***/ }), - -/***/ "./node_modules/isarray/index.js": -/*!***************************************!*\ - !*** ./node_modules/isarray/index.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n//# sourceURL=webpack:///./node_modules/isarray/index.js?"); - -/***/ }), - -/***/ "./node_modules/node-libs-browser/mock/empty.js": -/*!******************************************************!*\ - !*** ./node_modules/node-libs-browser/mock/empty.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("\n\n//# sourceURL=webpack:///./node_modules/node-libs-browser/mock/empty.js?"); - -/***/ }), - -/***/ "./node_modules/protobufjs/minimal.js": -/*!********************************************!*\ - !*** ./node_modules/protobufjs/minimal.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// minimal library entry point.\n\n\nmodule.exports = __webpack_require__(/*! ./src/index-minimal */ \"./node_modules/protobufjs/src/index-minimal.js\");\n\n\n//# sourceURL=webpack:///./node_modules/protobufjs/minimal.js?"); - -/***/ }), - -/***/ "./node_modules/protobufjs/src/index-minimal.js": -/*!******************************************************!*\ - !*** ./node_modules/protobufjs/src/index-minimal.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = __webpack_require__(/*! ./writer */ \"./node_modules/protobufjs/src/writer.js\");\nprotobuf.BufferWriter = __webpack_require__(/*! ./writer_buffer */ \"./node_modules/protobufjs/src/writer_buffer.js\");\nprotobuf.Reader = __webpack_require__(/*! ./reader */ \"./node_modules/protobufjs/src/reader.js\");\nprotobuf.BufferReader = __webpack_require__(/*! ./reader_buffer */ \"./node_modules/protobufjs/src/reader_buffer.js\");\n\n// Utility\nprotobuf.util = __webpack_require__(/*! ./util/minimal */ \"./node_modules/protobufjs/src/util/minimal.js\");\nprotobuf.rpc = __webpack_require__(/*! ./rpc */ \"./node_modules/protobufjs/src/rpc.js\");\nprotobuf.roots = __webpack_require__(/*! ./roots */ \"./node_modules/protobufjs/src/roots.js\");\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n\n\n//# sourceURL=webpack:///./node_modules/protobufjs/src/index-minimal.js?"); - -/***/ }), - -/***/ "./node_modules/protobufjs/src/reader.js": -/*!***********************************************!*\ - !*** ./node_modules/protobufjs/src/reader.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\nmodule.exports = Reader;\n\nvar util = __webpack_require__(/*! ./util/minimal */ \"./node_modules/protobufjs/src/util/minimal.js\");\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\n ? new this.buf.constructor(0)\n : this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType) {\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n\n\n//# sourceURL=webpack:///./node_modules/protobufjs/src/reader.js?"); - -/***/ }), - -/***/ "./node_modules/protobufjs/src/reader_buffer.js": -/*!******************************************************!*\ - !*** ./node_modules/protobufjs/src/reader_buffer.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = __webpack_require__(/*! ./reader */ \"./node_modules/protobufjs/src/reader.js\");\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = __webpack_require__(/*! ./util/minimal */ \"./node_modules/protobufjs/src/util/minimal.js\");\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n\n\n//# sourceURL=webpack:///./node_modules/protobufjs/src/reader_buffer.js?"); - -/***/ }), - -/***/ "./node_modules/protobufjs/src/roots.js": -/*!**********************************************!*\ - !*** ./node_modules/protobufjs/src/roots.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available accross modules.\n * @name roots\n * @type {Object.}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n\n\n//# sourceURL=webpack:///./node_modules/protobufjs/src/roots.js?"); - -/***/ }), - -/***/ "./node_modules/protobufjs/src/rpc.js": -/*!********************************************!*\ - !*** ./node_modules/protobufjs/src/rpc.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = __webpack_require__(/*! ./rpc/service */ \"./node_modules/protobufjs/src/rpc/service.js\");\n\n\n//# sourceURL=webpack:///./node_modules/protobufjs/src/rpc.js?"); - -/***/ }), - -/***/ "./node_modules/protobufjs/src/rpc/service.js": -/*!****************************************************!*\ - !*** ./node_modules/protobufjs/src/rpc/service.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\nmodule.exports = Service;\n\nvar util = __webpack_require__(/*! ../util/minimal */ \"./node_modules/protobufjs/src/util/minimal.js\");\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message\n * @template TRes extends Message\n * @type {function}\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {Constructor} requestCtor Request constructor\n * @param {Constructor} responseCtor Response constructor\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message\n * @template TRes extends Message\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n\n\n//# sourceURL=webpack:///./node_modules/protobufjs/src/rpc/service.js?"); - -/***/ }), - -/***/ "./node_modules/protobufjs/src/util/longbits.js": -/*!******************************************************!*\ - !*** ./node_modules/protobufjs/src/util/longbits.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\nmodule.exports = LongBits;\n\nvar util = __webpack_require__(/*! ../util/minimal */ \"./node_modules/protobufjs/src/util/minimal.js\");\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n\n\n//# sourceURL=webpack:///./node_modules/protobufjs/src/util/longbits.js?"); - -/***/ }), - -/***/ "./node_modules/protobufjs/src/util/minimal.js": -/*!*****************************************************!*\ - !*** ./node_modules/protobufjs/src/util/minimal.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("/* WEBPACK VAR INJECTION */(function(global) {\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = __webpack_require__(/*! @protobufjs/aspromise */ \"./node_modules/@protobufjs/aspromise/index.js\");\n\n// converts to / from base64 encoded strings\nutil.base64 = __webpack_require__(/*! @protobufjs/base64 */ \"./node_modules/@protobufjs/base64/index.js\");\n\n// base class of rpc.Service\nutil.EventEmitter = __webpack_require__(/*! @protobufjs/eventemitter */ \"./node_modules/@protobufjs/eventemitter/index.js\");\n\n// float handling accross browsers\nutil.float = __webpack_require__(/*! @protobufjs/float */ \"./node_modules/@protobufjs/float/index.js\");\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = __webpack_require__(/*! @protobufjs/inquire */ \"./node_modules/@protobufjs/inquire/index.js\");\n\n// converts to / from utf8 encoded strings\nutil.utf8 = __webpack_require__(/*! @protobufjs/utf8 */ \"./node_modules/@protobufjs/utf8/index.js\");\n\n// provides a node-like buffer pool in the browser\nutil.pool = __webpack_require__(/*! @protobufjs/pool */ \"./node_modules/@protobufjs/pool/index.js\");\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = __webpack_require__(/*! ./longbits */ \"./node_modules/protobufjs/src/util/longbits.js\");\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.inquire(\"buffer\").Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || util.inquire(\"long\");\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.} dst Destination object\n * @param {Object.} src Source object\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\n * @returns {Object.} Destination object\n */\nfunction merge(dst, src, ifNotSet) { // used by converters\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (dst[keys[i]] === undefined || !ifNotSet)\n dst[keys[i]] = src[keys[i]];\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError;\n\n Object.defineProperty(CustomError.prototype, \"name\", { get: function() { return name; } });\n\n CustomError.prototype.toString = function toString() {\n return this.name + \": \" + this.message;\n };\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message\n * @constructor\n * @param {string} message Error message\n * @param {Object.} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/protobufjs/src/util/minimal.js?"); - -/***/ }), - -/***/ "./node_modules/protobufjs/src/writer.js": -/*!***********************************************!*\ - !*** ./node_modules/protobufjs/src/writer.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\nmodule.exports = Writer;\n\nvar util = __webpack_require__(/*! ./util/minimal */ \"./node_modules/protobufjs/src/util/minimal.js\");\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return value < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n while (val.hi) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\n val.hi >>>= 7;\n }\n while (val.lo > 127) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = val.lo >>> 7;\n }\n buf[pos++] = val.lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n\n\n//# sourceURL=webpack:///./node_modules/protobufjs/src/writer.js?"); - -/***/ }), - -/***/ "./node_modules/protobufjs/src/writer_buffer.js": -/*!******************************************************!*\ - !*** ./node_modules/protobufjs/src/writer_buffer.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = __webpack_require__(/*! ./writer */ \"./node_modules/protobufjs/src/writer.js\");\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = __webpack_require__(/*! ./util/minimal */ \"./node_modules/protobufjs/src/util/minimal.js\");\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n\n\n//# sourceURL=webpack:///./node_modules/protobufjs/src/writer_buffer.js?"); - -/***/ }), - -/***/ "./node_modules/webpack/buildin/global.js": -/*!***********************************!*\ - !*** (webpack)/buildin/global.js ***! - \***********************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack:///(webpack)/buildin/global.js?"); - -/***/ }), - -/***/ "./protos-main/index.ts": -/*!******************************!*\ - !*** ./protos-main/index.ts ***! - \******************************/ -/*! no static exports found */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _protos__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./protos */ \"./protos-main/protos.js\");\n/* harmony import */ var _protos__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_protos__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _protos__WEBPACK_IMPORTED_MODULE_0__) if([\"default\"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _protos__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n\r\n\n\n//# sourceURL=webpack:///./protos-main/index.ts?"); - -/***/ }), - -/***/ "./protos-main/protos.js": -/*!*******************************!*\ - !*** ./protos-main/protos.js ***! - \*******************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.TimeStamps = exports.Text = exports.StartPos = exports.Pos = exports.RuntimeStatus = exports.RunMode = exports.Mode = exports.UserInputs = exports.Input = exports.Source = exports.GameState = exports.State = exports.DevData = exports.Device = exports.Param = undefined;\n\nvar _minimal = __webpack_require__(/*! protobufjs/minimal */ \"./node_modules/protobufjs/minimal.js\");\n\nvar $protobuf = _interopRequireWildcard(_minimal);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\n// Common aliases\nconst $Reader = $protobuf.Reader,\n $Writer = $protobuf.Writer,\n $util = $protobuf.util;\n\n// Exported root namespace\n/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/\nconst $root = $protobuf.roots[\"default\"] || ($protobuf.roots[\"default\"] = {});\n\nconst Param = exports.Param = $root.Param = (() => {\n\n /**\n * Properties of a Param.\n * @exports IParam\n * @interface IParam\n * @property {string|null} [name] Param name\n * @property {number|null} [fval] Param fval\n * @property {number|null} [ival] Param ival\n * @property {boolean|null} [bval] Param bval\n * @property {boolean|null} [readonly] Param readonly\n */\n\n /**\n * Constructs a new Param.\n * @exports Param\n * @classdesc Represents a Param.\n * @implements IParam\n * @constructor\n * @param {IParam=} [properties] Properties to set\n */\n function Param(properties) {\n if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Param name.\n * @member {string} name\n * @memberof Param\n * @instance\n */\n Param.prototype.name = \"\";\n\n /**\n * Param fval.\n * @member {number} fval\n * @memberof Param\n * @instance\n */\n Param.prototype.fval = 0;\n\n /**\n * Param ival.\n * @member {number} ival\n * @memberof Param\n * @instance\n */\n Param.prototype.ival = 0;\n\n /**\n * Param bval.\n * @member {boolean} bval\n * @memberof Param\n * @instance\n */\n Param.prototype.bval = false;\n\n /**\n * Param readonly.\n * @member {boolean} readonly\n * @memberof Param\n * @instance\n */\n Param.prototype.readonly = false;\n\n // OneOf field names bound to virtual getters and setters\n let $oneOfFields;\n\n /**\n * Param val.\n * @member {\"fval\"|\"ival\"|\"bval\"|undefined} val\n * @memberof Param\n * @instance\n */\n Object.defineProperty(Param.prototype, \"val\", {\n get: $util.oneOfGetter($oneOfFields = [\"fval\", \"ival\", \"bval\"]),\n set: $util.oneOfSetter($oneOfFields)\n });\n\n /**\n * Creates a new Param instance using the specified properties.\n * @function create\n * @memberof Param\n * @static\n * @param {IParam=} [properties] Properties to set\n * @returns {Param} Param instance\n */\n Param.create = function create(properties) {\n return new Param(properties);\n };\n\n /**\n * Encodes the specified Param message. Does not implicitly {@link Param.verify|verify} messages.\n * @function encode\n * @memberof Param\n * @static\n * @param {IParam} message Param message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Param.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create();\n if (message.name != null && Object.hasOwnProperty.call(message, \"name\")) writer.uint32( /* id 1, wireType 2 =*/10).string(message.name);\n if (message.fval != null && Object.hasOwnProperty.call(message, \"fval\")) writer.uint32( /* id 2, wireType 5 =*/21).float(message.fval);\n if (message.ival != null && Object.hasOwnProperty.call(message, \"ival\")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.ival);\n if (message.bval != null && Object.hasOwnProperty.call(message, \"bval\")) writer.uint32( /* id 4, wireType 0 =*/32).bool(message.bval);\n if (message.readonly != null && Object.hasOwnProperty.call(message, \"readonly\")) writer.uint32( /* id 5, wireType 0 =*/40).bool(message.readonly);\n return writer;\n };\n\n /**\n * Encodes the specified Param message, length delimited. Does not implicitly {@link Param.verify|verify} messages.\n * @function encodeDelimited\n * @memberof Param\n * @static\n * @param {IParam} message Param message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Param.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Param message from the specified reader or buffer.\n * @function decode\n * @memberof Param\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {Param} Param\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Param.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.Param();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.name = reader.string();\n break;\n case 2:\n message.fval = reader.float();\n break;\n case 3:\n message.ival = reader.int32();\n break;\n case 4:\n message.bval = reader.bool();\n break;\n case 5:\n message.readonly = reader.bool();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Param message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof Param\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {Param} Param\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Param.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Param message.\n * @function verify\n * @memberof Param\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Param.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null) return \"object expected\";\n let properties = {};\n if (message.name != null && message.hasOwnProperty(\"name\")) if (!$util.isString(message.name)) return \"name: string expected\";\n if (message.fval != null && message.hasOwnProperty(\"fval\")) {\n properties.val = 1;\n if (typeof message.fval !== \"number\") return \"fval: number expected\";\n }\n if (message.ival != null && message.hasOwnProperty(\"ival\")) {\n if (properties.val === 1) return \"val: multiple values\";\n properties.val = 1;\n if (!$util.isInteger(message.ival)) return \"ival: integer expected\";\n }\n if (message.bval != null && message.hasOwnProperty(\"bval\")) {\n if (properties.val === 1) return \"val: multiple values\";\n properties.val = 1;\n if (typeof message.bval !== \"boolean\") return \"bval: boolean expected\";\n }\n if (message.readonly != null && message.hasOwnProperty(\"readonly\")) if (typeof message.readonly !== \"boolean\") return \"readonly: boolean expected\";\n return null;\n };\n\n /**\n * Creates a Param message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof Param\n * @static\n * @param {Object.} object Plain object\n * @returns {Param} Param\n */\n Param.fromObject = function fromObject(object) {\n if (object instanceof $root.Param) return object;\n let message = new $root.Param();\n if (object.name != null) message.name = String(object.name);\n if (object.fval != null) message.fval = Number(object.fval);\n if (object.ival != null) message.ival = object.ival | 0;\n if (object.bval != null) message.bval = Boolean(object.bval);\n if (object.readonly != null) message.readonly = Boolean(object.readonly);\n return message;\n };\n\n /**\n * Creates a plain object from a Param message. Also converts values to other types if specified.\n * @function toObject\n * @memberof Param\n * @static\n * @param {Param} message Param\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Param.toObject = function toObject(message, options) {\n if (!options) options = {};\n let object = {};\n if (options.defaults) {\n object.name = \"\";\n object.readonly = false;\n }\n if (message.name != null && message.hasOwnProperty(\"name\")) object.name = message.name;\n if (message.fval != null && message.hasOwnProperty(\"fval\")) {\n object.fval = options.json && !isFinite(message.fval) ? String(message.fval) : message.fval;\n if (options.oneofs) object.val = \"fval\";\n }\n if (message.ival != null && message.hasOwnProperty(\"ival\")) {\n object.ival = message.ival;\n if (options.oneofs) object.val = \"ival\";\n }\n if (message.bval != null && message.hasOwnProperty(\"bval\")) {\n object.bval = message.bval;\n if (options.oneofs) object.val = \"bval\";\n }\n if (message.readonly != null && message.hasOwnProperty(\"readonly\")) object.readonly = message.readonly;\n return object;\n };\n\n /**\n * Converts this Param to JSON.\n * @function toJSON\n * @memberof Param\n * @instance\n * @returns {Object.} JSON object\n */\n Param.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return Param;\n})();\n\nconst Device = exports.Device = $root.Device = (() => {\n\n /**\n * Properties of a Device.\n * @exports IDevice\n * @interface IDevice\n * @property {string|null} [name] Device name\n * @property {number|Long|null} [uid] Device uid\n * @property {number|null} [type] Device type\n * @property {Array.|null} [params] Device params\n */\n\n /**\n * Constructs a new Device.\n * @exports Device\n * @classdesc Represents a Device.\n * @implements IDevice\n * @constructor\n * @param {IDevice=} [properties] Properties to set\n */\n function Device(properties) {\n this.params = [];\n if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Device name.\n * @member {string} name\n * @memberof Device\n * @instance\n */\n Device.prototype.name = \"\";\n\n /**\n * Device uid.\n * @member {number|Long} uid\n * @memberof Device\n * @instance\n */\n Device.prototype.uid = $util.Long ? $util.Long.fromBits(0, 0, true) : 0;\n\n /**\n * Device type.\n * @member {number} type\n * @memberof Device\n * @instance\n */\n Device.prototype.type = 0;\n\n /**\n * Device params.\n * @member {Array.} params\n * @memberof Device\n * @instance\n */\n Device.prototype.params = $util.emptyArray;\n\n /**\n * Creates a new Device instance using the specified properties.\n * @function create\n * @memberof Device\n * @static\n * @param {IDevice=} [properties] Properties to set\n * @returns {Device} Device instance\n */\n Device.create = function create(properties) {\n return new Device(properties);\n };\n\n /**\n * Encodes the specified Device message. Does not implicitly {@link Device.verify|verify} messages.\n * @function encode\n * @memberof Device\n * @static\n * @param {IDevice} message Device message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Device.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create();\n if (message.name != null && Object.hasOwnProperty.call(message, \"name\")) writer.uint32( /* id 1, wireType 2 =*/10).string(message.name);\n if (message.uid != null && Object.hasOwnProperty.call(message, \"uid\")) writer.uint32( /* id 2, wireType 0 =*/16).uint64(message.uid);\n if (message.type != null && Object.hasOwnProperty.call(message, \"type\")) writer.uint32( /* id 3, wireType 0 =*/24).uint32(message.type);\n if (message.params != null && message.params.length) for (let i = 0; i < message.params.length; ++i) $root.Param.encode(message.params[i], writer.uint32( /* id 4, wireType 2 =*/34).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified Device message, length delimited. Does not implicitly {@link Device.verify|verify} messages.\n * @function encodeDelimited\n * @memberof Device\n * @static\n * @param {IDevice} message Device message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Device.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Device message from the specified reader or buffer.\n * @function decode\n * @memberof Device\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {Device} Device\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Device.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.Device();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.name = reader.string();\n break;\n case 2:\n message.uid = reader.uint64();\n break;\n case 3:\n message.type = reader.uint32();\n break;\n case 4:\n if (!(message.params && message.params.length)) message.params = [];\n message.params.push($root.Param.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Device message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof Device\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {Device} Device\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Device.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Device message.\n * @function verify\n * @memberof Device\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Device.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null) return \"object expected\";\n if (message.name != null && message.hasOwnProperty(\"name\")) if (!$util.isString(message.name)) return \"name: string expected\";\n if (message.uid != null && message.hasOwnProperty(\"uid\")) if (!$util.isInteger(message.uid) && !(message.uid && $util.isInteger(message.uid.low) && $util.isInteger(message.uid.high))) return \"uid: integer|Long expected\";\n if (message.type != null && message.hasOwnProperty(\"type\")) if (!$util.isInteger(message.type)) return \"type: integer expected\";\n if (message.params != null && message.hasOwnProperty(\"params\")) {\n if (!Array.isArray(message.params)) return \"params: array expected\";\n for (let i = 0; i < message.params.length; ++i) {\n let error = $root.Param.verify(message.params[i]);\n if (error) return \"params.\" + error;\n }\n }\n return null;\n };\n\n /**\n * Creates a Device message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof Device\n * @static\n * @param {Object.} object Plain object\n * @returns {Device} Device\n */\n Device.fromObject = function fromObject(object) {\n if (object instanceof $root.Device) return object;\n let message = new $root.Device();\n if (object.name != null) message.name = String(object.name);\n if (object.uid != null) if ($util.Long) (message.uid = $util.Long.fromValue(object.uid)).unsigned = true;else if (typeof object.uid === \"string\") message.uid = parseInt(object.uid, 10);else if (typeof object.uid === \"number\") message.uid = object.uid;else if (typeof object.uid === \"object\") message.uid = new $util.LongBits(object.uid.low >>> 0, object.uid.high >>> 0).toNumber(true);\n if (object.type != null) message.type = object.type >>> 0;\n if (object.params) {\n if (!Array.isArray(object.params)) throw TypeError(\".Device.params: array expected\");\n message.params = [];\n for (let i = 0; i < object.params.length; ++i) {\n if (typeof object.params[i] !== \"object\") throw TypeError(\".Device.params: object expected\");\n message.params[i] = $root.Param.fromObject(object.params[i]);\n }\n }\n return message;\n };\n\n /**\n * Creates a plain object from a Device message. Also converts values to other types if specified.\n * @function toObject\n * @memberof Device\n * @static\n * @param {Device} message Device\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Device.toObject = function toObject(message, options) {\n if (!options) options = {};\n let object = {};\n if (options.arrays || options.defaults) object.params = [];\n if (options.defaults) {\n object.name = \"\";\n if ($util.Long) {\n let long = new $util.Long(0, 0, true);\n object.uid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n } else object.uid = options.longs === String ? \"0\" : 0;\n object.type = 0;\n }\n if (message.name != null && message.hasOwnProperty(\"name\")) object.name = message.name;\n if (message.uid != null && message.hasOwnProperty(\"uid\")) if (typeof message.uid === \"number\") object.uid = options.longs === String ? String(message.uid) : message.uid;else object.uid = options.longs === String ? $util.Long.prototype.toString.call(message.uid) : options.longs === Number ? new $util.LongBits(message.uid.low >>> 0, message.uid.high >>> 0).toNumber(true) : message.uid;\n if (message.type != null && message.hasOwnProperty(\"type\")) object.type = message.type;\n if (message.params && message.params.length) {\n object.params = [];\n for (let j = 0; j < message.params.length; ++j) object.params[j] = $root.Param.toObject(message.params[j], options);\n }\n return object;\n };\n\n /**\n * Converts this Device to JSON.\n * @function toJSON\n * @memberof Device\n * @instance\n * @returns {Object.} JSON object\n */\n Device.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return Device;\n})();\n\nconst DevData = exports.DevData = $root.DevData = (() => {\n\n /**\n * Properties of a DevData.\n * @exports IDevData\n * @interface IDevData\n * @property {Array.|null} [devices] DevData devices\n */\n\n /**\n * Constructs a new DevData.\n * @exports DevData\n * @classdesc Represents a DevData.\n * @implements IDevData\n * @constructor\n * @param {IDevData=} [properties] Properties to set\n */\n function DevData(properties) {\n this.devices = [];\n if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * DevData devices.\n * @member {Array.} devices\n * @memberof DevData\n * @instance\n */\n DevData.prototype.devices = $util.emptyArray;\n\n /**\n * Creates a new DevData instance using the specified properties.\n * @function create\n * @memberof DevData\n * @static\n * @param {IDevData=} [properties] Properties to set\n * @returns {DevData} DevData instance\n */\n DevData.create = function create(properties) {\n return new DevData(properties);\n };\n\n /**\n * Encodes the specified DevData message. Does not implicitly {@link DevData.verify|verify} messages.\n * @function encode\n * @memberof DevData\n * @static\n * @param {IDevData} message DevData message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DevData.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create();\n if (message.devices != null && message.devices.length) for (let i = 0; i < message.devices.length; ++i) $root.Device.encode(message.devices[i], writer.uint32( /* id 1, wireType 2 =*/10).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified DevData message, length delimited. Does not implicitly {@link DevData.verify|verify} messages.\n * @function encodeDelimited\n * @memberof DevData\n * @static\n * @param {IDevData} message DevData message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DevData.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a DevData message from the specified reader or buffer.\n * @function decode\n * @memberof DevData\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {DevData} DevData\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DevData.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.DevData();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (!(message.devices && message.devices.length)) message.devices = [];\n message.devices.push($root.Device.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a DevData message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof DevData\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {DevData} DevData\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DevData.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a DevData message.\n * @function verify\n * @memberof DevData\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n DevData.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null) return \"object expected\";\n if (message.devices != null && message.hasOwnProperty(\"devices\")) {\n if (!Array.isArray(message.devices)) return \"devices: array expected\";\n for (let i = 0; i < message.devices.length; ++i) {\n let error = $root.Device.verify(message.devices[i]);\n if (error) return \"devices.\" + error;\n }\n }\n return null;\n };\n\n /**\n * Creates a DevData message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof DevData\n * @static\n * @param {Object.} object Plain object\n * @returns {DevData} DevData\n */\n DevData.fromObject = function fromObject(object) {\n if (object instanceof $root.DevData) return object;\n let message = new $root.DevData();\n if (object.devices) {\n if (!Array.isArray(object.devices)) throw TypeError(\".DevData.devices: array expected\");\n message.devices = [];\n for (let i = 0; i < object.devices.length; ++i) {\n if (typeof object.devices[i] !== \"object\") throw TypeError(\".DevData.devices: object expected\");\n message.devices[i] = $root.Device.fromObject(object.devices[i]);\n }\n }\n return message;\n };\n\n /**\n * Creates a plain object from a DevData message. Also converts values to other types if specified.\n * @function toObject\n * @memberof DevData\n * @static\n * @param {DevData} message DevData\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n DevData.toObject = function toObject(message, options) {\n if (!options) options = {};\n let object = {};\n if (options.arrays || options.defaults) object.devices = [];\n if (message.devices && message.devices.length) {\n object.devices = [];\n for (let j = 0; j < message.devices.length; ++j) object.devices[j] = $root.Device.toObject(message.devices[j], options);\n }\n return object;\n };\n\n /**\n * Converts this DevData to JSON.\n * @function toJSON\n * @memberof DevData\n * @instance\n * @returns {Object.} JSON object\n */\n DevData.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return DevData;\n})();\n\n/**\n * State enum.\n * @exports State\n * @enum {number}\n * @property {number} POISON_IVY=0 POISON_IVY value\n * @property {number} DEHYDRATION=1 DEHYDRATION value\n * @property {number} HYPOTHERMIA_START=2 HYPOTHERMIA_START value\n * @property {number} HYPOTHERMIA_END=3 HYPOTHERMIA_END value\n */\nconst State = exports.State = $root.State = (() => {\n const valuesById = {},\n values = Object.create(valuesById);\n values[valuesById[0] = \"POISON_IVY\"] = 0;\n values[valuesById[1] = \"DEHYDRATION\"] = 1;\n values[valuesById[2] = \"HYPOTHERMIA_START\"] = 2;\n values[valuesById[3] = \"HYPOTHERMIA_END\"] = 3;\n return values;\n})();\n\nconst GameState = exports.GameState = $root.GameState = (() => {\n\n /**\n * Properties of a GameState.\n * @exports IGameState\n * @interface IGameState\n * @property {State|null} [state] GameState state\n */\n\n /**\n * Constructs a new GameState.\n * @exports GameState\n * @classdesc Represents a GameState.\n * @implements IGameState\n * @constructor\n * @param {IGameState=} [properties] Properties to set\n */\n function GameState(properties) {\n if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * GameState state.\n * @member {State} state\n * @memberof GameState\n * @instance\n */\n GameState.prototype.state = 0;\n\n /**\n * Creates a new GameState instance using the specified properties.\n * @function create\n * @memberof GameState\n * @static\n * @param {IGameState=} [properties] Properties to set\n * @returns {GameState} GameState instance\n */\n GameState.create = function create(properties) {\n return new GameState(properties);\n };\n\n /**\n * Encodes the specified GameState message. Does not implicitly {@link GameState.verify|verify} messages.\n * @function encode\n * @memberof GameState\n * @static\n * @param {IGameState} message GameState message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n GameState.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create();\n if (message.state != null && Object.hasOwnProperty.call(message, \"state\")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.state);\n return writer;\n };\n\n /**\n * Encodes the specified GameState message, length delimited. Does not implicitly {@link GameState.verify|verify} messages.\n * @function encodeDelimited\n * @memberof GameState\n * @static\n * @param {IGameState} message GameState message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n GameState.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a GameState message from the specified reader or buffer.\n * @function decode\n * @memberof GameState\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {GameState} GameState\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n GameState.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.GameState();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.state = reader.int32();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a GameState message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof GameState\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {GameState} GameState\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n GameState.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a GameState message.\n * @function verify\n * @memberof GameState\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n GameState.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null) return \"object expected\";\n if (message.state != null && message.hasOwnProperty(\"state\")) switch (message.state) {\n default:\n return \"state: enum value expected\";\n case 0:\n case 1:\n case 2:\n case 3:\n break;\n }\n return null;\n };\n\n /**\n * Creates a GameState message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof GameState\n * @static\n * @param {Object.} object Plain object\n * @returns {GameState} GameState\n */\n GameState.fromObject = function fromObject(object) {\n if (object instanceof $root.GameState) return object;\n let message = new $root.GameState();\n switch (object.state) {\n case \"POISON_IVY\":\n case 0:\n message.state = 0;\n break;\n case \"DEHYDRATION\":\n case 1:\n message.state = 1;\n break;\n case \"HYPOTHERMIA_START\":\n case 2:\n message.state = 2;\n break;\n case \"HYPOTHERMIA_END\":\n case 3:\n message.state = 3;\n break;\n }\n return message;\n };\n\n /**\n * Creates a plain object from a GameState message. Also converts values to other types if specified.\n * @function toObject\n * @memberof GameState\n * @static\n * @param {GameState} message GameState\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n GameState.toObject = function toObject(message, options) {\n if (!options) options = {};\n let object = {};\n if (options.defaults) object.state = options.enums === String ? \"POISON_IVY\" : 0;\n if (message.state != null && message.hasOwnProperty(\"state\")) object.state = options.enums === String ? $root.State[message.state] : message.state;\n return object;\n };\n\n /**\n * Converts this GameState to JSON.\n * @function toJSON\n * @memberof GameState\n * @instance\n * @returns {Object.} JSON object\n */\n GameState.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return GameState;\n})();\n\n/**\n * Source enum.\n * @exports Source\n * @enum {number}\n * @property {number} GAMEPAD=0 GAMEPAD value\n * @property {number} KEYBOARD=1 KEYBOARD value\n */\nconst Source = exports.Source = $root.Source = (() => {\n const valuesById = {},\n values = Object.create(valuesById);\n values[valuesById[0] = \"GAMEPAD\"] = 0;\n values[valuesById[1] = \"KEYBOARD\"] = 1;\n return values;\n})();\n\nconst Input = exports.Input = $root.Input = (() => {\n\n /**\n * Properties of an Input.\n * @exports IInput\n * @interface IInput\n * @property {boolean|null} [connected] Input connected\n * @property {number|Long|null} [buttons] Input buttons\n * @property {Array.|null} [axes] Input axes\n * @property {Source|null} [source] Input source\n */\n\n /**\n * Constructs a new Input.\n * @exports Input\n * @classdesc Represents an Input.\n * @implements IInput\n * @constructor\n * @param {IInput=} [properties] Properties to set\n */\n function Input(properties) {\n this.axes = [];\n if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Input connected.\n * @member {boolean} connected\n * @memberof Input\n * @instance\n */\n Input.prototype.connected = false;\n\n /**\n * Input buttons.\n * @member {number|Long} buttons\n * @memberof Input\n * @instance\n */\n Input.prototype.buttons = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;\n\n /**\n * Input axes.\n * @member {Array.} axes\n * @memberof Input\n * @instance\n */\n Input.prototype.axes = $util.emptyArray;\n\n /**\n * Input source.\n * @member {Source} source\n * @memberof Input\n * @instance\n */\n Input.prototype.source = 0;\n\n /**\n * Creates a new Input instance using the specified properties.\n * @function create\n * @memberof Input\n * @static\n * @param {IInput=} [properties] Properties to set\n * @returns {Input} Input instance\n */\n Input.create = function create(properties) {\n return new Input(properties);\n };\n\n /**\n * Encodes the specified Input message. Does not implicitly {@link Input.verify|verify} messages.\n * @function encode\n * @memberof Input\n * @static\n * @param {IInput} message Input message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Input.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create();\n if (message.connected != null && Object.hasOwnProperty.call(message, \"connected\")) writer.uint32( /* id 1, wireType 0 =*/8).bool(message.connected);\n if (message.buttons != null && Object.hasOwnProperty.call(message, \"buttons\")) writer.uint32( /* id 2, wireType 1 =*/17).fixed64(message.buttons);\n if (message.axes != null && message.axes.length) {\n writer.uint32( /* id 3, wireType 2 =*/26).fork();\n for (let i = 0; i < message.axes.length; ++i) writer.float(message.axes[i]);\n writer.ldelim();\n }\n if (message.source != null && Object.hasOwnProperty.call(message, \"source\")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.source);\n return writer;\n };\n\n /**\n * Encodes the specified Input message, length delimited. Does not implicitly {@link Input.verify|verify} messages.\n * @function encodeDelimited\n * @memberof Input\n * @static\n * @param {IInput} message Input message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Input.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an Input message from the specified reader or buffer.\n * @function decode\n * @memberof Input\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {Input} Input\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Input.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.Input();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.connected = reader.bool();\n break;\n case 2:\n message.buttons = reader.fixed64();\n break;\n case 3:\n if (!(message.axes && message.axes.length)) message.axes = [];\n if ((tag & 7) === 2) {\n let end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2) message.axes.push(reader.float());\n } else message.axes.push(reader.float());\n break;\n case 4:\n message.source = reader.int32();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an Input message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof Input\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {Input} Input\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Input.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an Input message.\n * @function verify\n * @memberof Input\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Input.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null) return \"object expected\";\n if (message.connected != null && message.hasOwnProperty(\"connected\")) if (typeof message.connected !== \"boolean\") return \"connected: boolean expected\";\n if (message.buttons != null && message.hasOwnProperty(\"buttons\")) if (!$util.isInteger(message.buttons) && !(message.buttons && $util.isInteger(message.buttons.low) && $util.isInteger(message.buttons.high))) return \"buttons: integer|Long expected\";\n if (message.axes != null && message.hasOwnProperty(\"axes\")) {\n if (!Array.isArray(message.axes)) return \"axes: array expected\";\n for (let i = 0; i < message.axes.length; ++i) if (typeof message.axes[i] !== \"number\") return \"axes: number[] expected\";\n }\n if (message.source != null && message.hasOwnProperty(\"source\")) switch (message.source) {\n default:\n return \"source: enum value expected\";\n case 0:\n case 1:\n break;\n }\n return null;\n };\n\n /**\n * Creates an Input message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof Input\n * @static\n * @param {Object.} object Plain object\n * @returns {Input} Input\n */\n Input.fromObject = function fromObject(object) {\n if (object instanceof $root.Input) return object;\n let message = new $root.Input();\n if (object.connected != null) message.connected = Boolean(object.connected);\n if (object.buttons != null) if ($util.Long) (message.buttons = $util.Long.fromValue(object.buttons)).unsigned = false;else if (typeof object.buttons === \"string\") message.buttons = parseInt(object.buttons, 10);else if (typeof object.buttons === \"number\") message.buttons = object.buttons;else if (typeof object.buttons === \"object\") message.buttons = new $util.LongBits(object.buttons.low >>> 0, object.buttons.high >>> 0).toNumber();\n if (object.axes) {\n if (!Array.isArray(object.axes)) throw TypeError(\".Input.axes: array expected\");\n message.axes = [];\n for (let i = 0; i < object.axes.length; ++i) message.axes[i] = Number(object.axes[i]);\n }\n switch (object.source) {\n case \"GAMEPAD\":\n case 0:\n message.source = 0;\n break;\n case \"KEYBOARD\":\n case 1:\n message.source = 1;\n break;\n }\n return message;\n };\n\n /**\n * Creates a plain object from an Input message. Also converts values to other types if specified.\n * @function toObject\n * @memberof Input\n * @static\n * @param {Input} message Input\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Input.toObject = function toObject(message, options) {\n if (!options) options = {};\n let object = {};\n if (options.arrays || options.defaults) object.axes = [];\n if (options.defaults) {\n object.connected = false;\n if ($util.Long) {\n let long = new $util.Long(0, 0, false);\n object.buttons = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n } else object.buttons = options.longs === String ? \"0\" : 0;\n object.source = options.enums === String ? \"GAMEPAD\" : 0;\n }\n if (message.connected != null && message.hasOwnProperty(\"connected\")) object.connected = message.connected;\n if (message.buttons != null && message.hasOwnProperty(\"buttons\")) if (typeof message.buttons === \"number\") object.buttons = options.longs === String ? String(message.buttons) : message.buttons;else object.buttons = options.longs === String ? $util.Long.prototype.toString.call(message.buttons) : options.longs === Number ? new $util.LongBits(message.buttons.low >>> 0, message.buttons.high >>> 0).toNumber() : message.buttons;\n if (message.axes && message.axes.length) {\n object.axes = [];\n for (let j = 0; j < message.axes.length; ++j) object.axes[j] = options.json && !isFinite(message.axes[j]) ? String(message.axes[j]) : message.axes[j];\n }\n if (message.source != null && message.hasOwnProperty(\"source\")) object.source = options.enums === String ? $root.Source[message.source] : message.source;\n return object;\n };\n\n /**\n * Converts this Input to JSON.\n * @function toJSON\n * @memberof Input\n * @instance\n * @returns {Object.} JSON object\n */\n Input.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return Input;\n})();\n\nconst UserInputs = exports.UserInputs = $root.UserInputs = (() => {\n\n /**\n * Properties of a UserInputs.\n * @exports IUserInputs\n * @interface IUserInputs\n * @property {Array.|null} [inputs] UserInputs inputs\n */\n\n /**\n * Constructs a new UserInputs.\n * @exports UserInputs\n * @classdesc Represents a UserInputs.\n * @implements IUserInputs\n * @constructor\n * @param {IUserInputs=} [properties] Properties to set\n */\n function UserInputs(properties) {\n this.inputs = [];\n if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * UserInputs inputs.\n * @member {Array.} inputs\n * @memberof UserInputs\n * @instance\n */\n UserInputs.prototype.inputs = $util.emptyArray;\n\n /**\n * Creates a new UserInputs instance using the specified properties.\n * @function create\n * @memberof UserInputs\n * @static\n * @param {IUserInputs=} [properties] Properties to set\n * @returns {UserInputs} UserInputs instance\n */\n UserInputs.create = function create(properties) {\n return new UserInputs(properties);\n };\n\n /**\n * Encodes the specified UserInputs message. Does not implicitly {@link UserInputs.verify|verify} messages.\n * @function encode\n * @memberof UserInputs\n * @static\n * @param {IUserInputs} message UserInputs message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UserInputs.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create();\n if (message.inputs != null && message.inputs.length) for (let i = 0; i < message.inputs.length; ++i) $root.Input.encode(message.inputs[i], writer.uint32( /* id 1, wireType 2 =*/10).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified UserInputs message, length delimited. Does not implicitly {@link UserInputs.verify|verify} messages.\n * @function encodeDelimited\n * @memberof UserInputs\n * @static\n * @param {IUserInputs} message UserInputs message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UserInputs.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a UserInputs message from the specified reader or buffer.\n * @function decode\n * @memberof UserInputs\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {UserInputs} UserInputs\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UserInputs.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.UserInputs();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (!(message.inputs && message.inputs.length)) message.inputs = [];\n message.inputs.push($root.Input.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a UserInputs message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof UserInputs\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {UserInputs} UserInputs\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UserInputs.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a UserInputs message.\n * @function verify\n * @memberof UserInputs\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n UserInputs.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null) return \"object expected\";\n if (message.inputs != null && message.hasOwnProperty(\"inputs\")) {\n if (!Array.isArray(message.inputs)) return \"inputs: array expected\";\n for (let i = 0; i < message.inputs.length; ++i) {\n let error = $root.Input.verify(message.inputs[i]);\n if (error) return \"inputs.\" + error;\n }\n }\n return null;\n };\n\n /**\n * Creates a UserInputs message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof UserInputs\n * @static\n * @param {Object.} object Plain object\n * @returns {UserInputs} UserInputs\n */\n UserInputs.fromObject = function fromObject(object) {\n if (object instanceof $root.UserInputs) return object;\n let message = new $root.UserInputs();\n if (object.inputs) {\n if (!Array.isArray(object.inputs)) throw TypeError(\".UserInputs.inputs: array expected\");\n message.inputs = [];\n for (let i = 0; i < object.inputs.length; ++i) {\n if (typeof object.inputs[i] !== \"object\") throw TypeError(\".UserInputs.inputs: object expected\");\n message.inputs[i] = $root.Input.fromObject(object.inputs[i]);\n }\n }\n return message;\n };\n\n /**\n * Creates a plain object from a UserInputs message. Also converts values to other types if specified.\n * @function toObject\n * @memberof UserInputs\n * @static\n * @param {UserInputs} message UserInputs\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n UserInputs.toObject = function toObject(message, options) {\n if (!options) options = {};\n let object = {};\n if (options.arrays || options.defaults) object.inputs = [];\n if (message.inputs && message.inputs.length) {\n object.inputs = [];\n for (let j = 0; j < message.inputs.length; ++j) object.inputs[j] = $root.Input.toObject(message.inputs[j], options);\n }\n return object;\n };\n\n /**\n * Converts this UserInputs to JSON.\n * @function toJSON\n * @memberof UserInputs\n * @instance\n * @returns {Object.} JSON object\n */\n UserInputs.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return UserInputs;\n})();\n\n/**\n * Mode enum.\n * @exports Mode\n * @enum {number}\n * @property {number} IDLE=0 IDLE value\n * @property {number} AUTO=1 AUTO value\n * @property {number} TELEOP=2 TELEOP value\n * @property {number} ESTOP=3 ESTOP value\n */\nconst Mode = exports.Mode = $root.Mode = (() => {\n const valuesById = {},\n values = Object.create(valuesById);\n values[valuesById[0] = \"IDLE\"] = 0;\n values[valuesById[1] = \"AUTO\"] = 1;\n values[valuesById[2] = \"TELEOP\"] = 2;\n values[valuesById[3] = \"ESTOP\"] = 3;\n return values;\n})();\n\nconst RunMode = exports.RunMode = $root.RunMode = (() => {\n\n /**\n * Properties of a RunMode.\n * @exports IRunMode\n * @interface IRunMode\n * @property {Mode|null} [mode] RunMode mode\n */\n\n /**\n * Constructs a new RunMode.\n * @exports RunMode\n * @classdesc Represents a RunMode.\n * @implements IRunMode\n * @constructor\n * @param {IRunMode=} [properties] Properties to set\n */\n function RunMode(properties) {\n if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * RunMode mode.\n * @member {Mode} mode\n * @memberof RunMode\n * @instance\n */\n RunMode.prototype.mode = 0;\n\n /**\n * Creates a new RunMode instance using the specified properties.\n * @function create\n * @memberof RunMode\n * @static\n * @param {IRunMode=} [properties] Properties to set\n * @returns {RunMode} RunMode instance\n */\n RunMode.create = function create(properties) {\n return new RunMode(properties);\n };\n\n /**\n * Encodes the specified RunMode message. Does not implicitly {@link RunMode.verify|verify} messages.\n * @function encode\n * @memberof RunMode\n * @static\n * @param {IRunMode} message RunMode message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RunMode.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create();\n if (message.mode != null && Object.hasOwnProperty.call(message, \"mode\")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.mode);\n return writer;\n };\n\n /**\n * Encodes the specified RunMode message, length delimited. Does not implicitly {@link RunMode.verify|verify} messages.\n * @function encodeDelimited\n * @memberof RunMode\n * @static\n * @param {IRunMode} message RunMode message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RunMode.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a RunMode message from the specified reader or buffer.\n * @function decode\n * @memberof RunMode\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {RunMode} RunMode\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RunMode.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.RunMode();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.mode = reader.int32();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a RunMode message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof RunMode\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {RunMode} RunMode\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RunMode.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a RunMode message.\n * @function verify\n * @memberof RunMode\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n RunMode.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null) return \"object expected\";\n if (message.mode != null && message.hasOwnProperty(\"mode\")) switch (message.mode) {\n default:\n return \"mode: enum value expected\";\n case 0:\n case 1:\n case 2:\n case 3:\n break;\n }\n return null;\n };\n\n /**\n * Creates a RunMode message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof RunMode\n * @static\n * @param {Object.} object Plain object\n * @returns {RunMode} RunMode\n */\n RunMode.fromObject = function fromObject(object) {\n if (object instanceof $root.RunMode) return object;\n let message = new $root.RunMode();\n switch (object.mode) {\n case \"IDLE\":\n case 0:\n message.mode = 0;\n break;\n case \"AUTO\":\n case 1:\n message.mode = 1;\n break;\n case \"TELEOP\":\n case 2:\n message.mode = 2;\n break;\n case \"ESTOP\":\n case 3:\n message.mode = 3;\n break;\n }\n return message;\n };\n\n /**\n * Creates a plain object from a RunMode message. Also converts values to other types if specified.\n * @function toObject\n * @memberof RunMode\n * @static\n * @param {RunMode} message RunMode\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n RunMode.toObject = function toObject(message, options) {\n if (!options) options = {};\n let object = {};\n if (options.defaults) object.mode = options.enums === String ? \"IDLE\" : 0;\n if (message.mode != null && message.hasOwnProperty(\"mode\")) object.mode = options.enums === String ? $root.Mode[message.mode] : message.mode;\n return object;\n };\n\n /**\n * Converts this RunMode to JSON.\n * @function toJSON\n * @memberof RunMode\n * @instance\n * @returns {Object.} JSON object\n */\n RunMode.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return RunMode;\n})();\n\nconst RuntimeStatus = exports.RuntimeStatus = $root.RuntimeStatus = (() => {\n\n /**\n * Properties of a RuntimeStatus.\n * @exports IRuntimeStatus\n * @interface IRuntimeStatus\n * @property {boolean|null} [shepConnected] RuntimeStatus shepConnected\n * @property {boolean|null} [dawnConnected] RuntimeStatus dawnConnected\n * @property {Mode|null} [mode] RuntimeStatus mode\n * @property {number|null} [battery] RuntimeStatus battery\n * @property {string|null} [version] RuntimeStatus version\n */\n\n /**\n * Constructs a new RuntimeStatus.\n * @exports RuntimeStatus\n * @classdesc Represents a RuntimeStatus.\n * @implements IRuntimeStatus\n * @constructor\n * @param {IRuntimeStatus=} [properties] Properties to set\n */\n function RuntimeStatus(properties) {\n if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * RuntimeStatus shepConnected.\n * @member {boolean} shepConnected\n * @memberof RuntimeStatus\n * @instance\n */\n RuntimeStatus.prototype.shepConnected = false;\n\n /**\n * RuntimeStatus dawnConnected.\n * @member {boolean} dawnConnected\n * @memberof RuntimeStatus\n * @instance\n */\n RuntimeStatus.prototype.dawnConnected = false;\n\n /**\n * RuntimeStatus mode.\n * @member {Mode} mode\n * @memberof RuntimeStatus\n * @instance\n */\n RuntimeStatus.prototype.mode = 0;\n\n /**\n * RuntimeStatus battery.\n * @member {number} battery\n * @memberof RuntimeStatus\n * @instance\n */\n RuntimeStatus.prototype.battery = 0;\n\n /**\n * RuntimeStatus version.\n * @member {string} version\n * @memberof RuntimeStatus\n * @instance\n */\n RuntimeStatus.prototype.version = \"\";\n\n /**\n * Creates a new RuntimeStatus instance using the specified properties.\n * @function create\n * @memberof RuntimeStatus\n * @static\n * @param {IRuntimeStatus=} [properties] Properties to set\n * @returns {RuntimeStatus} RuntimeStatus instance\n */\n RuntimeStatus.create = function create(properties) {\n return new RuntimeStatus(properties);\n };\n\n /**\n * Encodes the specified RuntimeStatus message. Does not implicitly {@link RuntimeStatus.verify|verify} messages.\n * @function encode\n * @memberof RuntimeStatus\n * @static\n * @param {IRuntimeStatus} message RuntimeStatus message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RuntimeStatus.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create();\n if (message.shepConnected != null && Object.hasOwnProperty.call(message, \"shepConnected\")) writer.uint32( /* id 1, wireType 0 =*/8).bool(message.shepConnected);\n if (message.dawnConnected != null && Object.hasOwnProperty.call(message, \"dawnConnected\")) writer.uint32( /* id 2, wireType 0 =*/16).bool(message.dawnConnected);\n if (message.mode != null && Object.hasOwnProperty.call(message, \"mode\")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.mode);\n if (message.battery != null && Object.hasOwnProperty.call(message, \"battery\")) writer.uint32( /* id 4, wireType 5 =*/37).float(message.battery);\n if (message.version != null && Object.hasOwnProperty.call(message, \"version\")) writer.uint32( /* id 5, wireType 2 =*/42).string(message.version);\n return writer;\n };\n\n /**\n * Encodes the specified RuntimeStatus message, length delimited. Does not implicitly {@link RuntimeStatus.verify|verify} messages.\n * @function encodeDelimited\n * @memberof RuntimeStatus\n * @static\n * @param {IRuntimeStatus} message RuntimeStatus message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RuntimeStatus.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a RuntimeStatus message from the specified reader or buffer.\n * @function decode\n * @memberof RuntimeStatus\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {RuntimeStatus} RuntimeStatus\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RuntimeStatus.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.RuntimeStatus();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.shepConnected = reader.bool();\n break;\n case 2:\n message.dawnConnected = reader.bool();\n break;\n case 3:\n message.mode = reader.int32();\n break;\n case 4:\n message.battery = reader.float();\n break;\n case 5:\n message.version = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a RuntimeStatus message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof RuntimeStatus\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {RuntimeStatus} RuntimeStatus\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RuntimeStatus.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a RuntimeStatus message.\n * @function verify\n * @memberof RuntimeStatus\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n RuntimeStatus.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null) return \"object expected\";\n if (message.shepConnected != null && message.hasOwnProperty(\"shepConnected\")) if (typeof message.shepConnected !== \"boolean\") return \"shepConnected: boolean expected\";\n if (message.dawnConnected != null && message.hasOwnProperty(\"dawnConnected\")) if (typeof message.dawnConnected !== \"boolean\") return \"dawnConnected: boolean expected\";\n if (message.mode != null && message.hasOwnProperty(\"mode\")) switch (message.mode) {\n default:\n return \"mode: enum value expected\";\n case 0:\n case 1:\n case 2:\n case 3:\n break;\n }\n if (message.battery != null && message.hasOwnProperty(\"battery\")) if (typeof message.battery !== \"number\") return \"battery: number expected\";\n if (message.version != null && message.hasOwnProperty(\"version\")) if (!$util.isString(message.version)) return \"version: string expected\";\n return null;\n };\n\n /**\n * Creates a RuntimeStatus message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof RuntimeStatus\n * @static\n * @param {Object.} object Plain object\n * @returns {RuntimeStatus} RuntimeStatus\n */\n RuntimeStatus.fromObject = function fromObject(object) {\n if (object instanceof $root.RuntimeStatus) return object;\n let message = new $root.RuntimeStatus();\n if (object.shepConnected != null) message.shepConnected = Boolean(object.shepConnected);\n if (object.dawnConnected != null) message.dawnConnected = Boolean(object.dawnConnected);\n switch (object.mode) {\n case \"IDLE\":\n case 0:\n message.mode = 0;\n break;\n case \"AUTO\":\n case 1:\n message.mode = 1;\n break;\n case \"TELEOP\":\n case 2:\n message.mode = 2;\n break;\n case \"ESTOP\":\n case 3:\n message.mode = 3;\n break;\n }\n if (object.battery != null) message.battery = Number(object.battery);\n if (object.version != null) message.version = String(object.version);\n return message;\n };\n\n /**\n * Creates a plain object from a RuntimeStatus message. Also converts values to other types if specified.\n * @function toObject\n * @memberof RuntimeStatus\n * @static\n * @param {RuntimeStatus} message RuntimeStatus\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n RuntimeStatus.toObject = function toObject(message, options) {\n if (!options) options = {};\n let object = {};\n if (options.defaults) {\n object.shepConnected = false;\n object.dawnConnected = false;\n object.mode = options.enums === String ? \"IDLE\" : 0;\n object.battery = 0;\n object.version = \"\";\n }\n if (message.shepConnected != null && message.hasOwnProperty(\"shepConnected\")) object.shepConnected = message.shepConnected;\n if (message.dawnConnected != null && message.hasOwnProperty(\"dawnConnected\")) object.dawnConnected = message.dawnConnected;\n if (message.mode != null && message.hasOwnProperty(\"mode\")) object.mode = options.enums === String ? $root.Mode[message.mode] : message.mode;\n if (message.battery != null && message.hasOwnProperty(\"battery\")) object.battery = options.json && !isFinite(message.battery) ? String(message.battery) : message.battery;\n if (message.version != null && message.hasOwnProperty(\"version\")) object.version = message.version;\n return object;\n };\n\n /**\n * Converts this RuntimeStatus to JSON.\n * @function toJSON\n * @memberof RuntimeStatus\n * @instance\n * @returns {Object.} JSON object\n */\n RuntimeStatus.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return RuntimeStatus;\n})();\n\n/**\n * Pos enum.\n * @exports Pos\n * @enum {number}\n * @property {number} LEFT=0 LEFT value\n * @property {number} RIGHT=1 RIGHT value\n */\nconst Pos = exports.Pos = $root.Pos = (() => {\n const valuesById = {},\n values = Object.create(valuesById);\n values[valuesById[0] = \"LEFT\"] = 0;\n values[valuesById[1] = \"RIGHT\"] = 1;\n return values;\n})();\n\nconst StartPos = exports.StartPos = $root.StartPos = (() => {\n\n /**\n * Properties of a StartPos.\n * @exports IStartPos\n * @interface IStartPos\n * @property {Pos|null} [pos] StartPos pos\n */\n\n /**\n * Constructs a new StartPos.\n * @exports StartPos\n * @classdesc Represents a StartPos.\n * @implements IStartPos\n * @constructor\n * @param {IStartPos=} [properties] Properties to set\n */\n function StartPos(properties) {\n if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * StartPos pos.\n * @member {Pos} pos\n * @memberof StartPos\n * @instance\n */\n StartPos.prototype.pos = 0;\n\n /**\n * Creates a new StartPos instance using the specified properties.\n * @function create\n * @memberof StartPos\n * @static\n * @param {IStartPos=} [properties] Properties to set\n * @returns {StartPos} StartPos instance\n */\n StartPos.create = function create(properties) {\n return new StartPos(properties);\n };\n\n /**\n * Encodes the specified StartPos message. Does not implicitly {@link StartPos.verify|verify} messages.\n * @function encode\n * @memberof StartPos\n * @static\n * @param {IStartPos} message StartPos message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n StartPos.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create();\n if (message.pos != null && Object.hasOwnProperty.call(message, \"pos\")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.pos);\n return writer;\n };\n\n /**\n * Encodes the specified StartPos message, length delimited. Does not implicitly {@link StartPos.verify|verify} messages.\n * @function encodeDelimited\n * @memberof StartPos\n * @static\n * @param {IStartPos} message StartPos message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n StartPos.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a StartPos message from the specified reader or buffer.\n * @function decode\n * @memberof StartPos\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {StartPos} StartPos\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n StartPos.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.StartPos();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.pos = reader.int32();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a StartPos message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof StartPos\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {StartPos} StartPos\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n StartPos.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a StartPos message.\n * @function verify\n * @memberof StartPos\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n StartPos.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null) return \"object expected\";\n if (message.pos != null && message.hasOwnProperty(\"pos\")) switch (message.pos) {\n default:\n return \"pos: enum value expected\";\n case 0:\n case 1:\n break;\n }\n return null;\n };\n\n /**\n * Creates a StartPos message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof StartPos\n * @static\n * @param {Object.} object Plain object\n * @returns {StartPos} StartPos\n */\n StartPos.fromObject = function fromObject(object) {\n if (object instanceof $root.StartPos) return object;\n let message = new $root.StartPos();\n switch (object.pos) {\n case \"LEFT\":\n case 0:\n message.pos = 0;\n break;\n case \"RIGHT\":\n case 1:\n message.pos = 1;\n break;\n }\n return message;\n };\n\n /**\n * Creates a plain object from a StartPos message. Also converts values to other types if specified.\n * @function toObject\n * @memberof StartPos\n * @static\n * @param {StartPos} message StartPos\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n StartPos.toObject = function toObject(message, options) {\n if (!options) options = {};\n let object = {};\n if (options.defaults) object.pos = options.enums === String ? \"LEFT\" : 0;\n if (message.pos != null && message.hasOwnProperty(\"pos\")) object.pos = options.enums === String ? $root.Pos[message.pos] : message.pos;\n return object;\n };\n\n /**\n * Converts this StartPos to JSON.\n * @function toJSON\n * @memberof StartPos\n * @instance\n * @returns {Object.} JSON object\n */\n StartPos.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return StartPos;\n})();\n\nconst Text = exports.Text = $root.Text = (() => {\n\n /**\n * Properties of a Text.\n * @exports IText\n * @interface IText\n * @property {Array.|null} [payload] Text payload\n */\n\n /**\n * Constructs a new Text.\n * @exports Text\n * @classdesc Represents a Text.\n * @implements IText\n * @constructor\n * @param {IText=} [properties] Properties to set\n */\n function Text(properties) {\n this.payload = [];\n if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Text payload.\n * @member {Array.} payload\n * @memberof Text\n * @instance\n */\n Text.prototype.payload = $util.emptyArray;\n\n /**\n * Creates a new Text instance using the specified properties.\n * @function create\n * @memberof Text\n * @static\n * @param {IText=} [properties] Properties to set\n * @returns {Text} Text instance\n */\n Text.create = function create(properties) {\n return new Text(properties);\n };\n\n /**\n * Encodes the specified Text message. Does not implicitly {@link Text.verify|verify} messages.\n * @function encode\n * @memberof Text\n * @static\n * @param {IText} message Text message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Text.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create();\n if (message.payload != null && message.payload.length) for (let i = 0; i < message.payload.length; ++i) writer.uint32( /* id 1, wireType 2 =*/10).string(message.payload[i]);\n return writer;\n };\n\n /**\n * Encodes the specified Text message, length delimited. Does not implicitly {@link Text.verify|verify} messages.\n * @function encodeDelimited\n * @memberof Text\n * @static\n * @param {IText} message Text message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Text.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Text message from the specified reader or buffer.\n * @function decode\n * @memberof Text\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {Text} Text\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Text.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.Text();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (!(message.payload && message.payload.length)) message.payload = [];\n message.payload.push(reader.string());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Text message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof Text\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {Text} Text\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Text.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Text message.\n * @function verify\n * @memberof Text\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Text.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null) return \"object expected\";\n if (message.payload != null && message.hasOwnProperty(\"payload\")) {\n if (!Array.isArray(message.payload)) return \"payload: array expected\";\n for (let i = 0; i < message.payload.length; ++i) if (!$util.isString(message.payload[i])) return \"payload: string[] expected\";\n }\n return null;\n };\n\n /**\n * Creates a Text message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof Text\n * @static\n * @param {Object.} object Plain object\n * @returns {Text} Text\n */\n Text.fromObject = function fromObject(object) {\n if (object instanceof $root.Text) return object;\n let message = new $root.Text();\n if (object.payload) {\n if (!Array.isArray(object.payload)) throw TypeError(\".Text.payload: array expected\");\n message.payload = [];\n for (let i = 0; i < object.payload.length; ++i) message.payload[i] = String(object.payload[i]);\n }\n return message;\n };\n\n /**\n * Creates a plain object from a Text message. Also converts values to other types if specified.\n * @function toObject\n * @memberof Text\n * @static\n * @param {Text} message Text\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Text.toObject = function toObject(message, options) {\n if (!options) options = {};\n let object = {};\n if (options.arrays || options.defaults) object.payload = [];\n if (message.payload && message.payload.length) {\n object.payload = [];\n for (let j = 0; j < message.payload.length; ++j) object.payload[j] = message.payload[j];\n }\n return object;\n };\n\n /**\n * Converts this Text to JSON.\n * @function toJSON\n * @memberof Text\n * @instance\n * @returns {Object.} JSON object\n */\n Text.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return Text;\n})();\n\nconst TimeStamps = exports.TimeStamps = $root.TimeStamps = (() => {\n\n /**\n * Properties of a TimeStamps.\n * @exports ITimeStamps\n * @interface ITimeStamps\n * @property {number|Long|null} [dawnTimestamp] TimeStamps dawnTimestamp\n * @property {number|Long|null} [runtimeTimestamp] TimeStamps runtimeTimestamp\n */\n\n /**\n * Constructs a new TimeStamps.\n * @exports TimeStamps\n * @classdesc Represents a TimeStamps.\n * @implements ITimeStamps\n * @constructor\n * @param {ITimeStamps=} [properties] Properties to set\n */\n function TimeStamps(properties) {\n if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * TimeStamps dawnTimestamp.\n * @member {number|Long} dawnTimestamp\n * @memberof TimeStamps\n * @instance\n */\n TimeStamps.prototype.dawnTimestamp = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;\n\n /**\n * TimeStamps runtimeTimestamp.\n * @member {number|Long} runtimeTimestamp\n * @memberof TimeStamps\n * @instance\n */\n TimeStamps.prototype.runtimeTimestamp = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;\n\n /**\n * Creates a new TimeStamps instance using the specified properties.\n * @function create\n * @memberof TimeStamps\n * @static\n * @param {ITimeStamps=} [properties] Properties to set\n * @returns {TimeStamps} TimeStamps instance\n */\n TimeStamps.create = function create(properties) {\n return new TimeStamps(properties);\n };\n\n /**\n * Encodes the specified TimeStamps message. Does not implicitly {@link TimeStamps.verify|verify} messages.\n * @function encode\n * @memberof TimeStamps\n * @static\n * @param {ITimeStamps} message TimeStamps message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n TimeStamps.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create();\n if (message.dawnTimestamp != null && Object.hasOwnProperty.call(message, \"dawnTimestamp\")) writer.uint32( /* id 1, wireType 1 =*/9).fixed64(message.dawnTimestamp);\n if (message.runtimeTimestamp != null && Object.hasOwnProperty.call(message, \"runtimeTimestamp\")) writer.uint32( /* id 2, wireType 1 =*/17).fixed64(message.runtimeTimestamp);\n return writer;\n };\n\n /**\n * Encodes the specified TimeStamps message, length delimited. Does not implicitly {@link TimeStamps.verify|verify} messages.\n * @function encodeDelimited\n * @memberof TimeStamps\n * @static\n * @param {ITimeStamps} message TimeStamps message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n TimeStamps.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a TimeStamps message from the specified reader or buffer.\n * @function decode\n * @memberof TimeStamps\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {TimeStamps} TimeStamps\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n TimeStamps.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.TimeStamps();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.dawnTimestamp = reader.fixed64();\n break;\n case 2:\n message.runtimeTimestamp = reader.fixed64();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a TimeStamps message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof TimeStamps\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {TimeStamps} TimeStamps\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n TimeStamps.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a TimeStamps message.\n * @function verify\n * @memberof TimeStamps\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n TimeStamps.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null) return \"object expected\";\n if (message.dawnTimestamp != null && message.hasOwnProperty(\"dawnTimestamp\")) if (!$util.isInteger(message.dawnTimestamp) && !(message.dawnTimestamp && $util.isInteger(message.dawnTimestamp.low) && $util.isInteger(message.dawnTimestamp.high))) return \"dawnTimestamp: integer|Long expected\";\n if (message.runtimeTimestamp != null && message.hasOwnProperty(\"runtimeTimestamp\")) if (!$util.isInteger(message.runtimeTimestamp) && !(message.runtimeTimestamp && $util.isInteger(message.runtimeTimestamp.low) && $util.isInteger(message.runtimeTimestamp.high))) return \"runtimeTimestamp: integer|Long expected\";\n return null;\n };\n\n /**\n * Creates a TimeStamps message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof TimeStamps\n * @static\n * @param {Object.} object Plain object\n * @returns {TimeStamps} TimeStamps\n */\n TimeStamps.fromObject = function fromObject(object) {\n if (object instanceof $root.TimeStamps) return object;\n let message = new $root.TimeStamps();\n if (object.dawnTimestamp != null) if ($util.Long) (message.dawnTimestamp = $util.Long.fromValue(object.dawnTimestamp)).unsigned = false;else if (typeof object.dawnTimestamp === \"string\") message.dawnTimestamp = parseInt(object.dawnTimestamp, 10);else if (typeof object.dawnTimestamp === \"number\") message.dawnTimestamp = object.dawnTimestamp;else if (typeof object.dawnTimestamp === \"object\") message.dawnTimestamp = new $util.LongBits(object.dawnTimestamp.low >>> 0, object.dawnTimestamp.high >>> 0).toNumber();\n if (object.runtimeTimestamp != null) if ($util.Long) (message.runtimeTimestamp = $util.Long.fromValue(object.runtimeTimestamp)).unsigned = false;else if (typeof object.runtimeTimestamp === \"string\") message.runtimeTimestamp = parseInt(object.runtimeTimestamp, 10);else if (typeof object.runtimeTimestamp === \"number\") message.runtimeTimestamp = object.runtimeTimestamp;else if (typeof object.runtimeTimestamp === \"object\") message.runtimeTimestamp = new $util.LongBits(object.runtimeTimestamp.low >>> 0, object.runtimeTimestamp.high >>> 0).toNumber();\n return message;\n };\n\n /**\n * Creates a plain object from a TimeStamps message. Also converts values to other types if specified.\n * @function toObject\n * @memberof TimeStamps\n * @static\n * @param {TimeStamps} message TimeStamps\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n TimeStamps.toObject = function toObject(message, options) {\n if (!options) options = {};\n let object = {};\n if (options.defaults) {\n if ($util.Long) {\n let long = new $util.Long(0, 0, false);\n object.dawnTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n } else object.dawnTimestamp = options.longs === String ? \"0\" : 0;\n if ($util.Long) {\n let long = new $util.Long(0, 0, false);\n object.runtimeTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n } else object.runtimeTimestamp = options.longs === String ? \"0\" : 0;\n }\n if (message.dawnTimestamp != null && message.hasOwnProperty(\"dawnTimestamp\")) if (typeof message.dawnTimestamp === \"number\") object.dawnTimestamp = options.longs === String ? String(message.dawnTimestamp) : message.dawnTimestamp;else object.dawnTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.dawnTimestamp) : options.longs === Number ? new $util.LongBits(message.dawnTimestamp.low >>> 0, message.dawnTimestamp.high >>> 0).toNumber() : message.dawnTimestamp;\n if (message.runtimeTimestamp != null && message.hasOwnProperty(\"runtimeTimestamp\")) if (typeof message.runtimeTimestamp === \"number\") object.runtimeTimestamp = options.longs === String ? String(message.runtimeTimestamp) : message.runtimeTimestamp;else object.runtimeTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.runtimeTimestamp) : options.longs === Number ? new $util.LongBits(message.runtimeTimestamp.low >>> 0, message.runtimeTimestamp.high >>> 0).toNumber() : message.runtimeTimestamp;\n return object;\n };\n\n /**\n * Converts this TimeStamps to JSON.\n * @function toJSON\n * @memberof TimeStamps\n * @instance\n * @returns {Object.} JSON object\n */\n TimeStamps.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return TimeStamps;\n})();\n\nexports.default = $root;\n\n//# sourceURL=webpack:///./protos-main/protos.js?"); - -/***/ }) - -/******/ }); \ No newline at end of file