{"version":3,"file":"app.js","sources":["webpack:///webpack/bootstrap","webpack:////app/node_modules/tslib/tslib.es6.js","webpack:////app/node_modules/kefir/dist/kefir.esm.js","webpack:////app/node_modules/buffer/index.js","webpack:////app/node_modules/object-assign/index.js","webpack:////app/node_modules/classnames/index.js","webpack:////app/node_modules/react-modal/lib/helpers/tabbable.js","webpack:////app/node_modules/react/cjs/react.production.min.js","webpack:////app/node_modules/react-dom/cjs/react-dom.production.min.js","webpack:////app/node_modules/scheduler/cjs/scheduler.production.min.js","webpack:////app/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js","webpack:////app/node_modules/react-is/cjs/react-is.production.min.js","webpack:////app/node_modules/react-router/node_modules/react-is/cjs/react-is.production.min.js","webpack:////app/node_modules/js-cookie/src/js.cookie.js","webpack:////app/node_modules/exenv/index.js","webpack:////app/node_modules/is-plain-object/index.js","webpack:////app/node_modules/isobject/index.js","webpack:////app/node_modules/moment-timezone/moment-timezone.js","webpack:////app/node_modules/ua-parser-js/src/ua-parser.js","webpack:////app/node_modules/js-htmlencode/src/htmlencode.js","webpack:////app/node_modules/filesize/lib/filesize.js","webpack:////app/node_modules/papaparse/papaparse.min.js","webpack:////app/node_modules/lodash-es/lodash.default.js"],"sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// __webpack_hash__\n \t__webpack_require__.h = \"d0d1df283d73c7359cf8\";\n\n \t// __webpack_chunkname__\n \t__webpack_require__.cn = \"app\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 880);\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","/*! Kefir.js v3.8.6\n * https://github.com/kefirjs/kefir\n */\n\nfunction createObj(proto) {\n var F = function () {};\n F.prototype = proto;\n return new F();\n}\n\nfunction extend(target /*, mixin1, mixin2...*/) {\n var length = arguments.length,\n i = void 0,\n prop = void 0;\n for (i = 1; i < length; i++) {\n for (prop in arguments[i]) {\n target[prop] = arguments[i][prop];\n }\n }\n return target;\n}\n\nfunction inherit(Child, Parent /*, mixin1, mixin2...*/) {\n var length = arguments.length,\n i = void 0;\n Child.prototype = createObj(Parent.prototype);\n Child.prototype.constructor = Child;\n for (i = 2; i < length; i++) {\n extend(Child.prototype, arguments[i]);\n }\n return Child;\n}\n\nvar NOTHING = [''];\nvar END = 'end';\nvar VALUE = 'value';\nvar ERROR = 'error';\nvar ANY = 'any';\n\nfunction concat(a, b) {\n var result = void 0,\n length = void 0,\n i = void 0,\n j = void 0;\n if (a.length === 0) {\n return b;\n }\n if (b.length === 0) {\n return a;\n }\n j = 0;\n result = new Array(a.length + b.length);\n length = a.length;\n for (i = 0; i < length; i++, j++) {\n result[j] = a[i];\n }\n length = b.length;\n for (i = 0; i < length; i++, j++) {\n result[j] = b[i];\n }\n return result;\n}\n\nfunction find(arr, value) {\n var length = arr.length,\n i = void 0;\n for (i = 0; i < length; i++) {\n if (arr[i] === value) {\n return i;\n }\n }\n return -1;\n}\n\nfunction findByPred(arr, pred) {\n var length = arr.length,\n i = void 0;\n for (i = 0; i < length; i++) {\n if (pred(arr[i])) {\n return i;\n }\n }\n return -1;\n}\n\nfunction cloneArray(input) {\n var length = input.length,\n result = new Array(length),\n i = void 0;\n for (i = 0; i < length; i++) {\n result[i] = input[i];\n }\n return result;\n}\n\nfunction remove(input, index) {\n var length = input.length,\n result = void 0,\n i = void 0,\n j = void 0;\n if (index >= 0 && index < length) {\n if (length === 1) {\n return [];\n } else {\n result = new Array(length - 1);\n for (i = 0, j = 0; i < length; i++) {\n if (i !== index) {\n result[j] = input[i];\n j++;\n }\n }\n return result;\n }\n } else {\n return input;\n }\n}\n\nfunction map(input, fn) {\n var length = input.length,\n result = new Array(length),\n i = void 0;\n for (i = 0; i < length; i++) {\n result[i] = fn(input[i]);\n }\n return result;\n}\n\nfunction forEach(arr, fn) {\n var length = arr.length,\n i = void 0;\n for (i = 0; i < length; i++) {\n fn(arr[i]);\n }\n}\n\nfunction fillArray(arr, value) {\n var length = arr.length,\n i = void 0;\n for (i = 0; i < length; i++) {\n arr[i] = value;\n }\n}\n\nfunction contains(arr, value) {\n return find(arr, value) !== -1;\n}\n\nfunction slide(cur, next, max) {\n var length = Math.min(max, cur.length + 1),\n offset = cur.length - length + 1,\n result = new Array(length),\n i = void 0;\n for (i = offset; i < length; i++) {\n result[i - offset] = cur[i];\n }\n result[length - 1] = next;\n return result;\n}\n\nfunction callSubscriber(type, fn, event) {\n if (type === ANY) {\n fn(event);\n } else if (type === event.type) {\n if (type === VALUE || type === ERROR) {\n fn(event.value);\n } else {\n fn();\n }\n }\n}\n\nfunction Dispatcher() {\n this._items = [];\n this._spies = [];\n this._inLoop = 0;\n this._removedItems = null;\n}\n\nextend(Dispatcher.prototype, {\n add: function (type, fn) {\n this._items = concat(this._items, [{ type: type, fn: fn }]);\n return this._items.length;\n },\n remove: function (type, fn) {\n var index = findByPred(this._items, function (x) {\n return x.type === type && x.fn === fn;\n });\n\n // if we're currently in a notification loop,\n // remember this subscriber was removed\n if (this._inLoop !== 0 && index !== -1) {\n if (this._removedItems === null) {\n this._removedItems = [];\n }\n this._removedItems.push(this._items[index]);\n }\n\n this._items = remove(this._items, index);\n return this._items.length;\n },\n addSpy: function (fn) {\n this._spies = concat(this._spies, [fn]);\n return this._spies.length;\n },\n\n\n // Because spies are only ever a function that perform logging as\n // their only side effect, we don't need the same complicated\n // removal logic like in remove()\n removeSpy: function (fn) {\n this._spies = remove(this._spies, this._spies.indexOf(fn));\n return this._spies.length;\n },\n dispatch: function (event) {\n this._inLoop++;\n for (var i = 0, spies = this._spies; this._spies !== null && i < spies.length; i++) {\n spies[i](event);\n }\n\n for (var _i = 0, items = this._items; _i < items.length; _i++) {\n // cleanup was called\n if (this._items === null) {\n break;\n }\n\n // this subscriber was removed\n if (this._removedItems !== null && contains(this._removedItems, items[_i])) {\n continue;\n }\n\n callSubscriber(items[_i].type, items[_i].fn, event);\n }\n this._inLoop--;\n if (this._inLoop === 0) {\n this._removedItems = null;\n }\n },\n cleanup: function () {\n this._items = null;\n this._spies = null;\n }\n});\n\nfunction Observable() {\n this._dispatcher = new Dispatcher();\n this._active = false;\n this._alive = true;\n this._activating = false;\n this._logHandlers = null;\n this._spyHandlers = null;\n}\n\nextend(Observable.prototype, {\n _name: 'observable',\n\n _onActivation: function () {},\n _onDeactivation: function () {},\n _setActive: function (active) {\n if (this._active !== active) {\n this._active = active;\n if (active) {\n this._activating = true;\n this._onActivation();\n this._activating = false;\n } else {\n this._onDeactivation();\n }\n }\n },\n _clear: function () {\n this._setActive(false);\n this._dispatcher.cleanup();\n this._dispatcher = null;\n this._logHandlers = null;\n },\n _emit: function (type, x) {\n switch (type) {\n case VALUE:\n return this._emitValue(x);\n case ERROR:\n return this._emitError(x);\n case END:\n return this._emitEnd();\n }\n },\n _emitValue: function (value) {\n if (this._alive) {\n this._dispatcher.dispatch({ type: VALUE, value: value });\n }\n },\n _emitError: function (value) {\n if (this._alive) {\n this._dispatcher.dispatch({ type: ERROR, value: value });\n }\n },\n _emitEnd: function () {\n if (this._alive) {\n this._alive = false;\n this._dispatcher.dispatch({ type: END });\n this._clear();\n }\n },\n _on: function (type, fn) {\n if (this._alive) {\n this._dispatcher.add(type, fn);\n this._setActive(true);\n } else {\n callSubscriber(type, fn, { type: END });\n }\n return this;\n },\n _off: function (type, fn) {\n if (this._alive) {\n var count = this._dispatcher.remove(type, fn);\n if (count === 0) {\n this._setActive(false);\n }\n }\n return this;\n },\n onValue: function (fn) {\n return this._on(VALUE, fn);\n },\n onError: function (fn) {\n return this._on(ERROR, fn);\n },\n onEnd: function (fn) {\n return this._on(END, fn);\n },\n onAny: function (fn) {\n return this._on(ANY, fn);\n },\n offValue: function (fn) {\n return this._off(VALUE, fn);\n },\n offError: function (fn) {\n return this._off(ERROR, fn);\n },\n offEnd: function (fn) {\n return this._off(END, fn);\n },\n offAny: function (fn) {\n return this._off(ANY, fn);\n },\n observe: function (observerOrOnValue, onError, onEnd) {\n var _this = this;\n var closed = false;\n\n var observer = !observerOrOnValue || typeof observerOrOnValue === 'function' ? { value: observerOrOnValue, error: onError, end: onEnd } : observerOrOnValue;\n\n var handler = function (event) {\n if (event.type === END) {\n closed = true;\n }\n if (event.type === VALUE && observer.value) {\n observer.value(event.value);\n } else if (event.type === ERROR && observer.error) {\n observer.error(event.value);\n } else if (event.type === END && observer.end) {\n observer.end(event.value);\n }\n };\n\n this.onAny(handler);\n\n return {\n unsubscribe: function () {\n if (!closed) {\n _this.offAny(handler);\n closed = true;\n }\n },\n\n get closed() {\n return closed;\n }\n };\n },\n\n\n // A and B must be subclasses of Stream and Property (order doesn't matter)\n _ofSameType: function (A, B) {\n return A.prototype.getType() === this.getType() ? A : B;\n },\n setName: function (sourceObs /* optional */, selfName) {\n this._name = selfName ? sourceObs._name + '.' + selfName : sourceObs;\n return this;\n },\n log: function () {\n var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.toString();\n\n var isCurrent = void 0;\n var handler = function (event) {\n var type = '<' + event.type + (isCurrent ? ':current' : '') + '>';\n if (event.type === END) {\n console.log(name, type);\n } else {\n console.log(name, type, event.value);\n }\n };\n\n if (this._alive) {\n if (!this._logHandlers) {\n this._logHandlers = [];\n }\n this._logHandlers.push({ name: name, handler: handler });\n }\n\n isCurrent = true;\n this.onAny(handler);\n isCurrent = false;\n\n return this;\n },\n offLog: function () {\n var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.toString();\n\n if (this._logHandlers) {\n var handlerIndex = findByPred(this._logHandlers, function (obj) {\n return obj.name === name;\n });\n if (handlerIndex !== -1) {\n this.offAny(this._logHandlers[handlerIndex].handler);\n this._logHandlers.splice(handlerIndex, 1);\n }\n }\n\n return this;\n },\n spy: function () {\n var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.toString();\n\n var handler = function (event) {\n var type = '<' + event.type + '>';\n if (event.type === END) {\n console.log(name, type);\n } else {\n console.log(name, type, event.value);\n }\n };\n if (this._alive) {\n if (!this._spyHandlers) {\n this._spyHandlers = [];\n }\n this._spyHandlers.push({ name: name, handler: handler });\n this._dispatcher.addSpy(handler);\n }\n return this;\n },\n offSpy: function () {\n var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.toString();\n\n if (this._spyHandlers) {\n var handlerIndex = findByPred(this._spyHandlers, function (obj) {\n return obj.name === name;\n });\n if (handlerIndex !== -1) {\n this._dispatcher.removeSpy(this._spyHandlers[handlerIndex].handler);\n this._spyHandlers.splice(handlerIndex, 1);\n }\n }\n return this;\n }\n});\n\n// extend() can't handle `toString` in IE8\nObservable.prototype.toString = function () {\n return '[' + this._name + ']';\n};\n\nfunction Stream() {\n Observable.call(this);\n}\n\ninherit(Stream, Observable, {\n _name: 'stream',\n\n getType: function () {\n return 'stream';\n }\n});\n\nfunction Property() {\n Observable.call(this);\n this._currentEvent = null;\n}\n\ninherit(Property, Observable, {\n _name: 'property',\n\n _emitValue: function (value) {\n if (this._alive) {\n this._currentEvent = { type: VALUE, value: value };\n if (!this._activating) {\n this._dispatcher.dispatch({ type: VALUE, value: value });\n }\n }\n },\n _emitError: function (value) {\n if (this._alive) {\n this._currentEvent = { type: ERROR, value: value };\n if (!this._activating) {\n this._dispatcher.dispatch({ type: ERROR, value: value });\n }\n }\n },\n _emitEnd: function () {\n if (this._alive) {\n this._alive = false;\n if (!this._activating) {\n this._dispatcher.dispatch({ type: END });\n }\n this._clear();\n }\n },\n _on: function (type, fn) {\n if (this._alive) {\n this._dispatcher.add(type, fn);\n this._setActive(true);\n }\n if (this._currentEvent !== null) {\n callSubscriber(type, fn, this._currentEvent);\n }\n if (!this._alive) {\n callSubscriber(type, fn, { type: END });\n }\n return this;\n },\n getType: function () {\n return 'property';\n }\n});\n\nvar neverS = new Stream();\nneverS._emitEnd();\nneverS._name = 'never';\n\nfunction never() {\n return neverS;\n}\n\nfunction timeBased(mixin) {\n function AnonymousStream(wait, options) {\n var _this = this;\n\n Stream.call(this);\n this._wait = wait;\n this._intervalId = null;\n this._$onTick = function () {\n return _this._onTick();\n };\n this._init(options);\n }\n\n inherit(AnonymousStream, Stream, {\n _init: function () {},\n _free: function () {},\n _onTick: function () {},\n _onActivation: function () {\n this._intervalId = setInterval(this._$onTick, this._wait);\n },\n _onDeactivation: function () {\n if (this._intervalId !== null) {\n clearInterval(this._intervalId);\n this._intervalId = null;\n }\n },\n _clear: function () {\n Stream.prototype._clear.call(this);\n this._$onTick = null;\n this._free();\n }\n }, mixin);\n\n return AnonymousStream;\n}\n\nvar S = timeBased({\n _name: 'later',\n\n _init: function (_ref) {\n var x = _ref.x;\n\n this._x = x;\n },\n _free: function () {\n this._x = null;\n },\n _onTick: function () {\n this._emitValue(this._x);\n this._emitEnd();\n }\n});\n\nfunction later(wait, x) {\n return new S(wait, { x: x });\n}\n\nvar S$1 = timeBased({\n _name: 'interval',\n\n _init: function (_ref) {\n var x = _ref.x;\n\n this._x = x;\n },\n _free: function () {\n this._x = null;\n },\n _onTick: function () {\n this._emitValue(this._x);\n }\n});\n\nfunction interval(wait, x) {\n return new S$1(wait, { x: x });\n}\n\nvar S$2 = timeBased({\n _name: 'sequentially',\n\n _init: function (_ref) {\n var xs = _ref.xs;\n\n this._xs = cloneArray(xs);\n },\n _free: function () {\n this._xs = null;\n },\n _onTick: function () {\n if (this._xs.length === 1) {\n this._emitValue(this._xs[0]);\n this._emitEnd();\n } else {\n this._emitValue(this._xs.shift());\n }\n }\n});\n\nfunction sequentially(wait, xs) {\n return xs.length === 0 ? never() : new S$2(wait, { xs: xs });\n}\n\nvar S$3 = timeBased({\n _name: 'fromPoll',\n\n _init: function (_ref) {\n var fn = _ref.fn;\n\n this._fn = fn;\n },\n _free: function () {\n this._fn = null;\n },\n _onTick: function () {\n var fn = this._fn;\n this._emitValue(fn());\n }\n});\n\nfunction fromPoll(wait, fn) {\n return new S$3(wait, { fn: fn });\n}\n\nfunction emitter(obs) {\n function value(x) {\n obs._emitValue(x);\n return obs._active;\n }\n\n function error(x) {\n obs._emitError(x);\n return obs._active;\n }\n\n function end() {\n obs._emitEnd();\n return obs._active;\n }\n\n function event(e) {\n obs._emit(e.type, e.value);\n return obs._active;\n }\n\n return {\n value: value,\n error: error,\n end: end,\n event: event,\n\n // legacy\n emit: value,\n emitEvent: event\n };\n}\n\nvar S$4 = timeBased({\n _name: 'withInterval',\n\n _init: function (_ref) {\n var fn = _ref.fn;\n\n this._fn = fn;\n this._emitter = emitter(this);\n },\n _free: function () {\n this._fn = null;\n this._emitter = null;\n },\n _onTick: function () {\n var fn = this._fn;\n fn(this._emitter);\n }\n});\n\nfunction withInterval(wait, fn) {\n return new S$4(wait, { fn: fn });\n}\n\nfunction S$5(fn) {\n Stream.call(this);\n this._fn = fn;\n this._unsubscribe = null;\n}\n\ninherit(S$5, Stream, {\n _name: 'stream',\n\n _onActivation: function () {\n var fn = this._fn;\n var unsubscribe = fn(emitter(this));\n this._unsubscribe = typeof unsubscribe === 'function' ? unsubscribe : null;\n\n // fix https://github.com/kefirjs/kefir/issues/35\n if (!this._active) {\n this._callUnsubscribe();\n }\n },\n _callUnsubscribe: function () {\n if (this._unsubscribe !== null) {\n this._unsubscribe();\n this._unsubscribe = null;\n }\n },\n _onDeactivation: function () {\n this._callUnsubscribe();\n },\n _clear: function () {\n Stream.prototype._clear.call(this);\n this._fn = null;\n }\n});\n\nfunction stream(fn) {\n return new S$5(fn);\n}\n\nfunction fromCallback(callbackConsumer) {\n var called = false;\n\n return stream(function (emitter) {\n if (!called) {\n callbackConsumer(function (x) {\n emitter.emit(x);\n emitter.end();\n });\n called = true;\n }\n }).setName('fromCallback');\n}\n\nfunction fromNodeCallback(callbackConsumer) {\n var called = false;\n\n return stream(function (emitter) {\n if (!called) {\n callbackConsumer(function (error, x) {\n if (error) {\n emitter.error(error);\n } else {\n emitter.emit(x);\n }\n emitter.end();\n });\n called = true;\n }\n }).setName('fromNodeCallback');\n}\n\nfunction spread(fn, length) {\n switch (length) {\n case 0:\n return function () {\n return fn();\n };\n case 1:\n return function (a) {\n return fn(a[0]);\n };\n case 2:\n return function (a) {\n return fn(a[0], a[1]);\n };\n case 3:\n return function (a) {\n return fn(a[0], a[1], a[2]);\n };\n case 4:\n return function (a) {\n return fn(a[0], a[1], a[2], a[3]);\n };\n default:\n return function (a) {\n return fn.apply(null, a);\n };\n }\n}\n\nfunction apply(fn, c, a) {\n var aLength = a ? a.length : 0;\n if (c == null) {\n switch (aLength) {\n case 0:\n return fn();\n case 1:\n return fn(a[0]);\n case 2:\n return fn(a[0], a[1]);\n case 3:\n return fn(a[0], a[1], a[2]);\n case 4:\n return fn(a[0], a[1], a[2], a[3]);\n default:\n return fn.apply(null, a);\n }\n } else {\n switch (aLength) {\n case 0:\n return fn.call(c);\n default:\n return fn.apply(c, a);\n }\n }\n}\n\nfunction fromSubUnsub(sub, unsub, transformer /* Function | falsey */) {\n return stream(function (emitter) {\n var handler = transformer ? function () {\n emitter.emit(apply(transformer, this, arguments));\n } : function (x) {\n emitter.emit(x);\n };\n\n sub(handler);\n return function () {\n return unsub(handler);\n };\n }).setName('fromSubUnsub');\n}\n\nvar pairs = [['addEventListener', 'removeEventListener'], ['addListener', 'removeListener'], ['on', 'off']];\n\nfunction fromEvents(target, eventName, transformer) {\n var sub = void 0,\n unsub = void 0;\n\n for (var i = 0; i < pairs.length; i++) {\n if (typeof target[pairs[i][0]] === 'function' && typeof target[pairs[i][1]] === 'function') {\n sub = pairs[i][0];\n unsub = pairs[i][1];\n break;\n }\n }\n\n if (sub === undefined) {\n throw new Error(\"target don't support any of \" + 'addEventListener/removeEventListener, addListener/removeListener, on/off method pair');\n }\n\n return fromSubUnsub(function (handler) {\n return target[sub](eventName, handler);\n }, function (handler) {\n return target[unsub](eventName, handler);\n }, transformer).setName('fromEvents');\n}\n\n// HACK:\n// We don't call parent Class constructor, but instead putting all necessary\n// properties into prototype to simulate ended Property\n// (see Propperty and Observable classes).\n\nfunction P(value) {\n this._currentEvent = { type: 'value', value: value, current: true };\n}\n\ninherit(P, Property, {\n _name: 'constant',\n _active: false,\n _activating: false,\n _alive: false,\n _dispatcher: null,\n _logHandlers: null\n});\n\nfunction constant(x) {\n return new P(x);\n}\n\n// HACK:\n// We don't call parent Class constructor, but instead putting all necessary\n// properties into prototype to simulate ended Property\n// (see Propperty and Observable classes).\n\nfunction P$1(value) {\n this._currentEvent = { type: 'error', value: value, current: true };\n}\n\ninherit(P$1, Property, {\n _name: 'constantError',\n _active: false,\n _activating: false,\n _alive: false,\n _dispatcher: null,\n _logHandlers: null\n});\n\nfunction constantError(x) {\n return new P$1(x);\n}\n\nfunction createConstructor(BaseClass, name) {\n return function AnonymousObservable(source, options) {\n var _this = this;\n\n BaseClass.call(this);\n this._source = source;\n this._name = source._name + '.' + name;\n this._init(options);\n this._$handleAny = function (event) {\n return _this._handleAny(event);\n };\n };\n}\n\nfunction createClassMethods(BaseClass) {\n return {\n _init: function () {},\n _free: function () {},\n _handleValue: function (x) {\n this._emitValue(x);\n },\n _handleError: function (x) {\n this._emitError(x);\n },\n _handleEnd: function () {\n this._emitEnd();\n },\n _handleAny: function (event) {\n switch (event.type) {\n case VALUE:\n return this._handleValue(event.value);\n case ERROR:\n return this._handleError(event.value);\n case END:\n return this._handleEnd();\n }\n },\n _onActivation: function () {\n this._source.onAny(this._$handleAny);\n },\n _onDeactivation: function () {\n this._source.offAny(this._$handleAny);\n },\n _clear: function () {\n BaseClass.prototype._clear.call(this);\n this._source = null;\n this._$handleAny = null;\n this._free();\n }\n };\n}\n\nfunction createStream(name, mixin) {\n var S = createConstructor(Stream, name);\n inherit(S, Stream, createClassMethods(Stream), mixin);\n return S;\n}\n\nfunction createProperty(name, mixin) {\n var P = createConstructor(Property, name);\n inherit(P, Property, createClassMethods(Property), mixin);\n return P;\n}\n\nvar P$2 = createProperty('toProperty', {\n _init: function (_ref) {\n var fn = _ref.fn;\n\n this._getInitialCurrent = fn;\n },\n _onActivation: function () {\n if (this._getInitialCurrent !== null) {\n var getInitial = this._getInitialCurrent;\n this._emitValue(getInitial());\n }\n this._source.onAny(this._$handleAny); // copied from patterns/one-source\n }\n});\n\nfunction toProperty(obs) {\n var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n if (fn !== null && typeof fn !== 'function') {\n throw new Error('You should call toProperty() with a function or no arguments.');\n }\n return new P$2(obs, { fn: fn });\n}\n\nvar S$6 = createStream('changes', {\n _handleValue: function (x) {\n if (!this._activating) {\n this._emitValue(x);\n }\n },\n _handleError: function (x) {\n if (!this._activating) {\n this._emitError(x);\n }\n }\n});\n\nfunction changes(obs) {\n return new S$6(obs);\n}\n\nfunction fromPromise(promise) {\n var called = false;\n\n var result = stream(function (emitter) {\n if (!called) {\n var onValue = function (x) {\n emitter.emit(x);\n emitter.end();\n };\n var onError = function (x) {\n emitter.error(x);\n emitter.end();\n };\n var _promise = promise.then(onValue, onError);\n\n // prevent libraries like 'Q' or 'when' from swallowing exceptions\n if (_promise && typeof _promise.done === 'function') {\n _promise.done();\n }\n\n called = true;\n }\n });\n\n return toProperty(result, null).setName('fromPromise');\n}\n\nfunction getGlodalPromise() {\n if (typeof Promise === 'function') {\n return Promise;\n } else {\n throw new Error(\"There isn't default Promise, use shim or parameter\");\n }\n}\n\nvar toPromise = function (obs) {\n var Promise = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getGlodalPromise();\n\n var last = null;\n return new Promise(function (resolve, reject) {\n obs.onAny(function (event) {\n if (event.type === END && last !== null) {\n (last.type === VALUE ? resolve : reject)(last.value);\n last = null;\n } else {\n last = event;\n }\n });\n });\n};\n\nvar commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n\n\n\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar ponyfill = createCommonjsModule(function (module, exports) {\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports['default'] = symbolObservablePonyfill;\nfunction symbolObservablePonyfill(root) {\n\tvar result;\n\tvar _Symbol = root.Symbol;\n\n\tif (typeof _Symbol === 'function') {\n\t\tif (_Symbol.observable) {\n\t\t\tresult = _Symbol.observable;\n\t\t} else {\n\t\t\tresult = _Symbol('observable');\n\t\t\t_Symbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n}\n});\n\nvar index$1 = createCommonjsModule(function (module, exports) {\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n\n\nvar _ponyfill2 = _interopRequireDefault(ponyfill);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { 'default': obj };\n}\n\nvar root; /* global window */\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof commonjsGlobal !== 'undefined') {\n root = commonjsGlobal;\n} else {\n root = module;\n}\n\nvar result = (0, _ponyfill2['default'])(root);\nexports['default'] = result;\n});\n\nvar index = index$1;\n\n// this file contains some hot JS modules systems stuff\n\nvar $$observable = index.default ? index.default : index;\n\nfunction fromESObservable(_observable) {\n var observable = _observable[$$observable] ? _observable[$$observable]() : _observable;\n return stream(function (emitter) {\n var unsub = observable.subscribe({\n error: function (error) {\n emitter.error(error);\n emitter.end();\n },\n next: function (value) {\n emitter.emit(value);\n },\n complete: function () {\n emitter.end();\n }\n });\n\n if (unsub.unsubscribe) {\n return function () {\n unsub.unsubscribe();\n };\n } else {\n return unsub;\n }\n }).setName('fromESObservable');\n}\n\nfunction ESObservable(observable) {\n this._observable = observable.takeErrors(1);\n}\n\nextend(ESObservable.prototype, {\n subscribe: function (observerOrOnNext, onError, onComplete) {\n var _this = this;\n\n var observer = typeof observerOrOnNext === 'function' ? { next: observerOrOnNext, error: onError, complete: onComplete } : observerOrOnNext;\n\n var fn = function (event) {\n if (event.type === END) {\n closed = true;\n }\n\n if (event.type === VALUE && observer.next) {\n observer.next(event.value);\n } else if (event.type === ERROR && observer.error) {\n observer.error(event.value);\n } else if (event.type === END && observer.complete) {\n observer.complete(event.value);\n }\n };\n\n this._observable.onAny(fn);\n var closed = false;\n\n var subscription = {\n unsubscribe: function () {\n closed = true;\n _this._observable.offAny(fn);\n },\n get closed() {\n return closed;\n }\n };\n return subscription;\n }\n});\n\n// Need to assign directly b/c Symbols aren't enumerable.\nESObservable.prototype[$$observable] = function () {\n return this;\n};\n\nfunction toESObservable() {\n return new ESObservable(this);\n}\n\nfunction collect(source, keys, values) {\n for (var prop in source) {\n if (source.hasOwnProperty(prop)) {\n keys.push(prop);\n values.push(source[prop]);\n }\n }\n}\n\nfunction defaultErrorsCombinator(errors) {\n var latestError = void 0;\n for (var i = 0; i < errors.length; i++) {\n if (errors[i] !== undefined) {\n if (latestError === undefined || latestError.index < errors[i].index) {\n latestError = errors[i];\n }\n }\n }\n return latestError.error;\n}\n\nfunction Combine(active, passive, combinator) {\n var _this = this;\n\n Stream.call(this);\n this._activeCount = active.length;\n this._sources = concat(active, passive);\n this._combinator = combinator;\n this._aliveCount = 0;\n this._latestValues = new Array(this._sources.length);\n this._latestErrors = new Array(this._sources.length);\n fillArray(this._latestValues, NOTHING);\n this._emitAfterActivation = false;\n this._endAfterActivation = false;\n this._latestErrorIndex = 0;\n\n this._$handlers = [];\n\n var _loop = function (i) {\n _this._$handlers.push(function (event) {\n return _this._handleAny(i, event);\n });\n };\n\n for (var i = 0; i < this._sources.length; i++) {\n _loop(i);\n }\n}\n\ninherit(Combine, Stream, {\n _name: 'combine',\n\n _onActivation: function () {\n this._aliveCount = this._activeCount;\n\n // we need to suscribe to _passive_ sources before _active_\n // (see https://github.com/kefirjs/kefir/issues/98)\n for (var i = this._activeCount; i < this._sources.length; i++) {\n this._sources[i].onAny(this._$handlers[i]);\n }\n for (var _i = 0; _i < this._activeCount; _i++) {\n this._sources[_i].onAny(this._$handlers[_i]);\n }\n\n if (this._emitAfterActivation) {\n this._emitAfterActivation = false;\n this._emitIfFull();\n }\n if (this._endAfterActivation) {\n this._emitEnd();\n }\n },\n _onDeactivation: function () {\n var length = this._sources.length,\n i = void 0;\n for (i = 0; i < length; i++) {\n this._sources[i].offAny(this._$handlers[i]);\n }\n },\n _emitIfFull: function () {\n var hasAllValues = true;\n var hasErrors = false;\n var length = this._latestValues.length;\n var valuesCopy = new Array(length);\n var errorsCopy = new Array(length);\n\n for (var i = 0; i < length; i++) {\n valuesCopy[i] = this._latestValues[i];\n errorsCopy[i] = this._latestErrors[i];\n\n if (valuesCopy[i] === NOTHING) {\n hasAllValues = false;\n }\n\n if (errorsCopy[i] !== undefined) {\n hasErrors = true;\n }\n }\n\n if (hasAllValues) {\n var combinator = this._combinator;\n this._emitValue(combinator(valuesCopy));\n }\n if (hasErrors) {\n this._emitError(defaultErrorsCombinator(errorsCopy));\n }\n },\n _handleAny: function (i, event) {\n if (event.type === VALUE || event.type === ERROR) {\n if (event.type === VALUE) {\n this._latestValues[i] = event.value;\n this._latestErrors[i] = undefined;\n }\n if (event.type === ERROR) {\n this._latestValues[i] = NOTHING;\n this._latestErrors[i] = {\n index: this._latestErrorIndex++,\n error: event.value\n };\n }\n\n if (i < this._activeCount) {\n if (this._activating) {\n this._emitAfterActivation = true;\n } else {\n this._emitIfFull();\n }\n }\n } else {\n // END\n\n if (i < this._activeCount) {\n this._aliveCount--;\n if (this._aliveCount === 0) {\n if (this._activating) {\n this._endAfterActivation = true;\n } else {\n this._emitEnd();\n }\n }\n }\n }\n },\n _clear: function () {\n Stream.prototype._clear.call(this);\n this._sources = null;\n this._latestValues = null;\n this._latestErrors = null;\n this._combinator = null;\n this._$handlers = null;\n }\n});\n\nfunction combineAsArray(active) {\n var passive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var combinator = arguments[2];\n\n if (!Array.isArray(passive)) {\n throw new Error('Combine can only combine active and passive collections of the same type.');\n }\n\n combinator = combinator ? spread(combinator, active.length + passive.length) : function (x) {\n return x;\n };\n return active.length === 0 ? never() : new Combine(active, passive, combinator);\n}\n\nfunction combineAsObject(active) {\n var passive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var combinator = arguments[2];\n\n if (typeof passive !== 'object' || Array.isArray(passive)) {\n throw new Error('Combine can only combine active and passive collections of the same type.');\n }\n\n var keys = [],\n activeObservables = [],\n passiveObservables = [];\n\n collect(active, keys, activeObservables);\n collect(passive, keys, passiveObservables);\n\n var objectify = function (values) {\n var event = {};\n for (var i = values.length - 1; 0 <= i; i--) {\n event[keys[i]] = values[i];\n }\n return combinator ? combinator(event) : event;\n };\n\n return activeObservables.length === 0 ? never() : new Combine(activeObservables, passiveObservables, objectify);\n}\n\nfunction combine(active, passive, combinator) {\n if (typeof passive === 'function') {\n combinator = passive;\n passive = undefined;\n }\n\n return Array.isArray(active) ? combineAsArray(active, passive, combinator) : combineAsObject(active, passive, combinator);\n}\n\nvar Observable$2 = {\n empty: function () {\n return never();\n },\n\n\n // Monoid based on merge() seems more useful than one based on concat().\n concat: function (a, b) {\n return a.merge(b);\n },\n of: function (x) {\n return constant(x);\n },\n map: function (fn, obs) {\n return obs.map(fn);\n },\n bimap: function (fnErr, fnVal, obs) {\n return obs.mapErrors(fnErr).map(fnVal);\n },\n\n\n // This ap strictly speaking incompatible with chain. If we derive ap from chain we get\n // different (not very useful) behavior. But spec requires that if method can be derived\n // it must have the same behavior as hand-written method. We intentionally violate the spec\n // in hope that it won't cause many troubles in practice. And in return we have more useful type.\n ap: function (obsFn, obsVal) {\n return combine([obsFn, obsVal], function (fn, val) {\n return fn(val);\n });\n },\n chain: function (fn, obs) {\n return obs.flatMap(fn);\n }\n};\n\n\n\nvar staticLand = Object.freeze({\n\tObservable: Observable$2\n});\n\nvar mixin = {\n _init: function (_ref) {\n var fn = _ref.fn;\n\n this._fn = fn;\n },\n _free: function () {\n this._fn = null;\n },\n _handleValue: function (x) {\n var fn = this._fn;\n this._emitValue(fn(x));\n }\n};\n\nvar S$7 = createStream('map', mixin);\nvar P$3 = createProperty('map', mixin);\n\nvar id = function (x) {\n return x;\n};\n\nfunction map$1(obs) {\n var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : id;\n\n return new (obs._ofSameType(S$7, P$3))(obs, { fn: fn });\n}\n\nvar mixin$1 = {\n _init: function (_ref) {\n var fn = _ref.fn;\n\n this._fn = fn;\n },\n _free: function () {\n this._fn = null;\n },\n _handleValue: function (x) {\n var fn = this._fn;\n if (fn(x)) {\n this._emitValue(x);\n }\n }\n};\n\nvar S$8 = createStream('filter', mixin$1);\nvar P$4 = createProperty('filter', mixin$1);\n\nvar id$1 = function (x) {\n return x;\n};\n\nfunction filter(obs) {\n var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : id$1;\n\n return new (obs._ofSameType(S$8, P$4))(obs, { fn: fn });\n}\n\nvar mixin$2 = {\n _init: function (_ref) {\n var n = _ref.n;\n\n this._n = n;\n if (n <= 0) {\n this._emitEnd();\n }\n },\n _handleValue: function (x) {\n if (this._n === 0) {\n return;\n }\n this._n--;\n this._emitValue(x);\n if (this._n === 0) {\n this._emitEnd();\n }\n }\n};\n\nvar S$9 = createStream('take', mixin$2);\nvar P$5 = createProperty('take', mixin$2);\n\nfunction take(obs, n) {\n return new (obs._ofSameType(S$9, P$5))(obs, { n: n });\n}\n\nvar mixin$3 = {\n _init: function (_ref) {\n var n = _ref.n;\n\n this._n = n;\n if (n <= 0) {\n this._emitEnd();\n }\n },\n _handleError: function (x) {\n if (this._n === 0) {\n return;\n }\n this._n--;\n this._emitError(x);\n if (this._n === 0) {\n this._emitEnd();\n }\n }\n};\n\nvar S$10 = createStream('takeErrors', mixin$3);\nvar P$6 = createProperty('takeErrors', mixin$3);\n\nfunction takeErrors(obs, n) {\n return new (obs._ofSameType(S$10, P$6))(obs, { n: n });\n}\n\nvar mixin$4 = {\n _init: function (_ref) {\n var fn = _ref.fn;\n\n this._fn = fn;\n },\n _free: function () {\n this._fn = null;\n },\n _handleValue: function (x) {\n var fn = this._fn;\n if (fn(x)) {\n this._emitValue(x);\n } else {\n this._emitEnd();\n }\n }\n};\n\nvar S$11 = createStream('takeWhile', mixin$4);\nvar P$7 = createProperty('takeWhile', mixin$4);\n\nvar id$2 = function (x) {\n return x;\n};\n\nfunction takeWhile(obs) {\n var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : id$2;\n\n return new (obs._ofSameType(S$11, P$7))(obs, { fn: fn });\n}\n\nvar mixin$5 = {\n _init: function () {\n this._lastValue = NOTHING;\n },\n _free: function () {\n this._lastValue = null;\n },\n _handleValue: function (x) {\n this._lastValue = x;\n },\n _handleEnd: function () {\n if (this._lastValue !== NOTHING) {\n this._emitValue(this._lastValue);\n }\n this._emitEnd();\n }\n};\n\nvar S$12 = createStream('last', mixin$5);\nvar P$8 = createProperty('last', mixin$5);\n\nfunction last(obs) {\n return new (obs._ofSameType(S$12, P$8))(obs);\n}\n\nvar mixin$6 = {\n _init: function (_ref) {\n var n = _ref.n;\n\n this._n = Math.max(0, n);\n },\n _handleValue: function (x) {\n if (this._n === 0) {\n this._emitValue(x);\n } else {\n this._n--;\n }\n }\n};\n\nvar S$13 = createStream('skip', mixin$6);\nvar P$9 = createProperty('skip', mixin$6);\n\nfunction skip(obs, n) {\n return new (obs._ofSameType(S$13, P$9))(obs, { n: n });\n}\n\nvar mixin$7 = {\n _init: function (_ref) {\n var fn = _ref.fn;\n\n this._fn = fn;\n },\n _free: function () {\n this._fn = null;\n },\n _handleValue: function (x) {\n var fn = this._fn;\n if (this._fn !== null && !fn(x)) {\n this._fn = null;\n }\n if (this._fn === null) {\n this._emitValue(x);\n }\n }\n};\n\nvar S$14 = createStream('skipWhile', mixin$7);\nvar P$10 = createProperty('skipWhile', mixin$7);\n\nvar id$3 = function (x) {\n return x;\n};\n\nfunction skipWhile(obs) {\n var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : id$3;\n\n return new (obs._ofSameType(S$14, P$10))(obs, { fn: fn });\n}\n\nvar mixin$8 = {\n _init: function (_ref) {\n var fn = _ref.fn;\n\n this._fn = fn;\n this._prev = NOTHING;\n },\n _free: function () {\n this._fn = null;\n this._prev = null;\n },\n _handleValue: function (x) {\n var fn = this._fn;\n if (this._prev === NOTHING || !fn(this._prev, x)) {\n this._prev = x;\n this._emitValue(x);\n }\n }\n};\n\nvar S$15 = createStream('skipDuplicates', mixin$8);\nvar P$11 = createProperty('skipDuplicates', mixin$8);\n\nvar eq = function (a, b) {\n return a === b;\n};\n\nfunction skipDuplicates(obs) {\n var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : eq;\n\n return new (obs._ofSameType(S$15, P$11))(obs, { fn: fn });\n}\n\nvar mixin$9 = {\n _init: function (_ref) {\n var fn = _ref.fn,\n seed = _ref.seed;\n\n this._fn = fn;\n this._prev = seed;\n },\n _free: function () {\n this._prev = null;\n this._fn = null;\n },\n _handleValue: function (x) {\n if (this._prev !== NOTHING) {\n var fn = this._fn;\n this._emitValue(fn(this._prev, x));\n }\n this._prev = x;\n }\n};\n\nvar S$16 = createStream('diff', mixin$9);\nvar P$12 = createProperty('diff', mixin$9);\n\nfunction defaultFn(a, b) {\n return [a, b];\n}\n\nfunction diff(obs, fn) {\n var seed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : NOTHING;\n\n return new (obs._ofSameType(S$16, P$12))(obs, { fn: fn || defaultFn, seed: seed });\n}\n\nvar P$13 = createProperty('scan', {\n _init: function (_ref) {\n var fn = _ref.fn,\n seed = _ref.seed;\n\n this._fn = fn;\n this._seed = seed;\n if (seed !== NOTHING) {\n this._emitValue(seed);\n }\n },\n _free: function () {\n this._fn = null;\n this._seed = null;\n },\n _handleValue: function (x) {\n var fn = this._fn;\n if (this._currentEvent === null || this._currentEvent.type === ERROR) {\n this._emitValue(this._seed === NOTHING ? x : fn(this._seed, x));\n } else {\n this._emitValue(fn(this._currentEvent.value, x));\n }\n }\n});\n\nfunction scan(obs, fn) {\n var seed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : NOTHING;\n\n return new P$13(obs, { fn: fn, seed: seed });\n}\n\nvar mixin$10 = {\n _init: function (_ref) {\n var fn = _ref.fn;\n\n this._fn = fn;\n },\n _free: function () {\n this._fn = null;\n },\n _handleValue: function (x) {\n var fn = this._fn;\n var xs = fn(x);\n for (var i = 0; i < xs.length; i++) {\n this._emitValue(xs[i]);\n }\n }\n};\n\nvar S$17 = createStream('flatten', mixin$10);\n\nvar id$4 = function (x) {\n return x;\n};\n\nfunction flatten(obs) {\n var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : id$4;\n\n return new S$17(obs, { fn: fn });\n}\n\nvar END_MARKER = {};\n\nvar mixin$11 = {\n _init: function (_ref) {\n var _this = this;\n\n var wait = _ref.wait;\n\n this._wait = Math.max(0, wait);\n this._buff = [];\n this._$shiftBuff = function () {\n var value = _this._buff.shift();\n if (value === END_MARKER) {\n _this._emitEnd();\n } else {\n _this._emitValue(value);\n }\n };\n },\n _free: function () {\n this._buff = null;\n this._$shiftBuff = null;\n },\n _handleValue: function (x) {\n if (this._activating) {\n this._emitValue(x);\n } else {\n this._buff.push(x);\n setTimeout(this._$shiftBuff, this._wait);\n }\n },\n _handleEnd: function () {\n if (this._activating) {\n this._emitEnd();\n } else {\n this._buff.push(END_MARKER);\n setTimeout(this._$shiftBuff, this._wait);\n }\n }\n};\n\nvar S$18 = createStream('delay', mixin$11);\nvar P$14 = createProperty('delay', mixin$11);\n\nfunction delay(obs, wait) {\n return new (obs._ofSameType(S$18, P$14))(obs, { wait: wait });\n}\n\nvar now = Date.now ? function () {\n return Date.now();\n} : function () {\n return new Date().getTime();\n};\n\nvar mixin$12 = {\n _init: function (_ref) {\n var _this = this;\n\n var wait = _ref.wait,\n leading = _ref.leading,\n trailing = _ref.trailing;\n\n this._wait = Math.max(0, wait);\n this._leading = leading;\n this._trailing = trailing;\n this._trailingValue = null;\n this._timeoutId = null;\n this._endLater = false;\n this._lastCallTime = 0;\n this._$trailingCall = function () {\n return _this._trailingCall();\n };\n },\n _free: function () {\n this._trailingValue = null;\n this._$trailingCall = null;\n },\n _handleValue: function (x) {\n if (this._activating) {\n this._emitValue(x);\n } else {\n var curTime = now();\n if (this._lastCallTime === 0 && !this._leading) {\n this._lastCallTime = curTime;\n }\n var remaining = this._wait - (curTime - this._lastCallTime);\n if (remaining <= 0) {\n this._cancelTrailing();\n this._lastCallTime = curTime;\n this._emitValue(x);\n } else if (this._trailing) {\n this._cancelTrailing();\n this._trailingValue = x;\n this._timeoutId = setTimeout(this._$trailingCall, remaining);\n }\n }\n },\n _handleEnd: function () {\n if (this._activating) {\n this._emitEnd();\n } else {\n if (this._timeoutId) {\n this._endLater = true;\n } else {\n this._emitEnd();\n }\n }\n },\n _cancelTrailing: function () {\n if (this._timeoutId !== null) {\n clearTimeout(this._timeoutId);\n this._timeoutId = null;\n }\n },\n _trailingCall: function () {\n this._emitValue(this._trailingValue);\n this._timeoutId = null;\n this._trailingValue = null;\n this._lastCallTime = !this._leading ? 0 : now();\n if (this._endLater) {\n this._emitEnd();\n }\n }\n};\n\nvar S$19 = createStream('throttle', mixin$12);\nvar P$15 = createProperty('throttle', mixin$12);\n\nfunction throttle(obs, wait) {\n var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref2$leading = _ref2.leading,\n leading = _ref2$leading === undefined ? true : _ref2$leading,\n _ref2$trailing = _ref2.trailing,\n trailing = _ref2$trailing === undefined ? true : _ref2$trailing;\n\n return new (obs._ofSameType(S$19, P$15))(obs, { wait: wait, leading: leading, trailing: trailing });\n}\n\nvar mixin$13 = {\n _init: function (_ref) {\n var _this = this;\n\n var wait = _ref.wait,\n immediate = _ref.immediate;\n\n this._wait = Math.max(0, wait);\n this._immediate = immediate;\n this._lastAttempt = 0;\n this._timeoutId = null;\n this._laterValue = null;\n this._endLater = false;\n this._$later = function () {\n return _this._later();\n };\n },\n _free: function () {\n this._laterValue = null;\n this._$later = null;\n },\n _handleValue: function (x) {\n if (this._activating) {\n this._emitValue(x);\n } else {\n this._lastAttempt = now();\n if (this._immediate && !this._timeoutId) {\n this._emitValue(x);\n }\n if (!this._timeoutId) {\n this._timeoutId = setTimeout(this._$later, this._wait);\n }\n if (!this._immediate) {\n this._laterValue = x;\n }\n }\n },\n _handleEnd: function () {\n if (this._activating) {\n this._emitEnd();\n } else {\n if (this._timeoutId && !this._immediate) {\n this._endLater = true;\n } else {\n this._emitEnd();\n }\n }\n },\n _later: function () {\n var last = now() - this._lastAttempt;\n if (last < this._wait && last >= 0) {\n this._timeoutId = setTimeout(this._$later, this._wait - last);\n } else {\n this._timeoutId = null;\n if (!this._immediate) {\n this._emitValue(this._laterValue);\n this._laterValue = null;\n }\n if (this._endLater) {\n this._emitEnd();\n }\n }\n }\n};\n\nvar S$20 = createStream('debounce', mixin$13);\nvar P$16 = createProperty('debounce', mixin$13);\n\nfunction debounce(obs, wait) {\n var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref2$immediate = _ref2.immediate,\n immediate = _ref2$immediate === undefined ? false : _ref2$immediate;\n\n return new (obs._ofSameType(S$20, P$16))(obs, { wait: wait, immediate: immediate });\n}\n\nvar mixin$14 = {\n _init: function (_ref) {\n var fn = _ref.fn;\n\n this._fn = fn;\n },\n _free: function () {\n this._fn = null;\n },\n _handleError: function (x) {\n var fn = this._fn;\n this._emitError(fn(x));\n }\n};\n\nvar S$21 = createStream('mapErrors', mixin$14);\nvar P$17 = createProperty('mapErrors', mixin$14);\n\nvar id$5 = function (x) {\n return x;\n};\n\nfunction mapErrors(obs) {\n var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : id$5;\n\n return new (obs._ofSameType(S$21, P$17))(obs, { fn: fn });\n}\n\nvar mixin$15 = {\n _init: function (_ref) {\n var fn = _ref.fn;\n\n this._fn = fn;\n },\n _free: function () {\n this._fn = null;\n },\n _handleError: function (x) {\n var fn = this._fn;\n if (fn(x)) {\n this._emitError(x);\n }\n }\n};\n\nvar S$22 = createStream('filterErrors', mixin$15);\nvar P$18 = createProperty('filterErrors', mixin$15);\n\nvar id$6 = function (x) {\n return x;\n};\n\nfunction filterErrors(obs) {\n var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : id$6;\n\n return new (obs._ofSameType(S$22, P$18))(obs, { fn: fn });\n}\n\nvar mixin$16 = {\n _handleValue: function () {}\n};\n\nvar S$23 = createStream('ignoreValues', mixin$16);\nvar P$19 = createProperty('ignoreValues', mixin$16);\n\nfunction ignoreValues(obs) {\n return new (obs._ofSameType(S$23, P$19))(obs);\n}\n\nvar mixin$17 = {\n _handleError: function () {}\n};\n\nvar S$24 = createStream('ignoreErrors', mixin$17);\nvar P$20 = createProperty('ignoreErrors', mixin$17);\n\nfunction ignoreErrors(obs) {\n return new (obs._ofSameType(S$24, P$20))(obs);\n}\n\nvar mixin$18 = {\n _handleEnd: function () {}\n};\n\nvar S$25 = createStream('ignoreEnd', mixin$18);\nvar P$21 = createProperty('ignoreEnd', mixin$18);\n\nfunction ignoreEnd(obs) {\n return new (obs._ofSameType(S$25, P$21))(obs);\n}\n\nvar mixin$19 = {\n _init: function (_ref) {\n var fn = _ref.fn;\n\n this._fn = fn;\n },\n _free: function () {\n this._fn = null;\n },\n _handleEnd: function () {\n var fn = this._fn;\n this._emitValue(fn());\n this._emitEnd();\n }\n};\n\nvar S$26 = createStream('beforeEnd', mixin$19);\nvar P$22 = createProperty('beforeEnd', mixin$19);\n\nfunction beforeEnd(obs, fn) {\n return new (obs._ofSameType(S$26, P$22))(obs, { fn: fn });\n}\n\nvar mixin$20 = {\n _init: function (_ref) {\n var min = _ref.min,\n max = _ref.max;\n\n this._max = max;\n this._min = min;\n this._buff = [];\n },\n _free: function () {\n this._buff = null;\n },\n _handleValue: function (x) {\n this._buff = slide(this._buff, x, this._max);\n if (this._buff.length >= this._min) {\n this._emitValue(this._buff);\n }\n }\n};\n\nvar S$27 = createStream('slidingWindow', mixin$20);\nvar P$23 = createProperty('slidingWindow', mixin$20);\n\nfunction slidingWindow(obs, max) {\n var min = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n\n return new (obs._ofSameType(S$27, P$23))(obs, { min: min, max: max });\n}\n\nvar mixin$21 = {\n _init: function (_ref) {\n var fn = _ref.fn,\n flushOnEnd = _ref.flushOnEnd;\n\n this._fn = fn;\n this._flushOnEnd = flushOnEnd;\n this._buff = [];\n },\n _free: function () {\n this._buff = null;\n },\n _flush: function () {\n if (this._buff !== null && this._buff.length !== 0) {\n this._emitValue(this._buff);\n this._buff = [];\n }\n },\n _handleValue: function (x) {\n this._buff.push(x);\n var fn = this._fn;\n if (!fn(x)) {\n this._flush();\n }\n },\n _handleEnd: function () {\n if (this._flushOnEnd) {\n this._flush();\n }\n this._emitEnd();\n }\n};\n\nvar S$28 = createStream('bufferWhile', mixin$21);\nvar P$24 = createProperty('bufferWhile', mixin$21);\n\nvar id$7 = function (x) {\n return x;\n};\n\nfunction bufferWhile(obs, fn) {\n var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref2$flushOnEnd = _ref2.flushOnEnd,\n flushOnEnd = _ref2$flushOnEnd === undefined ? true : _ref2$flushOnEnd;\n\n return new (obs._ofSameType(S$28, P$24))(obs, { fn: fn || id$7, flushOnEnd: flushOnEnd });\n}\n\nvar mixin$22 = {\n _init: function (_ref) {\n var count = _ref.count,\n flushOnEnd = _ref.flushOnEnd;\n\n this._count = count;\n this._flushOnEnd = flushOnEnd;\n this._buff = [];\n },\n _free: function () {\n this._buff = null;\n },\n _flush: function () {\n if (this._buff !== null && this._buff.length !== 0) {\n this._emitValue(this._buff);\n this._buff = [];\n }\n },\n _handleValue: function (x) {\n this._buff.push(x);\n if (this._buff.length >= this._count) {\n this._flush();\n }\n },\n _handleEnd: function () {\n if (this._flushOnEnd) {\n this._flush();\n }\n this._emitEnd();\n }\n};\n\nvar S$29 = createStream('bufferWithCount', mixin$22);\nvar P$25 = createProperty('bufferWithCount', mixin$22);\n\nfunction bufferWhile$1(obs, count) {\n var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref2$flushOnEnd = _ref2.flushOnEnd,\n flushOnEnd = _ref2$flushOnEnd === undefined ? true : _ref2$flushOnEnd;\n\n return new (obs._ofSameType(S$29, P$25))(obs, { count: count, flushOnEnd: flushOnEnd });\n}\n\nvar mixin$23 = {\n _init: function (_ref) {\n var _this = this;\n\n var wait = _ref.wait,\n count = _ref.count,\n flushOnEnd = _ref.flushOnEnd;\n\n this._wait = wait;\n this._count = count;\n this._flushOnEnd = flushOnEnd;\n this._intervalId = null;\n this._$onTick = function () {\n return _this._flush();\n };\n this._buff = [];\n },\n _free: function () {\n this._$onTick = null;\n this._buff = null;\n },\n _flush: function () {\n if (this._buff !== null) {\n this._emitValue(this._buff);\n this._buff = [];\n }\n },\n _handleValue: function (x) {\n this._buff.push(x);\n if (this._buff.length >= this._count) {\n clearInterval(this._intervalId);\n this._flush();\n this._intervalId = setInterval(this._$onTick, this._wait);\n }\n },\n _handleEnd: function () {\n if (this._flushOnEnd && this._buff.length !== 0) {\n this._flush();\n }\n this._emitEnd();\n },\n _onActivation: function () {\n this._intervalId = setInterval(this._$onTick, this._wait);\n this._source.onAny(this._$handleAny); // copied from patterns/one-source\n },\n _onDeactivation: function () {\n if (this._intervalId !== null) {\n clearInterval(this._intervalId);\n this._intervalId = null;\n }\n this._source.offAny(this._$handleAny); // copied from patterns/one-source\n }\n};\n\nvar S$30 = createStream('bufferWithTimeOrCount', mixin$23);\nvar P$26 = createProperty('bufferWithTimeOrCount', mixin$23);\n\nfunction bufferWithTimeOrCount(obs, wait, count) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$flushOnEnd = _ref2.flushOnEnd,\n flushOnEnd = _ref2$flushOnEnd === undefined ? true : _ref2$flushOnEnd;\n\n return new (obs._ofSameType(S$30, P$26))(obs, { wait: wait, count: count, flushOnEnd: flushOnEnd });\n}\n\nfunction xformForObs(obs) {\n return {\n '@@transducer/step': function (res, input) {\n obs._emitValue(input);\n return null;\n },\n '@@transducer/result': function () {\n obs._emitEnd();\n return null;\n }\n };\n}\n\nvar mixin$24 = {\n _init: function (_ref) {\n var transducer = _ref.transducer;\n\n this._xform = transducer(xformForObs(this));\n },\n _free: function () {\n this._xform = null;\n },\n _handleValue: function (x) {\n if (this._xform['@@transducer/step'](null, x) !== null) {\n this._xform['@@transducer/result'](null);\n }\n },\n _handleEnd: function () {\n this._xform['@@transducer/result'](null);\n }\n};\n\nvar S$31 = createStream('transduce', mixin$24);\nvar P$27 = createProperty('transduce', mixin$24);\n\nfunction transduce(obs, transducer) {\n return new (obs._ofSameType(S$31, P$27))(obs, { transducer: transducer });\n}\n\nvar mixin$25 = {\n _init: function (_ref) {\n var fn = _ref.fn;\n\n this._handler = fn;\n this._emitter = emitter(this);\n },\n _free: function () {\n this._handler = null;\n this._emitter = null;\n },\n _handleAny: function (event) {\n this._handler(this._emitter, event);\n }\n};\n\nvar S$32 = createStream('withHandler', mixin$25);\nvar P$28 = createProperty('withHandler', mixin$25);\n\nfunction withHandler(obs, fn) {\n return new (obs._ofSameType(S$32, P$28))(obs, { fn: fn });\n}\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction Zip(sources, combinator) {\n var _this = this;\n\n Stream.call(this);\n\n this._buffers = map(sources, function (source) {\n return isArray(source) ? cloneArray(source) : [];\n });\n this._sources = map(sources, function (source) {\n return isArray(source) ? never() : source;\n });\n\n this._combinator = combinator ? spread(combinator, this._sources.length) : function (x) {\n return x;\n };\n this._aliveCount = 0;\n\n this._$handlers = [];\n\n var _loop = function (i) {\n _this._$handlers.push(function (event) {\n return _this._handleAny(i, event);\n });\n };\n\n for (var i = 0; i < this._sources.length; i++) {\n _loop(i);\n }\n}\n\ninherit(Zip, Stream, {\n _name: 'zip',\n\n _onActivation: function () {\n // if all sources are arrays\n while (this._isFull()) {\n this._emit();\n }\n\n var length = this._sources.length;\n this._aliveCount = length;\n for (var i = 0; i < length && this._active; i++) {\n this._sources[i].onAny(this._$handlers[i]);\n }\n },\n _onDeactivation: function () {\n for (var i = 0; i < this._sources.length; i++) {\n this._sources[i].offAny(this._$handlers[i]);\n }\n },\n _emit: function () {\n var values = new Array(this._buffers.length);\n for (var i = 0; i < this._buffers.length; i++) {\n values[i] = this._buffers[i].shift();\n }\n var combinator = this._combinator;\n this._emitValue(combinator(values));\n },\n _isFull: function () {\n for (var i = 0; i < this._buffers.length; i++) {\n if (this._buffers[i].length === 0) {\n return false;\n }\n }\n return true;\n },\n _handleAny: function (i, event) {\n if (event.type === VALUE) {\n this._buffers[i].push(event.value);\n if (this._isFull()) {\n this._emit();\n }\n }\n if (event.type === ERROR) {\n this._emitError(event.value);\n }\n if (event.type === END) {\n this._aliveCount--;\n if (this._aliveCount === 0) {\n this._emitEnd();\n }\n }\n },\n _clear: function () {\n Stream.prototype._clear.call(this);\n this._sources = null;\n this._buffers = null;\n this._combinator = null;\n this._$handlers = null;\n }\n});\n\nfunction zip(observables, combinator /* Function | falsey */) {\n return observables.length === 0 ? never() : new Zip(observables, combinator);\n}\n\nvar id$8 = function (x) {\n return x;\n};\n\nfunction AbstractPool() {\n var _this = this;\n\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$queueLim = _ref.queueLim,\n queueLim = _ref$queueLim === undefined ? 0 : _ref$queueLim,\n _ref$concurLim = _ref.concurLim,\n concurLim = _ref$concurLim === undefined ? -1 : _ref$concurLim,\n _ref$drop = _ref.drop,\n drop = _ref$drop === undefined ? 'new' : _ref$drop;\n\n Stream.call(this);\n\n this._queueLim = queueLim < 0 ? -1 : queueLim;\n this._concurLim = concurLim < 0 ? -1 : concurLim;\n this._drop = drop;\n this._queue = [];\n this._curSources = [];\n this._$handleSubAny = function (event) {\n return _this._handleSubAny(event);\n };\n this._$endHandlers = [];\n this._currentlyAdding = null;\n\n if (this._concurLim === 0) {\n this._emitEnd();\n }\n}\n\ninherit(AbstractPool, Stream, {\n _name: 'abstractPool',\n\n _add: function (obj, toObs /* Function | falsey */) {\n toObs = toObs || id$8;\n if (this._concurLim === -1 || this._curSources.length < this._concurLim) {\n this._addToCur(toObs(obj));\n } else {\n if (this._queueLim === -1 || this._queue.length < this._queueLim) {\n this._addToQueue(toObs(obj));\n } else if (this._drop === 'old') {\n this._removeOldest();\n this._add(obj, toObs);\n }\n }\n },\n _addAll: function (obss) {\n var _this2 = this;\n\n forEach(obss, function (obs) {\n return _this2._add(obs);\n });\n },\n _remove: function (obs) {\n if (this._removeCur(obs) === -1) {\n this._removeQueue(obs);\n }\n },\n _addToQueue: function (obs) {\n this._queue = concat(this._queue, [obs]);\n },\n _addToCur: function (obs) {\n if (this._active) {\n // HACK:\n //\n // We have two optimizations for cases when `obs` is ended. We don't want\n // to add such observable to the list, but only want to emit events\n // from it (if it has some).\n //\n // Instead of this hacks, we could just did following,\n // but it would be 5-8 times slower:\n //\n // this._curSources = concat(this._curSources, [obs]);\n // this._subscribe(obs);\n //\n\n // #1\n // This one for cases when `obs` already ended\n // e.g., Kefir.constant() or Kefir.never()\n if (!obs._alive) {\n if (obs._currentEvent) {\n this._emit(obs._currentEvent.type, obs._currentEvent.value);\n }\n // The _emit above could have caused this stream to end.\n if (this._active) {\n if (this._queue.length !== 0) {\n this._pullQueue();\n } else if (this._curSources.length === 0) {\n this._onEmpty();\n }\n }\n return;\n }\n\n // #2\n // This one is for cases when `obs` going to end synchronously on\n // first subscriber e.g., Kefir.stream(em => {em.emit(1); em.end()})\n this._currentlyAdding = obs;\n obs.onAny(this._$handleSubAny);\n this._currentlyAdding = null;\n if (obs._alive) {\n this._curSources = concat(this._curSources, [obs]);\n if (this._active) {\n this._subToEnd(obs);\n }\n }\n } else {\n this._curSources = concat(this._curSources, [obs]);\n }\n },\n _subToEnd: function (obs) {\n var _this3 = this;\n\n var onEnd = function () {\n return _this3._removeCur(obs);\n };\n this._$endHandlers.push({ obs: obs, handler: onEnd });\n obs.onEnd(onEnd);\n },\n _subscribe: function (obs) {\n obs.onAny(this._$handleSubAny);\n\n // it can become inactive in responce of subscribing to `obs.onAny` above\n if (this._active) {\n this._subToEnd(obs);\n }\n },\n _unsubscribe: function (obs) {\n obs.offAny(this._$handleSubAny);\n\n var onEndI = findByPred(this._$endHandlers, function (obj) {\n return obj.obs === obs;\n });\n if (onEndI !== -1) {\n obs.offEnd(this._$endHandlers[onEndI].handler);\n this._$endHandlers.splice(onEndI, 1);\n }\n },\n _handleSubAny: function (event) {\n if (event.type === VALUE) {\n this._emitValue(event.value);\n } else if (event.type === ERROR) {\n this._emitError(event.value);\n }\n },\n _removeQueue: function (obs) {\n var index = find(this._queue, obs);\n this._queue = remove(this._queue, index);\n return index;\n },\n _removeCur: function (obs) {\n if (this._active) {\n this._unsubscribe(obs);\n }\n var index = find(this._curSources, obs);\n this._curSources = remove(this._curSources, index);\n if (index !== -1) {\n if (this._queue.length !== 0) {\n this._pullQueue();\n } else if (this._curSources.length === 0) {\n this._onEmpty();\n }\n }\n return index;\n },\n _removeOldest: function () {\n this._removeCur(this._curSources[0]);\n },\n _pullQueue: function () {\n if (this._queue.length !== 0) {\n this._queue = cloneArray(this._queue);\n this._addToCur(this._queue.shift());\n }\n },\n _onActivation: function () {\n for (var i = 0, sources = this._curSources; i < sources.length && this._active; i++) {\n this._subscribe(sources[i]);\n }\n },\n _onDeactivation: function () {\n for (var i = 0, sources = this._curSources; i < sources.length; i++) {\n this._unsubscribe(sources[i]);\n }\n if (this._currentlyAdding !== null) {\n this._unsubscribe(this._currentlyAdding);\n }\n },\n _isEmpty: function () {\n return this._curSources.length === 0;\n },\n _onEmpty: function () {},\n _clear: function () {\n Stream.prototype._clear.call(this);\n this._queue = null;\n this._curSources = null;\n this._$handleSubAny = null;\n this._$endHandlers = null;\n }\n});\n\nfunction Merge(sources) {\n AbstractPool.call(this);\n this._addAll(sources);\n this._initialised = true;\n}\n\ninherit(Merge, AbstractPool, {\n _name: 'merge',\n\n _onEmpty: function () {\n if (this._initialised) {\n this._emitEnd();\n }\n }\n});\n\nfunction merge(observables) {\n return observables.length === 0 ? never() : new Merge(observables);\n}\n\nfunction S$33(generator) {\n var _this = this;\n\n Stream.call(this);\n this._generator = generator;\n this._source = null;\n this._inLoop = false;\n this._iteration = 0;\n this._$handleAny = function (event) {\n return _this._handleAny(event);\n };\n}\n\ninherit(S$33, Stream, {\n _name: 'repeat',\n\n _handleAny: function (event) {\n if (event.type === END) {\n this._source = null;\n this._getSource();\n } else {\n this._emit(event.type, event.value);\n }\n },\n _getSource: function () {\n if (!this._inLoop) {\n this._inLoop = true;\n var generator = this._generator;\n while (this._source === null && this._alive && this._active) {\n this._source = generator(this._iteration++);\n if (this._source) {\n this._source.onAny(this._$handleAny);\n } else {\n this._emitEnd();\n }\n }\n this._inLoop = false;\n }\n },\n _onActivation: function () {\n if (this._source) {\n this._source.onAny(this._$handleAny);\n } else {\n this._getSource();\n }\n },\n _onDeactivation: function () {\n if (this._source) {\n this._source.offAny(this._$handleAny);\n }\n },\n _clear: function () {\n Stream.prototype._clear.call(this);\n this._generator = null;\n this._source = null;\n this._$handleAny = null;\n }\n});\n\nvar repeat = function (generator) {\n return new S$33(generator);\n};\n\nfunction concat$1(observables) {\n return repeat(function (index) {\n return observables.length > index ? observables[index] : false;\n }).setName('concat');\n}\n\nfunction Pool() {\n AbstractPool.call(this);\n}\n\ninherit(Pool, AbstractPool, {\n _name: 'pool',\n\n plug: function (obs) {\n this._add(obs);\n return this;\n },\n unplug: function (obs) {\n this._remove(obs);\n return this;\n }\n});\n\nfunction FlatMap(source, fn, options) {\n var _this = this;\n\n AbstractPool.call(this, options);\n this._source = source;\n this._fn = fn;\n this._mainEnded = false;\n this._lastCurrent = null;\n this._$handleMain = function (event) {\n return _this._handleMain(event);\n };\n}\n\ninherit(FlatMap, AbstractPool, {\n _onActivation: function () {\n AbstractPool.prototype._onActivation.call(this);\n if (this._active) {\n this._source.onAny(this._$handleMain);\n }\n },\n _onDeactivation: function () {\n AbstractPool.prototype._onDeactivation.call(this);\n this._source.offAny(this._$handleMain);\n this._hadNoEvSinceDeact = true;\n },\n _handleMain: function (event) {\n if (event.type === VALUE) {\n // Is latest value before deactivation survived, and now is 'current' on this activation?\n // We don't want to handle such values, to prevent to constantly add\n // same observale on each activation/deactivation when our main source\n // is a `Kefir.conatant()` for example.\n var sameCurr = this._activating && this._hadNoEvSinceDeact && this._lastCurrent === event.value;\n if (!sameCurr) {\n this._add(event.value, this._fn);\n }\n this._lastCurrent = event.value;\n this._hadNoEvSinceDeact = false;\n }\n\n if (event.type === ERROR) {\n this._emitError(event.value);\n }\n\n if (event.type === END) {\n if (this._isEmpty()) {\n this._emitEnd();\n } else {\n this._mainEnded = true;\n }\n }\n },\n _onEmpty: function () {\n if (this._mainEnded) {\n this._emitEnd();\n }\n },\n _clear: function () {\n AbstractPool.prototype._clear.call(this);\n this._source = null;\n this._lastCurrent = null;\n this._$handleMain = null;\n }\n});\n\nfunction FlatMapErrors(source, fn) {\n FlatMap.call(this, source, fn);\n}\n\ninherit(FlatMapErrors, FlatMap, {\n // Same as in FlatMap, only VALUE/ERROR flipped\n _handleMain: function (event) {\n if (event.type === ERROR) {\n var sameCurr = this._activating && this._hadNoEvSinceDeact && this._lastCurrent === event.value;\n if (!sameCurr) {\n this._add(event.value, this._fn);\n }\n this._lastCurrent = event.value;\n this._hadNoEvSinceDeact = false;\n }\n\n if (event.type === VALUE) {\n this._emitValue(event.value);\n }\n\n if (event.type === END) {\n if (this._isEmpty()) {\n this._emitEnd();\n } else {\n this._mainEnded = true;\n }\n }\n }\n});\n\nfunction createConstructor$1(BaseClass, name) {\n return function AnonymousObservable(primary, secondary, options) {\n var _this = this;\n\n BaseClass.call(this);\n this._primary = primary;\n this._secondary = secondary;\n this._name = primary._name + '.' + name;\n this._lastSecondary = NOTHING;\n this._$handleSecondaryAny = function (event) {\n return _this._handleSecondaryAny(event);\n };\n this._$handlePrimaryAny = function (event) {\n return _this._handlePrimaryAny(event);\n };\n this._init(options);\n };\n}\n\nfunction createClassMethods$1(BaseClass) {\n return {\n _init: function () {},\n _free: function () {},\n _handlePrimaryValue: function (x) {\n this._emitValue(x);\n },\n _handlePrimaryError: function (x) {\n this._emitError(x);\n },\n _handlePrimaryEnd: function () {\n this._emitEnd();\n },\n _handleSecondaryValue: function (x) {\n this._lastSecondary = x;\n },\n _handleSecondaryError: function (x) {\n this._emitError(x);\n },\n _handleSecondaryEnd: function () {},\n _handlePrimaryAny: function (event) {\n switch (event.type) {\n case VALUE:\n return this._handlePrimaryValue(event.value);\n case ERROR:\n return this._handlePrimaryError(event.value);\n case END:\n return this._handlePrimaryEnd(event.value);\n }\n },\n _handleSecondaryAny: function (event) {\n switch (event.type) {\n case VALUE:\n return this._handleSecondaryValue(event.value);\n case ERROR:\n return this._handleSecondaryError(event.value);\n case END:\n this._handleSecondaryEnd(event.value);\n this._removeSecondary();\n }\n },\n _removeSecondary: function () {\n if (this._secondary !== null) {\n this._secondary.offAny(this._$handleSecondaryAny);\n this._$handleSecondaryAny = null;\n this._secondary = null;\n }\n },\n _onActivation: function () {\n if (this._secondary !== null) {\n this._secondary.onAny(this._$handleSecondaryAny);\n }\n if (this._active) {\n this._primary.onAny(this._$handlePrimaryAny);\n }\n },\n _onDeactivation: function () {\n if (this._secondary !== null) {\n this._secondary.offAny(this._$handleSecondaryAny);\n }\n this._primary.offAny(this._$handlePrimaryAny);\n },\n _clear: function () {\n BaseClass.prototype._clear.call(this);\n this._primary = null;\n this._secondary = null;\n this._lastSecondary = null;\n this._$handleSecondaryAny = null;\n this._$handlePrimaryAny = null;\n this._free();\n }\n };\n}\n\nfunction createStream$1(name, mixin) {\n var S = createConstructor$1(Stream, name);\n inherit(S, Stream, createClassMethods$1(Stream), mixin);\n return S;\n}\n\nfunction createProperty$1(name, mixin) {\n var P = createConstructor$1(Property, name);\n inherit(P, Property, createClassMethods$1(Property), mixin);\n return P;\n}\n\nvar mixin$26 = {\n _handlePrimaryValue: function (x) {\n if (this._lastSecondary !== NOTHING && this._lastSecondary) {\n this._emitValue(x);\n }\n },\n _handleSecondaryEnd: function () {\n if (this._lastSecondary === NOTHING || !this._lastSecondary) {\n this._emitEnd();\n }\n }\n};\n\nvar S$34 = createStream$1('filterBy', mixin$26);\nvar P$29 = createProperty$1('filterBy', mixin$26);\n\nfunction filterBy(primary, secondary) {\n return new (primary._ofSameType(S$34, P$29))(primary, secondary);\n}\n\nvar id2 = function (_, x) {\n return x;\n};\n\nfunction sampledBy(passive, active, combinator) {\n var _combinator = combinator ? function (a, b) {\n return combinator(b, a);\n } : id2;\n return combine([active], [passive], _combinator).setName(passive, 'sampledBy');\n}\n\nvar mixin$27 = {\n _handlePrimaryValue: function (x) {\n if (this._lastSecondary !== NOTHING) {\n this._emitValue(x);\n }\n },\n _handleSecondaryEnd: function () {\n if (this._lastSecondary === NOTHING) {\n this._emitEnd();\n }\n }\n};\n\nvar S$35 = createStream$1('skipUntilBy', mixin$27);\nvar P$30 = createProperty$1('skipUntilBy', mixin$27);\n\nfunction skipUntilBy(primary, secondary) {\n return new (primary._ofSameType(S$35, P$30))(primary, secondary);\n}\n\nvar mixin$28 = {\n _handleSecondaryValue: function () {\n this._emitEnd();\n }\n};\n\nvar S$36 = createStream$1('takeUntilBy', mixin$28);\nvar P$31 = createProperty$1('takeUntilBy', mixin$28);\n\nfunction takeUntilBy(primary, secondary) {\n return new (primary._ofSameType(S$36, P$31))(primary, secondary);\n}\n\nvar mixin$29 = {\n _init: function () {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$flushOnEnd = _ref.flushOnEnd,\n flushOnEnd = _ref$flushOnEnd === undefined ? true : _ref$flushOnEnd;\n\n this._buff = [];\n this._flushOnEnd = flushOnEnd;\n },\n _free: function () {\n this._buff = null;\n },\n _flush: function () {\n if (this._buff !== null) {\n this._emitValue(this._buff);\n this._buff = [];\n }\n },\n _handlePrimaryEnd: function () {\n if (this._flushOnEnd) {\n this._flush();\n }\n this._emitEnd();\n },\n _onActivation: function () {\n this._primary.onAny(this._$handlePrimaryAny);\n if (this._alive && this._secondary !== null) {\n this._secondary.onAny(this._$handleSecondaryAny);\n }\n },\n _handlePrimaryValue: function (x) {\n this._buff.push(x);\n },\n _handleSecondaryValue: function () {\n this._flush();\n },\n _handleSecondaryEnd: function () {\n if (!this._flushOnEnd) {\n this._emitEnd();\n }\n }\n};\n\nvar S$37 = createStream$1('bufferBy', mixin$29);\nvar P$32 = createProperty$1('bufferBy', mixin$29);\n\nfunction bufferBy(primary, secondary, options /* optional */) {\n return new (primary._ofSameType(S$37, P$32))(primary, secondary, options);\n}\n\nvar mixin$30 = {\n _init: function () {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$flushOnEnd = _ref.flushOnEnd,\n flushOnEnd = _ref$flushOnEnd === undefined ? true : _ref$flushOnEnd,\n _ref$flushOnChange = _ref.flushOnChange,\n flushOnChange = _ref$flushOnChange === undefined ? false : _ref$flushOnChange;\n\n this._buff = [];\n this._flushOnEnd = flushOnEnd;\n this._flushOnChange = flushOnChange;\n },\n _free: function () {\n this._buff = null;\n },\n _flush: function () {\n if (this._buff !== null) {\n this._emitValue(this._buff);\n this._buff = [];\n }\n },\n _handlePrimaryEnd: function () {\n if (this._flushOnEnd) {\n this._flush();\n }\n this._emitEnd();\n },\n _handlePrimaryValue: function (x) {\n this._buff.push(x);\n if (this._lastSecondary !== NOTHING && !this._lastSecondary) {\n this._flush();\n }\n },\n _handleSecondaryEnd: function () {\n if (!this._flushOnEnd && (this._lastSecondary === NOTHING || this._lastSecondary)) {\n this._emitEnd();\n }\n },\n _handleSecondaryValue: function (x) {\n if (this._flushOnChange && !x) {\n this._flush();\n }\n\n // from default _handleSecondaryValue\n this._lastSecondary = x;\n }\n};\n\nvar S$38 = createStream$1('bufferWhileBy', mixin$30);\nvar P$33 = createProperty$1('bufferWhileBy', mixin$30);\n\nfunction bufferWhileBy(primary, secondary, options /* optional */) {\n return new (primary._ofSameType(S$38, P$33))(primary, secondary, options);\n}\n\nvar f = function () {\n return false;\n};\nvar t = function () {\n return true;\n};\n\nfunction awaiting(a, b) {\n var result = merge([map$1(a, t), map$1(b, f)]);\n result = skipDuplicates(result);\n result = toProperty(result, f);\n return result.setName(a, 'awaiting');\n}\n\nvar mixin$31 = {\n _init: function (_ref) {\n var fn = _ref.fn;\n\n this._fn = fn;\n },\n _free: function () {\n this._fn = null;\n },\n _handleValue: function (x) {\n var fn = this._fn;\n var result = fn(x);\n if (result.convert) {\n this._emitError(result.error);\n } else {\n this._emitValue(x);\n }\n }\n};\n\nvar S$39 = createStream('valuesToErrors', mixin$31);\nvar P$34 = createProperty('valuesToErrors', mixin$31);\n\nvar defFn = function (x) {\n return { convert: true, error: x };\n};\n\nfunction valuesToErrors(obs) {\n var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defFn;\n\n return new (obs._ofSameType(S$39, P$34))(obs, { fn: fn });\n}\n\nvar mixin$32 = {\n _init: function (_ref) {\n var fn = _ref.fn;\n\n this._fn = fn;\n },\n _free: function () {\n this._fn = null;\n },\n _handleError: function (x) {\n var fn = this._fn;\n var result = fn(x);\n if (result.convert) {\n this._emitValue(result.value);\n } else {\n this._emitError(x);\n }\n }\n};\n\nvar S$40 = createStream('errorsToValues', mixin$32);\nvar P$35 = createProperty('errorsToValues', mixin$32);\n\nvar defFn$1 = function (x) {\n return { convert: true, value: x };\n};\n\nfunction errorsToValues(obs) {\n var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defFn$1;\n\n return new (obs._ofSameType(S$40, P$35))(obs, { fn: fn });\n}\n\nvar mixin$33 = {\n _handleError: function (x) {\n this._emitError(x);\n this._emitEnd();\n }\n};\n\nvar S$41 = createStream('endOnError', mixin$33);\nvar P$36 = createProperty('endOnError', mixin$33);\n\nfunction endOnError(obs) {\n return new (obs._ofSameType(S$41, P$36))(obs);\n}\n\n// Create a stream\n// -----------------------------------------------------------------------------\n\n// () -> Stream\n// (number, any) -> Stream\n// (number, any) -> Stream\n// (number, Array) -> Stream\n// (number, Function) -> Stream\n// (number, Function) -> Stream\n// (Function) -> Stream\n// (Function) -> Stream\n// Target = {addEventListener, removeEventListener}|{addListener, removeListener}|{on, off}\n// (Target, string, Function|undefined) -> Stream\n// (Function) -> Stream\n// Create a property\n// -----------------------------------------------------------------------------\n\n// (any) -> Property\n// (any) -> Property\n// Convert observables\n// -----------------------------------------------------------------------------\n\n// (Stream|Property, Function|undefined) -> Property\nObservable.prototype.toProperty = function (fn) {\n return toProperty(this, fn);\n};\n\n// (Stream|Property) -> Stream\nObservable.prototype.changes = function () {\n return changes(this);\n};\n\n// Interoperation with other implimentations\n// -----------------------------------------------------------------------------\n\n// (Promise) -> Property\n// (Stream|Property, Function|undefined) -> Promise\nObservable.prototype.toPromise = function (Promise) {\n return toPromise(this, Promise);\n};\n\n// (ESObservable) -> Stream\n// (Stream|Property) -> ES7 Observable\nObservable.prototype.toESObservable = toESObservable;\nObservable.prototype[$$observable] = toESObservable;\n\n// Modify an observable\n// -----------------------------------------------------------------------------\n\n// (Stream, Function|undefined) -> Stream\n// (Property, Function|undefined) -> Property\nObservable.prototype.map = function (fn) {\n return map$1(this, fn);\n};\n\n// (Stream, Function|undefined) -> Stream\n// (Property, Function|undefined) -> Property\nObservable.prototype.filter = function (fn) {\n return filter(this, fn);\n};\n\n// (Stream, number) -> Stream\n// (Property, number) -> Property\nObservable.prototype.take = function (n) {\n return take(this, n);\n};\n\n// (Stream, number) -> Stream\n// (Property, number) -> Property\nObservable.prototype.takeErrors = function (n) {\n return takeErrors(this, n);\n};\n\n// (Stream, Function|undefined) -> Stream\n// (Property, Function|undefined) -> Property\nObservable.prototype.takeWhile = function (fn) {\n return takeWhile(this, fn);\n};\n\n// (Stream) -> Stream\n// (Property) -> Property\nObservable.prototype.last = function () {\n return last(this);\n};\n\n// (Stream, number) -> Stream\n// (Property, number) -> Property\nObservable.prototype.skip = function (n) {\n return skip(this, n);\n};\n\n// (Stream, Function|undefined) -> Stream\n// (Property, Function|undefined) -> Property\nObservable.prototype.skipWhile = function (fn) {\n return skipWhile(this, fn);\n};\n\n// (Stream, Function|undefined) -> Stream\n// (Property, Function|undefined) -> Property\nObservable.prototype.skipDuplicates = function (fn) {\n return skipDuplicates(this, fn);\n};\n\n// (Stream, Function|falsey, any|undefined) -> Stream\n// (Property, Function|falsey, any|undefined) -> Property\nObservable.prototype.diff = function (fn, seed) {\n return diff(this, fn, seed);\n};\n\n// (Stream|Property, Function, any|undefined) -> Property\nObservable.prototype.scan = function (fn, seed) {\n return scan(this, fn, seed);\n};\n\n// (Stream, Function|undefined) -> Stream\n// (Property, Function|undefined) -> Property\nObservable.prototype.flatten = function (fn) {\n return flatten(this, fn);\n};\n\n// (Stream, number) -> Stream\n// (Property, number) -> Property\nObservable.prototype.delay = function (wait) {\n return delay(this, wait);\n};\n\n// Options = {leading: boolean|undefined, trailing: boolean|undefined}\n// (Stream, number, Options|undefined) -> Stream\n// (Property, number, Options|undefined) -> Property\nObservable.prototype.throttle = function (wait, options) {\n return throttle(this, wait, options);\n};\n\n// Options = {immediate: boolean|undefined}\n// (Stream, number, Options|undefined) -> Stream\n// (Property, number, Options|undefined) -> Property\nObservable.prototype.debounce = function (wait, options) {\n return debounce(this, wait, options);\n};\n\n// (Stream, Function|undefined) -> Stream\n// (Property, Function|undefined) -> Property\nObservable.prototype.mapErrors = function (fn) {\n return mapErrors(this, fn);\n};\n\n// (Stream, Function|undefined) -> Stream\n// (Property, Function|undefined) -> Property\nObservable.prototype.filterErrors = function (fn) {\n return filterErrors(this, fn);\n};\n\n// (Stream) -> Stream\n// (Property) -> Property\nObservable.prototype.ignoreValues = function () {\n return ignoreValues(this);\n};\n\n// (Stream) -> Stream\n// (Property) -> Property\nObservable.prototype.ignoreErrors = function () {\n return ignoreErrors(this);\n};\n\n// (Stream) -> Stream\n// (Property) -> Property\nObservable.prototype.ignoreEnd = function () {\n return ignoreEnd(this);\n};\n\n// (Stream, Function) -> Stream\n// (Property, Function) -> Property\nObservable.prototype.beforeEnd = function (fn) {\n return beforeEnd(this, fn);\n};\n\n// (Stream, number, number|undefined) -> Stream\n// (Property, number, number|undefined) -> Property\nObservable.prototype.slidingWindow = function (max, min) {\n return slidingWindow(this, max, min);\n};\n\n// Options = {flushOnEnd: boolean|undefined}\n// (Stream, Function|falsey, Options|undefined) -> Stream\n// (Property, Function|falsey, Options|undefined) -> Property\nObservable.prototype.bufferWhile = function (fn, options) {\n return bufferWhile(this, fn, options);\n};\n\n// (Stream, number) -> Stream\n// (Property, number) -> Property\nObservable.prototype.bufferWithCount = function (count, options) {\n return bufferWhile$1(this, count, options);\n};\n\n// Options = {flushOnEnd: boolean|undefined}\n// (Stream, number, number, Options|undefined) -> Stream\n// (Property, number, number, Options|undefined) -> Property\nObservable.prototype.bufferWithTimeOrCount = function (wait, count, options) {\n return bufferWithTimeOrCount(this, wait, count, options);\n};\n\n// (Stream, Function) -> Stream\n// (Property, Function) -> Property\nObservable.prototype.transduce = function (transducer) {\n return transduce(this, transducer);\n};\n\n// (Stream, Function) -> Stream\n// (Property, Function) -> Property\nObservable.prototype.withHandler = function (fn) {\n return withHandler(this, fn);\n};\n\n// (Stream, Stream -> a) -> a\n// (Property, Property -> a) -> a\nObservable.prototype.thru = function (fn) {\n return fn(this);\n};\n\n// Combine observables\n// -----------------------------------------------------------------------------\n\n// (Array, Function|undefiend) -> Stream\n// (Array, Array, Function|undefiend) -> Stream\nObservable.prototype.combine = function (other, combinator) {\n return combine([this, other], combinator);\n};\n\n// (Array, Function|undefiend) -> Stream\nObservable.prototype.zip = function (other, combinator) {\n return zip([this, other], combinator);\n};\n\n// (Array) -> Stream\nObservable.prototype.merge = function (other) {\n return merge([this, other]);\n};\n\n// (Array) -> Stream\nObservable.prototype.concat = function (other) {\n return concat$1([this, other]);\n};\n\n// () -> Pool\nvar pool = function () {\n return new Pool();\n};\n\n// (Function) -> Stream\n// Options = {concurLim: number|undefined, queueLim: number|undefined, drop: 'old'|'new'|undefiend}\n// (Stream|Property, Function|falsey, Options|undefined) -> Stream\nObservable.prototype.flatMap = function (fn) {\n return new FlatMap(this, fn).setName(this, 'flatMap');\n};\nObservable.prototype.flatMapLatest = function (fn) {\n return new FlatMap(this, fn, { concurLim: 1, drop: 'old' }).setName(this, 'flatMapLatest');\n};\nObservable.prototype.flatMapFirst = function (fn) {\n return new FlatMap(this, fn, { concurLim: 1 }).setName(this, 'flatMapFirst');\n};\nObservable.prototype.flatMapConcat = function (fn) {\n return new FlatMap(this, fn, { queueLim: -1, concurLim: 1 }).setName(this, 'flatMapConcat');\n};\nObservable.prototype.flatMapConcurLimit = function (fn, limit) {\n return new FlatMap(this, fn, { queueLim: -1, concurLim: limit }).setName(this, 'flatMapConcurLimit');\n};\n\n// (Stream|Property, Function|falsey) -> Stream\nObservable.prototype.flatMapErrors = function (fn) {\n return new FlatMapErrors(this, fn).setName(this, 'flatMapErrors');\n};\n\n// Combine two observables\n// -----------------------------------------------------------------------------\n\n// (Stream, Stream|Property) -> Stream\n// (Property, Stream|Property) -> Property\nObservable.prototype.filterBy = function (other) {\n return filterBy(this, other);\n};\n\n// (Stream, Stream|Property, Function|undefiend) -> Stream\n// (Property, Stream|Property, Function|undefiend) -> Property\nObservable.prototype.sampledBy = function (other, combinator) {\n return sampledBy(this, other, combinator);\n};\n\n// (Stream, Stream|Property) -> Stream\n// (Property, Stream|Property) -> Property\nObservable.prototype.skipUntilBy = function (other) {\n return skipUntilBy(this, other);\n};\n\n// (Stream, Stream|Property) -> Stream\n// (Property, Stream|Property) -> Property\nObservable.prototype.takeUntilBy = function (other) {\n return takeUntilBy(this, other);\n};\n\n// Options = {flushOnEnd: boolean|undefined}\n// (Stream, Stream|Property, Options|undefined) -> Stream\n// (Property, Stream|Property, Options|undefined) -> Property\nObservable.prototype.bufferBy = function (other, options) {\n return bufferBy(this, other, options);\n};\n\n// Options = {flushOnEnd: boolean|undefined}\n// (Stream, Stream|Property, Options|undefined) -> Stream\n// (Property, Stream|Property, Options|undefined) -> Property\nObservable.prototype.bufferWhileBy = function (other, options) {\n return bufferWhileBy(this, other, options);\n};\n\n// Deprecated\n// -----------------------------------------------------------------------------\n\nvar DEPRECATION_WARNINGS = true;\nfunction dissableDeprecationWarnings() {\n DEPRECATION_WARNINGS = false;\n}\n\nfunction warn(msg) {\n if (DEPRECATION_WARNINGS && console && typeof console.warn === 'function') {\n var msg2 = '\\nHere is an Error object for you containing the call stack:';\n console.warn(msg, msg2, new Error());\n }\n}\n\n// (Stream|Property, Stream|Property) -> Property\nObservable.prototype.awaiting = function (other) {\n warn('You are using deprecated .awaiting() method, see https://github.com/kefirjs/kefir/issues/145');\n return awaiting(this, other);\n};\n\n// (Stream, Function|undefined) -> Stream\n// (Property, Function|undefined) -> Property\nObservable.prototype.valuesToErrors = function (fn) {\n warn('You are using deprecated .valuesToErrors() method, see https://github.com/kefirjs/kefir/issues/149');\n return valuesToErrors(this, fn);\n};\n\n// (Stream, Function|undefined) -> Stream\n// (Property, Function|undefined) -> Property\nObservable.prototype.errorsToValues = function (fn) {\n warn('You are using deprecated .errorsToValues() method, see https://github.com/kefirjs/kefir/issues/149');\n return errorsToValues(this, fn);\n};\n\n// (Stream) -> Stream\n// (Property) -> Property\nObservable.prototype.endOnError = function () {\n warn('You are using deprecated .endOnError() method, see https://github.com/kefirjs/kefir/issues/150');\n return endOnError(this);\n};\n\n// Exports\n// --------------------------------------------------------------------------\n\nvar Kefir = {\n Observable: Observable,\n Stream: Stream,\n Property: Property,\n never: never,\n later: later,\n interval: interval,\n sequentially: sequentially,\n fromPoll: fromPoll,\n withInterval: withInterval,\n fromCallback: fromCallback,\n fromNodeCallback: fromNodeCallback,\n fromEvents: fromEvents,\n stream: stream,\n constant: constant,\n constantError: constantError,\n fromPromise: fromPromise,\n fromESObservable: fromESObservable,\n combine: combine,\n zip: zip,\n merge: merge,\n concat: concat$1,\n Pool: Pool,\n pool: pool,\n repeat: repeat,\n staticLand: staticLand\n};\n\nKefir.Kefir = Kefir;\n\nexport { dissableDeprecationWarnings, Kefir, Observable, Stream, Property, never, later, interval, sequentially, fromPoll, withInterval, fromCallback, fromNodeCallback, fromEvents, stream, constant, constantError, fromPromise, fromESObservable, combine, zip, merge, concat$1 as concat, Pool, pool, repeat, staticLand };export default Kefir;\n","/*!\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'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\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","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = findTabbableDescendants;\n/*!\n * Adapted from jQuery UI core\n *\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/category/ui-core/\n */\n\nvar tabbableNode = /input|select|textarea|button|object/;\n\nfunction hidesContents(element) {\n var zeroSize = element.offsetWidth <= 0 && element.offsetHeight <= 0;\n\n // If the node is empty, this is good enough\n if (zeroSize && !element.innerHTML) return true;\n\n // Otherwise we need to check some styles\n var style = window.getComputedStyle(element);\n return zeroSize ? style.getPropertyValue(\"overflow\") !== \"visible\" : style.getPropertyValue(\"display\") == \"none\";\n}\n\nfunction visible(element) {\n var parentElement = element;\n while (parentElement) {\n if (parentElement === document.body) break;\n if (hidesContents(parentElement)) return false;\n parentElement = parentElement.parentNode;\n }\n return true;\n}\n\nfunction focusable(element, isTabIndexNotNaN) {\n var nodeName = element.nodeName.toLowerCase();\n var res = tabbableNode.test(nodeName) && !element.disabled || (nodeName === \"a\" ? element.href || isTabIndexNotNaN : isTabIndexNotNaN);\n return res && visible(element);\n}\n\nfunction tabbable(element) {\n var tabIndex = element.getAttribute(\"tabindex\");\n if (tabIndex === null) tabIndex = undefined;\n var isTabIndexNaN = isNaN(tabIndex);\n return (isTabIndexNaN || tabIndex >= 0) && focusable(element, !isTabIndexNaN);\n}\n\nfunction findTabbableDescendants(element) {\n return [].slice.call(element.querySelectorAll(\"*\"), 0).filter(tabbable);\n}\nmodule.exports = exports[\"default\"];","/** @license React v16.8.6\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var k=require(\"object-assign\"),n=\"function\"===typeof Symbol&&Symbol.for,p=n?Symbol.for(\"react.element\"):60103,q=n?Symbol.for(\"react.portal\"):60106,r=n?Symbol.for(\"react.fragment\"):60107,t=n?Symbol.for(\"react.strict_mode\"):60108,u=n?Symbol.for(\"react.profiler\"):60114,v=n?Symbol.for(\"react.provider\"):60109,w=n?Symbol.for(\"react.context\"):60110,x=n?Symbol.for(\"react.concurrent_mode\"):60111,y=n?Symbol.for(\"react.forward_ref\"):60112,z=n?Symbol.for(\"react.suspense\"):60113,aa=n?Symbol.for(\"react.memo\"):\n60115,ba=n?Symbol.for(\"react.lazy\"):60116,A=\"function\"===typeof Symbol&&Symbol.iterator;function ca(a,b,d,c,e,g,h,f){if(!a){a=void 0;if(void 0===b)a=Error(\"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.\");else{var l=[d,c,e,g,h,f],m=0;a=Error(b.replace(/%s/g,function(){return l[m++]}));a.name=\"Invariant Violation\"}a.framesToPop=1;throw a;}}\nfunction B(a){for(var b=arguments.length-1,d=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=0;cP.length&&P.push(a)}\nfunction S(a,b,d,c){var e=typeof a;if(\"undefined\"===e||\"boolean\"===e)a=null;var g=!1;if(null===a)g=!0;else switch(e){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case p:case q:g=!0}}if(g)return d(c,a,\"\"===b?\".\"+T(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var h=0;hthis.eventPool.length&&this.eventPool.push(a)}\nfunction hb(a){a.eventPool=[];a.getPooled=ib;a.release=jb}var kb=y.extend({data:null}),lb=y.extend({data:null}),mb=[9,13,27,32],nb=Ra&&\"CompositionEvent\"in window,ob=null;Ra&&\"documentMode\"in document&&(ob=document.documentMode);\nvar pb=Ra&&\"TextEvent\"in window&&!ob,qb=Ra&&(!nb||ob&&8=ob),rb=String.fromCharCode(32),sb={beforeInput:{phasedRegistrationNames:{bubbled:\"onBeforeInput\",captured:\"onBeforeInputCapture\"},dependencies:[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]},compositionEnd:{phasedRegistrationNames:{bubbled:\"onCompositionEnd\",captured:\"onCompositionEndCapture\"},dependencies:\"blur compositionend keydown keypress keyup mousedown\".split(\" \")},compositionStart:{phasedRegistrationNames:{bubbled:\"onCompositionStart\",\ncaptured:\"onCompositionStartCapture\"},dependencies:\"blur compositionstart keydown keypress keyup mousedown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"blur compositionupdate keydown keypress keyup mousedown\".split(\" \")}},tb=!1;\nfunction ub(a,b){switch(a){case \"keyup\":return-1!==mb.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"blur\":return!0;default:return!1}}function vb(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var wb=!1;function xb(a,b){switch(a){case \"compositionend\":return vb(b);case \"keypress\":if(32!==b.which)return null;tb=!0;return rb;case \"textInput\":return a=b.data,a===rb&&tb?null:a;default:return null}}\nfunction yb(a,b){if(wb)return\"compositionend\"===a||!nb&&ub(a,b)?(a=eb(),db=cb=bb=null,wb=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1b}return!1}function C(a,b,c,d,e){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b}var D={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){D[a]=new C(a,0,!1,a,null)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];D[b]=new C(b,1,!1,a[1],null)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){D[a]=new C(a,2,!1,a.toLowerCase(),null)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){D[a]=new C(a,2,!1,a,null)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){D[a]=new C(a,3,!1,a.toLowerCase(),null)});[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){D[a]=new C(a,3,!0,a,null)});\n[\"capture\",\"download\"].forEach(function(a){D[a]=new C(a,4,!1,a,null)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){D[a]=new C(a,6,!1,a,null)});[\"rowSpan\",\"start\"].forEach(function(a){D[a]=new C(a,5,!1,a.toLowerCase(),null)});var rc=/[\\-:]([a-z])/g;function sc(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(rc,\nsc);D[b]=new C(b,1,!1,a,null)});\"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(rc,sc);D[b]=new C(b,1,!1,a,\"http://www.w3.org/1999/xlink\")});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(rc,sc);D[b]=new C(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\")});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){D[a]=new C(a,1,!1,a.toLowerCase(),null)});\nfunction tc(a,b,c,d){var e=D.hasOwnProperty(b)?D[b]:null;var f=null!==e?0===e.type:d?!1:!(2zd.length&&zd.push(a)}}}var Fd={},Gd=0,Hd=\"_reactListenersID\"+(\"\"+Math.random()).slice(2);\nfunction Id(a){Object.prototype.hasOwnProperty.call(a,Hd)||(a[Hd]=Gd++,Fd[a[Hd]]={});return Fd[a[Hd]]}function Jd(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}function Kd(a){for(;a&&a.firstChild;)a=a.firstChild;return a}\nfunction Ld(a,b){var c=Kd(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Kd(c)}}function Md(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Md(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Nd(){for(var a=window,b=Jd();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Jd(a.document)}return b}function Od(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nfunction Pd(){var a=Nd();if(Od(a)){if(\"selectionStart\"in a)var b={start:a.selectionStart,end:a.selectionEnd};else a:{b=(b=a.ownerDocument)&&b.defaultView||window;var c=b.getSelection&&b.getSelection();if(c&&0!==c.rangeCount){b=c.anchorNode;var d=c.anchorOffset,e=c.focusNode;c=c.focusOffset;try{b.nodeType,e.nodeType}catch(A){b=null;break a}var f=0,g=-1,h=-1,l=0,k=0,m=a,p=null;b:for(;;){for(var t;;){m!==b||0!==d&&3!==m.nodeType||(g=f+d);m!==e||0!==c&&3!==m.nodeType||(h=f+c);3===m.nodeType&&(f+=m.nodeValue.length);\nif(null===(t=m.firstChild))break;p=m;m=t}for(;;){if(m===a)break b;p===b&&++l===d&&(g=f);p===e&&++k===c&&(h=f);if(null!==(t=m.nextSibling))break;m=p;p=m.parentNode}m=t}b=-1===g||-1===h?null:{start:g,end:h}}else b=null}b=b||{start:0,end:0}}else b=null;return{focusedElem:a,selectionRange:b}}\nfunction Qd(a){var b=Nd(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Md(c.ownerDocument.documentElement,c)){if(null!==d&&Od(c))if(b=d.start,a=d.end,void 0===a&&(a=b),\"selectionStart\"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ld(c,f);var g=Ld(c,\nd);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});\"function\"===typeof c.focus&&c.focus();for(c=0;c=document.documentMode,Sd={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange\".split(\" \")}},Td=null,Ud=null,Vd=null,Wd=!1;\nfunction Xd(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if(Wd||null==Td||Td!==Jd(c))return null;c=Td;\"selectionStart\"in c&&Od(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset});return Vd&&dd(Vd,c)?null:(Vd=c,a=y.getPooled(Sd.select,Ud,a,b),a.type=\"select\",a.target=Td,Qa(a),a)}\nvar Yd={eventTypes:Sd,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=Id(e);f=sa.onSelect;for(var g=0;g=b.length?void 0:x(\"93\"),b=b[0]),c=b),null==c&&(c=\"\"));a._wrapperState={initialValue:uc(c)}}\nfunction de(a,b){var c=uc(b.value),d=uc(b.defaultValue);null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=\"\"+d)}function ee(a){var b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b)}var fe={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction ge(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function he(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?ge(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar ie=void 0,je=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==fe.svg||\"innerHTML\"in a)a.innerHTML=b;else{ie=ie||document.createElement(\"div\");ie.innerHTML=\"\"+b+\"\";for(b=ie.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction ke(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar le={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,\nfloodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},me=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(le).forEach(function(a){me.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);le[b]=le[a]})});function ne(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||le.hasOwnProperty(a)&&le[a]?(\"\"+b).trim():b+\"px\"}\nfunction oe(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=ne(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var pe=n({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction qe(a,b){b&&(pe[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?x(\"137\",a,\"\"):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?x(\"60\"):void 0,\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML?void 0:x(\"61\")),null!=b.style&&\"object\"!==typeof b.style?x(\"62\",\"\"):void 0)}\nfunction re(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}\nfunction se(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=Id(a);b=sa[b];for(var d=0;dGe||(a.current=Fe[Ge],Fe[Ge]=null,Ge--)}function G(a,b){Ge++;Fe[Ge]=a.current;a.current=b}var He={},H={current:He},I={current:!1},Ie=He;\nfunction Je(a,b){var c=a.type.contextTypes;if(!c)return He;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function J(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Ke(a){F(I,a);F(H,a)}function Le(a){F(I,a);F(H,a)}\nfunction Me(a,b,c){H.current!==He?x(\"168\"):void 0;G(H,b,a);G(I,c,a)}function Ne(a,b,c){var d=a.stateNode;a=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)e in a?void 0:x(\"108\",ic(b)||\"Unknown\",e);return n({},c,d)}function Oe(a){var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||He;Ie=H.current;G(H,b,a);G(I,I.current,a);return!0}\nfunction Pe(a,b,c){var d=a.stateNode;d?void 0:x(\"169\");c?(b=Ne(a,b,Ie),d.__reactInternalMemoizedMergedChildContext=b,F(I,a),F(H,a),G(H,b,a)):F(I,a);G(I,c,a)}var Qe=null,Re=null;function Se(a){return function(b){try{return a(b)}catch(c){}}}\nfunction Te(a){if(\"undefined\"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);Qe=Se(function(a){return b.onCommitFiberRoot(c,a)});Re=Se(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0}\nfunction Ue(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.contextDependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childExpirationTime=this.expirationTime=0;this.alternate=null}function K(a,b,c,d){return new Ue(a,b,c,d)}\nfunction Ve(a){a=a.prototype;return!(!a||!a.isReactComponent)}function We(a){if(\"function\"===typeof a)return Ve(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===cc)return 11;if(a===ec)return 14}return 2}\nfunction Xe(a,b){var c=a.alternate;null===c?(c=K(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.effectTag=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.childExpirationTime=a.childExpirationTime;c.expirationTime=a.expirationTime;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;c.contextDependencies=a.contextDependencies;c.sibling=a.sibling;\nc.index=a.index;c.ref=a.ref;return c}\nfunction Ye(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)Ve(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case Xb:return Ze(c.children,e,f,b);case bc:return $e(c,e|3,f,b);case Yb:return $e(c,e|2,f,b);case Zb:return a=K(12,c,b,e|4),a.elementType=Zb,a.type=Zb,a.expirationTime=f,a;case dc:return a=K(13,c,b,e),a.elementType=dc,a.type=dc,a.expirationTime=f,a;default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case $b:g=10;break a;case ac:g=9;break a;case cc:g=11;break a;case ec:g=\n14;break a;case fc:g=16;d=null;break a}x(\"130\",null==a?a:typeof a,\"\")}b=K(g,c,b,e);b.elementType=a;b.type=d;b.expirationTime=f;return b}function Ze(a,b,c,d){a=K(7,a,d,b);a.expirationTime=c;return a}function $e(a,b,c,d){a=K(8,a,d,b);b=0===(b&1)?Yb:bc;a.elementType=b;a.type=b;a.expirationTime=c;return a}function af(a,b,c){a=K(6,a,null,b);a.expirationTime=c;return a}\nfunction bf(a,b,c){b=K(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}function cf(a,b){a.didError=!1;var c=a.earliestPendingTime;0===c?a.earliestPendingTime=a.latestPendingTime=b:cb&&(a.latestPendingTime=b);df(b,a)}\nfunction ef(a,b){a.didError=!1;if(0===b)a.earliestPendingTime=0,a.latestPendingTime=0,a.earliestSuspendedTime=0,a.latestSuspendedTime=0,a.latestPingedTime=0;else{bb?a.earliestPendingTime=a.latestPendingTime=0:a.earliestPendingTime>b&&(a.earliestPendingTime=a.latestPendingTime));c=a.earliestSuspendedTime;0===c?cf(a,b):bc&&cf(a,b)}df(0,a)}function ff(a,b){a.didError=!1;a.latestPingedTime>=b&&(a.latestPingedTime=0);var c=a.earliestPendingTime,d=a.latestPendingTime;c===b?a.earliestPendingTime=d===b?a.latestPendingTime=0:d:d===b&&(a.latestPendingTime=c);c=a.earliestSuspendedTime;d=a.latestSuspendedTime;0===c?a.earliestSuspendedTime=a.latestSuspendedTime=b:cb&&(a.latestSuspendedTime=b);df(b,a)}\nfunction gf(a,b){var c=a.earliestPendingTime;a=a.earliestSuspendedTime;c>b&&(b=c);a>b&&(b=a);return b}function df(a,b){var c=b.earliestSuspendedTime,d=b.latestSuspendedTime,e=b.earliestPendingTime,f=b.latestPingedTime;e=0!==e?e:f;0===e&&(0===a||da&&(a=c);b.nextExpirationTimeToWorkOn=e;b.expirationTime=a}function L(a,b){if(a&&a.defaultProps){b=n({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c])}return b}\nfunction hf(a){var b=a._result;switch(a._status){case 1:return b;case 2:throw b;case 0:throw b;default:a._status=0;b=a._ctor;b=b();b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)});switch(a._status){case 1:return a._result;case 2:throw a._result;}a._result=b;throw b;}}var jf=(new aa.Component).refs;\nfunction kf(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:n({},b,c);a.memoizedState=c;d=a.updateQueue;null!==d&&0===a.expirationTime&&(d.baseState=c)}\nvar tf={isMounted:function(a){return(a=a._reactInternalFiber)?2===ed(a):!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=lf();d=mf(d,a);var e=nf(d);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);of();pf(a,e);qf(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=lf();d=mf(d,a);var e=nf(d);e.tag=rf;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);of();pf(a,e);qf(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=lf();c=mf(c,a);var d=nf(c);d.tag=\nsf;void 0!==b&&null!==b&&(d.callback=b);of();pf(a,d);qf(a,c)}};function uf(a,b,c,d,e,f,g){a=a.stateNode;return\"function\"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!dd(c,d)||!dd(e,f):!0}\nfunction vf(a,b,c){var d=!1,e=He;var f=b.contextType;\"object\"===typeof f&&null!==f?f=M(f):(e=J(b)?Ie:H.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Je(a,e):He);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=tf;a.stateNode=b;b._reactInternalFiber=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}\nfunction wf(a,b,c,d){a=b.state;\"function\"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);\"function\"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&tf.enqueueReplaceState(b,b.state,null)}\nfunction xf(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=jf;var f=b.contextType;\"object\"===typeof f&&null!==f?e.context=M(f):(f=J(b)?Ie:H.current,e.context=Je(a,f));f=a.updateQueue;null!==f&&(yf(a,f,c,e,d),e.state=a.memoizedState);f=b.getDerivedStateFromProps;\"function\"===typeof f&&(kf(a,b,f,c),e.state=a.memoizedState);\"function\"===typeof b.getDerivedStateFromProps||\"function\"===typeof e.getSnapshotBeforeUpdate||\"function\"!==typeof e.UNSAFE_componentWillMount&&\"function\"!==\ntypeof e.componentWillMount||(b=e.state,\"function\"===typeof e.componentWillMount&&e.componentWillMount(),\"function\"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&tf.enqueueReplaceState(e,e.state,null),f=a.updateQueue,null!==f&&(yf(a,f,c,e,d),e.state=a.memoizedState));\"function\"===typeof e.componentDidMount&&(a.effectTag|=4)}var zf=Array.isArray;\nfunction Af(a,b,c){a=c.ref;if(null!==a&&\"function\"!==typeof a&&\"object\"!==typeof a){if(c._owner){c=c._owner;var d=void 0;c&&(1!==c.tag?x(\"309\"):void 0,d=c.stateNode);d?void 0:x(\"147\",a);var e=\"\"+a;if(null!==b&&null!==b.ref&&\"function\"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===jf&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}\"string\"!==typeof a?x(\"284\"):void 0;c._owner?void 0:x(\"290\",a)}return a}\nfunction Bf(a,b){\"textarea\"!==a.type&&x(\"31\",\"[object Object]\"===Object.prototype.toString.call(b)?\"object with keys {\"+Object.keys(b).join(\", \")+\"}\":b,\"\")}\nfunction Cf(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b,c){a=Xe(a,b,c);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,du?(B=q,q=null):B=q.sibling;var w=t(e,q,h[u],k);if(null===w){null===q&&(q=B);break}a&&\nq&&null===w.alternate&&b(e,q);g=f(w,g,u);null===m?l=w:m.sibling=w;m=w;q=B}if(u===h.length)return c(e,q),l;if(null===q){for(;uu?(B=q,q=null):B=q.sibling;var v=t(e,q,w.value,k);if(null===v){q||(q=B);break}a&&q&&null===v.alternate&&b(e,q);g=f(v,g,u);null===m?l=v:m.sibling=v;m=v;q=B}if(w.done)return c(e,q),l;if(null===q){for(;!w.done;u++,w=h.next())w=p(e,w.value,k),null!==w&&(g=f(w,g,u),null===m?l=w:m.sibling=w,m=w);return l}for(q=d(e,q);!w.done;u++,w=h.next())w=A(q,e,u,w.value,k),null!==w&&(a&&null!==w.alternate&&q.delete(null===w.key?u:\nw.key),g=f(w,g,u),null===m?l=w:m.sibling=w,m=w);a&&q.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===Xb&&null===f.key;k&&(f=f.props.children);var l=\"object\"===typeof f&&null!==f;if(l)switch(f.$$typeof){case Vb:a:{l=f.key;for(k=d;null!==k;){if(k.key===l)if(7===k.tag?f.type===Xb:k.elementType===f.type){c(a,k.sibling);d=e(k,f.type===Xb?f.props.children:f.props,h);d.ref=Af(a,k,f);d.return=a;a=d;break a}else{c(a,k);break}else b(a,k);k=\nk.sibling}f.type===Xb?(d=Ze(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Ye(f.type,f.key,f.props,null,a.mode,h),h.ref=Af(a,d,f),h.return=a,a=h)}return g(a);case Wb:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],h);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=bf(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\n\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h),d.return=a,a=d):(c(a,d),d=af(f,a.mode,h),d.return=a,a=d),g(a);if(zf(f))return v(a,d,f,h);if(hc(f))return R(a,d,f,h);l&&Bf(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 1:case 0:h=a.type,x(\"152\",h.displayName||h.name||\"Component\")}return c(a,d)}}var Df=Cf(!0),Ef=Cf(!1),Ff={},N={current:Ff},Gf={current:Ff},Hf={current:Ff};function If(a){a===Ff?x(\"174\"):void 0;return a}\nfunction Jf(a,b){G(Hf,b,a);G(Gf,a,a);G(N,Ff,a);var c=b.nodeType;switch(c){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:he(null,\"\");break;default:c=8===c?b.parentNode:b,b=c.namespaceURI||null,c=c.tagName,b=he(b,c)}F(N,a);G(N,b,a)}function Kf(a){F(N,a);F(Gf,a);F(Hf,a)}function Lf(a){If(Hf.current);var b=If(N.current);var c=he(b,a.type);b!==c&&(G(Gf,a,a),G(N,c,a))}function Mf(a){Gf.current===a&&(F(N,a),F(Gf,a))}\nvar Nf=0,Of=2,Pf=4,Qf=8,Rf=16,Sf=32,Tf=64,Uf=128,Vf=Tb.ReactCurrentDispatcher,Wf=0,Xf=null,O=null,P=null,Yf=null,Q=null,Zf=null,$f=0,ag=null,bg=0,cg=!1,dg=null,eg=0;function fg(){x(\"321\")}function gg(a,b){if(null===b)return!1;for(var c=0;c$f&&($f=m)):f=l.eagerReducer===a?l.eagerState:a(f,l.action);g=l;l=l.next}while(null!==l&&l!==d);k||(h=g,e=f);bd(f,b.memoizedState)||(qg=!0);b.memoizedState=f;b.baseUpdate=h;b.baseState=e;c.lastRenderedState=f}return[b.memoizedState,c.dispatch]}\nfunction rg(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};null===ag?(ag={lastEffect:null},ag.lastEffect=a.next=a):(b=ag.lastEffect,null===b?ag.lastEffect=a.next=a:(c=b.next,b.next=a,a.next=c,ag.lastEffect=a));return a}function sg(a,b,c,d){var e=mg();bg|=a;e.memoizedState=rg(b,c,void 0,void 0===d?null:d)}\nfunction tg(a,b,c,d){var e=ng();d=void 0===d?null:d;var f=void 0;if(null!==O){var g=O.memoizedState;f=g.destroy;if(null!==d&&gg(d,g.deps)){rg(Nf,c,f,d);return}}bg|=a;e.memoizedState=rg(b,c,f,d)}function ug(a,b){if(\"function\"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function vg(){}\nfunction wg(a,b,c){25>eg?void 0:x(\"301\");var d=a.alternate;if(a===Xf||null!==d&&d===Xf)if(cg=!0,a={expirationTime:Wf,action:c,eagerReducer:null,eagerState:null,next:null},null===dg&&(dg=new Map),c=dg.get(b),void 0===c)dg.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}else{of();var e=lf();e=mf(e,a);var f={expirationTime:e,action:c,eagerReducer:null,eagerState:null,next:null},g=b.last;if(null===g)f.next=f;else{var h=g.next;null!==h&&(f.next=h);g.next=f}b.last=f;if(0===a.expirationTime&&(null===\nd||0===d.expirationTime)&&(d=b.lastRenderedReducer,null!==d))try{var l=b.lastRenderedState,k=d(l,c);f.eagerReducer=d;f.eagerState=k;if(bd(k,l))return}catch(m){}finally{}qf(a,e)}}\nvar kg={readContext:M,useCallback:fg,useContext:fg,useEffect:fg,useImperativeHandle:fg,useLayoutEffect:fg,useMemo:fg,useReducer:fg,useRef:fg,useState:fg,useDebugValue:fg},ig={readContext:M,useCallback:function(a,b){mg().memoizedState=[a,void 0===b?null:b];return a},useContext:M,useEffect:function(a,b){return sg(516,Uf|Tf,a,b)},useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return sg(4,Pf|Sf,ug.bind(null,b,a),c)},useLayoutEffect:function(a,b){return sg(4,Pf|Sf,a,b)},\nuseMemo:function(a,b){var c=mg();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=mg();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={last:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=wg.bind(null,Xf,a);return[d.memoizedState,a]},useRef:function(a){var b=mg();a={current:a};return b.memoizedState=a},useState:function(a){var b=mg();\"function\"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={last:null,dispatch:null,\nlastRenderedReducer:og,lastRenderedState:a};a=a.dispatch=wg.bind(null,Xf,a);return[b.memoizedState,a]},useDebugValue:vg},jg={readContext:M,useCallback:function(a,b){var c=ng();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&gg(b,d[1]))return d[0];c.memoizedState=[a,b];return a},useContext:M,useEffect:function(a,b){return tg(516,Uf|Tf,a,b)},useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return tg(4,Pf|Sf,ug.bind(null,b,a),c)},useLayoutEffect:function(a,\nb){return tg(4,Pf|Sf,a,b)},useMemo:function(a,b){var c=ng();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&gg(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a},useReducer:pg,useRef:function(){return ng().memoizedState},useState:function(a){return pg(og,a)},useDebugValue:vg},xg=null,yg=null,zg=!1;\nfunction Ag(a,b){var c=K(5,null,null,0);c.elementType=\"DELETED\";c.type=\"DELETED\";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function Bg(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}\nfunction Cg(a){if(zg){var b=yg;if(b){var c=b;if(!Bg(a,b)){b=De(c);if(!b||!Bg(a,b)){a.effectTag|=2;zg=!1;xg=a;return}Ag(xg,c)}xg=a;yg=Ee(b)}else a.effectTag|=2,zg=!1,xg=a}}function Dg(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&18!==a.tag;)a=a.return;xg=a}function Eg(a){if(a!==xg)return!1;if(!zg)return Dg(a),zg=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!xe(b,a.memoizedProps))for(b=yg;b;)Ag(a,b),b=De(b);Dg(a);yg=xg?De(a.stateNode):null;return!0}function Fg(){yg=xg=null;zg=!1}\nvar Gg=Tb.ReactCurrentOwner,qg=!1;function S(a,b,c,d){b.child=null===a?Ef(b,null,c,d):Df(b,a.child,c,d)}function Hg(a,b,c,d,e){c=c.render;var f=b.ref;Ig(b,e);d=hg(a,b,c,d,f,e);if(null!==a&&!qg)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),Jg(a,b,e);b.effectTag|=1;S(a,b,d,e);return b.child}\nfunction Kg(a,b,c,d,e,f){if(null===a){var g=c.type;if(\"function\"===typeof g&&!Ve(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,Lg(a,b,g,d,e,f);a=Ye(c.type,null,d,null,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(e=c)return Sg(a,b,c);b=Jg(a,b,c);return null!==b?b.sibling:null}}return Jg(a,b,c)}}else qg=!1;b.expirationTime=0;switch(b.tag){case 2:d=\nb.elementType;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;var e=Je(b,H.current);Ig(b,c);e=hg(null,b,d,a,e,c);b.effectTag|=1;if(\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof){b.tag=1;lg();if(J(d)){var f=!0;Oe(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;var g=d.getDerivedStateFromProps;\"function\"===typeof g&&kf(b,d,g,a);e.updater=tf;b.stateNode=e;e._reactInternalFiber=b;xf(b,d,a,c);b=Qg(null,b,d,!0,f,\nc)}else b.tag=0,S(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);f=b.pendingProps;a=hf(e);b.type=a;e=b.tag=We(a);f=L(a,f);g=void 0;switch(e){case 0:g=Mg(null,b,a,f,c);break;case 1:g=Og(null,b,a,f,c);break;case 11:g=Hg(null,b,a,f,c);break;case 14:g=Kg(null,b,a,L(a.type,f),d,c);break;default:x(\"306\",a,\"\")}return g;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:L(d,e),Mg(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,\ne=b.elementType===d?e:L(d,e),Og(a,b,d,e,c);case 3:Rg(b);d=b.updateQueue;null===d?x(\"282\"):void 0;e=b.memoizedState;e=null!==e?e.element:null;yf(b,d,b.pendingProps,null,c);d=b.memoizedState.element;if(d===e)Fg(),b=Jg(a,b,c);else{e=b.stateNode;if(e=(null===a||null===a.child)&&e.hydrate)yg=Ee(b.stateNode.containerInfo),xg=b,e=zg=!0;e?(b.effectTag|=2,b.child=Ef(b,null,d,c)):(S(a,b,d,c),Fg());b=b.child}return b;case 5:return Lf(b),null===a&&Cg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,\ng=e.children,xe(d,e)?g=null:null!==f&&xe(d,f)&&(b.effectTag|=16),Ng(a,b),1!==c&&b.mode&1&&e.hidden?(b.expirationTime=b.childExpirationTime=1,b=null):(S(a,b,g,c),b=b.child),b;case 6:return null===a&&Cg(b),null;case 13:return Sg(a,b,c);case 4:return Jf(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Df(b,null,d,c):S(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:L(d,e),Hg(a,b,d,e,c);case 7:return S(a,b,b.pendingProps,c),b.child;case 8:return S(a,b,b.pendingProps.children,\nc),b.child;case 12:return S(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;Ug(b,f);if(null!==g){var h=g.value;f=bd(h,f)?0:(\"function\"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0;if(0===f){if(g.children===e.children&&!I.current){b=Jg(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var l=h.contextDependencies;if(null!==l){g=h.child;for(var k=l.first;null!==k;){if(k.context===d&&0!==\n(k.observedBits&f)){1===h.tag&&(k=nf(c),k.tag=sf,pf(h,k));h.expirationTime=b&&(qg=!0);a.contextDependencies=null}\nfunction M(a,b){if(Yg!==a&&!1!==b&&0!==b){if(\"number\"!==typeof b||1073741823===b)Yg=a,b=1073741823;b={context:a,observedBits:b,next:null};null===Xg?(null===Wg?x(\"308\"):void 0,Xg=b,Wg.contextDependencies={first:b,expirationTime:0}):Xg=Xg.next=b}return a._currentValue}var $g=0,rf=1,sf=2,ah=3,Pg=!1;function bh(a){return{baseState:a,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}\nfunction ch(a){return{baseState:a.baseState,firstUpdate:a.firstUpdate,lastUpdate:a.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function nf(a){return{expirationTime:a,tag:$g,payload:null,callback:null,next:null,nextEffect:null}}function dh(a,b){null===a.lastUpdate?a.firstUpdate=a.lastUpdate=b:(a.lastUpdate.next=b,a.lastUpdate=b)}\nfunction pf(a,b){var c=a.alternate;if(null===c){var d=a.updateQueue;var e=null;null===d&&(d=a.updateQueue=bh(a.memoizedState))}else d=a.updateQueue,e=c.updateQueue,null===d?null===e?(d=a.updateQueue=bh(a.memoizedState),e=c.updateQueue=bh(c.memoizedState)):d=a.updateQueue=ch(e):null===e&&(e=c.updateQueue=ch(d));null===e||d===e?dh(d,b):null===d.lastUpdate||null===e.lastUpdate?(dh(d,b),dh(e,b)):(dh(d,b),e.lastUpdate=b)}\nfunction eh(a,b){var c=a.updateQueue;c=null===c?a.updateQueue=bh(a.memoizedState):fh(a,c);null===c.lastCapturedUpdate?c.firstCapturedUpdate=c.lastCapturedUpdate=b:(c.lastCapturedUpdate.next=b,c.lastCapturedUpdate=b)}function fh(a,b){var c=a.alternate;null!==c&&b===c.updateQueue&&(b=a.updateQueue=ch(b));return b}\nfunction gh(a,b,c,d,e,f){switch(c.tag){case rf:return a=c.payload,\"function\"===typeof a?a.call(f,d,e):a;case ah:a.effectTag=a.effectTag&-2049|64;case $g:a=c.payload;e=\"function\"===typeof a?a.call(f,d,e):a;if(null===e||void 0===e)break;return n({},d,e);case sf:Pg=!0}return d}\nfunction yf(a,b,c,d,e){Pg=!1;b=fh(a,b);for(var f=b.baseState,g=null,h=0,l=b.firstUpdate,k=f;null!==l;){var m=l.expirationTime;md?e:d);Ih.current=null;d=void 0;1c?b:c;0===b&&(Fh=null);$h(a,b)}\nfunction ai(a){for(;;){var b=a.alternate,c=a.return,d=a.sibling;if(0===(a.effectTag&1024)){T=a;a:{var e=b;b=a;var f=U;var g=b.pendingProps;switch(b.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:J(b.type)&&Ke(b);break;case 3:Kf(b);Le(b);g=b.stateNode;g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null);if(null===e||null===e.child)Eg(b),b.effectTag&=-3;mh(b);break;case 5:Mf(b);var h=If(Hf.current);f=b.type;if(null!==e&&null!=b.stateNode)nh(e,b,f,g,h),e.ref!==b.ref&&(b.effectTag|=\n128);else if(g){var l=If(N.current);if(Eg(b)){g=b;e=g.stateNode;var k=g.type,m=g.memoizedProps,p=h;e[Fa]=g;e[Ga]=m;f=void 0;h=k;switch(h){case \"iframe\":case \"object\":E(\"load\",e);break;case \"video\":case \"audio\":for(k=0;k\\x3c/script>\",k=e.removeChild(e.firstChild)):\"string\"===typeof e.is?k=k.createElement(p,{is:e.is}):(k=k.createElement(p),\"select\"===p&&(p=k,e.multiple?p.multiple=!0:e.size&&(p.size=e.size))):k=k.createElementNS(l,p);e=k;e[Fa]=m;e[Ga]=g;lh(e,b,!1,!1);p=e;k=f;m=g;var t=h,A=re(k,m);switch(k){case \"iframe\":case \"object\":E(\"load\",\np);h=m;break;case \"video\":case \"audio\":for(h=0;hg&&(g=e),h>g&&(g=h),f=f.sibling;b.childExpirationTime=g}if(null!==T)return T;null!==c&&0===(c.effectTag&1024)&&(null===c.firstEffect&&\n(c.firstEffect=a.firstEffect),null!==a.lastEffect&&(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),1=v)t=0;else if(-1===t||v component higher in the tree to provide a loading indicator or placeholder to display.\"+jc(k))}Nh=!0;m=jh(m,k);h=l;do{switch(h.tag){case 3:h.effectTag|=2048;h.expirationTime=g;g=Ch(h,m,g);eh(h,g);break a;case 1:if(t=m,A=h.type,k=h.stateNode,0===(h.effectTag&64)&&(\"function\"===typeof A.getDerivedStateFromError||null!==k&&\"function\"===typeof k.componentDidCatch&&(null===Fh||!Fh.has(k)))){h.effectTag|=2048;\nh.expirationTime=g;g=Eh(h,t,g);eh(h,g);break a}}h=h.return}while(null!==h)}T=ai(f);continue}}}break}while(1);Kh=!1;Hh.current=c;Yg=Xg=Wg=null;lg();if(e)Lh=null,a.finishedWork=null;else if(null!==T)a.finishedWork=null;else{c=a.current.alternate;null===c?x(\"281\"):void 0;Lh=null;if(Nh){e=a.latestPendingTime;f=a.latestSuspendedTime;g=a.latestPingedTime;if(0!==e&&eb?0:b)):(a.pendingCommitExpirationTime=d,a.finishedWork=c)}}\nfunction sh(a,b){for(var c=a.return;null!==c;){switch(c.tag){case 1:var d=c.stateNode;if(\"function\"===typeof c.type.getDerivedStateFromError||\"function\"===typeof d.componentDidCatch&&(null===Fh||!Fh.has(d))){a=jh(b,a);a=Eh(c,a,1073741823);pf(c,a);qf(c,1073741823);return}break;case 3:a=jh(b,a);a=Ch(c,a,1073741823);pf(c,a);qf(c,1073741823);return}c=c.return}3===a.tag&&(c=jh(b,a),c=Ch(a,c,1073741823),pf(a,c),qf(a,1073741823))}\nfunction mf(a,b){var c=r.unstable_getCurrentPriorityLevel(),d=void 0;if(0===(b.mode&1))d=1073741823;else if(Kh&&!Oh)d=U;else{switch(c){case r.unstable_ImmediatePriority:d=1073741823;break;case r.unstable_UserBlockingPriority:d=1073741822-10*(((1073741822-a+15)/10|0)+1);break;case r.unstable_NormalPriority:d=1073741822-25*(((1073741822-a+500)/25|0)+1);break;case r.unstable_LowPriority:case r.unstable_IdlePriority:d=1;break;default:x(\"313\")}null!==Lh&&d===U&&--d}c===r.unstable_UserBlockingPriority&&\n(0===gi||d=d){a.didError=!1;b=a.latestPingedTime;if(0===b||b>c)a.latestPingedTime=c;df(c,a);c=a.expirationTime;0!==c&&Xh(a,c)}}function Ah(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=lf();b=mf(b,a);a=hi(a,b);null!==a&&(cf(a,b),b=a.expirationTime,0!==b&&Xh(a,b))}\nfunction hi(a,b){a.expirationTimeU&&Sh(),cf(a,b),Kh&&!Oh&&Lh===a||Xh(a,a.expirationTime),ii>ji&&(ii=0,x(\"185\")))}function ki(a,b,c,d,e){return r.unstable_runWithPriority(r.unstable_ImmediatePriority,function(){return a(b,c,d,e)})}var li=null,Y=null,mi=0,ni=void 0,W=!1,oi=null,Z=0,gi=0,pi=!1,qi=null,X=!1,ri=!1,si=null,ti=r.unstable_now(),ui=1073741822-(ti/10|0),vi=ui,ji=50,ii=0,wi=null;function xi(){ui=1073741822-((r.unstable_now()-ti)/10|0)}\nfunction yi(a,b){if(0!==mi){if(ba.expirationTime&&(a.expirationTime=b);W||(X?ri&&(oi=a,Z=1073741823,Di(a,1073741823,!1)):1073741823===b?Yh(1073741823,!1):yi(a,b))}\nfunction Ci(){var a=0,b=null;if(null!==Y)for(var c=Y,d=li;null!==d;){var e=d.expirationTime;if(0===e){null===c||null===Y?x(\"244\"):void 0;if(d===d.nextScheduledRoot){li=Y=d.nextScheduledRoot=null;break}else if(d===li)li=e=d.nextScheduledRoot,Y.nextScheduledRoot=e,d.nextScheduledRoot=null;else if(d===Y){Y=c;Y.nextScheduledRoot=li;d.nextScheduledRoot=null;break}else c.nextScheduledRoot=d.nextScheduledRoot,d.nextScheduledRoot=null;d=c.nextScheduledRoot}else{e>a&&(a=e,b=d);if(d===Y)break;if(1073741823===\na)break;c=d;d=d.nextScheduledRoot}}oi=b;Z=a}var Ei=!1;function di(){return Ei?!0:r.unstable_shouldYield()?Ei=!0:!1}function zi(){try{if(!di()&&null!==li){xi();var a=li;do{var b=a.expirationTime;0!==b&&ui<=b&&(a.nextExpirationTimeToWorkOn=ui);a=a.nextScheduledRoot}while(a!==li)}Yh(0,!0)}finally{Ei=!1}}\nfunction Yh(a,b){Ci();if(b)for(xi(),vi=ui;null!==oi&&0!==Z&&a<=Z&&!(Ei&&ui>Z);)Di(oi,Z,ui>Z),Ci(),xi(),vi=ui;else for(;null!==oi&&0!==Z&&a<=Z;)Di(oi,Z,!1),Ci();b&&(mi=0,ni=null);0!==Z&&yi(oi,Z);ii=0;wi=null;if(null!==si)for(a=si,si=null,b=0;b=c&&(null===si?si=[d]:si.push(d),d._defer)){a.finishedWork=b;a.expirationTime=0;return}a.finishedWork=null;a===wi?ii++:(wi=a,ii=0);r.unstable_runWithPriority(r.unstable_ImmediatePriority,function(){Zh(a,b)})}function Dh(a){null===oi?x(\"246\"):void 0;oi.expirationTime=0;pi||(pi=!0,qi=a)}function Gi(a,b){var c=X;X=!0;try{return a(b)}finally{(X=c)||W||Yh(1073741823,!1)}}\nfunction Hi(a,b){if(X&&!ri){ri=!0;try{return a(b)}finally{ri=!1}}return a(b)}function Ii(a,b,c){X||W||0===gi||(Yh(gi,!1),gi=0);var d=X;X=!0;try{return r.unstable_runWithPriority(r.unstable_UserBlockingPriority,function(){return a(b,c)})}finally{(X=d)||W||Yh(1073741823,!1)}}\nfunction Ji(a,b,c,d,e){var f=b.current;a:if(c){c=c._reactInternalFiber;b:{2===ed(c)&&1===c.tag?void 0:x(\"170\");var g=c;do{switch(g.tag){case 3:g=g.stateNode.context;break b;case 1:if(J(g.type)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break b}}g=g.return}while(null!==g);x(\"171\");g=void 0}if(1===c.tag){var h=c.type;if(J(h)){c=Ne(c,h,g);break a}}c=g}else c=He;null===b.context?b.context=c:b.pendingContext=c;b=e;e=nf(d);e.payload={element:a};b=void 0===b?null:b;null!==b&&(e.callback=b);\nof();pf(f,e);qf(f,d);return d}function Ki(a,b,c,d){var e=b.current,f=lf();e=mf(f,e);return Ji(a,b,c,e,d)}function Li(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function Mi(a,b,c){var d=3=Jh&&(b=Jh-1);this._expirationTime=Jh=b;this._root=a;this._callbacks=this._next=null;this._hasChildren=this._didComplete=!1;this._children=null;this._defer=!0}Ni.prototype.render=function(a){this._defer?void 0:x(\"250\");this._hasChildren=!0;this._children=a;var b=this._root._internalRoot,c=this._expirationTime,d=new Oi;Ji(a,b,null,c,d._onCommit);return d};\nNi.prototype.then=function(a){if(this._didComplete)a();else{var b=this._callbacks;null===b&&(b=this._callbacks=[]);b.push(a)}};\nNi.prototype.commit=function(){var a=this._root._internalRoot,b=a.firstBatch;this._defer&&null!==b?void 0:x(\"251\");if(this._hasChildren){var c=this._expirationTime;if(b!==this){this._hasChildren&&(c=this._expirationTime=b._expirationTime,this.render(this._children));for(var d=null,e=b;e!==this;)d=e,e=e._next;null===d?x(\"251\"):void 0;d._next=e._next;this._next=b;a.firstBatch=this}this._defer=!1;Bi(a,c);b=this._next;this._next=null;b=a.firstBatch=b;null!==b&&b._hasChildren&&b.render(b._children)}else this._next=\nnull,this._defer=!1};Ni.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var a=this._callbacks;if(null!==a)for(var b=0;b=b;)c=d,d=d._next;a._next=d;null!==c&&(c._next=a)}return a};function Qi(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||\" react-mount-point-unstable \"!==a.nodeValue))}Gb=Gi;Hb=Ii;Ib=function(){W||0===gi||(Yh(gi,!1),gi=0)};\nfunction Ri(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute(\"data-reactroot\")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new Pi(a,!1,b)}\nfunction Si(a,b,c,d,e){var f=c._reactRootContainer;if(f){if(\"function\"===typeof e){var g=e;e=function(){var a=Li(f._internalRoot);g.call(a)}}null!=a?f.legacy_renderSubtreeIntoContainer(a,b,e):f.render(b,e)}else{f=c._reactRootContainer=Ri(c,d);if(\"function\"===typeof e){var h=e;e=function(){var a=Li(f._internalRoot);h.call(a)}}Hi(function(){null!=a?f.legacy_renderSubtreeIntoContainer(a,b,e):f.render(b,e)})}return Li(f._internalRoot)}\nfunction Ti(a,b){var c=2=b){c=a;break}a=a.next}while(a!==d);null===c?c=d:c===d&&(d=h,p());b=c.previous;b.next=c.previous=h;h.next=c;h.previous=\nb}}function v(){if(-1===k&&null!==d&&1===d.priorityLevel){m=!0;try{do u();while(null!==d&&1===d.priorityLevel)}finally{m=!1,null!==d?p():n=!1}}}function t(a){m=!0;var b=e;e=a;try{if(a)for(;null!==d;){var c=exports.unstable_now();if(d.expirationTime<=c){do u();while(null!==d&&d.expirationTime<=c)}else break}else if(null!==d){do u();while(null!==d&&!w())}}finally{m=!1,e=b,null!==d?p():n=!1,v()}}\nvar x=Date,y=\"function\"===typeof setTimeout?setTimeout:void 0,z=\"function\"===typeof clearTimeout?clearTimeout:void 0,A=\"function\"===typeof requestAnimationFrame?requestAnimationFrame:void 0,B=\"function\"===typeof cancelAnimationFrame?cancelAnimationFrame:void 0,C,D;function E(a){C=A(function(b){z(D);a(b)});D=y(function(){B(C);a(exports.unstable_now())},100)}\nif(\"object\"===typeof performance&&\"function\"===typeof performance.now){var F=performance;exports.unstable_now=function(){return F.now()}}else exports.unstable_now=function(){return x.now()};var r,q,w,G=null;\"undefined\"!==typeof window?G=window:\"undefined\"!==typeof global&&(G=global);\nif(G&&G._schedMock){var H=G._schedMock;r=H[0];q=H[1];w=H[2];exports.unstable_now=H[3]}else if(\"undefined\"===typeof window||\"function\"!==typeof MessageChannel){var I=null,J=function(a){if(null!==I)try{I(a)}finally{I=null}};r=function(a){null!==I?setTimeout(r,0,a):(I=a,setTimeout(J,0,!1))};q=function(){I=null};w=function(){return!1}}else{\"undefined\"!==typeof console&&(\"function\"!==typeof A&&console.error(\"This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills\"),\n\"function\"!==typeof B&&console.error(\"This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills\"));var K=null,L=!1,M=-1,N=!1,O=!1,P=0,R=33,S=33;w=function(){return P<=exports.unstable_now()};var T=new MessageChannel,U=T.port2;T.port1.onmessage=function(){L=!1;var a=K,b=M;K=null;M=-1;var c=exports.unstable_now(),f=!1;if(0>=P-c)if(-1!==b&&b<=c)f=!0;else{N||(N=!0,E(V));K=a;M=b;return}if(null!==a){O=!0;try{a(f)}finally{O=!1}}};\nvar V=function(a){if(null!==K){E(V);var b=a-P+S;bb&&(b=8),S=bb?U.postMessage(void 0):N||(N=!0,E(V))};q=function(){K=null;L=!1;M=-1}}exports.unstable_ImmediatePriority=1;exports.unstable_UserBlockingPriority=2;exports.unstable_NormalPriority=3;exports.unstable_IdlePriority=5;exports.unstable_LowPriority=4;\nexports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=g,f=k;g=a;k=exports.unstable_now();try{return b()}finally{g=c,k=f,v()}};exports.unstable_next=function(a){switch(g){case 1:case 2:case 3:var b=3;break;default:b=g}var c=g,f=k;g=b;k=exports.unstable_now();try{return a()}finally{g=c,k=f,v()}};\nexports.unstable_scheduleCallback=function(a,b){var c=-1!==k?k:exports.unstable_now();if(\"object\"===typeof b&&null!==b&&\"number\"===typeof b.timeout)b=c+b.timeout;else switch(g){case 1:b=c+-1;break;case 2:b=c+250;break;case 5:b=c+1073741823;break;case 4:b=c+1E4;break;default:b=c+5E3}a={callback:a,priorityLevel:g,expirationTime:b,next:null,previous:null};if(null===d)d=a.next=a.previous=a,p();else{c=null;var f=d;do{if(f.expirationTime>b){c=f;break}f=f.next}while(f!==d);null===c?c=d:c===d&&(d=a,p());\nb=c.previous;b.next=c.previous=a;a.next=c;a.previous=b}return a};exports.unstable_cancelCallback=function(a){var b=a.next;if(null!==b){if(b===a)d=null;else{a===d&&(d=b);var c=a.previous;c.next=b;b.previous=c}a.next=a.previous=null}};exports.unstable_wrapCallback=function(a){var b=g;return function(){var c=g,f=k;g=b;k=exports.unstable_now();try{return a.apply(this,arguments)}finally{g=c,k=f,v()}}};exports.unstable_getCurrentPriorityLevel=function(){return g};\nexports.unstable_shouldYield=function(){return!e&&(null!==d&&d.expirationTime 1) {\n\t\t\t\tattributes = extend({\n\t\t\t\t\tpath: '/'\n\t\t\t\t}, api.defaults, attributes);\n\n\t\t\t\tif (typeof attributes.expires === 'number') {\n\t\t\t\t\tvar expires = new Date();\n\t\t\t\t\texpires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);\n\t\t\t\t\tattributes.expires = expires;\n\t\t\t\t}\n\n\t\t\t\t// We're using \"expires\" because \"max-age\" is not supported by IE\n\t\t\t\tattributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';\n\n\t\t\t\ttry {\n\t\t\t\t\tresult = JSON.stringify(value);\n\t\t\t\t\tif (/^[\\{\\[]/.test(result)) {\n\t\t\t\t\t\tvalue = result;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\n\t\t\t\tif (!converter.write) {\n\t\t\t\t\tvalue = encodeURIComponent(String(value))\n\t\t\t\t\t\t.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\t\t\t\t} else {\n\t\t\t\t\tvalue = converter.write(value, key);\n\t\t\t\t}\n\n\t\t\t\tkey = encodeURIComponent(String(key));\n\t\t\t\tkey = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);\n\t\t\t\tkey = key.replace(/[\\(\\)]/g, escape);\n\n\t\t\t\tvar stringifiedAttributes = '';\n\n\t\t\t\tfor (var attributeName in attributes) {\n\t\t\t\t\tif (!attributes[attributeName]) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tstringifiedAttributes += '; ' + attributeName;\n\t\t\t\t\tif (attributes[attributeName] === true) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tstringifiedAttributes += '=' + attributes[attributeName];\n\t\t\t\t}\n\t\t\t\treturn (document.cookie = key + '=' + value + stringifiedAttributes);\n\t\t\t}\n\n\t\t\t// Read\n\n\t\t\tif (!key) {\n\t\t\t\tresult = {};\n\t\t\t}\n\n\t\t\t// To prevent the for loop in the first place assign an empty array\n\t\t\t// in case there are no cookies at all. Also prevents odd result when\n\t\t\t// calling \"get()\"\n\t\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\t\t\tvar rdecode = /(%[0-9A-Z]{2})+/g;\n\t\t\tvar i = 0;\n\n\t\t\tfor (; i < cookies.length; i++) {\n\t\t\t\tvar parts = cookies[i].split('=');\n\t\t\t\tvar cookie = parts.slice(1).join('=');\n\n\t\t\t\tif (!this.json && cookie.charAt(0) === '\"') {\n\t\t\t\t\tcookie = cookie.slice(1, -1);\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tvar name = parts[0].replace(rdecode, decodeURIComponent);\n\t\t\t\t\tcookie = converter.read ?\n\t\t\t\t\t\tconverter.read(cookie, name) : converter(cookie, name) ||\n\t\t\t\t\t\tcookie.replace(rdecode, decodeURIComponent);\n\n\t\t\t\t\tif (this.json) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcookie = JSON.parse(cookie);\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (key === name) {\n\t\t\t\t\t\tresult = cookie;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!key) {\n\t\t\t\t\t\tresult[name] = cookie;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\tapi.set = api;\n\t\tapi.get = function (key) {\n\t\t\treturn api.call(api, key);\n\t\t};\n\t\tapi.getJSON = function () {\n\t\t\treturn api.apply({\n\t\t\t\tjson: true\n\t\t\t}, [].slice.call(arguments));\n\t\t};\n\t\tapi.defaults = {};\n\n\t\tapi.remove = function (key, attributes) {\n\t\t\tapi(key, '', extend(attributes, {\n\t\t\t\texpires: -1\n\t\t\t}));\n\t\t};\n\n\t\tapi.withConverter = init;\n\n\t\treturn api;\n\t}\n\n\treturn init(function () {});\n}));\n","/*!\n Copyright (c) 2015 Jed Watson.\n Based on code that is Copyright 2013-2015, Facebook, Inc.\n All rights reserved.\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar canUseDOM = !!(\n\t\ttypeof window !== 'undefined' &&\n\t\twindow.document &&\n\t\twindow.document.createElement\n\t);\n\n\tvar ExecutionEnvironment = {\n\n\t\tcanUseDOM: canUseDOM,\n\n\t\tcanUseWorkers: typeof Worker !== 'undefined',\n\n\t\tcanUseEventListeners:\n\t\t\tcanUseDOM && !!(window.addEventListener || window.attachEvent),\n\n\t\tcanUseViewport: canUseDOM && !!window.screen\n\n\t};\n\n\tif (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\tdefine(function () {\n\t\t\treturn ExecutionEnvironment;\n\t\t});\n\t} else if (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = ExecutionEnvironment;\n\t} else {\n\t\twindow.ExecutionEnvironment = ExecutionEnvironment;\n\t}\n\n}());\n","/*!\n * is-plain-object \n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar isObject = require('isobject');\n\nfunction isObjectObject(o) {\n return isObject(o) === true\n && Object.prototype.toString.call(o) === '[object Object]';\n}\n\nmodule.exports = function isPlainObject(o) {\n var ctor,prot;\n\n if (isObjectObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (typeof ctor !== 'function') return false;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObjectObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n};\n","/*!\n * isobject \n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nmodule.exports = function isObject(val) {\n return val != null && typeof val === 'object' && Array.isArray(val) === false;\n};\n","//! moment-timezone.js\n//! version : 0.5.21\n//! Copyright (c) JS Foundation and other contributors\n//! license : MIT\n//! github.com/moment/moment-timezone\n\n(function (root, factory) {\n\t\"use strict\";\n\n\t/*global define*/\n\tif (typeof module === 'object' && module.exports) {\n\t\tmodule.exports = factory(require('moment')); // Node\n\t} else if (typeof define === 'function' && define.amd) {\n\t\tdefine(['moment'], factory); // AMD\n\t} else {\n\t\tfactory(root.moment); // Browser\n\t}\n}(this, function (moment) {\n\t\"use strict\";\n\n\t// Do not load moment-timezone a second time.\n\t// if (moment.tz !== undefined) {\n\t// \tlogError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion);\n\t// \treturn moment;\n\t// }\n\n\tvar VERSION = \"0.5.21\",\n\t\tzones = {},\n\t\tlinks = {},\n\t\tnames = {},\n\t\tguesses = {},\n\t\tcachedGuess;\n\n\tif (!moment || typeof moment.version !== 'string') {\n\t\tlogError('Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/');\n\t}\n\n\tvar momentVersion = moment.version.split('.'),\n\t\tmajor = +momentVersion[0],\n\t\tminor = +momentVersion[1];\n\n\t// Moment.js version check\n\tif (major < 2 || (major === 2 && minor < 6)) {\n\t\tlogError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com');\n\t}\n\n\t/************************************\n\t\tUnpacking\n\t************************************/\n\n\tfunction charCodeToInt(charCode) {\n\t\tif (charCode > 96) {\n\t\t\treturn charCode - 87;\n\t\t} else if (charCode > 64) {\n\t\t\treturn charCode - 29;\n\t\t}\n\t\treturn charCode - 48;\n\t}\n\n\tfunction unpackBase60(string) {\n\t\tvar i = 0,\n\t\t\tparts = string.split('.'),\n\t\t\twhole = parts[0],\n\t\t\tfractional = parts[1] || '',\n\t\t\tmultiplier = 1,\n\t\t\tnum,\n\t\t\tout = 0,\n\t\t\tsign = 1;\n\n\t\t// handle negative numbers\n\t\tif (string.charCodeAt(0) === 45) {\n\t\t\ti = 1;\n\t\t\tsign = -1;\n\t\t}\n\n\t\t// handle digits before the decimal\n\t\tfor (i; i < whole.length; i++) {\n\t\t\tnum = charCodeToInt(whole.charCodeAt(i));\n\t\t\tout = 60 * out + num;\n\t\t}\n\n\t\t// handle digits after the decimal\n\t\tfor (i = 0; i < fractional.length; i++) {\n\t\t\tmultiplier = multiplier / 60;\n\t\t\tnum = charCodeToInt(fractional.charCodeAt(i));\n\t\t\tout += num * multiplier;\n\t\t}\n\n\t\treturn out * sign;\n\t}\n\n\tfunction arrayToInt (array) {\n\t\tfor (var i = 0; i < array.length; i++) {\n\t\t\tarray[i] = unpackBase60(array[i]);\n\t\t}\n\t}\n\n\tfunction intToUntil (array, length) {\n\t\tfor (var i = 0; i < length; i++) {\n\t\t\tarray[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds\n\t\t}\n\n\t\tarray[length - 1] = Infinity;\n\t}\n\n\tfunction mapIndices (source, indices) {\n\t\tvar out = [], i;\n\n\t\tfor (i = 0; i < indices.length; i++) {\n\t\t\tout[i] = source[indices[i]];\n\t\t}\n\n\t\treturn out;\n\t}\n\n\tfunction unpack (string) {\n\t\tvar data = string.split('|'),\n\t\t\toffsets = data[2].split(' '),\n\t\t\tindices = data[3].split(''),\n\t\t\tuntils = data[4].split(' ');\n\n\t\tarrayToInt(offsets);\n\t\tarrayToInt(indices);\n\t\tarrayToInt(untils);\n\n\t\tintToUntil(untils, indices.length);\n\n\t\treturn {\n\t\t\tname : data[0],\n\t\t\tabbrs : mapIndices(data[1].split(' '), indices),\n\t\t\toffsets : mapIndices(offsets, indices),\n\t\t\tuntils : untils,\n\t\t\tpopulation : data[5] | 0\n\t\t};\n\t}\n\n\t/************************************\n\t\tZone object\n\t************************************/\n\n\tfunction Zone (packedString) {\n\t\tif (packedString) {\n\t\t\tthis._set(unpack(packedString));\n\t\t}\n\t}\n\n\tZone.prototype = {\n\t\t_set : function (unpacked) {\n\t\t\tthis.name = unpacked.name;\n\t\t\tthis.abbrs = unpacked.abbrs;\n\t\t\tthis.untils = unpacked.untils;\n\t\t\tthis.offsets = unpacked.offsets;\n\t\t\tthis.population = unpacked.population;\n\t\t},\n\n\t\t_index : function (timestamp) {\n\t\t\tvar target = +timestamp,\n\t\t\t\tuntils = this.untils,\n\t\t\t\ti;\n\n\t\t\tfor (i = 0; i < untils.length; i++) {\n\t\t\t\tif (target < untils[i]) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tparse : function (timestamp) {\n\t\t\tvar target = +timestamp,\n\t\t\t\toffsets = this.offsets,\n\t\t\t\tuntils = this.untils,\n\t\t\t\tmax = untils.length - 1,\n\t\t\t\toffset, offsetNext, offsetPrev, i;\n\n\t\t\tfor (i = 0; i < max; i++) {\n\t\t\t\toffset = offsets[i];\n\t\t\t\toffsetNext = offsets[i + 1];\n\t\t\t\toffsetPrev = offsets[i ? i - 1 : i];\n\n\t\t\t\tif (offset < offsetNext && tz.moveAmbiguousForward) {\n\t\t\t\t\toffset = offsetNext;\n\t\t\t\t} else if (offset > offsetPrev && tz.moveInvalidForward) {\n\t\t\t\t\toffset = offsetPrev;\n\t\t\t\t}\n\n\t\t\t\tif (target < untils[i] - (offset * 60000)) {\n\t\t\t\t\treturn offsets[i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn offsets[max];\n\t\t},\n\n\t\tabbr : function (mom) {\n\t\t\treturn this.abbrs[this._index(mom)];\n\t\t},\n\n\t\toffset : function (mom) {\n\t\t\tlogError(\"zone.offset has been deprecated in favor of zone.utcOffset\");\n\t\t\treturn this.offsets[this._index(mom)];\n\t\t},\n\n\t\tutcOffset : function (mom) {\n\t\t\treturn this.offsets[this._index(mom)];\n\t\t}\n\t};\n\n\t/************************************\n\t\tCurrent Timezone\n\t************************************/\n\n\tfunction OffsetAt(at) {\n\t\tvar timeString = at.toTimeString();\n\t\tvar abbr = timeString.match(/\\([a-z ]+\\)/i);\n\t\tif (abbr && abbr[0]) {\n\t\t\t// 17:56:31 GMT-0600 (CST)\n\t\t\t// 17:56:31 GMT-0600 (Central Standard Time)\n\t\t\tabbr = abbr[0].match(/[A-Z]/g);\n\t\t\tabbr = abbr ? abbr.join('') : undefined;\n\t\t} else {\n\t\t\t// 17:56:31 CST\n\t\t\t// 17:56:31 GMT+0800 (台北標準時間)\n\t\t\tabbr = timeString.match(/[A-Z]{3,5}/g);\n\t\t\tabbr = abbr ? abbr[0] : undefined;\n\t\t}\n\n\t\tif (abbr === 'GMT') {\n\t\t\tabbr = undefined;\n\t\t}\n\n\t\tthis.at = +at;\n\t\tthis.abbr = abbr;\n\t\tthis.offset = at.getTimezoneOffset();\n\t}\n\n\tfunction ZoneScore(zone) {\n\t\tthis.zone = zone;\n\t\tthis.offsetScore = 0;\n\t\tthis.abbrScore = 0;\n\t}\n\n\tZoneScore.prototype.scoreOffsetAt = function (offsetAt) {\n\t\tthis.offsetScore += Math.abs(this.zone.utcOffset(offsetAt.at) - offsetAt.offset);\n\t\tif (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr) {\n\t\t\tthis.abbrScore++;\n\t\t}\n\t};\n\n\tfunction findChange(low, high) {\n\t\tvar mid, diff;\n\n\t\twhile ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) {\n\t\t\tmid = new OffsetAt(new Date(low.at + diff));\n\t\t\tif (mid.offset === low.offset) {\n\t\t\t\tlow = mid;\n\t\t\t} else {\n\t\t\t\thigh = mid;\n\t\t\t}\n\t\t}\n\n\t\treturn low;\n\t}\n\n\tfunction userOffsets() {\n\t\tvar startYear = new Date().getFullYear() - 2,\n\t\t\tlast = new OffsetAt(new Date(startYear, 0, 1)),\n\t\t\toffsets = [last],\n\t\t\tchange, next, i;\n\n\t\tfor (i = 1; i < 48; i++) {\n\t\t\tnext = new OffsetAt(new Date(startYear, i, 1));\n\t\t\tif (next.offset !== last.offset) {\n\t\t\t\tchange = findChange(last, next);\n\t\t\t\toffsets.push(change);\n\t\t\t\toffsets.push(new OffsetAt(new Date(change.at + 6e4)));\n\t\t\t}\n\t\t\tlast = next;\n\t\t}\n\n\t\tfor (i = 0; i < 4; i++) {\n\t\t\toffsets.push(new OffsetAt(new Date(startYear + i, 0, 1)));\n\t\t\toffsets.push(new OffsetAt(new Date(startYear + i, 6, 1)));\n\t\t}\n\n\t\treturn offsets;\n\t}\n\n\tfunction sortZoneScores (a, b) {\n\t\tif (a.offsetScore !== b.offsetScore) {\n\t\t\treturn a.offsetScore - b.offsetScore;\n\t\t}\n\t\tif (a.abbrScore !== b.abbrScore) {\n\t\t\treturn a.abbrScore - b.abbrScore;\n\t\t}\n\t\treturn b.zone.population - a.zone.population;\n\t}\n\n\tfunction addToGuesses (name, offsets) {\n\t\tvar i, offset;\n\t\tarrayToInt(offsets);\n\t\tfor (i = 0; i < offsets.length; i++) {\n\t\t\toffset = offsets[i];\n\t\t\tguesses[offset] = guesses[offset] || {};\n\t\t\tguesses[offset][name] = true;\n\t\t}\n\t}\n\n\tfunction guessesForUserOffsets (offsets) {\n\t\tvar offsetsLength = offsets.length,\n\t\t\tfilteredGuesses = {},\n\t\t\tout = [],\n\t\t\ti, j, guessesOffset;\n\n\t\tfor (i = 0; i < offsetsLength; i++) {\n\t\t\tguessesOffset = guesses[offsets[i].offset] || {};\n\t\t\tfor (j in guessesOffset) {\n\t\t\t\tif (guessesOffset.hasOwnProperty(j)) {\n\t\t\t\t\tfilteredGuesses[j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (i in filteredGuesses) {\n\t\t\tif (filteredGuesses.hasOwnProperty(i)) {\n\t\t\t\tout.push(names[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn out;\n\t}\n\n\tfunction rebuildGuess () {\n\n\t\t// use Intl API when available and returning valid time zone\n\t\ttry {\n\t\t\tvar intlName = Intl.DateTimeFormat().resolvedOptions().timeZone;\n\t\t\tif (intlName && intlName.length > 3) {\n\t\t\t\tvar name = names[normalizeName(intlName)];\n\t\t\t\tif (name) {\n\t\t\t\t\treturn name;\n\t\t\t\t}\n\t\t\t\tlogError(\"Moment Timezone found \" + intlName + \" from the Intl api, but did not have that data loaded.\");\n\t\t\t}\n\t\t} catch (e) {\n\t\t\t// Intl unavailable, fall back to manual guessing.\n\t\t}\n\n\t\tvar offsets = userOffsets(),\n\t\t\toffsetsLength = offsets.length,\n\t\t\tguesses = guessesForUserOffsets(offsets),\n\t\t\tzoneScores = [],\n\t\t\tzoneScore, i, j;\n\n\t\tfor (i = 0; i < guesses.length; i++) {\n\t\t\tzoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength);\n\t\t\tfor (j = 0; j < offsetsLength; j++) {\n\t\t\t\tzoneScore.scoreOffsetAt(offsets[j]);\n\t\t\t}\n\t\t\tzoneScores.push(zoneScore);\n\t\t}\n\n\t\tzoneScores.sort(sortZoneScores);\n\n\t\treturn zoneScores.length > 0 ? zoneScores[0].zone.name : undefined;\n\t}\n\n\tfunction guess (ignoreCache) {\n\t\tif (!cachedGuess || ignoreCache) {\n\t\t\tcachedGuess = rebuildGuess();\n\t\t}\n\t\treturn cachedGuess;\n\t}\n\n\t/************************************\n\t\tGlobal Methods\n\t************************************/\n\n\tfunction normalizeName (name) {\n\t\treturn (name || '').toLowerCase().replace(/\\//g, '_');\n\t}\n\n\tfunction addZone (packed) {\n\t\tvar i, name, split, normalized;\n\n\t\tif (typeof packed === \"string\") {\n\t\t\tpacked = [packed];\n\t\t}\n\n\t\tfor (i = 0; i < packed.length; i++) {\n\t\t\tsplit = packed[i].split('|');\n\t\t\tname = split[0];\n\t\t\tnormalized = normalizeName(name);\n\t\t\tzones[normalized] = packed[i];\n\t\t\tnames[normalized] = name;\n\t\t\taddToGuesses(normalized, split[2].split(' '));\n\t\t}\n\t}\n\n\tfunction getZone (name, caller) {\n\t\t\n\t\tname = normalizeName(name);\n\n\t\tvar zone = zones[name];\n\t\tvar link;\n\n\t\tif (zone instanceof Zone) {\n\t\t\treturn zone;\n\t\t}\n\n\t\tif (typeof zone === 'string') {\n\t\t\tzone = new Zone(zone);\n\t\t\tzones[name] = zone;\n\t\t\treturn zone;\n\t\t}\n\n\t\t// Pass getZone to prevent recursion more than 1 level deep\n\t\tif (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) {\n\t\t\tzone = zones[name] = new Zone();\n\t\t\tzone._set(link);\n\t\t\tzone.name = names[name];\n\t\t\treturn zone;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tfunction getNames () {\n\t\tvar i, out = [];\n\n\t\tfor (i in names) {\n\t\t\tif (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) {\n\t\t\t\tout.push(names[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn out.sort();\n\t}\n\n\tfunction addLink (aliases) {\n\t\tvar i, alias, normal0, normal1;\n\n\t\tif (typeof aliases === \"string\") {\n\t\t\taliases = [aliases];\n\t\t}\n\n\t\tfor (i = 0; i < aliases.length; i++) {\n\t\t\talias = aliases[i].split('|');\n\n\t\t\tnormal0 = normalizeName(alias[0]);\n\t\t\tnormal1 = normalizeName(alias[1]);\n\n\t\t\tlinks[normal0] = normal1;\n\t\t\tnames[normal0] = alias[0];\n\n\t\t\tlinks[normal1] = normal0;\n\t\t\tnames[normal1] = alias[1];\n\t\t}\n\t}\n\n\tfunction loadData (data) {\n\t\taddZone(data.zones);\n\t\taddLink(data.links);\n\t\ttz.dataVersion = data.version;\n\t}\n\n\tfunction zoneExists (name) {\n\t\tif (!zoneExists.didShowError) {\n\t\t\tzoneExists.didShowError = true;\n\t\t\t\tlogError(\"moment.tz.zoneExists('\" + name + \"') has been deprecated in favor of !moment.tz.zone('\" + name + \"')\");\n\t\t}\n\t\treturn !!getZone(name);\n\t}\n\n\tfunction needsOffset (m) {\n\t\tvar isUnixTimestamp = (m._f === 'X' || m._f === 'x');\n\t\treturn !!(m._a && (m._tzm === undefined) && !isUnixTimestamp);\n\t}\n\n\tfunction logError (message) {\n\t\tif (typeof console !== 'undefined' && typeof console.error === 'function') {\n\t\t\tconsole.error(message);\n\t\t}\n\t}\n\n\t/************************************\n\t\tmoment.tz namespace\n\t************************************/\n\n\tfunction tz (input) {\n\t\tvar args = Array.prototype.slice.call(arguments, 0, -1),\n\t\t\tname = arguments[arguments.length - 1],\n\t\t\tzone = getZone(name),\n\t\t\tout = moment.utc.apply(null, args);\n\n\t\tif (zone && !moment.isMoment(input) && needsOffset(out)) {\n\t\t\tout.add(zone.parse(out), 'minutes');\n\t\t}\n\n\t\tout.tz(name);\n\n\t\treturn out;\n\t}\n\n\ttz.version = VERSION;\n\ttz.dataVersion = '';\n\ttz._zones = zones;\n\ttz._links = links;\n\ttz._names = names;\n\ttz.add = addZone;\n\ttz.link = addLink;\n\ttz.load = loadData;\n\ttz.zone = getZone;\n\ttz.zoneExists = zoneExists; // deprecated in 0.1.0\n\ttz.guess = guess;\n\ttz.names = getNames;\n\ttz.Zone = Zone;\n\ttz.unpack = unpack;\n\ttz.unpackBase60 = unpackBase60;\n\ttz.needsOffset = needsOffset;\n\ttz.moveInvalidForward = true;\n\ttz.moveAmbiguousForward = false;\n\n\t/************************************\n\t\tInterface with Moment.js\n\t************************************/\n\n\tvar fn = moment.fn;\n\n\tmoment.tz = tz;\n\n\tmoment.defaultZone = null;\n\n\tmoment.updateOffset = function (mom, keepTime) {\n\t\tvar zone = moment.defaultZone,\n\t\t\toffset;\n\n\t\tif (mom._z === undefined) {\n\t\t\tif (zone && needsOffset(mom) && !mom._isUTC) {\n\t\t\t\tmom._d = moment.utc(mom._a)._d;\n\t\t\t\tmom.utc().add(zone.parse(mom), 'minutes');\n\t\t\t}\n\t\t\tmom._z = zone;\n\t\t}\n\t\tif (mom._z) {\n\t\t\toffset = mom._z.utcOffset(mom);\n\t\t\tif (Math.abs(offset) < 16) {\n\t\t\t\toffset = offset / 60;\n\t\t\t}\n\t\t\tif (mom.utcOffset !== undefined) {\n\t\t\t\tmom.utcOffset(-offset, keepTime);\n\t\t\t} else {\n\t\t\t\tmom.zone(offset, keepTime);\n\t\t\t}\n\t\t}\n\t};\n\n\tfn.tz = function (name, keepTime) {\n\t\tif (name) {\n\t\t\tif (typeof name !== 'string') {\n\t\t\t\tthrow new Error('Time zone name must be a string, got ' + name + ' [' + typeof name + ']');\n\t\t\t}\n\t\t\tthis._z = getZone(name);\n\t\t\tif (this._z) {\n\t\t\t\tmoment.updateOffset(this, keepTime);\n\t\t\t} else {\n\t\t\t\tlogError(\"Moment Timezone has no data for \" + name + \". See http://momentjs.com/timezone/docs/#/data-loading/.\");\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif (this._z) { return this._z.name; }\n\t};\n\n\tfunction abbrWrap (old) {\n\t\treturn function () {\n\t\t\tif (this._z) { return this._z.abbr(this); }\n\t\t\treturn old.call(this);\n\t\t};\n\t}\n\n\tfunction resetZoneWrap (old) {\n\t\treturn function () {\n\t\t\tthis._z = null;\n\t\t\treturn old.apply(this, arguments);\n\t\t};\n\t}\n\n\tfn.zoneName = abbrWrap(fn.zoneName);\n\tfn.zoneAbbr = abbrWrap(fn.zoneAbbr);\n\tfn.utc = resetZoneWrap(fn.utc);\n\n\tmoment.tz.setDefault = function(name) {\n\t\tif (major < 2 || (major === 2 && minor < 9)) {\n\t\t\tlogError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.');\n\t\t}\n\t\tmoment.defaultZone = name ? getZone(name) : null;\n\t\treturn moment;\n\t};\n\n\t// Cloning a moment should include the _z property.\n\tvar momentProperties = moment.momentProperties;\n\tif (Object.prototype.toString.call(momentProperties) === '[object Array]') {\n\t\t// moment 2.8.1+\n\t\tmomentProperties.push('_z');\n\t\tmomentProperties.push('_a');\n\t} else if (momentProperties) {\n\t\t// moment 2.7.0\n\t\tmomentProperties._z = null;\n\t}\n\n\t// INJECT DATA\n\n\treturn moment;\n}));\n","/*!\n * UAParser.js v0.7.18\n * Lightweight JavaScript-based User-Agent string parser\n * https://github.com/faisalman/ua-parser-js\n *\n * Copyright © 2012-2016 Faisal Salman \n * Dual licensed under GPLv2 or MIT\n */\n\n(function (window, undefined) {\n\n 'use strict';\n\n //////////////\n // Constants\n /////////////\n\n\n var LIBVERSION = '0.7.18',\n EMPTY = '',\n UNKNOWN = '?',\n FUNC_TYPE = 'function',\n UNDEF_TYPE = 'undefined',\n OBJ_TYPE = 'object',\n STR_TYPE = 'string',\n MAJOR = 'major', // deprecated\n MODEL = 'model',\n NAME = 'name',\n TYPE = 'type',\n VENDOR = 'vendor',\n VERSION = 'version',\n ARCHITECTURE= 'architecture',\n CONSOLE = 'console',\n MOBILE = 'mobile',\n TABLET = 'tablet',\n SMARTTV = 'smarttv',\n WEARABLE = 'wearable',\n EMBEDDED = 'embedded';\n\n\n ///////////\n // Helper\n //////////\n\n\n var util = {\n extend : function (regexes, extensions) {\n var margedRegexes = {};\n for (var i in regexes) {\n if (extensions[i] && extensions[i].length % 2 === 0) {\n margedRegexes[i] = extensions[i].concat(regexes[i]);\n } else {\n margedRegexes[i] = regexes[i];\n }\n }\n return margedRegexes;\n },\n has : function (str1, str2) {\n if (typeof str1 === \"string\") {\n return str2.toLowerCase().indexOf(str1.toLowerCase()) !== -1;\n } else {\n return false;\n }\n },\n lowerize : function (str) {\n return str.toLowerCase();\n },\n major : function (version) {\n return typeof(version) === STR_TYPE ? version.replace(/[^\\d\\.]/g,'').split(\".\")[0] : undefined;\n },\n trim : function (str) {\n return str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n }\n };\n\n\n ///////////////\n // Map helper\n //////////////\n\n\n var mapper = {\n\n rgx : function (ua, arrays) {\n\n //var result = {},\n var i = 0, j, k, p, q, matches, match;//, args = arguments;\n\n /*// construct object barebones\n for (p = 0; p < args[1].length; p++) {\n q = args[1][p];\n result[typeof q === OBJ_TYPE ? q[0] : q] = undefined;\n }*/\n\n // loop through all regexes maps\n while (i < arrays.length && !matches) {\n\n var regex = arrays[i], // even sequence (0,2,4,..)\n props = arrays[i + 1]; // odd sequence (1,3,5,..)\n j = k = 0;\n\n // try matching uastring with regexes\n while (j < regex.length && !matches) {\n\n matches = regex[j++].exec(ua);\n\n if (!!matches) {\n for (p = 0; p < props.length; p++) {\n match = matches[++k];\n q = props[p];\n // check if given property is actually array\n if (typeof q === OBJ_TYPE && q.length > 0) {\n if (q.length == 2) {\n if (typeof q[1] == FUNC_TYPE) {\n // assign modified match\n this[q[0]] = q[1].call(this, match);\n } else {\n // assign given value, ignore regex match\n this[q[0]] = q[1];\n }\n } else if (q.length == 3) {\n // check whether function or regex\n if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {\n // call function (usually string mapper)\n this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined;\n } else {\n // sanitize match using given regex\n this[q[0]] = match ? match.replace(q[1], q[2]) : undefined;\n }\n } else if (q.length == 4) {\n this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;\n }\n } else {\n this[q] = match ? match : undefined;\n }\n }\n }\n }\n i += 2;\n }\n // console.log(this);\n //return this;\n },\n\n str : function (str, map) {\n\n for (var i in map) {\n // check if array\n if (typeof map[i] === OBJ_TYPE && map[i].length > 0) {\n for (var j = 0; j < map[i].length; j++) {\n if (util.has(map[i][j], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n } else if (util.has(map[i], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n return str;\n }\n };\n\n\n ///////////////\n // String map\n //////////////\n\n\n var maps = {\n\n browser : {\n oldsafari : {\n version : {\n '1.0' : '/8',\n '1.2' : '/1',\n '1.3' : '/3',\n '2.0' : '/412',\n '2.0.2' : '/416',\n '2.0.3' : '/417',\n '2.0.4' : '/419',\n '?' : '/'\n }\n }\n },\n\n device : {\n amazon : {\n model : {\n 'Fire Phone' : ['SD', 'KF']\n }\n },\n sprint : {\n model : {\n 'Evo Shift 4G' : '7373KT'\n },\n vendor : {\n 'HTC' : 'APA',\n 'Sprint' : 'Sprint'\n }\n }\n },\n\n os : {\n windows : {\n version : {\n 'ME' : '4.90',\n 'NT 3.11' : 'NT3.51',\n 'NT 4.0' : 'NT4.0',\n '2000' : 'NT 5.0',\n 'XP' : ['NT 5.1', 'NT 5.2'],\n 'Vista' : 'NT 6.0',\n '7' : 'NT 6.1',\n '8' : 'NT 6.2',\n '8.1' : 'NT 6.3',\n '10' : ['NT 6.4', 'NT 10.0'],\n 'RT' : 'ARM'\n }\n }\n }\n };\n\n\n //////////////\n // Regex map\n /////////////\n\n\n var regexes = {\n\n browser : [[\n\n // Presto based\n /(opera\\smini)\\/([\\w\\.-]+)/i, // Opera Mini\n /(opera\\s[mobiletab]+).+version\\/([\\w\\.-]+)/i, // Opera Mobi/Tablet\n /(opera).+version\\/([\\w\\.]+)/i, // Opera > 9.80\n /(opera)[\\/\\s]+([\\w\\.]+)/i // Opera < 9.80\n ], [NAME, VERSION], [\n\n /(opios)[\\/\\s]+([\\w\\.]+)/i // Opera mini on iphone >= 8.0\n ], [[NAME, 'Opera Mini'], VERSION], [\n\n /\\s(opr)\\/([\\w\\.]+)/i // Opera Webkit\n ], [[NAME, 'Opera'], VERSION], [\n\n // Mixed\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /(lunascape|maxthon|netfront|jasmine|blazer)[\\/\\s]?([\\w\\.]*)/i,\n // Lunascape/Maxthon/Netfront/Jasmine/Blazer\n\n // Trident based\n /(avant\\s|iemobile|slim|baidu)(?:browser)?[\\/\\s]?([\\w\\.]*)/i,\n // Avant/IEMobile/SlimBrowser/Baidu\n /(?:ms|\\()(ie)\\s([\\w\\.]+)/i, // Internet Explorer\n\n // Webkit/KHTML based\n /(rekonq)\\/([\\w\\.]*)/i, // Rekonq\n /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark)\\/([\\w\\.-]+)/i\n // Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser\n ], [NAME, VERSION], [\n\n /(trident).+rv[:\\s]([\\w\\.]+).+like\\sgecko/i // IE11\n ], [[NAME, 'IE'], VERSION], [\n\n /(edge|edgios|edgea)\\/((\\d+)?[\\w\\.]+)/i // Microsoft Edge\n ], [[NAME, 'Edge'], VERSION], [\n\n /(yabrowser)\\/([\\w\\.]+)/i // Yandex\n ], [[NAME, 'Yandex'], VERSION], [\n\n /(puffin)\\/([\\w\\.]+)/i // Puffin\n ], [[NAME, 'Puffin'], VERSION], [\n\n /((?:[\\s\\/])uc?\\s?browser|(?:juc.+)ucweb)[\\/\\s]?([\\w\\.]+)/i\n // UCBrowser\n ], [[NAME, 'UCBrowser'], VERSION], [\n\n /(comodo_dragon)\\/([\\w\\.]+)/i // Comodo Dragon\n ], [[NAME, /_/g, ' '], VERSION], [\n\n /(micromessenger)\\/([\\w\\.]+)/i // WeChat\n ], [[NAME, 'WeChat'], VERSION], [\n\n /(qqbrowserlite)\\/([\\w\\.]+)/i // QQBrowserLite\n ], [NAME, VERSION], [\n\n /(QQ)\\/([\\d\\.]+)/i // QQ, aka ShouQ\n ], [NAME, VERSION], [\n\n /m?(qqbrowser)[\\/\\s]?([\\w\\.]+)/i // QQBrowser\n ], [NAME, VERSION], [\n\n /(BIDUBrowser)[\\/\\s]?([\\w\\.]+)/i // Baidu Browser\n ], [NAME, VERSION], [\n\n /(2345Explorer)[\\/\\s]?([\\w\\.]+)/i // 2345 Browser\n ], [NAME, VERSION], [\n\n /(MetaSr)[\\/\\s]?([\\w\\.]+)/i // SouGouBrowser\n ], [NAME], [\n\n /(LBBROWSER)/i // LieBao Browser\n ], [NAME], [\n\n /xiaomi\\/miuibrowser\\/([\\w\\.]+)/i // MIUI Browser\n ], [VERSION, [NAME, 'MIUI Browser']], [\n\n /;fbav\\/([\\w\\.]+);/i // Facebook App for iOS & Android\n ], [VERSION, [NAME, 'Facebook']], [\n\n /headlesschrome(?:\\/([\\w\\.]+)|\\s)/i // Chrome Headless\n ], [VERSION, [NAME, 'Chrome Headless']], [\n\n /\\swv\\).+(chrome)\\/([\\w\\.]+)/i // Chrome WebView\n ], [[NAME, /(.+)/, '$1 WebView'], VERSION], [\n\n /((?:oculus|samsung)browser)\\/([\\w\\.]+)/i\n ], [[NAME, /(.+(?:g|us))(.+)/, '$1 $2'], VERSION], [ // Oculus / Samsung Browser\n\n /android.+version\\/([\\w\\.]+)\\s+(?:mobile\\s?safari|safari)*/i // Android Browser\n ], [VERSION, [NAME, 'Android Browser']], [\n\n /(chrome|omniweb|arora|[tizenoka]{5}\\s?browser)\\/v?([\\w\\.]+)/i\n // Chrome/OmniWeb/Arora/Tizen/Nokia\n ], [NAME, VERSION], [\n\n /(dolfin)\\/([\\w\\.]+)/i // Dolphin\n ], [[NAME, 'Dolphin'], VERSION], [\n\n /((?:android.+)crmo|crios)\\/([\\w\\.]+)/i // Chrome for Android/iOS\n ], [[NAME, 'Chrome'], VERSION], [\n\n /(coast)\\/([\\w\\.]+)/i // Opera Coast\n ], [[NAME, 'Opera Coast'], VERSION], [\n\n /fxios\\/([\\w\\.-]+)/i // Firefox for iOS\n ], [VERSION, [NAME, 'Firefox']], [\n\n /version\\/([\\w\\.]+).+?mobile\\/\\w+\\s(safari)/i // Mobile Safari\n ], [VERSION, [NAME, 'Mobile Safari']], [\n\n /version\\/([\\w\\.]+).+?(mobile\\s?safari|safari)/i // Safari & Safari Mobile\n ], [VERSION, NAME], [\n\n /webkit.+?(gsa)\\/([\\w\\.]+).+?(mobile\\s?safari|safari)(\\/[\\w\\.]+)/i // Google Search Appliance on iOS\n ], [[NAME, 'GSA'], VERSION], [\n\n /webkit.+?(mobile\\s?safari|safari)(\\/[\\w\\.]+)/i // Safari < 3.0\n ], [NAME, [VERSION, mapper.str, maps.browser.oldsafari.version]], [\n\n /(konqueror)\\/([\\w\\.]+)/i, // Konqueror\n /(webkit|khtml)\\/([\\w\\.]+)/i\n ], [NAME, VERSION], [\n\n // Gecko based\n /(navigator|netscape)\\/([\\w\\.-]+)/i // Netscape\n ], [[NAME, 'Netscape'], VERSION], [\n /(swiftfox)/i, // Swiftfox\n /(icedragon|iceweasel|camino|chimera|fennec|maemo\\sbrowser|minimo|conkeror)[\\/\\s]?([\\w\\.\\+]+)/i,\n // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror\n /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\\/([\\w\\.-]+)$/i,\n\n // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix\n /(mozilla)\\/([\\w\\.]+).+rv\\:.+gecko\\/\\d+/i, // Mozilla\n\n // Other\n /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\\/\\s]?([\\w\\.]+)/i,\n // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir\n /(links)\\s\\(([\\w\\.]+)/i, // Links\n /(gobrowser)\\/?([\\w\\.]*)/i, // GoBrowser\n /(ice\\s?browser)\\/v?([\\w\\._]+)/i, // ICE Browser\n /(mosaic)[\\/\\s]([\\w\\.]+)/i // Mosaic\n ], [NAME, VERSION]\n\n /* /////////////////////\n // Media players BEGIN\n ////////////////////////\n\n , [\n\n /(apple(?:coremedia|))\\/((\\d+)[\\w\\._]+)/i, // Generic Apple CoreMedia\n /(coremedia) v((\\d+)[\\w\\._]+)/i\n ], [NAME, VERSION], [\n\n /(aqualung|lyssna|bsplayer)\\/((\\d+)?[\\w\\.-]+)/i // Aqualung/Lyssna/BSPlayer\n ], [NAME, VERSION], [\n\n /(ares|ossproxy)\\s((\\d+)[\\w\\.-]+)/i // Ares/OSSProxy\n ], [NAME, VERSION], [\n\n /(audacious|audimusicstream|amarok|bass|core|dalvik|gnomemplayer|music on console|nsplayer|psp-internetradioplayer|videos)\\/((\\d+)[\\w\\.-]+)/i,\n // Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/Dalvik/GnomeMplayer/MoC\n // NSPlayer/PSP-InternetRadioPlayer/Videos\n /(clementine|music player daemon)\\s((\\d+)[\\w\\.-]+)/i, // Clementine/MPD\n /(lg player|nexplayer)\\s((\\d+)[\\d\\.]+)/i,\n /player\\/(nexplayer|lg player)\\s((\\d+)[\\w\\.-]+)/i // NexPlayer/LG Player\n ], [NAME, VERSION], [\n /(nexplayer)\\s((\\d+)[\\w\\.-]+)/i // Nexplayer\n ], [NAME, VERSION], [\n\n /(flrp)\\/((\\d+)[\\w\\.-]+)/i // Flip Player\n ], [[NAME, 'Flip Player'], VERSION], [\n\n /(fstream|nativehost|queryseekspider|ia-archiver|facebookexternalhit)/i\n // FStream/NativeHost/QuerySeekSpider/IA Archiver/facebookexternalhit\n ], [NAME], [\n\n /(gstreamer) souphttpsrc (?:\\([^\\)]+\\)){0,1} libsoup\\/((\\d+)[\\w\\.-]+)/i\n // Gstreamer\n ], [NAME, VERSION], [\n\n /(htc streaming player)\\s[\\w_]+\\s\\/\\s((\\d+)[\\d\\.]+)/i, // HTC Streaming Player\n /(java|python-urllib|python-requests|wget|libcurl)\\/((\\d+)[\\w\\.-_]+)/i,\n // Java/urllib/requests/wget/cURL\n /(lavf)((\\d+)[\\d\\.]+)/i // Lavf (FFMPEG)\n ], [NAME, VERSION], [\n\n /(htc_one_s)\\/((\\d+)[\\d\\.]+)/i // HTC One S\n ], [[NAME, /_/g, ' '], VERSION], [\n\n /(mplayer)(?:\\s|\\/)(?:(?:sherpya-){0,1}svn)(?:-|\\s)(r\\d+(?:-\\d+[\\w\\.-]+){0,1})/i\n // MPlayer SVN\n ], [NAME, VERSION], [\n\n /(mplayer)(?:\\s|\\/|[unkow-]+)((\\d+)[\\w\\.-]+)/i // MPlayer\n ], [NAME, VERSION], [\n\n /(mplayer)/i, // MPlayer (no other info)\n /(yourmuze)/i, // YourMuze\n /(media player classic|nero showtime)/i // Media Player Classic/Nero ShowTime\n ], [NAME], [\n\n /(nero (?:home|scout))\\/((\\d+)[\\w\\.-]+)/i // Nero Home/Nero Scout\n ], [NAME, VERSION], [\n\n /(nokia\\d+)\\/((\\d+)[\\w\\.-]+)/i // Nokia\n ], [NAME, VERSION], [\n\n /\\s(songbird)\\/((\\d+)[\\w\\.-]+)/i // Songbird/Philips-Songbird\n ], [NAME, VERSION], [\n\n /(winamp)3 version ((\\d+)[\\w\\.-]+)/i, // Winamp\n /(winamp)\\s((\\d+)[\\w\\.-]+)/i,\n /(winamp)mpeg\\/((\\d+)[\\w\\.-]+)/i\n ], [NAME, VERSION], [\n\n /(ocms-bot|tapinradio|tunein radio|unknown|winamp|inlight radio)/i // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)\n // inlight radio\n ], [NAME], [\n\n /(quicktime|rma|radioapp|radioclientapplication|soundtap|totem|stagefright|streamium)\\/((\\d+)[\\w\\.-]+)/i\n // QuickTime/RealMedia/RadioApp/RadioClientApplication/\n // SoundTap/Totem/Stagefright/Streamium\n ], [NAME, VERSION], [\n\n /(smp)((\\d+)[\\d\\.]+)/i // SMP\n ], [NAME, VERSION], [\n\n /(vlc) media player - version ((\\d+)[\\w\\.]+)/i, // VLC Videolan\n /(vlc)\\/((\\d+)[\\w\\.-]+)/i,\n /(xbmc|gvfs|xine|xmms|irapp)\\/((\\d+)[\\w\\.-]+)/i, // XBMC/gvfs/Xine/XMMS/irapp\n /(foobar2000)\\/((\\d+)[\\d\\.]+)/i, // Foobar2000\n /(itunes)\\/((\\d+)[\\d\\.]+)/i // iTunes\n ], [NAME, VERSION], [\n\n /(wmplayer)\\/((\\d+)[\\w\\.-]+)/i, // Windows Media Player\n /(windows-media-player)\\/((\\d+)[\\w\\.-]+)/i\n ], [[NAME, /-/g, ' '], VERSION], [\n\n /windows\\/((\\d+)[\\w\\.-]+) upnp\\/[\\d\\.]+ dlnadoc\\/[\\d\\.]+ (home media server)/i\n // Windows Media Server\n ], [VERSION, [NAME, 'Windows']], [\n\n /(com\\.riseupradioalarm)\\/((\\d+)[\\d\\.]*)/i // RiseUP Radio Alarm\n ], [NAME, VERSION], [\n\n /(rad.io)\\s((\\d+)[\\d\\.]+)/i, // Rad.io\n /(radio.(?:de|at|fr))\\s((\\d+)[\\d\\.]+)/i\n ], [[NAME, 'rad.io'], VERSION]\n\n //////////////////////\n // Media players END\n ////////////////////*/\n\n ],\n\n cpu : [[\n\n /(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\\)]/i // AMD64\n ], [[ARCHITECTURE, 'amd64']], [\n\n /(ia32(?=;))/i // IA32 (quicktime)\n ], [[ARCHITECTURE, util.lowerize]], [\n\n /((?:i[346]|x)86)[;\\)]/i // IA32\n ], [[ARCHITECTURE, 'ia32']], [\n\n // PocketPC mistakenly identified as PowerPC\n /windows\\s(ce|mobile);\\sppc;/i\n ], [[ARCHITECTURE, 'arm']], [\n\n /((?:ppc|powerpc)(?:64)?)(?:\\smac|;|\\))/i // PowerPC\n ], [[ARCHITECTURE, /ower/, '', util.lowerize]], [\n\n /(sun4\\w)[;\\)]/i // SPARC\n ], [[ARCHITECTURE, 'sparc']], [\n\n /((?:avr32|ia64(?=;))|68k(?=\\))|arm(?:64|(?=v\\d+;))|(?=atmel\\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i\n // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC\n ], [[ARCHITECTURE, util.lowerize]]\n ],\n\n device : [[\n\n /\\((ipad|playbook);[\\w\\s\\);-]+(rim|apple)/i // iPad/PlayBook\n ], [MODEL, VENDOR, [TYPE, TABLET]], [\n\n /applecoremedia\\/[\\w\\.]+ \\((ipad)/ // iPad\n ], [MODEL, [VENDOR, 'Apple'], [TYPE, TABLET]], [\n\n /(apple\\s{0,1}tv)/i // Apple TV\n ], [[MODEL, 'Apple TV'], [VENDOR, 'Apple']], [\n\n /(archos)\\s(gamepad2?)/i, // Archos\n /(hp).+(touchpad)/i, // HP TouchPad\n /(hp).+(tablet)/i, // HP Tablet\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /\\s(nook)[\\w\\s]+build\\/(\\w+)/i, // Nook\n /(dell)\\s(strea[kpr\\s\\d]*[\\dko])/i // Dell Streak\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /(kf[A-z]+)\\sbuild\\/.+silk\\//i // Kindle Fire HD\n ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [\n /(sd|kf)[0349hijorstuw]+\\sbuild\\/.+silk\\//i // Fire Phone\n ], [[MODEL, mapper.str, maps.device.amazon.model], [VENDOR, 'Amazon'], [TYPE, MOBILE]], [\n\n /\\((ip[honed|\\s\\w*]+);.+(apple)/i // iPod/iPhone\n ], [MODEL, VENDOR, [TYPE, MOBILE]], [\n /\\((ip[honed|\\s\\w*]+);/i // iPod/iPhone\n ], [MODEL, [VENDOR, 'Apple'], [TYPE, MOBILE]], [\n\n /(blackberry)[\\s-]?(\\w+)/i, // BlackBerry\n /(blackberry|benq|palm(?=\\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\\s_-]?([\\w-]*)/i,\n // BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron\n /(hp)\\s([\\w\\s]+\\w)/i, // HP iPAQ\n /(asus)-?(\\w+)/i // Asus\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /\\(bb10;\\s(\\w+)/i // BlackBerry 10\n ], [MODEL, [VENDOR, 'BlackBerry'], [TYPE, MOBILE]], [\n // Asus Tablets\n /android.+(transfo[prime\\s]{4,10}\\s\\w+|eeepc|slider\\s\\w+|nexus 7|padfone)/i\n ], [MODEL, [VENDOR, 'Asus'], [TYPE, TABLET]], [\n\n /(sony)\\s(tablet\\s[ps])\\sbuild\\//i, // Sony\n /(sony)?(?:sgp.+)\\sbuild\\//i\n ], [[VENDOR, 'Sony'], [MODEL, 'Xperia Tablet'], [TYPE, TABLET]], [\n /android.+\\s([c-g]\\d{4}|so[-l]\\w+)\\sbuild\\//i\n ], [MODEL, [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n\n /\\s(ouya)\\s/i, // Ouya\n /(nintendo)\\s([wids3u]+)/i // Nintendo\n ], [VENDOR, MODEL, [TYPE, CONSOLE]], [\n\n /android.+;\\s(shield)\\sbuild/i // Nvidia\n ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [\n\n /(playstation\\s[34portablevi]+)/i // Playstation\n ], [MODEL, [VENDOR, 'Sony'], [TYPE, CONSOLE]], [\n\n /(sprint\\s(\\w+))/i // Sprint Phones\n ], [[VENDOR, mapper.str, maps.device.sprint.vendor], [MODEL, mapper.str, maps.device.sprint.model], [TYPE, MOBILE]], [\n\n /(lenovo)\\s?(S(?:5000|6000)+(?:[-][\\w+]))/i // Lenovo tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /(htc)[;_\\s-]+([\\w\\s]+(?=\\))|\\w+)*/i, // HTC\n /(zte)-(\\w*)/i, // ZTE\n /(alcatel|geeksphone|lenovo|nexian|panasonic|(?=;\\s)sony)[_\\s-]?([\\w-]*)/i\n // Alcatel/GeeksPhone/Lenovo/Nexian/Panasonic/Sony\n ], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [\n\n /(nexus\\s9)/i // HTC Nexus 9\n ], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [\n\n /d\\/huawei([\\w\\s-]+)[;\\)]/i,\n /(nexus\\s6p)/i // Huawei\n ], [MODEL, [VENDOR, 'Huawei'], [TYPE, MOBILE]], [\n\n /(microsoft);\\s(lumia[\\s\\w]+)/i // Microsoft Lumia\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /[\\s\\(;](xbox(?:\\sone)?)[\\s\\);]/i // Microsoft Xbox\n ], [MODEL, [VENDOR, 'Microsoft'], [TYPE, CONSOLE]], [\n /(kin\\.[onetw]{3})/i // Microsoft Kin\n ], [[MODEL, /\\./g, ' '], [VENDOR, 'Microsoft'], [TYPE, MOBILE]], [\n\n // Motorola\n /\\s(milestone|droid(?:[2-4x]|\\s(?:bionic|x2|pro|razr))?:?(\\s4g)?)[\\w\\s]+build\\//i,\n /mot[\\s-]?(\\w*)/i,\n /(XT\\d{3,4}) build\\//i,\n /(nexus\\s6)/i\n ], [MODEL, [VENDOR, 'Motorola'], [TYPE, MOBILE]], [\n /android.+\\s(mz60\\d|xoom[\\s2]{0,2})\\sbuild\\//i\n ], [MODEL, [VENDOR, 'Motorola'], [TYPE, TABLET]], [\n\n /hbbtv\\/\\d+\\.\\d+\\.\\d+\\s+\\([\\w\\s]*;\\s*(\\w[^;]*);([^;]*)/i // HbbTV devices\n ], [[VENDOR, util.trim], [MODEL, util.trim], [TYPE, SMARTTV]], [\n\n /hbbtv.+maple;(\\d+)/i\n ], [[MODEL, /^/, 'SmartTV'], [VENDOR, 'Samsung'], [TYPE, SMARTTV]], [\n\n /\\(dtv[\\);].+(aquos)/i // Sharp\n ], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [\n\n /android.+((sch-i[89]0\\d|shw-m380s|gt-p\\d{4}|gt-n\\d+|sgh-t8[56]9|nexus 10))/i,\n /((SM-T\\w+))/i\n ], [[VENDOR, 'Samsung'], MODEL, [TYPE, TABLET]], [ // Samsung\n /smart-tv.+(samsung)/i\n ], [VENDOR, [TYPE, SMARTTV], MODEL], [\n /((s[cgp]h-\\w+|gt-\\w+|galaxy\\snexus|sm-\\w[\\w\\d]+))/i,\n /(sam[sung]*)[\\s-]*(\\w+-?[\\w-]*)/i,\n /sec-((sgh\\w+))/i\n ], [[VENDOR, 'Samsung'], MODEL, [TYPE, MOBILE]], [\n\n /sie-(\\w*)/i // Siemens\n ], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [\n\n /(maemo|nokia).*(n900|lumia\\s\\d+)/i, // Nokia\n /(nokia)[\\s_-]?([\\w-]*)/i\n ], [[VENDOR, 'Nokia'], MODEL, [TYPE, MOBILE]], [\n\n /android\\s3\\.[\\s\\w;-]{10}(a\\d{3})/i // Acer\n ], [MODEL, [VENDOR, 'Acer'], [TYPE, TABLET]], [\n\n /android.+([vl]k\\-?\\d{3})\\s+build/i // LG Tablet\n ], [MODEL, [VENDOR, 'LG'], [TYPE, TABLET]], [\n /android\\s3\\.[\\s\\w;-]{10}(lg?)-([06cv9]{3,4})/i // LG Tablet\n ], [[VENDOR, 'LG'], MODEL, [TYPE, TABLET]], [\n /(lg) netcast\\.tv/i // LG SmartTV\n ], [VENDOR, MODEL, [TYPE, SMARTTV]], [\n /(nexus\\s[45])/i, // LG\n /lg[e;\\s\\/-]+(\\w*)/i,\n /android.+lg(\\-?[\\d\\w]+)\\s+build/i\n ], [MODEL, [VENDOR, 'LG'], [TYPE, MOBILE]], [\n\n /android.+(ideatab[a-z0-9\\-\\s]+)/i // Lenovo\n ], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [\n\n /linux;.+((jolla));/i // Jolla\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /((pebble))app\\/[\\d\\.]+\\s/i // Pebble\n ], [VENDOR, MODEL, [TYPE, WEARABLE]], [\n\n /android.+;\\s(oppo)\\s?([\\w\\s]+)\\sbuild/i // OPPO\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /crkey/i // Google Chromecast\n ], [[MODEL, 'Chromecast'], [VENDOR, 'Google']], [\n\n /android.+;\\s(glass)\\s\\d/i // Google Glass\n ], [MODEL, [VENDOR, 'Google'], [TYPE, WEARABLE]], [\n\n /android.+;\\s(pixel c)\\s/i // Google Pixel C\n ], [MODEL, [VENDOR, 'Google'], [TYPE, TABLET]], [\n\n /android.+;\\s(pixel xl|pixel)\\s/i // Google Pixel\n ], [MODEL, [VENDOR, 'Google'], [TYPE, MOBILE]], [\n\n /android.+;\\s(\\w+)\\s+build\\/hm\\1/i, // Xiaomi Hongmi 'numeric' models\n /android.+(hm[\\s\\-_]*note?[\\s_]*(?:\\d\\w)?)\\s+build/i, // Xiaomi Hongmi\n /android.+(mi[\\s\\-_]*(?:one|one[\\s_]plus|note lte)?[\\s_]*(?:\\d?\\w?)[\\s_]*(?:plus)?)\\s+build/i, // Xiaomi Mi\n /android.+(redmi[\\s\\-_]*(?:note)?(?:[\\s_]*[\\w\\s]+))\\s+build/i // Redmi Phones\n ], [[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, MOBILE]], [\n /android.+(mi[\\s\\-_]*(?:pad)(?:[\\s_]*[\\w\\s]+))\\s+build/i // Mi Pad tablets\n ],[[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, TABLET]], [\n /android.+;\\s(m[1-5]\\snote)\\sbuild/i // Meizu Tablet\n ], [MODEL, [VENDOR, 'Meizu'], [TYPE, TABLET]], [\n\n /android.+a000(1)\\s+build/i, // OnePlus\n /android.+oneplus\\s(a\\d{4})\\s+build/i\n ], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(RCT[\\d\\w]+)\\s+build/i // RCA Tablets\n ], [MODEL, [VENDOR, 'RCA'], [TYPE, TABLET]], [\n\n /android.+[;\\/\\s]+(Venue[\\d\\s]{2,7})\\s+build/i // Dell Venue Tablets\n ], [MODEL, [VENDOR, 'Dell'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Q[T|M][\\d\\w]+)\\s+build/i // Verizon Tablet\n ], [MODEL, [VENDOR, 'Verizon'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s+(Barnes[&\\s]+Noble\\s+|BN[RT])(V?.*)\\s+build/i // Barnes & Noble Tablet\n ], [[VENDOR, 'Barnes & Noble'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s+(TM\\d{3}.*\\b)\\s+build/i // Barnes & Noble Tablet\n ], [MODEL, [VENDOR, 'NuVision'], [TYPE, TABLET]], [\n\n /android.+;\\s(k88)\\sbuild/i // ZTE K Series Tablet\n ], [MODEL, [VENDOR, 'ZTE'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(gen\\d{3})\\s+build.*49h/i // Swiss GEN Mobile\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(zur\\d{3})\\s+build/i // Swiss ZUR Tablet\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*((Zeki)?TB.*\\b)\\s+build/i // Zeki Tablets\n ], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [\n\n /(android).+[;\\/]\\s+([YR]\\d{2})\\s+build/i,\n /android.+[;\\/]\\s+(Dragon[\\-\\s]+Touch\\s+|DT)(\\w{5})\\sbuild/i // Dragon Touch Tablet\n ], [[VENDOR, 'Dragon Touch'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(NS-?\\w{0,9})\\sbuild/i // Insignia Tablets\n ], [MODEL, [VENDOR, 'Insignia'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*((NX|Next)-?\\w{0,9})\\s+build/i // NextBook Tablets\n ], [MODEL, [VENDOR, 'NextBook'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Xtreme\\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\\s+build/i\n ], [[VENDOR, 'Voice'], MODEL, [TYPE, MOBILE]], [ // Voice Xtreme Phones\n\n /android.+[;\\/]\\s*(LVTEL\\-)?(V1[12])\\s+build/i // LvTel Phones\n ], [[VENDOR, 'LvTel'], MODEL, [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(V(100MD|700NA|7011|917G).*\\b)\\s+build/i // Envizen Tablets\n ], [MODEL, [VENDOR, 'Envizen'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Le[\\s\\-]+Pan)[\\s\\-]+(\\w{1,9})\\s+build/i // Le Pan Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Trio[\\s\\-]*.*)\\s+build/i // MachSpeed Tablets\n ], [MODEL, [VENDOR, 'MachSpeed'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Trinity)[\\-\\s]*(T\\d{3})\\s+build/i // Trinity Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*TU_(1491)\\s+build/i // Rotor Tablets\n ], [MODEL, [VENDOR, 'Rotor'], [TYPE, TABLET]], [\n\n /android.+(KS(.+))\\s+build/i // Amazon Kindle Tablets\n ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [\n\n /android.+(Gigaset)[\\s\\-]+(Q\\w{1,9})\\s+build/i // Gigaset Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /\\s(tablet|tab)[;\\/]/i, // Unidentifiable Tablet\n /\\s(mobile)(?:[;\\/]|\\ssafari)/i // Unidentifiable Mobile\n ], [[TYPE, util.lowerize], VENDOR, MODEL], [\n\n /(android[\\w\\.\\s\\-]{0,9});.+build/i // Generic Android Device\n ], [MODEL, [VENDOR, 'Generic']]\n\n\n /*//////////////////////////\n // TODO: move to string map\n ////////////////////////////\n\n /(C6603)/i // Sony Xperia Z C6603\n ], [[MODEL, 'Xperia Z C6603'], [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n /(C6903)/i // Sony Xperia Z 1\n ], [[MODEL, 'Xperia Z 1'], [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n\n /(SM-G900[F|H])/i // Samsung Galaxy S5\n ], [[MODEL, 'Galaxy S5'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G7102)/i // Samsung Galaxy Grand 2\n ], [[MODEL, 'Galaxy Grand 2'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G530H)/i // Samsung Galaxy Grand Prime\n ], [[MODEL, 'Galaxy Grand Prime'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G313HZ)/i // Samsung Galaxy V\n ], [[MODEL, 'Galaxy V'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-T805)/i // Samsung Galaxy Tab S 10.5\n ], [[MODEL, 'Galaxy Tab S 10.5'], [VENDOR, 'Samsung'], [TYPE, TABLET]], [\n /(SM-G800F)/i // Samsung Galaxy S5 Mini\n ], [[MODEL, 'Galaxy S5 Mini'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-T311)/i // Samsung Galaxy Tab 3 8.0\n ], [[MODEL, 'Galaxy Tab 3 8.0'], [VENDOR, 'Samsung'], [TYPE, TABLET]], [\n\n /(T3C)/i // Advan Vandroid T3C\n ], [MODEL, [VENDOR, 'Advan'], [TYPE, TABLET]], [\n /(ADVAN T1J\\+)/i // Advan Vandroid T1J+\n ], [[MODEL, 'Vandroid T1J+'], [VENDOR, 'Advan'], [TYPE, TABLET]], [\n /(ADVAN S4A)/i // Advan Vandroid S4A\n ], [[MODEL, 'Vandroid S4A'], [VENDOR, 'Advan'], [TYPE, MOBILE]], [\n\n /(V972M)/i // ZTE V972M\n ], [MODEL, [VENDOR, 'ZTE'], [TYPE, MOBILE]], [\n\n /(i-mobile)\\s(IQ\\s[\\d\\.]+)/i // i-mobile IQ\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /(IQ6.3)/i // i-mobile IQ IQ 6.3\n ], [[MODEL, 'IQ 6.3'], [VENDOR, 'i-mobile'], [TYPE, MOBILE]], [\n /(i-mobile)\\s(i-style\\s[\\d\\.]+)/i // i-mobile i-STYLE\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /(i-STYLE2.1)/i // i-mobile i-STYLE 2.1\n ], [[MODEL, 'i-STYLE 2.1'], [VENDOR, 'i-mobile'], [TYPE, MOBILE]], [\n\n /(mobiistar touch LAI 512)/i // mobiistar touch LAI 512\n ], [[MODEL, 'Touch LAI 512'], [VENDOR, 'mobiistar'], [TYPE, MOBILE]], [\n\n /////////////\n // END TODO\n ///////////*/\n\n ],\n\n engine : [[\n\n /windows.+\\sedge\\/([\\w\\.]+)/i // EdgeHTML\n ], [VERSION, [NAME, 'EdgeHTML']], [\n\n /(presto)\\/([\\w\\.]+)/i, // Presto\n /(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\\/([\\w\\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m\n /(khtml|tasman|links)[\\/\\s]\\(?([\\w\\.]+)/i, // KHTML/Tasman/Links\n /(icab)[\\/\\s]([23]\\.[\\d\\.]+)/i // iCab\n ], [NAME, VERSION], [\n\n /rv\\:([\\w\\.]{1,9}).+(gecko)/i // Gecko\n ], [VERSION, NAME]\n ],\n\n os : [[\n\n // Windows based\n /microsoft\\s(windows)\\s(vista|xp)/i // Windows (iTunes)\n ], [NAME, VERSION], [\n /(windows)\\snt\\s6\\.2;\\s(arm)/i, // Windows RT\n /(windows\\sphone(?:\\sos)*)[\\s\\/]?([\\d\\.\\s\\w]*)/i, // Windows Phone\n /(windows\\smobile|windows)[\\s\\/]?([ntce\\d\\.\\s]+\\w)/i\n ], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [\n /(win(?=3|9|n)|win\\s9x\\s)([nt\\d\\.]+)/i\n ], [[NAME, 'Windows'], [VERSION, mapper.str, maps.os.windows.version]], [\n\n // Mobile/Embedded OS\n /\\((bb)(10);/i // BlackBerry 10\n ], [[NAME, 'BlackBerry'], VERSION], [\n /(blackberry)\\w*\\/?([\\w\\.]*)/i, // Blackberry\n /(tizen)[\\/\\s]([\\w\\.]+)/i, // Tizen\n /(android|webos|palm\\sos|qnx|bada|rim\\stablet\\sos|meego|contiki)[\\/\\s-]?([\\w\\.]*)/i,\n // Android/WebOS/Palm/QNX/Bada/RIM/MeeGo/Contiki\n /linux;.+(sailfish);/i // Sailfish OS\n ], [NAME, VERSION], [\n /(symbian\\s?os|symbos|s60(?=;))[\\/\\s-]?([\\w\\.]*)/i // Symbian\n ], [[NAME, 'Symbian'], VERSION], [\n /\\((series40);/i // Series 40\n ], [NAME], [\n /mozilla.+\\(mobile;.+gecko.+firefox/i // Firefox OS\n ], [[NAME, 'Firefox OS'], VERSION], [\n\n // Console\n /(nintendo|playstation)\\s([wids34portablevu]+)/i, // Nintendo/Playstation\n\n // GNU/Linux based\n /(mint)[\\/\\s\\(]?(\\w*)/i, // Mint\n /(mageia|vectorlinux)[;\\s]/i, // Mageia/VectorLinux\n /(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i,\n // Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware\n // Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus\n /(hurd|linux)\\s?([\\w\\.]*)/i, // Hurd/Linux\n /(gnu)\\s?([\\w\\.]*)/i // GNU\n ], [NAME, VERSION], [\n\n /(cros)\\s[\\w]+\\s([\\w\\.]+\\w)/i // Chromium OS\n ], [[NAME, 'Chromium OS'], VERSION],[\n\n // Solaris\n /(sunos)\\s?([\\w\\.\\d]*)/i // Solaris\n ], [[NAME, 'Solaris'], VERSION], [\n\n // BSD based\n /\\s([frentopc-]{0,4}bsd|dragonfly)\\s?([\\w\\.]*)/i // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly\n ], [NAME, VERSION],[\n\n /(haiku)\\s(\\w+)/i // Haiku\n ], [NAME, VERSION],[\n\n /cfnetwork\\/.+darwin/i,\n /ip[honead]{2,4}(?:.*os\\s([\\w]+)\\slike\\smac|;\\sopera)/i // iOS\n ], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [\n\n /(mac\\sos\\sx)\\s?([\\w\\s\\.]*)/i,\n /(macintosh|mac(?=_powerpc)\\s)/i // Mac OS\n ], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [\n\n // Other\n /((?:open)?solaris)[\\/\\s-]?([\\w\\.]*)/i, // Solaris\n /(aix)\\s((\\d)(?=\\.|\\)|\\s)[\\w\\.])*/i, // AIX\n /(plan\\s9|minix|beos|os\\/2|amigaos|morphos|risc\\sos|openvms)/i,\n // Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS/OpenVMS\n /(unix)\\s?([\\w\\.]*)/i // UNIX\n ], [NAME, VERSION]\n ]\n };\n\n\n /////////////////\n // Constructor\n ////////////////\n /*\n var Browser = function (name, version) {\n this[NAME] = name;\n this[VERSION] = version;\n };\n var CPU = function (arch) {\n this[ARCHITECTURE] = arch;\n };\n var Device = function (vendor, model, type) {\n this[VENDOR] = vendor;\n this[MODEL] = model;\n this[TYPE] = type;\n };\n var Engine = Browser;\n var OS = Browser;\n */\n var UAParser = function (uastring, extensions) {\n\n if (typeof uastring === 'object') {\n extensions = uastring;\n uastring = undefined;\n }\n\n if (!(this instanceof UAParser)) {\n return new UAParser(uastring, extensions).getResult();\n }\n\n var ua = uastring || ((window && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : EMPTY);\n var rgxmap = extensions ? util.extend(regexes, extensions) : regexes;\n //var browser = new Browser();\n //var cpu = new CPU();\n //var device = new Device();\n //var engine = new Engine();\n //var os = new OS();\n\n this.getBrowser = function () {\n var browser = { name: undefined, version: undefined };\n mapper.rgx.call(browser, ua, rgxmap.browser);\n browser.major = util.major(browser.version); // deprecated\n return browser;\n };\n this.getCPU = function () {\n var cpu = { architecture: undefined };\n mapper.rgx.call(cpu, ua, rgxmap.cpu);\n return cpu;\n };\n this.getDevice = function () {\n var device = { vendor: undefined, model: undefined, type: undefined };\n mapper.rgx.call(device, ua, rgxmap.device);\n return device;\n };\n this.getEngine = function () {\n var engine = { name: undefined, version: undefined };\n mapper.rgx.call(engine, ua, rgxmap.engine);\n return engine;\n };\n this.getOS = function () {\n var os = { name: undefined, version: undefined };\n mapper.rgx.call(os, ua, rgxmap.os);\n return os;\n };\n this.getResult = function () {\n return {\n ua : this.getUA(),\n browser : this.getBrowser(),\n engine : this.getEngine(),\n os : this.getOS(),\n device : this.getDevice(),\n cpu : this.getCPU()\n };\n };\n this.getUA = function () {\n return ua;\n };\n this.setUA = function (uastring) {\n ua = uastring;\n //browser = new Browser();\n //cpu = new CPU();\n //device = new Device();\n //engine = new Engine();\n //os = new OS();\n return this;\n };\n return this;\n };\n\n UAParser.VERSION = LIBVERSION;\n UAParser.BROWSER = {\n NAME : NAME,\n MAJOR : MAJOR, // deprecated\n VERSION : VERSION\n };\n UAParser.CPU = {\n ARCHITECTURE : ARCHITECTURE\n };\n UAParser.DEVICE = {\n MODEL : MODEL,\n VENDOR : VENDOR,\n TYPE : TYPE,\n CONSOLE : CONSOLE,\n MOBILE : MOBILE,\n SMARTTV : SMARTTV,\n TABLET : TABLET,\n WEARABLE: WEARABLE,\n EMBEDDED: EMBEDDED\n };\n UAParser.ENGINE = {\n NAME : NAME,\n VERSION : VERSION\n };\n UAParser.OS = {\n NAME : NAME,\n VERSION : VERSION\n };\n //UAParser.Utils = util;\n\n ///////////\n // Export\n //////////\n\n\n // check js environment\n if (typeof(exports) !== UNDEF_TYPE) {\n // nodejs env\n if (typeof module !== UNDEF_TYPE && module.exports) {\n exports = module.exports = UAParser;\n }\n // TODO: test!!!!!!!!\n /*\n if (require && require.main === module && process) {\n // cli\n var jsonize = function (arr) {\n var res = [];\n for (var i in arr) {\n res.push(new UAParser(arr[i]).getResult());\n }\n process.stdout.write(JSON.stringify(res, null, 2) + '\\n');\n };\n if (process.stdin.isTTY) {\n // via args\n jsonize(process.argv.slice(2));\n } else {\n // via pipe\n var str = '';\n process.stdin.on('readable', function() {\n var read = process.stdin.read();\n if (read !== null) {\n str += read;\n }\n });\n process.stdin.on('end', function () {\n jsonize(str.replace(/\\n$/, '').split('\\n'));\n });\n }\n }\n */\n exports.UAParser = UAParser;\n } else {\n // requirejs env (optional)\n if (typeof(define) === FUNC_TYPE && define.amd) {\n define(function () {\n return UAParser;\n });\n } else if (window) {\n // browser env\n window.UAParser = UAParser;\n }\n }\n\n // jQuery/Zepto specific (optional)\n // Note:\n // In AMD env the global scope should be kept clean, but jQuery is an exception.\n // jQuery always exports to global scope, unless jQuery.noConflict(true) is used,\n // and we should catch that.\n var $ = window && (window.jQuery || window.Zepto);\n if (typeof $ !== UNDEF_TYPE) {\n var parser = new UAParser();\n $.ua = parser.getResult();\n $.ua.get = function () {\n return parser.getUA();\n };\n $.ua.set = function (uastring) {\n parser.setUA(uastring);\n var result = parser.getResult();\n for (var prop in result) {\n $.ua[prop] = result[prop];\n }\n };\n }\n\n})(typeof window === 'object' ? window : this);\n","/**\r\n * [js-htmlencode]{@link https://github.com/emn178/js-htmlencode}\r\n *\r\n * @version 0.3.0\r\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\r\n * @copyright Chen, Yi-Cyuan 2014-2017\r\n * @license MIT\r\n */\r\n/*jslint bitwise: true */\r\n(function () {\r\n 'use strict';\r\n\r\n var root = typeof window === 'object' ? window : {};\r\n var NODE_JS = !root.JS_HTMLENCODE_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\r\n if (NODE_JS) {\r\n root = global;\r\n }\r\n var COMMON_JS = !root.JS_HTMLENCODE_NO_COMMON_JS && typeof module === 'object' && module.exports;\r\n var AMD = typeof define === 'function' && define.amd;\r\n\r\n var HTML_ENTITIES = {\r\n ' ' : '\\u00A0',\r\n '¡' : '\\u00A1',\r\n '¢' : '\\u00A2',\r\n '£' : '\\u00A3',\r\n '¤' : '\\u00A4',\r\n '¥' : '\\u00A5',\r\n '¦' : '\\u00A6',\r\n '§' : '\\u00A7',\r\n '¨' : '\\u00A8',\r\n '©' : '\\u00A9',\r\n 'ª' : '\\u00AA',\r\n '«' : '\\u00AB',\r\n '¬' : '\\u00AC',\r\n '­' : '\\u00AD',\r\n '®' : '\\u00AE',\r\n '¯' : '\\u00AF',\r\n '°' : '\\u00B0',\r\n '±' : '\\u00B1',\r\n '²' : '\\u00B2',\r\n '³' : '\\u00B3',\r\n '´' : '\\u00B4',\r\n 'µ' : '\\u00B5',\r\n '¶' : '\\u00B6',\r\n '·' : '\\u00B7',\r\n '¸' : '\\u00B8',\r\n '¹' : '\\u00B9',\r\n 'º' : '\\u00BA',\r\n '»' : '\\u00BB',\r\n '¼' : '\\u00BC',\r\n '½' : '\\u00BD',\r\n '¾' : '\\u00BE',\r\n '¿' : '\\u00BF',\r\n 'À' : '\\u00C0',\r\n 'Á' : '\\u00C1',\r\n 'Â' : '\\u00C2',\r\n 'Ã' : '\\u00C3',\r\n 'Ä' : '\\u00C4',\r\n 'Å' : '\\u00C5',\r\n 'Æ' : '\\u00C6',\r\n 'Ç' : '\\u00C7',\r\n 'È' : '\\u00C8',\r\n 'É' : '\\u00C9',\r\n 'Ê' : '\\u00CA',\r\n 'Ë' : '\\u00CB',\r\n 'Ì' : '\\u00CC',\r\n 'Í' : '\\u00CD',\r\n 'Î' : '\\u00CE',\r\n 'Ï' : '\\u00CF',\r\n 'Ð' : '\\u00D0',\r\n 'Ñ' : '\\u00D1',\r\n 'Ò' : '\\u00D2',\r\n 'Ó' : '\\u00D3',\r\n 'Ô' : '\\u00D4',\r\n 'Õ' : '\\u00D5',\r\n 'Ö' : '\\u00D6',\r\n '×' : '\\u00D7',\r\n 'Ø' : '\\u00D8',\r\n 'Ù' : '\\u00D9',\r\n 'Ú' : '\\u00DA',\r\n 'Û' : '\\u00DB',\r\n 'Ü' : '\\u00DC',\r\n 'Ý' : '\\u00DD',\r\n 'Þ' : '\\u00DE',\r\n 'ß' : '\\u00DF',\r\n 'à' : '\\u00E0',\r\n 'á' : '\\u00E1',\r\n 'â' : '\\u00E2',\r\n 'ã' : '\\u00E3',\r\n 'ä' : '\\u00E4',\r\n 'å' : '\\u00E5',\r\n 'æ' : '\\u00E6',\r\n 'ç' : '\\u00E7',\r\n 'è' : '\\u00E8',\r\n 'é' : '\\u00E9',\r\n 'ê' : '\\u00EA',\r\n 'ë' : '\\u00EB',\r\n 'ì' : '\\u00EC',\r\n 'í' : '\\u00ED',\r\n 'î' : '\\u00EE',\r\n 'ï' : '\\u00EF',\r\n 'ð' : '\\u00F0',\r\n 'ñ' : '\\u00F1',\r\n 'ò' : '\\u00F2',\r\n 'ó' : '\\u00F3',\r\n 'ô' : '\\u00F4',\r\n 'õ' : '\\u00F5',\r\n 'ö' : '\\u00F6',\r\n '÷' : '\\u00F7',\r\n 'ø' : '\\u00F8',\r\n 'ù' : '\\u00F9',\r\n 'ú' : '\\u00FA',\r\n 'û' : '\\u00FB',\r\n 'ü' : '\\u00FC',\r\n 'ý' : '\\u00FD',\r\n 'þ' : '\\u00FE',\r\n 'ÿ' : '\\u00FF',\r\n '"' : '\\u0022',\r\n '&' : '\\u0026',\r\n '<' : '\\u003C',\r\n '>' : '\\u003E',\r\n ''' : '\\u0027',\r\n 'Œ' : '\\u0152',\r\n 'œ' : '\\u0153',\r\n 'Š' : '\\u0160',\r\n 'š' : '\\u0161',\r\n 'Ÿ' : '\\u0178',\r\n 'ˆ' : '\\u02C6',\r\n '˜' : '\\u02DC',\r\n ' ' : '\\u2002',\r\n ' ' : '\\u2003',\r\n ' ' : '\\u2009',\r\n '‌' : '\\u200C',\r\n '‍' : '\\u200D',\r\n '‎' : '\\u200E',\r\n '‏' : '\\u200F',\r\n '–' : '\\u2013',\r\n '—' : '\\u2014',\r\n '‘' : '\\u2018',\r\n '’' : '\\u2019',\r\n '‚' : '\\u201A',\r\n '“' : '\\u201C',\r\n '”' : '\\u201D',\r\n '„' : '\\u201E',\r\n '†' : '\\u2020',\r\n '‡' : '\\u2021',\r\n '‰' : '\\u2030',\r\n '‹' : '\\u2039',\r\n '›' : '\\u203A',\r\n '€' : '\\u20AC',\r\n 'ƒ' : '\\u0192',\r\n 'Α' : '\\u0391',\r\n 'Β' : '\\u0392',\r\n 'Γ' : '\\u0393',\r\n 'Δ' : '\\u0394',\r\n 'Ε' : '\\u0395',\r\n 'Ζ' : '\\u0396',\r\n 'Η' : '\\u0397',\r\n 'Θ' : '\\u0398',\r\n 'Ι' : '\\u0399',\r\n 'Κ' : '\\u039A',\r\n 'Λ' : '\\u039B',\r\n 'Μ' : '\\u039C',\r\n 'Ν' : '\\u039D',\r\n 'Ξ' : '\\u039E',\r\n 'Ο' : '\\u039F',\r\n 'Π' : '\\u03A0',\r\n 'Ρ' : '\\u03A1',\r\n 'Σ' : '\\u03A3',\r\n 'Τ' : '\\u03A4',\r\n 'Υ' : '\\u03A5',\r\n 'Φ' : '\\u03A6',\r\n 'Χ' : '\\u03A7',\r\n 'Ψ' : '\\u03A8',\r\n 'Ω' : '\\u03A9',\r\n 'α' : '\\u03B1',\r\n 'β' : '\\u03B2',\r\n 'γ' : '\\u03B3',\r\n 'δ' : '\\u03B4',\r\n 'ε' : '\\u03B5',\r\n 'ζ' : '\\u03B6',\r\n 'η' : '\\u03B7',\r\n 'θ' : '\\u03B8',\r\n 'ι' : '\\u03B9',\r\n 'κ' : '\\u03BA',\r\n 'λ' : '\\u03BB',\r\n 'μ' : '\\u03BC',\r\n 'ν' : '\\u03BD',\r\n 'ξ' : '\\u03BE',\r\n 'ο' : '\\u03BF',\r\n 'π' : '\\u03C0',\r\n 'ρ' : '\\u03C1',\r\n 'ς' : '\\u03C2',\r\n 'σ' : '\\u03C3',\r\n 'τ' : '\\u03C4',\r\n 'υ' : '\\u03C5',\r\n 'φ' : '\\u03C6',\r\n 'χ' : '\\u03C7',\r\n 'ψ' : '\\u03C8',\r\n 'ω' : '\\u03C9',\r\n 'ϑ' : '\\u03D1',\r\n 'ϒ' : '\\u03D2',\r\n 'ϖ' : '\\u03D6',\r\n '•' : '\\u2022',\r\n '…' : '\\u2026',\r\n '′' : '\\u2032',\r\n '″' : '\\u2033',\r\n '‾' : '\\u203E',\r\n '⁄' : '\\u2044',\r\n '℘' : '\\u2118',\r\n 'ℑ' : '\\u2111',\r\n 'ℜ' : '\\u211C',\r\n '™' : '\\u2122',\r\n 'ℵ' : '\\u2135',\r\n '←' : '\\u2190',\r\n '↑' : '\\u2191',\r\n '→' : '\\u2192',\r\n '↓' : '\\u2193',\r\n '↔' : '\\u2194',\r\n '↵' : '\\u21B5',\r\n '⇐' : '\\u21D0',\r\n '⇑' : '\\u21D1',\r\n '⇒' : '\\u21D2',\r\n '⇓' : '\\u21D3',\r\n '⇔' : '\\u21D4',\r\n '∀' : '\\u2200',\r\n '∂' : '\\u2202',\r\n '∃' : '\\u2203',\r\n '∅' : '\\u2205',\r\n '∇' : '\\u2207',\r\n '∈' : '\\u2208',\r\n '∉' : '\\u2209',\r\n '∋' : '\\u220B',\r\n '∏' : '\\u220F',\r\n '∑' : '\\u2211',\r\n '−' : '\\u2212',\r\n '∗' : '\\u2217',\r\n '√' : '\\u221A',\r\n '∝' : '\\u221D',\r\n '∞' : '\\u221E',\r\n '∠' : '\\u2220',\r\n '∧' : '\\u2227',\r\n '∨' : '\\u2228',\r\n '∩' : '\\u2229',\r\n '∪' : '\\u222A',\r\n '∫' : '\\u222B',\r\n '∴' : '\\u2234',\r\n '∼' : '\\u223C',\r\n '≅' : '\\u2245',\r\n '≈' : '\\u2248',\r\n '≠' : '\\u2260',\r\n '≡' : '\\u2261',\r\n '≤' : '\\u2264',\r\n '≥' : '\\u2265',\r\n '⊂' : '\\u2282',\r\n '⊃' : '\\u2283',\r\n '⊄' : '\\u2284',\r\n '⊆' : '\\u2286',\r\n '⊇' : '\\u2287',\r\n '⊕' : '\\u2295',\r\n '⊗' : '\\u2297',\r\n '⊥' : '\\u22A5',\r\n '⋅' : '\\u22C5',\r\n '⌈' : '\\u2308',\r\n '⌉' : '\\u2309',\r\n '⌊' : '\\u230A',\r\n '⌋' : '\\u230B',\r\n '⟨' : '\\u2329',\r\n '⟩' : '\\u232A',\r\n '◊' : '\\u25CA',\r\n '♠' : '\\u2660',\r\n '♣' : '\\u2663',\r\n '♥' : '\\u2665',\r\n '♦' : '\\u2666'\r\n };\r\n\r\n var decodeEntity = function (code) {\r\n // name type\r\n if (code.charAt(1) !== '#') {\r\n return HTML_ENTITIES[code] || code;\r\n }\r\n\r\n var n, c = code.charAt(2);\r\n // hex number\r\n if (c === 'x' || c === 'X') {\r\n c = code.substring(3, code.length - 1);\r\n n = parseInt(c, 16);\r\n } else {\r\n c = code.substring(2, code.length - 1);\r\n n = parseInt(c);\r\n }\r\n return isNaN(n) ? code : String.fromCharCode(n);\r\n };\r\n\r\n var htmlEncode = function (str) {\r\n return str.replace(/&/g, '&').replace(/\"/g, '"').replace(/'/g, ''')\r\n .replace(//g, '>');\r\n };\r\n\r\n var htmlDecode = function (str) {\r\n return str.replace(/&#?\\w+;/g, decodeEntity);\r\n };\r\n\r\n var exports = htmlEncode;\r\n htmlEncode.htmlEncode = htmlEncode;\r\n htmlEncode.htmlDecode = htmlDecode;\r\n if (COMMON_JS) {\r\n module.exports = exports;\r\n } else {\r\n root.htmlEncode = htmlEncode;\r\n root.htmlDecode = htmlDecode;\r\n if (AMD) {\r\n define(function() {\r\n return exports;\r\n });\r\n }\r\n }\r\n})();\r\n","\"use strict\";\n\n/**\r\n * filesize\r\n *\r\n * @copyright 2018 Jason Mulligan \r\n * @license BSD-3-Clause\r\n * @version 3.6.1\r\n */\n(function (global) {\n\tvar b = /^(b|B)$/,\n\t symbol = {\n\t\tiec: {\n\t\t\tbits: [\"b\", \"Kib\", \"Mib\", \"Gib\", \"Tib\", \"Pib\", \"Eib\", \"Zib\", \"Yib\"],\n\t\t\tbytes: [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\", \"EiB\", \"ZiB\", \"YiB\"]\n\t\t},\n\t\tjedec: {\n\t\t\tbits: [\"b\", \"Kb\", \"Mb\", \"Gb\", \"Tb\", \"Pb\", \"Eb\", \"Zb\", \"Yb\"],\n\t\t\tbytes: [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"]\n\t\t}\n\t},\n\t fullform = {\n\t\tiec: [\"\", \"kibi\", \"mebi\", \"gibi\", \"tebi\", \"pebi\", \"exbi\", \"zebi\", \"yobi\"],\n\t\tjedec: [\"\", \"kilo\", \"mega\", \"giga\", \"tera\", \"peta\", \"exa\", \"zetta\", \"yotta\"]\n\t};\n\n\t/**\r\n * filesize\r\n *\r\n * @method filesize\r\n * @param {Mixed} arg String, Int or Float to transform\r\n * @param {Object} descriptor [Optional] Flags\r\n * @return {String} Readable file size String\r\n */\n\tfunction filesize(arg) {\n\t\tvar descriptor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tvar result = [],\n\t\t val = 0,\n\t\t e = void 0,\n\t\t base = void 0,\n\t\t bits = void 0,\n\t\t ceil = void 0,\n\t\t full = void 0,\n\t\t fullforms = void 0,\n\t\t neg = void 0,\n\t\t num = void 0,\n\t\t output = void 0,\n\t\t round = void 0,\n\t\t unix = void 0,\n\t\t separator = void 0,\n\t\t spacer = void 0,\n\t\t standard = void 0,\n\t\t symbols = void 0;\n\n\t\tif (isNaN(arg)) {\n\t\t\tthrow new Error(\"Invalid arguments\");\n\t\t}\n\n\t\tbits = descriptor.bits === true;\n\t\tunix = descriptor.unix === true;\n\t\tbase = descriptor.base || 2;\n\t\tround = descriptor.round !== void 0 ? descriptor.round : unix ? 1 : 2;\n\t\tseparator = descriptor.separator !== void 0 ? descriptor.separator || \"\" : \"\";\n\t\tspacer = descriptor.spacer !== void 0 ? descriptor.spacer : unix ? \"\" : \" \";\n\t\tsymbols = descriptor.symbols || descriptor.suffixes || {};\n\t\tstandard = base === 2 ? descriptor.standard || \"jedec\" : \"jedec\";\n\t\toutput = descriptor.output || \"string\";\n\t\tfull = descriptor.fullform === true;\n\t\tfullforms = descriptor.fullforms instanceof Array ? descriptor.fullforms : [];\n\t\te = descriptor.exponent !== void 0 ? descriptor.exponent : -1;\n\t\tnum = Number(arg);\n\t\tneg = num < 0;\n\t\tceil = base > 2 ? 1000 : 1024;\n\n\t\t// Flipping a negative number to determine the size\n\t\tif (neg) {\n\t\t\tnum = -num;\n\t\t}\n\n\t\t// Determining the exponent\n\t\tif (e === -1 || isNaN(e)) {\n\t\t\te = Math.floor(Math.log(num) / Math.log(ceil));\n\n\t\t\tif (e < 0) {\n\t\t\t\te = 0;\n\t\t\t}\n\t\t}\n\n\t\t// Exceeding supported length, time to reduce & multiply\n\t\tif (e > 8) {\n\t\t\te = 8;\n\t\t}\n\n\t\t// Zero is now a special case because bytes divide by 1\n\t\tif (num === 0) {\n\t\t\tresult[0] = 0;\n\t\t\tresult[1] = unix ? \"\" : symbol[standard][bits ? \"bits\" : \"bytes\"][e];\n\t\t} else {\n\t\t\tval = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e));\n\n\t\t\tif (bits) {\n\t\t\t\tval = val * 8;\n\n\t\t\t\tif (val >= ceil && e < 8) {\n\t\t\t\t\tval = val / ceil;\n\t\t\t\t\te++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresult[0] = Number(val.toFixed(e > 0 ? round : 0));\n\t\t\tresult[1] = base === 10 && e === 1 ? bits ? \"kb\" : \"kB\" : symbol[standard][bits ? \"bits\" : \"bytes\"][e];\n\n\t\t\tif (unix) {\n\t\t\t\tresult[1] = standard === \"jedec\" ? result[1].charAt(0) : e > 0 ? result[1].replace(/B$/, \"\") : result[1];\n\n\t\t\t\tif (b.test(result[1])) {\n\t\t\t\t\tresult[0] = Math.floor(result[0]);\n\t\t\t\t\tresult[1] = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Decorating a 'diff'\n\t\tif (neg) {\n\t\t\tresult[0] = -result[0];\n\t\t}\n\n\t\t// Applying custom symbol\n\t\tresult[1] = symbols[result[1]] || result[1];\n\n\t\t// Returning Array, Object, or String (default)\n\t\tif (output === \"array\") {\n\t\t\treturn result;\n\t\t}\n\n\t\tif (output === \"exponent\") {\n\t\t\treturn e;\n\t\t}\n\n\t\tif (output === \"object\") {\n\t\t\treturn { value: result[0], suffix: result[1], symbol: result[1] };\n\t\t}\n\n\t\tif (full) {\n\t\t\tresult[1] = fullforms[e] ? fullforms[e] : fullform[standard][e] + (bits ? \"bit\" : \"byte\") + (result[0] === 1 ? \"\" : \"s\");\n\t\t}\n\n\t\tif (separator.length > 0) {\n\t\t\tresult[0] = result[0].toString().replace(\".\", separator);\n\t\t}\n\n\t\treturn result.join(spacer);\n\t}\n\n\t// Partial application for functional programming\n\tfilesize.partial = function (opt) {\n\t\treturn function (arg) {\n\t\t\treturn filesize(arg, opt);\n\t\t};\n\t};\n\n\t// CommonJS, AMD, script tag\n\tif (typeof exports !== \"undefined\") {\n\t\tmodule.exports = filesize;\n\t} else if (typeof define === \"function\" && define.amd) {\n\t\tdefine(function () {\n\t\t\treturn filesize;\n\t\t});\n\t} else {\n\t\tglobal.filesize = filesize;\n\t}\n})(typeof window !== \"undefined\" ? window : global);\n","/* @license\nPapa Parse\nv4.6.3\nhttps://github.com/mholt/PapaParse\nLicense: MIT\n*/\nArray.isArray||(Array.isArray=function(e){return\"[object Array]\"===Object.prototype.toString.call(e)}),function(e,t){\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof module&&\"undefined\"!=typeof exports?module.exports=t():e.Papa=t()}(this,function(){\"use strict\";var s,e,f=\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:void 0!==f?f:{},n=!f.document&&!!f.postMessage,o=n&&/(\\?|&)papaworker(=|&|$)/.test(f.location.search),a=!1,h={},u=0,k={parse:function(e,t){var r=(t=t||{}).dynamicTyping||!1;z(r)&&(t.dynamicTypingFunction=r,r={});if(t.dynamicTyping=r,t.transform=!!z(t.transform)&&t.transform,t.worker&&k.WORKERS_SUPPORTED){var i=function(){if(!k.WORKERS_SUPPORTED)return!1;if(!a&&null===k.SCRIPT_PATH)throw new Error(\"Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.\");var e=k.SCRIPT_PATH||s;e+=(-1!==e.indexOf(\"?\")?\"&\":\"?\")+\"papaworker\";var t=new f.Worker(e);return t.onmessage=m,t.id=u++,h[t.id]=t}();return i.userStep=t.step,i.userChunk=t.chunk,i.userComplete=t.complete,i.userError=t.error,t.step=z(t.step),t.chunk=z(t.chunk),t.complete=z(t.complete),t.error=z(t.error),delete t.worker,void i.postMessage({input:e,config:t,workerId:i.id})}var n=null;k.NODE_STREAM_INPUT,\"string\"==typeof e?n=t.download?new c(t):new _(t):!0===e.readable&&z(e.read)&&z(e.on)?n=new g(t):(f.File&&e instanceof File||e instanceof Object)&&(n=new p(t));return n.stream(e)},unparse:function(e,t){var i=!1,g=!0,m=\",\",y=\"\\r\\n\",n='\"',r=!1;!function(){if(\"object\"!=typeof t)return;\"string\"!=typeof t.delimiter||k.BAD_DELIMITERS.filter(function(e){return-1!==t.delimiter.indexOf(e)}).length||(m=t.delimiter);(\"boolean\"==typeof t.quotes||Array.isArray(t.quotes))&&(i=t.quotes);\"boolean\"!=typeof t.skipEmptyLines&&\"string\"!=typeof t.skipEmptyLines||(r=t.skipEmptyLines);\"string\"==typeof t.newline&&(y=t.newline);\"string\"==typeof t.quoteChar&&(n=t.quoteChar);\"boolean\"==typeof t.header&&(g=t.header)}();var s=new RegExp(M(n),\"g\");\"string\"==typeof e&&(e=JSON.parse(e));if(Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return o(null,e,r);if(\"object\"==typeof e[0])return o(a(e[0]),e,r)}else if(\"object\"==typeof e)return\"string\"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:a(e.data[0])),Array.isArray(e.data[0])||\"object\"==typeof e.data[0]||(e.data=[e.data])),o(e.fields||[],e.data||[],r);throw\"exception: Unable to serialize unrecognized input\";function a(e){if(\"object\"!=typeof e)return[];var t=[];for(var r in e)t.push(r);return t}function o(e,t,r){var i=\"\";\"string\"==typeof e&&(e=JSON.parse(e)),\"string\"==typeof t&&(t=JSON.parse(t));var n=Array.isArray(e)&&0=this._config.preview;if(o)f.postMessage({results:n,workerId:k.WORKER_ID,finished:a});else if(z(this._config.chunk)&&!t){if(this._config.chunk(n,this._handle),this._handle.paused()||this._handle.aborted())return;n=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),this._completed||!a||!z(this._config.complete)||n&&n.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),a||n&&n.meta.paused||this._nextChunk(),n}},this._sendError=function(e){z(this._config.error)?this._config.error(e):o&&this._config.error&&f.postMessage({workerId:k.WORKER_ID,error:e,finished:!1})}}function c(e){var i;(e=e||{}).chunkSize||(e.chunkSize=k.RemoteChunkSize),l.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(i=new XMLHttpRequest,this._config.withCredentials&&(i.withCredentials=this._config.withCredentials),n||(i.onload=w(this._chunkLoaded,this),i.onerror=w(this._chunkError,this)),i.open(\"GET\",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var t in e)i.setRequestHeader(t,e[t])}if(this._config.chunkSize){var r=this._start+this._config.chunkSize-1;i.setRequestHeader(\"Range\",\"bytes=\"+this._start+\"-\"+r),i.setRequestHeader(\"If-None-Match\",\"webkit-no-cache\")}try{i.send()}catch(e){this._chunkError(e.message)}n&&0===i.status?this._chunkError():this._start+=this._config.chunkSize}},this._chunkLoaded=function(){4===i.readyState&&(i.status<200||400<=i.status?this._chunkError():(this._finished=!this._config.chunkSize||this._start>function(e){var t=e.getResponseHeader(\"Content-Range\");if(null===t)return-1;return parseInt(t.substr(t.lastIndexOf(\"/\")+1))}(i),this.parseChunk(i.responseText)))},this._chunkError=function(e){var t=i.statusText||e;this._sendError(new Error(t))}}function p(e){var i,n;(e=e||{}).chunkSize||(e.chunkSize=k.LocalChunkSize),l.call(this,e);var s=\"undefined\"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,s?((i=new FileReader).onload=w(this._chunkLoaded,this),i.onerror=w(this._chunkError,this)):i=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(i.error)}}function _(e){var r;l.call(this,e=e||{}),this.stream=function(e){return r=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,t=e?r.substr(0,e):r;return r=e?r.substr(e):\"\",this._finished=!r,this.parseChunk(t)}}}function g(e){l.call(this,e=e||{});var t=[],r=!0,i=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on(\"data\",this._streamData),this._input.on(\"end\",this._streamEnd),this._input.on(\"error\",this._streamError)},this._checkIsFinished=function(){i&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=w(function(e){try{t.push(\"string\"==typeof e?e:e.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=w(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=w(function(){this._streamCleanUp(),i=!0,this._streamData(\"\")},this),this._streamCleanUp=w(function(){this._input.removeListener(\"data\",this._streamData),this._input.removeListener(\"end\",this._streamEnd),this._input.removeListener(\"error\",this._streamError)},this)}function r(g){var a,o,h,i=/^\\s*-?(\\d*\\.?\\d+|\\d+\\.?\\d*)(e[-+]?\\d+)?\\s*$/i,n=/(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z))|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))/,t=this,r=0,s=0,u=!1,e=!1,f=[],d={data:[],errors:[],meta:{}};if(z(g.step)){var l=g.step;g.step=function(e){if(d=e,p())c();else{if(c(),0===d.data.length)return;r+=e.data.length,g.preview&&r>g.preview?o.abort():l(d,t)}}}function m(e){return\"greedy\"===g.skipEmptyLines?\"\"===e.join(\"\").trim():1===e.length&&0===e[0].length}function c(){if(d&&h&&(y(\"Delimiter\",\"UndetectableDelimiter\",\"Unable to auto-detect delimiting character; defaulted to '\"+k.DefaultDelimiter+\"'\"),h=!1),g.skipEmptyLines)for(var e=0;e=f.length?\"__parsed_extra\":f[t]),g.transform&&(n=g.transform(n,i)),n=_(i,n),\"__parsed_extra\"===i?(r[i]=r[i]||[],r[i].push(n)):r[i]=n}d.data[e]=r,g.header&&(t>f.length?y(\"FieldMismatch\",\"TooManyFields\",\"Too many fields: expected \"+f.length+\" fields but parsed \"+t,s+e):t=i.length/2?\"\\r\\n\":\"\\r\"}(e,i)),h=!1,g.delimiter)z(g.delimiter)&&(g.delimiter=g.delimiter(e),d.meta.delimiter=g.delimiter);else{var n=function(e,t,r,i){for(var n,s,a,o=[\",\",\"\\t\",\"|\",\";\",k.RECORD_SEP,k.UNIT_SEP],h=0;h=A)return C(!0)}else for(p=P,P++;;){if(-1===(p=i.indexOf(S,p+1)))return r||u.push({type:\"Quotes\",code:\"MissingQuotes\",message:\"Quoted field unterminated\",row:h.length,index:P}),E();if(p===n-1)return E(i.substring(P,p).replace(m,S));if(S!==L||i[p+1]!==L){if(S===L||0===p||i[p-1]!==L){var y=b(-1===g?_:Math.min(_,g));if(i[p+1+y]===O){f.push(i.substring(P,p).replace(m,S)),P=p+1+y+e,_=i.indexOf(O,P),g=i.indexOf(x,P);break}var v=b(g);if(i.substr(p+1+v,s)===x){if(f.push(i.substring(P,p).replace(m,S)),w(p+1+v+s),_=i.indexOf(O,P),o&&(R(),F))return C();if(A&&h.length>=A)return C(!0);break}u.push({type:\"Quotes\",code:\"InvalidQuotes\",message:\"Trailing quote on quoted field is malformed\",row:h.length,index:P}),p++}}else p++}return E();function k(e){h.push(e),d=P}function b(e){var t=0;if(-1!==e){var r=i.substring(p+1,e);r&&\"\"===r.trim()&&(t=r.length)}return t}function E(e){return r||(void 0===e&&(e=i.substr(P)),f.push(e),P=n,k(f),o&&R()),C()}function w(e){P=e,k(f),f=[],g=i.indexOf(x,P)}function C(e){return{data:h,errors:u,meta:{delimiter:O,linebreak:x,aborted:F,truncated:!!e,cursor:d+(t||0)}}}function R(){I(C()),h=[],u=[]}},this.abort=function(){F=!0},this.getCharIndex=function(){return P}}function m(e){var t=e.data,r=h[t.workerId],i=!1;if(t.error)r.userError(t.error,t.file);else if(t.results&&t.results.data){var n={abort:function(){i=!0,y(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:b,resume:b};if(z(r.userStep)){for(var s=0;s\n * Build: `lodash modularize exports=\"es\" -o ./`\n * Copyright JS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\nimport array from './array.js';\nimport collection from './collection.js';\nimport date from './date.js';\nimport func from './function.js';\nimport lang from './lang.js';\nimport math from './math.js';\nimport number from './number.js';\nimport object from './object.js';\nimport seq from './seq.js';\nimport string from './string.js';\nimport util from './util.js';\nimport LazyWrapper from './_LazyWrapper.js';\nimport LodashWrapper from './_LodashWrapper.js';\nimport Symbol from './_Symbol.js';\nimport arrayEach from './_arrayEach.js';\nimport arrayPush from './_arrayPush.js';\nimport baseForOwn from './_baseForOwn.js';\nimport baseFunctions from './_baseFunctions.js';\nimport baseInvoke from './_baseInvoke.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseRest from './_baseRest.js';\nimport createHybrid from './_createHybrid.js';\nimport identity from './identity.js';\nimport isArray from './isArray.js';\nimport isObject from './isObject.js';\nimport keys from './keys.js';\nimport last from './last.js';\nimport lazyClone from './_lazyClone.js';\nimport lazyReverse from './_lazyReverse.js';\nimport lazyValue from './_lazyValue.js';\nimport _mixin from './mixin.js';\nimport negate from './negate.js';\nimport realNames from './_realNames.js';\nimport thru from './thru.js';\nimport toInteger from './toInteger.js';\nimport lodash from './wrapperLodash.js';\n\n/** Used as the semantic version number. */\nvar VERSION = '4.17.10';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_KEY_FLAG = 2;\n\n/** Used to indicate the type of lazy iteratees. */\nvar LAZY_FILTER_FLAG = 1,\n LAZY_WHILE_FLAG = 3;\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295;\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar symIterator = Symbol ? Symbol.iterator : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n// wrap `_.mixin` so it works when provided only one argument\nvar mixin = (function(func) {\n return function(object, source, options) {\n if (options == null) {\n var isObj = isObject(source),\n props = isObj && keys(source),\n methodNames = props && props.length && baseFunctions(source, props);\n\n if (!(methodNames ? methodNames.length : isObj)) {\n options = source;\n source = object;\n object = this;\n }\n }\n return func(object, source, options);\n };\n}(_mixin));\n\n// Add methods that return wrapped values in chain sequences.\nlodash.after = func.after;\nlodash.ary = func.ary;\nlodash.assign = object.assign;\nlodash.assignIn = object.assignIn;\nlodash.assignInWith = object.assignInWith;\nlodash.assignWith = object.assignWith;\nlodash.at = object.at;\nlodash.before = func.before;\nlodash.bind = func.bind;\nlodash.bindAll = util.bindAll;\nlodash.bindKey = func.bindKey;\nlodash.castArray = lang.castArray;\nlodash.chain = seq.chain;\nlodash.chunk = array.chunk;\nlodash.compact = array.compact;\nlodash.concat = array.concat;\nlodash.cond = util.cond;\nlodash.conforms = util.conforms;\nlodash.constant = util.constant;\nlodash.countBy = collection.countBy;\nlodash.create = object.create;\nlodash.curry = func.curry;\nlodash.curryRight = func.curryRight;\nlodash.debounce = func.debounce;\nlodash.defaults = object.defaults;\nlodash.defaultsDeep = object.defaultsDeep;\nlodash.defer = func.defer;\nlodash.delay = func.delay;\nlodash.difference = array.difference;\nlodash.differenceBy = array.differenceBy;\nlodash.differenceWith = array.differenceWith;\nlodash.drop = array.drop;\nlodash.dropRight = array.dropRight;\nlodash.dropRightWhile = array.dropRightWhile;\nlodash.dropWhile = array.dropWhile;\nlodash.fill = array.fill;\nlodash.filter = collection.filter;\nlodash.flatMap = collection.flatMap;\nlodash.flatMapDeep = collection.flatMapDeep;\nlodash.flatMapDepth = collection.flatMapDepth;\nlodash.flatten = array.flatten;\nlodash.flattenDeep = array.flattenDeep;\nlodash.flattenDepth = array.flattenDepth;\nlodash.flip = func.flip;\nlodash.flow = util.flow;\nlodash.flowRight = util.flowRight;\nlodash.fromPairs = array.fromPairs;\nlodash.functions = object.functions;\nlodash.functionsIn = object.functionsIn;\nlodash.groupBy = collection.groupBy;\nlodash.initial = array.initial;\nlodash.intersection = array.intersection;\nlodash.intersectionBy = array.intersectionBy;\nlodash.intersectionWith = array.intersectionWith;\nlodash.invert = object.invert;\nlodash.invertBy = object.invertBy;\nlodash.invokeMap = collection.invokeMap;\nlodash.iteratee = util.iteratee;\nlodash.keyBy = collection.keyBy;\nlodash.keys = keys;\nlodash.keysIn = object.keysIn;\nlodash.map = collection.map;\nlodash.mapKeys = object.mapKeys;\nlodash.mapValues = object.mapValues;\nlodash.matches = util.matches;\nlodash.matchesProperty = util.matchesProperty;\nlodash.memoize = func.memoize;\nlodash.merge = object.merge;\nlodash.mergeWith = object.mergeWith;\nlodash.method = util.method;\nlodash.methodOf = util.methodOf;\nlodash.mixin = mixin;\nlodash.negate = negate;\nlodash.nthArg = util.nthArg;\nlodash.omit = object.omit;\nlodash.omitBy = object.omitBy;\nlodash.once = func.once;\nlodash.orderBy = collection.orderBy;\nlodash.over = util.over;\nlodash.overArgs = func.overArgs;\nlodash.overEvery = util.overEvery;\nlodash.overSome = util.overSome;\nlodash.partial = func.partial;\nlodash.partialRight = func.partialRight;\nlodash.partition = collection.partition;\nlodash.pick = object.pick;\nlodash.pickBy = object.pickBy;\nlodash.property = util.property;\nlodash.propertyOf = util.propertyOf;\nlodash.pull = array.pull;\nlodash.pullAll = array.pullAll;\nlodash.pullAllBy = array.pullAllBy;\nlodash.pullAllWith = array.pullAllWith;\nlodash.pullAt = array.pullAt;\nlodash.range = util.range;\nlodash.rangeRight = util.rangeRight;\nlodash.rearg = func.rearg;\nlodash.reject = collection.reject;\nlodash.remove = array.remove;\nlodash.rest = func.rest;\nlodash.reverse = array.reverse;\nlodash.sampleSize = collection.sampleSize;\nlodash.set = object.set;\nlodash.setWith = object.setWith;\nlodash.shuffle = collection.shuffle;\nlodash.slice = array.slice;\nlodash.sortBy = collection.sortBy;\nlodash.sortedUniq = array.sortedUniq;\nlodash.sortedUniqBy = array.sortedUniqBy;\nlodash.split = string.split;\nlodash.spread = func.spread;\nlodash.tail = array.tail;\nlodash.take = array.take;\nlodash.takeRight = array.takeRight;\nlodash.takeRightWhile = array.takeRightWhile;\nlodash.takeWhile = array.takeWhile;\nlodash.tap = seq.tap;\nlodash.throttle = func.throttle;\nlodash.thru = thru;\nlodash.toArray = lang.toArray;\nlodash.toPairs = object.toPairs;\nlodash.toPairsIn = object.toPairsIn;\nlodash.toPath = util.toPath;\nlodash.toPlainObject = lang.toPlainObject;\nlodash.transform = object.transform;\nlodash.unary = func.unary;\nlodash.union = array.union;\nlodash.unionBy = array.unionBy;\nlodash.unionWith = array.unionWith;\nlodash.uniq = array.uniq;\nlodash.uniqBy = array.uniqBy;\nlodash.uniqWith = array.uniqWith;\nlodash.unset = object.unset;\nlodash.unzip = array.unzip;\nlodash.unzipWith = array.unzipWith;\nlodash.update = object.update;\nlodash.updateWith = object.updateWith;\nlodash.values = object.values;\nlodash.valuesIn = object.valuesIn;\nlodash.without = array.without;\nlodash.words = string.words;\nlodash.wrap = func.wrap;\nlodash.xor = array.xor;\nlodash.xorBy = array.xorBy;\nlodash.xorWith = array.xorWith;\nlodash.zip = array.zip;\nlodash.zipObject = array.zipObject;\nlodash.zipObjectDeep = array.zipObjectDeep;\nlodash.zipWith = array.zipWith;\n\n// Add aliases.\nlodash.entries = object.toPairs;\nlodash.entriesIn = object.toPairsIn;\nlodash.extend = object.assignIn;\nlodash.extendWith = object.assignInWith;\n\n// Add methods to `lodash.prototype`.\nmixin(lodash, lodash);\n\n// Add methods that return unwrapped values in chain sequences.\nlodash.add = math.add;\nlodash.attempt = util.attempt;\nlodash.camelCase = string.camelCase;\nlodash.capitalize = string.capitalize;\nlodash.ceil = math.ceil;\nlodash.clamp = number.clamp;\nlodash.clone = lang.clone;\nlodash.cloneDeep = lang.cloneDeep;\nlodash.cloneDeepWith = lang.cloneDeepWith;\nlodash.cloneWith = lang.cloneWith;\nlodash.conformsTo = lang.conformsTo;\nlodash.deburr = string.deburr;\nlodash.defaultTo = util.defaultTo;\nlodash.divide = math.divide;\nlodash.endsWith = string.endsWith;\nlodash.eq = lang.eq;\nlodash.escape = string.escape;\nlodash.escapeRegExp = string.escapeRegExp;\nlodash.every = collection.every;\nlodash.find = collection.find;\nlodash.findIndex = array.findIndex;\nlodash.findKey = object.findKey;\nlodash.findLast = collection.findLast;\nlodash.findLastIndex = array.findLastIndex;\nlodash.findLastKey = object.findLastKey;\nlodash.floor = math.floor;\nlodash.forEach = collection.forEach;\nlodash.forEachRight = collection.forEachRight;\nlodash.forIn = object.forIn;\nlodash.forInRight = object.forInRight;\nlodash.forOwn = object.forOwn;\nlodash.forOwnRight = object.forOwnRight;\nlodash.get = object.get;\nlodash.gt = lang.gt;\nlodash.gte = lang.gte;\nlodash.has = object.has;\nlodash.hasIn = object.hasIn;\nlodash.head = array.head;\nlodash.identity = identity;\nlodash.includes = collection.includes;\nlodash.indexOf = array.indexOf;\nlodash.inRange = number.inRange;\nlodash.invoke = object.invoke;\nlodash.isArguments = lang.isArguments;\nlodash.isArray = isArray;\nlodash.isArrayBuffer = lang.isArrayBuffer;\nlodash.isArrayLike = lang.isArrayLike;\nlodash.isArrayLikeObject = lang.isArrayLikeObject;\nlodash.isBoolean = lang.isBoolean;\nlodash.isBuffer = lang.isBuffer;\nlodash.isDate = lang.isDate;\nlodash.isElement = lang.isElement;\nlodash.isEmpty = lang.isEmpty;\nlodash.isEqual = lang.isEqual;\nlodash.isEqualWith = lang.isEqualWith;\nlodash.isError = lang.isError;\nlodash.isFinite = lang.isFinite;\nlodash.isFunction = lang.isFunction;\nlodash.isInteger = lang.isInteger;\nlodash.isLength = lang.isLength;\nlodash.isMap = lang.isMap;\nlodash.isMatch = lang.isMatch;\nlodash.isMatchWith = lang.isMatchWith;\nlodash.isNaN = lang.isNaN;\nlodash.isNative = lang.isNative;\nlodash.isNil = lang.isNil;\nlodash.isNull = lang.isNull;\nlodash.isNumber = lang.isNumber;\nlodash.isObject = isObject;\nlodash.isObjectLike = lang.isObjectLike;\nlodash.isPlainObject = lang.isPlainObject;\nlodash.isRegExp = lang.isRegExp;\nlodash.isSafeInteger = lang.isSafeInteger;\nlodash.isSet = lang.isSet;\nlodash.isString = lang.isString;\nlodash.isSymbol = lang.isSymbol;\nlodash.isTypedArray = lang.isTypedArray;\nlodash.isUndefined = lang.isUndefined;\nlodash.isWeakMap = lang.isWeakMap;\nlodash.isWeakSet = lang.isWeakSet;\nlodash.join = array.join;\nlodash.kebabCase = string.kebabCase;\nlodash.last = last;\nlodash.lastIndexOf = array.lastIndexOf;\nlodash.lowerCase = string.lowerCase;\nlodash.lowerFirst = string.lowerFirst;\nlodash.lt = lang.lt;\nlodash.lte = lang.lte;\nlodash.max = math.max;\nlodash.maxBy = math.maxBy;\nlodash.mean = math.mean;\nlodash.meanBy = math.meanBy;\nlodash.min = math.min;\nlodash.minBy = math.minBy;\nlodash.stubArray = util.stubArray;\nlodash.stubFalse = util.stubFalse;\nlodash.stubObject = util.stubObject;\nlodash.stubString = util.stubString;\nlodash.stubTrue = util.stubTrue;\nlodash.multiply = math.multiply;\nlodash.nth = array.nth;\nlodash.noop = util.noop;\nlodash.now = date.now;\nlodash.pad = string.pad;\nlodash.padEnd = string.padEnd;\nlodash.padStart = string.padStart;\nlodash.parseInt = string.parseInt;\nlodash.random = number.random;\nlodash.reduce = collection.reduce;\nlodash.reduceRight = collection.reduceRight;\nlodash.repeat = string.repeat;\nlodash.replace = string.replace;\nlodash.result = object.result;\nlodash.round = math.round;\nlodash.sample = collection.sample;\nlodash.size = collection.size;\nlodash.snakeCase = string.snakeCase;\nlodash.some = collection.some;\nlodash.sortedIndex = array.sortedIndex;\nlodash.sortedIndexBy = array.sortedIndexBy;\nlodash.sortedIndexOf = array.sortedIndexOf;\nlodash.sortedLastIndex = array.sortedLastIndex;\nlodash.sortedLastIndexBy = array.sortedLastIndexBy;\nlodash.sortedLastIndexOf = array.sortedLastIndexOf;\nlodash.startCase = string.startCase;\nlodash.startsWith = string.startsWith;\nlodash.subtract = math.subtract;\nlodash.sum = math.sum;\nlodash.sumBy = math.sumBy;\nlodash.template = string.template;\nlodash.times = util.times;\nlodash.toFinite = lang.toFinite;\nlodash.toInteger = toInteger;\nlodash.toLength = lang.toLength;\nlodash.toLower = string.toLower;\nlodash.toNumber = lang.toNumber;\nlodash.toSafeInteger = lang.toSafeInteger;\nlodash.toString = lang.toString;\nlodash.toUpper = string.toUpper;\nlodash.trim = string.trim;\nlodash.trimEnd = string.trimEnd;\nlodash.trimStart = string.trimStart;\nlodash.truncate = string.truncate;\nlodash.unescape = string.unescape;\nlodash.uniqueId = util.uniqueId;\nlodash.upperCase = string.upperCase;\nlodash.upperFirst = string.upperFirst;\n\n// Add aliases.\nlodash.each = collection.forEach;\nlodash.eachRight = collection.forEachRight;\nlodash.first = array.head;\n\nmixin(lodash, (function() {\n var source = {};\n baseForOwn(lodash, function(func, methodName) {\n if (!hasOwnProperty.call(lodash.prototype, methodName)) {\n source[methodName] = func;\n }\n });\n return source;\n}()), { 'chain': false });\n\n/**\n * The semantic version number.\n *\n * @static\n * @memberOf _\n * @type {string}\n */\nlodash.VERSION = VERSION;\n(lodash.templateSettings = string.templateSettings).imports._ = lodash;\n\n// Assign default placeholders.\narrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {\n lodash[methodName].placeholder = lodash;\n});\n\n// Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\narrayEach(['drop', 'take'], function(methodName, index) {\n LazyWrapper.prototype[methodName] = function(n) {\n n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\n\n var result = (this.__filtered__ && !index)\n ? new LazyWrapper(this)\n : this.clone();\n\n if (result.__filtered__) {\n result.__takeCount__ = nativeMin(n, result.__takeCount__);\n } else {\n result.__views__.push({\n 'size': nativeMin(n, MAX_ARRAY_LENGTH),\n 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')\n });\n }\n return result;\n };\n\n LazyWrapper.prototype[methodName + 'Right'] = function(n) {\n return this.reverse()[methodName](n).reverse();\n };\n});\n\n// Add `LazyWrapper` methods that accept an `iteratee` value.\narrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\n var type = index + 1,\n isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\n\n LazyWrapper.prototype[methodName] = function(iteratee) {\n var result = this.clone();\n result.__iteratees__.push({\n 'iteratee': baseIteratee(iteratee, 3),\n 'type': type\n });\n result.__filtered__ = result.__filtered__ || isFilter;\n return result;\n };\n});\n\n// Add `LazyWrapper` methods for `_.head` and `_.last`.\narrayEach(['head', 'last'], function(methodName, index) {\n var takeName = 'take' + (index ? 'Right' : '');\n\n LazyWrapper.prototype[methodName] = function() {\n return this[takeName](1).value()[0];\n };\n});\n\n// Add `LazyWrapper` methods for `_.initial` and `_.tail`.\narrayEach(['initial', 'tail'], function(methodName, index) {\n var dropName = 'drop' + (index ? '' : 'Right');\n\n LazyWrapper.prototype[methodName] = function() {\n return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\n };\n});\n\nLazyWrapper.prototype.compact = function() {\n return this.filter(identity);\n};\n\nLazyWrapper.prototype.find = function(predicate) {\n return this.filter(predicate).head();\n};\n\nLazyWrapper.prototype.findLast = function(predicate) {\n return this.reverse().find(predicate);\n};\n\nLazyWrapper.prototype.invokeMap = baseRest(function(path, args) {\n if (typeof path == 'function') {\n return new LazyWrapper(this);\n }\n return this.map(function(value) {\n return baseInvoke(value, path, args);\n });\n});\n\nLazyWrapper.prototype.reject = function(predicate) {\n return this.filter(negate(baseIteratee(predicate)));\n};\n\nLazyWrapper.prototype.slice = function(start, end) {\n start = toInteger(start);\n\n var result = this;\n if (result.__filtered__ && (start > 0 || end < 0)) {\n return new LazyWrapper(result);\n }\n if (start < 0) {\n result = result.takeRight(-start);\n } else if (start) {\n result = result.drop(start);\n }\n if (end !== undefined) {\n end = toInteger(end);\n result = end < 0 ? result.dropRight(-end) : result.take(end - start);\n }\n return result;\n};\n\nLazyWrapper.prototype.takeRightWhile = function(predicate) {\n return this.reverse().takeWhile(predicate).reverse();\n};\n\nLazyWrapper.prototype.toArray = function() {\n return this.take(MAX_ARRAY_LENGTH);\n};\n\n// Add `LazyWrapper` methods to `lodash.prototype`.\nbaseForOwn(LazyWrapper.prototype, function(func, methodName) {\n var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\n isTaker = /^(?:head|last)$/.test(methodName),\n lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\n retUnwrapped = isTaker || /^find/.test(methodName);\n\n if (!lodashFunc) {\n return;\n }\n lodash.prototype[methodName] = function() {\n var value = this.__wrapped__,\n args = isTaker ? [1] : arguments,\n isLazy = value instanceof LazyWrapper,\n iteratee = args[0],\n useLazy = isLazy || isArray(value);\n\n var interceptor = function(value) {\n var result = lodashFunc.apply(lodash, arrayPush([value], args));\n return (isTaker && chainAll) ? result[0] : result;\n };\n\n if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\n // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\n isLazy = useLazy = false;\n }\n var chainAll = this.__chain__,\n isHybrid = !!this.__actions__.length,\n isUnwrapped = retUnwrapped && !chainAll,\n onlyLazy = isLazy && !isHybrid;\n\n if (!retUnwrapped && useLazy) {\n value = onlyLazy ? value : new LazyWrapper(this);\n var result = func.apply(value, args);\n result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\n return new LodashWrapper(result, chainAll);\n }\n if (isUnwrapped && onlyLazy) {\n return func.apply(this, args);\n }\n result = this.thru(interceptor);\n return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\n };\n});\n\n// Add `Array` methods to `lodash.prototype`.\narrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\n var func = arrayProto[methodName],\n chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\n retUnwrapped = /^(?:pop|shift)$/.test(methodName);\n\n lodash.prototype[methodName] = function() {\n var args = arguments;\n if (retUnwrapped && !this.__chain__) {\n var value = this.value();\n return func.apply(isArray(value) ? value : [], args);\n }\n return this[chainName](function(value) {\n return func.apply(isArray(value) ? value : [], args);\n });\n };\n});\n\n// Map minified method names to their real names.\nbaseForOwn(LazyWrapper.prototype, function(func, methodName) {\n var lodashFunc = lodash[methodName];\n if (lodashFunc) {\n var key = (lodashFunc.name + ''),\n names = realNames[key] || (realNames[key] = []);\n\n names.push({ 'name': methodName, 'func': lodashFunc });\n }\n});\n\nrealNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{\n 'name': 'wrapper',\n 'func': undefined\n}];\n\n// Add methods to `LazyWrapper`.\nLazyWrapper.prototype.clone = lazyClone;\nLazyWrapper.prototype.reverse = lazyReverse;\nLazyWrapper.prototype.value = lazyValue;\n\n// Add chain sequence methods to the `lodash` wrapper.\nlodash.prototype.at = seq.at;\nlodash.prototype.chain = seq.wrapperChain;\nlodash.prototype.commit = seq.commit;\nlodash.prototype.next = seq.next;\nlodash.prototype.plant = seq.plant;\nlodash.prototype.reverse = seq.reverse;\nlodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = seq.value;\n\n// Add lazy aliases.\nlodash.prototype.first = lodash.prototype.head;\n\nif (symIterator) {\n lodash.prototype[symIterator] = seq.toIterator;\n}\n\nexport default lodash;\n"],"mappings":"AACA;;;;;;;;;;;;;;;ACeA;;;;ACZA;;;;;;;ACMA;;;;;ACFA;;;;;;;;;;;ACDA;;;;;;;;;;;;ACWA;;;;;;;;ACTA;;;;;;;;ACGA;;;;;;;;;ACHA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;ACFA;;;;;;;;;;;ACAA;;;;;;ACEA;;;;;;ACAA;;;;;;;;;;ACHA;;;;;;;;;;;;;;;;;ACGA;;;;;;;;;;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;ACHA;;;;;;;;;ACsFA","sourceRoot":""}